
* refs/heads/tmp-495c24a:
Revert half of "ANDROID: cpu/hotplug: create vendor hook for cpu_up/cpu_down"
Revert half of "ANDROID: arm64: add vendor hooks for bti and pauth fault"
Revert half of "ANDROID: vendor_hooks: Add param for android_vh_cpu_up/down"
Revert "ANDROID: vendor_hooks: Add a hook for task tagging"
Revert "ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle"
Revert "ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle"
Revert "ANDROID: vendor_hooks: add hook and OEM data for slab shrink"
Revert half of "ANDROID: vendor_hooks: Add hooks for memory when debug"
Revert half of "ANDROID: gic-v3: Add vendor hook to GIC v3"
UPSTREAM: tracefs: Set all files to the same group ownership as the mount option
UPSTREAM: tracefs: Have new files inherit the ownership of their parent
UPSTREAM: tracefs: Have tracefs directories not set OTH permission bits by default
Revert "ANDROID: vendor_hooks: Add hooks to recognize special worker thread."
Revert "ANDROID: sysrq: add vendor hook for sysrq crash information"
Revert "ANDROID: user: Add vendor hook to user for GKI purpose"
Revert portions of "ANDROID: sched: Add vendor hooks for sched."
Revert portions of "ANDROID: vendor_hooks: Add hooks for scheduler"
UPSTREAM: vfs: fs_context: fix up param length parsing in legacy_parse_param
ANDROID: GKI: disable CONFIG_FORTIFY_SOURCE
Linux 5.10.81
selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage
thermal: Fix NULL pointer dereferences in of_thermal_ functions
perf/core: Avoid put_page() when GUP fails
scripts/lld-version.sh: Rewrite based on upstream ld-version.sh
erofs: fix unsafe pagevec reuse of hooked pclusters
erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
PCI: Add MSI masking quirk for Nvidia ION AHCI
PCI/MSI: Deal with devices lying about their MSI mask capability
PCI/MSI: Destroy sysfs before freeing entries
parisc/entry: fix trace test in syscall exit path
x86/iopl: Fake iopl(3) CLI/STI usage
net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
net: stmmac: fix issue where clk is being unprepared twice
net: stmmac: fix system hang if change mac address after interface ifdown
net: stmmac: fix missing unlock on error in stmmac_suspend()
net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP
net: stmmac: add clocks management for gmac driver
bootconfig: init: Fix memblock leak in xbc_make_cmdline()
loop: Use blk_validate_block_size() to validate block size
block: Add a helper to validate the block size
fortify: Explicitly disable Clang support
Revert "tcp: switch orphan_count to bare per-cpu counters"
Revert "net: sched: update default qdisc visibility after Tx queue cnt changes"
Revert "serial: core: Fix initializing and restoring termios speed"
Linux 5.10.80
soc/tegra: pmc: Fix imbalanced clock disabling in error code path
x86/sev: Make the #VC exception stacks part of the default stacks storage
x86/sev: Add an x86 version of cc_platform_has()
arch/cc: Introduce a function to check for confidential computing features
selftests/bpf: Fix also no-alu32 strobemeta selftest
mmc: moxart: Fix null pointer dereference on pointer host
ath10k: fix invalid dma_addr_t token assignment
SUNRPC: Partial revert of commit 6f9f17287e
PCI: aardvark: Fix PCIe Max Payload Size setting
PCI: Add PCI_EXP_DEVCTL_PAYLOAD_* macros
drm/sun4i: Fix macros in sun8i_csc.h
powerpc/85xx: fix timebase sync issue when CONFIG_HOTPLUG_CPU=n
powerpc/powernv/prd: Unregister OPAL_MSG_PRD2 notifier during module unload
mtd: rawnand: au1550nd: Keep the driver compatible with on-die ECC engines
mtd: rawnand: plat_nand: Keep the driver compatible with on-die ECC engines
mtd: rawnand: orion: Keep the driver compatible with on-die ECC engines
mtd: rawnand: pasemi: Keep the driver compatible with on-die ECC engines
mtd: rawnand: gpio: Keep the driver compatible with on-die ECC engines
mtd: rawnand: mpc5121: Keep the driver compatible with on-die ECC engines
mtd: rawnand: xway: Keep the driver compatible with on-die ECC engines
mtd: rawnand: ams-delta: Keep the driver compatible with on-die ECC engines
s390/cio: make ccw_device_dma_* more robust
s390/ap: Fix hanging ioctl caused by orphaned replies
s390/tape: fix timer initialization in tape_std_assign()
s390/cio: check the subchannel validity for dev_busid
video: backlight: Drop maximum brightness override for brightness zero
mfd: dln2: Add cell for initializing DLN2 ADC
mm, oom: do not trigger out_of_memory from the #PF
mm, oom: pagefault_out_of_memory: don't force global OOM for dying tasks
powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC
powerpc/security: Add a helper to query stf_barrier type
powerpc/bpf: Validate branch ranges
powerpc/lib: Add helper to check if offset is within conditional branch range
memcg: prohibit unconditional exceeding the limit of dying tasks
9p/net: fix missing error check in p9_check_errors
net, neigh: Enable state migration between NUD_PERMANENT and NTF_USE
f2fs: should use GFP_NOFS for directory inodes
irqchip/sifive-plic: Fixup EOI failed when masked
posix-cpu-timers: Clear task::posix_cputimers_work in copy_process()
x86/mce: Add errata workaround for Skylake SKX37
MIPS: Fix assembly error from MIPSr2 code used within MIPS_ISA_ARCH_LEVEL
parisc: Fix backtrace to always include init funtion names
ARM: 9156/1: drop cc-option fallbacks for architecture selection
ARM: 9155/1: fix early early_iounmap()
selftests/net: udpgso_bench_rx: fix port argument
cxgb4: fix eeprom len when diagnostics not implemented
net/smc: fix sk_refcnt underflow on linkdown and fallback
vsock: prevent unnecessary refcnt inc for nonblocking connect
net: stmmac: allow a tc-taprio base-time of zero
net: hns3: allow configure ETS bandwidth of all TCs
net: hns3: fix kernel crash when unload VF while it is being reset
net/sched: sch_taprio: fix undefined behavior in ktime_mono_to_any
seq_file: fix passing wrong private data
gve: Fix off by one in gve_tx_timeout()
bpf: sockmap, strparser, and tls are reusing qdisc_skb_cb and colliding
bpf, sockmap: Remove unhash handler for BPF sockmap usage
arm64: pgtable: make __pte_to_phys/__phys_to_pte_val inline functions
nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails
llc: fix out-of-bound array index in llc_sk_dev_hash()
perf bpf: Add missing free to bpf_event__print_bpf_prog_info()
zram: off by one in read_block_state()
mm/zsmalloc.c: close race window between zs_pool_dec_isolated() and zs_unregister_migration()
can: mcp251xfd: mcp251xfd_chip_start(): fix error handling for mcp251xfd_chip_rx_int_enable()
mfd: core: Add missing of_node_put for loop iteration
bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed
net: phy: fix duplex out of sync problem while changing settings
drm/nouveau/svm: Fix refcount leak bug and missing check against null bug
ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses
ice: Fix not stopping Tx queues for VFs
ice: Fix replacing VF hardware MAC to existing MAC filter
net: vlan: fix a UAF in vlan_dev_real_dev()
openrisc: fix SMP tlb flush NULL pointer dereference
ethtool: fix ethtool msg len calculation for pause stats
net: davinci_emac: Fix interrupt pacing disable
xen-pciback: Fix return in pm_ctrl_init()
i2c: xlr: Fix a resource leak in the error handling path of 'xlr_i2c_probe()'
NFSv4: Fix a regression in nfs_set_open_stateid_locked()
scsi: qla2xxx: Turn off target reset during issue_lip
scsi: qla2xxx: Fix gnl list corruption
scsi: qla2xxx: Relogin during fabric disturbance
scsi: qla2xxx: Changes to support FCP2 Target
ar7: fix kernel builds for compiler test
watchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT
m68k: set a default value for MEMORY_RESERVE
signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL)
dmaengine: dmaengine_desc_callback_valid(): Check for `callback_result`
netfilter: nfnetlink_queue: fix OOB when mac header was cleared
soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read
auxdisplay: ht16k33: Fix frame buffer device blanking
auxdisplay: ht16k33: Connect backlight to fbdev
auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string
Fix user namespace leak
NFS: Fix an Oops in pnfs_mark_request_commit()
NFS: Fix up commit deadlocks
dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro
rtc: rv3032: fix error handling in rv3032_clkout_set_rate()
remoteproc: Fix a memory leak in an error handling path in 'rproc_handle_vdev()'
mtd: core: don't remove debugfs directory if device is in use
PCI: uniphier: Serialize INTx masking/unmasking and fix the bit operation
mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare()
fs: orangefs: fix error return code of orangefs_revalidate_lookup()
NFS: Fix deadlocks in nfs_scan_commit_list()
opp: Fix return in _opp_add_static_v2()
PCI: aardvark: Fix preserving PCI_EXP_RTCTL_CRSSVE flag on emulated bridge
PCI: aardvark: Don't spam about PIO Response Status
drm/plane-helper: fix uninitialized variable reference
pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds
NFS: Fix dentry verifier races
i2c: mediatek: fixing the incorrect register offset
nfsd: don't alloc under spinlock in rpc_parse_scope_id
rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined
apparmor: fix error check
power: supply: bq27xxx: Fix kernel crash on IRQ handler register error
mips: cm: Convert to bitfield API to fix out-of-bounds access
virtio_ring: check desc == NULL when using indirect with packed
ASoC: cs42l42: Correct configuring of switch inversion from ts-inv
ASoC: cs42l42: Use device_property API instead of of_property
ASoC: cs42l42: Disable regulators if probe fails
powerpc/44x/fsp2: add missing of_node_put
HID: u2fzero: properly handle timeouts in usb_submit_urb
HID: u2fzero: clarify error check and length calculations
clk: at91: sam9x60-pll: use DIV_ROUND_CLOSEST_ULL
serial: xilinx_uartps: Fix race condition causing stuck TX
phy: qcom-snps: Correct the FSEL_MASK
phy: ti: gmii-sel: check of_get_address() for failure
phy: qcom-qusb2: Fix a memory leak on probe
pinctrl: equilibrium: Fix function addition in multiple groups
soc: qcom: apr: Add of_node_put() before return
firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available()
usb: dwc2: drd: reset current session before setting the new one
usb: dwc2: drd: fix dwc2_drd_role_sw_set when clock could be disabled
usb: dwc2: drd: fix dwc2_force_mode call in dwc2_ovr_init
serial: imx: fix detach/attach of serial console
scsi: ufs: ufshcd-pltfrm: Fix memory leak due to probe defer
scsi: ufs: Refactor ufshcd_setup_clocks() to remove skip_ref_clk
iio: adis: do not disabe IRQs in 'adis_init()'
usb: typec: STUSB160X should select REGMAP_I2C
soc: qcom: rpmhpd: Make power_on actually enable the domain
soc: qcom: rpmhpd: Provide some missing struct member descriptions
ASoC: cs42l42: Defer probe if request_threaded_irq() returns EPROBE_DEFER
ASoC: cs42l42: Correct some register default values
ARM: dts: stm32: fix AV96 board SAI2 pin muxing on stm32mp15
ARM: dts: stm32: fix SAI sub nodes register range
ARM: dts: stm32: Reduce DHCOR SPI NOR frequency to 50 MHz
pinctrl: renesas: checker: Fix off-by-one bug in drive register check
staging: ks7010: select CRYPTO_HASH/CRYPTO_MICHAEL_MIC
staging: most: dim2: do not double-register the same device
usb: musb: select GENERIC_PHY instead of depending on it
RDMA/mlx4: Return missed an error if device doesn't support steering
scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn()
power: supply: max17040: fix null-ptr-deref in max17040_probe()
power: supply: rt5033_battery: Change voltage values to µV
usb: gadget: hid: fix error code in do_config()
serial: 8250_dw: Drop wrong use of ACPI_PTR()
powerpc: fix unbalanced node refcount in check_kvm_guest()
powerpc: Fix is_kvm_guest() / kvm_para_available()
powerpc: Reintroduce is_kvm_guest() as a fast-path check
powerpc: Rename is_kvm_guest() to check_kvm_guest()
powerpc: Refactor is_kvm_guest() declaration to new header
video: fbdev: chipsfb: use memset_io() instead of memset()
clk: at91: check pmc node status before registering syscore ops
memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe
soc/tegra: Fix an error handling path in tegra_powergate_power_up()
ASoC: SOF: topology: do not power down primary core during topology removal
arm: dts: omap3-gta04a4: accelerometer irq fix
driver core: Fix possible memory leak in device_link_add()
scsi: pm80xx: Fix misleading log statement in pm8001_mpi_get_nvmd_resp()
soundwire: debugfs: use controller id and link_id for debugfs
ALSA: hda: Use position buffer for SKL+ again
ALSA: hda: Fix hang during shutdown due to link reset
ALSA: hda: Release controller display power during shutdown/reboot
ALSA: hda: Reduce udelay() at SKL+ position reporting
arm64: dts: qcom: pm8916: Remove wrong reg-names for rtc@6000
arm64: dts: renesas: beacon: Fix Ethernet PHY mode
arm64: dts: qcom: msm8916: Fix Secondary MI2S bit clock
JFS: fix memleak in jfs_mount
MIPS: loongson64: make CPU_LOONGSON64 depends on MIPS_FP_SUPPORT
scsi: dc395: Fix error case unwinding
ARM: dts: at91: tse850: the emac<->phy interface is rmii
bus: ti-sysc: Fix timekeeping_suspended warning on resume
arm64: dts: meson-g12b: Fix the pwm regulator supply properties
arm64: dts: meson-g12a: Fix the pwm regulator supply properties
arm64: dts: ti: k3-j721e-main: Fix "bus-range" upto 256 bus number for PCIe
arm64: dts: ti: k3-j721e-main: Fix "max-virtual-functions" in PCIe EP nodes
RDMA/bnxt_re: Fix query SRQ failure
ARM: dts: qcom: msm8974: Add xo_board reference clock to DSI0 PHY
arm64: dts: rockchip: Fix GPU register width for RK3328
ARM: s3c: irq-s3c24xx: Fix return value check for s3c24xx_init_intc()
clk: mvebu: ap-cpu-clk: Fix a memory leak in error handling paths
ARM: dts: BCM5301X: Fix memory nodes names
RDMA/rxe: Fix wrong port_cap_flags
iio: st_sensors: disable regulators after device unregistration
iio: st_sensors: Call st_sensors_power_enable() from bus drivers
of: unittest: fix EXPECT text for gpio hog errors
bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit.
bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off.
cgroup: Fix rootcg cpu.stat guest double counting
ibmvnic: Process crqs after enabling interrupts
ibmvnic: don't stop queue in xmit
udp6: allow SO_MARK ctrl msg to affect routing
selftests/bpf: Fix fclose/pclose mismatch in test_progs
crypto: pcrypt - Delay write to padata->info
net: phylink: avoid mvneta warning when setting pause parameters
net: amd-xgbe: Toggle PLL settings during rate change
selftests/bpf: Fix fd cleanup in sk_lookup test
selftests: bpf: Convert sk_lookup ctx access tests to PROG_TEST_RUN
drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits
wcn36xx: Fix discarded frames due to wrong sequence number
wcn36xx: add proper DMA memory barriers in rx path
libertas: Fix possible memory leak in probe and disconnect
libertas_tf: Fix possible memory leak in probe and disconnect
KVM: s390: Fix handle_sske page fault handling
samples/kretprobes: Fix return value if register_kretprobe() failed
spi: spi-rpc-if: Check return value of rpcif_sw_init()
tcp: don't free a FIN sk_buff in tcp_remove_empty_skb()
libbpf: Fix endianness detection in BPF_CORE_READ_BITFIELD_PROBED()
tpm_tis_spi: Add missing SPI ID
tpm: fix Atmel TPM crash caused by too frequent queries
irq: mips: avoid nested irq_enter()
KVM: s390: pv: avoid stalls for kvm_s390_pv_init_vm
KVM: s390: pv: avoid double free of sida page
s390/gmap: don't unconditionally call pte_unmap_unlock() in __gmap_zap()
libbpf: Fix BTF header parsing checks
libbpf: Fix overflow in BTF sanity checks
libbpf: Allow loading empty BTFs
libbpf: Fix BTF data layout checks and allow empty BTF
bpftool: Avoid leaking the JSON writer prepared for program metadata
KVM: selftests: Fix nested SVM tests when built with clang
KVM: selftests: Add operand to vmsave/vmload/vmrun in svm.c
smackfs: use netlbl_cfg_cipsov4_del() for deleting cipso_v4_doi
drm/msm: Fix potential NULL dereference in DPU SSPP
x86/sev: Fix stack type check in vc_switch_off_ist()
clocksource/drivers/timer-ti-dm: Select TIMER_OF
PM: hibernate: fix sparse warnings
nvme-rdma: fix error code in nvme_rdma_setup_ctrl
phy: micrel: ksz8041nl: do not use power down mode
net: enetc: unmap DMA in enetc_send_cmd()
mwifiex: Send DELBA requests according to spec
rsi: stop thread firstly in rsi_91x_init() error handling
mt76: mt7915: fix muar_idx in mt7915_mcu_alloc_sta_req()
mt76: mt7915: fix sta_rec_wtbl tag len
mt76: mt7915: fix possible infinite loop release semaphore
mt76: mt76x02: fix endianness warnings in mt76x02_mac.c
mt76: mt7615: fix endianness warning in mt7615_mac_write_txwi
platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
mmc: mxs-mmc: disable regulator on error and in the remove function
media: ir_toy: assignment to be16 should be of correct type
net: stream: don't purge sk_error_queue in sk_stream_kill_queues()
drm/msm: uninitialized variable in msm_gem_import()
drm/msm: potential error pointer dereference in init()
tcp: switch orphan_count to bare per-cpu counters
kernel/sched: Fix sched_fork() access an invalid sched_task_group
ath10k: fix max antenna gain unit
hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff
hwmon: Fix possible memleak in __hwmon_device_register()
net, neigh: Fix NTF_EXT_LEARNED in combination with NTF_USE
memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host()
memstick: avoid out-of-range warning
mmc: sdhci-omap: Fix context restore
mmc: sdhci-omap: Fix NULL pointer exception if regulator is not configured
gve: Recover from queue stall due to missed IRQ
b43: fix a lower bounds test
b43legacy: fix a lower bounds test
hwrng: mtk - Force runtime pm ops for sleep ops
crypto: qat - disregard spurious PFVF interrupts
crypto: qat - detect PFVF collision after ACK
media: dvb-frontends: mn88443x: Handle errors of clk_prepare_enable()
netfilter: nft_dynset: relax superfluous check on set updates
rcu: Always inline rcu_dynticks_task*_{enter,exit}()
EDAC/amd64: Handle three rank interleaving mode
PM: EM: Fix inefficient states detection
ath9k: Fix potential interrupt storm on queue reset
media: em28xx: Don't use ops->suspend if it is NULL
cpuidle: Fix kobject memory leaks in error paths
crypto: ecc - fix CRYPTO_DEFAULT_RNG dependency
kprobes: Do not use local variable when creating debugfs file
media: cx23885: Fix snd_card_free call on null card pointer
media: tm6000: Avoid card name truncation
media: si470x: Avoid card name truncation
media: radio-wl1273: Avoid card name truncation
media: mtk-vpu: Fix a resource leak in the error handling path of 'mtk_vpu_probe()'
media: TDA1997x: handle short reads of hdmi info frame.
media: v4l2-ioctl: S_CTRL output the right value
media: dvb-usb: fix ununit-value in az6027_rc_query
media: cxd2880-spi: Fix a null pointer dereference on error handling path
media: em28xx: add missing em28xx_close_extension
drm/amdgpu: fix warning for overflow check
arm64: mm: update max_pfn after memory hotplug
drm/ttm: stop calling tt_swapin in vm_access
ath10k: sdio: Add missing BH locking around napi_schdule()
ath10k: Fix missing frame timestamp for beacon/probe-resp
ath11k: Fix memory leak in ath11k_qmi_driver_event_work
ath11k: fix packet drops due to incorrect 6 GHz freq value in rx status
ath11k: Avoid race during regd updates
ath11k: fix some sleeping in atomic bugs
net: dsa: rtl8366rb: Fix off-by-one bug
rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()
crypto: caam - disable pkc for non-E SoCs
Bluetooth: btmtkuart: fix a memleak in mtk_hci_wmt_sync
wilc1000: fix possible memory leak in cfg_scan_result()
wcn36xx: Fix Antenna Diversity Switching
cgroup: Make rebind_subsystems() disable v2 controllers all at once
net: net_namespace: Fix undefined member in key_remove_domain()
lockdep: Let lock_is_held_type() detect recursive read as read
virtio-gpu: fix possible memory allocation failure
drm/v3d: fix wait for TMU write combiner flush
objtool: Fix static_call list generation
x86/xen: Mark cpu_bringup_and_idle() as dead_end_function
objtool: Add xen_start_kernel() to noreturn list
MIPS: lantiq: dma: fix burst length for DEU
rcu: Fix existing exp request check in sync_sched_exp_online_cleanup()
Bluetooth: fix init and cleanup of sco_conn.timeout_work
selftests/bpf: Fix strobemeta selftest regression
netfilter: conntrack: set on IPS_ASSURED if flows enters internal stream state
parisc/kgdb: add kgdb_roundup() to make kgdb work with idle polling
parisc/unwind: fix unwinder when CONFIG_64BIT is enabled
erofs: don't trigger WARN() when decompression fails
task_stack: Fix end_of_stack() for architectures with upwards-growing stack
parisc: fix warning in flush_tlb_all
selftests/core: fix conflicting types compile error for close_range()
drm/amd/display: dcn20_resource_construct reduce scope of FPU enabled
x86/hyperv: Protect set_hv_tscchange_cb() against getting preempted
wcn36xx: Correct band/freq reporting on RX
spi: bcm-qspi: Fix missing clk_disable_unprepare() on error in bcm_qspi_probe()
btrfs: do not take the uuid_mutex in btrfs_rm_device
btrfs: reflink: initialize return value to 0 in btrfs_extent_same()
ACPI: AC: Quirk GK45 to skip reading _PSR
net: annotate data-race in neigh_output()
vrf: run conntrack only in context of lower/physdev for locally generated packets
ARM: 9136/1: ARMv7-M uses BE-8, not BE-32
gfs2: Fix glock_hash_walk bugs
gfs2: Cancel remote delete work asynchronously
gre/sit: Don't generate link-local addr if addr_gen_mode is IN6_ADDR_GEN_MODE_NONE
ARM: clang: Do not rely on lr register for stacktrace
smackfs: use __GFP_NOFAIL for smk_cipso_doi()
iwlwifi: mvm: disable RX-diversity in powersave
selftests/bpf: Fix perf_buffer test on system with offline cpus
selftests: kvm: fix mismatched fclose() after popen()
PM: hibernate: Get block device exclusively in swsusp_check()
nvme: drop scan_lock and always kick requeue list when removing namespaces
nvmet-tcp: fix use-after-free when a port is removed
nvmet-rdma: fix use-after-free when a port is removed
nvmet: fix use-after-free when a port is removed
media: allegro: ignore interrupt if mailbox is not initialized
block: remove inaccurate requeue check
mwl8k: Fix use-after-free in mwl8k_fw_state_machine()
mt76: mt7915: fix an off-by-one bound check
tracing/cfi: Fix cmp_entries_* functions signature mismatch
workqueue: make sysfs of unbound kworker cpumask more clever
lib/xz: Validate the value before assigning it to an enum variable
lib/xz: Avoid overlapping memcpy() with invalid input with in-place decompression
memstick: r592: Fix a UAF bug when removing the driver
md: update superblock after changing rdev flags in state_store
block: bump max plugged deferred size from 16 to 32
drm/msm: prevent NULL dereference in msm_gpu_crashstate_capture()
leaking_addresses: Always print a trailing newline
net: phy: micrel: make *-skew-ps check more lenient
drm/amdkfd: fix resume error when iommu disabled in Picasso
ACPI: battery: Accept charges over the design capacity as full
iov_iter: Fix iov_iter_get_pages{,_alloc} page fault return value
mmc: moxart: Fix reference count leaks in moxart_probe
ath: dfs_pattern_detector: Fix possible null-pointer dereference in channel_detector_create()
tracefs: Have tracefs directories not set OTH permission bits by default
net-sysfs: try not to restart the syscall if it will fail eventually
media: usb: dvd-usb: fix uninit-value bug in dibusb_read_eeprom_byte()
media: ipu3-imgu: VIDIOC_QUERYCAP: Fix bus_info
media: ipu3-imgu: imgu_fmt: Handle properly try
ACPICA: Avoid evaluating methods too early during system resume
fs/proc/uptime.c: Fix idle time reporting in /proc/uptime
ipmi: Disable some operations during a panic
media: rcar-csi2: Add checking to rcsi2_start_receiver()
brcmfmac: Add DMI nvram filename quirk for Cyberbook T116 tablet
rtw88: fix RX clock gate setting while fifo dump
ia64: don't do IA64_CMPXCHG_DEBUG without CONFIG_PRINTK
media: mceusb: return without resubmitting URB in case of -EPROTO error.
media: imx: set a media_device bus_info string
media: s5p-mfc: Add checking to s5p_mfc_probe().
media: s5p-mfc: fix possible null-pointer dereference in s5p_mfc_probe()
media: uvcvideo: Set unique vdev name based in type
media: uvcvideo: Return -EIO for control errors
media: uvcvideo: Set capability in s_param
media: stm32: Potential NULL pointer dereference in dcmi_irq_thread()
media: atomisp: Fix error handling in probe
media: netup_unidvb: handle interrupt properly according to the firmware
media: mt9p031: Fix corrupted frame after restarting stream
ath10k: high latency fixes for beacon buffer
ath11k: Change DMA_FROM_DEVICE to DMA_TO_DEVICE when map reinjected packets
ath11k: add handler for scan event WMI_SCAN_EVENT_DEQUEUED
ath11k: Avoid reg rules update during firmware recovery
drm/amdgpu: Fix MMIO access page fault
fscrypt: allow 256-bit master keys with AES-256-XTS
mwifiex: Properly initialize private structure on interface type changes
mwifiex: Run SET_BSS_MODE when changing from P2P to STATION vif-type
x86: Increase exception stack sizes
ath11k: Align bss_chan_info structure with firmware
smackfs: Fix use-after-free in netlbl_catmap_walk()
rcu-tasks: Move RTGS_WAIT_CBS to beginning of rcu_tasks_kthread() loop
net: sched: update default qdisc visibility after Tx queue cnt changes
locking/lockdep: Avoid RCU-induced noinstr fail
MIPS: lantiq: dma: reset correct number of channel
MIPS: lantiq: dma: add small delay after reset
platform/x86: wmi: do not fail if disabling fails
rcutorture: Avoid problematic critical section nesting on PREEMPT_RT
drm/panel-orientation-quirks: add Valve Steam Deck
Bluetooth: fix use-after-free error in lock_sock_nested()
Bluetooth: sco: Fix lock_sock() blockage by memcpy_from_msg()
drm: panel-orientation-quirks: Add quirk for the Samsung Galaxy Book 10.6
drm: panel-orientation-quirks: Add quirk for KD Kurio Smart C15200 2-in-1
drm: panel-orientation-quirks: Update the Lenovo Ideapad D330 quirk (v2)
dma-buf: WARN on dmabuf release with pending attachments
power: supply: max17042_battery: Clear status bits in interrupt handler
USB: chipidea: fix interrupt deadlock
USB: iowarrior: fix control-message timeouts
most: fix control-message timeouts
serial: 8250: fix racy uartclk update
USB: serial: keyspan: fix memleak on probe errors
iio: ad5770r: make devicetree property reading consistent
iio: dac: ad5446: Fix ad5622_write() return value
coresight: cti: Correct the parameter for pm_runtime_put
pinctrl: core: fix possible memory leak in pinctrl_enable()
quota: correct error number in free_dqentry()
quota: check block number when reading the block in quota file
PCI: aardvark: Fix support for PCI_ROM_ADDRESS1 on emulated bridge
PCI: aardvark: Set PCI Bridge Class Code to PCI Bridge
PCI: aardvark: Fix support for PCI_BRIDGE_CTL_BUS_RESET on emulated bridge
PCI: aardvark: Fix support for bus mastering and PCI_COMMAND on emulated bridge
PCI: aardvark: Read all 16-bits from PCIE_MSI_PAYLOAD_REG
PCI: aardvark: Fix return value of MSI domain .alloc() method
PCI: aardvark: Fix configuring Reference clock
PCI: aardvark: Fix reporting Data Link Layer Link Active
PCI: aardvark: Do not unmask unused interrupts
PCI: aardvark: Fix checking for link up via LTSSM state
PCI: aardvark: Do not clear status bits of masked interrupts
PCI: cadence: Add cdns_plat_pcie_probe() missing return
PCI: pci-bridge-emul: Fix emulation of W1C bits
ovl: fix use after free in struct ovl_aio_req
xen/balloon: add late_initcall_sync() for initial ballooning done
ALSA: mixer: fix deadlock in snd_mixer_oss_set_volume
ALSA: mixer: oss: Fix racy access to slots
ifb: fix building without CONFIG_NET_CLS_ACT
serial: core: Fix initializing and restoring termios speed
ring-buffer: Protect ring_buffer_reset() from reentrancy
powerpc/85xx: Fix oops when mpc85xx_smp_guts_ids node cannot be found
can: j1939: j1939_can_recv(): ignore messages with invalid source address
can: j1939: j1939_tp_cmd_recv(): ignore abort message in the BAM transport
KVM: nVMX: Query current VMCS when determining if MSR bitmaps are in use
KVM: arm64: Extract ESR_ELx.EC only
power: supply: max17042_battery: use VFSOC for capacity when no rsns
power: supply: max17042_battery: Prevent int underflow in set_soc_threshold
mtd: rawnand: socrates: Keep the driver compatible with on-die ECC engines
soc: fsl: dpio: use the combined functions to protect critical zone
soc: fsl: dpio: replace smp_processor_id with raw_smp_processor_id
signal/mips: Update (_save|_restore)_fp_context to fail with -EFAULT
memory: renesas-rpc-if: Correct QSPI data transfer in Manual mode
signal: Remove the bogus sigkill_pending in ptrace_stop
RDMA/qedr: Fix NULL deref for query_qp on the GSI QP
perf/x86/intel/uncore: Fix Intel ICX IIO event constraints
perf/x86/intel/uncore: Support extra IMC channel on Ice Lake server
rsi: Fix module dev_oper_mode parameter description
rsi: fix rate mask set leading to P2P failure
rsi: fix key enabled check causing unwanted encryption for vap_id > 0
rsi: fix occasional initialisation failure with BT coex
wcn36xx: handle connection loss indication
libata: fix checking of DMA state
mwifiex: Try waking the firmware until we get an interrupt
mwifiex: Read a PCI register after writing the TX ring write pointer
PM: sleep: Do not let "syscore" devices runtime-suspend during system transitions
wcn36xx: Fix (QoS) null data frame bitrate/modulation
wcn36xx: Fix tx_status mechanism
wcn36xx: Fix HT40 capability for 2Ghz band
ifb: Depend on netfilter alternatively to tc
evm: mark evm_fixmode as __ro_after_init
rtl8187: fix control-message timeouts
PCI: Mark Atheros QCA6174 to avoid bus reset
ath10k: fix division by zero in send path
ath10k: fix control-message timeout
ath6kl: fix control-message timeout
ath6kl: fix division by zero in send path
mwifiex: fix division by zero in fw download path
EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell
regulator: dt-bindings: samsung,s5m8767: correct s5m8767,pmic-buck-default-dvs-idx property
regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled
hwmon: (pmbus/lm25066) Add offset coefficients
selinux: fix race condition when computing ocontext SIDs
ia64: kprobes: Fix to pass correct trampoline address to the handler
KVM: VMX: Unregister posted interrupt wakeup handler on hardware unsetup
btrfs: call btrfs_check_rw_degradable only if there is a missing device
btrfs: fix lost error handling when replaying directory deletes
btrfs: clear MISSING device status bit in btrfs_close_one_device
rds: stop using dmapool
net/smc: Correct spelling mistake to TCPF_SYN_RECV
net/smc: Fix smc_link->llc_testlink_time overflow
nfp: bpf: relax prog rejection for mtu check through max_pkt_offset
vmxnet3: do not stop tx queues after netif_device_detach()
r8169: Add device 10ec:8162 to driver r8169
nvmet-tcp: fix header digest verification
block: schedule queue restart after BLK_STS_ZONE_RESOURCE
drm: panel-orientation-quirks: Add quirk for GPD Win3
watchdog: Fix OMAP watchdog early handling
net: multicast: calculate csum of looped-back and forwarded packets
spi: spl022: fix Microwire full duplex mode
nvmet-tcp: fix a memory leak when releasing a queue
xen/netfront: stop tx queues during live migration
gpio: mlxbf2.c: Add check for bgpio_init failure
bpf: Prevent increasing bpf_jit_limit above max
bpf: Define bpf_jit_alloc_exec_limit for arm64 JIT
fcnal-test: kill hanging ping/nettest binaries on cleanup
drm: panel-orientation-quirks: Add quirk for Aya Neo 2021
mmc: winbond: don't build on M68K
reset: socfpga: add empty driver allowing consumers to probe
ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode
hyperv/vmbus: include linux/bitops.h
sfc: Don't use netif_info before net_device setup
sfc: Export fibre-specific supported link modes
cavium: Fix return values of the probe function
mISDN: Fix return values of the probe function
scsi: qla2xxx: Fix unmap of already freed sgl
scsi: qla2xxx: Return -ENOMEM if kzalloc() fails
cavium: Return negative value when pci_alloc_irq_vectors() fails
ALSA: hda/realtek: Fixes HP Spectre x360 15-eb1xxx speakers
ASoC: soc-core: fix null-ptr-deref in snd_soc_del_component_unlocked()
x86/irq: Ensure PI wakeup handler is unregistered before module unload
x86/cpu: Fix migration safety with X86_BUG_NULL_SEL
x86/sme: Use #define USE_EARLY_PGTABLE_L5 in mem_encrypt_identity.c
fuse: fix page stealing
ext4: refresh the ext4_ext_path struct after dropping i_data_sem.
ext4: ensure enough credits in ext4_ext_shift_path_extents
ext4: fix lazy initialization next schedule time computation in more granular unit
ALSA: timer: Unconditionally unlink slave instances, too
ALSA: timer: Fix use-after-free problem
ALSA: synth: missing check for possible NULL after the call to kstrdup
ALSA: hda: Free card instance properly at probe errors
ALSA: usb-audio: Add registration quirk for JBL Quantum 400
ALSA: usb-audio: Line6 HX-Stomp XL USB_ID for 48k-fixed quirk
ALSA: line6: fix control and interrupt message timeouts
ALSA: 6fire: fix control and bulk message timeouts
ALSA: ua101: fix division by zero at probe
ALSA: hda/realtek: Add quirk for HP EliteBook 840 G7 mute LED
ALSA: hda/realtek: Add quirk for ASUS UX550VE
ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54N
ALSA: hda/realtek: Headset fixup for Clevo NH77HJQ
ALSA: hda/realtek: Add quirk for Clevo PC70HS
ALSA: hda/realtek: Add a quirk for HP OMEN 15 mute LED
ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14
media: v4l2-ioctl: Fix check_ext_ctrls
media: ir-kbd-i2c: improve responsiveness of hauppauge zilog receivers
media: rkvdec: Support dynamic resolution changes
media: ite-cir: IR receiver stop working after receive overflow
media: rkvdec: Do not override sizeimage for output format
crypto: s5p-sss - Add error handling in s5p_aes_probe()
firmware/psci: fix application of sizeof to pointer
tpm: Check for integer overflow in tpm2_map_response_body()
parisc: Fix ptrace check on syscall return
parisc: Fix set_fixmap() on PA1.x CPUs
exfat: fix incorrect loading of i_blocks for large files
mmc: dw_mmc: Dont wait for DRTO on Write RSP error
mmc: mtk-sd: Add wait dma stop done flow
scsi: qla2xxx: Fix use after free in eh_abort path
scsi: qla2xxx: Fix kernel crash when accessing port_speed sysfs file
scsi: core: Remove command size deduction from scsi_setup_scsi_cmnd()
ocfs2: fix data corruption on truncate
libata: fix read log timeout value
Input: i8042 - Add quirk for Fujitsu Lifebook T725
Input: elantench - fix misreporting trackpoint coordinates
Input: iforce - fix control-message timeout
binder: use cred instead of task for getsecid
binder: use cred instead of task for selinux checks
binder: use euid from cred instead of using task
usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform
xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
ANDROID: GKI: fix up abi break in ehci code
Linux 5.10.79
rsi: fix control-message timeout
media: staging/intel-ipu3: css: Fix wrong size comparison imgu_css_fw_init
staging: rtl8192u: fix control-message timeouts
staging: r8712u: fix control-message timeout
comedi: vmk80xx: fix bulk and interrupt message timeouts
comedi: vmk80xx: fix bulk-buffer overflow
comedi: vmk80xx: fix transfer-buffer overflows
comedi: ni_usb6501: fix NULL-deref in command paths
comedi: dt9812: fix DMA buffers on stack
isofs: Fix out of bound access for corrupted isofs image
staging: rtl8712: fix use-after-free in rtl8712_dl_fw
printk/console: Allow to disable console output by using console="" or console=null
binder: don't detect sender/target during buffer cleanup
usb-storage: Add compatibility quirk flags for iODD 2531/2541
usb: musb: Balance list entry in musb_gadget_queue
usb: gadget: Mark USB_FSL_QE broken on 64-bit
usb: ehci: handshake CMD_RUN instead of STS_HALT
Revert "x86/kvm: fix vcpu-id indexed array sizes"
KVM: x86: avoid warning with -Wbitwise-instead-of-logical
Linux 5.10.78
ALSA: usb-audio: Add Audient iD14 to mixer map quirk table
ALSA: usb-audio: Add Schiit Hel device to mixer map quirk table
Revert "wcn36xx: Disable bmps when encryption is disabled"
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
Revert "drm/ttm: fix memleak in ttm_transfered_destroy"
mm: khugepaged: skip huge page collapse for special files
Revert "usb: core: hcd: Add support for deferring roothub registration"
Revert "xhci: Set HCD flag to defer primary roothub registration"
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
net: ethernet: microchip: lan743x: Fix skb allocation failure
vrf: Revert "Reset skb conntrack connection..."
sfc: Fix reading non-legacy supported link modes
Revert "io_uring: reinforce cancel on flush during exit"
scsi: core: Put LLD module refcnt after SCSI device is released
ANDROID: GKI: fix up abi breakage from "cfg80211: fix management registrations locking"
Linux 5.10.77
perf script: Check session->header.env.arch before using it
riscv: Fix asan-stack clang build
riscv: fix misalgned trap vector base address
scsi: ufs: ufs-exynos: Correct timeout value setting registers
KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu
KVM: s390: clear kicked_mask before sleeping again
lan743x: fix endianness when accessing descriptors
sctp: add vtag check in sctp_sf_ootb
sctp: add vtag check in sctp_sf_do_8_5_1_E_sa
sctp: add vtag check in sctp_sf_violation
sctp: fix the processing for COOKIE_ECHO chunk
sctp: fix the processing for INIT_ACK chunk
sctp: use init_tag from inithdr for ABORT chunk
phy: phy_ethtool_ksettings_set: Lock the PHY while changing settings
phy: phy_start_aneg: Add an unlocked version
phy: phy_ethtool_ksettings_set: Move after phy_start_aneg
phy: phy_ethtool_ksettings_get: Lock the phy for consistency
net/tls: Fix flipped sign in async_wait.err assignment
net: nxp: lpc_eth.c: avoid hang when bringing interface down
net: ethernet: microchip: lan743x: Fix dma allocation failure by using dma_set_mask_and_coherent
net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
mlxsw: pci: Recycle received packet upon allocation failure
nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST
gpio: xgs-iproc: fix parsing of ngpios property
RDMA/sa_query: Use strscpy_pad instead of memcpy to copy a string
net: Prevent infinite while loop in skb_tx_hash()
cfg80211: correct bridge/4addr mode check
net-sysfs: initialize uid and gid before calling net_ns_get_ownership
net: batman-adv: fix error handling
regmap: Fix possible double-free in regcache_rbtree_exit()
reset: brcmstb-rescal: fix incorrect polarity of status bit
arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node
RDMA/mlx5: Set user priority for DCT
octeontx2-af: Display all enabled PF VF rsrc_alloc entries.
nvme-tcp: fix possible req->offset corruption
nvme-tcp: fix data digest pointer calculation
nvmet-tcp: fix data digest pointer calculation
IB/hfi1: Fix abba locking issue with sc_disable()
IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields
bpf: Fix error usage of map_fd and fdget() in generic_map_update_batch()
bpf: Fix potential race in tail call compatibility check
tcp_bpf: Fix one concurrency problem in the tcp_bpf_send_verdict function
riscv, bpf: Fix potential NULL dereference
cgroup: Fix memory leak caused by missing cgroup_bpf_offline
drm/amdgpu: fix out of bounds write
drm/ttm: fix memleak in ttm_transfered_destroy
mm, thp: bail out early in collapse_file for writeback page
net: lan78xx: fix division by zero in send path
cfg80211: fix management registrations locking
cfg80211: scan: fix RCU in cfg80211_add_nontrans_list()
nvme-tcp: fix H2CData PDU send accounting (again)
ocfs2: fix race between searching chunks and release journal_head from buffer_head
mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit
mmc: sdhci: Map more voltage level to SDHCI_POWER_330
mmc: dw_mmc: exynos: fix the finding clock sample value
mmc: mediatek: Move cqhci init behind ungate clock
mmc: cqhci: clear HALT state after CQE enable
mmc: vub300: fix control-message timeouts
net/tls: Fix flipped sign in tls_err_abort() calls
Revert "net: mdiobus: Fix memory leak in __mdiobus_register"
nfc: port100: fix using -ERRNO as command type mask
tipc: fix size validations for the MSG_CRYPTO type
ata: sata_mv: Fix the error handling of mv_chip_id()
pinctrl: amd: disable and mask interrupts on probe
Revert "pinctrl: bcm: ns: support updated DT binding as syscon subnode"
usbnet: fix error return code in usbnet_probe()
usbnet: sanity check for maxpacket
ext4: fix possible UAF when remounting r/o a mmp-protected file system
arm64: Avoid premature usercopy failure
powerpc/bpf: Fix BPF_MOD when imm == 1
io_uring: don't take uring_lock during iowq cancel
ARM: 9141/1: only warn about XIP address when not compile testing
ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype
ARM: 9138/1: fix link warning with XIP + frame-pointer
ARM: 9134/1: remove duplicate memcpy() definition
ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned
ARM: 9132/1: Fix __get_user_check failure with ARM KASAN images
Linux 5.10.76
pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume()
ARM: 9122/1: select HAVE_FUTEX_CMPXCHG
selftests: bpf: fix backported ASSERT_FALSE
e1000e: Separate TGP board type from SPT
tracing: Have all levels of checks prevent recursion
net: mdiobus: Fix memory leak in __mdiobus_register
bpf, test, cgroup: Use sk_{alloc,free} for test cases
s390/pci: fix zpci_zdev_put() on reserve
can: isotp: isotp_sendmsg(): fix TX buffer concurrent access in isotp_sendmsg()
scsi: core: Fix shost->cmd_per_lun calculation in scsi_add_host_with_dma()
net: hns3: fix for miscalculation of rx unused desc
sched/scs: Reset the shadow stack when idle_task_exit
scsi: qla2xxx: Fix a memory leak in an error path of qla2x00_process_els()
scsi: iscsi: Fix set_param() handling
Input: snvs_pwrkey - add clk handling
perf/x86/msr: Add Sapphire Rapids CPU support
libperf tests: Fix test_stat_cpu
ALSA: hda: avoid write to STATESTS if controller is in reset
platform/x86: intel_scu_ipc: Update timeout value in comment
isdn: mISDN: Fix sleeping function called from invalid context
ARM: dts: spear3xx: Fix gmac node
net: stmmac: add support for dwmac 3.40a
btrfs: deal with errors when checking if a dir entry exists during log replay
ALSA: hda: intel: Allow repeatedly probing on codec configuration errors
gcc-plugins/structleak: add makefile var for disabling structleak
net: hns3: fix the max tx size according to user manual
drm: mxsfb: Fix NULL pointer dereference crash on unload
net: bridge: mcast: use multicast_membership_interval for IGMPv3
selftests: netfilter: remove stray bash debug line
netfilter: Kconfig: use 'default y' instead of 'm' for bool config option
isdn: cpai: check ctr->cnr to avoid array index out of bound
nfc: nci: fix the UAF of rf_conn_info object
KVM: nVMX: promptly process interrupts delivered while in guest mode
mm, slub: fix incorrect memcg slab count for bulk free
mm, slub: fix potential memoryleak in kmem_cache_open()
mm, slub: fix mismatch between reconstructed freelist depth and cnt
powerpc/idle: Don't corrupt back chain when going idle
KVM: PPC: Book3S HV: Make idle_kvm_start_guest() return 0 if it went to guest
KVM: PPC: Book3S HV: Fix stack handling in idle_kvm_start_guest()
powerpc64/idle: Fix SP offsets when saving GPRs
net: dsa: mt7530: correct ds->num_ports
audit: fix possible null-pointer dereference in audit_filter_rules
ASoC: DAPM: Fix missing kctl change notifications
ALSA: hda/realtek: Add quirk for Clevo PC50HS
ALSA: usb-audio: Provide quirk for Sennheiser GSP670 Headset
vfs: check fd has read access in kernel_read_file_from_fd()
elfcore: correct reference to CONFIG_UML
userfaultfd: fix a race between writeprotect and exit_mmap()
ocfs2: mount fails with buffer overflow in strlen
ocfs2: fix data corruption after conversion from inline format
ceph: fix handling of "meta" errors
ceph: skip existing superblocks that are blocklisted or shut down when mounting
can: j1939: j1939_xtp_rx_rts_session_new(): abort TP less than 9 bytes
can: j1939: j1939_xtp_rx_dat_one(): cancel session if receive TP.DT with error length
can: j1939: j1939_netdev_start(): fix UAF for rx_kref of j1939_priv
can: j1939: j1939_tp_rxtimer(): fix errant alert in j1939_tp_rxtimer
can: isotp: isotp_sendmsg(): add result check for wait_event_interruptible()
can: isotp: isotp_sendmsg(): fix return error on FC timeout on TX path
can: peak_pci: peak_pci_remove(): fix UAF
can: peak_usb: pcan_usb_fd_decode_status(): fix back to ERROR_ACTIVE state notification
can: rcar_can: fix suspend/resume
net: enetc: fix ethtool counter name for PM0_TERR
drm/panel: ilitek-ili9881c: Fix sync for Feixin K101-IM2BYL02 panel
ice: Add missing E810 device ids
e1000e: Fix packet loss on Tiger Lake and later
net: stmmac: Fix E2E delay mechanism
net: hns3: disable sriov before unload hclge layer
net: hns3: fix vf reset workqueue cannot exit
net: hns3: schedule the polling again when allocation fails
net: hns3: add limit ets dwrr bandwidth cannot be 0
net: hns3: reset DWRR of unused tc to zero
powerpc/smp: do not decrement idle task preempt count in CPU offline
NIOS2: irqflags: rename a redefined register name
net: dsa: lantiq_gswip: fix register definition
ipv6: When forwarding count rx stats on the orig netdev
tcp: md5: Fix overlap between vrf and non-vrf keys
lan78xx: select CRC32
netfilter: ipvs: make global sysctl readonly in non-init netns
netfilter: ip6t_rt: fix rt0_hdr parsing in rt_mt6
ice: fix getting UDP tunnel entry
ASoC: wm8960: Fix clock configuration on slave mode
dma-debug: fix sg checks in debug_dma_map_sg()
netfilter: xt_IDLETIMER: fix panic that occurs when timer_type has garbage value
NFSD: Keep existing listeners on portlist error
xtensa: xtfpga: Try software restart before simulating CPU reset
xtensa: xtfpga: use CONFIG_USE_OF instead of CONFIG_OF
drm/amdgpu/display: fix dependencies for DRM_AMD_DC_SI
xen/x86: prevent PVH type from getting clobbered
block: decode QUEUE_FLAG_HCTX_ACTIVE in debugfs output
ARM: dts: at91: sama5d2_som1_ek: disable ISC node by default
arm: dts: vexpress-v2p-ca9: Fix the SMB unit-address
io_uring: fix splice_fd_in checks backport typo
xhci: add quirk for host controllers that don't update endpoint DCS
parisc: math-emu: Fix fall-through warnings
Linux 5.10.75
net: dsa: mv88e6xxx: don't use PHY_DETECT on internal PHY's
ionic: don't remove netdev->dev_addr when syncing uc list
net: mscc: ocelot: warn when a PTP IRQ is raised for an unknown skb
nfp: flow_offload: move flow_indr_dev_register from app init to app start
r8152: select CRC32 and CRYPTO/CRYPTO_HASH/CRYPTO_SHA256
qed: Fix missing error code in qed_slowpath_start()
mqprio: Correct stats in mqprio_dump_class_stats().
platform/x86: intel_scu_ipc: Fix busy loop expiry time
acpi/arm64: fix next_platform_timer() section mismatch error
drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
drm/msm/dsi: Fix an error code in msm_dsi_modeset_init()
drm/msm/a6xx: Track current ctx by seqno
drm/msm/mdp5: fix cursor-related warnings
drm/msm: Fix null pointer dereference on pointer edp
drm/edid: In connector_bad_edid() cap num_of_ext by num_blocks read
drm/panel: olimex-lcd-olinuxino: select CRC32
spi: bcm-qspi: clear MSPI spifie interrupt during probe
platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes
platform/mellanox: mlxreg-io: Fix argument base in kstrtou32() call
mlxsw: thermal: Fix out-of-bounds memory accesses
ata: ahci_platform: fix null-ptr-deref in ahci_platform_enable_regulators()
pata_legacy: fix a couple uninitialized variable bugs
NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
nfc: fix error handling of nfc_proto_register()
vhost-vdpa: Fix the wrong input in config_cb
ethernet: s2io: fix setting mac address during resume
net: encx24j600: check error in devm_regmap_init_encx24j600
net: dsa: microchip: Added the condition for scheduling ksz_mib_read_work
net: stmmac: fix get_hw_feature() on old hardware
net/mlx5e: Mutually exclude RX-FCS and RX-port-timestamp
net/mlx5e: Fix memory leak in mlx5_core_destroy_cq() error path
net: korina: select CRC32
net: arc: select CRC32
gpio: pca953x: Improve bias setting
sctp: account stream padding length for reconf chunk
nvme-pci: Fix abort command id
ARM: dts: bcm2711-rpi-4-b: Fix pcie0's unit address formatting
ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states
ARM: dts: bcm2711: fix MDIO #address- and #size-cells
ARM: dts: bcm2711-rpi-4-b: Fix usb's unit address
tee: optee: Fix missing devices unregister during optee_remove
iio: dac: ti-dac5571: fix an error code in probe()
iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
iio: ssp_sensors: add more range checking in ssp_parse_dataframe()
iio: adc: max1027: Fix the number of max1X31 channels
iio: light: opt3001: Fixed timeout error when 0 lux
iio: mtk-auxadc: fix case IIO_CHAN_INFO_PROCESSED
iio: adc: max1027: Fix wrong shift with 12-bit devices
iio: adc128s052: Fix the error handling path of 'adc128_probe()'
iio: adc: ad7793: Fix IRQ flag
iio: adc: ad7780: Fix IRQ flag
iio: adc: ad7192: Add IRQ flag
driver core: Reject pointless SYNC_STATE_ONLY device links
drivers: bus: simple-pm-bus: Add support for probing simple bus only devices
iio: adc: aspeed: set driver data when adc probe.
powerpc/xive: Discard disabled interrupts in get_irqchip_state()
x86/Kconfig: Do not enable AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT automatically
nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells
EDAC/armada-xp: Fix output of uncorrectable error counter
virtio: write back F_VERSION_1 before validate
misc: fastrpc: Add missing lock before accessing find_vma()
USB: serial: option: add prod. id for Quectel EG91
USB: serial: option: add Telit LE910Cx composition 0x1204
USB: serial: option: add Quectel EC200S-CN module support
USB: serial: qcserial: add EM9191 QDL support
Input: xpad - add support for another USB ID of Nacon GC-100
usb: musb: dsps: Fix the probe error path
efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock()
efi/cper: use stack buffer for error record decoding
cb710: avoid NULL pointer subtraction
xhci: Enable trust tx length quirk for Fresco FL11 USB controller
xhci: Fix command ring pointer corruption while aborting a command
xhci: guard accesses to ep_state in xhci_endpoint_reset()
USB: xhci: dbc: fix tty registration race
mei: me: add Ice Lake-N device id.
x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
btrfs: fix abort logic in btrfs_replace_file_extents
btrfs: update refs for any root except tree log roots
btrfs: check for error when looking up inode during dir entry replay
btrfs: deal with errors when adding inode reference during log replay
btrfs: deal with errors when replaying dir entry during log replay
btrfs: unlock newly allocated extent buffer after error
drm/msm: Avoid potential overflow in timeout_to_jiffies()
arm64/hugetlb: fix CMA gigantic page order for non-4K PAGE_SIZE
csky: Fixup regs.sr broken in ptrace
csky: don't let sigreturn play with priveleged bits of status register
clk: socfpga: agilex: fix duplicate s2f_user0_clk
s390: fix strrchr() implementation
nds32/ftrace: Fix Error: invalid operands (*UND* and *UND* sections) for `^'
ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW
ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo 13s Gen2
ALSA: hda/realtek: Add quirk for TongFang PHxTxX1
ALSA: hda/realtek - ALC236 headset MIC recording issue
ALSA: hda/realtek: Add quirk for Clevo X170KM-G
ALSA: hda/realtek: Complete partial device name to avoid ambiguity
ALSA: hda - Enable headphone mic on Dell Latitude laptops with ALC3254
ALSA: hda/realtek: Enable 4-speaker output for Dell Precision 5560 laptop
ALSA: seq: Fix a potential UAF by wrong private_free call order
ALSA: pcm: Workaround for a wrong offset in SYNC_PTR compat ioctl
ALSA: usb-audio: Add quirk for VF0770
Linux 5.10.74
hwmon: (pmbus/ibm-cffps) max_power_out swap changes
sched: Always inline is_percpu_thread()
perf/core: fix userpage->time_enabled of inactive events
scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported"
scsi: ses: Fix unsigned comparison with less than zero
drm/amdgpu: fix gart.bo pin_count leak
net: sun: SUNVNET_COMMON should depend on INET
vboxfs: fix broken legacy mount signature checking
mac80211: check return value of rhashtable_init
net: prevent user from passing illegal stab size
hwmon: (ltc2947) Properly handle errors when looking for the external clock
m68k: Handle arrivals of multiple signals correctly
mac80211: Drop frames from invalid MAC address in ad-hoc mode
netfilter: nf_nat_masquerade: defer conntrack walk to work queue
netfilter: nf_nat_masquerade: make async masq_inet6_event handling generic
ASoC: SOF: loader: release_firmware() on load failure to avoid batching
HID: wacom: Add new Intuos BT (CTL-4100WL/CTL-6100WL) device IDs
netfilter: ip6_tables: zero-initialize fragment offset
HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS
ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic
ext4: correct the error path of ext4_write_inline_data_end()
ext4: check and update i_disksize properly
Linux 5.10.73
x86/hpet: Use another crystalball to evaluate HPET usability
x86/entry: Clear X86_FEATURE_SMAP when CONFIG_X86_SMAP=n
x86/entry: Correct reference to intended CONFIG_64_BIT
x86/sev: Return an error on a returned non-zero SW_EXITINFO1[31:0]
x86/Kconfig: Correct reference to MWINCHIP3D
x86/platform/olpc: Correct ifdef symbol to intended CONFIG_OLPC_XO15_SCI
pseries/eeh: Fix the kdump kernel crash during eeh_pseries_init
powerpc/64s: fix program check interrupt emergency stack path
powerpc/bpf: Fix BPF_SUB when imm == 0x80000000
RISC-V: Include clone3() on rv32
bpf, s390: Fix potential memory leak about jit_data
riscv/vdso: make arch_setup_additional_pages wait for mmap_sem for write killable
i2c: mediatek: Add OFFSET_EXT_CONF setting back
i2c: acpi: fix resource leak in reconfiguration device addition
powerpc/iommu: Report the correct most efficient DMA mask for PCI devices
net: prefer socket bound to interface when not in VRF
i40e: Fix freeing of uninitialized misc IRQ vector
i40e: fix endless loop under rtnl
gve: report 64bit tx_bytes counter from gve_handle_report_stats()
gve: fix gve_get_stats()
rtnetlink: fix if_nlmsg_stats_size() under estimation
gve: Avoid freeing NULL pointer
gve: Correct available tx qpl check
drm/nouveau/debugfs: fix file release memory leak
drm/nouveau/kms/nv50-: fix file release memory leak
drm/nouveau: avoid a use-after-free when BO init fails
video: fbdev: gbefb: Only instantiate device when built for IP32
drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup
bus: ti-sysc: Use CLKDM_NOAUTO for dra7 dcan1 for errata i893
perf jevents: Tidy error handling
netlink: annotate data races around nlk->bound
net: sfp: Fix typo in state machine debug string
net/sched: sch_taprio: properly cancel timer from taprio_destroy()
net: bridge: fix under estimation in br_get_linkxstats_size()
net: bridge: use nla_total_size_64bit() in br_get_linkxstats_size()
ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence
dt-bindings: drm/bridge: ti-sn65dsi86: Fix reg value
arm64: dts: ls1028a: add missing CAN nodes
ptp_pch: Load module automatically if ID matches
powerpc/fsl/dts: Fix phy-connection-type for fm1mac3
net_sched: fix NULL deref in fifo_set_limit()
phy: mdio: fix memory leak
net/mlx5: E-Switch, Fix double allocation of acl flow counter
net/mlx5e: IPSEC RX, enable checksum complete
bpf: Fix integer overflow in prealloc_elems_and_freelist()
soc: ti: omap-prm: Fix external abort for am335x pruss
bpf, arm: Fix register clobbering in div/mod implementation
iwlwifi: pcie: add configuration of a Wi-Fi adapter on Dell XPS 15
xtensa: call irqchip_init only when CONFIG_USE_OF is selected
xtensa: use CONFIG_USE_OF instead of CONFIG_OF
arm64: dts: qcom: pm8150: use qcom,pm8998-pon binding
ath5k: fix building with LEDS=m
PCI: hv: Fix sleep while in non-sleep context when removing child devices from the bus
ARM: dts: imx6qdl-pico: Fix Ethernet support
ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo
ARM: dts: imx: Add missing pinctrl-names for panel on M53Menlo
soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment
ARM: at91: pm: do not panic if ram controllers are not enabled
ARM: dts: qcom: apq8064: Use 27MHz PXO clock as DSI PLL reference
soc: qcom: socinfo: Fixed argument passed to platform_set_data()
bus: ti-sysc: Add break in switch statement in sysc_init_soc()
riscv: Flush current cpu icache before other cpus
ARM: dts: qcom: apq8064: use compatible which contains chipid
ARM: dts: imx6dl-yapp4: Fix lp5562 LED driver probe
ARM: dts: omap3430-sdp: Fix NAND device node
xen/balloon: fix cancelled balloon action
SUNRPC: fix sign error causing rpcsec_gss drops
nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero
nfsd: fix error handling of register_pernet_subsys() in init_nfsd()
ovl: fix IOCB_DIRECT if underlying fs doesn't support direct IO
ovl: fix missing negative dentry check in ovl_rename()
mmc: sdhci-of-at91: replace while loop with read_poll_timeout
mmc: sdhci-of-at91: wait for calibration done before proceed
mmc: meson-gx: do not use memcpy_to/fromio for dram-access-quirk
xen/privcmd: fix error handling in mmap-resource processing
drm/nouveau/kms/tu102-: delay enabling cursor until after assign_windows
usb: typec: tcpm: handle SRC_STARTUP state if cc changes
USB: cdc-acm: fix break reporting
USB: cdc-acm: fix racy tty buffer accesses
usb: chipidea: ci_hdrc_imx: Also search for 'phys' phandle
Partially revert "usb: Kconfig: using select for USB_COMMON dependency"
ANDROID: Different fix for KABI breakage in 5.10.71 in struct sock
ANDROID: ABI: update .xml file with new symbols to track
Linux 5.10.72
libata: Add ATA_HORKAGE_NO_NCQ_ON_ATI for Samsung 860 and 870 SSD.
perf/x86: Reset destroy callback on event init failure
KVM: x86: nSVM: restore int_vector in svm_clear_vintr
kvm: x86: Add AMD PMU MSRs to msrs_to_save_all[]
KVM: do not shrink halt_poll_ns below grow_start
selftests: KVM: Align SMCCC call with the spec in steal_time
tools/vm/page-types: remove dependency on opt_file for idle page tracking
smb3: correct smb3 ACL security descriptor
irqchip/gic: Work around broken Renesas integration
scsi: ses: Retry failed Send/Receive Diagnostic commands
thermal/drivers/tsens: Fix wrong check for tzd in irq handlers
nvme-fc: avoid race between time out and tear down
nvme-fc: update hardware queues before using them
selftests:kvm: fix get_warnings_count() ignoring fscanf() return warn
selftests: be sure to make khdr before other targets
habanalabs/gaudi: fix LBW RR configuration
usb: dwc2: check return value after calling platform_get_resource()
usb: testusb: Fix for showing the connection speed
scsi: sd: Free scsi_disk device via put_device()
ext2: fix sleeping in atomic bugs on error
sparc64: fix pci_iounmap() when CONFIG_PCI is not set
xen-netback: correct success/error reporting for the SKB-with-fraglist case
net: mdio: introduce a shutdown method to mdio device drivers
btrfs: fix mount failure due to past and transient device flush error
btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error handling
nfsd: back channel stuck in SEQ4_STATUS_CB_PATH_DOWN
platform/x86: touchscreen_dmi: Update info for the Chuwi Hi10 Plus (CWI527) tablet
platform/x86: touchscreen_dmi: Add info for the Chuwi HiBook (CWI514) tablet
spi: rockchip: handle zero length transfers without timing out
ANDROID: Fix up KABI breakage in 5.10.71 in struct sock
Linux 5.10.71
netfilter: nf_tables: Fix oversized kvmalloc() calls
netfilter: conntrack: serialize hash resizes and cleanups
KVM: x86: Handle SRCU initialization failure during page track init
HID: usbhid: free raw_report buffers in usbhid_stop
mm: don't allow oversized kvmalloc() calls
netfilter: ipset: Fix oversized kvmalloc() calls
HID: betop: fix slab-out-of-bounds Write in betop_probe
crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
usb: hso: remove the bailout parameter
ASoC: dapm: use component prefix when checking widget names
net: udp: annotate data race around udp_sk(sk)->corkflag
HID: u2fzero: ignore incomplete packets without data
ext4: fix potential infinite loop in ext4_dx_readdir()
ext4: add error checking to ext4_ext_replay_set_iblocks()
ext4: fix reserved space counter leakage
ext4: limit the number of blocks in one ADD_RANGE TLV
ext4: fix loff_t overflow in ext4_max_bitmap_size()
ipack: ipoctal: fix module reference leak
ipack: ipoctal: fix missing allocation-failure check
ipack: ipoctal: fix tty-registration error handling
ipack: ipoctal: fix tty registration race
ipack: ipoctal: fix stack information leak
debugfs: debugfs_create_file_size(): use IS_ERR to check for error
elf: don't use MAP_FIXED_NOREPLACE for elf interpreter mappings
nvme: add command id quirk for apple controllers
hwmon: (pmbus/mp2975) Add missed POUT attribute for page 1 mp2975 controller
perf/x86/intel: Update event constraints for ICX
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
net: sched: flower: protect fl_walk() with rcu
net: phy: bcm7xxx: Fixed indirect MMD operations
net: hns3: fix always enable rx vlan filter problem after selftest
net: hns3: reconstruct function hns3_self_test
net: hns3: fix prototype warning
net: hns3: fix show wrong state when add existing uc mac address
net: hns3: fix mixed flag HCLGE_FLAG_MQPRIO_ENABLE and HCLGE_FLAG_DCB_ENABLE
net: hns3: keep MAC pause mode when multiple TCs are enabled
net: hns3: do not allow call hns3_nic_net_open repeatedly
ixgbe: Fix NULL pointer dereference in ixgbe_xdp_setup
scsi: csiostor: Add module softdep on cxgb4
Revert "block, bfq: honor already-setup queue merges"
net: ks8851: fix link error
selftests, bpf: test_lwt_ip_encap: Really disable rp_filter
selftests, bpf: Fix makefile dependencies on libbpf
bpf: Exempt CAP_BPF from checks against bpf_jit_limit
RDMA/hns: Fix inaccurate prints
e100: fix buffer overrun in e100_get_regs
e100: fix length calculation in e100_get_regs_len
dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports
dsa: mv88e6xxx: Fix MTU definition
dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
drm/i915/request: fix early tracepoints
smsc95xx: fix stalled rx after link change
net: ipv4: Fix rtnexthop len when RTA_FLOW is present
net: enetc: fix the incorrect clearing of IF_MODE bits
hwmon: (tmp421) fix rounding for negative values
hwmon: (tmp421) report /PVLD condition as fault
mptcp: don't return sockets in foreign netns
sctp: break out if skb_header_pointer returns NULL in sctp_rcv_ootb
mac80211-hwsim: fix late beacon hrtimer handling
mac80211: mesh: fix potentially unaligned access
mac80211: limit injected vht mcs/nss in ieee80211_parse_tx_radiotap
mac80211: Fix ieee80211_amsdu_aggregate frag_tail bug
hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs
bpf, mips: Validate conditional branch offsets
RDMA/cma: Fix listener leak in rdma_cma_listen_on_all() failure
IB/cma: Do not send IGMP leaves for sendonly Multicast groups
bpf: Handle return value of BPF_PROG_TYPE_STRUCT_OPS prog
ipvs: check that ip_vs_conn_tab_bits is between 8 and 20
drm/amdgpu: correct initial cp_hqd_quantum for gfx9
drm/amd/display: Pass PCI deviceid into DC
RDMA/cma: Do not change route.addr.src_addr.ss_family
media: ir_toy: prevent device from hanging during transmit
KVM: rseq: Update rseq when processing NOTIFY_RESUME on xfer to KVM guest
KVM: nVMX: Filter out all unsupported controls when eVMCS was activated
KVM: x86: nSVM: don't copy virt_ext from vmcb12
KVM: x86: Fix stack-out-of-bounds memory access from ioapic_write_indirect()
x86/kvmclock: Move this_cpu_pvti into kvmclock.h
mac80211: fix use-after-free in CCMP/GCMP RX
scsi: ufs: Fix illegal offset in UPIU event trace
gpio: pca953x: do not ignore i2c errors
hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field
hwmon: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field
hwmon: (w83793) Fix NULL pointer dereference by removing unnecessary structure field
hwmon: (tmp421) handle I2C errors
fs-verity: fix signed integer overflow with i_size near S64_MAX
ACPI: NFIT: Use fallback node id when numa info in NFIT table is incorrect
ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i 15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.
usb: cdns3: fix race condition before setting doorbell
cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory
scsi: qla2xxx: Changes to support kdump kernel for NVMe BFS
cpufreq: schedutil: Use kobject release() method to free sugov_tunables
tty: Fix out-of-bound vmalloc access in imageblit
ANDROID: GKI: update .xml file with new symbols to track
Revert "treewide: Change list_sort to use const pointers"
Revert "crypto: public_key: fix overflow during implicit conversion"
Revert "drm/vmwgfx: fix potential UAF in vmwgfx_surface.c"
Revert "drm: serialize drm_file.master with a new spinlock"
Revert "drm: protect drm_master pointers in drm_lease.c"
Linux 5.10.70
qnx4: work around gcc false positive warning bug
xen/balloon: fix balloon kthread freezing
USB: serial: cp210x: fix dropped characters with CP2102
thermal/drivers/int340x: Do not set a wrong tcc offset on resume
EDAC/dmc520: Assign the proper type to dimm->edac_mode
EDAC/synopsys: Fix wrong value type assignment for edac_mode
spi: Fix tegra20 build with CONFIG_PM=n
net: 6pack: Fix tx timeout and slot time
alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile
arm64: Mark __stack_chk_guard as __ro_after_init
parisc: Use absolute_pointer() to define PAGE0
qnx4: avoid stringop-overread errors
sparc: avoid stringop-overread errors
net: i825xx: Use absolute_pointer for memcpy from fixed memory location
compiler.h: Introduce absolute_pointer macro
blk-cgroup: fix UAF by grabbing blkcg lock before destroying blkg pd
block: flush the integrity workqueue in blk_integrity_unregister
block: check if a profile is actually registered in blk_integrity_unregister
amd/display: downgrade validation failure log level
sparc32: page align size in arch_dma_alloc
nvme-rdma: destroy cm id before destroy qp to avoid use after free
nvme-multipath: fix ANA state updates when a namespace is not present
xen/balloon: use a kernel thread instead a workqueue
bpf: Add oversize check before call kvcalloc()
cpufreq: intel_pstate: Override parameters if HWP forced by BIOS
ipv6: delay fib6_sernum increase in fib6_add
m68k: Double cast io functions to unsigned long
blk-mq: avoid to iterate over stale request
net: stmmac: allow CSR clock of 300MHz
net: macb: fix use after free on rmmod
net: phylink: Update SFP selected interface on advertising changes
blktrace: Fix uaf in blk_trace access after removing by sysfs
io_uring: put provided buffer meta data under memcg accounting
x86/asm: Fix SETZ size enqcmds() build failure
x86/asm: Add a missing __iomem annotation in enqcmds()
md: fix a lock order reversal in md_alloc
irqchip/gic-v3-its: Fix potential VPE leak on error
irqchip/goldfish-pic: Select GENERIC_IRQ_CHIP to fix build
scsi: lpfc: Use correct scnprintf() limit
scsi: qla2xxx: Restore initiator in dual mode
cifs: fix a sign extension bug
thermal/core: Potential buffer overflow in thermal_build_list_of_policies()
nvme: keep ctrl->namespaces ordered
treewide: Change list_sort to use const pointers
nvme-tcp: fix incorrect h2cdata pdu offset accounting
fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
fpga: machxo2-spi: Return an error on failure
tty: synclink_gt: rename a conflicting function name
tty: synclink_gt, drop unneeded forward declarations
scsi: target: Fix the pgr/alua_support_store functions
scsi: iscsi: Adjust iface sysfs attr detection
atlantic: Fix issue in the pm resume flow.
net/mlx4_en: Don't allow aRFS for encapsulated packets
qed: rdma - don't wait for resources under hw error recovery flow
gpio: uniphier: Fix void functions to remove return value
s390/qeth: fix NULL deref in qeth_clear_working_pool_list()
kselftest/arm64: signal: Skip tests if required features are missing
kselftest/arm64: signal: Add SVE to the set of features we can check for
net: dsa: realtek: register the MDIO bus under devres
net: dsa: don't allocate the slave_mii_bus using devres
net/smc: fix 'workqueue leaked lock' in smc_conn_abort_work
net/smc: add missing error check in smc_clc_prfx_set()
net: hns3: check queue id range before using
net: hns3: fix change RSS 'hfunc' ineffective issue
bnxt_en: Fix TX timeout when TX ring size is set to the smallest
enetc: Fix uninitialized struct dim_sample field usage
enetc: Fix illegal access when reading affinity_hint
platform/x86/intel: punit_ipc: Drop wrong use of ACPI_PTR()
afs: Fix updating of i_blocks on file/dir extension
afs: Fix incorrect triggering of sillyrename on 3rd-party invalidation
comedi: Fix memory leak in compat_insnlist()
net: hso: fix muxed tty registration
drm/amd/pm: Update intermediate power state for SI
scsi: sd_zbc: Ensure buffer size is aligned to SECTOR_SIZE
serial: mvebu-uart: fix driver's tx_empty callback
serial: 8250: 8250_omap: Fix RX_LVL register offset
xhci: Set HCD flag to defer primary roothub registration
btrfs: prevent __btrfs_dump_space_info() to underflow its free space
erofs: fix up erofs_lookup tracepoint
mcb: fix error handling in mcb_alloc_bus()
USB: serial: option: add device id for Foxconn T99W265
USB: serial: option: remove duplicate USB device ID
USB: serial: option: add Telit LN920 compositions
USB: serial: mos7840: remove duplicated 0xac24 device ID
usb: core: hcd: Add support for deferring roothub registration
usb: dwc3: core: balance phy init and exit
Re-enable UAS for LaCie Rugged USB3-FW with fk quirk
staging: greybus: uart: fix tty use after free
binder: make sure fd closes complete
Revert "USB: bcma: Add a check for devm_gpiod_get"
USB: cdc-acm: fix minor-number release
USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
xen/x86: fix PV trap handling on secondary processors
cifs: fix incorrect check for null pointer in header_assemble
usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
usb: dwc2: gadget: Fix ISOC transfer complete handling for DDMA
usb: dwc2: gadget: Fix ISOC flow for BDMA and Slave
usb: gadget: r8a66597: fix a loop in set_feature()
mm: fix uninitialized use in overcommit_policy_handler
ocfs2: drop acl cache for directories too
PCI: aardvark: Increase polling delay to 1.5s while waiting for PIO response
ANDROID: GKI: update the .xml file after modifying the ANDROID_KABI_USE() macro
ANDROID: GKI: rework the ANDROID_KABI_USE() macro to not use __UNIQUE()
ANDROID: GKI: update .xml file to handle previous issues
Linux 5.10.69
drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV
sched/idle: Make the idle timer expire in hard interrupt context
rtc: rx8010: select REGMAP_I2C
blk-mq: allow 4x BLK_MAX_REQUEST_COUNT at blk_plug for multiple_queues
blk-throttle: fix UAF by deleteing timer in blk_throtl_exit()
pwm: stm32-lp: Don't modify HW state in .remove() callback
pwm: rockchip: Don't modify HW state in .remove() callback
pwm: img: Don't modify HW state in .remove() callback
habanalabs: add validity check for event ID received from F/W
nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group
nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group
nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group
nilfs2: fix NULL pointer in nilfs_##name##_attr_release
nilfs2: fix memory leak in nilfs_sysfs_create_device_group
btrfs: fix lockdep warning while mounting sprout fs
btrfs: update the bdev time directly when closing
ceph: lockdep annotations for try_nonblocking_invalidate
ceph: remove the capsnaps when removing caps
ceph: request Fw caps before updating the mtime in ceph_write_iter
dmaengine: xilinx_dma: Set DMA mask for coherent APIs
dmaengine: ioat: depends on !UML
dmaengine: sprd: Add missing MODULE_DEVICE_TABLE
dmaengine: idxd: depends on !UML
iommu/amd: Relocate GAMSup check to early_enable_iommus
parisc: Move pci_dev_is_behind_card_dino to where it is used
dma-buf: DMABUF_MOVE_NOTIFY should depend on DMA_SHARED_BUFFER
drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION()
drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
thermal/core: Fix thermal_cooling_device_register() prototype
tools/bootconfig: Fix tracing_on option checking in ftrace2bconf.sh
Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH
ceph: cancel delayed work instead of flushing on mdsc teardown
ceph: allow ceph_put_mds_session to take NULL or ERR_PTR
platform/chrome: cros_ec_trace: Fix format warnings
platform/chrome: sensorhub: Add trace events for sample
dmaengine: idxd: fix wq slot allocation index check
pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered
pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered
PM: sleep: core: Avoid setting power.must_resume to false
profiling: fix shift-out-of-bounds bugs
nilfs2: use refcount_dec_and_lock() to fix potential UAF
prctl: allow to setup brk for et_dyn executables
9p/trans_virtio: Remove sysfs file on probe failure
thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
perf tools: Allow build-id with trailing zeros
tools lib: Adopt memchr_inv() from kernel
perf test: Fix bpf test sample mismatch reporting
dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
um: virtio_uml: fix memory leak on init failures
coredump: fix memleak in dump_vma_snapshot()
staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb()
sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
sctp: validate chunk size in __rcv_asconf_lookup
Revert "net/mlx5: Register to devlink ingress VLAN filter trap"
ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE
ARM: 9079/1: ftrace: Add MODULE_PLTS support
ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link()
ARM: 9077/1: PLT: Move struct plt_entries definition to header
ARM: Qualify enabling of swiotlb_init()
s390/pci_mmio: fully validate the VMA before calling follow_pte()
console: consume APC, DM, DCS
PCI: aardvark: Fix reporting CRS value
PCI: pci-bridge-emul: Add PCIe Root Capabilities Register
ANDROID: GKI: Update symbol list for new modules
Linux 5.10.68
net: dsa: bcm_sf2: Fix array overrun in bcm_sf2_num_active_ports()
bnxt_en: Fix error recovery regression
x86/mce: Avoid infinite loop for copy from user recovery
net: renesas: sh_eth: Fix freeing wrong tx descriptor
mfd: lpc_sch: Rename GPIOBASE to prevent build error
mfd: lpc_sch: Partially revert "Add support for Intel Quark X1000"
bnxt_en: Fix possible unintended driver initiated error recovery
bnxt_en: Improve logging of error recovery settings information.
bnxt_en: Convert to use netif_level() helpers.
bnxt_en: Consolidate firmware reset event logging.
bnxt_en: log firmware debug notifications
bnxt_en: Fix asic.rev in devlink dev info command
bnxt_en: fix stored FW_PSID version masks
net: dsa: b53: Fix IMP port setup on BCM5301x
ip_gre: validate csum_start only on pull
qlcnic: Remove redundant unlock in qlcnic_pinit_from_rom
fq_codel: reject silly quantum parameters
netfilter: socket: icmp6: fix use-after-scope
net: dsa: b53: Set correct number of ports in the DSA struct
net: dsa: b53: Fix calculating number of switch ports
net: hso: add failure handler for add_net_device
selftests: mptcp: clean tmp files in simult_flows
net: dsa: tag_rtl4_a: Fix egress tags
gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and avoid a leak
gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'
perf bench inject-buildid: Handle writen() errors
perf unwind: Do not overwrite FEATURE_CHECK_LDFLAGS-libunwind-{x86,aarch64}
ARC: export clear_user_page() for modules
mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n
KVM: arm64: Handle PSCI resets before userspace touches vCPU state
KVM: arm64: Fix read-side race on updates to vcpu reset state
mtd: mtdconcat: Check _read, _write callbacks existence before assignment
mtd: mtdconcat: Judge callback existence based on the master
tracing/boot: Fix a hist trigger dependency for boot time tracing
mfd: tqmx86: Clear GPIO IRQ resource when no IRQ is set
PCI: Fix pci_dev_str_match_path() alloc while atomic bug
KVM: arm64: Restrict IPA size to maximum 48 bits on 4K and 16K page size
netfilter: nft_ct: protect nft_ct_pcpu_template_refcnt with mutex
netfilter: Fix fall-through warnings for Clang
PCI: iproc: Fix BCMA probe resource handling
PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges'
backlight: ktd253: Stabilize backlight
mfd: axp20x: Update AXP288 volatile ranges
s390/bpf: Fix branch shortening during codegen pass
s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant
s390/bpf: Fix optimizing out zero-extensions
NTB: perf: Fix an error code in perf_setup_inbuf()
NTB: Fix an error code in ntb_msit_probe()
ethtool: Fix an error code in cxgb2.c
PCI: ibmphp: Fix double unmap of io_mem
block, bfq: honor already-setup queue merges
net: usb: cdc_mbim: avoid altsetting toggling for Telit LN920
Set fc_nlinfo in nh_create_ipv4, nh_create_ipv6
octeontx2-af: Add additional register check to rvu_poll_reg()
watchdog: Start watchdog in watchdog_set_last_hw_keepalive only if appropriate
PCI: Add ACS quirks for Cavium multi-function devices
PCI: j721e: Add PCIe support for AM64
PCI: j721e: Add PCIe support for J7200
PCI: cadence: Add quirk flag to set minimum delay in LTSSM Detect.Quiet state
PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool
tracing/probes: Reject events which have the same name of existing one
PCI: rcar: Fix runtime PM imbalance in rcar_pcie_ep_probe()
mfd: Don't use irq_create_mapping() to resolve a mapping
PCI: tegra: Fix OF node reference leak
PCI: tegra194: Fix MSI-X programming
PCI: tegra194: Fix handling BME_CHGED event
fuse: fix use after free in fuse_read_interrupt()
PCI: Add ACS quirks for NXP LX2xx0 and LX2xx2 platforms
mfd: db8500-prcmu: Adjust map to reality
dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range()
net: hns3: fix the timing issue of VF clearing interrupt sources
net: hns3: disable mac in flr process
net: hns3: change affinity_mask to numa node range
net: hns3: pad the short tunnel frame before sending to hardware
bnxt_en: make bnxt_free_skbs() safe to call after bnxt_free_mem()
KVM: PPC: Book3S HV: Tolerate treclaim. in fake-suspend mode changing registers
ibmvnic: check failover_pending in login response
dt-bindings: arm: Fix Toradex compatible typo
udp_tunnel: Fix udp_tunnel_nic work-queue type
qed: Handle management FW error
selftest: net: fix typo in altname test
tcp: fix tp->undo_retrans accounting in tcp_sacktag_one()
x86/uaccess: Fix 32-bit __get_user_asm_u64() when CC_HAS_ASM_GOTO_OUTPUT=y
net: dsa: destroy the phylink instance on any error in dsa_slave_phy_setup
net/af_unix: fix a data-race in unix_dgram_poll
vhost_net: fix OoB on sendmsg() failure.
gen_compile_commands: fix missing 'sys' package
net: ipa: initialize all filter table slots
events: Reuse value read using READ_ONCE instead of re-reading it
nvme-tcp: fix io_work priority inversion
net/mlx5: Fix potential sleeping in atomic context
net/mlx5: FWTrace, cancel work on alloc pd error flow
perf machine: Initialize srcline string member in add_location struct
drm/rockchip: cdn-dp-core: Make cdn_dp_core_resume __maybe_unused
tipc: increase timeout in tipc_sk_enqueue()
r6040: Restore MDIO clock frequency after MAC reset
net/l2tp: Fix reference count leak in l2tp_udp_recv_core
dccp: don't duplicate ccid when cloning dccp sock
ptp: dp83640: don't define PAGE0
net-caif: avoid user-triggerable WARN_ON(1)
net/{mlx5|nfp|bnxt}: Remove unnecessary RTNL lock assert
ethtool: Fix rxnfc copy to user buffer overflow
tipc: fix an use-after-free issue in tipc_recvmsg
x86/mm: Fix kern_addr_valid() to cope with existing but not present entries
x86/pat: Pass valid address to sanitize_phys()
s390/sclp: fix Secure-IPL facility detection
drm/etnaviv: add missing MMU context put when reaping MMU mapping
drm/etnaviv: reference MMU context when setting up hardware state
drm/etnaviv: fix MMU context leak on GPU reset
drm/etnaviv: exec and MMU state is lost when resetting the GPU
drm/etnaviv: keep MMU context across runtime suspend/resume
drm/etnaviv: stop abusing mmu_context as FE running marker
drm/etnaviv: put submit prev MMU context when it exists
drm/etnaviv: return context from etnaviv_iommu_context_get
drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10
PCI: Add AMD GPU multi-function power dependencies
PM: base: power: don't try to use non-existing RTC for storing data
arm64/sve: Use correct size when reinitialising SVE state
bnx2x: Fix enabling network interfaces without VFs
xen: reset legacy rtc flag for PV domU
io_uring: ensure symmetry in handling iter types in loop_rw_iter()
btrfs: fix upper limit for max_inline for page size 64K
drm/bridge: lt9611: Fix handling of 4k panels
Linux 5.10.67
fanotify: limit number of event merge attempts
drm/panfrost: Clamp lock region to Bifrost minimum
drm/panfrost: Use u64 for size in lock_region
drm/panfrost: Simplify lock_region calculation
drm/amd/display: Update bounding box states (v2)
drm/amd/display: Update number of DCN3 clock states
drm/amdgpu: Fix BUG_ON assert
drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv
drm/dp_mst: Fix return code on sideband message failure
drm/msi/mdp4: populate priv->kms in mdp4_kms_init
drm/mgag200: Select clock in PLL update functions
net: dsa: lantiq_gswip: fix maximum frame length
lib/test_stackinit: Fix static initializer test
platform/chrome: cros_ec_proto: Send command again when timeout occurs
libnvdimm/pmem: Fix crash triggered when I/O in-flight during unbind
memcg: enable accounting for pids in nested pid namespaces
mm,vmscan: fix divide by zero in get_scan_count
mm/hugetlb: initialize hugetlb_usage in mm_init
mm/hmm: bypass devmap pte when all pfn requested flags are fulfilled
hugetlb: fix hugetlb cgroup refcounting during vma split
s390/pv: fix the forcing of the swiotlb
cpufreq: powernv: Fix init_chip_info initialization in numa=off
scsi: qla2xxx: Sync queue idx with queue_pair_map idx
scsi: qla2xxx: Changes to support kdump kernel
scsi: BusLogic: Fix missing pr_cont() use
ovl: fix BUG_ON() in may_delete() when called from ovl_cleanup()
parisc: fix crash with signals and alloca
io_uring: remove duplicated io_size from rw
fs/io_uring Don't use the return value from import_iovec().
net: hns3: clean up a type mismatch warning
net: w5100: check return value after calling platform_get_resource()
fix array-index-out-of-bounds in taprio_change
net: fix NULL pointer reference in cipso_v4_doi_free
ath9k: fix sleeping in atomic context
ath9k: fix OOB read ar9300_eeprom_restore_internal
wcn36xx: Fix missing frame timestamp for beacon/probe-resp
selftests/bpf: Fix potential unreleased lock
parport: remove non-zero check on count
net/mlx5: DR, Enable QP retransmission
net/mlx5: DR, fix a potential use-after-free bug
iwlwifi: mvm: Fix scan channel flags settings
iwlwifi: fw: correctly limit to monitor dump
iwlwifi: mvm: fix access to BSS elements
iwlwifi: mvm: avoid static queue number aliasing
iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed
iwlwifi: pcie: free RBs during configure
nfsd: fix crash on LOCKT on reexported NFSv3
drm/amdkfd: Account for SH/SE count when setting up cu masks.
ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B
ASoC: rockchip: i2s: Fix regmap_ops hang
usbip:vhci_hcd USB port can get stuck in the disabled state
usbip: give back URBs for unsent unlink requests during cleanup
usb: musb: musb_dsps: request_irq() after initializing musb
Revert "USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set"
cifs: fix wrong release in sess_alloc_buffer() failed path
mmc: core: Return correct emmc response in case of ioctl error
selftests/bpf: Enlarge select() timeout for test_maps
mmc: rtsx_pci: Fix long reads when clock is prescaled
mmc: sdhci-of-arasan: Check return value of non-void funtions
mmc: sdhci-of-arasan: Modified SD default speed to 19MHz for ZynqMP
of: Don't allow __of_attached_node_sysfs() without CONFIG_SYSFS
ASoC: Intel: Skylake: Fix passing loadable flag for module
ASoC: Intel: Skylake: Fix module configuration for KPB and MIXER
soundwire: intel: fix potential race condition during power down
btrfs: tree-log: check btrfs_lookup_data_extent return value
m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch
octeontx2-pf: Fix NIX1_RX interface backpressure
rtw88: wow: fix size access error of probe request
rtw88: wow: build wow function only if CONFIG_PM is on
rtw88: use read_poll_timeout instead of fixed sleep
rtl8xxxu: Fix the handling of TX A-MPDU aggregation
drm/exynos: Always initialize mapping in exynos_drm_register_dma()
lockd: lockd server-side shouldn't set fl_ops
usb: chipidea: host: fix port index underflow and UBSAN complains
gfs2: Don't call dlm after protocol is unmounted
kselftest/arm64: pac: Fix skipping of tests on systems without PAC
kselftest/arm64: mte: Fix misleading output when skipping tests
net: Fix offloading indirect devices dependency on qdisc order creation
staging: rts5208: Fix get_ms_information() heap buffer size
hwmon: (pmbus/ibm-cffps) Fix write bits for LED control
selftests/bpf: Fix flaky send_signal test
rpc: fix gss_svc_init cleanup on failure
tcp: enable data-less, empty-cookie SYN with TFO_SERVER_COOKIE_NOT_REQD
iomap: pass writeback errors to the mapping
serial: sh-sci: fix break handling for sysrq
opp: Don't print an error if required-opps is missing
Bluetooth: Fix handling of LE Enhanced Connection Complete
nvme: code command_id with a genctr for use-after-free validation
nvme-tcp: don't check blk_mq_tag_to_rq when receiving pdu data
arm64: dts: ls1046a: fix eeprom entries
arm64: tegra: Fix compatible string for Tegra132 CPUs
ARM: tegra: tamonten: Fix UART pad setting
ARM: tegra: acer-a500: Remove bogus USB VBUS regulators
mac80211: Fix monitor MTU limit so that A-MSDUs get through
drm/display: fix possible null-pointer dereference in dcn10_set_clock()
gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()
net/mlx5: Fix variable type to match 64bit
drm/msm/dp: return correct edid checksum after corrupted edid checksum read
Bluetooth: avoid circular locks in sco_sock_connect
Bluetooth: schedule SCO timeouts with delayed_work
drm/vmwgfx: fix potential UAF in vmwgfx_surface.c
selftests/bpf: Fix xdp_tx.c prog section name
drm/amd/display: fix incorrect CM/TF programming sequence in dwb
drm/amd/display: fix missing writeback disablement if plane is removed
thunderbolt: Fix port linking by checking all adapters
drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers
drm: xlnx: zynqmp_dpsub: Call pm_runtime_get_sync before setting pixel clock
drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660
drm/msm: mdp4: drop vblank get/put from prepare/complete_commit
net: ethernet: stmmac: Do not use unreachable() in ipq806x_gmac_probe()
nvmem: qfprom: Fix up qfprom_disable_fuse_blowing() ordering
arm64: dts: qcom: sm8250: Fix epss_l3 unit address
arm64: dts: qcom: msm8996: don't use underscore in node name
arm64: dts: qcom: msm8994: don't use underscore in node name
arm64: dts: qcom: sdm630: don't use underscore in node name
arm64: dts: qcom: ipq6018: drop '0x' from unit address
arm64: dts: qcom: sdm660: use reg value for memory node
arm64: dts: qcom: ipq8074: fix pci node reg property
ARM: dts: imx53-ppd: Fix ACHC entry
serial: 8250_omap: Handle optional overrun-throttle-ms property
arm64: dts: qcom: sdm630: Fix TLMM node and pinctrl configuration
arm64: dts: qcom: sdm630: Rewrite memory map
gfs2: Fix glock recursion in freeze_go_xmote_bh
media: tegra-cec: Handle errors of clk_prepare_enable()
media: TDA1997x: fix tda1997x_query_dv_timings() return value
media: v4l2-dv-timings.c: fix wrong condition in two for-loops
media: imx258: Limit the max analogue gain to 480
media: imx258: Rectify mismatch of VTS value
ASoC: Intel: update sof_pcm512x quirks
ASoC: Intel: bytcr_rt5640: Move "Platform Clock" routes to the maps for the matching in-/output
arm64: tegra: Fix Tegra194 PCIe EP compatible string
ARM: dts: at91: use the right property for shutdown controller
bonding: 3ad: fix the concurrency between __bond_release_one() and bond_3ad_state_machine_handler()
ARM: dts: stm32: Update AV96 adv7513 node per dtbs_check
ARM: dts: stm32: Set {bitclock,frame}-master phandles on ST DKx
ARM: dts: stm32: Set {bitclock,frame}-master phandles on DHCOM SoM
workqueue: Fix possible memory leaks in wq_numa_init()
Bluetooth: skip invalid hci_sync_conn_complete_evt
ata: sata_dwc_460ex: No need to call phy_exit() befre phy_init()
libbpf: Fix race when pinning maps in parallel
samples: bpf: Fix tracex7 error raised on the missing argument
staging: ks7010: Fix the initialization of the 'sleep_status' structure
serial: 8250_pci: make setup_port() parameters explicitly unsigned
hvsi: don't panic on tty_register_driver failure
xtensa: ISS: don't panic in rs_init
serial: 8250: Define RX trigger levels for OxSemi 950 devices
s390: make PCI mio support a machine flag
s390/jump_label: print real address in a case of a jump label bug
flow_dissector: Fix out-of-bounds warnings
ipv4: ip_output.c: Fix out-of-bounds warning in ip_copy_addrs()
video: fbdev: riva: Error out if 'pixclock' equals zero
video: fbdev: kyro: Error out if 'pixclock' equals zero
video: fbdev: asiliantfb: Error out if 'pixclock' equals zero
arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names
drm/bridge: nwl-dsi: Avoid potential multiplication overflow on 32-bit
bpf/tests: Do not PASS tests without actually testing the result
bpf/tests: Fix copy-and-paste error in double word test
drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex
drm/amdgpu: Fix a printing message
ethtool: improve compat ioctl handling
nfp: fix return statement in nfp_net_parse_meta()
media: atomisp: pci: fix error return code in atomisp_pci_probe()
media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe
media: platform: stm32: unprepare clocks at handling errors in probe
media: hantro: vp8: Move noisy WARN_ON to vpu_debug
drm/amd/display: Fix timer_per_pixel unit error
selftests: firmware: Fix ignored return val of asprintf() warn
bus: fsl-mc: fix mmio base address for child DPRCs
tty: serial: jsm: hold port lock when reporting modem line changes
staging: board: Fix uninitialized spinlock when attaching genpd
usb: gadget: composite: Allow bMaxPower=0 if self-powered
USB: EHCI: ehci-mv: improve error handling in mv_ehci_enable()
usb: gadget: u_ether: fix a potential null pointer dereference
usb: host: fotg210: fix the actual_length of an iso packet
usb: host: fotg210: fix the endpoint's transactional opportunities calculation
igc: Check if num of q_vectors is smaller than max before array access
rcu: Fix macro name CONFIG_TASKS_RCU_TRACE
drm: protect drm_master pointers in drm_lease.c
drm: serialize drm_file.master with a new spinlock
drm: avoid blocking in drm_clients_info's rcu section
Smack: Fix wrong semantics in smk_access_entry()
netlink: Deal with ESRCH error in nlmsg_notify()
video: fbdev: kyro: fix a DoS bug by restricting user input
ARM: dts: qcom: apq8064: correct clock names
iavf: fix locking of critical sections
iavf: do not override the adapter state in the watchdog task
iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
net: phy: Fix data type in DP83822 dp8382x_disable_wol()
tipc: keep the skb in rcv queue until the whole data is read
PCI: Use pci_update_current_state() in pci_enable_device_flags()
crypto: mxs-dcp - Use sg_mapping_iter to copy data
x86/hyperv: fix for unwanted manipulation of sched_clock when TSC marked unstable
libbpf: Fix reuse of pinned map on older kernel
media: dib8000: rewrite the init prbs logic
ASoC: atmel: ATMEL drivers don't need HAS_DMA
drm/amdgpu: Fix amdgpu_ras_eeprom_init()
drm/vc4: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET
userfaultfd: prevent concurrent API initialization
kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y
MIPS: Malta: fix alignment of the devicetree buffer
f2fs: should put a page beyond EOF when preparing a write
f2fs: deallocate compressed pages when error happens
f2fs: fix to unmap pages from userspace process in punch_hole()
f2fs: fix unexpected ENOENT comes from f2fs_map_blocks()
f2fs: fix to account missing .skipped_gc_rwsem
soc: mediatek: cmdq: add address shift in jump
KVM: PPC: Fix clearing never mapped TCEs in realmode
clk: at91: clk-generated: Limit the requested rate to our range
fscache: Fix cookie key hashing
RDMA/hns: Fix QP's resp incomplete assignment
powerpc/smp: Update cpu_core_map on all PowerPc systems
platform/x86: dell-smbios-wmi: Add missing kfree in error-exit from run_smbios_call
KVM: PPC: Book3S HV Nested: Reflect guest PMU in-use to L0 when guest SPRs are live
scsi: ufs: ufs-exynos: Fix static checker warning
KVM: PPC: Book3S HV: Fix copy_tofrom_guest routines
clk: imx8m: fix clock tree update of TF-A managed clocks
HID: i2c-hid: Fix Elan touchpad regression
iommu/vt-d: Update the virtual command related registers
powerpc/config: Renable MTD_PHYSMAP_OF
scsi: qedf: Fix error codes in qedf_alloc_global_queues()
scsi: qedi: Fix error codes in qedi_alloc_global_queues()
scsi: smartpqi: Fix an error code in pqi_get_raid_map()
powerpc/numa: Consider the max NUMA node for migratable LPAR
pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_entry()
scsi: fdomain: Fix error return code in fdomain_probe()
sunrpc: Fix return value of get_srcport()
SUNRPC query transport's source port
SUNRPC/xprtrdma: Fix reconnection locking
SUNRPC: Fix potential memory corruption
NFSv4/pnfs: The layout barrier indicate a minimal value for the seqid
NFSv4/pNFS: Always allow update of a zero valued layout barrier
NFSv4/pNFS: Fix a layoutget livelock loop
dma-debug: fix debugfs initialization order
openrisc: don't printk() unconditionally
f2fs: reduce the scope of setting fsck tag when de->name_len is zero
cpuidle: pseries: Mark pseries_idle_proble() as __init
RDMA/mlx5: Delete not-available udata check
RDMA/efa: Remove double QP type assignment
powerpc/stacktrace: Include linux/delay.h
cpuidle: pseries: Fixup CEDE0 latency only for POWER10 onwards
scsi: ufs: Fix memory corruption by ufshcd_read_desc_param()
vfio: Use config not menuconfig for VFIO_NOIOMMU
pinctrl: samsung: Fix pinctrl bank pin count
scsi: BusLogic: Use %X for u32 sized integer rather than %lX
docs: Fix infiniband uverbs minor number
RDMA/iwcm: Release resources if iw_cm module initialization fails
IB/hfi1: Adjust pkey entry in index 0
clk: rockchip: drop GRF dependency for rk3328/rk3036 pll types
scsi: bsg: Remove support for SCSI_IOCTL_SEND_COMMAND
pinctrl: armada-37xx: Correct PWM pins definitions
pinctrl: remove empty lines in pinctrl subsystem
f2fs: quota: fix potential deadlock
HID: input: do not report stylus battery state as "full"
PCI: aardvark: Fix masking and unmasking legacy INTx interrupts
PCI: aardvark: Fix checking for PIO status
PCI: Export pci_pio_to_address() for module use
PCI: aardvark: Configure PCIe resources from 'ranges' DT property
PCI: xilinx-nwl: Enable the clock through CCF
PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure
PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported
PCI/portdrv: Enable Bandwidth Notification only if port supports it
f2fs: fix to do sanity check for sb/cp fields correctly
ARM: 9105/1: atags_to_fdt: don't warn about stack size
libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs
dmaengine: imx-sdma: remove duplicated sdma_load_context
Revert "dmaengine: imx-sdma: refine to load context only once"
s390/qdio: cancel the ESTABLISH ccw after timeout
s390/qdio: fix roll-back after timeout on ESTABLISH ccw
media: rc-loopback: return number of emitters rather than error
media: uvc: don't do DMA on stack
VMCI: fix NULL pointer dereference when unmapping queue pair
crypto: ccp - shutdown SEV firmware on kexec
dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc()
power: supply: max17042: handle fails of reading status register
block: bfq: fix bfq_set_next_ioprio_data()
crypto: public_key: fix overflow during implicit conversion
wcn36xx: Ensure finish scan is not requested before start scan
iio: ltc2983: fix device probe
arm64: head: avoid over-mapping in map_memory
arm64: mm: Fix TLBI vs ASID rollover
soc: aspeed: p2a-ctrl: Fix boundary check for mmap
soc: aspeed: lpc-ctrl: Fix boundary check for mmap
soc: qcom: aoss: Fix the out of bound usage of cooling_devs
pinctrl: ingenic: Fix incorrect pull up/down info
pinctrl: stmfx: Fix hazardous u8[] to unsigned long cast
clk: socfpga: agilex: add the bypass register for s2f_usr0 clock
clk: socfpga: agilex: fix up s2f_user0_clk representation
clk: socfpga: agilex: fix the parents of the psi_ref_clk
tools/thermal/tmon: Add cross compiling support
selftests/ftrace: Fix requirement check of README file
ceph: fix dereference of null pointer cf
9p/xen: Fix end of loop tests for list_for_each_entry
xen: fix setting of max_pfn in shared_info
powerpc/perf/hv-gpci: Fix counter value parsing
PCI/MSI: Skip masking MSI-X on Xen PV
blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN
blk-zoned: allow zone management send operations without CAP_SYS_ADMIN
btrfs: reset replace target device to allocation state on close
btrfs: wake up async_delalloc_pages waiters after submit
io-wq: fix wakeup race when adding new work
io_uring: fail links of cancelled timeouts
io_uring: add ->splice_fd_in checks
io_uring: place fixed tables under memcg limits
io_uring: limit fixed table size by RLIMIT_NOFILE
rtc: tps65910: Correct driver module alias
Conflicts:
Documentation/devicetree/bindings
Documentation/devicetree/bindings/arm/tegra.yaml
Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml
Documentation/devicetree/bindings/mtd/gpmc-nand.txt
Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt
Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
drivers/hwmon/pmbus/ibm-cffps.c
drivers/scsi/ufs/ufshcd-pltfrm.c
Change-Id: I94d112906379c4c336a78341d21cd20b1eb7d420
Signed-off-by: Sivasri Kumar, Vanka <quic_svanka@quicinc.com>
1785 lines
47 KiB
C
1785 lines
47 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* linux/arch/arm/mm/mmu.c
|
|
*
|
|
* Copyright (C) 1995-2005 Russell King
|
|
*/
|
|
#include <linux/module.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/errno.h>
|
|
#include <linux/init.h>
|
|
#include <linux/mman.h>
|
|
#include <linux/nodemask.h>
|
|
#include <linux/memblock.h>
|
|
#include <linux/fs.h>
|
|
#include <linux/vmalloc.h>
|
|
#include <linux/sizes.h>
|
|
|
|
#include <asm/cp15.h>
|
|
#include <asm/cputype.h>
|
|
#include <asm/cachetype.h>
|
|
#include <asm/fixmap.h>
|
|
#include <asm/sections.h>
|
|
#include <asm/setup.h>
|
|
#include <asm/smp_plat.h>
|
|
#include <asm/tlb.h>
|
|
#include <asm/highmem.h>
|
|
#include <asm/system_info.h>
|
|
#include <asm/traps.h>
|
|
#include <asm/procinfo.h>
|
|
#include <asm/memory.h>
|
|
#include <asm/pgalloc.h>
|
|
|
|
#include <asm/mach/arch.h>
|
|
#include <asm/mach/map.h>
|
|
#include <asm/mach/pci.h>
|
|
#include <asm/fixmap.h>
|
|
|
|
#include "fault.h"
|
|
#include "mm.h"
|
|
#include "tcm.h"
|
|
|
|
extern unsigned long __atags_pointer;
|
|
|
|
/*
|
|
* empty_zero_page is a special page that is used for
|
|
* zero-initialized data and COW.
|
|
*/
|
|
struct page *empty_zero_page;
|
|
EXPORT_SYMBOL(empty_zero_page);
|
|
|
|
/*
|
|
* The pmd table for the upper-most set of pages.
|
|
*/
|
|
pmd_t *top_pmd;
|
|
|
|
pmdval_t user_pmd_table = _PAGE_USER_TABLE;
|
|
|
|
#define CPOLICY_UNCACHED 0
|
|
#define CPOLICY_BUFFERED 1
|
|
#define CPOLICY_WRITETHROUGH 2
|
|
#define CPOLICY_WRITEBACK 3
|
|
#define CPOLICY_WRITEALLOC 4
|
|
|
|
static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK;
|
|
static unsigned int ecc_mask __initdata = 0;
|
|
pgprot_t pgprot_user;
|
|
pgprot_t pgprot_kernel;
|
|
|
|
EXPORT_SYMBOL(pgprot_user);
|
|
EXPORT_SYMBOL(pgprot_kernel);
|
|
|
|
struct cachepolicy {
|
|
const char policy[16];
|
|
unsigned int cr_mask;
|
|
pmdval_t pmd;
|
|
pteval_t pte;
|
|
};
|
|
|
|
static struct cachepolicy cache_policies[] __initdata = {
|
|
{
|
|
.policy = "uncached",
|
|
.cr_mask = CR_W|CR_C,
|
|
.pmd = PMD_SECT_UNCACHED,
|
|
.pte = L_PTE_MT_UNCACHED,
|
|
}, {
|
|
.policy = "buffered",
|
|
.cr_mask = CR_C,
|
|
.pmd = PMD_SECT_BUFFERED,
|
|
.pte = L_PTE_MT_BUFFERABLE,
|
|
}, {
|
|
.policy = "writethrough",
|
|
.cr_mask = 0,
|
|
.pmd = PMD_SECT_WT,
|
|
.pte = L_PTE_MT_WRITETHROUGH,
|
|
}, {
|
|
.policy = "writeback",
|
|
.cr_mask = 0,
|
|
.pmd = PMD_SECT_WB,
|
|
.pte = L_PTE_MT_WRITEBACK,
|
|
}, {
|
|
.policy = "writealloc",
|
|
.cr_mask = 0,
|
|
.pmd = PMD_SECT_WBWA,
|
|
.pte = L_PTE_MT_WRITEALLOC,
|
|
}
|
|
};
|
|
|
|
#ifdef CONFIG_CPU_CP15
|
|
static unsigned long initial_pmd_value __initdata = 0;
|
|
|
|
/*
|
|
* Initialise the cache_policy variable with the initial state specified
|
|
* via the "pmd" value. This is used to ensure that on ARMv6 and later,
|
|
* the C code sets the page tables up with the same policy as the head
|
|
* assembly code, which avoids an illegal state where the TLBs can get
|
|
* confused. See comments in early_cachepolicy() for more information.
|
|
*/
|
|
void __init init_default_cache_policy(unsigned long pmd)
|
|
{
|
|
int i;
|
|
|
|
initial_pmd_value = pmd;
|
|
|
|
pmd &= PMD_SECT_CACHE_MASK;
|
|
|
|
for (i = 0; i < ARRAY_SIZE(cache_policies); i++)
|
|
if (cache_policies[i].pmd == pmd) {
|
|
cachepolicy = i;
|
|
break;
|
|
}
|
|
|
|
if (i == ARRAY_SIZE(cache_policies))
|
|
pr_err("ERROR: could not find cache policy\n");
|
|
}
|
|
|
|
/*
|
|
* These are useful for identifying cache coherency problems by allowing
|
|
* the cache or the cache and writebuffer to be turned off. (Note: the
|
|
* write buffer should not be on and the cache off).
|
|
*/
|
|
static int __init early_cachepolicy(char *p)
|
|
{
|
|
int i, selected = -1;
|
|
|
|
for (i = 0; i < ARRAY_SIZE(cache_policies); i++) {
|
|
int len = strlen(cache_policies[i].policy);
|
|
|
|
if (memcmp(p, cache_policies[i].policy, len) == 0) {
|
|
selected = i;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (selected == -1)
|
|
pr_err("ERROR: unknown or unsupported cache policy\n");
|
|
|
|
/*
|
|
* This restriction is partly to do with the way we boot; it is
|
|
* unpredictable to have memory mapped using two different sets of
|
|
* memory attributes (shared, type, and cache attribs). We can not
|
|
* change these attributes once the initial assembly has setup the
|
|
* page tables.
|
|
*/
|
|
if (cpu_architecture() >= CPU_ARCH_ARMv6 && selected != cachepolicy) {
|
|
pr_warn("Only cachepolicy=%s supported on ARMv6 and later\n",
|
|
cache_policies[cachepolicy].policy);
|
|
return 0;
|
|
}
|
|
|
|
if (selected != cachepolicy) {
|
|
unsigned long cr = __clear_cr(cache_policies[selected].cr_mask);
|
|
cachepolicy = selected;
|
|
flush_cache_all();
|
|
set_cr(cr);
|
|
}
|
|
return 0;
|
|
}
|
|
early_param("cachepolicy", early_cachepolicy);
|
|
|
|
static int __init early_nocache(char *__unused)
|
|
{
|
|
char *p = "buffered";
|
|
pr_warn("nocache is deprecated; use cachepolicy=%s\n", p);
|
|
early_cachepolicy(p);
|
|
return 0;
|
|
}
|
|
early_param("nocache", early_nocache);
|
|
|
|
static int __init early_nowrite(char *__unused)
|
|
{
|
|
char *p = "uncached";
|
|
pr_warn("nowb is deprecated; use cachepolicy=%s\n", p);
|
|
early_cachepolicy(p);
|
|
return 0;
|
|
}
|
|
early_param("nowb", early_nowrite);
|
|
|
|
#ifndef CONFIG_ARM_LPAE
|
|
static int __init early_ecc(char *p)
|
|
{
|
|
if (memcmp(p, "on", 2) == 0)
|
|
ecc_mask = PMD_PROTECTION;
|
|
else if (memcmp(p, "off", 3) == 0)
|
|
ecc_mask = 0;
|
|
return 0;
|
|
}
|
|
early_param("ecc", early_ecc);
|
|
#endif
|
|
|
|
#else /* ifdef CONFIG_CPU_CP15 */
|
|
|
|
static int __init early_cachepolicy(char *p)
|
|
{
|
|
pr_warn("cachepolicy kernel parameter not supported without cp15\n");
|
|
}
|
|
early_param("cachepolicy", early_cachepolicy);
|
|
|
|
static int __init noalign_setup(char *__unused)
|
|
{
|
|
pr_warn("noalign kernel parameter not supported without cp15\n");
|
|
}
|
|
__setup("noalign", noalign_setup);
|
|
|
|
#endif /* ifdef CONFIG_CPU_CP15 / else */
|
|
|
|
#define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN
|
|
#define PROT_PTE_S2_DEVICE PROT_PTE_DEVICE
|
|
#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE
|
|
|
|
static struct mem_type mem_types[] __ro_after_init = {
|
|
[MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */
|
|
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED |
|
|
L_PTE_SHARED,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PROT_SECT_DEVICE | PMD_SECT_S,
|
|
.domain = DOMAIN_IO,
|
|
},
|
|
[MT_DEVICE_NONSHARED] = { /* ARMv6 non-shared device */
|
|
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_NONSHARED,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PROT_SECT_DEVICE,
|
|
.domain = DOMAIN_IO,
|
|
},
|
|
[MT_DEVICE_CACHED] = { /* ioremap_cache */
|
|
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_CACHED,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PROT_SECT_DEVICE | PMD_SECT_WB,
|
|
.domain = DOMAIN_IO,
|
|
},
|
|
[MT_DEVICE_WC] = { /* ioremap_wc */
|
|
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PROT_SECT_DEVICE,
|
|
.domain = DOMAIN_IO,
|
|
},
|
|
[MT_UNCACHED] = {
|
|
.prot_pte = PROT_PTE_DEVICE,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_XN,
|
|
.domain = DOMAIN_IO,
|
|
},
|
|
[MT_CACHECLEAN] = {
|
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_XN,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
#ifndef CONFIG_ARM_LPAE
|
|
[MT_MINICLEAN] = {
|
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_MINICACHE,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
#endif
|
|
[MT_LOW_VECTORS] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
|
L_PTE_RDONLY,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.domain = DOMAIN_VECTORS,
|
|
},
|
|
[MT_HIGH_VECTORS] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
|
L_PTE_USER | L_PTE_RDONLY,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.domain = DOMAIN_VECTORS,
|
|
},
|
|
[MT_MEMORY_RWX] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
[MT_MEMORY_RW] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
|
L_PTE_XN,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
[MT_ROM] = {
|
|
.prot_sect = PMD_TYPE_SECT,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
[MT_MEMORY_RWX_NONCACHED] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
|
L_PTE_MT_BUFFERABLE,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
[MT_MEMORY_RW_DTCM] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
|
L_PTE_XN,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_XN,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
[MT_MEMORY_RWX_ITCM] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
[MT_MEMORY_RW_SO] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
|
L_PTE_MT_UNCACHED | L_PTE_XN,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_S |
|
|
PMD_SECT_UNCACHED | PMD_SECT_XN,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
[MT_MEMORY_DMA_READY] = {
|
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
|
L_PTE_XN,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.domain = DOMAIN_KERNEL,
|
|
},
|
|
};
|
|
|
|
const struct mem_type *get_mem_type(unsigned int type)
|
|
{
|
|
return type < ARRAY_SIZE(mem_types) ? &mem_types[type] : NULL;
|
|
}
|
|
EXPORT_SYMBOL(get_mem_type);
|
|
|
|
static pte_t *(*pte_offset_fixmap)(pmd_t *dir, unsigned long addr);
|
|
|
|
static pte_t bm_pte[PTRS_PER_PTE + PTE_HWTABLE_PTRS]
|
|
__aligned(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE) __initdata;
|
|
|
|
static pte_t * __init pte_offset_early_fixmap(pmd_t *dir, unsigned long addr)
|
|
{
|
|
return &bm_pte[pte_index(addr)];
|
|
}
|
|
|
|
static pte_t *pte_offset_late_fixmap(pmd_t *dir, unsigned long addr)
|
|
{
|
|
return pte_offset_kernel(dir, addr);
|
|
}
|
|
|
|
static inline pmd_t * __init fixmap_pmd(unsigned long addr)
|
|
{
|
|
return pmd_off_k(addr);
|
|
}
|
|
|
|
void __init early_fixmap_init(void)
|
|
{
|
|
pmd_t *pmd;
|
|
|
|
/*
|
|
* The early fixmap range spans multiple pmds, for which
|
|
* we are not prepared:
|
|
*/
|
|
BUILD_BUG_ON((__fix_to_virt(__end_of_early_ioremap_region) >> PMD_SHIFT)
|
|
!= FIXADDR_TOP >> PMD_SHIFT);
|
|
|
|
pmd = fixmap_pmd(FIXADDR_TOP);
|
|
pmd_populate_kernel(&init_mm, pmd, bm_pte);
|
|
|
|
pte_offset_fixmap = pte_offset_early_fixmap;
|
|
}
|
|
|
|
/*
|
|
* To avoid TLB flush broadcasts, this uses local_flush_tlb_kernel_range().
|
|
* As a result, this can only be called with preemption disabled, as under
|
|
* stop_machine().
|
|
*/
|
|
void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot)
|
|
{
|
|
unsigned long vaddr = __fix_to_virt(idx);
|
|
pte_t *pte = pte_offset_fixmap(pmd_off_k(vaddr), vaddr);
|
|
|
|
/* Make sure fixmap region does not exceed available allocation. */
|
|
BUILD_BUG_ON(FIXADDR_START + (__end_of_fixed_addresses * PAGE_SIZE) >
|
|
FIXADDR_END);
|
|
BUG_ON(idx >= __end_of_fixed_addresses);
|
|
|
|
/* We support only device mappings before pgprot_kernel is set. */
|
|
if (WARN_ON(pgprot_val(prot) != pgprot_val(FIXMAP_PAGE_IO) &&
|
|
pgprot_val(prot) && pgprot_val(pgprot_kernel) == 0))
|
|
return;
|
|
|
|
if (pgprot_val(prot))
|
|
set_pte_at(NULL, vaddr, pte,
|
|
pfn_pte(phys >> PAGE_SHIFT, prot));
|
|
else
|
|
pte_clear(NULL, vaddr, pte);
|
|
local_flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE);
|
|
}
|
|
|
|
/*
|
|
* Adjust the PMD section entries according to the CPU in use.
|
|
*/
|
|
static void __init build_mem_type_table(void)
|
|
{
|
|
struct cachepolicy *cp;
|
|
unsigned int cr = get_cr();
|
|
pteval_t user_pgprot, kern_pgprot, vecs_pgprot;
|
|
int cpu_arch = cpu_architecture();
|
|
int i;
|
|
|
|
if (cpu_arch < CPU_ARCH_ARMv6) {
|
|
#if defined(CONFIG_CPU_DCACHE_DISABLE)
|
|
if (cachepolicy > CPOLICY_BUFFERED)
|
|
cachepolicy = CPOLICY_BUFFERED;
|
|
#elif defined(CONFIG_CPU_DCACHE_WRITETHROUGH)
|
|
if (cachepolicy > CPOLICY_WRITETHROUGH)
|
|
cachepolicy = CPOLICY_WRITETHROUGH;
|
|
#endif
|
|
}
|
|
if (cpu_arch < CPU_ARCH_ARMv5) {
|
|
if (cachepolicy >= CPOLICY_WRITEALLOC)
|
|
cachepolicy = CPOLICY_WRITEBACK;
|
|
ecc_mask = 0;
|
|
}
|
|
|
|
if (is_smp()) {
|
|
if (cachepolicy != CPOLICY_WRITEALLOC) {
|
|
pr_warn("Forcing write-allocate cache policy for SMP\n");
|
|
cachepolicy = CPOLICY_WRITEALLOC;
|
|
}
|
|
if (!(initial_pmd_value & PMD_SECT_S)) {
|
|
pr_warn("Forcing shared mappings for SMP\n");
|
|
initial_pmd_value |= PMD_SECT_S;
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Strip out features not present on earlier architectures.
|
|
* Pre-ARMv5 CPUs don't have TEX bits. Pre-ARMv6 CPUs or those
|
|
* without extended page tables don't have the 'Shared' bit.
|
|
*/
|
|
if (cpu_arch < CPU_ARCH_ARMv5)
|
|
for (i = 0; i < ARRAY_SIZE(mem_types); i++)
|
|
mem_types[i].prot_sect &= ~PMD_SECT_TEX(7);
|
|
if ((cpu_arch < CPU_ARCH_ARMv6 || !(cr & CR_XP)) && !cpu_is_xsc3())
|
|
for (i = 0; i < ARRAY_SIZE(mem_types); i++)
|
|
mem_types[i].prot_sect &= ~PMD_SECT_S;
|
|
|
|
/*
|
|
* ARMv5 and lower, bit 4 must be set for page tables (was: cache
|
|
* "update-able on write" bit on ARM610). However, Xscale and
|
|
* Xscale3 require this bit to be cleared.
|
|
*/
|
|
if (cpu_is_xscale_family()) {
|
|
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
|
|
mem_types[i].prot_sect &= ~PMD_BIT4;
|
|
mem_types[i].prot_l1 &= ~PMD_BIT4;
|
|
}
|
|
} else if (cpu_arch < CPU_ARCH_ARMv6) {
|
|
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
|
|
if (mem_types[i].prot_l1)
|
|
mem_types[i].prot_l1 |= PMD_BIT4;
|
|
if (mem_types[i].prot_sect)
|
|
mem_types[i].prot_sect |= PMD_BIT4;
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Mark the device areas according to the CPU/architecture.
|
|
*/
|
|
if (cpu_is_xsc3() || (cpu_arch >= CPU_ARCH_ARMv6 && (cr & CR_XP))) {
|
|
if (!cpu_is_xsc3()) {
|
|
/*
|
|
* Mark device regions on ARMv6+ as execute-never
|
|
* to prevent speculative instruction fetches.
|
|
*/
|
|
mem_types[MT_DEVICE].prot_sect |= PMD_SECT_XN;
|
|
mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_XN;
|
|
mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_XN;
|
|
mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_XN;
|
|
|
|
/* Also setup NX memory mapping */
|
|
mem_types[MT_MEMORY_RW].prot_sect |= PMD_SECT_XN;
|
|
}
|
|
if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) {
|
|
/*
|
|
* For ARMv7 with TEX remapping,
|
|
* - shared device is SXCB=1100
|
|
* - nonshared device is SXCB=0100
|
|
* - write combine device mem is SXCB=0001
|
|
* (Uncached Normal memory)
|
|
*/
|
|
mem_types[MT_DEVICE].prot_sect |= PMD_SECT_TEX(1);
|
|
mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_TEX(1);
|
|
mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_BUFFERABLE;
|
|
} else if (cpu_is_xsc3()) {
|
|
/*
|
|
* For Xscale3,
|
|
* - shared device is TEXCB=00101
|
|
* - nonshared device is TEXCB=01000
|
|
* - write combine device mem is TEXCB=00100
|
|
* (Inner/Outer Uncacheable in xsc3 parlance)
|
|
*/
|
|
mem_types[MT_DEVICE].prot_sect |= PMD_SECT_TEX(1) | PMD_SECT_BUFFERED;
|
|
mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_TEX(2);
|
|
mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_TEX(1);
|
|
} else {
|
|
/*
|
|
* For ARMv6 and ARMv7 without TEX remapping,
|
|
* - shared device is TEXCB=00001
|
|
* - nonshared device is TEXCB=01000
|
|
* - write combine device mem is TEXCB=00100
|
|
* (Uncached Normal in ARMv6 parlance).
|
|
*/
|
|
mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED;
|
|
mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_TEX(2);
|
|
mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_TEX(1);
|
|
}
|
|
} else {
|
|
/*
|
|
* On others, write combining is "Uncached/Buffered"
|
|
*/
|
|
mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_BUFFERABLE;
|
|
}
|
|
|
|
/*
|
|
* Now deal with the memory-type mappings
|
|
*/
|
|
cp = &cache_policies[cachepolicy];
|
|
vecs_pgprot = kern_pgprot = user_pgprot = cp->pte;
|
|
|
|
#ifndef CONFIG_ARM_LPAE
|
|
/*
|
|
* We don't use domains on ARMv6 (since this causes problems with
|
|
* v6/v7 kernels), so we must use a separate memory type for user
|
|
* r/o, kernel r/w to map the vectors page.
|
|
*/
|
|
if (cpu_arch == CPU_ARCH_ARMv6)
|
|
vecs_pgprot |= L_PTE_MT_VECTORS;
|
|
|
|
/*
|
|
* Check is it with support for the PXN bit
|
|
* in the Short-descriptor translation table format descriptors.
|
|
*/
|
|
if (cpu_arch == CPU_ARCH_ARMv7 &&
|
|
(read_cpuid_ext(CPUID_EXT_MMFR0) & 0xF) >= 4) {
|
|
user_pmd_table |= PMD_PXNTABLE;
|
|
}
|
|
#endif
|
|
|
|
/*
|
|
* ARMv6 and above have extended page tables.
|
|
*/
|
|
if (cpu_arch >= CPU_ARCH_ARMv6 && (cr & CR_XP)) {
|
|
#ifndef CONFIG_ARM_LPAE
|
|
/*
|
|
* Mark cache clean areas and XIP ROM read only
|
|
* from SVC mode and no access from userspace.
|
|
*/
|
|
mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
|
|
mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
|
|
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
|
|
#endif
|
|
|
|
/*
|
|
* If the initial page tables were created with the S bit
|
|
* set, then we need to do the same here for the same
|
|
* reasons given in early_cachepolicy().
|
|
*/
|
|
if (initial_pmd_value & PMD_SECT_S) {
|
|
user_pgprot |= L_PTE_SHARED;
|
|
kern_pgprot |= L_PTE_SHARED;
|
|
vecs_pgprot |= L_PTE_SHARED;
|
|
mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_S;
|
|
mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED;
|
|
mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S;
|
|
mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED;
|
|
mem_types[MT_MEMORY_RWX].prot_sect |= PMD_SECT_S;
|
|
mem_types[MT_MEMORY_RWX].prot_pte |= L_PTE_SHARED;
|
|
mem_types[MT_MEMORY_RW].prot_sect |= PMD_SECT_S;
|
|
mem_types[MT_MEMORY_RW].prot_pte |= L_PTE_SHARED;
|
|
mem_types[MT_MEMORY_DMA_READY].prot_pte |= L_PTE_SHARED;
|
|
mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= PMD_SECT_S;
|
|
mem_types[MT_MEMORY_RWX_NONCACHED].prot_pte |= L_PTE_SHARED;
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Non-cacheable Normal - intended for memory areas that must
|
|
* not cause dirty cache line writebacks when used
|
|
*/
|
|
if (cpu_arch >= CPU_ARCH_ARMv6) {
|
|
if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) {
|
|
/* Non-cacheable Normal is XCB = 001 */
|
|
mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |=
|
|
PMD_SECT_BUFFERED;
|
|
} else {
|
|
/* For both ARMv6 and non-TEX-remapping ARMv7 */
|
|
mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |=
|
|
PMD_SECT_TEX(1);
|
|
}
|
|
} else {
|
|
mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= PMD_SECT_BUFFERABLE;
|
|
}
|
|
|
|
#ifdef CONFIG_ARM_LPAE
|
|
/*
|
|
* Do not generate access flag faults for the kernel mappings.
|
|
*/
|
|
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
|
|
mem_types[i].prot_pte |= PTE_EXT_AF;
|
|
if (mem_types[i].prot_sect)
|
|
mem_types[i].prot_sect |= PMD_SECT_AF;
|
|
}
|
|
kern_pgprot |= PTE_EXT_AF;
|
|
vecs_pgprot |= PTE_EXT_AF;
|
|
|
|
/*
|
|
* Set PXN for user mappings
|
|
*/
|
|
user_pgprot |= PTE_EXT_PXN;
|
|
#endif
|
|
|
|
for (i = 0; i < 16; i++) {
|
|
pteval_t v = pgprot_val(protection_map[i]);
|
|
protection_map[i] = __pgprot(v | user_pgprot);
|
|
}
|
|
|
|
mem_types[MT_LOW_VECTORS].prot_pte |= vecs_pgprot;
|
|
mem_types[MT_HIGH_VECTORS].prot_pte |= vecs_pgprot;
|
|
|
|
pgprot_user = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | user_pgprot);
|
|
pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG |
|
|
L_PTE_DIRTY | kern_pgprot);
|
|
|
|
mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask;
|
|
mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask;
|
|
mem_types[MT_MEMORY_RWX].prot_sect |= ecc_mask | cp->pmd;
|
|
mem_types[MT_MEMORY_RWX].prot_pte |= kern_pgprot;
|
|
mem_types[MT_MEMORY_RW].prot_sect |= ecc_mask | cp->pmd;
|
|
mem_types[MT_MEMORY_RW].prot_pte |= kern_pgprot;
|
|
mem_types[MT_MEMORY_DMA_READY].prot_pte |= kern_pgprot;
|
|
mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= ecc_mask;
|
|
mem_types[MT_ROM].prot_sect |= cp->pmd;
|
|
|
|
switch (cp->pmd) {
|
|
case PMD_SECT_WT:
|
|
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WT;
|
|
break;
|
|
case PMD_SECT_WB:
|
|
case PMD_SECT_WBWA:
|
|
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB;
|
|
break;
|
|
}
|
|
pr_info("Memory policy: %sData cache %s\n",
|
|
ecc_mask ? "ECC enabled, " : "", cp->policy);
|
|
|
|
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
|
|
struct mem_type *t = &mem_types[i];
|
|
if (t->prot_l1)
|
|
t->prot_l1 |= PMD_DOMAIN(t->domain);
|
|
if (t->prot_sect)
|
|
t->prot_sect |= PMD_DOMAIN(t->domain);
|
|
}
|
|
}
|
|
|
|
#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
|
|
pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
|
unsigned long size, pgprot_t vma_prot)
|
|
{
|
|
if (!pfn_valid(pfn))
|
|
return pgprot_noncached(vma_prot);
|
|
else if (file->f_flags & O_SYNC)
|
|
return pgprot_writecombine(vma_prot);
|
|
return vma_prot;
|
|
}
|
|
EXPORT_SYMBOL(phys_mem_access_prot);
|
|
#endif
|
|
|
|
#define vectors_base() (vectors_high() ? 0xffff0000 : 0)
|
|
|
|
static void __init *early_alloc(unsigned long sz)
|
|
{
|
|
void *ptr = memblock_alloc(sz, sz);
|
|
|
|
if (!ptr)
|
|
panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
|
|
__func__, sz, sz);
|
|
|
|
return ptr;
|
|
}
|
|
|
|
static void *__init late_alloc(unsigned long sz)
|
|
{
|
|
void *ptr = (void *)__get_free_pages(GFP_PGTABLE_KERNEL, get_order(sz));
|
|
|
|
if (!ptr || !pgtable_pte_page_ctor(virt_to_page(ptr)))
|
|
BUG();
|
|
return ptr;
|
|
}
|
|
|
|
static pte_t * __init arm_pte_alloc(pmd_t *pmd, unsigned long addr,
|
|
unsigned long prot,
|
|
void *(*alloc)(unsigned long sz))
|
|
{
|
|
if (pmd_none(*pmd)) {
|
|
pte_t *pte = alloc(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE);
|
|
__pmd_populate(pmd, __pa(pte), prot);
|
|
}
|
|
BUG_ON(pmd_bad(*pmd));
|
|
return pte_offset_kernel(pmd, addr);
|
|
}
|
|
|
|
static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr,
|
|
unsigned long prot)
|
|
{
|
|
return arm_pte_alloc(pmd, addr, prot, early_alloc);
|
|
}
|
|
|
|
static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr,
|
|
unsigned long end, unsigned long pfn,
|
|
const struct mem_type *type,
|
|
void *(*alloc)(unsigned long sz),
|
|
bool ng)
|
|
{
|
|
pte_t *pte = arm_pte_alloc(pmd, addr, type->prot_l1, alloc);
|
|
do {
|
|
set_pte_ext(pte, pfn_pte(pfn, __pgprot(type->prot_pte)),
|
|
ng ? PTE_EXT_NG : 0);
|
|
pfn++;
|
|
} while (pte++, addr += PAGE_SIZE, addr != end);
|
|
}
|
|
|
|
static void __init __map_init_section(pmd_t *pmd, unsigned long addr,
|
|
unsigned long end, phys_addr_t phys,
|
|
const struct mem_type *type, bool ng)
|
|
{
|
|
pmd_t *p = pmd;
|
|
|
|
#ifndef CONFIG_ARM_LPAE
|
|
/*
|
|
* In classic MMU format, puds and pmds are folded in to
|
|
* the pgds. pmd_offset gives the PGD entry. PGDs refer to a
|
|
* group of L1 entries making up one logical pointer to
|
|
* an L2 table (2MB), where as PMDs refer to the individual
|
|
* L1 entries (1MB). Hence increment to get the correct
|
|
* offset for odd 1MB sections.
|
|
* (See arch/arm/include/asm/pgtable-2level.h)
|
|
*/
|
|
if (addr & SECTION_SIZE)
|
|
pmd++;
|
|
#endif
|
|
do {
|
|
*pmd = __pmd(phys | type->prot_sect | (ng ? PMD_SECT_nG : 0));
|
|
phys += SECTION_SIZE;
|
|
} while (pmd++, addr += SECTION_SIZE, addr != end);
|
|
|
|
flush_pmd_entry(p);
|
|
}
|
|
|
|
static void __init alloc_init_pmd(pud_t *pud, unsigned long addr,
|
|
unsigned long end, phys_addr_t phys,
|
|
const struct mem_type *type,
|
|
void *(*alloc)(unsigned long sz), bool ng)
|
|
{
|
|
pmd_t *pmd = pmd_offset(pud, addr);
|
|
unsigned long next;
|
|
|
|
do {
|
|
/*
|
|
* With LPAE, we must loop over to map
|
|
* all the pmds for the given range.
|
|
*/
|
|
next = pmd_addr_end(addr, end);
|
|
|
|
/*
|
|
* Try a section mapping - addr, next and phys must all be
|
|
* aligned to a section boundary.
|
|
*/
|
|
if (type->prot_sect &&
|
|
((addr | next | phys) & ~SECTION_MASK) == 0) {
|
|
__map_init_section(pmd, addr, next, phys, type, ng);
|
|
} else {
|
|
alloc_init_pte(pmd, addr, next,
|
|
__phys_to_pfn(phys), type, alloc, ng);
|
|
}
|
|
|
|
phys += next - addr;
|
|
|
|
} while (pmd++, addr = next, addr != end);
|
|
}
|
|
|
|
static void __init alloc_init_pud(p4d_t *p4d, unsigned long addr,
|
|
unsigned long end, phys_addr_t phys,
|
|
const struct mem_type *type,
|
|
void *(*alloc)(unsigned long sz), bool ng)
|
|
{
|
|
pud_t *pud = pud_offset(p4d, addr);
|
|
unsigned long next;
|
|
|
|
do {
|
|
next = pud_addr_end(addr, end);
|
|
alloc_init_pmd(pud, addr, next, phys, type, alloc, ng);
|
|
phys += next - addr;
|
|
} while (pud++, addr = next, addr != end);
|
|
}
|
|
|
|
static void __init alloc_init_p4d(pgd_t *pgd, unsigned long addr,
|
|
unsigned long end, phys_addr_t phys,
|
|
const struct mem_type *type,
|
|
void *(*alloc)(unsigned long sz), bool ng)
|
|
{
|
|
p4d_t *p4d = p4d_offset(pgd, addr);
|
|
unsigned long next;
|
|
|
|
do {
|
|
next = p4d_addr_end(addr, end);
|
|
alloc_init_pud(p4d, addr, next, phys, type, alloc, ng);
|
|
phys += next - addr;
|
|
} while (p4d++, addr = next, addr != end);
|
|
}
|
|
|
|
#ifndef CONFIG_ARM_LPAE
|
|
static void __init create_36bit_mapping(struct mm_struct *mm,
|
|
struct map_desc *md,
|
|
const struct mem_type *type,
|
|
bool ng)
|
|
{
|
|
unsigned long addr, length, end;
|
|
phys_addr_t phys;
|
|
pgd_t *pgd;
|
|
|
|
addr = md->virtual;
|
|
phys = __pfn_to_phys(md->pfn);
|
|
length = PAGE_ALIGN(md->length);
|
|
|
|
if (!(cpu_architecture() >= CPU_ARCH_ARMv6 || cpu_is_xsc3())) {
|
|
pr_err("MM: CPU does not support supersection mapping for 0x%08llx at 0x%08lx\n",
|
|
(long long)__pfn_to_phys((u64)md->pfn), addr);
|
|
return;
|
|
}
|
|
|
|
/* N.B. ARMv6 supersections are only defined to work with domain 0.
|
|
* Since domain assignments can in fact be arbitrary, the
|
|
* 'domain == 0' check below is required to insure that ARMv6
|
|
* supersections are only allocated for domain 0 regardless
|
|
* of the actual domain assignments in use.
|
|
*/
|
|
if (type->domain) {
|
|
pr_err("MM: invalid domain in supersection mapping for 0x%08llx at 0x%08lx\n",
|
|
(long long)__pfn_to_phys((u64)md->pfn), addr);
|
|
return;
|
|
}
|
|
|
|
if ((addr | length | __pfn_to_phys(md->pfn)) & ~SUPERSECTION_MASK) {
|
|
pr_err("MM: cannot create mapping for 0x%08llx at 0x%08lx invalid alignment\n",
|
|
(long long)__pfn_to_phys((u64)md->pfn), addr);
|
|
return;
|
|
}
|
|
|
|
/*
|
|
* Shift bits [35:32] of address into bits [23:20] of PMD
|
|
* (See ARMv6 spec).
|
|
*/
|
|
phys |= (((md->pfn >> (32 - PAGE_SHIFT)) & 0xF) << 20);
|
|
|
|
pgd = pgd_offset(mm, addr);
|
|
end = addr + length;
|
|
do {
|
|
p4d_t *p4d = p4d_offset(pgd, addr);
|
|
pud_t *pud = pud_offset(p4d, addr);
|
|
pmd_t *pmd = pmd_offset(pud, addr);
|
|
int i;
|
|
|
|
for (i = 0; i < 16; i++)
|
|
*pmd++ = __pmd(phys | type->prot_sect | PMD_SECT_SUPER |
|
|
(ng ? PMD_SECT_nG : 0));
|
|
|
|
addr += SUPERSECTION_SIZE;
|
|
phys += SUPERSECTION_SIZE;
|
|
pgd += SUPERSECTION_SIZE >> PGDIR_SHIFT;
|
|
} while (addr != end);
|
|
}
|
|
#endif /* !CONFIG_ARM_LPAE */
|
|
|
|
static void __init __create_mapping(struct mm_struct *mm, struct map_desc *md,
|
|
void *(*alloc)(unsigned long sz),
|
|
bool ng)
|
|
{
|
|
unsigned long addr, length, end;
|
|
phys_addr_t phys;
|
|
const struct mem_type *type;
|
|
pgd_t *pgd;
|
|
|
|
type = &mem_types[md->type];
|
|
|
|
#ifndef CONFIG_ARM_LPAE
|
|
/*
|
|
* Catch 36-bit addresses
|
|
*/
|
|
if (md->pfn >= 0x100000) {
|
|
create_36bit_mapping(mm, md, type, ng);
|
|
return;
|
|
}
|
|
#endif
|
|
|
|
addr = md->virtual & PAGE_MASK;
|
|
phys = __pfn_to_phys(md->pfn);
|
|
length = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK));
|
|
|
|
if (type->prot_l1 == 0 && ((addr | phys | length) & ~SECTION_MASK)) {
|
|
pr_warn("BUG: map for 0x%08llx at 0x%08lx can not be mapped using pages, ignoring.\n",
|
|
(long long)__pfn_to_phys(md->pfn), addr);
|
|
return;
|
|
}
|
|
|
|
pgd = pgd_offset(mm, addr);
|
|
end = addr + length;
|
|
do {
|
|
unsigned long next = pgd_addr_end(addr, end);
|
|
|
|
alloc_init_p4d(pgd, addr, next, phys, type, alloc, ng);
|
|
|
|
phys += next - addr;
|
|
addr = next;
|
|
} while (pgd++, addr != end);
|
|
}
|
|
|
|
/*
|
|
* Create the page directory entries and any necessary
|
|
* page tables for the mapping specified by `md'. We
|
|
* are able to cope here with varying sizes and address
|
|
* offsets, and we take full advantage of sections and
|
|
* supersections.
|
|
*/
|
|
static void __init create_mapping(struct map_desc *md)
|
|
{
|
|
if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) {
|
|
pr_warn("BUG: not creating mapping for 0x%08llx at 0x%08lx in user region\n",
|
|
(long long)__pfn_to_phys((u64)md->pfn), md->virtual);
|
|
return;
|
|
}
|
|
|
|
if (md->type == MT_DEVICE &&
|
|
md->virtual >= PAGE_OFFSET && md->virtual < FIXADDR_START &&
|
|
(md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) {
|
|
pr_warn("BUG: mapping for 0x%08llx at 0x%08lx out of vmalloc space\n",
|
|
(long long)__pfn_to_phys((u64)md->pfn), md->virtual);
|
|
}
|
|
|
|
__create_mapping(&init_mm, md, early_alloc, false);
|
|
}
|
|
|
|
void __init create_mapping_late(struct mm_struct *mm, struct map_desc *md,
|
|
bool ng)
|
|
{
|
|
#ifdef CONFIG_ARM_LPAE
|
|
p4d_t *p4d;
|
|
pud_t *pud;
|
|
|
|
p4d = p4d_alloc(mm, pgd_offset(mm, md->virtual), md->virtual);
|
|
if (WARN_ON(!p4d))
|
|
return;
|
|
pud = pud_alloc(mm, p4d, md->virtual);
|
|
if (WARN_ON(!pud))
|
|
return;
|
|
pmd_alloc(mm, pud, 0);
|
|
#endif
|
|
__create_mapping(mm, md, late_alloc, ng);
|
|
}
|
|
|
|
/*
|
|
* Create the architecture specific mappings
|
|
*/
|
|
void __init iotable_init(struct map_desc *io_desc, int nr)
|
|
{
|
|
struct map_desc *md;
|
|
struct vm_struct *vm;
|
|
struct static_vm *svm;
|
|
|
|
if (!nr)
|
|
return;
|
|
|
|
svm = memblock_alloc(sizeof(*svm) * nr, __alignof__(*svm));
|
|
if (!svm)
|
|
panic("%s: Failed to allocate %zu bytes align=0x%zx\n",
|
|
__func__, sizeof(*svm) * nr, __alignof__(*svm));
|
|
|
|
for (md = io_desc; nr; md++, nr--) {
|
|
create_mapping(md);
|
|
|
|
vm = &svm->vm;
|
|
vm->addr = (void *)(md->virtual & PAGE_MASK);
|
|
vm->size = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK));
|
|
vm->phys_addr = __pfn_to_phys(md->pfn);
|
|
vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING;
|
|
vm->flags |= VM_ARM_MTYPE(md->type);
|
|
vm->caller = iotable_init;
|
|
add_static_vm_early(svm++);
|
|
}
|
|
}
|
|
|
|
void __init vm_reserve_area_early(unsigned long addr, unsigned long size,
|
|
void *caller)
|
|
{
|
|
struct vm_struct *vm;
|
|
struct static_vm *svm;
|
|
|
|
svm = memblock_alloc(sizeof(*svm), __alignof__(*svm));
|
|
if (!svm)
|
|
panic("%s: Failed to allocate %zu bytes align=0x%zx\n",
|
|
__func__, sizeof(*svm), __alignof__(*svm));
|
|
|
|
vm = &svm->vm;
|
|
vm->addr = (void *)addr;
|
|
vm->size = size;
|
|
vm->flags = VM_IOREMAP | VM_ARM_EMPTY_MAPPING;
|
|
vm->caller = caller;
|
|
add_static_vm_early(svm);
|
|
}
|
|
|
|
#ifndef CONFIG_ARM_LPAE
|
|
|
|
/*
|
|
* The Linux PMD is made of two consecutive section entries covering 2MB
|
|
* (see definition in include/asm/pgtable-2level.h). However a call to
|
|
* create_mapping() may optimize static mappings by using individual
|
|
* 1MB section mappings. This leaves the actual PMD potentially half
|
|
* initialized if the top or bottom section entry isn't used, leaving it
|
|
* open to problems if a subsequent ioremap() or vmalloc() tries to use
|
|
* the virtual space left free by that unused section entry.
|
|
*
|
|
* Let's avoid the issue by inserting dummy vm entries covering the unused
|
|
* PMD halves once the static mappings are in place.
|
|
*/
|
|
|
|
static void __init pmd_empty_section_gap(unsigned long addr)
|
|
{
|
|
vm_reserve_area_early(addr, SECTION_SIZE, pmd_empty_section_gap);
|
|
}
|
|
|
|
static void __init fill_pmd_gaps(void)
|
|
{
|
|
struct static_vm *svm;
|
|
struct vm_struct *vm;
|
|
unsigned long addr, next = 0;
|
|
pmd_t *pmd;
|
|
|
|
list_for_each_entry(svm, &static_vmlist, list) {
|
|
vm = &svm->vm;
|
|
addr = (unsigned long)vm->addr;
|
|
if (addr < next)
|
|
continue;
|
|
|
|
/*
|
|
* Check if this vm starts on an odd section boundary.
|
|
* If so and the first section entry for this PMD is free
|
|
* then we block the corresponding virtual address.
|
|
*/
|
|
if ((addr & ~PMD_MASK) == SECTION_SIZE) {
|
|
pmd = pmd_off_k(addr);
|
|
if (pmd_none(*pmd))
|
|
pmd_empty_section_gap(addr & PMD_MASK);
|
|
}
|
|
|
|
/*
|
|
* Then check if this vm ends on an odd section boundary.
|
|
* If so and the second section entry for this PMD is empty
|
|
* then we block the corresponding virtual address.
|
|
*/
|
|
addr += vm->size;
|
|
if ((addr & ~PMD_MASK) == SECTION_SIZE) {
|
|
pmd = pmd_off_k(addr) + 1;
|
|
if (pmd_none(*pmd))
|
|
pmd_empty_section_gap(addr);
|
|
}
|
|
|
|
/* no need to look at any vm entry until we hit the next PMD */
|
|
next = (addr + PMD_SIZE - 1) & PMD_MASK;
|
|
}
|
|
}
|
|
|
|
#else
|
|
#define fill_pmd_gaps() do { } while (0)
|
|
#endif
|
|
|
|
#if defined(CONFIG_PCI) && !defined(CONFIG_NEED_MACH_IO_H)
|
|
static void __init pci_reserve_io(void)
|
|
{
|
|
struct static_vm *svm;
|
|
|
|
svm = find_static_vm_vaddr((void *)PCI_IO_VIRT_BASE);
|
|
if (svm)
|
|
return;
|
|
|
|
vm_reserve_area_early(PCI_IO_VIRT_BASE, SZ_2M, pci_reserve_io);
|
|
}
|
|
#else
|
|
#define pci_reserve_io() do { } while (0)
|
|
#endif
|
|
|
|
#ifdef CONFIG_DEBUG_LL
|
|
void __init debug_ll_io_init(void)
|
|
{
|
|
struct map_desc map;
|
|
|
|
debug_ll_addr(&map.pfn, &map.virtual);
|
|
if (!map.pfn || !map.virtual)
|
|
return;
|
|
map.pfn = __phys_to_pfn(map.pfn);
|
|
map.virtual &= PAGE_MASK;
|
|
map.length = PAGE_SIZE;
|
|
map.type = MT_DEVICE;
|
|
iotable_init(&map, 1);
|
|
}
|
|
#endif
|
|
|
|
static void * __initdata vmalloc_min =
|
|
(void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET);
|
|
|
|
/*
|
|
* vmalloc=size forces the vmalloc area to be exactly 'size'
|
|
* bytes. This can be used to increase (or decrease) the vmalloc
|
|
* area - the default is 240m.
|
|
*/
|
|
static int __init early_vmalloc(char *arg)
|
|
{
|
|
unsigned long vmalloc_reserve = memparse(arg, NULL);
|
|
|
|
if (vmalloc_reserve < SZ_16M) {
|
|
vmalloc_reserve = SZ_16M;
|
|
pr_warn("vmalloc area too small, limiting to %luMB\n",
|
|
vmalloc_reserve >> 20);
|
|
}
|
|
|
|
if (vmalloc_reserve > VMALLOC_END - (PAGE_OFFSET + SZ_32M)) {
|
|
vmalloc_reserve = VMALLOC_END - (PAGE_OFFSET + SZ_32M);
|
|
pr_warn("vmalloc area is too big, limiting to %luMB\n",
|
|
vmalloc_reserve >> 20);
|
|
}
|
|
|
|
vmalloc_min = (void *)(VMALLOC_END - vmalloc_reserve);
|
|
return 0;
|
|
}
|
|
early_param("vmalloc", early_vmalloc);
|
|
|
|
phys_addr_t arm_lowmem_limit __initdata = 0;
|
|
|
|
void __init adjust_lowmem_bounds(void)
|
|
{
|
|
phys_addr_t block_start, block_end, memblock_limit = 0;
|
|
u64 vmalloc_limit, i;
|
|
phys_addr_t lowmem_limit = 0;
|
|
|
|
/*
|
|
* Let's use our own (unoptimized) equivalent of __pa() that is
|
|
* not affected by wrap-arounds when sizeof(phys_addr_t) == 4.
|
|
* The result is used as the upper bound on physical memory address
|
|
* and may itself be outside the valid range for which phys_addr_t
|
|
* and therefore __pa() is defined.
|
|
*/
|
|
vmalloc_limit = (u64)(uintptr_t)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;
|
|
|
|
/*
|
|
* The first usable region must be PMD aligned. Mark its start
|
|
* as MEMBLOCK_NOMAP if it isn't
|
|
*/
|
|
for_each_mem_range(i, &block_start, &block_end) {
|
|
if (!IS_ALIGNED(block_start, PMD_SIZE)) {
|
|
phys_addr_t len;
|
|
|
|
len = round_up(block_start, PMD_SIZE) - block_start;
|
|
memblock_mark_nomap(block_start, len);
|
|
}
|
|
break;
|
|
}
|
|
|
|
for_each_mem_range(i, &block_start, &block_end) {
|
|
if (block_start < vmalloc_limit) {
|
|
if (block_end > lowmem_limit)
|
|
/*
|
|
* Compare as u64 to ensure vmalloc_limit does
|
|
* not get truncated. block_end should always
|
|
* fit in phys_addr_t so there should be no
|
|
* issue with assignment.
|
|
*/
|
|
lowmem_limit = min_t(u64,
|
|
vmalloc_limit,
|
|
block_end);
|
|
|
|
/*
|
|
* Find the first non-pmd-aligned page, and point
|
|
* memblock_limit at it. This relies on rounding the
|
|
* limit down to be pmd-aligned, which happens at the
|
|
* end of this function.
|
|
*
|
|
* With this algorithm, the start or end of almost any
|
|
* bank can be non-pmd-aligned. The only exception is
|
|
* that the start of the bank 0 must be section-
|
|
* aligned, since otherwise memory would need to be
|
|
* allocated when mapping the start of bank 0, which
|
|
* occurs before any free memory is mapped.
|
|
*/
|
|
if (!memblock_limit) {
|
|
if (!IS_ALIGNED(block_start, PMD_SIZE))
|
|
memblock_limit = block_start;
|
|
else if (!IS_ALIGNED(block_end, PMD_SIZE))
|
|
memblock_limit = lowmem_limit;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
arm_lowmem_limit = lowmem_limit;
|
|
|
|
high_memory = __va(arm_lowmem_limit - 1) + 1;
|
|
|
|
if (!memblock_limit)
|
|
memblock_limit = arm_lowmem_limit;
|
|
|
|
/*
|
|
* Round the memblock limit down to a pmd size. This
|
|
* helps to ensure that we will allocate memory from the
|
|
* last full pmd, which should be mapped.
|
|
*/
|
|
memblock_limit = round_down(memblock_limit, PMD_SIZE);
|
|
|
|
if (!IS_ENABLED(CONFIG_HIGHMEM) || cache_is_vipt_aliasing()) {
|
|
if (memblock_end_of_DRAM() > arm_lowmem_limit) {
|
|
phys_addr_t end = memblock_end_of_DRAM();
|
|
|
|
pr_notice("Ignoring RAM at %pa-%pa\n",
|
|
&memblock_limit, &end);
|
|
pr_notice("Consider using a HIGHMEM enabled kernel.\n");
|
|
|
|
memblock_remove(memblock_limit, end - memblock_limit);
|
|
}
|
|
}
|
|
|
|
memblock_set_current_limit(memblock_limit);
|
|
}
|
|
|
|
static inline void prepare_page_table(void)
|
|
{
|
|
unsigned long addr;
|
|
phys_addr_t end;
|
|
|
|
/*
|
|
* Clear out all the mappings below the kernel image.
|
|
*/
|
|
for (addr = 0; addr < MODULES_VADDR; addr += PMD_SIZE)
|
|
pmd_clear(pmd_off_k(addr));
|
|
|
|
#ifdef CONFIG_XIP_KERNEL
|
|
/* The XIP kernel is mapped in the module area -- skip over it */
|
|
addr = ((unsigned long)_exiprom + PMD_SIZE - 1) & PMD_MASK;
|
|
#endif
|
|
for ( ; addr < PAGE_OFFSET; addr += PMD_SIZE)
|
|
pmd_clear(pmd_off_k(addr));
|
|
|
|
/*
|
|
* Find the end of the first block of lowmem.
|
|
*/
|
|
end = memblock.memory.regions[0].base + memblock.memory.regions[0].size;
|
|
if (end >= arm_lowmem_limit)
|
|
end = arm_lowmem_limit;
|
|
|
|
/*
|
|
* Clear out all the kernel space mappings, except for the first
|
|
* memory bank, up to the vmalloc region.
|
|
*/
|
|
for (addr = __phys_to_virt(end);
|
|
addr < VMALLOC_START; addr += PMD_SIZE)
|
|
pmd_clear(pmd_off_k(addr));
|
|
}
|
|
|
|
#ifdef CONFIG_ARM_LPAE
|
|
/* the first page is reserved for pgd */
|
|
#define SWAPPER_PG_DIR_SIZE (PAGE_SIZE + \
|
|
PTRS_PER_PGD * PTRS_PER_PMD * sizeof(pmd_t))
|
|
#else
|
|
#define SWAPPER_PG_DIR_SIZE (PTRS_PER_PGD * sizeof(pgd_t))
|
|
#endif
|
|
|
|
/*
|
|
* Reserve the special regions of memory
|
|
*/
|
|
void __init arm_mm_memblock_reserve(void)
|
|
{
|
|
/*
|
|
* Reserve the page tables. These are already in use,
|
|
* and can only be in node 0.
|
|
*/
|
|
memblock_reserve(__pa(swapper_pg_dir), SWAPPER_PG_DIR_SIZE);
|
|
|
|
#ifdef CONFIG_SA1111
|
|
/*
|
|
* Because of the SA1111 DMA bug, we want to preserve our
|
|
* precious DMA-able memory...
|
|
*/
|
|
memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET);
|
|
#endif
|
|
}
|
|
|
|
/*
|
|
* Set up the device mappings. Since we clear out the page tables for all
|
|
* mappings above VMALLOC_START, except early fixmap, we might remove debug
|
|
* device mappings. This means earlycon can be used to debug this function
|
|
* Any other function or debugging method which may touch any device _will_
|
|
* crash the kernel.
|
|
*/
|
|
static void __init devicemaps_init(const struct machine_desc *mdesc)
|
|
{
|
|
struct map_desc map;
|
|
unsigned long addr;
|
|
void *vectors;
|
|
|
|
/*
|
|
* Allocate the vector page early.
|
|
*/
|
|
vectors = early_alloc(PAGE_SIZE * 2);
|
|
|
|
early_trap_init(vectors);
|
|
|
|
/*
|
|
* Clear page table except top pmd used by early fixmaps
|
|
*/
|
|
for (addr = VMALLOC_START; addr < (FIXADDR_TOP & PMD_MASK); addr += PMD_SIZE)
|
|
pmd_clear(pmd_off_k(addr));
|
|
|
|
if (__atags_pointer) {
|
|
/* create a read-only mapping of the device tree */
|
|
map.pfn = __phys_to_pfn(__atags_pointer & SECTION_MASK);
|
|
map.virtual = FDT_FIXED_BASE;
|
|
map.length = FDT_FIXED_SIZE;
|
|
map.type = MT_ROM;
|
|
create_mapping(&map);
|
|
}
|
|
|
|
/*
|
|
* Map the kernel if it is XIP.
|
|
* It is always first in the modulearea.
|
|
*/
|
|
#ifdef CONFIG_XIP_KERNEL
|
|
map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK);
|
|
map.virtual = MODULES_VADDR;
|
|
map.length = ((unsigned long)_exiprom - map.virtual + ~SECTION_MASK) & SECTION_MASK;
|
|
map.type = MT_ROM;
|
|
create_mapping(&map);
|
|
#endif
|
|
|
|
/*
|
|
* Map the cache flushing regions.
|
|
*/
|
|
#ifdef FLUSH_BASE
|
|
map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS);
|
|
map.virtual = FLUSH_BASE;
|
|
map.length = SZ_1M;
|
|
map.type = MT_CACHECLEAN;
|
|
create_mapping(&map);
|
|
#endif
|
|
#ifdef FLUSH_BASE_MINICACHE
|
|
map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS + SZ_1M);
|
|
map.virtual = FLUSH_BASE_MINICACHE;
|
|
map.length = SZ_1M;
|
|
map.type = MT_MINICLEAN;
|
|
create_mapping(&map);
|
|
#endif
|
|
|
|
/*
|
|
* Create a mapping for the machine vectors at the high-vectors
|
|
* location (0xffff0000). If we aren't using high-vectors, also
|
|
* create a mapping at the low-vectors virtual address.
|
|
*/
|
|
map.pfn = __phys_to_pfn(virt_to_phys(vectors));
|
|
map.virtual = 0xffff0000;
|
|
map.length = PAGE_SIZE;
|
|
#ifdef CONFIG_KUSER_HELPERS
|
|
map.type = MT_HIGH_VECTORS;
|
|
#else
|
|
map.type = MT_LOW_VECTORS;
|
|
#endif
|
|
create_mapping(&map);
|
|
|
|
if (!vectors_high()) {
|
|
map.virtual = 0;
|
|
map.length = PAGE_SIZE * 2;
|
|
map.type = MT_LOW_VECTORS;
|
|
create_mapping(&map);
|
|
}
|
|
|
|
/* Now create a kernel read-only mapping */
|
|
map.pfn += 1;
|
|
map.virtual = 0xffff0000 + PAGE_SIZE;
|
|
map.length = PAGE_SIZE;
|
|
map.type = MT_LOW_VECTORS;
|
|
create_mapping(&map);
|
|
|
|
/*
|
|
* Ask the machine support to map in the statically mapped devices.
|
|
*/
|
|
if (mdesc->map_io)
|
|
mdesc->map_io();
|
|
else
|
|
debug_ll_io_init();
|
|
fill_pmd_gaps();
|
|
|
|
/* Reserve fixed i/o space in VMALLOC region */
|
|
pci_reserve_io();
|
|
|
|
/*
|
|
* Finally flush the caches and tlb to ensure that we're in a
|
|
* consistent state wrt the writebuffer. This also ensures that
|
|
* any write-allocated cache lines in the vector page are written
|
|
* back. After this point, we can start to touch devices again.
|
|
*/
|
|
local_flush_tlb_all();
|
|
flush_cache_all();
|
|
|
|
/* Enable asynchronous aborts */
|
|
early_abt_enable();
|
|
}
|
|
|
|
static void __init kmap_init(void)
|
|
{
|
|
#ifdef CONFIG_HIGHMEM
|
|
pkmap_page_table = early_pte_alloc(pmd_off_k(PKMAP_BASE),
|
|
PKMAP_BASE, _PAGE_KERNEL_TABLE);
|
|
#endif
|
|
|
|
early_pte_alloc(pmd_off_k(FIXADDR_START), FIXADDR_START,
|
|
_PAGE_KERNEL_TABLE);
|
|
}
|
|
|
|
static void __init map_lowmem(void)
|
|
{
|
|
phys_addr_t kernel_x_start = round_down(__pa(KERNEL_START), SECTION_SIZE);
|
|
phys_addr_t kernel_x_end = round_up(__pa(__init_end), SECTION_SIZE);
|
|
phys_addr_t start, end;
|
|
u64 i;
|
|
|
|
/* Map all the lowmem memory banks. */
|
|
for_each_mem_range(i, &start, &end) {
|
|
struct map_desc map;
|
|
|
|
if (end > arm_lowmem_limit)
|
|
end = arm_lowmem_limit;
|
|
if (start >= end)
|
|
break;
|
|
|
|
if (end < kernel_x_start) {
|
|
map.pfn = __phys_to_pfn(start);
|
|
map.virtual = __phys_to_virt(start);
|
|
map.length = end - start;
|
|
map.type = MT_MEMORY_RWX;
|
|
|
|
create_mapping(&map);
|
|
} else if (start >= kernel_x_end) {
|
|
map.pfn = __phys_to_pfn(start);
|
|
map.virtual = __phys_to_virt(start);
|
|
map.length = end - start;
|
|
map.type = MT_MEMORY_RW;
|
|
|
|
create_mapping(&map);
|
|
} else {
|
|
/* This better cover the entire kernel */
|
|
if (start < kernel_x_start) {
|
|
map.pfn = __phys_to_pfn(start);
|
|
map.virtual = __phys_to_virt(start);
|
|
map.length = kernel_x_start - start;
|
|
map.type = MT_MEMORY_RW;
|
|
|
|
create_mapping(&map);
|
|
}
|
|
|
|
map.pfn = __phys_to_pfn(kernel_x_start);
|
|
map.virtual = __phys_to_virt(kernel_x_start);
|
|
map.length = kernel_x_end - kernel_x_start;
|
|
map.type = MT_MEMORY_RWX;
|
|
|
|
create_mapping(&map);
|
|
|
|
if (kernel_x_end < end) {
|
|
map.pfn = __phys_to_pfn(kernel_x_end);
|
|
map.virtual = __phys_to_virt(kernel_x_end);
|
|
map.length = end - kernel_x_end;
|
|
map.type = MT_MEMORY_RW;
|
|
|
|
create_mapping(&map);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#ifdef CONFIG_ARM_PV_FIXUP
|
|
typedef void pgtables_remap(long long offset, unsigned long pgd);
|
|
pgtables_remap lpae_pgtables_remap_asm;
|
|
|
|
/*
|
|
* early_paging_init() recreates boot time page table setup, allowing machines
|
|
* to switch over to a high (>4G) address space on LPAE systems
|
|
*/
|
|
static void __init early_paging_init(const struct machine_desc *mdesc)
|
|
{
|
|
pgtables_remap *lpae_pgtables_remap;
|
|
unsigned long pa_pgd;
|
|
unsigned int cr, ttbcr;
|
|
long long offset;
|
|
|
|
if (!mdesc->pv_fixup)
|
|
return;
|
|
|
|
offset = mdesc->pv_fixup();
|
|
if (offset == 0)
|
|
return;
|
|
|
|
/*
|
|
* Get the address of the remap function in the 1:1 identity
|
|
* mapping setup by the early page table assembly code. We
|
|
* must get this prior to the pv update. The following barrier
|
|
* ensures that this is complete before we fixup any P:V offsets.
|
|
*/
|
|
lpae_pgtables_remap = (pgtables_remap *)(unsigned long)__pa(lpae_pgtables_remap_asm);
|
|
pa_pgd = __pa(swapper_pg_dir);
|
|
barrier();
|
|
|
|
pr_info("Switching physical address space to 0x%08llx\n",
|
|
(u64)PHYS_OFFSET + offset);
|
|
|
|
/* Re-set the phys pfn offset, and the pv offset */
|
|
__pv_offset += offset;
|
|
__pv_phys_pfn_offset += PFN_DOWN(offset);
|
|
|
|
/* Run the patch stub to update the constants */
|
|
fixup_pv_table(&__pv_table_begin,
|
|
(&__pv_table_end - &__pv_table_begin) << 2);
|
|
|
|
/*
|
|
* We changing not only the virtual to physical mapping, but also
|
|
* the physical addresses used to access memory. We need to flush
|
|
* all levels of cache in the system with caching disabled to
|
|
* ensure that all data is written back, and nothing is prefetched
|
|
* into the caches. We also need to prevent the TLB walkers
|
|
* allocating into the caches too. Note that this is ARMv7 LPAE
|
|
* specific.
|
|
*/
|
|
cr = get_cr();
|
|
set_cr(cr & ~(CR_I | CR_C));
|
|
asm("mrc p15, 0, %0, c2, c0, 2" : "=r" (ttbcr));
|
|
asm volatile("mcr p15, 0, %0, c2, c0, 2"
|
|
: : "r" (ttbcr & ~(3 << 8 | 3 << 10)));
|
|
flush_cache_all();
|
|
|
|
/*
|
|
* Fixup the page tables - this must be in the idmap region as
|
|
* we need to disable the MMU to do this safely, and hence it
|
|
* needs to be assembly. It's fairly simple, as we're using the
|
|
* temporary tables setup by the initial assembly code.
|
|
*/
|
|
lpae_pgtables_remap(offset, pa_pgd);
|
|
|
|
/* Re-enable the caches and cacheable TLB walks */
|
|
asm volatile("mcr p15, 0, %0, c2, c0, 2" : : "r" (ttbcr));
|
|
set_cr(cr);
|
|
}
|
|
|
|
#else
|
|
|
|
static void __init early_paging_init(const struct machine_desc *mdesc)
|
|
{
|
|
long long offset;
|
|
|
|
if (!mdesc->pv_fixup)
|
|
return;
|
|
|
|
offset = mdesc->pv_fixup();
|
|
if (offset == 0)
|
|
return;
|
|
|
|
pr_crit("Physical address space modification is only to support Keystone2.\n");
|
|
pr_crit("Please enable ARM_LPAE and ARM_PATCH_PHYS_VIRT support to use this\n");
|
|
pr_crit("feature. Your kernel may crash now, have a good day.\n");
|
|
add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_FORCE_PAGES
|
|
/*
|
|
* remap a PMD into pages
|
|
* We split a single pmd here none of this two pmd nonsense
|
|
*/
|
|
static noinline void __init split_pmd(pmd_t *pmd, unsigned long addr,
|
|
unsigned long end, unsigned long pfn,
|
|
const struct mem_type *type)
|
|
{
|
|
pte_t *pte, *start_pte;
|
|
pmd_t *base_pmd;
|
|
|
|
base_pmd = pmd_offset(
|
|
pud_offset(pgd_offset(&init_mm, addr), addr), addr);
|
|
|
|
if (pmd_none(*base_pmd) || pmd_bad(*base_pmd)) {
|
|
start_pte = early_alloc(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE);
|
|
#ifndef CONFIG_ARM_LPAE
|
|
/*
|
|
* Following is needed when new pte is allocated for pmd[1]
|
|
* cases, which may happen when base (start) address falls
|
|
* under pmd[1].
|
|
*/
|
|
if (addr & SECTION_SIZE)
|
|
start_pte += pte_index(addr);
|
|
#endif
|
|
} else {
|
|
start_pte = pte_offset_kernel(base_pmd, addr);
|
|
}
|
|
|
|
pte = start_pte;
|
|
|
|
do {
|
|
set_pte_ext(pte, pfn_pte(pfn, type->prot_pte), 0);
|
|
pfn++;
|
|
} while (pte++, addr += PAGE_SIZE, addr != end);
|
|
|
|
*pmd = __pmd((__pa(start_pte) + PTE_HWTABLE_OFF) | type->prot_l1);
|
|
mb(); /* let pmd be programmed */
|
|
flush_pmd_entry(pmd);
|
|
flush_tlb_all();
|
|
}
|
|
|
|
/*
|
|
* It's significantly easier to remap as pages later after all memory is
|
|
* mapped. Everything is sections so all we have to do is split
|
|
*/
|
|
static void __init remap_pages(void)
|
|
{
|
|
struct memblock_region *reg;
|
|
|
|
for_each_memblock(memory, reg) {
|
|
phys_addr_t phys_start = reg->base;
|
|
phys_addr_t phys_end = reg->base + reg->size;
|
|
unsigned long addr = (unsigned long)__va(phys_start);
|
|
unsigned long end = (unsigned long)__va(phys_end);
|
|
pmd_t *pmd = NULL;
|
|
unsigned long next;
|
|
unsigned long pfn = __phys_to_pfn(phys_start);
|
|
bool fixup = false;
|
|
unsigned long saved_start = addr;
|
|
|
|
if (phys_start > arm_lowmem_limit)
|
|
break;
|
|
if (phys_end > arm_lowmem_limit)
|
|
end = (unsigned long)__va(arm_lowmem_limit);
|
|
if (phys_start >= phys_end)
|
|
break;
|
|
|
|
pmd = pmd_offset(
|
|
pud_offset(pgd_offset(&init_mm, addr), addr), addr);
|
|
|
|
#ifndef CONFIG_ARM_LPAE
|
|
if (addr & SECTION_SIZE) {
|
|
fixup = true;
|
|
pmd_empty_section_gap((addr - SECTION_SIZE) & PMD_MASK);
|
|
pmd++;
|
|
}
|
|
|
|
if (end & SECTION_SIZE)
|
|
pmd_empty_section_gap(end);
|
|
#endif
|
|
|
|
do {
|
|
next = addr + SECTION_SIZE;
|
|
|
|
if (pmd_none(*pmd) || pmd_bad(*pmd))
|
|
split_pmd(pmd, addr, next, pfn,
|
|
&mem_types[MT_MEMORY_RWX]);
|
|
pmd++;
|
|
pfn += SECTION_SIZE >> PAGE_SHIFT;
|
|
|
|
} while (addr = next, addr < end);
|
|
|
|
if (fixup) {
|
|
/*
|
|
* Put a faulting page table here to avoid detecting no
|
|
* pmd when accessing an odd section boundary. This
|
|
* needs to be faulting to help catch errors and avoid
|
|
* speculation
|
|
*/
|
|
pmd = pmd_off_k(saved_start);
|
|
pmd[0] = pmd[1] & ~1;
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
static void __init remap_pages(void)
|
|
{
|
|
|
|
}
|
|
#endif
|
|
|
|
static void __init early_fixmap_shutdown(void)
|
|
{
|
|
int i;
|
|
unsigned long va = fix_to_virt(__end_of_permanent_fixed_addresses - 1);
|
|
|
|
pte_offset_fixmap = pte_offset_late_fixmap;
|
|
pmd_clear(fixmap_pmd(va));
|
|
local_flush_tlb_kernel_page(va);
|
|
|
|
for (i = 0; i < __end_of_permanent_fixed_addresses; i++) {
|
|
pte_t *pte;
|
|
struct map_desc map;
|
|
|
|
map.virtual = fix_to_virt(i);
|
|
pte = pte_offset_early_fixmap(pmd_off_k(map.virtual), map.virtual);
|
|
|
|
/* Only i/o device mappings are supported ATM */
|
|
if (pte_none(*pte) ||
|
|
(pte_val(*pte) & L_PTE_MT_MASK) != L_PTE_MT_DEV_SHARED)
|
|
continue;
|
|
|
|
map.pfn = pte_pfn(*pte);
|
|
map.type = MT_DEVICE;
|
|
map.length = PAGE_SIZE;
|
|
|
|
create_mapping(&map);
|
|
}
|
|
}
|
|
|
|
/*
|
|
* paging_init() sets up the page tables, initialises the zone memory
|
|
* maps, and sets up the zero page, bad page and bad page tables.
|
|
*/
|
|
void __init paging_init(const struct machine_desc *mdesc)
|
|
{
|
|
void *zero_page;
|
|
|
|
prepare_page_table();
|
|
map_lowmem();
|
|
memblock_set_current_limit(arm_lowmem_limit);
|
|
dma_contiguous_remap();
|
|
early_fixmap_shutdown();
|
|
remap_pages();
|
|
devicemaps_init(mdesc);
|
|
kmap_init();
|
|
tcm_init();
|
|
|
|
top_pmd = pmd_off_k(0xffff0000);
|
|
|
|
/* allocate the zero page. */
|
|
zero_page = early_alloc(PAGE_SIZE);
|
|
|
|
bootmem_init();
|
|
|
|
empty_zero_page = virt_to_page(zero_page);
|
|
__flush_dcache_page(NULL, empty_zero_page);
|
|
}
|
|
|
|
void __init early_mm_init(const struct machine_desc *mdesc)
|
|
{
|
|
build_mem_type_table();
|
|
early_paging_init(mdesc);
|
|
}
|
|
|
|
void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
|
pte_t *ptep, pte_t pteval)
|
|
{
|
|
unsigned long ext = 0;
|
|
|
|
if (addr < TASK_SIZE && pte_valid_user(pteval)) {
|
|
if (!pte_special(pteval))
|
|
__sync_icache_dcache(pteval);
|
|
ext |= PTE_EXT_NG;
|
|
}
|
|
|
|
set_pte_ext(ptep, pteval, ext);
|
|
}
|