Merge tag 'v5.0-rc5' into locking/core to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -72,6 +72,10 @@ ForEachMacros:
|
|||||||
- 'apei_estatus_for_each_section'
|
- 'apei_estatus_for_each_section'
|
||||||
- 'ata_for_each_dev'
|
- 'ata_for_each_dev'
|
||||||
- 'ata_for_each_link'
|
- 'ata_for_each_link'
|
||||||
|
- '__ata_qc_for_each'
|
||||||
|
- 'ata_qc_for_each'
|
||||||
|
- 'ata_qc_for_each_raw'
|
||||||
|
- 'ata_qc_for_each_with_internal'
|
||||||
- 'ax25_for_each'
|
- 'ax25_for_each'
|
||||||
- 'ax25_uid_for_each'
|
- 'ax25_uid_for_each'
|
||||||
- 'bio_for_each_integrity_vec'
|
- 'bio_for_each_integrity_vec'
|
||||||
@@ -85,6 +89,7 @@ ForEachMacros:
|
|||||||
- 'blk_queue_for_each_rl'
|
- 'blk_queue_for_each_rl'
|
||||||
- 'bond_for_each_slave'
|
- 'bond_for_each_slave'
|
||||||
- 'bond_for_each_slave_rcu'
|
- 'bond_for_each_slave_rcu'
|
||||||
|
- 'bpf_for_each_spilled_reg'
|
||||||
- 'btree_for_each_safe128'
|
- 'btree_for_each_safe128'
|
||||||
- 'btree_for_each_safe32'
|
- 'btree_for_each_safe32'
|
||||||
- 'btree_for_each_safe64'
|
- 'btree_for_each_safe64'
|
||||||
@@ -103,6 +108,8 @@ ForEachMacros:
|
|||||||
- '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_connector_for_each_possible_encoder'
|
||||||
- 'drm_for_each_connector_iter'
|
- 'drm_for_each_connector_iter'
|
||||||
- 'drm_for_each_crtc'
|
- 'drm_for_each_crtc'
|
||||||
- 'drm_for_each_encoder'
|
- 'drm_for_each_encoder'
|
||||||
@@ -121,11 +128,21 @@ ForEachMacros:
|
|||||||
- 'for_each_bio'
|
- 'for_each_bio'
|
||||||
- 'for_each_board_func_rsrc'
|
- 'for_each_board_func_rsrc'
|
||||||
- 'for_each_bvec'
|
- 'for_each_bvec'
|
||||||
|
- 'for_each_card_components'
|
||||||
|
- 'for_each_card_links'
|
||||||
|
- 'for_each_card_links_safe'
|
||||||
|
- 'for_each_card_prelinks'
|
||||||
|
- 'for_each_card_rtds'
|
||||||
|
- 'for_each_card_rtds_safe'
|
||||||
|
- 'for_each_cgroup_storage_type'
|
||||||
- 'for_each_child_of_node'
|
- 'for_each_child_of_node'
|
||||||
- 'for_each_clear_bit'
|
- 'for_each_clear_bit'
|
||||||
- 'for_each_clear_bit_from'
|
- 'for_each_clear_bit_from'
|
||||||
- 'for_each_cmsghdr'
|
- 'for_each_cmsghdr'
|
||||||
- 'for_each_compatible_node'
|
- 'for_each_compatible_node'
|
||||||
|
- 'for_each_component_dais'
|
||||||
|
- 'for_each_component_dais_safe'
|
||||||
|
- 'for_each_comp_order'
|
||||||
- 'for_each_console'
|
- 'for_each_console'
|
||||||
- 'for_each_cpu'
|
- 'for_each_cpu'
|
||||||
- 'for_each_cpu_and'
|
- 'for_each_cpu_and'
|
||||||
@@ -133,6 +150,10 @@ ForEachMacros:
|
|||||||
- 'for_each_cpu_wrap'
|
- 'for_each_cpu_wrap'
|
||||||
- 'for_each_dev_addr'
|
- 'for_each_dev_addr'
|
||||||
- 'for_each_dma_cap_mask'
|
- 'for_each_dma_cap_mask'
|
||||||
|
- 'for_each_dpcm_be'
|
||||||
|
- 'for_each_dpcm_be_rollback'
|
||||||
|
- 'for_each_dpcm_be_safe'
|
||||||
|
- 'for_each_dpcm_fe'
|
||||||
- 'for_each_drhd_unit'
|
- 'for_each_drhd_unit'
|
||||||
- 'for_each_dss_dev'
|
- 'for_each_dss_dev'
|
||||||
- 'for_each_efi_memory_desc'
|
- 'for_each_efi_memory_desc'
|
||||||
@@ -149,6 +170,7 @@ ForEachMacros:
|
|||||||
- 'for_each_iommu'
|
- 'for_each_iommu'
|
||||||
- 'for_each_ip_tunnel_rcu'
|
- 'for_each_ip_tunnel_rcu'
|
||||||
- 'for_each_irq_nr'
|
- 'for_each_irq_nr'
|
||||||
|
- 'for_each_link_codecs'
|
||||||
- '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'
|
||||||
@@ -160,6 +182,7 @@ ForEachMacros:
|
|||||||
- 'for_each_mem_range_rev'
|
- 'for_each_mem_range_rev'
|
||||||
- 'for_each_migratetype_order'
|
- 'for_each_migratetype_order'
|
||||||
- 'for_each_msi_entry'
|
- 'for_each_msi_entry'
|
||||||
|
- 'for_each_msi_entry_safe'
|
||||||
- 'for_each_net'
|
- 'for_each_net'
|
||||||
- 'for_each_netdev'
|
- 'for_each_netdev'
|
||||||
- 'for_each_netdev_continue'
|
- 'for_each_netdev_continue'
|
||||||
@@ -183,12 +206,14 @@ ForEachMacros:
|
|||||||
- 'for_each_node_with_property'
|
- 'for_each_node_with_property'
|
||||||
- 'for_each_of_allnodes'
|
- 'for_each_of_allnodes'
|
||||||
- 'for_each_of_allnodes_from'
|
- 'for_each_of_allnodes_from'
|
||||||
|
- 'for_each_of_cpu_node'
|
||||||
- 'for_each_of_pci_range'
|
- 'for_each_of_pci_range'
|
||||||
- 'for_each_old_connector_in_state'
|
- 'for_each_old_connector_in_state'
|
||||||
- 'for_each_old_crtc_in_state'
|
- 'for_each_old_crtc_in_state'
|
||||||
- 'for_each_oldnew_connector_in_state'
|
- 'for_each_oldnew_connector_in_state'
|
||||||
- 'for_each_oldnew_crtc_in_state'
|
- 'for_each_oldnew_crtc_in_state'
|
||||||
- 'for_each_oldnew_plane_in_state'
|
- 'for_each_oldnew_plane_in_state'
|
||||||
|
- 'for_each_oldnew_plane_in_state_reverse'
|
||||||
- 'for_each_oldnew_private_obj_in_state'
|
- 'for_each_oldnew_private_obj_in_state'
|
||||||
- 'for_each_old_plane_in_state'
|
- 'for_each_old_plane_in_state'
|
||||||
- 'for_each_old_private_obj_in_state'
|
- 'for_each_old_private_obj_in_state'
|
||||||
@@ -206,14 +231,17 @@ ForEachMacros:
|
|||||||
- 'for_each_process'
|
- 'for_each_process'
|
||||||
- 'for_each_process_thread'
|
- 'for_each_process_thread'
|
||||||
- 'for_each_property_of_node'
|
- 'for_each_property_of_node'
|
||||||
|
- 'for_each_registered_fb'
|
||||||
- 'for_each_reserved_mem_region'
|
- 'for_each_reserved_mem_region'
|
||||||
- 'for_each_resv_unavail_range'
|
- 'for_each_rtd_codec_dai'
|
||||||
|
- 'for_each_rtd_codec_dai_rollback'
|
||||||
- 'for_each_rtdcom'
|
- 'for_each_rtdcom'
|
||||||
- 'for_each_rtdcom_safe'
|
- 'for_each_rtdcom_safe'
|
||||||
- 'for_each_set_bit'
|
- 'for_each_set_bit'
|
||||||
- 'for_each_set_bit_from'
|
- 'for_each_set_bit_from'
|
||||||
- 'for_each_sg'
|
- 'for_each_sg'
|
||||||
- 'for_each_sg_page'
|
- 'for_each_sg_page'
|
||||||
|
- 'for_each_sibling_event'
|
||||||
- '__for_each_thread'
|
- '__for_each_thread'
|
||||||
- 'for_each_thread'
|
- 'for_each_thread'
|
||||||
- 'for_each_zone'
|
- 'for_each_zone'
|
||||||
@@ -251,6 +279,8 @@ ForEachMacros:
|
|||||||
- 'hlist_nulls_for_each_entry_from'
|
- 'hlist_nulls_for_each_entry_from'
|
||||||
- 'hlist_nulls_for_each_entry_rcu'
|
- 'hlist_nulls_for_each_entry_rcu'
|
||||||
- 'hlist_nulls_for_each_entry_safe'
|
- 'hlist_nulls_for_each_entry_safe'
|
||||||
|
- 'i3c_bus_for_each_i2cdev'
|
||||||
|
- 'i3c_bus_for_each_i3cdev'
|
||||||
- 'ide_host_for_each_port'
|
- 'ide_host_for_each_port'
|
||||||
- 'ide_port_for_each_dev'
|
- 'ide_port_for_each_dev'
|
||||||
- 'ide_port_for_each_present_dev'
|
- 'ide_port_for_each_present_dev'
|
||||||
@@ -267,11 +297,14 @@ ForEachMacros:
|
|||||||
- 'kvm_for_each_memslot'
|
- 'kvm_for_each_memslot'
|
||||||
- 'kvm_for_each_vcpu'
|
- 'kvm_for_each_vcpu'
|
||||||
- 'list_for_each'
|
- 'list_for_each'
|
||||||
|
- 'list_for_each_codec'
|
||||||
|
- 'list_for_each_codec_safe'
|
||||||
- 'list_for_each_entry'
|
- 'list_for_each_entry'
|
||||||
- 'list_for_each_entry_continue'
|
- 'list_for_each_entry_continue'
|
||||||
- 'list_for_each_entry_continue_rcu'
|
- 'list_for_each_entry_continue_rcu'
|
||||||
- 'list_for_each_entry_continue_reverse'
|
- 'list_for_each_entry_continue_reverse'
|
||||||
- 'list_for_each_entry_from'
|
- 'list_for_each_entry_from'
|
||||||
|
- 'list_for_each_entry_from_rcu'
|
||||||
- 'list_for_each_entry_from_reverse'
|
- 'list_for_each_entry_from_reverse'
|
||||||
- 'list_for_each_entry_lockless'
|
- 'list_for_each_entry_lockless'
|
||||||
- 'list_for_each_entry_rcu'
|
- 'list_for_each_entry_rcu'
|
||||||
@@ -291,6 +324,7 @@ 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'
|
||||||
|
- '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'
|
||||||
- 'netdev_for_each_lower_private_rcu'
|
- 'netdev_for_each_lower_private_rcu'
|
||||||
@@ -357,12 +391,14 @@ ForEachMacros:
|
|||||||
- 'sk_nulls_for_each'
|
- 'sk_nulls_for_each'
|
||||||
- 'sk_nulls_for_each_from'
|
- 'sk_nulls_for_each_from'
|
||||||
- 'sk_nulls_for_each_rcu'
|
- 'sk_nulls_for_each_rcu'
|
||||||
|
- 'snd_array_for_each'
|
||||||
- 'snd_pcm_group_for_each_entry'
|
- 'snd_pcm_group_for_each_entry'
|
||||||
- 'snd_soc_dapm_widget_for_each_path'
|
- 'snd_soc_dapm_widget_for_each_path'
|
||||||
- 'snd_soc_dapm_widget_for_each_path_safe'
|
- 'snd_soc_dapm_widget_for_each_path_safe'
|
||||||
- 'snd_soc_dapm_widget_for_each_sink_path'
|
- 'snd_soc_dapm_widget_for_each_sink_path'
|
||||||
- 'snd_soc_dapm_widget_for_each_source_path'
|
- 'snd_soc_dapm_widget_for_each_source_path'
|
||||||
- 'tb_property_for_each'
|
- 'tb_property_for_each'
|
||||||
|
- 'tcf_exts_for_each_action'
|
||||||
- 'udp_portaddr_for_each_entry'
|
- 'udp_portaddr_for_each_entry'
|
||||||
- 'udp_portaddr_for_each_entry_rcu'
|
- 'udp_portaddr_for_each_entry_rcu'
|
||||||
- 'usb_hub_for_each_child'
|
- 'usb_hub_for_each_child'
|
||||||
@@ -371,6 +407,11 @@ ForEachMacros:
|
|||||||
- 'v4l2_m2m_for_each_dst_buf_safe'
|
- 'v4l2_m2m_for_each_dst_buf_safe'
|
||||||
- 'v4l2_m2m_for_each_src_buf'
|
- 'v4l2_m2m_for_each_src_buf'
|
||||||
- 'v4l2_m2m_for_each_src_buf_safe'
|
- 'v4l2_m2m_for_each_src_buf_safe'
|
||||||
|
- 'virtio_device_for_each_vq'
|
||||||
|
- 'xa_for_each'
|
||||||
|
- 'xas_for_each'
|
||||||
|
- 'xas_for_each_conflict'
|
||||||
|
- 'xas_for_each_marked'
|
||||||
- 'zorro_for_each_dev'
|
- 'zorro_for_each_dev'
|
||||||
|
|
||||||
#IncludeBlocks: Preserve # Unknown to clang-format-5.0
|
#IncludeBlocks: Preserve # Unknown to clang-format-5.0
|
||||||
|
|||||||
@@ -108,12 +108,13 @@ some, but not all of the other indices changing.
|
|||||||
|
|
||||||
Sometimes you need to ensure that a subsequent call to :c:func:`xa_store`
|
Sometimes you need to ensure that a subsequent call to :c:func:`xa_store`
|
||||||
will not need to allocate memory. The :c:func:`xa_reserve` function
|
will not need to allocate memory. The :c:func:`xa_reserve` function
|
||||||
will store a reserved entry at the indicated index. Users of the normal
|
will store a reserved entry at the indicated index. Users of the
|
||||||
API will see this entry as containing ``NULL``. If you do not need to
|
normal API will see this entry as containing ``NULL``. If you do
|
||||||
use the reserved entry, you can call :c:func:`xa_release` to remove the
|
not need to use the reserved entry, you can call :c:func:`xa_release`
|
||||||
unused entry. If another user has stored to the entry in the meantime,
|
to remove the unused entry. If another user has stored to the entry
|
||||||
:c:func:`xa_release` will do nothing; if instead you want the entry to
|
in the meantime, :c:func:`xa_release` will do nothing; if instead you
|
||||||
become ``NULL``, you should use :c:func:`xa_erase`.
|
want the entry to become ``NULL``, you should use :c:func:`xa_erase`.
|
||||||
|
Using :c:func:`xa_insert` on a reserved entry will fail.
|
||||||
|
|
||||||
If all entries in the array are ``NULL``, the :c:func:`xa_empty` function
|
If all entries in the array are ``NULL``, the :c:func:`xa_empty` function
|
||||||
will return ``true``.
|
will return ``true``.
|
||||||
@@ -183,6 +184,8 @@ Takes xa_lock internally:
|
|||||||
* :c:func:`xa_store_bh`
|
* :c:func:`xa_store_bh`
|
||||||
* :c:func:`xa_store_irq`
|
* :c:func:`xa_store_irq`
|
||||||
* :c:func:`xa_insert`
|
* :c:func:`xa_insert`
|
||||||
|
* :c:func:`xa_insert_bh`
|
||||||
|
* :c:func:`xa_insert_irq`
|
||||||
* :c:func:`xa_erase`
|
* :c:func:`xa_erase`
|
||||||
* :c:func:`xa_erase_bh`
|
* :c:func:`xa_erase_bh`
|
||||||
* :c:func:`xa_erase_irq`
|
* :c:func:`xa_erase_irq`
|
||||||
|
|||||||
@@ -17,7 +17,11 @@ extra-y += $(DT_TMP_SCHEMA)
|
|||||||
quiet_cmd_mk_schema = SCHEMA $@
|
quiet_cmd_mk_schema = SCHEMA $@
|
||||||
cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^)
|
cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^)
|
||||||
|
|
||||||
DT_DOCS = $(shell cd $(srctree)/$(src) && find * -name '*.yaml')
|
DT_DOCS = $(shell \
|
||||||
|
cd $(srctree)/$(src) && \
|
||||||
|
find * \( -name '*.yaml' ! -name $(DT_TMP_SCHEMA) \) \
|
||||||
|
)
|
||||||
|
|
||||||
DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS))
|
DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS))
|
||||||
|
|
||||||
extra-y += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
|
extra-y += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ Example:
|
|||||||
reg = <0x04300000 0x20000>;
|
reg = <0x04300000 0x20000>;
|
||||||
reg-names = "kgsl_3d0_reg_memory";
|
reg-names = "kgsl_3d0_reg_memory";
|
||||||
interrupts = <GIC_SPI 80 0>;
|
interrupts = <GIC_SPI 80 0>;
|
||||||
interrupt-names = "kgsl_3d0_irq";
|
|
||||||
clock-names =
|
clock-names =
|
||||||
"core",
|
"core",
|
||||||
"iface",
|
"iface",
|
||||||
|
|||||||
@@ -4,14 +4,10 @@ Required properties:
|
|||||||
- compatible : "olpc,ap-sp"
|
- compatible : "olpc,ap-sp"
|
||||||
- reg : base address and length of SoC's WTM registers
|
- reg : base address and length of SoC's WTM registers
|
||||||
- interrupts : SP-AP interrupt
|
- interrupts : SP-AP interrupt
|
||||||
- clocks : phandle + clock-specifier for the clock that drives the WTM
|
|
||||||
- clock-names: should be "sp"
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
ap-sp@d4290000 {
|
ap-sp@d4290000 {
|
||||||
compatible = "olpc,ap-sp";
|
compatible = "olpc,ap-sp";
|
||||||
reg = <0xd4290000 0x1000>;
|
reg = <0xd4290000 0x1000>;
|
||||||
interrupts = <40>;
|
interrupts = <40>;
|
||||||
clocks = <&soc_clocks MMP2_CLK_SP>;
|
|
||||||
clock-names = "sp";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,6 +163,14 @@ C. Boot options
|
|||||||
be preserved until there actually is some text is output to the console.
|
be preserved until there actually is some text is output to the console.
|
||||||
This option causes fbcon to bind immediately to the fbdev device.
|
This option causes fbcon to bind immediately to the fbdev device.
|
||||||
|
|
||||||
|
7. fbcon=logo-pos:<location>
|
||||||
|
|
||||||
|
The only possible 'location' is 'center' (without quotes), and when
|
||||||
|
given, the bootup logo is moved from the default top-left corner
|
||||||
|
location to the center of the framebuffer. If more than one logo is
|
||||||
|
displayed due to multiple CPUs, the collected line of logos is moved
|
||||||
|
as a whole.
|
||||||
|
|
||||||
C. Attaching, Detaching and Unloading
|
C. Attaching, Detaching and Unloading
|
||||||
|
|
||||||
Before going on to how to attach, detach and unload the framebuffer console, an
|
Before going on to how to attach, detach and unload the framebuffer console, an
|
||||||
|
|||||||
@@ -11,19 +11,19 @@ Contents:
|
|||||||
batman-adv
|
batman-adv
|
||||||
can
|
can
|
||||||
can_ucan_protocol
|
can_ucan_protocol
|
||||||
dpaa2/index
|
device_drivers/freescale/dpaa2/index
|
||||||
e100
|
device_drivers/intel/e100
|
||||||
e1000
|
device_drivers/intel/e1000
|
||||||
e1000e
|
device_drivers/intel/e1000e
|
||||||
fm10k
|
device_drivers/intel/fm10k
|
||||||
igb
|
device_drivers/intel/igb
|
||||||
igbvf
|
device_drivers/intel/igbvf
|
||||||
ixgb
|
device_drivers/intel/ixgb
|
||||||
ixgbe
|
device_drivers/intel/ixgbe
|
||||||
ixgbevf
|
device_drivers/intel/ixgbevf
|
||||||
i40e
|
device_drivers/intel/i40e
|
||||||
iavf
|
device_drivers/intel/iavf
|
||||||
ice
|
device_drivers/intel/ice
|
||||||
kapi
|
kapi
|
||||||
z8530book
|
z8530book
|
||||||
msg_zerocopy
|
msg_zerocopy
|
||||||
|
|||||||
@@ -1000,51 +1000,6 @@ The kernel interface functions are as follows:
|
|||||||
size should be set when the call is begun. tx_total_len may not be less
|
size should be set when the call is begun. tx_total_len may not be less
|
||||||
than zero.
|
than zero.
|
||||||
|
|
||||||
(*) Check to see the completion state of a call so that the caller can assess
|
|
||||||
whether it needs to be retried.
|
|
||||||
|
|
||||||
enum rxrpc_call_completion {
|
|
||||||
RXRPC_CALL_SUCCEEDED,
|
|
||||||
RXRPC_CALL_REMOTELY_ABORTED,
|
|
||||||
RXRPC_CALL_LOCALLY_ABORTED,
|
|
||||||
RXRPC_CALL_LOCAL_ERROR,
|
|
||||||
RXRPC_CALL_NETWORK_ERROR,
|
|
||||||
};
|
|
||||||
|
|
||||||
int rxrpc_kernel_check_call(struct socket *sock, struct rxrpc_call *call,
|
|
||||||
enum rxrpc_call_completion *_compl,
|
|
||||||
u32 *_abort_code);
|
|
||||||
|
|
||||||
On return, -EINPROGRESS will be returned if the call is still ongoing; if
|
|
||||||
it is finished, *_compl will be set to indicate the manner of completion,
|
|
||||||
*_abort_code will be set to any abort code that occurred. 0 will be
|
|
||||||
returned on a successful completion, -ECONNABORTED will be returned if the
|
|
||||||
client failed due to a remote abort and anything else will return an
|
|
||||||
appropriate error code.
|
|
||||||
|
|
||||||
The caller should look at this information to decide if it's worth
|
|
||||||
retrying the call.
|
|
||||||
|
|
||||||
(*) Retry a client call.
|
|
||||||
|
|
||||||
int rxrpc_kernel_retry_call(struct socket *sock,
|
|
||||||
struct rxrpc_call *call,
|
|
||||||
struct sockaddr_rxrpc *srx,
|
|
||||||
struct key *key);
|
|
||||||
|
|
||||||
This attempts to partially reinitialise a call and submit it again while
|
|
||||||
reusing the original call's Tx queue to avoid the need to repackage and
|
|
||||||
re-encrypt the data to be sent. call indicates the call to retry, srx the
|
|
||||||
new address to send it to and key the encryption key to use for signing or
|
|
||||||
encrypting the packets.
|
|
||||||
|
|
||||||
For this to work, the first Tx data packet must still be in the transmit
|
|
||||||
queue, and currently this is only permitted for local and network errors
|
|
||||||
and the call must not have been aborted. Any partially constructed Tx
|
|
||||||
packet is left as is and can continue being filled afterwards.
|
|
||||||
|
|
||||||
It returns 0 if the call was requeued and an error otherwise.
|
|
||||||
|
|
||||||
(*) Get call RTT.
|
(*) Get call RTT.
|
||||||
|
|
||||||
u64 rxrpc_kernel_get_rtt(struct socket *sock, struct rxrpc_call *call);
|
u64 rxrpc_kernel_get_rtt(struct socket *sock, struct rxrpc_call *call);
|
||||||
|
|||||||
@@ -336,7 +336,26 @@ time client replies ACK, this socket will get another chance to move
|
|||||||
to the accept queue.
|
to the accept queue.
|
||||||
|
|
||||||
|
|
||||||
TCP Fast Open
|
* TcpEstabResets
|
||||||
|
Defined in `RFC1213 tcpEstabResets`_.
|
||||||
|
|
||||||
|
.. _RFC1213 tcpEstabResets: https://tools.ietf.org/html/rfc1213#page-48
|
||||||
|
|
||||||
|
* TcpAttemptFails
|
||||||
|
Defined in `RFC1213 tcpAttemptFails`_.
|
||||||
|
|
||||||
|
.. _RFC1213 tcpAttemptFails: https://tools.ietf.org/html/rfc1213#page-48
|
||||||
|
|
||||||
|
* TcpOutRsts
|
||||||
|
Defined in `RFC1213 tcpOutRsts`_. The RFC says this counter indicates
|
||||||
|
the 'segments sent containing the RST flag', but in linux kernel, this
|
||||||
|
couner indicates the segments kerenl tried to send. The sending
|
||||||
|
process might be failed due to some errors (e.g. memory alloc failed).
|
||||||
|
|
||||||
|
.. _RFC1213 tcpOutRsts: https://tools.ietf.org/html/rfc1213#page-52
|
||||||
|
|
||||||
|
|
||||||
|
TCP Fast Path
|
||||||
============
|
============
|
||||||
When kernel receives a TCP packet, it has two paths to handler the
|
When kernel receives a TCP packet, it has two paths to handler the
|
||||||
packet, one is fast path, another is slow path. The comment in kernel
|
packet, one is fast path, another is slow path. The comment in kernel
|
||||||
@@ -383,8 +402,6 @@ increase 1.
|
|||||||
|
|
||||||
TCP abort
|
TCP abort
|
||||||
========
|
========
|
||||||
|
|
||||||
|
|
||||||
* TcpExtTCPAbortOnData
|
* TcpExtTCPAbortOnData
|
||||||
It means TCP layer has data in flight, but need to close the
|
It means TCP layer has data in flight, but need to close the
|
||||||
connection. So TCP layer sends a RST to the other side, indicate the
|
connection. So TCP layer sends a RST to the other side, indicate the
|
||||||
@@ -545,7 +562,6 @@ packet yet, the sender would know packet 4 is out of order. The TCP
|
|||||||
stack of kernel will increase TcpExtTCPSACKReorder for both of the
|
stack of kernel will increase TcpExtTCPSACKReorder for both of the
|
||||||
above scenarios.
|
above scenarios.
|
||||||
|
|
||||||
|
|
||||||
DSACK
|
DSACK
|
||||||
=====
|
=====
|
||||||
The DSACK is defined in `RFC2883`_. The receiver uses DSACK to report
|
The DSACK is defined in `RFC2883`_. The receiver uses DSACK to report
|
||||||
@@ -566,13 +582,63 @@ The TCP stack receives an out of order duplicate packet, so it sends a
|
|||||||
DSACK to the sender.
|
DSACK to the sender.
|
||||||
|
|
||||||
* TcpExtTCPDSACKRecv
|
* TcpExtTCPDSACKRecv
|
||||||
The TCP stack receives a DSACK, which indicate an acknowledged
|
The TCP stack receives a DSACK, which indicates an acknowledged
|
||||||
duplicate packet is received.
|
duplicate packet is received.
|
||||||
|
|
||||||
* TcpExtTCPDSACKOfoRecv
|
* TcpExtTCPDSACKOfoRecv
|
||||||
The TCP stack receives a DSACK, which indicate an out of order
|
The TCP stack receives a DSACK, which indicate an out of order
|
||||||
duplicate packet is received.
|
duplicate packet is received.
|
||||||
|
|
||||||
|
invalid SACK and DSACK
|
||||||
|
====================
|
||||||
|
When a SACK (or DSACK) block is invalid, a corresponding counter would
|
||||||
|
be updated. The validation method is base on the start/end sequence
|
||||||
|
number of the SACK block. For more details, please refer the comment
|
||||||
|
of the function tcp_is_sackblock_valid in the kernel source code. A
|
||||||
|
SACK option could have up to 4 blocks, they are checked
|
||||||
|
individually. E.g., if 3 blocks of a SACk is invalid, the
|
||||||
|
corresponding counter would be updated 3 times. The comment of the
|
||||||
|
`Add counters for discarded SACK blocks`_ patch has additional
|
||||||
|
explaination:
|
||||||
|
|
||||||
|
.. _Add counters for discarded SACK blocks: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18f02545a9a16c9a89778b91a162ad16d510bb32
|
||||||
|
|
||||||
|
* TcpExtTCPSACKDiscard
|
||||||
|
This counter indicates how many SACK blocks are invalid. If the invalid
|
||||||
|
SACK block is caused by ACK recording, the TCP stack will only ignore
|
||||||
|
it and won't update this counter.
|
||||||
|
|
||||||
|
* TcpExtTCPDSACKIgnoredOld and TcpExtTCPDSACKIgnoredNoUndo
|
||||||
|
When a DSACK block is invalid, one of these two counters would be
|
||||||
|
updated. Which counter will be updated depends on the undo_marker flag
|
||||||
|
of the TCP socket. If the undo_marker is not set, the TCP stack isn't
|
||||||
|
likely to re-transmit any packets, and we still receive an invalid
|
||||||
|
DSACK block, the reason might be that the packet is duplicated in the
|
||||||
|
middle of the network. In such scenario, TcpExtTCPDSACKIgnoredNoUndo
|
||||||
|
will be updated. If the undo_marker is set, TcpExtTCPDSACKIgnoredOld
|
||||||
|
will be updated. As implied in its name, it might be an old packet.
|
||||||
|
|
||||||
|
SACK shift
|
||||||
|
=========
|
||||||
|
The linux networking stack stores data in sk_buff struct (skb for
|
||||||
|
short). If a SACK block acrosses multiple skb, the TCP stack will try
|
||||||
|
to re-arrange data in these skb. E.g. if a SACK block acknowledges seq
|
||||||
|
10 to 15, skb1 has seq 10 to 13, skb2 has seq 14 to 20. The seq 14 and
|
||||||
|
15 in skb2 would be moved to skb1. This operation is 'shift'. If a
|
||||||
|
SACK block acknowledges seq 10 to 20, skb1 has seq 10 to 13, skb2 has
|
||||||
|
seq 14 to 20. All data in skb2 will be moved to skb1, and skb2 will be
|
||||||
|
discard, this operation is 'merge'.
|
||||||
|
|
||||||
|
* TcpExtTCPSackShifted
|
||||||
|
A skb is shifted
|
||||||
|
|
||||||
|
* TcpExtTCPSackMerged
|
||||||
|
A skb is merged
|
||||||
|
|
||||||
|
* TcpExtTCPSackShiftFallback
|
||||||
|
A skb should be shifted or merged, but the TCP stack doesn't do it for
|
||||||
|
some reasons.
|
||||||
|
|
||||||
TCP out of order
|
TCP out of order
|
||||||
===============
|
===============
|
||||||
* TcpExtTCPOFOQueue
|
* TcpExtTCPOFOQueue
|
||||||
@@ -662,6 +728,60 @@ unacknowledged number (more strict than `RFC 5961 section 5.2`_).
|
|||||||
.. _RFC 5961 section 4.2: https://tools.ietf.org/html/rfc5961#page-9
|
.. _RFC 5961 section 4.2: https://tools.ietf.org/html/rfc5961#page-9
|
||||||
.. _RFC 5961 section 5.2: https://tools.ietf.org/html/rfc5961#page-11
|
.. _RFC 5961 section 5.2: https://tools.ietf.org/html/rfc5961#page-11
|
||||||
|
|
||||||
|
TCP receive window
|
||||||
|
=================
|
||||||
|
* TcpExtTCPWantZeroWindowAdv
|
||||||
|
Depending on current memory usage, the TCP stack tries to set receive
|
||||||
|
window to zero. But the receive window might still be a no-zero
|
||||||
|
value. For example, if the previous window size is 10, and the TCP
|
||||||
|
stack receives 3 bytes, the current window size would be 7 even if the
|
||||||
|
window size calculated by the memory usage is zero.
|
||||||
|
|
||||||
|
* TcpExtTCPToZeroWindowAdv
|
||||||
|
The TCP receive window is set to zero from a no-zero value.
|
||||||
|
|
||||||
|
* TcpExtTCPFromZeroWindowAdv
|
||||||
|
The TCP receive window is set to no-zero value from zero.
|
||||||
|
|
||||||
|
|
||||||
|
Delayed ACK
|
||||||
|
==========
|
||||||
|
The TCP Delayed ACK is a technique which is used for reducing the
|
||||||
|
packet count in the network. For more details, please refer the
|
||||||
|
`Delayed ACK wiki`_
|
||||||
|
|
||||||
|
.. _Delayed ACK wiki: https://en.wikipedia.org/wiki/TCP_delayed_acknowledgment
|
||||||
|
|
||||||
|
* TcpExtDelayedACKs
|
||||||
|
A delayed ACK timer expires. The TCP stack will send a pure ACK packet
|
||||||
|
and exit the delayed ACK mode.
|
||||||
|
|
||||||
|
* TcpExtDelayedACKLocked
|
||||||
|
A delayed ACK timer expires, but the TCP stack can't send an ACK
|
||||||
|
immediately due to the socket is locked by a userspace program. The
|
||||||
|
TCP stack will send a pure ACK later (after the userspace program
|
||||||
|
unlock the socket). When the TCP stack sends the pure ACK later, the
|
||||||
|
TCP stack will also update TcpExtDelayedACKs and exit the delayed ACK
|
||||||
|
mode.
|
||||||
|
|
||||||
|
* TcpExtDelayedACKLost
|
||||||
|
It will be updated when the TCP stack receives a packet which has been
|
||||||
|
ACKed. A Delayed ACK loss might cause this issue, but it would also be
|
||||||
|
triggered by other reasons, such as a packet is duplicated in the
|
||||||
|
network.
|
||||||
|
|
||||||
|
Tail Loss Probe (TLP)
|
||||||
|
===================
|
||||||
|
TLP is an algorithm which is used to detect TCP packet loss. For more
|
||||||
|
details, please refer the `TLP paper`_.
|
||||||
|
|
||||||
|
.. _TLP paper: https://tools.ietf.org/html/draft-dukkipati-tcpm-tcp-loss-probe-01
|
||||||
|
|
||||||
|
* TcpExtTCPLossProbes
|
||||||
|
A TLP probe packet is sent.
|
||||||
|
|
||||||
|
* TcpExtTCPLossProbeRecovery
|
||||||
|
A packet loss is detected and recovered by TLP.
|
||||||
|
|
||||||
examples
|
examples
|
||||||
=======
|
=======
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ is again deprecated and ts[2] holds a hardware timestamp if set.
|
|||||||
|
|
||||||
Hardware time stamping must also be initialized for each device driver
|
Hardware time stamping must also be initialized for each device driver
|
||||||
that is expected to do hardware time stamping. The parameter is defined in
|
that is expected to do hardware time stamping. The parameter is defined in
|
||||||
/include/linux/net_tstamp.h as:
|
include/uapi/linux/net_tstamp.h as:
|
||||||
|
|
||||||
struct hwtstamp_config {
|
struct hwtstamp_config {
|
||||||
int flags; /* no flags defined right now, must be zero */
|
int flags; /* no flags defined right now, must be zero */
|
||||||
@@ -487,7 +487,7 @@ enum {
|
|||||||
HWTSTAMP_FILTER_PTP_V1_L4_EVENT,
|
HWTSTAMP_FILTER_PTP_V1_L4_EVENT,
|
||||||
|
|
||||||
/* for the complete list of values, please check
|
/* for the complete list of values, please check
|
||||||
* the include file /include/linux/net_tstamp.h
|
* the include file include/uapi/linux/net_tstamp.h
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -56,26 +56,32 @@ of any kernel data structures.
|
|||||||
|
|
||||||
dentry-state:
|
dentry-state:
|
||||||
|
|
||||||
From linux/fs/dentry.c:
|
From linux/include/linux/dcache.h:
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
struct {
|
struct dentry_stat_t dentry_stat {
|
||||||
int nr_dentry;
|
int nr_dentry;
|
||||||
int nr_unused;
|
int nr_unused;
|
||||||
int age_limit; /* age in seconds */
|
int age_limit; /* age in seconds */
|
||||||
int want_pages; /* pages requested by system */
|
int want_pages; /* pages requested by system */
|
||||||
int dummy[2];
|
int nr_negative; /* # of unused negative dentries */
|
||||||
} dentry_stat = {0, 0, 45, 0,};
|
int dummy; /* Reserved for future use */
|
||||||
--------------------------------------------------------------
|
};
|
||||||
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
Dentries are dynamically allocated and deallocated.
|
||||||
|
|
||||||
|
nr_dentry shows the total number of dentries allocated (active
|
||||||
|
+ unused). nr_unused shows the number of dentries that are not
|
||||||
|
actively used, but are saved in the LRU list for future reuse.
|
||||||
|
|
||||||
Dentries are dynamically allocated and deallocated, and
|
|
||||||
nr_dentry seems to be 0 all the time. Hence it's safe to
|
|
||||||
assume that only nr_unused, age_limit and want_pages are
|
|
||||||
used. Nr_unused seems to be exactly what its name says.
|
|
||||||
Age_limit is the age in seconds after which dcache entries
|
Age_limit is the age in seconds after which dcache entries
|
||||||
can be reclaimed when memory is short and want_pages is
|
can be reclaimed when memory is short and want_pages is
|
||||||
nonzero when shrink_dcache_pages() has been called and the
|
nonzero when shrink_dcache_pages() has been called and the
|
||||||
dcache isn't pruned yet.
|
dcache isn't pruned yet.
|
||||||
|
|
||||||
|
nr_negative shows the number of unused dentries that are also
|
||||||
|
negative dentries which do not mapped to actual files.
|
||||||
|
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
dquot-max & dquot-nr:
|
dquot-max & dquot-nr:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Fenghua Yu <fenghua.yu@intel.com>
|
|||||||
Tony Luck <tony.luck@intel.com>
|
Tony Luck <tony.luck@intel.com>
|
||||||
Vikas Shivappa <vikas.shivappa@intel.com>
|
Vikas Shivappa <vikas.shivappa@intel.com>
|
||||||
|
|
||||||
This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo
|
This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo
|
||||||
flag bits:
|
flag bits:
|
||||||
RDT (Resource Director Technology) Allocation - "rdt_a"
|
RDT (Resource Director Technology) Allocation - "rdt_a"
|
||||||
CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"
|
CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"
|
||||||
|
|||||||
79
MAINTAINERS
79
MAINTAINERS
@@ -3052,8 +3052,8 @@ F: include/linux/bcm963xx_nvram.h
|
|||||||
F: include/linux/bcm963xx_tag.h
|
F: include/linux/bcm963xx_tag.h
|
||||||
|
|
||||||
BROADCOM BNX2 GIGABIT ETHERNET DRIVER
|
BROADCOM BNX2 GIGABIT ETHERNET DRIVER
|
||||||
M: Rasesh Mody <rasesh.mody@cavium.com>
|
M: Rasesh Mody <rmody@marvell.com>
|
||||||
M: Dept-GELinuxNICDev@cavium.com
|
M: GR-Linux-NIC-Dev@marvell.com
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/net/ethernet/broadcom/bnx2.*
|
F: drivers/net/ethernet/broadcom/bnx2.*
|
||||||
@@ -3072,9 +3072,9 @@ S: Supported
|
|||||||
F: drivers/scsi/bnx2i/
|
F: drivers/scsi/bnx2i/
|
||||||
|
|
||||||
BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
|
BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
|
||||||
M: Ariel Elior <ariel.elior@cavium.com>
|
M: Ariel Elior <aelior@marvell.com>
|
||||||
M: Sudarsana Kalluru <sudarsana.kalluru@cavium.com>
|
M: Sudarsana Kalluru <skalluru@marvell.com>
|
||||||
M: everest-linux-l2@cavium.com
|
M: GR-everest-linux-l2@marvell.com
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/net/ethernet/broadcom/bnx2x/
|
F: drivers/net/ethernet/broadcom/bnx2x/
|
||||||
@@ -3249,9 +3249,9 @@ S: Supported
|
|||||||
F: drivers/scsi/bfa/
|
F: drivers/scsi/bfa/
|
||||||
|
|
||||||
BROCADE BNA 10 GIGABIT ETHERNET DRIVER
|
BROCADE BNA 10 GIGABIT ETHERNET DRIVER
|
||||||
M: Rasesh Mody <rasesh.mody@cavium.com>
|
M: Rasesh Mody <rmody@marvell.com>
|
||||||
M: Sudarsana Kalluru <sudarsana.kalluru@cavium.com>
|
M: Sudarsana Kalluru <skalluru@marvell.com>
|
||||||
M: Dept-GELinuxNICDev@cavium.com
|
M: GR-Linux-NIC-Dev@marvell.com
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/net/ethernet/brocade/bna/
|
F: drivers/net/ethernet/brocade/bna/
|
||||||
@@ -3471,10 +3471,9 @@ F: drivers/i2c/busses/i2c-octeon*
|
|||||||
F: drivers/i2c/busses/i2c-thunderx*
|
F: drivers/i2c/busses/i2c-thunderx*
|
||||||
|
|
||||||
CAVIUM LIQUIDIO NETWORK DRIVER
|
CAVIUM LIQUIDIO NETWORK DRIVER
|
||||||
M: Derek Chickles <derek.chickles@caviumnetworks.com>
|
M: Derek Chickles <dchickles@marvell.com>
|
||||||
M: Satanand Burla <satananda.burla@caviumnetworks.com>
|
M: Satanand Burla <sburla@marvell.com>
|
||||||
M: Felix Manlunas <felix.manlunas@caviumnetworks.com>
|
M: Felix Manlunas <fmanlunas@marvell.com>
|
||||||
M: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com>
|
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
W: http://www.cavium.com
|
W: http://www.cavium.com
|
||||||
S: Supported
|
S: Supported
|
||||||
@@ -3979,6 +3978,7 @@ F: drivers/cpufreq/arm_big_little.c
|
|||||||
CPU POWER MONITORING SUBSYSTEM
|
CPU POWER MONITORING SUBSYSTEM
|
||||||
M: Thomas Renninger <trenn@suse.com>
|
M: Thomas Renninger <trenn@suse.com>
|
||||||
M: Shuah Khan <shuah@kernel.org>
|
M: Shuah Khan <shuah@kernel.org>
|
||||||
|
M: Shuah Khan <skhan@linuxfoundation.org>
|
||||||
L: linux-pm@vger.kernel.org
|
L: linux-pm@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: tools/power/cpupower/
|
F: tools/power/cpupower/
|
||||||
@@ -8259,6 +8259,7 @@ F: include/uapi/linux/sunrpc/
|
|||||||
|
|
||||||
KERNEL SELFTEST FRAMEWORK
|
KERNEL SELFTEST FRAMEWORK
|
||||||
M: Shuah Khan <shuah@kernel.org>
|
M: Shuah Khan <shuah@kernel.org>
|
||||||
|
M: Shuah Khan <skhan@linuxfoundation.org>
|
||||||
L: linux-kselftest@vger.kernel.org
|
L: linux-kselftest@vger.kernel.org
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
|
||||||
Q: https://patchwork.kernel.org/project/linux-kselftest/list/
|
Q: https://patchwork.kernel.org/project/linux-kselftest/list/
|
||||||
@@ -10689,9 +10690,9 @@ S: Maintained
|
|||||||
F: drivers/net/netdevsim/*
|
F: drivers/net/netdevsim/*
|
||||||
|
|
||||||
NETXEN (1/10) GbE SUPPORT
|
NETXEN (1/10) GbE SUPPORT
|
||||||
M: Manish Chopra <manish.chopra@cavium.com>
|
M: Manish Chopra <manishc@marvell.com>
|
||||||
M: Rahul Verma <rahul.verma@cavium.com>
|
M: Rahul Verma <rahulv@marvell.com>
|
||||||
M: Dept-GELinuxNICDev@cavium.com
|
M: GR-Linux-NIC-Dev@marvell.com
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/net/ethernet/qlogic/netxen/
|
F: drivers/net/ethernet/qlogic/netxen/
|
||||||
@@ -12475,8 +12476,8 @@ S: Supported
|
|||||||
F: drivers/scsi/qedi/
|
F: drivers/scsi/qedi/
|
||||||
|
|
||||||
QLOGIC QL4xxx ETHERNET DRIVER
|
QLOGIC QL4xxx ETHERNET DRIVER
|
||||||
M: Ariel Elior <Ariel.Elior@cavium.com>
|
M: Ariel Elior <aelior@marvell.com>
|
||||||
M: everest-linux-l2@cavium.com
|
M: GR-everest-linux-l2@marvell.com
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/net/ethernet/qlogic/qed/
|
F: drivers/net/ethernet/qlogic/qed/
|
||||||
@@ -12484,8 +12485,8 @@ F: include/linux/qed/
|
|||||||
F: drivers/net/ethernet/qlogic/qede/
|
F: drivers/net/ethernet/qlogic/qede/
|
||||||
|
|
||||||
QLOGIC QL4xxx RDMA DRIVER
|
QLOGIC QL4xxx RDMA DRIVER
|
||||||
M: Michal Kalderon <Michal.Kalderon@cavium.com>
|
M: Michal Kalderon <mkalderon@marvell.com>
|
||||||
M: Ariel Elior <Ariel.Elior@cavium.com>
|
M: Ariel Elior <aelior@marvell.com>
|
||||||
L: linux-rdma@vger.kernel.org
|
L: linux-rdma@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/infiniband/hw/qedr/
|
F: drivers/infiniband/hw/qedr/
|
||||||
@@ -12505,7 +12506,7 @@ F: Documentation/scsi/LICENSE.qla2xxx
|
|||||||
F: drivers/scsi/qla2xxx/
|
F: drivers/scsi/qla2xxx/
|
||||||
|
|
||||||
QLOGIC QLA3XXX NETWORK DRIVER
|
QLOGIC QLA3XXX NETWORK DRIVER
|
||||||
M: Dept-GELinuxNICDev@cavium.com
|
M: GR-Linux-NIC-Dev@marvell.com
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Documentation/networking/device_drivers/qlogic/LICENSE.qla3xxx
|
F: Documentation/networking/device_drivers/qlogic/LICENSE.qla3xxx
|
||||||
@@ -12519,16 +12520,16 @@ F: Documentation/scsi/LICENSE.qla4xxx
|
|||||||
F: drivers/scsi/qla4xxx/
|
F: drivers/scsi/qla4xxx/
|
||||||
|
|
||||||
QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
|
QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
|
||||||
M: Shahed Shaikh <Shahed.Shaikh@cavium.com>
|
M: Shahed Shaikh <shshaikh@marvell.com>
|
||||||
M: Manish Chopra <manish.chopra@cavium.com>
|
M: Manish Chopra <manishc@marvell.com>
|
||||||
M: Dept-GELinuxNICDev@cavium.com
|
M: GR-Linux-NIC-Dev@marvell.com
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/net/ethernet/qlogic/qlcnic/
|
F: drivers/net/ethernet/qlogic/qlcnic/
|
||||||
|
|
||||||
QLOGIC QLGE 10Gb ETHERNET DRIVER
|
QLOGIC QLGE 10Gb ETHERNET DRIVER
|
||||||
M: Manish Chopra <manish.chopra@cavium.com>
|
M: Manish Chopra <manishc@marvell.com>
|
||||||
M: Dept-GELinuxNICDev@cavium.com
|
M: GR-Linux-NIC-Dev@marvell.com
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/net/ethernet/qlogic/qlge/
|
F: drivers/net/ethernet/qlogic/qlge/
|
||||||
@@ -15842,6 +15843,7 @@ F: drivers/usb/common/usb-otg-fsm.c
|
|||||||
USB OVER IP DRIVER
|
USB OVER IP DRIVER
|
||||||
M: Valentina Manea <valentina.manea.m@gmail.com>
|
M: Valentina Manea <valentina.manea.m@gmail.com>
|
||||||
M: Shuah Khan <shuah@kernel.org>
|
M: Shuah Khan <shuah@kernel.org>
|
||||||
|
M: Shuah Khan <skhan@linuxfoundation.org>
|
||||||
L: linux-usb@vger.kernel.org
|
L: linux-usb@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/usb/usbip_protocol.txt
|
F: Documentation/usb/usbip_protocol.txt
|
||||||
@@ -16639,6 +16641,15 @@ S: Maintained
|
|||||||
F: drivers/platform/x86/
|
F: drivers/platform/x86/
|
||||||
F: drivers/platform/olpc/
|
F: drivers/platform/olpc/
|
||||||
|
|
||||||
|
X86 PLATFORM DRIVERS - ARCH
|
||||||
|
R: Darren Hart <dvhart@infradead.org>
|
||||||
|
R: Andy Shevchenko <andy@infradead.org>
|
||||||
|
L: platform-driver-x86@vger.kernel.org
|
||||||
|
L: x86@kernel.org
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
|
||||||
|
S: Maintained
|
||||||
|
F: arch/x86/platform
|
||||||
|
|
||||||
X86 VDSO
|
X86 VDSO
|
||||||
M: Andy Lutomirski <luto@kernel.org>
|
M: Andy Lutomirski <luto@kernel.org>
|
||||||
L: linux-kernel@vger.kernel.org
|
L: linux-kernel@vger.kernel.org
|
||||||
@@ -16671,6 +16682,24 @@ T: git git://linuxtv.org/media_tree.git
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/media/tuners/tuner-xc2028.*
|
F: drivers/media/tuners/tuner-xc2028.*
|
||||||
|
|
||||||
|
XDP (eXpress Data Path)
|
||||||
|
M: Alexei Starovoitov <ast@kernel.org>
|
||||||
|
M: Daniel Borkmann <daniel@iogearbox.net>
|
||||||
|
M: David S. Miller <davem@davemloft.net>
|
||||||
|
M: Jakub Kicinski <jakub.kicinski@netronome.com>
|
||||||
|
M: Jesper Dangaard Brouer <hawk@kernel.org>
|
||||||
|
M: John Fastabend <john.fastabend@gmail.com>
|
||||||
|
L: netdev@vger.kernel.org
|
||||||
|
L: xdp-newbies@vger.kernel.org
|
||||||
|
S: Supported
|
||||||
|
F: net/core/xdp.c
|
||||||
|
F: include/net/xdp.h
|
||||||
|
F: kernel/bpf/devmap.c
|
||||||
|
F: kernel/bpf/cpumap.c
|
||||||
|
F: include/trace/events/xdp.h
|
||||||
|
K: xdp
|
||||||
|
N: xdp
|
||||||
|
|
||||||
XDP SOCKETS (AF_XDP)
|
XDP SOCKETS (AF_XDP)
|
||||||
M: Björn Töpel <bjorn.topel@intel.com>
|
M: Björn Töpel <bjorn.topel@intel.com>
|
||||||
M: Magnus Karlsson <magnus.karlsson@intel.com>
|
M: Magnus Karlsson <magnus.karlsson@intel.com>
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@
|
|||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 0
|
PATCHLEVEL = 0
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc2
|
EXTRAVERSION = -rc5
|
||||||
NAME = Shy Crocodile
|
NAME = Shy Crocodile
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|||||||
@@ -3,23 +3,19 @@ generic-y += bugs.h
|
|||||||
generic-y += compat.h
|
generic-y += compat.h
|
||||||
generic-y += device.h
|
generic-y += device.h
|
||||||
generic-y += div64.h
|
generic-y += div64.h
|
||||||
generic-y += dma-mapping.h
|
|
||||||
generic-y += emergency-restart.h
|
generic-y += emergency-restart.h
|
||||||
generic-y += extable.h
|
generic-y += extable.h
|
||||||
generic-y += fb.h
|
|
||||||
generic-y += ftrace.h
|
generic-y += ftrace.h
|
||||||
generic-y += hardirq.h
|
generic-y += hardirq.h
|
||||||
generic-y += hw_irq.h
|
generic-y += hw_irq.h
|
||||||
generic-y += irq_regs.h
|
generic-y += irq_regs.h
|
||||||
generic-y += irq_work.h
|
generic-y += irq_work.h
|
||||||
generic-y += kmap_types.h
|
|
||||||
generic-y += local.h
|
generic-y += local.h
|
||||||
generic-y += local64.h
|
generic-y += local64.h
|
||||||
generic-y += mcs_spinlock.h
|
generic-y += mcs_spinlock.h
|
||||||
generic-y += mm-arch-hooks.h
|
generic-y += mm-arch-hooks.h
|
||||||
generic-y += msi.h
|
generic-y += msi.h
|
||||||
generic-y += parport.h
|
generic-y += parport.h
|
||||||
generic-y += pci.h
|
|
||||||
generic-y += percpu.h
|
generic-y += percpu.h
|
||||||
generic-y += preempt.h
|
generic-y += preempt.h
|
||||||
generic-y += topology.h
|
generic-y += topology.h
|
||||||
|
|||||||
@@ -216,6 +216,14 @@ struct bcr_fp_arcv2 {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct bcr_actionpoint {
|
||||||
|
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||||
|
unsigned int pad:21, min:1, num:2, ver:8;
|
||||||
|
#else
|
||||||
|
unsigned int ver:8, num:2, min:1, pad:21;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
#include <soc/arc/timers.h>
|
#include <soc/arc/timers.h>
|
||||||
|
|
||||||
struct bcr_bpu_arcompact {
|
struct bcr_bpu_arcompact {
|
||||||
@@ -283,7 +291,7 @@ struct cpuinfo_arc_cache {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct cpuinfo_arc_bpu {
|
struct cpuinfo_arc_bpu {
|
||||||
unsigned int ver, full, num_cache, num_pred;
|
unsigned int ver, full, num_cache, num_pred, ret_stk;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cpuinfo_arc_ccm {
|
struct cpuinfo_arc_ccm {
|
||||||
@@ -302,7 +310,7 @@ struct cpuinfo_arc {
|
|||||||
struct {
|
struct {
|
||||||
unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, swape:1, pad1:2,
|
unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, swape:1, pad1:2,
|
||||||
fpu_sp:1, fpu_dp:1, dual:1, dual_enb:1, pad2:4,
|
fpu_sp:1, fpu_dp:1, dual:1, dual_enb:1, pad2:4,
|
||||||
debug:1, ap:1, smart:1, rtt:1, pad3:4,
|
ap_num:4, ap_full:1, smart:1, rtt:1, pad3:1,
|
||||||
timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4;
|
timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4;
|
||||||
} extn;
|
} extn;
|
||||||
struct bcr_mpy extn_mpy;
|
struct bcr_mpy extn_mpy;
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ static inline __attribute__ ((const)) int __fls(unsigned long x)
|
|||||||
/*
|
/*
|
||||||
* __ffs: Similar to ffs, but zero based (0-31)
|
* __ffs: Similar to ffs, but zero based (0-31)
|
||||||
*/
|
*/
|
||||||
static inline __attribute__ ((const)) int __ffs(unsigned long word)
|
static inline __attribute__ ((const)) unsigned long __ffs(unsigned long word)
|
||||||
{
|
{
|
||||||
if (!word)
|
if (!word)
|
||||||
return word;
|
return word;
|
||||||
@@ -400,9 +400,9 @@ static inline __attribute__ ((const)) int ffs(unsigned long x)
|
|||||||
/*
|
/*
|
||||||
* __ffs: Similar to ffs, but zero based (0-31)
|
* __ffs: Similar to ffs, but zero based (0-31)
|
||||||
*/
|
*/
|
||||||
static inline __attribute__ ((const)) int __ffs(unsigned long x)
|
static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
|
||||||
{
|
{
|
||||||
int n;
|
unsigned long n;
|
||||||
|
|
||||||
asm volatile(
|
asm volatile(
|
||||||
" ffs.f %0, %1 \n" /* 0:31; 31(Z) if src 0 */
|
" ffs.f %0, %1 \n" /* 0:31; 31(Z) if src 0 */
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ static const char * const arc_pmu_ev_hw_map[] = {
|
|||||||
|
|
||||||
/* counts condition */
|
/* counts condition */
|
||||||
[PERF_COUNT_HW_INSTRUCTIONS] = "iall",
|
[PERF_COUNT_HW_INSTRUCTIONS] = "iall",
|
||||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmp", /* Excludes ZOL jumps */
|
/* All jump instructions that are taken */
|
||||||
|
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmptak",
|
||||||
[PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */
|
[PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */
|
||||||
#ifdef CONFIG_ISA_ARCV2
|
#ifdef CONFIG_ISA_ARCV2
|
||||||
[PERF_COUNT_HW_BRANCH_MISSES] = "bpmp",
|
[PERF_COUNT_HW_BRANCH_MISSES] = "bpmp",
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
/*
|
// SPDX-License-Identifier: GPL-2.0+
|
||||||
* Linux performance counter support for ARC700 series
|
//
|
||||||
*
|
// Linux performance counter support for ARC CPUs.
|
||||||
* Copyright (C) 2013-2015 Synopsys, Inc. (www.synopsys.com)
|
// This code is inspired by the perf support of various other architectures.
|
||||||
*
|
//
|
||||||
* This code is inspired by the perf support of various other architectures.
|
// Copyright (C) 2013-2018 Synopsys, Inc. (www.synopsys.com)
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
@@ -19,12 +14,31 @@
|
|||||||
#include <asm/arcregs.h>
|
#include <asm/arcregs.h>
|
||||||
#include <asm/stacktrace.h>
|
#include <asm/stacktrace.h>
|
||||||
|
|
||||||
|
/* HW holds 8 symbols + one for null terminator */
|
||||||
|
#define ARCPMU_EVENT_NAME_LEN 9
|
||||||
|
|
||||||
|
enum arc_pmu_attr_groups {
|
||||||
|
ARCPMU_ATTR_GR_EVENTS,
|
||||||
|
ARCPMU_ATTR_GR_FORMATS,
|
||||||
|
ARCPMU_NR_ATTR_GR
|
||||||
|
};
|
||||||
|
|
||||||
|
struct arc_pmu_raw_event_entry {
|
||||||
|
char name[ARCPMU_EVENT_NAME_LEN];
|
||||||
|
};
|
||||||
|
|
||||||
struct arc_pmu {
|
struct arc_pmu {
|
||||||
struct pmu pmu;
|
struct pmu pmu;
|
||||||
unsigned int irq;
|
unsigned int irq;
|
||||||
int n_counters;
|
int n_counters;
|
||||||
|
int n_events;
|
||||||
u64 max_period;
|
u64 max_period;
|
||||||
int ev_hw_idx[PERF_COUNT_ARC_HW_MAX];
|
int ev_hw_idx[PERF_COUNT_ARC_HW_MAX];
|
||||||
|
|
||||||
|
struct arc_pmu_raw_event_entry *raw_entry;
|
||||||
|
struct attribute **attrs;
|
||||||
|
struct perf_pmu_events_attr *attr;
|
||||||
|
const struct attribute_group *attr_groups[ARCPMU_NR_ATTR_GR + 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct arc_pmu_cpu {
|
struct arc_pmu_cpu {
|
||||||
@@ -49,6 +63,7 @@ static int callchain_trace(unsigned int addr, void *data)
|
|||||||
{
|
{
|
||||||
struct arc_callchain_trace *ctrl = data;
|
struct arc_callchain_trace *ctrl = data;
|
||||||
struct perf_callchain_entry_ctx *entry = ctrl->perf_stuff;
|
struct perf_callchain_entry_ctx *entry = ctrl->perf_stuff;
|
||||||
|
|
||||||
perf_callchain_store(entry, addr);
|
perf_callchain_store(entry, addr);
|
||||||
|
|
||||||
if (ctrl->depth++ < 3)
|
if (ctrl->depth++ < 3)
|
||||||
@@ -57,8 +72,8 @@ static int callchain_trace(unsigned int addr, void *data)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
|
||||||
perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
|
struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct arc_callchain_trace ctrl = {
|
struct arc_callchain_trace ctrl = {
|
||||||
.depth = 0,
|
.depth = 0,
|
||||||
@@ -68,8 +83,8 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
|
|||||||
arc_unwind_core(NULL, regs, callchain_trace, &ctrl);
|
arc_unwind_core(NULL, regs, callchain_trace, &ctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
|
||||||
perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
|
struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* User stack can't be unwound trivially with kernel dwarf unwinder
|
* User stack can't be unwound trivially with kernel dwarf unwinder
|
||||||
@@ -82,10 +97,10 @@ static struct arc_pmu *arc_pmu;
|
|||||||
static DEFINE_PER_CPU(struct arc_pmu_cpu, arc_pmu_cpu);
|
static DEFINE_PER_CPU(struct arc_pmu_cpu, arc_pmu_cpu);
|
||||||
|
|
||||||
/* read counter #idx; note that counter# != event# on ARC! */
|
/* read counter #idx; note that counter# != event# on ARC! */
|
||||||
static uint64_t arc_pmu_read_counter(int idx)
|
static u64 arc_pmu_read_counter(int idx)
|
||||||
{
|
{
|
||||||
uint32_t tmp;
|
u32 tmp;
|
||||||
uint64_t result;
|
u64 result;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ARC supports making 'snapshots' of the counters, so we don't
|
* ARC supports making 'snapshots' of the counters, so we don't
|
||||||
@@ -94,7 +109,7 @@ static uint64_t arc_pmu_read_counter(int idx)
|
|||||||
write_aux_reg(ARC_REG_PCT_INDEX, idx);
|
write_aux_reg(ARC_REG_PCT_INDEX, idx);
|
||||||
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
||||||
write_aux_reg(ARC_REG_PCT_CONTROL, tmp | ARC_REG_PCT_CONTROL_SN);
|
write_aux_reg(ARC_REG_PCT_CONTROL, tmp | ARC_REG_PCT_CONTROL_SN);
|
||||||
result = (uint64_t) (read_aux_reg(ARC_REG_PCT_SNAPH)) << 32;
|
result = (u64) (read_aux_reg(ARC_REG_PCT_SNAPH)) << 32;
|
||||||
result |= read_aux_reg(ARC_REG_PCT_SNAPL);
|
result |= read_aux_reg(ARC_REG_PCT_SNAPL);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -103,9 +118,9 @@ static uint64_t arc_pmu_read_counter(int idx)
|
|||||||
static void arc_perf_event_update(struct perf_event *event,
|
static void arc_perf_event_update(struct perf_event *event,
|
||||||
struct hw_perf_event *hwc, int idx)
|
struct hw_perf_event *hwc, int idx)
|
||||||
{
|
{
|
||||||
uint64_t prev_raw_count = local64_read(&hwc->prev_count);
|
u64 prev_raw_count = local64_read(&hwc->prev_count);
|
||||||
uint64_t new_raw_count = arc_pmu_read_counter(idx);
|
u64 new_raw_count = arc_pmu_read_counter(idx);
|
||||||
int64_t delta = new_raw_count - prev_raw_count;
|
s64 delta = new_raw_count - prev_raw_count;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We aren't afraid of hwc->prev_count changing beneath our feet
|
* We aren't afraid of hwc->prev_count changing beneath our feet
|
||||||
@@ -155,7 +170,7 @@ static int arc_pmu_event_init(struct perf_event *event)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!is_sampling_event(event)) {
|
if (!is_sampling_event(event)) {
|
||||||
hwc->sample_period = arc_pmu->max_period;
|
hwc->sample_period = arc_pmu->max_period;
|
||||||
hwc->last_period = hwc->sample_period;
|
hwc->last_period = hwc->sample_period;
|
||||||
local64_set(&hwc->period_left, hwc->sample_period);
|
local64_set(&hwc->period_left, hwc->sample_period);
|
||||||
}
|
}
|
||||||
@@ -192,6 +207,18 @@ static int arc_pmu_event_init(struct perf_event *event)
|
|||||||
pr_debug("init cache event with h/w %08x \'%s\'\n",
|
pr_debug("init cache event with h/w %08x \'%s\'\n",
|
||||||
(int)hwc->config, arc_pmu_ev_hw_map[ret]);
|
(int)hwc->config, arc_pmu_ev_hw_map[ret]);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case PERF_TYPE_RAW:
|
||||||
|
if (event->attr.config >= arc_pmu->n_events)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
hwc->config |= event->attr.config;
|
||||||
|
pr_debug("init raw event with idx %lld \'%s\'\n",
|
||||||
|
event->attr.config,
|
||||||
|
arc_pmu->raw_entry[event->attr.config].name);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
@@ -200,7 +227,7 @@ static int arc_pmu_event_init(struct perf_event *event)
|
|||||||
/* starts all counters */
|
/* starts all counters */
|
||||||
static void arc_pmu_enable(struct pmu *pmu)
|
static void arc_pmu_enable(struct pmu *pmu)
|
||||||
{
|
{
|
||||||
uint32_t tmp;
|
u32 tmp;
|
||||||
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
||||||
write_aux_reg(ARC_REG_PCT_CONTROL, (tmp & 0xffff0000) | 0x1);
|
write_aux_reg(ARC_REG_PCT_CONTROL, (tmp & 0xffff0000) | 0x1);
|
||||||
}
|
}
|
||||||
@@ -208,7 +235,7 @@ static void arc_pmu_enable(struct pmu *pmu)
|
|||||||
/* stops all counters */
|
/* stops all counters */
|
||||||
static void arc_pmu_disable(struct pmu *pmu)
|
static void arc_pmu_disable(struct pmu *pmu)
|
||||||
{
|
{
|
||||||
uint32_t tmp;
|
u32 tmp;
|
||||||
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
||||||
write_aux_reg(ARC_REG_PCT_CONTROL, (tmp & 0xffff0000) | 0x0);
|
write_aux_reg(ARC_REG_PCT_CONTROL, (tmp & 0xffff0000) | 0x0);
|
||||||
}
|
}
|
||||||
@@ -228,7 +255,7 @@ static int arc_pmu_event_set_period(struct perf_event *event)
|
|||||||
local64_set(&hwc->period_left, left);
|
local64_set(&hwc->period_left, left);
|
||||||
hwc->last_period = period;
|
hwc->last_period = period;
|
||||||
overflow = 1;
|
overflow = 1;
|
||||||
} else if (unlikely(left <= 0)) {
|
} else if (unlikely(left <= 0)) {
|
||||||
/* left underflowed by less than period. */
|
/* left underflowed by less than period. */
|
||||||
left += period;
|
left += period;
|
||||||
local64_set(&hwc->period_left, left);
|
local64_set(&hwc->period_left, left);
|
||||||
@@ -246,8 +273,8 @@ static int arc_pmu_event_set_period(struct perf_event *event)
|
|||||||
write_aux_reg(ARC_REG_PCT_INDEX, idx);
|
write_aux_reg(ARC_REG_PCT_INDEX, idx);
|
||||||
|
|
||||||
/* Write value */
|
/* Write value */
|
||||||
write_aux_reg(ARC_REG_PCT_COUNTL, (u32)value);
|
write_aux_reg(ARC_REG_PCT_COUNTL, lower_32_bits(value));
|
||||||
write_aux_reg(ARC_REG_PCT_COUNTH, (value >> 32));
|
write_aux_reg(ARC_REG_PCT_COUNTH, upper_32_bits(value));
|
||||||
|
|
||||||
perf_event_update_userpage(event);
|
perf_event_update_userpage(event);
|
||||||
|
|
||||||
@@ -277,7 +304,7 @@ static void arc_pmu_start(struct perf_event *event, int flags)
|
|||||||
/* Enable interrupt for this counter */
|
/* Enable interrupt for this counter */
|
||||||
if (is_sampling_event(event))
|
if (is_sampling_event(event))
|
||||||
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
||||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) | (1 << idx));
|
read_aux_reg(ARC_REG_PCT_INT_CTRL) | BIT(idx));
|
||||||
|
|
||||||
/* enable ARC pmu here */
|
/* enable ARC pmu here */
|
||||||
write_aux_reg(ARC_REG_PCT_INDEX, idx); /* counter # */
|
write_aux_reg(ARC_REG_PCT_INDEX, idx); /* counter # */
|
||||||
@@ -295,9 +322,9 @@ static void arc_pmu_stop(struct perf_event *event, int flags)
|
|||||||
* Reset interrupt flag by writing of 1. This is required
|
* Reset interrupt flag by writing of 1. This is required
|
||||||
* to make sure pending interrupt was not left.
|
* to make sure pending interrupt was not left.
|
||||||
*/
|
*/
|
||||||
write_aux_reg(ARC_REG_PCT_INT_ACT, 1 << idx);
|
write_aux_reg(ARC_REG_PCT_INT_ACT, BIT(idx));
|
||||||
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
||||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) & ~(1 << idx));
|
read_aux_reg(ARC_REG_PCT_INT_CTRL) & ~BIT(idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(event->hw.state & PERF_HES_STOPPED)) {
|
if (!(event->hw.state & PERF_HES_STOPPED)) {
|
||||||
@@ -349,9 +376,10 @@ static int arc_pmu_add(struct perf_event *event, int flags)
|
|||||||
|
|
||||||
if (is_sampling_event(event)) {
|
if (is_sampling_event(event)) {
|
||||||
/* Mimic full counter overflow as other arches do */
|
/* Mimic full counter overflow as other arches do */
|
||||||
write_aux_reg(ARC_REG_PCT_INT_CNTL, (u32)arc_pmu->max_period);
|
write_aux_reg(ARC_REG_PCT_INT_CNTL,
|
||||||
|
lower_32_bits(arc_pmu->max_period));
|
||||||
write_aux_reg(ARC_REG_PCT_INT_CNTH,
|
write_aux_reg(ARC_REG_PCT_INT_CNTH,
|
||||||
(arc_pmu->max_period >> 32));
|
upper_32_bits(arc_pmu->max_period));
|
||||||
}
|
}
|
||||||
|
|
||||||
write_aux_reg(ARC_REG_PCT_CONFIG, 0);
|
write_aux_reg(ARC_REG_PCT_CONFIG, 0);
|
||||||
@@ -392,7 +420,7 @@ static irqreturn_t arc_pmu_intr(int irq, void *dev)
|
|||||||
idx = __ffs(active_ints);
|
idx = __ffs(active_ints);
|
||||||
|
|
||||||
/* Reset interrupt flag by writing of 1 */
|
/* Reset interrupt flag by writing of 1 */
|
||||||
write_aux_reg(ARC_REG_PCT_INT_ACT, 1 << idx);
|
write_aux_reg(ARC_REG_PCT_INT_ACT, BIT(idx));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On reset of "interrupt active" bit corresponding
|
* On reset of "interrupt active" bit corresponding
|
||||||
@@ -400,7 +428,7 @@ static irqreturn_t arc_pmu_intr(int irq, void *dev)
|
|||||||
* Now we need to re-enable interrupt for the counter.
|
* Now we need to re-enable interrupt for the counter.
|
||||||
*/
|
*/
|
||||||
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
||||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) | (1 << idx));
|
read_aux_reg(ARC_REG_PCT_INT_CTRL) | BIT(idx));
|
||||||
|
|
||||||
event = pmu_cpu->act_counter[idx];
|
event = pmu_cpu->act_counter[idx];
|
||||||
hwc = &event->hw;
|
hwc = &event->hw;
|
||||||
@@ -414,7 +442,7 @@ static irqreturn_t arc_pmu_intr(int irq, void *dev)
|
|||||||
arc_pmu_stop(event, 0);
|
arc_pmu_stop(event, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
active_ints &= ~(1U << idx);
|
active_ints &= ~BIT(idx);
|
||||||
} while (active_ints);
|
} while (active_ints);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@@ -441,19 +469,108 @@ static void arc_cpu_pmu_irq_init(void *data)
|
|||||||
write_aux_reg(ARC_REG_PCT_INT_ACT, 0xffffffff);
|
write_aux_reg(ARC_REG_PCT_INT_ACT, 0xffffffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Event field occupies the bottom 15 bits of our config field */
|
||||||
|
PMU_FORMAT_ATTR(event, "config:0-14");
|
||||||
|
static struct attribute *arc_pmu_format_attrs[] = {
|
||||||
|
&format_attr_event.attr,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct attribute_group arc_pmu_format_attr_gr = {
|
||||||
|
.name = "format",
|
||||||
|
.attrs = arc_pmu_format_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
|
static ssize_t arc_pmu_events_sysfs_show(struct device *dev,
|
||||||
|
struct device_attribute *attr,
|
||||||
|
char *page)
|
||||||
|
{
|
||||||
|
struct perf_pmu_events_attr *pmu_attr;
|
||||||
|
|
||||||
|
pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr);
|
||||||
|
return sprintf(page, "event=0x%04llx\n", pmu_attr->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We don't add attrs here as we don't have pre-defined list of perf events.
|
||||||
|
* We will generate and add attrs dynamically in probe() after we read HW
|
||||||
|
* configuration.
|
||||||
|
*/
|
||||||
|
static struct attribute_group arc_pmu_events_attr_gr = {
|
||||||
|
.name = "events",
|
||||||
|
};
|
||||||
|
|
||||||
|
static void arc_pmu_add_raw_event_attr(int j, char *str)
|
||||||
|
{
|
||||||
|
memmove(arc_pmu->raw_entry[j].name, str, ARCPMU_EVENT_NAME_LEN - 1);
|
||||||
|
arc_pmu->attr[j].attr.attr.name = arc_pmu->raw_entry[j].name;
|
||||||
|
arc_pmu->attr[j].attr.attr.mode = VERIFY_OCTAL_PERMISSIONS(0444);
|
||||||
|
arc_pmu->attr[j].attr.show = arc_pmu_events_sysfs_show;
|
||||||
|
arc_pmu->attr[j].id = j;
|
||||||
|
arc_pmu->attrs[j] = &(arc_pmu->attr[j].attr.attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int arc_pmu_raw_alloc(struct device *dev)
|
||||||
|
{
|
||||||
|
arc_pmu->attr = devm_kmalloc_array(dev, arc_pmu->n_events + 1,
|
||||||
|
sizeof(*arc_pmu->attr), GFP_KERNEL | __GFP_ZERO);
|
||||||
|
if (!arc_pmu->attr)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
arc_pmu->attrs = devm_kmalloc_array(dev, arc_pmu->n_events + 1,
|
||||||
|
sizeof(*arc_pmu->attrs), GFP_KERNEL | __GFP_ZERO);
|
||||||
|
if (!arc_pmu->attrs)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
arc_pmu->raw_entry = devm_kmalloc_array(dev, arc_pmu->n_events,
|
||||||
|
sizeof(*arc_pmu->raw_entry), GFP_KERNEL | __GFP_ZERO);
|
||||||
|
if (!arc_pmu->raw_entry)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool event_in_hw_event_map(int i, char *name)
|
||||||
|
{
|
||||||
|
if (!arc_pmu_ev_hw_map[i])
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!strlen(arc_pmu_ev_hw_map[i]))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (strcmp(arc_pmu_ev_hw_map[i], name))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void arc_pmu_map_hw_event(int j, char *str)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* See if HW condition has been mapped to a perf event_id */
|
||||||
|
for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) {
|
||||||
|
if (event_in_hw_event_map(i, str)) {
|
||||||
|
pr_debug("mapping perf event %2d to h/w event \'%8s\' (idx %d)\n",
|
||||||
|
i, str, j);
|
||||||
|
arc_pmu->ev_hw_idx[i] = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int arc_pmu_device_probe(struct platform_device *pdev)
|
static int arc_pmu_device_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct arc_reg_pct_build pct_bcr;
|
struct arc_reg_pct_build pct_bcr;
|
||||||
struct arc_reg_cc_build cc_bcr;
|
struct arc_reg_cc_build cc_bcr;
|
||||||
int i, j, has_interrupts;
|
int i, has_interrupts;
|
||||||
int counter_size; /* in bits */
|
int counter_size; /* in bits */
|
||||||
|
|
||||||
union cc_name {
|
union cc_name {
|
||||||
struct {
|
struct {
|
||||||
uint32_t word0, word1;
|
u32 word0, word1;
|
||||||
char sentinel;
|
char sentinel;
|
||||||
} indiv;
|
} indiv;
|
||||||
char str[9];
|
char str[ARCPMU_EVENT_NAME_LEN];
|
||||||
} cc_name;
|
} cc_name;
|
||||||
|
|
||||||
|
|
||||||
@@ -463,15 +580,22 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
BUILD_BUG_ON(ARC_PERF_MAX_COUNTERS > 32);
|
BUILD_BUG_ON(ARC_PERF_MAX_COUNTERS > 32);
|
||||||
BUG_ON(pct_bcr.c > ARC_PERF_MAX_COUNTERS);
|
if (WARN_ON(pct_bcr.c > ARC_PERF_MAX_COUNTERS))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
READ_BCR(ARC_REG_CC_BUILD, cc_bcr);
|
READ_BCR(ARC_REG_CC_BUILD, cc_bcr);
|
||||||
BUG_ON(!cc_bcr.v); /* Counters exist but No countable conditions ? */
|
if (WARN(!cc_bcr.v, "Counters exist but No countable conditions?"))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
arc_pmu = devm_kzalloc(&pdev->dev, sizeof(struct arc_pmu), GFP_KERNEL);
|
arc_pmu = devm_kzalloc(&pdev->dev, sizeof(struct arc_pmu), GFP_KERNEL);
|
||||||
if (!arc_pmu)
|
if (!arc_pmu)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
arc_pmu->n_events = cc_bcr.c;
|
||||||
|
|
||||||
|
if (arc_pmu_raw_alloc(&pdev->dev))
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
has_interrupts = is_isa_arcv2() ? pct_bcr.i : 0;
|
has_interrupts = is_isa_arcv2() ? pct_bcr.i : 0;
|
||||||
|
|
||||||
arc_pmu->n_counters = pct_bcr.c;
|
arc_pmu->n_counters = pct_bcr.c;
|
||||||
@@ -481,30 +605,26 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
pr_info("ARC perf\t: %d counters (%d bits), %d conditions%s\n",
|
pr_info("ARC perf\t: %d counters (%d bits), %d conditions%s\n",
|
||||||
arc_pmu->n_counters, counter_size, cc_bcr.c,
|
arc_pmu->n_counters, counter_size, cc_bcr.c,
|
||||||
has_interrupts ? ", [overflow IRQ support]":"");
|
has_interrupts ? ", [overflow IRQ support]" : "");
|
||||||
|
|
||||||
cc_name.str[8] = 0;
|
cc_name.str[ARCPMU_EVENT_NAME_LEN - 1] = 0;
|
||||||
for (i = 0; i < PERF_COUNT_ARC_HW_MAX; i++)
|
for (i = 0; i < PERF_COUNT_ARC_HW_MAX; i++)
|
||||||
arc_pmu->ev_hw_idx[i] = -1;
|
arc_pmu->ev_hw_idx[i] = -1;
|
||||||
|
|
||||||
/* loop thru all available h/w condition indexes */
|
/* loop thru all available h/w condition indexes */
|
||||||
for (j = 0; j < cc_bcr.c; j++) {
|
for (i = 0; i < cc_bcr.c; i++) {
|
||||||
write_aux_reg(ARC_REG_CC_INDEX, j);
|
write_aux_reg(ARC_REG_CC_INDEX, i);
|
||||||
cc_name.indiv.word0 = read_aux_reg(ARC_REG_CC_NAME0);
|
cc_name.indiv.word0 = read_aux_reg(ARC_REG_CC_NAME0);
|
||||||
cc_name.indiv.word1 = read_aux_reg(ARC_REG_CC_NAME1);
|
cc_name.indiv.word1 = read_aux_reg(ARC_REG_CC_NAME1);
|
||||||
|
|
||||||
/* See if it has been mapped to a perf event_id */
|
arc_pmu_map_hw_event(i, cc_name.str);
|
||||||
for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) {
|
arc_pmu_add_raw_event_attr(i, cc_name.str);
|
||||||
if (arc_pmu_ev_hw_map[i] &&
|
|
||||||
!strcmp(arc_pmu_ev_hw_map[i], cc_name.str) &&
|
|
||||||
strlen(arc_pmu_ev_hw_map[i])) {
|
|
||||||
pr_debug("mapping perf event %2d to h/w event \'%8s\' (idx %d)\n",
|
|
||||||
i, cc_name.str, j);
|
|
||||||
arc_pmu->ev_hw_idx[i] = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
arc_pmu_events_attr_gr.attrs = arc_pmu->attrs;
|
||||||
|
arc_pmu->attr_groups[ARCPMU_ATTR_GR_EVENTS] = &arc_pmu_events_attr_gr;
|
||||||
|
arc_pmu->attr_groups[ARCPMU_ATTR_GR_FORMATS] = &arc_pmu_format_attr_gr;
|
||||||
|
|
||||||
arc_pmu->pmu = (struct pmu) {
|
arc_pmu->pmu = (struct pmu) {
|
||||||
.pmu_enable = arc_pmu_enable,
|
.pmu_enable = arc_pmu_enable,
|
||||||
.pmu_disable = arc_pmu_disable,
|
.pmu_disable = arc_pmu_disable,
|
||||||
@@ -514,6 +634,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||||||
.start = arc_pmu_start,
|
.start = arc_pmu_start,
|
||||||
.stop = arc_pmu_stop,
|
.stop = arc_pmu_stop,
|
||||||
.read = arc_pmu_read,
|
.read = arc_pmu_read,
|
||||||
|
.attr_groups = arc_pmu->attr_groups,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (has_interrupts) {
|
if (has_interrupts) {
|
||||||
@@ -535,17 +656,19 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||||||
} else
|
} else
|
||||||
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
|
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
|
||||||
|
|
||||||
return perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
|
/*
|
||||||
|
* perf parser doesn't really like '-' symbol in events name, so let's
|
||||||
|
* use '_' in arc pct name as it goes to kernel PMU event prefix.
|
||||||
|
*/
|
||||||
|
return perf_pmu_register(&arc_pmu->pmu, "arc_pct", PERF_TYPE_RAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
|
||||||
static const struct of_device_id arc_pmu_match[] = {
|
static const struct of_device_id arc_pmu_match[] = {
|
||||||
{ .compatible = "snps,arc700-pct" },
|
{ .compatible = "snps,arc700-pct" },
|
||||||
{ .compatible = "snps,archs-pct" },
|
{ .compatible = "snps,archs-pct" },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, arc_pmu_match);
|
MODULE_DEVICE_TABLE(of, arc_pmu_match);
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct platform_driver arc_pmu_driver = {
|
static struct platform_driver arc_pmu_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ static void read_arc_build_cfg_regs(void)
|
|||||||
struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
|
struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
|
||||||
const struct id_to_str *tbl;
|
const struct id_to_str *tbl;
|
||||||
struct bcr_isa_arcv2 isa;
|
struct bcr_isa_arcv2 isa;
|
||||||
|
struct bcr_actionpoint ap;
|
||||||
|
|
||||||
FIX_PTR(cpu);
|
FIX_PTR(cpu);
|
||||||
|
|
||||||
@@ -195,6 +196,7 @@ static void read_arc_build_cfg_regs(void)
|
|||||||
cpu->bpu.full = bpu.ft;
|
cpu->bpu.full = bpu.ft;
|
||||||
cpu->bpu.num_cache = 256 << bpu.bce;
|
cpu->bpu.num_cache = 256 << bpu.bce;
|
||||||
cpu->bpu.num_pred = 2048 << bpu.pte;
|
cpu->bpu.num_pred = 2048 << bpu.pte;
|
||||||
|
cpu->bpu.ret_stk = 4 << bpu.rse;
|
||||||
|
|
||||||
if (cpu->core.family >= 0x54) {
|
if (cpu->core.family >= 0x54) {
|
||||||
unsigned int exec_ctrl;
|
unsigned int exec_ctrl;
|
||||||
@@ -207,8 +209,11 @@ static void read_arc_build_cfg_regs(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
READ_BCR(ARC_REG_AP_BCR, bcr);
|
READ_BCR(ARC_REG_AP_BCR, ap);
|
||||||
cpu->extn.ap = bcr.ver ? 1 : 0;
|
if (ap.ver) {
|
||||||
|
cpu->extn.ap_num = 2 << ap.num;
|
||||||
|
cpu->extn.ap_full = !!ap.min;
|
||||||
|
}
|
||||||
|
|
||||||
READ_BCR(ARC_REG_SMART_BCR, bcr);
|
READ_BCR(ARC_REG_SMART_BCR, bcr);
|
||||||
cpu->extn.smart = bcr.ver ? 1 : 0;
|
cpu->extn.smart = bcr.ver ? 1 : 0;
|
||||||
@@ -216,8 +221,6 @@ static void read_arc_build_cfg_regs(void)
|
|||||||
READ_BCR(ARC_REG_RTT_BCR, bcr);
|
READ_BCR(ARC_REG_RTT_BCR, bcr);
|
||||||
cpu->extn.rtt = bcr.ver ? 1 : 0;
|
cpu->extn.rtt = bcr.ver ? 1 : 0;
|
||||||
|
|
||||||
cpu->extn.debug = cpu->extn.ap | cpu->extn.smart | cpu->extn.rtt;
|
|
||||||
|
|
||||||
READ_BCR(ARC_REG_ISA_CFG_BCR, isa);
|
READ_BCR(ARC_REG_ISA_CFG_BCR, isa);
|
||||||
|
|
||||||
/* some hacks for lack of feature BCR info in old ARC700 cores */
|
/* some hacks for lack of feature BCR info in old ARC700 cores */
|
||||||
@@ -299,10 +302,10 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
|
|||||||
|
|
||||||
if (cpu->bpu.ver)
|
if (cpu->bpu.ver)
|
||||||
n += scnprintf(buf + n, len - n,
|
n += scnprintf(buf + n, len - n,
|
||||||
"BPU\t\t: %s%s match, cache:%d, Predict Table:%d",
|
"BPU\t\t: %s%s match, cache:%d, Predict Table:%d Return stk: %d",
|
||||||
IS_AVAIL1(cpu->bpu.full, "full"),
|
IS_AVAIL1(cpu->bpu.full, "full"),
|
||||||
IS_AVAIL1(!cpu->bpu.full, "partial"),
|
IS_AVAIL1(!cpu->bpu.full, "partial"),
|
||||||
cpu->bpu.num_cache, cpu->bpu.num_pred);
|
cpu->bpu.num_cache, cpu->bpu.num_pred, cpu->bpu.ret_stk);
|
||||||
|
|
||||||
if (is_isa_arcv2()) {
|
if (is_isa_arcv2()) {
|
||||||
struct bcr_lpb lpb;
|
struct bcr_lpb lpb;
|
||||||
@@ -336,11 +339,17 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
|
|||||||
IS_AVAIL1(cpu->extn.fpu_sp, "SP "),
|
IS_AVAIL1(cpu->extn.fpu_sp, "SP "),
|
||||||
IS_AVAIL1(cpu->extn.fpu_dp, "DP "));
|
IS_AVAIL1(cpu->extn.fpu_dp, "DP "));
|
||||||
|
|
||||||
if (cpu->extn.debug)
|
if (cpu->extn.ap_num | cpu->extn.smart | cpu->extn.rtt) {
|
||||||
n += scnprintf(buf + n, len - n, "DEBUG\t\t: %s%s%s\n",
|
n += scnprintf(buf + n, len - n, "DEBUG\t\t: %s%s",
|
||||||
IS_AVAIL1(cpu->extn.ap, "ActionPoint "),
|
|
||||||
IS_AVAIL1(cpu->extn.smart, "smaRT "),
|
IS_AVAIL1(cpu->extn.smart, "smaRT "),
|
||||||
IS_AVAIL1(cpu->extn.rtt, "RTT "));
|
IS_AVAIL1(cpu->extn.rtt, "RTT "));
|
||||||
|
if (cpu->extn.ap_num) {
|
||||||
|
n += scnprintf(buf + n, len - n, "ActionPoint %d/%s",
|
||||||
|
cpu->extn.ap_num,
|
||||||
|
cpu->extn.ap_full ? "full":"min");
|
||||||
|
}
|
||||||
|
n += scnprintf(buf + n, len - n, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (cpu->dccm.sz || cpu->iccm.sz)
|
if (cpu->dccm.sz || cpu->iccm.sz)
|
||||||
n += scnprintf(buf + n, len - n, "Extn [CCM]\t: DCCM @ %x, %d KB / ICCM: @ %x, %d KB\n",
|
n += scnprintf(buf + n, len - n, "Extn [CCM]\t: DCCM @ %x, %d KB / ICCM: @ %x, %d KB\n",
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#include <asm/arcregs.h>
|
#include <asm/arcregs.h>
|
||||||
#include <asm/irqflags.h>
|
#include <asm/irqflags.h>
|
||||||
|
|
||||||
|
#define ARC_PATH_MAX 256
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Common routine to print scratch regs (r0-r12) or callee regs (r13-r25)
|
* Common routine to print scratch regs (r0-r12) or callee regs (r13-r25)
|
||||||
* -Prints 3 regs per line and a CR.
|
* -Prints 3 regs per line and a CR.
|
||||||
@@ -58,11 +60,12 @@ static void show_callee_regs(struct callee_regs *cregs)
|
|||||||
print_reg_file(&(cregs->r13), 13);
|
print_reg_file(&(cregs->r13), 13);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_task_path_n_nm(struct task_struct *tsk, char *buf)
|
static void print_task_path_n_nm(struct task_struct *tsk)
|
||||||
{
|
{
|
||||||
char *path_nm = NULL;
|
char *path_nm = NULL;
|
||||||
struct mm_struct *mm;
|
struct mm_struct *mm;
|
||||||
struct file *exe_file;
|
struct file *exe_file;
|
||||||
|
char buf[ARC_PATH_MAX];
|
||||||
|
|
||||||
mm = get_task_mm(tsk);
|
mm = get_task_mm(tsk);
|
||||||
if (!mm)
|
if (!mm)
|
||||||
@@ -72,7 +75,7 @@ static void print_task_path_n_nm(struct task_struct *tsk, char *buf)
|
|||||||
mmput(mm);
|
mmput(mm);
|
||||||
|
|
||||||
if (exe_file) {
|
if (exe_file) {
|
||||||
path_nm = file_path(exe_file, buf, 255);
|
path_nm = file_path(exe_file, buf, ARC_PATH_MAX-1);
|
||||||
fput(exe_file);
|
fput(exe_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,10 +83,9 @@ done:
|
|||||||
pr_info("Path: %s\n", !IS_ERR(path_nm) ? path_nm : "?");
|
pr_info("Path: %s\n", !IS_ERR(path_nm) ? path_nm : "?");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_faulting_vma(unsigned long address, char *buf)
|
static void show_faulting_vma(unsigned long address)
|
||||||
{
|
{
|
||||||
struct vm_area_struct *vma;
|
struct vm_area_struct *vma;
|
||||||
char *nm = buf;
|
|
||||||
struct mm_struct *active_mm = current->active_mm;
|
struct mm_struct *active_mm = current->active_mm;
|
||||||
|
|
||||||
/* can't use print_vma_addr() yet as it doesn't check for
|
/* can't use print_vma_addr() yet as it doesn't check for
|
||||||
@@ -96,8 +98,11 @@ static void show_faulting_vma(unsigned long address, char *buf)
|
|||||||
* if the container VMA is not found
|
* if the container VMA is not found
|
||||||
*/
|
*/
|
||||||
if (vma && (vma->vm_start <= address)) {
|
if (vma && (vma->vm_start <= address)) {
|
||||||
|
char buf[ARC_PATH_MAX];
|
||||||
|
char *nm = "?";
|
||||||
|
|
||||||
if (vma->vm_file) {
|
if (vma->vm_file) {
|
||||||
nm = file_path(vma->vm_file, buf, PAGE_SIZE - 1);
|
nm = file_path(vma->vm_file, buf, ARC_PATH_MAX-1);
|
||||||
if (IS_ERR(nm))
|
if (IS_ERR(nm))
|
||||||
nm = "?";
|
nm = "?";
|
||||||
}
|
}
|
||||||
@@ -173,13 +178,14 @@ void show_regs(struct pt_regs *regs)
|
|||||||
{
|
{
|
||||||
struct task_struct *tsk = current;
|
struct task_struct *tsk = current;
|
||||||
struct callee_regs *cregs;
|
struct callee_regs *cregs;
|
||||||
char *buf;
|
|
||||||
|
|
||||||
buf = (char *)__get_free_page(GFP_KERNEL);
|
/*
|
||||||
if (!buf)
|
* generic code calls us with preemption disabled, but some calls
|
||||||
return;
|
* here could sleep, so re-enable to avoid lockdep splat
|
||||||
|
*/
|
||||||
|
preempt_enable();
|
||||||
|
|
||||||
print_task_path_n_nm(tsk, buf);
|
print_task_path_n_nm(tsk);
|
||||||
show_regs_print_info(KERN_INFO);
|
show_regs_print_info(KERN_INFO);
|
||||||
|
|
||||||
show_ecr_verbose(regs);
|
show_ecr_verbose(regs);
|
||||||
@@ -189,7 +195,7 @@ void show_regs(struct pt_regs *regs)
|
|||||||
(void *)regs->blink, (void *)regs->ret);
|
(void *)regs->blink, (void *)regs->ret);
|
||||||
|
|
||||||
if (user_mode(regs))
|
if (user_mode(regs))
|
||||||
show_faulting_vma(regs->ret, buf); /* faulting code, not data */
|
show_faulting_vma(regs->ret); /* faulting code, not data */
|
||||||
|
|
||||||
pr_info("[STAT32]: 0x%08lx", regs->status32);
|
pr_info("[STAT32]: 0x%08lx", regs->status32);
|
||||||
|
|
||||||
@@ -222,7 +228,7 @@ void show_regs(struct pt_regs *regs)
|
|||||||
if (cregs)
|
if (cregs)
|
||||||
show_callee_regs(cregs);
|
show_callee_regs(cregs);
|
||||||
|
|
||||||
free_page((unsigned long)buf);
|
preempt_disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
|
void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
|
||||||
|
|||||||
@@ -7,11 +7,39 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
|
#include <asm/cache.h>
|
||||||
|
|
||||||
#undef PREALLOC_NOT_AVAIL
|
/*
|
||||||
|
* The memset implementation below is optimized to use prefetchw and prealloc
|
||||||
|
* instruction in case of CPU with 64B L1 data cache line (L1_CACHE_SHIFT == 6)
|
||||||
|
* If you want to implement optimized memset for other possible L1 data cache
|
||||||
|
* line lengths (32B and 128B) you should rewrite code carefully checking
|
||||||
|
* we don't call any prefetchw/prealloc instruction for L1 cache lines which
|
||||||
|
* don't belongs to memset area.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if L1_CACHE_SHIFT == 6
|
||||||
|
|
||||||
|
.macro PREALLOC_INSTR reg, off
|
||||||
|
prealloc [\reg, \off]
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro PREFETCHW_INSTR reg, off
|
||||||
|
prefetchw [\reg, \off]
|
||||||
|
.endm
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
.macro PREALLOC_INSTR
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro PREFETCHW_INSTR
|
||||||
|
.endm
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
ENTRY_CFI(memset)
|
ENTRY_CFI(memset)
|
||||||
prefetchw [r0] ; Prefetch the write location
|
PREFETCHW_INSTR r0, 0 ; Prefetch the first write location
|
||||||
mov.f 0, r2
|
mov.f 0, r2
|
||||||
;;; if size is zero
|
;;; if size is zero
|
||||||
jz.d [blink]
|
jz.d [blink]
|
||||||
@@ -48,11 +76,8 @@ ENTRY_CFI(memset)
|
|||||||
|
|
||||||
lpnz @.Lset64bytes
|
lpnz @.Lset64bytes
|
||||||
;; LOOP START
|
;; LOOP START
|
||||||
#ifdef PREALLOC_NOT_AVAIL
|
PREALLOC_INSTR r3, 64 ; alloc next line w/o fetching
|
||||||
prefetchw [r3, 64] ;Prefetch the next write location
|
|
||||||
#else
|
|
||||||
prealloc [r3, 64]
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_ARC_HAS_LL64
|
#ifdef CONFIG_ARC_HAS_LL64
|
||||||
std.ab r4, [r3, 8]
|
std.ab r4, [r3, 8]
|
||||||
std.ab r4, [r3, 8]
|
std.ab r4, [r3, 8]
|
||||||
@@ -85,7 +110,6 @@ ENTRY_CFI(memset)
|
|||||||
lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes
|
lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes
|
||||||
lpnz .Lset32bytes
|
lpnz .Lset32bytes
|
||||||
;; LOOP START
|
;; LOOP START
|
||||||
prefetchw [r3, 32] ;Prefetch the next write location
|
|
||||||
#ifdef CONFIG_ARC_HAS_LL64
|
#ifdef CONFIG_ARC_HAS_LL64
|
||||||
std.ab r4, [r3, 8]
|
std.ab r4, [r3, 8]
|
||||||
std.ab r4, [r3, 8]
|
std.ab r4, [r3, 8]
|
||||||
|
|||||||
@@ -141,12 +141,17 @@ good_area:
|
|||||||
*/
|
*/
|
||||||
fault = handle_mm_fault(vma, address, flags);
|
fault = handle_mm_fault(vma, address, flags);
|
||||||
|
|
||||||
/* If Pagefault was interrupted by SIGKILL, exit page fault "early" */
|
|
||||||
if (fatal_signal_pending(current)) {
|
if (fatal_signal_pending(current)) {
|
||||||
if ((fault & VM_FAULT_ERROR) && !(fault & VM_FAULT_RETRY))
|
|
||||||
up_read(&mm->mmap_sem);
|
/*
|
||||||
if (user_mode(regs))
|
* if fault retry, mmap_sem already relinquished by core mm
|
||||||
|
* so OK to return to user mode (with signal handled first)
|
||||||
|
*/
|
||||||
|
if (fault & VM_FAULT_RETRY) {
|
||||||
|
if (!user_mode(regs))
|
||||||
|
goto no_context;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
|
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
|
||||||
|
|||||||
@@ -119,7 +119,8 @@ void __init setup_arch_memory(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
memblock_add_node(low_mem_start, low_mem_sz, 0);
|
memblock_add_node(low_mem_start, low_mem_sz, 0);
|
||||||
memblock_reserve(low_mem_start, __pa(_end) - low_mem_start);
|
memblock_reserve(CONFIG_LINUX_LINK_BASE,
|
||||||
|
__pa(_end) - CONFIG_LINUX_LINK_BASE);
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
if (phys_initrd_size) {
|
if (phys_initrd_size) {
|
||||||
|
|||||||
@@ -1 +1,95 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#ifndef _ASM_ARM_XEN_PAGE_COHERENT_H
|
||||||
|
#define _ASM_ARM_XEN_PAGE_COHERENT_H
|
||||||
|
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
|
#include <asm/page.h>
|
||||||
#include <xen/arm/page-coherent.h>
|
#include <xen/arm/page-coherent.h>
|
||||||
|
|
||||||
|
static inline const struct dma_map_ops *xen_get_dma_ops(struct device *dev)
|
||||||
|
{
|
||||||
|
if (dev && dev->archdata.dev_dma_ops)
|
||||||
|
return dev->archdata.dev_dma_ops;
|
||||||
|
return get_arch_dma_ops(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size,
|
||||||
|
dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs)
|
||||||
|
{
|
||||||
|
return xen_get_dma_ops(hwdev)->alloc(hwdev, size, dma_handle, flags, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_free_coherent_pages(struct device *hwdev, size_t size,
|
||||||
|
void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs)
|
||||||
|
{
|
||||||
|
xen_get_dma_ops(hwdev)->free(hwdev, size, cpu_addr, dma_handle, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_dma_map_page(struct device *hwdev, struct page *page,
|
||||||
|
dma_addr_t dev_addr, unsigned long offset, size_t size,
|
||||||
|
enum dma_data_direction dir, unsigned long attrs)
|
||||||
|
{
|
||||||
|
unsigned long page_pfn = page_to_xen_pfn(page);
|
||||||
|
unsigned long dev_pfn = XEN_PFN_DOWN(dev_addr);
|
||||||
|
unsigned long compound_pages =
|
||||||
|
(1<<compound_order(page)) * XEN_PFN_PER_PAGE;
|
||||||
|
bool local = (page_pfn <= dev_pfn) &&
|
||||||
|
(dev_pfn - page_pfn < compound_pages);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dom0 is mapped 1:1, while the Linux page can span across
|
||||||
|
* multiple Xen pages, it's not possible for it to contain a
|
||||||
|
* mix of local and foreign Xen pages. So if the first xen_pfn
|
||||||
|
* == mfn the page is local otherwise it's a foreign page
|
||||||
|
* grant-mapped in dom0. If the page is local we can safely
|
||||||
|
* call the native dma_ops function, otherwise we call the xen
|
||||||
|
* specific function.
|
||||||
|
*/
|
||||||
|
if (local)
|
||||||
|
xen_get_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs);
|
||||||
|
else
|
||||||
|
__xen_dma_map_page(hwdev, page, dev_addr, offset, size, dir, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
|
||||||
|
size_t size, enum dma_data_direction dir, unsigned long attrs)
|
||||||
|
{
|
||||||
|
unsigned long pfn = PFN_DOWN(handle);
|
||||||
|
/*
|
||||||
|
* Dom0 is mapped 1:1, while the Linux page can be spanned accross
|
||||||
|
* multiple Xen page, it's not possible to have a mix of local and
|
||||||
|
* foreign Xen page. Dom0 is mapped 1:1, so calling pfn_valid on a
|
||||||
|
* foreign mfn will always return false. If the page is local we can
|
||||||
|
* safely call the native dma_ops function, otherwise we call the xen
|
||||||
|
* specific function.
|
||||||
|
*/
|
||||||
|
if (pfn_valid(pfn)) {
|
||||||
|
if (xen_get_dma_ops(hwdev)->unmap_page)
|
||||||
|
xen_get_dma_ops(hwdev)->unmap_page(hwdev, handle, size, dir, attrs);
|
||||||
|
} else
|
||||||
|
__xen_dma_unmap_page(hwdev, handle, size, dir, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_dma_sync_single_for_cpu(struct device *hwdev,
|
||||||
|
dma_addr_t handle, size_t size, enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
unsigned long pfn = PFN_DOWN(handle);
|
||||||
|
if (pfn_valid(pfn)) {
|
||||||
|
if (xen_get_dma_ops(hwdev)->sync_single_for_cpu)
|
||||||
|
xen_get_dma_ops(hwdev)->sync_single_for_cpu(hwdev, handle, size, dir);
|
||||||
|
} else
|
||||||
|
__xen_dma_sync_single_for_cpu(hwdev, handle, size, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_dma_sync_single_for_device(struct device *hwdev,
|
||||||
|
dma_addr_t handle, size_t size, enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
unsigned long pfn = PFN_DOWN(handle);
|
||||||
|
if (pfn_valid(pfn)) {
|
||||||
|
if (xen_get_dma_ops(hwdev)->sync_single_for_device)
|
||||||
|
xen_get_dma_ops(hwdev)->sync_single_for_device(hwdev, handle, size, dir);
|
||||||
|
} else
|
||||||
|
__xen_dma_sync_single_for_device(hwdev, handle, size, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _ASM_ARM_XEN_PAGE_COHERENT_H */
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ static void __iomem *cns3xxx_pci_map_bus(struct pci_bus *bus,
|
|||||||
} else /* remote PCI bus */
|
} else /* remote PCI bus */
|
||||||
base = cnspci->cfg1_regs + ((busno & 0xf) << 20);
|
base = cnspci->cfg1_regs + ((busno & 0xf) << 20);
|
||||||
|
|
||||||
return base + (where & 0xffc) + (devfn << 12);
|
return base + where + (devfn << 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||||
@@ -93,7 +93,7 @@ static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
|||||||
u32 mask = (0x1ull << (size * 8)) - 1;
|
u32 mask = (0x1ull << (size * 8)) - 1;
|
||||||
int shift = (where % 4) * 8;
|
int shift = (where % 4) * 8;
|
||||||
|
|
||||||
ret = pci_generic_config_read32(bus, devfn, where, size, val);
|
ret = pci_generic_config_read(bus, devfn, where, size, val);
|
||||||
|
|
||||||
if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn &&
|
if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn &&
|
||||||
(where & 0xffc) == PCI_CLASS_REVISION)
|
(where & 0xffc) == PCI_CLASS_REVISION)
|
||||||
|
|||||||
@@ -60,8 +60,6 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_KASAN_SW_TAGS
|
#ifdef CONFIG_KASAN_SW_TAGS
|
||||||
#define ARCH_SLAB_MINALIGN (1ULL << KASAN_SHADOW_SCALE_SHIFT)
|
#define ARCH_SLAB_MINALIGN (1ULL << KASAN_SHADOW_SCALE_SHIFT)
|
||||||
#else
|
|
||||||
#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ struct dev_archdata {
|
|||||||
#ifdef CONFIG_IOMMU_API
|
#ifdef CONFIG_IOMMU_API
|
||||||
void *iommu; /* private IOMMU data */
|
void *iommu; /* private IOMMU data */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_XEN
|
|
||||||
const struct dma_map_ops *dev_dma_ops;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pdev_archdata {
|
struct pdev_archdata {
|
||||||
|
|||||||
@@ -60,8 +60,11 @@ static inline bool arm64_kernel_use_ng_mappings(void)
|
|||||||
* later determine that kpti is required, then
|
* later determine that kpti is required, then
|
||||||
* kpti_install_ng_mappings() will make them non-global.
|
* kpti_install_ng_mappings() will make them non-global.
|
||||||
*/
|
*/
|
||||||
|
if (arm64_kernel_unmapped_at_el0())
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_RANDOMIZE_BASE))
|
if (!IS_ENABLED(CONFIG_RANDOMIZE_BASE))
|
||||||
return arm64_kernel_unmapped_at_el0();
|
return false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* KASLR is enabled so we're going to be enabling kpti on non-broken
|
* KASLR is enabled so we're going to be enabling kpti on non-broken
|
||||||
|
|||||||
@@ -1 +1,77 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#ifndef _ASM_ARM64_XEN_PAGE_COHERENT_H
|
||||||
|
#define _ASM_ARM64_XEN_PAGE_COHERENT_H
|
||||||
|
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
|
#include <asm/page.h>
|
||||||
#include <xen/arm/page-coherent.h>
|
#include <xen/arm/page-coherent.h>
|
||||||
|
|
||||||
|
static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size,
|
||||||
|
dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs)
|
||||||
|
{
|
||||||
|
return dma_direct_alloc(hwdev, size, dma_handle, flags, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_free_coherent_pages(struct device *hwdev, size_t size,
|
||||||
|
void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs)
|
||||||
|
{
|
||||||
|
dma_direct_free(hwdev, size, cpu_addr, dma_handle, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_dma_sync_single_for_cpu(struct device *hwdev,
|
||||||
|
dma_addr_t handle, size_t size, enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
unsigned long pfn = PFN_DOWN(handle);
|
||||||
|
|
||||||
|
if (pfn_valid(pfn))
|
||||||
|
dma_direct_sync_single_for_cpu(hwdev, handle, size, dir);
|
||||||
|
else
|
||||||
|
__xen_dma_sync_single_for_cpu(hwdev, handle, size, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_dma_sync_single_for_device(struct device *hwdev,
|
||||||
|
dma_addr_t handle, size_t size, enum dma_data_direction dir)
|
||||||
|
{
|
||||||
|
unsigned long pfn = PFN_DOWN(handle);
|
||||||
|
if (pfn_valid(pfn))
|
||||||
|
dma_direct_sync_single_for_device(hwdev, handle, size, dir);
|
||||||
|
else
|
||||||
|
__xen_dma_sync_single_for_device(hwdev, handle, size, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_dma_map_page(struct device *hwdev, struct page *page,
|
||||||
|
dma_addr_t dev_addr, unsigned long offset, size_t size,
|
||||||
|
enum dma_data_direction dir, unsigned long attrs)
|
||||||
|
{
|
||||||
|
unsigned long page_pfn = page_to_xen_pfn(page);
|
||||||
|
unsigned long dev_pfn = XEN_PFN_DOWN(dev_addr);
|
||||||
|
unsigned long compound_pages =
|
||||||
|
(1<<compound_order(page)) * XEN_PFN_PER_PAGE;
|
||||||
|
bool local = (page_pfn <= dev_pfn) &&
|
||||||
|
(dev_pfn - page_pfn < compound_pages);
|
||||||
|
|
||||||
|
if (local)
|
||||||
|
dma_direct_map_page(hwdev, page, offset, size, dir, attrs);
|
||||||
|
else
|
||||||
|
__xen_dma_map_page(hwdev, page, dev_addr, offset, size, dir, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
|
||||||
|
size_t size, enum dma_data_direction dir, unsigned long attrs)
|
||||||
|
{
|
||||||
|
unsigned long pfn = PFN_DOWN(handle);
|
||||||
|
/*
|
||||||
|
* Dom0 is mapped 1:1, while the Linux page can be spanned accross
|
||||||
|
* multiple Xen page, it's not possible to have a mix of local and
|
||||||
|
* foreign Xen page. Dom0 is mapped 1:1, so calling pfn_valid on a
|
||||||
|
* foreign mfn will always return false. If the page is local we can
|
||||||
|
* safely call the native dma_ops function, otherwise we call the xen
|
||||||
|
* specific function.
|
||||||
|
*/
|
||||||
|
if (pfn_valid(pfn))
|
||||||
|
dma_direct_unmap_page(hwdev, handle, size, dir, attrs);
|
||||||
|
else
|
||||||
|
__xen_dma_unmap_page(hwdev, handle, size, dir, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _ASM_ARM64_XEN_PAGE_COHERENT_H */
|
||||||
|
|||||||
@@ -299,8 +299,10 @@ int swsusp_arch_suspend(void)
|
|||||||
dcache_clean_range(__idmap_text_start, __idmap_text_end);
|
dcache_clean_range(__idmap_text_start, __idmap_text_end);
|
||||||
|
|
||||||
/* Clean kvm setup code to PoC? */
|
/* Clean kvm setup code to PoC? */
|
||||||
if (el2_reset_needed())
|
if (el2_reset_needed()) {
|
||||||
dcache_clean_range(__hyp_idmap_text_start, __hyp_idmap_text_end);
|
dcache_clean_range(__hyp_idmap_text_start, __hyp_idmap_text_end);
|
||||||
|
dcache_clean_range(__hyp_text_start, __hyp_text_end);
|
||||||
|
}
|
||||||
|
|
||||||
/* make the crash dump kernel image protected again */
|
/* make the crash dump kernel image protected again */
|
||||||
crash_post_resume();
|
crash_post_resume();
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
#include <asm/virt.h>
|
#include <asm/virt.h>
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
.pushsection .hyp.text, "ax"
|
||||||
|
|
||||||
.align 11
|
.align 11
|
||||||
|
|
||||||
ENTRY(__hyp_stub_vectors)
|
ENTRY(__hyp_stub_vectors)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/fixmap.h>
|
#include <asm/fixmap.h>
|
||||||
#include <asm/kernel-pgtable.h>
|
#include <asm/kernel-pgtable.h>
|
||||||
#include <asm/memory.h>
|
#include <asm/memory.h>
|
||||||
@@ -43,7 +44,7 @@ static __init u64 get_kaslr_seed(void *fdt)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __init const u8 *get_cmdline(void *fdt)
|
static __init const u8 *kaslr_get_cmdline(void *fdt)
|
||||||
{
|
{
|
||||||
static __initconst const u8 default_cmdline[] = CONFIG_CMDLINE;
|
static __initconst const u8 default_cmdline[] = CONFIG_CMDLINE;
|
||||||
|
|
||||||
@@ -87,6 +88,7 @@ u64 __init kaslr_early_init(u64 dt_phys)
|
|||||||
* we end up running with module randomization disabled.
|
* we end up running with module randomization disabled.
|
||||||
*/
|
*/
|
||||||
module_alloc_base = (u64)_etext - MODULES_VSIZE;
|
module_alloc_base = (u64)_etext - MODULES_VSIZE;
|
||||||
|
__flush_dcache_area(&module_alloc_base, sizeof(module_alloc_base));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to map the FDT early. If this fails, we simply bail,
|
* Try to map the FDT early. If this fails, we simply bail,
|
||||||
@@ -109,7 +111,7 @@ u64 __init kaslr_early_init(u64 dt_phys)
|
|||||||
* Check if 'nokaslr' appears on the command line, and
|
* Check if 'nokaslr' appears on the command line, and
|
||||||
* return 0 if that is the case.
|
* return 0 if that is the case.
|
||||||
*/
|
*/
|
||||||
cmdline = get_cmdline(fdt);
|
cmdline = kaslr_get_cmdline(fdt);
|
||||||
str = strstr(cmdline, "nokaslr");
|
str = strstr(cmdline, "nokaslr");
|
||||||
if (str == cmdline || (str > cmdline && *(str - 1) == ' '))
|
if (str == cmdline || (str > cmdline && *(str - 1) == ' '))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -169,5 +171,8 @@ u64 __init kaslr_early_init(u64 dt_phys)
|
|||||||
module_alloc_base += (module_range * (seed & ((1 << 21) - 1))) >> 21;
|
module_alloc_base += (module_range * (seed & ((1 << 21) - 1))) >> 21;
|
||||||
module_alloc_base &= PAGE_MASK;
|
module_alloc_base &= PAGE_MASK;
|
||||||
|
|
||||||
|
__flush_dcache_area(&module_alloc_base, sizeof(module_alloc_base));
|
||||||
|
__flush_dcache_area(&memstart_offset_seed, sizeof(memstart_offset_seed));
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -478,13 +478,13 @@ bool arch_within_kprobe_blacklist(unsigned long addr)
|
|||||||
addr < (unsigned long)__entry_text_end) ||
|
addr < (unsigned long)__entry_text_end) ||
|
||||||
(addr >= (unsigned long)__idmap_text_start &&
|
(addr >= (unsigned long)__idmap_text_start &&
|
||||||
addr < (unsigned long)__idmap_text_end) ||
|
addr < (unsigned long)__idmap_text_end) ||
|
||||||
|
(addr >= (unsigned long)__hyp_text_start &&
|
||||||
|
addr < (unsigned long)__hyp_text_end) ||
|
||||||
!!search_exception_tables(addr))
|
!!search_exception_tables(addr))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!is_kernel_in_hyp_mode()) {
|
if (!is_kernel_in_hyp_mode()) {
|
||||||
if ((addr >= (unsigned long)__hyp_text_start &&
|
if ((addr >= (unsigned long)__hyp_idmap_text_start &&
|
||||||
addr < (unsigned long)__hyp_text_end) ||
|
|
||||||
(addr >= (unsigned long)__hyp_idmap_text_start &&
|
|
||||||
addr < (unsigned long)__hyp_idmap_text_end))
|
addr < (unsigned long)__hyp_idmap_text_end))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -466,9 +466,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
|||||||
__iommu_setup_dma_ops(dev, dma_base, size, iommu);
|
__iommu_setup_dma_ops(dev, dma_base, size, iommu);
|
||||||
|
|
||||||
#ifdef CONFIG_XEN
|
#ifdef CONFIG_XEN
|
||||||
if (xen_initial_domain()) {
|
if (xen_initial_domain())
|
||||||
dev->archdata.dev_dma_ops = dev->dma_ops;
|
|
||||||
dev->dma_ops = xen_dma_ops;
|
dev->dma_ops = xen_dma_ops;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,11 @@ void sync_icache_aliases(void *kaddr, unsigned long len)
|
|||||||
__clean_dcache_area_pou(kaddr, len);
|
__clean_dcache_area_pou(kaddr, len);
|
||||||
__flush_icache_all();
|
__flush_icache_all();
|
||||||
} else {
|
} else {
|
||||||
flush_icache_range(addr, addr + len);
|
/*
|
||||||
|
* Don't issue kick_all_cpus_sync() after I-cache invalidation
|
||||||
|
* for user mappings.
|
||||||
|
*/
|
||||||
|
__flush_icache_range(addr, addr + len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ generic-y += pgalloc.h
|
|||||||
generic-y += preempt.h
|
generic-y += preempt.h
|
||||||
generic-y += segment.h
|
generic-y += segment.h
|
||||||
generic-y += serial.h
|
generic-y += serial.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += tlbflush.h
|
generic-y += tlbflush.h
|
||||||
generic-y += topology.h
|
generic-y += topology.h
|
||||||
generic-y += trace_clock.h
|
generic-y += trace_clock.h
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
generic-y += shmparam.h
|
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ generic-y += preempt.h
|
|||||||
generic-y += scatterlist.h
|
generic-y += scatterlist.h
|
||||||
generic-y += sections.h
|
generic-y += sections.h
|
||||||
generic-y += serial.h
|
generic-y += serial.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += sizes.h
|
generic-y += sizes.h
|
||||||
generic-y += spinlock.h
|
generic-y += spinlock.h
|
||||||
generic-y += timex.h
|
generic-y += timex.h
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
generic-y += shmparam.h
|
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ generic-y += rwsem.h
|
|||||||
generic-y += sections.h
|
generic-y += sections.h
|
||||||
generic-y += segment.h
|
generic-y += segment.h
|
||||||
generic-y += serial.h
|
generic-y += serial.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += sizes.h
|
generic-y += sizes.h
|
||||||
generic-y += topology.h
|
generic-y += topology.h
|
||||||
generic-y += trace_clock.h
|
generic-y += trace_clock.h
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
generic-y += shmparam.h
|
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ generic-y += mm-arch-hooks.h
|
|||||||
generic-y += percpu.h
|
generic-y += percpu.h
|
||||||
generic-y += preempt.h
|
generic-y += preempt.h
|
||||||
generic-y += sections.h
|
generic-y += sections.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += spinlock.h
|
generic-y += spinlock.h
|
||||||
generic-y += topology.h
|
generic-y += topology.h
|
||||||
generic-y += trace_clock.h
|
generic-y += trace_clock.h
|
||||||
|
|||||||
@@ -2,4 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm
|
|||||||
|
|
||||||
generated-y += unistd_32.h
|
generated-y += unistd_32.h
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
generic-y += shmparam.h
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ generic-y += parport.h
|
|||||||
generic-y += percpu.h
|
generic-y += percpu.h
|
||||||
generic-y += preempt.h
|
generic-y += preempt.h
|
||||||
generic-y += serial.h
|
generic-y += serial.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += syscalls.h
|
generic-y += syscalls.h
|
||||||
generic-y += topology.h
|
generic-y += topology.h
|
||||||
generic-y += trace_clock.h
|
generic-y += trace_clock.h
|
||||||
|
|||||||
@@ -2,5 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm
|
|||||||
|
|
||||||
generated-y += unistd_32.h
|
generated-y += unistd_32.h
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
generic-y += shmparam.h
|
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
|||||||
@@ -3155,6 +3155,7 @@ config MIPS32_O32
|
|||||||
config MIPS32_N32
|
config MIPS32_N32
|
||||||
bool "Kernel support for n32 binaries"
|
bool "Kernel support for n32 binaries"
|
||||||
depends on 64BIT
|
depends on 64BIT
|
||||||
|
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
|
||||||
select COMPAT
|
select COMPAT
|
||||||
select MIPS32_COMPAT
|
select MIPS32_COMPAT
|
||||||
select SYSVIPC_COMPAT if SYSVIPC
|
select SYSVIPC_COMPAT if SYSVIPC
|
||||||
|
|||||||
@@ -173,6 +173,31 @@ void __init plat_mem_setup(void)
|
|||||||
pm_power_off = bcm47xx_machine_halt;
|
pm_power_off = bcm47xx_machine_halt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_BCM47XX_BCMA
|
||||||
|
static struct device * __init bcm47xx_setup_device(void)
|
||||||
|
{
|
||||||
|
struct device *dev;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||||
|
if (!dev)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
err = dev_set_name(dev, "bcm47xx_soc");
|
||||||
|
if (err) {
|
||||||
|
pr_err("Failed to set SoC device name: %d\n", err);
|
||||||
|
kfree(dev);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
|
||||||
|
if (err)
|
||||||
|
pr_err("Failed to set SoC DMA mask: %d\n", err);
|
||||||
|
|
||||||
|
return dev;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This finishes bus initialization doing things that were not possible without
|
* This finishes bus initialization doing things that were not possible without
|
||||||
* kmalloc. Make sure to call it late enough (after mm_init).
|
* kmalloc. Make sure to call it late enough (after mm_init).
|
||||||
@@ -183,6 +208,10 @@ void __init bcm47xx_bus_setup(void)
|
|||||||
if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) {
|
if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) {
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
bcm47xx_bus.bcma.dev = bcm47xx_setup_device();
|
||||||
|
if (!bcm47xx_bus.bcma.dev)
|
||||||
|
panic("Failed to setup SoC device\n");
|
||||||
|
|
||||||
err = bcma_host_soc_init(&bcm47xx_bus.bcma);
|
err = bcma_host_soc_init(&bcm47xx_bus.bcma);
|
||||||
if (err)
|
if (err)
|
||||||
panic("Failed to initialize BCMA bus (err %d)", err);
|
panic("Failed to initialize BCMA bus (err %d)", err);
|
||||||
@@ -235,6 +264,8 @@ static int __init bcm47xx_register_bus_complete(void)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_BCM47XX_BCMA
|
#ifdef CONFIG_BCM47XX_BCMA
|
||||||
case BCM47XX_BUS_TYPE_BCMA:
|
case BCM47XX_BUS_TYPE_BCMA:
|
||||||
|
if (device_register(bcm47xx_bus.bcma.dev))
|
||||||
|
pr_err("Failed to register SoC device\n");
|
||||||
bcma_bus_register(&bcm47xx_bus.bcma.bus);
|
bcma_bus_register(&bcm47xx_bus.bcma.bus);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ static void octeon_kexec_smp_down(void *ignored)
|
|||||||
" sync \n"
|
" sync \n"
|
||||||
" synci ($0) \n");
|
" synci ($0) \n");
|
||||||
|
|
||||||
relocated_kexec_smp_wait(NULL);
|
kexec_reboot();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
|
|||||||
# CONFIG_SERIAL_8250_PCI is not set
|
# CONFIG_SERIAL_8250_PCI is not set
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||||
|
CONFIG_SERIAL_OF_PLATFORM=y
|
||||||
CONFIG_SERIAL_AR933X=y
|
CONFIG_SERIAL_AR933X=y
|
||||||
CONFIG_SERIAL_AR933X_CONSOLE=y
|
CONFIG_SERIAL_AR933X_CONSOLE=y
|
||||||
# CONFIG_HW_RANDOM is not set
|
# CONFIG_HW_RANDOM is not set
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
#define INT_NUM_EXTRA_START (INT_NUM_IM4_IRL0 + 32)
|
#define INT_NUM_EXTRA_START (INT_NUM_IM4_IRL0 + 32)
|
||||||
#define INT_NUM_IM_OFFSET (INT_NUM_IM1_IRL0 - INT_NUM_IM0_IRL0)
|
#define INT_NUM_IM_OFFSET (INT_NUM_IM1_IRL0 - INT_NUM_IM0_IRL0)
|
||||||
|
|
||||||
#define MIPS_CPU_TIMER_IRQ 7
|
|
||||||
|
|
||||||
#define MAX_IM 5
|
#define MAX_IM 5
|
||||||
|
|
||||||
#endif /* _FALCON_IRQ__ */
|
#endif /* _FALCON_IRQ__ */
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
#define LTQ_DMA_CH0_INT (INT_NUM_IM2_IRL0)
|
#define LTQ_DMA_CH0_INT (INT_NUM_IM2_IRL0)
|
||||||
|
|
||||||
#define MIPS_CPU_TIMER_IRQ 7
|
|
||||||
|
|
||||||
#define MAX_IM 5
|
#define MAX_IM 5
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -74,14 +74,15 @@ static int __init vdma_init(void)
|
|||||||
get_order(VDMA_PGTBL_SIZE));
|
get_order(VDMA_PGTBL_SIZE));
|
||||||
BUG_ON(!pgtbl);
|
BUG_ON(!pgtbl);
|
||||||
dma_cache_wback_inv((unsigned long)pgtbl, VDMA_PGTBL_SIZE);
|
dma_cache_wback_inv((unsigned long)pgtbl, VDMA_PGTBL_SIZE);
|
||||||
pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl);
|
pgtbl = (VDMA_PGTBL_ENTRY *)CKSEG1ADDR((unsigned long)pgtbl);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clear the R4030 translation table
|
* Clear the R4030 translation table
|
||||||
*/
|
*/
|
||||||
vdma_pgtbl_init();
|
vdma_pgtbl_init();
|
||||||
|
|
||||||
r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE, CPHYSADDR(pgtbl));
|
r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE,
|
||||||
|
CPHYSADDR((unsigned long)pgtbl));
|
||||||
r4030_write_reg32(JAZZ_R4030_TRSTBL_LIM, VDMA_PGTBL_SIZE);
|
r4030_write_reg32(JAZZ_R4030_TRSTBL_LIM, VDMA_PGTBL_SIZE);
|
||||||
r4030_write_reg32(JAZZ_R4030_TRSTBL_INV, 0);
|
r4030_write_reg32(JAZZ_R4030_TRSTBL_INV, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -224,9 +224,11 @@ static struct irq_chip ltq_eiu_type = {
|
|||||||
.irq_set_type = ltq_eiu_settype,
|
.irq_set_type = ltq_eiu_settype,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void ltq_hw_irqdispatch(int module)
|
static void ltq_hw_irq_handler(struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
|
int module = irq_desc_get_irq(desc) - 2;
|
||||||
u32 irq;
|
u32 irq;
|
||||||
|
int hwirq;
|
||||||
|
|
||||||
irq = ltq_icu_r32(module, LTQ_ICU_IM0_IOSR);
|
irq = ltq_icu_r32(module, LTQ_ICU_IM0_IOSR);
|
||||||
if (irq == 0)
|
if (irq == 0)
|
||||||
@@ -237,7 +239,8 @@ static void ltq_hw_irqdispatch(int module)
|
|||||||
* other bits might be bogus
|
* other bits might be bogus
|
||||||
*/
|
*/
|
||||||
irq = __fls(irq);
|
irq = __fls(irq);
|
||||||
do_IRQ((int)irq + MIPS_CPU_IRQ_CASCADE + (INT_NUM_IM_OFFSET * module));
|
hwirq = irq + MIPS_CPU_IRQ_CASCADE + (INT_NUM_IM_OFFSET * module);
|
||||||
|
generic_handle_irq(irq_linear_revmap(ltq_domain, hwirq));
|
||||||
|
|
||||||
/* if this is a EBU irq, we need to ack it or get a deadlock */
|
/* if this is a EBU irq, we need to ack it or get a deadlock */
|
||||||
if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT)
|
if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT)
|
||||||
@@ -245,49 +248,6 @@ static void ltq_hw_irqdispatch(int module)
|
|||||||
LTQ_EBU_PCC_ISTAT);
|
LTQ_EBU_PCC_ISTAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEFINE_HWx_IRQDISPATCH(x) \
|
|
||||||
static void ltq_hw ## x ## _irqdispatch(void) \
|
|
||||||
{ \
|
|
||||||
ltq_hw_irqdispatch(x); \
|
|
||||||
}
|
|
||||||
DEFINE_HWx_IRQDISPATCH(0)
|
|
||||||
DEFINE_HWx_IRQDISPATCH(1)
|
|
||||||
DEFINE_HWx_IRQDISPATCH(2)
|
|
||||||
DEFINE_HWx_IRQDISPATCH(3)
|
|
||||||
DEFINE_HWx_IRQDISPATCH(4)
|
|
||||||
|
|
||||||
#if MIPS_CPU_TIMER_IRQ == 7
|
|
||||||
static void ltq_hw5_irqdispatch(void)
|
|
||||||
{
|
|
||||||
do_IRQ(MIPS_CPU_TIMER_IRQ);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
DEFINE_HWx_IRQDISPATCH(5)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void ltq_hw_irq_handler(struct irq_desc *desc)
|
|
||||||
{
|
|
||||||
ltq_hw_irqdispatch(irq_desc_get_irq(desc) - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
asmlinkage void plat_irq_dispatch(void)
|
|
||||||
{
|
|
||||||
unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
|
|
||||||
int irq;
|
|
||||||
|
|
||||||
if (!pending) {
|
|
||||||
spurious_interrupt();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pending >>= CAUSEB_IP;
|
|
||||||
while (pending) {
|
|
||||||
irq = fls(pending) - 1;
|
|
||||||
do_IRQ(MIPS_CPU_IRQ_BASE + irq);
|
|
||||||
pending &= ~BIT(irq);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int icu_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
|
static int icu_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
|
||||||
{
|
{
|
||||||
struct irq_chip *chip = <q_irq_type;
|
struct irq_chip *chip = <q_irq_type;
|
||||||
@@ -343,38 +303,13 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
|
|||||||
for (i = 0; i < MAX_IM; i++)
|
for (i = 0; i < MAX_IM; i++)
|
||||||
irq_set_chained_handler(i + 2, ltq_hw_irq_handler);
|
irq_set_chained_handler(i + 2, ltq_hw_irq_handler);
|
||||||
|
|
||||||
if (cpu_has_vint) {
|
|
||||||
pr_info("Setting up vectored interrupts\n");
|
|
||||||
set_vi_handler(2, ltq_hw0_irqdispatch);
|
|
||||||
set_vi_handler(3, ltq_hw1_irqdispatch);
|
|
||||||
set_vi_handler(4, ltq_hw2_irqdispatch);
|
|
||||||
set_vi_handler(5, ltq_hw3_irqdispatch);
|
|
||||||
set_vi_handler(6, ltq_hw4_irqdispatch);
|
|
||||||
set_vi_handler(7, ltq_hw5_irqdispatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
ltq_domain = irq_domain_add_linear(node,
|
ltq_domain = irq_domain_add_linear(node,
|
||||||
(MAX_IM * INT_NUM_IM_OFFSET) + MIPS_CPU_IRQ_CASCADE,
|
(MAX_IM * INT_NUM_IM_OFFSET) + MIPS_CPU_IRQ_CASCADE,
|
||||||
&irq_domain_ops, 0);
|
&irq_domain_ops, 0);
|
||||||
|
|
||||||
#ifndef CONFIG_MIPS_MT_SMP
|
|
||||||
set_c0_status(IE_IRQ0 | IE_IRQ1 | IE_IRQ2 |
|
|
||||||
IE_IRQ3 | IE_IRQ4 | IE_IRQ5);
|
|
||||||
#else
|
|
||||||
set_c0_status(IE_SW0 | IE_SW1 | IE_IRQ0 | IE_IRQ1 |
|
|
||||||
IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* tell oprofile which irq to use */
|
/* tell oprofile which irq to use */
|
||||||
ltq_perfcount_irq = irq_create_mapping(ltq_domain, LTQ_PERF_IRQ);
|
ltq_perfcount_irq = irq_create_mapping(ltq_domain, LTQ_PERF_IRQ);
|
||||||
|
|
||||||
/*
|
|
||||||
* if the timer irq is not one of the mips irqs we need to
|
|
||||||
* create a mapping
|
|
||||||
*/
|
|
||||||
if (MIPS_CPU_TIMER_IRQ != 7)
|
|
||||||
irq_create_mapping(ltq_domain, MIPS_CPU_TIMER_IRQ);
|
|
||||||
|
|
||||||
/* the external interrupts are optional and xway only */
|
/* the external interrupts are optional and xway only */
|
||||||
eiu_node = of_find_compatible_node(NULL, NULL, "lantiq,eiu-xway");
|
eiu_node = of_find_compatible_node(NULL, NULL, "lantiq,eiu-xway");
|
||||||
if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) {
|
if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) {
|
||||||
@@ -411,7 +346,7 @@ EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
|
|||||||
|
|
||||||
unsigned int get_c0_compare_int(void)
|
unsigned int get_c0_compare_int(void)
|
||||||
{
|
{
|
||||||
return MIPS_CPU_TIMER_IRQ;
|
return CP0_LEGACY_COMPARE_IRQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct of_device_id __initdata of_irq_ids[] = {
|
static struct of_device_id __initdata of_irq_ids[] = {
|
||||||
|
|||||||
@@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void)
|
|||||||
int irq;
|
int irq;
|
||||||
struct irq_chip *msi;
|
struct irq_chip *msi;
|
||||||
|
|
||||||
if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) {
|
if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_INVALID) {
|
||||||
|
return 0;
|
||||||
|
} else if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) {
|
||||||
msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0;
|
msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0;
|
||||||
msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1;
|
msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1;
|
||||||
msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2;
|
msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ generic-y += qrwlock_types.h
|
|||||||
generic-y += qrwlock.h
|
generic-y += qrwlock.h
|
||||||
generic-y += sections.h
|
generic-y += sections.h
|
||||||
generic-y += segment.h
|
generic-y += segment.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += string.h
|
generic-y += string.h
|
||||||
generic-y += switch_to.h
|
generic-y += switch_to.h
|
||||||
generic-y += topology.h
|
generic-y += topology.h
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
generic-y += shmparam.h
|
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ enum perf_event_powerpc_regs {
|
|||||||
PERF_REG_POWERPC_DAR,
|
PERF_REG_POWERPC_DAR,
|
||||||
PERF_REG_POWERPC_DSISR,
|
PERF_REG_POWERPC_DSISR,
|
||||||
PERF_REG_POWERPC_SIER,
|
PERF_REG_POWERPC_SIER,
|
||||||
|
PERF_REG_POWERPC_MMCRA,
|
||||||
PERF_REG_POWERPC_MAX,
|
PERF_REG_POWERPC_MAX,
|
||||||
};
|
};
|
||||||
#endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
|
#endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
|
||||||
|
|||||||
@@ -852,11 +852,12 @@ start_here:
|
|||||||
|
|
||||||
/* set up the PTE pointers for the Abatron bdiGDB.
|
/* set up the PTE pointers for the Abatron bdiGDB.
|
||||||
*/
|
*/
|
||||||
tovirt(r6,r6)
|
|
||||||
lis r5, abatron_pteptrs@h
|
lis r5, abatron_pteptrs@h
|
||||||
ori r5, r5, abatron_pteptrs@l
|
ori r5, r5, abatron_pteptrs@l
|
||||||
stw r5, 0xf0(0) /* Must match your Abatron config file */
|
stw r5, 0xf0(0) /* Must match your Abatron config file */
|
||||||
tophys(r5,r5)
|
tophys(r5,r5)
|
||||||
|
lis r6, swapper_pg_dir@h
|
||||||
|
ori r6, r6, swapper_pg_dir@l
|
||||||
stw r6, 0(r5)
|
stw r6, 0(r5)
|
||||||
|
|
||||||
/* Now turn on the MMU for real! */
|
/* Now turn on the MMU for real! */
|
||||||
|
|||||||
@@ -755,11 +755,12 @@ SYSCALL_DEFINE0(rt_sigreturn)
|
|||||||
if (restore_tm_sigcontexts(current, &uc->uc_mcontext,
|
if (restore_tm_sigcontexts(current, &uc->uc_mcontext,
|
||||||
&uc_transact->uc_mcontext))
|
&uc_transact->uc_mcontext))
|
||||||
goto badframe;
|
goto badframe;
|
||||||
}
|
} else
|
||||||
#endif
|
#endif
|
||||||
/* Fall through, for non-TM restore */
|
{
|
||||||
if (!MSR_TM_ACTIVE(msr)) {
|
|
||||||
/*
|
/*
|
||||||
|
* Fall through, for non-TM restore
|
||||||
|
*
|
||||||
* Unset MSR[TS] on the thread regs since MSR from user
|
* Unset MSR[TS] on the thread regs since MSR from user
|
||||||
* context does not have MSR active, and recheckpoint was
|
* context does not have MSR active, and recheckpoint was
|
||||||
* not called since restore_tm_sigcontexts() was not called
|
* not called since restore_tm_sigcontexts() was not called
|
||||||
|
|||||||
@@ -967,13 +967,6 @@ out:
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
|
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
|
||||||
|
|
||||||
#if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64)
|
|
||||||
unsigned long __init arch_syscall_addr(int nr)
|
|
||||||
{
|
|
||||||
return sys_call_table[nr*2];
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 */
|
|
||||||
|
|
||||||
#ifdef PPC64_ELF_ABI_v1
|
#ifdef PPC64_ELF_ABI_v1
|
||||||
char *arch_ftrace_match_adjust(char *str, const char *search)
|
char *arch_ftrace_match_adjust(char *str, const char *search)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ static unsigned int pt_regs_offset[PERF_REG_POWERPC_MAX] = {
|
|||||||
PT_REGS_OFFSET(PERF_REG_POWERPC_DAR, dar),
|
PT_REGS_OFFSET(PERF_REG_POWERPC_DAR, dar),
|
||||||
PT_REGS_OFFSET(PERF_REG_POWERPC_DSISR, dsisr),
|
PT_REGS_OFFSET(PERF_REG_POWERPC_DSISR, dsisr),
|
||||||
PT_REGS_OFFSET(PERF_REG_POWERPC_SIER, dar),
|
PT_REGS_OFFSET(PERF_REG_POWERPC_SIER, dar),
|
||||||
|
PT_REGS_OFFSET(PERF_REG_POWERPC_MMCRA, dsisr),
|
||||||
};
|
};
|
||||||
|
|
||||||
u64 perf_reg_value(struct pt_regs *regs, int idx)
|
u64 perf_reg_value(struct pt_regs *regs, int idx)
|
||||||
@@ -83,6 +84,11 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
|
|||||||
!is_sier_available()))
|
!is_sier_available()))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (idx == PERF_REG_POWERPC_MMCRA &&
|
||||||
|
(IS_ENABLED(CONFIG_FSL_EMB_PERF_EVENT) ||
|
||||||
|
IS_ENABLED(CONFIG_PPC32)))
|
||||||
|
return 0;
|
||||||
|
|
||||||
return regs_get_register(regs, pt_regs_offset[idx]);
|
return regs_get_register(regs, pt_regs_offset[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -237,12 +237,12 @@ static int ocm_debugfs_show(struct seq_file *m, void *v)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
seq_printf(m, "PPC4XX OCM : %d\n", ocm->index);
|
seq_printf(m, "PPC4XX OCM : %d\n", ocm->index);
|
||||||
seq_printf(m, "PhysAddr : %pa[p]\n", &(ocm->phys));
|
seq_printf(m, "PhysAddr : %pa\n", &(ocm->phys));
|
||||||
seq_printf(m, "MemTotal : %d Bytes\n", ocm->memtotal);
|
seq_printf(m, "MemTotal : %d Bytes\n", ocm->memtotal);
|
||||||
seq_printf(m, "MemTotal(NC) : %d Bytes\n", ocm->nc.memtotal);
|
seq_printf(m, "MemTotal(NC) : %d Bytes\n", ocm->nc.memtotal);
|
||||||
seq_printf(m, "MemTotal(C) : %d Bytes\n\n", ocm->c.memtotal);
|
seq_printf(m, "MemTotal(C) : %d Bytes\n\n", ocm->c.memtotal);
|
||||||
|
|
||||||
seq_printf(m, "NC.PhysAddr : %pa[p]\n", &(ocm->nc.phys));
|
seq_printf(m, "NC.PhysAddr : %pa\n", &(ocm->nc.phys));
|
||||||
seq_printf(m, "NC.VirtAddr : 0x%p\n", ocm->nc.virt);
|
seq_printf(m, "NC.VirtAddr : 0x%p\n", ocm->nc.virt);
|
||||||
seq_printf(m, "NC.MemTotal : %d Bytes\n", ocm->nc.memtotal);
|
seq_printf(m, "NC.MemTotal : %d Bytes\n", ocm->nc.memtotal);
|
||||||
seq_printf(m, "NC.MemFree : %d Bytes\n", ocm->nc.memfree);
|
seq_printf(m, "NC.MemFree : %d Bytes\n", ocm->nc.memfree);
|
||||||
@@ -252,7 +252,7 @@ static int ocm_debugfs_show(struct seq_file *m, void *v)
|
|||||||
blk->size, blk->owner);
|
blk->size, blk->owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
seq_printf(m, "\nC.PhysAddr : %pa[p]\n", &(ocm->c.phys));
|
seq_printf(m, "\nC.PhysAddr : %pa\n", &(ocm->c.phys));
|
||||||
seq_printf(m, "C.VirtAddr : 0x%p\n", ocm->c.virt);
|
seq_printf(m, "C.VirtAddr : 0x%p\n", ocm->c.virt);
|
||||||
seq_printf(m, "C.MemTotal : %d Bytes\n", ocm->c.memtotal);
|
seq_printf(m, "C.MemTotal : %d Bytes\n", ocm->c.memtotal);
|
||||||
seq_printf(m, "C.MemFree : %d Bytes\n", ocm->c.memfree);
|
seq_printf(m, "C.MemFree : %d Bytes\n", ocm->c.memfree);
|
||||||
|
|||||||
@@ -538,8 +538,7 @@ static void __init chrp_init_IRQ(void)
|
|||||||
/* see if there is a keyboard in the device tree
|
/* see if there is a keyboard in the device tree
|
||||||
with a parent of type "adb" */
|
with a parent of type "adb" */
|
||||||
for_each_node_by_name(kbd, "keyboard")
|
for_each_node_by_name(kbd, "keyboard")
|
||||||
if (kbd->parent && kbd->parent->type
|
if (of_node_is_type(kbd->parent, "adb"))
|
||||||
&& strcmp(kbd->parent->type, "adb") == 0)
|
|
||||||
break;
|
break;
|
||||||
of_node_put(kbd);
|
of_node_put(kbd);
|
||||||
if (kbd)
|
if (kbd)
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ struct iommu_table_group *pnv_try_setup_npu_table_group(struct pnv_ioda_pe *pe)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Create a group for 1 GPU and attached NPUs for POWER8 */
|
/* Create a group for 1 GPU and attached NPUs for POWER8 */
|
||||||
pe->npucomp = kzalloc(sizeof(pe->npucomp), GFP_KERNEL);
|
pe->npucomp = kzalloc(sizeof(*pe->npucomp), GFP_KERNEL);
|
||||||
table_group = &pe->npucomp->table_group;
|
table_group = &pe->npucomp->table_group;
|
||||||
table_group->ops = &pnv_npu_peers_ops;
|
table_group->ops = &pnv_npu_peers_ops;
|
||||||
iommu_register_group(table_group, hose->global_number,
|
iommu_register_group(table_group, hose->global_number,
|
||||||
|
|||||||
@@ -2681,7 +2681,8 @@ static void pnv_pci_ioda_setup_iommu_api(void)
|
|||||||
list_for_each_entry(hose, &hose_list, list_node) {
|
list_for_each_entry(hose, &hose_list, list_node) {
|
||||||
phb = hose->private_data;
|
phb = hose->private_data;
|
||||||
|
|
||||||
if (phb->type == PNV_PHB_NPU_NVLINK)
|
if (phb->type == PNV_PHB_NPU_NVLINK ||
|
||||||
|
phb->type == PNV_PHB_NPU_OCAPI)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
list_for_each_entry(pe, &phb->ioda.pe_list, list) {
|
list_for_each_entry(pe, &phb->ioda.pe_list, list) {
|
||||||
|
|||||||
@@ -264,7 +264,9 @@ void __init pSeries_final_fixup(void)
|
|||||||
if (!of_device_is_compatible(nvdn->parent,
|
if (!of_device_is_compatible(nvdn->parent,
|
||||||
"ibm,power9-npu"))
|
"ibm,power9-npu"))
|
||||||
continue;
|
continue;
|
||||||
|
#ifdef CONFIG_PPC_POWERNV
|
||||||
WARN_ON_ONCE(pnv_npu2_init(hose));
|
WARN_ON_ONCE(pnv_npu2_init(hose));
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ choice
|
|||||||
prompt "Base ISA"
|
prompt "Base ISA"
|
||||||
default ARCH_RV64I
|
default ARCH_RV64I
|
||||||
help
|
help
|
||||||
This selects the base ISA that this kernel will traget and must match
|
This selects the base ISA that this kernel will target and must match
|
||||||
the target platform.
|
the target platform.
|
||||||
|
|
||||||
config ARCH_RV32I
|
config ARCH_RV32I
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ CONFIG_BLK_DEV_INITRD=y
|
|||||||
CONFIG_EXPERT=y
|
CONFIG_EXPERT=y
|
||||||
CONFIG_BPF_SYSCALL=y
|
CONFIG_BPF_SYSCALL=y
|
||||||
CONFIG_SMP=y
|
CONFIG_SMP=y
|
||||||
CONFIG_PCI=y
|
|
||||||
CONFIG_PCIE_XILINX=y
|
|
||||||
CONFIG_MODULES=y
|
CONFIG_MODULES=y
|
||||||
CONFIG_MODULE_UNLOAD=y
|
CONFIG_MODULE_UNLOAD=y
|
||||||
CONFIG_NET=y
|
CONFIG_NET=y
|
||||||
@@ -28,6 +26,10 @@ CONFIG_IP_PNP_DHCP=y
|
|||||||
CONFIG_IP_PNP_BOOTP=y
|
CONFIG_IP_PNP_BOOTP=y
|
||||||
CONFIG_IP_PNP_RARP=y
|
CONFIG_IP_PNP_RARP=y
|
||||||
CONFIG_NETLINK_DIAG=y
|
CONFIG_NETLINK_DIAG=y
|
||||||
|
CONFIG_PCI=y
|
||||||
|
CONFIG_PCIEPORTBUS=y
|
||||||
|
CONFIG_PCI_HOST_GENERIC=y
|
||||||
|
CONFIG_PCIE_XILINX=y
|
||||||
CONFIG_DEVTMPFS=y
|
CONFIG_DEVTMPFS=y
|
||||||
CONFIG_BLK_DEV_LOOP=y
|
CONFIG_BLK_DEV_LOOP=y
|
||||||
CONFIG_VIRTIO_BLK=y
|
CONFIG_VIRTIO_BLK=y
|
||||||
@@ -63,7 +65,6 @@ CONFIG_USB_STORAGE=y
|
|||||||
CONFIG_USB_UAS=y
|
CONFIG_USB_UAS=y
|
||||||
CONFIG_VIRTIO_MMIO=y
|
CONFIG_VIRTIO_MMIO=y
|
||||||
CONFIG_SIFIVE_PLIC=y
|
CONFIG_SIFIVE_PLIC=y
|
||||||
CONFIG_RAS=y
|
|
||||||
CONFIG_EXT4_FS=y
|
CONFIG_EXT4_FS=y
|
||||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||||
CONFIG_AUTOFS4_FS=y
|
CONFIG_AUTOFS4_FS=y
|
||||||
@@ -77,5 +78,6 @@ CONFIG_NFS_V4_1=y
|
|||||||
CONFIG_NFS_V4_2=y
|
CONFIG_NFS_V4_2=y
|
||||||
CONFIG_ROOT_NFS=y
|
CONFIG_ROOT_NFS=y
|
||||||
CONFIG_CRYPTO_USER_API_HASH=y
|
CONFIG_CRYPTO_USER_API_HASH=y
|
||||||
|
CONFIG_CRYPTO_DEV_VIRTIO=y
|
||||||
CONFIG_PRINTK_TIME=y
|
CONFIG_PRINTK_TIME=y
|
||||||
# CONFIG_RCU_TRACE is not set
|
# CONFIG_RCU_TRACE is not set
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ typedef struct page *pgtable_t;
|
|||||||
#define __pgd(x) ((pgd_t) { (x) })
|
#define __pgd(x) ((pgd_t) { (x) })
|
||||||
#define __pgprot(x) ((pgprot_t) { (x) })
|
#define __pgprot(x) ((pgprot_t) { (x) })
|
||||||
|
|
||||||
#ifdef CONFIG_64BITS
|
#ifdef CONFIG_64BIT
|
||||||
#define PTE_FMT "%016lx"
|
#define PTE_FMT "%016lx"
|
||||||
#else
|
#else
|
||||||
#define PTE_FMT "%08lx"
|
#define PTE_FMT "%08lx"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
* This decides where the kernel will search for a free chunk of vm
|
* This decides where the kernel will search for a free chunk of vm
|
||||||
* space during mmap's.
|
* space during mmap's.
|
||||||
*/
|
*/
|
||||||
#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE >> 1)
|
#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3)
|
||||||
|
|
||||||
#define STACK_TOP TASK_SIZE
|
#define STACK_TOP TASK_SIZE
|
||||||
#define STACK_TOP_MAX STACK_TOP
|
#define STACK_TOP_MAX STACK_TOP
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ void asm_offsets(void)
|
|||||||
OFFSET(TASK_STACK, task_struct, stack);
|
OFFSET(TASK_STACK, task_struct, stack);
|
||||||
OFFSET(TASK_TI, task_struct, thread_info);
|
OFFSET(TASK_TI, task_struct, thread_info);
|
||||||
OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
|
OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
|
||||||
|
OFFSET(TASK_TI_PREEMPT_COUNT, task_struct, thread_info.preempt_count);
|
||||||
OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
|
OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
|
||||||
OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);
|
OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);
|
||||||
OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu);
|
OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu);
|
||||||
|
|||||||
@@ -144,6 +144,10 @@ _save_context:
|
|||||||
REG_L x2, PT_SP(sp)
|
REG_L x2, PT_SP(sp)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
#if !IS_ENABLED(CONFIG_PREEMPT)
|
||||||
|
.set resume_kernel, restore_all
|
||||||
|
#endif
|
||||||
|
|
||||||
ENTRY(handle_exception)
|
ENTRY(handle_exception)
|
||||||
SAVE_ALL
|
SAVE_ALL
|
||||||
|
|
||||||
@@ -228,7 +232,7 @@ ret_from_exception:
|
|||||||
REG_L s0, PT_SSTATUS(sp)
|
REG_L s0, PT_SSTATUS(sp)
|
||||||
csrc sstatus, SR_SIE
|
csrc sstatus, SR_SIE
|
||||||
andi s0, s0, SR_SPP
|
andi s0, s0, SR_SPP
|
||||||
bnez s0, restore_all
|
bnez s0, resume_kernel
|
||||||
|
|
||||||
resume_userspace:
|
resume_userspace:
|
||||||
/* Interrupts must be disabled here so flags are checked atomically */
|
/* Interrupts must be disabled here so flags are checked atomically */
|
||||||
@@ -250,6 +254,18 @@ restore_all:
|
|||||||
RESTORE_ALL
|
RESTORE_ALL
|
||||||
sret
|
sret
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_PREEMPT)
|
||||||
|
resume_kernel:
|
||||||
|
REG_L s0, TASK_TI_PREEMPT_COUNT(tp)
|
||||||
|
bnez s0, restore_all
|
||||||
|
need_resched:
|
||||||
|
REG_L s0, TASK_TI_FLAGS(tp)
|
||||||
|
andi s0, s0, _TIF_NEED_RESCHED
|
||||||
|
beqz s0, restore_all
|
||||||
|
call preempt_schedule_irq
|
||||||
|
j need_resched
|
||||||
|
#endif
|
||||||
|
|
||||||
work_pending:
|
work_pending:
|
||||||
/* Enter slow path for supplementary processing */
|
/* Enter slow path for supplementary processing */
|
||||||
la ra, ret_from_exception
|
la ra, ret_from_exception
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ static void __init setup_bootmem(void)
|
|||||||
BUG_ON(mem_size == 0);
|
BUG_ON(mem_size == 0);
|
||||||
|
|
||||||
set_max_mapnr(PFN_DOWN(mem_size));
|
set_max_mapnr(PFN_DOWN(mem_size));
|
||||||
max_low_pfn = memblock_end_of_DRAM();
|
max_low_pfn = PFN_DOWN(memblock_end_of_DRAM());
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
setup_initrd();
|
setup_initrd();
|
||||||
|
|||||||
@@ -57,15 +57,12 @@ void __init setup_smp(void)
|
|||||||
|
|
||||||
while ((dn = of_find_node_by_type(dn, "cpu"))) {
|
while ((dn = of_find_node_by_type(dn, "cpu"))) {
|
||||||
hart = riscv_of_processor_hartid(dn);
|
hart = riscv_of_processor_hartid(dn);
|
||||||
if (hart < 0) {
|
if (hart < 0)
|
||||||
of_node_put(dn);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
if (hart == cpuid_to_hartid_map(0)) {
|
if (hart == cpuid_to_hartid_map(0)) {
|
||||||
BUG_ON(found_boot_cpu);
|
BUG_ON(found_boot_cpu);
|
||||||
found_boot_cpu = 1;
|
found_boot_cpu = 1;
|
||||||
of_node_put(dn);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +70,6 @@ void __init setup_smp(void)
|
|||||||
set_cpu_possible(cpuid, true);
|
set_cpu_possible(cpuid, true);
|
||||||
set_cpu_present(cpuid, true);
|
set_cpu_present(cpuid, true);
|
||||||
cpuid++;
|
cpuid++;
|
||||||
of_node_put(dn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BUG_ON(!found_boot_cpu);
|
BUG_ON(!found_boot_cpu);
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ static void __init zone_sizes_init(void)
|
|||||||
unsigned long max_zone_pfns[MAX_NR_ZONES] = { 0, };
|
unsigned long max_zone_pfns[MAX_NR_ZONES] = { 0, };
|
||||||
|
|
||||||
#ifdef CONFIG_ZONE_DMA32
|
#ifdef CONFIG_ZONE_DMA32
|
||||||
max_zone_pfns[ZONE_DMA32] = PFN_DOWN(min(4UL * SZ_1G, max_low_pfn));
|
max_zone_pfns[ZONE_DMA32] = PFN_DOWN(min(4UL * SZ_1G,
|
||||||
|
(unsigned long) PFN_PHYS(max_low_pfn)));
|
||||||
#endif
|
#endif
|
||||||
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
|
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ static inline int init_new_context(struct task_struct *tsk,
|
|||||||
atomic_set(&mm->context.flush_count, 0);
|
atomic_set(&mm->context.flush_count, 0);
|
||||||
mm->context.gmap_asce = 0;
|
mm->context.gmap_asce = 0;
|
||||||
mm->context.flush_mm = 0;
|
mm->context.flush_mm = 0;
|
||||||
mm->context.compat_mm = 0;
|
mm->context.compat_mm = test_thread_flag(TIF_31BIT);
|
||||||
#ifdef CONFIG_PGSTE
|
#ifdef CONFIG_PGSTE
|
||||||
mm->context.alloc_pgste = page_table_allocate_pgste ||
|
mm->context.alloc_pgste = page_table_allocate_pgste ||
|
||||||
test_thread_flag(TIF_PGSTE) ||
|
test_thread_flag(TIF_PGSTE) ||
|
||||||
@@ -90,8 +90,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|||||||
{
|
{
|
||||||
int cpu = smp_processor_id();
|
int cpu = smp_processor_id();
|
||||||
|
|
||||||
if (prev == next)
|
|
||||||
return;
|
|
||||||
S390_lowcore.user_asce = next->context.asce;
|
S390_lowcore.user_asce = next->context.asce;
|
||||||
cpumask_set_cpu(cpu, &next->context.cpu_attach_mask);
|
cpumask_set_cpu(cpu, &next->context.cpu_attach_mask);
|
||||||
/* Clear previous user-ASCE from CR1 and CR7 */
|
/* Clear previous user-ASCE from CR1 and CR7 */
|
||||||
@@ -103,7 +101,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|||||||
__ctl_load(S390_lowcore.vdso_asce, 7, 7);
|
__ctl_load(S390_lowcore.vdso_asce, 7, 7);
|
||||||
clear_cpu_flag(CIF_ASCE_SECONDARY);
|
clear_cpu_flag(CIF_ASCE_SECONDARY);
|
||||||
}
|
}
|
||||||
cpumask_clear_cpu(cpu, &prev->context.cpu_attach_mask);
|
if (prev != next)
|
||||||
|
cpumask_clear_cpu(cpu, &prev->context.cpu_attach_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define finish_arch_post_lock_switch finish_arch_post_lock_switch
|
#define finish_arch_post_lock_switch finish_arch_post_lock_switch
|
||||||
|
|||||||
@@ -63,10 +63,10 @@ static noinline __init void detect_machine_type(void)
|
|||||||
if (stsi(vmms, 3, 2, 2) || !vmms->count)
|
if (stsi(vmms, 3, 2, 2) || !vmms->count)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Running under KVM? If not we assume z/VM */
|
/* Detect known hypervisors */
|
||||||
if (!memcmp(vmms->vm[0].cpi, "\xd2\xe5\xd4", 3))
|
if (!memcmp(vmms->vm[0].cpi, "\xd2\xe5\xd4", 3))
|
||||||
S390_lowcore.machine_flags |= MACHINE_FLAG_KVM;
|
S390_lowcore.machine_flags |= MACHINE_FLAG_KVM;
|
||||||
else
|
else if (!memcmp(vmms->vm[0].cpi, "\xa9\x61\xe5\xd4", 4))
|
||||||
S390_lowcore.machine_flags |= MACHINE_FLAG_VM;
|
S390_lowcore.machine_flags |= MACHINE_FLAG_VM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1006,6 +1006,8 @@ void __init setup_arch(char **cmdline_p)
|
|||||||
pr_info("Linux is running under KVM in 64-bit mode\n");
|
pr_info("Linux is running under KVM in 64-bit mode\n");
|
||||||
else if (MACHINE_IS_LPAR)
|
else if (MACHINE_IS_LPAR)
|
||||||
pr_info("Linux is running natively in 64-bit mode\n");
|
pr_info("Linux is running natively in 64-bit mode\n");
|
||||||
|
else
|
||||||
|
pr_info("Linux is running as a guest in 64-bit mode\n");
|
||||||
|
|
||||||
/* Have one command line that is parsed and saved in /proc/cmdline */
|
/* Have one command line that is parsed and saved in /proc/cmdline */
|
||||||
/* boot_command_line has been already set up in early.c */
|
/* boot_command_line has been already set up in early.c */
|
||||||
|
|||||||
@@ -381,8 +381,13 @@ void smp_call_online_cpu(void (*func)(void *), void *data)
|
|||||||
*/
|
*/
|
||||||
void smp_call_ipl_cpu(void (*func)(void *), void *data)
|
void smp_call_ipl_cpu(void (*func)(void *), void *data)
|
||||||
{
|
{
|
||||||
|
struct lowcore *lc = pcpu_devices->lowcore;
|
||||||
|
|
||||||
|
if (pcpu_devices[0].address == stap())
|
||||||
|
lc = &S390_lowcore;
|
||||||
|
|
||||||
pcpu_delegate(&pcpu_devices[0], func, data,
|
pcpu_delegate(&pcpu_devices[0], func, data,
|
||||||
pcpu_devices->lowcore->nodat_stack);
|
lc->nodat_stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
int smp_find_processor_id(u16 address)
|
int smp_find_processor_id(u16 address)
|
||||||
@@ -1166,7 +1171,11 @@ static ssize_t __ref rescan_store(struct device *dev,
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
rc = lock_device_hotplug_sysfs();
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
rc = smp_rescan_cpus();
|
rc = smp_rescan_cpus();
|
||||||
|
unlock_device_hotplug();
|
||||||
return rc ? rc : count;
|
return rc ? rc : count;
|
||||||
}
|
}
|
||||||
static DEVICE_ATTR_WO(rescan);
|
static DEVICE_ATTR_WO(rescan);
|
||||||
|
|||||||
@@ -224,10 +224,9 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
|||||||
|
|
||||||
vdso_pages = vdso64_pages;
|
vdso_pages = vdso64_pages;
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
if (is_compat_task()) {
|
mm->context.compat_mm = is_compat_task();
|
||||||
|
if (mm->context.compat_mm)
|
||||||
vdso_pages = vdso32_pages;
|
vdso_pages = vdso32_pages;
|
||||||
mm->context.compat_mm = 1;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* vDSO has a problem and was disabled, just don't "enable" it for
|
* vDSO has a problem and was disabled, just don't "enable" it for
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ generic-y += preempt.h
|
|||||||
generic-y += sections.h
|
generic-y += sections.h
|
||||||
generic-y += segment.h
|
generic-y += segment.h
|
||||||
generic-y += serial.h
|
generic-y += serial.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += sizes.h
|
generic-y += sizes.h
|
||||||
generic-y += syscalls.h
|
generic-y += syscalls.h
|
||||||
generic-y += topology.h
|
generic-y += topology.h
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
generic-y += shmparam.h
|
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ config X86
|
|||||||
select IRQ_FORCED_THREADING
|
select IRQ_FORCED_THREADING
|
||||||
select NEED_SG_DMA_LENGTH
|
select NEED_SG_DMA_LENGTH
|
||||||
select PCI_DOMAINS if PCI
|
select PCI_DOMAINS if PCI
|
||||||
select PCI_LOCKLESS_CONFIG
|
select PCI_LOCKLESS_CONFIG if PCI
|
||||||
select PERF_EVENTS
|
select PERF_EVENTS
|
||||||
select RTC_LIB
|
select RTC_LIB
|
||||||
select RTC_MC146818_LIB
|
select RTC_MC146818_LIB
|
||||||
@@ -446,12 +446,12 @@ config RETPOLINE
|
|||||||
branches. Requires a compiler with -mindirect-branch=thunk-extern
|
branches. Requires a compiler with -mindirect-branch=thunk-extern
|
||||||
support for full protection. The kernel may run slower.
|
support for full protection. The kernel may run slower.
|
||||||
|
|
||||||
config X86_RESCTRL
|
config X86_CPU_RESCTRL
|
||||||
bool "Resource Control support"
|
bool "x86 CPU resource control support"
|
||||||
depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
|
depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
|
||||||
select KERNFS
|
select KERNFS
|
||||||
help
|
help
|
||||||
Enable Resource Control support.
|
Enable x86 CPU resource control support.
|
||||||
|
|
||||||
Provide support for the allocation and monitoring of system resources
|
Provide support for the allocation and monitoring of system resources
|
||||||
usage by the CPU.
|
usage by the CPU.
|
||||||
@@ -617,7 +617,7 @@ config X86_INTEL_QUARK
|
|||||||
|
|
||||||
config X86_INTEL_LPSS
|
config X86_INTEL_LPSS
|
||||||
bool "Intel Low Power Subsystem Support"
|
bool "Intel Low Power Subsystem Support"
|
||||||
depends on X86 && ACPI
|
depends on X86 && ACPI && PCI
|
||||||
select COMMON_CLK
|
select COMMON_CLK
|
||||||
select PINCTRL
|
select PINCTRL
|
||||||
select IOSF_MBI
|
select IOSF_MBI
|
||||||
|
|||||||
@@ -600,6 +600,14 @@ ENTRY(trampoline_32bit_src)
|
|||||||
leal TRAMPOLINE_32BIT_PGTABLE_OFFSET(%ecx), %eax
|
leal TRAMPOLINE_32BIT_PGTABLE_OFFSET(%ecx), %eax
|
||||||
movl %eax, %cr3
|
movl %eax, %cr3
|
||||||
3:
|
3:
|
||||||
|
/* Set EFER.LME=1 as a precaution in case hypervsior pulls the rug */
|
||||||
|
pushl %ecx
|
||||||
|
movl $MSR_EFER, %ecx
|
||||||
|
rdmsr
|
||||||
|
btsl $_EFER_LME, %eax
|
||||||
|
wrmsr
|
||||||
|
popl %ecx
|
||||||
|
|
||||||
/* Enable PAE and LA57 (if required) paging modes */
|
/* Enable PAE and LA57 (if required) paging modes */
|
||||||
movl $X86_CR4_PAE, %eax
|
movl $X86_CR4_PAE, %eax
|
||||||
cmpl $0, %edx
|
cmpl $0, %edx
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#define TRAMPOLINE_32BIT_PGTABLE_OFFSET 0
|
#define TRAMPOLINE_32BIT_PGTABLE_OFFSET 0
|
||||||
|
|
||||||
#define TRAMPOLINE_32BIT_CODE_OFFSET PAGE_SIZE
|
#define TRAMPOLINE_32BIT_CODE_OFFSET PAGE_SIZE
|
||||||
#define TRAMPOLINE_32BIT_CODE_SIZE 0x60
|
#define TRAMPOLINE_32BIT_CODE_SIZE 0x70
|
||||||
|
|
||||||
#define TRAMPOLINE_32BIT_STACK_END TRAMPOLINE_32BIT_SIZE
|
#define TRAMPOLINE_32BIT_STACK_END TRAMPOLINE_32BIT_SIZE
|
||||||
|
|
||||||
|
|||||||
@@ -361,7 +361,8 @@ ENTRY(entry_INT80_compat)
|
|||||||
|
|
||||||
/* Need to switch before accessing the thread stack. */
|
/* Need to switch before accessing the thread stack. */
|
||||||
SWITCH_TO_KERNEL_CR3 scratch_reg=%rdi
|
SWITCH_TO_KERNEL_CR3 scratch_reg=%rdi
|
||||||
movq %rsp, %rdi
|
/* In the Xen PV case we already run on the thread stack. */
|
||||||
|
ALTERNATIVE "movq %rsp, %rdi", "jmp .Lint80_keep_stack", X86_FEATURE_XENPV
|
||||||
movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp
|
movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp
|
||||||
|
|
||||||
pushq 6*8(%rdi) /* regs->ss */
|
pushq 6*8(%rdi) /* regs->ss */
|
||||||
@@ -370,8 +371,9 @@ ENTRY(entry_INT80_compat)
|
|||||||
pushq 3*8(%rdi) /* regs->cs */
|
pushq 3*8(%rdi) /* regs->cs */
|
||||||
pushq 2*8(%rdi) /* regs->ip */
|
pushq 2*8(%rdi) /* regs->ip */
|
||||||
pushq 1*8(%rdi) /* regs->orig_ax */
|
pushq 1*8(%rdi) /* regs->orig_ax */
|
||||||
|
|
||||||
pushq (%rdi) /* pt_regs->di */
|
pushq (%rdi) /* pt_regs->di */
|
||||||
|
.Lint80_keep_stack:
|
||||||
|
|
||||||
pushq %rsi /* pt_regs->si */
|
pushq %rsi /* pt_regs->si */
|
||||||
xorl %esi, %esi /* nospec si */
|
xorl %esi, %esi /* nospec si */
|
||||||
pushq %rdx /* pt_regs->dx */
|
pushq %rdx /* pt_regs->dx */
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* "Big Core" Processors (Branded as Core, Xeon, etc...)
|
* "Big Core" Processors (Branded as Core, Xeon, etc...)
|
||||||
*
|
*
|
||||||
* The "_X" parts are generally the EP and EX Xeons, or the
|
* The "_X" parts are generally the EP and EX Xeons, or the
|
||||||
* "Extreme" ones, like Broadwell-E.
|
* "Extreme" ones, like Broadwell-E, or Atom microserver.
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
#define INTEL_FAM6_ATOM_GOLDMONT 0x5C /* Apollo Lake */
|
#define INTEL_FAM6_ATOM_GOLDMONT 0x5C /* Apollo Lake */
|
||||||
#define INTEL_FAM6_ATOM_GOLDMONT_X 0x5F /* Denverton */
|
#define INTEL_FAM6_ATOM_GOLDMONT_X 0x5F /* Denverton */
|
||||||
#define INTEL_FAM6_ATOM_GOLDMONT_PLUS 0x7A /* Gemini Lake */
|
#define INTEL_FAM6_ATOM_GOLDMONT_PLUS 0x7A /* Gemini Lake */
|
||||||
|
#define INTEL_FAM6_ATOM_TREMONT_X 0x86 /* Jacobsville */
|
||||||
|
|
||||||
/* Xeon Phi */
|
/* Xeon Phi */
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,10 @@ static inline void switch_ldt(struct mm_struct *prev, struct mm_struct *next)
|
|||||||
|
|
||||||
void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk);
|
void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init a new mm. Used on mm copies, like at fork()
|
||||||
|
* and on mm's that are brand-new, like at execve().
|
||||||
|
*/
|
||||||
static inline int init_new_context(struct task_struct *tsk,
|
static inline int init_new_context(struct task_struct *tsk,
|
||||||
struct mm_struct *mm)
|
struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
@@ -228,8 +232,22 @@ do { \
|
|||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static inline void arch_dup_pkeys(struct mm_struct *oldmm,
|
||||||
|
struct mm_struct *mm)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
|
||||||
|
if (!cpu_feature_enabled(X86_FEATURE_OSPKE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Duplicate the oldmm pkey state in mm: */
|
||||||
|
mm->context.pkey_allocation_map = oldmm->context.pkey_allocation_map;
|
||||||
|
mm->context.execute_only_pkey = oldmm->context.execute_only_pkey;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static inline int arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
|
static inline int arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
|
arch_dup_pkeys(oldmm, mm);
|
||||||
paravirt_arch_dup_mmap(oldmm, mm);
|
paravirt_arch_dup_mmap(oldmm, mm);
|
||||||
return ldt_dup_context(oldmm, mm);
|
return ldt_dup_context(oldmm, mm);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_KASAN
|
#ifdef CONFIG_KASAN
|
||||||
|
#ifdef CONFIG_KASAN_EXTRA
|
||||||
|
#define KASAN_STACK_ORDER 2
|
||||||
|
#else
|
||||||
#define KASAN_STACK_ORDER 1
|
#define KASAN_STACK_ORDER 1
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define KASAN_STACK_ORDER 0
|
#define KASAN_STACK_ORDER 0
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef _ASM_X86_RESCTRL_SCHED_H
|
#ifndef _ASM_X86_RESCTRL_SCHED_H
|
||||||
#define _ASM_X86_RESCTRL_SCHED_H
|
#define _ASM_X86_RESCTRL_SCHED_H
|
||||||
|
|
||||||
#ifdef CONFIG_X86_RESCTRL
|
#ifdef CONFIG_X86_CPU_RESCTRL
|
||||||
|
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/jump_label.h>
|
#include <linux/jump_label.h>
|
||||||
@@ -88,6 +88,6 @@ static inline void resctrl_sched_in(void)
|
|||||||
|
|
||||||
static inline void resctrl_sched_in(void) {}
|
static inline void resctrl_sched_in(void) {}
|
||||||
|
|
||||||
#endif /* CONFIG_X86_RESCTRL */
|
#endif /* CONFIG_X86_CPU_RESCTRL */
|
||||||
|
|
||||||
#endif /* _ASM_X86_RESCTRL_SCHED_H */
|
#endif /* _ASM_X86_RESCTRL_SCHED_H */
|
||||||
|
|||||||
@@ -711,7 +711,7 @@ static __must_check inline bool user_access_begin(const void __user *ptr, size_t
|
|||||||
{
|
{
|
||||||
if (unlikely(!access_ok(ptr,len)))
|
if (unlikely(!access_ok(ptr,len)))
|
||||||
return 0;
|
return 0;
|
||||||
__uaccess_begin();
|
__uaccess_begin_nospec();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#define user_access_begin(a,b) user_access_begin(a,b)
|
#define user_access_begin(a,b) user_access_begin(a,b)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
|
|||||||
obj-$(CONFIG_X86_MCE) += mce/
|
obj-$(CONFIG_X86_MCE) += mce/
|
||||||
obj-$(CONFIG_MTRR) += mtrr/
|
obj-$(CONFIG_MTRR) += mtrr/
|
||||||
obj-$(CONFIG_MICROCODE) += microcode/
|
obj-$(CONFIG_MICROCODE) += microcode/
|
||||||
obj-$(CONFIG_X86_RESCTRL) += resctrl/
|
obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/
|
||||||
|
|
||||||
obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
|
obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ void __init check_bugs(void)
|
|||||||
* identify_boot_cpu() initialized SMT support information, let the
|
* identify_boot_cpu() initialized SMT support information, let the
|
||||||
* core code know.
|
* core code know.
|
||||||
*/
|
*/
|
||||||
cpu_smt_check_topology_early();
|
cpu_smt_check_topology();
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_SMP)) {
|
if (!IS_ENABLED(CONFIG_SMP)) {
|
||||||
pr_info("CPU: ");
|
pr_info("CPU: ");
|
||||||
|
|||||||
@@ -855,7 +855,7 @@ load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
|
|||||||
if (!p) {
|
if (!p) {
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
if (boot_cpu_data.microcode == p->patch_id)
|
if (boot_cpu_data.microcode >= p->patch_id)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = UCODE_NEW;
|
ret = UCODE_NEW;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
obj-$(CONFIG_X86_RESCTRL) += core.o rdtgroup.o monitor.o
|
obj-$(CONFIG_X86_CPU_RESCTRL) += core.o rdtgroup.o monitor.o
|
||||||
obj-$(CONFIG_X86_RESCTRL) += ctrlmondata.o pseudo_lock.o
|
obj-$(CONFIG_X86_CPU_RESCTRL) += ctrlmondata.o pseudo_lock.o
|
||||||
CFLAGS_pseudo_lock.o = -I$(src)
|
CFLAGS_pseudo_lock.o = -I$(src)
|
||||||
|
|||||||
@@ -470,6 +470,7 @@ int crash_load_segments(struct kimage *image)
|
|||||||
|
|
||||||
kbuf.memsz = kbuf.bufsz;
|
kbuf.memsz = kbuf.bufsz;
|
||||||
kbuf.buf_align = ELF_CORE_HEADER_ALIGN;
|
kbuf.buf_align = ELF_CORE_HEADER_ALIGN;
|
||||||
|
kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
|
||||||
ret = kexec_add_buffer(&kbuf);
|
ret = kexec_add_buffer(&kbuf);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
vfree((void *)image->arch.elf_headers);
|
vfree((void *)image->arch.elf_headers);
|
||||||
|
|||||||
@@ -21,10 +21,6 @@
|
|||||||
|
|
||||||
#define HPET_MASK CLOCKSOURCE_MASK(32)
|
#define HPET_MASK CLOCKSOURCE_MASK(32)
|
||||||
|
|
||||||
/* FSEC = 10^-15
|
|
||||||
NSEC = 10^-9 */
|
|
||||||
#define FSEC_PER_NSEC 1000000L
|
|
||||||
|
|
||||||
#define HPET_DEV_USED_BIT 2
|
#define HPET_DEV_USED_BIT 2
|
||||||
#define HPET_DEV_USED (1 << HPET_DEV_USED_BIT)
|
#define HPET_DEV_USED (1 << HPET_DEV_USED_BIT)
|
||||||
#define HPET_DEV_VALID 0x8
|
#define HPET_DEV_VALID 0x8
|
||||||
|
|||||||
@@ -167,6 +167,9 @@ setup_efi_state(struct boot_params *params, unsigned long params_load_addr,
|
|||||||
struct efi_info *current_ei = &boot_params.efi_info;
|
struct efi_info *current_ei = &boot_params.efi_info;
|
||||||
struct efi_info *ei = ¶ms->efi_info;
|
struct efi_info *ei = ¶ms->efi_info;
|
||||||
|
|
||||||
|
if (!efi_enabled(EFI_RUNTIME_SERVICES))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (!current_ei->efi_memmap_size)
|
if (!current_ei->efi_memmap_size)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -434,6 +437,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
|||||||
kbuf.memsz = PAGE_ALIGN(header->init_size);
|
kbuf.memsz = PAGE_ALIGN(header->init_size);
|
||||||
kbuf.buf_align = header->kernel_alignment;
|
kbuf.buf_align = header->kernel_alignment;
|
||||||
kbuf.buf_min = MIN_KERNEL_LOAD_ADDR;
|
kbuf.buf_min = MIN_KERNEL_LOAD_ADDR;
|
||||||
|
kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
|
||||||
ret = kexec_add_buffer(&kbuf);
|
ret = kexec_add_buffer(&kbuf);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_free_params;
|
goto out_free_params;
|
||||||
@@ -448,6 +452,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
|||||||
kbuf.bufsz = kbuf.memsz = initrd_len;
|
kbuf.bufsz = kbuf.memsz = initrd_len;
|
||||||
kbuf.buf_align = PAGE_SIZE;
|
kbuf.buf_align = PAGE_SIZE;
|
||||||
kbuf.buf_min = MIN_INITRD_LOAD_ADDR;
|
kbuf.buf_min = MIN_INITRD_LOAD_ADDR;
|
||||||
|
kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
|
||||||
ret = kexec_add_buffer(&kbuf);
|
ret = kexec_add_buffer(&kbuf);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_free_params;
|
goto out_free_params;
|
||||||
|
|||||||
@@ -457,6 +457,7 @@ static void __send_ipi_mask(const struct cpumask *mask, int vector)
|
|||||||
#else
|
#else
|
||||||
u64 ipi_bitmap = 0;
|
u64 ipi_bitmap = 0;
|
||||||
#endif
|
#endif
|
||||||
|
long ret;
|
||||||
|
|
||||||
if (cpumask_empty(mask))
|
if (cpumask_empty(mask))
|
||||||
return;
|
return;
|
||||||
@@ -482,8 +483,9 @@ static void __send_ipi_mask(const struct cpumask *mask, int vector)
|
|||||||
} else if (apic_id < min + KVM_IPI_CLUSTER_SIZE) {
|
} else if (apic_id < min + KVM_IPI_CLUSTER_SIZE) {
|
||||||
max = apic_id < max ? max : apic_id;
|
max = apic_id < max ? max : apic_id;
|
||||||
} else {
|
} else {
|
||||||
kvm_hypercall4(KVM_HC_SEND_IPI, (unsigned long)ipi_bitmap,
|
ret = kvm_hypercall4(KVM_HC_SEND_IPI, (unsigned long)ipi_bitmap,
|
||||||
(unsigned long)(ipi_bitmap >> BITS_PER_LONG), min, icr);
|
(unsigned long)(ipi_bitmap >> BITS_PER_LONG), min, icr);
|
||||||
|
WARN_ONCE(ret < 0, "KVM: failed to send PV IPI: %ld", ret);
|
||||||
min = max = apic_id;
|
min = max = apic_id;
|
||||||
ipi_bitmap = 0;
|
ipi_bitmap = 0;
|
||||||
}
|
}
|
||||||
@@ -491,8 +493,9 @@ static void __send_ipi_mask(const struct cpumask *mask, int vector)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ipi_bitmap) {
|
if (ipi_bitmap) {
|
||||||
kvm_hypercall4(KVM_HC_SEND_IPI, (unsigned long)ipi_bitmap,
|
ret = kvm_hypercall4(KVM_HC_SEND_IPI, (unsigned long)ipi_bitmap,
|
||||||
(unsigned long)(ipi_bitmap >> BITS_PER_LONG), min, icr);
|
(unsigned long)(ipi_bitmap >> BITS_PER_LONG), min, icr);
|
||||||
|
WARN_ONCE(ret < 0, "KVM: failed to send PV IPI: %ld", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user