Merge tag 'v5.3-rc8' into rdma.git for-next
To resolve dependencies in following patches mlx5_ib.h conflict resolved by keeing both hunks Linux 5.3-rc8 Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
commit
75c66515e4
|
@ -107,10 +107,13 @@ ForEachMacros:
|
||||||
- 'css_for_each_descendant_post'
|
- 'css_for_each_descendant_post'
|
||||||
- 'css_for_each_descendant_pre'
|
- 'css_for_each_descendant_pre'
|
||||||
- 'device_for_each_child_node'
|
- 'device_for_each_child_node'
|
||||||
|
- 'dma_fence_chain_for_each'
|
||||||
- 'drm_atomic_crtc_for_each_plane'
|
- 'drm_atomic_crtc_for_each_plane'
|
||||||
- 'drm_atomic_crtc_state_for_each_plane'
|
- 'drm_atomic_crtc_state_for_each_plane'
|
||||||
- 'drm_atomic_crtc_state_for_each_plane_state'
|
- 'drm_atomic_crtc_state_for_each_plane_state'
|
||||||
- 'drm_atomic_for_each_plane_damage'
|
- 'drm_atomic_for_each_plane_damage'
|
||||||
|
- 'drm_client_for_each_connector_iter'
|
||||||
|
- 'drm_client_for_each_modeset'
|
||||||
- 'drm_connector_for_each_possible_encoder'
|
- 'drm_connector_for_each_possible_encoder'
|
||||||
- 'drm_for_each_connector_iter'
|
- 'drm_for_each_connector_iter'
|
||||||
- 'drm_for_each_crtc'
|
- 'drm_for_each_crtc'
|
||||||
|
@ -126,6 +129,7 @@ ForEachMacros:
|
||||||
- 'drm_mm_for_each_node_in_range'
|
- 'drm_mm_for_each_node_in_range'
|
||||||
- 'drm_mm_for_each_node_safe'
|
- 'drm_mm_for_each_node_safe'
|
||||||
- 'flow_action_for_each'
|
- 'flow_action_for_each'
|
||||||
|
- 'for_each_active_dev_scope'
|
||||||
- 'for_each_active_drhd_unit'
|
- 'for_each_active_drhd_unit'
|
||||||
- 'for_each_active_iommu'
|
- 'for_each_active_iommu'
|
||||||
- 'for_each_available_child_of_node'
|
- 'for_each_available_child_of_node'
|
||||||
|
@ -153,6 +157,8 @@ ForEachMacros:
|
||||||
- 'for_each_cpu_not'
|
- 'for_each_cpu_not'
|
||||||
- 'for_each_cpu_wrap'
|
- 'for_each_cpu_wrap'
|
||||||
- 'for_each_dev_addr'
|
- 'for_each_dev_addr'
|
||||||
|
- 'for_each_dev_scope'
|
||||||
|
- 'for_each_displayid_db'
|
||||||
- 'for_each_dma_cap_mask'
|
- 'for_each_dma_cap_mask'
|
||||||
- 'for_each_dpcm_be'
|
- 'for_each_dpcm_be'
|
||||||
- 'for_each_dpcm_be_rollback'
|
- 'for_each_dpcm_be_rollback'
|
||||||
|
@ -169,6 +175,8 @@ ForEachMacros:
|
||||||
- 'for_each_evictable_lru'
|
- 'for_each_evictable_lru'
|
||||||
- 'for_each_fib6_node_rt_rcu'
|
- 'for_each_fib6_node_rt_rcu'
|
||||||
- 'for_each_fib6_walker_rt'
|
- 'for_each_fib6_walker_rt'
|
||||||
|
- 'for_each_free_mem_pfn_range_in_zone'
|
||||||
|
- 'for_each_free_mem_pfn_range_in_zone_from'
|
||||||
- 'for_each_free_mem_range'
|
- 'for_each_free_mem_range'
|
||||||
- 'for_each_free_mem_range_reverse'
|
- 'for_each_free_mem_range_reverse'
|
||||||
- 'for_each_func_rsrc'
|
- 'for_each_func_rsrc'
|
||||||
|
@ -178,6 +186,7 @@ ForEachMacros:
|
||||||
- 'for_each_ip_tunnel_rcu'
|
- 'for_each_ip_tunnel_rcu'
|
||||||
- 'for_each_irq_nr'
|
- 'for_each_irq_nr'
|
||||||
- 'for_each_link_codecs'
|
- 'for_each_link_codecs'
|
||||||
|
- 'for_each_link_platforms'
|
||||||
- 'for_each_lru'
|
- 'for_each_lru'
|
||||||
- 'for_each_matching_node'
|
- 'for_each_matching_node'
|
||||||
- 'for_each_matching_node_and_match'
|
- 'for_each_matching_node_and_match'
|
||||||
|
@ -302,7 +311,10 @@ ForEachMacros:
|
||||||
- 'ide_port_for_each_present_dev'
|
- 'ide_port_for_each_present_dev'
|
||||||
- 'idr_for_each_entry'
|
- 'idr_for_each_entry'
|
||||||
- 'idr_for_each_entry_continue'
|
- 'idr_for_each_entry_continue'
|
||||||
|
- 'idr_for_each_entry_continue_ul'
|
||||||
- 'idr_for_each_entry_ul'
|
- 'idr_for_each_entry_ul'
|
||||||
|
- 'in_dev_for_each_ifa_rcu'
|
||||||
|
- 'in_dev_for_each_ifa_rtnl'
|
||||||
- 'inet_bind_bucket_for_each'
|
- 'inet_bind_bucket_for_each'
|
||||||
- 'inet_lhash2_for_each_icsk_rcu'
|
- 'inet_lhash2_for_each_icsk_rcu'
|
||||||
- 'key_for_each'
|
- 'key_for_each'
|
||||||
|
@ -343,8 +355,6 @@ ForEachMacros:
|
||||||
- 'media_device_for_each_intf'
|
- 'media_device_for_each_intf'
|
||||||
- 'media_device_for_each_link'
|
- 'media_device_for_each_link'
|
||||||
- 'media_device_for_each_pad'
|
- 'media_device_for_each_pad'
|
||||||
- 'mp_bvec_for_each_page'
|
|
||||||
- 'mp_bvec_for_each_segment'
|
|
||||||
- 'nanddev_io_for_each_page'
|
- 'nanddev_io_for_each_page'
|
||||||
- 'netdev_for_each_lower_dev'
|
- 'netdev_for_each_lower_dev'
|
||||||
- 'netdev_for_each_lower_private'
|
- 'netdev_for_each_lower_private'
|
||||||
|
@ -381,18 +391,19 @@ ForEachMacros:
|
||||||
- 'radix_tree_for_each_slot'
|
- 'radix_tree_for_each_slot'
|
||||||
- 'radix_tree_for_each_tagged'
|
- 'radix_tree_for_each_tagged'
|
||||||
- 'rbtree_postorder_for_each_entry_safe'
|
- 'rbtree_postorder_for_each_entry_safe'
|
||||||
|
- 'rdma_for_each_block'
|
||||||
- 'rdma_for_each_port'
|
- 'rdma_for_each_port'
|
||||||
- 'resource_list_for_each_entry'
|
- 'resource_list_for_each_entry'
|
||||||
- 'resource_list_for_each_entry_safe'
|
- 'resource_list_for_each_entry_safe'
|
||||||
- 'rhl_for_each_entry_rcu'
|
- 'rhl_for_each_entry_rcu'
|
||||||
- 'rhl_for_each_rcu'
|
- 'rhl_for_each_rcu'
|
||||||
- 'rht_for_each'
|
- 'rht_for_each'
|
||||||
- 'rht_for_each_from'
|
|
||||||
- 'rht_for_each_entry'
|
- 'rht_for_each_entry'
|
||||||
- 'rht_for_each_entry_from'
|
- 'rht_for_each_entry_from'
|
||||||
- 'rht_for_each_entry_rcu'
|
- 'rht_for_each_entry_rcu'
|
||||||
- 'rht_for_each_entry_rcu_from'
|
- 'rht_for_each_entry_rcu_from'
|
||||||
- 'rht_for_each_entry_safe'
|
- 'rht_for_each_entry_safe'
|
||||||
|
- 'rht_for_each_from'
|
||||||
- 'rht_for_each_rcu'
|
- 'rht_for_each_rcu'
|
||||||
- 'rht_for_each_rcu_from'
|
- 'rht_for_each_rcu_from'
|
||||||
- '__rq_for_each_bio'
|
- '__rq_for_each_bio'
|
||||||
|
|
5
.mailmap
5
.mailmap
|
@ -64,6 +64,9 @@ Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@imgtec.com>
|
||||||
Dengcheng Zhu <dzhu@wavecomp.com> <dczhu@mips.com>
|
Dengcheng Zhu <dzhu@wavecomp.com> <dczhu@mips.com>
|
||||||
Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@gmail.com>
|
Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@gmail.com>
|
||||||
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||||
|
Dmitry Safonov <0x7f454c46@gmail.com> <dsafonov@virtuozzo.com>
|
||||||
|
Dmitry Safonov <0x7f454c46@gmail.com> <d.safonov@partner.samsung.com>
|
||||||
|
Dmitry Safonov <0x7f454c46@gmail.com> <dima@arista.com>
|
||||||
Domen Puncer <domen@coderock.org>
|
Domen Puncer <domen@coderock.org>
|
||||||
Douglas Gilbert <dougg@torque.net>
|
Douglas Gilbert <dougg@torque.net>
|
||||||
Ed L. Cashin <ecashin@coraid.com>
|
Ed L. Cashin <ecashin@coraid.com>
|
||||||
|
@ -160,6 +163,8 @@ Matt Ranostay <mranostay@gmail.com> Matthew Ranostay <mranostay@embeddedalley.co
|
||||||
Matt Ranostay <mranostay@gmail.com> <matt.ranostay@intel.com>
|
Matt Ranostay <mranostay@gmail.com> <matt.ranostay@intel.com>
|
||||||
Matt Ranostay <matt.ranostay@konsulko.com> <matt@ranostay.consulting>
|
Matt Ranostay <matt.ranostay@konsulko.com> <matt@ranostay.consulting>
|
||||||
Matt Redfearn <matt.redfearn@mips.com> <matt.redfearn@imgtec.com>
|
Matt Redfearn <matt.redfearn@mips.com> <matt.redfearn@imgtec.com>
|
||||||
|
Maxime Ripard <mripard@kernel.org> <maxime.ripard@bootlin.com>
|
||||||
|
Maxime Ripard <mripard@kernel.org> <maxime.ripard@free-electrons.com>
|
||||||
Mayuresh Janorkar <mayur@ti.com>
|
Mayuresh Janorkar <mayur@ti.com>
|
||||||
Michael Buesch <m@bues.ch>
|
Michael Buesch <m@bues.ch>
|
||||||
Michel Dänzer <michel@tungstengraphics.com>
|
Michel Dänzer <michel@tungstengraphics.com>
|
||||||
|
|
|
@ -9,7 +9,7 @@ Linux PCI Bus Subsystem
|
||||||
:numbered:
|
:numbered:
|
||||||
|
|
||||||
pci
|
pci
|
||||||
picebus-howto
|
pciebus-howto
|
||||||
pci-iov-howto
|
pci-iov-howto
|
||||||
msi-howto
|
msi-howto
|
||||||
acpi-info
|
acpi-info
|
||||||
|
|
|
@ -4090,6 +4090,13 @@
|
||||||
Run specified binary instead of /init from the ramdisk,
|
Run specified binary instead of /init from the ramdisk,
|
||||||
used for early userspace startup. See initrd.
|
used for early userspace startup. See initrd.
|
||||||
|
|
||||||
|
rdrand= [X86]
|
||||||
|
force - Override the decision by the kernel to hide the
|
||||||
|
advertisement of RDRAND support (this affects
|
||||||
|
certain AMD processors because of buggy BIOS
|
||||||
|
support, specifically around the suspend/resume
|
||||||
|
path).
|
||||||
|
|
||||||
rdt= [HW,X86,RDT]
|
rdt= [HW,X86,RDT]
|
||||||
Turn on/off individual RDT features. List is:
|
Turn on/off individual RDT features. List is:
|
||||||
cmt, mbmtotal, mbmlocal, l3cat, l3cdp, l2cat, l2cdp,
|
cmt, mbmtotal, mbmlocal, l3cat, l3cdp, l2cat, l2cdp,
|
||||||
|
|
|
@ -39,7 +39,6 @@ Table : Subdirectories in /proc/sys/net
|
||||||
802 E802 protocol ax25 AX25
|
802 E802 protocol ax25 AX25
|
||||||
ethernet Ethernet protocol rose X.25 PLP layer
|
ethernet Ethernet protocol rose X.25 PLP layer
|
||||||
ipv4 IP version 4 x25 X.25 protocol
|
ipv4 IP version 4 x25 X.25 protocol
|
||||||
ipx IPX token-ring IBM token ring
|
|
||||||
bridge Bridging decnet DEC net
|
bridge Bridging decnet DEC net
|
||||||
ipv6 IP version 6 tipc TIPC
|
ipv6 IP version 6 tipc TIPC
|
||||||
========= =================== = ========== ==================
|
========= =================== = ========== ==================
|
||||||
|
@ -401,33 +400,7 @@ interface.
|
||||||
(network) that the route leads to, the router (may be directly connected), the
|
(network) that the route leads to, the router (may be directly connected), the
|
||||||
route flags, and the device the route is using.
|
route flags, and the device the route is using.
|
||||||
|
|
||||||
|
5. TIPC
|
||||||
5. IPX
|
|
||||||
------
|
|
||||||
|
|
||||||
The IPX protocol has no tunable values in proc/sys/net.
|
|
||||||
|
|
||||||
The IPX protocol does, however, provide proc/net/ipx. This lists each IPX
|
|
||||||
socket giving the local and remote addresses in Novell format (that is
|
|
||||||
network:node:port). In accordance with the strange Novell tradition,
|
|
||||||
everything but the port is in hex. Not_Connected is displayed for sockets that
|
|
||||||
are not tied to a specific remote address. The Tx and Rx queue sizes indicate
|
|
||||||
the number of bytes pending for transmission and reception. The state
|
|
||||||
indicates the state the socket is in and the uid is the owning uid of the
|
|
||||||
socket.
|
|
||||||
|
|
||||||
The /proc/net/ipx_interface file lists all IPX interfaces. For each interface
|
|
||||||
it gives the network number, the node number, and indicates if the network is
|
|
||||||
the primary network. It also indicates which device it is bound to (or
|
|
||||||
Internal for internal networks) and the Frame Type if appropriate. Linux
|
|
||||||
supports 802.3, 802.2, 802.2 SNAP and DIX (Blue Book) ethernet framing for
|
|
||||||
IPX.
|
|
||||||
|
|
||||||
The /proc/net/ipx_route table holds a list of IPX routes. For each route it
|
|
||||||
gives the destination network, the router node (or Directly) and the network
|
|
||||||
address of the router (or Connected) for internal networks.
|
|
||||||
|
|
||||||
6. TIPC
|
|
||||||
-------
|
-------
|
||||||
|
|
||||||
tipc_rmem
|
tipc_rmem
|
||||||
|
|
|
@ -1,20 +1,30 @@
|
||||||
* ARC-HS Interrupt Distribution Unit
|
* ARC-HS Interrupt Distribution Unit
|
||||||
|
|
||||||
This optional 2nd level interrupt controller can be used in SMP configurations for
|
This optional 2nd level interrupt controller can be used in SMP configurations
|
||||||
dynamic IRQ routing, load balancing of common/external IRQs towards core intc.
|
for dynamic IRQ routing, load balancing of common/external IRQs towards core
|
||||||
|
intc.
|
||||||
|
|
||||||
Properties:
|
Properties:
|
||||||
|
|
||||||
- compatible: "snps,archs-idu-intc"
|
- compatible: "snps,archs-idu-intc"
|
||||||
- interrupt-controller: This is an interrupt controller.
|
- interrupt-controller: This is an interrupt controller.
|
||||||
- #interrupt-cells: Must be <1>.
|
- #interrupt-cells: Must be <1> or <2>.
|
||||||
|
|
||||||
Value of the cell specifies the "common" IRQ from peripheral to IDU. Number N
|
Value of the first cell specifies the "common" IRQ from peripheral to IDU.
|
||||||
of the particular interrupt line of IDU corresponds to the line N+24 of the
|
Number N of the particular interrupt line of IDU corresponds to the line N+24
|
||||||
core interrupt controller.
|
of the core interrupt controller.
|
||||||
|
|
||||||
intc accessed via the special ARC AUX register interface, hence "reg" property
|
The (optional) second cell specifies any of the following flags:
|
||||||
is not specified.
|
- bits[3:0] trigger type and level flags
|
||||||
|
1 = low-to-high edge triggered
|
||||||
|
2 = NOT SUPPORTED (high-to-low edge triggered)
|
||||||
|
4 = active high level-sensitive <<< DEFAULT
|
||||||
|
8 = NOT SUPPORTED (active low level-sensitive)
|
||||||
|
When no second cell is specified, the interrupt is assumed to be level
|
||||||
|
sensitive.
|
||||||
|
|
||||||
|
The interrupt controller is accessed via the special ARC AUX register
|
||||||
|
interface, hence "reg" property is not specified.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
core_intc: core-interrupt-controller {
|
core_intc: core-interrupt-controller {
|
||||||
|
|
|
@ -12,6 +12,7 @@ Required properties:
|
||||||
- "microchip,ksz8565"
|
- "microchip,ksz8565"
|
||||||
- "microchip,ksz9893"
|
- "microchip,ksz9893"
|
||||||
- "microchip,ksz9563"
|
- "microchip,ksz9563"
|
||||||
|
- "microchip,ksz8563"
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@ Required properties:
|
||||||
Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
|
Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
|
||||||
Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
|
Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
|
||||||
Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
|
Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
|
||||||
Use "sifive,fu540-macb" for SiFive FU540-C000 SoC.
|
Use "sifive,fu540-c000-gem" for SiFive FU540-C000 SoC.
|
||||||
Or the generic form: "cdns,emac".
|
Or the generic form: "cdns,emac".
|
||||||
- reg: Address and length of the register set for the device
|
- reg: Address and length of the register set for the device
|
||||||
For "sifive,fu540-macb", second range is required to specify the
|
For "sifive,fu540-c000-gem", second range is required to specify the
|
||||||
address and length of the registers for GEMGXL Management block.
|
address and length of the registers for GEMGXL Management block.
|
||||||
- interrupts: Should contain macb interrupt
|
- interrupts: Should contain macb interrupt
|
||||||
- phy-mode: See ethernet.txt file in the same directory.
|
- phy-mode: See ethernet.txt file in the same directory.
|
||||||
|
|
|
@ -506,21 +506,3 @@ Drivers should ignore the changes to TLS the device feature flags.
|
||||||
These flags will be acted upon accordingly by the core ``ktls`` code.
|
These flags will be acted upon accordingly by the core ``ktls`` code.
|
||||||
TLS device feature flags only control adding of new TLS connection
|
TLS device feature flags only control adding of new TLS connection
|
||||||
offloads, old connections will remain active after flags are cleared.
|
offloads, old connections will remain active after flags are cleared.
|
||||||
|
|
||||||
Known bugs
|
|
||||||
==========
|
|
||||||
|
|
||||||
skb_orphan() leaks clear text
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
Currently drivers depend on the :c:member:`sk` member of
|
|
||||||
:c:type:`struct sk_buff <sk_buff>` to identify segments requiring
|
|
||||||
encryption. Any operation which removes or does not preserve the socket
|
|
||||||
association such as :c:func:`skb_orphan` or :c:func:`skb_clone`
|
|
||||||
will cause the driver to miss the packets and lead to clear text leaks.
|
|
||||||
|
|
||||||
Redirects leak clear text
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
In the RX direction, if segment has already been decrypted by the device
|
|
||||||
and it gets redirected or mirrored - clear text will be transmitted out.
|
|
||||||
|
|
|
@ -204,8 +204,8 @@ Ethernet device, which instead of receiving packets from a physical
|
||||||
media, receives them from user space program and instead of sending
|
media, receives them from user space program and instead of sending
|
||||||
packets via physical media sends them to the user space program.
|
packets via physical media sends them to the user space program.
|
||||||
|
|
||||||
Let's say that you configured IPX on the tap0, then whenever
|
Let's say that you configured IPv6 on the tap0, then whenever
|
||||||
the kernel sends an IPX packet to tap0, it is passed to the application
|
the kernel sends an IPv6 packet to tap0, it is passed to the application
|
||||||
(VTun for example). The application encrypts, compresses and sends it to
|
(VTun for example). The application encrypts, compresses and sends it to
|
||||||
the other side over TCP or UDP. The application on the other side decompresses
|
the other side over TCP or UDP. The application on the other side decompresses
|
||||||
and decrypts the data received and writes the packet to the TAP device,
|
and decrypts the data received and writes the packet to the TAP device,
|
||||||
|
|
|
@ -0,0 +1,279 @@
|
||||||
|
Embargoed hardware issues
|
||||||
|
=========================
|
||||||
|
|
||||||
|
Scope
|
||||||
|
-----
|
||||||
|
|
||||||
|
Hardware issues which result in security problems are a different category
|
||||||
|
of security bugs than pure software bugs which only affect the Linux
|
||||||
|
kernel.
|
||||||
|
|
||||||
|
Hardware issues like Meltdown, Spectre, L1TF etc. must be treated
|
||||||
|
differently because they usually affect all Operating Systems ("OS") and
|
||||||
|
therefore need coordination across different OS vendors, distributions,
|
||||||
|
hardware vendors and other parties. For some of the issues, software
|
||||||
|
mitigations can depend on microcode or firmware updates, which need further
|
||||||
|
coordination.
|
||||||
|
|
||||||
|
.. _Contact:
|
||||||
|
|
||||||
|
Contact
|
||||||
|
-------
|
||||||
|
|
||||||
|
The Linux kernel hardware security team is separate from the regular Linux
|
||||||
|
kernel security team.
|
||||||
|
|
||||||
|
The team only handles the coordination of embargoed hardware security
|
||||||
|
issues. Reports of pure software security bugs in the Linux kernel are not
|
||||||
|
handled by this team and the reporter will be guided to contact the regular
|
||||||
|
Linux kernel security team (:ref:`Documentation/admin-guide/
|
||||||
|
<securitybugs>`) instead.
|
||||||
|
|
||||||
|
The team can be contacted by email at <hardware-security@kernel.org>. This
|
||||||
|
is a private list of security officers who will help you to coordinate an
|
||||||
|
issue according to our documented process.
|
||||||
|
|
||||||
|
The list is encrypted and email to the list can be sent by either PGP or
|
||||||
|
S/MIME encrypted and must be signed with the reporter's PGP key or S/MIME
|
||||||
|
certificate. The list's PGP key and S/MIME certificate are available from
|
||||||
|
https://www.kernel.org/....
|
||||||
|
|
||||||
|
While hardware security issues are often handled by the affected hardware
|
||||||
|
vendor, we welcome contact from researchers or individuals who have
|
||||||
|
identified a potential hardware flaw.
|
||||||
|
|
||||||
|
Hardware security officers
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The current team of hardware security officers:
|
||||||
|
|
||||||
|
- Linus Torvalds (Linux Foundation Fellow)
|
||||||
|
- Greg Kroah-Hartman (Linux Foundation Fellow)
|
||||||
|
- Thomas Gleixner (Linux Foundation Fellow)
|
||||||
|
|
||||||
|
Operation of mailing-lists
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The encrypted mailing-lists which are used in our process are hosted on
|
||||||
|
Linux Foundation's IT infrastructure. By providing this service Linux
|
||||||
|
Foundation's director of IT Infrastructure security technically has the
|
||||||
|
ability to access the embargoed information, but is obliged to
|
||||||
|
confidentiality by his employment contract. Linux Foundation's director of
|
||||||
|
IT Infrastructure security is also responsible for the kernel.org
|
||||||
|
infrastructure.
|
||||||
|
|
||||||
|
The Linux Foundation's current director of IT Infrastructure security is
|
||||||
|
Konstantin Ryabitsev.
|
||||||
|
|
||||||
|
|
||||||
|
Non-disclosure agreements
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
The Linux kernel hardware security team is not a formal body and therefore
|
||||||
|
unable to enter into any non-disclosure agreements. The kernel community
|
||||||
|
is aware of the sensitive nature of such issues and offers a Memorandum of
|
||||||
|
Understanding instead.
|
||||||
|
|
||||||
|
|
||||||
|
Memorandum of Understanding
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
The Linux kernel community has a deep understanding of the requirement to
|
||||||
|
keep hardware security issues under embargo for coordination between
|
||||||
|
different OS vendors, distributors, hardware vendors and other parties.
|
||||||
|
|
||||||
|
The Linux kernel community has successfully handled hardware security
|
||||||
|
issues in the past and has the necessary mechanisms in place to allow
|
||||||
|
community compliant development under embargo restrictions.
|
||||||
|
|
||||||
|
The Linux kernel community has a dedicated hardware security team for
|
||||||
|
initial contact, which oversees the process of handling such issues under
|
||||||
|
embargo rules.
|
||||||
|
|
||||||
|
The hardware security team identifies the developers (domain experts) who
|
||||||
|
will form the initial response team for a particular issue. The initial
|
||||||
|
response team can bring in further developers (domain experts) to address
|
||||||
|
the issue in the best technical way.
|
||||||
|
|
||||||
|
All involved developers pledge to adhere to the embargo rules and to keep
|
||||||
|
the received information confidential. Violation of the pledge will lead to
|
||||||
|
immediate exclusion from the current issue and removal from all related
|
||||||
|
mailing-lists. In addition, the hardware security team will also exclude
|
||||||
|
the offender from future issues. The impact of this consequence is a highly
|
||||||
|
effective deterrent in our community. In case a violation happens the
|
||||||
|
hardware security team will inform the involved parties immediately. If you
|
||||||
|
or anyone becomes aware of a potential violation, please report it
|
||||||
|
immediately to the Hardware security officers.
|
||||||
|
|
||||||
|
|
||||||
|
Process
|
||||||
|
^^^^^^^
|
||||||
|
|
||||||
|
Due to the globally distributed nature of Linux kernel development,
|
||||||
|
face-to-face meetings are almost impossible to address hardware security
|
||||||
|
issues. Phone conferences are hard to coordinate due to time zones and
|
||||||
|
other factors and should be only used when absolutely necessary. Encrypted
|
||||||
|
email has been proven to be the most effective and secure communication
|
||||||
|
method for these types of issues.
|
||||||
|
|
||||||
|
Start of Disclosure
|
||||||
|
"""""""""""""""""""
|
||||||
|
|
||||||
|
Disclosure starts by contacting the Linux kernel hardware security team by
|
||||||
|
email. This initial contact should contain a description of the problem and
|
||||||
|
a list of any known affected hardware. If your organization builds or
|
||||||
|
distributes the affected hardware, we encourage you to also consider what
|
||||||
|
other hardware could be affected.
|
||||||
|
|
||||||
|
The hardware security team will provide an incident-specific encrypted
|
||||||
|
mailing-list which will be used for initial discussion with the reporter,
|
||||||
|
further disclosure and coordination.
|
||||||
|
|
||||||
|
The hardware security team will provide the disclosing party a list of
|
||||||
|
developers (domain experts) who should be informed initially about the
|
||||||
|
issue after confirming with the developers that they will adhere to this
|
||||||
|
Memorandum of Understanding and the documented process. These developers
|
||||||
|
form the initial response team and will be responsible for handling the
|
||||||
|
issue after initial contact. The hardware security team is supporting the
|
||||||
|
response team, but is not necessarily involved in the mitigation
|
||||||
|
development process.
|
||||||
|
|
||||||
|
While individual developers might be covered by a non-disclosure agreement
|
||||||
|
via their employer, they cannot enter individual non-disclosure agreements
|
||||||
|
in their role as Linux kernel developers. They will, however, agree to
|
||||||
|
adhere to this documented process and the Memorandum of Understanding.
|
||||||
|
|
||||||
|
|
||||||
|
Disclosure
|
||||||
|
""""""""""
|
||||||
|
|
||||||
|
The disclosing party provides detailed information to the initial response
|
||||||
|
team via the specific encrypted mailing-list.
|
||||||
|
|
||||||
|
From our experience the technical documentation of these issues is usually
|
||||||
|
a sufficient starting point and further technical clarification is best
|
||||||
|
done via email.
|
||||||
|
|
||||||
|
Mitigation development
|
||||||
|
""""""""""""""""""""""
|
||||||
|
|
||||||
|
The initial response team sets up an encrypted mailing-list or repurposes
|
||||||
|
an existing one if appropriate. The disclosing party should provide a list
|
||||||
|
of contacts for all other parties who have already been, or should be,
|
||||||
|
informed about the issue. The response team contacts these parties so they
|
||||||
|
can name experts who should be subscribed to the mailing-list.
|
||||||
|
|
||||||
|
Using a mailing-list is close to the normal Linux development process and
|
||||||
|
has been successfully used in developing mitigations for various hardware
|
||||||
|
security issues in the past.
|
||||||
|
|
||||||
|
The mailing-list operates in the same way as normal Linux development.
|
||||||
|
Patches are posted, discussed and reviewed and if agreed on applied to a
|
||||||
|
non-public git repository which is only accessible to the participating
|
||||||
|
developers via a secure connection. The repository contains the main
|
||||||
|
development branch against the mainline kernel and backport branches for
|
||||||
|
stable kernel versions as necessary.
|
||||||
|
|
||||||
|
The initial response team will identify further experts from the Linux
|
||||||
|
kernel developer community as needed and inform the disclosing party about
|
||||||
|
their participation. Bringing in experts can happen at any time of the
|
||||||
|
development process and often needs to be handled in a timely manner.
|
||||||
|
|
||||||
|
Coordinated release
|
||||||
|
"""""""""""""""""""
|
||||||
|
|
||||||
|
The involved parties will negotiate the date and time where the embargo
|
||||||
|
ends. At that point the prepared mitigations are integrated into the
|
||||||
|
relevant kernel trees and published.
|
||||||
|
|
||||||
|
While we understand that hardware security issues need coordinated embargo
|
||||||
|
time, the embargo time should be constrained to the minimum time which is
|
||||||
|
required for all involved parties to develop, test and prepare the
|
||||||
|
mitigations. Extending embargo time artificially to meet conference talk
|
||||||
|
dates or other non-technical reasons is creating more work and burden for
|
||||||
|
the involved developers and response teams as the patches need to be kept
|
||||||
|
up to date in order to follow the ongoing upstream kernel development,
|
||||||
|
which might create conflicting changes.
|
||||||
|
|
||||||
|
CVE assignment
|
||||||
|
""""""""""""""
|
||||||
|
|
||||||
|
Neither the hardware security team nor the initial response team assign
|
||||||
|
CVEs, nor are CVEs required for the development process. If CVEs are
|
||||||
|
provided by the disclosing party they can be used for documentation
|
||||||
|
purposes.
|
||||||
|
|
||||||
|
Process ambassadors
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
For assistance with this process we have established ambassadors in various
|
||||||
|
organizations, who can answer questions about or provide guidance on the
|
||||||
|
reporting process and further handling. Ambassadors are not involved in the
|
||||||
|
disclosure of a particular issue, unless requested by a response team or by
|
||||||
|
an involved disclosed party. The current ambassadors list:
|
||||||
|
|
||||||
|
============= ========================================================
|
||||||
|
ARM
|
||||||
|
AMD
|
||||||
|
IBM
|
||||||
|
Intel
|
||||||
|
Qualcomm Trilok Soni <tsoni@codeaurora.org>
|
||||||
|
|
||||||
|
Microsoft Sasha Levin <sashal@kernel.org>
|
||||||
|
VMware
|
||||||
|
Xen Andrew Cooper <andrew.cooper3@citrix.com>
|
||||||
|
|
||||||
|
Canonical Tyler Hicks <tyhicks@canonical.com>
|
||||||
|
Debian Ben Hutchings <ben@decadent.org.uk>
|
||||||
|
Oracle Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||||
|
Red Hat Josh Poimboeuf <jpoimboe@redhat.com>
|
||||||
|
SUSE Jiri Kosina <jkosina@suse.cz>
|
||||||
|
|
||||||
|
Amazon
|
||||||
|
Google Kees Cook <keescook@chromium.org>
|
||||||
|
============= ========================================================
|
||||||
|
|
||||||
|
If you want your organization to be added to the ambassadors list, please
|
||||||
|
contact the hardware security team. The nominated ambassador has to
|
||||||
|
understand and support our process fully and is ideally well connected in
|
||||||
|
the Linux kernel community.
|
||||||
|
|
||||||
|
Encrypted mailing-lists
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
We use encrypted mailing-lists for communication. The operating principle
|
||||||
|
of these lists is that email sent to the list is encrypted either with the
|
||||||
|
list's PGP key or with the list's S/MIME certificate. The mailing-list
|
||||||
|
software decrypts the email and re-encrypts it individually for each
|
||||||
|
subscriber with the subscriber's PGP key or S/MIME certificate. Details
|
||||||
|
about the mailing-list software and the setup which is used to ensure the
|
||||||
|
security of the lists and protection of the data can be found here:
|
||||||
|
https://www.kernel.org/....
|
||||||
|
|
||||||
|
List keys
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
For initial contact see :ref:`Contact`. For incident specific mailing-lists
|
||||||
|
the key and S/MIME certificate are conveyed to the subscribers by email
|
||||||
|
sent from the specific list.
|
||||||
|
|
||||||
|
Subscription to incident specific lists
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Subscription is handled by the response teams. Disclosed parties who want
|
||||||
|
to participate in the communication send a list of potential subscribers to
|
||||||
|
the response team so the response team can validate subscription requests.
|
||||||
|
|
||||||
|
Each subscriber needs to send a subscription request to the response team
|
||||||
|
by email. The email must be signed with the subscriber's PGP key or S/MIME
|
||||||
|
certificate. If a PGP key is used, it must be available from a public key
|
||||||
|
server and is ideally connected to the Linux kernel's PGP web of trust. See
|
||||||
|
also: https://www.kernel.org/signature.html.
|
||||||
|
|
||||||
|
The response team verifies that the subscriber request is valid and adds
|
||||||
|
the subscriber to the list. After subscription the subscriber will receive
|
||||||
|
email from the mailing-list which is signed either with the list's PGP key
|
||||||
|
or the list's S/MIME certificate. The subscriber's email client can extract
|
||||||
|
the PGP key or the S/MIME certificate from the signature so the subscriber
|
||||||
|
can send encrypted email to the list.
|
||||||
|
|
|
@ -45,6 +45,7 @@ Other guides to the community that are of interest to most developers are:
|
||||||
submit-checklist
|
submit-checklist
|
||||||
kernel-docs
|
kernel-docs
|
||||||
deprecated
|
deprecated
|
||||||
|
embargoed-hardware-issues
|
||||||
|
|
||||||
These are some overall technical guides that have been put here for now for
|
These are some overall technical guides that have been put here for now for
|
||||||
lack of a better place.
|
lack of a better place.
|
||||||
|
|
59
MAINTAINERS
59
MAINTAINERS
|
@ -183,7 +183,7 @@ M: Realtek linux nic maintainers <nic_swsd@realtek.com>
|
||||||
M: Heiner Kallweit <hkallweit1@gmail.com>
|
M: Heiner Kallweit <hkallweit1@gmail.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/net/ethernet/realtek/r8169.c
|
F: drivers/net/ethernet/realtek/r8169*
|
||||||
|
|
||||||
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
|
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
|
||||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
@ -683,7 +683,7 @@ S: Maintained
|
||||||
F: drivers/crypto/sunxi-ss/
|
F: drivers/crypto/sunxi-ss/
|
||||||
|
|
||||||
ALLWINNER VPU DRIVER
|
ALLWINNER VPU DRIVER
|
||||||
M: Maxime Ripard <maxime.ripard@bootlin.com>
|
M: Maxime Ripard <mripard@kernel.org>
|
||||||
M: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
M: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
||||||
L: linux-media@vger.kernel.org
|
L: linux-media@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -1408,7 +1408,7 @@ S: Maintained
|
||||||
F: drivers/clk/sunxi/
|
F: drivers/clk/sunxi/
|
||||||
|
|
||||||
ARM/Allwinner sunXi SoC support
|
ARM/Allwinner sunXi SoC support
|
||||||
M: Maxime Ripard <maxime.ripard@bootlin.com>
|
M: Maxime Ripard <mripard@kernel.org>
|
||||||
M: Chen-Yu Tsai <wens@csie.org>
|
M: Chen-Yu Tsai <wens@csie.org>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -3577,7 +3577,7 @@ F: Documentation/filesystems/caching/cachefiles.txt
|
||||||
F: fs/cachefiles/
|
F: fs/cachefiles/
|
||||||
|
|
||||||
CADENCE MIPI-CSI2 BRIDGES
|
CADENCE MIPI-CSI2 BRIDGES
|
||||||
M: Maxime Ripard <maxime.ripard@bootlin.com>
|
M: Maxime Ripard <mripard@kernel.org>
|
||||||
L: linux-media@vger.kernel.org
|
L: linux-media@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/devicetree/bindings/media/cdns,*.txt
|
F: Documentation/devicetree/bindings/media/cdns,*.txt
|
||||||
|
@ -5295,7 +5295,7 @@ F: include/linux/vga*
|
||||||
|
|
||||||
DRM DRIVERS AND MISC GPU PATCHES
|
DRM DRIVERS AND MISC GPU PATCHES
|
||||||
M: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
M: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||||
M: Maxime Ripard <maxime.ripard@bootlin.com>
|
M: Maxime Ripard <mripard@kernel.org>
|
||||||
M: Sean Paul <sean@poorly.run>
|
M: Sean Paul <sean@poorly.run>
|
||||||
W: https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-misc.html
|
W: https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-misc.html
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -5308,7 +5308,7 @@ F: include/uapi/drm/drm*
|
||||||
F: include/linux/vga*
|
F: include/linux/vga*
|
||||||
|
|
||||||
DRM DRIVERS FOR ALLWINNER A10
|
DRM DRIVERS FOR ALLWINNER A10
|
||||||
M: Maxime Ripard <maxime.ripard@bootlin.com>
|
M: Maxime Ripard <mripard@kernel.org>
|
||||||
L: dri-devel@lists.freedesktop.org
|
L: dri-devel@lists.freedesktop.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/gpu/drm/sun4i/
|
F: drivers/gpu/drm/sun4i/
|
||||||
|
@ -6065,7 +6065,7 @@ M: Florian Fainelli <f.fainelli@gmail.com>
|
||||||
M: Heiner Kallweit <hkallweit1@gmail.com>
|
M: Heiner Kallweit <hkallweit1@gmail.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/ABI/testing/sysfs-bus-mdio
|
F: Documentation/ABI/testing/sysfs-class-net-phydev
|
||||||
F: Documentation/devicetree/bindings/net/ethernet-phy.yaml
|
F: Documentation/devicetree/bindings/net/ethernet-phy.yaml
|
||||||
F: Documentation/devicetree/bindings/net/mdio*
|
F: Documentation/devicetree/bindings/net/mdio*
|
||||||
F: Documentation/networking/phy.rst
|
F: Documentation/networking/phy.rst
|
||||||
|
@ -7513,7 +7513,7 @@ I2C MV64XXX MARVELL AND ALLWINNER DRIVER
|
||||||
M: Gregory CLEMENT <gregory.clement@bootlin.com>
|
M: Gregory CLEMENT <gregory.clement@bootlin.com>
|
||||||
L: linux-i2c@vger.kernel.org
|
L: linux-i2c@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
|
F: Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
|
||||||
F: drivers/i2c/busses/i2c-mv64xxx.c
|
F: drivers/i2c/busses/i2c-mv64xxx.c
|
||||||
|
|
||||||
I2C OVER PARALLEL PORT
|
I2C OVER PARALLEL PORT
|
||||||
|
@ -8454,11 +8454,6 @@ S: Maintained
|
||||||
F: fs/io_uring.c
|
F: fs/io_uring.c
|
||||||
F: include/uapi/linux/io_uring.h
|
F: include/uapi/linux/io_uring.h
|
||||||
|
|
||||||
IP MASQUERADING
|
|
||||||
M: Juanjo Ciarlante <jjciarla@raiz.uncu.edu.ar>
|
|
||||||
S: Maintained
|
|
||||||
F: net/ipv4/netfilter/ipt_MASQUERADE.c
|
|
||||||
|
|
||||||
IPMI SUBSYSTEM
|
IPMI SUBSYSTEM
|
||||||
M: Corey Minyard <minyard@acm.org>
|
M: Corey Minyard <minyard@acm.org>
|
||||||
L: openipmi-developer@lists.sourceforge.net (moderated for non-subscribers)
|
L: openipmi-developer@lists.sourceforge.net (moderated for non-subscribers)
|
||||||
|
@ -8832,14 +8827,6 @@ F: virt/kvm/*
|
||||||
F: tools/kvm/
|
F: tools/kvm/
|
||||||
F: tools/testing/selftests/kvm/
|
F: tools/testing/selftests/kvm/
|
||||||
|
|
||||||
KERNEL VIRTUAL MACHINE FOR AMD-V (KVM/amd)
|
|
||||||
M: Joerg Roedel <joro@8bytes.org>
|
|
||||||
L: kvm@vger.kernel.org
|
|
||||||
W: http://www.linux-kvm.org/
|
|
||||||
S: Maintained
|
|
||||||
F: arch/x86/include/asm/svm.h
|
|
||||||
F: arch/x86/kvm/svm.c
|
|
||||||
|
|
||||||
KERNEL VIRTUAL MACHINE FOR ARM/ARM64 (KVM/arm, KVM/arm64)
|
KERNEL VIRTUAL MACHINE FOR ARM/ARM64 (KVM/arm, KVM/arm64)
|
||||||
M: Marc Zyngier <maz@kernel.org>
|
M: Marc Zyngier <maz@kernel.org>
|
||||||
R: James Morse <james.morse@arm.com>
|
R: James Morse <james.morse@arm.com>
|
||||||
|
@ -8882,7 +8869,7 @@ M: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||||
M: Janosch Frank <frankja@linux.ibm.com>
|
M: Janosch Frank <frankja@linux.ibm.com>
|
||||||
R: David Hildenbrand <david@redhat.com>
|
R: David Hildenbrand <david@redhat.com>
|
||||||
R: Cornelia Huck <cohuck@redhat.com>
|
R: Cornelia Huck <cohuck@redhat.com>
|
||||||
L: linux-s390@vger.kernel.org
|
L: kvm@vger.kernel.org
|
||||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git
|
||||||
S: Supported
|
S: Supported
|
||||||
|
@ -8897,6 +8884,11 @@ F: tools/testing/selftests/kvm/*/s390x/
|
||||||
KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)
|
KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)
|
||||||
M: Paolo Bonzini <pbonzini@redhat.com>
|
M: Paolo Bonzini <pbonzini@redhat.com>
|
||||||
M: Radim Krčmář <rkrcmar@redhat.com>
|
M: Radim Krčmář <rkrcmar@redhat.com>
|
||||||
|
R: Sean Christopherson <sean.j.christopherson@intel.com>
|
||||||
|
R: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||||
|
R: Wanpeng Li <wanpengli@tencent.com>
|
||||||
|
R: Jim Mattson <jmattson@google.com>
|
||||||
|
R: Joerg Roedel <joro@8bytes.org>
|
||||||
L: kvm@vger.kernel.org
|
L: kvm@vger.kernel.org
|
||||||
W: http://www.linux-kvm.org
|
W: http://www.linux-kvm.org
|
||||||
T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
|
T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
|
||||||
|
@ -8904,8 +8896,12 @@ S: Supported
|
||||||
F: arch/x86/kvm/
|
F: arch/x86/kvm/
|
||||||
F: arch/x86/kvm/*/
|
F: arch/x86/kvm/*/
|
||||||
F: arch/x86/include/uapi/asm/kvm*
|
F: arch/x86/include/uapi/asm/kvm*
|
||||||
|
F: arch/x86/include/uapi/asm/vmx.h
|
||||||
|
F: arch/x86/include/uapi/asm/svm.h
|
||||||
F: arch/x86/include/asm/kvm*
|
F: arch/x86/include/asm/kvm*
|
||||||
F: arch/x86/include/asm/pvclock-abi.h
|
F: arch/x86/include/asm/pvclock-abi.h
|
||||||
|
F: arch/x86/include/asm/svm.h
|
||||||
|
F: arch/x86/include/asm/vmx.h
|
||||||
F: arch/x86/kernel/kvm.c
|
F: arch/x86/kernel/kvm.c
|
||||||
F: arch/x86/kernel/kvmclock.c
|
F: arch/x86/kernel/kvmclock.c
|
||||||
|
|
||||||
|
@ -9233,6 +9229,18 @@ F: include/linux/nd.h
|
||||||
F: include/linux/libnvdimm.h
|
F: include/linux/libnvdimm.h
|
||||||
F: include/uapi/linux/ndctl.h
|
F: include/uapi/linux/ndctl.h
|
||||||
|
|
||||||
|
LICENSES and SPDX stuff
|
||||||
|
M: Thomas Gleixner <tglx@linutronix.de>
|
||||||
|
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
L: linux-spdx@vger.kernel.org
|
||||||
|
S: Maintained
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx.git
|
||||||
|
F: COPYING
|
||||||
|
F: Documentation/process/license-rules.rst
|
||||||
|
F: LICENSES/
|
||||||
|
F: scripts/spdxcheck-test.sh
|
||||||
|
F: scripts/spdxcheck.py
|
||||||
|
|
||||||
LIGHTNVM PLATFORM SUPPORT
|
LIGHTNVM PLATFORM SUPPORT
|
||||||
M: Matias Bjorling <mb@lightnvm.io>
|
M: Matias Bjorling <mb@lightnvm.io>
|
||||||
W: http://github/OpenChannelSSD
|
W: http://github/OpenChannelSSD
|
||||||
|
@ -11085,7 +11093,7 @@ NET_FAILOVER MODULE
|
||||||
M: Sridhar Samudrala <sridhar.samudrala@intel.com>
|
M: Sridhar Samudrala <sridhar.samudrala@intel.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: driver/net/net_failover.c
|
F: drivers/net/net_failover.c
|
||||||
F: include/net/net_failover.h
|
F: include/net/net_failover.h
|
||||||
F: Documentation/networking/net_failover.rst
|
F: Documentation/networking/net_failover.rst
|
||||||
|
|
||||||
|
@ -14477,6 +14485,7 @@ F: drivers/net/phy/phylink.c
|
||||||
F: drivers/net/phy/sfp*
|
F: drivers/net/phy/sfp*
|
||||||
F: include/linux/phylink.h
|
F: include/linux/phylink.h
|
||||||
F: include/linux/sfp.h
|
F: include/linux/sfp.h
|
||||||
|
K: phylink
|
||||||
|
|
||||||
SGI GRU DRIVER
|
SGI GRU DRIVER
|
||||||
M: Dimitri Sivanich <sivanich@sgi.com>
|
M: Dimitri Sivanich <sivanich@sgi.com>
|
||||||
|
@ -14882,9 +14891,9 @@ F: include/linux/arm_sdei.h
|
||||||
F: include/uapi/linux/arm_sdei.h
|
F: include/uapi/linux/arm_sdei.h
|
||||||
|
|
||||||
SOFTWARE RAID (Multiple Disks) SUPPORT
|
SOFTWARE RAID (Multiple Disks) SUPPORT
|
||||||
M: Shaohua Li <shli@kernel.org>
|
M: Song Liu <song@kernel.org>
|
||||||
L: linux-raid@vger.kernel.org
|
L: linux-raid@vger.kernel.org
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shli/md.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/md/Makefile
|
F: drivers/md/Makefile
|
||||||
F: drivers/md/Kconfig
|
F: drivers/md/Kconfig
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 3
|
PATCHLEVEL = 3
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc5
|
EXTRAVERSION = -rc8
|
||||||
NAME = Bobtail Squid
|
NAME = Bobtail Squid
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|
|
@ -12,3 +12,6 @@ dtb-y := $(builtindtb-y).dtb
|
||||||
# for CONFIG_OF_ALL_DTBS test
|
# for CONFIG_OF_ALL_DTBS test
|
||||||
dtstree := $(srctree)/$(src)
|
dtstree := $(srctree)/$(src)
|
||||||
dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
||||||
|
|
||||||
|
# board-specific dtc flags
|
||||||
|
DTC_FLAGS_hsdk += --pad 20
|
||||||
|
|
|
@ -256,7 +256,7 @@
|
||||||
|
|
||||||
.macro FAKE_RET_FROM_EXCPN
|
.macro FAKE_RET_FROM_EXCPN
|
||||||
lr r9, [status32]
|
lr r9, [status32]
|
||||||
bic r9, r9, (STATUS_U_MASK|STATUS_DE_MASK|STATUS_AE_MASK)
|
bic r9, r9, STATUS_AE_MASK
|
||||||
or r9, r9, STATUS_IE_MASK
|
or r9, r9, STATUS_IE_MASK
|
||||||
kflag r9
|
kflag r9
|
||||||
.endm
|
.endm
|
||||||
|
|
|
@ -62,15 +62,15 @@
|
||||||
#else /* !__ASSEMBLY__ */
|
#else /* !__ASSEMBLY__ */
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_HAS_ICCM
|
#ifdef CONFIG_ARC_HAS_ICCM
|
||||||
#define __arcfp_code __attribute__((__section__(".text.arcfp")))
|
#define __arcfp_code __section(.text.arcfp)
|
||||||
#else
|
#else
|
||||||
#define __arcfp_code __attribute__((__section__(".text")))
|
#define __arcfp_code __section(.text)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_HAS_DCCM
|
#ifdef CONFIG_ARC_HAS_DCCM
|
||||||
#define __arcfp_data __attribute__((__section__(".data.arcfp")))
|
#define __arcfp_data __section(.data.arcfp)
|
||||||
#else
|
#else
|
||||||
#define __arcfp_data __attribute__((__section__(".data")))
|
#define __arcfp_data __section(.data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
|
@ -53,8 +53,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[];
|
||||||
*/
|
*/
|
||||||
#define MACHINE_START(_type, _name) \
|
#define MACHINE_START(_type, _name) \
|
||||||
static const struct machine_desc __mach_desc_##_type \
|
static const struct machine_desc __mach_desc_##_type \
|
||||||
__used \
|
__used __section(.arch.info.init) = { \
|
||||||
__attribute__((__section__(".arch.info.init"))) = { \
|
|
||||||
.name = _name,
|
.name = _name,
|
||||||
|
|
||||||
#define MACHINE_END \
|
#define MACHINE_END \
|
||||||
|
|
|
@ -202,8 +202,8 @@ static void idu_set_dest(unsigned int cmn_irq, unsigned int cpu_mask)
|
||||||
__mcip_cmd_data(CMD_IDU_SET_DEST, cmn_irq, cpu_mask);
|
__mcip_cmd_data(CMD_IDU_SET_DEST, cmn_irq, cpu_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void idu_set_mode(unsigned int cmn_irq, unsigned int lvl,
|
static void idu_set_mode(unsigned int cmn_irq, bool set_lvl, unsigned int lvl,
|
||||||
unsigned int distr)
|
bool set_distr, unsigned int distr)
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
unsigned int word;
|
unsigned int word;
|
||||||
|
@ -212,7 +212,10 @@ static void idu_set_mode(unsigned int cmn_irq, unsigned int lvl,
|
||||||
};
|
};
|
||||||
} data;
|
} data;
|
||||||
|
|
||||||
|
data.word = __mcip_cmd_read(CMD_IDU_READ_MODE, cmn_irq);
|
||||||
|
if (set_distr)
|
||||||
data.distr = distr;
|
data.distr = distr;
|
||||||
|
if (set_lvl)
|
||||||
data.lvl = lvl;
|
data.lvl = lvl;
|
||||||
__mcip_cmd_data(CMD_IDU_SET_MODE, cmn_irq, data.word);
|
__mcip_cmd_data(CMD_IDU_SET_MODE, cmn_irq, data.word);
|
||||||
}
|
}
|
||||||
|
@ -240,6 +243,25 @@ static void idu_irq_unmask(struct irq_data *data)
|
||||||
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void idu_irq_ack(struct irq_data *data)
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
raw_spin_lock_irqsave(&mcip_lock, flags);
|
||||||
|
__mcip_cmd(CMD_IDU_ACK_CIRQ, data->hwirq);
|
||||||
|
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void idu_irq_mask_ack(struct irq_data *data)
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
raw_spin_lock_irqsave(&mcip_lock, flags);
|
||||||
|
__mcip_cmd_data(CMD_IDU_SET_MASK, data->hwirq, 1);
|
||||||
|
__mcip_cmd(CMD_IDU_ACK_CIRQ, data->hwirq);
|
||||||
|
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
idu_irq_set_affinity(struct irq_data *data, const struct cpumask *cpumask,
|
idu_irq_set_affinity(struct irq_data *data, const struct cpumask *cpumask,
|
||||||
bool force)
|
bool force)
|
||||||
|
@ -263,13 +285,36 @@ idu_irq_set_affinity(struct irq_data *data, const struct cpumask *cpumask,
|
||||||
else
|
else
|
||||||
distribution_mode = IDU_M_DISTRI_RR;
|
distribution_mode = IDU_M_DISTRI_RR;
|
||||||
|
|
||||||
idu_set_mode(data->hwirq, IDU_M_TRIG_LEVEL, distribution_mode);
|
idu_set_mode(data->hwirq, false, 0, true, distribution_mode);
|
||||||
|
|
||||||
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
||||||
|
|
||||||
return IRQ_SET_MASK_OK;
|
return IRQ_SET_MASK_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int idu_irq_set_type(struct irq_data *data, u32 type)
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ARCv2 IDU HW does not support inverse polarity, so these are the
|
||||||
|
* only interrupt types supported.
|
||||||
|
*/
|
||||||
|
if (type & ~(IRQ_TYPE_EDGE_RISING | IRQ_TYPE_LEVEL_HIGH))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
raw_spin_lock_irqsave(&mcip_lock, flags);
|
||||||
|
|
||||||
|
idu_set_mode(data->hwirq, true,
|
||||||
|
type & IRQ_TYPE_EDGE_RISING ? IDU_M_TRIG_EDGE :
|
||||||
|
IDU_M_TRIG_LEVEL,
|
||||||
|
false, 0);
|
||||||
|
|
||||||
|
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void idu_irq_enable(struct irq_data *data)
|
static void idu_irq_enable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -289,7 +334,10 @@ static struct irq_chip idu_irq_chip = {
|
||||||
.name = "MCIP IDU Intc",
|
.name = "MCIP IDU Intc",
|
||||||
.irq_mask = idu_irq_mask,
|
.irq_mask = idu_irq_mask,
|
||||||
.irq_unmask = idu_irq_unmask,
|
.irq_unmask = idu_irq_unmask,
|
||||||
|
.irq_ack = idu_irq_ack,
|
||||||
|
.irq_mask_ack = idu_irq_mask_ack,
|
||||||
.irq_enable = idu_irq_enable,
|
.irq_enable = idu_irq_enable,
|
||||||
|
.irq_set_type = idu_irq_set_type,
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
.irq_set_affinity = idu_irq_set_affinity,
|
.irq_set_affinity = idu_irq_set_affinity,
|
||||||
#endif
|
#endif
|
||||||
|
@ -317,7 +365,7 @@ static int idu_irq_map(struct irq_domain *d, unsigned int virq, irq_hw_number_t
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct irq_domain_ops idu_irq_ops = {
|
static const struct irq_domain_ops idu_irq_ops = {
|
||||||
.xlate = irq_domain_xlate_onecell,
|
.xlate = irq_domain_xlate_onetwocell,
|
||||||
.map = idu_irq_map,
|
.map = idu_irq_map,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -572,6 +572,7 @@ static unsigned long read_pointer(const u8 **pLoc, const void *end,
|
||||||
#else
|
#else
|
||||||
BUILD_BUG_ON(sizeof(u32) != sizeof(value));
|
BUILD_BUG_ON(sizeof(u32) != sizeof(value));
|
||||||
#endif
|
#endif
|
||||||
|
/* Fall through */
|
||||||
case DW_EH_PE_native:
|
case DW_EH_PE_native:
|
||||||
if (end < (const void *)(ptr.pul + 1))
|
if (end < (const void *)(ptr.pul + 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -826,7 +827,7 @@ static int processCFI(const u8 *start, const u8 *end, unsigned long targetLoc,
|
||||||
case DW_CFA_def_cfa:
|
case DW_CFA_def_cfa:
|
||||||
state->cfa.reg = get_uleb128(&ptr.p8, end);
|
state->cfa.reg = get_uleb128(&ptr.p8, end);
|
||||||
unw_debug("cfa_def_cfa: r%lu ", state->cfa.reg);
|
unw_debug("cfa_def_cfa: r%lu ", state->cfa.reg);
|
||||||
/*nobreak*/
|
/* fall through */
|
||||||
case DW_CFA_def_cfa_offset:
|
case DW_CFA_def_cfa_offset:
|
||||||
state->cfa.offs = get_uleb128(&ptr.p8, end);
|
state->cfa.offs = get_uleb128(&ptr.p8, end);
|
||||||
unw_debug("cfa_def_cfa_offset: 0x%lx ",
|
unw_debug("cfa_def_cfa_offset: 0x%lx ",
|
||||||
|
@ -834,7 +835,7 @@ static int processCFI(const u8 *start, const u8 *end, unsigned long targetLoc,
|
||||||
break;
|
break;
|
||||||
case DW_CFA_def_cfa_sf:
|
case DW_CFA_def_cfa_sf:
|
||||||
state->cfa.reg = get_uleb128(&ptr.p8, end);
|
state->cfa.reg = get_uleb128(&ptr.p8, end);
|
||||||
/*nobreak */
|
/* fall through */
|
||||||
case DW_CFA_def_cfa_offset_sf:
|
case DW_CFA_def_cfa_offset_sf:
|
||||||
state->cfa.offs = get_sleb128(&ptr.p8, end)
|
state->cfa.offs = get_sleb128(&ptr.p8, end)
|
||||||
* state->dataAlign;
|
* state->dataAlign;
|
||||||
|
|
|
@ -101,7 +101,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||||
if (is_isa_arcv2() && ioc_enable && coherent)
|
if (is_isa_arcv2() && ioc_enable && coherent)
|
||||||
dev->dma_coherent = true;
|
dev->dma_coherent = true;
|
||||||
|
|
||||||
dev_info(dev, "use %sncoherent DMA ops\n",
|
dev_info(dev, "use %scoherent DMA ops\n",
|
||||||
dev->dma_coherent ? "" : "non");
|
dev->dma_coherent ? "" : "non");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/of_fdt.h>
|
||||||
|
#include <linux/libfdt.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <asm/arcregs.h>
|
#include <asm/arcregs.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/mach_desc.h>
|
#include <asm/mach_desc.h>
|
||||||
|
|
||||||
|
int arc_hsdk_axi_dmac_coherent __section(.data) = 0;
|
||||||
|
|
||||||
#define ARC_CCM_UNUSED_ADDR 0x60000000
|
#define ARC_CCM_UNUSED_ADDR 0x60000000
|
||||||
|
|
||||||
static void __init hsdk_init_per_cpu(unsigned int cpu)
|
static void __init hsdk_init_per_cpu(unsigned int cpu)
|
||||||
|
@ -97,6 +101,42 @@ static void __init hsdk_enable_gpio_intc_wire(void)
|
||||||
iowrite32(GPIO_INT_CONNECTED_MASK, (void __iomem *) GPIO_INTEN);
|
iowrite32(GPIO_INT_CONNECTED_MASK, (void __iomem *) GPIO_INTEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __init hsdk_tweak_node_coherency(const char *path, bool coherent)
|
||||||
|
{
|
||||||
|
void *fdt = initial_boot_params;
|
||||||
|
const void *prop;
|
||||||
|
int node, ret;
|
||||||
|
bool dt_coh_set;
|
||||||
|
|
||||||
|
node = fdt_path_offset(fdt, path);
|
||||||
|
if (node < 0)
|
||||||
|
goto tweak_fail;
|
||||||
|
|
||||||
|
prop = fdt_getprop(fdt, node, "dma-coherent", &ret);
|
||||||
|
if (!prop && ret != -FDT_ERR_NOTFOUND)
|
||||||
|
goto tweak_fail;
|
||||||
|
|
||||||
|
dt_coh_set = ret != -FDT_ERR_NOTFOUND;
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
|
/* need to remove "dma-coherent" property */
|
||||||
|
if (dt_coh_set && !coherent)
|
||||||
|
ret = fdt_delprop(fdt, node, "dma-coherent");
|
||||||
|
|
||||||
|
/* need to set "dma-coherent" property */
|
||||||
|
if (!dt_coh_set && coherent)
|
||||||
|
ret = fdt_setprop(fdt, node, "dma-coherent", NULL, 0);
|
||||||
|
|
||||||
|
if (ret < 0)
|
||||||
|
goto tweak_fail;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
tweak_fail:
|
||||||
|
pr_err("failed to tweak %s to %scoherent\n", path, coherent ? "" : "non");
|
||||||
|
return -EFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
enum hsdk_axi_masters {
|
enum hsdk_axi_masters {
|
||||||
M_HS_CORE = 0,
|
M_HS_CORE = 0,
|
||||||
M_HS_RTT,
|
M_HS_RTT,
|
||||||
|
@ -162,6 +202,39 @@ enum hsdk_axi_masters {
|
||||||
#define CREG_PAE ((void __iomem *)(CREG_BASE + 0x180))
|
#define CREG_PAE ((void __iomem *)(CREG_BASE + 0x180))
|
||||||
#define CREG_PAE_UPDT ((void __iomem *)(CREG_BASE + 0x194))
|
#define CREG_PAE_UPDT ((void __iomem *)(CREG_BASE + 0x194))
|
||||||
|
|
||||||
|
static void __init hsdk_init_memory_bridge_axi_dmac(void)
|
||||||
|
{
|
||||||
|
bool coherent = !!arc_hsdk_axi_dmac_coherent;
|
||||||
|
u32 axi_m_slv1, axi_m_oft1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't tweak memory bridge configuration if we failed to tweak DTB
|
||||||
|
* as we will end up in a inconsistent state.
|
||||||
|
*/
|
||||||
|
if (hsdk_tweak_node_coherency("/soc/dmac@80000", coherent))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (coherent) {
|
||||||
|
axi_m_slv1 = 0x77999999;
|
||||||
|
axi_m_oft1 = 0x76DCBA98;
|
||||||
|
} else {
|
||||||
|
axi_m_slv1 = 0x77777777;
|
||||||
|
axi_m_oft1 = 0x76543210;
|
||||||
|
}
|
||||||
|
|
||||||
|
writel(0x77777777, CREG_AXI_M_SLV0(M_DMAC_0));
|
||||||
|
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_DMAC_0));
|
||||||
|
writel(axi_m_slv1, CREG_AXI_M_SLV1(M_DMAC_0));
|
||||||
|
writel(axi_m_oft1, CREG_AXI_M_OFT1(M_DMAC_0));
|
||||||
|
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DMAC_0));
|
||||||
|
|
||||||
|
writel(0x77777777, CREG_AXI_M_SLV0(M_DMAC_1));
|
||||||
|
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_DMAC_1));
|
||||||
|
writel(axi_m_slv1, CREG_AXI_M_SLV1(M_DMAC_1));
|
||||||
|
writel(axi_m_oft1, CREG_AXI_M_OFT1(M_DMAC_1));
|
||||||
|
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DMAC_1));
|
||||||
|
}
|
||||||
|
|
||||||
static void __init hsdk_init_memory_bridge(void)
|
static void __init hsdk_init_memory_bridge(void)
|
||||||
{
|
{
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
@ -227,24 +300,14 @@ static void __init hsdk_init_memory_bridge(void)
|
||||||
writel(0x76543210, CREG_AXI_M_OFT1(M_GPU));
|
writel(0x76543210, CREG_AXI_M_OFT1(M_GPU));
|
||||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_GPU));
|
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_GPU));
|
||||||
|
|
||||||
writel(0x77777777, CREG_AXI_M_SLV0(M_DMAC_0));
|
|
||||||
writel(0x77777777, CREG_AXI_M_SLV1(M_DMAC_0));
|
|
||||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_DMAC_0));
|
|
||||||
writel(0x76543210, CREG_AXI_M_OFT1(M_DMAC_0));
|
|
||||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DMAC_0));
|
|
||||||
|
|
||||||
writel(0x77777777, CREG_AXI_M_SLV0(M_DMAC_1));
|
|
||||||
writel(0x77777777, CREG_AXI_M_SLV1(M_DMAC_1));
|
|
||||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_DMAC_1));
|
|
||||||
writel(0x76543210, CREG_AXI_M_OFT1(M_DMAC_1));
|
|
||||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DMAC_1));
|
|
||||||
|
|
||||||
writel(0x00000000, CREG_AXI_M_SLV0(M_DVFS));
|
writel(0x00000000, CREG_AXI_M_SLV0(M_DVFS));
|
||||||
writel(0x60000000, CREG_AXI_M_SLV1(M_DVFS));
|
writel(0x60000000, CREG_AXI_M_SLV1(M_DVFS));
|
||||||
writel(0x00000000, CREG_AXI_M_OFT0(M_DVFS));
|
writel(0x00000000, CREG_AXI_M_OFT0(M_DVFS));
|
||||||
writel(0x00000000, CREG_AXI_M_OFT1(M_DVFS));
|
writel(0x00000000, CREG_AXI_M_OFT1(M_DVFS));
|
||||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DVFS));
|
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DVFS));
|
||||||
|
|
||||||
|
hsdk_init_memory_bridge_axi_dmac();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PAE remapping for DMA clients does not work due to an RTL bug, so
|
* PAE remapping for DMA clients does not work due to an RTL bug, so
|
||||||
* CREG_PAE register must be programmed to all zeroes, otherwise it
|
* CREG_PAE register must be programmed to all zeroes, otherwise it
|
||||||
|
|
|
@ -7,6 +7,8 @@ config ARM
|
||||||
select ARCH_HAS_BINFMT_FLAT
|
select ARCH_HAS_BINFMT_FLAT
|
||||||
select ARCH_HAS_DEBUG_VIRTUAL if MMU
|
select ARCH_HAS_DEBUG_VIRTUAL if MMU
|
||||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||||
|
select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB
|
||||||
|
select ARCH_HAS_DMA_MMAP_PGPROT if SWIOTLB
|
||||||
select ARCH_HAS_ELF_RANDOMIZE
|
select ARCH_HAS_ELF_RANDOMIZE
|
||||||
select ARCH_HAS_FORTIFY_SOURCE
|
select ARCH_HAS_FORTIFY_SOURCE
|
||||||
select ARCH_HAS_KEEPINITRD
|
select ARCH_HAS_KEEPINITRD
|
||||||
|
@ -18,6 +20,8 @@ config ARM
|
||||||
select ARCH_HAS_SET_MEMORY
|
select ARCH_HAS_SET_MEMORY
|
||||||
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
|
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
|
||||||
select ARCH_HAS_STRICT_MODULE_RWX if MMU
|
select ARCH_HAS_STRICT_MODULE_RWX if MMU
|
||||||
|
select ARCH_HAS_SYNC_DMA_FOR_DEVICE if SWIOTLB
|
||||||
|
select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB
|
||||||
select ARCH_HAS_TEARDOWN_DMA_OPS if MMU
|
select ARCH_HAS_TEARDOWN_DMA_OPS if MMU
|
||||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||||
select ARCH_HAVE_CUSTOM_GPIO_H
|
select ARCH_HAVE_CUSTOM_GPIO_H
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
uart0: serial@0 {
|
uart0: serial@0 {
|
||||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||||
clock-frequency = <48000000>;
|
clock-frequency = <48000000>;
|
||||||
reg = <0x0 0x2000>;
|
reg = <0x0 0x1000>;
|
||||||
interrupts = <72>;
|
interrupts = <72>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
dmas = <&edma 26 0>, <&edma 27 0>;
|
dmas = <&edma 26 0>, <&edma 27 0>;
|
||||||
|
@ -934,7 +934,7 @@
|
||||||
uart1: serial@0 {
|
uart1: serial@0 {
|
||||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||||
clock-frequency = <48000000>;
|
clock-frequency = <48000000>;
|
||||||
reg = <0x0 0x2000>;
|
reg = <0x0 0x1000>;
|
||||||
interrupts = <73>;
|
interrupts = <73>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
dmas = <&edma 28 0>, <&edma 29 0>;
|
dmas = <&edma 28 0>, <&edma 29 0>;
|
||||||
|
@ -966,7 +966,7 @@
|
||||||
uart2: serial@0 {
|
uart2: serial@0 {
|
||||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||||
clock-frequency = <48000000>;
|
clock-frequency = <48000000>;
|
||||||
reg = <0x0 0x2000>;
|
reg = <0x0 0x1000>;
|
||||||
interrupts = <74>;
|
interrupts = <74>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
dmas = <&edma 30 0>, <&edma 31 0>;
|
dmas = <&edma 30 0>, <&edma 31 0>;
|
||||||
|
@ -1614,7 +1614,7 @@
|
||||||
uart3: serial@0 {
|
uart3: serial@0 {
|
||||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||||
clock-frequency = <48000000>;
|
clock-frequency = <48000000>;
|
||||||
reg = <0x0 0x2000>;
|
reg = <0x0 0x1000>;
|
||||||
interrupts = <44>;
|
interrupts = <44>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
@ -1644,7 +1644,7 @@
|
||||||
uart4: serial@0 {
|
uart4: serial@0 {
|
||||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||||
clock-frequency = <48000000>;
|
clock-frequency = <48000000>;
|
||||||
reg = <0x0 0x2000>;
|
reg = <0x0 0x1000>;
|
||||||
interrupts = <45>;
|
interrupts = <45>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
@ -1674,7 +1674,7 @@
|
||||||
uart5: serial@0 {
|
uart5: serial@0 {
|
||||||
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||||
clock-frequency = <48000000>;
|
clock-frequency = <48000000>;
|
||||||
reg = <0x0 0x2000>;
|
reg = <0x0 0x1000>;
|
||||||
interrupts = <46>;
|
interrupts = <46>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
@ -1758,6 +1758,8 @@
|
||||||
|
|
||||||
target-module@cc000 { /* 0x481cc000, ap 60 46.0 */
|
target-module@cc000 { /* 0x481cc000, ap 60 46.0 */
|
||||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||||
|
reg = <0xcc020 0x4>;
|
||||||
|
reg-names = "rev";
|
||||||
ti,hwmods = "d_can0";
|
ti,hwmods = "d_can0";
|
||||||
/* Domains (P, C): per_pwrdm, l4ls_clkdm */
|
/* Domains (P, C): per_pwrdm, l4ls_clkdm */
|
||||||
clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN0_CLKCTRL 0>,
|
clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN0_CLKCTRL 0>,
|
||||||
|
@ -1780,6 +1782,8 @@
|
||||||
|
|
||||||
target-module@d0000 { /* 0x481d0000, ap 62 42.0 */
|
target-module@d0000 { /* 0x481d0000, ap 62 42.0 */
|
||||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||||
|
reg = <0xd0020 0x4>;
|
||||||
|
reg-names = "rev";
|
||||||
ti,hwmods = "d_can1";
|
ti,hwmods = "d_can1";
|
||||||
/* Domains (P, C): per_pwrdm, l4ls_clkdm */
|
/* Domains (P, C): per_pwrdm, l4ls_clkdm */
|
||||||
clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN1_CLKCTRL 0>,
|
clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN1_CLKCTRL 0>,
|
||||||
|
|
|
@ -234,13 +234,33 @@
|
||||||
interrupt-names = "edma3_tcerrint";
|
interrupt-names = "edma3_tcerrint";
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc3: mmc@47810000 {
|
target-module@47810000 {
|
||||||
compatible = "ti,omap4-hsmmc";
|
compatible = "ti,sysc-omap2", "ti,sysc";
|
||||||
ti,hwmods = "mmc3";
|
ti,hwmods = "mmc3";
|
||||||
|
reg = <0x478102fc 0x4>,
|
||||||
|
<0x47810110 0x4>,
|
||||||
|
<0x47810114 0x4>;
|
||||||
|
reg-names = "rev", "sysc", "syss";
|
||||||
|
ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
|
||||||
|
SYSC_OMAP2_ENAWAKEUP |
|
||||||
|
SYSC_OMAP2_SOFTRESET |
|
||||||
|
SYSC_OMAP2_AUTOIDLE)>;
|
||||||
|
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
|
||||||
|
<SYSC_IDLE_NO>,
|
||||||
|
<SYSC_IDLE_SMART>;
|
||||||
|
ti,syss-mask = <1>;
|
||||||
|
clocks = <&l3s_clkctrl AM3_L3S_MMC3_CLKCTRL 0>;
|
||||||
|
clock-names = "fck";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges = <0x0 0x47810000 0x1000>;
|
||||||
|
|
||||||
|
mmc3: mmc@0 {
|
||||||
|
compatible = "ti,omap4-hsmmc";
|
||||||
ti,needs-special-reset;
|
ti,needs-special-reset;
|
||||||
interrupts = <29>;
|
interrupts = <29>;
|
||||||
reg = <0x47810000 0x1000>;
|
reg = <0x0 0x1000>;
|
||||||
status = "disabled";
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
usb: usb@47400000 {
|
usb: usb@47400000 {
|
||||||
|
|
|
@ -228,13 +228,33 @@
|
||||||
interrupt-names = "edma3_tcerrint";
|
interrupt-names = "edma3_tcerrint";
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc3: mmc@47810000 {
|
target-module@47810000 {
|
||||||
compatible = "ti,omap4-hsmmc";
|
compatible = "ti,sysc-omap2", "ti,sysc";
|
||||||
reg = <0x47810000 0x1000>;
|
|
||||||
ti,hwmods = "mmc3";
|
ti,hwmods = "mmc3";
|
||||||
|
reg = <0x478102fc 0x4>,
|
||||||
|
<0x47810110 0x4>,
|
||||||
|
<0x47810114 0x4>;
|
||||||
|
reg-names = "rev", "sysc", "syss";
|
||||||
|
ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
|
||||||
|
SYSC_OMAP2_ENAWAKEUP |
|
||||||
|
SYSC_OMAP2_SOFTRESET |
|
||||||
|
SYSC_OMAP2_AUTOIDLE)>;
|
||||||
|
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
|
||||||
|
<SYSC_IDLE_NO>,
|
||||||
|
<SYSC_IDLE_SMART>;
|
||||||
|
ti,syss-mask = <1>;
|
||||||
|
clocks = <&l3s_clkctrl AM4_L3S_MMC3_CLKCTRL 0>;
|
||||||
|
clock-names = "fck";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges = <0x0 0x47810000 0x1000>;
|
||||||
|
|
||||||
|
mmc3: mmc@0 {
|
||||||
|
compatible = "ti,omap4-hsmmc";
|
||||||
ti,needs-special-reset;
|
ti,needs-special-reset;
|
||||||
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
status = "disabled";
|
reg = <0x0 0x1000>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sham: sham@53100000 {
|
sham: sham@53100000 {
|
||||||
|
|
|
@ -1574,6 +1574,8 @@
|
||||||
|
|
||||||
target-module@cc000 { /* 0x481cc000, ap 50 46.0 */
|
target-module@cc000 { /* 0x481cc000, ap 50 46.0 */
|
||||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||||
|
reg = <0xcc020 0x4>;
|
||||||
|
reg-names = "rev";
|
||||||
ti,hwmods = "d_can0";
|
ti,hwmods = "d_can0";
|
||||||
/* Domains (P, C): per_pwrdm, l4ls_clkdm */
|
/* Domains (P, C): per_pwrdm, l4ls_clkdm */
|
||||||
clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN0_CLKCTRL 0>;
|
clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN0_CLKCTRL 0>;
|
||||||
|
@ -1593,6 +1595,8 @@
|
||||||
|
|
||||||
target-module@d0000 { /* 0x481d0000, ap 52 3a.0 */
|
target-module@d0000 { /* 0x481d0000, ap 52 3a.0 */
|
||||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||||
|
reg = <0xd0020 0x4>;
|
||||||
|
reg-names = "rev";
|
||||||
ti,hwmods = "d_can1";
|
ti,hwmods = "d_can1";
|
||||||
/* Domains (P, C): per_pwrdm, l4ls_clkdm */
|
/* Domains (P, C): per_pwrdm, l4ls_clkdm */
|
||||||
clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN1_CLKCTRL 0>;
|
clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN1_CLKCTRL 0>;
|
||||||
|
|
|
@ -175,14 +175,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_sdr12>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_sdr25>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50_rev20 &mmc1_iodelay_ddr50_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc2 {
|
&mmc2 {
|
||||||
|
|
|
@ -16,14 +16,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_sdr12>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_sdr25>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc2 {
|
&mmc2 {
|
||||||
|
|
|
@ -24,14 +24,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_default>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_hs>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_ddr50 &mmc1_iodelay_sdr104_conf>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc2 {
|
&mmc2 {
|
||||||
|
|
|
@ -379,7 +379,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpio7 {
|
&gpio7_target {
|
||||||
ti,no-reset-on-init;
|
ti,no-reset-on-init;
|
||||||
ti,no-idle-on-init;
|
ti,no-idle-on-init;
|
||||||
};
|
};
|
||||||
|
@ -430,6 +430,7 @@
|
||||||
|
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
|
cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
|
||||||
|
no-1-8-v;
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc2 {
|
&mmc2 {
|
||||||
|
|
|
@ -16,14 +16,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default>;
|
pinctrl-0 = <&mmc1_pins_default>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_sdr12>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_sdr25>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev11_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev11_conf>;
|
|
||||||
vmmc-supply = <&vdd_3v3>;
|
vmmc-supply = <&vdd_3v3>;
|
||||||
vqmmc-supply = <&ldo1_reg>;
|
vqmmc-supply = <&ldo1_reg>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,14 +16,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default>;
|
pinctrl-0 = <&mmc1_pins_default>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_sdr12>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_sdr25>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
|
|
||||||
vmmc-supply = <&vdd_3v3>;
|
vmmc-supply = <&vdd_3v3>;
|
||||||
vqmmc-supply = <&ldo1_reg>;
|
vqmmc-supply = <&ldo1_reg>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -498,7 +498,7 @@
|
||||||
phy-supply = <&ldousb_reg>;
|
phy-supply = <&ldousb_reg>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpio7 {
|
&gpio7_target {
|
||||||
ti,no-reset-on-init;
|
ti,no-reset-on-init;
|
||||||
ti,no-idle-on-init;
|
ti,no-idle-on-init;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1261,7 +1261,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
target-module@51000 { /* 0x48051000, ap 45 2e.0 */
|
gpio7_target: target-module@51000 { /* 0x48051000, ap 45 2e.0 */
|
||||||
compatible = "ti,sysc-omap2", "ti,sysc";
|
compatible = "ti,sysc-omap2", "ti,sysc";
|
||||||
ti,hwmods = "gpio7";
|
ti,hwmods = "gpio7";
|
||||||
reg = <0x51000 0x4>,
|
reg = <0x51000 0x4>,
|
||||||
|
@ -3025,7 +3025,7 @@
|
||||||
|
|
||||||
target-module@80000 { /* 0x48480000, ap 31 16.0 */
|
target-module@80000 { /* 0x48480000, ap 31 16.0 */
|
||||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||||
reg = <0x80000 0x4>;
|
reg = <0x80020 0x4>;
|
||||||
reg-names = "rev";
|
reg-names = "rev";
|
||||||
clocks = <&l4per2_clkctrl DRA7_L4PER2_DCAN2_CLKCTRL 0>;
|
clocks = <&l4per2_clkctrl DRA7_L4PER2_DCAN2_CLKCTRL 0>;
|
||||||
clock-names = "fck";
|
clock-names = "fck";
|
||||||
|
@ -4577,7 +4577,7 @@
|
||||||
|
|
||||||
target-module@c000 { /* 0x4ae3c000, ap 30 04.0 */
|
target-module@c000 { /* 0x4ae3c000, ap 30 04.0 */
|
||||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||||
reg = <0xc000 0x4>;
|
reg = <0xc020 0x4>;
|
||||||
reg-names = "rev";
|
reg-names = "rev";
|
||||||
clocks = <&wkupaon_clkctrl DRA7_WKUPAON_DCAN1_CLKCTRL 0>;
|
clocks = <&wkupaon_clkctrl DRA7_WKUPAON_DCAN1_CLKCTRL 0>;
|
||||||
clock-names = "fck";
|
clock-names = "fck";
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
*
|
*
|
||||||
* Datamanual Revisions:
|
* Datamanual Revisions:
|
||||||
*
|
*
|
||||||
* AM572x Silicon Revision 2.0: SPRS953B, Revised November 2016
|
* AM572x Silicon Revision 2.0: SPRS953F, Revised May 2019
|
||||||
* AM572x Silicon Revision 1.1: SPRS915R, Revised November 2016
|
* AM572x Silicon Revision 1.1: SPRS915R, Revised November 2016
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -229,45 +229,45 @@
|
||||||
|
|
||||||
mmc3_pins_default: mmc3_pins_default {
|
mmc3_pins_default: mmc3_pins_default {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
||||||
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
||||||
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
||||||
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
||||||
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
||||||
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc3_pins_hs: mmc3_pins_hs {
|
mmc3_pins_hs: mmc3_pins_hs {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
||||||
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
||||||
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
||||||
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
||||||
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
||||||
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc3_pins_sdr12: mmc3_pins_sdr12 {
|
mmc3_pins_sdr12: mmc3_pins_sdr12 {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
||||||
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
||||||
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
||||||
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
||||||
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
||||||
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc3_pins_sdr25: mmc3_pins_sdr25 {
|
mmc3_pins_sdr25: mmc3_pins_sdr25 {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
||||||
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
||||||
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
||||||
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
||||||
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
||||||
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -246,13 +246,13 @@
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
n25q128a13_2: flash@1 {
|
n25q128a13_2: flash@2 {
|
||||||
compatible = "n25q128a13", "jedec,spi-nor";
|
compatible = "n25q128a13", "jedec,spi-nor";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
spi-max-frequency = <66000000>;
|
spi-max-frequency = <66000000>;
|
||||||
spi-rx-bus-width = <2>;
|
spi-rx-bus-width = <2>;
|
||||||
reg = <1>;
|
reg = <2>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ for_each_frame: tst frame, mask @ Check for address exceptions
|
||||||
|
|
||||||
1003: ldr r2, [sv_pc, #-4] @ if stmfd sp!, {args} exists,
|
1003: ldr r2, [sv_pc, #-4] @ if stmfd sp!, {args} exists,
|
||||||
ldr r3, .Ldsi+4 @ adjust saved 'pc' back one
|
ldr r3, .Ldsi+4 @ adjust saved 'pc' back one
|
||||||
teq r3, r2, lsr #10 @ instruction
|
teq r3, r2, lsr #11 @ instruction
|
||||||
subne r0, sv_pc, #4 @ allow for mov
|
subne r0, sv_pc, #4 @ allow for mov
|
||||||
subeq r0, sv_pc, #8 @ allow for mov + stmia
|
subeq r0, sv_pc, #8 @ allow for mov + stmia
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,8 @@ restart:
|
||||||
orr r11, r11, r13 @ mask all requested interrupts
|
orr r11, r11, r13 @ mask all requested interrupts
|
||||||
str r11, [r12, #OMAP1510_GPIO_INT_MASK]
|
str r11, [r12, #OMAP1510_GPIO_INT_MASK]
|
||||||
|
|
||||||
|
str r13, [r12, #OMAP1510_GPIO_INT_STATUS] @ ack all requested interrupts
|
||||||
|
|
||||||
ands r10, r13, #KEYBRD_CLK_MASK @ extract keyboard status - set?
|
ands r10, r13, #KEYBRD_CLK_MASK @ extract keyboard status - set?
|
||||||
beq hksw @ no - try next source
|
beq hksw @ no - try next source
|
||||||
|
|
||||||
|
@ -133,7 +135,6 @@ restart:
|
||||||
@@@@@@@@@@@@@@@@@@@@@@
|
@@@@@@@@@@@@@@@@@@@@@@
|
||||||
@ Keyboard clock FIQ mode interrupt handler
|
@ Keyboard clock FIQ mode interrupt handler
|
||||||
@ r10 now contains KEYBRD_CLK_MASK, use it
|
@ r10 now contains KEYBRD_CLK_MASK, use it
|
||||||
str r10, [r12, #OMAP1510_GPIO_INT_STATUS] @ ack the interrupt
|
|
||||||
bic r11, r11, r10 @ unmask it
|
bic r11, r11, r10 @ unmask it
|
||||||
str r11, [r12, #OMAP1510_GPIO_INT_MASK]
|
str r11, [r12, #OMAP1510_GPIO_INT_MASK]
|
||||||
|
|
||||||
|
|
|
@ -70,9 +70,7 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id)
|
||||||
* interrupts default to since commit 80ac93c27441
|
* interrupts default to since commit 80ac93c27441
|
||||||
* requires interrupt already acked and unmasked.
|
* requires interrupt already acked and unmasked.
|
||||||
*/
|
*/
|
||||||
if (irq_chip->irq_ack)
|
if (!WARN_ON_ONCE(!irq_chip->irq_unmask))
|
||||||
irq_chip->irq_ack(d);
|
|
||||||
if (irq_chip->irq_unmask)
|
|
||||||
irq_chip->irq_unmask(d);
|
irq_chip->irq_unmask(d);
|
||||||
}
|
}
|
||||||
for (; irq_counter[gpio] < fiq_count; irq_counter[gpio]++)
|
for (; irq_counter[gpio] < fiq_count; irq_counter[gpio]++)
|
||||||
|
|
|
@ -127,6 +127,9 @@ static int __init omap4_sram_init(void)
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
struct gen_pool *sram_pool;
|
struct gen_pool *sram_pool;
|
||||||
|
|
||||||
|
if (!soc_is_omap44xx() && !soc_is_omap54xx())
|
||||||
|
return 0;
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, NULL, "ti,omap4-mpu");
|
np = of_find_compatible_node(NULL, NULL, "ti,omap4-mpu");
|
||||||
if (!np)
|
if (!np)
|
||||||
pr_warn("%s:Unable to allocate sram needed to handle errata I688\n",
|
pr_warn("%s:Unable to allocate sram needed to handle errata I688\n",
|
||||||
|
|
|
@ -379,7 +379,8 @@ static struct omap_hwmod dra7xx_dcan2_hwmod = {
|
||||||
static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
|
static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
|
||||||
.rev_offs = 0x0,
|
.rev_offs = 0x0,
|
||||||
.sysc_offs = 0x4,
|
.sysc_offs = 0x4,
|
||||||
.sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
|
.sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
|
||||||
|
SYSC_HAS_RESET_STATUS,
|
||||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||||
.sysc_fields = &omap_hwmod_sysc_type2,
|
.sysc_fields = &omap_hwmod_sysc_type2,
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,6 +46,7 @@ static int __init parse_tag_acorn(const struct tag *tag)
|
||||||
switch (tag->u.acorn.vram_pages) {
|
switch (tag->u.acorn.vram_pages) {
|
||||||
case 512:
|
case 512:
|
||||||
vram_size += PAGE_SIZE * 256;
|
vram_size += PAGE_SIZE * 256;
|
||||||
|
/* Fall through - ??? */
|
||||||
case 256:
|
case 256:
|
||||||
vram_size += PAGE_SIZE * 256;
|
vram_size += PAGE_SIZE * 256;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -664,10 +664,6 @@ config ARM_LPAE
|
||||||
!CPU_32v4 && !CPU_32v3
|
!CPU_32v4 && !CPU_32v3
|
||||||
select PHYS_ADDR_T_64BIT
|
select PHYS_ADDR_T_64BIT
|
||||||
select SWIOTLB
|
select SWIOTLB
|
||||||
select ARCH_HAS_DMA_COHERENT_TO_PFN
|
|
||||||
select ARCH_HAS_DMA_MMAP_PGPROT
|
|
||||||
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
|
|
||||||
select ARCH_HAS_SYNC_DMA_FOR_CPU
|
|
||||||
help
|
help
|
||||||
Say Y if you have an ARMv7 processor supporting the LPAE page
|
Say Y if you have an ARMv7 processor supporting the LPAE page
|
||||||
table format and you would like to access memory beyond the
|
table format and you would like to access memory beyond the
|
||||||
|
|
|
@ -175,6 +175,11 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
|
||||||
#ifdef CONFIG_HAVE_ARCH_PFN_VALID
|
#ifdef CONFIG_HAVE_ARCH_PFN_VALID
|
||||||
int pfn_valid(unsigned long pfn)
|
int pfn_valid(unsigned long pfn)
|
||||||
{
|
{
|
||||||
|
phys_addr_t addr = __pfn_to_phys(pfn);
|
||||||
|
|
||||||
|
if (__phys_to_pfn(addr) != pfn)
|
||||||
|
return 0;
|
||||||
|
|
||||||
return memblock_is_map_memory(__pfn_to_phys(pfn));
|
return memblock_is_map_memory(__pfn_to_phys(pfn));
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(pfn_valid);
|
EXPORT_SYMBOL(pfn_valid);
|
||||||
|
@ -628,6 +633,7 @@ static void update_sections_early(struct section_perm perms[], int n)
|
||||||
if (t->flags & PF_KTHREAD)
|
if (t->flags & PF_KTHREAD)
|
||||||
continue;
|
continue;
|
||||||
for_each_thread(t, s)
|
for_each_thread(t, s)
|
||||||
|
if (s->mm)
|
||||||
set_section_perms(perms, n, true, s->mm);
|
set_section_perms(perms, n, true, s->mm);
|
||||||
}
|
}
|
||||||
set_section_perms(perms, n, true, current->active_mm);
|
set_section_perms(perms, n, true, current->active_mm);
|
||||||
|
|
|
@ -339,6 +339,12 @@
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&ir {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&remote_input_ao_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
};
|
||||||
|
|
||||||
&pwm_ef {
|
&pwm_ef {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pinctrl-0 = <&pwm_e_pins>;
|
pinctrl-0 = <&pwm_e_pins>;
|
||||||
|
|
|
@ -2386,6 +2386,7 @@
|
||||||
clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
|
clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
|
||||||
clock-names = "ddr";
|
clock-names = "ddr";
|
||||||
phys = <&usb2_phy1>;
|
phys = <&usb2_phy1>;
|
||||||
|
phy-names = "usb2-phy";
|
||||||
dr_mode = "peripheral";
|
dr_mode = "peripheral";
|
||||||
g-rx-fifo-size = <192>;
|
g-rx-fifo-size = <192>;
|
||||||
g-np-tx-fifo-size = <128>;
|
g-np-tx-fifo-size = <128>;
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
|
|
||||||
gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
|
gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
|
||||||
enable-active-high;
|
enable-active-high;
|
||||||
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
tf_io: gpio-regulator-tf_io {
|
tf_io: gpio-regulator-tf_io {
|
||||||
|
|
|
@ -279,6 +279,7 @@
|
||||||
mmc-hs200-1_8v;
|
mmc-hs200-1_8v;
|
||||||
non-removable;
|
non-removable;
|
||||||
fixed-emmc-driver-type = <1>;
|
fixed-emmc-driver-type = <1>;
|
||||||
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb_extal_clk {
|
&usb_extal_clk {
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
reg = <0x0 0x48000000 0x0 0x18000000>;
|
reg = <0x0 0x48000000 0x0 0x18000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
reg_1p8v: regulator0 {
|
reg_1p8v: regulator-1p8v {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "fixed-1.8V";
|
regulator-name = "fixed-1.8V";
|
||||||
regulator-min-microvolt = <1800000>;
|
regulator-min-microvolt = <1800000>;
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
reg_3p3v: regulator1 {
|
reg_3p3v: regulator-3p3v {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "fixed-3.3V";
|
regulator-name = "fixed-3.3V";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
reg_12p0v: regulator1 {
|
reg_12p0v: regulator-12p0v {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "D12.0V";
|
regulator-name = "D12.0V";
|
||||||
regulator-min-microvolt = <12000000>;
|
regulator-min-microvolt = <12000000>;
|
||||||
|
|
|
@ -46,6 +46,7 @@ static inline uint64_t CVMX_SLI_PCIE_MSI_RCV_FUNC(void)
|
||||||
case OCTEON_CN78XX & OCTEON_FAMILY_MASK:
|
case OCTEON_CN78XX & OCTEON_FAMILY_MASK:
|
||||||
if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X))
|
if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X))
|
||||||
return 0x0000000000003CB0ull;
|
return 0x0000000000003CB0ull;
|
||||||
|
/* Else, fall through */
|
||||||
default:
|
default:
|
||||||
return 0x0000000000023CB0ull;
|
return 0x0000000000023CB0ull;
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,6 +316,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
|
||||||
regs->uregs[0] = -EINTR;
|
regs->uregs[0] = -EINTR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* Else, fall through */
|
||||||
case -ERESTARTNOINTR:
|
case -ERESTARTNOINTR:
|
||||||
regs->uregs[0] = regs->orig_r0;
|
regs->uregs[0] = regs->orig_r0;
|
||||||
regs->ipc -= 4;
|
regs->ipc -= 4;
|
||||||
|
@ -360,6 +361,7 @@ static void do_signal(struct pt_regs *regs)
|
||||||
switch (regs->uregs[0]) {
|
switch (regs->uregs[0]) {
|
||||||
case -ERESTART_RESTARTBLOCK:
|
case -ERESTART_RESTARTBLOCK:
|
||||||
regs->uregs[15] = __NR_restart_syscall;
|
regs->uregs[15] = __NR_restart_syscall;
|
||||||
|
/* Fall through */
|
||||||
case -ERESTARTNOHAND:
|
case -ERESTARTNOHAND:
|
||||||
case -ERESTARTSYS:
|
case -ERESTARTSYS:
|
||||||
case -ERESTARTNOINTR:
|
case -ERESTARTNOINTR:
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#ifndef _PARISC_PGTABLE_H
|
#ifndef _PARISC_PGTABLE_H
|
||||||
#define _PARISC_PGTABLE_H
|
#define _PARISC_PGTABLE_H
|
||||||
|
|
||||||
|
#include <asm/page.h>
|
||||||
#include <asm-generic/4level-fixup.h>
|
#include <asm-generic/4level-fixup.h>
|
||||||
|
|
||||||
#include <asm/fixmap.h>
|
#include <asm/fixmap.h>
|
||||||
|
@ -98,8 +99,6 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
|
||||||
|
|
||||||
#endif /* !__ASSEMBLY__ */
|
#endif /* !__ASSEMBLY__ */
|
||||||
|
|
||||||
#include <asm/page.h>
|
|
||||||
|
|
||||||
#define pte_ERROR(e) \
|
#define pte_ERROR(e) \
|
||||||
printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
|
printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
|
||||||
#define pmd_ERROR(e) \
|
#define pmd_ERROR(e) \
|
||||||
|
|
|
@ -101,21 +101,8 @@ static void check_if_tm_restore_required(struct task_struct *tsk)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool tm_active_with_fp(struct task_struct *tsk)
|
|
||||||
{
|
|
||||||
return MSR_TM_ACTIVE(tsk->thread.regs->msr) &&
|
|
||||||
(tsk->thread.ckpt_regs.msr & MSR_FP);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool tm_active_with_altivec(struct task_struct *tsk)
|
|
||||||
{
|
|
||||||
return MSR_TM_ACTIVE(tsk->thread.regs->msr) &&
|
|
||||||
(tsk->thread.ckpt_regs.msr & MSR_VEC);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
static inline void check_if_tm_restore_required(struct task_struct *tsk) { }
|
static inline void check_if_tm_restore_required(struct task_struct *tsk) { }
|
||||||
static inline bool tm_active_with_fp(struct task_struct *tsk) { return false; }
|
|
||||||
static inline bool tm_active_with_altivec(struct task_struct *tsk) { return false; }
|
|
||||||
#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
|
#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
|
||||||
|
|
||||||
bool strict_msr_control;
|
bool strict_msr_control;
|
||||||
|
@ -252,7 +239,7 @@ EXPORT_SYMBOL(enable_kernel_fp);
|
||||||
|
|
||||||
static int restore_fp(struct task_struct *tsk)
|
static int restore_fp(struct task_struct *tsk)
|
||||||
{
|
{
|
||||||
if (tsk->thread.load_fp || tm_active_with_fp(tsk)) {
|
if (tsk->thread.load_fp) {
|
||||||
load_fp_state(¤t->thread.fp_state);
|
load_fp_state(¤t->thread.fp_state);
|
||||||
current->thread.load_fp++;
|
current->thread.load_fp++;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -334,8 +321,7 @@ EXPORT_SYMBOL_GPL(flush_altivec_to_thread);
|
||||||
|
|
||||||
static int restore_altivec(struct task_struct *tsk)
|
static int restore_altivec(struct task_struct *tsk)
|
||||||
{
|
{
|
||||||
if (cpu_has_feature(CPU_FTR_ALTIVEC) &&
|
if (cpu_has_feature(CPU_FTR_ALTIVEC) && (tsk->thread.load_vec)) {
|
||||||
(tsk->thread.load_vec || tm_active_with_altivec(tsk))) {
|
|
||||||
load_vr_state(&tsk->thread.vr_state);
|
load_vr_state(&tsk->thread.vr_state);
|
||||||
tsk->thread.used_vr = 1;
|
tsk->thread.used_vr = 1;
|
||||||
tsk->thread.load_vec++;
|
tsk->thread.load_vec++;
|
||||||
|
@ -497,13 +483,14 @@ void giveup_all(struct task_struct *tsk)
|
||||||
if (!tsk->thread.regs)
|
if (!tsk->thread.regs)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
check_if_tm_restore_required(tsk);
|
||||||
|
|
||||||
usermsr = tsk->thread.regs->msr;
|
usermsr = tsk->thread.regs->msr;
|
||||||
|
|
||||||
if ((usermsr & msr_all_available) == 0)
|
if ((usermsr & msr_all_available) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
msr_check_and_set(msr_all_available);
|
msr_check_and_set(msr_all_available);
|
||||||
check_if_tm_restore_required(tsk);
|
|
||||||
|
|
||||||
WARN_ON((usermsr & MSR_VSX) && !((usermsr & MSR_FP) && (usermsr & MSR_VEC)));
|
WARN_ON((usermsr & MSR_VSX) && !((usermsr & MSR_FP) && (usermsr & MSR_VEC)));
|
||||||
|
|
||||||
|
|
|
@ -660,8 +660,10 @@ long kvmppc_h_put_tce_indirect(struct kvm_vcpu *vcpu,
|
||||||
}
|
}
|
||||||
tce = be64_to_cpu(tce);
|
tce = be64_to_cpu(tce);
|
||||||
|
|
||||||
if (kvmppc_tce_to_ua(vcpu->kvm, tce, &ua))
|
if (kvmppc_tce_to_ua(vcpu->kvm, tce, &ua)) {
|
||||||
return H_PARAMETER;
|
ret = H_PARAMETER;
|
||||||
|
goto unlock_exit;
|
||||||
|
}
|
||||||
|
|
||||||
list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
|
list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
|
||||||
ret = kvmppc_tce_iommu_map(vcpu->kvm, stt,
|
ret = kvmppc_tce_iommu_map(vcpu->kvm, stt,
|
||||||
|
|
|
@ -556,8 +556,10 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,
|
||||||
unsigned long tce = be64_to_cpu(((u64 *)tces)[i]);
|
unsigned long tce = be64_to_cpu(((u64 *)tces)[i]);
|
||||||
|
|
||||||
ua = 0;
|
ua = 0;
|
||||||
if (kvmppc_rm_tce_to_ua(vcpu->kvm, tce, &ua, NULL))
|
if (kvmppc_rm_tce_to_ua(vcpu->kvm, tce, &ua, NULL)) {
|
||||||
return H_PARAMETER;
|
ret = H_PARAMETER;
|
||||||
|
goto unlock_exit;
|
||||||
|
}
|
||||||
|
|
||||||
list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
|
list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
|
||||||
ret = kvmppc_rm_tce_iommu_map(vcpu->kvm, stt,
|
ret = kvmppc_rm_tce_iommu_map(vcpu->kvm, stt,
|
||||||
|
|
|
@ -630,7 +630,6 @@ static void early_init_this_mmu(void)
|
||||||
#ifdef CONFIG_PPC_FSL_BOOK3E
|
#ifdef CONFIG_PPC_FSL_BOOK3E
|
||||||
if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) {
|
if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) {
|
||||||
unsigned int num_cams;
|
unsigned int num_cams;
|
||||||
int __maybe_unused cpu = smp_processor_id();
|
|
||||||
bool map = true;
|
bool map = true;
|
||||||
|
|
||||||
/* use a quarter of the TLBCAM for bolted linear map */
|
/* use a quarter of the TLBCAM for bolted linear map */
|
||||||
|
|
|
@ -30,10 +30,6 @@ enum fixed_addresses {
|
||||||
__end_of_fixed_addresses
|
__end_of_fixed_addresses
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FIXADDR_SIZE (__end_of_fixed_addresses * PAGE_SIZE)
|
|
||||||
#define FIXADDR_TOP (VMALLOC_START)
|
|
||||||
#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
|
|
||||||
|
|
||||||
#define FIXMAP_PAGE_IO PAGE_KERNEL
|
#define FIXMAP_PAGE_IO PAGE_KERNEL
|
||||||
|
|
||||||
#define __early_set_fixmap __set_fixmap
|
#define __early_set_fixmap __set_fixmap
|
||||||
|
|
|
@ -420,14 +420,22 @@ static inline void pgtable_cache_init(void)
|
||||||
#define VMALLOC_END (PAGE_OFFSET - 1)
|
#define VMALLOC_END (PAGE_OFFSET - 1)
|
||||||
#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE)
|
#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE)
|
||||||
|
|
||||||
|
#define FIXADDR_TOP VMALLOC_START
|
||||||
|
#ifdef CONFIG_64BIT
|
||||||
|
#define FIXADDR_SIZE PMD_SIZE
|
||||||
|
#else
|
||||||
|
#define FIXADDR_SIZE PGDIR_SIZE
|
||||||
|
#endif
|
||||||
|
#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Task size is 0x4000000000 for RV64 or 0xb800000 for RV32.
|
* Task size is 0x4000000000 for RV64 or 0x9fc00000 for RV32.
|
||||||
* Note that PGDIR_SIZE must evenly divide TASK_SIZE.
|
* Note that PGDIR_SIZE must evenly divide TASK_SIZE.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
#define TASK_SIZE (PGDIR_SIZE * PTRS_PER_PGD / 2)
|
#define TASK_SIZE (PGDIR_SIZE * PTRS_PER_PGD / 2)
|
||||||
#else
|
#else
|
||||||
#define TASK_SIZE VMALLOC_START
|
#define TASK_SIZE FIXADDR_START
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <asm-generic/pgtable.h>
|
#include <asm-generic/pgtable.h>
|
||||||
|
|
|
@ -863,7 +863,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
|
||||||
break;
|
break;
|
||||||
case BPF_ALU64 | BPF_NEG: /* dst = -dst */
|
case BPF_ALU64 | BPF_NEG: /* dst = -dst */
|
||||||
/* lcgr %dst,%dst */
|
/* lcgr %dst,%dst */
|
||||||
EMIT4(0xb9130000, dst_reg, dst_reg);
|
EMIT4(0xb9030000, dst_reg, dst_reg);
|
||||||
break;
|
break;
|
||||||
/*
|
/*
|
||||||
* BPF_FROM_BE/LE
|
* BPF_FROM_BE/LE
|
||||||
|
@ -1049,8 +1049,8 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
|
||||||
/* llgf %w1,map.max_entries(%b2) */
|
/* llgf %w1,map.max_entries(%b2) */
|
||||||
EMIT6_DISP_LH(0xe3000000, 0x0016, REG_W1, REG_0, BPF_REG_2,
|
EMIT6_DISP_LH(0xe3000000, 0x0016, REG_W1, REG_0, BPF_REG_2,
|
||||||
offsetof(struct bpf_array, map.max_entries));
|
offsetof(struct bpf_array, map.max_entries));
|
||||||
/* clgrj %b3,%w1,0xa,label0: if %b3 >= %w1 goto out */
|
/* clrj %b3,%w1,0xa,label0: if (u32)%b3 >= (u32)%w1 goto out */
|
||||||
EMIT6_PCREL_LABEL(0xec000000, 0x0065, BPF_REG_3,
|
EMIT6_PCREL_LABEL(0xec000000, 0x0077, BPF_REG_3,
|
||||||
REG_W1, 0, 0xa);
|
REG_W1, 0, 0xa);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1076,8 +1076,10 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
|
||||||
* goto out;
|
* goto out;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* sllg %r1,%b3,3: %r1 = index * 8 */
|
/* llgfr %r1,%b3: %r1 = (u32) index */
|
||||||
EMIT6_DISP_LH(0xeb000000, 0x000d, REG_1, BPF_REG_3, REG_0, 3);
|
EMIT4(0xb9160000, REG_1, BPF_REG_3);
|
||||||
|
/* sllg %r1,%r1,3: %r1 *= 8 */
|
||||||
|
EMIT6_DISP_LH(0xeb000000, 0x000d, REG_1, REG_1, REG_0, 3);
|
||||||
/* lg %r1,prog(%b2,%r1) */
|
/* lg %r1,prog(%b2,%r1) */
|
||||||
EMIT6_DISP_LH(0xe3000000, 0x0004, REG_1, BPF_REG_2,
|
EMIT6_DISP_LH(0xe3000000, 0x0004, REG_1, BPF_REG_2,
|
||||||
REG_1, offsetof(struct bpf_array, ptrs));
|
REG_1, offsetof(struct bpf_array, ptrs));
|
||||||
|
|
|
@ -34,10 +34,13 @@ static inline void time_travel_set_time(unsigned long long ns)
|
||||||
time_travel_time = ns;
|
time_travel_time = ns;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void time_travel_set_timer(enum time_travel_timer_mode mode,
|
static inline void time_travel_set_timer_mode(enum time_travel_timer_mode mode)
|
||||||
unsigned long long expiry)
|
|
||||||
{
|
{
|
||||||
time_travel_timer_mode = mode;
|
time_travel_timer_mode = mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void time_travel_set_timer_expiry(unsigned long long expiry)
|
||||||
|
{
|
||||||
time_travel_timer_expiry = expiry;
|
time_travel_timer_expiry = expiry;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -50,8 +53,11 @@ static inline void time_travel_set_time(unsigned long long ns)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void time_travel_set_timer(enum time_travel_timer_mode mode,
|
static inline void time_travel_set_timer_mode(enum time_travel_timer_mode mode)
|
||||||
unsigned long long expiry)
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void time_travel_set_timer_expiry(unsigned long long expiry)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ static void time_travel_sleep(unsigned long long duration)
|
||||||
if (time_travel_timer_mode != TT_TMR_DISABLED ||
|
if (time_travel_timer_mode != TT_TMR_DISABLED ||
|
||||||
time_travel_timer_expiry < next) {
|
time_travel_timer_expiry < next) {
|
||||||
if (time_travel_timer_mode == TT_TMR_ONESHOT)
|
if (time_travel_timer_mode == TT_TMR_ONESHOT)
|
||||||
time_travel_set_timer(TT_TMR_DISABLED, 0);
|
time_travel_set_timer_mode(TT_TMR_DISABLED);
|
||||||
/*
|
/*
|
||||||
* time_travel_time will be adjusted in the timer
|
* time_travel_time will be adjusted in the timer
|
||||||
* IRQ handler so it works even when the signal
|
* IRQ handler so it works even when the signal
|
||||||
|
|
|
@ -50,7 +50,7 @@ void timer_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
|
||||||
static int itimer_shutdown(struct clock_event_device *evt)
|
static int itimer_shutdown(struct clock_event_device *evt)
|
||||||
{
|
{
|
||||||
if (time_travel_mode != TT_MODE_OFF)
|
if (time_travel_mode != TT_MODE_OFF)
|
||||||
time_travel_set_timer(TT_TMR_DISABLED, 0);
|
time_travel_set_timer_mode(TT_TMR_DISABLED);
|
||||||
|
|
||||||
if (time_travel_mode != TT_MODE_INFCPU)
|
if (time_travel_mode != TT_MODE_INFCPU)
|
||||||
os_timer_disable();
|
os_timer_disable();
|
||||||
|
@ -62,9 +62,10 @@ static int itimer_set_periodic(struct clock_event_device *evt)
|
||||||
{
|
{
|
||||||
unsigned long long interval = NSEC_PER_SEC / HZ;
|
unsigned long long interval = NSEC_PER_SEC / HZ;
|
||||||
|
|
||||||
if (time_travel_mode != TT_MODE_OFF)
|
if (time_travel_mode != TT_MODE_OFF) {
|
||||||
time_travel_set_timer(TT_TMR_PERIODIC,
|
time_travel_set_timer_mode(TT_TMR_PERIODIC);
|
||||||
time_travel_time + interval);
|
time_travel_set_timer_expiry(time_travel_time + interval);
|
||||||
|
}
|
||||||
|
|
||||||
if (time_travel_mode != TT_MODE_INFCPU)
|
if (time_travel_mode != TT_MODE_INFCPU)
|
||||||
os_timer_set_interval(interval);
|
os_timer_set_interval(interval);
|
||||||
|
@ -77,9 +78,10 @@ static int itimer_next_event(unsigned long delta,
|
||||||
{
|
{
|
||||||
delta += 1;
|
delta += 1;
|
||||||
|
|
||||||
if (time_travel_mode != TT_MODE_OFF)
|
if (time_travel_mode != TT_MODE_OFF) {
|
||||||
time_travel_set_timer(TT_TMR_ONESHOT,
|
time_travel_set_timer_mode(TT_TMR_ONESHOT);
|
||||||
time_travel_time + delta);
|
time_travel_set_timer_expiry(time_travel_time + delta);
|
||||||
|
}
|
||||||
|
|
||||||
if (time_travel_mode != TT_MODE_INFCPU)
|
if (time_travel_mode != TT_MODE_INFCPU)
|
||||||
return os_timer_one_shot(delta);
|
return os_timer_one_shot(delta);
|
||||||
|
|
|
@ -38,6 +38,7 @@ REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
|
||||||
|
|
||||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding)
|
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding)
|
||||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
|
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
|
||||||
|
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member)
|
||||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4))
|
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4))
|
||||||
export REALMODE_CFLAGS
|
export REALMODE_CFLAGS
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,8 @@ static unsigned long find_trampoline_placement(void)
|
||||||
|
|
||||||
/* Find the first usable memory region under bios_start. */
|
/* Find the first usable memory region under bios_start. */
|
||||||
for (i = boot_params->e820_entries - 1; i >= 0; i--) {
|
for (i = boot_params->e820_entries - 1; i >= 0; i--) {
|
||||||
|
unsigned long new = bios_start;
|
||||||
|
|
||||||
entry = &boot_params->e820_table[i];
|
entry = &boot_params->e820_table[i];
|
||||||
|
|
||||||
/* Skip all entries above bios_start. */
|
/* Skip all entries above bios_start. */
|
||||||
|
@ -84,15 +86,20 @@ static unsigned long find_trampoline_placement(void)
|
||||||
|
|
||||||
/* Adjust bios_start to the end of the entry if needed. */
|
/* Adjust bios_start to the end of the entry if needed. */
|
||||||
if (bios_start > entry->addr + entry->size)
|
if (bios_start > entry->addr + entry->size)
|
||||||
bios_start = entry->addr + entry->size;
|
new = entry->addr + entry->size;
|
||||||
|
|
||||||
/* Keep bios_start page-aligned. */
|
/* Keep bios_start page-aligned. */
|
||||||
bios_start = round_down(bios_start, PAGE_SIZE);
|
new = round_down(new, PAGE_SIZE);
|
||||||
|
|
||||||
/* Skip the entry if it's too small. */
|
/* Skip the entry if it's too small. */
|
||||||
if (bios_start - TRAMPOLINE_32BIT_SIZE < entry->addr)
|
if (new - TRAMPOLINE_32BIT_SIZE < entry->addr)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* Protect against underflow. */
|
||||||
|
if (new - TRAMPOLINE_32BIT_SIZE > bios_start)
|
||||||
|
break;
|
||||||
|
|
||||||
|
bios_start = new;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -661,10 +661,17 @@ fail:
|
||||||
|
|
||||||
throttle = perf_event_overflow(event, &data, ®s);
|
throttle = perf_event_overflow(event, &data, ®s);
|
||||||
out:
|
out:
|
||||||
if (throttle)
|
if (throttle) {
|
||||||
perf_ibs_stop(event, 0);
|
perf_ibs_stop(event, 0);
|
||||||
else
|
} else {
|
||||||
perf_ibs_enable_event(perf_ibs, hwc, period >> 4);
|
period >>= 4;
|
||||||
|
|
||||||
|
if ((ibs_caps & IBS_CAPS_RDWROPCNT) &&
|
||||||
|
(*config & IBS_OP_CNT_CTL))
|
||||||
|
period |= *config & IBS_OP_CUR_CNT_RAND;
|
||||||
|
|
||||||
|
perf_ibs_enable_event(perf_ibs, hwc, period);
|
||||||
|
}
|
||||||
|
|
||||||
perf_event_update_userpage(event);
|
perf_event_update_userpage(event);
|
||||||
|
|
||||||
|
|
|
@ -1236,7 +1236,7 @@ void x86_pmu_enable_event(struct perf_event *event)
|
||||||
* Add a single event to the PMU.
|
* Add a single event to the PMU.
|
||||||
*
|
*
|
||||||
* The event is added to the group of enabled events
|
* The event is added to the group of enabled events
|
||||||
* but only if it can be scehduled with existing events.
|
* but only if it can be scheduled with existing events.
|
||||||
*/
|
*/
|
||||||
static int x86_pmu_add(struct perf_event *event, int flags)
|
static int x86_pmu_add(struct perf_event *event, int flags)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3572,6 +3572,11 @@ static u64 bdw_limit_period(struct perf_event *event, u64 left)
|
||||||
return left;
|
return left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static u64 nhm_limit_period(struct perf_event *event, u64 left)
|
||||||
|
{
|
||||||
|
return max(left, 32ULL);
|
||||||
|
}
|
||||||
|
|
||||||
PMU_FORMAT_ATTR(event, "config:0-7" );
|
PMU_FORMAT_ATTR(event, "config:0-7" );
|
||||||
PMU_FORMAT_ATTR(umask, "config:8-15" );
|
PMU_FORMAT_ATTR(umask, "config:8-15" );
|
||||||
PMU_FORMAT_ATTR(edge, "config:18" );
|
PMU_FORMAT_ATTR(edge, "config:18" );
|
||||||
|
@ -4606,6 +4611,7 @@ __init int intel_pmu_init(void)
|
||||||
x86_pmu.pebs_constraints = intel_nehalem_pebs_event_constraints;
|
x86_pmu.pebs_constraints = intel_nehalem_pebs_event_constraints;
|
||||||
x86_pmu.enable_all = intel_pmu_nhm_enable_all;
|
x86_pmu.enable_all = intel_pmu_nhm_enable_all;
|
||||||
x86_pmu.extra_regs = intel_nehalem_extra_regs;
|
x86_pmu.extra_regs = intel_nehalem_extra_regs;
|
||||||
|
x86_pmu.limit_period = nhm_limit_period;
|
||||||
|
|
||||||
mem_attr = nhm_mem_events_attrs;
|
mem_attr = nhm_mem_events_attrs;
|
||||||
|
|
||||||
|
|
|
@ -37,12 +37,14 @@ static inline int fill_gva_list(u64 gva_list[], int offset,
|
||||||
* Lower 12 bits encode the number of additional
|
* Lower 12 bits encode the number of additional
|
||||||
* pages to flush (in addition to the 'cur' page).
|
* pages to flush (in addition to the 'cur' page).
|
||||||
*/
|
*/
|
||||||
if (diff >= HV_TLB_FLUSH_UNIT)
|
if (diff >= HV_TLB_FLUSH_UNIT) {
|
||||||
gva_list[gva_n] |= ~PAGE_MASK;
|
gva_list[gva_n] |= ~PAGE_MASK;
|
||||||
else if (diff)
|
|
||||||
gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT;
|
|
||||||
|
|
||||||
cur += HV_TLB_FLUSH_UNIT;
|
cur += HV_TLB_FLUSH_UNIT;
|
||||||
|
} else if (diff) {
|
||||||
|
gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT;
|
||||||
|
cur = end;
|
||||||
|
}
|
||||||
|
|
||||||
gva_n++;
|
gva_n++;
|
||||||
|
|
||||||
} while (cur < end);
|
} while (cur < end);
|
||||||
|
|
|
@ -59,7 +59,6 @@ static void sanitize_boot_params(struct boot_params *boot_params)
|
||||||
BOOT_PARAM_PRESERVE(apm_bios_info),
|
BOOT_PARAM_PRESERVE(apm_bios_info),
|
||||||
BOOT_PARAM_PRESERVE(tboot_addr),
|
BOOT_PARAM_PRESERVE(tboot_addr),
|
||||||
BOOT_PARAM_PRESERVE(ist_info),
|
BOOT_PARAM_PRESERVE(ist_info),
|
||||||
BOOT_PARAM_PRESERVE(acpi_rsdp_addr),
|
|
||||||
BOOT_PARAM_PRESERVE(hd0_info),
|
BOOT_PARAM_PRESERVE(hd0_info),
|
||||||
BOOT_PARAM_PRESERVE(hd1_info),
|
BOOT_PARAM_PRESERVE(hd1_info),
|
||||||
BOOT_PARAM_PRESERVE(sys_desc_table),
|
BOOT_PARAM_PRESERVE(sys_desc_table),
|
||||||
|
@ -71,6 +70,8 @@ static void sanitize_boot_params(struct boot_params *boot_params)
|
||||||
BOOT_PARAM_PRESERVE(eddbuf_entries),
|
BOOT_PARAM_PRESERVE(eddbuf_entries),
|
||||||
BOOT_PARAM_PRESERVE(edd_mbr_sig_buf_entries),
|
BOOT_PARAM_PRESERVE(edd_mbr_sig_buf_entries),
|
||||||
BOOT_PARAM_PRESERVE(edd_mbr_sig_buffer),
|
BOOT_PARAM_PRESERVE(edd_mbr_sig_buffer),
|
||||||
|
BOOT_PARAM_PRESERVE(secure_boot),
|
||||||
|
BOOT_PARAM_PRESERVE(hdr),
|
||||||
BOOT_PARAM_PRESERVE(e820_table),
|
BOOT_PARAM_PRESERVE(e820_table),
|
||||||
BOOT_PARAM_PRESERVE(eddbuf),
|
BOOT_PARAM_PRESERVE(eddbuf),
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
|
#define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
extern void mcount(void);
|
|
||||||
extern atomic_t modifying_ftrace_code;
|
extern atomic_t modifying_ftrace_code;
|
||||||
extern void __fentry__(void);
|
extern void __fentry__(void);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,21 @@
|
||||||
* While adding a new CPUID for a new microarchitecture, add a new
|
* While adding a new CPUID for a new microarchitecture, add a new
|
||||||
* group to keep logically sorted out in chronological order. Within
|
* group to keep logically sorted out in chronological order. Within
|
||||||
* that group keep the CPUID for the variants sorted by model number.
|
* that group keep the CPUID for the variants sorted by model number.
|
||||||
|
*
|
||||||
|
* The defined symbol names have the following form:
|
||||||
|
* INTEL_FAM6{OPTFAMILY}_{MICROARCH}{OPTDIFF}
|
||||||
|
* where:
|
||||||
|
* OPTFAMILY Describes the family of CPUs that this belongs to. Default
|
||||||
|
* is assumed to be "_CORE" (and should be omitted). Other values
|
||||||
|
* currently in use are _ATOM and _XEON_PHI
|
||||||
|
* MICROARCH Is the code name for the micro-architecture for this core.
|
||||||
|
* N.B. Not the platform name.
|
||||||
|
* OPTDIFF If needed, a short string to differentiate by market segment.
|
||||||
|
* Exact strings here will vary over time. _DESKTOP, _MOBILE, and
|
||||||
|
* _X (short for Xeon server) should be used when they are
|
||||||
|
* appropriate.
|
||||||
|
*
|
||||||
|
* The #define line may optionally include a comment including platform names.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define INTEL_FAM6_CORE_YONAH 0x0E
|
#define INTEL_FAM6_CORE_YONAH 0x0E
|
||||||
|
|
|
@ -381,6 +381,7 @@
|
||||||
#define MSR_AMD64_PATCH_LEVEL 0x0000008b
|
#define MSR_AMD64_PATCH_LEVEL 0x0000008b
|
||||||
#define MSR_AMD64_TSC_RATIO 0xc0000104
|
#define MSR_AMD64_TSC_RATIO 0xc0000104
|
||||||
#define MSR_AMD64_NB_CFG 0xc001001f
|
#define MSR_AMD64_NB_CFG 0xc001001f
|
||||||
|
#define MSR_AMD64_CPUID_FN_1 0xc0011004
|
||||||
#define MSR_AMD64_PATCH_LOADER 0xc0010020
|
#define MSR_AMD64_PATCH_LOADER 0xc0010020
|
||||||
#define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140
|
#define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140
|
||||||
#define MSR_AMD64_OSVW_STATUS 0xc0010141
|
#define MSR_AMD64_OSVW_STATUS 0xc0010141
|
||||||
|
|
|
@ -192,7 +192,7 @@
|
||||||
" lfence;\n" \
|
" lfence;\n" \
|
||||||
" jmp 902b;\n" \
|
" jmp 902b;\n" \
|
||||||
" .align 16\n" \
|
" .align 16\n" \
|
||||||
"903: addl $4, %%esp;\n" \
|
"903: lea 4(%%esp), %%esp;\n" \
|
||||||
" pushl %[thunk_target];\n" \
|
" pushl %[thunk_target];\n" \
|
||||||
" ret;\n" \
|
" ret;\n" \
|
||||||
" .align 16\n" \
|
" .align 16\n" \
|
||||||
|
|
|
@ -252,16 +252,20 @@ struct pebs_lbr {
|
||||||
#define IBSCTL_LVT_OFFSET_VALID (1ULL<<8)
|
#define IBSCTL_LVT_OFFSET_VALID (1ULL<<8)
|
||||||
#define IBSCTL_LVT_OFFSET_MASK 0x0F
|
#define IBSCTL_LVT_OFFSET_MASK 0x0F
|
||||||
|
|
||||||
/* ibs fetch bits/masks */
|
/* IBS fetch bits/masks */
|
||||||
#define IBS_FETCH_RAND_EN (1ULL<<57)
|
#define IBS_FETCH_RAND_EN (1ULL<<57)
|
||||||
#define IBS_FETCH_VAL (1ULL<<49)
|
#define IBS_FETCH_VAL (1ULL<<49)
|
||||||
#define IBS_FETCH_ENABLE (1ULL<<48)
|
#define IBS_FETCH_ENABLE (1ULL<<48)
|
||||||
#define IBS_FETCH_CNT 0xFFFF0000ULL
|
#define IBS_FETCH_CNT 0xFFFF0000ULL
|
||||||
#define IBS_FETCH_MAX_CNT 0x0000FFFFULL
|
#define IBS_FETCH_MAX_CNT 0x0000FFFFULL
|
||||||
|
|
||||||
/* ibs op bits/masks */
|
/*
|
||||||
/* lower 4 bits of the current count are ignored: */
|
* IBS op bits/masks
|
||||||
#define IBS_OP_CUR_CNT (0xFFFF0ULL<<32)
|
* The lower 7 bits of the current count are random bits
|
||||||
|
* preloaded by hardware and ignored in software
|
||||||
|
*/
|
||||||
|
#define IBS_OP_CUR_CNT (0xFFF80ULL<<32)
|
||||||
|
#define IBS_OP_CUR_CNT_RAND (0x0007FULL<<32)
|
||||||
#define IBS_OP_CNT_CTL (1ULL<<19)
|
#define IBS_OP_CNT_CTL (1ULL<<19)
|
||||||
#define IBS_OP_VAL (1ULL<<18)
|
#define IBS_OP_VAL (1ULL<<18)
|
||||||
#define IBS_OP_ENABLE (1ULL<<17)
|
#define IBS_OP_ENABLE (1ULL<<17)
|
||||||
|
|
|
@ -444,8 +444,10 @@ __pu_label: \
|
||||||
({ \
|
({ \
|
||||||
int __gu_err; \
|
int __gu_err; \
|
||||||
__inttype(*(ptr)) __gu_val; \
|
__inttype(*(ptr)) __gu_val; \
|
||||||
|
__typeof__(ptr) __gu_ptr = (ptr); \
|
||||||
|
__typeof__(size) __gu_size = (size); \
|
||||||
__uaccess_begin_nospec(); \
|
__uaccess_begin_nospec(); \
|
||||||
__get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
|
__get_user_size(__gu_val, __gu_ptr, __gu_size, __gu_err, -EFAULT); \
|
||||||
__uaccess_end(); \
|
__uaccess_end(); \
|
||||||
(x) = (__force __typeof__(*(ptr)))__gu_val; \
|
(x) = (__force __typeof__(*(ptr)))__gu_val; \
|
||||||
__builtin_expect(__gu_err, 0); \
|
__builtin_expect(__gu_err, 0); \
|
||||||
|
|
|
@ -722,7 +722,7 @@ static __initdata unsigned long lapic_cal_pm1, lapic_cal_pm2;
|
||||||
static __initdata unsigned long lapic_cal_j1, lapic_cal_j2;
|
static __initdata unsigned long lapic_cal_j1, lapic_cal_j2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Temporary interrupt handler.
|
* Temporary interrupt handler and polled calibration function.
|
||||||
*/
|
*/
|
||||||
static void __init lapic_cal_handler(struct clock_event_device *dev)
|
static void __init lapic_cal_handler(struct clock_event_device *dev)
|
||||||
{
|
{
|
||||||
|
@ -851,7 +851,8 @@ bool __init apic_needs_pit(void)
|
||||||
static int __init calibrate_APIC_clock(void)
|
static int __init calibrate_APIC_clock(void)
|
||||||
{
|
{
|
||||||
struct clock_event_device *levt = this_cpu_ptr(&lapic_events);
|
struct clock_event_device *levt = this_cpu_ptr(&lapic_events);
|
||||||
void (*real_handler)(struct clock_event_device *dev);
|
u64 tsc_perj = 0, tsc_start = 0;
|
||||||
|
unsigned long jif_start;
|
||||||
unsigned long deltaj;
|
unsigned long deltaj;
|
||||||
long delta, deltatsc;
|
long delta, deltatsc;
|
||||||
int pm_referenced = 0;
|
int pm_referenced = 0;
|
||||||
|
@ -878,29 +879,65 @@ static int __init calibrate_APIC_clock(void)
|
||||||
apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n"
|
apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n"
|
||||||
"calibrating APIC timer ...\n");
|
"calibrating APIC timer ...\n");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* There are platforms w/o global clockevent devices. Instead of
|
||||||
|
* making the calibration conditional on that, use a polling based
|
||||||
|
* approach everywhere.
|
||||||
|
*/
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
|
|
||||||
/* Replace the global interrupt handler */
|
|
||||||
real_handler = global_clock_event->event_handler;
|
|
||||||
global_clock_event->event_handler = lapic_cal_handler;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup the APIC counter to maximum. There is no way the lapic
|
* Setup the APIC counter to maximum. There is no way the lapic
|
||||||
* can underflow in the 100ms detection time frame
|
* can underflow in the 100ms detection time frame
|
||||||
*/
|
*/
|
||||||
__setup_APIC_LVTT(0xffffffff, 0, 0);
|
__setup_APIC_LVTT(0xffffffff, 0, 0);
|
||||||
|
|
||||||
/* Let the interrupts run */
|
/*
|
||||||
|
* Methods to terminate the calibration loop:
|
||||||
|
* 1) Global clockevent if available (jiffies)
|
||||||
|
* 2) TSC if available and frequency is known
|
||||||
|
*/
|
||||||
|
jif_start = READ_ONCE(jiffies);
|
||||||
|
|
||||||
|
if (tsc_khz) {
|
||||||
|
tsc_start = rdtsc();
|
||||||
|
tsc_perj = div_u64((u64)tsc_khz * 1000, HZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable interrupts so the tick can fire, if a global
|
||||||
|
* clockevent device is available
|
||||||
|
*/
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
|
|
||||||
while (lapic_cal_loops <= LAPIC_CAL_LOOPS)
|
while (lapic_cal_loops <= LAPIC_CAL_LOOPS) {
|
||||||
|
/* Wait for a tick to elapse */
|
||||||
|
while (1) {
|
||||||
|
if (tsc_khz) {
|
||||||
|
u64 tsc_now = rdtsc();
|
||||||
|
if ((tsc_now - tsc_start) >= tsc_perj) {
|
||||||
|
tsc_start += tsc_perj;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
unsigned long jif_now = READ_ONCE(jiffies);
|
||||||
|
|
||||||
|
if (time_after(jif_now, jif_start)) {
|
||||||
|
jif_start = jif_now;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Invoke the calibration routine */
|
||||||
|
local_irq_disable();
|
||||||
|
lapic_cal_handler(NULL);
|
||||||
|
local_irq_enable();
|
||||||
|
}
|
||||||
|
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
|
|
||||||
/* Restore the real event handler */
|
|
||||||
global_clock_event->event_handler = real_handler;
|
|
||||||
|
|
||||||
/* Build delta t1-t2 as apic timer counts down */
|
/* Build delta t1-t2 as apic timer counts down */
|
||||||
delta = lapic_cal_t1 - lapic_cal_t2;
|
delta = lapic_cal_t1 - lapic_cal_t2;
|
||||||
apic_printk(APIC_VERBOSE, "... lapic delta = %ld\n", delta);
|
apic_printk(APIC_VERBOSE, "... lapic delta = %ld\n", delta);
|
||||||
|
@ -943,10 +980,11 @@ static int __init calibrate_APIC_clock(void)
|
||||||
levt->features &= ~CLOCK_EVT_FEAT_DUMMY;
|
levt->features &= ~CLOCK_EVT_FEAT_DUMMY;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PM timer calibration failed or not turned on
|
* PM timer calibration failed or not turned on so lets try APIC
|
||||||
* so lets try APIC timer based calibration
|
* timer based calibration, if a global clockevent device is
|
||||||
|
* available.
|
||||||
*/
|
*/
|
||||||
if (!pm_referenced) {
|
if (!pm_referenced && global_clock_event) {
|
||||||
apic_printk(APIC_VERBOSE, "... verify APIC timer\n");
|
apic_printk(APIC_VERBOSE, "... verify APIC timer\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -38,32 +38,12 @@ static int bigsmp_early_logical_apicid(int cpu)
|
||||||
return early_per_cpu(x86_cpu_to_apicid, cpu);
|
return early_per_cpu(x86_cpu_to_apicid, cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned long calculate_ldr(int cpu)
|
|
||||||
{
|
|
||||||
unsigned long val, id;
|
|
||||||
|
|
||||||
val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
|
|
||||||
id = per_cpu(x86_bios_cpu_apicid, cpu);
|
|
||||||
val |= SET_APIC_LOGICAL_ID(id);
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up the logical destination ID.
|
* bigsmp enables physical destination mode
|
||||||
*
|
* and doesn't use LDR and DFR
|
||||||
* Intel recommends to set DFR, LDR and TPR before enabling
|
|
||||||
* an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
|
|
||||||
* document number 292116). So here it goes...
|
|
||||||
*/
|
*/
|
||||||
static void bigsmp_init_apic_ldr(void)
|
static void bigsmp_init_apic_ldr(void)
|
||||||
{
|
{
|
||||||
unsigned long val;
|
|
||||||
int cpu = smp_processor_id();
|
|
||||||
|
|
||||||
apic_write(APIC_DFR, APIC_DFR_FLAT);
|
|
||||||
val = calculate_ldr(cpu);
|
|
||||||
apic_write(APIC_LDR, val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bigsmp_setup_apic_routing(void)
|
static void bigsmp_setup_apic_routing(void)
|
||||||
|
|
|
@ -2438,7 +2438,13 @@ unsigned int arch_dynirq_lower_bound(unsigned int from)
|
||||||
* dmar_alloc_hwirq() may be called before setup_IO_APIC(), so use
|
* dmar_alloc_hwirq() may be called before setup_IO_APIC(), so use
|
||||||
* gsi_top if ioapic_dynirq_base hasn't been initialized yet.
|
* gsi_top if ioapic_dynirq_base hasn't been initialized yet.
|
||||||
*/
|
*/
|
||||||
return ioapic_initialized ? ioapic_dynirq_base : gsi_top;
|
if (!ioapic_initialized)
|
||||||
|
return gsi_top;
|
||||||
|
/*
|
||||||
|
* For DT enabled machines ioapic_dynirq_base is irrelevant and not
|
||||||
|
* updated. So simply return @from if ioapic_dynirq_base == 0.
|
||||||
|
*/
|
||||||
|
return ioapic_dynirq_base ? : from;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
|
|
|
@ -804,6 +804,64 @@ static void init_amd_ln(struct cpuinfo_x86 *c)
|
||||||
msr_set_bit(MSR_AMD64_DE_CFG, 31);
|
msr_set_bit(MSR_AMD64_DE_CFG, 31);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool rdrand_force;
|
||||||
|
|
||||||
|
static int __init rdrand_cmdline(char *str)
|
||||||
|
{
|
||||||
|
if (!str)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (!strcmp(str, "force"))
|
||||||
|
rdrand_force = true;
|
||||||
|
else
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
early_param("rdrand", rdrand_cmdline);
|
||||||
|
|
||||||
|
static void clear_rdrand_cpuid_bit(struct cpuinfo_x86 *c)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Saving of the MSR used to hide the RDRAND support during
|
||||||
|
* suspend/resume is done by arch/x86/power/cpu.c, which is
|
||||||
|
* dependent on CONFIG_PM_SLEEP.
|
||||||
|
*/
|
||||||
|
if (!IS_ENABLED(CONFIG_PM_SLEEP))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The nordrand option can clear X86_FEATURE_RDRAND, so check for
|
||||||
|
* RDRAND support using the CPUID function directly.
|
||||||
|
*/
|
||||||
|
if (!(cpuid_ecx(1) & BIT(30)) || rdrand_force)
|
||||||
|
return;
|
||||||
|
|
||||||
|
msr_clear_bit(MSR_AMD64_CPUID_FN_1, 62);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Verify that the CPUID change has occurred in case the kernel is
|
||||||
|
* running virtualized and the hypervisor doesn't support the MSR.
|
||||||
|
*/
|
||||||
|
if (cpuid_ecx(1) & BIT(30)) {
|
||||||
|
pr_info_once("BIOS may not properly restore RDRAND after suspend, but hypervisor does not support hiding RDRAND via CPUID.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
clear_cpu_cap(c, X86_FEATURE_RDRAND);
|
||||||
|
pr_info_once("BIOS may not properly restore RDRAND after suspend, hiding RDRAND via CPUID. Use rdrand=force to reenable.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void init_amd_jg(struct cpuinfo_x86 *c)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Some BIOS implementations do not restore proper RDRAND support
|
||||||
|
* across suspend and resume. Check on whether to hide the RDRAND
|
||||||
|
* instruction support via CPUID.
|
||||||
|
*/
|
||||||
|
clear_rdrand_cpuid_bit(c);
|
||||||
|
}
|
||||||
|
|
||||||
static void init_amd_bd(struct cpuinfo_x86 *c)
|
static void init_amd_bd(struct cpuinfo_x86 *c)
|
||||||
{
|
{
|
||||||
u64 value;
|
u64 value;
|
||||||
|
@ -818,6 +876,13 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
|
||||||
wrmsrl_safe(MSR_F15H_IC_CFG, value);
|
wrmsrl_safe(MSR_F15H_IC_CFG, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some BIOS implementations do not restore proper RDRAND support
|
||||||
|
* across suspend and resume. Check on whether to hide the RDRAND
|
||||||
|
* instruction support via CPUID.
|
||||||
|
*/
|
||||||
|
clear_rdrand_cpuid_bit(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_amd_zn(struct cpuinfo_x86 *c)
|
static void init_amd_zn(struct cpuinfo_x86 *c)
|
||||||
|
@ -860,6 +925,7 @@ static void init_amd(struct cpuinfo_x86 *c)
|
||||||
case 0x10: init_amd_gh(c); break;
|
case 0x10: init_amd_gh(c); break;
|
||||||
case 0x12: init_amd_ln(c); break;
|
case 0x12: init_amd_ln(c); break;
|
||||||
case 0x15: init_amd_bd(c); break;
|
case 0x15: init_amd_bd(c); break;
|
||||||
|
case 0x16: init_amd_jg(c); break;
|
||||||
case 0x17: init_amd_zn(c); break;
|
case 0x17: init_amd_zn(c); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -508,9 +508,12 @@ struct uprobe_xol_ops {
|
||||||
void (*abort)(struct arch_uprobe *, struct pt_regs *);
|
void (*abort)(struct arch_uprobe *, struct pt_regs *);
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline int sizeof_long(void)
|
static inline int sizeof_long(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
return in_ia32_syscall() ? 4 : 8;
|
/*
|
||||||
|
* Check registers for mode as in_xxx_syscall() does not apply here.
|
||||||
|
*/
|
||||||
|
return user_64bit_mode(regs) ? 8 : 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int default_pre_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
static int default_pre_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||||
|
@ -521,9 +524,9 @@ static int default_pre_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||||
|
|
||||||
static int emulate_push_stack(struct pt_regs *regs, unsigned long val)
|
static int emulate_push_stack(struct pt_regs *regs, unsigned long val)
|
||||||
{
|
{
|
||||||
unsigned long new_sp = regs->sp - sizeof_long();
|
unsigned long new_sp = regs->sp - sizeof_long(regs);
|
||||||
|
|
||||||
if (copy_to_user((void __user *)new_sp, &val, sizeof_long()))
|
if (copy_to_user((void __user *)new_sp, &val, sizeof_long(regs)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
regs->sp = new_sp;
|
regs->sp = new_sp;
|
||||||
|
@ -556,7 +559,7 @@ static int default_post_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs
|
||||||
long correction = utask->vaddr - utask->xol_vaddr;
|
long correction = utask->vaddr - utask->xol_vaddr;
|
||||||
regs->ip += correction;
|
regs->ip += correction;
|
||||||
} else if (auprobe->defparam.fixups & UPROBE_FIX_CALL) {
|
} else if (auprobe->defparam.fixups & UPROBE_FIX_CALL) {
|
||||||
regs->sp += sizeof_long(); /* Pop incorrect return address */
|
regs->sp += sizeof_long(regs); /* Pop incorrect return address */
|
||||||
if (emulate_push_stack(regs, utask->vaddr + auprobe->defparam.ilen))
|
if (emulate_push_stack(regs, utask->vaddr + auprobe->defparam.ilen))
|
||||||
return -ERESTART;
|
return -ERESTART;
|
||||||
}
|
}
|
||||||
|
@ -675,7 +678,7 @@ static int branch_post_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||||
* "call" insn was executed out-of-line. Just restore ->sp and restart.
|
* "call" insn was executed out-of-line. Just restore ->sp and restart.
|
||||||
* We could also restore ->ip and try to call branch_emulate_op() again.
|
* We could also restore ->ip and try to call branch_emulate_op() again.
|
||||||
*/
|
*/
|
||||||
regs->sp += sizeof_long();
|
regs->sp += sizeof_long(regs);
|
||||||
return -ERESTART;
|
return -ERESTART;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1056,7 +1059,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||||
unsigned long
|
unsigned long
|
||||||
arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs)
|
arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
int rasize = sizeof_long(), nleft;
|
int rasize = sizeof_long(regs), nleft;
|
||||||
unsigned long orig_ret_vaddr = 0; /* clear high bits for 32-bit apps */
|
unsigned long orig_ret_vaddr = 0; /* clear high bits for 32-bit apps */
|
||||||
|
|
||||||
if (copy_from_user(&orig_ret_vaddr, (void __user *)regs->sp, rasize))
|
if (copy_from_user(&orig_ret_vaddr, (void __user *)regs->sp, rasize))
|
||||||
|
|
|
@ -1781,7 +1781,7 @@ int kvm_vm_ioctl_hv_eventfd(struct kvm *kvm, struct kvm_hyperv_eventfd *args)
|
||||||
int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid,
|
int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid,
|
||||||
struct kvm_cpuid_entry2 __user *entries)
|
struct kvm_cpuid_entry2 __user *entries)
|
||||||
{
|
{
|
||||||
uint16_t evmcs_ver = kvm_x86_ops->nested_get_evmcs_version(vcpu);
|
uint16_t evmcs_ver = 0;
|
||||||
struct kvm_cpuid_entry2 cpuid_entries[] = {
|
struct kvm_cpuid_entry2 cpuid_entries[] = {
|
||||||
{ .function = HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS },
|
{ .function = HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS },
|
||||||
{ .function = HYPERV_CPUID_INTERFACE },
|
{ .function = HYPERV_CPUID_INTERFACE },
|
||||||
|
@ -1793,6 +1793,9 @@ int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid,
|
||||||
};
|
};
|
||||||
int i, nent = ARRAY_SIZE(cpuid_entries);
|
int i, nent = ARRAY_SIZE(cpuid_entries);
|
||||||
|
|
||||||
|
if (kvm_x86_ops->nested_get_evmcs_version)
|
||||||
|
evmcs_ver = kvm_x86_ops->nested_get_evmcs_version(vcpu);
|
||||||
|
|
||||||
/* Skip NESTED_FEATURES if eVMCS is not supported */
|
/* Skip NESTED_FEATURES if eVMCS is not supported */
|
||||||
if (!evmcs_ver)
|
if (!evmcs_ver)
|
||||||
--nent;
|
--nent;
|
||||||
|
|
|
@ -216,6 +216,9 @@ static void recalculate_apic_map(struct kvm *kvm)
|
||||||
if (!apic_x2apic_mode(apic) && !new->phys_map[xapic_id])
|
if (!apic_x2apic_mode(apic) && !new->phys_map[xapic_id])
|
||||||
new->phys_map[xapic_id] = apic;
|
new->phys_map[xapic_id] = apic;
|
||||||
|
|
||||||
|
if (!kvm_apic_sw_enabled(apic))
|
||||||
|
continue;
|
||||||
|
|
||||||
ldr = kvm_lapic_get_reg(apic, APIC_LDR);
|
ldr = kvm_lapic_get_reg(apic, APIC_LDR);
|
||||||
|
|
||||||
if (apic_x2apic_mode(apic)) {
|
if (apic_x2apic_mode(apic)) {
|
||||||
|
@ -258,6 +261,8 @@ static inline void apic_set_spiv(struct kvm_lapic *apic, u32 val)
|
||||||
static_key_slow_dec_deferred(&apic_sw_disabled);
|
static_key_slow_dec_deferred(&apic_sw_disabled);
|
||||||
else
|
else
|
||||||
static_key_slow_inc(&apic_sw_disabled.key);
|
static_key_slow_inc(&apic_sw_disabled.key);
|
||||||
|
|
||||||
|
recalculate_apic_map(apic->vcpu->kvm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5653,38 +5653,7 @@ static void kvm_mmu_invalidate_zap_pages_in_memslot(struct kvm *kvm,
|
||||||
struct kvm_memory_slot *slot,
|
struct kvm_memory_slot *slot,
|
||||||
struct kvm_page_track_notifier_node *node)
|
struct kvm_page_track_notifier_node *node)
|
||||||
{
|
{
|
||||||
struct kvm_mmu_page *sp;
|
kvm_mmu_zap_all(kvm);
|
||||||
LIST_HEAD(invalid_list);
|
|
||||||
unsigned long i;
|
|
||||||
bool flush;
|
|
||||||
gfn_t gfn;
|
|
||||||
|
|
||||||
spin_lock(&kvm->mmu_lock);
|
|
||||||
|
|
||||||
if (list_empty(&kvm->arch.active_mmu_pages))
|
|
||||||
goto out_unlock;
|
|
||||||
|
|
||||||
flush = slot_handle_all_level(kvm, slot, kvm_zap_rmapp, false);
|
|
||||||
|
|
||||||
for (i = 0; i < slot->npages; i++) {
|
|
||||||
gfn = slot->base_gfn + i;
|
|
||||||
|
|
||||||
for_each_valid_sp(kvm, sp, gfn) {
|
|
||||||
if (sp->gfn != gfn)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
kvm_mmu_prepare_zap_page(kvm, sp, &invalid_list);
|
|
||||||
}
|
|
||||||
if (need_resched() || spin_needbreak(&kvm->mmu_lock)) {
|
|
||||||
kvm_mmu_remote_flush_or_zap(kvm, &invalid_list, flush);
|
|
||||||
flush = false;
|
|
||||||
cond_resched_lock(&kvm->mmu_lock);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
kvm_mmu_remote_flush_or_zap(kvm, &invalid_list, flush);
|
|
||||||
|
|
||||||
out_unlock:
|
|
||||||
spin_unlock(&kvm->mmu_lock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void kvm_mmu_init_vm(struct kvm *kvm)
|
void kvm_mmu_init_vm(struct kvm *kvm)
|
||||||
|
|
|
@ -1714,7 +1714,6 @@ static int avic_init_backing_page(struct kvm_vcpu *vcpu)
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
new_entry = READ_ONCE(*entry);
|
|
||||||
new_entry = __sme_set((page_to_phys(svm->avic_backing_page) &
|
new_entry = __sme_set((page_to_phys(svm->avic_backing_page) &
|
||||||
AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK) |
|
AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK) |
|
||||||
AVIC_PHYSICAL_ID_ENTRY_VALID_MASK);
|
AVIC_PHYSICAL_ID_ENTRY_VALID_MASK);
|
||||||
|
@ -7129,12 +7128,6 @@ failed:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint16_t nested_get_evmcs_version(struct kvm_vcpu *vcpu)
|
|
||||||
{
|
|
||||||
/* Not supported */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int nested_enable_evmcs(struct kvm_vcpu *vcpu,
|
static int nested_enable_evmcs(struct kvm_vcpu *vcpu,
|
||||||
uint16_t *vmcs_version)
|
uint16_t *vmcs_version)
|
||||||
{
|
{
|
||||||
|
@ -7333,7 +7326,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
|
||||||
.mem_enc_unreg_region = svm_unregister_enc_region,
|
.mem_enc_unreg_region = svm_unregister_enc_region,
|
||||||
|
|
||||||
.nested_enable_evmcs = nested_enable_evmcs,
|
.nested_enable_evmcs = nested_enable_evmcs,
|
||||||
.nested_get_evmcs_version = nested_get_evmcs_version,
|
.nested_get_evmcs_version = NULL,
|
||||||
|
|
||||||
.need_emulation_on_page_fault = svm_need_emulation_on_page_fault,
|
.need_emulation_on_page_fault = svm_need_emulation_on_page_fault,
|
||||||
};
|
};
|
||||||
|
|
|
@ -7797,6 +7797,7 @@ static struct kvm_x86_ops vmx_x86_ops __ro_after_init = {
|
||||||
.set_nested_state = NULL,
|
.set_nested_state = NULL,
|
||||||
.get_vmcs12_pages = NULL,
|
.get_vmcs12_pages = NULL,
|
||||||
.nested_enable_evmcs = NULL,
|
.nested_enable_evmcs = NULL,
|
||||||
|
.nested_get_evmcs_version = NULL,
|
||||||
.need_emulation_on_page_fault = vmx_need_emulation_on_page_fault,
|
.need_emulation_on_page_fault = vmx_need_emulation_on_page_fault,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6594,12 +6594,13 @@ restart:
|
||||||
unsigned long rflags = kvm_x86_ops->get_rflags(vcpu);
|
unsigned long rflags = kvm_x86_ops->get_rflags(vcpu);
|
||||||
toggle_interruptibility(vcpu, ctxt->interruptibility);
|
toggle_interruptibility(vcpu, ctxt->interruptibility);
|
||||||
vcpu->arch.emulate_regs_need_sync_to_vcpu = false;
|
vcpu->arch.emulate_regs_need_sync_to_vcpu = false;
|
||||||
|
if (!ctxt->have_exception ||
|
||||||
|
exception_type(ctxt->exception.vector) == EXCPT_TRAP) {
|
||||||
kvm_rip_write(vcpu, ctxt->eip);
|
kvm_rip_write(vcpu, ctxt->eip);
|
||||||
if (r == EMULATE_DONE && ctxt->tf)
|
if (r == EMULATE_DONE && ctxt->tf)
|
||||||
kvm_vcpu_do_singlestep(vcpu, &r);
|
kvm_vcpu_do_singlestep(vcpu, &r);
|
||||||
if (!ctxt->have_exception ||
|
|
||||||
exception_type(ctxt->exception.vector) == EXCPT_TRAP)
|
|
||||||
__kvm_set_rflags(vcpu, ctxt->eflags);
|
__kvm_set_rflags(vcpu, ctxt->eflags);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For STI, interrupts are shadowed; so KVM_REQ_EVENT will
|
* For STI, interrupts are shadowed; so KVM_REQ_EVENT will
|
||||||
|
|
|
@ -516,7 +516,7 @@ static inline void check_conflict(int warnlvl, pgprot_t prot, pgprotval_t val,
|
||||||
*/
|
*/
|
||||||
static inline pgprot_t static_protections(pgprot_t prot, unsigned long start,
|
static inline pgprot_t static_protections(pgprot_t prot, unsigned long start,
|
||||||
unsigned long pfn, unsigned long npg,
|
unsigned long pfn, unsigned long npg,
|
||||||
int warnlvl)
|
unsigned long lpsize, int warnlvl)
|
||||||
{
|
{
|
||||||
pgprotval_t forbidden, res;
|
pgprotval_t forbidden, res;
|
||||||
unsigned long end;
|
unsigned long end;
|
||||||
|
@ -535,9 +535,17 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long start,
|
||||||
check_conflict(warnlvl, prot, res, start, end, pfn, "Text NX");
|
check_conflict(warnlvl, prot, res, start, end, pfn, "Text NX");
|
||||||
forbidden = res;
|
forbidden = res;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Special case to preserve a large page. If the change spawns the
|
||||||
|
* full large page mapping then there is no point to split it
|
||||||
|
* up. Happens with ftrace and is going to be removed once ftrace
|
||||||
|
* switched to text_poke().
|
||||||
|
*/
|
||||||
|
if (lpsize != (npg * PAGE_SIZE) || (start & (lpsize - 1))) {
|
||||||
res = protect_kernel_text_ro(start, end);
|
res = protect_kernel_text_ro(start, end);
|
||||||
check_conflict(warnlvl, prot, res, start, end, pfn, "Text RO");
|
check_conflict(warnlvl, prot, res, start, end, pfn, "Text RO");
|
||||||
forbidden |= res;
|
forbidden |= res;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check the PFN directly */
|
/* Check the PFN directly */
|
||||||
res = protect_pci_bios(pfn, pfn + npg - 1);
|
res = protect_pci_bios(pfn, pfn + npg - 1);
|
||||||
|
@ -819,7 +827,7 @@ static int __should_split_large_page(pte_t *kpte, unsigned long address,
|
||||||
* extra conditional required here.
|
* extra conditional required here.
|
||||||
*/
|
*/
|
||||||
chk_prot = static_protections(old_prot, lpaddr, old_pfn, numpages,
|
chk_prot = static_protections(old_prot, lpaddr, old_pfn, numpages,
|
||||||
CPA_CONFLICT);
|
psize, CPA_CONFLICT);
|
||||||
|
|
||||||
if (WARN_ON_ONCE(pgprot_val(chk_prot) != pgprot_val(old_prot))) {
|
if (WARN_ON_ONCE(pgprot_val(chk_prot) != pgprot_val(old_prot))) {
|
||||||
/*
|
/*
|
||||||
|
@ -855,7 +863,7 @@ static int __should_split_large_page(pte_t *kpte, unsigned long address,
|
||||||
* protection requirement in the large page.
|
* protection requirement in the large page.
|
||||||
*/
|
*/
|
||||||
new_prot = static_protections(req_prot, lpaddr, old_pfn, numpages,
|
new_prot = static_protections(req_prot, lpaddr, old_pfn, numpages,
|
||||||
CPA_DETECT);
|
psize, CPA_DETECT);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there is a conflict, split the large page.
|
* If there is a conflict, split the large page.
|
||||||
|
@ -906,7 +914,8 @@ static void split_set_pte(struct cpa_data *cpa, pte_t *pte, unsigned long pfn,
|
||||||
if (!cpa->force_static_prot)
|
if (!cpa->force_static_prot)
|
||||||
goto set;
|
goto set;
|
||||||
|
|
||||||
prot = static_protections(ref_prot, address, pfn, npg, CPA_PROTECT);
|
/* Hand in lpsize = 0 to enforce the protection mechanism */
|
||||||
|
prot = static_protections(ref_prot, address, pfn, npg, 0, CPA_PROTECT);
|
||||||
|
|
||||||
if (pgprot_val(prot) == pgprot_val(ref_prot))
|
if (pgprot_val(prot) == pgprot_val(ref_prot))
|
||||||
goto set;
|
goto set;
|
||||||
|
@ -1503,7 +1512,8 @@ repeat:
|
||||||
pgprot_val(new_prot) |= pgprot_val(cpa->mask_set);
|
pgprot_val(new_prot) |= pgprot_val(cpa->mask_set);
|
||||||
|
|
||||||
cpa_inc_4k_install();
|
cpa_inc_4k_install();
|
||||||
new_prot = static_protections(new_prot, address, pfn, 1,
|
/* Hand in lpsize = 0 to enforce the protection mechanism */
|
||||||
|
new_prot = static_protections(new_prot, address, pfn, 1, 0,
|
||||||
CPA_PROTECT);
|
CPA_PROTECT);
|
||||||
|
|
||||||
new_prot = pgprot_clear_protnone_bits(new_prot);
|
new_prot = pgprot_clear_protnone_bits(new_prot);
|
||||||
|
|
|
@ -390,8 +390,9 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
||||||
|
|
||||||
emit_prologue(&prog, bpf_prog->aux->stack_depth,
|
emit_prologue(&prog, bpf_prog->aux->stack_depth,
|
||||||
bpf_prog_was_classic(bpf_prog));
|
bpf_prog_was_classic(bpf_prog));
|
||||||
|
addrs[0] = prog - temp;
|
||||||
|
|
||||||
for (i = 0; i < insn_cnt; i++, insn++) {
|
for (i = 1; i <= insn_cnt; i++, insn++) {
|
||||||
const s32 imm32 = insn->imm;
|
const s32 imm32 = insn->imm;
|
||||||
u32 dst_reg = insn->dst_reg;
|
u32 dst_reg = insn->dst_reg;
|
||||||
u32 src_reg = insn->src_reg;
|
u32 src_reg = insn->src_reg;
|
||||||
|
@ -1105,7 +1106,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
|
||||||
extra_pass = true;
|
extra_pass = true;
|
||||||
goto skip_init_addrs;
|
goto skip_init_addrs;
|
||||||
}
|
}
|
||||||
addrs = kmalloc_array(prog->len, sizeof(*addrs), GFP_KERNEL);
|
addrs = kmalloc_array(prog->len + 1, sizeof(*addrs), GFP_KERNEL);
|
||||||
if (!addrs) {
|
if (!addrs) {
|
||||||
prog = orig_prog;
|
prog = orig_prog;
|
||||||
goto out_addrs;
|
goto out_addrs;
|
||||||
|
@ -1115,7 +1116,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
|
||||||
* Before first pass, make a rough estimation of addrs[]
|
* Before first pass, make a rough estimation of addrs[]
|
||||||
* each BPF instruction is translated to less than 64 bytes
|
* each BPF instruction is translated to less than 64 bytes
|
||||||
*/
|
*/
|
||||||
for (proglen = 0, i = 0; i < prog->len; i++) {
|
for (proglen = 0, i = 0; i <= prog->len; i++) {
|
||||||
proglen += 64;
|
proglen += 64;
|
||||||
addrs[i] = proglen;
|
addrs[i] = proglen;
|
||||||
}
|
}
|
||||||
|
@ -1180,7 +1181,7 @@ out_image:
|
||||||
|
|
||||||
if (!image || !prog->is_func || extra_pass) {
|
if (!image || !prog->is_func || extra_pass) {
|
||||||
if (image)
|
if (image)
|
||||||
bpf_prog_fill_jited_linfo(prog, addrs);
|
bpf_prog_fill_jited_linfo(prog, addrs + 1);
|
||||||
out_addrs:
|
out_addrs:
|
||||||
kfree(addrs);
|
kfree(addrs);
|
||||||
kfree(jit_data);
|
kfree(jit_data);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <linux/perf_event.h>
|
#include <linux/perf_event.h>
|
||||||
#include <linux/tboot.h>
|
#include <linux/tboot.h>
|
||||||
|
#include <linux/dmi.h>
|
||||||
|
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
#include <asm/proto.h>
|
#include <asm/proto.h>
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
#include <asm/debugreg.h>
|
#include <asm/debugreg.h>
|
||||||
#include <asm/cpu.h>
|
#include <asm/cpu.h>
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
#include <linux/dmi.h>
|
#include <asm/cpu_device_id.h>
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
__visible unsigned long saved_context_ebx;
|
__visible unsigned long saved_context_ebx;
|
||||||
|
@ -397,15 +398,14 @@ static int __init bsp_pm_check_init(void)
|
||||||
|
|
||||||
core_initcall(bsp_pm_check_init);
|
core_initcall(bsp_pm_check_init);
|
||||||
|
|
||||||
static int msr_init_context(const u32 *msr_id, const int total_num)
|
static int msr_build_context(const u32 *msr_id, const int num)
|
||||||
{
|
{
|
||||||
int i = 0;
|
struct saved_msrs *saved_msrs = &saved_context.saved_msrs;
|
||||||
struct saved_msr *msr_array;
|
struct saved_msr *msr_array;
|
||||||
|
int total_num;
|
||||||
|
int i, j;
|
||||||
|
|
||||||
if (saved_context.saved_msrs.array || saved_context.saved_msrs.num > 0) {
|
total_num = saved_msrs->num + num;
|
||||||
pr_err("x86/pm: MSR quirk already applied, please check your DMI match table.\n");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
msr_array = kmalloc_array(total_num, sizeof(struct saved_msr), GFP_KERNEL);
|
msr_array = kmalloc_array(total_num, sizeof(struct saved_msr), GFP_KERNEL);
|
||||||
if (!msr_array) {
|
if (!msr_array) {
|
||||||
|
@ -413,19 +413,30 @@ static int msr_init_context(const u32 *msr_id, const int total_num)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < total_num; i++) {
|
if (saved_msrs->array) {
|
||||||
msr_array[i].info.msr_no = msr_id[i];
|
/*
|
||||||
|
* Multiple callbacks can invoke this function, so copy any
|
||||||
|
* MSR save requests from previous invocations.
|
||||||
|
*/
|
||||||
|
memcpy(msr_array, saved_msrs->array,
|
||||||
|
sizeof(struct saved_msr) * saved_msrs->num);
|
||||||
|
|
||||||
|
kfree(saved_msrs->array);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = saved_msrs->num, j = 0; i < total_num; i++, j++) {
|
||||||
|
msr_array[i].info.msr_no = msr_id[j];
|
||||||
msr_array[i].valid = false;
|
msr_array[i].valid = false;
|
||||||
msr_array[i].info.reg.q = 0;
|
msr_array[i].info.reg.q = 0;
|
||||||
}
|
}
|
||||||
saved_context.saved_msrs.num = total_num;
|
saved_msrs->num = total_num;
|
||||||
saved_context.saved_msrs.array = msr_array;
|
saved_msrs->array = msr_array;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following section is a quirk framework for problematic BIOSen:
|
* The following sections are a quirk framework for problematic BIOSen:
|
||||||
* Sometimes MSRs are modified by the BIOSen after suspended to
|
* Sometimes MSRs are modified by the BIOSen after suspended to
|
||||||
* RAM, this might cause unexpected behavior after wakeup.
|
* RAM, this might cause unexpected behavior after wakeup.
|
||||||
* Thus we save/restore these specified MSRs across suspend/resume
|
* Thus we save/restore these specified MSRs across suspend/resume
|
||||||
|
@ -440,7 +451,7 @@ static int msr_initialize_bdw(const struct dmi_system_id *d)
|
||||||
u32 bdw_msr_id[] = { MSR_IA32_THERM_CONTROL };
|
u32 bdw_msr_id[] = { MSR_IA32_THERM_CONTROL };
|
||||||
|
|
||||||
pr_info("x86/pm: %s detected, MSR saving is needed during suspending.\n", d->ident);
|
pr_info("x86/pm: %s detected, MSR saving is needed during suspending.\n", d->ident);
|
||||||
return msr_init_context(bdw_msr_id, ARRAY_SIZE(bdw_msr_id));
|
return msr_build_context(bdw_msr_id, ARRAY_SIZE(bdw_msr_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dmi_system_id msr_save_dmi_table[] = {
|
static const struct dmi_system_id msr_save_dmi_table[] = {
|
||||||
|
@ -455,9 +466,58 @@ static const struct dmi_system_id msr_save_dmi_table[] = {
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int msr_save_cpuid_features(const struct x86_cpu_id *c)
|
||||||
|
{
|
||||||
|
u32 cpuid_msr_id[] = {
|
||||||
|
MSR_AMD64_CPUID_FN_1,
|
||||||
|
};
|
||||||
|
|
||||||
|
pr_info("x86/pm: family %#hx cpu detected, MSR saving is needed during suspending.\n",
|
||||||
|
c->family);
|
||||||
|
|
||||||
|
return msr_build_context(cpuid_msr_id, ARRAY_SIZE(cpuid_msr_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct x86_cpu_id msr_save_cpu_table[] = {
|
||||||
|
{
|
||||||
|
.vendor = X86_VENDOR_AMD,
|
||||||
|
.family = 0x15,
|
||||||
|
.model = X86_MODEL_ANY,
|
||||||
|
.feature = X86_FEATURE_ANY,
|
||||||
|
.driver_data = (kernel_ulong_t)msr_save_cpuid_features,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.vendor = X86_VENDOR_AMD,
|
||||||
|
.family = 0x16,
|
||||||
|
.model = X86_MODEL_ANY,
|
||||||
|
.feature = X86_FEATURE_ANY,
|
||||||
|
.driver_data = (kernel_ulong_t)msr_save_cpuid_features,
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef int (*pm_cpu_match_t)(const struct x86_cpu_id *);
|
||||||
|
static int pm_cpu_check(const struct x86_cpu_id *c)
|
||||||
|
{
|
||||||
|
const struct x86_cpu_id *m;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
m = x86_match_cpu(msr_save_cpu_table);
|
||||||
|
if (m) {
|
||||||
|
pm_cpu_match_t fn;
|
||||||
|
|
||||||
|
fn = (pm_cpu_match_t)m->driver_data;
|
||||||
|
ret = fn(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static int pm_check_save_msr(void)
|
static int pm_check_save_msr(void)
|
||||||
{
|
{
|
||||||
dmi_check_system(msr_save_dmi_table);
|
dmi_check_system(msr_save_dmi_table);
|
||||||
|
pm_cpu_check(msr_save_cpu_table);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ config ATM_NICSTAR_USE_SUNI
|
||||||
make the card work).
|
make the card work).
|
||||||
|
|
||||||
config ATM_NICSTAR_USE_IDT77105
|
config ATM_NICSTAR_USE_IDT77105
|
||||||
bool "Use IDT77015 PHY driver (25Mbps)"
|
bool "Use IDT77105 PHY driver (25Mbps)"
|
||||||
depends on ATM_NICSTAR
|
depends on ATM_NICSTAR
|
||||||
help
|
help
|
||||||
Support for the PHYsical layer chip in ForeRunner LE25 cards. In
|
Support for the PHYsical layer chip in ForeRunner LE25 cards. In
|
||||||
|
|
|
@ -74,7 +74,7 @@ struct ht16k33_priv {
|
||||||
struct ht16k33_fbdev fbdev;
|
struct ht16k33_fbdev fbdev;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct fb_fix_screeninfo ht16k33_fb_fix = {
|
static const struct fb_fix_screeninfo ht16k33_fb_fix = {
|
||||||
.id = DRIVER_NAME,
|
.id = DRIVER_NAME,
|
||||||
.type = FB_TYPE_PACKED_PIXELS,
|
.type = FB_TYPE_PACKED_PIXELS,
|
||||||
.visual = FB_VISUAL_MONO10,
|
.visual = FB_VISUAL_MONO10,
|
||||||
|
@ -85,7 +85,7 @@ static struct fb_fix_screeninfo ht16k33_fb_fix = {
|
||||||
.accel = FB_ACCEL_NONE,
|
.accel = FB_ACCEL_NONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct fb_var_screeninfo ht16k33_fb_var = {
|
static const struct fb_var_screeninfo ht16k33_fb_var = {
|
||||||
.xres = HT16K33_MATRIX_LED_MAX_ROWS,
|
.xres = HT16K33_MATRIX_LED_MAX_ROWS,
|
||||||
.yres = HT16K33_MATRIX_LED_MAX_COLS,
|
.yres = HT16K33_MATRIX_LED_MAX_COLS,
|
||||||
.xres_virtual = HT16K33_MATRIX_LED_MAX_ROWS,
|
.xres_virtual = HT16K33_MATRIX_LED_MAX_ROWS,
|
||||||
|
|
|
@ -322,6 +322,8 @@ static int drbd_thread_setup(void *arg)
|
||||||
thi->name[0],
|
thi->name[0],
|
||||||
resource->name);
|
resource->name);
|
||||||
|
|
||||||
|
allow_kernel_signal(DRBD_SIGKILL);
|
||||||
|
allow_kernel_signal(SIGXCPU);
|
||||||
restart:
|
restart:
|
||||||
retval = thi->function(thi);
|
retval = thi->function(thi);
|
||||||
|
|
||||||
|
|
|
@ -3038,6 +3038,17 @@ again:
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case RBD_OBJ_READ_PARENT:
|
case RBD_OBJ_READ_PARENT:
|
||||||
|
/*
|
||||||
|
* The parent image is read only up to the overlap -- zero-fill
|
||||||
|
* from the overlap to the end of the request.
|
||||||
|
*/
|
||||||
|
if (!*result) {
|
||||||
|
u32 obj_overlap = rbd_obj_img_extents_bytes(obj_req);
|
||||||
|
|
||||||
|
if (obj_overlap < obj_req->ex.oe_len)
|
||||||
|
rbd_obj_zero_range(obj_req, obj_overlap,
|
||||||
|
obj_req->ex.oe_len - obj_overlap);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
BUG();
|
BUG();
|
||||||
|
|
|
@ -99,6 +99,27 @@ static int qca_send_reset(struct hci_dev *hdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
|
||||||
|
{
|
||||||
|
struct sk_buff *skb;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
bt_dev_dbg(hdev, "QCA pre shutdown cmd");
|
||||||
|
|
||||||
|
skb = __hci_cmd_sync(hdev, QCA_PRE_SHUTDOWN_CMD, 0,
|
||||||
|
NULL, HCI_INIT_TIMEOUT);
|
||||||
|
if (IS_ERR(skb)) {
|
||||||
|
err = PTR_ERR(skb);
|
||||||
|
bt_dev_err(hdev, "QCA preshutdown_cmd failed (%d)", err);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
kfree_skb(skb);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(qca_send_pre_shutdown_cmd);
|
||||||
|
|
||||||
static void qca_tlv_check_data(struct rome_config *config,
|
static void qca_tlv_check_data(struct rome_config *config,
|
||||||
const struct firmware *fw)
|
const struct firmware *fw)
|
||||||
{
|
{
|
||||||
|
@ -119,6 +140,7 @@ static void qca_tlv_check_data(struct rome_config *config,
|
||||||
BT_DBG("Length\t\t : %d bytes", length);
|
BT_DBG("Length\t\t : %d bytes", length);
|
||||||
|
|
||||||
config->dnld_mode = ROME_SKIP_EVT_NONE;
|
config->dnld_mode = ROME_SKIP_EVT_NONE;
|
||||||
|
config->dnld_type = ROME_SKIP_EVT_NONE;
|
||||||
|
|
||||||
switch (config->type) {
|
switch (config->type) {
|
||||||
case TLV_TYPE_PATCH:
|
case TLV_TYPE_PATCH:
|
||||||
|
@ -268,7 +290,7 @@ static int qca_inject_cmd_complete_event(struct hci_dev *hdev)
|
||||||
|
|
||||||
evt = skb_put(skb, sizeof(*evt));
|
evt = skb_put(skb, sizeof(*evt));
|
||||||
evt->ncmd = 1;
|
evt->ncmd = 1;
|
||||||
evt->opcode = QCA_HCI_CC_OPCODE;
|
evt->opcode = cpu_to_le16(QCA_HCI_CC_OPCODE);
|
||||||
|
|
||||||
skb_put_u8(skb, QCA_HCI_CC_SUCCESS);
|
skb_put_u8(skb, QCA_HCI_CC_SUCCESS);
|
||||||
|
|
||||||
|
@ -323,7 +345,7 @@ static int qca_download_firmware(struct hci_dev *hdev,
|
||||||
*/
|
*/
|
||||||
if (config->dnld_type == ROME_SKIP_EVT_VSE_CC ||
|
if (config->dnld_type == ROME_SKIP_EVT_VSE_CC ||
|
||||||
config->dnld_type == ROME_SKIP_EVT_VSE)
|
config->dnld_type == ROME_SKIP_EVT_VSE)
|
||||||
return qca_inject_cmd_complete_event(hdev);
|
ret = qca_inject_cmd_complete_event(hdev);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
release_firmware(fw);
|
release_firmware(fw);
|
||||||
|
@ -388,6 +410,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Give the controller some time to get ready to receive the NVM */
|
||||||
|
msleep(10);
|
||||||
|
|
||||||
/* Download NVM configuration */
|
/* Download NVM configuration */
|
||||||
config.type = TLV_TYPE_NVM;
|
config.type = TLV_TYPE_NVM;
|
||||||
if (firmware_name)
|
if (firmware_name)
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#define EDL_PATCH_TLV_REQ_CMD (0x1E)
|
#define EDL_PATCH_TLV_REQ_CMD (0x1E)
|
||||||
#define EDL_NVM_ACCESS_SET_REQ_CMD (0x01)
|
#define EDL_NVM_ACCESS_SET_REQ_CMD (0x01)
|
||||||
#define MAX_SIZE_PER_TLV_SEGMENT (243)
|
#define MAX_SIZE_PER_TLV_SEGMENT (243)
|
||||||
|
#define QCA_PRE_SHUTDOWN_CMD (0xFC08)
|
||||||
|
|
||||||
#define EDL_CMD_REQ_RES_EVT (0x00)
|
#define EDL_CMD_REQ_RES_EVT (0x00)
|
||||||
#define EDL_PATCH_VER_RES_EVT (0x19)
|
#define EDL_PATCH_VER_RES_EVT (0x19)
|
||||||
|
@ -135,6 +136,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
||||||
const char *firmware_name);
|
const char *firmware_name);
|
||||||
int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version);
|
int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version);
|
||||||
int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
|
int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
|
||||||
|
int qca_send_pre_shutdown_cmd(struct hci_dev *hdev);
|
||||||
static inline bool qca_is_wcn399x(enum qca_btsoc_type soc_type)
|
static inline bool qca_is_wcn399x(enum qca_btsoc_type soc_type)
|
||||||
{
|
{
|
||||||
return soc_type == QCA_WCN3990 || soc_type == QCA_WCN3998;
|
return soc_type == QCA_WCN3990 || soc_type == QCA_WCN3998;
|
||||||
|
@ -167,4 +169,9 @@ static inline bool qca_is_wcn399x(enum qca_btsoc_type soc_type)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
|
||||||
|
{
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2762,8 +2762,10 @@ static int btusb_mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
|
||||||
fw_size = fw->size;
|
fw_size = fw->size;
|
||||||
|
|
||||||
/* The size of patch header is 30 bytes, should be skip */
|
/* The size of patch header is 30 bytes, should be skip */
|
||||||
if (fw_size < 30)
|
if (fw_size < 30) {
|
||||||
|
err = -EINVAL;
|
||||||
goto err_release_fw;
|
goto err_release_fw;
|
||||||
|
}
|
||||||
|
|
||||||
fw_size -= 30;
|
fw_size -= 30;
|
||||||
fw_ptr += 30;
|
fw_ptr += 30;
|
||||||
|
|
|
@ -705,7 +705,7 @@ static void device_want_to_sleep(struct hci_uart *hu)
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct qca_data *qca = hu->priv;
|
struct qca_data *qca = hu->priv;
|
||||||
|
|
||||||
BT_DBG("hu %p want to sleep", hu);
|
BT_DBG("hu %p want to sleep in %d state", hu, qca->rx_ibs_state);
|
||||||
|
|
||||||
spin_lock_irqsave(&qca->hci_ibs_lock, flags);
|
spin_lock_irqsave(&qca->hci_ibs_lock, flags);
|
||||||
|
|
||||||
|
@ -720,7 +720,7 @@ static void device_want_to_sleep(struct hci_uart *hu)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HCI_IBS_RX_ASLEEP:
|
case HCI_IBS_RX_ASLEEP:
|
||||||
/* Fall through */
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* Any other state is illegal */
|
/* Any other state is illegal */
|
||||||
|
@ -912,7 +912,7 @@ static int qca_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
if (hdr->evt == HCI_EV_VENDOR)
|
if (hdr->evt == HCI_EV_VENDOR)
|
||||||
complete(&qca->drop_ev_comp);
|
complete(&qca->drop_ev_comp);
|
||||||
|
|
||||||
kfree(skb);
|
kfree_skb(skb);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1386,6 +1386,9 @@ static int qca_power_off(struct hci_dev *hdev)
|
||||||
{
|
{
|
||||||
struct hci_uart *hu = hci_get_drvdata(hdev);
|
struct hci_uart *hu = hci_get_drvdata(hdev);
|
||||||
|
|
||||||
|
/* Perform pre shutdown command */
|
||||||
|
qca_send_pre_shutdown_cmd(hdev);
|
||||||
|
|
||||||
qca_power_shutdown(hu);
|
qca_power_shutdown(hu);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -456,6 +456,17 @@ struct hisi_lpc_acpi_cell {
|
||||||
size_t pdata_size;
|
size_t pdata_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void hisi_lpc_acpi_remove(struct device *hostdev)
|
||||||
|
{
|
||||||
|
struct acpi_device *adev = ACPI_COMPANION(hostdev);
|
||||||
|
struct acpi_device *child;
|
||||||
|
|
||||||
|
device_for_each_child(hostdev, NULL, hisi_lpc_acpi_remove_subdev);
|
||||||
|
|
||||||
|
list_for_each_entry(child, &adev->children, node)
|
||||||
|
acpi_device_clear_enumerated(child);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* hisi_lpc_acpi_probe - probe children for ACPI FW
|
* hisi_lpc_acpi_probe - probe children for ACPI FW
|
||||||
* @hostdev: LPC host device pointer
|
* @hostdev: LPC host device pointer
|
||||||
|
@ -555,8 +566,7 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
device_for_each_child(hostdev, NULL,
|
hisi_lpc_acpi_remove(hostdev);
|
||||||
hisi_lpc_acpi_remove_subdev);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,6 +579,10 @@ static int hisi_lpc_acpi_probe(struct device *dev)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hisi_lpc_acpi_remove(struct device *hostdev)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif // CONFIG_ACPI
|
#endif // CONFIG_ACPI
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -606,24 +620,27 @@ static int hisi_lpc_probe(struct platform_device *pdev)
|
||||||
range->fwnode = dev->fwnode;
|
range->fwnode = dev->fwnode;
|
||||||
range->flags = LOGIC_PIO_INDIRECT;
|
range->flags = LOGIC_PIO_INDIRECT;
|
||||||
range->size = PIO_INDIRECT_SIZE;
|
range->size = PIO_INDIRECT_SIZE;
|
||||||
|
range->hostdata = lpcdev;
|
||||||
|
range->ops = &hisi_lpc_ops;
|
||||||
|
lpcdev->io_host = range;
|
||||||
|
|
||||||
ret = logic_pio_register_range(range);
|
ret = logic_pio_register_range(range);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "register IO range failed (%d)!\n", ret);
|
dev_err(dev, "register IO range failed (%d)!\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
lpcdev->io_host = range;
|
|
||||||
|
|
||||||
/* register the LPC host PIO resources */
|
/* register the LPC host PIO resources */
|
||||||
if (acpi_device)
|
if (acpi_device)
|
||||||
ret = hisi_lpc_acpi_probe(dev);
|
ret = hisi_lpc_acpi_probe(dev);
|
||||||
else
|
else
|
||||||
ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
|
ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
logic_pio_unregister_range(range);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
lpcdev->io_host->hostdata = lpcdev;
|
dev_set_drvdata(dev, lpcdev);
|
||||||
lpcdev->io_host->ops = &hisi_lpc_ops;
|
|
||||||
|
|
||||||
io_end = lpcdev->io_host->io_start + lpcdev->io_host->size;
|
io_end = lpcdev->io_host->io_start + lpcdev->io_host->size;
|
||||||
dev_info(dev, "registered range [%pa - %pa]\n",
|
dev_info(dev, "registered range [%pa - %pa]\n",
|
||||||
|
@ -632,6 +649,23 @@ static int hisi_lpc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int hisi_lpc_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct device *dev = &pdev->dev;
|
||||||
|
struct acpi_device *acpi_device = ACPI_COMPANION(dev);
|
||||||
|
struct hisi_lpc_dev *lpcdev = dev_get_drvdata(dev);
|
||||||
|
struct logic_pio_hwaddr *range = lpcdev->io_host;
|
||||||
|
|
||||||
|
if (acpi_device)
|
||||||
|
hisi_lpc_acpi_remove(dev);
|
||||||
|
else
|
||||||
|
of_platform_depopulate(dev);
|
||||||
|
|
||||||
|
logic_pio_unregister_range(range);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct of_device_id hisi_lpc_of_match[] = {
|
static const struct of_device_id hisi_lpc_of_match[] = {
|
||||||
{ .compatible = "hisilicon,hip06-lpc", },
|
{ .compatible = "hisilicon,hip06-lpc", },
|
||||||
{ .compatible = "hisilicon,hip07-lpc", },
|
{ .compatible = "hisilicon,hip07-lpc", },
|
||||||
|
@ -645,5 +679,6 @@ static struct platform_driver hisi_lpc_driver = {
|
||||||
.acpi_match_table = ACPI_PTR(hisi_lpc_acpi_match),
|
.acpi_match_table = ACPI_PTR(hisi_lpc_acpi_match),
|
||||||
},
|
},
|
||||||
.probe = hisi_lpc_probe,
|
.probe = hisi_lpc_probe,
|
||||||
|
.remove = hisi_lpc_remove,
|
||||||
};
|
};
|
||||||
builtin_platform_driver(hisi_lpc_driver);
|
builtin_platform_driver(hisi_lpc_driver);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue