mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
This catches the android14-6.1-lts branch up with many abi updates and other changes that have been merged into the android14-6.1 branch recently. Included in here are the following commits: *96d66062d0ANDROID: GKI: Add initialization for mutex oem_data. *9e55f41695ANDROID: abi_gki_aarch64_qcom: whitelist some mm symbols *56526cf940ANDROID: mm: swap: export and whitelist get_shadow_from_swap_cache *74be75dd10ANDROID: mm: madvise: vendor hook to tune page flags *7fc3794962ANDROID: GKI: Add initialization for rwsem's oem_data and vendor_data. *f6b99539f8UPSTREAM: usb: dwc3: core: Skip setting event buffers for host only controllers *ce6f9cab9eANDROID: GKI: Update symbol list for mtk *256660feebANDROID: GKI: Add symbol to symbol list for vivo. *d256bfafa9ANDROID: vendor_hooks: add hooks in prctl_set_vma *0468527935ANDROID: GKI: Update symbols list for vivo *81e9f0610cUPSTREAM: arm64: mm: Make hibernation aware of KFENCE *aa8621e002ANDROID: Update the ABI symbol list: set_normalized_timespec64 *87fb1f2f1eMerge tag 'android14-6.1.84_r00' into android14-6.1 *76d91af9daANDROID: fix kernelci build breaks due to hid/uhid cyclic dependency *c2dad37627ANDROID: fix kernelci GCC builds of fips140.ko *8bffcfee7aUPSTREAM: sched/fair: Use all little CPUs for CPU-bound workloads *a1926c3f2bANDROID: GKI: Extend Tuxera symbol list *6aaa06c15dFROMLIST: locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers *7682e638ebANDROID: fips140: remove unnecessary no_sanitize(cfi) *681c91500cANDROID: GKI: Add symbol to symbol list for vivo. *88b8a0c173ANDROID: vendor_hooks: add hooks to modify pageflags *85a0c4bef6ANDROID: GKI: Add pageflags for OEM *724b50f143ANDROID: GKI: Update symbol list for vivo *a5329424eaANDROID: GKI: export sys_exit tracepoint *616650627dANDROID: gki_defconfig: enable CONFIG_SYN_COOKIES *74a3c59c80ANDROID: GKI: Update symbol list for vivo *1df05952a1ANDROID: vendor_hooks: add hooks in rwsem *5747d79ab0ANDROID: Update the ABI symbol list *a7daeb4de8ANDROID: GKI: Update symbol list for vivo *2870c78530ANDROID: GKI: add percpu_rwsem vendor hooks *49203a2850FROMGIT: erofs: fix possible memory leak in z_erofs_gbuf_exit() *0013c55474BACKPORT: erofs: add a reserved buffer pool for lz4 decompression *a35a90635cBACKPORT: erofs: do not use pagepool in z_erofs_gbuf_growsize() *2a23d59fd9BACKPORT: erofs: rename per-CPU buffers to global buffer pool and make it configurable *bb687ee6b6BACKPORT: erofs: rename utils.c to zutil.c *bab4765e5fBACKPORT: erofs: relaxed temporary buffers allocation on readahead *a3fb83b3f5BACKPORT: erofs: avoid pcpubuf.c inclusion if CONFIG_EROFS_FS_ZIP is off *91f4830fbaANDROID: GKI: Update rockchip symbols for bcmdhd sdio wifi. *a8b3ebe7f9ANDROID: 16K: Avoid mmap lock assertions for padding VMAs *caa8ffe476BACKPORT: scsi: ufs: core: Fix handling of lrbp->cmd *d682bd3b2fANDROID: GKI: Update symbol list for xiaomi *e270773646ANDROID: vendor_hooks: add hooks in rwsem read trylock *1a72e2f692ANDROID: GKI: update symbol list file for xiaomi *cd89d4fa07ANDROID: GKI: Update symbol list for vivo *40f3c9d658ANDROID: vendor_hooks: add vendor hooks for fuse request *f9840ee562ANDROID: Update the ABI symbol list *12709c5c1eANDROID: GKI: add symbol list for meizu *bda57805abUPSTREAM: objtool: Fix HOSTCC flag usage *b5164fdc98UPSTREAM: objtool: Properly support make V=1 *fd5c2e1399UPSTREAM: objtool: Install libsubcmd in build *de6fb073c6UPSTREAM: af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock. *0e9ee9221fUPSTREAM: af_unix: Don't peek OOB data without MSG_OOB. *30d168eb06UPSTREAM: af_unix: Clear stale u->oob_skb. *c0618d182aRevert "f2fs: fix to tag gcing flag on page during block migration" *25216be1acANDROID: Delete obsolete 16k_gki.fragment. *4c45e2f340UPSTREAM: f2fs: clear writeback when compression failed *7c734edeaaANDROID: GKI: Add symbol list for exynosauto *b22d7c4ca0FROMGIT: arm64: mte: Make mte_check_tfsr_*() conditional on KASAN instead of MTE *1331956fb5ANDROID: gki_defconfig: Disable CONFIG_BRCMSTB_DPFE and CONFIG_BRCMSTB_MEMC *002be199aaFROMGIT: f2fs: fix to avoid use SSR allocate when do defragment *dda68b1657ANDROID: 16K: Only check basename of linker context *65aed0e2f7ANDROID: 16K: Avoid and document padding madvise lock warning *ec795e4eaaANDROID: arm64: vdso32: support user-supplied flags *ac9706483eANDROID: GKI: Add initial symbol list for bcmstb *b164ce27faANDROID: gki_defconfig: Enable Broadcom STB SoCs *d385f8f23fUPSTREAM: mmc: core: Do not force a retune before RPMB switch *5c4b00b73eUPSTREAM: arm64/arm: arm_pmuv3: perf: Don't truncate 64-bit registers *ad62d386c8BACKPORT: net: phy: Allow drivers to always call into ->suspend() *7c09ddbf94UPSTREAM: ARM: perf: Mark all accessor functions inline *f5e0452e91UPSTREAM: arm64: perf: Mark all accessor functions inline *6d7eea37f7UPSTREAM: perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype *bf3022d3c3UPSTREAM: ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM *393be9f6d0UPSTREAM: ARM: Make CONFIG_CPU_V7 valid for 32bit ARMv8 implementations *9d0a91c993UPSTREAM: perf: pmuv3: Change GENMASK to GENMASK_ULL *ab26945ffdUPSTREAM: perf: pmuv3: Move inclusion of kvm_host.h to the arch-specific helper *3e7e6fa4daUPSTREAM: perf: pmuv3: Abstract PMU version checks *55cfecdaaaUPSTREAM: arm64: perf: Abstract system register accesses away *278e973f01UPSTREAM: arm64: perf: Move PMUv3 driver to drivers/perf *222a79a1bbUPSTREAM: arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI *62a4d78ddaANDROID: GKI: Update oplus symbol list *bfacfd198eUPSTREAM: block/blk-mq: Don't complete locally if capacities are different *cf4893eb95BACKPORT: sched: Add a new function to compare if two cpus have the same capacity *e4622d460eANDROID: GKI: Update rockchip symbols for rndis_host. *f601b06a7eANDROID: GKI: Update rockchip symbols for snd multi dais. *986fffb590UPSTREAM: usb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete *163070bc79UPSTREAM: usb: gadget: f_fs: use io_data->status consistently *3c19f7015eANDROID: set rewrite_absolute_paths_in_config for GKI aarch64. *9fcc2459efUPSTREAM: wifi: cfg80211: Clear mlo_links info when STA disconnects *e2c5ee3d15ANDROID: ABI: Add usb_gadget_connect & usb_gadget_disconnect symbol *c5abb61725ANDROID: GKI: Update symbol list for mtk *c36abc6d42BACKPORT: iommu: Have __iommu_probe_device() check for already probed devices *a7462d7032ANDROID: ABI fixup for abi break in struct dst_ops *bd2bcb81d4BACKPORT: net: fix __dst_negative_advice() race *997e6b3f6aRevert "crypto: api - Disallow identical driver names" Change-Id: I474f6f67727992fbe8ca9e3f85d9be7b33cd284c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -101,6 +101,7 @@ filegroup(
|
||||
# keep sorted
|
||||
"android/abi_gki_aarch64_asr",
|
||||
"android/abi_gki_aarch64_asus",
|
||||
"android/abi_gki_aarch64_bcmstb",
|
||||
"android/abi_gki_aarch64_db845c",
|
||||
"android/abi_gki_aarch64_exynos",
|
||||
"android/abi_gki_aarch64_exynosauto",
|
||||
@@ -134,6 +135,7 @@ define_common_kernels(target_configs = {
|
||||
"kmi_symbol_list_strict_mode": True,
|
||||
"module_implicit_outs": get_gki_modules_list("arm64"),
|
||||
"kmi_symbol_list": "android/abi_gki_aarch64",
|
||||
"rewrite_absolute_paths_in_config": True,
|
||||
"kmi_symbol_list_add_only": True,
|
||||
"additional_kmi_symbol_lists": [":aarch64_additional_kmi_symbol_lists"],
|
||||
"protected_exports_list": "android/abi_gki_protected_exports_aarch64",
|
||||
@@ -149,6 +151,7 @@ define_common_kernels(target_configs = {
|
||||
"kmi_symbol_list_strict_mode": False,
|
||||
"module_implicit_outs": get_gki_modules_list("arm64"),
|
||||
"kmi_symbol_list": "android/abi_gki_aarch64",
|
||||
"rewrite_absolute_paths_in_config": True,
|
||||
"kmi_symbol_list_add_only": True,
|
||||
"additional_kmi_symbol_lists": [":aarch64_additional_kmi_symbol_lists"],
|
||||
"protected_exports_list": "android/abi_gki_protected_exports_aarch64",
|
||||
|
||||
@@ -32,6 +32,11 @@ Additional options to pass when preprocessing. The preprocessing options
|
||||
will be used in all cases where kbuild does preprocessing including
|
||||
building C files and assembler files.
|
||||
|
||||
KCPPFLAGS_COMPAT
|
||||
----------------
|
||||
Additional options to pass to $(CC_COMPAT) when preprocessing C and assembler
|
||||
files.
|
||||
|
||||
KAFLAGS
|
||||
-------
|
||||
Additional options to the assembler (for built-in and modules).
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1761
android/abi_gki_aarch64_bcmstb
Normal file
1761
android/abi_gki_aarch64_bcmstb
Normal file
File diff suppressed because it is too large
Load Diff
@@ -77,6 +77,11 @@
|
||||
_dev_err
|
||||
dev_err_probe
|
||||
dev_fwnode
|
||||
dev_forward_skb
|
||||
dev_mc_sync
|
||||
dev_pre_changeaddr_notify
|
||||
dev_set_allmulti
|
||||
dev_uc_sync
|
||||
device_create
|
||||
device_create_file
|
||||
device_destroy
|
||||
@@ -332,6 +337,8 @@
|
||||
iommu_unregister_device_fault_handler
|
||||
ioremap_prot
|
||||
iounmap
|
||||
ip6_route_input_lookup
|
||||
ip_route_input_noref
|
||||
__irq_apply_affinity_hint
|
||||
irq_chip_ack_parent
|
||||
irq_chip_mask_parent
|
||||
@@ -432,6 +439,7 @@
|
||||
mutex_unlock
|
||||
netdev_err
|
||||
netdev_info
|
||||
netdev_is_rx_handler_busy
|
||||
netdev_warn
|
||||
noop_llseek
|
||||
nr_cpu_ids
|
||||
@@ -571,6 +579,8 @@
|
||||
__register_chrdev
|
||||
register_chrdev_region
|
||||
register_console
|
||||
register_inet6addr_validator_notifier
|
||||
register_inetaddr_validator_notifier
|
||||
register_pm_notifier
|
||||
register_reboot_notifier
|
||||
register_syscore_ops
|
||||
@@ -677,6 +687,8 @@
|
||||
__udelay
|
||||
__unregister_chrdev
|
||||
unregister_chrdev_region
|
||||
unregister_inet6addr_validator_notifier
|
||||
unregister_inetaddr_validator_notifier
|
||||
unregister_pm_notifier
|
||||
up
|
||||
up_write
|
||||
|
||||
@@ -11,4 +11,14 @@
|
||||
__tracepoint_android_vh_tune_swappiness
|
||||
__tracepoint_android_vh_tune_scan_type
|
||||
__tracepoint_android_vh_alloc_pages_slowpath
|
||||
cgroup_add_legacy_cftypes
|
||||
clk_set_duty_cycle
|
||||
console_verbose
|
||||
gpiod_get_direction
|
||||
end_buffer_write_sync
|
||||
mem_cgroup_from_id
|
||||
register_sysrq_key
|
||||
try_to_free_mem_cgroup_pages
|
||||
timespec64_to_jiffies
|
||||
ufshcd_read_desc_param
|
||||
|
||||
|
||||
@@ -985,6 +985,7 @@
|
||||
fsg_config_from_params
|
||||
fwnode_device_is_available
|
||||
fwnode_get_name
|
||||
fwnode_get_next_available_child_node
|
||||
fwnode_graph_get_next_endpoint
|
||||
fwnode_graph_get_port_parent
|
||||
fwnode_graph_get_remote_endpoint
|
||||
@@ -1009,7 +1010,11 @@
|
||||
genlmsg_put
|
||||
genl_register_family
|
||||
genl_unregister_family
|
||||
genphy_c45_aneg_done
|
||||
genphy_c45_pma_read_abilities
|
||||
genphy_c45_read_lpa
|
||||
__genphy_config_aneg
|
||||
genphy_read_master_slave
|
||||
genphy_read_status
|
||||
genphy_resume
|
||||
genphy_soft_reset
|
||||
@@ -1448,6 +1453,8 @@
|
||||
led_trigger_unregister
|
||||
led_update_brightness
|
||||
led_update_flash_brightness
|
||||
linear_range_get_max_value
|
||||
linear_range_get_selector_high
|
||||
linear_range_get_selector_within
|
||||
linear_range_get_value
|
||||
linkwatch_fire_event
|
||||
@@ -1887,6 +1894,7 @@
|
||||
phy_attached_info
|
||||
phy_connect
|
||||
phy_connect_direct
|
||||
phy_create_lookup
|
||||
phy_disconnect
|
||||
phy_do_ioctl_running
|
||||
phy_drivers_register
|
||||
@@ -1904,6 +1912,7 @@
|
||||
phy_exit
|
||||
phy_find_first
|
||||
phy_get
|
||||
phy_get_c45_ids
|
||||
phy_get_pause
|
||||
phy_init
|
||||
phy_init_eee
|
||||
@@ -2184,6 +2193,7 @@
|
||||
regulator_enable
|
||||
regulator_enable_regmap
|
||||
regulator_get
|
||||
regulator_get_bypass_regmap
|
||||
regulator_get_current_limit_regmap
|
||||
regulator_get_mode
|
||||
regulator_get_optional
|
||||
@@ -2201,6 +2211,7 @@
|
||||
regulator_notifier_call_chain
|
||||
regulator_put
|
||||
regulator_set_active_discharge_regmap
|
||||
regulator_set_bypass_regmap
|
||||
regulator_set_current_limit
|
||||
regulator_set_current_limit_regmap
|
||||
regulator_set_load
|
||||
@@ -3107,6 +3118,7 @@
|
||||
usb_debug_root
|
||||
usb_del_gadget_udc
|
||||
usb_deregister
|
||||
usb_deregister_device_driver
|
||||
usb_disabled
|
||||
usb_driver_claim_interface
|
||||
usb_driver_release_interface
|
||||
@@ -3173,6 +3185,7 @@
|
||||
usb_put_hcd
|
||||
usb_put_intf
|
||||
usb_queue_reset_device
|
||||
usb_register_device_driver
|
||||
usb_register_driver
|
||||
usb_remove_function
|
||||
usb_remove_hcd
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
freq_qos_add_notifier
|
||||
freq_qos_remove_notifier
|
||||
get_wchan
|
||||
gnet_stats_add_queue
|
||||
gnet_stats_copy_basic
|
||||
gnet_stats_copy_queue
|
||||
gov_attr_set_get
|
||||
gpiod_to_chip
|
||||
have_governor_per_policy
|
||||
@@ -55,24 +58,37 @@
|
||||
__mod_zone_page_state
|
||||
neigh_xmit
|
||||
netif_receive_skb_core
|
||||
__netif_schedule
|
||||
nf_ct_attach
|
||||
nf_ct_delete
|
||||
nf_register_net_hook
|
||||
nf_register_net_hooks
|
||||
nf_unregister_net_hook
|
||||
nf_unregister_net_hooks
|
||||
noop_qdisc
|
||||
nr_running
|
||||
of_css
|
||||
osq_lock
|
||||
osq_unlock
|
||||
__page_file_index
|
||||
__page_mapcount
|
||||
pfifo_qdisc_ops
|
||||
pm_get_active_wakeup_sources
|
||||
__printk_ratelimit
|
||||
prepare_to_wait_exclusive
|
||||
proc_symlink
|
||||
psched_ratecfg_precompute
|
||||
public_key_verify_signature
|
||||
put_pages_list
|
||||
__qdisc_calculate_pkt_len
|
||||
qdisc_create_dflt
|
||||
qdisc_hash_add
|
||||
qdisc_put
|
||||
qdisc_reset
|
||||
qdisc_tree_reduce_backlog
|
||||
qdisc_watchdog_cancel
|
||||
qdisc_watchdog_init
|
||||
qdisc_watchdog_schedule_range_ns
|
||||
radix_tree_lookup_slot
|
||||
radix_tree_replace_slot
|
||||
_raw_write_trylock
|
||||
@@ -102,6 +118,9 @@
|
||||
stpcpy
|
||||
task_rq_lock
|
||||
tcf_action_exec
|
||||
tcf_block_get
|
||||
tcf_block_put
|
||||
tcf_classify
|
||||
tcf_exts_destroy
|
||||
tcf_exts_dump
|
||||
tcf_exts_dump_stats
|
||||
|
||||
@@ -425,6 +425,8 @@
|
||||
devm_clk_get
|
||||
devm_clk_get_optional
|
||||
devm_clk_put
|
||||
devm_devfreq_add_device
|
||||
devm_devfreq_remove_device
|
||||
devm_device_add_group
|
||||
devm_device_add_groups
|
||||
devm_device_remove_group
|
||||
@@ -518,6 +520,7 @@
|
||||
dev_pm_opp_of_register_em
|
||||
dev_pm_opp_of_remove_table
|
||||
dev_pm_opp_put
|
||||
dev_pm_opp_remove_all_dynamic
|
||||
dev_pm_opp_set_config
|
||||
dev_pm_qos_add_notifier
|
||||
dev_pm_qos_add_request
|
||||
@@ -1429,6 +1432,7 @@
|
||||
__netdev_alloc_skb
|
||||
netdev_err
|
||||
netdev_info
|
||||
netdev_refcnt_read
|
||||
netdev_set_default_ethtool_ops
|
||||
netdev_state_change
|
||||
netdev_update_features
|
||||
@@ -2000,6 +2004,7 @@
|
||||
set_capacity_and_notify
|
||||
set_cpus_allowed_ptr
|
||||
set_freezable
|
||||
set_normalized_timespec64
|
||||
set_page_dirty
|
||||
set_page_dirty_lock
|
||||
__SetPageMovable
|
||||
|
||||
@@ -1259,6 +1259,7 @@
|
||||
get_random_u32
|
||||
__get_random_u32_below
|
||||
get_sg_io_hdr
|
||||
get_shadow_from_swap_cache
|
||||
get_slabinfo
|
||||
get_state_synchronize_rcu
|
||||
get_state_synchronize_srcu
|
||||
@@ -3449,6 +3450,7 @@
|
||||
__traceiter_android_vh_ipi_stop
|
||||
__traceiter_android_vh_jiffies_update
|
||||
__traceiter_android_vh_kswapd_per_node
|
||||
__traceiter_android_vh_madvise_cold_or_pageout_page
|
||||
__traceiter_android_vh_mpam_set
|
||||
__traceiter_android_vh_post_image_save
|
||||
__traceiter_android_vh_printk_hotplug
|
||||
@@ -3600,6 +3602,7 @@
|
||||
__tracepoint_android_vh_ipi_stop
|
||||
__tracepoint_android_vh_jiffies_update
|
||||
__tracepoint_android_vh_kswapd_per_node
|
||||
__tracepoint_android_vh_madvise_cold_or_pageout_page
|
||||
__tracepoint_android_vh_mpam_set
|
||||
__tracepoint_android_vh_post_image_save
|
||||
__tracepoint_android_vh_printk_hotplug
|
||||
@@ -3837,6 +3840,8 @@
|
||||
usb_free_urb
|
||||
usb_function_register
|
||||
usb_function_unregister
|
||||
usb_gadget_connect
|
||||
usb_gadget_disconnect
|
||||
usb_gadget_wakeup
|
||||
usb_get_dev
|
||||
usb_get_from_anchor
|
||||
|
||||
@@ -1115,6 +1115,7 @@
|
||||
snd_soc_daifmt_parse_clock_provider_raw
|
||||
snd_soc_daifmt_parse_format
|
||||
snd_soc_dai_set_sysclk
|
||||
snd_soc_dai_set_tdm_slot
|
||||
snd_soc_dapm_add_routes
|
||||
snd_soc_dapm_disable_pin_unlocked
|
||||
snd_soc_dapm_force_enable_pin_unlocked
|
||||
@@ -1138,6 +1139,7 @@
|
||||
snd_soc_pm_ops
|
||||
snd_soc_put_enum_double
|
||||
snd_soc_put_volsw
|
||||
snd_soc_set_runtime_hwparams
|
||||
snd_soc_unregister_component
|
||||
snprintf
|
||||
sort
|
||||
@@ -1246,9 +1248,12 @@
|
||||
usb_hcd_resume_root_hub
|
||||
usb_hcd_unlink_urb_from_ep
|
||||
usb_hid_driver
|
||||
usbnet_cdc_unbind
|
||||
usbnet_cdc_zte_rx_fixup
|
||||
usbnet_change_mtu
|
||||
usbnet_defer_kevent
|
||||
usbnet_disconnect
|
||||
usbnet_generic_cdc_bind
|
||||
usbnet_get_drvinfo
|
||||
usbnet_get_endpoints
|
||||
usbnet_get_link
|
||||
@@ -1444,6 +1449,10 @@
|
||||
sdio_readw
|
||||
sdio_register_driver
|
||||
sdio_release_host
|
||||
sdio_retune_crc_disable
|
||||
sdio_retune_crc_enable
|
||||
sdio_retune_hold_now
|
||||
sdio_retune_release
|
||||
sdio_set_block_size
|
||||
sdio_set_host_pm_flags
|
||||
sdio_unregister_driver
|
||||
@@ -2708,6 +2717,19 @@
|
||||
# required by snd-soc-rockchip-hdmi.ko
|
||||
snd_soc_dapm_new_widgets
|
||||
|
||||
# required by snd-soc-rockchip-multi-dais.ko
|
||||
dma_get_slave_caps
|
||||
snd_hwparams_to_dma_slave_config
|
||||
snd_pcm_lib_free_pages
|
||||
snd_pcm_lib_ioctl
|
||||
snd_pcm_lib_malloc_pages
|
||||
snd_pcm_lib_preallocate_pages
|
||||
snd_pcm_stream_lock_irq
|
||||
snd_pcm_stream_unlock_irq
|
||||
snd_soc_dai_set_fmt
|
||||
snd_soc_find_dai_with_mutex
|
||||
snd_soc_rtdcom_lookup
|
||||
|
||||
# required by snd-soc-rockchip-multicodecs.ko
|
||||
snd_soc_dapm_get_pin_switch
|
||||
snd_soc_dapm_info_pin_switch
|
||||
@@ -2745,7 +2767,6 @@
|
||||
snd_pcm_hw_constraint_minmax
|
||||
snd_soc_component_set_sysclk
|
||||
snd_soc_dai_active
|
||||
snd_soc_dai_set_tdm_slot
|
||||
snd_soc_of_parse_audio_simple_widgets
|
||||
snd_soc_of_parse_pin_switches
|
||||
snd_soc_runtime_calc_hw
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
alt_cb_patch_nops
|
||||
__arch_copy_from_user
|
||||
__arch_copy_to_user
|
||||
_atomic_dec_and_lock
|
||||
autoremove_wake_function
|
||||
balance_dirty_pages_ratelimited
|
||||
bcmp
|
||||
@@ -14,12 +15,14 @@
|
||||
bit_waitqueue
|
||||
blkdev_issue_discard
|
||||
blkdev_issue_flush
|
||||
blkdev_issue_zeroout
|
||||
blk_finish_plug
|
||||
blk_start_plug
|
||||
__blockdev_direct_IO
|
||||
block_dirty_folio
|
||||
block_invalidate_folio
|
||||
block_is_partially_uptodate
|
||||
block_write_full_page
|
||||
__breadahead
|
||||
__bread_gfp
|
||||
__brelse
|
||||
@@ -30,8 +33,10 @@
|
||||
__check_object_size
|
||||
clean_bdev_aliases
|
||||
clear_inode
|
||||
clear_nlink
|
||||
clear_page
|
||||
clear_page_dirty_for_io
|
||||
cont_write_begin
|
||||
copy_page_from_iter_atomic
|
||||
cpu_hwcaps
|
||||
create_empty_buffers
|
||||
@@ -39,6 +44,7 @@
|
||||
d_add
|
||||
d_add_ci
|
||||
d_instantiate
|
||||
dirty_writeback_interval
|
||||
d_make_root
|
||||
d_obtain_alias
|
||||
down_read
|
||||
@@ -57,6 +63,7 @@
|
||||
fget
|
||||
fiemap_fill_next_extent
|
||||
fiemap_prep
|
||||
fileattr_fill_flags
|
||||
file_check_and_advance_wb_err
|
||||
filemap_add_folio
|
||||
filemap_dirty_folio
|
||||
@@ -65,6 +72,7 @@
|
||||
filemap_fdatawrite
|
||||
filemap_fdatawrite_range
|
||||
filemap_flush
|
||||
filemap_release_folio
|
||||
__filemap_set_wb_err
|
||||
filemap_write_and_wait_range
|
||||
file_remove_privs
|
||||
@@ -83,6 +91,7 @@
|
||||
freezer_active
|
||||
freezing_slow_path
|
||||
fs_bio_set
|
||||
generic_cont_expand_simple
|
||||
generic_error_remove_page
|
||||
generic_file_direct_write
|
||||
generic_file_llseek
|
||||
@@ -90,14 +99,17 @@
|
||||
generic_file_open
|
||||
generic_file_read_iter
|
||||
generic_file_splice_read
|
||||
generic_file_write_iter
|
||||
generic_fillattr
|
||||
generic_perform_write
|
||||
generic_read_dir
|
||||
generic_write_checks
|
||||
generic_write_end
|
||||
__getblk_gfp
|
||||
gic_nonsecure_priorities
|
||||
grab_cache_page_write_begin
|
||||
iget5_locked
|
||||
iget_locked
|
||||
igrab
|
||||
ihold
|
||||
ilookup5
|
||||
@@ -107,11 +119,15 @@
|
||||
init_special_inode
|
||||
init_wait_entry
|
||||
__init_waitqueue_head
|
||||
inode_add_bytes
|
||||
inode_dio_wait
|
||||
inode_get_bytes
|
||||
inode_init_once
|
||||
inode_init_owner
|
||||
inode_maybe_inc_iversion
|
||||
inode_newsize_ok
|
||||
inode_set_bytes
|
||||
inode_set_ctime_current
|
||||
inode_set_flags
|
||||
__insert_inode_hash
|
||||
invalidate_bdev
|
||||
@@ -158,16 +174,20 @@
|
||||
mark_buffer_write_io_error
|
||||
__mark_inode_dirty
|
||||
mark_page_accessed
|
||||
match_octal
|
||||
match_strdup
|
||||
memcmp
|
||||
memcpy
|
||||
memmove
|
||||
memset
|
||||
migrate_folio
|
||||
mktime64
|
||||
mnt_drop_write_file
|
||||
mnt_want_write_file
|
||||
mount_bdev
|
||||
mpage_readahead
|
||||
mpage_read_folio
|
||||
mpage_writepages
|
||||
__msecs_to_jiffies
|
||||
__mutex_init
|
||||
mutex_lock
|
||||
@@ -178,8 +198,10 @@
|
||||
pagecache_get_page
|
||||
page_cache_next_miss
|
||||
page_cache_prev_miss
|
||||
page_get_link
|
||||
page_pinner_inited
|
||||
__page_pinner_put_page
|
||||
page_symlink
|
||||
pagevec_lookup_range_tag
|
||||
__pagevec_release
|
||||
page_zero_new_buffers
|
||||
@@ -217,7 +239,9 @@
|
||||
schedule_timeout
|
||||
schedule_timeout_interruptible
|
||||
security_inode_init_security
|
||||
seq_escape_mem
|
||||
seq_printf
|
||||
setattr_copy
|
||||
setattr_prepare
|
||||
set_freezable
|
||||
set_nlink
|
||||
@@ -257,6 +281,7 @@
|
||||
truncate_inode_pages_final
|
||||
truncate_pagecache
|
||||
truncate_setsize
|
||||
try_to_free_buffers
|
||||
try_to_writeback_inodes_sb
|
||||
unload_nls
|
||||
unlock_buffer
|
||||
@@ -265,6 +290,8 @@
|
||||
unregister_filesystem
|
||||
up_read
|
||||
up_write
|
||||
utf32_to_utf8
|
||||
utf8_to_utf32
|
||||
vfree
|
||||
vfs_fsync_range
|
||||
__vmalloc
|
||||
|
||||
@@ -328,9 +328,11 @@
|
||||
__traceiter_android_rvh_migrate_queued_task
|
||||
__traceiter_android_rvh_new_task_stats
|
||||
__traceiter_android_rvh_panic_unhandled
|
||||
__traceiter_android_rvh_percpu_rwsem_wait_complete
|
||||
__traceiter_android_rvh_pick_next_entity
|
||||
__traceiter_android_rvh_place_entity
|
||||
__traceiter_android_rvh_prepare_prio_fork
|
||||
__traceiter_android_rvh_pr_set_vma_name_bypass
|
||||
__traceiter_android_rvh_replace_next_task_fair
|
||||
__traceiter_android_rvh_report_bug
|
||||
__traceiter_android_rvh_rtmutex_prepare_setprio
|
||||
@@ -377,6 +379,8 @@
|
||||
__traceiter_android_vh_build_sched_domains
|
||||
__traceiter_android_vh_check_uninterrupt_tasks
|
||||
__traceiter_android_vh_check_uninterrupt_tasks_done
|
||||
__traceiter_android_vh_clear_rwsem_reader_owned
|
||||
__traceiter_android_vh_clear_rwsem_writer_owned
|
||||
__traceiter_android_vh_cpu_idle_enter
|
||||
__traceiter_android_vh_cpu_idle_exit
|
||||
__traceiter_android_vh_cpufreq_fast_switch
|
||||
@@ -385,7 +389,10 @@
|
||||
__traceiter_android_vh_cpuidle_psci_enter
|
||||
__traceiter_android_vh_cpuidle_psci_exit
|
||||
__traceiter_android_vh_disable_thermal_cooling_stats
|
||||
__traceiter_android_vh_do_anonymous_page
|
||||
__traceiter_android_vh_do_swap_page
|
||||
__traceiter_android_vh_do_wake_up_sync
|
||||
__traceiter_android_vh_do_wp_page
|
||||
__traceiter_android_vh_dump_throttled_rt_tasks
|
||||
__traceiter_android_vh_free_task
|
||||
__traceiter_android_vh_ftrace_dump_buffer
|
||||
@@ -393,6 +400,7 @@
|
||||
__traceiter_android_vh_ftrace_oops_enter
|
||||
__traceiter_android_vh_ftrace_oops_exit
|
||||
__traceiter_android_vh_ftrace_size_check
|
||||
__traceiter_android_vh_fuse_request_end
|
||||
__traceiter_android_vh_ignore_dmabuf_vmap_bounds
|
||||
__traceiter_android_vh_ipi_stop
|
||||
__traceiter_android_vh_is_fpsimd_save
|
||||
@@ -400,7 +408,12 @@
|
||||
__traceiter_android_vh_mmap_region
|
||||
__traceiter_android_vh_mutex_wait_finish
|
||||
__traceiter_android_vh_mutex_wait_start
|
||||
__traceiter_android_vh_percpu_rwsem_down_read
|
||||
__traceiter_android_vh_percpu_rwsem_up_write
|
||||
__traceiter_android_vh_printk_hotplug
|
||||
__traceiter_android_vh_queue_request_and_unlock
|
||||
__traceiter_android_vh_record_rwsem_reader_owned
|
||||
__traceiter_android_vh_record_rwsem_writer_owned
|
||||
__traceiter_android_vh_rproc_recovery
|
||||
__traceiter_android_vh_rproc_recovery_set
|
||||
__traceiter_android_vh_rtmutex_wait_finish
|
||||
@@ -412,6 +425,7 @@
|
||||
__traceiter_android_vh_sched_show_task
|
||||
__traceiter_android_vh_scheduler_tick
|
||||
__traceiter_android_vh_setscheduler_uclamp
|
||||
__traceiter_android_vh_shmem_swapin_folio
|
||||
__traceiter_android_vh_show_resume_epoch_val
|
||||
__traceiter_android_vh_show_suspend_epoch_val
|
||||
__traceiter_android_vh_sysrq_crash
|
||||
@@ -431,6 +445,7 @@
|
||||
__traceiter_android_vh_ufs_update_sdev
|
||||
__traceiter_android_vh_ufs_update_sysfs
|
||||
__traceiter_android_vh_update_topology_flags_workfn
|
||||
__traceiter_android_vh_uprobes_replace_page
|
||||
__traceiter_android_vh_watchdog_timer_softlockup
|
||||
__traceiter_binder_transaction_received
|
||||
__traceiter_block_rq_insert
|
||||
@@ -454,6 +469,7 @@
|
||||
__traceiter_sched_overutilized_tp
|
||||
__traceiter_sched_switch
|
||||
__traceiter_suspend_resume
|
||||
__traceiter_sys_exit
|
||||
__traceiter_workqueue_execute_start
|
||||
__traceiter_xdp_exception
|
||||
__tracepoint_android_rvh_account_irq
|
||||
@@ -498,9 +514,11 @@
|
||||
__tracepoint_android_rvh_migrate_queued_task
|
||||
__tracepoint_android_rvh_new_task_stats
|
||||
__tracepoint_android_rvh_panic_unhandled
|
||||
__tracepoint_android_rvh_percpu_rwsem_wait_complete
|
||||
__tracepoint_android_rvh_pick_next_entity
|
||||
__tracepoint_android_rvh_place_entity
|
||||
__tracepoint_android_rvh_prepare_prio_fork
|
||||
__tracepoint_android_rvh_pr_set_vma_name_bypass
|
||||
__tracepoint_android_rvh_replace_next_task_fair
|
||||
__tracepoint_android_rvh_report_bug
|
||||
__tracepoint_android_rvh_rtmutex_prepare_setprio
|
||||
@@ -547,6 +565,8 @@
|
||||
__tracepoint_android_vh_build_sched_domains
|
||||
__tracepoint_android_vh_check_uninterrupt_tasks
|
||||
__tracepoint_android_vh_check_uninterrupt_tasks_done
|
||||
__tracepoint_android_vh_clear_rwsem_reader_owned
|
||||
__tracepoint_android_vh_clear_rwsem_writer_owned
|
||||
__tracepoint_android_vh_cpu_idle_enter
|
||||
__tracepoint_android_vh_cpu_idle_exit
|
||||
__tracepoint_android_vh_cpufreq_fast_switch
|
||||
@@ -555,7 +575,10 @@
|
||||
__tracepoint_android_vh_cpuidle_psci_enter
|
||||
__tracepoint_android_vh_cpuidle_psci_exit
|
||||
__tracepoint_android_vh_disable_thermal_cooling_stats
|
||||
__tracepoint_android_vh_do_anonymous_page
|
||||
__tracepoint_android_vh_do_swap_page
|
||||
__tracepoint_android_vh_do_wake_up_sync
|
||||
__tracepoint_android_vh_do_wp_page
|
||||
__tracepoint_android_vh_dump_throttled_rt_tasks
|
||||
__tracepoint_android_vh_free_task
|
||||
__tracepoint_android_vh_ftrace_dump_buffer
|
||||
@@ -563,6 +586,7 @@
|
||||
__tracepoint_android_vh_ftrace_oops_enter
|
||||
__tracepoint_android_vh_ftrace_oops_exit
|
||||
__tracepoint_android_vh_ftrace_size_check
|
||||
__tracepoint_android_vh_fuse_request_end
|
||||
__tracepoint_android_vh_ignore_dmabuf_vmap_bounds
|
||||
__tracepoint_android_vh_ipi_stop
|
||||
__tracepoint_android_vh_is_fpsimd_save
|
||||
@@ -570,7 +594,12 @@
|
||||
__tracepoint_android_vh_mmap_region
|
||||
__tracepoint_android_vh_mutex_wait_finish
|
||||
__tracepoint_android_vh_mutex_wait_start
|
||||
__tracepoint_android_vh_percpu_rwsem_down_read
|
||||
__tracepoint_android_vh_percpu_rwsem_up_write
|
||||
__tracepoint_android_vh_printk_hotplug
|
||||
__tracepoint_android_vh_queue_request_and_unlock
|
||||
__tracepoint_android_vh_record_rwsem_reader_owned
|
||||
__tracepoint_android_vh_record_rwsem_writer_owned
|
||||
__tracepoint_android_vh_rproc_recovery
|
||||
__tracepoint_android_vh_rproc_recovery_set
|
||||
__tracepoint_android_vh_rtmutex_wait_finish
|
||||
@@ -582,6 +611,7 @@
|
||||
__tracepoint_android_vh_sched_show_task
|
||||
__tracepoint_android_vh_scheduler_tick
|
||||
__tracepoint_android_vh_setscheduler_uclamp
|
||||
__tracepoint_android_vh_shmem_swapin_folio
|
||||
__tracepoint_android_vh_show_resume_epoch_val
|
||||
__tracepoint_android_vh_show_suspend_epoch_val
|
||||
__tracepoint_android_vh_sysrq_crash
|
||||
@@ -601,6 +631,7 @@
|
||||
__tracepoint_android_vh_ufs_update_sdev
|
||||
__tracepoint_android_vh_ufs_update_sysfs
|
||||
__tracepoint_android_vh_update_topology_flags_workfn
|
||||
__tracepoint_android_vh_uprobes_replace_page
|
||||
__tracepoint_android_vh_watchdog_timer_softlockup
|
||||
__tracepoint_binder_transaction_received
|
||||
__tracepoint_block_rq_insert
|
||||
@@ -624,6 +655,7 @@
|
||||
__tracepoint_sched_overutilized_tp
|
||||
__tracepoint_sched_switch
|
||||
__tracepoint_suspend_resume
|
||||
__tracepoint_sys_exit
|
||||
__tracepoint_workqueue_execute_start
|
||||
__tracepoint_xdp_exception
|
||||
__tty_alloc_driver
|
||||
@@ -1175,6 +1207,7 @@
|
||||
crypto_put_default_rng
|
||||
crypto_register_aead
|
||||
crypto_register_ahash
|
||||
crypto_register_alg
|
||||
crypto_register_rng
|
||||
crypto_register_rngs
|
||||
crypto_register_shash
|
||||
@@ -1191,6 +1224,7 @@
|
||||
crypto_skcipher_setkey
|
||||
crypto_unregister_aead
|
||||
crypto_unregister_ahash
|
||||
crypto_unregister_alg
|
||||
crypto_unregister_rng
|
||||
crypto_unregister_rngs
|
||||
crypto_unregister_shash
|
||||
@@ -3020,6 +3054,7 @@
|
||||
netlink_register_notifier
|
||||
netlink_unicast
|
||||
netlink_unregister_notifier
|
||||
next_arg
|
||||
nf_conntrack_destroy
|
||||
nf_ct_attach
|
||||
nf_ct_delete
|
||||
|
||||
@@ -233,6 +233,7 @@
|
||||
__traceiter_android_vh_sched_setaffinity_early
|
||||
__traceiter_android_rvh_set_cpus_allowed_comm
|
||||
__traceiter_android_rvh_dequeue_task
|
||||
__traceiter_android_vh_rwsem_read_trylock_failed
|
||||
__tracepoint_android_vh_rwsem_read_wait_start
|
||||
__tracepoint_android_vh_rwsem_write_wait_start
|
||||
__tracepoint_android_vh_mutex_wait_start
|
||||
@@ -241,6 +242,7 @@
|
||||
__tracepoint_android_vh_sched_setaffinity_early
|
||||
__tracepoint_android_rvh_set_cpus_allowed_comm
|
||||
__tracepoint_android_rvh_dequeue_task
|
||||
__tracepoint_android_vh_rwsem_read_trylock_failed
|
||||
cpuset_cpus_allowed
|
||||
cpufreq_update_policy
|
||||
|
||||
@@ -455,3 +457,4 @@
|
||||
__break_lease
|
||||
__d_lookup_unhash_wake
|
||||
__fs_parse
|
||||
__filemap_get_folio
|
||||
|
||||
245
arch/arm/include/asm/arm_pmuv3.h
Normal file
245
arch/arm/include/asm/arm_pmuv3.h
Normal file
@@ -0,0 +1,245 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_PMUV3_H
|
||||
#define __ASM_PMUV3_H
|
||||
|
||||
#include <asm/cp15.h>
|
||||
#include <asm/cputype.h>
|
||||
|
||||
#define PMCCNTR __ACCESS_CP15_64(0, c9)
|
||||
|
||||
#define PMCR __ACCESS_CP15(c9, 0, c12, 0)
|
||||
#define PMCNTENSET __ACCESS_CP15(c9, 0, c12, 1)
|
||||
#define PMCNTENCLR __ACCESS_CP15(c9, 0, c12, 2)
|
||||
#define PMOVSR __ACCESS_CP15(c9, 0, c12, 3)
|
||||
#define PMSELR __ACCESS_CP15(c9, 0, c12, 5)
|
||||
#define PMCEID0 __ACCESS_CP15(c9, 0, c12, 6)
|
||||
#define PMCEID1 __ACCESS_CP15(c9, 0, c12, 7)
|
||||
#define PMXEVTYPER __ACCESS_CP15(c9, 0, c13, 1)
|
||||
#define PMXEVCNTR __ACCESS_CP15(c9, 0, c13, 2)
|
||||
#define PMUSERENR __ACCESS_CP15(c9, 0, c14, 0)
|
||||
#define PMINTENSET __ACCESS_CP15(c9, 0, c14, 1)
|
||||
#define PMINTENCLR __ACCESS_CP15(c9, 0, c14, 2)
|
||||
#define PMCEID2 __ACCESS_CP15(c9, 0, c14, 4)
|
||||
#define PMCEID3 __ACCESS_CP15(c9, 0, c14, 5)
|
||||
#define PMMIR __ACCESS_CP15(c9, 0, c14, 6)
|
||||
#define PMCCFILTR __ACCESS_CP15(c14, 0, c15, 7)
|
||||
|
||||
#define PMEVCNTR0 __ACCESS_CP15(c14, 0, c8, 0)
|
||||
#define PMEVCNTR1 __ACCESS_CP15(c14, 0, c8, 1)
|
||||
#define PMEVCNTR2 __ACCESS_CP15(c14, 0, c8, 2)
|
||||
#define PMEVCNTR3 __ACCESS_CP15(c14, 0, c8, 3)
|
||||
#define PMEVCNTR4 __ACCESS_CP15(c14, 0, c8, 4)
|
||||
#define PMEVCNTR5 __ACCESS_CP15(c14, 0, c8, 5)
|
||||
#define PMEVCNTR6 __ACCESS_CP15(c14, 0, c8, 6)
|
||||
#define PMEVCNTR7 __ACCESS_CP15(c14, 0, c8, 7)
|
||||
#define PMEVCNTR8 __ACCESS_CP15(c14, 0, c9, 0)
|
||||
#define PMEVCNTR9 __ACCESS_CP15(c14, 0, c9, 1)
|
||||
#define PMEVCNTR10 __ACCESS_CP15(c14, 0, c9, 2)
|
||||
#define PMEVCNTR11 __ACCESS_CP15(c14, 0, c9, 3)
|
||||
#define PMEVCNTR12 __ACCESS_CP15(c14, 0, c9, 4)
|
||||
#define PMEVCNTR13 __ACCESS_CP15(c14, 0, c9, 5)
|
||||
#define PMEVCNTR14 __ACCESS_CP15(c14, 0, c9, 6)
|
||||
#define PMEVCNTR15 __ACCESS_CP15(c14, 0, c9, 7)
|
||||
#define PMEVCNTR16 __ACCESS_CP15(c14, 0, c10, 0)
|
||||
#define PMEVCNTR17 __ACCESS_CP15(c14, 0, c10, 1)
|
||||
#define PMEVCNTR18 __ACCESS_CP15(c14, 0, c10, 2)
|
||||
#define PMEVCNTR19 __ACCESS_CP15(c14, 0, c10, 3)
|
||||
#define PMEVCNTR20 __ACCESS_CP15(c14, 0, c10, 4)
|
||||
#define PMEVCNTR21 __ACCESS_CP15(c14, 0, c10, 5)
|
||||
#define PMEVCNTR22 __ACCESS_CP15(c14, 0, c10, 6)
|
||||
#define PMEVCNTR23 __ACCESS_CP15(c14, 0, c10, 7)
|
||||
#define PMEVCNTR24 __ACCESS_CP15(c14, 0, c11, 0)
|
||||
#define PMEVCNTR25 __ACCESS_CP15(c14, 0, c11, 1)
|
||||
#define PMEVCNTR26 __ACCESS_CP15(c14, 0, c11, 2)
|
||||
#define PMEVCNTR27 __ACCESS_CP15(c14, 0, c11, 3)
|
||||
#define PMEVCNTR28 __ACCESS_CP15(c14, 0, c11, 4)
|
||||
#define PMEVCNTR29 __ACCESS_CP15(c14, 0, c11, 5)
|
||||
#define PMEVCNTR30 __ACCESS_CP15(c14, 0, c11, 6)
|
||||
|
||||
#define PMEVTYPER0 __ACCESS_CP15(c14, 0, c12, 0)
|
||||
#define PMEVTYPER1 __ACCESS_CP15(c14, 0, c12, 1)
|
||||
#define PMEVTYPER2 __ACCESS_CP15(c14, 0, c12, 2)
|
||||
#define PMEVTYPER3 __ACCESS_CP15(c14, 0, c12, 3)
|
||||
#define PMEVTYPER4 __ACCESS_CP15(c14, 0, c12, 4)
|
||||
#define PMEVTYPER5 __ACCESS_CP15(c14, 0, c12, 5)
|
||||
#define PMEVTYPER6 __ACCESS_CP15(c14, 0, c12, 6)
|
||||
#define PMEVTYPER7 __ACCESS_CP15(c14, 0, c12, 7)
|
||||
#define PMEVTYPER8 __ACCESS_CP15(c14, 0, c13, 0)
|
||||
#define PMEVTYPER9 __ACCESS_CP15(c14, 0, c13, 1)
|
||||
#define PMEVTYPER10 __ACCESS_CP15(c14, 0, c13, 2)
|
||||
#define PMEVTYPER11 __ACCESS_CP15(c14, 0, c13, 3)
|
||||
#define PMEVTYPER12 __ACCESS_CP15(c14, 0, c13, 4)
|
||||
#define PMEVTYPER13 __ACCESS_CP15(c14, 0, c13, 5)
|
||||
#define PMEVTYPER14 __ACCESS_CP15(c14, 0, c13, 6)
|
||||
#define PMEVTYPER15 __ACCESS_CP15(c14, 0, c13, 7)
|
||||
#define PMEVTYPER16 __ACCESS_CP15(c14, 0, c14, 0)
|
||||
#define PMEVTYPER17 __ACCESS_CP15(c14, 0, c14, 1)
|
||||
#define PMEVTYPER18 __ACCESS_CP15(c14, 0, c14, 2)
|
||||
#define PMEVTYPER19 __ACCESS_CP15(c14, 0, c14, 3)
|
||||
#define PMEVTYPER20 __ACCESS_CP15(c14, 0, c14, 4)
|
||||
#define PMEVTYPER21 __ACCESS_CP15(c14, 0, c14, 5)
|
||||
#define PMEVTYPER22 __ACCESS_CP15(c14, 0, c14, 6)
|
||||
#define PMEVTYPER23 __ACCESS_CP15(c14, 0, c14, 7)
|
||||
#define PMEVTYPER24 __ACCESS_CP15(c14, 0, c15, 0)
|
||||
#define PMEVTYPER25 __ACCESS_CP15(c14, 0, c15, 1)
|
||||
#define PMEVTYPER26 __ACCESS_CP15(c14, 0, c15, 2)
|
||||
#define PMEVTYPER27 __ACCESS_CP15(c14, 0, c15, 3)
|
||||
#define PMEVTYPER28 __ACCESS_CP15(c14, 0, c15, 4)
|
||||
#define PMEVTYPER29 __ACCESS_CP15(c14, 0, c15, 5)
|
||||
#define PMEVTYPER30 __ACCESS_CP15(c14, 0, c15, 6)
|
||||
|
||||
#define RETURN_READ_PMEVCNTRN(n) \
|
||||
return read_sysreg(PMEVCNTR##n)
|
||||
static inline unsigned long read_pmevcntrn(int n)
|
||||
{
|
||||
PMEVN_SWITCH(n, RETURN_READ_PMEVCNTRN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define WRITE_PMEVCNTRN(n) \
|
||||
write_sysreg(val, PMEVCNTR##n)
|
||||
static inline void write_pmevcntrn(int n, unsigned long val)
|
||||
{
|
||||
PMEVN_SWITCH(n, WRITE_PMEVCNTRN);
|
||||
}
|
||||
|
||||
#define WRITE_PMEVTYPERN(n) \
|
||||
write_sysreg(val, PMEVTYPER##n)
|
||||
static inline void write_pmevtypern(int n, unsigned long val)
|
||||
{
|
||||
PMEVN_SWITCH(n, WRITE_PMEVTYPERN);
|
||||
}
|
||||
|
||||
static inline unsigned long read_pmmir(void)
|
||||
{
|
||||
return read_sysreg(PMMIR);
|
||||
}
|
||||
|
||||
static inline u32 read_pmuver(void)
|
||||
{
|
||||
/* PMUVers is not a signed field */
|
||||
u32 dfr0 = read_cpuid_ext(CPUID_EXT_DFR0);
|
||||
|
||||
return (dfr0 >> 24) & 0xf;
|
||||
}
|
||||
|
||||
static inline void write_pmcr(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMCR);
|
||||
}
|
||||
|
||||
static inline u32 read_pmcr(void)
|
||||
{
|
||||
return read_sysreg(PMCR);
|
||||
}
|
||||
|
||||
static inline void write_pmselr(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMSELR);
|
||||
}
|
||||
|
||||
static inline void write_pmccntr(u64 val)
|
||||
{
|
||||
write_sysreg(val, PMCCNTR);
|
||||
}
|
||||
|
||||
static inline u64 read_pmccntr(void)
|
||||
{
|
||||
return read_sysreg(PMCCNTR);
|
||||
}
|
||||
|
||||
static inline void write_pmcntenset(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMCNTENSET);
|
||||
}
|
||||
|
||||
static inline void write_pmcntenclr(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMCNTENCLR);
|
||||
}
|
||||
|
||||
static inline void write_pmintenset(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMINTENSET);
|
||||
}
|
||||
|
||||
static inline void write_pmintenclr(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMINTENCLR);
|
||||
}
|
||||
|
||||
static inline void write_pmccfiltr(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMCCFILTR);
|
||||
}
|
||||
|
||||
static inline void write_pmovsclr(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMOVSR);
|
||||
}
|
||||
|
||||
static inline u32 read_pmovsclr(void)
|
||||
{
|
||||
return read_sysreg(PMOVSR);
|
||||
}
|
||||
|
||||
static inline void write_pmuserenr(u32 val)
|
||||
{
|
||||
write_sysreg(val, PMUSERENR);
|
||||
}
|
||||
|
||||
static inline void kvm_set_pmu_events(u32 set, struct perf_event_attr *attr) {}
|
||||
static inline void kvm_clr_pmu_events(u32 clr) {}
|
||||
static inline bool kvm_pmu_counter_deferred(struct perf_event_attr *attr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* PMU Version in DFR Register */
|
||||
#define ARMV8_PMU_DFR_VER_NI 0
|
||||
#define ARMV8_PMU_DFR_VER_V3P1 0x4
|
||||
#define ARMV8_PMU_DFR_VER_V3P4 0x5
|
||||
#define ARMV8_PMU_DFR_VER_V3P5 0x6
|
||||
#define ARMV8_PMU_DFR_VER_IMP_DEF 0xF
|
||||
|
||||
static inline bool pmuv3_implemented(int pmuver)
|
||||
{
|
||||
return !(pmuver == ARMV8_PMU_DFR_VER_IMP_DEF ||
|
||||
pmuver == ARMV8_PMU_DFR_VER_NI);
|
||||
}
|
||||
|
||||
static inline bool is_pmuv3p4(int pmuver)
|
||||
{
|
||||
return pmuver >= ARMV8_PMU_DFR_VER_V3P4;
|
||||
}
|
||||
|
||||
static inline bool is_pmuv3p5(int pmuver)
|
||||
{
|
||||
return pmuver >= ARMV8_PMU_DFR_VER_V3P5;
|
||||
}
|
||||
|
||||
static inline u64 read_pmceid0(void)
|
||||
{
|
||||
u64 val = read_sysreg(PMCEID0);
|
||||
|
||||
if (read_pmuver() >= ARMV8_PMU_DFR_VER_V3P1)
|
||||
val |= (u64)read_sysreg(PMCEID2) << 32;
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u64 read_pmceid1(void)
|
||||
{
|
||||
u64 val = read_sysreg(PMCEID1);
|
||||
|
||||
if (read_pmuver() >= ARMV8_PMU_DFR_VER_V3P1)
|
||||
val |= (u64)read_sysreg(PMCEID3) << 32;
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -403,7 +403,7 @@ config CPU_V6K
|
||||
select CPU_THUMB_CAPABLE
|
||||
select CPU_TLB_V6 if MMU
|
||||
|
||||
# ARMv7
|
||||
# ARMv7 and ARMv8 architectures
|
||||
config CPU_V7
|
||||
bool
|
||||
select CPU_32v6K
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_ARM64_16K_PAGES=y
|
||||
# b/241785095
|
||||
# CONFIG_INCREMENTAL_FS is not set
|
||||
@@ -46,6 +46,8 @@ CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BRCMSTB=y
|
||||
CONFIG_ARCH_HISI=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
@@ -83,6 +85,7 @@ CONFIG_CPU_FREQ_TIMES=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_ARM_SCPI_CPUFREQ=y
|
||||
# CONFIG_ARM_BRCMSTB_AVS_CPUFREQ is not set
|
||||
CONFIG_ARM_SCMI_CPUFREQ=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_KVM=y
|
||||
@@ -148,6 +151,7 @@ CONFIG_IP_MULTIPLE_TABLES=y
|
||||
CONFIG_NET_IPIP=y
|
||||
CONFIG_NET_IPGRE_DEMUX=y
|
||||
CONFIG_NET_IPGRE=y
|
||||
CONFIG_SYN_COOKIES=y
|
||||
CONFIG_NET_IPVTI=y
|
||||
CONFIG_INET_ESP=y
|
||||
CONFIG_INET_UDP_DIAG=y
|
||||
@@ -299,12 +303,14 @@ CONFIG_PCIEAER=y
|
||||
CONFIG_PCI_IOV=y
|
||||
# CONFIG_VGA_ARB is not set
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
# CONFIG_PCIE_BRCMSTB is not set
|
||||
CONFIG_PCIE_DW_PLAT_EP=y
|
||||
CONFIG_PCIE_QCOM=y
|
||||
CONFIG_PCIE_KIRIN=y
|
||||
CONFIG_PCI_ENDPOINT=y
|
||||
CONFIG_FW_LOADER_USER_HELPER=y
|
||||
# CONFIG_FW_CACHE is not set
|
||||
# CONFIG_BRCMSTB_GISB_ARB is not set
|
||||
# CONFIG_SUN50I_DE2_BUS is not set
|
||||
# CONFIG_SUNXI_RSB is not set
|
||||
CONFIG_ARM_SCMI_PROTOCOL=y
|
||||
@@ -396,6 +402,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=32
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
# CONFIG_SERIAL_8250_BCM7271 is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
@@ -414,10 +421,12 @@ CONFIG_HW_RANDOM=y
|
||||
# CONFIG_DEVPORT is not set
|
||||
# CONFIG_I2C_COMPAT is not set
|
||||
# CONFIG_I2C_HELPER_AUTO is not set
|
||||
# CONFIG_I2C_BRCMSTB is not set
|
||||
CONFIG_I3C=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_MEM=y
|
||||
# CONFIG_SPMI_MSM_PMIC_ARB is not set
|
||||
# CONFIG_PINCTRL_BCM2835 is not set
|
||||
# CONFIG_PINCTRL_SUN8I_H3_R is not set
|
||||
# CONFIG_PINCTRL_SUN50I_A64 is not set
|
||||
# CONFIG_PINCTRL_SUN50I_A64_R is not set
|
||||
@@ -428,7 +437,9 @@ CONFIG_SPI_MEM=y
|
||||
# CONFIG_PINCTRL_SUN50I_H6_R is not set
|
||||
# CONFIG_PINCTRL_SUN50I_H616 is not set
|
||||
# CONFIG_PINCTRL_SUN50I_H616_R is not set
|
||||
# CONFIG_GPIO_BRCMSTB is not set
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
# CONFIG_POWER_RESET_BRCMSTB is not set
|
||||
CONFIG_POWER_RESET_HISI=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
# CONFIG_HWMON is not set
|
||||
@@ -512,6 +523,7 @@ CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_SERIAL=m
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||
CONFIG_USB_GADGET=y
|
||||
# CONFIG_USB_BDC_UDC is not set
|
||||
CONFIG_USB_CONFIGFS=y
|
||||
CONFIG_USB_CONFIGFS_UEVENT=y
|
||||
CONFIG_USB_CONFIGFS_SERIAL=y
|
||||
@@ -538,6 +550,7 @@ CONFIG_MMC=y
|
||||
CONFIG_MMC_CRYPTO=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
# CONFIG_MMC_SDHCI_BRCMSTB is not set
|
||||
CONFIG_SCSI_UFSHCD=y
|
||||
CONFIG_SCSI_UFS_BSG=y
|
||||
CONFIG_SCSI_UFS_CRYPTO=y
|
||||
@@ -551,6 +564,7 @@ CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_TRANSIENT=y
|
||||
CONFIG_EDAC=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
# CONFIG_RTC_DRV_BRCMSTB is not set
|
||||
CONFIG_RTC_DRV_PL030=y
|
||||
CONFIG_RTC_DRV_PL031=y
|
||||
CONFIG_DMABUF_HEAPS=y
|
||||
@@ -569,6 +583,7 @@ CONFIG_VHOST_VSOCK=y
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_ASHMEM=y
|
||||
CONFIG_COMMON_CLK_SCPI=y
|
||||
# CONFIG_CLK_BCM2835 is not set
|
||||
# CONFIG_SUNXI_CCU is not set
|
||||
CONFIG_HWSPINLOCK=y
|
||||
# CONFIG_SUN50I_ERRATUM_UNKNOWN1 is not set
|
||||
@@ -576,6 +591,8 @@ CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y
|
||||
CONFIG_REMOTEPROC=y
|
||||
CONFIG_REMOTEPROC_CDEV=y
|
||||
CONFIG_RPMSG_CHAR=y
|
||||
CONFIG_SOC_BRCMSTB=y
|
||||
# CONFIG_BRCMSTB_PM is not set
|
||||
CONFIG_QCOM_GENI_SE=y
|
||||
CONFIG_ARCH_TEGRA_234_SOC=y
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
@@ -584,10 +601,18 @@ CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_DEVFREQ_GOV_PASSIVE=y
|
||||
CONFIG_PM_DEVFREQ_EVENT=y
|
||||
CONFIG_MEMORY=y
|
||||
# CONFIG_BRCMSTB_DPFE is not set
|
||||
# CONFIG_BRCMSTB_MEMC is not set
|
||||
CONFIG_IIO=y
|
||||
CONFIG_IIO_BUFFER=y
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
CONFIG_PWM=y
|
||||
# CONFIG_BCM7038_L1_IRQ is not set
|
||||
# CONFIG_BCM7120_L2_IRQ is not set
|
||||
# CONFIG_BRCMSTB_L2_IRQ is not set
|
||||
# CONFIG_RESET_BRCMSTB is not set
|
||||
# CONFIG_RESET_BRCMSTB_RESCAL is not set
|
||||
# CONFIG_PHY_BRCM_USB is not set
|
||||
CONFIG_POWERCAP=y
|
||||
CONFIG_IDLE_INJECT=y
|
||||
CONFIG_ANDROID_BINDER_IPC=y
|
||||
|
||||
140
arch/arm64/include/asm/arm_pmuv3.h
Normal file
140
arch/arm64/include/asm/arm_pmuv3.h
Normal file
@@ -0,0 +1,140 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_PMUV3_H
|
||||
#define __ASM_PMUV3_H
|
||||
|
||||
#include <linux/kvm_host.h>
|
||||
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/sysreg.h>
|
||||
|
||||
#define RETURN_READ_PMEVCNTRN(n) \
|
||||
return read_sysreg(pmevcntr##n##_el0)
|
||||
static inline unsigned long read_pmevcntrn(int n)
|
||||
{
|
||||
PMEVN_SWITCH(n, RETURN_READ_PMEVCNTRN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define WRITE_PMEVCNTRN(n) \
|
||||
write_sysreg(val, pmevcntr##n##_el0)
|
||||
static inline void write_pmevcntrn(int n, unsigned long val)
|
||||
{
|
||||
PMEVN_SWITCH(n, WRITE_PMEVCNTRN);
|
||||
}
|
||||
|
||||
#define WRITE_PMEVTYPERN(n) \
|
||||
write_sysreg(val, pmevtyper##n##_el0)
|
||||
static inline void write_pmevtypern(int n, unsigned long val)
|
||||
{
|
||||
PMEVN_SWITCH(n, WRITE_PMEVTYPERN);
|
||||
}
|
||||
|
||||
static inline unsigned long read_pmmir(void)
|
||||
{
|
||||
return read_cpuid(PMMIR_EL1);
|
||||
}
|
||||
|
||||
static inline u32 read_pmuver(void)
|
||||
{
|
||||
u64 dfr0 = read_sysreg(id_aa64dfr0_el1);
|
||||
|
||||
return cpuid_feature_extract_unsigned_field(dfr0,
|
||||
ID_AA64DFR0_EL1_PMUVer_SHIFT);
|
||||
}
|
||||
|
||||
static inline void write_pmcr(u64 val)
|
||||
{
|
||||
write_sysreg(val, pmcr_el0);
|
||||
}
|
||||
|
||||
static inline u64 read_pmcr(void)
|
||||
{
|
||||
return read_sysreg(pmcr_el0);
|
||||
}
|
||||
|
||||
static inline void write_pmselr(u32 val)
|
||||
{
|
||||
write_sysreg(val, pmselr_el0);
|
||||
}
|
||||
|
||||
static inline void write_pmccntr(u64 val)
|
||||
{
|
||||
write_sysreg(val, pmccntr_el0);
|
||||
}
|
||||
|
||||
static inline u64 read_pmccntr(void)
|
||||
{
|
||||
return read_sysreg(pmccntr_el0);
|
||||
}
|
||||
|
||||
static inline void write_pmcntenset(u32 val)
|
||||
{
|
||||
write_sysreg(val, pmcntenset_el0);
|
||||
}
|
||||
|
||||
static inline void write_pmcntenclr(u32 val)
|
||||
{
|
||||
write_sysreg(val, pmcntenclr_el0);
|
||||
}
|
||||
|
||||
static inline void write_pmintenset(u32 val)
|
||||
{
|
||||
write_sysreg(val, pmintenset_el1);
|
||||
}
|
||||
|
||||
static inline void write_pmintenclr(u32 val)
|
||||
{
|
||||
write_sysreg(val, pmintenclr_el1);
|
||||
}
|
||||
|
||||
static inline void write_pmccfiltr(u64 val)
|
||||
{
|
||||
write_sysreg(val, pmccfiltr_el0);
|
||||
}
|
||||
|
||||
static inline void write_pmovsclr(u32 val)
|
||||
{
|
||||
write_sysreg(val, pmovsclr_el0);
|
||||
}
|
||||
|
||||
static inline u32 read_pmovsclr(void)
|
||||
{
|
||||
return read_sysreg(pmovsclr_el0);
|
||||
}
|
||||
|
||||
static inline void write_pmuserenr(u32 val)
|
||||
{
|
||||
write_sysreg(val, pmuserenr_el0);
|
||||
}
|
||||
|
||||
static inline u64 read_pmceid0(void)
|
||||
{
|
||||
return read_sysreg(pmceid0_el0);
|
||||
}
|
||||
|
||||
static inline u64 read_pmceid1(void)
|
||||
{
|
||||
return read_sysreg(pmceid1_el0);
|
||||
}
|
||||
|
||||
static inline bool pmuv3_implemented(int pmuver)
|
||||
{
|
||||
return !(pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF ||
|
||||
pmuver == ID_AA64DFR0_EL1_PMUVer_NI);
|
||||
}
|
||||
|
||||
static inline bool is_pmuv3p4(int pmuver)
|
||||
{
|
||||
return pmuver >= ID_AA64DFR0_EL1_PMUVer_V3P4;
|
||||
}
|
||||
|
||||
static inline bool is_pmuv3p5(int pmuver)
|
||||
{
|
||||
return pmuver >= ID_AA64DFR0_EL1_PMUVer_V3P5;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -149,7 +149,7 @@ void mte_check_tfsr_el1(void);
|
||||
|
||||
static inline void mte_check_tfsr_entry(void)
|
||||
{
|
||||
if (!system_supports_mte())
|
||||
if (!kasan_hw_tags_enabled())
|
||||
return;
|
||||
|
||||
mte_check_tfsr_el1();
|
||||
@@ -157,7 +157,7 @@ static inline void mte_check_tfsr_entry(void)
|
||||
|
||||
static inline void mte_check_tfsr_exit(void)
|
||||
{
|
||||
if (!system_supports_mte())
|
||||
if (!kasan_hw_tags_enabled())
|
||||
return;
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,255 +9,6 @@
|
||||
#include <asm/stack_pointer.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#define ARMV8_PMU_MAX_COUNTERS 32
|
||||
#define ARMV8_PMU_COUNTER_MASK (ARMV8_PMU_MAX_COUNTERS - 1)
|
||||
|
||||
/*
|
||||
* Common architectural and microarchitectural event numbers.
|
||||
*/
|
||||
#define ARMV8_PMUV3_PERFCTR_SW_INCR 0x0000
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_CACHE_REFILL 0x0001
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_TLB_REFILL 0x0002
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_REFILL 0x0003
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE 0x0004
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_TLB_REFILL 0x0005
|
||||
#define ARMV8_PMUV3_PERFCTR_LD_RETIRED 0x0006
|
||||
#define ARMV8_PMUV3_PERFCTR_ST_RETIRED 0x0007
|
||||
#define ARMV8_PMUV3_PERFCTR_INST_RETIRED 0x0008
|
||||
#define ARMV8_PMUV3_PERFCTR_EXC_TAKEN 0x0009
|
||||
#define ARMV8_PMUV3_PERFCTR_EXC_RETURN 0x000A
|
||||
#define ARMV8_PMUV3_PERFCTR_CID_WRITE_RETIRED 0x000B
|
||||
#define ARMV8_PMUV3_PERFCTR_PC_WRITE_RETIRED 0x000C
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_IMMED_RETIRED 0x000D
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_RETURN_RETIRED 0x000E
|
||||
#define ARMV8_PMUV3_PERFCTR_UNALIGNED_LDST_RETIRED 0x000F
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_MIS_PRED 0x0010
|
||||
#define ARMV8_PMUV3_PERFCTR_CPU_CYCLES 0x0011
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_PRED 0x0012
|
||||
#define ARMV8_PMUV3_PERFCTR_MEM_ACCESS 0x0013
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_CACHE 0x0014
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_WB 0x0015
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE 0x0016
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_REFILL 0x0017
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_WB 0x0018
|
||||
#define ARMV8_PMUV3_PERFCTR_BUS_ACCESS 0x0019
|
||||
#define ARMV8_PMUV3_PERFCTR_MEMORY_ERROR 0x001A
|
||||
#define ARMV8_PMUV3_PERFCTR_INST_SPEC 0x001B
|
||||
#define ARMV8_PMUV3_PERFCTR_TTBR_WRITE_RETIRED 0x001C
|
||||
#define ARMV8_PMUV3_PERFCTR_BUS_CYCLES 0x001D
|
||||
#define ARMV8_PMUV3_PERFCTR_CHAIN 0x001E
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_ALLOCATE 0x001F
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_ALLOCATE 0x0020
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_RETIRED 0x0021
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_MIS_PRED_RETIRED 0x0022
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_FRONTEND 0x0023
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_BACKEND 0x0024
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_TLB 0x0025
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_TLB 0x0026
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_CACHE 0x0027
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_CACHE_REFILL 0x0028
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_ALLOCATE 0x0029
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_REFILL 0x002A
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE 0x002B
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_WB 0x002C
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_TLB_REFILL 0x002D
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_TLB_REFILL 0x002E
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_TLB 0x002F
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_TLB 0x0030
|
||||
#define ARMV8_PMUV3_PERFCTR_REMOTE_ACCESS 0x0031
|
||||
#define ARMV8_PMUV3_PERFCTR_LL_CACHE 0x0032
|
||||
#define ARMV8_PMUV3_PERFCTR_LL_CACHE_MISS 0x0033
|
||||
#define ARMV8_PMUV3_PERFCTR_DTLB_WALK 0x0034
|
||||
#define ARMV8_PMUV3_PERFCTR_ITLB_WALK 0x0035
|
||||
#define ARMV8_PMUV3_PERFCTR_LL_CACHE_RD 0x0036
|
||||
#define ARMV8_PMUV3_PERFCTR_LL_CACHE_MISS_RD 0x0037
|
||||
#define ARMV8_PMUV3_PERFCTR_REMOTE_ACCESS_RD 0x0038
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_LMISS_RD 0x0039
|
||||
#define ARMV8_PMUV3_PERFCTR_OP_RETIRED 0x003A
|
||||
#define ARMV8_PMUV3_PERFCTR_OP_SPEC 0x003B
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL 0x003C
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT_BACKEND 0x003D
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT_FRONTEND 0x003E
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT 0x003F
|
||||
|
||||
/* Statistical profiling extension microarchitectural events */
|
||||
#define ARMV8_SPE_PERFCTR_SAMPLE_POP 0x4000
|
||||
#define ARMV8_SPE_PERFCTR_SAMPLE_FEED 0x4001
|
||||
#define ARMV8_SPE_PERFCTR_SAMPLE_FILTRATE 0x4002
|
||||
#define ARMV8_SPE_PERFCTR_SAMPLE_COLLISION 0x4003
|
||||
|
||||
/* AMUv1 architecture events */
|
||||
#define ARMV8_AMU_PERFCTR_CNT_CYCLES 0x4004
|
||||
#define ARMV8_AMU_PERFCTR_STALL_BACKEND_MEM 0x4005
|
||||
|
||||
/* long-latency read miss events */
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_CACHE_LMISS 0x4006
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_LMISS_RD 0x4009
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_CACHE_LMISS 0x400A
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_LMISS_RD 0x400B
|
||||
|
||||
/* Trace buffer events */
|
||||
#define ARMV8_PMUV3_PERFCTR_TRB_WRAP 0x400C
|
||||
#define ARMV8_PMUV3_PERFCTR_TRB_TRIG 0x400E
|
||||
|
||||
/* Trace unit events */
|
||||
#define ARMV8_PMUV3_PERFCTR_TRCEXTOUT0 0x4010
|
||||
#define ARMV8_PMUV3_PERFCTR_TRCEXTOUT1 0x4011
|
||||
#define ARMV8_PMUV3_PERFCTR_TRCEXTOUT2 0x4012
|
||||
#define ARMV8_PMUV3_PERFCTR_TRCEXTOUT3 0x4013
|
||||
#define ARMV8_PMUV3_PERFCTR_CTI_TRIGOUT4 0x4018
|
||||
#define ARMV8_PMUV3_PERFCTR_CTI_TRIGOUT5 0x4019
|
||||
#define ARMV8_PMUV3_PERFCTR_CTI_TRIGOUT6 0x401A
|
||||
#define ARMV8_PMUV3_PERFCTR_CTI_TRIGOUT7 0x401B
|
||||
|
||||
/* additional latency from alignment events */
|
||||
#define ARMV8_PMUV3_PERFCTR_LDST_ALIGN_LAT 0x4020
|
||||
#define ARMV8_PMUV3_PERFCTR_LD_ALIGN_LAT 0x4021
|
||||
#define ARMV8_PMUV3_PERFCTR_ST_ALIGN_LAT 0x4022
|
||||
|
||||
/* Armv8.5 Memory Tagging Extension events */
|
||||
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED 0x4024
|
||||
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED_RD 0x4025
|
||||
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED_WR 0x4026
|
||||
|
||||
/* ARMv8 recommended implementation defined event types */
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_RD 0x0040
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR 0x0041
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_RD 0x0042
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR 0x0043
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_INNER 0x0044
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_OUTER 0x0045
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WB_VICTIM 0x0046
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WB_CLEAN 0x0047
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_INVAL 0x0048
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD 0x004C
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR 0x004D
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD 0x004E
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR 0x004F
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_RD 0x0050
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_WR 0x0051
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_REFILL_RD 0x0052
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_REFILL_WR 0x0053
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_WB_VICTIM 0x0056
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_WB_CLEAN 0x0057
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_INVAL 0x0058
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_TLB_REFILL_RD 0x005C
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_TLB_REFILL_WR 0x005D
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_TLB_RD 0x005E
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_TLB_WR 0x005F
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD 0x0060
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR 0x0061
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_SHARED 0x0062
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_NOT_SHARED 0x0063
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_NORMAL 0x0064
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_PERIPH 0x0065
|
||||
#define ARMV8_IMPDEF_PERFCTR_MEM_ACCESS_RD 0x0066
|
||||
#define ARMV8_IMPDEF_PERFCTR_MEM_ACCESS_WR 0x0067
|
||||
#define ARMV8_IMPDEF_PERFCTR_UNALIGNED_LD_SPEC 0x0068
|
||||
#define ARMV8_IMPDEF_PERFCTR_UNALIGNED_ST_SPEC 0x0069
|
||||
#define ARMV8_IMPDEF_PERFCTR_UNALIGNED_LDST_SPEC 0x006A
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_LDREX_SPEC 0x006C
|
||||
#define ARMV8_IMPDEF_PERFCTR_STREX_PASS_SPEC 0x006D
|
||||
#define ARMV8_IMPDEF_PERFCTR_STREX_FAIL_SPEC 0x006E
|
||||
#define ARMV8_IMPDEF_PERFCTR_STREX_SPEC 0x006F
|
||||
#define ARMV8_IMPDEF_PERFCTR_LD_SPEC 0x0070
|
||||
#define ARMV8_IMPDEF_PERFCTR_ST_SPEC 0x0071
|
||||
#define ARMV8_IMPDEF_PERFCTR_LDST_SPEC 0x0072
|
||||
#define ARMV8_IMPDEF_PERFCTR_DP_SPEC 0x0073
|
||||
#define ARMV8_IMPDEF_PERFCTR_ASE_SPEC 0x0074
|
||||
#define ARMV8_IMPDEF_PERFCTR_VFP_SPEC 0x0075
|
||||
#define ARMV8_IMPDEF_PERFCTR_PC_WRITE_SPEC 0x0076
|
||||
#define ARMV8_IMPDEF_PERFCTR_CRYPTO_SPEC 0x0077
|
||||
#define ARMV8_IMPDEF_PERFCTR_BR_IMMED_SPEC 0x0078
|
||||
#define ARMV8_IMPDEF_PERFCTR_BR_RETURN_SPEC 0x0079
|
||||
#define ARMV8_IMPDEF_PERFCTR_BR_INDIRECT_SPEC 0x007A
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_ISB_SPEC 0x007C
|
||||
#define ARMV8_IMPDEF_PERFCTR_DSB_SPEC 0x007D
|
||||
#define ARMV8_IMPDEF_PERFCTR_DMB_SPEC 0x007E
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_UNDEF 0x0081
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_SVC 0x0082
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_PABORT 0x0083
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_DABORT 0x0084
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_IRQ 0x0086
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_FIQ 0x0087
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_SMC 0x0088
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_HVC 0x008A
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_PABORT 0x008B
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_DABORT 0x008C
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_OTHER 0x008D
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_IRQ 0x008E
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_FIQ 0x008F
|
||||
#define ARMV8_IMPDEF_PERFCTR_RC_LD_SPEC 0x0090
|
||||
#define ARMV8_IMPDEF_PERFCTR_RC_ST_SPEC 0x0091
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_RD 0x00A0
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_WR 0x00A1
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_REFILL_RD 0x00A2
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_REFILL_WR 0x00A3
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_WB_VICTIM 0x00A6
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_WB_CLEAN 0x00A7
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_INVAL 0x00A8
|
||||
|
||||
/*
|
||||
* Per-CPU PMCR: config reg
|
||||
*/
|
||||
#define ARMV8_PMU_PMCR_E (1 << 0) /* Enable all counters */
|
||||
#define ARMV8_PMU_PMCR_P (1 << 1) /* Reset all counters */
|
||||
#define ARMV8_PMU_PMCR_C (1 << 2) /* Cycle counter reset */
|
||||
#define ARMV8_PMU_PMCR_D (1 << 3) /* CCNT counts every 64th cpu cycle */
|
||||
#define ARMV8_PMU_PMCR_X (1 << 4) /* Export to ETM */
|
||||
#define ARMV8_PMU_PMCR_DP (1 << 5) /* Disable CCNT if non-invasive debug*/
|
||||
#define ARMV8_PMU_PMCR_LC (1 << 6) /* Overflow on 64 bit cycle counter */
|
||||
#define ARMV8_PMU_PMCR_LP (1 << 7) /* Long event counter enable */
|
||||
#define ARMV8_PMU_PMCR_N_SHIFT 11 /* Number of counters supported */
|
||||
#define ARMV8_PMU_PMCR_N_MASK 0x1f
|
||||
#define ARMV8_PMU_PMCR_MASK 0xff /* Mask for writable bits */
|
||||
|
||||
/*
|
||||
* PMOVSR: counters overflow flag status reg
|
||||
*/
|
||||
#define ARMV8_PMU_OVSR_MASK 0xffffffff /* Mask for writable bits */
|
||||
#define ARMV8_PMU_OVERFLOWED_MASK ARMV8_PMU_OVSR_MASK
|
||||
|
||||
/*
|
||||
* PMXEVTYPER: Event selection reg
|
||||
*/
|
||||
#define ARMV8_PMU_EVTYPE_MASK 0xc800ffff /* Mask for writable bits */
|
||||
#define ARMV8_PMU_EVTYPE_EVENT 0xffff /* Mask for EVENT bits */
|
||||
|
||||
/*
|
||||
* Event filters for PMUv3
|
||||
*/
|
||||
#define ARMV8_PMU_EXCLUDE_EL1 (1U << 31)
|
||||
#define ARMV8_PMU_EXCLUDE_EL0 (1U << 30)
|
||||
#define ARMV8_PMU_INCLUDE_EL2 (1U << 27)
|
||||
|
||||
/*
|
||||
* PMUSERENR: user enable reg
|
||||
*/
|
||||
#define ARMV8_PMU_USERENR_MASK 0xf /* Mask for writable bits */
|
||||
#define ARMV8_PMU_USERENR_EN (1 << 0) /* PMU regs can be accessed at EL0 */
|
||||
#define ARMV8_PMU_USERENR_SW (1 << 1) /* PMSWINC can be written at EL0 */
|
||||
#define ARMV8_PMU_USERENR_CR (1 << 2) /* Cycle counter can be read at EL0 */
|
||||
#define ARMV8_PMU_USERENR_ER (1 << 3) /* Event counter can be read at EL0 */
|
||||
|
||||
/* PMMIR_EL1.SLOTS mask */
|
||||
#define ARMV8_PMU_SLOTS_MASK 0xff
|
||||
|
||||
#define ARMV8_PMU_BUS_SLOTS_SHIFT 8
|
||||
#define ARMV8_PMU_BUS_SLOTS_MASK 0xff
|
||||
#define ARMV8_PMU_BUS_WIDTH_SHIFT 16
|
||||
#define ARMV8_PMU_BUS_WIDTH_MASK 0xf
|
||||
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
struct pt_regs;
|
||||
extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
|
||||
|
||||
@@ -51,7 +51,6 @@ obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o
|
||||
obj-$(CONFIG_MODULES) += module.o
|
||||
obj-$(CONFIG_ARM64_MODULE_PLTS) += module-plts.o
|
||||
obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o
|
||||
obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o
|
||||
obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
|
||||
obj-$(CONFIG_CPU_PM) += sleep.o suspend.o
|
||||
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/syscalls.h>
|
||||
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(sys_exit);
|
||||
|
||||
struct pt_regs_offset {
|
||||
const char *name;
|
||||
int offset;
|
||||
|
||||
@@ -104,6 +104,10 @@ VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
|
||||
VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1
|
||||
VDSO_LDFLAGS += --orphan-handling=warn
|
||||
|
||||
# Add user-supplied KCPPFLAGS_COMPAT as the last assignments
|
||||
VDSO_CFLAGS += $(KCPPFLAGS_COMPAT)
|
||||
VDSO_AFLAGS += $(KCPPFLAGS_COMPAT)
|
||||
|
||||
|
||||
# Borrow vdsomunge.c from the arm vDSO
|
||||
# We have to use a relative path because scripts/Makefile.host prefixes
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/bug.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mmzone.h>
|
||||
#include <linux/kfence.h>
|
||||
|
||||
static void *trans_alloc(struct trans_pgd_info *info)
|
||||
{
|
||||
@@ -41,7 +42,8 @@ static void _copy_pte(pte_t *dst_ptep, pte_t *src_ptep, unsigned long addr)
|
||||
* the temporary mappings we use during restore.
|
||||
*/
|
||||
set_pte(dst_ptep, pte_mkwrite(pte));
|
||||
} else if (debug_pagealloc_enabled() && !pte_none(pte)) {
|
||||
} else if ((debug_pagealloc_enabled() ||
|
||||
is_kfence_address((void *)addr)) && !pte_none(pte)) {
|
||||
/*
|
||||
* debug_pagealloc will removed the PTE_VALID bit if
|
||||
* the page isn't in use by the resume kernel. It may have
|
||||
|
||||
@@ -141,6 +141,7 @@ CONFIG_IP_MULTIPLE_TABLES=y
|
||||
CONFIG_NET_IPIP=y
|
||||
CONFIG_NET_IPGRE_DEMUX=y
|
||||
CONFIG_NET_IPGRE=y
|
||||
CONFIG_SYN_COOKIES=y
|
||||
CONFIG_NET_IPVTI=y
|
||||
CONFIG_INET_ESP=y
|
||||
CONFIG_INET_UDP_DIAG=y
|
||||
|
||||
@@ -1163,10 +1163,11 @@ static inline bool blk_mq_complete_need_ipi(struct request *rq)
|
||||
if (force_irqthreads())
|
||||
return false;
|
||||
|
||||
/* same CPU or cache domain? Complete locally */
|
||||
/* same CPU or cache domain and capacity? Complete locally */
|
||||
if (cpu == rq->mq_ctx->cpu ||
|
||||
(!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags) &&
|
||||
cpus_share_cache(cpu, rq->mq_ctx->cpu)))
|
||||
cpus_share_cache(cpu, rq->mq_ctx->cpu) &&
|
||||
cpus_equal_capacity(cpu, rq->mq_ctx->cpu)))
|
||||
return false;
|
||||
|
||||
/* don't try to IPI to an offline CPU */
|
||||
|
||||
@@ -57,6 +57,7 @@ config CRYPTO_FIPS_VERSION
|
||||
config CRYPTO_FIPS140_MOD
|
||||
tristate "Enable FIPS 140 cryptographic module"
|
||||
depends on ARM64 && ARM64_MODULE_PLTS
|
||||
depends on CC_IS_CLANG
|
||||
depends on m
|
||||
select CRYPTO_FIPS140_MERGE_MOD_SECTIONS
|
||||
help
|
||||
|
||||
@@ -581,18 +581,8 @@ static bool update_fips140_library_routines(void)
|
||||
return ret == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the FIPS 140 module.
|
||||
*
|
||||
* Note: this routine iterates over the contents of the initcall section, which
|
||||
* consists of an array of function pointers that was emitted by the linker
|
||||
* rather than the compiler. This means that these function pointers lack the
|
||||
* usual CFI stubs that the compiler emits when CFI codegen is enabled. So
|
||||
* let's disable CFI locally when handling the initcall array, to avoid
|
||||
* surpises.
|
||||
*/
|
||||
static int __init __attribute__((__no_sanitize__("cfi")))
|
||||
fips140_init(void)
|
||||
/* Initialize the FIPS 140 module */
|
||||
static int __init fips140_init(void)
|
||||
{
|
||||
const u32 *initcall;
|
||||
|
||||
@@ -605,7 +595,7 @@ fips140_init(void)
|
||||
for (initcall = __initcall_start + 1;
|
||||
initcall < &__initcall_end_marker;
|
||||
initcall++) {
|
||||
int (*init)(void) = offset_to_ptr(initcall);
|
||||
initcall_t init = offset_to_ptr(initcall);
|
||||
int err = init();
|
||||
|
||||
/*
|
||||
|
||||
@@ -1580,7 +1580,7 @@ static const struct iommu_ops *acpi_iommu_configure_id(struct device *dev,
|
||||
* If we have reason to believe the IOMMU driver missed the initial
|
||||
* iommu_probe_device() call for dev, replay it to get things in order.
|
||||
*/
|
||||
if (!err && dev->bus && !device_iommu_mapped(dev))
|
||||
if (!err && dev->bus)
|
||||
err = iommu_probe_device(dev);
|
||||
|
||||
/* Ignore all other errors apart from EPROBE_DEFER */
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#include <trace/hooks/delayacct.h>
|
||||
#include <trace/hooks/usb.h>
|
||||
#include <trace/hooks/sound.h>
|
||||
#include <trace/hooks/fuse.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
@@ -100,6 +101,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rtmutex_waiter_prio);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rtmutex_wait_start);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rtmutex_wait_finish);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rt_mutex_steal);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_madvise_cold_or_pageout_page);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_opt_spin_start);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_opt_spin_finish);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_can_spin_on_owner);
|
||||
@@ -417,3 +419,19 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_hibernate_save_cmp_len);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_read_lazy_flag);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_tsk_need_resched_lazy);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_read_fault);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_queue_request_and_unlock);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_fuse_request_end);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_read_trylock_failed);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shmem_swapin_folio);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_wp_page);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_swap_page);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_anonymous_page);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_uprobes_replace_page);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_percpu_rwsem_down_read);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_percpu_rwsem_up_write);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_percpu_rwsem_wait_complete);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_record_rwsem_reader_owned);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_clear_rwsem_reader_owned);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_record_rwsem_writer_owned);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_clear_rwsem_writer_owned);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pr_set_vma_name_bypass);
|
||||
|
||||
@@ -293,7 +293,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
|
||||
offset = report->size;
|
||||
report->size += parser->global.report_size * parser->global.report_count;
|
||||
|
||||
if (IS_ENABLED(CONFIG_UHID) && parser->device->ll_driver == &uhid_hid_driver)
|
||||
if (IS_BUILTIN(CONFIG_UHID) && parser->device->ll_driver == &uhid_hid_driver)
|
||||
max_buffer_size = UHID_DATA_MAX;
|
||||
|
||||
/* Total size check: Allow for possible report index byte */
|
||||
@@ -1987,7 +1987,7 @@ int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *
|
||||
|
||||
rsize = hid_compute_report_size(report);
|
||||
|
||||
if (IS_ENABLED(CONFIG_UHID) && hid->ll_driver == &uhid_hid_driver)
|
||||
if (IS_BUILTIN(CONFIG_UHID) && hid->ll_driver == &uhid_hid_driver)
|
||||
max_buffer_size = UHID_DATA_MAX;
|
||||
|
||||
if (report_enum->numbered && rsize >= max_buffer_size)
|
||||
@@ -2398,7 +2398,7 @@ int hid_hw_raw_request(struct hid_device *hdev,
|
||||
{
|
||||
unsigned int max_buffer_size = HID_MAX_BUFFER_SIZE;
|
||||
|
||||
if (IS_ENABLED(CONFIG_UHID) && hdev->ll_driver == &uhid_hid_driver)
|
||||
if (IS_BUILTIN(CONFIG_UHID) && hdev->ll_driver == &uhid_hid_driver)
|
||||
max_buffer_size = UHID_DATA_MAX;
|
||||
|
||||
if (len < 1 || len > max_buffer_size || !buf)
|
||||
@@ -2422,7 +2422,7 @@ int hid_hw_output_report(struct hid_device *hdev, __u8 *buf, size_t len)
|
||||
{
|
||||
unsigned int max_buffer_size = HID_MAX_BUFFER_SIZE;
|
||||
|
||||
if (IS_ENABLED(CONFIG_UHID) && hdev->ll_driver == &uhid_hid_driver)
|
||||
if (IS_BUILTIN(CONFIG_UHID) && hdev->ll_driver == &uhid_hid_driver)
|
||||
max_buffer_size = UHID_DATA_MAX;
|
||||
|
||||
if (len < 1 || len > max_buffer_size || !buf)
|
||||
|
||||
@@ -3893,7 +3893,6 @@ static int __init probe_acpi_namespace_devices(void)
|
||||
for_each_active_dev_scope(drhd->devices,
|
||||
drhd->devices_cnt, i, dev) {
|
||||
struct acpi_device_physical_node *pn;
|
||||
struct iommu_group *group;
|
||||
struct acpi_device *adev;
|
||||
|
||||
if (dev->bus != &acpi_bus_type)
|
||||
@@ -3903,12 +3902,6 @@ static int __init probe_acpi_namespace_devices(void)
|
||||
mutex_lock(&adev->physical_node_lock);
|
||||
list_for_each_entry(pn,
|
||||
&adev->physical_node_list, node) {
|
||||
group = iommu_group_get(pn->dev);
|
||||
if (group) {
|
||||
iommu_group_put(group);
|
||||
continue;
|
||||
}
|
||||
|
||||
ret = iommu_probe_device(pn->dev);
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
@@ -327,9 +327,16 @@ static int __iommu_probe_device(struct device *dev, struct list_head *group_list
|
||||
* but for now enforcing a simple global ordering is fine.
|
||||
*/
|
||||
lockdep_assert_held(&iommu_probe_device_lock);
|
||||
|
||||
/* Device is probed already if in a group */
|
||||
if (dev->iommu_group) {
|
||||
ret = 0;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
if (!dev_iommu_get(dev)) {
|
||||
ret = -ENOMEM;
|
||||
goto err_out;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
if (!try_module_get(ops->owner)) {
|
||||
@@ -372,7 +379,7 @@ out_module_put:
|
||||
err_free:
|
||||
dev_iommu_free(dev);
|
||||
|
||||
err_out:
|
||||
out_unlock:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1706,16 +1713,8 @@ struct iommu_domain *iommu_group_default_domain(struct iommu_group *group)
|
||||
static int probe_iommu_group(struct device *dev, void *data)
|
||||
{
|
||||
struct list_head *group_list = data;
|
||||
struct iommu_group *group;
|
||||
int ret;
|
||||
|
||||
/* Device is probed already if in a group */
|
||||
group = iommu_group_get(dev);
|
||||
if (group) {
|
||||
iommu_group_put(group);
|
||||
return 0;
|
||||
}
|
||||
|
||||
mutex_lock(&iommu_probe_device_lock);
|
||||
ret = __iommu_probe_device(dev, group_list);
|
||||
mutex_unlock(&iommu_probe_device_lock);
|
||||
|
||||
@@ -166,7 +166,7 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
|
||||
* If we have reason to believe the IOMMU driver missed the initial
|
||||
* probe for dev, replay it to get things in order.
|
||||
*/
|
||||
if (!err && dev->bus && !device_iommu_mapped(dev))
|
||||
if (!err && dev->bus)
|
||||
err = iommu_probe_device(dev);
|
||||
|
||||
/* Ignore all other errors apart from EPROBE_DEFER */
|
||||
|
||||
@@ -119,13 +119,12 @@ void mmc_retune_enable(struct mmc_host *host)
|
||||
|
||||
/*
|
||||
* Pause re-tuning for a small set of operations. The pause begins after the
|
||||
* next command and after first doing re-tuning.
|
||||
* next command.
|
||||
*/
|
||||
void mmc_retune_pause(struct mmc_host *host)
|
||||
{
|
||||
if (!host->retune_paused) {
|
||||
host->retune_paused = 1;
|
||||
mmc_retune_needed(host);
|
||||
mmc_retune_hold(host);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1803,14 +1803,16 @@ int phy_suspend(struct phy_device *phydev)
|
||||
struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL };
|
||||
struct net_device *netdev = phydev->attached_dev;
|
||||
struct phy_driver *phydrv = phydev->drv;
|
||||
bool wol_enabled = false;
|
||||
int ret;
|
||||
|
||||
if (phydev->suspended)
|
||||
return 0;
|
||||
|
||||
/* If the device has WOL enabled, we cannot suspend the PHY */
|
||||
phy_ethtool_get_wol(phydev, &wol);
|
||||
if (wol.wolopts || (netdev && netdev->wol_enabled))
|
||||
wol_enabled = wol.wolopts || (netdev && netdev->wol_enabled);
|
||||
/* If the device has WOL enabled, we cannot suspend the PHY */
|
||||
if (wol_enabled && !(phydrv->flags & PHY_ALWAYS_CALL_SUSPEND))
|
||||
return -EBUSY;
|
||||
|
||||
if (!phydrv || !phydrv->suspend)
|
||||
|
||||
@@ -100,6 +100,16 @@ config ARM_SMMU_V3_PMU
|
||||
through the SMMU and allow the resulting information to be filtered
|
||||
based on the Stream ID of the corresponding master.
|
||||
|
||||
config ARM_PMUV3
|
||||
depends on HW_PERF_EVENTS && ((ARM && CPU_V7) || ARM64)
|
||||
bool "ARM PMUv3 support" if !ARM64
|
||||
default ARM64
|
||||
help
|
||||
Say y if you want to use the ARM performance monitor unit (PMU)
|
||||
version 3. The PMUv3 is the CPU performance monitors on ARMv8
|
||||
(aarch32 and aarch64) systems that implement the PMUv3
|
||||
architecture.
|
||||
|
||||
config ARM_DSU_PMU
|
||||
tristate "ARM DynamIQ Shared Unit (DSU) PMU"
|
||||
depends on ARM64
|
||||
|
||||
@@ -5,6 +5,7 @@ obj-$(CONFIG_ARM_CMN) += arm-cmn.o
|
||||
obj-$(CONFIG_ARM_DSU_PMU) += arm_dsu_pmu.o
|
||||
obj-$(CONFIG_ARM_PMU) += arm_pmu.o arm_pmu_platform.o
|
||||
obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o
|
||||
obj-$(CONFIG_ARM_PMUV3) += arm_pmuv3.o
|
||||
obj-$(CONFIG_ARM_SMMU_V3_PMU) += arm_smmuv3_pmu.o
|
||||
obj-$(CONFIG_FSL_IMX8_DDR_PMU) += fsl_imx8_ddr_perf.o
|
||||
obj-$(CONFIG_HISI_PMU) += hisilicon/
|
||||
|
||||
@@ -10,20 +10,21 @@
|
||||
|
||||
#include <asm/irq_regs.h>
|
||||
#include <asm/perf_event.h>
|
||||
#include <asm/sysreg.h>
|
||||
#include <asm/virt.h>
|
||||
|
||||
#include <clocksource/arm_arch_timer.h>
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/kvm_host.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/perf/arm_pmu.h>
|
||||
#include <linux/perf/arm_pmuv3.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sched_clock.h>
|
||||
#include <linux/smp.h>
|
||||
|
||||
#include <asm/arm_pmuv3.h>
|
||||
|
||||
/* ARMv8 Cortex-A53 specific event types. */
|
||||
#define ARMV8_A53_PERFCTR_PREF_LINEFILL 0xC2
|
||||
|
||||
@@ -391,10 +392,13 @@ static const struct attribute_group armv8_pmuv3_caps_attr_group = {
|
||||
* We unconditionally enable ARMv8.5-PMU long event counter support
|
||||
* (64-bit events) where supported. Indicate if this arm_pmu has long
|
||||
* event counter support.
|
||||
*
|
||||
* On AArch32, long counters make no sense (you can't access the top
|
||||
* bits), so we only enable this on AArch64.
|
||||
*/
|
||||
static bool armv8pmu_has_long_event(struct arm_pmu *cpu_pmu)
|
||||
{
|
||||
return (cpu_pmu->pmuver >= ID_AA64DFR0_EL1_PMUVer_V3P5);
|
||||
return (IS_ENABLED(CONFIG_ARM64) && is_pmuv3p5(cpu_pmu->pmuver));
|
||||
}
|
||||
|
||||
static inline bool armv8pmu_event_has_user_read(struct perf_event *event)
|
||||
@@ -428,83 +432,16 @@ static inline bool armv8pmu_event_is_chained(struct perf_event *event)
|
||||
#define ARMV8_IDX_TO_COUNTER(x) \
|
||||
(((x) - ARMV8_IDX_COUNTER0) & ARMV8_PMU_COUNTER_MASK)
|
||||
|
||||
/*
|
||||
* This code is really good
|
||||
*/
|
||||
|
||||
#define PMEVN_CASE(n, case_macro) \
|
||||
case n: case_macro(n); break
|
||||
|
||||
#define PMEVN_SWITCH(x, case_macro) \
|
||||
do { \
|
||||
switch (x) { \
|
||||
PMEVN_CASE(0, case_macro); \
|
||||
PMEVN_CASE(1, case_macro); \
|
||||
PMEVN_CASE(2, case_macro); \
|
||||
PMEVN_CASE(3, case_macro); \
|
||||
PMEVN_CASE(4, case_macro); \
|
||||
PMEVN_CASE(5, case_macro); \
|
||||
PMEVN_CASE(6, case_macro); \
|
||||
PMEVN_CASE(7, case_macro); \
|
||||
PMEVN_CASE(8, case_macro); \
|
||||
PMEVN_CASE(9, case_macro); \
|
||||
PMEVN_CASE(10, case_macro); \
|
||||
PMEVN_CASE(11, case_macro); \
|
||||
PMEVN_CASE(12, case_macro); \
|
||||
PMEVN_CASE(13, case_macro); \
|
||||
PMEVN_CASE(14, case_macro); \
|
||||
PMEVN_CASE(15, case_macro); \
|
||||
PMEVN_CASE(16, case_macro); \
|
||||
PMEVN_CASE(17, case_macro); \
|
||||
PMEVN_CASE(18, case_macro); \
|
||||
PMEVN_CASE(19, case_macro); \
|
||||
PMEVN_CASE(20, case_macro); \
|
||||
PMEVN_CASE(21, case_macro); \
|
||||
PMEVN_CASE(22, case_macro); \
|
||||
PMEVN_CASE(23, case_macro); \
|
||||
PMEVN_CASE(24, case_macro); \
|
||||
PMEVN_CASE(25, case_macro); \
|
||||
PMEVN_CASE(26, case_macro); \
|
||||
PMEVN_CASE(27, case_macro); \
|
||||
PMEVN_CASE(28, case_macro); \
|
||||
PMEVN_CASE(29, case_macro); \
|
||||
PMEVN_CASE(30, case_macro); \
|
||||
default: WARN(1, "Invalid PMEV* index\n"); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define RETURN_READ_PMEVCNTRN(n) \
|
||||
return read_sysreg(pmevcntr##n##_el0)
|
||||
static unsigned long read_pmevcntrn(int n)
|
||||
static inline u64 armv8pmu_pmcr_read(void)
|
||||
{
|
||||
PMEVN_SWITCH(n, RETURN_READ_PMEVCNTRN);
|
||||
return 0;
|
||||
return read_pmcr();
|
||||
}
|
||||
|
||||
#define WRITE_PMEVCNTRN(n) \
|
||||
write_sysreg(val, pmevcntr##n##_el0)
|
||||
static void write_pmevcntrn(int n, unsigned long val)
|
||||
{
|
||||
PMEVN_SWITCH(n, WRITE_PMEVCNTRN);
|
||||
}
|
||||
|
||||
#define WRITE_PMEVTYPERN(n) \
|
||||
write_sysreg(val, pmevtyper##n##_el0)
|
||||
static void write_pmevtypern(int n, unsigned long val)
|
||||
{
|
||||
PMEVN_SWITCH(n, WRITE_PMEVTYPERN);
|
||||
}
|
||||
|
||||
static inline u32 armv8pmu_pmcr_read(void)
|
||||
{
|
||||
return read_sysreg(pmcr_el0);
|
||||
}
|
||||
|
||||
static inline void armv8pmu_pmcr_write(u32 val)
|
||||
static inline void armv8pmu_pmcr_write(u64 val)
|
||||
{
|
||||
val &= ARMV8_PMU_PMCR_MASK;
|
||||
isb();
|
||||
write_sysreg(val, pmcr_el0);
|
||||
write_pmcr(val);
|
||||
}
|
||||
|
||||
static inline int armv8pmu_has_overflowed(u32 pmovsr)
|
||||
@@ -559,7 +496,7 @@ static bool armv8pmu_event_needs_bias(struct perf_event *event)
|
||||
static u64 armv8pmu_bias_long_counter(struct perf_event *event, u64 value)
|
||||
{
|
||||
if (armv8pmu_event_needs_bias(event))
|
||||
value |= GENMASK(63, 32);
|
||||
value |= GENMASK_ULL(63, 32);
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -567,7 +504,7 @@ static u64 armv8pmu_bias_long_counter(struct perf_event *event, u64 value)
|
||||
static u64 armv8pmu_unbias_long_counter(struct perf_event *event, u64 value)
|
||||
{
|
||||
if (armv8pmu_event_needs_bias(event))
|
||||
value &= ~GENMASK(63, 32);
|
||||
value &= ~GENMASK_ULL(63, 32);
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -579,7 +516,7 @@ static u64 armv8pmu_read_counter(struct perf_event *event)
|
||||
u64 value;
|
||||
|
||||
if (idx == ARMV8_IDX_CYCLE_COUNTER)
|
||||
value = read_sysreg(pmccntr_el0);
|
||||
value = read_pmccntr();
|
||||
else
|
||||
value = armv8pmu_read_hw_counter(event);
|
||||
|
||||
@@ -614,7 +551,7 @@ static void armv8pmu_write_counter(struct perf_event *event, u64 value)
|
||||
value = armv8pmu_bias_long_counter(event, value);
|
||||
|
||||
if (idx == ARMV8_IDX_CYCLE_COUNTER)
|
||||
write_sysreg(value, pmccntr_el0);
|
||||
write_pmccntr(value);
|
||||
else
|
||||
armv8pmu_write_hw_counter(event, value);
|
||||
}
|
||||
@@ -645,7 +582,7 @@ static inline void armv8pmu_write_event_type(struct perf_event *event)
|
||||
armv8pmu_write_evtype(idx, chain_evt);
|
||||
} else {
|
||||
if (idx == ARMV8_IDX_CYCLE_COUNTER)
|
||||
write_sysreg(hwc->config_base, pmccfiltr_el0);
|
||||
write_pmccfiltr(hwc->config_base);
|
||||
else
|
||||
armv8pmu_write_evtype(idx, hwc->config_base);
|
||||
}
|
||||
@@ -668,7 +605,7 @@ static inline void armv8pmu_enable_counter(u32 mask)
|
||||
* enable the counter.
|
||||
* */
|
||||
isb();
|
||||
write_sysreg(mask, pmcntenset_el0);
|
||||
write_pmcntenset(mask);
|
||||
}
|
||||
|
||||
static inline void armv8pmu_enable_event_counter(struct perf_event *event)
|
||||
@@ -685,7 +622,7 @@ static inline void armv8pmu_enable_event_counter(struct perf_event *event)
|
||||
|
||||
static inline void armv8pmu_disable_counter(u32 mask)
|
||||
{
|
||||
write_sysreg(mask, pmcntenclr_el0);
|
||||
write_pmcntenclr(mask);
|
||||
/*
|
||||
* Make sure the effects of disabling the counter are visible before we
|
||||
* start configuring the event.
|
||||
@@ -707,7 +644,7 @@ static inline void armv8pmu_disable_event_counter(struct perf_event *event)
|
||||
|
||||
static inline void armv8pmu_enable_intens(u32 mask)
|
||||
{
|
||||
write_sysreg(mask, pmintenset_el1);
|
||||
write_pmintenset(mask);
|
||||
}
|
||||
|
||||
static inline void armv8pmu_enable_event_irq(struct perf_event *event)
|
||||
@@ -718,10 +655,10 @@ static inline void armv8pmu_enable_event_irq(struct perf_event *event)
|
||||
|
||||
static inline void armv8pmu_disable_intens(u32 mask)
|
||||
{
|
||||
write_sysreg(mask, pmintenclr_el1);
|
||||
write_pmintenclr(mask);
|
||||
isb();
|
||||
/* Clear the overflow flag in case an interrupt is pending. */
|
||||
write_sysreg(mask, pmovsclr_el0);
|
||||
write_pmovsclr(mask);
|
||||
isb();
|
||||
}
|
||||
|
||||
@@ -736,18 +673,18 @@ static inline u32 armv8pmu_getreset_flags(void)
|
||||
u32 value;
|
||||
|
||||
/* Read */
|
||||
value = read_sysreg(pmovsclr_el0);
|
||||
value = read_pmovsclr();
|
||||
|
||||
/* Write to clear flags */
|
||||
value &= ARMV8_PMU_OVSR_MASK;
|
||||
write_sysreg(value, pmovsclr_el0);
|
||||
write_pmovsclr(value);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
static void armv8pmu_disable_user_access(void)
|
||||
{
|
||||
write_sysreg(0, pmuserenr_el0);
|
||||
write_pmuserenr(0);
|
||||
}
|
||||
|
||||
static void armv8pmu_enable_user_access(struct arm_pmu *cpu_pmu)
|
||||
@@ -758,13 +695,13 @@ static void armv8pmu_enable_user_access(struct arm_pmu *cpu_pmu)
|
||||
/* Clear any unused counters to avoid leaking their contents */
|
||||
for_each_clear_bit(i, cpuc->used_mask, cpu_pmu->num_events) {
|
||||
if (i == ARMV8_IDX_CYCLE_COUNTER)
|
||||
write_sysreg(0, pmccntr_el0);
|
||||
write_pmccntr(0);
|
||||
else
|
||||
armv8pmu_write_evcntr(i, 0);
|
||||
}
|
||||
|
||||
write_sysreg(0, pmuserenr_el0);
|
||||
write_sysreg(ARMV8_PMU_USERENR_ER | ARMV8_PMU_USERENR_CR, pmuserenr_el0);
|
||||
write_pmuserenr(0);
|
||||
write_pmuserenr(ARMV8_PMU_USERENR_ER | ARMV8_PMU_USERENR_CR);
|
||||
}
|
||||
|
||||
static void armv8pmu_enable_event(struct perf_event *event)
|
||||
@@ -1032,7 +969,7 @@ static int armv8pmu_filter_match(struct perf_event *event)
|
||||
static void armv8pmu_reset(void *info)
|
||||
{
|
||||
struct arm_pmu *cpu_pmu = (struct arm_pmu *)info;
|
||||
u32 pmcr;
|
||||
u64 pmcr;
|
||||
|
||||
/* The counter and interrupt enable registers are unknown at reset. */
|
||||
armv8pmu_disable_counter(U32_MAX);
|
||||
@@ -1142,15 +1079,12 @@ static void __armv8pmu_probe_pmu(void *info)
|
||||
{
|
||||
struct armv8pmu_probe_info *probe = info;
|
||||
struct arm_pmu *cpu_pmu = probe->pmu;
|
||||
u64 dfr0;
|
||||
u64 pmceid_raw[2];
|
||||
u32 pmceid[2];
|
||||
int pmuver;
|
||||
|
||||
dfr0 = read_sysreg(id_aa64dfr0_el1);
|
||||
pmuver = cpuid_feature_extract_unsigned_field(dfr0,
|
||||
ID_AA64DFR0_EL1_PMUVer_SHIFT);
|
||||
if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF || pmuver == 0)
|
||||
pmuver = read_pmuver();
|
||||
if (!pmuv3_implemented(pmuver))
|
||||
return;
|
||||
|
||||
cpu_pmu->pmuver = pmuver;
|
||||
@@ -1163,8 +1097,8 @@ static void __armv8pmu_probe_pmu(void *info)
|
||||
/* Add the CPU cycles counter */
|
||||
cpu_pmu->num_events += 1;
|
||||
|
||||
pmceid[0] = pmceid_raw[0] = read_sysreg(pmceid0_el0);
|
||||
pmceid[1] = pmceid_raw[1] = read_sysreg(pmceid1_el0);
|
||||
pmceid[0] = pmceid_raw[0] = read_pmceid0();
|
||||
pmceid[1] = pmceid_raw[1] = read_pmceid1();
|
||||
|
||||
bitmap_from_arr32(cpu_pmu->pmceid_bitmap,
|
||||
pmceid, ARMV8_PMUV3_MAX_COMMON_EVENTS);
|
||||
@@ -1175,9 +1109,9 @@ static void __armv8pmu_probe_pmu(void *info)
|
||||
bitmap_from_arr32(cpu_pmu->pmceid_ext_bitmap,
|
||||
pmceid, ARMV8_PMUV3_MAX_COMMON_EVENTS);
|
||||
|
||||
/* store PMMIR_EL1 register for sysfs */
|
||||
if (pmuver >= ID_AA64DFR0_EL1_PMUVer_V3P4 && (pmceid_raw[1] & BIT(31)))
|
||||
cpu_pmu->reg_pmmir = read_cpuid(PMMIR_EL1);
|
||||
/* store PMMIR register for sysfs */
|
||||
if (is_pmuv3p4(pmuver) && (pmceid_raw[1] & BIT(31)))
|
||||
cpu_pmu->reg_pmmir = read_pmmir();
|
||||
else
|
||||
cpu_pmu->reg_pmmir = 0;
|
||||
}
|
||||
@@ -2967,7 +2967,6 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
||||
(hba->clk_gating.state != CLKS_ON));
|
||||
|
||||
lrbp = &hba->lrb[tag];
|
||||
WARN_ON(lrbp->cmd);
|
||||
lrbp->cmd = cmd;
|
||||
lrbp->task_tag = tag;
|
||||
lrbp->lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun);
|
||||
@@ -2991,7 +2990,6 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
||||
|
||||
err = ufshcd_map_sg(hba, lrbp);
|
||||
if (err) {
|
||||
lrbp->cmd = NULL;
|
||||
ufshcd_release(hba);
|
||||
goto out;
|
||||
}
|
||||
@@ -3256,7 +3254,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,
|
||||
down_read(&hba->clk_scaling_lock);
|
||||
|
||||
lrbp = &hba->lrb[tag];
|
||||
WARN_ON(lrbp->cmd);
|
||||
lrbp->cmd = NULL;
|
||||
err = ufshcd_compose_dev_cmd(hba, lrbp, cmd_type, tag);
|
||||
if (unlikely(err))
|
||||
goto out;
|
||||
@@ -5503,7 +5501,6 @@ void ufshcd_release_scsi_cmd(struct ufs_hba *hba,
|
||||
|
||||
scsi_dma_unmap(cmd);
|
||||
ufshcd_crypto_clear_prdt(hba, lrbp);
|
||||
lrbp->cmd = NULL; /* Mark the command as completed. */
|
||||
ufshcd_release(hba);
|
||||
ufshcd_clk_scaling_update_busy(hba);
|
||||
}
|
||||
@@ -7207,7 +7204,6 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba,
|
||||
down_read(&hba->clk_scaling_lock);
|
||||
|
||||
lrbp = &hba->lrb[tag];
|
||||
WARN_ON(lrbp->cmd);
|
||||
lrbp->cmd = NULL;
|
||||
lrbp->task_tag = tag;
|
||||
lrbp->lun = 0;
|
||||
@@ -7379,7 +7375,6 @@ int ufshcd_advanced_rpmb_req_handler(struct ufs_hba *hba, struct utp_upiu_req *r
|
||||
down_read(&hba->clk_scaling_lock);
|
||||
|
||||
lrbp = &hba->lrb[tag];
|
||||
WARN_ON(lrbp->cmd);
|
||||
lrbp->cmd = NULL;
|
||||
lrbp->task_tag = tag;
|
||||
lrbp->lun = UFS_UPIU_RPMB_WLUN;
|
||||
|
||||
@@ -485,6 +485,13 @@ static void dwc3_free_event_buffers(struct dwc3 *dwc)
|
||||
static int dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned int length)
|
||||
{
|
||||
struct dwc3_event_buffer *evt;
|
||||
unsigned int hw_mode;
|
||||
|
||||
hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
|
||||
if (hw_mode == DWC3_GHWPARAMS0_MODE_HOST) {
|
||||
dwc->ev_buf = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
evt = dwc3_alloc_one_event_buffer(dwc, length);
|
||||
if (IS_ERR(evt)) {
|
||||
@@ -506,6 +513,9 @@ int dwc3_event_buffers_setup(struct dwc3 *dwc)
|
||||
{
|
||||
struct dwc3_event_buffer *evt;
|
||||
|
||||
if (!dwc->ev_buf)
|
||||
return 0;
|
||||
|
||||
evt = dwc->ev_buf;
|
||||
evt->lpos = 0;
|
||||
dwc3_writel(dwc->regs, DWC3_GEVNTADRLO(0),
|
||||
@@ -523,6 +533,9 @@ void dwc3_event_buffers_cleanup(struct dwc3 *dwc)
|
||||
{
|
||||
struct dwc3_event_buffer *evt;
|
||||
|
||||
if (!dwc->ev_buf)
|
||||
return;
|
||||
|
||||
evt = dwc->ev_buf;
|
||||
|
||||
evt->lpos = 0;
|
||||
|
||||
@@ -830,9 +830,9 @@ static void ffs_user_copy_worker(struct work_struct *work)
|
||||
{
|
||||
struct ffs_io_data *io_data = container_of(work, struct ffs_io_data,
|
||||
work);
|
||||
int ret = io_data->req->status ? io_data->req->status :
|
||||
io_data->req->actual;
|
||||
int ret = io_data->status;
|
||||
bool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD;
|
||||
unsigned long flags;
|
||||
|
||||
if (io_data->read && ret > 0) {
|
||||
kthread_use_mm(io_data->mm);
|
||||
@@ -845,7 +845,10 @@ static void ffs_user_copy_worker(struct work_struct *work)
|
||||
if (io_data->ffs->ffs_eventfd && !kiocb_has_eventfd)
|
||||
eventfd_signal(io_data->ffs->ffs_eventfd, 1);
|
||||
|
||||
spin_lock_irqsave(&io_data->ffs->eps_lock, flags);
|
||||
usb_ep_free_request(io_data->ep, io_data->req);
|
||||
io_data->req = NULL;
|
||||
spin_unlock_irqrestore(&io_data->ffs->eps_lock, flags);
|
||||
|
||||
if (io_data->read)
|
||||
kfree(io_data->to_free);
|
||||
@@ -861,6 +864,8 @@ static void ffs_epfile_async_io_complete(struct usb_ep *_ep,
|
||||
|
||||
ENTER();
|
||||
|
||||
io_data->status = req->status ? req->status : req->actual;
|
||||
|
||||
INIT_WORK(&io_data->work, ffs_user_copy_worker);
|
||||
queue_work(ffs->io_completion_wq, &io_data->work);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
obj-$(CONFIG_EROFS_FS) += erofs.o
|
||||
erofs-objs := super.o inode.o data.o namei.o dir.o utils.o pcpubuf.o sysfs.o
|
||||
erofs-objs := super.o inode.o data.o namei.o dir.o sysfs.o
|
||||
erofs-$(CONFIG_EROFS_FS_XATTR) += xattr.o
|
||||
erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o
|
||||
erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o zutil.o
|
||||
erofs-$(CONFIG_EROFS_FS_ZIP_LZMA) += decompressor_lzma.o
|
||||
erofs-$(CONFIG_EROFS_FS_ONDEMAND) += fscache.o
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
struct z_erofs_decompress_req {
|
||||
struct super_block *sb;
|
||||
struct page **in, **out;
|
||||
|
||||
unsigned short pageofs_in, pageofs_out;
|
||||
unsigned int inputsize, outputsize;
|
||||
|
||||
/* indicate the algorithm will be used for decompression */
|
||||
unsigned int alg;
|
||||
unsigned int alg; /* the algorithm for decompression */
|
||||
bool inplace_io, partial_decoding, fillgaps;
|
||||
gfp_t gfp; /* allocation flags for extra temporary buffers */
|
||||
};
|
||||
|
||||
struct z_erofs_decompressor {
|
||||
|
||||
@@ -55,7 +55,7 @@ static int z_erofs_load_lz4_config(struct super_block *sb,
|
||||
sbi->lz4.max_distance_pages = distance ?
|
||||
DIV_ROUND_UP(distance, PAGE_SIZE) + 1 :
|
||||
LZ4_MAX_DISTANCE_PAGES;
|
||||
return erofs_pcpubuf_growsize(sbi->lz4.max_pclusterblks);
|
||||
return z_erofs_gbuf_growsize(sbi->lz4.max_pclusterblks);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -112,8 +112,9 @@ static int z_erofs_lz4_prepare_dstpages(struct z_erofs_lz4_decompress_ctx *ctx,
|
||||
victim = availables[--top];
|
||||
get_page(victim);
|
||||
} else {
|
||||
victim = erofs_allocpage(pagepool,
|
||||
GFP_KERNEL | __GFP_NOFAIL);
|
||||
victim = __erofs_allocpage(pagepool, rq->gfp, true);
|
||||
if (!victim)
|
||||
return -ENOMEM;
|
||||
set_page_private(victim, Z_EROFS_SHORTLIVED_PAGE);
|
||||
}
|
||||
rq->out[i] = victim;
|
||||
@@ -159,7 +160,7 @@ static void *z_erofs_lz4_handle_overlap(struct z_erofs_lz4_decompress_ctx *ctx,
|
||||
docopy:
|
||||
/* Or copy compressed data which can be overlapped to per-CPU buffer */
|
||||
in = rq->in;
|
||||
src = erofs_get_pcpubuf(ctx->inpages);
|
||||
src = z_erofs_get_gbuf(ctx->inpages);
|
||||
if (!src) {
|
||||
DBG_BUGON(1);
|
||||
kunmap_local(inpage);
|
||||
@@ -266,7 +267,7 @@ static int z_erofs_lz4_decompress_mem(struct z_erofs_lz4_decompress_ctx *ctx,
|
||||
} else if (maptype == 1) {
|
||||
vm_unmap_ram(src, ctx->inpages);
|
||||
} else if (maptype == 2) {
|
||||
erofs_put_pcpubuf(src);
|
||||
z_erofs_put_gbuf(src);
|
||||
} else if (maptype != 3) {
|
||||
DBG_BUGON(1);
|
||||
return -EFAULT;
|
||||
|
||||
@@ -151,7 +151,7 @@ again:
|
||||
}
|
||||
|
||||
int z_erofs_lzma_decompress(struct z_erofs_decompress_req *rq,
|
||||
struct page **pagepool)
|
||||
struct page **pgpl)
|
||||
{
|
||||
const unsigned int nrpages_out =
|
||||
PAGE_ALIGN(rq->pageofs_out + rq->outputsize) >> PAGE_SHIFT;
|
||||
@@ -218,8 +218,11 @@ again:
|
||||
PAGE_SIZE - pageofs);
|
||||
outlen -= strm->buf.out_size;
|
||||
if (!rq->out[no] && rq->fillgaps) { /* deduped */
|
||||
rq->out[no] = erofs_allocpage(pagepool,
|
||||
GFP_KERNEL | __GFP_NOFAIL);
|
||||
rq->out[no] = erofs_allocpage(pgpl, rq->gfp);
|
||||
if (!rq->out[no]) {
|
||||
err = -ENOMEM;
|
||||
break;
|
||||
}
|
||||
set_page_private(rq->out[no],
|
||||
Z_EROFS_SHORTLIVED_PAGE);
|
||||
}
|
||||
@@ -261,8 +264,11 @@ again:
|
||||
|
||||
DBG_BUGON(erofs_page_is_managed(EROFS_SB(rq->sb),
|
||||
rq->in[j]));
|
||||
tmppage = erofs_allocpage(pagepool,
|
||||
GFP_KERNEL | __GFP_NOFAIL);
|
||||
tmppage = erofs_allocpage(pgpl, rq->gfp);
|
||||
if (!tmppage) {
|
||||
err = -ENOMEM;
|
||||
goto failed;
|
||||
}
|
||||
set_page_private(tmppage, Z_EROFS_SHORTLIVED_PAGE);
|
||||
copy_highpage(tmppage, rq->in[j]);
|
||||
rq->in[j] = tmppage;
|
||||
@@ -280,6 +286,7 @@ again:
|
||||
break;
|
||||
}
|
||||
}
|
||||
failed:
|
||||
if (no < nrpages_out && strm->buf.out)
|
||||
kunmap(rq->out[no]);
|
||||
if (ni < nrpages_in)
|
||||
|
||||
@@ -430,6 +430,11 @@ int z_erofs_fill_inode(struct inode *inode);
|
||||
int z_erofs_map_blocks_iter(struct inode *inode,
|
||||
struct erofs_map_blocks *map,
|
||||
int flags);
|
||||
void *z_erofs_get_gbuf(unsigned int requiredpages);
|
||||
void z_erofs_put_gbuf(void *ptr);
|
||||
int z_erofs_gbuf_growsize(unsigned int nrpages);
|
||||
int __init z_erofs_gbuf_init(void);
|
||||
void z_erofs_gbuf_exit(void);
|
||||
#else
|
||||
static inline int z_erofs_fill_inode(struct inode *inode) { return -EOPNOTSUPP; }
|
||||
static inline int z_erofs_map_blocks_iter(struct inode *inode,
|
||||
@@ -438,6 +443,8 @@ static inline int z_erofs_map_blocks_iter(struct inode *inode,
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
static inline int z_erofs_gbuf_init(void) { return 0; }
|
||||
static inline void z_erofs_gbuf_exit(void) {}
|
||||
#endif /* !CONFIG_EROFS_FS_ZIP */
|
||||
|
||||
struct erofs_map_dev {
|
||||
@@ -509,13 +516,6 @@ static inline void *erofs_vm_map_ram(struct page **pages, unsigned int count)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* pcpubuf.c */
|
||||
void *erofs_get_pcpubuf(unsigned int requiredpages);
|
||||
void erofs_put_pcpubuf(void *ptr);
|
||||
int erofs_pcpubuf_growsize(unsigned int nrpages);
|
||||
void erofs_pcpubuf_init(void);
|
||||
void erofs_pcpubuf_exit(void);
|
||||
|
||||
/* sysfs.c */
|
||||
int erofs_register_sysfs(struct super_block *sb);
|
||||
void erofs_unregister_sysfs(struct super_block *sb);
|
||||
@@ -523,7 +523,11 @@ int __init erofs_init_sysfs(void);
|
||||
void erofs_exit_sysfs(void);
|
||||
|
||||
/* utils.c / zdata.c */
|
||||
struct page *erofs_allocpage(struct page **pagepool, gfp_t gfp);
|
||||
struct page *__erofs_allocpage(struct page **pagepool, gfp_t gfp, bool tryrsv);
|
||||
static inline struct page *erofs_allocpage(struct page **pagepool, gfp_t gfp)
|
||||
{
|
||||
return __erofs_allocpage(pagepool, gfp, false);
|
||||
}
|
||||
static inline void erofs_pagepool_add(struct page **pagepool,
|
||||
struct page *page)
|
||||
{
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) Gao Xiang <xiang@kernel.org>
|
||||
*
|
||||
* For low-latency decompression algorithms (e.g. lz4), reserve consecutive
|
||||
* per-CPU virtual memory (in pages) in advance to store such inplace I/O
|
||||
* data if inplace decompression is failed (due to unmet inplace margin for
|
||||
* example).
|
||||
*/
|
||||
#include "internal.h"
|
||||
|
||||
struct erofs_pcpubuf {
|
||||
raw_spinlock_t lock;
|
||||
void *ptr;
|
||||
struct page **pages;
|
||||
unsigned int nrpages;
|
||||
};
|
||||
|
||||
static DEFINE_PER_CPU(struct erofs_pcpubuf, erofs_pcb);
|
||||
|
||||
void *erofs_get_pcpubuf(unsigned int requiredpages)
|
||||
__acquires(pcb->lock)
|
||||
{
|
||||
struct erofs_pcpubuf *pcb = &get_cpu_var(erofs_pcb);
|
||||
|
||||
raw_spin_lock(&pcb->lock);
|
||||
/* check if the per-CPU buffer is too small */
|
||||
if (requiredpages > pcb->nrpages) {
|
||||
raw_spin_unlock(&pcb->lock);
|
||||
put_cpu_var(erofs_pcb);
|
||||
/* (for sparse checker) pretend pcb->lock is still taken */
|
||||
__acquire(pcb->lock);
|
||||
return NULL;
|
||||
}
|
||||
return pcb->ptr;
|
||||
}
|
||||
|
||||
void erofs_put_pcpubuf(void *ptr) __releases(pcb->lock)
|
||||
{
|
||||
struct erofs_pcpubuf *pcb = &per_cpu(erofs_pcb, smp_processor_id());
|
||||
|
||||
DBG_BUGON(pcb->ptr != ptr);
|
||||
raw_spin_unlock(&pcb->lock);
|
||||
put_cpu_var(erofs_pcb);
|
||||
}
|
||||
|
||||
/* the next step: support per-CPU page buffers hotplug */
|
||||
int erofs_pcpubuf_growsize(unsigned int nrpages)
|
||||
{
|
||||
static DEFINE_MUTEX(pcb_resize_mutex);
|
||||
static unsigned int pcb_nrpages;
|
||||
struct page *pagepool = NULL;
|
||||
int delta, cpu, ret, i;
|
||||
|
||||
mutex_lock(&pcb_resize_mutex);
|
||||
delta = nrpages - pcb_nrpages;
|
||||
ret = 0;
|
||||
/* avoid shrinking pcpubuf, since no idea how many fses rely on */
|
||||
if (delta <= 0)
|
||||
goto out;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
struct erofs_pcpubuf *pcb = &per_cpu(erofs_pcb, cpu);
|
||||
struct page **pages, **oldpages;
|
||||
void *ptr, *old_ptr;
|
||||
|
||||
pages = kmalloc_array(nrpages, sizeof(*pages), GFP_KERNEL);
|
||||
if (!pages) {
|
||||
ret = -ENOMEM;
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < nrpages; ++i) {
|
||||
pages[i] = erofs_allocpage(&pagepool, GFP_KERNEL);
|
||||
if (!pages[i]) {
|
||||
ret = -ENOMEM;
|
||||
oldpages = pages;
|
||||
goto free_pagearray;
|
||||
}
|
||||
}
|
||||
ptr = vmap(pages, nrpages, VM_MAP, PAGE_KERNEL);
|
||||
if (!ptr) {
|
||||
ret = -ENOMEM;
|
||||
oldpages = pages;
|
||||
goto free_pagearray;
|
||||
}
|
||||
raw_spin_lock(&pcb->lock);
|
||||
old_ptr = pcb->ptr;
|
||||
pcb->ptr = ptr;
|
||||
oldpages = pcb->pages;
|
||||
pcb->pages = pages;
|
||||
i = pcb->nrpages;
|
||||
pcb->nrpages = nrpages;
|
||||
raw_spin_unlock(&pcb->lock);
|
||||
|
||||
if (!oldpages) {
|
||||
DBG_BUGON(old_ptr);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (old_ptr)
|
||||
vunmap(old_ptr);
|
||||
free_pagearray:
|
||||
while (i)
|
||||
erofs_pagepool_add(&pagepool, oldpages[--i]);
|
||||
kfree(oldpages);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
pcb_nrpages = nrpages;
|
||||
erofs_release_pages(&pagepool);
|
||||
out:
|
||||
mutex_unlock(&pcb_resize_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void erofs_pcpubuf_init(void)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
struct erofs_pcpubuf *pcb = &per_cpu(erofs_pcb, cpu);
|
||||
|
||||
raw_spin_lock_init(&pcb->lock);
|
||||
}
|
||||
}
|
||||
|
||||
void erofs_pcpubuf_exit(void)
|
||||
{
|
||||
int cpu, i;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
struct erofs_pcpubuf *pcb = &per_cpu(erofs_pcb, cpu);
|
||||
|
||||
if (pcb->ptr) {
|
||||
vunmap(pcb->ptr);
|
||||
pcb->ptr = NULL;
|
||||
}
|
||||
if (!pcb->pages)
|
||||
continue;
|
||||
|
||||
for (i = 0; i < pcb->nrpages; ++i)
|
||||
if (pcb->pages[i])
|
||||
put_page(pcb->pages[i]);
|
||||
kfree(pcb->pages);
|
||||
pcb->pages = NULL;
|
||||
}
|
||||
}
|
||||
@@ -908,7 +908,10 @@ static int __init erofs_module_init(void)
|
||||
if (err)
|
||||
goto lzma_err;
|
||||
|
||||
erofs_pcpubuf_init();
|
||||
err = z_erofs_gbuf_init();
|
||||
if (err)
|
||||
goto gbuf_err;
|
||||
|
||||
err = z_erofs_init_zip_subsystem();
|
||||
if (err)
|
||||
goto zip_err;
|
||||
@@ -928,6 +931,8 @@ fs_err:
|
||||
sysfs_err:
|
||||
z_erofs_exit_zip_subsystem();
|
||||
zip_err:
|
||||
z_erofs_gbuf_exit();
|
||||
gbuf_err:
|
||||
z_erofs_lzma_exit();
|
||||
lzma_err:
|
||||
erofs_exit_shrinker();
|
||||
@@ -949,7 +954,7 @@ static void __exit erofs_module_exit(void)
|
||||
z_erofs_lzma_exit();
|
||||
erofs_exit_shrinker();
|
||||
kmem_cache_destroy(erofs_inode_cachep);
|
||||
erofs_pcpubuf_exit();
|
||||
z_erofs_gbuf_exit();
|
||||
}
|
||||
|
||||
/* get filesystem statistics */
|
||||
|
||||
@@ -83,6 +83,9 @@ struct z_erofs_pcluster {
|
||||
/* L: indicate several pageofs_outs or not */
|
||||
bool multibases;
|
||||
|
||||
/* L: whether extra buffer allocations are best-effort */
|
||||
bool besteffort;
|
||||
|
||||
/* A: compressed bvecs (can be cached or inplaced pages) */
|
||||
struct z_erofs_bvec compressed_bvecs[];
|
||||
};
|
||||
@@ -972,7 +975,7 @@ static int z_erofs_read_fragment(struct super_block *sb, struct page *page,
|
||||
}
|
||||
|
||||
static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,
|
||||
struct page *page)
|
||||
struct page *page, bool ra)
|
||||
{
|
||||
struct inode *const inode = fe->inode;
|
||||
struct erofs_map_blocks *const map = &fe->map;
|
||||
@@ -1023,6 +1026,7 @@ repeat:
|
||||
err = z_erofs_pcluster_begin(fe);
|
||||
if (err)
|
||||
goto out;
|
||||
fe->pcl->besteffort |= !ra;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1305,6 +1309,9 @@ static int z_erofs_decompress_pcluster(struct z_erofs_decompress_backend *be,
|
||||
.inplace_io = overlapped,
|
||||
.partial_decoding = pcl->partial,
|
||||
.fillgaps = pcl->multibases,
|
||||
.gfp = pcl->besteffort ?
|
||||
GFP_KERNEL | __GFP_NOFAIL :
|
||||
GFP_NOWAIT | __GFP_NORETRY
|
||||
}, be->pagepool);
|
||||
|
||||
out:
|
||||
@@ -1350,6 +1357,7 @@ out:
|
||||
pcl->length = 0;
|
||||
pcl->partial = true;
|
||||
pcl->multibases = false;
|
||||
pcl->besteffort = false;
|
||||
pcl->bvset.nextpage = NULL;
|
||||
pcl->vcnt = 0;
|
||||
|
||||
@@ -1815,7 +1823,7 @@ static void z_erofs_pcluster_readmore(struct z_erofs_decompress_frontend *f,
|
||||
if (PageUptodate(page)) {
|
||||
unlock_page(page);
|
||||
} else {
|
||||
err = z_erofs_do_read_page(f, page);
|
||||
err = z_erofs_do_read_page(f, page, !!rac);
|
||||
if (err)
|
||||
erofs_err(inode->i_sb,
|
||||
"readmore error at page %lu @ nid %llu",
|
||||
@@ -1842,7 +1850,7 @@ static int z_erofs_read_folio(struct file *file, struct folio *folio)
|
||||
f.headoffset = (erofs_off_t)page->index << PAGE_SHIFT;
|
||||
|
||||
z_erofs_pcluster_readmore(&f, NULL, true);
|
||||
err = z_erofs_do_read_page(&f, page);
|
||||
err = z_erofs_do_read_page(&f, page, false);
|
||||
z_erofs_pcluster_readmore(&f, NULL, false);
|
||||
z_erofs_pcluster_end(&f);
|
||||
|
||||
@@ -1883,7 +1891,7 @@ static void z_erofs_readahead(struct readahead_control *rac)
|
||||
/* traversal in reverse order */
|
||||
head = (void *)page_private(page);
|
||||
|
||||
err = z_erofs_do_read_page(&f, page);
|
||||
err = z_erofs_do_read_page(&f, page, true);
|
||||
if (err)
|
||||
erofs_err(inode->i_sb,
|
||||
"readahead error at page %lu @ nid %llu",
|
||||
|
||||
@@ -6,16 +6,185 @@
|
||||
#include "internal.h"
|
||||
#include <linux/pagevec.h>
|
||||
|
||||
struct page *erofs_allocpage(struct page **pagepool, gfp_t gfp)
|
||||
struct z_erofs_gbuf {
|
||||
spinlock_t lock;
|
||||
void *ptr;
|
||||
struct page **pages;
|
||||
unsigned int nrpages;
|
||||
};
|
||||
|
||||
static struct z_erofs_gbuf *z_erofs_gbufpool, *z_erofs_rsvbuf;
|
||||
static unsigned int z_erofs_gbuf_count, z_erofs_gbuf_nrpages,
|
||||
z_erofs_rsv_nrpages;
|
||||
|
||||
module_param_named(global_buffers, z_erofs_gbuf_count, uint, 0444);
|
||||
module_param_named(reserved_pages, z_erofs_rsv_nrpages, uint, 0444);
|
||||
|
||||
static atomic_long_t erofs_global_shrink_cnt; /* for all mounted instances */
|
||||
/* protected by 'erofs_sb_list_lock' */
|
||||
static unsigned int shrinker_run_no;
|
||||
|
||||
/* protects the mounted 'erofs_sb_list' */
|
||||
static DEFINE_SPINLOCK(erofs_sb_list_lock);
|
||||
static LIST_HEAD(erofs_sb_list);
|
||||
|
||||
static unsigned int z_erofs_gbuf_id(void)
|
||||
{
|
||||
return raw_smp_processor_id() % z_erofs_gbuf_count;
|
||||
}
|
||||
|
||||
void *z_erofs_get_gbuf(unsigned int requiredpages)
|
||||
__acquires(gbuf->lock)
|
||||
{
|
||||
struct z_erofs_gbuf *gbuf;
|
||||
|
||||
gbuf = &z_erofs_gbufpool[z_erofs_gbuf_id()];
|
||||
spin_lock(&gbuf->lock);
|
||||
/* check if the buffer is too small */
|
||||
if (requiredpages > gbuf->nrpages) {
|
||||
spin_unlock(&gbuf->lock);
|
||||
/* (for sparse checker) pretend gbuf->lock is still taken */
|
||||
__acquire(gbuf->lock);
|
||||
return NULL;
|
||||
}
|
||||
return gbuf->ptr;
|
||||
}
|
||||
|
||||
void z_erofs_put_gbuf(void *ptr) __releases(gbuf->lock)
|
||||
{
|
||||
struct z_erofs_gbuf *gbuf;
|
||||
|
||||
gbuf = &z_erofs_gbufpool[z_erofs_gbuf_id()];
|
||||
DBG_BUGON(gbuf->ptr != ptr);
|
||||
spin_unlock(&gbuf->lock);
|
||||
}
|
||||
|
||||
int z_erofs_gbuf_growsize(unsigned int nrpages)
|
||||
{
|
||||
static DEFINE_MUTEX(gbuf_resize_mutex);
|
||||
struct page **tmp_pages = NULL;
|
||||
struct z_erofs_gbuf *gbuf;
|
||||
void *ptr, *old_ptr;
|
||||
int last, i, j;
|
||||
|
||||
mutex_lock(&gbuf_resize_mutex);
|
||||
/* avoid shrinking gbufs, since no idea how many fses rely on */
|
||||
if (nrpages <= z_erofs_gbuf_nrpages) {
|
||||
mutex_unlock(&gbuf_resize_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < z_erofs_gbuf_count; ++i) {
|
||||
gbuf = &z_erofs_gbufpool[i];
|
||||
tmp_pages = kcalloc(nrpages, sizeof(*tmp_pages), GFP_KERNEL);
|
||||
if (!tmp_pages)
|
||||
goto out;
|
||||
|
||||
for (j = 0; j < gbuf->nrpages; ++j)
|
||||
tmp_pages[j] = gbuf->pages[j];
|
||||
do {
|
||||
last = j;
|
||||
j = alloc_pages_bulk_array(GFP_KERNEL, nrpages,
|
||||
tmp_pages);
|
||||
if (last == j)
|
||||
goto out;
|
||||
} while (j != nrpages);
|
||||
|
||||
ptr = vmap(tmp_pages, nrpages, VM_MAP, PAGE_KERNEL);
|
||||
if (!ptr)
|
||||
goto out;
|
||||
|
||||
spin_lock(&gbuf->lock);
|
||||
kfree(gbuf->pages);
|
||||
gbuf->pages = tmp_pages;
|
||||
old_ptr = gbuf->ptr;
|
||||
gbuf->ptr = ptr;
|
||||
gbuf->nrpages = nrpages;
|
||||
spin_unlock(&gbuf->lock);
|
||||
if (old_ptr)
|
||||
vunmap(old_ptr);
|
||||
}
|
||||
z_erofs_gbuf_nrpages = nrpages;
|
||||
out:
|
||||
if (i < z_erofs_gbuf_count && tmp_pages) {
|
||||
for (j = 0; j < nrpages; ++j)
|
||||
if (tmp_pages[j] && tmp_pages[j] != gbuf->pages[j])
|
||||
__free_page(tmp_pages[j]);
|
||||
kfree(tmp_pages);
|
||||
}
|
||||
mutex_unlock(&gbuf_resize_mutex);
|
||||
return i < z_erofs_gbuf_count ? -ENOMEM : 0;
|
||||
}
|
||||
|
||||
int __init z_erofs_gbuf_init(void)
|
||||
{
|
||||
unsigned int i, total = num_possible_cpus();
|
||||
|
||||
if (z_erofs_gbuf_count)
|
||||
total = min(z_erofs_gbuf_count, total);
|
||||
z_erofs_gbuf_count = total;
|
||||
|
||||
/* The last (special) global buffer is the reserved buffer */
|
||||
total += !!z_erofs_rsv_nrpages;
|
||||
|
||||
z_erofs_gbufpool = kcalloc(total, sizeof(*z_erofs_gbufpool),
|
||||
GFP_KERNEL);
|
||||
if (!z_erofs_gbufpool)
|
||||
return -ENOMEM;
|
||||
|
||||
if (z_erofs_rsv_nrpages) {
|
||||
z_erofs_rsvbuf = &z_erofs_gbufpool[total - 1];
|
||||
z_erofs_rsvbuf->pages = kcalloc(z_erofs_rsv_nrpages,
|
||||
sizeof(*z_erofs_rsvbuf->pages), GFP_KERNEL);
|
||||
if (!z_erofs_rsvbuf->pages) {
|
||||
z_erofs_rsvbuf = NULL;
|
||||
z_erofs_rsv_nrpages = 0;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < total; ++i)
|
||||
spin_lock_init(&z_erofs_gbufpool[i].lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void z_erofs_gbuf_exit(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < z_erofs_gbuf_count + (!!z_erofs_rsvbuf); ++i) {
|
||||
struct z_erofs_gbuf *gbuf = &z_erofs_gbufpool[i];
|
||||
|
||||
if (gbuf->ptr) {
|
||||
vunmap(gbuf->ptr);
|
||||
gbuf->ptr = NULL;
|
||||
}
|
||||
|
||||
if (!gbuf->pages)
|
||||
continue;
|
||||
|
||||
for (j = 0; j < gbuf->nrpages; ++j)
|
||||
if (gbuf->pages[j])
|
||||
put_page(gbuf->pages[j]);
|
||||
kfree(gbuf->pages);
|
||||
gbuf->pages = NULL;
|
||||
}
|
||||
kfree(z_erofs_gbufpool);
|
||||
}
|
||||
|
||||
struct page *__erofs_allocpage(struct page **pagepool, gfp_t gfp, bool tryrsv)
|
||||
{
|
||||
struct page *page = *pagepool;
|
||||
|
||||
if (page) {
|
||||
DBG_BUGON(page_ref_count(page) != 1);
|
||||
*pagepool = (struct page *)page_private(page);
|
||||
} else {
|
||||
page = alloc_page(gfp);
|
||||
} else if (tryrsv && z_erofs_rsvbuf && z_erofs_rsvbuf->nrpages) {
|
||||
spin_lock(&z_erofs_rsvbuf->lock);
|
||||
if (z_erofs_rsvbuf->nrpages)
|
||||
page = z_erofs_rsvbuf->pages[--z_erofs_rsvbuf->nrpages];
|
||||
spin_unlock(&z_erofs_rsvbuf->lock);
|
||||
}
|
||||
if (!page)
|
||||
page = alloc_page(gfp);
|
||||
DBG_BUGON(page && page_ref_count(page) != 1);
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -25,14 +194,22 @@ void erofs_release_pages(struct page **pagepool)
|
||||
struct page *page = *pagepool;
|
||||
|
||||
*pagepool = (struct page *)page_private(page);
|
||||
/* try to fill reserved global pool first */
|
||||
if (z_erofs_rsvbuf && z_erofs_rsvbuf->nrpages <
|
||||
z_erofs_rsv_nrpages) {
|
||||
spin_lock(&z_erofs_rsvbuf->lock);
|
||||
if (z_erofs_rsvbuf->nrpages < z_erofs_rsv_nrpages) {
|
||||
z_erofs_rsvbuf->pages[z_erofs_rsvbuf->nrpages++]
|
||||
= page;
|
||||
spin_unlock(&z_erofs_rsvbuf->lock);
|
||||
continue;
|
||||
}
|
||||
spin_unlock(&z_erofs_rsvbuf->lock);
|
||||
}
|
||||
put_page(page);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EROFS_FS_ZIP
|
||||
/* global shrink count (for all mounted EROFS instances) */
|
||||
static atomic_long_t erofs_global_shrink_cnt;
|
||||
|
||||
static int erofs_workgroup_get(struct erofs_workgroup *grp)
|
||||
{
|
||||
int o;
|
||||
@@ -181,13 +358,6 @@ static unsigned long erofs_shrink_workstation(struct erofs_sb_info *sbi,
|
||||
return freed;
|
||||
}
|
||||
|
||||
/* protected by 'erofs_sb_list_lock' */
|
||||
static unsigned int shrinker_run_no;
|
||||
|
||||
/* protects the mounted 'erofs_sb_list' */
|
||||
static DEFINE_SPINLOCK(erofs_sb_list_lock);
|
||||
static LIST_HEAD(erofs_sb_list);
|
||||
|
||||
void erofs_shrinker_register(struct super_block *sb)
|
||||
{
|
||||
struct erofs_sb_info *sbi = EROFS_SB(sb);
|
||||
@@ -289,4 +459,3 @@ void erofs_exit_shrinker(void)
|
||||
{
|
||||
unregister_shrinker(&erofs_shrinker_info);
|
||||
}
|
||||
#endif /* !CONFIG_EROFS_FS_ZIP */
|
||||
@@ -1029,15 +1029,38 @@ static void set_cluster_writeback(struct compress_ctx *cc)
|
||||
}
|
||||
}
|
||||
|
||||
static void cancel_cluster_writeback(struct compress_ctx *cc,
|
||||
struct compress_io_ctx *cic, int submitted)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Wait for submitted IOs. */
|
||||
if (submitted > 1) {
|
||||
f2fs_submit_merged_write(F2FS_I_SB(cc->inode), DATA);
|
||||
while (atomic_read(&cic->pending_pages) !=
|
||||
(cc->valid_nr_cpages - submitted + 1))
|
||||
f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT);
|
||||
}
|
||||
|
||||
/* Cancel writeback and stay locked. */
|
||||
for (i = 0; i < cc->cluster_size; i++) {
|
||||
if (i < submitted) {
|
||||
inode_inc_dirty_pages(cc->inode);
|
||||
lock_page(cc->rpages[i]);
|
||||
}
|
||||
clear_page_private_gcing(cc->rpages[i]);
|
||||
if (folio_test_writeback(page_folio(cc->rpages[i])))
|
||||
end_page_writeback(cc->rpages[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void set_cluster_dirty(struct compress_ctx *cc)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < cc->cluster_size; i++)
|
||||
if (cc->rpages[i]) {
|
||||
if (cc->rpages[i])
|
||||
set_page_dirty(cc->rpages[i]);
|
||||
set_page_private_gcing(cc->rpages[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static int prepare_compress_overwrite(struct compress_ctx *cc,
|
||||
@@ -1230,7 +1253,6 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
|
||||
.page = NULL,
|
||||
.encrypted_page = NULL,
|
||||
.compressed_page = NULL,
|
||||
.submitted = 0,
|
||||
.io_type = io_type,
|
||||
.io_wbc = wbc,
|
||||
.encrypted = fscrypt_inode_uses_fs_layer_crypto(cc->inode) ?
|
||||
@@ -1356,7 +1378,16 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
|
||||
fio.compressed_page = cc->cpages[i - 1];
|
||||
|
||||
cc->cpages[i - 1] = NULL;
|
||||
fio.submitted = 0;
|
||||
f2fs_outplace_write_data(&dn, &fio);
|
||||
if (unlikely(!fio.submitted)) {
|
||||
cancel_cluster_writeback(cc, cic, i);
|
||||
|
||||
/* To call fscrypt_finalize_bounce_page */
|
||||
i = cc->valid_nr_cpages;
|
||||
*submitted = 0;
|
||||
goto out_destroy_crypt;
|
||||
}
|
||||
(*submitted)++;
|
||||
unlock_continue:
|
||||
inode_dec_dirty_pages(cc->inode);
|
||||
@@ -1390,8 +1421,11 @@ unlock_continue:
|
||||
out_destroy_crypt:
|
||||
page_array_free(cc->inode, cic->rpages, cc->cluster_size);
|
||||
|
||||
for (--i; i >= 0; i--)
|
||||
for (--i; i >= 0; i--) {
|
||||
if (!cc->cpages[i])
|
||||
continue;
|
||||
fscrypt_finalize_bounce_page(&cc->cpages[i]);
|
||||
}
|
||||
out_put_cic:
|
||||
kmem_cache_free(cic_entry_slab, cic);
|
||||
out_put_dnode:
|
||||
|
||||
@@ -1317,7 +1317,6 @@ static int __clone_blkaddrs(struct inode *src_inode, struct inode *dst_inode,
|
||||
}
|
||||
memcpy_page(pdst, 0, psrc, 0, PAGE_SIZE);
|
||||
set_page_dirty(pdst);
|
||||
set_page_private_gcing(pdst);
|
||||
f2fs_put_page(pdst, 1);
|
||||
f2fs_put_page(psrc, 1);
|
||||
|
||||
@@ -4049,7 +4048,6 @@ static int redirty_blocks(struct inode *inode, pgoff_t page_idx, int len)
|
||||
f2fs_bug_on(F2FS_I_SB(inode), !page);
|
||||
|
||||
set_page_dirty(page);
|
||||
set_page_private_gcing(page);
|
||||
f2fs_put_page(page, 1);
|
||||
f2fs_put_page(page, 0);
|
||||
}
|
||||
|
||||
@@ -3250,7 +3250,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)
|
||||
if (page_private_gcing(fio->page)) {
|
||||
if (fio->sbi->am.atgc_enabled &&
|
||||
(fio->io_type == FS_DATA_IO) &&
|
||||
(fio->sbi->gc_mode != GC_URGENT_HIGH))
|
||||
(fio->sbi->gc_mode != GC_URGENT_HIGH) &&
|
||||
!is_inode_flag_set(inode, FI_OPU_WRITE))
|
||||
return CURSEG_ALL_DATA_ATGC;
|
||||
else
|
||||
return CURSEG_COLD_DATA;
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <linux/splice.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <trace/hooks/fuse.h>
|
||||
|
||||
MODULE_ALIAS_MISCDEV(FUSE_MINOR);
|
||||
MODULE_ALIAS("devname:fuse");
|
||||
|
||||
@@ -234,6 +236,7 @@ __releases(fiq->lock)
|
||||
fuse_len_args(req->args->in_numargs,
|
||||
(struct fuse_arg *) req->args->in_args);
|
||||
list_add_tail(&req->list, &fiq->pending);
|
||||
trace_android_vh_queue_request_and_unlock(&fiq->waitq, sync);
|
||||
fiq->ops->wake_pending_and_unlock(fiq, sync);
|
||||
}
|
||||
|
||||
@@ -331,6 +334,7 @@ void fuse_request_end(struct fuse_req *req)
|
||||
} else {
|
||||
/* Wake up waiter sleeping in request_wait_answer() */
|
||||
wake_up(&req->waitq);
|
||||
trace_android_vh_fuse_request_end(current);
|
||||
}
|
||||
|
||||
if (test_bit(FR_ASYNC, &req->flags))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define __ASM_ARM_KVM_PMU_H
|
||||
|
||||
#include <linux/perf_event.h>
|
||||
#include <asm/perf_event.h>
|
||||
#include <linux/perf/arm_pmuv3.h>
|
||||
|
||||
#define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1)
|
||||
|
||||
|
||||
@@ -137,6 +137,12 @@ enum pageflags {
|
||||
#endif
|
||||
#ifdef CONFIG_KASAN_HW_TAGS
|
||||
PG_skip_kasan_poison,
|
||||
#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
PG_oem_reserved_1,
|
||||
PG_oem_reserved_2,
|
||||
PG_oem_reserved_3,
|
||||
PG_oem_reserved_4,
|
||||
#endif
|
||||
__NR_PAGEFLAGS,
|
||||
|
||||
|
||||
303
include/linux/perf/arm_pmuv3.h
Normal file
303
include/linux/perf/arm_pmuv3.h
Normal file
@@ -0,0 +1,303 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*/
|
||||
|
||||
#ifndef __PERF_ARM_PMUV3_H
|
||||
#define __PERF_ARM_PMUV3_H
|
||||
|
||||
#define ARMV8_PMU_MAX_COUNTERS 32
|
||||
#define ARMV8_PMU_COUNTER_MASK (ARMV8_PMU_MAX_COUNTERS - 1)
|
||||
|
||||
/*
|
||||
* Common architectural and microarchitectural event numbers.
|
||||
*/
|
||||
#define ARMV8_PMUV3_PERFCTR_SW_INCR 0x0000
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_CACHE_REFILL 0x0001
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_TLB_REFILL 0x0002
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_REFILL 0x0003
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE 0x0004
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_TLB_REFILL 0x0005
|
||||
#define ARMV8_PMUV3_PERFCTR_LD_RETIRED 0x0006
|
||||
#define ARMV8_PMUV3_PERFCTR_ST_RETIRED 0x0007
|
||||
#define ARMV8_PMUV3_PERFCTR_INST_RETIRED 0x0008
|
||||
#define ARMV8_PMUV3_PERFCTR_EXC_TAKEN 0x0009
|
||||
#define ARMV8_PMUV3_PERFCTR_EXC_RETURN 0x000A
|
||||
#define ARMV8_PMUV3_PERFCTR_CID_WRITE_RETIRED 0x000B
|
||||
#define ARMV8_PMUV3_PERFCTR_PC_WRITE_RETIRED 0x000C
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_IMMED_RETIRED 0x000D
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_RETURN_RETIRED 0x000E
|
||||
#define ARMV8_PMUV3_PERFCTR_UNALIGNED_LDST_RETIRED 0x000F
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_MIS_PRED 0x0010
|
||||
#define ARMV8_PMUV3_PERFCTR_CPU_CYCLES 0x0011
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_PRED 0x0012
|
||||
#define ARMV8_PMUV3_PERFCTR_MEM_ACCESS 0x0013
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_CACHE 0x0014
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_WB 0x0015
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE 0x0016
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_REFILL 0x0017
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_WB 0x0018
|
||||
#define ARMV8_PMUV3_PERFCTR_BUS_ACCESS 0x0019
|
||||
#define ARMV8_PMUV3_PERFCTR_MEMORY_ERROR 0x001A
|
||||
#define ARMV8_PMUV3_PERFCTR_INST_SPEC 0x001B
|
||||
#define ARMV8_PMUV3_PERFCTR_TTBR_WRITE_RETIRED 0x001C
|
||||
#define ARMV8_PMUV3_PERFCTR_BUS_CYCLES 0x001D
|
||||
#define ARMV8_PMUV3_PERFCTR_CHAIN 0x001E
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_ALLOCATE 0x001F
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_ALLOCATE 0x0020
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_RETIRED 0x0021
|
||||
#define ARMV8_PMUV3_PERFCTR_BR_MIS_PRED_RETIRED 0x0022
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_FRONTEND 0x0023
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_BACKEND 0x0024
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_TLB 0x0025
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_TLB 0x0026
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_CACHE 0x0027
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_CACHE_REFILL 0x0028
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_ALLOCATE 0x0029
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_REFILL 0x002A
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE 0x002B
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_WB 0x002C
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_TLB_REFILL 0x002D
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_TLB_REFILL 0x002E
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_TLB 0x002F
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_TLB 0x0030
|
||||
#define ARMV8_PMUV3_PERFCTR_REMOTE_ACCESS 0x0031
|
||||
#define ARMV8_PMUV3_PERFCTR_LL_CACHE 0x0032
|
||||
#define ARMV8_PMUV3_PERFCTR_LL_CACHE_MISS 0x0033
|
||||
#define ARMV8_PMUV3_PERFCTR_DTLB_WALK 0x0034
|
||||
#define ARMV8_PMUV3_PERFCTR_ITLB_WALK 0x0035
|
||||
#define ARMV8_PMUV3_PERFCTR_LL_CACHE_RD 0x0036
|
||||
#define ARMV8_PMUV3_PERFCTR_LL_CACHE_MISS_RD 0x0037
|
||||
#define ARMV8_PMUV3_PERFCTR_REMOTE_ACCESS_RD 0x0038
|
||||
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_LMISS_RD 0x0039
|
||||
#define ARMV8_PMUV3_PERFCTR_OP_RETIRED 0x003A
|
||||
#define ARMV8_PMUV3_PERFCTR_OP_SPEC 0x003B
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL 0x003C
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT_BACKEND 0x003D
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT_FRONTEND 0x003E
|
||||
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT 0x003F
|
||||
|
||||
/* Statistical profiling extension microarchitectural events */
|
||||
#define ARMV8_SPE_PERFCTR_SAMPLE_POP 0x4000
|
||||
#define ARMV8_SPE_PERFCTR_SAMPLE_FEED 0x4001
|
||||
#define ARMV8_SPE_PERFCTR_SAMPLE_FILTRATE 0x4002
|
||||
#define ARMV8_SPE_PERFCTR_SAMPLE_COLLISION 0x4003
|
||||
|
||||
/* AMUv1 architecture events */
|
||||
#define ARMV8_AMU_PERFCTR_CNT_CYCLES 0x4004
|
||||
#define ARMV8_AMU_PERFCTR_STALL_BACKEND_MEM 0x4005
|
||||
|
||||
/* long-latency read miss events */
|
||||
#define ARMV8_PMUV3_PERFCTR_L1I_CACHE_LMISS 0x4006
|
||||
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_LMISS_RD 0x4009
|
||||
#define ARMV8_PMUV3_PERFCTR_L2I_CACHE_LMISS 0x400A
|
||||
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_LMISS_RD 0x400B
|
||||
|
||||
/* Trace buffer events */
|
||||
#define ARMV8_PMUV3_PERFCTR_TRB_WRAP 0x400C
|
||||
#define ARMV8_PMUV3_PERFCTR_TRB_TRIG 0x400E
|
||||
|
||||
/* Trace unit events */
|
||||
#define ARMV8_PMUV3_PERFCTR_TRCEXTOUT0 0x4010
|
||||
#define ARMV8_PMUV3_PERFCTR_TRCEXTOUT1 0x4011
|
||||
#define ARMV8_PMUV3_PERFCTR_TRCEXTOUT2 0x4012
|
||||
#define ARMV8_PMUV3_PERFCTR_TRCEXTOUT3 0x4013
|
||||
#define ARMV8_PMUV3_PERFCTR_CTI_TRIGOUT4 0x4018
|
||||
#define ARMV8_PMUV3_PERFCTR_CTI_TRIGOUT5 0x4019
|
||||
#define ARMV8_PMUV3_PERFCTR_CTI_TRIGOUT6 0x401A
|
||||
#define ARMV8_PMUV3_PERFCTR_CTI_TRIGOUT7 0x401B
|
||||
|
||||
/* additional latency from alignment events */
|
||||
#define ARMV8_PMUV3_PERFCTR_LDST_ALIGN_LAT 0x4020
|
||||
#define ARMV8_PMUV3_PERFCTR_LD_ALIGN_LAT 0x4021
|
||||
#define ARMV8_PMUV3_PERFCTR_ST_ALIGN_LAT 0x4022
|
||||
|
||||
/* Armv8.5 Memory Tagging Extension events */
|
||||
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED 0x4024
|
||||
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED_RD 0x4025
|
||||
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED_WR 0x4026
|
||||
|
||||
/* ARMv8 recommended implementation defined event types */
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_RD 0x0040
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR 0x0041
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_RD 0x0042
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR 0x0043
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_INNER 0x0044
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_OUTER 0x0045
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WB_VICTIM 0x0046
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WB_CLEAN 0x0047
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_INVAL 0x0048
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD 0x004C
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR 0x004D
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD 0x004E
|
||||
#define ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR 0x004F
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_RD 0x0050
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_WR 0x0051
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_REFILL_RD 0x0052
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_REFILL_WR 0x0053
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_WB_VICTIM 0x0056
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_WB_CLEAN 0x0057
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_CACHE_INVAL 0x0058
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_TLB_REFILL_RD 0x005C
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_TLB_REFILL_WR 0x005D
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_TLB_RD 0x005E
|
||||
#define ARMV8_IMPDEF_PERFCTR_L2D_TLB_WR 0x005F
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD 0x0060
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR 0x0061
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_SHARED 0x0062
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_NOT_SHARED 0x0063
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_NORMAL 0x0064
|
||||
#define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_PERIPH 0x0065
|
||||
#define ARMV8_IMPDEF_PERFCTR_MEM_ACCESS_RD 0x0066
|
||||
#define ARMV8_IMPDEF_PERFCTR_MEM_ACCESS_WR 0x0067
|
||||
#define ARMV8_IMPDEF_PERFCTR_UNALIGNED_LD_SPEC 0x0068
|
||||
#define ARMV8_IMPDEF_PERFCTR_UNALIGNED_ST_SPEC 0x0069
|
||||
#define ARMV8_IMPDEF_PERFCTR_UNALIGNED_LDST_SPEC 0x006A
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_LDREX_SPEC 0x006C
|
||||
#define ARMV8_IMPDEF_PERFCTR_STREX_PASS_SPEC 0x006D
|
||||
#define ARMV8_IMPDEF_PERFCTR_STREX_FAIL_SPEC 0x006E
|
||||
#define ARMV8_IMPDEF_PERFCTR_STREX_SPEC 0x006F
|
||||
#define ARMV8_IMPDEF_PERFCTR_LD_SPEC 0x0070
|
||||
#define ARMV8_IMPDEF_PERFCTR_ST_SPEC 0x0071
|
||||
#define ARMV8_IMPDEF_PERFCTR_LDST_SPEC 0x0072
|
||||
#define ARMV8_IMPDEF_PERFCTR_DP_SPEC 0x0073
|
||||
#define ARMV8_IMPDEF_PERFCTR_ASE_SPEC 0x0074
|
||||
#define ARMV8_IMPDEF_PERFCTR_VFP_SPEC 0x0075
|
||||
#define ARMV8_IMPDEF_PERFCTR_PC_WRITE_SPEC 0x0076
|
||||
#define ARMV8_IMPDEF_PERFCTR_CRYPTO_SPEC 0x0077
|
||||
#define ARMV8_IMPDEF_PERFCTR_BR_IMMED_SPEC 0x0078
|
||||
#define ARMV8_IMPDEF_PERFCTR_BR_RETURN_SPEC 0x0079
|
||||
#define ARMV8_IMPDEF_PERFCTR_BR_INDIRECT_SPEC 0x007A
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_ISB_SPEC 0x007C
|
||||
#define ARMV8_IMPDEF_PERFCTR_DSB_SPEC 0x007D
|
||||
#define ARMV8_IMPDEF_PERFCTR_DMB_SPEC 0x007E
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_UNDEF 0x0081
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_SVC 0x0082
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_PABORT 0x0083
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_DABORT 0x0084
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_IRQ 0x0086
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_FIQ 0x0087
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_SMC 0x0088
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_HVC 0x008A
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_PABORT 0x008B
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_DABORT 0x008C
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_OTHER 0x008D
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_IRQ 0x008E
|
||||
#define ARMV8_IMPDEF_PERFCTR_EXC_TRAP_FIQ 0x008F
|
||||
#define ARMV8_IMPDEF_PERFCTR_RC_LD_SPEC 0x0090
|
||||
#define ARMV8_IMPDEF_PERFCTR_RC_ST_SPEC 0x0091
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_RD 0x00A0
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_WR 0x00A1
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_REFILL_RD 0x00A2
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_REFILL_WR 0x00A3
|
||||
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_WB_VICTIM 0x00A6
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_WB_CLEAN 0x00A7
|
||||
#define ARMV8_IMPDEF_PERFCTR_L3D_CACHE_INVAL 0x00A8
|
||||
|
||||
/*
|
||||
* Per-CPU PMCR: config reg
|
||||
*/
|
||||
#define ARMV8_PMU_PMCR_E (1 << 0) /* Enable all counters */
|
||||
#define ARMV8_PMU_PMCR_P (1 << 1) /* Reset all counters */
|
||||
#define ARMV8_PMU_PMCR_C (1 << 2) /* Cycle counter reset */
|
||||
#define ARMV8_PMU_PMCR_D (1 << 3) /* CCNT counts every 64th cpu cycle */
|
||||
#define ARMV8_PMU_PMCR_X (1 << 4) /* Export to ETM */
|
||||
#define ARMV8_PMU_PMCR_DP (1 << 5) /* Disable CCNT if non-invasive debug*/
|
||||
#define ARMV8_PMU_PMCR_LC (1 << 6) /* Overflow on 64 bit cycle counter */
|
||||
#define ARMV8_PMU_PMCR_LP (1 << 7) /* Long event counter enable */
|
||||
#define ARMV8_PMU_PMCR_N_SHIFT 11 /* Number of counters supported */
|
||||
#define ARMV8_PMU_PMCR_N_MASK 0x1f
|
||||
#define ARMV8_PMU_PMCR_MASK 0xff /* Mask for writable bits */
|
||||
|
||||
/*
|
||||
* PMOVSR: counters overflow flag status reg
|
||||
*/
|
||||
#define ARMV8_PMU_OVSR_MASK 0xffffffff /* Mask for writable bits */
|
||||
#define ARMV8_PMU_OVERFLOWED_MASK ARMV8_PMU_OVSR_MASK
|
||||
|
||||
/*
|
||||
* PMXEVTYPER: Event selection reg
|
||||
*/
|
||||
#define ARMV8_PMU_EVTYPE_MASK 0xc800ffff /* Mask for writable bits */
|
||||
#define ARMV8_PMU_EVTYPE_EVENT 0xffff /* Mask for EVENT bits */
|
||||
|
||||
/*
|
||||
* Event filters for PMUv3
|
||||
*/
|
||||
#define ARMV8_PMU_EXCLUDE_EL1 (1U << 31)
|
||||
#define ARMV8_PMU_EXCLUDE_EL0 (1U << 30)
|
||||
#define ARMV8_PMU_INCLUDE_EL2 (1U << 27)
|
||||
|
||||
/*
|
||||
* PMUSERENR: user enable reg
|
||||
*/
|
||||
#define ARMV8_PMU_USERENR_MASK 0xf /* Mask for writable bits */
|
||||
#define ARMV8_PMU_USERENR_EN (1 << 0) /* PMU regs can be accessed at EL0 */
|
||||
#define ARMV8_PMU_USERENR_SW (1 << 1) /* PMSWINC can be written at EL0 */
|
||||
#define ARMV8_PMU_USERENR_CR (1 << 2) /* Cycle counter can be read at EL0 */
|
||||
#define ARMV8_PMU_USERENR_ER (1 << 3) /* Event counter can be read at EL0 */
|
||||
|
||||
/* PMMIR_EL1.SLOTS mask */
|
||||
#define ARMV8_PMU_SLOTS_MASK 0xff
|
||||
|
||||
#define ARMV8_PMU_BUS_SLOTS_SHIFT 8
|
||||
#define ARMV8_PMU_BUS_SLOTS_MASK 0xff
|
||||
#define ARMV8_PMU_BUS_WIDTH_SHIFT 16
|
||||
#define ARMV8_PMU_BUS_WIDTH_MASK 0xf
|
||||
|
||||
/*
|
||||
* This code is really good
|
||||
*/
|
||||
|
||||
#define PMEVN_CASE(n, case_macro) \
|
||||
case n: case_macro(n); break
|
||||
|
||||
#define PMEVN_SWITCH(x, case_macro) \
|
||||
do { \
|
||||
switch (x) { \
|
||||
PMEVN_CASE(0, case_macro); \
|
||||
PMEVN_CASE(1, case_macro); \
|
||||
PMEVN_CASE(2, case_macro); \
|
||||
PMEVN_CASE(3, case_macro); \
|
||||
PMEVN_CASE(4, case_macro); \
|
||||
PMEVN_CASE(5, case_macro); \
|
||||
PMEVN_CASE(6, case_macro); \
|
||||
PMEVN_CASE(7, case_macro); \
|
||||
PMEVN_CASE(8, case_macro); \
|
||||
PMEVN_CASE(9, case_macro); \
|
||||
PMEVN_CASE(10, case_macro); \
|
||||
PMEVN_CASE(11, case_macro); \
|
||||
PMEVN_CASE(12, case_macro); \
|
||||
PMEVN_CASE(13, case_macro); \
|
||||
PMEVN_CASE(14, case_macro); \
|
||||
PMEVN_CASE(15, case_macro); \
|
||||
PMEVN_CASE(16, case_macro); \
|
||||
PMEVN_CASE(17, case_macro); \
|
||||
PMEVN_CASE(18, case_macro); \
|
||||
PMEVN_CASE(19, case_macro); \
|
||||
PMEVN_CASE(20, case_macro); \
|
||||
PMEVN_CASE(21, case_macro); \
|
||||
PMEVN_CASE(22, case_macro); \
|
||||
PMEVN_CASE(23, case_macro); \
|
||||
PMEVN_CASE(24, case_macro); \
|
||||
PMEVN_CASE(25, case_macro); \
|
||||
PMEVN_CASE(26, case_macro); \
|
||||
PMEVN_CASE(27, case_macro); \
|
||||
PMEVN_CASE(28, case_macro); \
|
||||
PMEVN_CASE(29, case_macro); \
|
||||
PMEVN_CASE(30, case_macro); \
|
||||
default: WARN(1, "Invalid PMEV* index\n"); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
@@ -1719,9 +1719,9 @@ int perf_event_exit_cpu(unsigned int cpu);
|
||||
#define perf_event_exit_cpu NULL
|
||||
#endif
|
||||
|
||||
extern void __weak arch_perf_update_userpage(struct perf_event *event,
|
||||
struct perf_event_mmap_page *userpg,
|
||||
u64 now);
|
||||
extern void arch_perf_update_userpage(struct perf_event *event,
|
||||
struct perf_event_mmap_page *userpg,
|
||||
u64 now);
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
extern __weak u64 arch_perf_get_page_size(struct mm_struct *mm, unsigned long addr);
|
||||
|
||||
@@ -81,6 +81,7 @@ extern const int phy_10gbit_features_array[1];
|
||||
#define PHY_IS_INTERNAL 0x00000001
|
||||
#define PHY_RST_AFTER_CLK_EN 0x00000002
|
||||
#define PHY_POLL_CABLE_TEST 0x00000004
|
||||
#define PHY_ALWAYS_CALL_SUSPEND 0x00000008
|
||||
#define MDIO_DEVICE_IS_PHY 0x80000000
|
||||
|
||||
/**
|
||||
|
||||
@@ -186,6 +186,7 @@ extern void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],
|
||||
cpumask_var_t *alloc_sched_domains(unsigned int ndoms);
|
||||
void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms);
|
||||
|
||||
bool cpus_equal_capacity(int this_cpu, int that_cpu);
|
||||
bool cpus_share_cache(int this_cpu, int that_cpu);
|
||||
|
||||
typedef const struct cpumask *(*sched_domain_mask_f)(int cpu);
|
||||
@@ -235,6 +236,11 @@ partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],
|
||||
{
|
||||
}
|
||||
|
||||
static inline bool cpus_equal_capacity(int this_cpu, int that_cpu)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool cpus_share_cache(int this_cpu, int that_cpu)
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -12,6 +12,16 @@ struct sk_buff;
|
||||
struct sock;
|
||||
struct net;
|
||||
|
||||
/* *** ANDROID FIXUP ***
|
||||
* These typedefs are used to help fixup the ABI break caused by commit
|
||||
* 92f1655aa2b2 ("net: fix __dst_negative_advice() race") where the
|
||||
* negative_advice callback changed function signatures.
|
||||
* See b/343727534 for more details.
|
||||
* *** ANDROID FIXUP ***
|
||||
*/
|
||||
typedef void (*android_dst_ops_negative_advice_new_t)(struct sock *sk, struct dst_entry *);
|
||||
typedef struct dst_entry * (*android_dst_ops_negative_advice_old_t)(struct dst_entry *);
|
||||
|
||||
struct dst_ops {
|
||||
unsigned short family;
|
||||
unsigned int gc_thresh;
|
||||
|
||||
@@ -2225,16 +2225,19 @@ sk_dst_get(struct sock *sk)
|
||||
|
||||
static inline void __dst_negative_advice(struct sock *sk)
|
||||
{
|
||||
struct dst_entry *ndst, *dst = __sk_dst_get(sk);
|
||||
/* *** ANDROID FIXUP ***
|
||||
* See b/343727534 for more details why this typedef is needed here.
|
||||
* *** ANDROID FIXUP ***
|
||||
*/
|
||||
android_dst_ops_negative_advice_new_t negative_advice;
|
||||
void *c_is_fun; /* Work around --Werror=cast-function-type */
|
||||
|
||||
struct dst_entry *dst = __sk_dst_get(sk);
|
||||
|
||||
if (dst && dst->ops->negative_advice) {
|
||||
ndst = dst->ops->negative_advice(dst);
|
||||
|
||||
if (ndst != dst) {
|
||||
rcu_assign_pointer(sk->sk_dst_cache, ndst);
|
||||
sk_tx_queue_clear(sk);
|
||||
WRITE_ONCE(sk->sk_dst_pending_confirm, 0);
|
||||
}
|
||||
c_is_fun = dst->ops->negative_advice;
|
||||
negative_advice = c_is_fun;
|
||||
negative_advice(sk, dst);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,12 @@
|
||||
#define IF_HAVE_PG_SKIP_KASAN_POISON(flag,string)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define IF_HAVE_PG_OEM_RESERVED(_name) ,{1UL << PG_##_name, __stringify(_name)}
|
||||
#else
|
||||
#define IF_HAVE_PG_OEM_RESERVED(_name)
|
||||
#endif
|
||||
|
||||
#define __def_pageflag_names \
|
||||
{1UL << PG_locked, "locked" }, \
|
||||
{1UL << PG_waiters, "waiters" }, \
|
||||
@@ -132,6 +138,10 @@ IF_HAVE_PG_HWPOISON(PG_hwpoison, "hwpoison" ) \
|
||||
IF_HAVE_PG_IDLE(PG_young, "young" ) \
|
||||
IF_HAVE_PG_IDLE(PG_idle, "idle" ) \
|
||||
IF_HAVE_PG_ARCH_2(PG_arch_2, "arch_2" ) \
|
||||
IF_HAVE_PG_OEM_RESERVED(oem_reserved_1) \
|
||||
IF_HAVE_PG_OEM_RESERVED(oem_reserved_2) \
|
||||
IF_HAVE_PG_OEM_RESERVED(oem_reserved_3) \
|
||||
IF_HAVE_PG_OEM_RESERVED(oem_reserved_4) \
|
||||
IF_HAVE_PG_SKIP_KASAN_POISON(PG_skip_kasan_poison, "skip_kasan_poison")
|
||||
|
||||
#define show_page_flags(flags) \
|
||||
|
||||
@@ -90,6 +90,15 @@ DECLARE_HOOK(android_vh_record_pcpu_rwsem_time_early,
|
||||
DECLARE_HOOK(android_vh_percpu_rwsem_wq_add,
|
||||
TP_PROTO(struct percpu_rw_semaphore *sem, bool reader),
|
||||
TP_ARGS(sem, reader));
|
||||
DECLARE_HOOK(android_vh_percpu_rwsem_down_read,
|
||||
TP_PROTO(struct percpu_rw_semaphore *sem, bool try, bool *ret),
|
||||
TP_ARGS(sem, try, ret));
|
||||
DECLARE_HOOK(android_vh_percpu_rwsem_up_write,
|
||||
TP_PROTO(struct percpu_rw_semaphore *sem),
|
||||
TP_ARGS(sem));
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_percpu_rwsem_wait_complete,
|
||||
TP_PROTO(struct percpu_rw_semaphore *sem, long state, bool *complete),
|
||||
TP_ARGS(sem, state, complete), 1);
|
||||
|
||||
struct mutex_waiter;
|
||||
DECLARE_HOOK(android_vh_alter_mutex_list_add,
|
||||
|
||||
24
include/trace/hooks/fuse.h
Normal file
24
include/trace/hooks/fuse.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM fuse
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
#if !defined(_TRACE_HOOK_FUSE_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_FUSE_H
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
/*
|
||||
* Following tracepoints are not exported in tracefs and provide a
|
||||
* mechanism for vendor modules to hook and extend functionality
|
||||
*/
|
||||
|
||||
struct wait_queue_head;
|
||||
DECLARE_HOOK(android_vh_queue_request_and_unlock,
|
||||
TP_PROTO(struct wait_queue_head *wq_head, bool sync),
|
||||
TP_ARGS(wq_head, sync));
|
||||
DECLARE_HOOK(android_vh_fuse_request_end,
|
||||
TP_PROTO(struct task_struct *self),
|
||||
TP_ARGS(self));
|
||||
|
||||
#endif /* _TRACE_HOOK_FUSE_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
@@ -224,6 +224,25 @@ DECLARE_HOOK(android_vh_kmalloc_large_alloced,
|
||||
DECLARE_HOOK(android_vh_tune_fault_around_bytes,
|
||||
TP_PROTO(unsigned long *fault_around_bytes),
|
||||
TP_ARGS(fault_around_bytes));
|
||||
DECLARE_HOOK(android_vh_do_anonymous_page,
|
||||
TP_PROTO(struct vm_area_struct *vma, struct page *page),
|
||||
TP_ARGS(vma, page));
|
||||
DECLARE_HOOK(android_vh_do_swap_page,
|
||||
TP_PROTO(struct folio *folio, pte_t *pte, struct vm_fault *vmf,
|
||||
swp_entry_t entry),
|
||||
TP_ARGS(folio, pte, vmf, entry));
|
||||
DECLARE_HOOK(android_vh_do_wp_page,
|
||||
TP_PROTO(struct folio *folio),
|
||||
TP_ARGS(folio));
|
||||
DECLARE_HOOK(android_vh_uprobes_replace_page,
|
||||
TP_PROTO(struct folio *new_folio, struct folio *old_folio),
|
||||
TP_ARGS(new_folio, old_folio));
|
||||
DECLARE_HOOK(android_vh_shmem_swapin_folio,
|
||||
TP_PROTO(struct folio *folio),
|
||||
TP_ARGS(folio));
|
||||
DECLARE_HOOK(android_vh_madvise_cold_or_pageout_page,
|
||||
TP_PROTO(bool pageout, struct page *page),
|
||||
TP_ARGS(pageout, page));
|
||||
#endif /* _TRACE_HOOK_MM_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
||||
@@ -34,6 +34,22 @@ DECLARE_HOOK(android_vh_rwsem_direct_rsteal,
|
||||
DECLARE_HOOK(android_vh_rwsem_optimistic_rspin,
|
||||
TP_PROTO(struct rw_semaphore *sem, long *adjustment, bool *rspin),
|
||||
TP_ARGS(sem, adjustment, rspin));
|
||||
DECLARE_HOOK(android_vh_rwsem_read_trylock_failed,
|
||||
TP_PROTO(struct rw_semaphore *sem, long *cntp, int *ret),
|
||||
TP_ARGS(sem, cntp, ret));
|
||||
DECLARE_HOOK(android_vh_record_rwsem_reader_owned,
|
||||
TP_PROTO(struct rw_semaphore *sem,
|
||||
struct list_head *wlist),
|
||||
TP_ARGS(sem, wlist));
|
||||
DECLARE_HOOK(android_vh_clear_rwsem_reader_owned,
|
||||
TP_PROTO(struct rw_semaphore *sem),
|
||||
TP_ARGS(sem));
|
||||
DECLARE_HOOK(android_vh_record_rwsem_writer_owned,
|
||||
TP_PROTO(struct rw_semaphore *sem),
|
||||
TP_ARGS(sem));
|
||||
DECLARE_HOOK(android_vh_clear_rwsem_writer_owned,
|
||||
TP_PROTO(struct rw_semaphore *sem),
|
||||
TP_ARGS(sem));
|
||||
#endif /* _TRACE_HOOK_RWSEM_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -11,6 +11,10 @@ struct task_struct;
|
||||
DECLARE_HOOK(android_vh_syscall_prctl_finished,
|
||||
TP_PROTO(int option, struct task_struct *task),
|
||||
TP_ARGS(option, task));
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_pr_set_vma_name_bypass,
|
||||
TP_PROTO(struct mm_struct *mm, unsigned long addr, unsigned long size,
|
||||
struct anon_vma_name *anon_name, int *error, bool *bypass),
|
||||
TP_ARGS(mm, addr, size, anon_name, error, bypass), 1);
|
||||
#endif
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
#include <linux/uprobes.h>
|
||||
|
||||
#undef CREATE_TRACE_POINTS
|
||||
#include <trace/hooks/mm.h>
|
||||
|
||||
#define UINSNS_PER_PAGE (PAGE_SIZE/UPROBE_XOL_SLOT_BYTES)
|
||||
#define MAX_UPROBE_XOL_SLOTS UINSNS_PER_PAGE
|
||||
|
||||
@@ -184,6 +187,7 @@ static int __replace_page(struct vm_area_struct *vma, unsigned long addr,
|
||||
folio_get(new_folio);
|
||||
page_add_new_anon_rmap(new_page, vma, addr);
|
||||
folio_add_lru_vma(new_folio, vma);
|
||||
trace_android_vh_uprobes_replace_page(new_folio, old_folio);
|
||||
} else
|
||||
/* no new page, just dec_mm_counter for old_page */
|
||||
dec_mm_counter(mm, MM_ANONPAGES);
|
||||
|
||||
@@ -54,6 +54,7 @@ __mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key)
|
||||
#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
|
||||
osq_lock_init(&lock->osq);
|
||||
#endif
|
||||
android_init_oem_data(lock, 1);
|
||||
|
||||
trace_android_vh_mutex_init(lock);
|
||||
debug_mutex_init(lock, name, key);
|
||||
|
||||
@@ -196,9 +196,15 @@ static void percpu_rwsem_wait(struct percpu_rw_semaphore *sem, bool reader)
|
||||
|
||||
bool __sched __percpu_down_read(struct percpu_rw_semaphore *sem, bool try)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (__percpu_down_read_trylock(sem))
|
||||
return true;
|
||||
|
||||
trace_android_vh_percpu_rwsem_down_read(sem, try, &ret);
|
||||
if (ret)
|
||||
return true;
|
||||
|
||||
if (try)
|
||||
return false;
|
||||
|
||||
@@ -253,6 +259,8 @@ static bool readers_active_check(struct percpu_rw_semaphore *sem)
|
||||
|
||||
void __sched percpu_down_write(struct percpu_rw_semaphore *sem)
|
||||
{
|
||||
bool complete = false;
|
||||
|
||||
might_sleep();
|
||||
rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_);
|
||||
trace_contention_begin(sem, LCB_F_PERCPU | LCB_F_WRITE);
|
||||
@@ -278,7 +286,9 @@ void __sched percpu_down_write(struct percpu_rw_semaphore *sem)
|
||||
*/
|
||||
|
||||
/* Wait for all active readers to complete. */
|
||||
rcuwait_wait_event(&sem->writer, readers_active_check(sem), TASK_UNINTERRUPTIBLE);
|
||||
trace_android_rvh_percpu_rwsem_wait_complete(sem, TASK_UNINTERRUPTIBLE, &complete);
|
||||
if (!complete)
|
||||
rcuwait_wait_event(&sem->writer, readers_active_check(sem), TASK_UNINTERRUPTIBLE);
|
||||
trace_contention_end(sem, 0);
|
||||
trace_android_vh_record_pcpu_rwsem_starttime(current, jiffies);
|
||||
}
|
||||
@@ -288,6 +298,8 @@ void percpu_up_write(struct percpu_rw_semaphore *sem)
|
||||
{
|
||||
rwsem_release(&sem->dep_map, _RET_IP_);
|
||||
|
||||
trace_android_vh_percpu_rwsem_up_write(sem);
|
||||
|
||||
/*
|
||||
* Signal the writer is done, no fast path yet.
|
||||
*
|
||||
|
||||
@@ -143,12 +143,14 @@ static inline void rwsem_set_owner(struct rw_semaphore *sem)
|
||||
{
|
||||
lockdep_assert_preemption_disabled();
|
||||
atomic_long_set(&sem->owner, (long)current);
|
||||
trace_android_vh_record_rwsem_writer_owned(sem);
|
||||
}
|
||||
|
||||
static inline void rwsem_clear_owner(struct rw_semaphore *sem)
|
||||
{
|
||||
lockdep_assert_preemption_disabled();
|
||||
atomic_long_set(&sem->owner, 0);
|
||||
trace_android_vh_clear_rwsem_writer_owned(sem);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -181,6 +183,7 @@ static inline void __rwsem_set_reader_owned(struct rw_semaphore *sem,
|
||||
static inline void rwsem_set_reader_owned(struct rw_semaphore *sem)
|
||||
{
|
||||
__rwsem_set_reader_owned(sem, current);
|
||||
trace_android_vh_record_rwsem_reader_owned(sem, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -211,6 +214,7 @@ static inline void rwsem_clear_reader_owned(struct rw_semaphore *sem)
|
||||
{
|
||||
unsigned long val = atomic_long_read(&sem->owner);
|
||||
|
||||
trace_android_vh_clear_rwsem_reader_owned(sem);
|
||||
while ((val & ~RWSEM_OWNER_FLAGS_MASK) == (unsigned long)current) {
|
||||
if (atomic_long_try_cmpxchg(&sem->owner, &val,
|
||||
val & RWSEM_OWNER_FLAGS_MASK))
|
||||
@@ -220,6 +224,7 @@ static inline void rwsem_clear_reader_owned(struct rw_semaphore *sem)
|
||||
#else
|
||||
static inline void rwsem_clear_reader_owned(struct rw_semaphore *sem)
|
||||
{
|
||||
trace_android_vh_clear_rwsem_reader_owned(sem);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -242,6 +247,8 @@ static inline void rwsem_set_nonspinnable(struct rw_semaphore *sem)
|
||||
|
||||
static inline bool rwsem_read_trylock(struct rw_semaphore *sem, long *cntp)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
*cntp = atomic_long_add_return_acquire(RWSEM_READER_BIAS, &sem->count);
|
||||
|
||||
if (WARN_ON_ONCE(*cntp < 0))
|
||||
@@ -253,6 +260,13 @@ static inline bool rwsem_read_trylock(struct rw_semaphore *sem, long *cntp)
|
||||
return true;
|
||||
}
|
||||
|
||||
trace_android_vh_rwsem_read_trylock_failed(sem, cntp, &ret);
|
||||
if (ret) {
|
||||
rwsem_set_reader_owned(sem);
|
||||
trace_android_vh_record_rwsem_lock_starttime(current, jiffies);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -334,6 +348,8 @@ void __init_rwsem(struct rw_semaphore *sem, const char *name,
|
||||
#ifdef CONFIG_RWSEM_SPIN_ON_OWNER
|
||||
osq_lock_init(&sem->osq);
|
||||
#endif
|
||||
android_init_vendor_data(sem, 1);
|
||||
android_init_oem_data(sem, 1);
|
||||
trace_android_vh_rwsem_init(sem);
|
||||
}
|
||||
EXPORT_SYMBOL(__init_rwsem);
|
||||
@@ -552,6 +568,7 @@ static void rwsem_mark_wake(struct rw_semaphore *sem,
|
||||
|
||||
if (adjustment)
|
||||
atomic_long_add(adjustment, &sem->count);
|
||||
trace_android_vh_record_rwsem_reader_owned(sem, &wlist);
|
||||
|
||||
/* 2nd pass */
|
||||
list_for_each_entry_safe(waiter, tmp, &wlist, list) {
|
||||
@@ -1354,6 +1371,15 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
trace_android_vh_rwsem_read_trylock_failed(sem, NULL, &ret);
|
||||
if (ret) {
|
||||
rwsem_set_reader_owned(sem);
|
||||
trace_android_vh_record_rwsem_lock_starttime(current, jiffies);
|
||||
}
|
||||
}
|
||||
|
||||
preempt_enable();
|
||||
return ret;
|
||||
}
|
||||
@@ -1361,7 +1387,7 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
|
||||
/*
|
||||
* lock for writing
|
||||
*/
|
||||
static inline int __down_write_common(struct rw_semaphore *sem, int state)
|
||||
static __always_inline int __down_write_common(struct rw_semaphore *sem, int state)
|
||||
{
|
||||
if (unlikely(!rwsem_write_trylock(sem))) {
|
||||
if (IS_ERR(rwsem_down_write_slowpath(sem, state)))
|
||||
@@ -1371,12 +1397,12 @@ static inline int __down_write_common(struct rw_semaphore *sem, int state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void __down_write(struct rw_semaphore *sem)
|
||||
static __always_inline void __down_write(struct rw_semaphore *sem)
|
||||
{
|
||||
__down_write_common(sem, TASK_UNINTERRUPTIBLE);
|
||||
}
|
||||
|
||||
static inline int __down_write_killable(struct rw_semaphore *sem)
|
||||
static __always_inline int __down_write_killable(struct rw_semaphore *sem)
|
||||
{
|
||||
return __down_write_common(sem, TASK_KILLABLE);
|
||||
}
|
||||
|
||||
@@ -3959,6 +3959,17 @@ out:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(wake_up_if_idle);
|
||||
|
||||
bool cpus_equal_capacity(int this_cpu, int that_cpu)
|
||||
{
|
||||
if (!sched_asym_cpucap_active())
|
||||
return true;
|
||||
|
||||
if (this_cpu == that_cpu)
|
||||
return true;
|
||||
|
||||
return arch_scale_cpu_capacity(this_cpu) == arch_scale_cpu_capacity(that_cpu);
|
||||
}
|
||||
|
||||
bool cpus_share_cache(int this_cpu, int that_cpu)
|
||||
{
|
||||
if (this_cpu == that_cpu)
|
||||
|
||||
@@ -8632,7 +8632,7 @@ static int detach_tasks(struct lb_env *env)
|
||||
case migrate_util:
|
||||
util = task_util_est(p);
|
||||
|
||||
if (util > env->imbalance)
|
||||
if (shr_bound(util, env->sd->nr_balance_failed) > env->imbalance)
|
||||
goto next;
|
||||
|
||||
env->imbalance -= util;
|
||||
|
||||
@@ -2330,6 +2330,7 @@ static int prctl_set_vma(unsigned long opt, unsigned long addr,
|
||||
struct mm_struct *mm = current->mm;
|
||||
const char __user *uname;
|
||||
struct anon_vma_name *anon_name = NULL;
|
||||
bool bypass = false;
|
||||
int error;
|
||||
|
||||
switch (opt) {
|
||||
@@ -2356,6 +2357,10 @@ static int prctl_set_vma(unsigned long opt, unsigned long addr,
|
||||
|
||||
}
|
||||
|
||||
trace_android_rvh_pr_set_vma_name_bypass(mm, addr, size, anon_name,
|
||||
&error, &bypass);
|
||||
if (bypass)
|
||||
return error;
|
||||
mmap_write_lock(mm);
|
||||
error = madvise_set_anon_name(mm, addr, size, anon_name);
|
||||
mmap_write_unlock(mm);
|
||||
|
||||
@@ -413,6 +413,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd,
|
||||
tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
|
||||
}
|
||||
|
||||
trace_android_vh_madvise_cold_or_pageout_page(pageout, page);
|
||||
ClearPageReferenced(page);
|
||||
test_and_clear_page_young(page);
|
||||
if (pageout) {
|
||||
@@ -519,6 +520,7 @@ regular_page:
|
||||
* As a side effect, it makes confuse idle-page tracking
|
||||
* because they will miss recent referenced history.
|
||||
*/
|
||||
trace_android_vh_madvise_cold_or_pageout_page(pageout, page);
|
||||
ClearPageReferenced(page);
|
||||
test_and_clear_page_young(page);
|
||||
if (pageout) {
|
||||
|
||||
@@ -82,6 +82,9 @@
|
||||
|
||||
#include <trace/events/kmem.h>
|
||||
|
||||
#undef CREATE_TRACE_POINTS
|
||||
#include <trace/hooks/mm.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/pgalloc.h>
|
||||
@@ -3494,6 +3497,7 @@ static vm_fault_t do_wp_page(struct vm_fault *vmf)
|
||||
* not dirty accountable.
|
||||
*/
|
||||
folio = page_folio(vmf->page);
|
||||
trace_android_vh_do_wp_page(folio);
|
||||
if (folio_test_anon(folio)) {
|
||||
/*
|
||||
* If the page is exclusive to this process we must reuse the
|
||||
@@ -4092,6 +4096,7 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
|
||||
inc_mm_counter_fast(vma->vm_mm, MM_ANONPAGES);
|
||||
dec_mm_counter_fast(vma->vm_mm, MM_SWAPENTS);
|
||||
pte = mk_pte(page, vma->vm_page_prot);
|
||||
trace_android_vh_do_swap_page(folio, &pte, vmf, entry);
|
||||
|
||||
/*
|
||||
* Same logic as in do_wp_page(); however, optimize for pages that are
|
||||
@@ -4252,6 +4257,7 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf)
|
||||
*/
|
||||
__SetPageUptodate(page);
|
||||
|
||||
trace_android_vh_do_anonymous_page(vma, page);
|
||||
entry = mk_pte(page, vma->vm_page_prot);
|
||||
entry = pte_sw_mkyoung(entry);
|
||||
if (vma->vm_flags & VM_WRITE)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/kstrtox.h>
|
||||
#include <linux/sched/task_stack.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/sysfs.h>
|
||||
|
||||
typedef void (*show_pad_maps_fn) (struct seq_file *m, struct vm_area_struct *vma);
|
||||
@@ -116,8 +117,22 @@ void vma_set_pad_pages(struct vm_area_struct *vma,
|
||||
if (!is_pgsize_migration_enabled())
|
||||
return;
|
||||
|
||||
vm_flags_clear(vma, VM_PAD_MASK);
|
||||
vm_flags_set(vma, nr_pages << VM_PAD_SHIFT);
|
||||
/*
|
||||
* Usually to modify vm_flags we need to take exclusive mmap_lock but here
|
||||
* only have the lock in read mode, to avoid all DONTNEED/DONTNEED_LOCKED
|
||||
* calls needing the write lock.
|
||||
*
|
||||
* A race to the flags update can only happen with another MADV_DONTNEED on
|
||||
* the same process and same range (VMA).
|
||||
*
|
||||
* In practice, this specific scenario is not possible because the action that
|
||||
* could cause it is usually performed at most once per VMA and only by the
|
||||
* dynamic linker.
|
||||
*
|
||||
* Forego protection for this case, to avoid penalties in the common cases.
|
||||
*/
|
||||
__vm_flags_mod(vma, 0, VM_PAD_MASK);
|
||||
__vm_flags_mod(vma, nr_pages << VM_PAD_SHIFT, 0);
|
||||
}
|
||||
|
||||
unsigned long vma_pad_pages(struct vm_area_struct *vma)
|
||||
@@ -182,7 +197,15 @@ static inline bool linker_ctx(void)
|
||||
memset(buf, 0, bufsize);
|
||||
path = d_path(&file->f_path, buf, bufsize);
|
||||
|
||||
if (!strcmp(path, "/system/bin/linker64"))
|
||||
/*
|
||||
* Depending on interpreter requested, valid paths could be any of:
|
||||
* 1. /system/bin/bootstrap/linker64
|
||||
* 2. /system/bin/linker64
|
||||
* 3. /apex/com.android.runtime/bin/linker64
|
||||
*
|
||||
* Check the base name (linker64).
|
||||
*/
|
||||
if (!strcmp(kbasename(path), "linker64"))
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -271,11 +294,14 @@ struct vm_area_struct *get_pad_vma(struct vm_area_struct *vma)
|
||||
/* Adjust the start to begin at the start of the padding section */
|
||||
pad->vm_start = VMA_PAD_START(pad);
|
||||
|
||||
/*
|
||||
* The below modifications to vm_flags don't need mmap write lock,
|
||||
* since, pad does not belong to the VMA tree.
|
||||
*/
|
||||
/* Make the pad vma PROT_NONE */
|
||||
vm_flags_clear(pad, VM_READ|VM_WRITE|VM_EXEC);
|
||||
|
||||
__vm_flags_mod(pad, 0, VM_READ|VM_WRITE|VM_EXEC);
|
||||
/* Remove padding bits */
|
||||
vm_flags_clear(pad, VM_PAD_MASK);
|
||||
__vm_flags_mod(pad, 0, VM_PAD_MASK);
|
||||
|
||||
return pad;
|
||||
}
|
||||
|
||||
@@ -1792,6 +1792,7 @@ static int shmem_swapin_folio(struct inode *inode, pgoff_t index,
|
||||
|
||||
/* We have to do this with folio locked to prevent races */
|
||||
folio_lock(folio);
|
||||
trace_android_vh_shmem_swapin_folio(folio);
|
||||
if (!folio_test_swapcache(folio) ||
|
||||
folio_swap_entry(folio).val != swap.val ||
|
||||
!shmem_confirm_swap(mapping, index, swap)) {
|
||||
|
||||
@@ -80,6 +80,7 @@ void *get_shadow_from_swap_cache(swp_entry_t entry)
|
||||
return page;
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(get_shadow_from_swap_cache);
|
||||
|
||||
/*
|
||||
* add_to_swap_cache resembles filemap_add_folio on swapper_space,
|
||||
|
||||
@@ -132,7 +132,8 @@ struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie);
|
||||
static unsigned int ipv4_default_advmss(const struct dst_entry *dst);
|
||||
INDIRECT_CALLABLE_SCOPE
|
||||
unsigned int ipv4_mtu(const struct dst_entry *dst);
|
||||
static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst);
|
||||
static void ipv4_negative_advice(struct sock *sk,
|
||||
struct dst_entry *dst);
|
||||
static void ipv4_link_failure(struct sk_buff *skb);
|
||||
static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
|
||||
struct sk_buff *skb, u32 mtu,
|
||||
@@ -159,7 +160,7 @@ static struct dst_ops ipv4_dst_ops = {
|
||||
.mtu = ipv4_mtu,
|
||||
.cow_metrics = ipv4_cow_metrics,
|
||||
.destroy = ipv4_dst_destroy,
|
||||
.negative_advice = ipv4_negative_advice,
|
||||
.negative_advice = (void *)ipv4_negative_advice,
|
||||
.link_failure = ipv4_link_failure,
|
||||
.update_pmtu = ip_rt_update_pmtu,
|
||||
.redirect = ip_do_redirect,
|
||||
@@ -837,22 +838,15 @@ static void ip_do_redirect(struct dst_entry *dst, struct sock *sk, struct sk_buf
|
||||
__ip_do_redirect(rt, skb, &fl4, true);
|
||||
}
|
||||
|
||||
static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst)
|
||||
static void ipv4_negative_advice(struct sock *sk,
|
||||
struct dst_entry *dst)
|
||||
{
|
||||
struct rtable *rt = (struct rtable *)dst;
|
||||
struct dst_entry *ret = dst;
|
||||
|
||||
if (rt) {
|
||||
if (dst->obsolete > 0) {
|
||||
ip_rt_put(rt);
|
||||
ret = NULL;
|
||||
} else if ((rt->rt_flags & RTCF_REDIRECTED) ||
|
||||
rt->dst.expires) {
|
||||
ip_rt_put(rt);
|
||||
ret = NULL;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
if ((dst->obsolete > 0) ||
|
||||
(rt->rt_flags & RTCF_REDIRECTED) ||
|
||||
rt->dst.expires)
|
||||
sk_dst_reset(sk);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -87,7 +87,8 @@ struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie);
|
||||
static unsigned int ip6_default_advmss(const struct dst_entry *dst);
|
||||
INDIRECT_CALLABLE_SCOPE
|
||||
unsigned int ip6_mtu(const struct dst_entry *dst);
|
||||
static struct dst_entry *ip6_negative_advice(struct dst_entry *);
|
||||
static void ip6_negative_advice(struct sock *sk,
|
||||
struct dst_entry *dst);
|
||||
static void ip6_dst_destroy(struct dst_entry *);
|
||||
static void ip6_dst_ifdown(struct dst_entry *,
|
||||
struct net_device *dev, int how);
|
||||
@@ -257,7 +258,7 @@ static struct dst_ops ip6_dst_ops_template = {
|
||||
.cow_metrics = dst_cow_metrics_generic,
|
||||
.destroy = ip6_dst_destroy,
|
||||
.ifdown = ip6_dst_ifdown,
|
||||
.negative_advice = ip6_negative_advice,
|
||||
.negative_advice = (void *)ip6_negative_advice,
|
||||
.link_failure = ip6_link_failure,
|
||||
.update_pmtu = ip6_rt_update_pmtu,
|
||||
.redirect = rt6_do_redirect,
|
||||
@@ -2762,24 +2763,24 @@ INDIRECT_CALLABLE_SCOPE struct dst_entry *ip6_dst_check(struct dst_entry *dst,
|
||||
}
|
||||
EXPORT_INDIRECT_CALLABLE(ip6_dst_check);
|
||||
|
||||
static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
|
||||
static void ip6_negative_advice(struct sock *sk,
|
||||
struct dst_entry *dst)
|
||||
{
|
||||
struct rt6_info *rt = (struct rt6_info *) dst;
|
||||
|
||||
if (rt) {
|
||||
if (rt->rt6i_flags & RTF_CACHE) {
|
||||
rcu_read_lock();
|
||||
if (rt6_check_expired(rt)) {
|
||||
rt6_remove_exception_rt(rt);
|
||||
dst = NULL;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
} else {
|
||||
dst_release(dst);
|
||||
dst = NULL;
|
||||
if (rt->rt6i_flags & RTF_CACHE) {
|
||||
rcu_read_lock();
|
||||
if (rt6_check_expired(rt)) {
|
||||
/* counteract the dst_release() in sk_dst_reset() */
|
||||
dst_hold(dst);
|
||||
sk_dst_reset(sk);
|
||||
|
||||
rt6_remove_exception_rt(rt);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
}
|
||||
return dst;
|
||||
sk_dst_reset(sk);
|
||||
}
|
||||
|
||||
static void ip6_link_failure(struct sk_buff *skb)
|
||||
|
||||
@@ -2139,13 +2139,15 @@ static int queue_oob(struct socket *sock, struct msghdr *msg, struct sock *other
|
||||
maybe_add_creds(skb, sock, other);
|
||||
skb_get(skb);
|
||||
|
||||
scm_stat_add(other, skb);
|
||||
|
||||
spin_lock(&other->sk_receive_queue.lock);
|
||||
if (ousk->oob_skb)
|
||||
consume_skb(ousk->oob_skb);
|
||||
|
||||
WRITE_ONCE(ousk->oob_skb, skb);
|
||||
__skb_queue_tail(&other->sk_receive_queue, skb);
|
||||
spin_unlock(&other->sk_receive_queue.lock);
|
||||
|
||||
scm_stat_add(other, skb);
|
||||
skb_queue_tail(&other->sk_receive_queue, skb);
|
||||
sk_send_sigurg(other);
|
||||
unix_state_unlock(other);
|
||||
other->sk_data_ready(other);
|
||||
@@ -2628,8 +2630,10 @@ static int unix_stream_recv_urg(struct unix_stream_read_state *state)
|
||||
|
||||
mutex_lock(&u->iolock);
|
||||
unix_state_lock(sk);
|
||||
spin_lock(&sk->sk_receive_queue.lock);
|
||||
|
||||
if (sock_flag(sk, SOCK_URGINLINE) || !u->oob_skb) {
|
||||
spin_unlock(&sk->sk_receive_queue.lock);
|
||||
unix_state_unlock(sk);
|
||||
mutex_unlock(&u->iolock);
|
||||
return -EINVAL;
|
||||
@@ -2641,6 +2645,8 @@ static int unix_stream_recv_urg(struct unix_stream_read_state *state)
|
||||
WRITE_ONCE(u->oob_skb, NULL);
|
||||
else
|
||||
skb_get(oob_skb);
|
||||
|
||||
spin_unlock(&sk->sk_receive_queue.lock);
|
||||
unix_state_unlock(sk);
|
||||
|
||||
chunk = state->recv_actor(oob_skb, 0, chunk, state);
|
||||
@@ -2669,6 +2675,10 @@ static struct sk_buff *manage_oob(struct sk_buff *skb, struct sock *sk,
|
||||
consume_skb(skb);
|
||||
skb = NULL;
|
||||
} else {
|
||||
struct sk_buff *unlinked_skb = NULL;
|
||||
|
||||
spin_lock(&sk->sk_receive_queue.lock);
|
||||
|
||||
if (skb == u->oob_skb) {
|
||||
if (copied) {
|
||||
skb = NULL;
|
||||
@@ -2680,13 +2690,19 @@ static struct sk_buff *manage_oob(struct sk_buff *skb, struct sock *sk,
|
||||
} else if (flags & MSG_PEEK) {
|
||||
skb = NULL;
|
||||
} else {
|
||||
skb_unlink(skb, &sk->sk_receive_queue);
|
||||
__skb_unlink(skb, &sk->sk_receive_queue);
|
||||
WRITE_ONCE(u->oob_skb, NULL);
|
||||
if (!WARN_ON_ONCE(skb_unref(skb)))
|
||||
kfree_skb(skb);
|
||||
unlinked_skb = skb;
|
||||
skb = skb_peek(&sk->sk_receive_queue);
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock(&sk->sk_receive_queue.lock);
|
||||
|
||||
if (unlinked_skb) {
|
||||
WARN_ON_ONCE(skb_unref(unlinked_skb));
|
||||
kfree_skb(unlinked_skb);
|
||||
}
|
||||
}
|
||||
return skb;
|
||||
}
|
||||
|
||||
@@ -1351,6 +1351,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
|
||||
return;
|
||||
|
||||
cfg80211_wdev_release_bsses(wdev);
|
||||
wdev->valid_links = 0;
|
||||
wdev->connected = false;
|
||||
wdev->u.client.ssid_len = 0;
|
||||
wdev->conn_owner_nlportid = 0;
|
||||
|
||||
@@ -3774,15 +3774,10 @@ static void xfrm_link_failure(struct sk_buff *skb)
|
||||
/* Impossible. Such dst must be popped before reaches point of failure. */
|
||||
}
|
||||
|
||||
static struct dst_entry *xfrm_negative_advice(struct dst_entry *dst)
|
||||
static void xfrm_negative_advice(struct sock *sk, struct dst_entry *dst)
|
||||
{
|
||||
if (dst) {
|
||||
if (dst->obsolete) {
|
||||
dst_release(dst);
|
||||
dst = NULL;
|
||||
}
|
||||
}
|
||||
return dst;
|
||||
if (dst->obsolete)
|
||||
sk_dst_reset(sk);
|
||||
}
|
||||
|
||||
static void xfrm_init_pmtu(struct xfrm_dst **bundle, int nr)
|
||||
@@ -3950,7 +3945,7 @@ int xfrm_policy_register_afinfo(const struct xfrm_policy_afinfo *afinfo, int fam
|
||||
if (likely(dst_ops->mtu == NULL))
|
||||
dst_ops->mtu = xfrm_mtu;
|
||||
if (likely(dst_ops->negative_advice == NULL))
|
||||
dst_ops->negative_advice = xfrm_negative_advice;
|
||||
dst_ops->negative_advice = (void *)xfrm_negative_advice;
|
||||
if (likely(dst_ops->link_failure == NULL))
|
||||
dst_ops->link_failure = xfrm_link_failure;
|
||||
if (likely(dst_ops->neigh_lookup == NULL))
|
||||
|
||||
1
tools/objtool/.gitignore
vendored
1
tools/objtool/.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
arch/x86/lib/inat-tables.c
|
||||
/objtool
|
||||
fixdep
|
||||
libsubcmd/
|
||||
|
||||
@@ -16,8 +16,6 @@ objtool-y += libctype.o
|
||||
objtool-y += str_error_r.o
|
||||
objtool-y += librbtree.o
|
||||
|
||||
CFLAGS += -I$(srctree)/tools/lib
|
||||
|
||||
$(OUTPUT)libstring.o: ../lib/string.c FORCE
|
||||
$(call rule_mkdir)
|
||||
$(call if_changed_dep,cc_o_c)
|
||||
|
||||
@@ -2,19 +2,18 @@
|
||||
include ../scripts/Makefile.include
|
||||
include ../scripts/Makefile.arch
|
||||
|
||||
# always use the host compiler
|
||||
AR = $(HOSTAR)
|
||||
CC = $(HOSTCC)
|
||||
LD = $(HOSTLD)
|
||||
|
||||
ifeq ($(srctree),)
|
||||
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
||||
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
||||
endif
|
||||
|
||||
SUBCMD_SRCDIR = $(srctree)/tools/lib/subcmd/
|
||||
LIBSUBCMD_OUTPUT = $(or $(OUTPUT),$(CURDIR)/)
|
||||
LIBSUBCMD = $(LIBSUBCMD_OUTPUT)libsubcmd.a
|
||||
LIBSUBCMD_DIR = $(srctree)/tools/lib/subcmd/
|
||||
ifneq ($(OUTPUT),)
|
||||
LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd
|
||||
else
|
||||
LIBSUBCMD_OUTPUT = $(CURDIR)/libsubcmd
|
||||
endif
|
||||
LIBSUBCMD = $(LIBSUBCMD_OUTPUT)/libsubcmd.a
|
||||
|
||||
OBJTOOL := $(OUTPUT)objtool
|
||||
OBJTOOL_IN := $(OBJTOOL)-in.o
|
||||
@@ -28,16 +27,29 @@ INCLUDES := -I$(srctree)/tools/include \
|
||||
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
|
||||
-I$(srctree)/tools/arch/$(SRCARCH)/include \
|
||||
-I$(srctree)/tools/objtool/include \
|
||||
-I$(srctree)/tools/objtool/arch/$(SRCARCH)/include
|
||||
-I$(srctree)/tools/objtool/arch/$(SRCARCH)/include \
|
||||
-I$(LIBSUBCMD_OUTPUT)/include
|
||||
# Note, EXTRA_WARNINGS here was determined for CC and not HOSTCC, it
|
||||
# is passed here to match a legacy behavior.
|
||||
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed -Wno-nested-externs
|
||||
CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
|
||||
LDFLAGS += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
|
||||
OBJTOOL_CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
|
||||
OBJTOOL_LDFLAGS := $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
|
||||
|
||||
# Allow old libelf to be used:
|
||||
elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
|
||||
CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
|
||||
elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(HOSTCC) $(OBJTOOL_CFLAGS) -x c -E - | grep elf_getshdr)
|
||||
OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
|
||||
|
||||
# Always want host compilation.
|
||||
HOST_OVERRIDES := CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)"
|
||||
|
||||
AWK = awk
|
||||
MKDIR = mkdir
|
||||
|
||||
ifeq ($(V),1)
|
||||
Q =
|
||||
else
|
||||
Q = @
|
||||
endif
|
||||
|
||||
BUILD_ORC := n
|
||||
|
||||
@@ -49,21 +61,33 @@ export BUILD_ORC
|
||||
export srctree OUTPUT CFLAGS SRCARCH AWK
|
||||
include $(srctree)/tools/build/Makefile.include
|
||||
|
||||
$(OBJTOOL_IN): fixdep FORCE
|
||||
@$(CONFIG_SHELL) ./sync-check.sh
|
||||
@$(MAKE) $(build)=objtool
|
||||
$(OBJTOOL_IN): fixdep $(LIBSUBCMD) FORCE
|
||||
$(Q)$(CONFIG_SHELL) ./sync-check.sh
|
||||
$(Q)$(MAKE) $(build)=objtool $(HOST_OVERRIDES) CFLAGS="$(OBJTOOL_CFLAGS)" \
|
||||
LDFLAGS="$(OBJTOOL_LDFLAGS)"
|
||||
|
||||
|
||||
$(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
|
||||
$(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@
|
||||
$(QUIET_LINK)$(HOSTCC) $(OBJTOOL_IN) $(OBJTOOL_LDFLAGS) -o $@
|
||||
|
||||
|
||||
$(LIBSUBCMD): fixdep FORCE
|
||||
$(Q)$(MAKE) -C $(SUBCMD_SRCDIR) OUTPUT=$(LIBSUBCMD_OUTPUT)
|
||||
$(LIBSUBCMD_OUTPUT):
|
||||
$(Q)$(MKDIR) -p $@
|
||||
|
||||
clean:
|
||||
$(LIBSUBCMD): fixdep $(LIBSUBCMD_OUTPUT) FORCE
|
||||
$(Q)$(MAKE) -C $(LIBSUBCMD_DIR) O=$(LIBSUBCMD_OUTPUT) \
|
||||
DESTDIR=$(LIBSUBCMD_OUTPUT) prefix= subdir= \
|
||||
$(HOST_OVERRIDES) EXTRA_CFLAGS="$(OBJTOOL_CFLAGS)" \
|
||||
$@ install_headers
|
||||
|
||||
$(LIBSUBCMD)-clean:
|
||||
$(call QUIET_CLEAN, libsubcmd)
|
||||
$(Q)$(RM) -r -- $(LIBSUBCMD_OUTPUT)
|
||||
|
||||
clean: $(LIBSUBCMD)-clean
|
||||
$(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL)
|
||||
$(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
|
||||
$(Q)$(RM) $(OUTPUT)arch/x86/lib/inat-tables.c $(OUTPUT)fixdep $(LIBSUBCMD)
|
||||
$(Q)$(RM) $(OUTPUT)arch/x86/lib/inat-tables.c $(OUTPUT)fixdep
|
||||
|
||||
FORCE:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user