mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-02-12 02:05:54 +00:00
Update HID, DRP, GPIO and kernel process accounting
This commit is contained in:
parent
044cfc9a3a
commit
8e6463f821
561
.clang-format
Normal file
561
.clang-format
Normal file
@ -0,0 +1,561 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
#
|
||||||
|
# clang-format configuration file. Intended for clang-format >= 4.
|
||||||
|
#
|
||||||
|
# For more information, see:
|
||||||
|
#
|
||||||
|
# Documentation/process/clang-format.rst
|
||||||
|
# https://clang.llvm.org/docs/ClangFormat.html
|
||||||
|
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||||
|
#
|
||||||
|
---
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignConsecutiveDeclarations: false
|
||||||
|
#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
|
||||||
|
AlignOperands: true
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AllowShortBlocksOnASingleLine: false
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: None
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
AlwaysBreakTemplateDeclarations: false
|
||||||
|
BinPackArguments: true
|
||||||
|
BinPackParameters: true
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: false
|
||||||
|
AfterControlStatement: false
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: true
|
||||||
|
AfterNamespace: true
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: false
|
||||||
|
AfterUnion: false
|
||||||
|
#AfterExternBlock: false # Unknown to clang-format-5.0
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
IndentBraces: false
|
||||||
|
#SplitEmptyFunction: true # Unknown to clang-format-4.0
|
||||||
|
#SplitEmptyRecord: true # Unknown to clang-format-4.0
|
||||||
|
#SplitEmptyNamespace: true # Unknown to clang-format-4.0
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
|
||||||
|
BreakBeforeTernaryOperators: false
|
||||||
|
BreakConstructorInitializersBeforeComma: false
|
||||||
|
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
|
||||||
|
BreakAfterJavaFieldAnnotations: false
|
||||||
|
BreakStringLiterals: false
|
||||||
|
ColumnLimit: 80
|
||||||
|
CommentPragmas: '^ IWYU pragma:'
|
||||||
|
#CompactNamespaces: false # Unknown to clang-format-4.0
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||||
|
ConstructorInitializerIndentWidth: 8
|
||||||
|
ContinuationIndentWidth: 8
|
||||||
|
Cpp11BracedListStyle: false
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
DisableFormat: false
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
#FixNamespaceComments: false # Unknown to clang-format-4.0
|
||||||
|
|
||||||
|
# Taken from:
|
||||||
|
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ \
|
||||||
|
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
|
||||||
|
# | sort | uniq
|
||||||
|
ForEachMacros:
|
||||||
|
- 'apei_estatus_for_each_section'
|
||||||
|
- 'ata_for_each_dev'
|
||||||
|
- '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_uid_for_each'
|
||||||
|
- '__bio_for_each_bvec'
|
||||||
|
- 'bio_for_each_bvec'
|
||||||
|
- 'bio_for_each_bvec_all'
|
||||||
|
- 'bio_for_each_integrity_vec'
|
||||||
|
- '__bio_for_each_segment'
|
||||||
|
- 'bio_for_each_segment'
|
||||||
|
- 'bio_for_each_segment_all'
|
||||||
|
- 'bio_list_for_each'
|
||||||
|
- 'bip_for_each_vec'
|
||||||
|
- 'bitmap_for_each_clear_region'
|
||||||
|
- 'bitmap_for_each_set_region'
|
||||||
|
- 'blkg_for_each_descendant_post'
|
||||||
|
- 'blkg_for_each_descendant_pre'
|
||||||
|
- 'blk_queue_for_each_rl'
|
||||||
|
- 'bond_for_each_slave'
|
||||||
|
- 'bond_for_each_slave_rcu'
|
||||||
|
- 'bpf_for_each_spilled_reg'
|
||||||
|
- 'btree_for_each_safe128'
|
||||||
|
- 'btree_for_each_safe32'
|
||||||
|
- 'btree_for_each_safe64'
|
||||||
|
- 'btree_for_each_safel'
|
||||||
|
- 'card_for_each_dev'
|
||||||
|
- 'cgroup_taskset_for_each'
|
||||||
|
- 'cgroup_taskset_for_each_leader'
|
||||||
|
- 'cpufreq_for_each_entry'
|
||||||
|
- 'cpufreq_for_each_entry_idx'
|
||||||
|
- 'cpufreq_for_each_valid_entry'
|
||||||
|
- 'cpufreq_for_each_valid_entry_idx'
|
||||||
|
- 'css_for_each_child'
|
||||||
|
- 'css_for_each_descendant_post'
|
||||||
|
- 'css_for_each_descendant_pre'
|
||||||
|
- 'device_for_each_child_node'
|
||||||
|
- 'displayid_iter_for_each'
|
||||||
|
- 'dma_fence_chain_for_each'
|
||||||
|
- 'do_for_each_ftrace_op'
|
||||||
|
- 'drm_atomic_crtc_for_each_plane'
|
||||||
|
- 'drm_atomic_crtc_state_for_each_plane'
|
||||||
|
- 'drm_atomic_crtc_state_for_each_plane_state'
|
||||||
|
- 'drm_atomic_for_each_plane_damage'
|
||||||
|
- 'drm_client_for_each_connector_iter'
|
||||||
|
- 'drm_client_for_each_modeset'
|
||||||
|
- 'drm_connector_for_each_possible_encoder'
|
||||||
|
- 'drm_for_each_bridge_in_chain'
|
||||||
|
- 'drm_for_each_connector_iter'
|
||||||
|
- 'drm_for_each_crtc'
|
||||||
|
- 'drm_for_each_crtc_reverse'
|
||||||
|
- 'drm_for_each_encoder'
|
||||||
|
- 'drm_for_each_encoder_mask'
|
||||||
|
- 'drm_for_each_fb'
|
||||||
|
- 'drm_for_each_legacy_plane'
|
||||||
|
- 'drm_for_each_plane'
|
||||||
|
- 'drm_for_each_plane_mask'
|
||||||
|
- 'drm_for_each_privobj'
|
||||||
|
- 'drm_mm_for_each_hole'
|
||||||
|
- 'drm_mm_for_each_node'
|
||||||
|
- 'drm_mm_for_each_node_in_range'
|
||||||
|
- 'drm_mm_for_each_node_safe'
|
||||||
|
- 'flow_action_for_each'
|
||||||
|
- 'for_each_acpi_dev_match'
|
||||||
|
- 'for_each_active_dev_scope'
|
||||||
|
- 'for_each_active_drhd_unit'
|
||||||
|
- 'for_each_active_iommu'
|
||||||
|
- 'for_each_aggr_pgid'
|
||||||
|
- 'for_each_available_child_of_node'
|
||||||
|
- 'for_each_bio'
|
||||||
|
- 'for_each_board_func_rsrc'
|
||||||
|
- 'for_each_bvec'
|
||||||
|
- 'for_each_card_auxs'
|
||||||
|
- 'for_each_card_auxs_safe'
|
||||||
|
- 'for_each_card_components'
|
||||||
|
- 'for_each_card_dapms'
|
||||||
|
- 'for_each_card_pre_auxs'
|
||||||
|
- 'for_each_card_prelinks'
|
||||||
|
- 'for_each_card_rtds'
|
||||||
|
- 'for_each_card_rtds_safe'
|
||||||
|
- 'for_each_card_widgets'
|
||||||
|
- 'for_each_card_widgets_safe'
|
||||||
|
- 'for_each_cgroup_storage_type'
|
||||||
|
- 'for_each_child_of_node'
|
||||||
|
- 'for_each_clear_bit'
|
||||||
|
- 'for_each_clear_bit_from'
|
||||||
|
- 'for_each_cmsghdr'
|
||||||
|
- 'for_each_compatible_node'
|
||||||
|
- 'for_each_component_dais'
|
||||||
|
- 'for_each_component_dais_safe'
|
||||||
|
- 'for_each_comp_order'
|
||||||
|
- 'for_each_console'
|
||||||
|
- 'for_each_cpu'
|
||||||
|
- 'for_each_cpu_and'
|
||||||
|
- 'for_each_cpu_not'
|
||||||
|
- 'for_each_cpu_wrap'
|
||||||
|
- 'for_each_dapm_widgets'
|
||||||
|
- 'for_each_dev_addr'
|
||||||
|
- 'for_each_dev_scope'
|
||||||
|
- '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_dss_dev'
|
||||||
|
- 'for_each_dtpm_table'
|
||||||
|
- 'for_each_efi_memory_desc'
|
||||||
|
- 'for_each_efi_memory_desc_in_map'
|
||||||
|
- 'for_each_element'
|
||||||
|
- 'for_each_element_extid'
|
||||||
|
- 'for_each_element_id'
|
||||||
|
- 'for_each_endpoint_of_node'
|
||||||
|
- 'for_each_evictable_lru'
|
||||||
|
- 'for_each_fib6_node_rt_rcu'
|
||||||
|
- 'for_each_fib6_walker_rt'
|
||||||
|
- 'for_each_free_mem_pfn_range_in_zone'
|
||||||
|
- 'for_each_free_mem_pfn_range_in_zone_from'
|
||||||
|
- 'for_each_free_mem_range'
|
||||||
|
- 'for_each_free_mem_range_reverse'
|
||||||
|
- 'for_each_func_rsrc'
|
||||||
|
- 'for_each_hstate'
|
||||||
|
- 'for_each_if'
|
||||||
|
- 'for_each_iommu'
|
||||||
|
- 'for_each_ip_tunnel_rcu'
|
||||||
|
- 'for_each_irq_nr'
|
||||||
|
- 'for_each_link_codecs'
|
||||||
|
- 'for_each_link_cpus'
|
||||||
|
- 'for_each_link_platforms'
|
||||||
|
- 'for_each_lru'
|
||||||
|
- 'for_each_matching_node'
|
||||||
|
- 'for_each_matching_node_and_match'
|
||||||
|
- 'for_each_member'
|
||||||
|
- 'for_each_memcg_cache_index'
|
||||||
|
- 'for_each_mem_pfn_range'
|
||||||
|
- '__for_each_mem_range'
|
||||||
|
- 'for_each_mem_range'
|
||||||
|
- '__for_each_mem_range_rev'
|
||||||
|
- 'for_each_mem_range_rev'
|
||||||
|
- 'for_each_mem_region'
|
||||||
|
- 'for_each_migratetype_order'
|
||||||
|
- 'for_each_msi_entry'
|
||||||
|
- 'for_each_msi_entry_safe'
|
||||||
|
- 'for_each_msi_vector'
|
||||||
|
- 'for_each_net'
|
||||||
|
- 'for_each_net_continue_reverse'
|
||||||
|
- 'for_each_netdev'
|
||||||
|
- 'for_each_netdev_continue'
|
||||||
|
- 'for_each_netdev_continue_rcu'
|
||||||
|
- 'for_each_netdev_continue_reverse'
|
||||||
|
- 'for_each_netdev_feature'
|
||||||
|
- 'for_each_netdev_in_bond_rcu'
|
||||||
|
- 'for_each_netdev_rcu'
|
||||||
|
- 'for_each_netdev_reverse'
|
||||||
|
- 'for_each_netdev_safe'
|
||||||
|
- 'for_each_net_rcu'
|
||||||
|
- 'for_each_new_connector_in_state'
|
||||||
|
- 'for_each_new_crtc_in_state'
|
||||||
|
- 'for_each_new_mst_mgr_in_state'
|
||||||
|
- 'for_each_new_plane_in_state'
|
||||||
|
- 'for_each_new_private_obj_in_state'
|
||||||
|
- 'for_each_node'
|
||||||
|
- 'for_each_node_by_name'
|
||||||
|
- 'for_each_node_by_type'
|
||||||
|
- 'for_each_node_mask'
|
||||||
|
- 'for_each_node_state'
|
||||||
|
- 'for_each_node_with_cpus'
|
||||||
|
- 'for_each_node_with_property'
|
||||||
|
- 'for_each_nonreserved_multicast_dest_pgid'
|
||||||
|
- 'for_each_of_allnodes'
|
||||||
|
- 'for_each_of_allnodes_from'
|
||||||
|
- 'for_each_of_cpu_node'
|
||||||
|
- 'for_each_of_pci_range'
|
||||||
|
- 'for_each_old_connector_in_state'
|
||||||
|
- 'for_each_old_crtc_in_state'
|
||||||
|
- 'for_each_old_mst_mgr_in_state'
|
||||||
|
- 'for_each_oldnew_connector_in_state'
|
||||||
|
- 'for_each_oldnew_crtc_in_state'
|
||||||
|
- 'for_each_oldnew_mst_mgr_in_state'
|
||||||
|
- 'for_each_oldnew_plane_in_state'
|
||||||
|
- 'for_each_oldnew_plane_in_state_reverse'
|
||||||
|
- 'for_each_oldnew_private_obj_in_state'
|
||||||
|
- 'for_each_old_plane_in_state'
|
||||||
|
- 'for_each_old_private_obj_in_state'
|
||||||
|
- 'for_each_online_cpu'
|
||||||
|
- 'for_each_online_node'
|
||||||
|
- 'for_each_online_pgdat'
|
||||||
|
- 'for_each_pci_bridge'
|
||||||
|
- 'for_each_pci_dev'
|
||||||
|
- 'for_each_pci_msi_entry'
|
||||||
|
- 'for_each_pcm_streams'
|
||||||
|
- 'for_each_physmem_range'
|
||||||
|
- 'for_each_populated_zone'
|
||||||
|
- 'for_each_possible_cpu'
|
||||||
|
- 'for_each_present_cpu'
|
||||||
|
- 'for_each_prime_number'
|
||||||
|
- 'for_each_prime_number_from'
|
||||||
|
- 'for_each_process'
|
||||||
|
- 'for_each_process_thread'
|
||||||
|
- 'for_each_prop_codec_conf'
|
||||||
|
- 'for_each_prop_dai_codec'
|
||||||
|
- 'for_each_prop_dai_cpu'
|
||||||
|
- 'for_each_prop_dlc_codecs'
|
||||||
|
- 'for_each_prop_dlc_cpus'
|
||||||
|
- 'for_each_prop_dlc_platforms'
|
||||||
|
- 'for_each_property_of_node'
|
||||||
|
- 'for_each_registered_fb'
|
||||||
|
- 'for_each_requested_gpio'
|
||||||
|
- 'for_each_requested_gpio_in_range'
|
||||||
|
- 'for_each_reserved_mem_range'
|
||||||
|
- 'for_each_reserved_mem_region'
|
||||||
|
- 'for_each_rtd_codec_dais'
|
||||||
|
- 'for_each_rtd_components'
|
||||||
|
- 'for_each_rtd_cpu_dais'
|
||||||
|
- 'for_each_rtd_dais'
|
||||||
|
- 'for_each_set_bit'
|
||||||
|
- 'for_each_set_bit_from'
|
||||||
|
- 'for_each_set_clump8'
|
||||||
|
- 'for_each_sg'
|
||||||
|
- 'for_each_sg_dma_page'
|
||||||
|
- 'for_each_sg_page'
|
||||||
|
- 'for_each_sgtable_dma_page'
|
||||||
|
- 'for_each_sgtable_dma_sg'
|
||||||
|
- 'for_each_sgtable_page'
|
||||||
|
- 'for_each_sgtable_sg'
|
||||||
|
- 'for_each_sibling_event'
|
||||||
|
- 'for_each_subelement'
|
||||||
|
- 'for_each_subelement_extid'
|
||||||
|
- 'for_each_subelement_id'
|
||||||
|
- '__for_each_thread'
|
||||||
|
- 'for_each_thread'
|
||||||
|
- 'for_each_unicast_dest_pgid'
|
||||||
|
- 'for_each_vsi'
|
||||||
|
- 'for_each_wakeup_source'
|
||||||
|
- 'for_each_zone'
|
||||||
|
- 'for_each_zone_zonelist'
|
||||||
|
- 'for_each_zone_zonelist_nodemask'
|
||||||
|
- 'fwnode_for_each_available_child_node'
|
||||||
|
- 'fwnode_for_each_child_node'
|
||||||
|
- 'fwnode_graph_for_each_endpoint'
|
||||||
|
- 'gadget_for_each_ep'
|
||||||
|
- 'genradix_for_each'
|
||||||
|
- 'genradix_for_each_from'
|
||||||
|
- 'hash_for_each'
|
||||||
|
- 'hash_for_each_possible'
|
||||||
|
- 'hash_for_each_possible_rcu'
|
||||||
|
- 'hash_for_each_possible_rcu_notrace'
|
||||||
|
- 'hash_for_each_possible_safe'
|
||||||
|
- 'hash_for_each_rcu'
|
||||||
|
- 'hash_for_each_safe'
|
||||||
|
- 'hctx_for_each_ctx'
|
||||||
|
- 'hlist_bl_for_each_entry'
|
||||||
|
- 'hlist_bl_for_each_entry_rcu'
|
||||||
|
- 'hlist_bl_for_each_entry_safe'
|
||||||
|
- 'hlist_for_each'
|
||||||
|
- 'hlist_for_each_entry'
|
||||||
|
- 'hlist_for_each_entry_continue'
|
||||||
|
- 'hlist_for_each_entry_continue_rcu'
|
||||||
|
- 'hlist_for_each_entry_continue_rcu_bh'
|
||||||
|
- 'hlist_for_each_entry_from'
|
||||||
|
- 'hlist_for_each_entry_from_rcu'
|
||||||
|
- 'hlist_for_each_entry_rcu'
|
||||||
|
- 'hlist_for_each_entry_rcu_bh'
|
||||||
|
- 'hlist_for_each_entry_rcu_notrace'
|
||||||
|
- 'hlist_for_each_entry_safe'
|
||||||
|
- 'hlist_for_each_entry_srcu'
|
||||||
|
- '__hlist_for_each_rcu'
|
||||||
|
- 'hlist_for_each_safe'
|
||||||
|
- 'hlist_nulls_for_each_entry'
|
||||||
|
- 'hlist_nulls_for_each_entry_from'
|
||||||
|
- 'hlist_nulls_for_each_entry_rcu'
|
||||||
|
- 'hlist_nulls_for_each_entry_safe'
|
||||||
|
- 'i3c_bus_for_each_i2cdev'
|
||||||
|
- 'i3c_bus_for_each_i3cdev'
|
||||||
|
- 'ide_host_for_each_port'
|
||||||
|
- 'ide_port_for_each_dev'
|
||||||
|
- 'ide_port_for_each_present_dev'
|
||||||
|
- 'idr_for_each_entry'
|
||||||
|
- 'idr_for_each_entry_continue'
|
||||||
|
- 'idr_for_each_entry_continue_ul'
|
||||||
|
- 'idr_for_each_entry_ul'
|
||||||
|
- 'in_dev_for_each_ifa_rcu'
|
||||||
|
- 'in_dev_for_each_ifa_rtnl'
|
||||||
|
- 'inet_bind_bucket_for_each'
|
||||||
|
- 'inet_lhash2_for_each_icsk_rcu'
|
||||||
|
- 'key_for_each'
|
||||||
|
- 'key_for_each_safe'
|
||||||
|
- 'klp_for_each_func'
|
||||||
|
- 'klp_for_each_func_safe'
|
||||||
|
- 'klp_for_each_func_static'
|
||||||
|
- 'klp_for_each_object'
|
||||||
|
- 'klp_for_each_object_safe'
|
||||||
|
- 'klp_for_each_object_static'
|
||||||
|
- 'kunit_suite_for_each_test_case'
|
||||||
|
- 'kvm_for_each_memslot'
|
||||||
|
- 'kvm_for_each_vcpu'
|
||||||
|
- 'list_for_each'
|
||||||
|
- 'list_for_each_codec'
|
||||||
|
- 'list_for_each_codec_safe'
|
||||||
|
- 'list_for_each_continue'
|
||||||
|
- 'list_for_each_entry'
|
||||||
|
- 'list_for_each_entry_continue'
|
||||||
|
- 'list_for_each_entry_continue_rcu'
|
||||||
|
- 'list_for_each_entry_continue_reverse'
|
||||||
|
- 'list_for_each_entry_from'
|
||||||
|
- 'list_for_each_entry_from_rcu'
|
||||||
|
- 'list_for_each_entry_from_reverse'
|
||||||
|
- 'list_for_each_entry_lockless'
|
||||||
|
- 'list_for_each_entry_rcu'
|
||||||
|
- 'list_for_each_entry_reverse'
|
||||||
|
- 'list_for_each_entry_safe'
|
||||||
|
- 'list_for_each_entry_safe_continue'
|
||||||
|
- 'list_for_each_entry_safe_from'
|
||||||
|
- 'list_for_each_entry_safe_reverse'
|
||||||
|
- 'list_for_each_entry_srcu'
|
||||||
|
- 'list_for_each_prev'
|
||||||
|
- 'list_for_each_prev_safe'
|
||||||
|
- 'list_for_each_safe'
|
||||||
|
- 'llist_for_each'
|
||||||
|
- 'llist_for_each_entry'
|
||||||
|
- 'llist_for_each_entry_safe'
|
||||||
|
- 'llist_for_each_safe'
|
||||||
|
- 'mci_for_each_dimm'
|
||||||
|
- 'media_device_for_each_entity'
|
||||||
|
- 'media_device_for_each_intf'
|
||||||
|
- 'media_device_for_each_link'
|
||||||
|
- 'media_device_for_each_pad'
|
||||||
|
- 'nanddev_io_for_each_page'
|
||||||
|
- 'netdev_for_each_lower_dev'
|
||||||
|
- 'netdev_for_each_lower_private'
|
||||||
|
- 'netdev_for_each_lower_private_rcu'
|
||||||
|
- 'netdev_for_each_mc_addr'
|
||||||
|
- 'netdev_for_each_uc_addr'
|
||||||
|
- 'netdev_for_each_upper_dev_rcu'
|
||||||
|
- 'netdev_hw_addr_list_for_each'
|
||||||
|
- 'nft_rule_for_each_expr'
|
||||||
|
- 'nla_for_each_attr'
|
||||||
|
- 'nla_for_each_nested'
|
||||||
|
- 'nlmsg_for_each_attr'
|
||||||
|
- 'nlmsg_for_each_msg'
|
||||||
|
- 'nr_neigh_for_each'
|
||||||
|
- 'nr_neigh_for_each_safe'
|
||||||
|
- 'nr_node_for_each'
|
||||||
|
- 'nr_node_for_each_safe'
|
||||||
|
- 'of_for_each_phandle'
|
||||||
|
- 'of_property_for_each_string'
|
||||||
|
- 'of_property_for_each_u32'
|
||||||
|
- 'pci_bus_for_each_resource'
|
||||||
|
- 'pcl_for_each_chunk'
|
||||||
|
- 'pcl_for_each_segment'
|
||||||
|
- 'pcm_for_each_format'
|
||||||
|
- 'ping_portaddr_for_each_entry'
|
||||||
|
- 'plist_for_each'
|
||||||
|
- 'plist_for_each_continue'
|
||||||
|
- 'plist_for_each_entry'
|
||||||
|
- 'plist_for_each_entry_continue'
|
||||||
|
- 'plist_for_each_entry_safe'
|
||||||
|
- 'plist_for_each_safe'
|
||||||
|
- 'pnp_for_each_card'
|
||||||
|
- 'pnp_for_each_dev'
|
||||||
|
- 'protocol_for_each_card'
|
||||||
|
- 'protocol_for_each_dev'
|
||||||
|
- 'queue_for_each_hw_ctx'
|
||||||
|
- 'radix_tree_for_each_slot'
|
||||||
|
- 'radix_tree_for_each_tagged'
|
||||||
|
- 'rb_for_each'
|
||||||
|
- 'rbtree_postorder_for_each_entry_safe'
|
||||||
|
- 'rdma_for_each_block'
|
||||||
|
- 'rdma_for_each_port'
|
||||||
|
- 'rdma_umem_for_each_dma_block'
|
||||||
|
- 'resource_list_for_each_entry'
|
||||||
|
- 'resource_list_for_each_entry_safe'
|
||||||
|
- 'rhl_for_each_entry_rcu'
|
||||||
|
- 'rhl_for_each_rcu'
|
||||||
|
- 'rht_for_each'
|
||||||
|
- 'rht_for_each_entry'
|
||||||
|
- 'rht_for_each_entry_from'
|
||||||
|
- 'rht_for_each_entry_rcu'
|
||||||
|
- 'rht_for_each_entry_rcu_from'
|
||||||
|
- 'rht_for_each_entry_safe'
|
||||||
|
- 'rht_for_each_from'
|
||||||
|
- 'rht_for_each_rcu'
|
||||||
|
- 'rht_for_each_rcu_from'
|
||||||
|
- '__rq_for_each_bio'
|
||||||
|
- 'rq_for_each_bvec'
|
||||||
|
- 'rq_for_each_segment'
|
||||||
|
- 'scsi_for_each_prot_sg'
|
||||||
|
- 'scsi_for_each_sg'
|
||||||
|
- 'sctp_for_each_hentry'
|
||||||
|
- 'sctp_skb_for_each'
|
||||||
|
- 'shdma_for_each_chan'
|
||||||
|
- '__shost_for_each_device'
|
||||||
|
- 'shost_for_each_device'
|
||||||
|
- 'sk_for_each'
|
||||||
|
- 'sk_for_each_bound'
|
||||||
|
- 'sk_for_each_entry_offset_rcu'
|
||||||
|
- 'sk_for_each_from'
|
||||||
|
- 'sk_for_each_rcu'
|
||||||
|
- 'sk_for_each_safe'
|
||||||
|
- 'sk_nulls_for_each'
|
||||||
|
- 'sk_nulls_for_each_from'
|
||||||
|
- 'sk_nulls_for_each_rcu'
|
||||||
|
- 'snd_array_for_each'
|
||||||
|
- 'snd_pcm_group_for_each_entry'
|
||||||
|
- 'snd_soc_dapm_widget_for_each_path'
|
||||||
|
- 'snd_soc_dapm_widget_for_each_path_safe'
|
||||||
|
- 'snd_soc_dapm_widget_for_each_sink_path'
|
||||||
|
- 'snd_soc_dapm_widget_for_each_source_path'
|
||||||
|
- 'tb_property_for_each'
|
||||||
|
- 'tcf_exts_for_each_action'
|
||||||
|
- 'udp_portaddr_for_each_entry'
|
||||||
|
- 'udp_portaddr_for_each_entry_rcu'
|
||||||
|
- 'usb_hub_for_each_child'
|
||||||
|
- 'v4l2_device_for_each_subdev'
|
||||||
|
- 'v4l2_m2m_for_each_dst_buf'
|
||||||
|
- 'v4l2_m2m_for_each_dst_buf_safe'
|
||||||
|
- 'v4l2_m2m_for_each_src_buf'
|
||||||
|
- 'v4l2_m2m_for_each_src_buf_safe'
|
||||||
|
- 'virtio_device_for_each_vq'
|
||||||
|
- 'while_for_each_ftrace_op'
|
||||||
|
- 'xa_for_each'
|
||||||
|
- 'xa_for_each_marked'
|
||||||
|
- 'xa_for_each_range'
|
||||||
|
- 'xa_for_each_start'
|
||||||
|
- 'xas_for_each'
|
||||||
|
- 'xas_for_each_conflict'
|
||||||
|
- 'xas_for_each_marked'
|
||||||
|
- 'xbc_array_for_each_value'
|
||||||
|
- 'xbc_for_each_key_value'
|
||||||
|
- 'xbc_node_for_each_array_value'
|
||||||
|
- 'xbc_node_for_each_child'
|
||||||
|
- 'xbc_node_for_each_key_value'
|
||||||
|
- 'zorro_for_each_dev'
|
||||||
|
|
||||||
|
#IncludeBlocks: Preserve # Unknown to clang-format-5.0
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 1
|
||||||
|
IncludeIsMainRegex: '(Test)?$'
|
||||||
|
IndentCaseLabels: false
|
||||||
|
#IndentPPDirectives: None # Unknown to clang-format-5.0
|
||||||
|
IndentWidth: 8
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
JavaScriptQuotes: Leave
|
||||||
|
JavaScriptWrapImports: true
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
|
MacroBlockBegin: ''
|
||||||
|
MacroBlockEnd: ''
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
|
||||||
|
ObjCBlockIndentWidth: 8
|
||||||
|
ObjCSpaceAfterProperty: true
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
|
||||||
|
# Taken from git's rules
|
||||||
|
#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 30
|
||||||
|
PenaltyBreakComment: 10
|
||||||
|
PenaltyBreakFirstLessLess: 0
|
||||||
|
PenaltyBreakString: 10
|
||||||
|
PenaltyExcessCharacter: 100
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
|
|
||||||
|
PointerAlignment: Right
|
||||||
|
ReflowComments: false
|
||||||
|
SortIncludes: false
|
||||||
|
#SortUsingDeclarations: false # Unknown to clang-format-4.0
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
|
||||||
|
#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
#SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInContainerLiterals: false
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
Standard: Cpp03
|
||||||
|
TabWidth: 8
|
||||||
|
UseTab: Always
|
||||||
|
...
|
3
.cocciconfig
Normal file
3
.cocciconfig
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[spatch]
|
||||||
|
options = --timeout 200
|
||||||
|
options = --use-gitgrep
|
@ -1,7 +1,7 @@
|
|||||||
What: /sys/class/dax/
|
What: /sys/class/dax/
|
||||||
Date: May, 2016
|
Date: May, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description: Device DAX is the device-centric analogue of Filesystem
|
Description: Device DAX is the device-centric analogue of Filesystem
|
||||||
DAX (CONFIG_FS_DAX). It allows memory ranges to be
|
DAX (CONFIG_FS_DAX). It allows memory ranges to be
|
||||||
allocated and mapped without need of an intervening file
|
allocated and mapped without need of an intervening file
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
This ABI is renamed and moved to a new location /sys/kernel/fadump/registered.¬
|
This ABI is renamed and moved to a new location /sys/kernel/fadump/registered.
|
||||||
|
|
||||||
What: /sys/kernel/fadump_registered
|
What: /sys/kernel/fadump_registered
|
||||||
Date: Feb 2012
|
Date: Feb 2012
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
This ABI is renamed and moved to a new location /sys/kernel/fadump/release_mem.¬
|
This ABI is renamed and moved to a new location /sys/kernel/fadump/release_mem.
|
||||||
|
|
||||||
What: /sys/kernel/fadump_release_mem
|
What: /sys/kernel/fadump_release_mem
|
||||||
Date: Feb 2012
|
Date: Feb 2012
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
What: /sys/bus/nd/devices/regionX/nfit/ecc_unit_size
|
What: /sys/bus/nd/devices/regionX/nfit/ecc_unit_size
|
||||||
Date: Aug, 2017
|
Date: Aug, 2017
|
||||||
KernelVersion: v4.14 (Removed v4.18)
|
KernelVersion: v4.14 (Removed v4.18)
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Size of a write request to a DIMM that will not incur a
|
(RO) Size of a write request to a DIMM that will not incur a
|
||||||
read-modify-write cycle at the memory controller.
|
read-modify-write cycle at the memory controller.
|
||||||
|
27
Documentation/ABI/stable/procfs-audit_loginuid
Normal file
27
Documentation/ABI/stable/procfs-audit_loginuid
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
What: Audit Login UID
|
||||||
|
Date: 2005-02-01
|
||||||
|
KernelVersion: 2.6.11-rc2 1e2d1492e178 ("[PATCH] audit: handle loginuid through proc")
|
||||||
|
Contact: linux-audit@redhat.com
|
||||||
|
Users: audit and login applications
|
||||||
|
Description:
|
||||||
|
The /proc/$pid/loginuid pseudofile is written to set and
|
||||||
|
read to get the audit login UID of process $pid as a
|
||||||
|
decimal unsigned int (%u, u32). If it is unset,
|
||||||
|
permissions are not needed to set it. The accessor must
|
||||||
|
have CAP_AUDIT_CONTROL in the initial user namespace to
|
||||||
|
write it if it has been set. It cannot be written again
|
||||||
|
if AUDIT_FEATURE_LOGINUID_IMMUTABLE is enabled. It
|
||||||
|
cannot be unset if AUDIT_FEATURE_ONLY_UNSET_LOGINUID is
|
||||||
|
enabled.
|
||||||
|
|
||||||
|
What: Audit Login Session ID
|
||||||
|
Date: 2008-03-13
|
||||||
|
KernelVersion: 2.6.25-rc7 1e0bd7550ea9 ("[PATCH] export sessionid alongside the loginuid in procfs")
|
||||||
|
Contact: linux-audit@redhat.com
|
||||||
|
Users: audit and login applications
|
||||||
|
Description:
|
||||||
|
The /proc/$pid/sessionid pseudofile is read to get the
|
||||||
|
audit login session ID of process $pid as a decimal
|
||||||
|
unsigned int (%u, u32). It is set automatically,
|
||||||
|
serially assigned with each new login.
|
||||||
|
|
@ -82,6 +82,24 @@ Description: Allows the root user to read or write 64 bit data directly
|
|||||||
If the IOMMU is disabled, it also allows the root user to read
|
If the IOMMU is disabled, it also allows the root user to read
|
||||||
or write from the host a device VA of a host mapped memory
|
or write from the host a device VA of a host mapped memory
|
||||||
|
|
||||||
|
What: /sys/kernel/debug/habanalabs/hl<n>/data_dma
|
||||||
|
Date: Apr 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: ogabbay@kernel.org
|
||||||
|
Description: Allows the root user to read from the device's internal
|
||||||
|
memory (DRAM/SRAM) through a DMA engine.
|
||||||
|
This property is a binary blob that contains the result of the
|
||||||
|
DMA transfer.
|
||||||
|
This custom interface is needed (instead of using the generic
|
||||||
|
Linux user-space PCI mapping) because the amount of internal
|
||||||
|
memory is huge (>32GB) and reading it via the PCI bar will take
|
||||||
|
a very long time.
|
||||||
|
This interface doesn't support concurrency in the same device.
|
||||||
|
In GAUDI and GOYA, this action can cause undefined behavior
|
||||||
|
in case the it is done while the device is executing user
|
||||||
|
workloads.
|
||||||
|
Only supported on GAUDI at this stage.
|
||||||
|
|
||||||
What: /sys/kernel/debug/habanalabs/hl<n>/device
|
What: /sys/kernel/debug/habanalabs/hl<n>/device
|
||||||
Date: Jan 2019
|
Date: Jan 2019
|
||||||
KernelVersion: 5.1
|
KernelVersion: 5.1
|
||||||
@ -90,6 +108,24 @@ Description: Enables the root user to set the device to specific state.
|
|||||||
Valid values are "disable", "enable", "suspend", "resume".
|
Valid values are "disable", "enable", "suspend", "resume".
|
||||||
User can read this property to see the valid values
|
User can read this property to see the valid values
|
||||||
|
|
||||||
|
What: /sys/kernel/debug/habanalabs/hl<n>/dma_size
|
||||||
|
Date: Apr 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: ogabbay@kernel.org
|
||||||
|
Description: Specify the size of the DMA transaction when using DMA to read
|
||||||
|
from the device's internal memory. The value can not be larger
|
||||||
|
than 128MB. Writing to this value initiates the DMA transfer.
|
||||||
|
When the write is finished, the user can read the "data_dma"
|
||||||
|
blob
|
||||||
|
|
||||||
|
What: /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations
|
||||||
|
Date: Jan 2021
|
||||||
|
KernelVersion: 5.12
|
||||||
|
Contact: ogabbay@kernel.org
|
||||||
|
Description: Dumps all security violations to dmesg. This will also ack
|
||||||
|
all security violations meanings those violations will not be
|
||||||
|
dumped next time user calls this API
|
||||||
|
|
||||||
What: /sys/kernel/debug/habanalabs/hl<n>/engines
|
What: /sys/kernel/debug/habanalabs/hl<n>/engines
|
||||||
Date: Jul 2019
|
Date: Jul 2019
|
||||||
KernelVersion: 5.3
|
KernelVersion: 5.3
|
||||||
@ -154,6 +190,16 @@ Description: Displays the hop values and physical address for a given ASID
|
|||||||
e.g. to display info about VA 0x1000 for ASID 1 you need to do:
|
e.g. to display info about VA 0x1000 for ASID 1 you need to do:
|
||||||
echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
|
echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
|
||||||
|
|
||||||
|
What: /sys/kernel/debug/habanalabs/hl<n>/mmu_error
|
||||||
|
Date: Mar 2021
|
||||||
|
KernelVersion: 5.12
|
||||||
|
Contact: fkassabri@habana.ai
|
||||||
|
Description: Check and display page fault or access violation mmu errors for
|
||||||
|
all MMUs specified in mmu_cap_mask.
|
||||||
|
e.g. to display error info for MMU hw cap bit 9, you need to do:
|
||||||
|
echo "0x200" > /sys/kernel/debug/habanalabs/hl0/mmu_error
|
||||||
|
cat /sys/kernel/debug/habanalabs/hl0/mmu_error
|
||||||
|
|
||||||
What: /sys/kernel/debug/habanalabs/hl<n>/set_power_state
|
What: /sys/kernel/debug/habanalabs/hl<n>/set_power_state
|
||||||
Date: Jan 2019
|
Date: Jan 2019
|
||||||
KernelVersion: 5.1
|
KernelVersion: 5.1
|
||||||
@ -161,6 +207,13 @@ Contact: ogabbay@kernel.org
|
|||||||
Description: Sets the PCI power state. Valid values are "1" for D0 and "2"
|
Description: Sets the PCI power state. Valid values are "1" for D0 and "2"
|
||||||
for D3Hot
|
for D3Hot
|
||||||
|
|
||||||
|
What: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
|
||||||
|
Date: Mar 2020
|
||||||
|
KernelVersion: 5.6
|
||||||
|
Contact: ogabbay@kernel.org
|
||||||
|
Description: Sets the stop-on_error option for the device engines. Value of
|
||||||
|
"0" is for disable, otherwise enable.
|
||||||
|
|
||||||
What: /sys/kernel/debug/habanalabs/hl<n>/userptr
|
What: /sys/kernel/debug/habanalabs/hl<n>/userptr
|
||||||
Date: Jan 2019
|
Date: Jan 2019
|
||||||
KernelVersion: 5.1
|
KernelVersion: 5.1
|
||||||
@ -174,19 +227,4 @@ Date: Jan 2019
|
|||||||
KernelVersion: 5.1
|
KernelVersion: 5.1
|
||||||
Contact: ogabbay@kernel.org
|
Contact: ogabbay@kernel.org
|
||||||
Description: Displays a list with information about all the active virtual
|
Description: Displays a list with information about all the active virtual
|
||||||
address mappings per ASID
|
address mappings per ASID and all user mappings of HW blocks
|
||||||
|
|
||||||
What: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
|
|
||||||
Date: Mar 2020
|
|
||||||
KernelVersion: 5.6
|
|
||||||
Contact: ogabbay@kernel.org
|
|
||||||
Description: Sets the stop-on_error option for the device engines. Value of
|
|
||||||
"0" is for disable, otherwise enable.
|
|
||||||
|
|
||||||
What: /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations
|
|
||||||
Date: Jan 2021
|
|
||||||
KernelVersion: 5.12
|
|
||||||
Contact: ogabbay@kernel.org
|
|
||||||
Description: Dumps all security violations to dmesg. This will also ack
|
|
||||||
all security violations meanings those violations will not be
|
|
||||||
dumped next time user calls this API
|
|
||||||
|
@ -44,3 +44,21 @@ Date: Feb 2020
|
|||||||
KernelVersion: 5.7
|
KernelVersion: 5.7
|
||||||
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||||
Description: Contains the device access mode: ro, rw or migration.
|
Description: Contains the device access mode: ro, rw or migration.
|
||||||
|
|
||||||
|
What: /sys/block/rnbd<N>/rnbd/resize
|
||||||
|
Date: Feb 2020
|
||||||
|
KernelVersion: 5.7
|
||||||
|
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||||
|
Description: Write the number of sectors to change the size of the disk.
|
||||||
|
|
||||||
|
What: /sys/block/rnbd<N>/rnbd/remap_device
|
||||||
|
Date: Feb 2020
|
||||||
|
KernelVersion: 5.7
|
||||||
|
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||||
|
Description: Remap the disconnected device if the session is not destroyed yet.
|
||||||
|
|
||||||
|
What: /sys/block/rnbd<N>/rnbd/nr_poll_queues
|
||||||
|
Date: Feb 2020
|
||||||
|
KernelVersion: 5.7
|
||||||
|
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||||
|
Description: Contains the number of poll-mode queues
|
||||||
|
14
Documentation/ABI/testing/sysfs-bus-coresight-devices-trbe
Normal file
14
Documentation/ABI/testing/sysfs-bus-coresight-devices-trbe
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
What: /sys/bus/coresight/devices/trbe<cpu>/align
|
||||||
|
Date: March 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: Anshuman Khandual <anshuman.khandual@arm.com>
|
||||||
|
Description: (Read) Shows the TRBE write pointer alignment. This value
|
||||||
|
is fetched from the TRBIDR register.
|
||||||
|
|
||||||
|
What: /sys/bus/coresight/devices/trbe<cpu>/flag
|
||||||
|
Date: March 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: Anshuman Khandual <anshuman.khandual@arm.com>
|
||||||
|
Description: (Read) Shows if TRBE updates in the memory are with access
|
||||||
|
and dirty flag updates as well. This value is fetched from
|
||||||
|
the TRBIDR register.
|
30
Documentation/ABI/testing/sysfs-bus-event_source-devices-dsa
Normal file
30
Documentation/ABI/testing/sysfs-bus-event_source-devices-dsa
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
What: /sys/bus/event_source/devices/dsa*/format
|
||||||
|
Date: April 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: Tom Zanussi <tom.zanussi@linux.intel.com>
|
||||||
|
Description: Read-only. Attribute group to describe the magic bits
|
||||||
|
that go into perf_event_attr.config or
|
||||||
|
perf_event_attr.config1 for the IDXD DSA pmu. (See also
|
||||||
|
ABI/testing/sysfs-bus-event_source-devices-format).
|
||||||
|
|
||||||
|
Each attribute in this group defines a bit range in
|
||||||
|
perf_event_attr.config or perf_event_attr.config1.
|
||||||
|
All supported attributes are listed below (See the
|
||||||
|
IDXD DSA Spec for possible attribute values)::
|
||||||
|
|
||||||
|
event_category = "config:0-3" - event category
|
||||||
|
event = "config:4-31" - event ID
|
||||||
|
|
||||||
|
filter_wq = "config1:0-31" - workqueue filter
|
||||||
|
filter_tc = "config1:32-39" - traffic class filter
|
||||||
|
filter_pgsz = "config1:40-43" - page size filter
|
||||||
|
filter_sz = "config1:44-51" - transfer size filter
|
||||||
|
filter_eng = "config1:52-59" - engine filter
|
||||||
|
|
||||||
|
What: /sys/bus/event_source/devices/dsa*/cpumask
|
||||||
|
Date: April 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: Tom Zanussi <tom.zanussi@linux.intel.com>
|
||||||
|
Description: Read-only. This file always returns the cpu to which the
|
||||||
|
IDXD DSA pmu is bound for access to all dsa pmu
|
||||||
|
performance monitoring events.
|
@ -33,6 +33,52 @@ Description:
|
|||||||
Description of the physical chip / device for device X.
|
Description of the physical chip / device for device X.
|
||||||
Typically a part number.
|
Typically a part number.
|
||||||
|
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/label
|
||||||
|
KernelVersion: 5.8
|
||||||
|
Contact: linux-iio@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
Optional symbolic label for a device.
|
||||||
|
This is useful for userspace to be able to better identify an
|
||||||
|
individual device.
|
||||||
|
|
||||||
|
The contents of the label are free-form, but there are some
|
||||||
|
standardized uses:
|
||||||
|
|
||||||
|
For proximity sensors which give the proximity (of a person) to
|
||||||
|
a certain wlan or wwan antenna the following standardized labels
|
||||||
|
are used:
|
||||||
|
|
||||||
|
* "proximity-wifi"
|
||||||
|
* "proximity-lte"
|
||||||
|
* "proximity-wifi-lte"
|
||||||
|
* "proximity-wifi-left"
|
||||||
|
* "proximity-wifi-right"
|
||||||
|
|
||||||
|
These are used to indicate to userspace that these proximity
|
||||||
|
sensors may be used to tune transmit power to ensure that
|
||||||
|
Specific Absorption Rate (SAR) limits are honored.
|
||||||
|
The "-left" and "-right" labels are for devices with multiple
|
||||||
|
antennas.
|
||||||
|
|
||||||
|
In some laptops/tablets the standardized proximity sensor labels
|
||||||
|
instead indicate proximity to a specific part of the device:
|
||||||
|
|
||||||
|
* "proximity-palmrest" indicates proximity to the keyboard's palmrest
|
||||||
|
* "proximity-palmrest-left" indicates proximity to the left part of the palmrest
|
||||||
|
* "proximity-palmrest-right" indicates proximity to the right part of the palmrest
|
||||||
|
* "proximity-lap" indicates the device is being used on someone's lap
|
||||||
|
|
||||||
|
Note "proximity-lap" is special in that its value may be
|
||||||
|
calculated by firmware from other sensor readings, rather then
|
||||||
|
being a raw sensor reading.
|
||||||
|
|
||||||
|
For accelerometers used in 2-in-1s with 360° (yoga-style) hinges,
|
||||||
|
which have an accelerometer in both their base and their display,
|
||||||
|
the following standardized labels are used:
|
||||||
|
|
||||||
|
* "accel-base"
|
||||||
|
* "accel-display"
|
||||||
|
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/current_timestamp_clock
|
What: /sys/bus/iio/devices/iio:deviceX/current_timestamp_clock
|
||||||
KernelVersion: 4.5
|
KernelVersion: 4.5
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
@ -325,6 +371,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_offset
|
|||||||
What: /sys/bus/iio/devices/iio:deviceX/in_magn_offset
|
What: /sys/bus/iio/devices/iio:deviceX/in_magn_offset
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/in_rot_offset
|
What: /sys/bus/iio/devices/iio:deviceX/in_rot_offset
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/in_angl_offset
|
What: /sys/bus/iio/devices/iio:deviceX/in_angl_offset
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/in_capacitanceX_offset
|
||||||
KernelVersion: 2.6.35
|
KernelVersion: 2.6.35
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
@ -656,6 +703,8 @@ What: /sys/.../iio:deviceX/events/in_voltageY_thresh_falling_en
|
|||||||
What: /sys/.../iio:deviceX/events/in_voltageY_thresh_either_en
|
What: /sys/.../iio:deviceX/events/in_voltageY_thresh_either_en
|
||||||
What: /sys/.../iio:deviceX/events/in_tempY_thresh_rising_en
|
What: /sys/.../iio:deviceX/events/in_tempY_thresh_rising_en
|
||||||
What: /sys/.../iio:deviceX/events/in_tempY_thresh_falling_en
|
What: /sys/.../iio:deviceX/events/in_tempY_thresh_falling_en
|
||||||
|
What: /sys/.../iio:deviceX/events/in_capacitanceY_thresh_rising_en
|
||||||
|
What: /sys/.../iio:deviceX/events/in_capacitanceY_thresh_falling_en
|
||||||
KernelVersion: 2.6.37
|
KernelVersion: 2.6.37
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
@ -733,6 +782,32 @@ Description:
|
|||||||
a given event type is enabled a future point (and not those for
|
a given event type is enabled a future point (and not those for
|
||||||
whatever event was previously enabled).
|
whatever event was previously enabled).
|
||||||
|
|
||||||
|
What: /sys/.../events/in_capacitanceY_adaptive_thresh_rising_en
|
||||||
|
What: /sys/.../events/in_capacitanceY_adaptive_thresh_falling_en
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: linux-iio@vger.kernel.org
|
||||||
|
Descrption:
|
||||||
|
Adaptive thresholds are similar to normal fixed thresholds
|
||||||
|
but the value is expressed as an offset from a value which
|
||||||
|
provides a low frequency approximation of the channel itself.
|
||||||
|
Thus these detect if a rapid change occurs in the specified
|
||||||
|
direction which crosses tracking value + offset.
|
||||||
|
Tracking value calculation is devices specific.
|
||||||
|
|
||||||
|
What: /sys/.../in_capacitanceY_adaptive_thresh_rising_timeout
|
||||||
|
What: /sys/.../in_capacitanceY_adaptive_thresh_falling_timeout
|
||||||
|
KernelVersion: 5.11
|
||||||
|
Contact: linux-iio@vger.kernel.org
|
||||||
|
Descrption:
|
||||||
|
When adaptive thresholds are used, the tracking signal
|
||||||
|
may adjust too slowly to step changes in the raw signal.
|
||||||
|
*_timeout (in seconds) specifies a time for which the
|
||||||
|
difference between the slow tracking signal and the raw
|
||||||
|
signal is allowed to remain out-of-range before a reset
|
||||||
|
event occurs in which the tracking signal is made equal
|
||||||
|
to the raw signal, allowing slow tracking to resume and the
|
||||||
|
adaptive threshold event detection to function as expected.
|
||||||
|
|
||||||
What: /sys/.../events/in_accel_thresh_rising_value
|
What: /sys/.../events/in_accel_thresh_rising_value
|
||||||
What: /sys/.../events/in_accel_thresh_falling_value
|
What: /sys/.../events/in_accel_thresh_falling_value
|
||||||
What: /sys/.../events/in_accel_x_raw_thresh_rising_value
|
What: /sys/.../events/in_accel_x_raw_thresh_rising_value
|
||||||
@ -773,6 +848,10 @@ What: /sys/.../events/in_proximity0_thresh_falling_value
|
|||||||
What: /sys/.../events/in_proximity0_thresh_rising_value
|
What: /sys/.../events/in_proximity0_thresh_rising_value
|
||||||
What: /sys/.../events/in_illuminance_thresh_rising_value
|
What: /sys/.../events/in_illuminance_thresh_rising_value
|
||||||
What: /sys/.../events/in_illuminance_thresh_falling_value
|
What: /sys/.../events/in_illuminance_thresh_falling_value
|
||||||
|
What: /sys/.../events/in_capacitanceY_thresh_rising_value
|
||||||
|
What: /sys/.../events/in_capacitanceY_thresh_falling_value
|
||||||
|
What: /sys/.../events/in_capacitanceY_thresh_adaptive_rising_value
|
||||||
|
What: /sys/.../events/in_capacitanceY_thresh_falling_rising_value
|
||||||
KernelVersion: 2.6.37
|
KernelVersion: 2.6.37
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
@ -1118,12 +1197,16 @@ Description:
|
|||||||
|
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/buffer/length
|
What: /sys/bus/iio/devices/iio:deviceX/buffer/length
|
||||||
KernelVersion: 2.6.35
|
KernelVersion: 2.6.35
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/bufferY/length
|
||||||
|
KernelVersion: 5.11
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
Number of scans contained by the buffer.
|
Number of scans contained by the buffer.
|
||||||
|
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/buffer/enable
|
What: /sys/bus/iio/devices/iio:deviceX/buffer/enable
|
||||||
KernelVersion: 2.6.35
|
KernelVersion: 2.6.35
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/bufferY/enable
|
||||||
|
KernelVersion: 5.11
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
Actually start the buffer capture up. Will start trigger
|
Actually start the buffer capture up. Will start trigger
|
||||||
@ -1131,11 +1214,16 @@ Description:
|
|||||||
|
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/scan_elements
|
What: /sys/bus/iio/devices/iio:deviceX/scan_elements
|
||||||
KernelVersion: 2.6.37
|
KernelVersion: 2.6.37
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/bufferY
|
||||||
|
KernelVersion: 5.11
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
Directory containing interfaces for elements that will be
|
Directory containing interfaces for elements that will be
|
||||||
captured for a single triggered sample set in the buffer.
|
captured for a single triggered sample set in the buffer.
|
||||||
|
|
||||||
|
Since kernel 5.11 the scan_elements attributes are merged into
|
||||||
|
the bufferY directory, to be configurable per buffer.
|
||||||
|
|
||||||
What: /sys/.../iio:deviceX/scan_elements/in_accel_x_en
|
What: /sys/.../iio:deviceX/scan_elements/in_accel_x_en
|
||||||
What: /sys/.../iio:deviceX/scan_elements/in_accel_y_en
|
What: /sys/.../iio:deviceX/scan_elements/in_accel_y_en
|
||||||
What: /sys/.../iio:deviceX/scan_elements/in_accel_z_en
|
What: /sys/.../iio:deviceX/scan_elements/in_accel_z_en
|
||||||
@ -1164,6 +1252,34 @@ What: /sys/.../iio:deviceX/scan_elements/in_pressure_en
|
|||||||
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en
|
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en
|
||||||
What: /sys/.../iio:deviceX/scan_elements/in_proximity_en
|
What: /sys/.../iio:deviceX/scan_elements/in_proximity_en
|
||||||
KernelVersion: 2.6.37
|
KernelVersion: 2.6.37
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_accel_x_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_accel_y_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_accel_z_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_anglvel_x_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_anglvel_y_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_anglvel_z_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_magn_x_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_magn_y_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_magn_z_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_true_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_timestamp_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_supply_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY-voltageZ_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_i_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_q_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltage_i_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltage_q_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_incli_x_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_incli_y_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_pressureY_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_pressure_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_quaternion_en
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_proximity_en
|
||||||
|
KernelVersion: 5.11
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
Scan element control for triggered data capture.
|
Scan element control for triggered data capture.
|
||||||
@ -1185,6 +1301,23 @@ What: /sys/.../iio:deviceX/scan_elements/in_pressure_type
|
|||||||
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type
|
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type
|
||||||
What: /sys/.../iio:deviceX/scan_elements/in_proximity_type
|
What: /sys/.../iio:deviceX/scan_elements/in_proximity_type
|
||||||
KernelVersion: 2.6.37
|
KernelVersion: 2.6.37
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_accel_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_anglvel_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_magn_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_incli_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltage_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_supply_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_i_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_q_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltage_i_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltage_q_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_timestamp_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_pressureY_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_pressure_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_quaternion_type
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_proximity_type
|
||||||
|
KernelVersion: 5.11
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
Description of the scan element data storage within the buffer
|
Description of the scan element data storage within the buffer
|
||||||
@ -1241,6 +1374,33 @@ What: /sys/.../iio:deviceX/scan_elements/in_pressure_index
|
|||||||
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index
|
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index
|
||||||
What: /sys/.../iio:deviceX/scan_elements/in_proximity_index
|
What: /sys/.../iio:deviceX/scan_elements/in_proximity_index
|
||||||
KernelVersion: 2.6.37
|
KernelVersion: 2.6.37
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_supply_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_i_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltageY_q_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltage_i_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_voltage_q_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_accel_x_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_accel_y_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_accel_z_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_anglvel_x_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_anglvel_y_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_anglvel_z_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_magn_x_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_magn_y_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_magn_z_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_true_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_incli_x_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_incli_y_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_timestamp_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_pressureY_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_pressure_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_rot_quaternion_index
|
||||||
|
What: /sys/.../iio:deviceX/bufferY/in_proximity_index
|
||||||
|
KernelVersion: 5.11
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
A single positive integer specifying the position of this
|
A single positive integer specifying the position of this
|
||||||
@ -1455,6 +1615,8 @@ Description:
|
|||||||
|
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/buffer/watermark
|
What: /sys/bus/iio/devices/iio:deviceX/buffer/watermark
|
||||||
KernelVersion: 4.2
|
KernelVersion: 4.2
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/bufferY/watermark
|
||||||
|
KernelVersion: 5.11
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
A single positive integer specifying the maximum number of scan
|
A single positive integer specifying the maximum number of scan
|
||||||
@ -1473,6 +1635,8 @@ Description:
|
|||||||
|
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/buffer/data_available
|
What: /sys/bus/iio/devices/iio:deviceX/buffer/data_available
|
||||||
KernelVersion: 4.16
|
KernelVersion: 4.16
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/bufferY/data_available
|
||||||
|
KernelVersion: 5.11
|
||||||
Contact: linux-iio@vger.kernel.org
|
Contact: linux-iio@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
A read-only value indicating the bytes of data available in the
|
A read-only value indicating the bytes of data available in the
|
||||||
@ -1823,3 +1987,12 @@ Description:
|
|||||||
hinge, keyboard, screen. It means the three channels
|
hinge, keyboard, screen. It means the three channels
|
||||||
each correspond respectively to hinge angle, keyboard angle,
|
each correspond respectively to hinge angle, keyboard angle,
|
||||||
and screen angle.
|
and screen angle.
|
||||||
|
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/in_illuminance_hysteresis_relative
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/in_intensity_hysteresis_relative
|
||||||
|
KernelVersion: 5.12
|
||||||
|
Contact: linux-iio@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
Specify the percent for light sensor relative to the channel
|
||||||
|
absolute value that a data field should change before an event
|
||||||
|
is generated. Units are a percentage of the prior reading.
|
||||||
|
@ -1,11 +1,3 @@
|
|||||||
What: /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity
|
|
||||||
Date: January 2017
|
|
||||||
KernelVersion: 4.11
|
|
||||||
Contact: linux-iio@vger.kernel.org
|
|
||||||
Description:
|
|
||||||
Show or set the gain boost of the amp, from 0-31 range.
|
|
||||||
default 31
|
|
||||||
|
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/sensor_max_range
|
What: /sys/bus/iio/devices/iio:deviceX/sensor_max_range
|
||||||
Date: January 2017
|
Date: January 2017
|
||||||
KernelVersion: 4.11
|
KernelVersion: 4.11
|
||||||
|
10
Documentation/ABI/testing/sysfs-bus-iio-humidity
Normal file
10
Documentation/ABI/testing/sysfs-bus-iio-humidity
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
What: /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw_available
|
||||||
|
KernelVersion: 5.3.8
|
||||||
|
Contact: linux-iio@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
Controls the heater device within the humidity sensor to get
|
||||||
|
rid of excess condensation.
|
||||||
|
|
||||||
|
In some devices, this is just a switch in which case 0 = OFF,
|
||||||
|
and 1 = ON.
|
@ -8,3 +8,17 @@ Description:
|
|||||||
considered close to the device. If the value read from the
|
considered close to the device. If the value read from the
|
||||||
sensor is above or equal to the value in this file an object
|
sensor is above or equal to the value in this file an object
|
||||||
should typically be considered near.
|
should typically be considered near.
|
||||||
|
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity
|
||||||
|
Date: March 2014
|
||||||
|
KernelVersion: 3.15
|
||||||
|
Contact: linux-iio@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
Proximity sensors sometimes have a controllable amplifier
|
||||||
|
on the signal from which time of flight measurements are
|
||||||
|
taken.
|
||||||
|
The appropriate values to take is dependent on both the
|
||||||
|
sensor and it's operating environment:
|
||||||
|
* as3935 (0-31 range)
|
||||||
|
18 = indoors (default)
|
||||||
|
14 = outdoors
|
||||||
|
@ -6,15 +6,6 @@ Description:
|
|||||||
Get the current distance in meters of storm (1km steps)
|
Get the current distance in meters of storm (1km steps)
|
||||||
1000-40000 = distance in meters
|
1000-40000 = distance in meters
|
||||||
|
|
||||||
What: /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity
|
|
||||||
Date: March 2014
|
|
||||||
KernelVersion: 3.15
|
|
||||||
Contact: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
||||||
Description:
|
|
||||||
Show or set the gain boost of the amp, from 0-31 range.
|
|
||||||
18 = indoors (default)
|
|
||||||
14 = outdoors
|
|
||||||
|
|
||||||
What /sys/bus/iio/devices/iio:deviceX/noise_level_tripped
|
What /sys/bus/iio/devices/iio:deviceX/noise_level_tripped
|
||||||
Date: May 2017
|
Date: May 2017
|
||||||
KernelVersion: 4.13
|
KernelVersion: 4.13
|
||||||
|
@ -5,7 +5,7 @@ Interface Table (NFIT)' section in the ACPI specification
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/serial
|
What: /sys/bus/nd/devices/nmemX/nfit/serial
|
||||||
Date: Jun, 2015
|
Date: Jun, 2015
|
||||||
KernelVersion: v4.2
|
KernelVersion: v4.2
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Serial number of the NVDIMM (non-volatile dual in-line
|
(RO) Serial number of the NVDIMM (non-volatile dual in-line
|
||||||
memory module), assigned by the module vendor.
|
memory module), assigned by the module vendor.
|
||||||
@ -14,7 +14,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/handle
|
What: /sys/bus/nd/devices/nmemX/nfit/handle
|
||||||
Date: Apr, 2015
|
Date: Apr, 2015
|
||||||
KernelVersion: v4.2
|
KernelVersion: v4.2
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) The address (given by the _ADR object) of the device on its
|
(RO) The address (given by the _ADR object) of the device on its
|
||||||
parent bus of the NVDIMM device containing the NVDIMM region.
|
parent bus of the NVDIMM device containing the NVDIMM region.
|
||||||
@ -23,7 +23,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/device
|
What: /sys/bus/nd/devices/nmemX/nfit/device
|
||||||
Date: Apr, 2015
|
Date: Apr, 2015
|
||||||
KernelVersion: v4.1
|
KernelVersion: v4.1
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Device id for the NVDIMM, assigned by the module vendor.
|
(RO) Device id for the NVDIMM, assigned by the module vendor.
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/rev_id
|
What: /sys/bus/nd/devices/nmemX/nfit/rev_id
|
||||||
Date: Jun, 2015
|
Date: Jun, 2015
|
||||||
KernelVersion: v4.2
|
KernelVersion: v4.2
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Revision of the NVDIMM, assigned by the module vendor.
|
(RO) Revision of the NVDIMM, assigned by the module vendor.
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/phys_id
|
What: /sys/bus/nd/devices/nmemX/nfit/phys_id
|
||||||
Date: Apr, 2015
|
Date: Apr, 2015
|
||||||
KernelVersion: v4.2
|
KernelVersion: v4.2
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Handle (i.e., instance number) for the SMBIOS (system
|
(RO) Handle (i.e., instance number) for the SMBIOS (system
|
||||||
management BIOS) Memory Device structure describing the NVDIMM
|
management BIOS) Memory Device structure describing the NVDIMM
|
||||||
@ -49,7 +49,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/flags
|
What: /sys/bus/nd/devices/nmemX/nfit/flags
|
||||||
Date: Jun, 2015
|
Date: Jun, 2015
|
||||||
KernelVersion: v4.2
|
KernelVersion: v4.2
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) The flags in the NFIT memory device sub-structure indicate
|
(RO) The flags in the NFIT memory device sub-structure indicate
|
||||||
the state of the data on the nvdimm relative to its energy
|
the state of the data on the nvdimm relative to its energy
|
||||||
@ -68,7 +68,7 @@ What: /sys/bus/nd/devices/nmemX/nfit/format1
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/formats
|
What: /sys/bus/nd/devices/nmemX/nfit/formats
|
||||||
Date: Apr, 2016
|
Date: Apr, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) The interface codes indicate support for persistent memory
|
(RO) The interface codes indicate support for persistent memory
|
||||||
mapped directly into system physical address space and / or a
|
mapped directly into system physical address space and / or a
|
||||||
@ -84,7 +84,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/vendor
|
What: /sys/bus/nd/devices/nmemX/nfit/vendor
|
||||||
Date: Apr, 2016
|
Date: Apr, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Vendor id of the NVDIMM.
|
(RO) Vendor id of the NVDIMM.
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/dsm_mask
|
What: /sys/bus/nd/devices/nmemX/nfit/dsm_mask
|
||||||
Date: May, 2016
|
Date: May, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) The bitmask indicates the supported device specific control
|
(RO) The bitmask indicates the supported device specific control
|
||||||
functions relative to the NVDIMM command family supported by the
|
functions relative to the NVDIMM command family supported by the
|
||||||
@ -102,7 +102,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/family
|
What: /sys/bus/nd/devices/nmemX/nfit/family
|
||||||
Date: Apr, 2016
|
Date: Apr, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Displays the NVDIMM family command sets. Values
|
(RO) Displays the NVDIMM family command sets. Values
|
||||||
0, 1, 2 and 3 correspond to NVDIMM_FAMILY_INTEL,
|
0, 1, 2 and 3 correspond to NVDIMM_FAMILY_INTEL,
|
||||||
@ -118,7 +118,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/id
|
What: /sys/bus/nd/devices/nmemX/nfit/id
|
||||||
Date: Apr, 2016
|
Date: Apr, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) ACPI specification 6.2 section 5.2.25.9, defines an
|
(RO) ACPI specification 6.2 section 5.2.25.9, defines an
|
||||||
identifier for an NVDIMM, which refelects the id attribute.
|
identifier for an NVDIMM, which refelects the id attribute.
|
||||||
@ -127,7 +127,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_vendor
|
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_vendor
|
||||||
Date: Apr, 2016
|
Date: Apr, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Sub-system vendor id of the NVDIMM non-volatile memory
|
(RO) Sub-system vendor id of the NVDIMM non-volatile memory
|
||||||
subsystem controller.
|
subsystem controller.
|
||||||
@ -136,7 +136,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_rev_id
|
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_rev_id
|
||||||
Date: Apr, 2016
|
Date: Apr, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Sub-system revision id of the NVDIMM non-volatile memory subsystem
|
(RO) Sub-system revision id of the NVDIMM non-volatile memory subsystem
|
||||||
controller, assigned by the non-volatile memory subsystem
|
controller, assigned by the non-volatile memory subsystem
|
||||||
@ -146,7 +146,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_device
|
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_device
|
||||||
Date: Apr, 2016
|
Date: Apr, 2016
|
||||||
KernelVersion: v4.7
|
KernelVersion: v4.7
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) Sub-system device id for the NVDIMM non-volatile memory
|
(RO) Sub-system device id for the NVDIMM non-volatile memory
|
||||||
subsystem controller, assigned by the non-volatile memory
|
subsystem controller, assigned by the non-volatile memory
|
||||||
@ -156,7 +156,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/ndbusX/nfit/revision
|
What: /sys/bus/nd/devices/ndbusX/nfit/revision
|
||||||
Date: Jun, 2015
|
Date: Jun, 2015
|
||||||
KernelVersion: v4.2
|
KernelVersion: v4.2
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) ACPI NFIT table revision number.
|
(RO) ACPI NFIT table revision number.
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/ndbusX/nfit/scrub
|
What: /sys/bus/nd/devices/ndbusX/nfit/scrub
|
||||||
Date: Sep, 2016
|
Date: Sep, 2016
|
||||||
KernelVersion: v4.9
|
KernelVersion: v4.9
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RW) This shows the number of full Address Range Scrubs (ARS)
|
(RW) This shows the number of full Address Range Scrubs (ARS)
|
||||||
that have been completed since driver load time. Userspace can
|
that have been completed since driver load time. Userspace can
|
||||||
@ -177,7 +177,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/ndbusX/nfit/hw_error_scrub
|
What: /sys/bus/nd/devices/ndbusX/nfit/hw_error_scrub
|
||||||
Date: Sep, 2016
|
Date: Sep, 2016
|
||||||
KernelVersion: v4.9
|
KernelVersion: v4.9
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RW) Provides a way to toggle the behavior between just adding
|
(RW) Provides a way to toggle the behavior between just adding
|
||||||
the address (cache line) where the MCE happened to the poison
|
the address (cache line) where the MCE happened to the poison
|
||||||
@ -196,7 +196,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/ndbusX/nfit/dsm_mask
|
What: /sys/bus/nd/devices/ndbusX/nfit/dsm_mask
|
||||||
Date: Jun, 2017
|
Date: Jun, 2017
|
||||||
KernelVersion: v4.13
|
KernelVersion: v4.13
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) The bitmask indicates the supported bus specific control
|
(RO) The bitmask indicates the supported bus specific control
|
||||||
functions. See the section named 'NVDIMM Root Device _DSMs' in
|
functions. See the section named 'NVDIMM Root Device _DSMs' in
|
||||||
@ -205,7 +205,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/ndbusX/nfit/firmware_activate_noidle
|
What: /sys/bus/nd/devices/ndbusX/nfit/firmware_activate_noidle
|
||||||
Date: Apr, 2020
|
Date: Apr, 2020
|
||||||
KernelVersion: v5.8
|
KernelVersion: v5.8
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RW) The Intel platform implementation of firmware activate
|
(RW) The Intel platform implementation of firmware activate
|
||||||
support exposes an option let the platform force idle devices in
|
support exposes an option let the platform force idle devices in
|
||||||
@ -225,7 +225,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/regionX/nfit/range_index
|
What: /sys/bus/nd/devices/regionX/nfit/range_index
|
||||||
Date: Jun, 2015
|
Date: Jun, 2015
|
||||||
KernelVersion: v4.2
|
KernelVersion: v4.2
|
||||||
Contact: linux-nvdimm@lists.01.org
|
Contact: nvdimm@lists.linux.dev
|
||||||
Description:
|
Description:
|
||||||
(RO) A unique number provided by the BIOS to identify an address
|
(RO) A unique number provided by the BIOS to identify an address
|
||||||
range. Used by NVDIMM Region Mapping Structure to uniquely refer
|
range. Used by NVDIMM Region Mapping Structure to uniquely refer
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
What: /sys/bus/nd/devices/nmemX/papr/flags
|
What: /sys/bus/nd/devices/nmemX/papr/flags
|
||||||
Date: Apr, 2020
|
Date: Apr, 2020
|
||||||
KernelVersion: v5.8
|
KernelVersion: v5.8
|
||||||
Contact: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, linux-nvdimm@lists.01.org,
|
Contact: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, nvdimm@lists.linux.dev,
|
||||||
Description:
|
Description:
|
||||||
(RO) Report flags indicating various states of a
|
(RO) Report flags indicating various states of a
|
||||||
papr-pmem NVDIMM device. Each flag maps to a one or
|
papr-pmem NVDIMM device. Each flag maps to a one or
|
||||||
@ -36,7 +36,7 @@ Description:
|
|||||||
What: /sys/bus/nd/devices/nmemX/papr/perf_stats
|
What: /sys/bus/nd/devices/nmemX/papr/perf_stats
|
||||||
Date: May, 2020
|
Date: May, 2020
|
||||||
KernelVersion: v5.9
|
KernelVersion: v5.9
|
||||||
Contact: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, linux-nvdimm@lists.01.org,
|
Contact: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, nvdimm@lists.linux.dev,
|
||||||
Description:
|
Description:
|
||||||
(RO) Report various performance stats related to papr-scm NVDIMM
|
(RO) Report various performance stats related to papr-scm NVDIMM
|
||||||
device. Each stat is reported on a new line with each line
|
device. Each stat is reported on a new line with each line
|
||||||
|
@ -195,10 +195,13 @@ What: /sys/bus/pci/devices/.../index
|
|||||||
Date: July 2010
|
Date: July 2010
|
||||||
Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
|
Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
|
||||||
Description:
|
Description:
|
||||||
Reading this attribute will provide the firmware
|
Reading this attribute will provide the firmware given instance
|
||||||
given instance (SMBIOS type 41 device type instance) of the
|
number of the PCI device. Depending on the platform this can
|
||||||
PCI device. The attribute will be created only if the firmware
|
be for example the SMBIOS type 41 device type instance or the
|
||||||
has given an instance number to the PCI device.
|
user-defined ID (UID) on s390. The attribute will be created
|
||||||
|
only if the firmware has given an instance number to the PCI
|
||||||
|
device and that number is guaranteed to uniquely identify the
|
||||||
|
device in the system.
|
||||||
Users:
|
Users:
|
||||||
Userspace applications interested in knowing the
|
Userspace applications interested in knowing the
|
||||||
firmware assigned device type instance of the PCI
|
firmware assigned device type instance of the PCI
|
||||||
@ -375,3 +378,32 @@ Description:
|
|||||||
The value comes from the PCI kernel device state and can be one
|
The value comes from the PCI kernel device state and can be one
|
||||||
of: "unknown", "error", "D0", D1", "D2", "D3hot", "D3cold".
|
of: "unknown", "error", "D0", D1", "D2", "D3hot", "D3cold".
|
||||||
The file is read only.
|
The file is read only.
|
||||||
|
|
||||||
|
What: /sys/bus/pci/devices/.../sriov_vf_total_msix
|
||||||
|
Date: January 2021
|
||||||
|
Contact: Leon Romanovsky <leonro@nvidia.com>
|
||||||
|
Description:
|
||||||
|
This file is associated with a SR-IOV physical function (PF).
|
||||||
|
It contains the total number of MSI-X vectors available for
|
||||||
|
assignment to all virtual functions (VFs) associated with PF.
|
||||||
|
The value will be zero if the device doesn't support this
|
||||||
|
functionality. For supported devices, the value will be
|
||||||
|
constant and won't be changed after MSI-X vectors assignment.
|
||||||
|
|
||||||
|
What: /sys/bus/pci/devices/.../sriov_vf_msix_count
|
||||||
|
Date: January 2021
|
||||||
|
Contact: Leon Romanovsky <leonro@nvidia.com>
|
||||||
|
Description:
|
||||||
|
This file is associated with a SR-IOV virtual function (VF).
|
||||||
|
It allows configuration of the number of MSI-X vectors for
|
||||||
|
the VF. This allows devices that have a global pool of MSI-X
|
||||||
|
vectors to optimally divide them between VFs based on VF usage.
|
||||||
|
|
||||||
|
The values accepted are:
|
||||||
|
* > 0 - this number will be reported as the Table Size in the
|
||||||
|
VF's MSI-X capability
|
||||||
|
* < 0 - not valid
|
||||||
|
* = 0 - will reset to the device default value
|
||||||
|
|
||||||
|
The file is writable if the PF is bound to a driver that
|
||||||
|
implements ->sriov_set_msix_vec_count().
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
What: /sys/devices/pci0000:00/*/QEMU0001:00/capability
|
What: /sys/devices/pci0000:00/*/QEMU0001:00/capability for MMIO
|
||||||
|
/sys/bus/pci/drivers/pvpanic-pci/0000:00:0*.0/capability for PCI
|
||||||
Date: Jan 2021
|
Date: Jan 2021
|
||||||
Contact: zhenwei pi <pizhenwei@bytedance.com>
|
Contact: zhenwei pi <pizhenwei@bytedance.com>
|
||||||
Description:
|
Description:
|
||||||
@ -12,6 +13,7 @@ Description:
|
|||||||
https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/specs/pvpanic.txt
|
https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/specs/pvpanic.txt
|
||||||
|
|
||||||
What: /sys/devices/pci0000:00/*/QEMU0001:00/events
|
What: /sys/devices/pci0000:00/*/QEMU0001:00/events
|
||||||
|
/sys/bus/pci/drivers/pvpanic-pci/0000:00:0*.0/events for PCI
|
||||||
Date: Jan 2021
|
Date: Jan 2021
|
||||||
Contact: zhenwei pi <pizhenwei@bytedance.com>
|
Contact: zhenwei pi <pizhenwei@bytedance.com>
|
||||||
Description:
|
Description:
|
||||||
|
@ -1,31 +1,3 @@
|
|||||||
What: /sys/bus/thunderbolt/devices/<xdomain>/rx_speed
|
|
||||||
Date: Feb 2021
|
|
||||||
KernelVersion: 5.11
|
|
||||||
Contact: Isaac Hazan <isaac.hazan@intel.com>
|
|
||||||
Description: This attribute reports the XDomain RX speed per lane.
|
|
||||||
All RX lanes run at the same speed.
|
|
||||||
|
|
||||||
What: /sys/bus/thunderbolt/devices/<xdomain>/rx_lanes
|
|
||||||
Date: Feb 2021
|
|
||||||
KernelVersion: 5.11
|
|
||||||
Contact: Isaac Hazan <isaac.hazan@intel.com>
|
|
||||||
Description: This attribute reports the number of RX lanes the XDomain
|
|
||||||
is using simultaneously through its upstream port.
|
|
||||||
|
|
||||||
What: /sys/bus/thunderbolt/devices/<xdomain>/tx_speed
|
|
||||||
Date: Feb 2021
|
|
||||||
KernelVersion: 5.11
|
|
||||||
Contact: Isaac Hazan <isaac.hazan@intel.com>
|
|
||||||
Description: This attribute reports the XDomain TX speed per lane.
|
|
||||||
All TX lanes run at the same speed.
|
|
||||||
|
|
||||||
What: /sys/bus/thunderbolt/devices/<xdomain>/tx_lanes
|
|
||||||
Date: Feb 2021
|
|
||||||
KernelVersion: 5.11
|
|
||||||
Contact: Isaac Hazan <isaac.hazan@intel.com>
|
|
||||||
Description: This attribute reports number of TX lanes the XDomain
|
|
||||||
is using simultaneously through its upstream port.
|
|
||||||
|
|
||||||
What: /sys/bus/thunderbolt/devices/.../domainX/boot_acl
|
What: /sys/bus/thunderbolt/devices/.../domainX/boot_acl
|
||||||
Date: Jun 2018
|
Date: Jun 2018
|
||||||
KernelVersion: 4.17
|
KernelVersion: 4.17
|
||||||
@ -162,6 +134,13 @@ Contact: thunderbolt-software@lists.01.org
|
|||||||
Description: This attribute contains name of this device extracted from
|
Description: This attribute contains name of this device extracted from
|
||||||
the device DROM.
|
the device DROM.
|
||||||
|
|
||||||
|
What: /sys/bus/thunderbolt/devices/.../maxhopid
|
||||||
|
Date: Jul 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||||
|
Description: Only set for XDomains. The maximum HopID the other host
|
||||||
|
supports as its input HopID.
|
||||||
|
|
||||||
What: /sys/bus/thunderbolt/devices/.../rx_speed
|
What: /sys/bus/thunderbolt/devices/.../rx_speed
|
||||||
Date: Jan 2020
|
Date: Jan 2020
|
||||||
KernelVersion: 5.5
|
KernelVersion: 5.5
|
||||||
|
@ -97,10 +97,7 @@ Description:
|
|||||||
object. The values are represented in ms. If the value is
|
object. The values are represented in ms. If the value is
|
||||||
less than 1 jiffy, it is considered to be 0, which means
|
less than 1 jiffy, it is considered to be 0, which means
|
||||||
no polling. This value is meaningless if the governor is
|
no polling. This value is meaningless if the governor is
|
||||||
not polling; thus. If the governor is not using
|
not polling.
|
||||||
devfreq-provided central polling
|
|
||||||
(/sys/class/devfreq/.../central_polling is 0), this value
|
|
||||||
may be useless.
|
|
||||||
|
|
||||||
A list of governors that support the node:
|
A list of governors that support the node:
|
||||||
- simple_ondmenad
|
- simple_ondmenad
|
||||||
|
@ -51,3 +51,15 @@ Description:
|
|||||||
Boolean value indicating whether the PHY device is used in
|
Boolean value indicating whether the PHY device is used in
|
||||||
standalone mode, without a net_device associated, by PHYLINK.
|
standalone mode, without a net_device associated, by PHYLINK.
|
||||||
Attribute created only when this is the case.
|
Attribute created only when this is the case.
|
||||||
|
|
||||||
|
What: /sys/class/mdio_bus/<bus>/<device>/phy_dev_flags
|
||||||
|
Date: March 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: netdev@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
32-bit hexadecimal number representing a bit mask of the
|
||||||
|
configuration bits passed from the consumer of the PHY
|
||||||
|
(Ethernet MAC, switch, etc.) to the PHY driver. The flags are
|
||||||
|
only used internally by the kernel and their placement are
|
||||||
|
not meant to be stable across kernel versions. This is intended
|
||||||
|
for facilitating the debugging of PHY drivers.
|
||||||
|
@ -58,3 +58,19 @@ Description:
|
|||||||
|
|
||||||
Indicates the mux id associated to the qmimux network interface
|
Indicates the mux id associated to the qmimux network interface
|
||||||
during its creation.
|
during its creation.
|
||||||
|
|
||||||
|
What: /sys/class/net/<iface>/qmi/pass_through
|
||||||
|
Date: January 2021
|
||||||
|
KernelVersion: 5.12
|
||||||
|
Contact: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
|
||||||
|
Description:
|
||||||
|
Boolean. Default: 'N'
|
||||||
|
|
||||||
|
Set this to 'Y' to enable 'pass-through' mode, allowing packets
|
||||||
|
in MAP format to be passed on to the stack.
|
||||||
|
|
||||||
|
Normally the rmnet driver (CONFIG_RMNET) is then used to process
|
||||||
|
and demultiplex these packets.
|
||||||
|
|
||||||
|
'Pass-through' mode can be enabled when the device is in
|
||||||
|
'raw-ip' mode only.
|
||||||
|
15
Documentation/ABI/testing/sysfs-class-power-surface
Normal file
15
Documentation/ABI/testing/sysfs-class-power-surface
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
What: /sys/class/power_supply/<supply_name>/alarm
|
||||||
|
Date: April 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: Maximilian Luz <luzmaximilian@gmail.com>
|
||||||
|
Description:
|
||||||
|
Battery trip point. When the remaining battery capacity crosses this
|
||||||
|
value in either direction, the system will be notified and if
|
||||||
|
necessary woken.
|
||||||
|
|
||||||
|
Set to zero to clear/disable.
|
||||||
|
|
||||||
|
Access: Read, Write
|
||||||
|
|
||||||
|
Valid values: In micro-Wh or micro-Ah, depending on the power unit
|
||||||
|
of the battery
|
@ -85,6 +85,19 @@ Description: Expected format is the following::
|
|||||||
|
|
||||||
By default "rw" is used.
|
By default "rw" is used.
|
||||||
|
|
||||||
|
nr_poll_queues
|
||||||
|
specifies the number of poll-mode queues. If the IO has HIPRI flag,
|
||||||
|
the block-layer will send the IO via the poll-mode queue.
|
||||||
|
For fast network and device the polling is faster than interrupt-base
|
||||||
|
IO handling because it saves time for context switching, switching to
|
||||||
|
another process, handling the interrupt and switching back to the
|
||||||
|
issuing process.
|
||||||
|
|
||||||
|
Set -1 if you want to set it as the number of CPUs
|
||||||
|
By default rnbd client creates only irq-mode queues.
|
||||||
|
|
||||||
|
NOTICE: MUST make a unique session for a device using the poll-mode queues.
|
||||||
|
|
||||||
Exit Codes:
|
Exit Codes:
|
||||||
|
|
||||||
If the device is already mapped it will fail with EEXIST. If the input
|
If the device is already mapped it will fail with EEXIST. If the input
|
||||||
|
@ -34,6 +34,9 @@ Description: Multipath policy specifies which path should be selected on each IO
|
|||||||
min-inflight (1):
|
min-inflight (1):
|
||||||
select path with minimum inflights.
|
select path with minimum inflights.
|
||||||
|
|
||||||
|
min-latency (2):
|
||||||
|
select path with minimum latency.
|
||||||
|
|
||||||
What: /sys/class/rtrs-client/<session-name>/paths/
|
What: /sys/class/rtrs-client/<session-name>/paths/
|
||||||
Date: Feb 2020
|
Date: Feb 2020
|
||||||
KernelVersion: 5.7
|
KernelVersion: 5.7
|
||||||
@ -95,6 +98,15 @@ KernelVersion: 5.7
|
|||||||
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||||
Description: RO, Contains the destination address of the path
|
Description: RO, Contains the destination address of the path
|
||||||
|
|
||||||
|
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/cur_latency
|
||||||
|
Date: Feb 2020
|
||||||
|
KernelVersion: 5.7
|
||||||
|
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||||
|
Description: RO, Contains the latency time calculated by the heart-beat messages.
|
||||||
|
Whenever the client sends heart-beat message, it checks the time gap
|
||||||
|
between sending the heart-beat message and receiving the ACK.
|
||||||
|
This value can be changed regularly.
|
||||||
|
|
||||||
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/stats/reset_all
|
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/stats/reset_all
|
||||||
Date: Feb 2020
|
Date: Feb 2020
|
||||||
KernelVersion: 5.7
|
KernelVersion: 5.7
|
||||||
|
@ -285,7 +285,7 @@ Description: Disable L3 cache indices
|
|||||||
|
|
||||||
All AMD processors with L3 caches provide this functionality.
|
All AMD processors with L3 caches provide this functionality.
|
||||||
For details, see BKDGs at
|
For details, see BKDGs at
|
||||||
http://developer.amd.com/documentation/guides/Pages/default.aspx
|
https://www.amd.com/en/support/tech-docs?keyword=bios+kernel
|
||||||
|
|
||||||
|
|
||||||
What: /sys/devices/system/cpu/cpufreq/boost
|
What: /sys/devices/system/cpu/cpufreq/boost
|
||||||
|
@ -15,3 +15,12 @@ Description: Reports the model identification provided by the touchscreen, fo
|
|||||||
Access: Read
|
Access: Read
|
||||||
|
|
||||||
Valid values: Represented as string
|
Valid values: Represented as string
|
||||||
|
|
||||||
|
What: /sys/bus/i2c/devices/xxx/type
|
||||||
|
Date: Jan 2021
|
||||||
|
Contact: linux-input@vger.kernel.org
|
||||||
|
Description: Reports the type identification provided by the touchscreen, for example "PCAP82H80 Series"
|
||||||
|
|
||||||
|
Access: Read
|
||||||
|
|
||||||
|
Valid values: Represented as string
|
||||||
|
49
Documentation/ABI/testing/sysfs-driver-xdata
Normal file
49
Documentation/ABI/testing/sysfs-driver-xdata
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
What: /sys/class/misc/drivers/dw-xdata-pcie.<device>/write
|
||||||
|
Date: April 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
|
||||||
|
Description: Allows the user to enable the PCIe traffic generator which
|
||||||
|
will create write TLPs frames - from the Root Complex to the
|
||||||
|
Endpoint direction or to disable the PCIe traffic generator
|
||||||
|
in all directions.
|
||||||
|
|
||||||
|
Write y/1/on to enable, n/0/off to disable
|
||||||
|
|
||||||
|
Usage e.g.
|
||||||
|
echo 1 > /sys/class/misc/dw-xdata-pcie.<device>/write
|
||||||
|
or
|
||||||
|
echo 0 > /sys/class/misc/dw-xdata-pcie.<device>/write
|
||||||
|
|
||||||
|
The user can read the current PCIe link throughput generated
|
||||||
|
through this generator in MB/s.
|
||||||
|
|
||||||
|
Usage e.g.
|
||||||
|
cat /sys/class/misc/dw-xdata-pcie.<device>/write
|
||||||
|
204
|
||||||
|
|
||||||
|
The file is read and write.
|
||||||
|
|
||||||
|
What: /sys/class/misc/dw-xdata-pcie.<device>/read
|
||||||
|
Date: April 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
|
||||||
|
Description: Allows the user to enable the PCIe traffic generator which
|
||||||
|
will create read TLPs frames - from the Endpoint to the Root
|
||||||
|
Complex direction or to disable the PCIe traffic generator
|
||||||
|
in all directions.
|
||||||
|
|
||||||
|
Write y/1/on to enable, n/0/off to disable
|
||||||
|
|
||||||
|
Usage e.g.
|
||||||
|
echo 1 > /sys/class/misc/dw-xdata-pcie.<device>/read
|
||||||
|
or
|
||||||
|
echo 0 > /sys/class/misc/dw-xdata-pcie.<device>/read
|
||||||
|
|
||||||
|
The user can read the current PCIe link throughput generated
|
||||||
|
through this generator in MB/s.
|
||||||
|
|
||||||
|
Usage e.g.
|
||||||
|
cat /sys/class/misc/dw-xdata-pcie.<device>/read
|
||||||
|
199
|
||||||
|
|
||||||
|
The file is read and write.
|
@ -276,7 +276,7 @@ Date April 2019
|
|||||||
Contact: "Daniel Rosenberg" <drosen@google.com>
|
Contact: "Daniel Rosenberg" <drosen@google.com>
|
||||||
Description: If checkpoint=disable, it displays the number of blocks that
|
Description: If checkpoint=disable, it displays the number of blocks that
|
||||||
are unusable.
|
are unusable.
|
||||||
If checkpoint=enable it displays the enumber of blocks that
|
If checkpoint=enable it displays the number of blocks that
|
||||||
would be unusable if checkpoint=disable were to be set.
|
would be unusable if checkpoint=disable were to be set.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/encoding
|
What: /sys/fs/f2fs/<disk>/encoding
|
||||||
@ -409,3 +409,32 @@ Description: Give a way to change checkpoint merge daemon's io priority.
|
|||||||
I/O priority "3". We can select the class between "rt" and "be",
|
I/O priority "3". We can select the class between "rt" and "be",
|
||||||
and set the I/O priority within valid range of it. "," delimiter
|
and set the I/O priority within valid range of it. "," delimiter
|
||||||
is necessary in between I/O class and priority number.
|
is necessary in between I/O class and priority number.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/ovp_segments
|
||||||
|
Date: March 2021
|
||||||
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
|
Description: Shows the number of overprovision segments.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/compr_written_block
|
||||||
|
Date: March 2021
|
||||||
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
||||||
|
Description: Show the block count written after compression since mount. Note
|
||||||
|
that when the compressed blocks are deleted, this count doesn't
|
||||||
|
decrease. If you write "0" here, you can initialize
|
||||||
|
compr_written_block and compr_saved_block to "0".
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/compr_saved_block
|
||||||
|
Date: March 2021
|
||||||
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
||||||
|
Description: Show the saved block count with compression since mount. Note
|
||||||
|
that when the compressed blocks are deleted, this count doesn't
|
||||||
|
decrease. If you write "0" here, you can initialize
|
||||||
|
compr_written_block and compr_saved_block to "0".
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/compr_new_inode
|
||||||
|
Date: March 2021
|
||||||
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
||||||
|
Description: Show the count of inode newly enabled for compression since mount.
|
||||||
|
Note that when the compression is disabled for the files, this count
|
||||||
|
doesn't decrease. If you write "0" here, you can initialize
|
||||||
|
compr_new_inode to "0".
|
||||||
|
25
Documentation/ABI/testing/sysfs-kernel-mm-cma
Normal file
25
Documentation/ABI/testing/sysfs-kernel-mm-cma
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
What: /sys/kernel/mm/cma/
|
||||||
|
Date: Feb 2021
|
||||||
|
Contact: Minchan Kim <minchan@kernel.org>
|
||||||
|
Description:
|
||||||
|
/sys/kernel/mm/cma/ contains a subdirectory for each CMA
|
||||||
|
heap name (also sometimes called CMA areas).
|
||||||
|
|
||||||
|
Each CMA heap subdirectory (that is, each
|
||||||
|
/sys/kernel/mm/cma/<cma-heap-name> directory) contains the
|
||||||
|
following items:
|
||||||
|
|
||||||
|
alloc_pages_success
|
||||||
|
alloc_pages_fail
|
||||||
|
|
||||||
|
What: /sys/kernel/mm/cma/<cma-heap-name>/alloc_pages_success
|
||||||
|
Date: Feb 2021
|
||||||
|
Contact: Minchan Kim <minchan@kernel.org>
|
||||||
|
Description:
|
||||||
|
the number of pages CMA API succeeded to allocate
|
||||||
|
|
||||||
|
What: /sys/kernel/mm/cma/<cma-heap-name>/alloc_pages_fail
|
||||||
|
Date: Feb 2021
|
||||||
|
Contact: Minchan Kim <minchan@kernel.org>
|
||||||
|
Description:
|
||||||
|
the number of pages CMA API failed to allocate
|
@ -37,13 +37,13 @@ Description: Maximum time allowed for periodic transfers per microframe (μs)
|
|||||||
|
|
||||||
What: /sys/module/*/{coresize,initsize}
|
What: /sys/module/*/{coresize,initsize}
|
||||||
Date: Jan 2012
|
Date: Jan 2012
|
||||||
KernelVersion:»·3.3
|
KernelVersion: 3.3
|
||||||
Contact: Kay Sievers <kay.sievers@vrfy.org>
|
Contact: Kay Sievers <kay.sievers@vrfy.org>
|
||||||
Description: Module size in bytes.
|
Description: Module size in bytes.
|
||||||
|
|
||||||
What: /sys/module/*/taint
|
What: /sys/module/*/taint
|
||||||
Date: Jan 2012
|
Date: Jan 2012
|
||||||
KernelVersion:»·3.3
|
KernelVersion: 3.3
|
||||||
Contact: Kay Sievers <kay.sievers@vrfy.org>
|
Contact: Kay Sievers <kay.sievers@vrfy.org>
|
||||||
Description: Module taint flags:
|
Description: Module taint flags:
|
||||||
== =====================
|
== =====================
|
||||||
|
20
Documentation/ABI/testing/sysfs-platform-intel-pmc
Normal file
20
Documentation/ABI/testing/sysfs-platform-intel-pmc
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
What: /sys/devices/platform/<platform>/etr3
|
||||||
|
Date: Apr 2021
|
||||||
|
KernelVersion: 5.13
|
||||||
|
Contact: "Tomas Winkler" <tomas.winkler@intel.com>
|
||||||
|
Description:
|
||||||
|
The file exposes "Extended Test Mode Register 3" global
|
||||||
|
reset bits. The bits are used during an Intel platform
|
||||||
|
manufacturing process to indicate that consequent reset
|
||||||
|
of the platform is a "global reset". This type of reset
|
||||||
|
is required in order for manufacturing configurations
|
||||||
|
to take effect.
|
||||||
|
|
||||||
|
Display global reset setting bits for PMC.
|
||||||
|
* bit 31 - global reset is locked
|
||||||
|
* bit 20 - global reset is set
|
||||||
|
Writing bit 20 value to the etr3 will induce
|
||||||
|
a platform "global reset" upon consequent platform reset,
|
||||||
|
in case the register is not locked.
|
||||||
|
The "global reset bit" should be locked on a production
|
||||||
|
system and the file is in read-only mode.
|
@ -48,7 +48,6 @@ quota-tools 3.09 quota -V
|
|||||||
PPP 2.4.0 pppd --version
|
PPP 2.4.0 pppd --version
|
||||||
nfs-utils 1.0.5 showmount --version
|
nfs-utils 1.0.5 showmount --version
|
||||||
procps 3.2.0 ps --version
|
procps 3.2.0 ps --version
|
||||||
oprofile 0.9 oprofiled --version
|
|
||||||
udev 081 udevd --version
|
udev 081 udevd --version
|
||||||
grub 0.93 grub --version || grub-install --version
|
grub 0.93 grub --version || grub-install --version
|
||||||
mcelog 0.6 mcelog --version
|
mcelog 0.6 mcelog --version
|
||||||
|
@ -847,7 +847,7 @@ Symposium on Distributed Computing}
|
|||||||
'It's entirely possible that the current user could be replaced
|
'It's entirely possible that the current user could be replaced
|
||||||
by RCU and/or seqlocks, and we could get rid of brlocks entirely.'
|
by RCU and/or seqlocks, and we could get rid of brlocks entirely.'
|
||||||
.
|
.
|
||||||
Steve Hemminger responds by replacing them with RCU.
|
Stephen Hemminger responds by replacing them with RCU.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ restrictions without needing to sign the files individually.
|
|||||||
|
|
||||||
The LSM is selectable at build-time with ``CONFIG_SECURITY_LOADPIN``, and
|
The LSM is selectable at build-time with ``CONFIG_SECURITY_LOADPIN``, and
|
||||||
can be controlled at boot-time with the kernel command line option
|
can be controlled at boot-time with the kernel command line option
|
||||||
"``loadpin.enabled``". By default, it is enabled, but can be disabled at
|
"``loadpin.enforce``". By default, it is enabled, but can be disabled at
|
||||||
boot ("``loadpin.enabled=0``").
|
boot ("``loadpin.enforce=0``").
|
||||||
|
|
||||||
LoadPin starts pinning when it sees the first file loaded. If the
|
LoadPin starts pinning when it sees the first file loaded. If the
|
||||||
block device backing the filesystem is not read-only, a sysctl is
|
block device backing the filesystem is not read-only, a sysctl is
|
||||||
@ -28,4 +28,4 @@ different mechanisms such as ``CONFIG_MODULE_SIG`` and
|
|||||||
``CONFIG_KEXEC_VERIFY_SIG`` to verify kernel module and kernel image while
|
``CONFIG_KEXEC_VERIFY_SIG`` to verify kernel module and kernel image while
|
||||||
still use LoadPin to protect the integrity of other files kernel loads. The
|
still use LoadPin to protect the integrity of other files kernel loads. The
|
||||||
full list of valid file types can be found in ``kernel_read_file_str``
|
full list of valid file types can be found in ``kernel_read_file_str``
|
||||||
defined in ``include/linux/fs.h``.
|
defined in ``include/linux/kernel_read_file.h``.
|
||||||
|
@ -17,6 +17,7 @@ Control Groups version 1
|
|||||||
hugetlb
|
hugetlb
|
||||||
memcg_test
|
memcg_test
|
||||||
memory
|
memory
|
||||||
|
misc
|
||||||
net_cls
|
net_cls
|
||||||
net_prio
|
net_prio
|
||||||
pids
|
pids
|
||||||
|
@ -360,8 +360,8 @@ U != 0, K = unlimited:
|
|||||||
|
|
||||||
U != 0, K < U:
|
U != 0, K < U:
|
||||||
Kernel memory is a subset of the user memory. This setup is useful in
|
Kernel memory is a subset of the user memory. This setup is useful in
|
||||||
deployments where the total amount of memory per-cgroup is overcommited.
|
deployments where the total amount of memory per-cgroup is overcommitted.
|
||||||
Overcommiting kernel memory limits is definitely not recommended, since the
|
Overcommitting kernel memory limits is definitely not recommended, since the
|
||||||
box can still run out of non-reclaimable memory.
|
box can still run out of non-reclaimable memory.
|
||||||
In this case, the admin could set up K so that the sum of all groups is
|
In this case, the admin could set up K so that the sum of all groups is
|
||||||
never greater than the total memory, and freely set U at the cost of his
|
never greater than the total memory, and freely set U at the cost of his
|
||||||
@ -851,6 +851,9 @@ At reading, current status of OOM is shown.
|
|||||||
(if 1, oom-killer is disabled)
|
(if 1, oom-killer is disabled)
|
||||||
- under_oom 0 or 1
|
- under_oom 0 or 1
|
||||||
(if 1, the memory cgroup is under OOM, tasks may be stopped.)
|
(if 1, the memory cgroup is under OOM, tasks may be stopped.)
|
||||||
|
- oom_kill integer counter
|
||||||
|
The number of processes belonging to this cgroup killed by any
|
||||||
|
kind of OOM killer.
|
||||||
|
|
||||||
11. Memory Pressure
|
11. Memory Pressure
|
||||||
===================
|
===================
|
||||||
|
4
Documentation/admin-guide/cgroup-v1/misc.rst
Normal file
4
Documentation/admin-guide/cgroup-v1/misc.rst
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
===============
|
||||||
|
Misc controller
|
||||||
|
===============
|
||||||
|
Please refer "Misc" documentation in Documentation/admin-guide/cgroup-v2.rst
|
@ -65,8 +65,11 @@ v1 is available under :ref:`Documentation/admin-guide/cgroup-v1/index.rst <cgrou
|
|||||||
5-7-1. RDMA Interface Files
|
5-7-1. RDMA Interface Files
|
||||||
5-8. HugeTLB
|
5-8. HugeTLB
|
||||||
5.8-1. HugeTLB Interface Files
|
5.8-1. HugeTLB Interface Files
|
||||||
5-8. Misc
|
5-9. Misc
|
||||||
5-8-1. perf_event
|
5.9-1 Miscellaneous cgroup Interface Files
|
||||||
|
5.9-2 Migration and Ownership
|
||||||
|
5-10. Others
|
||||||
|
5-10-1. perf_event
|
||||||
5-N. Non-normative information
|
5-N. Non-normative information
|
||||||
5-N-1. CPU controller root cgroup process behaviour
|
5-N-1. CPU controller root cgroup process behaviour
|
||||||
5-N-2. IO controller root cgroup process behaviour
|
5-N-2. IO controller root cgroup process behaviour
|
||||||
@ -2171,6 +2174,72 @@ HugeTLB Interface Files
|
|||||||
Misc
|
Misc
|
||||||
----
|
----
|
||||||
|
|
||||||
|
The Miscellaneous cgroup provides the resource limiting and tracking
|
||||||
|
mechanism for the scalar resources which cannot be abstracted like the other
|
||||||
|
cgroup resources. Controller is enabled by the CONFIG_CGROUP_MISC config
|
||||||
|
option.
|
||||||
|
|
||||||
|
A resource can be added to the controller via enum misc_res_type{} in the
|
||||||
|
include/linux/misc_cgroup.h file and the corresponding name via misc_res_name[]
|
||||||
|
in the kernel/cgroup/misc.c file. Provider of the resource must set its
|
||||||
|
capacity prior to using the resource by calling misc_cg_set_capacity().
|
||||||
|
|
||||||
|
Once a capacity is set then the resource usage can be updated using charge and
|
||||||
|
uncharge APIs. All of the APIs to interact with misc controller are in
|
||||||
|
include/linux/misc_cgroup.h.
|
||||||
|
|
||||||
|
Misc Interface Files
|
||||||
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Miscellaneous controller provides 3 interface files. If two misc resources (res_a and res_b) are registered then:
|
||||||
|
|
||||||
|
misc.capacity
|
||||||
|
A read-only flat-keyed file shown only in the root cgroup. It shows
|
||||||
|
miscellaneous scalar resources available on the platform along with
|
||||||
|
their quantities::
|
||||||
|
|
||||||
|
$ cat misc.capacity
|
||||||
|
res_a 50
|
||||||
|
res_b 10
|
||||||
|
|
||||||
|
misc.current
|
||||||
|
A read-only flat-keyed file shown in the non-root cgroups. It shows
|
||||||
|
the current usage of the resources in the cgroup and its children.::
|
||||||
|
|
||||||
|
$ cat misc.current
|
||||||
|
res_a 3
|
||||||
|
res_b 0
|
||||||
|
|
||||||
|
misc.max
|
||||||
|
A read-write flat-keyed file shown in the non root cgroups. Allowed
|
||||||
|
maximum usage of the resources in the cgroup and its children.::
|
||||||
|
|
||||||
|
$ cat misc.max
|
||||||
|
res_a max
|
||||||
|
res_b 4
|
||||||
|
|
||||||
|
Limit can be set by::
|
||||||
|
|
||||||
|
# echo res_a 1 > misc.max
|
||||||
|
|
||||||
|
Limit can be set to max by::
|
||||||
|
|
||||||
|
# echo res_a max > misc.max
|
||||||
|
|
||||||
|
Limits can be set higher than the capacity value in the misc.capacity
|
||||||
|
file.
|
||||||
|
|
||||||
|
Migration and Ownership
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A miscellaneous scalar resource is charged to the cgroup in which it is used
|
||||||
|
first, and stays charged to that cgroup until that resource is freed. Migrating
|
||||||
|
a process to a different cgroup does not move the charge to the destination
|
||||||
|
cgroup where the process has moved.
|
||||||
|
|
||||||
|
Others
|
||||||
|
------
|
||||||
|
|
||||||
perf_event
|
perf_event
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -714,6 +714,7 @@ DebugData Displays information about active CIFS sessions and
|
|||||||
version.
|
version.
|
||||||
Stats Lists summary resource usage information as well as per
|
Stats Lists summary resource usage information as well as per
|
||||||
share statistics.
|
share statistics.
|
||||||
|
open_files List all the open file handles on all active SMB sessions.
|
||||||
======================= =======================================================
|
======================= =======================================================
|
||||||
|
|
||||||
Configuration pseudo-files:
|
Configuration pseudo-files:
|
||||||
@ -794,6 +795,8 @@ LinuxExtensionsEnabled If set to one then the client will attempt to
|
|||||||
support and want to map the uid and gid fields
|
support and want to map the uid and gid fields
|
||||||
to values supplied at mount (rather than the
|
to values supplied at mount (rather than the
|
||||||
actual values, then set this to zero. (default 1)
|
actual values, then set this to zero. (default 1)
|
||||||
|
dfscache List the content of the DFS cache.
|
||||||
|
If set to 0, the client will clear the cache.
|
||||||
======================= =======================================================
|
======================= =======================================================
|
||||||
|
|
||||||
These experimental features and tracing can be enabled by changing flags in
|
These experimental features and tracing can be enabled by changing flags in
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
1 char Memory devices
|
1 char Memory devices
|
||||||
1 = /dev/mem Physical memory access
|
1 = /dev/mem Physical memory access
|
||||||
2 = /dev/kmem Kernel virtual memory access
|
2 = /dev/kmem OBSOLETE - replaced by /proc/kcore
|
||||||
3 = /dev/null Null device
|
3 = /dev/null Null device
|
||||||
4 = /dev/port I/O port access
|
4 = /dev/port I/O port access
|
||||||
5 = /dev/zero Null byte source
|
5 = /dev/zero Null byte source
|
||||||
@ -289,7 +289,7 @@
|
|||||||
152 = /dev/kpoll Kernel Poll Driver
|
152 = /dev/kpoll Kernel Poll Driver
|
||||||
153 = /dev/mergemem Memory merge device
|
153 = /dev/mergemem Memory merge device
|
||||||
154 = /dev/pmu Macintosh PowerBook power manager
|
154 = /dev/pmu Macintosh PowerBook power manager
|
||||||
155 = /dev/isictl MultiTech ISICom serial control
|
155 =
|
||||||
156 = /dev/lcd Front panel LCD display
|
156 = /dev/lcd Front panel LCD display
|
||||||
157 = /dev/ac Applicom Intl Profibus card
|
157 = /dev/ac Applicom Intl Profibus card
|
||||||
158 = /dev/nwbutton Netwinder external button
|
158 = /dev/nwbutton Netwinder external button
|
||||||
@ -477,11 +477,6 @@
|
|||||||
18 block Sanyo CD-ROM
|
18 block Sanyo CD-ROM
|
||||||
0 = /dev/sjcd Sanyo CD-ROM
|
0 = /dev/sjcd Sanyo CD-ROM
|
||||||
|
|
||||||
19 char Cyclades serial card
|
|
||||||
0 = /dev/ttyC0 First Cyclades port
|
|
||||||
...
|
|
||||||
31 = /dev/ttyC31 32nd Cyclades port
|
|
||||||
|
|
||||||
19 block "Double" compressed disk
|
19 block "Double" compressed disk
|
||||||
0 = /dev/double0 First compressed disk
|
0 = /dev/double0 First compressed disk
|
||||||
...
|
...
|
||||||
@ -493,11 +488,6 @@
|
|||||||
See the Double documentation for the meaning of the
|
See the Double documentation for the meaning of the
|
||||||
mirror devices.
|
mirror devices.
|
||||||
|
|
||||||
20 char Cyclades serial card - alternate devices
|
|
||||||
0 = /dev/cub0 Callout device for ttyC0
|
|
||||||
...
|
|
||||||
31 = /dev/cub31 Callout device for ttyC31
|
|
||||||
|
|
||||||
20 block Hitachi CD-ROM (under development)
|
20 block Hitachi CD-ROM (under development)
|
||||||
0 = /dev/hitcd Hitachi CD-ROM
|
0 = /dev/hitcd Hitachi CD-ROM
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ Examples
|
|||||||
<debugfs>/dynamic_debug/control
|
<debugfs>/dynamic_debug/control
|
||||||
|
|
||||||
// enable messages in files of which the paths include string "usb"
|
// enable messages in files of which the paths include string "usb"
|
||||||
nullarbor:~ # echo -n '*usb* +p' > <debugfs>/dynamic_debug/control
|
nullarbor:~ # echo -n 'file *usb* +p' > <debugfs>/dynamic_debug/control
|
||||||
|
|
||||||
// enable all messages
|
// enable all messages
|
||||||
nullarbor:~ # echo -n '+p' > <debugfs>/dynamic_debug/control
|
nullarbor:~ # echo -n '+p' > <debugfs>/dynamic_debug/control
|
||||||
|
@ -17,17 +17,18 @@ module.
|
|||||||
gpio_mockup_ranges
|
gpio_mockup_ranges
|
||||||
|
|
||||||
This parameter takes an argument in the form of an array of integer
|
This parameter takes an argument in the form of an array of integer
|
||||||
pairs. Each pair defines the base GPIO number (if any) and the number
|
pairs. Each pair defines the base GPIO number (non-negative integer)
|
||||||
of lines exposed by the chip. If the base GPIO is -1, the gpiolib
|
and the first number after the last of this chip. If the base GPIO
|
||||||
will assign it automatically.
|
is -1, the gpiolib will assign it automatically. while the following
|
||||||
|
parameter is the number of lines exposed by the chip.
|
||||||
|
|
||||||
Example: gpio_mockup_ranges=-1,8,-1,16,405,4
|
Example: gpio_mockup_ranges=-1,8,-1,16,405,409
|
||||||
|
|
||||||
The line above creates three chips. The first one will expose 8 lines,
|
The line above creates three chips. The first one will expose 8 lines,
|
||||||
the second 16 and the third 4. The base GPIO for the third chip is set
|
the second 16 and the third 4. The base GPIO for the third chip is set
|
||||||
to 405 while for two first chips it will be assigned automatically.
|
to 405 while for two first chips it will be assigned automatically.
|
||||||
|
|
||||||
gpio_named_lines
|
gpio_mockup_named_lines
|
||||||
|
|
||||||
This parameter doesn't take any arguments. It lets the driver know that
|
This parameter doesn't take any arguments. It lets the driver know that
|
||||||
GPIO lines exposed by it should be named.
|
GPIO lines exposed by it should be named.
|
||||||
|
@ -35,7 +35,6 @@ problems and bugs in particular.
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
reporting-issues
|
reporting-issues
|
||||||
Reporting bugs (obsolete) <reporting-bugs>
|
|
||||||
security-bugs
|
security-bugs
|
||||||
bug-hunting
|
bug-hunting
|
||||||
bug-bisect
|
bug-bisect
|
||||||
|
@ -68,6 +68,13 @@ For example one can add to the command line following parameter:
|
|||||||
|
|
||||||
where the final item represents CPUs 100,101,125,126,150,151,...
|
where the final item represents CPUs 100,101,125,126,150,151,...
|
||||||
|
|
||||||
|
The value "N" can be used to represent the numerically last CPU on the system,
|
||||||
|
i.e "foo_cpus=16-N" would be equivalent to "16-31" on a 32 core system.
|
||||||
|
|
||||||
|
Keep in mind that "N" is dynamic, so if system changes cause the bitmap width
|
||||||
|
to change, such as less cores in the CPU list, then N and any ranges using N
|
||||||
|
will also change. Use the same on a small 4 core system, and "16-N" becomes
|
||||||
|
"16-3" and now the same boot input will be flagged as invalid (start > end).
|
||||||
|
|
||||||
|
|
||||||
This document may not be entirely up to date and comprehensive. The command
|
This document may not be entirely up to date and comprehensive. The command
|
||||||
@ -140,6 +147,7 @@ parameter is applicable::
|
|||||||
PPT Parallel port support is enabled.
|
PPT Parallel port support is enabled.
|
||||||
PS2 Appropriate PS/2 support is enabled.
|
PS2 Appropriate PS/2 support is enabled.
|
||||||
RAM RAM disk support is enabled.
|
RAM RAM disk support is enabled.
|
||||||
|
RISCV RISCV architecture is enabled.
|
||||||
RDT Intel Resource Director Technology.
|
RDT Intel Resource Director Technology.
|
||||||
S390 S390 architecture is enabled.
|
S390 S390 architecture is enabled.
|
||||||
SCSI Appropriate SCSI support is enabled.
|
SCSI Appropriate SCSI support is enabled.
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
CONFIG_ACPI_DEBUG must be enabled to produce any ACPI
|
CONFIG_ACPI_DEBUG must be enabled to produce any ACPI
|
||||||
debug output. Bits in debug_layer correspond to a
|
debug output. Bits in debug_layer correspond to a
|
||||||
_COMPONENT in an ACPI source file, e.g.,
|
_COMPONENT in an ACPI source file, e.g.,
|
||||||
#define _COMPONENT ACPI_PCI_COMPONENT
|
#define _COMPONENT ACPI_EVENTS
|
||||||
Bits in debug_level correspond to a level in
|
Bits in debug_level correspond to a level in
|
||||||
ACPI_DEBUG_PRINT statements, e.g.,
|
ACPI_DEBUG_PRINT statements, e.g.,
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
|
||||||
@ -60,8 +60,6 @@
|
|||||||
|
|
||||||
Enable processor driver info messages:
|
Enable processor driver info messages:
|
||||||
acpi.debug_layer=0x20000000
|
acpi.debug_layer=0x20000000
|
||||||
Enable PCI/PCI interrupt routing info messages:
|
|
||||||
acpi.debug_layer=0x400000
|
|
||||||
Enable AML "Debug" output, i.e., stores to the Debug
|
Enable AML "Debug" output, i.e., stores to the Debug
|
||||||
object while interpreting AML:
|
object while interpreting AML:
|
||||||
acpi.debug_layer=0xffffffff acpi.debug_level=0x2
|
acpi.debug_layer=0xffffffff acpi.debug_level=0x2
|
||||||
@ -784,6 +782,16 @@
|
|||||||
cs89x0_media= [HW,NET]
|
cs89x0_media= [HW,NET]
|
||||||
Format: { rj45 | aui | bnc }
|
Format: { rj45 | aui | bnc }
|
||||||
|
|
||||||
|
csdlock_debug= [KNL] Enable debug add-ons of cross-CPU function call
|
||||||
|
handling. When switched on, additional debug data is
|
||||||
|
printed to the console in case a hanging CPU is
|
||||||
|
detected, and that CPU is pinged again in order to try
|
||||||
|
to resolve the hang situation.
|
||||||
|
0: disable csdlock debugging (default)
|
||||||
|
1: enable basic csdlock debugging (minor impact)
|
||||||
|
ext: enable extended csdlock debugging (more impact,
|
||||||
|
but more data)
|
||||||
|
|
||||||
dasd= [HW,NET]
|
dasd= [HW,NET]
|
||||||
See header of drivers/s390/block/dasd_devmap.c.
|
See header of drivers/s390/block/dasd_devmap.c.
|
||||||
|
|
||||||
@ -1461,6 +1469,12 @@
|
|||||||
Don't use this when you are not running on the
|
Don't use this when you are not running on the
|
||||||
android emulator
|
android emulator
|
||||||
|
|
||||||
|
gpio-mockup.gpio_mockup_ranges
|
||||||
|
[HW] Sets the ranges of gpiochip of for this device.
|
||||||
|
Format: <start1>,<end1>,<start2>,<end2>...
|
||||||
|
gpio-mockup.gpio_mockup_named_lines
|
||||||
|
[HW] Let the driver know GPIO lines should be named.
|
||||||
|
|
||||||
gpt [EFI] Forces disk with valid GPT signature but
|
gpt [EFI] Forces disk with valid GPT signature but
|
||||||
invalid Protective MBR to be treated as GPT. If the
|
invalid Protective MBR to be treated as GPT. If the
|
||||||
primary GPT is corrupted, it enables the backup/alternate
|
primary GPT is corrupted, it enables the backup/alternate
|
||||||
@ -1484,10 +1498,6 @@
|
|||||||
Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0.
|
Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0.
|
||||||
Default: 1024
|
Default: 1024
|
||||||
|
|
||||||
gpio-mockup.gpio_mockup_ranges
|
|
||||||
[HW] Sets the ranges of gpiochip of for this device.
|
|
||||||
Format: <start1>,<end1>,<start2>,<end2>...
|
|
||||||
|
|
||||||
hardlockup_all_cpu_backtrace=
|
hardlockup_all_cpu_backtrace=
|
||||||
[KNL] Should the hard-lockup detector generate
|
[KNL] Should the hard-lockup detector generate
|
||||||
backtraces on all cpus.
|
backtraces on all cpus.
|
||||||
@ -1825,6 +1835,18 @@
|
|||||||
initcall functions. Useful for debugging built-in
|
initcall functions. Useful for debugging built-in
|
||||||
modules and initcalls.
|
modules and initcalls.
|
||||||
|
|
||||||
|
initramfs_async= [KNL]
|
||||||
|
Format: <bool>
|
||||||
|
Default: 1
|
||||||
|
This parameter controls whether the initramfs
|
||||||
|
image is unpacked asynchronously, concurrently
|
||||||
|
with devices being probed and
|
||||||
|
initialized. This should normally just work,
|
||||||
|
but as a debugging aid, one can get the
|
||||||
|
historical behaviour of the initramfs
|
||||||
|
unpacking being completed before device_ and
|
||||||
|
late_ initcalls.
|
||||||
|
|
||||||
initrd= [BOOT] Specify the location of the initial ramdisk
|
initrd= [BOOT] Specify the location of the initial ramdisk
|
||||||
|
|
||||||
initrdmem= [KNL] Specify a physical address and size from which to
|
initrdmem= [KNL] Specify a physical address and size from which to
|
||||||
@ -2280,8 +2302,7 @@
|
|||||||
state is kept private from the host.
|
state is kept private from the host.
|
||||||
Not valid if the kernel is running in EL2.
|
Not valid if the kernel is running in EL2.
|
||||||
|
|
||||||
Defaults to VHE/nVHE based on hardware support and
|
Defaults to VHE/nVHE based on hardware support.
|
||||||
the value of CONFIG_ARM64_VHE.
|
|
||||||
|
|
||||||
kvm-arm.vgic_v3_group0_trap=
|
kvm-arm.vgic_v3_group0_trap=
|
||||||
[KVM,ARM] Trap guest accesses to GICv3 group-0
|
[KVM,ARM] Trap guest accesses to GICv3 group-0
|
||||||
@ -2795,7 +2816,24 @@
|
|||||||
seconds. Use this parameter to check at some
|
seconds. Use this parameter to check at some
|
||||||
other rate. 0 disables periodic checking.
|
other rate. 0 disables periodic checking.
|
||||||
|
|
||||||
memtest= [KNL,X86,ARM,PPC] Enable memtest
|
memory_hotplug.memmap_on_memory
|
||||||
|
[KNL,X86,ARM] Boolean flag to enable this feature.
|
||||||
|
Format: {on | off (default)}
|
||||||
|
When enabled, runtime hotplugged memory will
|
||||||
|
allocate its internal metadata (struct pages)
|
||||||
|
from the hotadded memory which will allow to
|
||||||
|
hotadd a lot of memory without requiring
|
||||||
|
additional memory to do so.
|
||||||
|
This feature is disabled by default because it
|
||||||
|
has some implication on large (e.g. GB)
|
||||||
|
allocations in some configurations (e.g. small
|
||||||
|
memory blocks).
|
||||||
|
The state of the flag can be read in
|
||||||
|
/sys/module/memory_hotplug/parameters/memmap_on_memory.
|
||||||
|
Note that even when enabled, there are a few cases where
|
||||||
|
the feature is not effective.
|
||||||
|
|
||||||
|
memtest= [KNL,X86,ARM,PPC,RISCV] Enable memtest
|
||||||
Format: <integer>
|
Format: <integer>
|
||||||
default : 0 <disable>
|
default : 0 <disable>
|
||||||
Specifies the number of memtest passes to be
|
Specifies the number of memtest passes to be
|
||||||
@ -3244,6 +3282,8 @@
|
|||||||
|
|
||||||
nohugeiomap [KNL,X86,PPC,ARM64] Disable kernel huge I/O mappings.
|
nohugeiomap [KNL,X86,PPC,ARM64] Disable kernel huge I/O mappings.
|
||||||
|
|
||||||
|
nohugevmalloc [PPC] Disable kernel huge vmalloc mappings.
|
||||||
|
|
||||||
nosmt [KNL,S390] Disable symmetric multithreading (SMT).
|
nosmt [KNL,S390] Disable symmetric multithreading (SMT).
|
||||||
Equivalent to smt=1.
|
Equivalent to smt=1.
|
||||||
|
|
||||||
@ -3473,7 +3513,8 @@
|
|||||||
|
|
||||||
nr_uarts= [SERIAL] maximum number of UARTs to be registered.
|
nr_uarts= [SERIAL] maximum number of UARTs to be registered.
|
||||||
|
|
||||||
numa_balancing= [KNL,X86] Enable or disable automatic NUMA balancing.
|
numa_balancing= [KNL,ARM64,PPC,RISCV,S390,X86] Enable or disable automatic
|
||||||
|
NUMA balancing.
|
||||||
Allowed values are enable and disable
|
Allowed values are enable and disable
|
||||||
|
|
||||||
numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
|
numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
|
||||||
@ -3593,6 +3634,96 @@
|
|||||||
Currently this function knows 686a and 8231 chips.
|
Currently this function knows 686a and 8231 chips.
|
||||||
Format: [spp|ps2|epp|ecp|ecpepp]
|
Format: [spp|ps2|epp|ecp|ecpepp]
|
||||||
|
|
||||||
|
pata_legacy.all= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to non-zero to probe primary and secondary ISA
|
||||||
|
port ranges on PCI systems where no PCI PATA device
|
||||||
|
has been found at either range. Disabled by default.
|
||||||
|
|
||||||
|
pata_legacy.autospeed= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to non-zero if a chip is present that snoops speed
|
||||||
|
changes. Disabled by default.
|
||||||
|
|
||||||
|
pata_legacy.ht6560a= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to 1, 2, or 3 for HT 6560A on the primary channel,
|
||||||
|
the secondary channel, or both channels respectively.
|
||||||
|
Disabled by default.
|
||||||
|
|
||||||
|
pata_legacy.ht6560b= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to 1, 2, or 3 for HT 6560B on the primary channel,
|
||||||
|
the secondary channel, or both channels respectively.
|
||||||
|
Disabled by default.
|
||||||
|
|
||||||
|
pata_legacy.iordy_mask= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
IORDY enable mask. Set individual bits to allow IORDY
|
||||||
|
for the respective channel. Bit 0 is for the first
|
||||||
|
legacy channel handled by this driver, bit 1 is for
|
||||||
|
the second channel, and so on. The sequence will often
|
||||||
|
correspond to the primary legacy channel, the secondary
|
||||||
|
legacy channel, and so on, but the handling of a PCI
|
||||||
|
bus and the use of other driver options may interfere
|
||||||
|
with the sequence. By default IORDY is allowed across
|
||||||
|
all channels.
|
||||||
|
|
||||||
|
pata_legacy.opti82c46x= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to 1, 2, or 3 for Opti 82c611A on the primary
|
||||||
|
channel, the secondary channel, or both channels
|
||||||
|
respectively. Disabled by default.
|
||||||
|
|
||||||
|
pata_legacy.opti82c611a= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to 1, 2, or 3 for Opti 82c465MV on the primary
|
||||||
|
channel, the secondary channel, or both channels
|
||||||
|
respectively. Disabled by default.
|
||||||
|
|
||||||
|
pata_legacy.pio_mask= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
PIO mode mask for autospeed devices. Set individual
|
||||||
|
bits to allow the use of the respective PIO modes.
|
||||||
|
Bit 0 is for mode 0, bit 1 is for mode 1, and so on.
|
||||||
|
All modes allowed by default.
|
||||||
|
|
||||||
|
pata_legacy.probe_all= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to non-zero to probe tertiary and further ISA
|
||||||
|
port ranges on PCI systems. Disabled by default.
|
||||||
|
|
||||||
|
pata_legacy.probe_mask= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Probe mask for legacy ISA PATA ports. Depending on
|
||||||
|
platform configuration and the use of other driver
|
||||||
|
options up to 6 legacy ports are supported: 0x1f0,
|
||||||
|
0x170, 0x1e8, 0x168, 0x1e0, 0x160, however probing
|
||||||
|
of individual ports can be disabled by setting the
|
||||||
|
corresponding bits in the mask to 1. Bit 0 is for
|
||||||
|
the first port in the list above (0x1f0), and so on.
|
||||||
|
By default all supported ports are probed.
|
||||||
|
|
||||||
|
pata_legacy.qdi= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to non-zero to probe QDI controllers. By default
|
||||||
|
set to 1 if CONFIG_PATA_QDI_MODULE, 0 otherwise.
|
||||||
|
|
||||||
|
pata_legacy.winbond= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Set to non-zero to probe Winbond controllers. Use
|
||||||
|
the standard I/O port (0x130) if 1, otherwise the
|
||||||
|
value given is the I/O port to use (typically 0x1b0).
|
||||||
|
By default set to 1 if CONFIG_PATA_WINBOND_VLB_MODULE,
|
||||||
|
0 otherwise.
|
||||||
|
|
||||||
|
pata_platform.pio_mask= [HW,LIBATA]
|
||||||
|
Format: <int>
|
||||||
|
Supported PIO mode mask. Set individual bits to allow
|
||||||
|
the use of the respective PIO modes. Bit 0 is for
|
||||||
|
mode 0, bit 1 is for mode 1, and so on. Mode 0 only
|
||||||
|
allowed by default.
|
||||||
|
|
||||||
pause_on_oops=
|
pause_on_oops=
|
||||||
Halt all CPUs after the first oops has been printed for
|
Halt all CPUs after the first oops has been printed for
|
||||||
the specified number of seconds. This is to be used if
|
the specified number of seconds. This is to be used if
|
||||||
@ -4062,6 +4193,17 @@
|
|||||||
fully seed the kernel's CRNG. Default is controlled
|
fully seed the kernel's CRNG. Default is controlled
|
||||||
by CONFIG_RANDOM_TRUST_CPU.
|
by CONFIG_RANDOM_TRUST_CPU.
|
||||||
|
|
||||||
|
randomize_kstack_offset=
|
||||||
|
[KNL] Enable or disable kernel stack offset
|
||||||
|
randomization, which provides roughly 5 bits of
|
||||||
|
entropy, frustrating memory corruption attacks
|
||||||
|
that depend on stack address determinism or
|
||||||
|
cross-syscall address exposures. This is only
|
||||||
|
available on architectures that have defined
|
||||||
|
CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET.
|
||||||
|
Format: <bool> (1/Y/y=enable, 0/N/n=disable)
|
||||||
|
Default is CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT.
|
||||||
|
|
||||||
ras=option[,option,...] [KNL] RAS-specific options
|
ras=option[,option,...] [KNL] RAS-specific options
|
||||||
|
|
||||||
cec_disable [X86]
|
cec_disable [X86]
|
||||||
@ -4069,9 +4211,7 @@
|
|||||||
see CONFIG_RAS_CEC help text.
|
see CONFIG_RAS_CEC help text.
|
||||||
|
|
||||||
rcu_nocbs= [KNL]
|
rcu_nocbs= [KNL]
|
||||||
The argument is a cpu list, as described above,
|
The argument is a cpu list, as described above.
|
||||||
except that the string "all" can be used to
|
|
||||||
specify every CPU on the system.
|
|
||||||
|
|
||||||
In kernels built with CONFIG_RCU_NOCB_CPU=y, set
|
In kernels built with CONFIG_RCU_NOCB_CPU=y, set
|
||||||
the specified list of CPUs to be no-callback CPUs.
|
the specified list of CPUs to be no-callback CPUs.
|
||||||
@ -4260,6 +4400,18 @@
|
|||||||
rcuscale.kfree_rcu_test= [KNL]
|
rcuscale.kfree_rcu_test= [KNL]
|
||||||
Set to measure performance of kfree_rcu() flooding.
|
Set to measure performance of kfree_rcu() flooding.
|
||||||
|
|
||||||
|
rcuscale.kfree_rcu_test_double= [KNL]
|
||||||
|
Test the double-argument variant of kfree_rcu().
|
||||||
|
If this parameter has the same value as
|
||||||
|
rcuscale.kfree_rcu_test_single, both the single-
|
||||||
|
and double-argument variants are tested.
|
||||||
|
|
||||||
|
rcuscale.kfree_rcu_test_single= [KNL]
|
||||||
|
Test the single-argument variant of kfree_rcu().
|
||||||
|
If this parameter has the same value as
|
||||||
|
rcuscale.kfree_rcu_test_double, both the single-
|
||||||
|
and double-argument variants are tested.
|
||||||
|
|
||||||
rcuscale.kfree_nthreads= [KNL]
|
rcuscale.kfree_nthreads= [KNL]
|
||||||
The number of threads running loops of kfree_rcu().
|
The number of threads running loops of kfree_rcu().
|
||||||
|
|
||||||
@ -4726,7 +4878,7 @@
|
|||||||
|
|
||||||
sbni= [NET] Granch SBNI12 leased line adapter
|
sbni= [NET] Granch SBNI12 leased line adapter
|
||||||
|
|
||||||
sched_debug [KNL] Enables verbose scheduler debug messages.
|
sched_verbose [KNL] Enables verbose scheduler debug messages.
|
||||||
|
|
||||||
schedstats= [KNL,X86] Enable or disable scheduled statistics.
|
schedstats= [KNL,X86] Enable or disable scheduled statistics.
|
||||||
Allowed values are enable and disable. This feature
|
Allowed values are enable and disable. This feature
|
||||||
@ -4878,6 +5030,10 @@
|
|||||||
|
|
||||||
slram= [HW,MTD]
|
slram= [HW,MTD]
|
||||||
|
|
||||||
|
slab_merge [MM]
|
||||||
|
Enable merging of slabs with similar size when the
|
||||||
|
kernel is built without CONFIG_SLAB_MERGE_DEFAULT.
|
||||||
|
|
||||||
slab_nomerge [MM]
|
slab_nomerge [MM]
|
||||||
Disable merging of slabs with similar size. May be
|
Disable merging of slabs with similar size. May be
|
||||||
necessary if there is some reason to distinguish
|
necessary if there is some reason to distinguish
|
||||||
@ -4925,6 +5081,9 @@
|
|||||||
lower than slub_max_order.
|
lower than slub_max_order.
|
||||||
For more information see Documentation/vm/slub.rst.
|
For more information see Documentation/vm/slub.rst.
|
||||||
|
|
||||||
|
slub_merge [MM, SLUB]
|
||||||
|
Same with slab_merge.
|
||||||
|
|
||||||
slub_nomerge [MM, SLUB]
|
slub_nomerge [MM, SLUB]
|
||||||
Same with slab_nomerge. This is supported for legacy.
|
Same with slab_nomerge. This is supported for legacy.
|
||||||
See slab_nomerge for more information.
|
See slab_nomerge for more information.
|
||||||
@ -5101,27 +5260,37 @@
|
|||||||
spia_peddr=
|
spia_peddr=
|
||||||
|
|
||||||
split_lock_detect=
|
split_lock_detect=
|
||||||
[X86] Enable split lock detection
|
[X86] Enable split lock detection or bus lock detection
|
||||||
|
|
||||||
When enabled (and if hardware support is present), atomic
|
When enabled (and if hardware support is present), atomic
|
||||||
instructions that access data across cache line
|
instructions that access data across cache line
|
||||||
boundaries will result in an alignment check exception.
|
boundaries will result in an alignment check exception
|
||||||
|
for split lock detection or a debug exception for
|
||||||
|
bus lock detection.
|
||||||
|
|
||||||
off - not enabled
|
off - not enabled
|
||||||
|
|
||||||
warn - the kernel will emit rate limited warnings
|
warn - the kernel will emit rate-limited warnings
|
||||||
about applications triggering the #AC
|
about applications triggering the #AC
|
||||||
exception. This mode is the default on CPUs
|
exception or the #DB exception. This mode is
|
||||||
that supports split lock detection.
|
the default on CPUs that support split lock
|
||||||
|
detection or bus lock detection. Default
|
||||||
|
behavior is by #AC if both features are
|
||||||
|
enabled in hardware.
|
||||||
|
|
||||||
fatal - the kernel will send SIGBUS to applications
|
fatal - the kernel will send SIGBUS to applications
|
||||||
that trigger the #AC exception.
|
that trigger the #AC exception or the #DB
|
||||||
|
exception. Default behavior is by #AC if
|
||||||
|
both features are enabled in hardware.
|
||||||
|
|
||||||
If an #AC exception is hit in the kernel or in
|
If an #AC exception is hit in the kernel or in
|
||||||
firmware (i.e. not while executing in user mode)
|
firmware (i.e. not while executing in user mode)
|
||||||
the kernel will oops in either "warn" or "fatal"
|
the kernel will oops in either "warn" or "fatal"
|
||||||
mode.
|
mode.
|
||||||
|
|
||||||
|
#DB exception for bus lock is triggered only when
|
||||||
|
CPL > 0.
|
||||||
|
|
||||||
srbds= [X86,INTEL]
|
srbds= [X86,INTEL]
|
||||||
Control the Special Register Buffer Data Sampling
|
Control the Special Register Buffer Data Sampling
|
||||||
(SRBDS) mitigation.
|
(SRBDS) mitigation.
|
||||||
@ -5463,6 +5632,18 @@
|
|||||||
See Documentation/admin-guide/mm/transhuge.rst
|
See Documentation/admin-guide/mm/transhuge.rst
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
|
trusted.source= [KEYS]
|
||||||
|
Format: <string>
|
||||||
|
This parameter identifies the trust source as a backend
|
||||||
|
for trusted keys implementation. Supported trust
|
||||||
|
sources:
|
||||||
|
- "tpm"
|
||||||
|
- "tee"
|
||||||
|
If not specified then it defaults to iterating through
|
||||||
|
the trust source list starting with TPM and assigns the
|
||||||
|
first trust source as a backend which is initialized
|
||||||
|
successfully during iteration.
|
||||||
|
|
||||||
tsc= Disable clocksource stability checks for TSC.
|
tsc= Disable clocksource stability checks for TSC.
|
||||||
Format: <string>
|
Format: <string>
|
||||||
[x86] reliable: mark tsc clocksource as reliable, this
|
[x86] reliable: mark tsc clocksource as reliable, this
|
||||||
|
@ -332,23 +332,3 @@ To reduce its OS jitter, do at least one of the following:
|
|||||||
kthreads from being created in the first place. However, please
|
kthreads from being created in the first place. However, please
|
||||||
note that this will not eliminate OS jitter, but will instead
|
note that this will not eliminate OS jitter, but will instead
|
||||||
shift it to RCU_SOFTIRQ.
|
shift it to RCU_SOFTIRQ.
|
||||||
|
|
||||||
Name:
|
|
||||||
watchdog/%u
|
|
||||||
|
|
||||||
Purpose:
|
|
||||||
Detect software lockups on each CPU.
|
|
||||||
|
|
||||||
To reduce its OS jitter, do at least one of the following:
|
|
||||||
|
|
||||||
1. Build with CONFIG_LOCKUP_DETECTOR=n, which will prevent these
|
|
||||||
kthreads from being created in the first place.
|
|
||||||
2. Boot with "nosoftlockup=0", which will also prevent these kthreads
|
|
||||||
from being created. Other related watchdog and softlockup boot
|
|
||||||
parameters may be found in Documentation/admin-guide/kernel-parameters.rst
|
|
||||||
and Documentation/watchdog/watchdog-parameters.rst.
|
|
||||||
3. Echo a zero to /proc/sys/kernel/watchdog to disable the
|
|
||||||
watchdog timer.
|
|
||||||
4. Echo a large number of /proc/sys/kernel/watchdog_thresh in
|
|
||||||
order to reduce the frequency of OS jitter due to the watchdog
|
|
||||||
timer down to a level that is acceptable for your workload.
|
|
||||||
|
@ -52,6 +52,7 @@ detailed description):
|
|||||||
- LCD Shadow (PrivacyGuard) enable and disable
|
- LCD Shadow (PrivacyGuard) enable and disable
|
||||||
- Lap mode sensor
|
- Lap mode sensor
|
||||||
- Setting keyboard language
|
- Setting keyboard language
|
||||||
|
- WWAN Antenna type
|
||||||
|
|
||||||
A compatibility table by model and feature is maintained on the web
|
A compatibility table by model and feature is maintained on the web
|
||||||
site, http://ibm-acpi.sf.net/. I appreciate any success or failure
|
site, http://ibm-acpi.sf.net/. I appreciate any success or failure
|
||||||
@ -1490,6 +1491,25 @@ fr(French), fr-ch(French(Switzerland)), hu(Hungarian), it(Italy), jp (Japan),
|
|||||||
nl(Dutch), nn(Norway), pl(Polish), pt(portugese), sl(Slovenian), sv(Sweden),
|
nl(Dutch), nn(Norway), pl(Polish), pt(portugese), sl(Slovenian), sv(Sweden),
|
||||||
tr(Turkey)
|
tr(Turkey)
|
||||||
|
|
||||||
|
WWAN Antenna type
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
sysfs: wwan_antenna_type
|
||||||
|
|
||||||
|
On some newer Thinkpads we need to set SAR value based on the antenna
|
||||||
|
type. This interface will be used by userspace to get the antenna type
|
||||||
|
and set the corresponding SAR value, as is required for FCC certification.
|
||||||
|
|
||||||
|
The available commands are::
|
||||||
|
|
||||||
|
cat /sys/devices/platform/thinkpad_acpi/wwan_antenna_type
|
||||||
|
|
||||||
|
Currently 2 antenna types are supported as mentioned below:
|
||||||
|
- type a
|
||||||
|
- type b
|
||||||
|
|
||||||
|
The property is read-only. If the platform doesn't have support the sysfs
|
||||||
|
class is not created.
|
||||||
|
|
||||||
Adaptive keyboard
|
Adaptive keyboard
|
||||||
-----------------
|
-----------------
|
||||||
|
@ -357,6 +357,15 @@ creates ZONE_MOVABLE as following.
|
|||||||
Unfortunately, there is no information to show which memory block belongs
|
Unfortunately, there is no information to show which memory block belongs
|
||||||
to ZONE_MOVABLE. This is TBD.
|
to ZONE_MOVABLE. This is TBD.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Techniques that rely on long-term pinnings of memory (especially, RDMA and
|
||||||
|
vfio) are fundamentally problematic with ZONE_MOVABLE and, therefore, memory
|
||||||
|
hot remove. Pinned pages cannot reside on ZONE_MOVABLE, to guarantee that
|
||||||
|
memory can still get hot removed - be aware that pinning can fail even if
|
||||||
|
there is plenty of free memory in ZONE_MOVABLE. In addition, using
|
||||||
|
ZONE_MOVABLE might make page pinning more expensive, because pages have to be
|
||||||
|
migrated off that zone first.
|
||||||
|
|
||||||
.. _memory_hotplug_how_to_offline_memory:
|
.. _memory_hotplug_how_to_offline_memory:
|
||||||
|
|
||||||
How to offline memory
|
How to offline memory
|
||||||
|
@ -151,7 +151,7 @@ Each cache level's directory provides its attributes. For example, the
|
|||||||
following shows a single cache level and the attributes available for
|
following shows a single cache level and the attributes available for
|
||||||
software to query::
|
software to query::
|
||||||
|
|
||||||
# tree sys/devices/system/node/node0/memory_side_cache/
|
# tree /sys/devices/system/node/node0/memory_side_cache/
|
||||||
/sys/devices/system/node/node0/memory_side_cache/
|
/sys/devices/system/node/node0/memory_side_cache/
|
||||||
|-- index1
|
|-- index1
|
||||||
| |-- indexing
|
| |-- indexing
|
||||||
|
@ -402,7 +402,7 @@ compact_fail
|
|||||||
but failed.
|
but failed.
|
||||||
|
|
||||||
It is possible to establish how long the stalls were using the function
|
It is possible to establish how long the stalls were using the function
|
||||||
tracer to record how long was spent in __alloc_pages_nodemask and
|
tracer to record how long was spent in __alloc_pages() and
|
||||||
using the mm_page_alloc tracepoint to identify which allocations were
|
using the mm_page_alloc tracepoint to identify which allocations were
|
||||||
for huge pages.
|
for huge pages.
|
||||||
|
|
||||||
|
@ -63,36 +63,36 @@ the generic ioctl available.
|
|||||||
|
|
||||||
The ``uffdio_api.features`` bitmask returned by the ``UFFDIO_API`` ioctl
|
The ``uffdio_api.features`` bitmask returned by the ``UFFDIO_API`` ioctl
|
||||||
defines what memory types are supported by the ``userfaultfd`` and what
|
defines what memory types are supported by the ``userfaultfd`` and what
|
||||||
events, except page fault notifications, may be generated.
|
events, except page fault notifications, may be generated:
|
||||||
|
|
||||||
If the kernel supports registering ``userfaultfd`` ranges on hugetlbfs
|
- The ``UFFD_FEATURE_EVENT_*`` flags indicate that various other events
|
||||||
virtual memory areas, ``UFFD_FEATURE_MISSING_HUGETLBFS`` will be set in
|
other than page faults are supported. These events are described in more
|
||||||
``uffdio_api.features``. Similarly, ``UFFD_FEATURE_MISSING_SHMEM`` will be
|
detail below in the `Non-cooperative userfaultfd`_ section.
|
||||||
set if the kernel supports registering ``userfaultfd`` ranges on shared
|
|
||||||
memory (covering all shmem APIs, i.e. tmpfs, ``IPCSHM``, ``/dev/zero``,
|
|
||||||
``MAP_SHARED``, ``memfd_create``, etc).
|
|
||||||
|
|
||||||
The userland application that wants to use ``userfaultfd`` with hugetlbfs
|
- ``UFFD_FEATURE_MISSING_HUGETLBFS`` and ``UFFD_FEATURE_MISSING_SHMEM``
|
||||||
or shared memory need to set the corresponding flag in
|
indicate that the kernel supports ``UFFDIO_REGISTER_MODE_MISSING``
|
||||||
``uffdio_api.features`` to enable those features.
|
registrations for hugetlbfs and shared memory (covering all shmem APIs,
|
||||||
|
i.e. tmpfs, ``IPCSHM``, ``/dev/zero``, ``MAP_SHARED``, ``memfd_create``,
|
||||||
|
etc) virtual memory areas, respectively.
|
||||||
|
|
||||||
If the userland desires to receive notifications for events other than
|
- ``UFFD_FEATURE_MINOR_HUGETLBFS`` indicates that the kernel supports
|
||||||
page faults, it has to verify that ``uffdio_api.features`` has appropriate
|
``UFFDIO_REGISTER_MODE_MINOR`` registration for hugetlbfs virtual memory
|
||||||
``UFFD_FEATURE_EVENT_*`` bits set. These events are described in more
|
areas.
|
||||||
detail below in `Non-cooperative userfaultfd`_ section.
|
|
||||||
|
|
||||||
Once the ``userfaultfd`` has been enabled the ``UFFDIO_REGISTER`` ioctl should
|
The userland application should set the feature flags it intends to use
|
||||||
be invoked (if present in the returned ``uffdio_api.ioctls`` bitmask) to
|
when invoking the ``UFFDIO_API`` ioctl, to request that those features be
|
||||||
register a memory range in the ``userfaultfd`` by setting the
|
enabled if supported.
|
||||||
|
|
||||||
|
Once the ``userfaultfd`` API has been enabled the ``UFFDIO_REGISTER``
|
||||||
|
ioctl should be invoked (if present in the returned ``uffdio_api.ioctls``
|
||||||
|
bitmask) to register a memory range in the ``userfaultfd`` by setting the
|
||||||
uffdio_register structure accordingly. The ``uffdio_register.mode``
|
uffdio_register structure accordingly. The ``uffdio_register.mode``
|
||||||
bitmask will specify to the kernel which kind of faults to track for
|
bitmask will specify to the kernel which kind of faults to track for
|
||||||
the range (``UFFDIO_REGISTER_MODE_MISSING`` would track missing
|
the range. The ``UFFDIO_REGISTER`` ioctl will return the
|
||||||
pages). The ``UFFDIO_REGISTER`` ioctl will return the
|
|
||||||
``uffdio_register.ioctls`` bitmask of ioctls that are suitable to resolve
|
``uffdio_register.ioctls`` bitmask of ioctls that are suitable to resolve
|
||||||
userfaults on the range registered. Not all ioctls will necessarily be
|
userfaults on the range registered. Not all ioctls will necessarily be
|
||||||
supported for all memory types depending on the underlying virtual
|
supported for all memory types (e.g. anonymous memory vs. shmem vs.
|
||||||
memory backend (anonymous memory vs tmpfs vs real filebacked
|
hugetlbfs), or all types of intercepted faults.
|
||||||
mappings).
|
|
||||||
|
|
||||||
Userland can use the ``uffdio_register.ioctls`` to manage the virtual
|
Userland can use the ``uffdio_register.ioctls`` to manage the virtual
|
||||||
address space in the background (to add or potentially also remove
|
address space in the background (to add or potentially also remove
|
||||||
@ -100,21 +100,46 @@ memory from the ``userfaultfd`` registered range). This means a userfault
|
|||||||
could be triggering just before userland maps in the background the
|
could be triggering just before userland maps in the background the
|
||||||
user-faulted page.
|
user-faulted page.
|
||||||
|
|
||||||
The primary ioctl to resolve userfaults is ``UFFDIO_COPY``. That
|
Resolving Userfaults
|
||||||
atomically copies a page into the userfault registered range and wakes
|
--------------------
|
||||||
up the blocked userfaults
|
|
||||||
(unless ``uffdio_copy.mode & UFFDIO_COPY_MODE_DONTWAKE`` is set).
|
There are three basic ways to resolve userfaults:
|
||||||
Other ioctl works similarly to ``UFFDIO_COPY``. They're atomic as in
|
|
||||||
guaranteeing that nothing can see an half copied page since it'll
|
- ``UFFDIO_COPY`` atomically copies some existing page contents from
|
||||||
keep userfaulting until the copy has finished.
|
userspace.
|
||||||
|
|
||||||
|
- ``UFFDIO_ZEROPAGE`` atomically zeros the new page.
|
||||||
|
|
||||||
|
- ``UFFDIO_CONTINUE`` maps an existing, previously-populated page.
|
||||||
|
|
||||||
|
These operations are atomic in the sense that they guarantee nothing can
|
||||||
|
see a half-populated page, since readers will keep userfaulting until the
|
||||||
|
operation has finished.
|
||||||
|
|
||||||
|
By default, these wake up userfaults blocked on the range in question.
|
||||||
|
They support a ``UFFDIO_*_MODE_DONTWAKE`` ``mode`` flag, which indicates
|
||||||
|
that waking will be done separately at some later time.
|
||||||
|
|
||||||
|
Which ioctl to choose depends on the kind of page fault, and what we'd
|
||||||
|
like to do to resolve it:
|
||||||
|
|
||||||
|
- For ``UFFDIO_REGISTER_MODE_MISSING`` faults, the fault needs to be
|
||||||
|
resolved by either providing a new page (``UFFDIO_COPY``), or mapping
|
||||||
|
the zero page (``UFFDIO_ZEROPAGE``). By default, the kernel would map
|
||||||
|
the zero page for a missing fault. With userfaultfd, userspace can
|
||||||
|
decide what content to provide before the faulting thread continues.
|
||||||
|
|
||||||
|
- For ``UFFDIO_REGISTER_MODE_MINOR`` faults, there is an existing page (in
|
||||||
|
the page cache). Userspace has the option of modifying the page's
|
||||||
|
contents before resolving the fault. Once the contents are correct
|
||||||
|
(modified or not), userspace asks the kernel to map the page and let the
|
||||||
|
faulting thread continue with ``UFFDIO_CONTINUE``.
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
||||||
- If you requested ``UFFDIO_REGISTER_MODE_MISSING`` when registering then
|
- You can tell which kind of fault occurred by examining
|
||||||
you must provide some kind of page in your thread after reading from
|
``pagefault.flags`` within the ``uffd_msg``, checking for the
|
||||||
the uffd. You must provide either ``UFFDIO_COPY`` or ``UFFDIO_ZEROPAGE``.
|
``UFFD_PAGEFAULT_FLAG_*`` flags.
|
||||||
The normal behavior of the OS automatically providing a zero page on
|
|
||||||
an anonymous mmaping is not in place.
|
|
||||||
|
|
||||||
- None of the page-delivering ioctls default to the range that you
|
- None of the page-delivering ioctls default to the range that you
|
||||||
registered with. You must fill in all fields for the appropriate
|
registered with. You must fill in all fields for the appropriate
|
||||||
@ -122,9 +147,9 @@ Notes:
|
|||||||
|
|
||||||
- You get the address of the access that triggered the missing page
|
- You get the address of the access that triggered the missing page
|
||||||
event out of a struct uffd_msg that you read in the thread from the
|
event out of a struct uffd_msg that you read in the thread from the
|
||||||
uffd. You can supply as many pages as you want with ``UFFDIO_COPY`` or
|
uffd. You can supply as many pages as you want with these IOCTLs.
|
||||||
``UFFDIO_ZEROPAGE``. Keep in mind that unless you used DONTWAKE then
|
Keep in mind that unless you used DONTWAKE then the first of any of
|
||||||
the first of any of those IOCTLs wakes up the faulting thread.
|
those IOCTLs wakes up the faulting thread.
|
||||||
|
|
||||||
- Be sure to test for all errors including
|
- Be sure to test for all errors including
|
||||||
(``pollfd[0].revents & POLLERR``). This can happen, e.g. when ranges
|
(``pollfd[0].revents & POLLERR``). This can happen, e.g. when ranges
|
||||||
|
@ -53,6 +53,60 @@ Example usage of perf::
|
|||||||
$# perf stat -a -e hisi_sccl3_l3c0/rd_hit_cpipe/ sleep 5
|
$# perf stat -a -e hisi_sccl3_l3c0/rd_hit_cpipe/ sleep 5
|
||||||
$# perf stat -a -e hisi_sccl3_l3c0/config=0x02/ sleep 5
|
$# perf stat -a -e hisi_sccl3_l3c0/config=0x02/ sleep 5
|
||||||
|
|
||||||
|
For HiSilicon uncore PMU v2 whose identifier is 0x30, the topology is the same
|
||||||
|
as PMU v1, but some new functions are added to the hardware.
|
||||||
|
|
||||||
|
(a) L3C PMU supports filtering by core/thread within the cluster which can be
|
||||||
|
specified as a bitmap::
|
||||||
|
|
||||||
|
$# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_core=0x3/ sleep 5
|
||||||
|
|
||||||
|
This will only count the operations from core/thread 0 and 1 in this cluster.
|
||||||
|
|
||||||
|
(b) Tracetag allow the user to chose to count only read, write or atomic
|
||||||
|
operations via the tt_req parameeter in perf. The default value counts all
|
||||||
|
operations. tt_req is 3bits, 3'b100 represents read operations, 3'b101
|
||||||
|
represents write operations, 3'b110 represents atomic store operations and
|
||||||
|
3'b111 represents atomic non-store operations, other values are reserved::
|
||||||
|
|
||||||
|
$# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_req=0x4/ sleep 5
|
||||||
|
|
||||||
|
This will only count the read operations in this cluster.
|
||||||
|
|
||||||
|
(c) Datasrc allows the user to check where the data comes from. It is 5 bits.
|
||||||
|
Some important codes are as follows:
|
||||||
|
5'b00001: comes from L3C in this die;
|
||||||
|
5'b01000: comes from L3C in the cross-die;
|
||||||
|
5'b01001: comes from L3C which is in another socket;
|
||||||
|
5'b01110: comes from the local DDR;
|
||||||
|
5'b01111: comes from the cross-die DDR;
|
||||||
|
5'b10000: comes from cross-socket DDR;
|
||||||
|
etc, it is mainly helpful to find that the data source is nearest from the CPU
|
||||||
|
cores. If datasrc_cfg is used in the multi-chips, the datasrc_skt shall be
|
||||||
|
configured in perf command::
|
||||||
|
|
||||||
|
$# perf stat -a -e hisi_sccl3_l3c0/config=0xb9,datasrc_cfg=0xE/,
|
||||||
|
hisi_sccl3_l3c0/config=0xb9,datasrc_cfg=0xF/ sleep 5
|
||||||
|
|
||||||
|
(d)Some HiSilicon SoCs encapsulate multiple CPU and IO dies. Each CPU die
|
||||||
|
contains several Compute Clusters (CCLs). The I/O dies are called Super I/O
|
||||||
|
clusters (SICL) containing multiple I/O clusters (ICLs). Each CCL/ICL in the
|
||||||
|
SoC has a unique ID. Each ID is 11bits, include a 6-bit SCCL-ID and 5-bit
|
||||||
|
CCL/ICL-ID. For I/O die, the ICL-ID is followed by:
|
||||||
|
5'b00000: I/O_MGMT_ICL;
|
||||||
|
5'b00001: Network_ICL;
|
||||||
|
5'b00011: HAC_ICL;
|
||||||
|
5'b10000: PCIe_ICL;
|
||||||
|
|
||||||
|
Users could configure IDs to count data come from specific CCL/ICL, by setting
|
||||||
|
srcid_cmd & srcid_msk, and data desitined for specific CCL/ICL by setting
|
||||||
|
tgtid_cmd & tgtid_msk. A set bit in srcid_msk/tgtid_msk means the PMU will not
|
||||||
|
check the bit when matching against the srcid_cmd/tgtid_cmd.
|
||||||
|
|
||||||
|
If all of these options are disabled, it can works by the default value that
|
||||||
|
doesn't distinguish the filter condition and ID information and will return
|
||||||
|
the total counter values in the PMU counters.
|
||||||
|
|
||||||
The current driver does not support sampling. So "perf record" is unsupported.
|
The current driver does not support sampling. So "perf record" is unsupported.
|
||||||
Also attach to a task is unsupported as the events are all uncore.
|
Also attach to a task is unsupported as the events are all uncore.
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ Ramoops oops/panic logger
|
|||||||
|
|
||||||
Sergiu Iordache <sergiu@chromium.org>
|
Sergiu Iordache <sergiu@chromium.org>
|
||||||
|
|
||||||
Updated: 17 November 2011
|
Updated: 10 Feb 2021
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
@ -30,6 +30,8 @@ mapping to pgprot_writecombine. Setting ``mem_type=1`` attempts to use
|
|||||||
depends on atomic operations. At least on ARM, pgprot_noncached causes the
|
depends on atomic operations. At least on ARM, pgprot_noncached causes the
|
||||||
memory to be mapped strongly ordered, and atomic operations on strongly ordered
|
memory to be mapped strongly ordered, and atomic operations on strongly ordered
|
||||||
memory are implementation defined, and won't work on many ARMs such as omaps.
|
memory are implementation defined, and won't work on many ARMs such as omaps.
|
||||||
|
Setting ``mem_type=2`` attempts to treat the memory region as normal memory,
|
||||||
|
which enables full cache on it. This can improve the performance.
|
||||||
|
|
||||||
The memory area is divided into ``record_size`` chunks (also rounded down to
|
The memory area is divided into ``record_size`` chunks (also rounded down to
|
||||||
power of two) and each kmesg dump writes a ``record_size`` chunk of
|
power of two) and each kmesg dump writes a ``record_size`` chunk of
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -483,10 +483,11 @@ modprobe
|
|||||||
========
|
========
|
||||||
|
|
||||||
The full path to the usermode helper for autoloading kernel modules,
|
The full path to the usermode helper for autoloading kernel modules,
|
||||||
by default "/sbin/modprobe". This binary is executed when the kernel
|
by default ``CONFIG_MODPROBE_PATH``, which in turn defaults to
|
||||||
requests a module. For example, if userspace passes an unknown
|
"/sbin/modprobe". This binary is executed when the kernel requests a
|
||||||
filesystem type to mount(), then the kernel will automatically request
|
module. For example, if userspace passes an unknown filesystem type
|
||||||
the corresponding filesystem module by executing this usermode helper.
|
to mount(), then the kernel will automatically request the
|
||||||
|
corresponding filesystem module by executing this usermode helper.
|
||||||
This usermode helper should insert the needed module into the kernel.
|
This usermode helper should insert the needed module into the kernel.
|
||||||
|
|
||||||
This sysctl only affects module autoloading. It has no effect on the
|
This sysctl only affects module autoloading. It has no effect on the
|
||||||
@ -1457,11 +1458,22 @@ unprivileged_bpf_disabled
|
|||||||
=========================
|
=========================
|
||||||
|
|
||||||
Writing 1 to this entry will disable unprivileged calls to ``bpf()``;
|
Writing 1 to this entry will disable unprivileged calls to ``bpf()``;
|
||||||
once disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` will return
|
once disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` or ``CAP_BPF``
|
||||||
``-EPERM``.
|
will return ``-EPERM``. Once set to 1, this can't be cleared from the
|
||||||
|
running kernel anymore.
|
||||||
|
|
||||||
Once set, this can't be cleared.
|
Writing 2 to this entry will also disable unprivileged calls to ``bpf()``,
|
||||||
|
however, an admin can still change this setting later on, if needed, by
|
||||||
|
writing 0 or 1 to this entry.
|
||||||
|
|
||||||
|
If ``BPF_UNPRIV_DEFAULT_OFF`` is enabled in the kernel config, then this
|
||||||
|
entry will default to 2 instead of 0.
|
||||||
|
|
||||||
|
= =============================================================
|
||||||
|
0 Unprivileged calls to ``bpf()`` are enabled
|
||||||
|
1 Unprivileged calls to ``bpf()`` are disabled without recovery
|
||||||
|
2 Unprivileged calls to ``bpf()`` are disabled
|
||||||
|
= =============================================================
|
||||||
|
|
||||||
watchdog
|
watchdog
|
||||||
========
|
========
|
||||||
|
@ -64,6 +64,7 @@ two flavors of JITs, the newer eBPF JIT currently supported on:
|
|||||||
- arm64
|
- arm64
|
||||||
- arm32
|
- arm32
|
||||||
- ppc64
|
- ppc64
|
||||||
|
- ppc32
|
||||||
- sparc64
|
- sparc64
|
||||||
- mips64
|
- mips64
|
||||||
- s390x
|
- s390x
|
||||||
@ -73,7 +74,6 @@ two flavors of JITs, the newer eBPF JIT currently supported on:
|
|||||||
And the older cBPF JIT supported on the following archs:
|
And the older cBPF JIT supported on the following archs:
|
||||||
|
|
||||||
- mips
|
- mips
|
||||||
- ppc
|
|
||||||
- sparc
|
- sparc
|
||||||
|
|
||||||
eBPF JITs are a superset of cBPF JITs, meaning the kernel will
|
eBPF JITs are a superset of cBPF JITs, meaning the kernel will
|
||||||
@ -311,6 +311,17 @@ permit to distribute the load on several cpus.
|
|||||||
If set to 1 (default), timestamps are sampled as soon as possible, before
|
If set to 1 (default), timestamps are sampled as soon as possible, before
|
||||||
queueing.
|
queueing.
|
||||||
|
|
||||||
|
netdev_unregister_timeout_secs
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
Unregister network device timeout in seconds.
|
||||||
|
This option controls the timeout (in seconds) used to issue a warning while
|
||||||
|
waiting for a network device refcount to drop to 0 during device
|
||||||
|
unregistration. A lower value may be useful during bisection to detect
|
||||||
|
a leaked reference faster. A larger value may be useful to prevent false
|
||||||
|
warnings on slow/loaded systems.
|
||||||
|
Default value is 10, minimum 1, maximum 3600.
|
||||||
|
|
||||||
optmem_max
|
optmem_max
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ Command Function
|
|||||||
``b`` Will immediately reboot the system without syncing or unmounting
|
``b`` Will immediately reboot the system without syncing or unmounting
|
||||||
your disks.
|
your disks.
|
||||||
|
|
||||||
``c`` Will perform a system crash by a NULL pointer dereference.
|
``c`` Will perform a system crash and a crashdump will be taken
|
||||||
A crashdump will be taken if configured.
|
if configured.
|
||||||
|
|
||||||
``d`` Shows all locks that are held.
|
``d`` Shows all locks that are held.
|
||||||
|
|
||||||
|
26
Documentation/arch.rst
Normal file
26
Documentation/arch.rst
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
CPU Architectures
|
||||||
|
=================
|
||||||
|
|
||||||
|
These books provide programming details about architecture-specific
|
||||||
|
implementation.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
arm/index
|
||||||
|
arm64/index
|
||||||
|
ia64/index
|
||||||
|
m68k/index
|
||||||
|
mips/index
|
||||||
|
nios2/index
|
||||||
|
openrisc/index
|
||||||
|
parisc/index
|
||||||
|
powerpc/index
|
||||||
|
riscv/index
|
||||||
|
s390/index
|
||||||
|
sh/index
|
||||||
|
sparc/index
|
||||||
|
x86/index
|
||||||
|
xtensa/index
|
@ -52,6 +52,7 @@ SoC-specific documents
|
|||||||
stm32/stm32f746-overview
|
stm32/stm32f746-overview
|
||||||
stm32/overview
|
stm32/overview
|
||||||
stm32/stm32h743-overview
|
stm32/stm32h743-overview
|
||||||
|
stm32/stm32h750-overview
|
||||||
stm32/stm32f769-overview
|
stm32/stm32f769-overview
|
||||||
stm32/stm32f429-overview
|
stm32/stm32f429-overview
|
||||||
stm32/stm32mp157-overview
|
stm32/stm32mp157-overview
|
||||||
|
@ -18,12 +18,12 @@ Orion family
|
|||||||
- 88F5181L
|
- 88F5181L
|
||||||
- 88F5182
|
- 88F5182
|
||||||
|
|
||||||
- Datasheet: http://www.embeddedarm.com/documentation/third-party/MV88F5182-datasheet.pdf
|
- Datasheet: https://web.archive.org/web/20210124231420/http://csclub.uwaterloo.ca/~board/ts7800/MV88F5182-datasheet.pdf
|
||||||
- Programmer's User Guide: http://www.embeddedarm.com/documentation/third-party/MV88F5182-opensource-manual.pdf
|
- Programmer's User Guide: https://web.archive.org/web/20210124231536/http://csclub.uwaterloo.ca/~board/ts7800/MV88F5182-opensource-manual.pdf
|
||||||
- User Manual: http://www.embeddedarm.com/documentation/third-party/MV88F5182-usermanual.pdf
|
- User Manual: https://web.archive.org/web/20210124231631/http://csclub.uwaterloo.ca/~board/ts7800/MV88F5182-usermanual.pdf
|
||||||
- 88F5281
|
- 88F5281
|
||||||
|
|
||||||
- Datasheet: http://www.ocmodshop.com/images/reviews/networking/qnap_ts409u/marvel_88f5281_data_sheet.pdf
|
- Datasheet: https://web.archive.org/web/20131028144728/http://www.ocmodshop.com/images/reviews/networking/qnap_ts409u/marvel_88f5281_data_sheet.pdf
|
||||||
- 88F6183
|
- 88F6183
|
||||||
Core:
|
Core:
|
||||||
Feroceon 88fr331 (88f51xx) or 88fr531-vd (88f52xx) ARMv5 compatible
|
Feroceon 88fr331 (88f51xx) or 88fr531-vd (88f52xx) ARMv5 compatible
|
||||||
@ -38,33 +38,33 @@ Kirkwood family
|
|||||||
Flavors:
|
Flavors:
|
||||||
- 88F6282 a.k.a Armada 300
|
- 88F6282 a.k.a Armada 300
|
||||||
|
|
||||||
- Product Brief : http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf
|
- Product Brief : https://web.archive.org/web/20111027032509/http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf
|
||||||
- 88F6283 a.k.a Armada 310
|
- 88F6283 a.k.a Armada 310
|
||||||
|
|
||||||
- Product Brief : http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf
|
- Product Brief : https://web.archive.org/web/20111027032509/http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf
|
||||||
- 88F6190
|
- 88F6190
|
||||||
|
|
||||||
- Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6190-003_WEB.pdf
|
- Product Brief : https://web.archive.org/web/20130730072715/http://www.marvell.com/embedded-processors/kirkwood/assets/88F6190-003_WEB.pdf
|
||||||
- Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf
|
- Hardware Spec : https://web.archive.org/web/20121021182835/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf
|
||||||
- Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
|
- Functional Spec: https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
|
||||||
- 88F6192
|
- 88F6192
|
||||||
|
|
||||||
- Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6192-003_ver1.pdf
|
- Product Brief : https://web.archive.org/web/20131113121446/http://www.marvell.com/embedded-processors/kirkwood/assets/88F6192-003_ver1.pdf
|
||||||
- Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf
|
- Hardware Spec : https://web.archive.org/web/20121021182835/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf
|
||||||
- Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
|
- Functional Spec: https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
|
||||||
- 88F6182
|
- 88F6182
|
||||||
- 88F6180
|
- 88F6180
|
||||||
|
|
||||||
- Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6180-003_ver1.pdf
|
- Product Brief : https://web.archive.org/web/20120616201621/http://www.marvell.com/embedded-processors/kirkwood/assets/88F6180-003_ver1.pdf
|
||||||
- Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6180_OpenSource.pdf
|
- Hardware Spec : https://web.archive.org/web/20130730091654/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6180_OpenSource.pdf
|
||||||
- Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
|
- Functional Spec: https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
|
||||||
- 88F6281
|
- 88F6281
|
||||||
|
|
||||||
- Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6281-004_ver1.pdf
|
- Product Brief : https://web.archive.org/web/20120131133709/http://www.marvell.com/embedded-processors/kirkwood/assets/88F6281-004_ver1.pdf
|
||||||
- Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
|
- Hardware Spec : https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
|
||||||
- Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
|
- Functional Spec: https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.marvell.com/embedded-processors/kirkwood/
|
https://web.archive.org/web/20160513194943/http://www.marvell.com/embedded-processors/kirkwood/
|
||||||
Core:
|
Core:
|
||||||
Feroceon 88fr131 ARMv5 compatible
|
Feroceon 88fr131 ARMv5 compatible
|
||||||
Linux kernel mach directory:
|
Linux kernel mach directory:
|
||||||
@ -78,14 +78,15 @@ Discovery family
|
|||||||
Flavors:
|
Flavors:
|
||||||
- MV78100
|
- MV78100
|
||||||
|
|
||||||
- Product Brief : http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78100-003_WEB.pdf
|
- Product Brief : https://web.archive.org/web/20120616194711/http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78100-003_WEB.pdf
|
||||||
- Hardware Spec : http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78100_OpenSource.pdf
|
- Hardware Spec : https://web.archive.org/web/20141005120451/http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78100_OpenSource.pdf
|
||||||
- Functional Spec: http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf
|
- Functional Spec: https://web.archive.org/web/20111110081125/http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf
|
||||||
- MV78200
|
- MV78200
|
||||||
|
|
||||||
- Product Brief : http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78200-002_WEB.pdf
|
- Product Brief : https://web.archive.org/web/20140801121623/http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78200-002_WEB.pdf
|
||||||
- Hardware Spec : http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78200_OpenSource.pdf
|
- Hardware Spec : https://web.archive.org/web/20141005120458/http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78200_OpenSource.pdf
|
||||||
- Functional Spec: http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf
|
- Functional Spec: https://web.archive.org/web/20111110081125/http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf
|
||||||
|
|
||||||
- MV76100
|
- MV76100
|
||||||
|
|
||||||
Not supported by the Linux kernel.
|
Not supported by the Linux kernel.
|
||||||
@ -106,9 +107,9 @@ EBU Armada family
|
|||||||
- 88F6707
|
- 88F6707
|
||||||
- 88F6W11
|
- 88F6W11
|
||||||
|
|
||||||
- Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
|
- Product Brief: https://web.archive.org/web/20121115063038/http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
|
||||||
- Hardware Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf
|
- Hardware Spec: https://web.archive.org/web/20140617183747/http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf
|
||||||
- Functional Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf
|
- Functional Spec: https://web.archive.org/web/20140617183701/http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf
|
||||||
|
|
||||||
Core:
|
Core:
|
||||||
Sheeva ARMv7 compatible PJ4B
|
Sheeva ARMv7 compatible PJ4B
|
||||||
@ -116,7 +117,7 @@ EBU Armada family
|
|||||||
Armada 375 Flavors:
|
Armada 375 Flavors:
|
||||||
- 88F6720
|
- 88F6720
|
||||||
|
|
||||||
- Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf
|
- Product Brief: https://web.archive.org/web/20131216023516/http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf
|
||||||
|
|
||||||
Core:
|
Core:
|
||||||
ARM Cortex-A9
|
ARM Cortex-A9
|
||||||
@ -126,8 +127,8 @@ EBU Armada family
|
|||||||
- 88F6820 Armada 385
|
- 88F6820 Armada 385
|
||||||
- 88F6828 Armada 388
|
- 88F6828 Armada 388
|
||||||
|
|
||||||
- Product infos: http://www.marvell.com/embedded-processors/armada-38x/
|
- Product infos: https://web.archive.org/web/20181006144616/http://www.marvell.com/embedded-processors/armada-38x/
|
||||||
- Functional Spec: http://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-embedded-processors-armada-38x-functional-specifications-2015-11.pdf
|
- Functional Spec: https://web.archive.org/web/20200420191927/https://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-embedded-processors-armada-38x-functional-specifications-2015-11.pdf
|
||||||
|
|
||||||
Core:
|
Core:
|
||||||
ARM Cortex-A9
|
ARM Cortex-A9
|
||||||
@ -136,7 +137,7 @@ EBU Armada family
|
|||||||
- 88F6920 Armada 390
|
- 88F6920 Armada 390
|
||||||
- 88F6928 Armada 398
|
- 88F6928 Armada 398
|
||||||
|
|
||||||
- Product infos: http://www.marvell.com/embedded-processors/armada-39x/
|
- Product infos: https://web.archive.org/web/20181020222559/http://www.marvell.com/embedded-processors/armada-39x/
|
||||||
|
|
||||||
Core:
|
Core:
|
||||||
ARM Cortex-A9
|
ARM Cortex-A9
|
||||||
@ -150,16 +151,16 @@ EBU Armada family
|
|||||||
not to be confused with the non-SMP 78xx0 SoCs
|
not to be confused with the non-SMP 78xx0 SoCs
|
||||||
|
|
||||||
Product Brief:
|
Product Brief:
|
||||||
http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
|
https://web.archive.org/web/20121021173528/http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
|
||||||
|
|
||||||
Functional Spec:
|
Functional Spec:
|
||||||
http://www.marvell.com/embedded-processors/armada-xp/assets/ARMADA-XP-Functional-SpecDatasheet.pdf
|
https://web.archive.org/web/20180829171131/http://www.marvell.com/embedded-processors/armada-xp/assets/ARMADA-XP-Functional-SpecDatasheet.pdf
|
||||||
|
|
||||||
- Hardware Specs:
|
- Hardware Specs:
|
||||||
|
|
||||||
- http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78230_OS.PDF
|
- https://web.archive.org/web/20141127013651/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78230_OS.PDF
|
||||||
- http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78260_OS.PDF
|
- https://web.archive.org/web/20141222000224/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78260_OS.PDF
|
||||||
- http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78460_OS.PDF
|
- https://web.archive.org/web/20141222000230/http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78460_OS.PDF
|
||||||
|
|
||||||
Core:
|
Core:
|
||||||
Sheeva ARMv7 compatible Dual-core or Quad-core PJ4B-MP
|
Sheeva ARMv7 compatible Dual-core or Quad-core PJ4B-MP
|
||||||
@ -180,13 +181,13 @@ EBU Armada family ARMv8
|
|||||||
ARM Cortex A53 (ARMv8)
|
ARM Cortex A53 (ARMv8)
|
||||||
|
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.marvell.com/embedded-processors/armada-3700/
|
https://web.archive.org/web/20181103003602/http://www.marvell.com/embedded-processors/armada-3700/
|
||||||
|
|
||||||
Product Brief:
|
Product Brief:
|
||||||
http://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-embedded-processors-armada-37xx-product-brief-2016-01.pdf
|
https://web.archive.org/web/20210121194810/https://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-embedded-processors-armada-37xx-product-brief-2016-01.pdf
|
||||||
|
|
||||||
Hardware Spec:
|
Hardware Spec:
|
||||||
http://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-embedded-processors-armada-37xx-hardware-specifications-2019-09.pdf
|
https://web.archive.org/web/20210202162011/http://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-embedded-processors-armada-37xx-hardware-specifications-2019-09.pdf
|
||||||
|
|
||||||
Device tree files:
|
Device tree files:
|
||||||
arch/arm64/boot/dts/marvell/armada-37*
|
arch/arm64/boot/dts/marvell/armada-37*
|
||||||
@ -198,11 +199,11 @@ EBU Armada family ARMv8
|
|||||||
Core: ARM Cortex A72
|
Core: ARM Cortex A72
|
||||||
|
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.marvell.com/embedded-processors/armada-70xx/
|
https://web.archive.org/web/20181020222606/http://www.marvell.com/embedded-processors/armada-70xx/
|
||||||
|
|
||||||
Product Brief:
|
Product Brief:
|
||||||
- http://www.marvell.com/embedded-processors/assets/Armada7020PB-Jan2016.pdf
|
- https://web.archive.org/web/20161010105541/http://www.marvell.com/embedded-processors/assets/Armada7020PB-Jan2016.pdf
|
||||||
- http://www.marvell.com/embedded-processors/assets/Armada7040PB-Jan2016.pdf
|
- https://web.archive.org/web/20160928154533/http://www.marvell.com/embedded-processors/assets/Armada7040PB-Jan2016.pdf
|
||||||
|
|
||||||
Device tree files:
|
Device tree files:
|
||||||
arch/arm64/boot/dts/marvell/armada-70*
|
arch/arm64/boot/dts/marvell/armada-70*
|
||||||
@ -214,11 +215,11 @@ EBU Armada family ARMv8
|
|||||||
ARM Cortex A72
|
ARM Cortex A72
|
||||||
|
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.marvell.com/embedded-processors/armada-80xx/
|
https://web.archive.org/web/20181022004830/http://www.marvell.com/embedded-processors/armada-80xx/
|
||||||
|
|
||||||
Product Brief:
|
Product Brief:
|
||||||
- http://www.marvell.com/embedded-processors/assets/Armada8020PB-Jan2016.pdf
|
- https://web.archive.org/web/20210124233728/https://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-embedded-processors-armada-8020-product-brief-2017-12.pdf
|
||||||
- http://www.marvell.com/embedded-processors/assets/Armada8040PB-Jan2016.pdf
|
- https://web.archive.org/web/20161010105532/http://www.marvell.com/embedded-processors/assets/Armada8040PB-Jan2016.pdf
|
||||||
|
|
||||||
Device tree files:
|
Device tree files:
|
||||||
arch/arm64/boot/dts/marvell/armada-80*
|
arch/arm64/boot/dts/marvell/armada-80*
|
||||||
@ -233,10 +234,10 @@ Avanta family
|
|||||||
- 88F6560
|
- 88F6560
|
||||||
|
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.marvell.com/broadband/
|
https://web.archive.org/web/20181005145041/http://www.marvell.com/broadband/
|
||||||
|
|
||||||
Product Brief:
|
Product Brief:
|
||||||
http://www.marvell.com/broadband/assets/Marvell_Avanta_88F6510_305_060-001_product_brief.pdf
|
https://web.archive.org/web/20180829171057/http://www.marvell.com/broadband/assets/Marvell_Avanta_88F6510_305_060-001_product_brief.pdf
|
||||||
|
|
||||||
No public datasheet available.
|
No public datasheet available.
|
||||||
|
|
||||||
@ -255,7 +256,7 @@ Storage family
|
|||||||
- 88RC1580
|
- 88RC1580
|
||||||
|
|
||||||
Product infos:
|
Product infos:
|
||||||
http://www.marvell.com/storage/armada-sp/
|
https://web.archive.org/web/20191129073953/http://www.marvell.com/storage/armada-sp/
|
||||||
|
|
||||||
Core:
|
Core:
|
||||||
Sheeva ARMv7 comatible Quad-core PJ4C
|
Sheeva ARMv7 comatible Quad-core PJ4C
|
||||||
@ -269,16 +270,16 @@ Dove family (application processor)
|
|||||||
- 88AP510 a.k.a Armada 510
|
- 88AP510 a.k.a Armada 510
|
||||||
|
|
||||||
Product Brief:
|
Product Brief:
|
||||||
http://www.marvell.com/application-processors/armada-500/assets/Marvell_Armada510_SoC.pdf
|
https://web.archive.org/web/20111102020643/http://www.marvell.com/application-processors/armada-500/assets/Marvell_Armada510_SoC.pdf
|
||||||
|
|
||||||
Hardware Spec:
|
Hardware Spec:
|
||||||
http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Hardware-Spec.pdf
|
https://web.archive.org/web/20160428160231/http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Hardware-Spec.pdf
|
||||||
|
|
||||||
Functional Spec:
|
Functional Spec:
|
||||||
http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Functional-Spec.pdf
|
https://web.archive.org/web/20120130172443/http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Functional-Spec.pdf
|
||||||
|
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.marvell.com/application-processors/armada-500/
|
https://web.archive.org/web/20160822232651/http://www.marvell.com/application-processors/armada-500/
|
||||||
|
|
||||||
Core:
|
Core:
|
||||||
ARMv7 compatible
|
ARMv7 compatible
|
||||||
@ -295,22 +296,22 @@ PXA 2xx/3xx/93x/95x family
|
|||||||
- Application processor only
|
- Application processor only
|
||||||
- Core: ARMv5 XScale1 core
|
- Core: ARMv5 XScale1 core
|
||||||
- PXA270, PXA271, PXA272
|
- PXA270, PXA271, PXA272
|
||||||
- Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_pb.pdf
|
- Product Brief : https://web.archive.org/web/20150927135510/http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_pb.pdf
|
||||||
- Design guide : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_design_guide.pdf
|
- Design guide : https://web.archive.org/web/20120111181937/http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_design_guide.pdf
|
||||||
- Developers manual : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_dev_man.pdf
|
- Developers manual : https://web.archive.org/web/20150927164805/http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_dev_man.pdf
|
||||||
- Specification : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_emts.pdf
|
- Specification : https://web.archive.org/web/20140211221535/http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_emts.pdf
|
||||||
- Specification update : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf
|
- Specification update : https://web.archive.org/web/20120111104906/http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf
|
||||||
- Application processor only
|
- Application processor only
|
||||||
- Core: ARMv5 XScale2 core
|
- Core: ARMv5 XScale2 core
|
||||||
- PXA300, PXA310, PXA320
|
- PXA300, PXA310, PXA320
|
||||||
- PXA 300 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA300_PB_R4.pdf
|
- PXA 300 Product Brief : https://web.archive.org/web/20120111121203/http://www.marvell.com/application-processors/pxa-family/assets/PXA300_PB_R4.pdf
|
||||||
- PXA 310 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA310_PB_R4.pdf
|
- PXA 310 Product Brief : https://web.archive.org/web/20120111104515/http://www.marvell.com/application-processors/pxa-family/assets/PXA310_PB_R4.pdf
|
||||||
- PXA 320 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA320_PB_R4.pdf
|
- PXA 320 Product Brief : https://web.archive.org/web/20121021182826/http://www.marvell.com/application-processors/pxa-family/assets/PXA320_PB_R4.pdf
|
||||||
- Design guide : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Design_Guide.pdf
|
- Design guide : https://web.archive.org/web/20130727144625/http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Design_Guide.pdf
|
||||||
- Developers manual : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Developers_Manual.zip
|
- Developers manual : https://web.archive.org/web/20130727144605/http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Developers_Manual.zip
|
||||||
- Specifications : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_EMTS.pdf
|
- Specifications : https://web.archive.org/web/20130727144559/http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_EMTS.pdf
|
||||||
- Specification Update : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Spec_Update.zip
|
- Specification Update : https://web.archive.org/web/20150927183411/http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Spec_Update.zip
|
||||||
- Reference Manual : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_TavorP_BootROM_Ref_Manual.pdf
|
- Reference Manual : https://web.archive.org/web/20120111103844/http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_TavorP_BootROM_Ref_Manual.pdf
|
||||||
- Application processor only
|
- Application processor only
|
||||||
- Core: ARMv5 XScale3 core
|
- Core: ARMv5 XScale3 core
|
||||||
- PXA930, PXA935
|
- PXA930, PXA935
|
||||||
@ -341,26 +342,26 @@ MMP/MMP2/MMP3 family (communication processor)
|
|||||||
|
|
||||||
Flavors:
|
Flavors:
|
||||||
- PXA168, a.k.a Armada 168
|
- PXA168, a.k.a Armada 168
|
||||||
- Homepage : http://www.marvell.com/application-processors/armada-100/armada-168.jsp
|
- Homepage : https://web.archive.org/web/20110926014256/http://www.marvell.com/application-processors/armada-100/armada-168.jsp
|
||||||
- Product brief : http://www.marvell.com/application-processors/armada-100/assets/pxa_168_pb.pdf
|
- Product brief : https://web.archive.org/web/20111102030100/http://www.marvell.com/application-processors/armada-100/assets/pxa_168_pb.pdf
|
||||||
- Hardware manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_datasheet.pdf
|
- Hardware manual : https://web.archive.org/web/20160428165359/http://www.marvell.com/application-processors/armada-100/assets/armada_16x_datasheet.pdf
|
||||||
- Software manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_software_manual.pdf
|
- Software manual : https://web.archive.org/web/20160428154454/http://www.marvell.com/application-processors/armada-100/assets/armada_16x_software_manual.pdf
|
||||||
- Specification update : http://www.marvell.com/application-processors/armada-100/assets/ARMADA16x_Spec_update.pdf
|
- Specification update : https://web.archive.org/web/20150927160338/http://www.marvell.com/application-processors/armada-100/assets/ARMADA16x_Spec_update.pdf
|
||||||
- Boot ROM manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_ref_manual.pdf
|
- Boot ROM manual : https://web.archive.org/web/20130727205559/http://www.marvell.com/application-processors/armada-100/assets/armada_16x_ref_manual.pdf
|
||||||
- App node package : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_app_note_package.pdf
|
- App node package : https://web.archive.org/web/20141005090706/http://www.marvell.com/application-processors/armada-100/assets/armada_16x_app_note_package.pdf
|
||||||
- Application processor only
|
- Application processor only
|
||||||
- Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk)
|
- Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk)
|
||||||
- PXA910/PXA920
|
- PXA910/PXA920
|
||||||
- Homepage : http://www.marvell.com/communication-processors/pxa910/
|
- Homepage : https://web.archive.org/web/20150928121236/http://www.marvell.com/communication-processors/pxa910/
|
||||||
- Product Brief : http://www.marvell.com/communication-processors/pxa910/assets/Marvell_PXA910_Platform-001_PB_final.pdf
|
- Product Brief : https://archive.org/download/marvell-pxa910-pb/Marvell_PXA910_Platform-001_PB.pdf
|
||||||
- Application processor with Communication processor
|
- Application processor with Communication processor
|
||||||
- Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk)
|
- Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk)
|
||||||
- PXA688, a.k.a. MMP2, a.k.a Armada 610
|
- PXA688, a.k.a. MMP2, a.k.a Armada 610 (OLPC XO-1.75)
|
||||||
- Product Brief : http://www.marvell.com/application-processors/armada-600/assets/armada610_pb.pdf
|
- Product Brief : https://web.archive.org/web/20111102023255/http://www.marvell.com/application-processors/armada-600/assets/armada610_pb.pdf
|
||||||
- Application processor only
|
- Application processor only
|
||||||
- Core: ARMv7 compatible Sheeva PJ4 88sv581x core
|
- Core: ARMv7 compatible Sheeva PJ4 88sv581x core
|
||||||
- PXA2128, a.k.a. MMP3 (OLPC XO4, Linux support not upstream)
|
- PXA2128, a.k.a. MMP3, a.k.a Armada 620 (OLPC XO-4)
|
||||||
- Product Brief : http://www.marvell.com/application-processors/armada/pxa2128/assets/Marvell-ARMADA-PXA2128-SoC-PB.pdf
|
- Product Brief : https://web.archive.org/web/20120824055155/http://www.marvell.com/application-processors/armada/pxa2128/assets/Marvell-ARMADA-PXA2128-SoC-PB.pdf
|
||||||
- Application processor only
|
- Application processor only
|
||||||
- Core: Dual-core ARMv7 compatible Sheeva PJ4C core
|
- Core: Dual-core ARMv7 compatible Sheeva PJ4C core
|
||||||
- PXA960/PXA968/PXA978 (Linux support not upstream)
|
- PXA960/PXA968/PXA978 (Linux support not upstream)
|
||||||
|
34
Documentation/arm/stm32/stm32h750-overview.rst
Normal file
34
Documentation/arm/stm32/stm32h750-overview.rst
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
==================
|
||||||
|
STM32H750 Overview
|
||||||
|
==================
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
------------
|
||||||
|
|
||||||
|
The STM32H750 is a Cortex-M7 MCU aimed at various applications.
|
||||||
|
It features:
|
||||||
|
|
||||||
|
- Cortex-M7 core running up to @480MHz
|
||||||
|
- 128K internal flash, 1MBytes internal RAM
|
||||||
|
- FMC controller to connect SDRAM, NOR and NAND memories
|
||||||
|
- Dual mode QSPI
|
||||||
|
- SD/MMC/SDIO support
|
||||||
|
- Ethernet controller
|
||||||
|
- USB OTFG FS & HS controllers
|
||||||
|
- I2C, SPI, CAN busses support
|
||||||
|
- Several 16 & 32 bits general purpose timers
|
||||||
|
- Serial Audio interface
|
||||||
|
- LCD controller
|
||||||
|
- HDMI-CEC
|
||||||
|
- SPDIFRX
|
||||||
|
- DFSDM
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
Datasheet and reference manual are publicly available on ST website (STM32H750_).
|
||||||
|
|
||||||
|
.. _STM32H750: https://www.st.com/en/microcontrollers-microprocessors/stm32h750-value-line.html
|
||||||
|
|
||||||
|
:Authors: Dillon Min <dillon.minfei@gmail.com>
|
||||||
|
|
@ -64,4 +64,11 @@ linux,uefi-mmap-desc-size 32-bit Size in bytes of each entry in the UEFI
|
|||||||
memory map.
|
memory map.
|
||||||
|
|
||||||
linux,uefi-mmap-desc-ver 32-bit Version of the mmap descriptor format.
|
linux,uefi-mmap-desc-ver 32-bit Version of the mmap descriptor format.
|
||||||
|
|
||||||
|
linux,initrd-start 64-bit Physical start address of an initrd
|
||||||
|
|
||||||
|
linux,initrd-end 64-bit Physical end address of an initrd
|
||||||
|
|
||||||
|
kaslr-seed 64-bit Entropy used to randomize the kernel image
|
||||||
|
base address location.
|
||||||
========================== ====== ===========================================
|
========================== ====== ===========================================
|
||||||
|
@ -202,9 +202,10 @@ Before jumping into the kernel, the following conditions must be met:
|
|||||||
|
|
||||||
- System registers
|
- System registers
|
||||||
|
|
||||||
All writable architected system registers at the exception level where
|
All writable architected system registers at or below the exception
|
||||||
the kernel image will be entered must be initialised by software at a
|
level where the kernel image will be entered must be initialised by
|
||||||
higher exception level to prevent execution in an UNKNOWN state.
|
software at a higher exception level to prevent execution in an UNKNOWN
|
||||||
|
state.
|
||||||
|
|
||||||
- SCR_EL3.FIQ must have the same value across all CPUs the kernel is
|
- SCR_EL3.FIQ must have the same value across all CPUs the kernel is
|
||||||
executing on.
|
executing on.
|
||||||
@ -270,9 +271,46 @@ Before jumping into the kernel, the following conditions must be met:
|
|||||||
having 0b1 set for the corresponding bit for each of the auxiliary
|
having 0b1 set for the corresponding bit for each of the auxiliary
|
||||||
counters present.
|
counters present.
|
||||||
|
|
||||||
|
For CPUs with the Fine Grained Traps (FEAT_FGT) extension present:
|
||||||
|
|
||||||
|
- If EL3 is present and the kernel is entered at EL2:
|
||||||
|
|
||||||
|
- SCR_EL3.FGTEn (bit 27) must be initialised to 0b1.
|
||||||
|
|
||||||
|
For CPUs with Advanced SIMD and floating point support:
|
||||||
|
|
||||||
|
- If EL3 is present:
|
||||||
|
|
||||||
|
- CPTR_EL3.TFP (bit 10) must be initialised to 0b0.
|
||||||
|
|
||||||
|
- If EL2 is present and the kernel is entered at EL1:
|
||||||
|
|
||||||
|
- CPTR_EL2.TFP (bit 10) must be initialised to 0b0.
|
||||||
|
|
||||||
|
For CPUs with the Scalable Vector Extension (FEAT_SVE) present:
|
||||||
|
|
||||||
|
- if EL3 is present:
|
||||||
|
|
||||||
|
- CPTR_EL3.EZ (bit 8) must be initialised to 0b1.
|
||||||
|
|
||||||
|
- ZCR_EL3.LEN must be initialised to the same value for all CPUs the
|
||||||
|
kernel is executed on.
|
||||||
|
|
||||||
|
- If the kernel is entered at EL1 and EL2 is present:
|
||||||
|
|
||||||
|
- CPTR_EL2.TZ (bit 8) must be initialised to 0b0.
|
||||||
|
|
||||||
|
- CPTR_EL2.ZEN (bits 17:16) must be initialised to 0b11.
|
||||||
|
|
||||||
|
- ZCR_EL2.LEN must be initialised to the same value for all CPUs the
|
||||||
|
kernel will execute on.
|
||||||
|
|
||||||
The requirements described above for CPU mode, caches, MMUs, architected
|
The requirements described above for CPU mode, caches, MMUs, architected
|
||||||
timers, coherency and system registers apply to all CPUs. All CPUs must
|
timers, coherency and system registers apply to all CPUs. All CPUs must
|
||||||
enter the kernel in the same exception level.
|
enter the kernel in the same exception level. Where the values documented
|
||||||
|
disable traps it is permissible for these traps to be enabled so long as
|
||||||
|
those traps are handled transparently by higher exception levels as though
|
||||||
|
the values documented were set.
|
||||||
|
|
||||||
The boot loader is expected to enter the kernel on each CPU in the
|
The boot loader is expected to enter the kernel on each CPU in the
|
||||||
following manner:
|
following manner:
|
||||||
|
@ -74,7 +74,7 @@ HWCAP_ASIMD
|
|||||||
|
|
||||||
HWCAP_EVTSTRM
|
HWCAP_EVTSTRM
|
||||||
The generic timer is configured to generate events at a frequency of
|
The generic timer is configured to generate events at a frequency of
|
||||||
approximately 100KHz.
|
approximately 10KHz.
|
||||||
|
|
||||||
HWCAP_AES
|
HWCAP_AES
|
||||||
Functionality implied by ID_AA64ISAR0_EL1.AES == 0b0001.
|
Functionality implied by ID_AA64ISAR0_EL1.AES == 0b0001.
|
||||||
|
@ -107,3 +107,37 @@ filter out the Pointer Authentication system key registers from
|
|||||||
KVM_GET/SET_REG_* ioctls and mask those features from cpufeature ID
|
KVM_GET/SET_REG_* ioctls and mask those features from cpufeature ID
|
||||||
register. Any attempt to use the Pointer Authentication instructions will
|
register. Any attempt to use the Pointer Authentication instructions will
|
||||||
result in an UNDEFINED exception being injected into the guest.
|
result in an UNDEFINED exception being injected into the guest.
|
||||||
|
|
||||||
|
|
||||||
|
Enabling and disabling keys
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
The prctl PR_PAC_SET_ENABLED_KEYS allows the user program to control which
|
||||||
|
PAC keys are enabled in a particular task. It takes two arguments, the
|
||||||
|
first being a bitmask of PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY
|
||||||
|
and PR_PAC_APDBKEY specifying which keys shall be affected by this prctl,
|
||||||
|
and the second being a bitmask of the same bits specifying whether the key
|
||||||
|
should be enabled or disabled. For example::
|
||||||
|
|
||||||
|
prctl(PR_PAC_SET_ENABLED_KEYS,
|
||||||
|
PR_PAC_APIAKEY | PR_PAC_APIBKEY | PR_PAC_APDAKEY | PR_PAC_APDBKEY,
|
||||||
|
PR_PAC_APIBKEY, 0, 0);
|
||||||
|
|
||||||
|
disables all keys except the IB key.
|
||||||
|
|
||||||
|
The main reason why this is useful is to enable a userspace ABI that uses PAC
|
||||||
|
instructions to sign and authenticate function pointers and other pointers
|
||||||
|
exposed outside of the function, while still allowing binaries conforming to
|
||||||
|
the ABI to interoperate with legacy binaries that do not sign or authenticate
|
||||||
|
pointers.
|
||||||
|
|
||||||
|
The idea is that a dynamic loader or early startup code would issue this
|
||||||
|
prctl very early after establishing that a process may load legacy binaries,
|
||||||
|
but before executing any PAC instructions.
|
||||||
|
|
||||||
|
For compatibility with previous kernel versions, processes start up with IA,
|
||||||
|
IB, DA and DB enabled, and are reset to this state on exec(). Processes created
|
||||||
|
via fork() and clone() inherit the key enabled state from the calling process.
|
||||||
|
|
||||||
|
It is recommended to avoid disabling the IA key, as this has higher performance
|
||||||
|
overhead than disabling any of the other keys.
|
||||||
|
@ -40,7 +40,7 @@ space obtained in one of the following ways:
|
|||||||
during creation and with the same restrictions as for ``mmap()`` above
|
during creation and with the same restrictions as for ``mmap()`` above
|
||||||
(e.g. data, bss, stack).
|
(e.g. data, bss, stack).
|
||||||
|
|
||||||
The AArch64 Tagged Address ABI has two stages of relaxation depending
|
The AArch64 Tagged Address ABI has two stages of relaxation depending on
|
||||||
how the user addresses are used by the kernel:
|
how the user addresses are used by the kernel:
|
||||||
|
|
||||||
1. User addresses not accessed by the kernel but used for address space
|
1. User addresses not accessed by the kernel but used for address space
|
||||||
@ -113,6 +113,12 @@ ABI relaxation:
|
|||||||
|
|
||||||
- ``shmat()`` and ``shmdt()``.
|
- ``shmat()`` and ``shmdt()``.
|
||||||
|
|
||||||
|
- ``brk()`` (since kernel v5.6).
|
||||||
|
|
||||||
|
- ``mmap()`` (since kernel v5.6).
|
||||||
|
|
||||||
|
- ``mremap()``, the ``new_address`` argument (since kernel v5.6).
|
||||||
|
|
||||||
Any attempt to use non-zero tagged pointers may result in an error code
|
Any attempt to use non-zero tagged pointers may result in an error code
|
||||||
being returned, a (fatal) signal being raised, or other modes of
|
being returned, a (fatal) signal being raised, or other modes of
|
||||||
failure.
|
failure.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
==============
|
==============
|
||||||
Data Integrity
|
Data Integrity
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
@ -258,3 +258,18 @@ Q: Can BPF functionality such as new program or map types, new
|
|||||||
helpers, etc be added out of kernel module code?
|
helpers, etc be added out of kernel module code?
|
||||||
|
|
||||||
A: NO.
|
A: NO.
|
||||||
|
|
||||||
|
Q: Directly calling kernel function is an ABI?
|
||||||
|
----------------------------------------------
|
||||||
|
Q: Some kernel functions (e.g. tcp_slow_start) can be called
|
||||||
|
by BPF programs. Do these kernel functions become an ABI?
|
||||||
|
|
||||||
|
A: NO.
|
||||||
|
|
||||||
|
The kernel function protos will change and the bpf programs will be
|
||||||
|
rejected by the verifier. Also, for example, some of the bpf-callable
|
||||||
|
kernel functions have already been used by other kernel tcp
|
||||||
|
cc (congestion-control) implementations. If any of these kernel
|
||||||
|
functions has changed, both the in-tree and out-of-tree kernel tcp cc
|
||||||
|
implementations have to be changed. The same goes for the bpf
|
||||||
|
programs and they have to be adjusted accordingly.
|
||||||
|
@ -29,7 +29,7 @@ list:
|
|||||||
This may also include issues related to XDP, BPF tracing, etc.
|
This may also include issues related to XDP, BPF tracing, etc.
|
||||||
|
|
||||||
Given netdev has a high volume of traffic, please also add the BPF
|
Given netdev has a high volume of traffic, please also add the BPF
|
||||||
maintainers to Cc (from kernel MAINTAINERS_ file):
|
maintainers to Cc (from kernel ``MAINTAINERS`` file):
|
||||||
|
|
||||||
* Alexei Starovoitov <ast@kernel.org>
|
* Alexei Starovoitov <ast@kernel.org>
|
||||||
* Daniel Borkmann <daniel@iogearbox.net>
|
* Daniel Borkmann <daniel@iogearbox.net>
|
||||||
@ -234,11 +234,11 @@ be subject to change.
|
|||||||
|
|
||||||
Q: samples/bpf preference vs selftests?
|
Q: samples/bpf preference vs selftests?
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
Q: When should I add code to `samples/bpf/`_ and when to BPF kernel
|
Q: When should I add code to ``samples/bpf/`` and when to BPF kernel
|
||||||
selftests_ ?
|
selftests_?
|
||||||
|
|
||||||
A: In general, we prefer additions to BPF kernel selftests_ rather than
|
A: In general, we prefer additions to BPF kernel selftests_ rather than
|
||||||
`samples/bpf/`_. The rationale is very simple: kernel selftests are
|
``samples/bpf/``. The rationale is very simple: kernel selftests are
|
||||||
regularly run by various bots to test for kernel regressions.
|
regularly run by various bots to test for kernel regressions.
|
||||||
|
|
||||||
The more test cases we add to BPF selftests, the better the coverage
|
The more test cases we add to BPF selftests, the better the coverage
|
||||||
@ -246,9 +246,9 @@ and the less likely it is that those could accidentally break. It is
|
|||||||
not that BPF kernel selftests cannot demo how a specific feature can
|
not that BPF kernel selftests cannot demo how a specific feature can
|
||||||
be used.
|
be used.
|
||||||
|
|
||||||
That said, `samples/bpf/`_ may be a good place for people to get started,
|
That said, ``samples/bpf/`` may be a good place for people to get started,
|
||||||
so it might be advisable that simple demos of features could go into
|
so it might be advisable that simple demos of features could go into
|
||||||
`samples/bpf/`_, but advanced functional and corner-case testing rather
|
``samples/bpf/``, but advanced functional and corner-case testing rather
|
||||||
into kernel selftests.
|
into kernel selftests.
|
||||||
|
|
||||||
If your sample looks like a test case, then go for BPF kernel selftests
|
If your sample looks like a test case, then go for BPF kernel selftests
|
||||||
@ -449,6 +449,19 @@ from source at
|
|||||||
|
|
||||||
https://github.com/acmel/dwarves
|
https://github.com/acmel/dwarves
|
||||||
|
|
||||||
|
pahole starts to use libbpf definitions and APIs since v1.13 after the
|
||||||
|
commit 21507cd3e97b ("pahole: add libbpf as submodule under lib/bpf").
|
||||||
|
It works well with the git repository because the libbpf submodule will
|
||||||
|
use "git submodule update --init --recursive" to update.
|
||||||
|
|
||||||
|
Unfortunately, the default github release source code does not contain
|
||||||
|
libbpf submodule source code and this will cause build issues, the tarball
|
||||||
|
from https://git.kernel.org/pub/scm/devel/pahole/pahole.git/ is same with
|
||||||
|
github, you can get the source tarball with corresponding libbpf submodule
|
||||||
|
codes from
|
||||||
|
|
||||||
|
https://fedorapeople.org/~acme/dwarves
|
||||||
|
|
||||||
Some distros have pahole version 1.16 packaged already, e.g.
|
Some distros have pahole version 1.16 packaged already, e.g.
|
||||||
Fedora, Gentoo.
|
Fedora, Gentoo.
|
||||||
|
|
||||||
@ -645,10 +658,9 @@ when:
|
|||||||
|
|
||||||
.. Links
|
.. Links
|
||||||
.. _Documentation/process/: https://www.kernel.org/doc/html/latest/process/
|
.. _Documentation/process/: https://www.kernel.org/doc/html/latest/process/
|
||||||
.. _MAINTAINERS: ../../MAINTAINERS
|
|
||||||
.. _netdev-FAQ: ../networking/netdev-FAQ.rst
|
.. _netdev-FAQ: ../networking/netdev-FAQ.rst
|
||||||
.. _samples/bpf/: ../../samples/bpf/
|
.. _selftests:
|
||||||
.. _selftests: ../../tools/testing/selftests/bpf/
|
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/bpf/
|
||||||
.. _Documentation/dev-tools/kselftest.rst:
|
.. _Documentation/dev-tools/kselftest.rst:
|
||||||
https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html
|
https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html
|
||||||
.. _Documentation/bpf/btf.rst: btf.rst
|
.. _Documentation/bpf/btf.rst: btf.rst
|
||||||
|
@ -84,6 +84,7 @@ sequentially and type id is assigned to each recognized type starting from id
|
|||||||
#define BTF_KIND_FUNC_PROTO 13 /* Function Proto */
|
#define BTF_KIND_FUNC_PROTO 13 /* Function Proto */
|
||||||
#define BTF_KIND_VAR 14 /* Variable */
|
#define BTF_KIND_VAR 14 /* Variable */
|
||||||
#define BTF_KIND_DATASEC 15 /* Section */
|
#define BTF_KIND_DATASEC 15 /* Section */
|
||||||
|
#define BTF_KIND_FLOAT 16 /* Floating point */
|
||||||
|
|
||||||
Note that the type section encodes debug info, not just pure types.
|
Note that the type section encodes debug info, not just pure types.
|
||||||
``BTF_KIND_FUNC`` is not a type, and it represents a defined subprogram.
|
``BTF_KIND_FUNC`` is not a type, and it represents a defined subprogram.
|
||||||
@ -95,8 +96,8 @@ Each type contains the following common data::
|
|||||||
/* "info" bits arrangement
|
/* "info" bits arrangement
|
||||||
* bits 0-15: vlen (e.g. # of struct's members)
|
* bits 0-15: vlen (e.g. # of struct's members)
|
||||||
* bits 16-23: unused
|
* bits 16-23: unused
|
||||||
* bits 24-27: kind (e.g. int, ptr, array...etc)
|
* bits 24-28: kind (e.g. int, ptr, array...etc)
|
||||||
* bits 28-30: unused
|
* bits 29-30: unused
|
||||||
* bit 31: kind_flag, currently used by
|
* bit 31: kind_flag, currently used by
|
||||||
* struct, union and fwd
|
* struct, union and fwd
|
||||||
*/
|
*/
|
||||||
@ -452,6 +453,18 @@ map definition.
|
|||||||
* ``offset``: the in-section offset of the variable
|
* ``offset``: the in-section offset of the variable
|
||||||
* ``size``: the size of the variable in bytes
|
* ``size``: the size of the variable in bytes
|
||||||
|
|
||||||
|
2.2.16 BTF_KIND_FLOAT
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
``struct btf_type`` encoding requirement:
|
||||||
|
* ``name_off``: any valid offset
|
||||||
|
* ``info.kind_flag``: 0
|
||||||
|
* ``info.kind``: BTF_KIND_FLOAT
|
||||||
|
* ``info.vlen``: 0
|
||||||
|
* ``size``: the size of the float type in bytes: 2, 4, 8, 12 or 16.
|
||||||
|
|
||||||
|
No additional type data follow ``btf_type``.
|
||||||
|
|
||||||
3. BTF Kernel API
|
3. BTF Kernel API
|
||||||
*****************
|
*****************
|
||||||
|
|
||||||
|
@ -12,9 +12,6 @@ BPF instruction-set.
|
|||||||
The Cilium project also maintains a `BPF and XDP Reference Guide`_
|
The Cilium project also maintains a `BPF and XDP Reference Guide`_
|
||||||
that goes into great technical depth about the BPF Architecture.
|
that goes into great technical depth about the BPF Architecture.
|
||||||
|
|
||||||
The primary info for the bpf syscall is available in the `man-pages`_
|
|
||||||
for `bpf(2)`_.
|
|
||||||
|
|
||||||
BPF Type Format (BTF)
|
BPF Type Format (BTF)
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
@ -35,6 +32,12 @@ Two sets of Questions and Answers (Q&A) are maintained.
|
|||||||
bpf_design_QA
|
bpf_design_QA
|
||||||
bpf_devel_QA
|
bpf_devel_QA
|
||||||
|
|
||||||
|
Syscall API
|
||||||
|
===========
|
||||||
|
|
||||||
|
The primary info for the bpf syscall is available in the `man-pages`_
|
||||||
|
for `bpf(2)`_. For more information about the userspace API, see
|
||||||
|
Documentation/userspace-api/ebpf/index.rst.
|
||||||
|
|
||||||
Helper functions
|
Helper functions
|
||||||
================
|
================
|
||||||
|
@ -146,18 +146,18 @@ with the kernel as a block device by registering the following general
|
|||||||
*struct file_operations*::
|
*struct file_operations*::
|
||||||
|
|
||||||
struct file_operations cdrom_fops = {
|
struct file_operations cdrom_fops = {
|
||||||
NULL, /∗ lseek ∗/
|
NULL, /* lseek */
|
||||||
block _read , /∗ read—general block-dev read ∗/
|
block _read , /* read--general block-dev read */
|
||||||
block _write, /∗ write—general block-dev write ∗/
|
block _write, /* write--general block-dev write */
|
||||||
NULL, /∗ readdir ∗/
|
NULL, /* readdir */
|
||||||
NULL, /∗ select ∗/
|
NULL, /* select */
|
||||||
cdrom_ioctl, /∗ ioctl ∗/
|
cdrom_ioctl, /* ioctl */
|
||||||
NULL, /∗ mmap ∗/
|
NULL, /* mmap */
|
||||||
cdrom_open, /∗ open ∗/
|
cdrom_open, /* open */
|
||||||
cdrom_release, /∗ release ∗/
|
cdrom_release, /* release */
|
||||||
NULL, /∗ fsync ∗/
|
NULL, /* fsync */
|
||||||
NULL, /∗ fasync ∗/
|
NULL, /* fasync */
|
||||||
NULL /∗ revalidate ∗/
|
NULL /* revalidate */
|
||||||
};
|
};
|
||||||
|
|
||||||
Every active CD-ROM device shares this *struct*. The routines
|
Every active CD-ROM device shares this *struct*. The routines
|
||||||
@ -569,7 +569,7 @@ the *CDC_CLOSE_TRAY* bit in *mask*.
|
|||||||
|
|
||||||
In the file `cdrom.c` you will encounter many constructions of the type::
|
In the file `cdrom.c` you will encounter many constructions of the type::
|
||||||
|
|
||||||
if (cdo->capability & ∼cdi->mask & CDC _⟨capability⟩) ...
|
if (cdo->capability & ~cdi->mask & CDC _<capability>) ...
|
||||||
|
|
||||||
There is no *ioctl* to set the mask... The reason is that
|
There is no *ioctl* to set the mask... The reason is that
|
||||||
I think it is better to control the **behavior** rather than the
|
I think it is better to control the **behavior** rather than the
|
||||||
|
@ -331,27 +331,34 @@ htmlhelp_basename = 'TheLinuxKerneldoc'
|
|||||||
# -- Options for LaTeX output ---------------------------------------------
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
latex_elements = {
|
latex_elements = {
|
||||||
# The paper size ('letterpaper' or 'a4paper').
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
'papersize': 'a4paper',
|
'papersize': 'a4paper',
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
'pointsize': '11pt',
|
'pointsize': '11pt',
|
||||||
|
|
||||||
# Latex figure (float) alignment
|
# Latex figure (float) alignment
|
||||||
#'figure_align': 'htbp',
|
#'figure_align': 'htbp',
|
||||||
|
|
||||||
# Don't mangle with UTF-8 chars
|
# Don't mangle with UTF-8 chars
|
||||||
'inputenc': '',
|
'inputenc': '',
|
||||||
'utf8extra': '',
|
'utf8extra': '',
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Set document margins
|
||||||
|
'sphinxsetup': '''
|
||||||
|
hmargin=0.5in, vmargin=1in,
|
||||||
|
parsedliteralwraps=true,
|
||||||
|
verbatimhintsturnover=false,
|
||||||
|
''',
|
||||||
|
|
||||||
|
# Additional stuff for the LaTeX preamble.
|
||||||
'preamble': '''
|
'preamble': '''
|
||||||
% Use some font with UTF-8 support with XeLaTeX
|
% Use some font with UTF-8 support with XeLaTeX
|
||||||
\\usepackage{fontspec}
|
\\usepackage{fontspec}
|
||||||
\\setsansfont{DejaVu Sans}
|
\\setsansfont{DejaVu Sans}
|
||||||
\\setromanfont{DejaVu Serif}
|
\\setromanfont{DejaVu Serif}
|
||||||
\\setmonofont{DejaVu Sans Mono}
|
\\setmonofont{DejaVu Sans Mono}
|
||||||
'''
|
''',
|
||||||
}
|
}
|
||||||
|
|
||||||
# At least one book (translations) may have Asian characters
|
# At least one book (translations) may have Asian characters
|
||||||
|
@ -213,9 +213,9 @@ Here are the routines, one by one:
|
|||||||
there will be no entries in the cache for the kernel address
|
there will be no entries in the cache for the kernel address
|
||||||
space for virtual addresses in the range 'start' to 'end-1'.
|
space for virtual addresses in the range 'start' to 'end-1'.
|
||||||
|
|
||||||
The first of these two routines is invoked after map_kernel_range()
|
The first of these two routines is invoked after vmap_range()
|
||||||
has installed the page table entries. The second is invoked
|
has installed the page table entries. The second is invoked
|
||||||
before unmap_kernel_range() deletes the page table entries.
|
before vunmap_range() deletes the page table entries.
|
||||||
|
|
||||||
There exists another whole class of cpu cache issues which currently
|
There exists another whole class of cpu cache issues which currently
|
||||||
require a whole different set of interfaces to handle properly.
|
require a whole different set of interfaces to handle properly.
|
||||||
|
@ -563,6 +563,16 @@ Free a region of memory previously allocated using dma_alloc_pages().
|
|||||||
dev, size, dma_handle and dir must all be the same as those passed into
|
dev, size, dma_handle and dir must all be the same as those passed into
|
||||||
dma_alloc_pages(). page must be the pointer returned by dma_alloc_pages().
|
dma_alloc_pages(). page must be the pointer returned by dma_alloc_pages().
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
int
|
||||||
|
dma_mmap_pages(struct device *dev, struct vm_area_struct *vma,
|
||||||
|
size_t size, struct page *page)
|
||||||
|
|
||||||
|
Map an allocation returned from dma_alloc_pages() into a user address space.
|
||||||
|
dev and size must be the same as those passed into dma_alloc_pages().
|
||||||
|
page must be the pointer returned by dma_alloc_pages().
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
void *
|
void *
|
||||||
@ -584,6 +594,84 @@ dev, size, dma_handle and dir must all be the same as those passed into
|
|||||||
dma_alloc_noncoherent(). cpu_addr must be the virtual address returned by
|
dma_alloc_noncoherent(). cpu_addr must be the virtual address returned by
|
||||||
dma_alloc_noncoherent().
|
dma_alloc_noncoherent().
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
struct sg_table *
|
||||||
|
dma_alloc_noncontiguous(struct device *dev, size_t size,
|
||||||
|
enum dma_data_direction dir, gfp_t gfp,
|
||||||
|
unsigned long attrs);
|
||||||
|
|
||||||
|
This routine allocates <size> bytes of non-coherent and possibly non-contiguous
|
||||||
|
memory. It returns a pointer to struct sg_table that describes the allocated
|
||||||
|
and DMA mapped memory, or NULL if the allocation failed. The resulting memory
|
||||||
|
can be used for struct page mapped into a scatterlist are suitable for.
|
||||||
|
|
||||||
|
The return sg_table is guaranteed to have 1 single DMA mapped segment as
|
||||||
|
indicated by sgt->nents, but it might have multiple CPU side segments as
|
||||||
|
indicated by sgt->orig_nents.
|
||||||
|
|
||||||
|
The dir parameter specified if data is read and/or written by the device,
|
||||||
|
see dma_map_single() for details.
|
||||||
|
|
||||||
|
The gfp parameter allows the caller to specify the ``GFP_`` flags (see
|
||||||
|
kmalloc()) for the allocation, but rejects flags used to specify a memory
|
||||||
|
zone such as GFP_DMA or GFP_HIGHMEM.
|
||||||
|
|
||||||
|
The attrs argument must be either 0 or DMA_ATTR_ALLOC_SINGLE_PAGES.
|
||||||
|
|
||||||
|
Before giving the memory to the device, dma_sync_sgtable_for_device() needs
|
||||||
|
to be called, and before reading memory written by the device,
|
||||||
|
dma_sync_sgtable_for_cpu(), just like for streaming DMA mappings that are
|
||||||
|
reused.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
void
|
||||||
|
dma_free_noncontiguous(struct device *dev, size_t size,
|
||||||
|
struct sg_table *sgt,
|
||||||
|
enum dma_data_direction dir)
|
||||||
|
|
||||||
|
Free memory previously allocated using dma_alloc_noncontiguous(). dev, size,
|
||||||
|
and dir must all be the same as those passed into dma_alloc_noncontiguous().
|
||||||
|
sgt must be the pointer returned by dma_alloc_noncontiguous().
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
void *
|
||||||
|
dma_vmap_noncontiguous(struct device *dev, size_t size,
|
||||||
|
struct sg_table *sgt)
|
||||||
|
|
||||||
|
Return a contiguous kernel mapping for an allocation returned from
|
||||||
|
dma_alloc_noncontiguous(). dev and size must be the same as those passed into
|
||||||
|
dma_alloc_noncontiguous(). sgt must be the pointer returned by
|
||||||
|
dma_alloc_noncontiguous().
|
||||||
|
|
||||||
|
Once a non-contiguous allocation is mapped using this function, the
|
||||||
|
flush_kernel_vmap_range() and invalidate_kernel_vmap_range() APIs must be used
|
||||||
|
to manage the coherency between the kernel mapping, the device and user space
|
||||||
|
mappings (if any).
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
void
|
||||||
|
dma_vunmap_noncontiguous(struct device *dev, void *vaddr)
|
||||||
|
|
||||||
|
Unmap a kernel mapping returned by dma_vmap_noncontiguous(). dev must be the
|
||||||
|
same the one passed into dma_alloc_noncontiguous(). vaddr must be the pointer
|
||||||
|
returned by dma_vmap_noncontiguous().
|
||||||
|
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
int
|
||||||
|
dma_mmap_noncontiguous(struct device *dev, struct vm_area_struct *vma,
|
||||||
|
size_t size, struct sg_table *sgt)
|
||||||
|
|
||||||
|
Map an allocation returned from dma_alloc_noncontiguous() into a user address
|
||||||
|
space. dev and size must be the same as those passed into
|
||||||
|
dma_alloc_noncontiguous(). sgt must be the pointer returned by
|
||||||
|
dma_alloc_noncontiguous().
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -42,10 +42,10 @@ irq_domain usage
|
|||||||
================
|
================
|
||||||
|
|
||||||
An interrupt controller driver creates and registers an irq_domain by
|
An interrupt controller driver creates and registers an irq_domain by
|
||||||
calling one of the irq_domain_add_*() functions (each mapping method
|
calling one of the irq_domain_add_*() or irq_domain_create_*() functions
|
||||||
has a different allocator function, more on that later). The function
|
(each mapping method has a different allocator function, more on that later).
|
||||||
will return a pointer to the irq_domain on success. The caller must
|
The function will return a pointer to the irq_domain on success. The caller
|
||||||
provide the allocator function with an irq_domain_ops structure.
|
must provide the allocator function with an irq_domain_ops structure.
|
||||||
|
|
||||||
In most cases, the irq_domain will begin empty without any mappings
|
In most cases, the irq_domain will begin empty without any mappings
|
||||||
between hwirq and IRQ numbers. Mappings are added to the irq_domain
|
between hwirq and IRQ numbers. Mappings are added to the irq_domain
|
||||||
@ -147,6 +147,7 @@ Legacy
|
|||||||
irq_domain_add_simple()
|
irq_domain_add_simple()
|
||||||
irq_domain_add_legacy()
|
irq_domain_add_legacy()
|
||||||
irq_domain_add_legacy_isa()
|
irq_domain_add_legacy_isa()
|
||||||
|
irq_domain_create_simple()
|
||||||
irq_domain_create_legacy()
|
irq_domain_create_legacy()
|
||||||
|
|
||||||
The Legacy mapping is a special case for drivers that already have a
|
The Legacy mapping is a special case for drivers that already have a
|
||||||
@ -169,13 +170,13 @@ supported. For example, ISA controllers would use the legacy map for
|
|||||||
mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ
|
mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ
|
||||||
numbers.
|
numbers.
|
||||||
|
|
||||||
Most users of legacy mappings should use irq_domain_add_simple() which
|
Most users of legacy mappings should use irq_domain_add_simple() or
|
||||||
will use a legacy domain only if an IRQ range is supplied by the
|
irq_domain_create_simple() which will use a legacy domain only if an IRQ range
|
||||||
system and will otherwise use a linear domain mapping. The semantics
|
is supplied by the system and will otherwise use a linear domain mapping.
|
||||||
of this call are such that if an IRQ range is specified then
|
The semantics of this call are such that if an IRQ range is specified then
|
||||||
descriptors will be allocated on-the-fly for it, and if no range is
|
descriptors will be allocated on-the-fly for it, and if no range is
|
||||||
specified it will fall through to irq_domain_add_linear() which means
|
specified it will fall through to irq_domain_add_linear() or
|
||||||
*no* irq descriptors will be allocated.
|
irq_domain_create_linear() which means *no* irq descriptors will be allocated.
|
||||||
|
|
||||||
A typical use case for simple domains is where an irqchip provider
|
A typical use case for simple domains is where an irqchip provider
|
||||||
is supporting both dynamic and static IRQ assignments.
|
is supporting both dynamic and static IRQ assignments.
|
||||||
@ -186,6 +187,7 @@ that the driver using the simple domain call irq_create_mapping()
|
|||||||
before any irq_find_mapping() since the latter will actually work
|
before any irq_find_mapping() since the latter will actually work
|
||||||
for the static IRQ assignment case.
|
for the static IRQ assignment case.
|
||||||
|
|
||||||
|
irq_domain_add_simple() and irq_domain_create_simple() as well as
|
||||||
irq_domain_add_legacy() and irq_domain_create_legacy() are functionally
|
irq_domain_add_legacy() and irq_domain_create_legacy() are functionally
|
||||||
equivalent, except for the first argument is different - the former
|
equivalent, except for the first argument is different - the former
|
||||||
accepts an Open Firmware specific 'struct device_node', while the latter
|
accepts an Open Firmware specific 'struct device_node', while the latter
|
||||||
|
@ -92,3 +92,9 @@ More Memory Management Functions
|
|||||||
:export:
|
:export:
|
||||||
|
|
||||||
.. kernel-doc:: mm/page_alloc.c
|
.. kernel-doc:: mm/page_alloc.c
|
||||||
|
.. kernel-doc:: mm/mempolicy.c
|
||||||
|
.. kernel-doc:: include/linux/mm_types.h
|
||||||
|
:internal:
|
||||||
|
.. kernel-doc:: include/linux/mm.h
|
||||||
|
:internal:
|
||||||
|
.. kernel-doc:: include/linux/mmzone.h
|
||||||
|
@ -79,7 +79,19 @@ Pointers printed without a specifier extension (i.e unadorned %p) are
|
|||||||
hashed to prevent leaking information about the kernel memory layout. This
|
hashed to prevent leaking information about the kernel memory layout. This
|
||||||
has the added benefit of providing a unique identifier. On 64-bit machines
|
has the added benefit of providing a unique identifier. On 64-bit machines
|
||||||
the first 32 bits are zeroed. The kernel will print ``(ptrval)`` until it
|
the first 32 bits are zeroed. The kernel will print ``(ptrval)`` until it
|
||||||
gathers enough entropy. If you *really* want the address see %px below.
|
gathers enough entropy.
|
||||||
|
|
||||||
|
When possible, use specialised modifiers such as %pS or %pB (described below)
|
||||||
|
to avoid the need of providing an unhashed address that has to be interpreted
|
||||||
|
post-hoc. If not possible, and the aim of printing the address is to provide
|
||||||
|
more information for debugging, use %p and boot the kernel with the
|
||||||
|
``no_hash_pointers`` parameter during debugging, which will print all %p
|
||||||
|
addresses unmodified. If you *really* always want the unmodified address, see
|
||||||
|
%px below.
|
||||||
|
|
||||||
|
If (and only if) you are printing addresses as a content of a virtual file in
|
||||||
|
e.g. procfs or sysfs (using e.g. seq_printf(), not printk()) read by a
|
||||||
|
userspace process, use the %pK modifier described below instead of %p or %px.
|
||||||
|
|
||||||
Error Pointers
|
Error Pointers
|
||||||
--------------
|
--------------
|
||||||
@ -139,6 +151,11 @@ For printing kernel pointers which should be hidden from unprivileged
|
|||||||
users. The behaviour of %pK depends on the kptr_restrict sysctl - see
|
users. The behaviour of %pK depends on the kptr_restrict sysctl - see
|
||||||
Documentation/admin-guide/sysctl/kernel.rst for more details.
|
Documentation/admin-guide/sysctl/kernel.rst for more details.
|
||||||
|
|
||||||
|
This modifier is *only* intended when producing content of a file read by
|
||||||
|
userspace from e.g. procfs or sysfs, not for dmesg. Please refer to the
|
||||||
|
section about %p above for discussion about how to manage hashing pointers
|
||||||
|
in printk().
|
||||||
|
|
||||||
Unmodified Addresses
|
Unmodified Addresses
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
@ -153,6 +170,13 @@ equivalent to %lx (or %lu). %px is preferred because it is more uniquely
|
|||||||
grep'able. If in the future we need to modify the way the kernel handles
|
grep'able. If in the future we need to modify the way the kernel handles
|
||||||
printing pointers we will be better equipped to find the call sites.
|
printing pointers we will be better equipped to find the call sites.
|
||||||
|
|
||||||
|
Before using %px, consider if using %p is sufficient together with enabling the
|
||||||
|
``no_hash_pointers`` kernel parameter during debugging sessions (see the %p
|
||||||
|
description above). One valid scenario for %px might be printing information
|
||||||
|
immediately before a panic, which prevents any sensitive information to be
|
||||||
|
exploited anyway, and with %px there would be no need to reproduce the panic
|
||||||
|
with no_hash_pointers.
|
||||||
|
|
||||||
Pointer Differences
|
Pointer Differences
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
@ -540,7 +564,7 @@ Flags bitfields such as page flags, gfp_flags
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
%pGp referenced|uptodate|lru|active|private
|
%pGp referenced|uptodate|lru|active|private|node=0|zone=2|lastcpupid=0x1fffff
|
||||||
%pGg GFP_USER|GFP_DMA32|GFP_NOWARN
|
%pGg GFP_USER|GFP_DMA32|GFP_NOWARN
|
||||||
%pGv read|exec|mayread|maywrite|mayexec|denywrite
|
%pGv read|exec|mayread|maywrite|mayexec|denywrite
|
||||||
|
|
||||||
@ -567,6 +591,24 @@ For printing netdev_features_t.
|
|||||||
|
|
||||||
Passed by reference.
|
Passed by reference.
|
||||||
|
|
||||||
|
V4L2 and DRM FourCC code (pixel format)
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
%p4cc
|
||||||
|
|
||||||
|
Print a FourCC code used by V4L2 or DRM, including format endianness and
|
||||||
|
its numerical value as hexadecimal.
|
||||||
|
|
||||||
|
Passed by reference.
|
||||||
|
|
||||||
|
Examples::
|
||||||
|
|
||||||
|
%p4cc BG12 little-endian (0x32314742)
|
||||||
|
%p4cc Y10 little-endian (0x20303159)
|
||||||
|
%p4cc NV12 big-endian (0xb231564e)
|
||||||
|
|
||||||
Thanks
|
Thanks
|
||||||
======
|
======
|
||||||
|
|
||||||
|
@ -43,14 +43,14 @@ exporting of kernel symbols to the kernel symbol table, variants of these are
|
|||||||
available to export symbols into a certain namespace: EXPORT_SYMBOL_NS() and
|
available to export symbols into a certain namespace: EXPORT_SYMBOL_NS() and
|
||||||
EXPORT_SYMBOL_NS_GPL(). They take one additional argument: the namespace.
|
EXPORT_SYMBOL_NS_GPL(). They take one additional argument: the namespace.
|
||||||
Please note that due to macro expansion that argument needs to be a
|
Please note that due to macro expansion that argument needs to be a
|
||||||
preprocessor symbol. E.g. to export the symbol `usb_stor_suspend` into the
|
preprocessor symbol. E.g. to export the symbol ``usb_stor_suspend`` into the
|
||||||
namespace `USB_STORAGE`, use::
|
namespace ``USB_STORAGE``, use::
|
||||||
|
|
||||||
EXPORT_SYMBOL_NS(usb_stor_suspend, USB_STORAGE);
|
EXPORT_SYMBOL_NS(usb_stor_suspend, USB_STORAGE);
|
||||||
|
|
||||||
The corresponding ksymtab entry struct `kernel_symbol` will have the member
|
The corresponding ksymtab entry struct ``kernel_symbol`` will have the member
|
||||||
`namespace` set accordingly. A symbol that is exported without a namespace will
|
``namespace`` set accordingly. A symbol that is exported without a namespace will
|
||||||
refer to `NULL`. There is no default namespace if none is defined. `modpost`
|
refer to ``NULL``. There is no default namespace if none is defined. ``modpost``
|
||||||
and kernel/module.c make use the namespace at build time or module load time,
|
and kernel/module.c make use the namespace at build time or module load time,
|
||||||
respectively.
|
respectively.
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ and EXPORT_SYMBOL_GPL() macro expansions that do not specify a namespace.
|
|||||||
|
|
||||||
There are multiple ways of specifying this define and it depends on the
|
There are multiple ways of specifying this define and it depends on the
|
||||||
subsystem and the maintainer's preference, which one to use. The first option
|
subsystem and the maintainer's preference, which one to use. The first option
|
||||||
is to define the default namespace in the `Makefile` of the subsystem. E.g. to
|
is to define the default namespace in the ``Makefile`` of the subsystem. E.g. to
|
||||||
export all symbols defined in usb-common into the namespace USB_COMMON, add a
|
export all symbols defined in usb-common into the namespace USB_COMMON, add a
|
||||||
line like this to drivers/usb/common/Makefile::
|
line like this to drivers/usb/common/Makefile::
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ using a statement like::
|
|||||||
|
|
||||||
MODULE_IMPORT_NS(USB_STORAGE);
|
MODULE_IMPORT_NS(USB_STORAGE);
|
||||||
|
|
||||||
This will create a `modinfo` tag in the module for each imported namespace.
|
This will create a ``modinfo`` tag in the module for each imported namespace.
|
||||||
This has the side effect, that the imported namespaces of a module can be
|
This has the side effect, that the imported namespaces of a module can be
|
||||||
inspected with modinfo::
|
inspected with modinfo::
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ metadata definitions like MODULE_AUTHOR() or MODULE_LICENSE(). Refer to section
|
|||||||
4. Loading Modules that use namespaced Symbols
|
4. Loading Modules that use namespaced Symbols
|
||||||
==============================================
|
==============================================
|
||||||
|
|
||||||
At module loading time (e.g. `insmod`), the kernel will check each symbol
|
At module loading time (e.g. ``insmod``), the kernel will check each symbol
|
||||||
referenced from the module for its availability and whether the namespace it
|
referenced from the module for its availability and whether the namespace it
|
||||||
might be exported to has been imported by the module. The default behaviour of
|
might be exported to has been imported by the module. The default behaviour of
|
||||||
the kernel is to reject loading modules that don't specify sufficient imports.
|
the kernel is to reject loading modules that don't specify sufficient imports.
|
||||||
@ -138,19 +138,19 @@ missing imports. Fixing missing imports can be done with::
|
|||||||
A typical scenario for module authors would be::
|
A typical scenario for module authors would be::
|
||||||
|
|
||||||
- write code that depends on a symbol from a not imported namespace
|
- write code that depends on a symbol from a not imported namespace
|
||||||
- `make`
|
- ``make``
|
||||||
- notice the warning of modpost telling about a missing import
|
- notice the warning of modpost telling about a missing import
|
||||||
- run `make nsdeps` to add the import to the correct code location
|
- run ``make nsdeps`` to add the import to the correct code location
|
||||||
|
|
||||||
For subsystem maintainers introducing a namespace, the steps are very similar.
|
For subsystem maintainers introducing a namespace, the steps are very similar.
|
||||||
Again, `make nsdeps` will eventually add the missing namespace imports for
|
Again, ``make nsdeps`` will eventually add the missing namespace imports for
|
||||||
in-tree modules::
|
in-tree modules::
|
||||||
|
|
||||||
- move or add symbols to a namespace (e.g. with EXPORT_SYMBOL_NS())
|
- move or add symbols to a namespace (e.g. with EXPORT_SYMBOL_NS())
|
||||||
- `make` (preferably with an allmodconfig to cover all in-kernel
|
- ``make`` (preferably with an allmodconfig to cover all in-kernel
|
||||||
modules)
|
modules)
|
||||||
- notice the warning of modpost telling about a missing import
|
- notice the warning of modpost telling about a missing import
|
||||||
- run `make nsdeps` to add the import to the correct code location
|
- run ``make nsdeps`` to add the import to the correct code location
|
||||||
|
|
||||||
You can also run nsdeps for external module builds. A typical usage is::
|
You can also run nsdeps for external module builds. A typical usage is::
|
||||||
|
|
||||||
|
755
Documentation/dev-tools/checkpatch.rst
Normal file
755
Documentation/dev-tools/checkpatch.rst
Normal file
@ -0,0 +1,755 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
==========
|
||||||
|
Checkpatch
|
||||||
|
==========
|
||||||
|
|
||||||
|
Checkpatch (scripts/checkpatch.pl) is a perl script which checks for trivial
|
||||||
|
style violations in patches and optionally corrects them. Checkpatch can
|
||||||
|
also be run on file contexts and without the kernel tree.
|
||||||
|
|
||||||
|
Checkpatch is not always right. Your judgement takes precedence over checkpatch
|
||||||
|
messages. If your code looks better with the violations, then its probably
|
||||||
|
best left alone.
|
||||||
|
|
||||||
|
|
||||||
|
Options
|
||||||
|
=======
|
||||||
|
|
||||||
|
This section will describe the options checkpatch can be run with.
|
||||||
|
|
||||||
|
Usage::
|
||||||
|
|
||||||
|
./scripts/checkpatch.pl [OPTION]... [FILE]...
|
||||||
|
|
||||||
|
Available options:
|
||||||
|
|
||||||
|
- -q, --quiet
|
||||||
|
|
||||||
|
Enable quiet mode.
|
||||||
|
|
||||||
|
- -v, --verbose
|
||||||
|
Enable verbose mode. Additional verbose test descriptions are output
|
||||||
|
so as to provide information on why that particular message is shown.
|
||||||
|
|
||||||
|
- --no-tree
|
||||||
|
|
||||||
|
Run checkpatch without the kernel tree.
|
||||||
|
|
||||||
|
- --no-signoff
|
||||||
|
|
||||||
|
Disable the 'Signed-off-by' line check. The sign-off is a simple line at
|
||||||
|
the end of the explanation for the patch, which certifies that you wrote it
|
||||||
|
or otherwise have the right to pass it on as an open-source patch.
|
||||||
|
|
||||||
|
Example::
|
||||||
|
|
||||||
|
Signed-off-by: Random J Developer <random@developer.example.org>
|
||||||
|
|
||||||
|
Setting this flag effectively stops a message for a missing signed-off-by
|
||||||
|
line in a patch context.
|
||||||
|
|
||||||
|
- --patch
|
||||||
|
|
||||||
|
Treat FILE as a patch. This is the default option and need not be
|
||||||
|
explicitly specified.
|
||||||
|
|
||||||
|
- --emacs
|
||||||
|
|
||||||
|
Set output to emacs compile window format. This allows emacs users to jump
|
||||||
|
from the error in the compile window directly to the offending line in the
|
||||||
|
patch.
|
||||||
|
|
||||||
|
- --terse
|
||||||
|
|
||||||
|
Output only one line per report.
|
||||||
|
|
||||||
|
- --showfile
|
||||||
|
|
||||||
|
Show the diffed file position instead of the input file position.
|
||||||
|
|
||||||
|
- -g, --git
|
||||||
|
|
||||||
|
Treat FILE as a single commit or a git revision range.
|
||||||
|
|
||||||
|
Single commit with:
|
||||||
|
|
||||||
|
- <rev>
|
||||||
|
- <rev>^
|
||||||
|
- <rev>~n
|
||||||
|
|
||||||
|
Multiple commits with:
|
||||||
|
|
||||||
|
- <rev1>..<rev2>
|
||||||
|
- <rev1>...<rev2>
|
||||||
|
- <rev>-<count>
|
||||||
|
|
||||||
|
- -f, --file
|
||||||
|
|
||||||
|
Treat FILE as a regular source file. This option must be used when running
|
||||||
|
checkpatch on source files in the kernel.
|
||||||
|
|
||||||
|
- --subjective, --strict
|
||||||
|
|
||||||
|
Enable stricter tests in checkpatch. By default the tests emitted as CHECK
|
||||||
|
do not activate by default. Use this flag to activate the CHECK tests.
|
||||||
|
|
||||||
|
- --list-types
|
||||||
|
|
||||||
|
Every message emitted by checkpatch has an associated TYPE. Add this flag
|
||||||
|
to display all the types in checkpatch.
|
||||||
|
|
||||||
|
Note that when this flag is active, checkpatch does not read the input FILE,
|
||||||
|
and no message is emitted. Only a list of types in checkpatch is output.
|
||||||
|
|
||||||
|
- --types TYPE(,TYPE2...)
|
||||||
|
|
||||||
|
Only display messages with the given types.
|
||||||
|
|
||||||
|
Example::
|
||||||
|
|
||||||
|
./scripts/checkpatch.pl mypatch.patch --types EMAIL_SUBJECT,BRACES
|
||||||
|
|
||||||
|
- --ignore TYPE(,TYPE2...)
|
||||||
|
|
||||||
|
Checkpatch will not emit messages for the specified types.
|
||||||
|
|
||||||
|
Example::
|
||||||
|
|
||||||
|
./scripts/checkpatch.pl mypatch.patch --ignore EMAIL_SUBJECT,BRACES
|
||||||
|
|
||||||
|
- --show-types
|
||||||
|
|
||||||
|
By default checkpatch doesn't display the type associated with the messages.
|
||||||
|
Set this flag to show the message type in the output.
|
||||||
|
|
||||||
|
- --max-line-length=n
|
||||||
|
|
||||||
|
Set the max line length (default 100). If a line exceeds the specified
|
||||||
|
length, a LONG_LINE message is emitted.
|
||||||
|
|
||||||
|
|
||||||
|
The message level is different for patch and file contexts. For patches,
|
||||||
|
a WARNING is emitted. While a milder CHECK is emitted for files. So for
|
||||||
|
file contexts, the --strict flag must also be enabled.
|
||||||
|
|
||||||
|
- --min-conf-desc-length=n
|
||||||
|
|
||||||
|
Set the Kconfig entry minimum description length, if shorter, warn.
|
||||||
|
|
||||||
|
- --tab-size=n
|
||||||
|
|
||||||
|
Set the number of spaces for tab (default 8).
|
||||||
|
|
||||||
|
- --root=PATH
|
||||||
|
|
||||||
|
PATH to the kernel tree root.
|
||||||
|
|
||||||
|
This option must be specified when invoking checkpatch from outside
|
||||||
|
the kernel root.
|
||||||
|
|
||||||
|
- --no-summary
|
||||||
|
|
||||||
|
Suppress the per file summary.
|
||||||
|
|
||||||
|
- --mailback
|
||||||
|
|
||||||
|
Only produce a report in case of Warnings or Errors. Milder Checks are
|
||||||
|
excluded from this.
|
||||||
|
|
||||||
|
- --summary-file
|
||||||
|
|
||||||
|
Include the filename in summary.
|
||||||
|
|
||||||
|
- --debug KEY=[0|1]
|
||||||
|
|
||||||
|
Turn on/off debugging of KEY, where KEY is one of 'values', 'possible',
|
||||||
|
'type', and 'attr' (default is all off).
|
||||||
|
|
||||||
|
- --fix
|
||||||
|
|
||||||
|
This is an EXPERIMENTAL feature. If correctable errors exists, a file
|
||||||
|
<inputfile>.EXPERIMENTAL-checkpatch-fixes is created which has the
|
||||||
|
automatically fixable errors corrected.
|
||||||
|
|
||||||
|
- --fix-inplace
|
||||||
|
|
||||||
|
EXPERIMENTAL - Similar to --fix but input file is overwritten with fixes.
|
||||||
|
|
||||||
|
DO NOT USE this flag unless you are absolutely sure and you have a backup
|
||||||
|
in place.
|
||||||
|
|
||||||
|
- --ignore-perl-version
|
||||||
|
|
||||||
|
Override checking of perl version. Runtime errors maybe encountered after
|
||||||
|
enabling this flag if the perl version does not meet the minimum specified.
|
||||||
|
|
||||||
|
- --codespell
|
||||||
|
|
||||||
|
Use the codespell dictionary for checking spelling errors.
|
||||||
|
|
||||||
|
- --codespellfile
|
||||||
|
|
||||||
|
Use the specified codespell file.
|
||||||
|
Default is '/usr/share/codespell/dictionary.txt'.
|
||||||
|
|
||||||
|
- --typedefsfile
|
||||||
|
|
||||||
|
Read additional types from this file.
|
||||||
|
|
||||||
|
- --color[=WHEN]
|
||||||
|
|
||||||
|
Use colors 'always', 'never', or only when output is a terminal ('auto').
|
||||||
|
Default is 'auto'.
|
||||||
|
|
||||||
|
- --kconfig-prefix=WORD
|
||||||
|
|
||||||
|
Use WORD as a prefix for Kconfig symbols (default is `CONFIG_`).
|
||||||
|
|
||||||
|
- -h, --help, --version
|
||||||
|
|
||||||
|
Display the help text.
|
||||||
|
|
||||||
|
Message Levels
|
||||||
|
==============
|
||||||
|
|
||||||
|
Messages in checkpatch are divided into three levels. The levels of messages
|
||||||
|
in checkpatch denote the severity of the error. They are:
|
||||||
|
|
||||||
|
- ERROR
|
||||||
|
|
||||||
|
This is the most strict level. Messages of type ERROR must be taken
|
||||||
|
seriously as they denote things that are very likely to be wrong.
|
||||||
|
|
||||||
|
- WARNING
|
||||||
|
|
||||||
|
This is the next stricter level. Messages of type WARNING requires a
|
||||||
|
more careful review. But it is milder than an ERROR.
|
||||||
|
|
||||||
|
- CHECK
|
||||||
|
|
||||||
|
This is the mildest level. These are things which may require some thought.
|
||||||
|
|
||||||
|
Type Descriptions
|
||||||
|
=================
|
||||||
|
|
||||||
|
This section contains a description of all the message types in checkpatch.
|
||||||
|
|
||||||
|
.. Types in this section are also parsed by checkpatch.
|
||||||
|
.. The types are grouped into subsections based on use.
|
||||||
|
|
||||||
|
|
||||||
|
Allocation style
|
||||||
|
----------------
|
||||||
|
|
||||||
|
**ALLOC_ARRAY_ARGS**
|
||||||
|
The first argument for kcalloc or kmalloc_array should be the
|
||||||
|
number of elements. sizeof() as the first argument is generally
|
||||||
|
wrong.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html
|
||||||
|
|
||||||
|
**ALLOC_SIZEOF_STRUCT**
|
||||||
|
The allocation style is bad. In general for family of
|
||||||
|
allocation functions using sizeof() to get memory size,
|
||||||
|
constructs like::
|
||||||
|
|
||||||
|
p = alloc(sizeof(struct foo), ...)
|
||||||
|
|
||||||
|
should be::
|
||||||
|
|
||||||
|
p = alloc(sizeof(*p), ...)
|
||||||
|
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#allocating-memory
|
||||||
|
|
||||||
|
**ALLOC_WITH_MULTIPLY**
|
||||||
|
Prefer kmalloc_array/kcalloc over kmalloc/kzalloc with a
|
||||||
|
sizeof multiply.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html
|
||||||
|
|
||||||
|
|
||||||
|
API usage
|
||||||
|
---------
|
||||||
|
|
||||||
|
**ARCH_DEFINES**
|
||||||
|
Architecture specific defines should be avoided wherever
|
||||||
|
possible.
|
||||||
|
|
||||||
|
**ARCH_INCLUDE_LINUX**
|
||||||
|
Whenever asm/file.h is included and linux/file.h exists, a
|
||||||
|
conversion can be made when linux/file.h includes asm/file.h.
|
||||||
|
However this is not always the case (See signal.h).
|
||||||
|
This message type is emitted only for includes from arch/.
|
||||||
|
|
||||||
|
**AVOID_BUG**
|
||||||
|
BUG() or BUG_ON() should be avoided totally.
|
||||||
|
Use WARN() and WARN_ON() instead, and handle the "impossible"
|
||||||
|
error condition as gracefully as possible.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/deprecated.html#bug-and-bug-on
|
||||||
|
|
||||||
|
**CONSIDER_KSTRTO**
|
||||||
|
The simple_strtol(), simple_strtoll(), simple_strtoul(), and
|
||||||
|
simple_strtoull() functions explicitly ignore overflows, which
|
||||||
|
may lead to unexpected results in callers. The respective kstrtol(),
|
||||||
|
kstrtoll(), kstrtoul(), and kstrtoull() functions tend to be the
|
||||||
|
correct replacements.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull
|
||||||
|
|
||||||
|
**LOCKDEP**
|
||||||
|
The lockdep_no_validate class was added as a temporary measure to
|
||||||
|
prevent warnings on conversion of device->sem to device->mutex.
|
||||||
|
It should not be used for any other purpose.
|
||||||
|
See: https://lore.kernel.org/lkml/1268959062.9440.467.camel@laptop/
|
||||||
|
|
||||||
|
**MALFORMED_INCLUDE**
|
||||||
|
The #include statement has a malformed path. This has happened
|
||||||
|
because the author has included a double slash "//" in the pathname
|
||||||
|
accidentally.
|
||||||
|
|
||||||
|
**USE_LOCKDEP**
|
||||||
|
lockdep_assert_held() annotations should be preferred over
|
||||||
|
assertions based on spin_is_locked()
|
||||||
|
See: https://www.kernel.org/doc/html/latest/locking/lockdep-design.html#annotations
|
||||||
|
|
||||||
|
**UAPI_INCLUDE**
|
||||||
|
No #include statements in include/uapi should use a uapi/ path.
|
||||||
|
|
||||||
|
|
||||||
|
Comment style
|
||||||
|
-------------
|
||||||
|
|
||||||
|
**BLOCK_COMMENT_STYLE**
|
||||||
|
The comment style is incorrect. The preferred style for multi-
|
||||||
|
line comments is::
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is the preferred style
|
||||||
|
* for multi line comments.
|
||||||
|
*/
|
||||||
|
|
||||||
|
The networking comment style is a bit different, with the first line
|
||||||
|
not empty like the former::
|
||||||
|
|
||||||
|
/* This is the preferred comment style
|
||||||
|
* for files in net/ and drivers/net/
|
||||||
|
*/
|
||||||
|
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting
|
||||||
|
|
||||||
|
**C99_COMMENTS**
|
||||||
|
C99 style single line comments (//) should not be used.
|
||||||
|
Prefer the block comment style instead.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting
|
||||||
|
|
||||||
|
|
||||||
|
Commit message
|
||||||
|
--------------
|
||||||
|
|
||||||
|
**BAD_SIGN_OFF**
|
||||||
|
The signed-off-by line does not fall in line with the standards
|
||||||
|
specified by the community.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1
|
||||||
|
|
||||||
|
**BAD_STABLE_ADDRESS_STYLE**
|
||||||
|
The email format for stable is incorrect.
|
||||||
|
Some valid options for stable address are::
|
||||||
|
|
||||||
|
1. stable@vger.kernel.org
|
||||||
|
2. stable@kernel.org
|
||||||
|
|
||||||
|
For adding version info, the following comment style should be used::
|
||||||
|
|
||||||
|
stable@vger.kernel.org # version info
|
||||||
|
|
||||||
|
**COMMIT_COMMENT_SYMBOL**
|
||||||
|
Commit log lines starting with a '#' are ignored by git as
|
||||||
|
comments. To solve this problem addition of a single space
|
||||||
|
infront of the log line is enough.
|
||||||
|
|
||||||
|
**COMMIT_MESSAGE**
|
||||||
|
The patch is missing a commit description. A brief
|
||||||
|
description of the changes made by the patch should be added.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
|
||||||
|
|
||||||
|
**MISSING_SIGN_OFF**
|
||||||
|
The patch is missing a Signed-off-by line. A signed-off-by
|
||||||
|
line should be added according to Developer's certificate of
|
||||||
|
Origin.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
|
||||||
|
|
||||||
|
**NO_AUTHOR_SIGN_OFF**
|
||||||
|
The author of the patch has not signed off the patch. It is
|
||||||
|
required that a simple sign off line should be present at the
|
||||||
|
end of explanation of the patch to denote that the author has
|
||||||
|
written it or otherwise has the rights to pass it on as an open
|
||||||
|
source patch.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
|
||||||
|
|
||||||
|
**DIFF_IN_COMMIT_MSG**
|
||||||
|
Avoid having diff content in commit message.
|
||||||
|
This causes problems when one tries to apply a file containing both
|
||||||
|
the changelog and the diff because patch(1) tries to apply the diff
|
||||||
|
which it found in the changelog.
|
||||||
|
See: https://lore.kernel.org/lkml/20150611134006.9df79a893e3636019ad2759e@linux-foundation.org/
|
||||||
|
|
||||||
|
**GERRIT_CHANGE_ID**
|
||||||
|
To be picked up by gerrit, the footer of the commit message might
|
||||||
|
have a Change-Id like::
|
||||||
|
|
||||||
|
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
|
||||||
|
Signed-off-by: A. U. Thor <author@example.com>
|
||||||
|
|
||||||
|
The Change-Id line must be removed before submitting.
|
||||||
|
|
||||||
|
**GIT_COMMIT_ID**
|
||||||
|
The proper way to reference a commit id is:
|
||||||
|
commit <12+ chars of sha1> ("<title line>")
|
||||||
|
|
||||||
|
An example may be::
|
||||||
|
|
||||||
|
Commit e21d2170f36602ae2708 ("video: remove unnecessary
|
||||||
|
platform_set_drvdata()") removed the unnecessary
|
||||||
|
platform_set_drvdata(), but left the variable "dev" unused,
|
||||||
|
delete it.
|
||||||
|
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
|
||||||
|
|
||||||
|
|
||||||
|
Comparison style
|
||||||
|
----------------
|
||||||
|
|
||||||
|
**ASSIGN_IN_IF**
|
||||||
|
Do not use assignments in if condition.
|
||||||
|
Example::
|
||||||
|
|
||||||
|
if ((foo = bar(...)) < BAZ) {
|
||||||
|
|
||||||
|
should be written as::
|
||||||
|
|
||||||
|
foo = bar(...);
|
||||||
|
if (foo < BAZ) {
|
||||||
|
|
||||||
|
**BOOL_COMPARISON**
|
||||||
|
Comparisons of A to true and false are better written
|
||||||
|
as A and !A.
|
||||||
|
See: https://lore.kernel.org/lkml/1365563834.27174.12.camel@joe-AO722/
|
||||||
|
|
||||||
|
**COMPARISON_TO_NULL**
|
||||||
|
Comparisons to NULL in the form (foo == NULL) or (foo != NULL)
|
||||||
|
are better written as (!foo) and (foo).
|
||||||
|
|
||||||
|
**CONSTANT_COMPARISON**
|
||||||
|
Comparisons with a constant or upper case identifier on the left
|
||||||
|
side of the test should be avoided.
|
||||||
|
|
||||||
|
|
||||||
|
Macros, Attributes and Symbols
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
**ARRAY_SIZE**
|
||||||
|
The ARRAY_SIZE(foo) macro should be preferred over
|
||||||
|
sizeof(foo)/sizeof(foo[0]) for finding number of elements in an
|
||||||
|
array.
|
||||||
|
|
||||||
|
The macro is defined in include/linux/kernel.h::
|
||||||
|
|
||||||
|
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||||
|
|
||||||
|
**AVOID_EXTERNS**
|
||||||
|
Function prototypes don't need to be declared extern in .h
|
||||||
|
files. It's assumed by the compiler and is unnecessary.
|
||||||
|
|
||||||
|
**AVOID_L_PREFIX**
|
||||||
|
Local symbol names that are prefixed with `.L` should be avoided,
|
||||||
|
as this has special meaning for the assembler; a symbol entry will
|
||||||
|
not be emitted into the symbol table. This can prevent `objtool`
|
||||||
|
from generating correct unwind info.
|
||||||
|
|
||||||
|
Symbols with STB_LOCAL binding may still be used, and `.L` prefixed
|
||||||
|
local symbol names are still generally usable within a function,
|
||||||
|
but `.L` prefixed local symbol names should not be used to denote
|
||||||
|
the beginning or end of code regions via
|
||||||
|
`SYM_CODE_START_LOCAL`/`SYM_CODE_END`
|
||||||
|
|
||||||
|
**BIT_MACRO**
|
||||||
|
Defines like: 1 << <digit> could be BIT(digit).
|
||||||
|
The BIT() macro is defined in include/linux/bitops.h::
|
||||||
|
|
||||||
|
#define BIT(nr) (1UL << (nr))
|
||||||
|
|
||||||
|
**CONST_READ_MOSTLY**
|
||||||
|
When a variable is tagged with the __read_mostly annotation, it is a
|
||||||
|
signal to the compiler that accesses to the variable will be mostly
|
||||||
|
reads and rarely(but NOT never) a write.
|
||||||
|
|
||||||
|
const __read_mostly does not make any sense as const data is already
|
||||||
|
read-only. The __read_mostly annotation thus should be removed.
|
||||||
|
|
||||||
|
**DATE_TIME**
|
||||||
|
It is generally desirable that building the same source code with
|
||||||
|
the same set of tools is reproducible, i.e. the output is always
|
||||||
|
exactly the same.
|
||||||
|
|
||||||
|
The kernel does *not* use the ``__DATE__`` and ``__TIME__`` macros,
|
||||||
|
and enables warnings if they are used as they can lead to
|
||||||
|
non-deterministic builds.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/kbuild/reproducible-builds.html#timestamps
|
||||||
|
|
||||||
|
**DEFINE_ARCH_HAS**
|
||||||
|
The ARCH_HAS_xyz and ARCH_HAVE_xyz patterns are wrong.
|
||||||
|
|
||||||
|
For big conceptual features use Kconfig symbols instead. And for
|
||||||
|
smaller things where we have compatibility fallback functions but
|
||||||
|
want architectures able to override them with optimized ones, we
|
||||||
|
should either use weak functions (appropriate for some cases), or
|
||||||
|
the symbol that protects them should be the same symbol we use.
|
||||||
|
See: https://lore.kernel.org/lkml/CA+55aFycQ9XJvEOsiM3txHL5bjUc8CeKWJNR_H+MiicaddB42Q@mail.gmail.com/
|
||||||
|
|
||||||
|
**INIT_ATTRIBUTE**
|
||||||
|
Const init definitions should use __initconst instead of
|
||||||
|
__initdata.
|
||||||
|
|
||||||
|
Similarly init definitions without const require a separate
|
||||||
|
use of const.
|
||||||
|
|
||||||
|
**INLINE_LOCATION**
|
||||||
|
The inline keyword should sit between storage class and type.
|
||||||
|
|
||||||
|
For example, the following segment::
|
||||||
|
|
||||||
|
inline static int example_function(void)
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
should be::
|
||||||
|
|
||||||
|
static inline int example_function(void)
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
**MULTISTATEMENT_MACRO_USE_DO_WHILE**
|
||||||
|
Macros with multiple statements should be enclosed in a
|
||||||
|
do - while block. Same should also be the case for macros
|
||||||
|
starting with `if` to avoid logic defects::
|
||||||
|
|
||||||
|
#define macrofun(a, b, c) \
|
||||||
|
do { \
|
||||||
|
if (a == 5) \
|
||||||
|
do_this(b, c); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#macros-enums-and-rtl
|
||||||
|
|
||||||
|
**WEAK_DECLARATION**
|
||||||
|
Using weak declarations like __attribute__((weak)) or __weak
|
||||||
|
can have unintended link defects. Avoid using them.
|
||||||
|
|
||||||
|
|
||||||
|
Functions and Variables
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
**CAMELCASE**
|
||||||
|
Avoid CamelCase Identifiers.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#naming
|
||||||
|
|
||||||
|
**FUNCTION_WITHOUT_ARGS**
|
||||||
|
Function declarations without arguments like::
|
||||||
|
|
||||||
|
int foo()
|
||||||
|
|
||||||
|
should be::
|
||||||
|
|
||||||
|
int foo(void)
|
||||||
|
|
||||||
|
**GLOBAL_INITIALISERS**
|
||||||
|
Global variables should not be initialized explicitly to
|
||||||
|
0 (or NULL, false, etc.). Your compiler (or rather your
|
||||||
|
loader, which is responsible for zeroing out the relevant
|
||||||
|
sections) automatically does it for you.
|
||||||
|
|
||||||
|
**INITIALISED_STATIC**
|
||||||
|
Static variables should not be initialized explicitly to zero.
|
||||||
|
Your compiler (or rather your loader) automatically does
|
||||||
|
it for you.
|
||||||
|
|
||||||
|
**RETURN_PARENTHESES**
|
||||||
|
return is not a function and as such doesn't need parentheses::
|
||||||
|
|
||||||
|
return (bar);
|
||||||
|
|
||||||
|
can simply be::
|
||||||
|
|
||||||
|
return bar;
|
||||||
|
|
||||||
|
|
||||||
|
Spacing and Brackets
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
**ASSIGNMENT_CONTINUATIONS**
|
||||||
|
Assignment operators should not be written at the start of a
|
||||||
|
line but should follow the operand at the previous line.
|
||||||
|
|
||||||
|
**BRACES**
|
||||||
|
The placement of braces is stylistically incorrect.
|
||||||
|
The preferred way is to put the opening brace last on the line,
|
||||||
|
and put the closing brace first::
|
||||||
|
|
||||||
|
if (x is true) {
|
||||||
|
we do y
|
||||||
|
}
|
||||||
|
|
||||||
|
This applies for all non-functional blocks.
|
||||||
|
However, there is one special case, namely functions: they have the
|
||||||
|
opening brace at the beginning of the next line, thus::
|
||||||
|
|
||||||
|
int function(int x)
|
||||||
|
{
|
||||||
|
body of function
|
||||||
|
}
|
||||||
|
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
|
||||||
|
|
||||||
|
**BRACKET_SPACE**
|
||||||
|
Whitespace before opening bracket '[' is prohibited.
|
||||||
|
There are some exceptions:
|
||||||
|
|
||||||
|
1. With a type on the left::
|
||||||
|
|
||||||
|
;int [] a;
|
||||||
|
|
||||||
|
2. At the beginning of a line for slice initialisers::
|
||||||
|
|
||||||
|
[0...10] = 5,
|
||||||
|
|
||||||
|
3. Inside a curly brace::
|
||||||
|
|
||||||
|
= { [0...10] = 5 }
|
||||||
|
|
||||||
|
**CODE_INDENT**
|
||||||
|
Code indent should use tabs instead of spaces.
|
||||||
|
Outside of comments, documentation and Kconfig,
|
||||||
|
spaces are never used for indentation.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#indentation
|
||||||
|
|
||||||
|
**CONCATENATED_STRING**
|
||||||
|
Concatenated elements should have a space in between.
|
||||||
|
Example::
|
||||||
|
|
||||||
|
printk(KERN_INFO"bar");
|
||||||
|
|
||||||
|
should be::
|
||||||
|
|
||||||
|
printk(KERN_INFO "bar");
|
||||||
|
|
||||||
|
**ELSE_AFTER_BRACE**
|
||||||
|
`else {` should follow the closing block `}` on the same line.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
|
||||||
|
|
||||||
|
**LINE_SPACING**
|
||||||
|
Vertical space is wasted given the limited number of lines an
|
||||||
|
editor window can display when multiple blank lines are used.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
|
||||||
|
|
||||||
|
**OPEN_BRACE**
|
||||||
|
The opening brace should be following the function definitions on the
|
||||||
|
next line. For any non-functional block it should be on the same line
|
||||||
|
as the last construct.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
|
||||||
|
|
||||||
|
**POINTER_LOCATION**
|
||||||
|
When using pointer data or a function that returns a pointer type,
|
||||||
|
the preferred use of * is adjacent to the data name or function name
|
||||||
|
and not adjacent to the type name.
|
||||||
|
Examples::
|
||||||
|
|
||||||
|
char *linux_banner;
|
||||||
|
unsigned long long memparse(char *ptr, char **retptr);
|
||||||
|
char *match_strdup(substring_t *s);
|
||||||
|
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
|
||||||
|
|
||||||
|
**SPACING**
|
||||||
|
Whitespace style used in the kernel sources is described in kernel docs.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
|
||||||
|
|
||||||
|
**SWITCH_CASE_INDENT_LEVEL**
|
||||||
|
switch should be at the same indent as case.
|
||||||
|
Example::
|
||||||
|
|
||||||
|
switch (suffix) {
|
||||||
|
case 'G':
|
||||||
|
case 'g':
|
||||||
|
mem <<= 30;
|
||||||
|
break;
|
||||||
|
case 'M':
|
||||||
|
case 'm':
|
||||||
|
mem <<= 20;
|
||||||
|
break;
|
||||||
|
case 'K':
|
||||||
|
case 'k':
|
||||||
|
mem <<= 10;
|
||||||
|
/* fall through */
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#indentation
|
||||||
|
|
||||||
|
**TRAILING_WHITESPACE**
|
||||||
|
Trailing whitespace should always be removed.
|
||||||
|
Some editors highlight the trailing whitespace and cause visual
|
||||||
|
distractions when editing files.
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
|
||||||
|
|
||||||
|
**WHILE_AFTER_BRACE**
|
||||||
|
while should follow the closing bracket on the same line::
|
||||||
|
|
||||||
|
do {
|
||||||
|
...
|
||||||
|
} while(something);
|
||||||
|
|
||||||
|
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
|
||||||
|
|
||||||
|
|
||||||
|
Others
|
||||||
|
------
|
||||||
|
|
||||||
|
**CONFIG_DESCRIPTION**
|
||||||
|
Kconfig symbols should have a help text which fully describes
|
||||||
|
it.
|
||||||
|
|
||||||
|
**CORRUPTED_PATCH**
|
||||||
|
The patch seems to be corrupted or lines are wrapped.
|
||||||
|
Please regenerate the patch file before sending it to the maintainer.
|
||||||
|
|
||||||
|
**DOS_LINE_ENDINGS**
|
||||||
|
For DOS-formatted patches, there are extra ^M symbols at the end of
|
||||||
|
the line. These should be removed.
|
||||||
|
|
||||||
|
**EXECUTE_PERMISSIONS**
|
||||||
|
There is no reason for source files to be executable. The executable
|
||||||
|
bit can be removed safely.
|
||||||
|
|
||||||
|
**NON_OCTAL_PERMISSIONS**
|
||||||
|
Permission bits should use 4 digit octal permissions (like 0700 or 0444).
|
||||||
|
Avoid using any other base like decimal.
|
||||||
|
|
||||||
|
**NOT_UNIFIED_DIFF**
|
||||||
|
The patch file does not appear to be in unified-diff format. Please
|
||||||
|
regenerate the patch file before sending it to the maintainer.
|
||||||
|
|
||||||
|
**PRINTF_0XDECIMAL**
|
||||||
|
Prefixing 0x with decimal output is defective and should be corrected.
|
||||||
|
|
||||||
|
**TRAILING_STATEMENTS**
|
||||||
|
Trailing statements (for example after any conditional) should be
|
||||||
|
on the next line.
|
||||||
|
Like::
|
||||||
|
|
||||||
|
if (x == y) break;
|
||||||
|
|
||||||
|
should be::
|
||||||
|
|
||||||
|
if (x == y)
|
||||||
|
break;
|
@ -124,6 +124,8 @@ box for setups where kernels are built and run on the same machine. In
|
|||||||
cases where the kernel runs on a separate machine, special preparations
|
cases where the kernel runs on a separate machine, special preparations
|
||||||
must be made, depending on where the gcov tool is used:
|
must be made, depending on where the gcov tool is used:
|
||||||
|
|
||||||
|
.. _gcov-test:
|
||||||
|
|
||||||
a) gcov is run on the TEST machine
|
a) gcov is run on the TEST machine
|
||||||
|
|
||||||
The gcov tool version on the test machine must be compatible with the
|
The gcov tool version on the test machine must be compatible with the
|
||||||
@ -143,6 +145,8 @@ a) gcov is run on the TEST machine
|
|||||||
machine. If any of the path components is symbolic link, the actual
|
machine. If any of the path components is symbolic link, the actual
|
||||||
directory needs to be used instead (due to make's CURDIR handling).
|
directory needs to be used instead (due to make's CURDIR handling).
|
||||||
|
|
||||||
|
.. _gcov-build:
|
||||||
|
|
||||||
b) gcov is run on the BUILD machine
|
b) gcov is run on the BUILD machine
|
||||||
|
|
||||||
The following files need to be copied after each test case from test
|
The following files need to be copied after each test case from test
|
||||||
@ -211,7 +215,7 @@ Appendix A: gather_on_build.sh
|
|||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
Sample script to gather coverage meta files on the build machine
|
Sample script to gather coverage meta files on the build machine
|
||||||
(see 6a):
|
(see :ref:`Separated build and test machines a. <gcov-test>`):
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
@ -244,7 +248,7 @@ Appendix B: gather_on_test.sh
|
|||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
Sample script to gather coverage data files on the test machine
|
Sample script to gather coverage data files on the test machine
|
||||||
(see 6b):
|
(see :ref:`Separated build and test machines b. <gcov-build>`):
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ Examples of using the Linux-provided gdb helpers
|
|||||||
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
|
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
|
||||||
....
|
....
|
||||||
|
|
||||||
- Examine fields of the current task struct::
|
- Examine fields of the current task struct(supported by x86 and arm64 only)::
|
||||||
|
|
||||||
(gdb) p $lx_current().pid
|
(gdb) p $lx_current().pid
|
||||||
$1 = 4998
|
$1 = 4998
|
||||||
|
@ -7,6 +7,9 @@ be used to work on the kernel. For now, the documents have been pulled
|
|||||||
together without any significant effort to integrate them into a coherent
|
together without any significant effort to integrate them into a coherent
|
||||||
whole; patches welcome!
|
whole; patches welcome!
|
||||||
|
|
||||||
|
A brief overview of testing-specific tools can be found in
|
||||||
|
Documentation/dev-tools/testing-overview.rst
|
||||||
|
|
||||||
.. class:: toc-title
|
.. class:: toc-title
|
||||||
|
|
||||||
Table of contents
|
Table of contents
|
||||||
@ -14,6 +17,8 @@ whole; patches welcome!
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
testing-overview
|
||||||
|
checkpatch
|
||||||
coccinelle
|
coccinelle
|
||||||
sparse
|
sparse
|
||||||
kcov
|
kcov
|
||||||
|
@ -11,46 +11,56 @@ designed to find out-of-bound and use-after-free bugs. KASAN has three modes:
|
|||||||
2. software tag-based KASAN (similar to userspace HWASan),
|
2. software tag-based KASAN (similar to userspace HWASan),
|
||||||
3. hardware tag-based KASAN (based on hardware memory tagging).
|
3. hardware tag-based KASAN (based on hardware memory tagging).
|
||||||
|
|
||||||
Software KASAN modes (1 and 2) use compile-time instrumentation to insert
|
Generic KASAN is mainly used for debugging due to a large memory overhead.
|
||||||
validity checks before every memory access, and therefore require a compiler
|
Software tag-based KASAN can be used for dogfood testing as it has a lower
|
||||||
|
memory overhead that allows using it with real workloads. Hardware tag-based
|
||||||
|
KASAN comes with low memory and performance overheads and, therefore, can be
|
||||||
|
used in production. Either as an in-field memory bug detector or as a security
|
||||||
|
mitigation.
|
||||||
|
|
||||||
|
Software KASAN modes (#1 and #2) use compile-time instrumentation to insert
|
||||||
|
validity checks before every memory access and, therefore, require a compiler
|
||||||
version that supports that.
|
version that supports that.
|
||||||
|
|
||||||
Generic KASAN is supported in both GCC and Clang. With GCC it requires version
|
Generic KASAN is supported in GCC and Clang. With GCC, it requires version
|
||||||
8.3.0 or later. Any supported Clang version is compatible, but detection of
|
8.3.0 or later. Any supported Clang version is compatible, but detection of
|
||||||
out-of-bounds accesses for global variables is only supported since Clang 11.
|
out-of-bounds accesses for global variables is only supported since Clang 11.
|
||||||
|
|
||||||
Tag-based KASAN is only supported in Clang.
|
Software tag-based KASAN mode is only supported in Clang.
|
||||||
|
|
||||||
Currently generic KASAN is supported for the x86_64, arm, arm64, xtensa, s390
|
The hardware KASAN mode (#3) relies on hardware to perform the checks but
|
||||||
|
still requires a compiler version that supports memory tagging instructions.
|
||||||
|
This mode is supported in GCC 10+ and Clang 11+.
|
||||||
|
|
||||||
|
Both software KASAN modes work with SLUB and SLAB memory allocators,
|
||||||
|
while the hardware tag-based KASAN currently only supports SLUB.
|
||||||
|
|
||||||
|
Currently, generic KASAN is supported for the x86_64, arm, arm64, xtensa, s390,
|
||||||
and riscv architectures, and tag-based KASAN modes are supported only for arm64.
|
and riscv architectures, and tag-based KASAN modes are supported only for arm64.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
To enable KASAN configure kernel with::
|
To enable KASAN, configure the kernel with::
|
||||||
|
|
||||||
CONFIG_KASAN = y
|
CONFIG_KASAN=y
|
||||||
|
|
||||||
and choose between CONFIG_KASAN_GENERIC (to enable generic KASAN),
|
and choose between ``CONFIG_KASAN_GENERIC`` (to enable generic KASAN),
|
||||||
CONFIG_KASAN_SW_TAGS (to enable software tag-based KASAN), and
|
``CONFIG_KASAN_SW_TAGS`` (to enable software tag-based KASAN), and
|
||||||
CONFIG_KASAN_HW_TAGS (to enable hardware tag-based KASAN).
|
``CONFIG_KASAN_HW_TAGS`` (to enable hardware tag-based KASAN).
|
||||||
|
|
||||||
For software modes, you also need to choose between CONFIG_KASAN_OUTLINE and
|
For software modes, also choose between ``CONFIG_KASAN_OUTLINE`` and
|
||||||
CONFIG_KASAN_INLINE. Outline and inline are compiler instrumentation types.
|
``CONFIG_KASAN_INLINE``. Outline and inline are compiler instrumentation types.
|
||||||
The former produces smaller binary while the latter is 1.1 - 2 times faster.
|
The former produces a smaller binary while the latter is 1.1-2 times faster.
|
||||||
|
|
||||||
Both software KASAN modes work with both SLUB and SLAB memory allocators,
|
To include alloc and free stack traces of affected slab objects into reports,
|
||||||
while the hardware tag-based KASAN currently only support SLUB.
|
enable ``CONFIG_STACKTRACE``. To include alloc and free stack traces of affected
|
||||||
|
physical pages, enable ``CONFIG_PAGE_OWNER`` and boot with ``page_owner=on``.
|
||||||
For better error reports that include stack traces, enable CONFIG_STACKTRACE.
|
|
||||||
|
|
||||||
To augment reports with last allocation and freeing stack of the physical page,
|
|
||||||
it is recommended to enable also CONFIG_PAGE_OWNER and boot with page_owner=on.
|
|
||||||
|
|
||||||
Error reports
|
Error reports
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
A typical out-of-bounds access generic KASAN report looks like this::
|
A typical KASAN report looks like this::
|
||||||
|
|
||||||
==================================================================
|
==================================================================
|
||||||
BUG: KASAN: slab-out-of-bounds in kmalloc_oob_right+0xa8/0xbc [test_kasan]
|
BUG: KASAN: slab-out-of-bounds in kmalloc_oob_right+0xa8/0xbc [test_kasan]
|
||||||
@ -123,68 +133,75 @@ A typical out-of-bounds access generic KASAN report looks like this::
|
|||||||
ffff8801f44ec400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
|
ffff8801f44ec400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
|
||||||
==================================================================
|
==================================================================
|
||||||
|
|
||||||
The header of the report provides a short summary of what kind of bug happened
|
The report header summarizes what kind of bug happened and what kind of access
|
||||||
and what kind of access caused it. It's followed by a stack trace of the bad
|
caused it. It is followed by a stack trace of the bad access, a stack trace of
|
||||||
access, a stack trace of where the accessed memory was allocated (in case bad
|
where the accessed memory was allocated (in case a slab object was accessed),
|
||||||
access happens on a slab object), and a stack trace of where the object was
|
and a stack trace of where the object was freed (in case of a use-after-free
|
||||||
freed (in case of a use-after-free bug report). Next comes a description of
|
bug report). Next comes a description of the accessed slab object and the
|
||||||
the accessed slab object and information about the accessed memory page.
|
information about the accessed memory page.
|
||||||
|
|
||||||
In the last section the report shows memory state around the accessed address.
|
In the end, the report shows the memory state around the accessed address.
|
||||||
Internally KASAN tracks memory state separately for each memory granule, which
|
Internally, KASAN tracks memory state separately for each memory granule, which
|
||||||
is either 8 or 16 aligned bytes depending on KASAN mode. Each number in the
|
is either 8 or 16 aligned bytes depending on KASAN mode. Each number in the
|
||||||
memory state section of the report shows the state of one of the memory
|
memory state section of the report shows the state of one of the memory
|
||||||
granules that surround the accessed address.
|
granules that surround the accessed address.
|
||||||
|
|
||||||
For generic KASAN the size of each memory granule is 8. The state of each
|
For generic KASAN, the size of each memory granule is 8. The state of each
|
||||||
granule is encoded in one shadow byte. Those 8 bytes can be accessible,
|
granule is encoded in one shadow byte. Those 8 bytes can be accessible,
|
||||||
partially accessible, freed or be a part of a redzone. KASAN uses the following
|
partially accessible, freed, or be a part of a redzone. KASAN uses the following
|
||||||
encoding for each shadow byte: 0 means that all 8 bytes of the corresponding
|
encoding for each shadow byte: 00 means that all 8 bytes of the corresponding
|
||||||
memory region are accessible; number N (1 <= N <= 7) means that the first N
|
memory region are accessible; number N (1 <= N <= 7) means that the first N
|
||||||
bytes are accessible, and other (8 - N) bytes are not; any negative value
|
bytes are accessible, and other (8 - N) bytes are not; any negative value
|
||||||
indicates that the entire 8-byte word is inaccessible. KASAN uses different
|
indicates that the entire 8-byte word is inaccessible. KASAN uses different
|
||||||
negative values to distinguish between different kinds of inaccessible memory
|
negative values to distinguish between different kinds of inaccessible memory
|
||||||
like redzones or freed memory (see mm/kasan/kasan.h).
|
like redzones or freed memory (see mm/kasan/kasan.h).
|
||||||
|
|
||||||
In the report above the arrows point to the shadow byte 03, which means that
|
In the report above, the arrow points to the shadow byte ``03``, which means
|
||||||
the accessed address is partially accessible. For tag-based KASAN modes this
|
that the accessed address is partially accessible.
|
||||||
last report section shows the memory tags around the accessed address
|
|
||||||
(see the `Implementation details`_ section).
|
For tag-based KASAN modes, this last report section shows the memory tags around
|
||||||
|
the accessed address (see the `Implementation details`_ section).
|
||||||
|
|
||||||
|
Note that KASAN bug titles (like ``slab-out-of-bounds`` or ``use-after-free``)
|
||||||
|
are best-effort: KASAN prints the most probable bug type based on the limited
|
||||||
|
information it has. The actual type of the bug might be different.
|
||||||
|
|
||||||
|
Generic KASAN also reports up to two auxiliary call stack traces. These stack
|
||||||
|
traces point to places in code that interacted with the object but that are not
|
||||||
|
directly present in the bad access stack trace. Currently, this includes
|
||||||
|
call_rcu() and workqueue queuing.
|
||||||
|
|
||||||
Boot parameters
|
Boot parameters
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
KASAN is affected by the generic ``panic_on_warn`` command line parameter.
|
||||||
|
When it is enabled, KASAN panics the kernel after printing a bug report.
|
||||||
|
|
||||||
|
By default, KASAN prints a bug report only for the first invalid memory access.
|
||||||
|
With ``kasan_multi_shot``, KASAN prints a report on every invalid access. This
|
||||||
|
effectively disables ``panic_on_warn`` for KASAN reports.
|
||||||
|
|
||||||
Hardware tag-based KASAN mode (see the section about various modes below) is
|
Hardware tag-based KASAN mode (see the section about various modes below) is
|
||||||
intended for use in production as a security mitigation. Therefore, it supports
|
intended for use in production as a security mitigation. Therefore, it supports
|
||||||
boot parameters that allow to disable KASAN competely or otherwise control
|
boot parameters that allow disabling KASAN or controlling its features.
|
||||||
particular KASAN features.
|
|
||||||
|
|
||||||
- ``kasan=off`` or ``=on`` controls whether KASAN is enabled (default: ``on``).
|
- ``kasan=off`` or ``=on`` controls whether KASAN is enabled (default: ``on``).
|
||||||
|
|
||||||
|
- ``kasan.mode=sync`` or ``=async`` controls whether KASAN is configured in
|
||||||
|
synchronous or asynchronous mode of execution (default: ``sync``).
|
||||||
|
Synchronous mode: a bad access is detected immediately when a tag
|
||||||
|
check fault occurs.
|
||||||
|
Asynchronous mode: a bad access detection is delayed. When a tag check
|
||||||
|
fault occurs, the information is stored in hardware (in the TFSR_EL1
|
||||||
|
register for arm64). The kernel periodically checks the hardware and
|
||||||
|
only reports tag faults during these checks.
|
||||||
|
|
||||||
- ``kasan.stacktrace=off`` or ``=on`` disables or enables alloc and free stack
|
- ``kasan.stacktrace=off`` or ``=on`` disables or enables alloc and free stack
|
||||||
traces collection (default: ``on``).
|
traces collection (default: ``on``).
|
||||||
|
|
||||||
- ``kasan.fault=report`` or ``=panic`` controls whether to only print a KASAN
|
- ``kasan.fault=report`` or ``=panic`` controls whether to only print a KASAN
|
||||||
report or also panic the kernel (default: ``report``). Note, that tag
|
report or also panic the kernel (default: ``report``). The panic happens even
|
||||||
checking gets disabled after the first reported bug.
|
if ``kasan_multi_shot`` is enabled.
|
||||||
|
|
||||||
For developers
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Software KASAN modes use compiler instrumentation to insert validity checks.
|
|
||||||
Such instrumentation might be incompatible with some part of the kernel, and
|
|
||||||
therefore needs to be disabled. To disable instrumentation for specific files
|
|
||||||
or directories, add a line similar to the following to the respective kernel
|
|
||||||
Makefile:
|
|
||||||
|
|
||||||
- For a single file (e.g. main.o)::
|
|
||||||
|
|
||||||
KASAN_SANITIZE_main.o := n
|
|
||||||
|
|
||||||
- For all files in one directory::
|
|
||||||
|
|
||||||
KASAN_SANITIZE := n
|
|
||||||
|
|
||||||
|
|
||||||
Implementation details
|
Implementation details
|
||||||
----------------------
|
----------------------
|
||||||
@ -192,12 +209,11 @@ Implementation details
|
|||||||
Generic KASAN
|
Generic KASAN
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
From a high level perspective, KASAN's approach to memory error detection is
|
Software KASAN modes use shadow memory to record whether each byte of memory is
|
||||||
similar to that of kmemcheck: use shadow memory to record whether each byte of
|
safe to access and use compile-time instrumentation to insert shadow memory
|
||||||
memory is safe to access, and use compile-time instrumentation to insert checks
|
checks before each memory access.
|
||||||
of shadow memory on each memory access.
|
|
||||||
|
|
||||||
Generic KASAN dedicates 1/8th of kernel memory to its shadow memory (e.g. 16TB
|
Generic KASAN dedicates 1/8th of kernel memory to its shadow memory (16TB
|
||||||
to cover 128TB on x86_64) and uses direct mapping with a scale and offset to
|
to cover 128TB on x86_64) and uses direct mapping with a scale and offset to
|
||||||
translate a memory address to its corresponding shadow address.
|
translate a memory address to its corresponding shadow address.
|
||||||
|
|
||||||
@ -206,113 +222,105 @@ address::
|
|||||||
|
|
||||||
static inline void *kasan_mem_to_shadow(const void *addr)
|
static inline void *kasan_mem_to_shadow(const void *addr)
|
||||||
{
|
{
|
||||||
return ((unsigned long)addr >> KASAN_SHADOW_SCALE_SHIFT)
|
return (void *)((unsigned long)addr >> KASAN_SHADOW_SCALE_SHIFT)
|
||||||
+ KASAN_SHADOW_OFFSET;
|
+ KASAN_SHADOW_OFFSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
where ``KASAN_SHADOW_SCALE_SHIFT = 3``.
|
where ``KASAN_SHADOW_SCALE_SHIFT = 3``.
|
||||||
|
|
||||||
Compile-time instrumentation is used to insert memory access checks. Compiler
|
Compile-time instrumentation is used to insert memory access checks. Compiler
|
||||||
inserts function calls (__asan_load*(addr), __asan_store*(addr)) before each
|
inserts function calls (``__asan_load*(addr)``, ``__asan_store*(addr)``) before
|
||||||
memory access of size 1, 2, 4, 8 or 16. These functions check whether memory
|
each memory access of size 1, 2, 4, 8, or 16. These functions check whether
|
||||||
access is valid or not by checking corresponding shadow memory.
|
memory accesses are valid or not by checking corresponding shadow memory.
|
||||||
|
|
||||||
GCC 5.0 has possibility to perform inline instrumentation. Instead of making
|
With inline instrumentation, instead of making function calls, the compiler
|
||||||
function calls GCC directly inserts the code to check the shadow memory.
|
directly inserts the code to check shadow memory. This option significantly
|
||||||
This option significantly enlarges kernel but it gives x1.1-x2 performance
|
enlarges the kernel, but it gives an x1.1-x2 performance boost over the
|
||||||
boost over outline instrumented kernel.
|
outline-instrumented kernel.
|
||||||
|
|
||||||
Generic KASAN also reports the last 2 call stacks to creation of work that
|
Generic KASAN is the only mode that delays the reuse of freed objects via
|
||||||
potentially has access to an object. Call stacks for the following are shown:
|
|
||||||
call_rcu() and workqueue queuing.
|
|
||||||
|
|
||||||
Generic KASAN is the only mode that delays the reuse of freed object via
|
|
||||||
quarantine (see mm/kasan/quarantine.c for implementation).
|
quarantine (see mm/kasan/quarantine.c for implementation).
|
||||||
|
|
||||||
Software tag-based KASAN
|
Software tag-based KASAN
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Software tag-based KASAN requires software memory tagging support in the form
|
Software tag-based KASAN uses a software memory tagging approach to checking
|
||||||
of HWASan-like compiler instrumentation (see HWASan documentation for details).
|
access validity. It is currently only implemented for the arm64 architecture.
|
||||||
|
|
||||||
Software tag-based KASAN is currently only implemented for arm64 architecture.
|
|
||||||
|
|
||||||
Software tag-based KASAN uses the Top Byte Ignore (TBI) feature of arm64 CPUs
|
Software tag-based KASAN uses the Top Byte Ignore (TBI) feature of arm64 CPUs
|
||||||
to store a pointer tag in the top byte of kernel pointers. Like generic KASAN
|
to store a pointer tag in the top byte of kernel pointers. It uses shadow memory
|
||||||
it uses shadow memory to store memory tags associated with each 16-byte memory
|
to store memory tags associated with each 16-byte memory cell (therefore, it
|
||||||
cell (therefore it dedicates 1/16th of the kernel memory for shadow memory).
|
dedicates 1/16th of the kernel memory for shadow memory).
|
||||||
|
|
||||||
On each memory allocation software tag-based KASAN generates a random tag, tags
|
On each memory allocation, software tag-based KASAN generates a random tag, tags
|
||||||
the allocated memory with this tag, and embeds this tag into the returned
|
the allocated memory with this tag, and embeds the same tag into the returned
|
||||||
pointer.
|
pointer.
|
||||||
|
|
||||||
Software tag-based KASAN uses compile-time instrumentation to insert checks
|
Software tag-based KASAN uses compile-time instrumentation to insert checks
|
||||||
before each memory access. These checks make sure that tag of the memory that
|
before each memory access. These checks make sure that the tag of the memory
|
||||||
is being accessed is equal to tag of the pointer that is used to access this
|
that is being accessed is equal to the tag of the pointer that is used to access
|
||||||
memory. In case of a tag mismatch software tag-based KASAN prints a bug report.
|
this memory. In case of a tag mismatch, software tag-based KASAN prints a bug
|
||||||
|
report.
|
||||||
|
|
||||||
Software tag-based KASAN also has two instrumentation modes (outline, that
|
Software tag-based KASAN also has two instrumentation modes (outline, which
|
||||||
emits callbacks to check memory accesses; and inline, that performs the shadow
|
emits callbacks to check memory accesses; and inline, which performs the shadow
|
||||||
memory checks inline). With outline instrumentation mode, a bug report is
|
memory checks inline). With outline instrumentation mode, a bug report is
|
||||||
simply printed from the function that performs the access check. With inline
|
printed from the function that performs the access check. With inline
|
||||||
instrumentation a brk instruction is emitted by the compiler, and a dedicated
|
instrumentation, a ``brk`` instruction is emitted by the compiler, and a
|
||||||
brk handler is used to print bug reports.
|
dedicated ``brk`` handler is used to print bug reports.
|
||||||
|
|
||||||
Software tag-based KASAN uses 0xFF as a match-all pointer tag (accesses through
|
Software tag-based KASAN uses 0xFF as a match-all pointer tag (accesses through
|
||||||
pointers with 0xFF pointer tag aren't checked). The value 0xFE is currently
|
pointers with the 0xFF pointer tag are not checked). The value 0xFE is currently
|
||||||
reserved to tag freed memory regions.
|
reserved to tag freed memory regions.
|
||||||
|
|
||||||
Software tag-based KASAN currently only supports tagging of
|
Software tag-based KASAN currently only supports tagging of slab and page_alloc
|
||||||
kmem_cache_alloc/kmalloc and page_alloc memory.
|
memory.
|
||||||
|
|
||||||
Hardware tag-based KASAN
|
Hardware tag-based KASAN
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Hardware tag-based KASAN is similar to the software mode in concept, but uses
|
Hardware tag-based KASAN is similar to the software mode in concept but uses
|
||||||
hardware memory tagging support instead of compiler instrumentation and
|
hardware memory tagging support instead of compiler instrumentation and
|
||||||
shadow memory.
|
shadow memory.
|
||||||
|
|
||||||
Hardware tag-based KASAN is currently only implemented for arm64 architecture
|
Hardware tag-based KASAN is currently only implemented for arm64 architecture
|
||||||
and based on both arm64 Memory Tagging Extension (MTE) introduced in ARMv8.5
|
and based on both arm64 Memory Tagging Extension (MTE) introduced in ARMv8.5
|
||||||
Instruction Set Architecture, and Top Byte Ignore (TBI).
|
Instruction Set Architecture and Top Byte Ignore (TBI).
|
||||||
|
|
||||||
Special arm64 instructions are used to assign memory tags for each allocation.
|
Special arm64 instructions are used to assign memory tags for each allocation.
|
||||||
Same tags are assigned to pointers to those allocations. On every memory
|
Same tags are assigned to pointers to those allocations. On every memory
|
||||||
access, hardware makes sure that tag of the memory that is being accessed is
|
access, hardware makes sure that the tag of the memory that is being accessed is
|
||||||
equal to tag of the pointer that is used to access this memory. In case of a
|
equal to the tag of the pointer that is used to access this memory. In case of a
|
||||||
tag mismatch a fault is generated and a report is printed.
|
tag mismatch, a fault is generated, and a report is printed.
|
||||||
|
|
||||||
Hardware tag-based KASAN uses 0xFF as a match-all pointer tag (accesses through
|
Hardware tag-based KASAN uses 0xFF as a match-all pointer tag (accesses through
|
||||||
pointers with 0xFF pointer tag aren't checked). The value 0xFE is currently
|
pointers with the 0xFF pointer tag are not checked). The value 0xFE is currently
|
||||||
reserved to tag freed memory regions.
|
reserved to tag freed memory regions.
|
||||||
|
|
||||||
Hardware tag-based KASAN currently only supports tagging of
|
Hardware tag-based KASAN currently only supports tagging of slab and page_alloc
|
||||||
kmem_cache_alloc/kmalloc and page_alloc memory.
|
memory.
|
||||||
|
|
||||||
If the hardware doesn't support MTE (pre ARMv8.5), hardware tag-based KASAN
|
If the hardware does not support MTE (pre ARMv8.5), hardware tag-based KASAN
|
||||||
won't be enabled. In this case all boot parameters are ignored.
|
will not be enabled. In this case, all KASAN boot parameters are ignored.
|
||||||
|
|
||||||
Note, that enabling CONFIG_KASAN_HW_TAGS always results in in-kernel TBI being
|
Note that enabling CONFIG_KASAN_HW_TAGS always results in in-kernel TBI being
|
||||||
enabled. Even when kasan.mode=off is provided, or when the hardware doesn't
|
enabled. Even when ``kasan.mode=off`` is provided or when the hardware does not
|
||||||
support MTE (but supports TBI).
|
support MTE (but supports TBI).
|
||||||
|
|
||||||
Hardware tag-based KASAN only reports the first found bug. After that MTE tag
|
Hardware tag-based KASAN only reports the first found bug. After that, MTE tag
|
||||||
checking gets disabled.
|
checking gets disabled.
|
||||||
|
|
||||||
What memory accesses are sanitised by KASAN?
|
Shadow memory
|
||||||
--------------------------------------------
|
-------------
|
||||||
|
|
||||||
The kernel maps memory in a number of different parts of the address
|
The kernel maps memory in several different parts of the address space.
|
||||||
space. This poses something of a problem for KASAN, which requires
|
The range of kernel virtual addresses is large: there is not enough real
|
||||||
that all addresses accessed by instrumented code have a valid shadow
|
memory to support a real shadow region for every address that could be
|
||||||
region.
|
accessed by the kernel. Therefore, KASAN only maps real shadow for certain
|
||||||
|
parts of the address space.
|
||||||
|
|
||||||
The range of kernel virtual addresses is large: there is not enough
|
Default behaviour
|
||||||
real memory to support a real shadow region for every address that
|
~~~~~~~~~~~~~~~~~
|
||||||
could be accessed by the kernel.
|
|
||||||
|
|
||||||
By default
|
|
||||||
~~~~~~~~~~
|
|
||||||
|
|
||||||
By default, architectures only map real memory over the shadow region
|
By default, architectures only map real memory over the shadow region
|
||||||
for the linear mapping (and potentially other small areas). For all
|
for the linear mapping (and potentially other small areas). For all
|
||||||
@ -321,10 +329,9 @@ page is mapped over the shadow area. This read-only shadow page
|
|||||||
declares all memory accesses as permitted.
|
declares all memory accesses as permitted.
|
||||||
|
|
||||||
This presents a problem for modules: they do not live in the linear
|
This presents a problem for modules: they do not live in the linear
|
||||||
mapping, but in a dedicated module space. By hooking in to the module
|
mapping but in a dedicated module space. By hooking into the module
|
||||||
allocator, KASAN can temporarily map real shadow memory to cover
|
allocator, KASAN temporarily maps real shadow memory to cover them.
|
||||||
them. This allows detection of invalid accesses to module globals, for
|
This allows detection of invalid accesses to module globals, for example.
|
||||||
example.
|
|
||||||
|
|
||||||
This also creates an incompatibility with ``VMAP_STACK``: if the stack
|
This also creates an incompatibility with ``VMAP_STACK``: if the stack
|
||||||
lives in vmalloc space, it will be shadowed by the read-only page, and
|
lives in vmalloc space, it will be shadowed by the read-only page, and
|
||||||
@ -335,9 +342,10 @@ CONFIG_KASAN_VMALLOC
|
|||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
With ``CONFIG_KASAN_VMALLOC``, KASAN can cover vmalloc space at the
|
With ``CONFIG_KASAN_VMALLOC``, KASAN can cover vmalloc space at the
|
||||||
cost of greater memory usage. Currently this is only supported on x86.
|
cost of greater memory usage. Currently, this is supported on x86,
|
||||||
|
riscv, s390, and powerpc.
|
||||||
|
|
||||||
This works by hooking into vmalloc and vmap, and dynamically
|
This works by hooking into vmalloc and vmap and dynamically
|
||||||
allocating real shadow memory to back the mappings.
|
allocating real shadow memory to back the mappings.
|
||||||
|
|
||||||
Most mappings in vmalloc space are small, requiring less than a full
|
Most mappings in vmalloc space are small, requiring less than a full
|
||||||
@ -356,28 +364,76 @@ memory.
|
|||||||
|
|
||||||
To avoid the difficulties around swapping mappings around, KASAN expects
|
To avoid the difficulties around swapping mappings around, KASAN expects
|
||||||
that the part of the shadow region that covers the vmalloc space will
|
that the part of the shadow region that covers the vmalloc space will
|
||||||
not be covered by the early shadow page, but will be left
|
not be covered by the early shadow page but will be left unmapped.
|
||||||
unmapped. This will require changes in arch-specific code.
|
This will require changes in arch-specific code.
|
||||||
|
|
||||||
This allows ``VMAP_STACK`` support on x86, and can simplify support of
|
This allows ``VMAP_STACK`` support on x86 and can simplify support of
|
||||||
architectures that do not have a fixed module region.
|
architectures that do not have a fixed module region.
|
||||||
|
|
||||||
CONFIG_KASAN_KUNIT_TEST and CONFIG_KASAN_MODULE_TEST
|
For developers
|
||||||
----------------------------------------------------
|
--------------
|
||||||
|
|
||||||
KASAN tests consist of two parts:
|
Ignoring accesses
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Software KASAN modes use compiler instrumentation to insert validity checks.
|
||||||
|
Such instrumentation might be incompatible with some parts of the kernel, and
|
||||||
|
therefore needs to be disabled.
|
||||||
|
|
||||||
|
Other parts of the kernel might access metadata for allocated objects.
|
||||||
|
Normally, KASAN detects and reports such accesses, but in some cases (e.g.,
|
||||||
|
in memory allocators), these accesses are valid.
|
||||||
|
|
||||||
|
For software KASAN modes, to disable instrumentation for a specific file or
|
||||||
|
directory, add a ``KASAN_SANITIZE`` annotation to the respective kernel
|
||||||
|
Makefile:
|
||||||
|
|
||||||
|
- For a single file (e.g., main.o)::
|
||||||
|
|
||||||
|
KASAN_SANITIZE_main.o := n
|
||||||
|
|
||||||
|
- For all files in one directory::
|
||||||
|
|
||||||
|
KASAN_SANITIZE := n
|
||||||
|
|
||||||
|
For software KASAN modes, to disable instrumentation on a per-function basis,
|
||||||
|
use the KASAN-specific ``__no_sanitize_address`` function attribute or the
|
||||||
|
generic ``noinstr`` one.
|
||||||
|
|
||||||
|
Note that disabling compiler instrumentation (either on a per-file or a
|
||||||
|
per-function basis) makes KASAN ignore the accesses that happen directly in
|
||||||
|
that code for software KASAN modes. It does not help when the accesses happen
|
||||||
|
indirectly (through calls to instrumented functions) or with the hardware
|
||||||
|
tag-based mode that does not use compiler instrumentation.
|
||||||
|
|
||||||
|
For software KASAN modes, to disable KASAN reports in a part of the kernel code
|
||||||
|
for the current task, annotate this part of the code with a
|
||||||
|
``kasan_disable_current()``/``kasan_enable_current()`` section. This also
|
||||||
|
disables the reports for indirect accesses that happen through function calls.
|
||||||
|
|
||||||
|
For tag-based KASAN modes (include the hardware one), to disable access
|
||||||
|
checking, use ``kasan_reset_tag()`` or ``page_kasan_tag_reset()``. Note that
|
||||||
|
temporarily disabling access checking via ``page_kasan_tag_reset()`` requires
|
||||||
|
saving and restoring the per-page KASAN tag via
|
||||||
|
``page_kasan_tag``/``page_kasan_tag_set``.
|
||||||
|
|
||||||
|
Tests
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
There are KASAN tests that allow verifying that KASAN works and can detect
|
||||||
|
certain types of memory corruptions. The tests consist of two parts:
|
||||||
|
|
||||||
1. Tests that are integrated with the KUnit Test Framework. Enabled with
|
1. Tests that are integrated with the KUnit Test Framework. Enabled with
|
||||||
``CONFIG_KASAN_KUNIT_TEST``. These tests can be run and partially verified
|
``CONFIG_KASAN_KUNIT_TEST``. These tests can be run and partially verified
|
||||||
automatically in a few different ways, see the instructions below.
|
automatically in a few different ways; see the instructions below.
|
||||||
|
|
||||||
2. Tests that are currently incompatible with KUnit. Enabled with
|
2. Tests that are currently incompatible with KUnit. Enabled with
|
||||||
``CONFIG_KASAN_MODULE_TEST`` and can only be run as a module. These tests can
|
``CONFIG_KASAN_MODULE_TEST`` and can only be run as a module. These tests can
|
||||||
only be verified manually, by loading the kernel module and inspecting the
|
only be verified manually by loading the kernel module and inspecting the
|
||||||
kernel log for KASAN reports.
|
kernel log for KASAN reports.
|
||||||
|
|
||||||
Each KUnit-compatible KASAN test prints a KASAN report if an error is detected.
|
Each KUnit-compatible KASAN test prints one of multiple KASAN reports if an
|
||||||
Then the test prints its number and status.
|
error is detected. Then the test prints its number and status.
|
||||||
|
|
||||||
When a test passes::
|
When a test passes::
|
||||||
|
|
||||||
@ -405,30 +461,24 @@ Or, if one of the tests failed::
|
|||||||
|
|
||||||
not ok 1 - kasan
|
not ok 1 - kasan
|
||||||
|
|
||||||
|
|
||||||
There are a few ways to run KUnit-compatible KASAN tests.
|
There are a few ways to run KUnit-compatible KASAN tests.
|
||||||
|
|
||||||
1. Loadable module
|
1. Loadable module
|
||||||
~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
With ``CONFIG_KUNIT`` enabled, ``CONFIG_KASAN_KUNIT_TEST`` can be built as
|
With ``CONFIG_KUNIT`` enabled, KASAN-KUnit tests can be built as a loadable
|
||||||
a loadable module and run on any architecture that supports KASAN by loading
|
module and run by loading ``test_kasan.ko`` with ``insmod`` or ``modprobe``.
|
||||||
the module with insmod or modprobe. The module is called ``test_kasan``.
|
|
||||||
|
|
||||||
2. Built-In
|
2. Built-In
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
With ``CONFIG_KUNIT`` built-in, ``CONFIG_KASAN_KUNIT_TEST`` can be built-in
|
With ``CONFIG_KUNIT`` built-in, KASAN-KUnit tests can be built-in as well.
|
||||||
on any architecure that supports KASAN. These and any other KUnit tests enabled
|
In this case, the tests will run at boot as a late-init call.
|
||||||
will run and print the results at boot as a late-init call.
|
|
||||||
|
|
||||||
3. Using kunit_tool
|
3. Using kunit_tool
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
With ``CONFIG_KUNIT`` and ``CONFIG_KASAN_KUNIT_TEST`` built-in, it's also
|
With ``CONFIG_KUNIT`` and ``CONFIG_KASAN_KUNIT_TEST`` built-in, it is also
|
||||||
possible use ``kunit_tool`` to see the results of these and other KUnit tests
|
possible to use ``kunit_tool`` to see the results of KUnit tests in a more
|
||||||
in a more readable way. This will not print the KASAN reports of the tests that
|
readable way. This will not print the KASAN reports of the tests that passed.
|
||||||
passed. Use `KUnit documentation <https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html>`_
|
See `KUnit documentation <https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html>`_
|
||||||
for more up-to-date information on ``kunit_tool``.
|
for more up-to-date information on ``kunit_tool``.
|
||||||
|
|
||||||
.. _KUnit: https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html
|
.. _KUnit: https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
.. Copyright (C) 2019, Google LLC.
|
||||||
|
|
||||||
The Kernel Concurrency Sanitizer (KCSAN)
|
The Kernel Concurrency Sanitizer (KCSAN)
|
||||||
========================================
|
========================================
|
||||||
|
|
||||||
|
@ -78,8 +78,82 @@ Similarly to the above, it can be useful to add test-specific logic.
|
|||||||
void test_only_hook(void) { }
|
void test_only_hook(void) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TODO(dlatypov@google.com): add an example of using ``current->kunit_test`` in
|
This test-only code can be made more useful by accessing the current kunit
|
||||||
such a hook when it's not only updated for ``CONFIG_KASAN=y``.
|
test, see below.
|
||||||
|
|
||||||
|
Accessing the current test
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
In some cases, you need to call test-only code from outside the test file, e.g.
|
||||||
|
like in the example above or if you're providing a fake implementation of an
|
||||||
|
ops struct.
|
||||||
|
There is a ``kunit_test`` field in ``task_struct``, so you can access it via
|
||||||
|
``current->kunit_test``.
|
||||||
|
|
||||||
|
Here's a slightly in-depth example of how one could implement "mocking":
|
||||||
|
|
||||||
|
.. code-block:: c
|
||||||
|
|
||||||
|
#include <linux/sched.h> /* for current */
|
||||||
|
|
||||||
|
struct test_data {
|
||||||
|
int foo_result;
|
||||||
|
int want_foo_called_with;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int fake_foo(int arg)
|
||||||
|
{
|
||||||
|
struct kunit *test = current->kunit_test;
|
||||||
|
struct test_data *test_data = test->priv;
|
||||||
|
|
||||||
|
KUNIT_EXPECT_EQ(test, test_data->want_foo_called_with, arg);
|
||||||
|
return test_data->foo_result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void example_simple_test(struct kunit *test)
|
||||||
|
{
|
||||||
|
/* Assume priv is allocated in the suite's .init */
|
||||||
|
struct test_data *test_data = test->priv;
|
||||||
|
|
||||||
|
test_data->foo_result = 42;
|
||||||
|
test_data->want_foo_called_with = 1;
|
||||||
|
|
||||||
|
/* In a real test, we'd probably pass a pointer to fake_foo somewhere
|
||||||
|
* like an ops struct, etc. instead of calling it directly. */
|
||||||
|
KUNIT_EXPECT_EQ(test, fake_foo(1), 42);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Note: here we're able to get away with using ``test->priv``, but if you wanted
|
||||||
|
something more flexible you could use a named ``kunit_resource``, see :doc:`api/test`.
|
||||||
|
|
||||||
|
Failing the current test
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
But sometimes, you might just want to fail the current test. In that case, we
|
||||||
|
have ``kunit_fail_current_test(fmt, args...)`` which is defined in ``<kunit/test-bug.h>`` and
|
||||||
|
doesn't require pulling in ``<kunit/test.h>``.
|
||||||
|
|
||||||
|
E.g. say we had an option to enable some extra debug checks on some data structure:
|
||||||
|
|
||||||
|
.. code-block:: c
|
||||||
|
|
||||||
|
#include <kunit/test-bug.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_EXTRA_DEBUG_CHECKS
|
||||||
|
static void validate_my_data(struct data *data)
|
||||||
|
{
|
||||||
|
if (is_valid(data))
|
||||||
|
return;
|
||||||
|
|
||||||
|
kunit_fail_current_test("data %p is invalid", data);
|
||||||
|
|
||||||
|
/* Normal, non-KUnit, error reporting code here. */
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void my_debug_function(void) { }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
Customizing error messages
|
Customizing error messages
|
||||||
--------------------------
|
--------------------------
|
||||||
|
117
Documentation/dev-tools/testing-overview.rst
Normal file
117
Documentation/dev-tools/testing-overview.rst
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
====================
|
||||||
|
Kernel Testing Guide
|
||||||
|
====================
|
||||||
|
|
||||||
|
|
||||||
|
There are a number of different tools for testing the Linux kernel, so knowing
|
||||||
|
when to use each of them can be a challenge. This document provides a rough
|
||||||
|
overview of their differences, and how they fit together.
|
||||||
|
|
||||||
|
|
||||||
|
Writing and Running Tests
|
||||||
|
=========================
|
||||||
|
|
||||||
|
The bulk of kernel tests are written using either the kselftest or KUnit
|
||||||
|
frameworks. These both provide infrastructure to help make running tests and
|
||||||
|
groups of tests easier, as well as providing helpers to aid in writing new
|
||||||
|
tests.
|
||||||
|
|
||||||
|
If you're looking to verify the behaviour of the Kernel — particularly specific
|
||||||
|
parts of the kernel — then you'll want to use KUnit or kselftest.
|
||||||
|
|
||||||
|
|
||||||
|
The Difference Between KUnit and kselftest
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
KUnit (Documentation/dev-tools/kunit/index.rst) is an entirely in-kernel system
|
||||||
|
for "white box" testing: because test code is part of the kernel, it can access
|
||||||
|
internal structures and functions which aren't exposed to userspace.
|
||||||
|
|
||||||
|
KUnit tests therefore are best written against small, self-contained parts
|
||||||
|
of the kernel, which can be tested in isolation. This aligns well with the
|
||||||
|
concept of 'unit' testing.
|
||||||
|
|
||||||
|
For example, a KUnit test might test an individual kernel function (or even a
|
||||||
|
single codepath through a function, such as an error handling case), rather
|
||||||
|
than a feature as a whole.
|
||||||
|
|
||||||
|
This also makes KUnit tests very fast to build and run, allowing them to be
|
||||||
|
run frequently as part of the development process.
|
||||||
|
|
||||||
|
There is a KUnit test style guide which may give further pointers in
|
||||||
|
Documentation/dev-tools/kunit/style.rst
|
||||||
|
|
||||||
|
|
||||||
|
kselftest (Documentation/dev-tools/kselftest.rst), on the other hand, is
|
||||||
|
largely implemented in userspace, and tests are normal userspace scripts or
|
||||||
|
programs.
|
||||||
|
|
||||||
|
This makes it easier to write more complicated tests, or tests which need to
|
||||||
|
manipulate the overall system state more (e.g., spawning processes, etc.).
|
||||||
|
However, it's not possible to call kernel functions directly from kselftest.
|
||||||
|
This means that only kernel functionality which is exposed to userspace somehow
|
||||||
|
(e.g. by a syscall, device, filesystem, etc.) can be tested with kselftest. To
|
||||||
|
work around this, some tests include a companion kernel module which exposes
|
||||||
|
more information or functionality. If a test runs mostly or entirely within the
|
||||||
|
kernel, however, KUnit may be the more appropriate tool.
|
||||||
|
|
||||||
|
kselftest is therefore suited well to tests of whole features, as these will
|
||||||
|
expose an interface to userspace, which can be tested, but not implementation
|
||||||
|
details. This aligns well with 'system' or 'end-to-end' testing.
|
||||||
|
|
||||||
|
For example, all new system calls should be accompanied by kselftest tests.
|
||||||
|
|
||||||
|
Code Coverage Tools
|
||||||
|
===================
|
||||||
|
|
||||||
|
The Linux Kernel supports two different code coverage measurement tools. These
|
||||||
|
can be used to verify that a test is executing particular functions or lines
|
||||||
|
of code. This is useful for determining how much of the kernel is being tested,
|
||||||
|
and for finding corner-cases which are not covered by the appropriate test.
|
||||||
|
|
||||||
|
:doc:`gcov` is GCC's coverage testing tool, which can be used with the kernel
|
||||||
|
to get global or per-module coverage. Unlike KCOV, it does not record per-task
|
||||||
|
coverage. Coverage data can be read from debugfs, and interpreted using the
|
||||||
|
usual gcov tooling.
|
||||||
|
|
||||||
|
:doc:`kcov` is a feature which can be built in to the kernel to allow
|
||||||
|
capturing coverage on a per-task level. It's therefore useful for fuzzing and
|
||||||
|
other situations where information about code executed during, for example, a
|
||||||
|
single syscall is useful.
|
||||||
|
|
||||||
|
|
||||||
|
Dynamic Analysis Tools
|
||||||
|
======================
|
||||||
|
|
||||||
|
The kernel also supports a number of dynamic analysis tools, which attempt to
|
||||||
|
detect classes of issues when they occur in a running kernel. These typically
|
||||||
|
each look for a different class of bugs, such as invalid memory accesses,
|
||||||
|
concurrency issues such as data races, or other undefined behaviour like
|
||||||
|
integer overflows.
|
||||||
|
|
||||||
|
Some of these tools are listed below:
|
||||||
|
|
||||||
|
* kmemleak detects possible memory leaks. See
|
||||||
|
Documentation/dev-tools/kmemleak.rst
|
||||||
|
* KASAN detects invalid memory accesses such as out-of-bounds and
|
||||||
|
use-after-free errors. See Documentation/dev-tools/kasan.rst
|
||||||
|
* UBSAN detects behaviour that is undefined by the C standard, like integer
|
||||||
|
overflows. See Documentation/dev-tools/ubsan.rst
|
||||||
|
* KCSAN detects data races. See Documentation/dev-tools/kcsan.rst
|
||||||
|
* KFENCE is a low-overhead detector of memory issues, which is much faster than
|
||||||
|
KASAN and can be used in production. See Documentation/dev-tools/kfence.rst
|
||||||
|
* lockdep is a locking correctness validator. See
|
||||||
|
Documentation/locking/lockdep-design.rst
|
||||||
|
* There are several other pieces of debug instrumentation in the kernel, many
|
||||||
|
of which can be found in lib/Kconfig.debug
|
||||||
|
|
||||||
|
These tools tend to test the kernel as a whole, and do not "pass" like
|
||||||
|
kselftest or KUnit tests. They can be combined with KUnit or kselftest by
|
||||||
|
running tests on a kernel with these tools enabled: you can then be sure
|
||||||
|
that none of these errors are occurring during the test.
|
||||||
|
|
||||||
|
Some of these tools integrate with KUnit or kselftest and will
|
||||||
|
automatically fail tests if an issue is detected.
|
||||||
|
|
4
Documentation/devicetree/bindings/.gitignore
vendored
4
Documentation/devicetree/bindings/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
*.example.dts
|
*.example.dts
|
||||||
processed-schema*.yaml
|
/processed-schema*.yaml
|
||||||
processed-schema*.json
|
/processed-schema*.json
|
||||||
|
@ -5,7 +5,7 @@ DT_MK_SCHEMA ?= dt-mk-schema
|
|||||||
|
|
||||||
DT_SCHEMA_LINT = $(shell which yamllint)
|
DT_SCHEMA_LINT = $(shell which yamllint)
|
||||||
|
|
||||||
DT_SCHEMA_MIN_VERSION = 2020.8.1
|
DT_SCHEMA_MIN_VERSION = 2021.2.1
|
||||||
|
|
||||||
PHONY += check_dtschema_version
|
PHONY += check_dtschema_version
|
||||||
check_dtschema_version:
|
check_dtschema_version:
|
||||||
@ -48,13 +48,16 @@ define rule_chkdt
|
|||||||
$(call cmd,mk_schema)
|
$(call cmd,mk_schema)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
DT_DOCS = $(shell $(find_cmd) | sed -e 's|^$(srctree)/||')
|
DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_cmd)))
|
||||||
|
|
||||||
override DTC_FLAGS := \
|
override DTC_FLAGS := \
|
||||||
-Wno-avoid_unnecessary_addr_size \
|
-Wno-avoid_unnecessary_addr_size \
|
||||||
-Wno-graph_child_address \
|
-Wno-graph_child_address \
|
||||||
-Wno-interrupt_provider
|
-Wno-interrupt_provider
|
||||||
|
|
||||||
|
# Disable undocumented compatible checks until warning free
|
||||||
|
override DT_CHECKER_FLAGS ?=
|
||||||
|
|
||||||
$(obj)/processed-schema-examples.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE
|
$(obj)/processed-schema-examples.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE
|
||||||
$(call if_changed_rule,chkdt)
|
$(call if_changed_rule,chkdt)
|
||||||
|
|
||||||
|
@ -109,6 +109,7 @@ properties:
|
|||||||
- libretech,aml-s905d-pc
|
- libretech,aml-s905d-pc
|
||||||
- phicomm,n1
|
- phicomm,n1
|
||||||
- smartlabs,sml5442tw
|
- smartlabs,sml5442tw
|
||||||
|
- videostrong,gxl-kii-pro
|
||||||
- const: amlogic,s905d
|
- const: amlogic,s905d
|
||||||
- const: amlogic,meson-gxl
|
- const: amlogic,meson-gxl
|
||||||
|
|
||||||
@ -120,8 +121,10 @@ properties:
|
|||||||
- khadas,vim2
|
- khadas,vim2
|
||||||
- kingnovel,r-box-pro
|
- kingnovel,r-box-pro
|
||||||
- libretech,aml-s912-pc
|
- libretech,aml-s912-pc
|
||||||
|
- minix,neo-u9h
|
||||||
- nexbox,a1
|
- nexbox,a1
|
||||||
- tronsmart,vega-s96
|
- tronsmart,vega-s96
|
||||||
|
- videostrong,gxm-kiii-pro
|
||||||
- wetek,core2
|
- wetek,core2
|
||||||
- const: amlogic,s912
|
- const: amlogic,s912
|
||||||
- const: amlogic,meson-gxm
|
- const: amlogic,meson-gxm
|
||||||
|
64
Documentation/devicetree/bindings/arm/apple.yaml
Normal file
64
Documentation/devicetree/bindings/arm/apple.yaml
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/arm/apple.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Apple ARM Machine Device Tree Bindings
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Hector Martin <marcan@marcan.st>
|
||||||
|
|
||||||
|
description: |
|
||||||
|
ARM platforms using SoCs designed by Apple Inc., branded "Apple Silicon".
|
||||||
|
|
||||||
|
This currently includes devices based on the "M1" SoC, starting with the
|
||||||
|
three Mac models released in late 2020:
|
||||||
|
|
||||||
|
- Mac mini (M1, 2020)
|
||||||
|
- MacBook Pro (13-inch, M1, 2020)
|
||||||
|
- MacBook Air (M1, 2020)
|
||||||
|
|
||||||
|
The compatible property should follow this format:
|
||||||
|
|
||||||
|
compatible = "apple,<targettype>", "apple,<socid>", "apple,arm-platform";
|
||||||
|
|
||||||
|
<targettype> represents the board/device and comes from the `target-type`
|
||||||
|
property of the root node of the Apple Device Tree, lowercased. It can be
|
||||||
|
queried on macOS using the following command:
|
||||||
|
|
||||||
|
$ ioreg -d2 -l | grep target-type
|
||||||
|
|
||||||
|
<socid> is the lowercased SoC ID. Apple uses at least *five* different
|
||||||
|
names for their SoCs:
|
||||||
|
|
||||||
|
- Marketing name ("M1")
|
||||||
|
- Internal name ("H13G")
|
||||||
|
- Codename ("Tonga")
|
||||||
|
- SoC ID ("T8103")
|
||||||
|
- Package/IC part number ("APL1102")
|
||||||
|
|
||||||
|
Devicetrees should use the lowercased SoC ID, to avoid confusion if
|
||||||
|
multiple SoCs share the same marketing name. This can be obtained from
|
||||||
|
the `compatible` property of the arm-io node of the Apple Device Tree,
|
||||||
|
which can be queried as follows on macOS:
|
||||||
|
|
||||||
|
$ ioreg -n arm-io | grep compatible
|
||||||
|
|
||||||
|
properties:
|
||||||
|
$nodename:
|
||||||
|
const: "/"
|
||||||
|
compatible:
|
||||||
|
oneOf:
|
||||||
|
- description: Apple M1 SoC based platforms
|
||||||
|
items:
|
||||||
|
- enum:
|
||||||
|
- apple,j274 # Mac mini (M1, 2020)
|
||||||
|
- apple,j293 # MacBook Pro (13-inch, M1, 2020)
|
||||||
|
- apple,j313 # MacBook Air (M1, 2020)
|
||||||
|
- const: apple,t8103
|
||||||
|
- const: apple,arm-platform
|
||||||
|
|
||||||
|
additionalProperties: true
|
||||||
|
|
||||||
|
...
|
@ -21,6 +21,7 @@ properties:
|
|||||||
items:
|
items:
|
||||||
- enum:
|
- enum:
|
||||||
- netgear,r8000p
|
- netgear,r8000p
|
||||||
|
- tplink,archer-c2300-v1
|
||||||
- const: brcm,bcm4906
|
- const: brcm,bcm4906
|
||||||
- const: brcm,bcm4908
|
- const: brcm,bcm4908
|
||||||
|
|
||||||
|
@ -26,10 +26,7 @@ properties:
|
|||||||
- const: simple-mfd
|
- const: simple-mfd
|
||||||
|
|
||||||
mboxes:
|
mboxes:
|
||||||
$ref: '/schemas/types.yaml#/definitions/phandle'
|
maxItems: 1
|
||||||
description: |
|
|
||||||
Phandle to the firmware device's Mailbox.
|
|
||||||
(See: ../mailbox/mailbox.txt for more information)
|
|
||||||
|
|
||||||
clocks:
|
clocks:
|
||||||
type: object
|
type: object
|
||||||
@ -64,6 +61,21 @@ properties:
|
|||||||
- compatible
|
- compatible
|
||||||
- "#reset-cells"
|
- "#reset-cells"
|
||||||
|
|
||||||
|
pwm:
|
||||||
|
type: object
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: raspberrypi,firmware-poe-pwm
|
||||||
|
|
||||||
|
"#pwm-cells":
|
||||||
|
# See pwm.yaml in this directory for a description of the cells format.
|
||||||
|
const: 2
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- "#pwm-cells"
|
||||||
|
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|
||||||
required:
|
required:
|
||||||
@ -87,5 +99,10 @@ examples:
|
|||||||
compatible = "raspberrypi,firmware-reset";
|
compatible = "raspberrypi,firmware-reset";
|
||||||
#reset-cells = <1>;
|
#reset-cells = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pwm: pwm {
|
||||||
|
compatible = "raspberrypi,firmware-poe-pwm";
|
||||||
|
#pwm-cells = <2>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
...
|
...
|
||||||
|
@ -85,6 +85,8 @@ properties:
|
|||||||
|
|
||||||
compatible:
|
compatible:
|
||||||
enum:
|
enum:
|
||||||
|
- apple,icestorm
|
||||||
|
- apple,firestorm
|
||||||
- arm,arm710t
|
- arm,arm710t
|
||||||
- arm,arm720t
|
- arm,arm720t
|
||||||
- arm,arm740t
|
- arm,arm740t
|
||||||
@ -256,13 +258,11 @@ properties:
|
|||||||
where voltage is in V, frequency is in MHz.
|
where voltage is in V, frequency is in MHz.
|
||||||
|
|
||||||
power-domains:
|
power-domains:
|
||||||
$ref: '/schemas/types.yaml#/definitions/phandle-array'
|
|
||||||
description:
|
description:
|
||||||
List of phandles and PM domain specifiers, as defined by bindings of the
|
List of phandles and PM domain specifiers, as defined by bindings of the
|
||||||
PM domain provider (see also ../power_domain.txt).
|
PM domain provider (see also ../power_domain.txt).
|
||||||
|
|
||||||
power-domain-names:
|
power-domain-names:
|
||||||
$ref: '/schemas/types.yaml#/definitions/string-array'
|
|
||||||
description:
|
description:
|
||||||
A list of power domain name strings sorted in the same order as the
|
A list of power domain name strings sorted in the same order as the
|
||||||
power-domains property.
|
power-domains property.
|
||||||
|
75
Documentation/devicetree/bindings/arm/ete.yaml
Normal file
75
Documentation/devicetree/bindings/arm/ete.yaml
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||||
|
# Copyright 2021, Arm Ltd
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: "http://devicetree.org/schemas/arm/ete.yaml#"
|
||||||
|
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||||
|
|
||||||
|
title: ARM Embedded Trace Extensions
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Suzuki K Poulose <suzuki.poulose@arm.com>
|
||||||
|
- Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||||
|
|
||||||
|
description: |
|
||||||
|
Arm Embedded Trace Extension(ETE) is a per CPU trace component that
|
||||||
|
allows tracing the CPU execution. It overlaps with the CoreSight ETMv4
|
||||||
|
architecture and has extended support for future architecture changes.
|
||||||
|
The trace generated by the ETE could be stored via legacy CoreSight
|
||||||
|
components (e.g, TMC-ETR) or other means (e.g, using a per CPU buffer
|
||||||
|
Arm Trace Buffer Extension (TRBE)). Since the ETE can be connected to
|
||||||
|
legacy CoreSight components, a node must be listed per instance, along
|
||||||
|
with any optional connection graph as per the coresight bindings.
|
||||||
|
See bindings/arm/coresight.txt.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
$nodename:
|
||||||
|
pattern: "^ete([0-9a-f]+)$"
|
||||||
|
compatible:
|
||||||
|
items:
|
||||||
|
- const: arm,embedded-trace-extension
|
||||||
|
|
||||||
|
cpu:
|
||||||
|
description: |
|
||||||
|
Handle to the cpu this ETE is bound to.
|
||||||
|
$ref: /schemas/types.yaml#/definitions/phandle
|
||||||
|
|
||||||
|
out-ports:
|
||||||
|
description: |
|
||||||
|
Output connections from the ETE to legacy CoreSight trace bus.
|
||||||
|
$ref: /schemas/graph.yaml#/properties/ports
|
||||||
|
properties:
|
||||||
|
port:
|
||||||
|
description: Output connection from the ETE to legacy CoreSight Trace bus.
|
||||||
|
$ref: /schemas/graph.yaml#/properties/port
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- cpu
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
|
||||||
|
# An ETE node without legacy CoreSight connections
|
||||||
|
- |
|
||||||
|
ete0 {
|
||||||
|
compatible = "arm,embedded-trace-extension";
|
||||||
|
cpu = <&cpu_0>;
|
||||||
|
};
|
||||||
|
# An ETE node with legacy CoreSight connections
|
||||||
|
- |
|
||||||
|
ete1 {
|
||||||
|
compatible = "arm,embedded-trace-extension";
|
||||||
|
cpu = <&cpu_1>;
|
||||||
|
|
||||||
|
out-ports { /* legacy coresight connection */
|
||||||
|
port {
|
||||||
|
ete1_out_port: endpoint {
|
||||||
|
remote-endpoint = <&funnel_in_port0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
@ -617,6 +617,7 @@ properties:
|
|||||||
- kam,imx7d-flex-concentrator # Kamstrup OMNIA Flex Concentrator
|
- kam,imx7d-flex-concentrator # Kamstrup OMNIA Flex Concentrator
|
||||||
- kam,imx7d-flex-concentrator-mfg # Kamstrup OMNIA Flex Concentrator in manufacturing mode
|
- kam,imx7d-flex-concentrator-mfg # Kamstrup OMNIA Flex Concentrator in manufacturing mode
|
||||||
- novtech,imx7d-meerkat96 # i.MX7 Meerkat96 Board
|
- novtech,imx7d-meerkat96 # i.MX7 Meerkat96 Board
|
||||||
|
- remarkable,imx7d-remarkable2 # i.MX7D ReMarkable 2 E-Ink Tablet
|
||||||
- technexion,imx7d-pico-dwarf # TechNexion i.MX7D Pico-Dwarf
|
- technexion,imx7d-pico-dwarf # TechNexion i.MX7D Pico-Dwarf
|
||||||
- technexion,imx7d-pico-hobbit # TechNexion i.MX7D Pico-Hobbit
|
- technexion,imx7d-pico-hobbit # TechNexion i.MX7D Pico-Hobbit
|
||||||
- technexion,imx7d-pico-nymph # TechNexion i.MX7D Pico-Nymph
|
- technexion,imx7d-pico-nymph # TechNexion i.MX7D Pico-Nymph
|
||||||
@ -688,6 +689,14 @@ properties:
|
|||||||
- variscite,var-som-mx8mm # i.MX8MM Variscite VAR-SOM-MX8MM module
|
- variscite,var-som-mx8mm # i.MX8MM Variscite VAR-SOM-MX8MM module
|
||||||
- const: fsl,imx8mm
|
- const: fsl,imx8mm
|
||||||
|
|
||||||
|
- description: Engicam i.Core MX8M Mini SoM based boards
|
||||||
|
items:
|
||||||
|
- enum:
|
||||||
|
- engicam,icore-mx8mm-ctouch2 # i.MX8MM Engicam i.Core MX8M Mini C.TOUCH 2.0
|
||||||
|
- engicam,icore-mx8mm-edimm2.2 # i.MX8MM Engicam i.Core MX8M Mini EDIMM2.2 Starter Kit
|
||||||
|
- const: engicam,icore-mx8mm # i.MX8MM Engicam i.Core MX8M Mini SoM
|
||||||
|
- const: fsl,imx8mm
|
||||||
|
|
||||||
- description: Kontron BL i.MX8MM (N801X S) Board
|
- description: Kontron BL i.MX8MM (N801X S) Board
|
||||||
items:
|
items:
|
||||||
- const: kontron,imx8mm-n801x-s
|
- const: kontron,imx8mm-n801x-s
|
||||||
@ -733,6 +742,7 @@ properties:
|
|||||||
- einfochips,imx8mq-thor96 # i.MX8MQ Thor96 Board
|
- einfochips,imx8mq-thor96 # i.MX8MQ Thor96 Board
|
||||||
- fsl,imx8mq-evk # i.MX8MQ EVK Board
|
- fsl,imx8mq-evk # i.MX8MQ EVK Board
|
||||||
- google,imx8mq-phanbell # Google Coral Edge TPU
|
- google,imx8mq-phanbell # Google Coral Edge TPU
|
||||||
|
- kontron,pitx-imx8m # Kontron pITX-imx8m Board
|
||||||
- purism,librem5-devkit # Purism Librem5 devkit
|
- purism,librem5-devkit # Purism Librem5 devkit
|
||||||
- solidrun,hummingboard-pulse # SolidRun Hummingboard Pulse
|
- solidrun,hummingboard-pulse # SolidRun Hummingboard Pulse
|
||||||
- technexion,pico-pi-imx8m # TechNexion PICO-PI-8M evk
|
- technexion,pico-pi-imx8m # TechNexion PICO-PI-8M evk
|
||||||
@ -755,6 +765,12 @@ properties:
|
|||||||
- const: zii,imx8mq-ultra
|
- const: zii,imx8mq-ultra
|
||||||
- const: fsl,imx8mq
|
- const: fsl,imx8mq
|
||||||
|
|
||||||
|
- description: i.MX8QM based Boards
|
||||||
|
items:
|
||||||
|
- enum:
|
||||||
|
- fsl,imx8qm-mek # i.MX8QM MEK Board
|
||||||
|
- const: fsl,imx8qm
|
||||||
|
|
||||||
- description: i.MX8QXP based Boards
|
- description: i.MX8QXP based Boards
|
||||||
items:
|
items:
|
||||||
- enum:
|
- enum:
|
||||||
|
@ -142,8 +142,8 @@ mpp50 50 gpio, ge1(rxclk), mss_i2c(sda), spi1(csn0), uart2(txd), uart0(rxd), xg(
|
|||||||
mpp51 51 gpio, ge1(rxd0), mss_i2c(sck), spi1(csn1), uart2(rxd), uart0(cts), sdio(pwr10)
|
mpp51 51 gpio, ge1(rxd0), mss_i2c(sck), spi1(csn1), uart2(rxd), uart0(cts), sdio(pwr10)
|
||||||
mpp52 52 gpio, ge1(rxd1), synce1(clk), synce2(clk), spi1(csn2), uart1(cts), led(clk), pcie(rstoutn), pcie0(clkreq)
|
mpp52 52 gpio, ge1(rxd1), synce1(clk), synce2(clk), spi1(csn2), uart1(cts), led(clk), pcie(rstoutn), pcie0(clkreq)
|
||||||
mpp53 53 gpio, ge1(rxd2), ptp(clk), spi1(csn3), uart1(rxd), led(stb), sdio(led)
|
mpp53 53 gpio, ge1(rxd2), ptp(clk), spi1(csn3), uart1(rxd), led(stb), sdio(led)
|
||||||
mpp54 54 gpio, ge1(rxd3), synce2(clk), ptp(pclk_out), synce1(clk), led(data), sdio(hw_rst), sdio(wr_protect)
|
mpp54 54 gpio, ge1(rxd3), synce2(clk), ptp(pclk_out), synce1(clk), led(data), sdio(hw_rst), sdio_wp(wr_protect)
|
||||||
mpp55 55 gpio, ge1(rxctl_rxdv), ptp(pulse), sdio(led), sdio(card_detect)
|
mpp55 55 gpio, ge1(rxctl_rxdv), ptp(pulse), sdio(led), sdio_cd(card_detect)
|
||||||
mpp56 56 gpio, tdm(drx), au(i2sdo_spdifo), spi0(clk), uart1(rxd), sata1(present_act), sdio(clk)
|
mpp56 56 gpio, tdm(drx), au(i2sdo_spdifo), spi0(clk), uart1(rxd), sata1(present_act), sdio(clk)
|
||||||
mpp57 57 gpio, mss_i2c(sda), ptp(pclk_out), tdm(intn), au(i2sbclk), spi0(mosi), uart1(txd), sata0(present_act), sdio(cmd)
|
mpp57 57 gpio, mss_i2c(sda), ptp(pclk_out), tdm(intn), au(i2sbclk), spi0(mosi), uart1(txd), sata0(present_act), sdio(cmd)
|
||||||
mpp58 58 gpio, mss_i2c(sck), ptp(clk), tdm(rstn), au(i2sdi), spi0(miso), uart1(cts), led(clk), sdio(d0)
|
mpp58 58 gpio, mss_i2c(sck), ptp(clk), tdm(rstn), au(i2sdi), spi0(miso), uart1(cts), led(clk), sdio(d0)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user