mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Merge tag 'android14-6.1.134_r00' into android14-6.1
This merges the android14-6.1.134_r00 tag into the android14-6.1 branch, catching it up with the latest LTS releases. It contains the following commits: *5a2ca52ae4Revert "of: property: Increase NR_FWNODE_REFERENCE_ARGS" *f6e3f07621Revert "can: statistics: use atomic access in hot path" *522ff9a1dbMerge 6.1.134 into android14-6.1-lts |\ | *4201028358Linux 6.1.134 | *1a84c0be74tracing: Do not use PERF enums when perf is not defined | *14a6b65c83NFSD: Skip sending CB_RECALL_ANY when the backchannel isn't up | *d96587cc93nfsd: put dl_stid if fail to queue dl_recall | *30ef7cfee7media: streamzap: fix race between device disconnection and urb callback | *78f06805cfjfs: add index corruption check to DT_GETPAGE() | *46e2c031aajfs: fix slab-out-of-bounds read in ea_get() | *89503e5eaeext4: fix OOB read when checking dotdot dir | *c07ec83be7ext4: don't over-report free space or inodes in statvfs | *cf18760105arm64: Don't call NULL in do_compat_alignment_fixup() | *8f4d099504tracing/osnoise: Fix possible recursive locking for cpus_read_lock() | *e9564aa7b8tracing: Fix synth event printk format for str fields | *bb9616ba5btracing: Ensure module defining synth event cannot be unloaded while tracing | *a2cce54c17tracing: Fix use-after-free in print_graph_function_flags during tracer switching | *3ac65de111ksmbd: validate zero num_subauth before sub_auth is accessed | *596407adb9ksmbd: fix session use-after-free in multichannel connection | *f0eb3f5751ksmbd: fix use-after-free in ksmbd_sessions_deregister() | *629dd37accksmbd: add bounds check for create lease context | *8857a956f7mmc: sdhci-omap: Disable MMC_CAP_AGGRESSIVE_PM for eMMC/SD | *91f33558dbmmc: sdhci-pxav3: set NEED_RSP_BUSY capability | *0bb9c96fafACPI: resource: Skip IRQ override on ASUS Vivobook 14 X1404VAP | *bae5b55e0facpi: nfit: fix narrowing conversion in acpi_nfit_ctl | *0708fd6bd8x86/mm: Fix flush_tlb_range() when used for zapping normal PMDs | *39e32fe65ex86/tsc: Always save/restore TSC sched_clock() on suspend/resume | *9c8237021bbtrfs: handle errors from btrfs_dec_ref() properly | *cacce7faa7kunit/overflow: Fix UB in overflow_allocation_test | *781b2db0ebperf/x86/intel: Avoid disable PMU if !cpuc->enabled in sample read | *0a416b4c53perf/x86/intel: Apply static call for drain_pebs | *5b36f9e8fantb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk() | *16d6b2527fplatform/x86: ISST: Correct command storage data length | *c498c117c4LoongArch: BPF: Use move_addr() for BPF_PSEUDO_FUNC | *e9ccb262b3LoongArch: BPF: Fix off-by-one error in build_prologue() | *f39af67f03LoongArch: Increase ARCH_DMA_MINALIGN up to 16 | *0f10f83acfusbnet:fix NPE during rx_complete | *bbadf50383tty: serial: fsl_lpuart: disable transmitter before changing RS485 related registers | *a824c44e4btty: serial: fsl_lpuart: use UARTMODIR register bits for lpuart32 platform | *0628ee3bfbdrm/amdgpu/gfx11: fix num_mec | *ddd2752899io_uring/filetable: ensure node switch is always done, if needed | *be8a0decd0arcnet: Add NULL check in com20020pci_probe() | *d10bd910d3ipv6: Do not consider link down nexthops in path selection | *6d1e50a73dipv6: Start path selection from the first nexthop | *21748669c5net: fix geneve_opt length integer overflow | *5eaa143ba3net: dsa: mv88e6xxx: propperly shutdown PPU re-enable timer on destroy | *b9039d61f8ipv6: fix omitted netlink attributes when using RTEXT_FILTER_SKIP_STATS | *a263d31c8cnetfilter: nft_tunnel: fix geneve_opt type confusion addition | *b88786ea2ctunnels: Accept PACKET_HOST in skb_tunnel_check_pmtu(). | *f3b75e0a06vsock: avoid timeout during connect() if the socket is closing | *9122fec396udp: Fix memory accounting leak. | *b3f48a41a0net: mvpp2: Prevent parser TCAM memory corruption | *1dcc144c32net_sched: skbprio: Remove overly strict queue assertions | *797e5371cfnetlabel: Fix NULL pointer exception caused by CALIPSO on IPv4 sockets | *3f620f0a29netfilter: nft_set_hash: GC reaps elements with conncount for dynamic sets only | *38253922a8ASoC: imx-card: Add NULL check in imx_card_probe() | *8d78931a15ntb: intel: Fix using link status DB's | *7ed22f8d8bntb_hw_switchtec: Fix shift-out-of-bounds in switchtec_ntb_mw_set_trans | *fb5069d017riscv: ftrace: Add parentheses in macro definitions of make_call_t0 and make_call_ra | *a333f223e5spufs: fix a leak in spufs_create_context() | *880e7b3da2spufs: fix gang directory lifetimes | *96de7fbdc2spufs: fix a leak on spufs_new_file() failure | *ad387704e9hwmon: (nct6775-core) Fix out of bounds access for NCT679{8,9} | *a8184b1930memory: omap-gpmc: drop no compatible check | *4b07ce83e9can: statistics: use atomic access in hot path | *1a8bae6723ALSA: hda/realtek: Add mute LED quirk for HP Pavilion x360 14-dy1xxx | *e733877c5edrm/amd: Keep display off while going into S4 | *34988d2e0cx86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled | *8630709ebdlocking/semaphore: Use wake_q to wake up processes outside lock critical section | *e73917f9e0sched/deadline: Use online cpus for validating runtime | *223f2ababbALSA: hda/realtek: Add support for ASUS Zenbook UM3406KA Laptops using CS35L41 HDA | *de04d49417ALSA: hda/realtek: Add support for ASUS ROG Strix G614 Laptops using CS35L41 HDA | *b31a7802d4HID: i2c-hid: improve i2c_hid_get_report error message | *70bb0d7129platform/x86: intel-hid: fix volume buttons on Microsoft Surface Go 4 tablet | *3f3a07fcb5ALSA: hda: Fix speakers on ASUS EXPERTBOOK P5405CSA 1.0 | *2dab4e83fcALSA: hda/realtek: Fix Asus Z13 2025 audio | *6387243bfeaffs: don't write overlarge OFS data block size fields | *395041688baffs: generate OFS sequence numbers starting at 1 | *499d26188awifi: brcmfmac: keep power during suspend if board requires it | *ff0c8508ebnvme-pci: skip CMB blocks incompatible with PCI P2P DMA | *159ef31d18nvme-pci: clean up CMBMSC when registering CMB fails | *6fca3c84f1nvme-tcp: fix possible UAF in nvme_tcp_poll | *157c80e4eawifi: iwlwifi: mvm: use the right version of the rate API | *c0a4cbdadcwifi: iwlwifi: fw: allocate chained SG tables for dump | *c195e1eac0rcu-tasks: Always inline rcu_irq_work_resched() | *4c467a4ba7context_tracking: Always inline ct_{nmi,irq}_{enter,exit}() | *ad05c9379bsched/smt: Always inline sched_smt_active() | *1e49787b45octeontx2-af: Free NIX_AF_INT_VEC_GEN irq | *013a3c7ecaocteontx2-af: Fix mbox INTR handler when num VFs > 64 | *9b435afa49ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid | *63d23e3976LoongArch: Fix help text of CMDLINE_EXTEND in Kconfig | *6fc6fa800ering-buffer: Fix bytes_dropped calculation issue | *3420c27121net/mlx5e: SHAMPO, Make reserved size independent of page size | *128a0f437eksmbd: fix multichannel connection failure | *a6b5948682ksmbd: use aead_request_free to match aead_request_alloc | *717587fbc8rndis_host: Flag RNDIS modems as WWAN devices | *5fed5f6de3rtnetlink: Allocate vfinfo size for VF GUIDs when supported | *83048539a7exfat: fix the infinite loop in exfat_find_last_cluster() | *b9249da6b0objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds() | *546685793fperf tools: annotate asm_pure_loop.S | *1ff7116624fs/procfs: fix the comment above proc_pid_wchan() | *62f6af0a12staging: rtl8723bs: select CONFIG_CRYPTO_LIB_AES | *c8b28c1276perf python: Check if there is space to copy all the event | *5a393187e5perf python: Don't keep a raw_data pointer to consumed ring buffer space | *5cf553ae38perf python: Decrement the refcount of just created event on failure | *e95f1c106dperf python: Fixup description of sample.id event member | *3d38144225i3c: master: svc: Fix missing the IBI rules | *b0686d0d76um: remove copy_from_kernel_nofault_allowed | *142f89201efuse: fix dax truncate/punch_hole fault path | *a285180873NFSv4: Don't trigger uneccessary scans for return-on-close delegations | *a34f52b7d5arch/powerpc: drop GENERIC_PTDUMP from mpc885_ads_defconfig | *11e24802e7ocfs2: validate l_tree_depth to avoid out-of-bounds access | *7b9d5f73e7kexec: initialize ELF lowest address to ULONG_MAX | *314f8fb911perf units: Fix insufficient array space | *b303aff1c5perf evlist: Add success path to evlist__create_syswide_maps | *7098ae7ee2iio: adc: ad7124: Fix comparison of channel configs | *1a14e9718afs/ntfs3: Fix a couple integer overflows on 32bit systems | *1c80787ecdusb: xhci: correct debug message page size calculation | *7214c53e3ciio: accel: msa311: Fix failure to release runtime pm if direct mode claim fails. | *8bd1e85254iio: accel: mma8452: Ensure error return on failure to matching oversampling ratio | *cb385b93c8coresight-etm4x: add isb() before reading the TRCSTATR | *90b7ad7678coresight: catu: Fix number of pages while using 64k pages | *b0201583c1soundwire: slave: fix an OF node reference leak in soundwire slave device | *46b78bf04aisofs: fix KMSAN uninit-value bug in do_isofs_readdir() | *be8a5aecccclk: qcom: mmcc-sdm660: fix stuck video_subcore0 clock | *d5c51c6445crypto: hisilicon/sec2 - fix for aead auth key length | *d224ed6e90x86/dumpstack: Fix inaccurate unwinding from exception stacks due to misplaced assignment | *d77be51484mfd: sm501: Switch to BIT() to mitigate integer overflows | *f1b9566851pinctrl: renesas: rzv2m: Fix missing of_node_put() call | *dc7139b703RDMA/mlx5: Fix mlx5_poll_one() cur_qp update flow | *837adafac3crypto: nx - Fix uninitialised hv_nxc on error | *37a73de168power: supply: max77693: Fix wrong conversion of charge input threshold value | *b92e9f7565x86/entry: Fix ORC unwinder for PUSH_REGS with save_ret=1 | *bb2cb55064clk: amlogic: g12a: fix mmc A peripheral clock | *99db751579selftests/bpf: Select NUMA_NO_NODE to create map | *6ded8c22afclk: amlogic: gxbb: drop non existing 32k clock parent | *1f3fc107c8clk: amlogic: g12b: fix cluster A parent data | *77fedd8ae4pinctrl: tegra: Set SFIO mode to Mux Register | *ae450da3e9IB/mad: Check available slots before posting receive WRs | *29cb659bcfremoteproc: qcom_q6v5_mss: Handle platforms with one power domain | *bc1db4d8f1RDMA/erdma: Prevent use-after-free in erdma_accept_newconn() | *7844932c18RDMA/mlx5: Fix calculation of total invalidated pages | *d5212b9964RDMA/core: Don't expose hw_counters outside of init net namespace | *816ce9f46dclk: rockchip: rk3328: fix wrong clk_ref_usb3otg parent | *7c9abc455bpinctrl: renesas: rzg2l: Fix missing of_node_put() call | *dd5c97e4edpinctrl: renesas: rza2: Fix missing of_node_put() call | *5a45035b09lib: 842: Improve error handling in sw842_compress() | *8c6980c96dbpf: Use preempt_count() directly in bpf_send_signal_common() | *119bc7ed16clk: qcom: gcc-msm8953: fix stuck venus0_core0 clock | *0fef48f4a7clk: samsung: Fix UBSAN panic in samsung_clk_init() | *54380eea1fselftests/bpf: Fix string read in strncmp benchmark | *0144376d20libbpf: Fix hypothetical STT_SECTION extern NULL deref case | *43ac40302dremoteproc: qcom_q6v5_pas: Make single-PD handling more robust | *062de5f4e4of: property: Increase NR_FWNODE_REFERENCE_ARGS | *e6015ca453remoteproc: core: Clear table_sz when rproc_shutdown | *68e13ab1a0crypto: hisilicon/sec2 - fix for aead authsize alignment | *cb688aed24clk: amlogic: gxbb: drop incorrect flag on 32k clock | *5170a857cefbdev: sm501fb: Add some geometry checks. | *b2f79f85b8mdacon: rework dependency list | *2841dcc36ffbdev: au1100fb: Move a variable assignment behind a null pointer check | *be78c69ca7PCI: pciehp: Don't enable HPIE when resuming in poll mode | *d953e2cd59drm/amd/display: avoid NPD when ASIC does not support DMUB | *8dcd8b4210drm/mediatek: dsi: fix error codes in mtk_dsi_host_transfer() | *a4d0b76c65PCI: xilinx-cpm: Fix IRQ domain leak in error path of probe | *defab1c652PCI: Remove stray put_device() in pci_register_host_bridge() | *1cabe832e7drm/amd/display: fix type mismatch in CalculateDynamicMetadataParameters() | *32d12502d5PCI: Avoid reset when disabled via sysfs | *933322e51aPCI/portdrv: Only disable pciehp interrupts early when needed | *d68c455954PCI: brcmstb: Fix potential premature regulator disabling | *99a0efba9fPCI: brcmstb: Fix error path after a call to regulator_bulk_get() | *5bb237a1f6PCI: brcmstb: Use internal register to change link capability | *9ce67aa3c6PCI: cadence-ep: Fix the driver to send MSG TLP for INTx without data payload | *07e7a7334edrm/msm/dsi: Set PHY usescase (and mode) before registering DSI host | *cd4b075077PCI/ASPM: Fix link state exit during switch upstream function removal | *4e9cefe830drm/mediatek: mtk_hdmi: Fix typo for aud_sampe_size member | *61270882c5drm/mediatek: mtk_hdmi: Unregister audio platform device on failure | *c08869bf69PCI: Use downstream bridges for distributing resources | *79d138d137drm/vkms: Fix use after free and double free on init error | *f3ce74cdeedrm: xlnx: zynqmp: Fix max dma segment size | *e713b514d2drm/bridge: it6505: fix HDCP V match check is not performed correctly | *21daa13f7bdrm/dp_mst: Fix drm RAD print | *1ef7b8c1bedrm/bridge: ti-sn65dsi86: Fix multiple instances | *072833f1cbASoC: ti: j721e-evm: Fix clock configuration for ti,j7200-cpb-audio compatible | *c9c4db9307ALSA: hda/realtek: Always honor no_shutup_pins | *cb6d6a008eHID: remove superfluous (and wrong) Makefile entry for CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER | *67ec1fea52ASoC: cs35l41: check the return value from spi_setup() | *2606757693media: platform: allgro-dvt: unregister v4l2_device on the error path | *aa5af83b2emedia: verisilicon: HEVC: Initialize start_bit field | *e7a2a34d34x86/fpu/xstate: Fix inconsistencies in guest FPU xfeatures | *214965d1a6perf/ring_buffer: Allow the EPOLLRDNORM flag for poll | *4210ca861flockdep: Don't disable interrupts on RT in disable_irq_nosync_lockdep.*() | *72520ca5f9PM: sleep: Fix handling devices with direct_complete set on errors | *6a810c462fthermal: int340x: Add NULL check for adev | *0e44e88754EDAC/ie31200: Fix the error path order of ie31200_init() | *13479cf576EDAC/ie31200: Fix the DIMM size mask for several SoCs | *0d6f98d27dEDAC/ie31200: Fix the size of EDAC_MC_LAYER_CHIP_SELECT layer | *89f6691caeselinux: Chain up tool resolving errors in install_policy.sh | *528a06fe98PM: sleep: Adjust check before setting power.must_resume | *53d472f972lockdep/mm: Fix might_fault() lockdep check of current->mm->mmap_lock | *2380b9f5aax86/sev: Add missing RIP_REL_REF() invocations during sme_enable() | *cbcd6c852cx86/platform: Only allow CONFIG_EISA for 32-bit | *92ce1ccbadx86/fpu: Avoid copying dynamic FP state from init_task in arch_dup_task_struct() | *feec6cd973x86/fpu: Fix guest FPU state buffer allocation size | *a33ab15c5bcpufreq: governor: Fix negative 'idle_time' handling in dbs_update() | *d6937b1b4asmack: dont compile ipv6 code unless ipv6 is configured | *c678f0831bcpufreq: scpi: compare kHz instead of Hz | *f33c3cb0c9x86/mm/pat: cpa-test: fix length for CPA_ARRAY test | *d40e353726watch_queue: fix pipe accounting mismatch * |4878fe79faMerge 6.1.133 into android14-6.1-lts |\| | *3dfebb87d7Linux 6.1.133 | *f6c086a79dARM: dts: imx6qdl-apalis: Fix poweroff on Apalis iMX6 | *04d1086a62media: i2c: et8ek8: Don't strip remove function when driver is builtin | *7a735a8a46usb: typec: ucsi: Fix NULL pointer access | *03fa71e97eusb: gadget: uvc: Fix ERR_PTR dereference in uvc_v4l2.c | *1a8d68ca77serial: 8250_dma: terminate correct DMA in tx_dma_flush() | *52d942a530memstick: rtsx_usb_ms: Fix slab-use-after-free in rtsx_usb_ms_drv_remove | *07f8bdce68net: usb: usbnet: restore usb%d name exception for local mac addresses | *794aad077cnet: usb: qmi_wwan: add Telit Cinterion FE990B composition | *8d333fc96cnet: usb: qmi_wwan: add Telit Cinterion FN990B composition | *eb7cfa77f5tty: serial: 8250: Add Brainboxes XC devices | *ded9ea3814tty: serial: 8250: Add some more device IDs | *79aafdf639counter: microchip-tcb-capture: Fix undefined counter channel state on probe | *e0d57d078bcounter: stm32-lptimer-cnt: fix error handling when enabling | *ccd744ac54ALSA: hda/realtek: Support mute LED on HP Laptop 15s-du3xxx | *1ec43100f7netfilter: socket: Lookup orig tuple for IPv6 SNAT | *04805efe86drm/amd/display: Check denominator crb_pipes before used | *79e5030717ARM: Remove address checking for MMUless devices | *01469773dbARM: 9351/1: fault: Add "cut here" line for prefetch aborts | *756992b8d5ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed() | *0ef6e49881atm: Fix NULL pointer dereference | *7582e135f5HID: hid-plantronics: Add mic mute mapping and generalize quirks | *e43621ca43ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names * |e3b905a701Merge 6.1.132 into android14-6.1-lts |\| | *8e60a714baLinux 6.1.132 | *662254a334xfs: give xfs_extfree_intent its own perag reference | *7400fa1729block, bfq: fix re-introduced UAF in bic_set_bfqq() | *49100c0b07mm/migrate: fix shmem xarray update during migration | *4903303f25wifi: iwlwifi: mvm: ensure offloading TID queue exists | *406a037d93fs/ntfs3: Change new sparse cluster processing | *2e13f88e01drm/amdgpu: fix use-after-free bug | *5cfcd32b23arm64: dts: rockchip: fix u2phy1_host status for NanoPi R4S | *4e0713c79cmedia: mediatek: vcodec: Fix VP8 stateless decoder smatch warning | *a12bd67510drm/mediatek: Fix coverity issue with unintentional integer overflow | *2d4a7a091fnetfilter: nft_counter: Use u64_stats_t for statistic. | *4375eee347mptcp: Fix data stream corruption in the address announcement | *19e85e06a0drm/amd/display: Use HW lock mgr for PSR1 when only one eDP | *9c4e202abfksmbd: fix incorrect validation for num_aces field of smb_acl | *a94ad20b07drm/amdgpu: Fix JPEG video caps max size for navi1x and raven | *78b07dada3drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse() | *0a566a79acsoc: qcom: pdr: Fix the potential deadlock | *7993ad7722batman-adv: Ignore own maximum aggregation size during RX | *205649d642xsk: fix an integer overflow in xp_create_and_assign_umem() | *ccb4aef2e7efi/libstub: Avoid physical address 0x0 when doing random allocation | *1091f78287ARM: shmobile: smp: Enforce shmobile_smp_* alignment | *966f331403proc: fix UAF in proc_get_inode() | *b9a1c6e888mmc: atmel-mci: Add missing clk_disable_unprepare() | *be320c2666mmc: sdhci-brcmstb: add cqhci suspend/resume to PM ops | *ea034e2469arm64: dts: freescale: imx8mm-verdin-dahlia: add Microphone Jack to sound card | *270fe5c090regulator: check that dummy regulator has been probed before using it | *83387073e5drm/v3d: Don't run jobs that have errors flagged in its fence | *0bd1486e4bcan: flexcan: disable transceiver during system PM | *06ffbb4d98can: flexcan: only change CAN state when link up in system PM | *a8a89a6d37can: rcar_canfd: Fix page entries in the AFL list | *78f6d8f8fci2c: omap: fix IRQ storms | *18f162e1deRevert "gre: Fix IPv6 link-local address generation." | *04c3f729cfnet/neighbor: add missing policy for NDTPA_QUEUE_LENBYTES | *47e88c6c3cnet: lwtunnel: fix recursion loops | *51e8be9578net: atm: fix use after free in lec_send() | *9dac3f194aipv6: Set errno after ip_fib_metrics_init() in ip6_route_info_create(). | *77c41cdbe6ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw(). | *788ae2ae4cBluetooth: Fix error code in chan_alloc_skb_cb() | *2c160e6868RDMA/hns: Fix wrong value of max_sge_rd | *7b2603ab2fRDMA/hns: Fix a missing rollback in error path of hns_roce_create_qp_common() | *21c3be4924RDMA/hns: Fix unmatched condition in error path of alloc_user_qp_db() | *4104b0023fRDMA/hns: Fix soft lockup during bt pages loop | *652393caf0RDMA/bnxt_re: Avoid clearing VLAN_ID mask in modify qp path | *3a86ceccadARM: dts: bcm2711: Don't mark timer regs unconfigured | *8c936723a4ARM: OMAP1: select CONFIG_GENERIC_IRQ_CHIP | *eb0b0b729aRDMA/bnxt_re: Add missing paranthesis in map_qp_id_to_tbl_indx | *06c5caadc5ARM: dts: bcm2711: PL011 UARTs are actually r1p5 | *e4ab889d8bsoc: imx8m: Unregister cpufreq and soc dev in cleanup path | *296d16538dsoc: imx8m: Use devm_* to simplify probe failure handling | *44f9ffc1fesoc: imx8m: Remove global soc_uid | *e7d05cf159xfrm_output: Force software GSO only in tunnel mode | *0f80c9692aarm64: dts: freescale: tqma8mpql: Fix vqmmc-supply | *177deffb75firmware: imx-scu: fix OF node leak in .probe() | *f4a60d360dsmb: client: fix potential UAF in cifs_dump_full_key() | *e0a545bb4anvme-tcp: Fix a C2HTermReq error message | *66d148204eHID: apple: disable Fn key handling on the Omoton KB066 | *dda134d117smb: client: Fix match_session bug preventing session reuse | *98bbcf4ccasmb3: add support for IAKerb | *0f928c11e7arm64: mm: Populate vmemmap at the page level if not section aligned | *b801f52437i2c: sis630: Fix an error handling path in sis630_probe() | *f5955987f4i2c: ali15x3: Fix an error handling path in ali15x3_probe() | *aa1788edeei2c: ali1535: Fix an error handling path in ali1535_probe() | *9968fcf02ccifs: Fix integer overflow while processing closetimeo mount option | *531cebb515cifs: Fix integer overflow while processing actimeo mount option | *39d086bb35cifs: Fix integer overflow while processing acdirmax mount option | *dd190168e6cifs: Fix integer overflow while processing acregmax mount option | *78cc9c3304scripts: generate_rust_analyzer: add missing macros deps | *d7cfc1a42fscripts: generate_rust_analyzer: provide `cfg`s for `core` and `alloc` | *88a96a6fb1scripts: `make rust-analyzer` for out-of-tree modules | *d266fc89bcscripts: generate_rust_analyzer: Handle sub-modules with no Makefile * |919facc02cMerge99ddc1491b("ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()") into android14-6.1-lts |\| | *99ddc1491bASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() | *0f0302c5fedrm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data() | *694110bc24ASoC: ops: Consistently treat platform_max as control value | *618c6ce834leds: mlxreg: Use devm_mutex_init() for mutex initialization * |6151e5151bRevert "tcp: fix races in tcp_abort()" * |0f8bbe98f1Revert "tcp: fix forever orphan socket caused by tcp_abort" * |c5f96457adMergeb753821e06("tcp: fix forever orphan socket caused by tcp_abort") into android14-6.1-lts |\| | *b753821e06tcp: fix forever orphan socket caused by tcp_abort * |1231f555d1Mergecae9d2b162("tcp: fix races in tcp_abort()") into android14-6.1-lts |\| | *cae9d2b162tcp: fix races in tcp_abort() * |e6079359f7Mergef9d0a13727("lib/buildid: Handle memfd_secret() files in build_id_parse()") into android14-6.1-lts |\| | *f9d0a13727lib/buildid: Handle memfd_secret() files in build_id_parse() | *52229ebbe0rust: Disallow BTF generation with Rust + LTO | *d8bc07d16bqlcnic: fix memory leak issues in qlcnic_sriov_common.c | *7c461a5fb8ASoC: amd: yc: Support mic on another Lenovo ThinkPad E16 Gen 2 model | *fa0809bb2aclk: samsung: update PLL locktime for PLL142XX used on FSD platform * |b2b62f9ec8Merge4964dbc419("drm/amd/display: Fix slab-use-after-free on hdcp_work") into android14-6.1-lts |\| | *4964dbc419drm/amd/display: Fix slab-use-after-free on hdcp_work | *dc831b3868drm/amd/display: Assign normalized_pix_clk when color depth = 14 | *889e55f2fadrm/amd/display: Restore correct backlight brightness after a GPU reset | *e8aeee0d12drm/dp_mst: Fix locking when skipping CSN before topology probing | *d2ab95b8c3drm/atomic: Filter out redundant DPMS calls | *ec52240622x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes | *61a9561642USB: serial: option: match on interface class for Telit FN990B | *7dad504810USB: serial: option: fix Telit Cinterion FE990A name | *bb03a80e67USB: serial: option: add Telit Cinterion FE990B compositions | *58f4fbe6d6USB: serial: ftdi_sio: add support for Altera USB Blaster 3 * |39fddf40ebMerge870e3066fe("Input: i8042 - swap old quirk combination with new quirk for more devices") into android14-6.1-lts |\| | *870e3066feInput: i8042 - swap old quirk combination with new quirk for more devices | *e2ff9a5f7aInput: i8042 - swap old quirk combination with new quirk for several devices | *c08785b0bdInput: i8042 - add required quirks for missing old boardnames | *24af158fe2Input: i8042 - swap old quirk combination with new quirk for NHxxRZQ | *dd889e6a4exfs: remove conditional building of rt geometry validator functions | *23b8ab0c8exfs: reset XFS_ATTR_INCOMPLETE filter on node removal | *858c9d5278xfs: update dir3 leaf block metadata after swap | *a904118d7bxfs: ensure logflagsp is initialized in xfs_bmap_del_extent_real | *6c20890ebfxfs: fix perag leak when growfs fails | *4f4e046caaxfs: add lock protection when remove perag from radix tree | *6587549b08xfs: initialise di_crc in xfs_log_dinode | *87988e80b6xfs: force all buffers to be written during btree bulk load | *ec1d3a6899xfs: recompute growfsrtfree transaction reservation while growing rt volume | *072a9c45d2xfs: remove unused fields from struct xbtree_ifakeroot | *5c29b06524xfs: don't allow overly small or large realtime volumes | *7d568f9d0fxfs: fix 32-bit truncation in xfs_compute_rextslog | *6a258245c5xfs: make rextslog computation consistent with mkfs | *f7a1233bb0xfs: don't leak recovered attri intent items | *c3c049984cxfs: consider minlen sized extents in xfs_rtallocate_extent_block | *e377031115xfs: convert rt bitmap extent lengths to xfs_rtbxlen_t | *6744e7b06cxfs: move the xfs_rtbitmap.c declarations to xfs_rtbitmap.h | *a64e7b6cd1xfs: reserve less log space when recovering log intent items | *5d6f3d30a4xfs: use deferred frees for btree block freeing | *ec35f7567bxfs: fix bounds check in xfs_defer_agfl_block() | *fa91c6969dxfs: validate block number being freed before adding to xefi | *ec81c519e7xfs: pass per-ag references to xfs_free_extent | *ab3b2a70c4xfs: pass the xfs_bmbt_irec directly through the log intent code | *e0e440bfeaxfs: fix confusing xfs_extent_item variable names | *5b99dcc147xfs: pass xfs_extent_free_item directly through the log intent code | *80cca6ecc9xfs: pass refcount intent directly through the log intent code * |01ad57e248Merge9135df0218("io_uring: fix corner case forgetting to vunmap") into android14-6.1-lts |\| | *9135df0218io_uring: fix corner case forgetting to vunmap | *50edea7d4cio_uring: don't attempt to mmap larger than what the user asks for * |abd5ee4e51ANDROID: GKI: Update .stg file based on io_ring_ctx internal change * |4076744180ANDROID: GKI: fix build breakage in io_uring during 6.1.132 merge * |e561be4096Merge9aeb68337a("io_uring: get rid of remap_pfn_range() for mapping rings/sqes") into android14-6.1-lts |\| | *9aeb68337aio_uring: get rid of remap_pfn_range() for mapping rings/sqes * |1627bf5242Merge7710c04d34("mm: add nommu variant of vm_insert_pages()") into android14-6.1-lts |\| | *7710c04d34mm: add nommu variant of vm_insert_pages() * |efc6c26b16Mergea00113dc99("io_uring: add ring freeing helper") into android14-6.1-lts |\| | *a00113dc99io_uring: add ring freeing helper * |468df534e5Merge63e6dc6172("io_uring: return error pointer from io_mem_alloc()") into android14-6.1-lts |\| | *63e6dc6172io_uring: return error pointer from io_mem_alloc() * |bcca1a4a2aMerge8cc4da21a2("block: fix 'kmem_cache of name 'bio-108' already exists'") into android14-6.1-lts |\| | *8cc4da21a2block: fix 'kmem_cache of name 'bio-108' already exists' | *82be3cb72bdrm/nouveau: Do not override forced connector status | *3c6e077b2amptcp: safety check before fallback | *452382b273x86/irq: Define trace events conditionally | *9bd4fa7b52perf/x86/intel: Use better start period for frequency mode | *3cb53dd557fuse: don't truncate cached, mutated symlink | *5c5194a096ASoC: tas2764: Set the SDOUT polarity correctly | *12566097c9ASoC: tas2764: Fix power control mask | *55132107faASoC: tas2770: Fix volume scale | *8c6715b24anvme: only allow entering LIVE from CONNECTING state | *638ffdc4adsctp: Fix undefined behavior in left shift operation | *cd3f60e499nvmet-rdma: recheck queue state is LIVE in state lock in recv done | *6eea8a5c1cnvme-tcp: add basic support for the C2HTermReq PDU | *f404cc4cdenvme-pci: quirk Acer FA100 for non-uniqueue identifiers | *d81ee62948net: wwan: mhi_wwan_mbim: Silence sequence number glitch errors | *e6607c7008ASoC: SOF: Intel: hda: add softdep pre to snd-hda-codec-hdmi module | *5d2ca607adASoC: arizona/madera: use fsleep() in up/down DAPM event delays. | *17458c1193ASoC: rsnd: adjust convert rate limitation | *1ffc9e9423ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime() | *ce0bdc1a74ALSA: hda/realtek: Limit mic boost on Positivo ARN50 | *1a95cff6e1Xen/swiotlb: mark xen_swiotlb_fixup() __init | *6c31c8761athermal/cpufreq_cooling: Remove structure member documentation | *4d293411ads390/cio: Fix CHPID "configure" attribute caching | *4209d21f6fplatform/x86: thinkpad_acpi: Support for V9 DYTC platform profiles | *96850a2a90platform/x86: thinkpad_acpi: Fix invalid fan speed on ThinkPad X120e | *5932970c3fsched: Clarify wake_up_q()'s write to task->wake_q.next | *62a4c7ac84HID: apple: fix up the F6 key on the Omoton KB066 keyboard | *b3047f4c4aHID: hid-apple: Apple Magic Keyboard a3203 USB-C support | *9acdb0059fHID: ignore non-functional sensor in HP 5MP Camera | *3358a3dee6HID: intel-ish-hid: Send clock sync message immediately after reset | *fc16b17906HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell | *89811c6208vboxsf: fix building with GCC 15 | *936041b69aalpha/elf: Fix misc/setarch test of util-linux by removing 32bit support | *6bbed0b3adsmb: client: fix noisy when tree connecting to DFS interlink targets | *ae45fe47ccACPI: resource: IRQ override for Eluktronics MECH-17 | *24602e2664scsi: qla1280: Fix kernel oops when debug level > 2 | *6d816086d7scsi: core: Use GFP_NOIO to avoid circular locking dependency | *9bfa80c8aaiscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() | *e4beb8aa35powercap: call put_device() on an error path in powercap_register_control_type() | *86f653f37bhrtimers: Mark is_migration_base() with __always_inline | *db1daaca25nvme-fc: go straight to connecting state when initializing | *39e507d4f4net/mlx5e: Prevent bridge link show failure for non-eswitch-allowed devices | *86ff45f5f6net/mlx5: Bridge, fix the crash caused by LAG state check | *2532adbfe9net: openvswitch: remove misbehaving actions length check | *b309e75426gre: Fix IPv6 link-local address generation. | *42d5b131danetfilter: nft_exthdr: fix offset with ipv4_find_option() | *e5ee00607bnet_sched: Prevent creation of classes with TC_H_ROOT | *917e520430ipvs: prevent integer overflow in do_ip_vs_get_ctl() | *a62a25c6adnetfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree() | *418119dd3fbonding: fix incorrect MAC address setting to receive NS messages | *af757f5ee3net: switchdev: Convert blocking notification chain to a raw one | *e8e3e03d69eth: bnxt: do not update checksum in bnxt_xdp_build_skb() | *1598307c91net/mlx5: handle errors in mlx5_chains_create_table() | *1c954950f8Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio() | *c40cd24bfbdrm/hyperv: Fix address space leak when Hyper-V DRM device is removed | *486033f577netpoll: hold rcu read lock in __netpoll_send_skb() | *c49e91520dnet: mctp i2c: Copy headers if cloned | *95b5304073net: dsa: mv88e6xxx: Verify after ATU Load ops | *55a173e49fRevert "Bluetooth: hci_core: Fix sleeping function called from invalid context" | *79d50ce658Bluetooth: hci_event: Fix enabling passive scanning | *0272d4af7fwifi: cfg80211: cancel wiphy_work before freeing wiphy | *d02c9acd68sched: address a potential NULL pointer dereference in the GRED scheduler. | *4fe9566512netfilter: nf_conncount: garbage collection is not skipped when jiffies wrap around | *fcbacc47d1ice: fix memory leak in aRFS after reset | *7a91926c76netfilter: nft_ct: Use __refcount_inc() for per-CPU nft_ct_pcpu_template. | *5f7f8d9d46pinctrl: bcm281xx: Fix incorrect regmap max_registers value | *01e8a8111bfbdev: hyperv_fb: iounmap() the correct memory when removing a device | *f9c572d02ffs/ntfs3: Fix shift-out-of-bounds in ntfs_fill_super | *4c3712c15fhrtimer: Use and report correct timerslack values for realtime tasks | *ba181019d1sched/isolation: Prevent boot crash when the boot CPU is nohz_full | *65ae99b51eclockevents/drivers/i8253: Fix stop sequence for timer 0 * |7c1a694998Merge 6.1.131 into android14-6.1-lts |\| | *344a096597Linux 6.1.131 | *5c0729c4c5kbuild: userprogs: use correct lld when linking through clang | *631e00fdacvsock: Orphan socket after transport release | *42b33381e5vsock: Keep the binding until socket destruction | *13a4362ab8bpf, vsock: Invoke proto::close on close() | *effac69091fs/ntfs3: Add rough attr alloc_size check | *dbd3e4adb9media: mediatek: vcodec: Handle invalid decoder vsi | *30652c8cebscsi: lpfc: Fix a possible data race in lpfc_unregister_fcf_rescan() | *1ee2d454banilfs2: handle errors that nilfs_prepare_chunk() may return | *982319391enilfs2: eliminate staggered calls to kunmap in nilfs_rename | *c38a305f2bnilfs2: move page release outside of nilfs_delete_entry and nilfs_set_link | *c07bfa44f9spi-mxs: Fix chipselect glitch | *260c0566e1x86/mm: Don't disable PCID when INVLPG has been fixed by microcode | *de03a57b5cuprobes: Fix race in uprobe_free_utask | *0084a61db6Revert "KVM: PPC: e500: Mark "struct page" dirty in kvmppc_e500_shadow_map()" | *20228df372Revert "KVM: PPC: e500: Mark "struct page" pfn accessed before dropping mmu_lock" | *44603dee08Revert "KVM: PPC: e500: Use __kvm_faultin_pfn() to handle page faults" | *e7d343986aRevert "KVM: e500: always restore irqs" | *3fa1370826ALSA: hda: realtek: fix incorrect IS_REACHABLE() usage | *8427e0b5c1iio: adc: at91-sama5d2_adc: fix sama7g5 realbits value | *a4ee0bee3diio: dac: ad3552r: clear reset status flag | *22638b6fc1iio: filter: admv8818: Force initialization of SDO | *524f29d78cdrivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl | *bbfb0cfdfdeeprom: digsy_mtc: Make GPIO lookup table match the device | *7a5ffadd54bus: mhi: host: pci_generic: Use pci_try_reset_function() to avoid deadlock | *18ae4cee05slimbus: messaging: Free transaction ID in delayed interrupt scenario | *dbd2dc4716drivers: core: fix device leak in __fw_devlink_relax_cycles() | *e130e85633intel_th: pci: Add Panther Lake-P/U support | *926c07237eintel_th: pci: Add Panther Lake-H support | *f630ab2c95intel_th: pci: Add Arrow Lake support | *f42cd9f2c2mei: me: add panther lake P DID | *0ce61dbca7KVM: SVM: Drop DEBUGCTL[5:2] from guest's effective value | *4a12b6c062usb: xhci: Enable the TRB overfetch quirk on VIA VL805 | *9692a67062xhci: pci: Fix indentation in the PCI device ID definitions | *18f827128busb: gadget: Check bmAttributes only if configuration is valid | *79d07d7f30usb: gadget: Fix setting self-powered state on suspend | *b589d49945usb: gadget: Set self-powered based on MaxPower and bmAttributes | *ceafde7ce3usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionality | *871d6eaaffusb: typec: ucsi: increase timeout for PPM reset operations | *a9fa9f461fusb: dwc3: gadget: Prevent irq storm when TH re-executes | *d8e4783444usb: dwc3: Set SUSPENDENABLE soon after phy init | *197e78076cusb: atm: cxacru: fix a flaw in existing endpoint checks | *4ca078084cusb: renesas_usbhs: Flush the notify_hotplug_work | *ad379788a5usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader | *bd7072aefdusb: hub: lack of clearing xHC resources | *f2ae16f71busb: renesas_usbhs: Use devm_usb_get_phy() | *3d7f7a149cusb: renesas_usbhs: Call clk_put() | *a55aa36d45Revert "drivers/card_reader/rtsx_usb: Restore interrupt based detection" | *1f59fc0d00gpio: rcar: Fix missing of_node_put() call | *09418e5946net: ipv6: fix missing dst ref drop in ila lwtunnel | *e8defaef4cnet: ipv6: fix dst ref loop in ila lwtunnel | *000c9ee439sched/fair: Fix potential memory corruption in child_cfs_rq_on_list | *6aae16a973ublk: set_params: properly check if parameters can be applied | *acbcb74ee0net-timestamp: support TCP GSO case for a few missing flags | *bb08e1d61bexfat: fix soft lockup in exfat_clear_bitmap | *2b0cbcf852x86/sgx: Fix size overflows in sgx_encl_create() | *5a515d13e1vlan: enforce underlying device type | *3de809a768ppp: Fix KMSAN uninit-value warning with bpf | *33244e98aanet: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error | *4393452e6cbe2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink | *957d8036f8drm/sched: Fix preprocessor guard | *f463358c61hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe() | *17f86e2543llc: do not use skb_get() before dev_queue_xmit() | *48eb7e67c1ALSA: usx2y: validate nrpacks module parameter on probe | *7d0f113aadhwmon: (ad7314) Validate leading zero bits and return error | *2903c12261hwmon: (ntc_thermistor) Fix the ncpXXxh103 sensor table | *afaf7f4516hwmon: (pmbus) Initialise page count in pmbus_identify() | *29e0cd296ccaif_virtio: fix wrong pointer check in cfv_probe() | *e8db705378net: gso: fix ownership in __udp_gso_segment | *4d1a05cc0bnvmet-tcp: Fix a possible sporadic response drops in weakly ordered arch | *f5631307e3bluetooth: btusb: Initialize .owner field of force_poll_sync_fops | *cf1a6015d2HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove() | *52488583e7HID: google: fix unused variable warning under !CONFIG_ACPI | *88ed69f924wifi: iwlwifi: limit printed string from FW file | *90c30bed20mm: don't skip arch_sync_kernel_mappings() in error paths | *d0f491ccfdmm/page_alloc: fix uninitialized variable | *30f67c1048block: fix conversion of GPT partition name to 7-bit | *d09cf51421s390/traps: Fix test_monitor_call() inline assembly | *469761d254dma: kmsan: export kmsan_handle_dma() for modules | *a5f5e520e8rapidio: fix an API misues when rio_add_net() fails | *ad82be4298rapidio: add check for rio_add_net() in rio_scan_alloc_net() | *236f41ca72wifi: nl80211: reject cooked mode if it is set along with other flags | *f4112cb477wifi: cfg80211: regulatory: improve invalid hints checking | *dc516e66fbBluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected() | *37785a0104Bluetooth: Add check for mgmt_alloc_skb() in mgmt_remote_name() | *f1404f368cmptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr | *9ccee498a8x86/cpu: Properly parse CPUID leaf 0x2 TLB descriptor 0x63 | *336ab3ea08x86/cpu: Validate CPUID leaf 0x2 EDX output | *cfe0ecf6cex86/cacheinfo: Validate CPUID leaf 0x2 EDX output | *85e3d5ba5dplatform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e | *15e3a8cc4edrm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M | *c1e54752dcdrm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params | *010cd94654ALSA: hda/realtek: update ALC222 depop optimize | *dc209114b2ALSA: hda/realtek - add supported Mic Mute LED for Lenovo platform | *4115d28c04ALSA: hda: intel: Add Dell ALC3271 to power_save denylist | *9334c88fc2gpio: aggregator: protect driver attr handlers against module unload | *3e300913c4gpio: rcar: Use raw_spinlock to protect register access | *11e0e74e14ksmbd: fix bug on trap in smb2_lock | *410ce35a2eksmbd: fix use-after-free in smb2_lock | *6321bbda42ksmbd: fix type confusion via race condition when using ipc_msg_send_request | *8d39eb8c5eHID: appleir: Fix potential NULL dereference at raw event handle | *12333d3362LoongArch: Convert unreachable() to BUG() | *4b46c6e1edRevert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'" | *0c65d13bdcx86/amd_nb: Use rdmsr_safe() in amd_get_mmconfig_range() | *2ff298cca9x86/speculation: Add __update_spec_ctrl() helper | *d2d7ee96cccpuidle, intel_idle: Fix CPUIDLE_FLAG_IBRS | *b3b35ff81edrm/amdgpu: disable BAR resize on Dell G5 SE | *b0b6f8b533drm/amdgpu: Check extended configuration space register when system uses large bar | *c2b3f2af0aibmvnic: Inspect header requirements before using scrq direct | *30875b69e3ibmvnic: Perform tx CSO during send scrq direct * |727d125cb5ANDROID: GKI: fix crc change in __icmp_send * |193ff8b1d4Merge branch 'android14-6.1' into android14-6.1-lts * |a54c40cad2Merge 6.1.130 into android14-6.1-lts |\| | *6ae7ac5c42Linux 6.1.130 | *eeb62bb4camedia: mtk-vcodec: potential null pointer deference in SCP | *020ecb7681pfifo_tail_enqueue: Drop new packet when sch->limit == 0 | *5b99dea796Squashfs: check the inode number is not the invalid value of zero | *c72eda07d1mm/memory: Use exception ip to search exception tables | *7b425f542fptrace: Introduce exception_ip arch hook | *ef3bc90758intel_idle: Handle older CPUs, which stop the TSC in deeper C states, correctly | *b6eac41932amdgpu/pm/legacy: fix suspend/resume issues | *070fda699ddrm/amd/display: fixed integer types and null check locations | *ee3ab05cf7riscv/futex: sign extend compare value in atomic cmpxchg | *84586322e0sched/core: Prevent rescheduling when interrupts are disabled | *8ada478c44vmlinux.lds: Ensure that const vars with relocations are mapped R/O | *1489b2dd23mptcp: reset when MPTCP opts are dropped after join | *8116fb4acdmptcp: always handle address removal under msk socket lock | *f19009e4c7phy: exynos5-usbdrd: fix MPLL_MULTIPLIER and SSC_REFCLKSEL masks in refclk | *14d1a86563phy: tegra: xusb: reset VBUS & ID OVERRIDE | *39f843e486net: enetc: fix the off-by-one issue in enetc_map_tx_tso_buffs() | *45b8d6ce93net: enetc: correct the xdp_tx statistics | *88304bb7b3net: enetc: update UDP checksum when updating originTimestamp field | *c55a98def7net: enetc: keep track of correct Tx BD count in enetc_map_tx_tso_buffs() | *046e2669e9net: enetc: fix the off-by-one issue in enetc_map_tx_buffs() | *67ebc3391cusbnet: gl620a: fix endpoint checking in genelink_bind() | *545b563eb0i2c: npcm: disable interrupt enable bit before devm_request_irq | *abb00a9a85drm/amd/display: Fix HPD after gpu reset | *64f3a3523ddrm/amd/display: Disable PSR-SU on eDP panels | *295fadbd3eperf/core: Fix low freq setting via IOC_PERIOD | *25a9171d9aperf/x86: Fix low freqency setting issue | *3b8c444e5dALSA: usb-audio: Re-add sample rate quirk for Pioneer DJM-900NXS2 | *9927752278ftrace: Avoid potential division by zero in function_stat_show() | *5ae1b18f05tracing: Fix bad hist from corrupting named_triggers list | *950866c9a1phy: rockchip: naneng-combphy: compatible reset with old DT | *776eaba5b6x86/CPU: Fix warm boot hang regression on AMD SC1100 SoC systems | *93cff66ff0io_uring/net: save msg_control for compat | *c4cb2bfa99uprobes: Reject the shared zeropage in uprobe_write_opcode() | *476c1dfefamm: Don't pin ZERO_PAGE in pin_user_pages() | *cffd76d4e9net: ipv6: fix dst ref loop on input in rpl lwt | *4c12c3c8abnet: ipv6: rpl_iptunnel: mitigate 2-realloc issue | *7f9aabbadfnet: ipv6: fix dst ref loop on input in seg6 lwt | *c447c5a9c4net: ipv6: seg6_iptunnel: mitigate 2-realloc issue | *daff29e076include: net: add static inline dst_dev_overhead() to dst.h | *cd60e8edfcnet/mlx5: IRQ, Fix null string in debug print | *36c72334bfnet: mvpp2: cls: Fixed Non IP flow, with vlan tag flow defination. | *320cb2d549net: Clear old fragment checksum value in napi_reuse_skb | *57cf8c5a7atcp: Defer ts_recent changes until req is owned | *be5a87bd83ipvs: Always clear ipvs_property flag in skb_scrub_packet() | *09e9fe147eASoC: es8328: fix route from DAC to output | *90ed67b03anet: cadence: macb: Synchronize stats calculations | *5b8dea8d16ipvlan: ensure network headers are in skb linear part | *7a62b1e441ipvlan: Prepare ipvlan_process_v4_outbound() to future .flowi4_tos conversion. | *3e8520bca5ipv4: Convert ip_route_input() to dscp_t. | *671fcbf9d1ipv4: Convert icmp_route_lookup() to dscp_t. | *ab5c0db825ipvlan: Unmask upper DSCP bits in ipvlan_process_v4_outbound() | *eaba5f6743ipv4: icmp: Unmask upper DSCP bits in icmp_route_lookup() | *28e46a8c21ipv4: icmp: Pass full DS field to ip_route_input() | *524c341cb1net/ipv4: add tracepoint for icmp_send | *1774ba1faanet: set the minimum for net_hotdata.netdev_budget_usecs | *461fb89121net: loopback: Avoid sending IP packets without an Ethernet header | *3f0ecb5b1bafs: Fix the server_list to unuse a displaced server rather than putting it | *1dac4025ebafs: Make it possible to find the volumes that are using a server | *916e5a561eafs: remove variable nr_servers | *31caad0f59Bluetooth: L2CAP: Fix L2CAP_ECRED_CONN_RSP response | *4eb6de4176ALSA: usb-audio: Avoid dropping MIDI events at closing multiple ports | *ddb610241bsunrpc: suppress warnings for unused procfs functions | *7051b8df67RDMA/mlx5: Fix bind QP error cleanup flow | *0282f5afe0scsi: core: Clear driver private data when retrying request | *65344e7363SUNRPC: Prevent looping due to rpc_signal_task() races | *6f0e029eadSUNRPC: convert RPC_TASK_* constants to enum | *a7c41830ffovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up | *a18dc2d702IB/mlx5: Set and get correct qp_num for a DCT QP | *3fa58a6fbdnetfilter: allow exp not to be removed in nf_ct_find_expectation | *cd29155818spi: atmel-quadspi: Fix wrong register value written to MR | *02225f59a0spi: atmel-quadspi: Avoid overwriting delay register settings | *d48890ef87media: mediatek: vcodec: Fix H264 multi stateless decoder smatch warning | *ada4ca5fd5block, bfq: fix bfqq uaf in bfq_limit_depth() | *eca0025faablock, bfq: split sync bfq_queues on a per-actuator basis | *cd78b738bcx86/cpu/kvm: SRSO: Fix possible missing IBPB on VM-Exit | *aecca7b459ftrace: Do not add duplicate entries in subops manager ops | *8096f2de05ftrace: Correct preemption accounting for function tracing. | *d42364dd66EDAC/qcom: Correct interrupt enable register configuration | *24e8e4523dsmb: client: Add check for next_buffer in receive_encrypted_standard() | *5801ed1c0bmtd: rawnand: cadence: fix incorrect device in dma_unmap_single | *e630d32162mtd: rawnand: cadence: use dma_map_resource for sdma address | *51a8a44e56mtd: rawnand: cadence: fix error code in cadence_nand_init() | *0a0c255c39mm,madvise,hugetlb: check for 0-length range after end address adjustment | *1ffa1bfc56acct: block access to kernel internal filesystems | *5ee8da9beaacct: perform last write from workqueue | *e2b7b9e4a4ALSA: hda/conexant: Add quirk for HP ProBook 450 G4 mute LED | *1bb8c9cd59ALSA: hda: Add error check for snd_ctl_rename_id() in snd_hda_create_dig_out_ctls() | *fde718a585ASoC: fsl_micfil: Enable default case in micfil_set_quality() | *1358d8e07anfp: bpf: Add check for nfp_app_ctrl_msg_alloc() | *fcfc00bfecdrop_monitor: fix incorrect initialization order | *ec18520f5etee: optee: Fix supplicant wait loop | *64d31ab8c4drm/i915: Make sure all planes in use by the joiner have their crtc included | *7e75ccfba9drm/msm/dpu: Disable dither in phys encoder cleanup | *36c22125e5bpf: skip non exist keys in generic_map_lookup_batch | *85f5a43484nvme/ioctl: add missing space in err message | *b5065a10b9drm/msm/dpu: Don't leak bits_per_component into random DSC_ENC fields | *7f7f3f42e8nouveau/svm: fix missing folio unlock + put after make_device_exclusive_range() | *51ae6861c4power: supply: da9150-fg: fix potential overflow | *de9be9c3ecbpf: Fix wrong copied_seq calculation | *e410fd6004strparser: Add read_sock callback | *f615fccfc6bpf, test_run: Fix use-after-free issue in eth_skb_pkt_type() | *16985c0980drm/rcar-du: dsi: Fix PHY lock bit check | *ff319c9f22drm/tidss: Fix race condition while handling interrupt registers | *36a6e21706drm/tidss: Add simple K2G manual reset * |2785dc9ddeANDROID: GKI: Fix CRC issue with change to include/net/tcp.h * |87c6ad8371Merge87858bbf21("tcp: drop secpath at the same time as we currently drop dst") into android14-6.1-lts |\| | *87858bbf21tcp: drop secpath at the same time as we currently drop dst * |3a51c14aa9Mergecb7bea9887("net: axienet: Set mac_managed_pm") into android14-6.1-lts |\| | *cb7bea9887net: axienet: Set mac_managed_pm | *a0bad5c7c2arp: switch to dev_getbyhwaddr() in arp_req_set_public() | *0f038b9454net: Add non-RCU dev_getbyhwaddr() helper | *cce3ccc0abflow_dissector: Fix port range key handling in BPF conversion | *8d984c604dflow_dissector: Fix handling of mixed port and port-range keys | *20825e9c4cgeneve: Suppress list corruption splat in geneve_destroy_tunnels(). | *b70fa591b0gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl(). | *501ac6a7e2ibmvnic: Don't reference skb after sending to VIOS | *c9543af809ibmvnic: Add stat for tx direct vs tx batched | *a6a19d29fbibmvnic: Introduce send sub-crq direct | *b92f24529eibmvnic: Return error code on TX scrq flush fail | *36069c768fALSA: hda/cirrus: Correct the full scale volume set logic | *904e746b2egeneve: Fix use-after-free in geneve_find_dev(). | *c905a30535powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC | *f67713b216ALSA: hda/realtek: Fixup ALC225 depop procedure | *10a293b085powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline | *e574bf58c3powerpc/64s/mm: Move __real_pte stubs into hash-4k.h | *5a0b0bc44fASoC: rockchip: i2s-tdm: fix shift config for SND_SOC_DAIFMT_DSP_[AB] | *24a942610eUSB: gadget: f_midi: f_midi_complete to call queue_work | *e3bc1a9a67usb: gadget: core: flush gadget workqueue after device removal | *7fb673f0f1USB: gadget: core: create sysfs link between udc and gadget * |208e9672dbMergeac18d78146("media: uvcvideo: Remove dangling pointers") into android14-6.1-lts |\| | *ac18d78146media: uvcvideo: Remove dangling pointers | *b4d266503dmedia: uvcvideo: Only save async fh if success | *9b3e69b5a9media: uvcvideo: Refactor iterators | *3c00e94d00media: uvcvideo: Fix crash during unbind if gpio unit is in use | *ce8d2e914bmedia: Switch to use dev_err_probe() helper | *4a7c475137soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove | *9b9375831dsoc/mediatek: mtk-devapc: Convert to platform remove callback returning void | *ae86c01537soc: mediatek: mtk-devapc: Fix leaking IO map on error paths | *69fa8a45ebsoc: mediatek: mtk-devapc: Switch to devm_clk_get_enabled() | *77779d1258tpm: Change to kvalloc() in eventlog/acpi.c | *7a72242c9btpm: Use managed allocation for bios event log | *19bb4fc2abarm64: dts: qcom: sm8450: Fix CDSP memory length | *8ae7a709f6arm64: dts: qcom: trim addresses to 8 digits | *257fa56e89arm64: dts: mediatek: mt8183: Disable DSI display output by default | *4cc8b0110cscsi: core: Do not retry I/Os during depopulation | *79a43ee6ecscsi: core: Handle depopulation and restoration in progress | *5c1e84bc75ASoC: renesas: rz-ssi: Add a check for negative sample_space | *f39ec4e62cclk: mediatek: mt2701-img: add missing dummy clk | *67e7bcc0bbclk: mediatek: mt2701-bdp: add missing dummy clk | *dc7378acd6clk: mediatek: mt2701-vdec: fix conversion to mtk_clk_simple_probe | *58af6b786aclk: mediatek: clk-mtk: Add dummy clock ops | *5c5b0e363bBluetooth: qca: Fix poor RF performance for WCN6855 | *55d69a2d2aBluetooth: qca: Update firmware-name to support board specific nvm | *e3c4cc00e1Bluetooth: qca: Support downloading board id specific NVM for WCN7850 * |e9df7dc25aMerge0986efc3c7("spi: atmel-qspi: Memory barriers after memory-mapped I/O") into android14-6.1-lts |\| | *0986efc3c7spi: atmel-qspi: Memory barriers after memory-mapped I/O | *c788bfef89spi: atmel-quadspi: Create `atmel_qspi_ops` to support newer SoC families | *756bb7c73fspi: atmel-quadspi: switch to use modern name | *baaad6765aspi: atmel-quadspi: Add support for configuring CS timing * |9212df9856Merge0a09d56e16("memcg: fix soft lockup in the OOM process") into android14-6.1-lts |/ *0a09d56e16memcg: fix soft lockup in the OOM process *2ea4658783mm: update mark_victim tracepoints fields *032fa54f48md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime *249d9b9da2md/md-bitmap: add 'sync_size' into struct md_bitmap_stats *e83e6ea589md/md-cluster: fix spares warnings for __le64 *e5c4b7b19bmd/md-bitmap: replace md_bitmap_status() with a new helper md_bitmap_get_stats() *a27c597f26arm64: mte: Do not allow PROT_MTE on MAP_HUGETLB user mappings Change-Id: I49eabb79ab13e7f138664d9fb38f9b3e0f9c116a Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -113,6 +113,12 @@ pages:
|
||||
This also leads to limitations: there are only 31-10==21 bits available for a
|
||||
counter that increments 10 bits at a time.
|
||||
|
||||
* Because of that limitation, special handling is applied to the zero pages
|
||||
when using FOLL_PIN. We only pretend to pin a zero page - we don't alter its
|
||||
refcount or pincount at all (it is permanent, so there's no need). The
|
||||
unpinning functions also don't do anything to a zero page. This is
|
||||
transparent to the caller.
|
||||
|
||||
* Callers must specifically request "dma-pinned tracking of pages". In other
|
||||
words, just calling get_user_pages() will not suffice; a new set of functions,
|
||||
pin_user_page() and related, must be used.
|
||||
|
||||
@@ -112,7 +112,7 @@ Functions
|
||||
Callbacks
|
||||
=========
|
||||
|
||||
There are six callbacks:
|
||||
There are seven callbacks:
|
||||
|
||||
::
|
||||
|
||||
@@ -182,6 +182,13 @@ There are six callbacks:
|
||||
the length of the message. skb->len - offset may be greater
|
||||
then full_len since strparser does not trim the skb.
|
||||
|
||||
::
|
||||
|
||||
int (*read_sock)(struct strparser *strp, read_descriptor_t *desc,
|
||||
sk_read_actor_t recv_actor);
|
||||
|
||||
The read_sock callback is used by strparser instead of
|
||||
sock->ops->read_sock, if provided.
|
||||
::
|
||||
|
||||
int (*read_sock_done)(struct strparser *strp, int err);
|
||||
|
||||
@@ -129,11 +129,8 @@ adaptive-tick CPUs: At least one non-adaptive-tick CPU must remain
|
||||
online to handle timekeeping tasks in order to ensure that system
|
||||
calls like gettimeofday() returns accurate values on adaptive-tick CPUs.
|
||||
(This is not an issue for CONFIG_NO_HZ_IDLE=y because there are no running
|
||||
user processes to observe slight drifts in clock rate.) Therefore, the
|
||||
boot CPU is prohibited from entering adaptive-ticks mode. Specifying a
|
||||
"nohz_full=" mask that includes the boot CPU will result in a boot-time
|
||||
error message, and the boot CPU will be removed from the mask. Note that
|
||||
this means that your system must have at least two CPUs in order for
|
||||
user processes to observe slight drifts in clock rate.) Note that this
|
||||
means that your system must have at least two CPUs in order for
|
||||
CONFIG_NO_HZ_FULL=y to do anything for you.
|
||||
|
||||
Finally, adaptive-ticks CPUs must have their RCU callbacks offloaded.
|
||||
|
||||
18
Makefile
18
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 129
|
||||
SUBLEVEL = 134
|
||||
EXTRAVERSION =
|
||||
NAME = Curry Ramen
|
||||
|
||||
@@ -1155,6 +1155,11 @@ endif
|
||||
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
|
||||
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
|
||||
|
||||
# userspace programs are linked via the compiler, use the correct linker
|
||||
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
|
||||
KBUILD_USERLDFLAGS += $(call cc-option, --ld-path=$(LD))
|
||||
endif
|
||||
|
||||
# make the checker run with the right architecture
|
||||
CHECKFLAGS += --arch=$(ARCH)
|
||||
|
||||
@@ -1887,11 +1892,6 @@ rustfmt:
|
||||
rustfmtcheck: rustfmt_flags = --check
|
||||
rustfmtcheck: rustfmt
|
||||
|
||||
# IDE support targets
|
||||
PHONY += rust-analyzer
|
||||
rust-analyzer:
|
||||
$(Q)$(MAKE) $(build)=rust $@
|
||||
|
||||
# Misc
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -1946,6 +1946,7 @@ help:
|
||||
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'
|
||||
@echo ' (default: $(abspath $(INSTALL_HDR_PATH)))'
|
||||
@echo ' clean - remove generated files in module directory only'
|
||||
@echo ' rust-analyzer - generate rust-project.json rust-analyzer support file'
|
||||
@echo ''
|
||||
|
||||
endif # KBUILD_EXTMOD
|
||||
@@ -2084,6 +2085,11 @@ quiet_cmd_tags = GEN $@
|
||||
tags TAGS cscope gtags: FORCE
|
||||
$(call cmd,tags)
|
||||
|
||||
# IDE support targets
|
||||
PHONY += rust-analyzer
|
||||
rust-analyzer:
|
||||
$(Q)$(MAKE) $(build)=rust $@
|
||||
|
||||
# Script to generate missing namespace dependencies
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -133625,6 +133625,12 @@ member {
|
||||
type_id: 0x6720d32f
|
||||
offset: 128
|
||||
}
|
||||
member {
|
||||
id: 0xffaa3920
|
||||
name: "n_ring_pages"
|
||||
type_id: 0xc93e017b
|
||||
offset: 10624
|
||||
}
|
||||
member {
|
||||
id: 0xeebfc981
|
||||
name: "n_rules"
|
||||
@@ -133648,6 +133654,12 @@ member {
|
||||
type_id: 0x295c7202
|
||||
offset: 304
|
||||
}
|
||||
member {
|
||||
id: 0x3543ba34
|
||||
name: "n_sqe_pages"
|
||||
type_id: 0xc93e017b
|
||||
offset: 10640
|
||||
}
|
||||
member {
|
||||
id: 0x998218ab
|
||||
name: "n_ssids"
|
||||
@@ -170604,6 +170616,12 @@ member {
|
||||
name: "ring_mask"
|
||||
type_id: 0xc9082b19
|
||||
}
|
||||
member {
|
||||
id: 0x44db695c
|
||||
name: "ring_pages"
|
||||
type_id: 0x0b30ee00
|
||||
offset: 10688
|
||||
}
|
||||
member {
|
||||
id: 0x44db6fdd
|
||||
name: "ring_pages"
|
||||
@@ -185184,6 +185202,12 @@ member {
|
||||
type_id: 0xb914bfab
|
||||
offset: 64
|
||||
}
|
||||
member {
|
||||
id: 0xce17811e
|
||||
name: "sqe_pages"
|
||||
type_id: 0x0b30ee00
|
||||
offset: 10752
|
||||
}
|
||||
member {
|
||||
id: 0xe005d64f
|
||||
name: "sqo_sq_wait"
|
||||
@@ -241540,7 +241564,7 @@ struct_union {
|
||||
kind: STRUCT
|
||||
name: "io_ring_ctx"
|
||||
definition {
|
||||
bytesize: 1344
|
||||
bytesize: 1408
|
||||
member_id: 0x2c717118
|
||||
member_id: 0x246f2632
|
||||
member_id: 0x7adfc058
|
||||
@@ -241582,6 +241606,10 @@ struct_union {
|
||||
member_id: 0x31444ba6
|
||||
member_id: 0x1d068fc6
|
||||
member_id: 0xd2c00a64
|
||||
member_id: 0xffaa3920
|
||||
member_id: 0x3543ba34
|
||||
member_id: 0x44db695c
|
||||
member_id: 0xce17811e
|
||||
}
|
||||
}
|
||||
struct_union {
|
||||
|
||||
@@ -137,3 +137,10 @@ type 'struct geni_wrapper' changed
|
||||
member 'struct clk_bulk_data clks[2]' was added
|
||||
member 'unsigned int num_clks' was added
|
||||
|
||||
type 'struct io_ring_ctx' changed
|
||||
byte size changed from 1344 to 1408
|
||||
member 'unsigned short n_ring_pages' was added
|
||||
member 'unsigned short n_sqe_pages' was added
|
||||
member 'struct page** ring_pages' was added
|
||||
member 'struct page** sqe_pages' was added
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
|
||||
/*
|
||||
* This is used to ensure we don't load something for the wrong architecture.
|
||||
*/
|
||||
#define elf_check_arch(x) ((x)->e_machine == EM_ALPHA)
|
||||
#define elf_check_arch(x) (((x)->e_machine == EM_ALPHA) && !((x)->e_flags & EF_ALPHA_32BIT))
|
||||
|
||||
/*
|
||||
* These are used to set parameters in the core dumps.
|
||||
@@ -145,10 +145,6 @@ extern int dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task);
|
||||
: amask (AMASK_CIX) ? "ev6" : "ev67"); \
|
||||
})
|
||||
|
||||
#define SET_PERSONALITY(EX) \
|
||||
set_personality(((EX).e_flags & EF_ALPHA_32BIT) \
|
||||
? PER_LINUX_32BIT : PER_LINUX)
|
||||
|
||||
extern int alpha_l1i_cacheshape;
|
||||
extern int alpha_l1d_cacheshape;
|
||||
extern int alpha_l2_cacheshape;
|
||||
|
||||
@@ -322,7 +322,7 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
|
||||
|
||||
extern void paging_init(void);
|
||||
|
||||
/* We have our own get_unmapped_area to cope with ADDR_LIMIT_32BIT. */
|
||||
/* We have our own get_unmapped_area */
|
||||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
|
||||
#endif /* _ALPHA_PGTABLE_H */
|
||||
|
||||
@@ -8,23 +8,19 @@
|
||||
#ifndef __ASM_ALPHA_PROCESSOR_H
|
||||
#define __ASM_ALPHA_PROCESSOR_H
|
||||
|
||||
#include <linux/personality.h> /* for ADDR_LIMIT_32BIT */
|
||||
|
||||
/*
|
||||
* We have a 42-bit user address space: 4TB user VM...
|
||||
*/
|
||||
#define TASK_SIZE (0x40000000000UL)
|
||||
|
||||
#define STACK_TOP \
|
||||
(current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
|
||||
#define STACK_TOP (0x00120000000UL)
|
||||
|
||||
#define STACK_TOP_MAX 0x00120000000UL
|
||||
|
||||
/* This decides where the kernel will search for a free chunk of vm
|
||||
* space during mmap's.
|
||||
*/
|
||||
#define TASK_UNMAPPED_BASE \
|
||||
((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
|
||||
#define TASK_UNMAPPED_BASE (TASK_SIZE / 2)
|
||||
|
||||
/* This is dead. Everything has been moved to thread_info. */
|
||||
struct thread_struct { };
|
||||
|
||||
@@ -1213,8 +1213,7 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Get an address range which is currently unmapped. Similar to the
|
||||
generic version except that we know how to honor ADDR_LIMIT_32BIT. */
|
||||
/* Get an address range which is currently unmapped. */
|
||||
|
||||
static unsigned long
|
||||
arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
|
||||
@@ -1236,13 +1235,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
|
||||
unsigned long len, unsigned long pgoff,
|
||||
unsigned long flags)
|
||||
{
|
||||
unsigned long limit;
|
||||
|
||||
/* "32 bit" actually means 31 bit, since pointers sign extend. */
|
||||
if (current->personality & ADDR_LIMIT_32BIT)
|
||||
limit = 0x80000000;
|
||||
else
|
||||
limit = TASK_SIZE;
|
||||
unsigned long limit = TASK_SIZE;
|
||||
|
||||
if (len > limit)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
<&clocks BCM2835_CLOCK_VPU>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
arm,primecell-periphid = <0x00241011>;
|
||||
arm,primecell-periphid = <0x00341011>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
<&clocks BCM2835_CLOCK_VPU>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
arm,primecell-periphid = <0x00241011>;
|
||||
arm,primecell-periphid = <0x00341011>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
<&clocks BCM2835_CLOCK_VPU>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
arm,primecell-periphid = <0x00241011>;
|
||||
arm,primecell-periphid = <0x00341011>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
<&clocks BCM2835_CLOCK_VPU>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
arm,primecell-periphid = <0x00241011>;
|
||||
arm,primecell-periphid = <0x00341011>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -451,8 +451,6 @@
|
||||
IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
|
||||
IRQ_TYPE_LEVEL_LOW)>;
|
||||
/* This only applies to the ARMv7 stub */
|
||||
arm,cpu-registers-not-fw-configured;
|
||||
};
|
||||
|
||||
cpus: cpus {
|
||||
@@ -1154,6 +1152,7 @@
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
arm,primecell-periphid = <0x00341011>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
|
||||
@@ -101,6 +101,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
poweroff {
|
||||
compatible = "regulator-poweroff";
|
||||
cpu-supply = <&vgen2_reg>;
|
||||
};
|
||||
|
||||
reg_module_3v3: regulator-module-3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-always-on;
|
||||
@@ -220,10 +225,6 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&clks {
|
||||
fsl,pmic-stby-poweroff;
|
||||
};
|
||||
|
||||
/* Apalis SPI1 */
|
||||
&ecspi1 {
|
||||
cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
|
||||
@@ -511,7 +512,6 @@
|
||||
|
||||
pmic: pmic@8 {
|
||||
compatible = "fsl,pfuze100";
|
||||
fsl,pmic-stby-poweroff;
|
||||
reg = <0x08>;
|
||||
|
||||
regulators {
|
||||
|
||||
@@ -9,6 +9,7 @@ menuconfig ARCH_OMAP1
|
||||
select ARCH_OMAP
|
||||
select CLKSRC_MMIO
|
||||
select FORCE_PCI if PCCARD
|
||||
select GENERIC_IRQ_CHIP
|
||||
select GPIOLIB
|
||||
help
|
||||
Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)
|
||||
|
||||
@@ -136,6 +136,7 @@ ENDPROC(shmobile_smp_sleep)
|
||||
.long shmobile_smp_arg - 1b
|
||||
|
||||
.bss
|
||||
.align 2
|
||||
.globl shmobile_smp_mpidr
|
||||
shmobile_smp_mpidr:
|
||||
.space NR_CPUS * 4
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
|
||||
{
|
||||
unsigned long addr = (unsigned long)unsafe_src;
|
||||
|
||||
return addr >= TASK_SIZE && ULONG_MAX - addr >= size;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is useful to dump out the page tables associated with
|
||||
* 'addr' in mm 'mm'.
|
||||
@@ -552,6 +559,7 @@ do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
|
||||
if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
|
||||
return;
|
||||
|
||||
pr_alert("8<--- cut here ---\n");
|
||||
pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n",
|
||||
inf->name, ifsr, addr);
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
"Headphone Jack", "HPOUTR",
|
||||
"IN2L", "Line In Jack",
|
||||
"IN2R", "Line In Jack",
|
||||
"Headphone Jack", "MICBIAS",
|
||||
"IN1L", "Headphone Jack";
|
||||
"Microphone Jack", "MICBIAS",
|
||||
"IN1L", "Microphone Jack";
|
||||
simple-audio-card,widgets =
|
||||
"Microphone", "Headphone Jack",
|
||||
"Microphone", "Microphone Jack",
|
||||
"Headphone", "Headphone Jack",
|
||||
"Line", "Line In Jack";
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright 2021-2022 TQ-Systems GmbH
|
||||
* Author: Alexander Stein <alexander.stein@tq-group.com>
|
||||
* Copyright 2021-2025 TQ-Systems GmbH <linux@ew.tq-group.com>,
|
||||
* D-82229 Seefeld, Germany.
|
||||
* Author: Alexander Stein
|
||||
*/
|
||||
|
||||
#include "imx8mp.dtsi"
|
||||
@@ -23,15 +24,6 @@
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
/* e-MMC IO, needed for HS modes */
|
||||
reg_vcc1v8: regulator-vcc1v8 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "VCC1V8";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
&A53_0 {
|
||||
@@ -194,7 +186,7 @@
|
||||
no-sd;
|
||||
no-sdio;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
vqmmc-supply = <®_vcc1v8>;
|
||||
vqmmc-supply = <&buck5_reg>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -1753,6 +1753,7 @@
|
||||
resets = <&mmsys MT8183_MMSYS_SW0_RST_B_DISP_DSI0>;
|
||||
phys = <&mipi_tx0>;
|
||||
phy-names = "dphy";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mutex: mutex@14016000 {
|
||||
|
||||
@@ -2226,7 +2226,7 @@
|
||||
|
||||
cdsp: remoteproc@98900000 {
|
||||
compatible = "qcom,sm8350-cdsp-pas";
|
||||
reg = <0 0x098900000 0 0x1400000>;
|
||||
reg = <0 0x98900000 0 0x1400000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
|
||||
@@ -2093,7 +2093,7 @@
|
||||
|
||||
remoteproc_adsp: remoteproc@30000000 {
|
||||
compatible = "qcom,sm8450-adsp-pas";
|
||||
reg = <0 0x030000000 0 0x100>;
|
||||
reg = <0 0x30000000 0 0x100>;
|
||||
|
||||
interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -2159,7 +2159,7 @@
|
||||
|
||||
remoteproc_cdsp: remoteproc@32300000 {
|
||||
compatible = "qcom,sm8450-cdsp-pas";
|
||||
reg = <0 0x032300000 0 0x1400000>;
|
||||
reg = <0 0x32300000 0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
};
|
||||
|
||||
&u2phy1_host {
|
||||
status = "disabled";
|
||||
phy-supply = <&vdd_5v>;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
|
||||
@@ -33,9 +33,12 @@ static inline unsigned long arch_calc_vm_flag_bits(struct file *file,
|
||||
* backed by tags-capable memory. The vm_flags may be overridden by a
|
||||
* filesystem supporting MTE (RAM-based).
|
||||
*/
|
||||
if (system_supports_mte() &&
|
||||
((flags & MAP_ANONYMOUS) || shmem_file(file)))
|
||||
return VM_MTE_ALLOWED;
|
||||
if (system_supports_mte()) {
|
||||
if ((flags & MAP_ANONYMOUS) && !(flags & MAP_HUGETLB))
|
||||
return VM_MTE_ALLOWED;
|
||||
if (shmem_file(file))
|
||||
return VM_MTE_ALLOWED;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -368,6 +368,8 @@ int do_compat_alignment_fixup(unsigned long addr, struct pt_regs *regs)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!handler)
|
||||
return 1;
|
||||
type = handler(addr, instr, regs);
|
||||
|
||||
if (type == TYPE_ERROR || type == TYPE_FAULT)
|
||||
|
||||
@@ -1209,8 +1209,11 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
|
||||
pmd_t *pmdp;
|
||||
|
||||
WARN_ON((start < VMEMMAP_START) || (end > VMEMMAP_END));
|
||||
/* [start, end] should be within one section */
|
||||
WARN_ON_ONCE(end - start > PAGES_PER_SECTION * sizeof(struct page));
|
||||
|
||||
if (!ARM64_KERNEL_USES_PMD_MAPS)
|
||||
if (!ARM64_KERNEL_USES_PMD_MAPS ||
|
||||
(end - start < PAGES_PER_SECTION * sizeof(struct page)))
|
||||
return vmemmap_populate_basepages(start, end, node, altmap);
|
||||
|
||||
do {
|
||||
|
||||
@@ -310,8 +310,8 @@ config CMDLINE_BOOTLOADER
|
||||
config CMDLINE_EXTEND
|
||||
bool "Use built-in to extend bootloader kernel arguments"
|
||||
help
|
||||
The command-line arguments provided during boot will be
|
||||
appended to the built-in command line. This is useful in
|
||||
The built-in command line will be appended to the command-
|
||||
line arguments provided during boot. This is useful in
|
||||
cases where the provided arguments are insufficient and
|
||||
you don't want to or cannot modify them.
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#define L1_CACHE_SHIFT CONFIG_L1_CACHE_SHIFT
|
||||
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
||||
|
||||
#define ARCH_DMA_MINALIGN (16)
|
||||
|
||||
#define __read_mostly __section(".data..read_mostly")
|
||||
|
||||
#endif /* _ASM_CACHE_H */
|
||||
|
||||
@@ -126,14 +126,14 @@ void kexec_reboot(void)
|
||||
/* All secondary cpus go to kexec_smp_wait */
|
||||
if (smp_processor_id() > 0) {
|
||||
relocated_kexec_smp_wait(NULL);
|
||||
unreachable();
|
||||
BUG();
|
||||
}
|
||||
#endif
|
||||
|
||||
do_kexec = (void *)reboot_code_buffer;
|
||||
do_kexec(efi_boot, cmdline_ptr, systable_ptr, start_addr, first_ind_entry);
|
||||
|
||||
unreachable();
|
||||
BUG();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -142,6 +142,8 @@ static void build_prologue(struct jit_ctx *ctx)
|
||||
*/
|
||||
if (seen_tail_call(ctx) && seen_call(ctx))
|
||||
move_reg(ctx, TCC_SAVED, REG_TCC);
|
||||
else
|
||||
emit_insn(ctx, nop);
|
||||
|
||||
ctx->stack_size = stack_adjust;
|
||||
}
|
||||
@@ -808,7 +810,10 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext
|
||||
{
|
||||
const u64 imm64 = (u64)(insn + 1)->imm << 32 | (u32)insn->imm;
|
||||
|
||||
move_imm(ctx, dst, imm64, is32);
|
||||
if (bpf_pseudo_func(insn))
|
||||
move_addr(ctx, dst, imm64);
|
||||
else
|
||||
move_imm(ctx, dst, imm64, is32);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,11 @@ struct jit_data {
|
||||
struct jit_ctx ctx;
|
||||
};
|
||||
|
||||
static inline void emit_nop(union loongarch_instruction *insn)
|
||||
{
|
||||
insn->word = INSN_NOP;
|
||||
}
|
||||
|
||||
#define emit_insn(ctx, func, ...) \
|
||||
do { \
|
||||
if (ctx->image != NULL) { \
|
||||
|
||||
@@ -155,6 +155,8 @@ static inline long regs_return_value(struct pt_regs *regs)
|
||||
}
|
||||
|
||||
#define instruction_pointer(regs) ((regs)->cp0_epc)
|
||||
extern unsigned long exception_ip(struct pt_regs *regs);
|
||||
#define exception_ip(regs) exception_ip(regs)
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
|
||||
extern asmlinkage long syscall_trace_enter(struct pt_regs *regs);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <linux/seccomp.h>
|
||||
#include <linux/ftrace.h>
|
||||
|
||||
#include <asm/branch.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpu-info.h>
|
||||
@@ -48,6 +49,12 @@
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/syscalls.h>
|
||||
|
||||
unsigned long exception_ip(struct pt_regs *regs)
|
||||
{
|
||||
return exception_epc(regs);
|
||||
}
|
||||
EXPORT_SYMBOL(exception_ip);
|
||||
|
||||
/*
|
||||
* Called by kernel/ptrace.c when detaching..
|
||||
*
|
||||
|
||||
@@ -78,4 +78,4 @@ CONFIG_DEBUG_VM_PGTABLE=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_BDI_SWITCH=y
|
||||
CONFIG_PPC_EARLY_DEBUG=y
|
||||
CONFIG_GENERIC_PTDUMP=y
|
||||
CONFIG_PTDUMP_DEBUGFS=y
|
||||
|
||||
@@ -89,6 +89,34 @@ static inline int hash__hugepd_ok(hugepd_t hpd)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* With 4K page size the real_pte machinery is all nops.
|
||||
*/
|
||||
static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep, int offset)
|
||||
{
|
||||
return (real_pte_t){pte};
|
||||
}
|
||||
|
||||
#define __rpte_to_pte(r) ((r).pte)
|
||||
|
||||
static inline unsigned long __rpte_to_hidx(real_pte_t rpte, unsigned long index)
|
||||
{
|
||||
return pte_val(__rpte_to_pte(rpte)) >> H_PAGE_F_GIX_SHIFT;
|
||||
}
|
||||
|
||||
#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
|
||||
do { \
|
||||
index = 0; \
|
||||
shift = mmu_psize_defs[psize].shift; \
|
||||
|
||||
#define pte_iterate_hashed_end() } while(0)
|
||||
|
||||
/*
|
||||
* We expect this to be called only for user addresses or kernel virtual
|
||||
* addresses other than the linear mapping.
|
||||
*/
|
||||
#define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
|
||||
|
||||
/*
|
||||
* 4K PTE format is different from 64K PTE format. Saving the hash_slot is just
|
||||
* a matter of returning the PTE bits that need to be modified. On 64K PTE,
|
||||
|
||||
@@ -318,32 +318,6 @@ extern unsigned long pci_io_base;
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/*
|
||||
* This is the default implementation of various PTE accessors, it's
|
||||
* used in all cases except Book3S with 64K pages where we have a
|
||||
* concept of sub-pages
|
||||
*/
|
||||
#ifndef __real_pte
|
||||
|
||||
#define __real_pte(e, p, o) ((real_pte_t){(e)})
|
||||
#define __rpte_to_pte(r) ((r).pte)
|
||||
#define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> H_PAGE_F_GIX_SHIFT)
|
||||
|
||||
#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
|
||||
do { \
|
||||
index = 0; \
|
||||
shift = mmu_psize_defs[psize].shift; \
|
||||
|
||||
#define pte_iterate_hashed_end() } while(0)
|
||||
|
||||
/*
|
||||
* We expect this to be called only for user addresses or kernel virtual
|
||||
* addresses other than the linear mapping.
|
||||
*/
|
||||
#define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
|
||||
|
||||
#endif /* __real_pte */
|
||||
|
||||
static inline unsigned long pte_update(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, unsigned long clr,
|
||||
unsigned long set, int huge)
|
||||
|
||||
@@ -242,7 +242,7 @@ static inline int tlbe_is_writable(struct kvm_book3e_206_tlb_entry *tlbe)
|
||||
return tlbe->mas7_3 & (MAS3_SW|MAS3_UW);
|
||||
}
|
||||
|
||||
static inline bool kvmppc_e500_ref_setup(struct tlbe_ref *ref,
|
||||
static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref,
|
||||
struct kvm_book3e_206_tlb_entry *gtlbe,
|
||||
kvm_pfn_t pfn, unsigned int wimg)
|
||||
{
|
||||
@@ -252,7 +252,11 @@ static inline bool kvmppc_e500_ref_setup(struct tlbe_ref *ref,
|
||||
/* Use guest supplied MAS2_G and MAS2_E */
|
||||
ref->flags |= (gtlbe->mas2 & MAS2_ATTRIB_MASK) | wimg;
|
||||
|
||||
return tlbe_is_writable(gtlbe);
|
||||
/* Mark the page accessed */
|
||||
kvm_set_pfn_accessed(pfn);
|
||||
|
||||
if (tlbe_is_writable(gtlbe))
|
||||
kvm_set_pfn_dirty(pfn);
|
||||
}
|
||||
|
||||
static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref)
|
||||
@@ -322,7 +326,6 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
{
|
||||
struct kvm_memory_slot *slot;
|
||||
unsigned long pfn = 0; /* silence GCC warning */
|
||||
struct page *page = NULL;
|
||||
unsigned long hva;
|
||||
int pfnmap = 0;
|
||||
int tsize = BOOK3E_PAGESZ_4K;
|
||||
@@ -334,7 +337,6 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
unsigned int wimg = 0;
|
||||
pgd_t *pgdir;
|
||||
unsigned long flags;
|
||||
bool writable = false;
|
||||
|
||||
/* used to check for invalidations in progress */
|
||||
mmu_seq = kvm->mmu_invalidate_seq;
|
||||
@@ -444,7 +446,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
|
||||
if (likely(!pfnmap)) {
|
||||
tsize_pages = 1UL << (tsize + 10 - PAGE_SHIFT);
|
||||
pfn = __kvm_faultin_pfn(slot, gfn, FOLL_WRITE, NULL, &page);
|
||||
pfn = gfn_to_pfn_memslot(slot, gfn);
|
||||
if (is_error_noslot_pfn(pfn)) {
|
||||
if (printk_ratelimit())
|
||||
pr_err("%s: real page not found for gfn %lx\n",
|
||||
@@ -479,6 +481,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
if (pte_present(pte)) {
|
||||
wimg = (pte_val(pte) >> PTE_WIMGE_SHIFT) &
|
||||
MAS2_WIMGE_MASK;
|
||||
local_irq_restore(flags);
|
||||
} else {
|
||||
local_irq_restore(flags);
|
||||
pr_err_ratelimited("%s: pte not present: gfn %lx,pfn %lx\n",
|
||||
@@ -487,9 +490,8 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
local_irq_restore(flags);
|
||||
kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
|
||||
|
||||
writable = kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
|
||||
kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize,
|
||||
ref, gvaddr, stlbe);
|
||||
|
||||
@@ -497,8 +499,11 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
kvmppc_mmu_flush_icache(pfn);
|
||||
|
||||
out:
|
||||
kvm_release_faultin_page(kvm, page, !!ret, writable);
|
||||
spin_unlock(&kvm->mmu_lock);
|
||||
|
||||
/* Drop refcount on page, so that mmu notifiers can clear it */
|
||||
kvm_release_pfn_clean(pfn);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ static int text_area_cpu_up(unsigned int cpu)
|
||||
unsigned long addr;
|
||||
int err;
|
||||
|
||||
area = get_vm_area(PAGE_SIZE, VM_ALLOC);
|
||||
area = get_vm_area(PAGE_SIZE, 0);
|
||||
if (!area) {
|
||||
WARN_ONCE(1, "Failed to create text area for cpu %d\n",
|
||||
cpu);
|
||||
|
||||
@@ -25,6 +25,7 @@ struct spu_gang *alloc_spu_gang(void)
|
||||
mutex_init(&gang->aff_mutex);
|
||||
INIT_LIST_HEAD(&gang->list);
|
||||
INIT_LIST_HEAD(&gang->aff_list_head);
|
||||
gang->alive = 1;
|
||||
|
||||
out:
|
||||
return gang;
|
||||
|
||||
@@ -191,13 +191,32 @@ static int spufs_fill_dir(struct dentry *dir,
|
||||
return -ENOMEM;
|
||||
ret = spufs_new_file(dir->d_sb, dentry, files->ops,
|
||||
files->mode & mode, files->size, ctx);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dput(dentry);
|
||||
return ret;
|
||||
}
|
||||
files++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void unuse_gang(struct dentry *dir)
|
||||
{
|
||||
struct inode *inode = dir->d_inode;
|
||||
struct spu_gang *gang = SPUFS_I(inode)->i_gang;
|
||||
|
||||
if (gang) {
|
||||
bool dead;
|
||||
|
||||
inode_lock(inode); // exclusion with spufs_create_context()
|
||||
dead = !--gang->alive;
|
||||
inode_unlock(inode);
|
||||
|
||||
if (dead)
|
||||
simple_recursive_removal(dir, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static int spufs_dir_close(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct inode *parent;
|
||||
@@ -212,6 +231,7 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
|
||||
inode_unlock(parent);
|
||||
WARN_ON(ret);
|
||||
|
||||
unuse_gang(dir->d_parent);
|
||||
return dcache_dir_close(inode, file);
|
||||
}
|
||||
|
||||
@@ -404,7 +424,7 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
|
||||
{
|
||||
int ret;
|
||||
int affinity;
|
||||
struct spu_gang *gang;
|
||||
struct spu_gang *gang = SPUFS_I(inode)->i_gang;
|
||||
struct spu_context *neighbor;
|
||||
struct path path = {.mnt = mnt, .dentry = dentry};
|
||||
|
||||
@@ -419,11 +439,15 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
|
||||
if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader)
|
||||
return -ENODEV;
|
||||
|
||||
gang = NULL;
|
||||
if (gang) {
|
||||
if (!gang->alive)
|
||||
return -ENOENT;
|
||||
gang->alive++;
|
||||
}
|
||||
|
||||
neighbor = NULL;
|
||||
affinity = flags & (SPU_CREATE_AFFINITY_MEM | SPU_CREATE_AFFINITY_SPU);
|
||||
if (affinity) {
|
||||
gang = SPUFS_I(inode)->i_gang;
|
||||
if (!gang)
|
||||
return -EINVAL;
|
||||
mutex_lock(&gang->aff_mutex);
|
||||
@@ -435,8 +459,11 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
|
||||
}
|
||||
|
||||
ret = spufs_mkdir(inode, dentry, flags, mode & 0777);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
if (neighbor)
|
||||
put_spu_context(neighbor);
|
||||
goto out_aff_unlock;
|
||||
}
|
||||
|
||||
if (affinity) {
|
||||
spufs_set_affinity(flags, SPUFS_I(d_inode(dentry))->i_ctx,
|
||||
@@ -452,6 +479,8 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
|
||||
out_aff_unlock:
|
||||
if (affinity)
|
||||
mutex_unlock(&gang->aff_mutex);
|
||||
if (ret && gang)
|
||||
gang->alive--; // can't reach 0
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -481,6 +510,7 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode)
|
||||
inode->i_fop = &simple_dir_operations;
|
||||
|
||||
d_instantiate(dentry, inode);
|
||||
dget(dentry);
|
||||
inc_nlink(dir);
|
||||
inc_nlink(d_inode(dentry));
|
||||
return ret;
|
||||
@@ -491,6 +521,21 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int spufs_gang_close(struct inode *inode, struct file *file)
|
||||
{
|
||||
unuse_gang(file->f_path.dentry);
|
||||
return dcache_dir_close(inode, file);
|
||||
}
|
||||
|
||||
static const struct file_operations spufs_gang_fops = {
|
||||
.open = dcache_dir_open,
|
||||
.release = spufs_gang_close,
|
||||
.llseek = dcache_dir_lseek,
|
||||
.read = generic_read_dir,
|
||||
.iterate_shared = dcache_readdir,
|
||||
.fsync = noop_fsync,
|
||||
};
|
||||
|
||||
static int spufs_gang_open(const struct path *path)
|
||||
{
|
||||
int ret;
|
||||
@@ -510,7 +555,7 @@ static int spufs_gang_open(const struct path *path)
|
||||
return PTR_ERR(filp);
|
||||
}
|
||||
|
||||
filp->f_op = &simple_dir_operations;
|
||||
filp->f_op = &spufs_gang_fops;
|
||||
fd_install(ret, filp);
|
||||
return ret;
|
||||
}
|
||||
@@ -525,10 +570,8 @@ static int spufs_create_gang(struct inode *inode,
|
||||
ret = spufs_mkgang(inode, dentry, mode & 0777);
|
||||
if (!ret) {
|
||||
ret = spufs_gang_open(&path);
|
||||
if (ret < 0) {
|
||||
int err = simple_rmdir(inode, dentry);
|
||||
WARN_ON(err);
|
||||
}
|
||||
if (ret < 0)
|
||||
unuse_gang(dentry);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -151,6 +151,8 @@ struct spu_gang {
|
||||
int aff_flags;
|
||||
struct spu *aff_ref_spu;
|
||||
atomic_t aff_sched_count;
|
||||
|
||||
int alive;
|
||||
};
|
||||
|
||||
/* Flag bits for spu_gang aff_flags */
|
||||
|
||||
@@ -82,7 +82,7 @@ struct dyn_arch_ftrace {
|
||||
#define make_call_t0(caller, callee, call) \
|
||||
do { \
|
||||
unsigned int offset = \
|
||||
(unsigned long) callee - (unsigned long) caller; \
|
||||
(unsigned long) (callee) - (unsigned long) (caller); \
|
||||
call[0] = to_auipc_t0(offset); \
|
||||
call[1] = to_jalr_t0(offset); \
|
||||
} while (0)
|
||||
@@ -98,7 +98,7 @@ do { \
|
||||
#define make_call_ra(caller, callee, call) \
|
||||
do { \
|
||||
unsigned int offset = \
|
||||
(unsigned long) callee - (unsigned long) caller; \
|
||||
(unsigned long) (callee) - (unsigned long) (caller); \
|
||||
call[0] = to_auipc_ra(offset); \
|
||||
call[1] = to_jalr_ra(offset); \
|
||||
} while (0)
|
||||
|
||||
@@ -93,7 +93,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
||||
_ASM_EXTABLE_UACCESS_ERR(1b, 3b, %[r]) \
|
||||
_ASM_EXTABLE_UACCESS_ERR(2b, 3b, %[r]) \
|
||||
: [r] "+r" (ret), [v] "=&r" (val), [u] "+m" (*uaddr), [t] "=&r" (tmp)
|
||||
: [ov] "Jr" (oldval), [nv] "Jr" (newval)
|
||||
: [ov] "Jr" ((long)(int)oldval), [nv] "Jr" (newval)
|
||||
: "memory");
|
||||
__disable_user_access();
|
||||
|
||||
|
||||
@@ -276,10 +276,10 @@ static void __init test_monitor_call(void)
|
||||
return;
|
||||
asm volatile(
|
||||
" mc 0,0\n"
|
||||
"0: xgr %0,%0\n"
|
||||
"0: lhi %[val],0\n"
|
||||
"1:\n"
|
||||
EX_TABLE(0b,1b)
|
||||
: "+d" (val));
|
||||
EX_TABLE(0b, 1b)
|
||||
: [val] "+d" (val));
|
||||
if (!val)
|
||||
panic("Monitor call doesn't work!\n");
|
||||
}
|
||||
|
||||
@@ -211,7 +211,6 @@ extern int os_protect_memory(void *addr, unsigned long len,
|
||||
extern int os_unmap_memory(void *addr, int len);
|
||||
extern int os_drop_memory(void *addr, int length);
|
||||
extern int can_drop_memory(void);
|
||||
extern int os_mincore(void *addr, unsigned long len);
|
||||
|
||||
/* execvp.c */
|
||||
extern int execvp_noalloc(char *buf, const char *file, char *const argv[]);
|
||||
|
||||
@@ -17,7 +17,7 @@ extra-y := vmlinux.lds
|
||||
obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
|
||||
physmem.o process.o ptrace.o reboot.o sigio.o \
|
||||
signal.o sysrq.o time.o tlb.o trap.o \
|
||||
um_arch.o umid.o maccess.o kmsg_dump.o capflags.o skas/
|
||||
um_arch.o umid.o kmsg_dump.o capflags.o skas/
|
||||
obj-y += load_file.o
|
||||
|
||||
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2013 Richard Weinberger <richrd@nod.at>
|
||||
*/
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <os.h>
|
||||
|
||||
bool copy_from_kernel_nofault_allowed(const void *src, size_t size)
|
||||
{
|
||||
void *psrc = (void *)rounddown((unsigned long)src, PAGE_SIZE);
|
||||
|
||||
if ((unsigned long)src < PAGE_SIZE || size <= 0)
|
||||
return false;
|
||||
if (os_mincore(psrc, size + src - psrc) <= 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -223,57 +223,6 @@ out:
|
||||
return ok;
|
||||
}
|
||||
|
||||
static int os_page_mincore(void *addr)
|
||||
{
|
||||
char vec[2];
|
||||
int ret;
|
||||
|
||||
ret = mincore(addr, UM_KERN_PAGE_SIZE, vec);
|
||||
if (ret < 0) {
|
||||
if (errno == ENOMEM || errno == EINVAL)
|
||||
return 0;
|
||||
else
|
||||
return -errno;
|
||||
}
|
||||
|
||||
return vec[0] & 1;
|
||||
}
|
||||
|
||||
int os_mincore(void *addr, unsigned long len)
|
||||
{
|
||||
char *vec;
|
||||
int ret, i;
|
||||
|
||||
if (len <= UM_KERN_PAGE_SIZE)
|
||||
return os_page_mincore(addr);
|
||||
|
||||
vec = calloc(1, (len + UM_KERN_PAGE_SIZE - 1) / UM_KERN_PAGE_SIZE);
|
||||
if (!vec)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = mincore(addr, UM_KERN_PAGE_SIZE, vec);
|
||||
if (ret < 0) {
|
||||
if (errno == ENOMEM || errno == EINVAL)
|
||||
ret = 0;
|
||||
else
|
||||
ret = -errno;
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < ((len + UM_KERN_PAGE_SIZE - 1) / UM_KERN_PAGE_SIZE); i++) {
|
||||
if (!(vec[i] & 1)) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
ret = 1;
|
||||
out:
|
||||
free(vec);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void init_new_thread_signals(void)
|
||||
{
|
||||
set_handler(SIGSEGV);
|
||||
|
||||
@@ -209,7 +209,7 @@ config X86
|
||||
select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if X86_64
|
||||
select HAVE_EBPF_JIT
|
||||
select HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
select HAVE_EISA
|
||||
select HAVE_EISA if X86_32
|
||||
select HAVE_EXIT_THREAD
|
||||
select HAVE_FAST_GUP
|
||||
select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE
|
||||
@@ -2507,7 +2507,8 @@ config CPU_IBPB_ENTRY
|
||||
depends on CPU_SUP_AMD && X86_64
|
||||
default y
|
||||
help
|
||||
Compile the kernel with support for the retbleed=ibpb mitigation.
|
||||
Compile the kernel with support for the retbleed=ibpb and
|
||||
spec_rstack_overflow={ibpb,ibpb-vmexit} mitigations.
|
||||
|
||||
config CPU_IBRS_ENTRY
|
||||
bool "Enable IBRS on kernel entry"
|
||||
|
||||
@@ -70,6 +70,8 @@ For 32-bit we have the following conventions - kernel is built with
|
||||
pushq %rsi /* pt_regs->si */
|
||||
movq 8(%rsp), %rsi /* temporarily store the return address in %rsi */
|
||||
movq %rdi, 8(%rsp) /* pt_regs->di (overwriting original return address) */
|
||||
/* We just clobbered the return address - use the IRET frame for unwinding: */
|
||||
UNWIND_HINT_IRET_REGS offset=3*8
|
||||
.else
|
||||
pushq %rdi /* pt_regs->di */
|
||||
pushq %rsi /* pt_regs->si */
|
||||
|
||||
@@ -621,7 +621,7 @@ int x86_pmu_hw_config(struct perf_event *event)
|
||||
if (event->attr.type == event->pmu->type)
|
||||
event->hw.config |= event->attr.config & X86_RAW_EVENT_MASK;
|
||||
|
||||
if (event->attr.sample_period && x86_pmu.limit_period) {
|
||||
if (!event->attr.freq && x86_pmu.limit_period) {
|
||||
s64 left = event->attr.sample_period;
|
||||
x86_pmu.limit_period(event, &left);
|
||||
if (left > event->attr.sample_period)
|
||||
|
||||
@@ -2689,28 +2689,33 @@ static u64 adl_update_topdown_event(struct perf_event *event)
|
||||
|
||||
DEFINE_STATIC_CALL(intel_pmu_update_topdown_event, x86_perf_event_update);
|
||||
|
||||
static void intel_pmu_read_topdown_event(struct perf_event *event)
|
||||
{
|
||||
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
||||
|
||||
/* Only need to call update_topdown_event() once for group read. */
|
||||
if ((cpuc->txn_flags & PERF_PMU_TXN_READ) &&
|
||||
!is_slots_event(event))
|
||||
return;
|
||||
|
||||
perf_pmu_disable(event->pmu);
|
||||
static_call(intel_pmu_update_topdown_event)(event);
|
||||
perf_pmu_enable(event->pmu);
|
||||
}
|
||||
|
||||
static void intel_pmu_read_event(struct perf_event *event)
|
||||
{
|
||||
if (event->hw.flags & PERF_X86_EVENT_AUTO_RELOAD)
|
||||
intel_pmu_auto_reload_read(event);
|
||||
else if (is_topdown_count(event))
|
||||
intel_pmu_read_topdown_event(event);
|
||||
else
|
||||
x86_perf_event_update(event);
|
||||
if (event->hw.flags & (PERF_X86_EVENT_AUTO_RELOAD | PERF_X86_EVENT_TOPDOWN)) {
|
||||
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
||||
bool pmu_enabled = cpuc->enabled;
|
||||
|
||||
/* Only need to call update_topdown_event() once for group read. */
|
||||
if (is_metric_event(event) && (cpuc->txn_flags & PERF_PMU_TXN_READ))
|
||||
return;
|
||||
|
||||
cpuc->enabled = 0;
|
||||
if (pmu_enabled)
|
||||
intel_pmu_disable_all();
|
||||
|
||||
if (is_topdown_event(event))
|
||||
static_call(intel_pmu_update_topdown_event)(event);
|
||||
else
|
||||
intel_pmu_drain_pebs_buffer();
|
||||
|
||||
cpuc->enabled = pmu_enabled;
|
||||
if (pmu_enabled)
|
||||
intel_pmu_enable_all(0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
x86_perf_event_update(event);
|
||||
}
|
||||
|
||||
static void intel_pmu_enable_fixed(struct perf_event *event)
|
||||
@@ -2975,7 +2980,7 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
|
||||
|
||||
handled++;
|
||||
x86_pmu_handle_guest_pebs(regs, &data);
|
||||
x86_pmu.drain_pebs(regs, &data);
|
||||
static_call(x86_pmu_drain_pebs)(regs, &data);
|
||||
status &= intel_ctrl | GLOBAL_STATUS_TRACE_TOPAPMI;
|
||||
|
||||
/*
|
||||
@@ -3852,6 +3857,85 @@ static inline bool intel_pmu_has_cap(struct perf_event *event, int idx)
|
||||
return test_bit(idx, (unsigned long *)&intel_cap->capabilities);
|
||||
}
|
||||
|
||||
static u64 intel_pmu_freq_start_period(struct perf_event *event)
|
||||
{
|
||||
int type = event->attr.type;
|
||||
u64 config, factor;
|
||||
s64 start;
|
||||
|
||||
/*
|
||||
* The 127 is the lowest possible recommended SAV (sample after value)
|
||||
* for a 4000 freq (default freq), according to the event list JSON file.
|
||||
* Also, assume the workload is idle 50% time.
|
||||
*/
|
||||
factor = 64 * 4000;
|
||||
if (type != PERF_TYPE_HARDWARE && type != PERF_TYPE_HW_CACHE)
|
||||
goto end;
|
||||
|
||||
/*
|
||||
* The estimation of the start period in the freq mode is
|
||||
* based on the below assumption.
|
||||
*
|
||||
* For a cycles or an instructions event, 1GHZ of the
|
||||
* underlying platform, 1 IPC. The workload is idle 50% time.
|
||||
* The start period = 1,000,000,000 * 1 / freq / 2.
|
||||
* = 500,000,000 / freq
|
||||
*
|
||||
* Usually, the branch-related events occur less than the
|
||||
* instructions event. According to the Intel event list JSON
|
||||
* file, the SAV (sample after value) of a branch-related event
|
||||
* is usually 1/4 of an instruction event.
|
||||
* The start period of branch-related events = 125,000,000 / freq.
|
||||
*
|
||||
* The cache-related events occurs even less. The SAV is usually
|
||||
* 1/20 of an instruction event.
|
||||
* The start period of cache-related events = 25,000,000 / freq.
|
||||
*/
|
||||
config = event->attr.config & PERF_HW_EVENT_MASK;
|
||||
if (type == PERF_TYPE_HARDWARE) {
|
||||
switch (config) {
|
||||
case PERF_COUNT_HW_CPU_CYCLES:
|
||||
case PERF_COUNT_HW_INSTRUCTIONS:
|
||||
case PERF_COUNT_HW_BUS_CYCLES:
|
||||
case PERF_COUNT_HW_STALLED_CYCLES_FRONTEND:
|
||||
case PERF_COUNT_HW_STALLED_CYCLES_BACKEND:
|
||||
case PERF_COUNT_HW_REF_CPU_CYCLES:
|
||||
factor = 500000000;
|
||||
break;
|
||||
case PERF_COUNT_HW_BRANCH_INSTRUCTIONS:
|
||||
case PERF_COUNT_HW_BRANCH_MISSES:
|
||||
factor = 125000000;
|
||||
break;
|
||||
case PERF_COUNT_HW_CACHE_REFERENCES:
|
||||
case PERF_COUNT_HW_CACHE_MISSES:
|
||||
factor = 25000000;
|
||||
break;
|
||||
default:
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == PERF_TYPE_HW_CACHE)
|
||||
factor = 25000000;
|
||||
end:
|
||||
/*
|
||||
* Usually, a prime or a number with less factors (close to prime)
|
||||
* is chosen as an SAV, which makes it less likely that the sampling
|
||||
* period synchronizes with some periodic event in the workload.
|
||||
* Minus 1 to make it at least avoiding values near power of twos
|
||||
* for the default freq.
|
||||
*/
|
||||
start = DIV_ROUND_UP_ULL(factor, event->attr.sample_freq) - 1;
|
||||
|
||||
if (start > x86_pmu.max_period)
|
||||
start = x86_pmu.max_period;
|
||||
|
||||
if (x86_pmu.limit_period)
|
||||
x86_pmu.limit_period(event, &start);
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
static int intel_pmu_hw_config(struct perf_event *event)
|
||||
{
|
||||
int ret = x86_pmu_hw_config(event);
|
||||
@@ -3863,6 +3947,12 @@ static int intel_pmu_hw_config(struct perf_event *event)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (event->attr.freq && event->attr.sample_freq) {
|
||||
event->hw.sample_period = intel_pmu_freq_start_period(event);
|
||||
event->hw.last_period = event->hw.sample_period;
|
||||
local64_set(&event->hw.period_left, event->hw.sample_period);
|
||||
}
|
||||
|
||||
if (event->attr.precise_ip) {
|
||||
if ((event->attr.config & INTEL_ARCH_EVENT_MASK) == INTEL_FIXED_VLBR_EVENT)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -789,11 +789,11 @@ unlock:
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline void intel_pmu_drain_pebs_buffer(void)
|
||||
void intel_pmu_drain_pebs_buffer(void)
|
||||
{
|
||||
struct perf_sample_data data;
|
||||
|
||||
x86_pmu.drain_pebs(NULL, &data);
|
||||
static_call(x86_pmu_drain_pebs)(NULL, &data);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1902,15 +1902,6 @@ get_next_pebs_record_by_bit(void *base, void *top, int bit)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void intel_pmu_auto_reload_read(struct perf_event *event)
|
||||
{
|
||||
WARN_ON(!(event->hw.flags & PERF_X86_EVENT_AUTO_RELOAD));
|
||||
|
||||
perf_pmu_disable(event->pmu);
|
||||
intel_pmu_drain_pebs_buffer();
|
||||
perf_pmu_enable(event->pmu);
|
||||
}
|
||||
|
||||
/*
|
||||
* Special variant of intel_pmu_save_and_restart() for auto-reload.
|
||||
*/
|
||||
|
||||
@@ -1047,6 +1047,7 @@ extern struct x86_pmu x86_pmu __read_mostly;
|
||||
|
||||
DECLARE_STATIC_CALL(x86_pmu_set_period, *x86_pmu.set_period);
|
||||
DECLARE_STATIC_CALL(x86_pmu_update, *x86_pmu.update);
|
||||
DECLARE_STATIC_CALL(x86_pmu_drain_pebs, *x86_pmu.drain_pebs);
|
||||
|
||||
static __always_inline struct x86_perf_task_context_opt *task_context_opt(void *ctx)
|
||||
{
|
||||
@@ -1535,7 +1536,7 @@ void intel_pmu_pebs_disable_all(void);
|
||||
|
||||
void intel_pmu_pebs_sched_task(struct perf_event_context *ctx, bool sched_in);
|
||||
|
||||
void intel_pmu_auto_reload_read(struct perf_event *event);
|
||||
void intel_pmu_drain_pebs_buffer(void);
|
||||
|
||||
void intel_pmu_store_pebs_lbrs(struct lbr_entry *lbr);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <linux/thread_info.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
#include <asm/msr.h>
|
||||
|
||||
/*
|
||||
* On VMENTER we must preserve whatever view of the SPEC_CTRL MSR
|
||||
@@ -76,6 +77,16 @@ static inline u64 ssbd_tif_to_amd_ls_cfg(u64 tifn)
|
||||
return (tifn & _TIF_SSBD) ? x86_amd_ls_cfg_ssbd_mask : 0ULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* This can be used in noinstr functions & should only be called in bare
|
||||
* metal context.
|
||||
*/
|
||||
static __always_inline void __update_spec_ctrl(u64 val)
|
||||
{
|
||||
__this_cpu_write(x86_spec_ctrl_current, val);
|
||||
native_wrmsrl(MSR_IA32_SPEC_CTRL, val);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
extern void speculative_store_bypass_ht_init(void);
|
||||
#else
|
||||
|
||||
@@ -228,7 +228,7 @@ void flush_tlb_multi(const struct cpumask *cpumask,
|
||||
flush_tlb_mm_range((vma)->vm_mm, start, end, \
|
||||
((vma)->vm_flags & VM_HUGETLB) \
|
||||
? huge_page_shift(hstate_vma(vma)) \
|
||||
: PAGE_SHIFT, false)
|
||||
: PAGE_SHIFT, true)
|
||||
|
||||
extern void flush_tlb_all(void);
|
||||
extern void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
|
||||
|
||||
@@ -342,7 +342,6 @@ bool __init early_is_amd_nb(u32 device)
|
||||
|
||||
struct resource *amd_get_mmconfig_range(struct resource *res)
|
||||
{
|
||||
u32 address;
|
||||
u64 base, msr;
|
||||
unsigned int segn_busn_bits;
|
||||
|
||||
@@ -350,13 +349,11 @@ struct resource *amd_get_mmconfig_range(struct resource *res)
|
||||
boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
|
||||
return NULL;
|
||||
|
||||
/* assume all cpus from fam10h have mmconfig */
|
||||
if (boot_cpu_data.x86 < 0x10)
|
||||
/* Assume CPUs from Fam10h have mmconfig, although not all VMs do */
|
||||
if (boot_cpu_data.x86 < 0x10 ||
|
||||
rdmsrl_safe(MSR_FAM10H_MMIO_CONF_BASE, &msr))
|
||||
return NULL;
|
||||
|
||||
address = MSR_FAM10H_MMIO_CONF_BASE;
|
||||
rdmsrl(address, msr);
|
||||
|
||||
/* mmconfig is not enabled */
|
||||
if (!(msr & FAM10H_MMIO_CONF_ENABLE))
|
||||
return NULL;
|
||||
|
||||
@@ -92,7 +92,7 @@ void update_spec_ctrl_cond(u64 val)
|
||||
wrmsrl(MSR_IA32_SPEC_CTRL, val);
|
||||
}
|
||||
|
||||
u64 spec_ctrl_current(void)
|
||||
noinstr u64 spec_ctrl_current(void)
|
||||
{
|
||||
return this_cpu_read(x86_spec_ctrl_current);
|
||||
}
|
||||
@@ -1092,6 +1092,8 @@ do_cmd_auto:
|
||||
|
||||
case RETBLEED_MITIGATION_IBPB:
|
||||
setup_force_cpu_cap(X86_FEATURE_ENTRY_IBPB);
|
||||
setup_force_cpu_cap(X86_FEATURE_IBPB_ON_VMEXIT);
|
||||
mitigate_smt = true;
|
||||
|
||||
/*
|
||||
* IBPB on entry already obviates the need for
|
||||
@@ -1101,8 +1103,6 @@ do_cmd_auto:
|
||||
setup_clear_cpu_cap(X86_FEATURE_UNRET);
|
||||
setup_clear_cpu_cap(X86_FEATURE_RETHUNK);
|
||||
|
||||
mitigate_smt = true;
|
||||
|
||||
/*
|
||||
* There is no need for RSB filling: entry_ibpb() ensures
|
||||
* all predictions, including the RSB, are invalidated,
|
||||
@@ -2607,6 +2607,7 @@ static void __init srso_select_mitigation(void)
|
||||
if (IS_ENABLED(CONFIG_CPU_IBPB_ENTRY)) {
|
||||
if (has_microcode) {
|
||||
setup_force_cpu_cap(X86_FEATURE_ENTRY_IBPB);
|
||||
setup_force_cpu_cap(X86_FEATURE_IBPB_ON_VMEXIT);
|
||||
srso_mitigation = SRSO_MITIGATION_IBPB;
|
||||
|
||||
/*
|
||||
@@ -2616,6 +2617,13 @@ static void __init srso_select_mitigation(void)
|
||||
*/
|
||||
setup_clear_cpu_cap(X86_FEATURE_UNRET);
|
||||
setup_clear_cpu_cap(X86_FEATURE_RETHUNK);
|
||||
|
||||
/*
|
||||
* There is no need for RSB filling: entry_ibpb() ensures
|
||||
* all predictions, including the RSB, are invalidated,
|
||||
* regardless of IBPB implementation.
|
||||
*/
|
||||
setup_clear_cpu_cap(X86_FEATURE_RSB_VMEXIT);
|
||||
}
|
||||
} else {
|
||||
pr_err("WARNING: kernel not compiled with CPU_IBPB_ENTRY.\n");
|
||||
@@ -2624,8 +2632,8 @@ static void __init srso_select_mitigation(void)
|
||||
break;
|
||||
|
||||
case SRSO_CMD_IBPB_ON_VMEXIT:
|
||||
if (IS_ENABLED(CONFIG_CPU_SRSO)) {
|
||||
if (!boot_cpu_has(X86_FEATURE_ENTRY_IBPB) && has_microcode) {
|
||||
if (IS_ENABLED(CONFIG_CPU_IBPB_ENTRY)) {
|
||||
if (has_microcode) {
|
||||
setup_force_cpu_cap(X86_FEATURE_IBPB_ON_VMEXIT);
|
||||
srso_mitigation = SRSO_MITIGATION_IBPB_ON_VMEXIT;
|
||||
|
||||
@@ -2637,9 +2645,9 @@ static void __init srso_select_mitigation(void)
|
||||
setup_clear_cpu_cap(X86_FEATURE_RSB_VMEXIT);
|
||||
}
|
||||
} else {
|
||||
pr_err("WARNING: kernel not compiled with CPU_SRSO.\n");
|
||||
pr_err("WARNING: kernel not compiled with CPU_IBPB_ENTRY.\n");
|
||||
goto pred_cmd;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -801,7 +801,7 @@ void init_intel_cacheinfo(struct cpuinfo_x86 *c)
|
||||
cpuid(2, ®s[0], ®s[1], ®s[2], ®s[3]);
|
||||
|
||||
/* If bit 31 is set, this is an unknown format */
|
||||
for (j = 0 ; j < 3 ; j++)
|
||||
for (j = 0 ; j < 4 ; j++)
|
||||
if (regs[j] & (1 << 31))
|
||||
regs[j] = 0;
|
||||
|
||||
|
||||
@@ -153,8 +153,8 @@ static void geode_configure(void)
|
||||
u8 ccr3;
|
||||
local_irq_save(flags);
|
||||
|
||||
/* Suspend on halt power saving and enable #SUSP pin */
|
||||
setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
|
||||
/* Suspend on halt power saving */
|
||||
setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x08);
|
||||
|
||||
ccr3 = getCx86(CX86_CCR3);
|
||||
setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
|
||||
|
||||
@@ -784,26 +784,37 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 *c, unsigned int size)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define TLB_INST_4K 0x01
|
||||
#define TLB_INST_4M 0x02
|
||||
#define TLB_INST_2M_4M 0x03
|
||||
#define TLB_INST_4K 0x01
|
||||
#define TLB_INST_4M 0x02
|
||||
#define TLB_INST_2M_4M 0x03
|
||||
|
||||
#define TLB_INST_ALL 0x05
|
||||
#define TLB_INST_1G 0x06
|
||||
#define TLB_INST_ALL 0x05
|
||||
#define TLB_INST_1G 0x06
|
||||
|
||||
#define TLB_DATA_4K 0x11
|
||||
#define TLB_DATA_4M 0x12
|
||||
#define TLB_DATA_2M_4M 0x13
|
||||
#define TLB_DATA_4K_4M 0x14
|
||||
#define TLB_DATA_4K 0x11
|
||||
#define TLB_DATA_4M 0x12
|
||||
#define TLB_DATA_2M_4M 0x13
|
||||
#define TLB_DATA_4K_4M 0x14
|
||||
|
||||
#define TLB_DATA_1G 0x16
|
||||
#define TLB_DATA_1G 0x16
|
||||
#define TLB_DATA_1G_2M_4M 0x17
|
||||
|
||||
#define TLB_DATA0_4K 0x21
|
||||
#define TLB_DATA0_4M 0x22
|
||||
#define TLB_DATA0_2M_4M 0x23
|
||||
#define TLB_DATA0_4K 0x21
|
||||
#define TLB_DATA0_4M 0x22
|
||||
#define TLB_DATA0_2M_4M 0x23
|
||||
|
||||
#define STLB_4K 0x41
|
||||
#define STLB_4K_2M 0x42
|
||||
#define STLB_4K 0x41
|
||||
#define STLB_4K_2M 0x42
|
||||
|
||||
/*
|
||||
* All of leaf 0x2's one-byte TLB descriptors implies the same number of
|
||||
* entries for their respective TLB types. The 0x63 descriptor is an
|
||||
* exception: it implies 4 dTLB entries for 1GB pages 32 dTLB entries
|
||||
* for 2MB or 4MB pages. Encode descriptor 0x63 dTLB entry count for
|
||||
* 2MB/4MB pages here, as its count for dTLB 1GB pages is already at the
|
||||
* intel_tlb_table[] mapping.
|
||||
*/
|
||||
#define TLB_0x63_2M_4M_ENTRIES 32
|
||||
|
||||
static const struct _tlb_table intel_tlb_table[] = {
|
||||
{ 0x01, TLB_INST_4K, 32, " TLB_INST 4 KByte pages, 4-way set associative" },
|
||||
@@ -825,7 +836,8 @@ static const struct _tlb_table intel_tlb_table[] = {
|
||||
{ 0x5c, TLB_DATA_4K_4M, 128, " TLB_DATA 4 KByte and 4 MByte pages" },
|
||||
{ 0x5d, TLB_DATA_4K_4M, 256, " TLB_DATA 4 KByte and 4 MByte pages" },
|
||||
{ 0x61, TLB_INST_4K, 48, " TLB_INST 4 KByte pages, full associative" },
|
||||
{ 0x63, TLB_DATA_1G, 4, " TLB_DATA 1 GByte pages, 4-way set associative" },
|
||||
{ 0x63, TLB_DATA_1G_2M_4M, 4, " TLB_DATA 1 GByte pages, 4-way set associative"
|
||||
" (plus 32 entries TLB_DATA 2 MByte or 4 MByte pages, not encoded here)" },
|
||||
{ 0x6b, TLB_DATA_4K, 256, " TLB_DATA 4 KByte pages, 8-way associative" },
|
||||
{ 0x6c, TLB_DATA_2M_4M, 128, " TLB_DATA 2 MByte or 4 MByte pages, 8-way associative" },
|
||||
{ 0x6d, TLB_DATA_1G, 16, " TLB_DATA 1 GByte pages, fully associative" },
|
||||
@@ -925,6 +937,12 @@ static void intel_tlb_lookup(const unsigned char desc)
|
||||
if (tlb_lld_4m[ENTRIES] < intel_tlb_table[k].entries)
|
||||
tlb_lld_4m[ENTRIES] = intel_tlb_table[k].entries;
|
||||
break;
|
||||
case TLB_DATA_1G_2M_4M:
|
||||
if (tlb_lld_2m[ENTRIES] < TLB_0x63_2M_4M_ENTRIES)
|
||||
tlb_lld_2m[ENTRIES] = TLB_0x63_2M_4M_ENTRIES;
|
||||
if (tlb_lld_4m[ENTRIES] < TLB_0x63_2M_4M_ENTRIES)
|
||||
tlb_lld_4m[ENTRIES] = TLB_0x63_2M_4M_ENTRIES;
|
||||
fallthrough;
|
||||
case TLB_DATA_1G:
|
||||
if (tlb_lld_1g[ENTRIES] < intel_tlb_table[k].entries)
|
||||
tlb_lld_1g[ENTRIES] = intel_tlb_table[k].entries;
|
||||
@@ -948,7 +966,7 @@ static void intel_detect_tlb(struct cpuinfo_x86 *c)
|
||||
cpuid(2, ®s[0], ®s[1], ®s[2], ®s[3]);
|
||||
|
||||
/* If bit 31 is set, this is an unknown format */
|
||||
for (j = 0 ; j < 3 ; j++)
|
||||
for (j = 0 ; j < 4 ; j++)
|
||||
if (regs[j] & (1 << 31))
|
||||
regs[j] = 0;
|
||||
|
||||
|
||||
@@ -867,7 +867,7 @@ static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t siz
|
||||
return ret;
|
||||
}
|
||||
|
||||
for_each_node(nid) {
|
||||
for_each_node_with_cpus(nid) {
|
||||
cpu = cpumask_first(cpumask_of_node(nid));
|
||||
c = &cpu_data(cpu);
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/i8253.h>
|
||||
#include <linux/random.h>
|
||||
#include <linux/swiotlb.h>
|
||||
#include <asm/processor.h>
|
||||
@@ -461,16 +460,6 @@ static void __init ms_hyperv_init_platform(void)
|
||||
if (efi_enabled(EFI_BOOT))
|
||||
x86_platform.get_nmi_reason = hv_get_nmi_reason;
|
||||
|
||||
/*
|
||||
* Hyper-V VMs have a PIT emulation quirk such that zeroing the
|
||||
* counter register during PIT shutdown restarts the PIT. So it
|
||||
* continues to interrupt @18.2 HZ. Setting i8253_clear_counter
|
||||
* to false tells pit_shutdown() not to zero the counter so that
|
||||
* the PIT really is shutdown. Generation 2 VMs don't have a PIT,
|
||||
* and setting this value has no effect.
|
||||
*/
|
||||
i8253_clear_counter_on_shutdown = false;
|
||||
|
||||
#if IS_ENABLED(CONFIG_HYPERV)
|
||||
/*
|
||||
* Setup the hook to get control post apic initialization.
|
||||
|
||||
@@ -150,13 +150,15 @@ int __init sgx_drv_init(void)
|
||||
u64 xfrm_mask;
|
||||
int ret;
|
||||
|
||||
if (!cpu_feature_enabled(X86_FEATURE_SGX_LC))
|
||||
if (!cpu_feature_enabled(X86_FEATURE_SGX_LC)) {
|
||||
pr_info("SGX disabled: SGX launch control CPU feature is not available, /dev/sgx_enclave disabled.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
cpuid_count(SGX_CPUID, 0, &eax, &ebx, &ecx, &edx);
|
||||
|
||||
if (!(eax & 1)) {
|
||||
pr_err("SGX disabled: SGX1 instruction support not available.\n");
|
||||
pr_info("SGX disabled: SGX1 instruction support not available, /dev/sgx_enclave disabled.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -173,8 +175,10 @@ int __init sgx_drv_init(void)
|
||||
}
|
||||
|
||||
ret = misc_register(&sgx_dev_enclave);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
pr_info("SGX disabled: Unable to register the /dev/sgx_enclave driver (%d).\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,13 @@ static int sgx_encl_create(struct sgx_encl *encl, struct sgx_secs *secs)
|
||||
struct file *backing;
|
||||
long ret;
|
||||
|
||||
/*
|
||||
* ECREATE would detect this too, but checking here also ensures
|
||||
* that the 'encl_size' calculations below can never overflow.
|
||||
*/
|
||||
if (!is_power_of_2(secs->size))
|
||||
return -EINVAL;
|
||||
|
||||
va_page = sgx_encl_grow(encl, true);
|
||||
if (IS_ERR(va_page))
|
||||
return PTR_ERR(va_page);
|
||||
|
||||
@@ -195,6 +195,7 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
|
||||
printk("%sCall Trace:\n", log_lvl);
|
||||
|
||||
unwind_start(&state, task, regs, stack);
|
||||
stack = stack ?: get_stack_pointer(task, regs);
|
||||
regs = unwind_get_entry_regs(&state, &partial);
|
||||
|
||||
/*
|
||||
@@ -213,9 +214,7 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
|
||||
* - hardirq stack
|
||||
* - entry stack
|
||||
*/
|
||||
for (stack = stack ?: get_stack_pointer(task, regs);
|
||||
stack;
|
||||
stack = stack_info.next_sp) {
|
||||
for (; stack; stack = stack_info.next_sp) {
|
||||
const char *stack_name;
|
||||
|
||||
stack = PTR_ALIGN(stack, sizeof(long));
|
||||
|
||||
@@ -220,7 +220,7 @@ bool fpu_alloc_guest_fpstate(struct fpu_guest *gfpu)
|
||||
struct fpstate *fpstate;
|
||||
unsigned int size;
|
||||
|
||||
size = fpu_user_cfg.default_size + ALIGN(offsetof(struct fpstate, regs), 64);
|
||||
size = fpu_kernel_cfg.default_size + ALIGN(offsetof(struct fpstate, regs), 64);
|
||||
fpstate = vzalloc(size);
|
||||
if (!fpstate)
|
||||
return false;
|
||||
@@ -232,8 +232,8 @@ bool fpu_alloc_guest_fpstate(struct fpu_guest *gfpu)
|
||||
fpstate->is_guest = true;
|
||||
|
||||
gfpu->fpstate = fpstate;
|
||||
gfpu->xfeatures = fpu_user_cfg.default_features;
|
||||
gfpu->perm = fpu_user_cfg.default_features;
|
||||
gfpu->xfeatures = fpu_kernel_cfg.default_features;
|
||||
gfpu->perm = fpu_kernel_cfg.default_features;
|
||||
|
||||
/*
|
||||
* KVM sets the FP+SSE bits in the XSAVE header when copying FPU state
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
#include <asm/traps.h>
|
||||
#include <asm/thermal.h>
|
||||
|
||||
#if defined(CONFIG_X86_LOCAL_APIC) || defined(CONFIG_X86_THERMAL_VECTOR)
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <asm/trace/irq_vectors.h>
|
||||
#endif
|
||||
|
||||
DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
|
||||
EXPORT_PER_CPU_SYMBOL(irq_stat);
|
||||
|
||||
@@ -87,7 +87,12 @@ EXPORT_PER_CPU_SYMBOL_GPL(__tss_limit_invalid);
|
||||
*/
|
||||
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
||||
{
|
||||
memcpy(dst, src, arch_task_struct_size);
|
||||
/* init_task is not dynamically sized (incomplete FPU state) */
|
||||
if (unlikely(src == &init_task))
|
||||
memcpy_and_pad(dst, arch_task_struct_size, src, sizeof(init_task), 0);
|
||||
else
|
||||
memcpy(dst, src, arch_task_struct_size);
|
||||
|
||||
#ifdef CONFIG_VM86
|
||||
dst->thread.vm86 = NULL;
|
||||
#endif
|
||||
|
||||
@@ -920,7 +920,7 @@ static unsigned long long cyc2ns_suspend;
|
||||
|
||||
void tsc_save_sched_clock_state(void)
|
||||
{
|
||||
if (!sched_clock_stable())
|
||||
if (!static_branch_likely(&__use_tsc) && !sched_clock_stable())
|
||||
return;
|
||||
|
||||
cyc2ns_suspend = sched_clock();
|
||||
@@ -940,7 +940,7 @@ void tsc_restore_sched_clock_state(void)
|
||||
unsigned long flags;
|
||||
int cpu;
|
||||
|
||||
if (!sched_clock_stable())
|
||||
if (!static_branch_likely(&__use_tsc) && !sched_clock_stable())
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
@@ -3039,6 +3039,18 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
|
||||
__func__, data);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* AMD changed the architectural behavior of bits 5:2. On CPUs
|
||||
* without BusLockTrap, bits 5:2 control "external pins", but
|
||||
* on CPUs that support BusLockDetect, bit 2 enables BusLockTrap
|
||||
* and bits 5:3 are reserved-to-zero. Sadly, old KVM allowed
|
||||
* the guest to set bits 5:2 despite not actually virtualizing
|
||||
* Performance-Monitoring/Breakpoint external pins. Drop bits
|
||||
* 5:2 for backwards compatibility.
|
||||
*/
|
||||
data &= ~GENMASK(5, 2);
|
||||
|
||||
if (data & DEBUGCTL_RESERVED_BITS)
|
||||
return 1;
|
||||
|
||||
|
||||
@@ -539,7 +539,7 @@ static inline bool is_x2apic_msrpm_offset(u32 offset)
|
||||
/* svm.c */
|
||||
#define MSR_INVALID 0xffffffffU
|
||||
|
||||
#define DEBUGCTL_RESERVED_BITS (~(0x3fULL))
|
||||
#define DEBUGCTL_RESERVED_BITS (~(DEBUGCTLMSR_BTF | DEBUGCTLMSR_LBR))
|
||||
|
||||
extern bool dump_invalid_vmcb;
|
||||
|
||||
|
||||
@@ -269,28 +269,33 @@ static void __init probe_page_size_mask(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* INVLPG may not properly flush Global entries
|
||||
* on these CPUs when PCIDs are enabled.
|
||||
* INVLPG may not properly flush Global entries on
|
||||
* these CPUs. New microcode fixes the issue.
|
||||
*/
|
||||
static const struct x86_cpu_id invlpg_miss_ids[] = {
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, 0),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, 0),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, 0),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, 0),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, 0),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, 0),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, 0x2e),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, 0x42c),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, 0x11),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, 0x118),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, 0x4117),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, 0x2e),
|
||||
{}
|
||||
};
|
||||
|
||||
static void setup_pcid(void)
|
||||
{
|
||||
const struct x86_cpu_id *invlpg_miss_match;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_X86_64))
|
||||
return;
|
||||
|
||||
if (!boot_cpu_has(X86_FEATURE_PCID))
|
||||
return;
|
||||
|
||||
if (x86_match_cpu(invlpg_miss_ids)) {
|
||||
invlpg_miss_match = x86_match_cpu(invlpg_miss_ids);
|
||||
|
||||
if (invlpg_miss_match &&
|
||||
boot_cpu_data.microcode < invlpg_miss_match->driver_data) {
|
||||
pr_info("Incomplete global flushes, disabling PCID");
|
||||
setup_clear_cpu_cap(X86_FEATURE_PCID);
|
||||
return;
|
||||
|
||||
@@ -588,7 +588,7 @@ void __head sme_enable(struct boot_params *bp)
|
||||
|
||||
out:
|
||||
RIP_REL_REF(sme_me_mask) = me_mask;
|
||||
physical_mask &= ~me_mask;
|
||||
cc_vendor = CC_VENDOR_AMD;
|
||||
RIP_REL_REF(physical_mask) &= ~me_mask;
|
||||
RIP_REL_REF(cc_vendor) = CC_VENDOR_AMD;
|
||||
cc_set_mask(me_mask);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ static int pageattr_test(void)
|
||||
break;
|
||||
|
||||
case 1:
|
||||
err = change_page_attr_set(addrs, len[1], PAGE_CPA_TEST, 1);
|
||||
err = change_page_attr_set(addrs, len[i], PAGE_CPA_TEST, 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
@@ -704,6 +704,46 @@ void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
bfq_put_queue(bfqq);
|
||||
}
|
||||
|
||||
static void bfq_sync_bfqq_move(struct bfq_data *bfqd,
|
||||
struct bfq_queue *sync_bfqq,
|
||||
struct bfq_io_cq *bic,
|
||||
struct bfq_group *bfqg,
|
||||
unsigned int act_idx)
|
||||
{
|
||||
struct bfq_queue *bfqq;
|
||||
|
||||
if (!sync_bfqq->new_bfqq && !bfq_bfqq_coop(sync_bfqq)) {
|
||||
/* We are the only user of this bfqq, just move it */
|
||||
if (sync_bfqq->entity.sched_data != &bfqg->sched_data)
|
||||
bfq_bfqq_move(bfqd, sync_bfqq, bfqg);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The queue was merged to a different queue. Check
|
||||
* that the merge chain still belongs to the same
|
||||
* cgroup.
|
||||
*/
|
||||
for (bfqq = sync_bfqq; bfqq; bfqq = bfqq->new_bfqq)
|
||||
if (bfqq->entity.sched_data != &bfqg->sched_data)
|
||||
break;
|
||||
if (bfqq) {
|
||||
/*
|
||||
* Some queue changed cgroup so the merge is not valid
|
||||
* anymore. We cannot easily just cancel the merge (by
|
||||
* clearing new_bfqq) as there may be other processes
|
||||
* using this queue and holding refs to all queues
|
||||
* below sync_bfqq->new_bfqq. Similarly if the merge
|
||||
* already happened, we need to detach from bfqq now
|
||||
* so that we cannot merge bio to a request from the
|
||||
* old cgroup.
|
||||
*/
|
||||
bfq_put_cooperator(sync_bfqq);
|
||||
bic_set_bfqq(bic, NULL, true, act_idx);
|
||||
bfq_release_process_ref(bfqd, sync_bfqq);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* __bfq_bic_change_cgroup - move @bic to @bfqg.
|
||||
* @bfqd: the queue descriptor.
|
||||
@@ -714,60 +754,25 @@ void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
* sure that the reference to cgroup is valid across the call (see
|
||||
* comments in bfq_bic_update_cgroup on this issue)
|
||||
*/
|
||||
static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,
|
||||
static void __bfq_bic_change_cgroup(struct bfq_data *bfqd,
|
||||
struct bfq_io_cq *bic,
|
||||
struct bfq_group *bfqg)
|
||||
{
|
||||
struct bfq_queue *async_bfqq = bic_to_bfqq(bic, false);
|
||||
struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, true);
|
||||
struct bfq_entity *entity;
|
||||
unsigned int act_idx;
|
||||
|
||||
if (async_bfqq) {
|
||||
entity = &async_bfqq->entity;
|
||||
for (act_idx = 0; act_idx < bfqd->num_actuators; act_idx++) {
|
||||
struct bfq_queue *async_bfqq = bic_to_bfqq(bic, false, act_idx);
|
||||
struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, true, act_idx);
|
||||
|
||||
if (entity->sched_data != &bfqg->sched_data) {
|
||||
bic_set_bfqq(bic, NULL, false);
|
||||
if (async_bfqq &&
|
||||
async_bfqq->entity.sched_data != &bfqg->sched_data) {
|
||||
bic_set_bfqq(bic, NULL, false, act_idx);
|
||||
bfq_release_process_ref(bfqd, async_bfqq);
|
||||
}
|
||||
|
||||
if (sync_bfqq)
|
||||
bfq_sync_bfqq_move(bfqd, sync_bfqq, bic, bfqg, act_idx);
|
||||
}
|
||||
|
||||
if (sync_bfqq) {
|
||||
if (!sync_bfqq->new_bfqq && !bfq_bfqq_coop(sync_bfqq)) {
|
||||
/* We are the only user of this bfqq, just move it */
|
||||
if (sync_bfqq->entity.sched_data != &bfqg->sched_data)
|
||||
bfq_bfqq_move(bfqd, sync_bfqq, bfqg);
|
||||
} else {
|
||||
struct bfq_queue *bfqq;
|
||||
|
||||
/*
|
||||
* The queue was merged to a different queue. Check
|
||||
* that the merge chain still belongs to the same
|
||||
* cgroup.
|
||||
*/
|
||||
for (bfqq = sync_bfqq; bfqq; bfqq = bfqq->new_bfqq)
|
||||
if (bfqq->entity.sched_data !=
|
||||
&bfqg->sched_data)
|
||||
break;
|
||||
if (bfqq) {
|
||||
/*
|
||||
* Some queue changed cgroup so the merge is
|
||||
* not valid anymore. We cannot easily just
|
||||
* cancel the merge (by clearing new_bfqq) as
|
||||
* there may be other processes using this
|
||||
* queue and holding refs to all queues below
|
||||
* sync_bfqq->new_bfqq. Similarly if the merge
|
||||
* already happened, we need to detach from
|
||||
* bfqq now so that we cannot merge bio to a
|
||||
* request from the old cgroup.
|
||||
*/
|
||||
bfq_put_cooperator(sync_bfqq);
|
||||
bic_set_bfqq(bic, NULL, true);
|
||||
bfq_release_process_ref(bfqd, sync_bfqq);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bfqg;
|
||||
}
|
||||
|
||||
void bfq_bic_update_cgroup(struct bfq_io_cq *bic, struct bio *bio)
|
||||
|
||||
@@ -377,16 +377,23 @@ static const unsigned long bfq_late_stable_merging = 600;
|
||||
#define RQ_BIC(rq) ((struct bfq_io_cq *)((rq)->elv.priv[0]))
|
||||
#define RQ_BFQQ(rq) ((rq)->elv.priv[1])
|
||||
|
||||
struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync)
|
||||
struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync,
|
||||
unsigned int actuator_idx)
|
||||
{
|
||||
return bic->bfqq[is_sync];
|
||||
if (is_sync)
|
||||
return bic->bfqq[1][actuator_idx];
|
||||
|
||||
return bic->bfqq[0][actuator_idx];
|
||||
}
|
||||
|
||||
static void bfq_put_stable_ref(struct bfq_queue *bfqq);
|
||||
|
||||
void bic_set_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq, bool is_sync)
|
||||
void bic_set_bfqq(struct bfq_io_cq *bic,
|
||||
struct bfq_queue *bfqq,
|
||||
bool is_sync,
|
||||
unsigned int actuator_idx)
|
||||
{
|
||||
struct bfq_queue *old_bfqq = bic->bfqq[is_sync];
|
||||
struct bfq_queue *old_bfqq = bic->bfqq[is_sync][actuator_idx];
|
||||
|
||||
/* Clear bic pointer if bfqq is detached from this bic */
|
||||
if (old_bfqq && old_bfqq->bic == bic)
|
||||
@@ -405,7 +412,10 @@ void bic_set_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq, bool is_sync)
|
||||
* we cancel the stable merge if
|
||||
* bic->stable_merge_bfqq == bfqq.
|
||||
*/
|
||||
bic->bfqq[is_sync] = bfqq;
|
||||
if (is_sync)
|
||||
bic->bfqq[1][actuator_idx] = bfqq;
|
||||
else
|
||||
bic->bfqq[0][actuator_idx] = bfqq;
|
||||
|
||||
if (bfqq && bic->stable_merge_bfqq == bfqq) {
|
||||
/*
|
||||
@@ -571,23 +581,31 @@ static struct request *bfq_choose_req(struct bfq_data *bfqd,
|
||||
#define BFQ_LIMIT_INLINE_DEPTH 16
|
||||
|
||||
#ifdef CONFIG_BFQ_GROUP_IOSCHED
|
||||
static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit)
|
||||
static bool bfqq_request_over_limit(struct bfq_data *bfqd,
|
||||
struct bfq_io_cq *bic, blk_opf_t opf,
|
||||
unsigned int act_idx, int limit)
|
||||
{
|
||||
struct bfq_data *bfqd = bfqq->bfqd;
|
||||
struct bfq_entity *entity = &bfqq->entity;
|
||||
struct bfq_entity *inline_entities[BFQ_LIMIT_INLINE_DEPTH];
|
||||
struct bfq_entity **entities = inline_entities;
|
||||
int depth, level, alloc_depth = BFQ_LIMIT_INLINE_DEPTH;
|
||||
int class_idx = bfqq->ioprio_class - 1;
|
||||
int alloc_depth = BFQ_LIMIT_INLINE_DEPTH;
|
||||
struct bfq_sched_data *sched_data;
|
||||
struct bfq_entity *entity;
|
||||
struct bfq_queue *bfqq;
|
||||
unsigned long wsum;
|
||||
bool ret = false;
|
||||
|
||||
if (!entity->on_st_or_in_serv)
|
||||
return false;
|
||||
int depth;
|
||||
int level;
|
||||
|
||||
retry:
|
||||
spin_lock_irq(&bfqd->lock);
|
||||
bfqq = bic_to_bfqq(bic, op_is_sync(opf), act_idx);
|
||||
if (!bfqq)
|
||||
goto out;
|
||||
|
||||
entity = &bfqq->entity;
|
||||
if (!entity->on_st_or_in_serv)
|
||||
goto out;
|
||||
|
||||
/* +1 for bfqq entity, root cgroup not included */
|
||||
depth = bfqg_to_blkg(bfqq_group(bfqq))->blkcg->css.cgroup->level + 1;
|
||||
if (depth > alloc_depth) {
|
||||
@@ -632,7 +650,7 @@ retry:
|
||||
* class.
|
||||
*/
|
||||
wsum = 0;
|
||||
for (i = 0; i <= class_idx; i++) {
|
||||
for (i = 0; i <= bfqq->ioprio_class - 1; i++) {
|
||||
wsum = wsum * IOPRIO_BE_NR +
|
||||
sched_data->service_tree[i].wsum;
|
||||
}
|
||||
@@ -655,7 +673,9 @@ out:
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit)
|
||||
static bool bfqq_request_over_limit(struct bfq_data *bfqd,
|
||||
struct bfq_io_cq *bic, blk_opf_t opf,
|
||||
unsigned int act_idx, int limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -680,9 +700,9 @@ static void bfq_limit_depth(blk_opf_t opf, struct blk_mq_alloc_data *data)
|
||||
{
|
||||
struct bfq_data *bfqd = data->q->elevator->elevator_data;
|
||||
struct bfq_io_cq *bic = bfq_bic_lookup(data->q);
|
||||
struct bfq_queue *bfqq = bic ? bic_to_bfqq(bic, op_is_sync(opf)) : NULL;
|
||||
int depth;
|
||||
unsigned limit = data->q->nr_requests;
|
||||
unsigned int act_idx;
|
||||
|
||||
/* Sync reads have full depth available */
|
||||
if (op_is_sync(opf) && !op_is_write(opf)) {
|
||||
@@ -692,14 +712,22 @@ static void bfq_limit_depth(blk_opf_t opf, struct blk_mq_alloc_data *data)
|
||||
limit = (limit * depth) >> bfqd->full_depth_shift;
|
||||
}
|
||||
|
||||
/*
|
||||
* Does queue (or any parent entity) exceed number of requests that
|
||||
* should be available to it? Heavily limit depth so that it cannot
|
||||
* consume more available requests and thus starve other entities.
|
||||
*/
|
||||
if (bfqq && bfqq_request_over_limit(bfqq, limit))
|
||||
depth = 1;
|
||||
for (act_idx = 0; bic && act_idx < bfqd->num_actuators; act_idx++) {
|
||||
/* Fast path to check if bfqq is already allocated. */
|
||||
if (!bic_to_bfqq(bic, op_is_sync(opf), act_idx))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Does queue (or any parent entity) exceed number of
|
||||
* requests that should be available to it? Heavily
|
||||
* limit depth so that it cannot consume more
|
||||
* available requests and thus starve other entities.
|
||||
*/
|
||||
if (bfqq_request_over_limit(bfqd, bic, opf, act_idx, limit)) {
|
||||
depth = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
bfq_log(bfqd, "[%s] wr_busy %d sync %d depth %u",
|
||||
__func__, bfqd->wr_busy_queues, op_is_sync(opf), depth);
|
||||
if (depth)
|
||||
@@ -1820,6 +1848,18 @@ static bool bfq_bfqq_higher_class_or_weight(struct bfq_queue *bfqq,
|
||||
return bfqq_weight > in_serv_weight;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the index of the actuator that will serve bio.
|
||||
*/
|
||||
static unsigned int bfq_actuator_index(struct bfq_data *bfqd, struct bio *bio)
|
||||
{
|
||||
/*
|
||||
* Multi-actuator support not complete yet, so always return 0
|
||||
* for the moment (to keep incomplete mechanisms off).
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool bfq_better_to_idle(struct bfq_queue *bfqq);
|
||||
|
||||
static void bfq_bfqq_handle_idle_busy_switch(struct bfq_data *bfqd,
|
||||
@@ -2150,7 +2190,7 @@ static void bfq_check_waker(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
* We reset waker detection logic also if too much time has passed
|
||||
* since the first detection. If wakeups are rare, pointless idling
|
||||
* doesn't hurt throughput that much. The condition below makes sure
|
||||
* we do not uselessly idle blocking waker in more than 1/64 cases.
|
||||
* we do not uselessly idle blocking waker in more than 1/64 cases.
|
||||
*/
|
||||
if (bfqd->last_completed_rq_bfqq !=
|
||||
bfqq->tentative_waker_bfqq ||
|
||||
@@ -2486,7 +2526,8 @@ static bool bfq_bio_merge(struct request_queue *q, struct bio *bio,
|
||||
*/
|
||||
bfq_bic_update_cgroup(bic, bio);
|
||||
|
||||
bfqd->bio_bfqq = bic_to_bfqq(bic, op_is_sync(bio->bi_opf));
|
||||
bfqd->bio_bfqq = bic_to_bfqq(bic, op_is_sync(bio->bi_opf),
|
||||
bfq_actuator_index(bfqd, bio));
|
||||
} else {
|
||||
bfqd->bio_bfqq = NULL;
|
||||
}
|
||||
@@ -3188,7 +3229,7 @@ static struct bfq_queue *bfq_merge_bfqqs(struct bfq_data *bfqd,
|
||||
/*
|
||||
* Merge queues (that is, let bic redirect its requests to new_bfqq)
|
||||
*/
|
||||
bic_set_bfqq(bic, new_bfqq, true);
|
||||
bic_set_bfqq(bic, new_bfqq, true, bfqq->actuator_idx);
|
||||
bfq_mark_bfqq_coop(new_bfqq);
|
||||
/*
|
||||
* new_bfqq now belongs to at least two bics (it is a shared queue):
|
||||
@@ -4818,11 +4859,8 @@ check_queue:
|
||||
*/
|
||||
if (bfq_bfqq_wait_request(bfqq) ||
|
||||
(bfqq->dispatched != 0 && bfq_better_to_idle(bfqq))) {
|
||||
struct bfq_queue *async_bfqq =
|
||||
bfqq->bic && bfqq->bic->bfqq[0] &&
|
||||
bfq_bfqq_busy(bfqq->bic->bfqq[0]) &&
|
||||
bfqq->bic->bfqq[0]->next_rq ?
|
||||
bfqq->bic->bfqq[0] : NULL;
|
||||
unsigned int act_idx = bfqq->actuator_idx;
|
||||
struct bfq_queue *async_bfqq = NULL;
|
||||
struct bfq_queue *blocked_bfqq =
|
||||
!hlist_empty(&bfqq->woken_list) ?
|
||||
container_of(bfqq->woken_list.first,
|
||||
@@ -4830,6 +4868,10 @@ check_queue:
|
||||
woken_list_node)
|
||||
: NULL;
|
||||
|
||||
if (bfqq->bic && bfqq->bic->bfqq[0][act_idx] &&
|
||||
bfq_bfqq_busy(bfqq->bic->bfqq[0][act_idx]) &&
|
||||
bfqq->bic->bfqq[0][act_idx]->next_rq)
|
||||
async_bfqq = bfqq->bic->bfqq[0][act_idx];
|
||||
/*
|
||||
* The next four mutually-exclusive ifs decide
|
||||
* whether to try injection, and choose the queue to
|
||||
@@ -4914,7 +4956,7 @@ check_queue:
|
||||
icq_to_bic(async_bfqq->next_rq->elv.icq) == bfqq->bic &&
|
||||
bfq_serv_to_charge(async_bfqq->next_rq, async_bfqq) <=
|
||||
bfq_bfqq_budget_left(async_bfqq))
|
||||
bfqq = bfqq->bic->bfqq[0];
|
||||
bfqq = bfqq->bic->bfqq[0][act_idx];
|
||||
else if (bfqq->waker_bfqq &&
|
||||
bfq_bfqq_busy(bfqq->waker_bfqq) &&
|
||||
bfqq->waker_bfqq->next_rq &&
|
||||
@@ -5375,48 +5417,54 @@ static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq)
|
||||
bfq_release_process_ref(bfqd, bfqq);
|
||||
}
|
||||
|
||||
static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync)
|
||||
static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync,
|
||||
unsigned int actuator_idx)
|
||||
{
|
||||
struct bfq_queue *bfqq = bic_to_bfqq(bic, is_sync);
|
||||
struct bfq_queue *bfqq = bic_to_bfqq(bic, is_sync, actuator_idx);
|
||||
struct bfq_data *bfqd;
|
||||
|
||||
if (bfqq)
|
||||
bfqd = bfqq->bfqd; /* NULL if scheduler already exited */
|
||||
|
||||
if (bfqq && bfqd) {
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&bfqd->lock, flags);
|
||||
bic_set_bfqq(bic, NULL, is_sync);
|
||||
bic_set_bfqq(bic, NULL, is_sync, actuator_idx);
|
||||
bfq_exit_bfqq(bfqd, bfqq);
|
||||
spin_unlock_irqrestore(&bfqd->lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void bfq_exit_icq(struct io_cq *icq)
|
||||
{
|
||||
struct bfq_io_cq *bic = icq_to_bic(icq);
|
||||
struct bfq_data *bfqd = bic_to_bfqd(bic);
|
||||
unsigned long flags;
|
||||
unsigned int act_idx;
|
||||
/*
|
||||
* If bfqd and thus bfqd->num_actuators is not available any
|
||||
* longer, then cycle over all possible per-actuator bfqqs in
|
||||
* next loop. We rely on bic being zeroed on creation, and
|
||||
* therefore on its unused per-actuator fields being NULL.
|
||||
*/
|
||||
unsigned int num_actuators = BFQ_MAX_ACTUATORS;
|
||||
|
||||
if (bic->stable_merge_bfqq) {
|
||||
struct bfq_data *bfqd = bic->stable_merge_bfqq->bfqd;
|
||||
|
||||
/*
|
||||
* bfqd is NULL if scheduler already exited, and in
|
||||
* that case this is the last time bfqq is accessed.
|
||||
*/
|
||||
if (bfqd) {
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&bfqd->lock, flags);
|
||||
bfq_put_stable_ref(bic->stable_merge_bfqq);
|
||||
spin_unlock_irqrestore(&bfqd->lock, flags);
|
||||
} else {
|
||||
bfq_put_stable_ref(bic->stable_merge_bfqq);
|
||||
}
|
||||
/*
|
||||
* bfqd is NULL if scheduler already exited, and in that case
|
||||
* this is the last time these queues are accessed.
|
||||
*/
|
||||
if (bfqd) {
|
||||
spin_lock_irqsave(&bfqd->lock, flags);
|
||||
num_actuators = bfqd->num_actuators;
|
||||
}
|
||||
|
||||
bfq_exit_icq_bfqq(bic, true);
|
||||
bfq_exit_icq_bfqq(bic, false);
|
||||
if (bic->stable_merge_bfqq)
|
||||
bfq_put_stable_ref(bic->stable_merge_bfqq);
|
||||
|
||||
for (act_idx = 0; act_idx < num_actuators; act_idx++) {
|
||||
bfq_exit_icq_bfqq(bic, true, act_idx);
|
||||
bfq_exit_icq_bfqq(bic, false, act_idx);
|
||||
}
|
||||
|
||||
if (bfqd)
|
||||
spin_unlock_irqrestore(&bfqd->lock, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5493,25 +5541,27 @@ static void bfq_check_ioprio_change(struct bfq_io_cq *bic, struct bio *bio)
|
||||
|
||||
bic->ioprio = ioprio;
|
||||
|
||||
bfqq = bic_to_bfqq(bic, false);
|
||||
bfqq = bic_to_bfqq(bic, false, bfq_actuator_index(bfqd, bio));
|
||||
if (bfqq) {
|
||||
struct bfq_queue *old_bfqq = bfqq;
|
||||
|
||||
bfqq = bfq_get_queue(bfqd, bio, false, bic, true);
|
||||
bic_set_bfqq(bic, bfqq, false);
|
||||
bic_set_bfqq(bic, bfqq, false, bfq_actuator_index(bfqd, bio));
|
||||
bfq_release_process_ref(bfqd, old_bfqq);
|
||||
}
|
||||
|
||||
bfqq = bic_to_bfqq(bic, true);
|
||||
bfqq = bic_to_bfqq(bic, true, bfq_actuator_index(bfqd, bio));
|
||||
if (bfqq)
|
||||
bfq_set_next_ioprio_data(bfqq, bic);
|
||||
}
|
||||
|
||||
static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
struct bfq_io_cq *bic, pid_t pid, int is_sync)
|
||||
struct bfq_io_cq *bic, pid_t pid, int is_sync,
|
||||
unsigned int act_idx)
|
||||
{
|
||||
u64 now_ns = ktime_get_ns();
|
||||
|
||||
bfqq->actuator_idx = act_idx;
|
||||
RB_CLEAR_NODE(&bfqq->entity.rb_node);
|
||||
INIT_LIST_HEAD(&bfqq->fifo);
|
||||
INIT_HLIST_NODE(&bfqq->burst_list_node);
|
||||
@@ -5762,7 +5812,7 @@ static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd,
|
||||
|
||||
if (bfqq) {
|
||||
bfq_init_bfqq(bfqd, bfqq, bic, current->pid,
|
||||
is_sync);
|
||||
is_sync, bfq_actuator_index(bfqd, bio));
|
||||
bfq_init_entity(&bfqq->entity, bfqg);
|
||||
bfq_log_bfqq(bfqd, bfqq, "allocated");
|
||||
} else {
|
||||
@@ -6078,7 +6128,8 @@ static bool __bfq_insert_request(struct bfq_data *bfqd, struct request *rq)
|
||||
* then complete the merge and redirect it to
|
||||
* new_bfqq.
|
||||
*/
|
||||
if (bic_to_bfqq(RQ_BIC(rq), 1) == bfqq) {
|
||||
if (bic_to_bfqq(RQ_BIC(rq), true,
|
||||
bfq_actuator_index(bfqd, rq->bio)) == bfqq) {
|
||||
while (bfqq != new_bfqq)
|
||||
bfqq = bfq_merge_bfqqs(bfqd, RQ_BIC(rq), bfqq);
|
||||
}
|
||||
@@ -6632,7 +6683,7 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)
|
||||
return bfqq;
|
||||
}
|
||||
|
||||
bic_set_bfqq(bic, NULL, true);
|
||||
bic_set_bfqq(bic, NULL, true, bfqq->actuator_idx);
|
||||
|
||||
bfq_put_cooperator(bfqq);
|
||||
|
||||
@@ -6646,7 +6697,8 @@ static struct bfq_queue *bfq_get_bfqq_handle_split(struct bfq_data *bfqd,
|
||||
bool split, bool is_sync,
|
||||
bool *new_queue)
|
||||
{
|
||||
struct bfq_queue *bfqq = bic_to_bfqq(bic, is_sync);
|
||||
unsigned int act_idx = bfq_actuator_index(bfqd, bio);
|
||||
struct bfq_queue *bfqq = bic_to_bfqq(bic, is_sync, act_idx);
|
||||
|
||||
if (likely(bfqq && bfqq != &bfqd->oom_bfqq))
|
||||
return bfqq;
|
||||
@@ -6658,7 +6710,7 @@ static struct bfq_queue *bfq_get_bfqq_handle_split(struct bfq_data *bfqd,
|
||||
bfq_put_queue(bfqq);
|
||||
bfqq = bfq_get_queue(bfqd, bio, is_sync, bic, split);
|
||||
|
||||
bic_set_bfqq(bic, bfqq, is_sync);
|
||||
bic_set_bfqq(bic, bfqq, is_sync, act_idx);
|
||||
if (split && is_sync) {
|
||||
if ((bic->was_in_burst_list && bfqd->large_burst) ||
|
||||
bic->saved_in_large_burst)
|
||||
@@ -7139,8 +7191,10 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)
|
||||
* Our fallback bfqq if bfq_find_alloc_queue() runs into OOM issues.
|
||||
* Grab a permanent reference to it, so that the normal code flow
|
||||
* will not attempt to free it.
|
||||
* Set zero as actuator index: we will pretend that
|
||||
* all I/O requests are for the same actuator.
|
||||
*/
|
||||
bfq_init_bfqq(bfqd, &bfqd->oom_bfqq, NULL, 1, 0);
|
||||
bfq_init_bfqq(bfqd, &bfqd->oom_bfqq, NULL, 1, 0, 0);
|
||||
bfqd->oom_bfqq.ref++;
|
||||
bfqd->oom_bfqq.new_ioprio = BFQ_DEFAULT_QUEUE_IOPRIO;
|
||||
bfqd->oom_bfqq.new_ioprio_class = IOPRIO_CLASS_BE;
|
||||
@@ -7159,6 +7213,13 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)
|
||||
|
||||
bfqd->queue = q;
|
||||
|
||||
/*
|
||||
* Multi-actuator support not complete yet, unconditionally
|
||||
* set to only one actuator for the moment (to keep incomplete
|
||||
* mechanisms off).
|
||||
*/
|
||||
bfqd->num_actuators = 1;
|
||||
|
||||
INIT_LIST_HEAD(&bfqd->dispatch);
|
||||
|
||||
hrtimer_init(&bfqd->idle_slice_timer, CLOCK_MONOTONIC,
|
||||
|
||||
@@ -33,6 +33,14 @@
|
||||
*/
|
||||
#define BFQ_SOFTRT_WEIGHT_FACTOR 100
|
||||
|
||||
/*
|
||||
* Maximum number of actuators supported. This constant is used simply
|
||||
* to define the size of the static array that will contain
|
||||
* per-actuator data. The current value is hopefully a good upper
|
||||
* bound to the possible number of actuators of any actual drive.
|
||||
*/
|
||||
#define BFQ_MAX_ACTUATORS 8
|
||||
|
||||
struct bfq_entity;
|
||||
|
||||
/**
|
||||
@@ -225,12 +233,14 @@ struct bfq_ttime {
|
||||
* struct bfq_queue - leaf schedulable entity.
|
||||
*
|
||||
* A bfq_queue is a leaf request queue; it can be associated with an
|
||||
* io_context or more, if it is async or shared between cooperating
|
||||
* processes. @cgroup holds a reference to the cgroup, to be sure that it
|
||||
* does not disappear while a bfqq still references it (mostly to avoid
|
||||
* races between request issuing and task migration followed by cgroup
|
||||
* destruction).
|
||||
* All the fields are protected by the queue lock of the containing bfqd.
|
||||
* io_context or more, if it is async or shared between cooperating
|
||||
* processes. Besides, it contains I/O requests for only one actuator
|
||||
* (an io_context is associated with a different bfq_queue for each
|
||||
* actuator it generates I/O for). @cgroup holds a reference to the
|
||||
* cgroup, to be sure that it does not disappear while a bfqq still
|
||||
* references it (mostly to avoid races between request issuing and
|
||||
* task migration followed by cgroup destruction). All the fields are
|
||||
* protected by the queue lock of the containing bfqd.
|
||||
*/
|
||||
struct bfq_queue {
|
||||
/* reference counter */
|
||||
@@ -395,6 +405,9 @@ struct bfq_queue {
|
||||
* the woken queues when this queue exits.
|
||||
*/
|
||||
struct hlist_head woken_list;
|
||||
|
||||
/* index of the actuator this queue is associated with */
|
||||
unsigned int actuator_idx;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -403,8 +416,17 @@ struct bfq_queue {
|
||||
struct bfq_io_cq {
|
||||
/* associated io_cq structure */
|
||||
struct io_cq icq; /* must be the first member */
|
||||
/* array of two process queues, the sync and the async */
|
||||
struct bfq_queue *bfqq[2];
|
||||
/*
|
||||
* Matrix of associated process queues: first row for async
|
||||
* queues, second row sync queues. Each row contains one
|
||||
* column for each actuator. An I/O request generated by the
|
||||
* process is inserted into the queue pointed by bfqq[i][j] if
|
||||
* the request is to be served by the j-th actuator of the
|
||||
* drive, where i==0 or i==1, depending on whether the request
|
||||
* is async or sync. So there is a distinct queue for each
|
||||
* actuator.
|
||||
*/
|
||||
struct bfq_queue *bfqq[2][BFQ_MAX_ACTUATORS];
|
||||
/* per (request_queue, blkcg) ioprio */
|
||||
int ioprio;
|
||||
#ifdef CONFIG_BFQ_GROUP_IOSCHED
|
||||
@@ -768,6 +790,13 @@ struct bfq_data {
|
||||
*/
|
||||
unsigned int word_depths[2][2];
|
||||
unsigned int full_depth_shift;
|
||||
|
||||
/*
|
||||
* Number of independent actuators. This is equal to 1 in
|
||||
* case of single-actuator drives.
|
||||
*/
|
||||
unsigned int num_actuators;
|
||||
|
||||
};
|
||||
|
||||
enum bfqq_state_flags {
|
||||
@@ -964,8 +993,10 @@ struct bfq_group {
|
||||
|
||||
extern const int bfq_timeout;
|
||||
|
||||
struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync);
|
||||
void bic_set_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq, bool is_sync);
|
||||
struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync,
|
||||
unsigned int actuator_idx);
|
||||
void bic_set_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq, bool is_sync,
|
||||
unsigned int actuator_idx);
|
||||
struct bfq_data *bic_to_bfqd(struct bfq_io_cq *bic);
|
||||
void bfq_pos_tree_add_move(struct bfq_data *bfqd, struct bfq_queue *bfqq);
|
||||
void bfq_weights_tree_add(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
|
||||
@@ -73,7 +73,7 @@ struct bio_slab {
|
||||
struct kmem_cache *slab;
|
||||
unsigned int slab_ref;
|
||||
unsigned int slab_size;
|
||||
char name[8];
|
||||
char name[12];
|
||||
};
|
||||
static DEFINE_MUTEX(bio_slab_lock);
|
||||
static DEFINE_XARRAY(bio_slabs);
|
||||
|
||||
@@ -682,7 +682,7 @@ static void utf16_le_to_7bit(const __le16 *in, unsigned int size, u8 *out)
|
||||
out[size] = 0;
|
||||
|
||||
while (i < size) {
|
||||
u8 c = le16_to_cpu(in[i]) & 0xff;
|
||||
u8 c = le16_to_cpu(in[i]) & 0x7f;
|
||||
|
||||
if (c && !isprint(c))
|
||||
c = '!';
|
||||
|
||||
@@ -485,7 +485,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
||||
cmd_mask = nd_desc->cmd_mask;
|
||||
if (cmd == ND_CMD_CALL && call_pkg->nd_family) {
|
||||
family = call_pkg->nd_family;
|
||||
if (family > NVDIMM_BUS_FAMILY_MAX ||
|
||||
if (call_pkg->nd_family > NVDIMM_BUS_FAMILY_MAX ||
|
||||
!test_bit(family, &nd_desc->bus_family_mask))
|
||||
return -EINVAL;
|
||||
family = array_index_nospec(family,
|
||||
|
||||
@@ -268,6 +268,10 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
|
||||
ACPI_CX_DESC_LEN, "ACPI P_LVL3 IOPORT 0x%x",
|
||||
pr->power.states[ACPI_STATE_C3].address);
|
||||
|
||||
if (!pr->power.states[ACPI_STATE_C2].address &&
|
||||
!pr->power.states[ACPI_STATE_C3].address)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -439,6 +439,13 @@ static const struct dmi_system_id asus_laptop[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1404VAP */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "X1404VAP"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1504VAP */
|
||||
.matches = {
|
||||
@@ -553,6 +560,12 @@ static const struct dmi_system_id maingear_laptop[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "RP-15"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Eluktronics Inc."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "MECH-17"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GM6XGxX/TUXEDO Stellaris 16 Gen5 AMD */
|
||||
.matches = {
|
||||
|
||||
@@ -2024,6 +2024,7 @@ static bool __fw_devlink_relax_cycles(struct fwnode_handle *con_handle,
|
||||
out:
|
||||
sup_handle->flags &= ~FWNODE_FLAG_VISITED;
|
||||
put_device(sup_dev);
|
||||
put_device(con_dev);
|
||||
put_device(par_dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -895,6 +895,9 @@ static void __device_resume(struct device *dev, pm_message_t state, bool async)
|
||||
if (dev->power.syscore)
|
||||
goto Complete;
|
||||
|
||||
if (!dev->power.is_suspended)
|
||||
goto Complete;
|
||||
|
||||
if (dev->power.direct_complete) {
|
||||
/* Match the pm_runtime_disable() in __device_suspend(). */
|
||||
pm_runtime_enable(dev);
|
||||
@@ -913,9 +916,6 @@ static void __device_resume(struct device *dev, pm_message_t state, bool async)
|
||||
*/
|
||||
dev->power.is_prepared = false;
|
||||
|
||||
if (!dev->power.is_suspended)
|
||||
goto Unlock;
|
||||
|
||||
if (dev->pm_domain) {
|
||||
info = "power domain ";
|
||||
callback = pm_op(&dev->pm_domain->ops, state);
|
||||
@@ -955,7 +955,6 @@ static void __device_resume(struct device *dev, pm_message_t state, bool async)
|
||||
error = dpm_run_callback(callback, dev, state, info);
|
||||
dev->power.is_suspended = false;
|
||||
|
||||
Unlock:
|
||||
device_unlock(dev);
|
||||
dpm_watchdog_clear(&wd);
|
||||
|
||||
@@ -1239,14 +1238,13 @@ Skip:
|
||||
dev->power.is_noirq_suspended = true;
|
||||
|
||||
/*
|
||||
* Skipping the resume of devices that were in use right before the
|
||||
* system suspend (as indicated by their PM-runtime usage counters)
|
||||
* would be suboptimal. Also resume them if doing that is not allowed
|
||||
* to be skipped.
|
||||
* Devices must be resumed unless they are explicitly allowed to be left
|
||||
* in suspend, but even in that case skipping the resume of devices that
|
||||
* were in use right before the system suspend (as indicated by their
|
||||
* runtime PM usage counters and child counters) would be suboptimal.
|
||||
*/
|
||||
if (atomic_read(&dev->power.usage_count) > 1 ||
|
||||
!(dev_pm_test_driver_flags(dev, DPM_FLAG_MAY_SKIP_RESUME) &&
|
||||
dev->power.may_skip_resume))
|
||||
if (!(dev_pm_test_driver_flags(dev, DPM_FLAG_MAY_SKIP_RESUME) &&
|
||||
dev->power.may_skip_resume) || !pm_runtime_need_not_resume(dev))
|
||||
dev->power.must_resume = true;
|
||||
|
||||
if (dev->power.must_resume)
|
||||
@@ -1644,6 +1642,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
|
||||
pm_runtime_disable(dev);
|
||||
if (pm_runtime_status_suspended(dev)) {
|
||||
pm_dev_dbg(dev, state, "direct-complete ");
|
||||
dev->power.is_suspended = true;
|
||||
goto Complete;
|
||||
}
|
||||
|
||||
|
||||
@@ -1841,7 +1841,7 @@ void pm_runtime_drop_link(struct device_link *link)
|
||||
pm_request_idle(link->supplier);
|
||||
}
|
||||
|
||||
static bool pm_runtime_need_not_resume(struct device *dev)
|
||||
bool pm_runtime_need_not_resume(struct device *dev)
|
||||
{
|
||||
return atomic_read(&dev->power.usage_count) <= 1 &&
|
||||
(atomic_read(&dev->power.child_count) == 0 ||
|
||||
|
||||
@@ -1873,9 +1873,12 @@ static int ublk_ctrl_set_params(struct ublk_device *ub,
|
||||
if (ph.len > sizeof(struct ublk_params))
|
||||
ph.len = sizeof(struct ublk_params);
|
||||
|
||||
/* parameters can only be changed when device isn't live */
|
||||
mutex_lock(&ub->mutex);
|
||||
if (ub->dev_info.state == UBLK_S_DEV_LIVE) {
|
||||
if (test_bit(UB_STATE_USED, &ub->state)) {
|
||||
/*
|
||||
* Parameters can only be changed when device hasn't
|
||||
* been started yet
|
||||
*/
|
||||
ret = -EACCES;
|
||||
} else if (copy_from_user(&ub->params, argp, ph.len)) {
|
||||
ret = -EFAULT;
|
||||
|
||||
@@ -246,6 +246,39 @@ int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qca_send_pre_shutdown_cmd);
|
||||
|
||||
static bool qca_filename_has_extension(const char *filename)
|
||||
{
|
||||
const char *suffix = strrchr(filename, '.');
|
||||
|
||||
/* File extensions require a dot, but not as the first or last character */
|
||||
if (!suffix || suffix == filename || *(suffix + 1) == '\0')
|
||||
return 0;
|
||||
|
||||
/* Avoid matching directories with names that look like files with extensions */
|
||||
return !strchr(suffix, '/');
|
||||
}
|
||||
|
||||
static bool qca_get_alt_nvm_file(char *filename, size_t max_size)
|
||||
{
|
||||
char fwname[64];
|
||||
const char *suffix;
|
||||
|
||||
/* nvm file name has an extension, replace with .bin */
|
||||
if (qca_filename_has_extension(filename)) {
|
||||
suffix = strrchr(filename, '.');
|
||||
strscpy(fwname, filename, suffix - filename + 1);
|
||||
snprintf(fwname + (suffix - filename),
|
||||
sizeof(fwname) - (suffix - filename), ".bin");
|
||||
/* If nvm file is already the default one, return false to skip the retry. */
|
||||
if (strcmp(fwname, filename) == 0)
|
||||
return false;
|
||||
|
||||
snprintf(filename, max_size, "%s", fwname);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int qca_tlv_check_data(struct hci_dev *hdev,
|
||||
struct qca_fw_config *config,
|
||||
u8 *fw_data, size_t fw_size,
|
||||
@@ -543,6 +576,19 @@ static int qca_download_firmware(struct hci_dev *hdev,
|
||||
config->fwname, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
/* If the board-specific file is missing, try loading the default
|
||||
* one, unless that was attempted already.
|
||||
*/
|
||||
else if (config->type == TLV_TYPE_NVM &&
|
||||
qca_get_alt_nvm_file(config->fwname, sizeof(config->fwname))) {
|
||||
bt_dev_info(hdev, "QCA Downloading %s", config->fwname);
|
||||
ret = request_firmware(&fw, config->fwname, &hdev->dev);
|
||||
if (ret) {
|
||||
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
|
||||
config->fwname, ret);
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
|
||||
config->fwname, ret);
|
||||
|
||||
@@ -3769,6 +3769,7 @@ static ssize_t force_poll_sync_write(struct file *file,
|
||||
}
|
||||
|
||||
static const struct file_operations force_poll_sync_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = simple_open,
|
||||
.read = force_poll_sync_read,
|
||||
.write = force_poll_sync_write,
|
||||
|
||||
@@ -824,8 +824,9 @@ static void mhi_pci_recovery_work(struct work_struct *work)
|
||||
err_unprepare:
|
||||
mhi_unprepare_after_power_down(mhi_cntrl);
|
||||
err_try_reset:
|
||||
if (pci_reset_function(pdev))
|
||||
dev_err(&pdev->dev, "Recovery failed\n");
|
||||
err = pci_try_reset_function(pdev);
|
||||
if (err)
|
||||
dev_err(&pdev->dev, "Recovery failed: %d\n", err);
|
||||
}
|
||||
|
||||
static void health_check(struct timer_list *t)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* Access to the event log extended by the TCG BIOS of PC platform
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/security.h>
|
||||
@@ -62,6 +63,11 @@ static bool tpm_is_tpm2_log(void *bios_event_log, u64 len)
|
||||
return n == 0;
|
||||
}
|
||||
|
||||
static void tpm_bios_log_free(void *data)
|
||||
{
|
||||
kvfree(data);
|
||||
}
|
||||
|
||||
/* read binary bios log */
|
||||
int tpm_read_log_acpi(struct tpm_chip *chip)
|
||||
{
|
||||
@@ -135,7 +141,7 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
|
||||
}
|
||||
|
||||
/* malloc EventLog space */
|
||||
log->bios_event_log = kmalloc(len, GFP_KERNEL);
|
||||
log->bios_event_log = kvmalloc(len, GFP_KERNEL);
|
||||
if (!log->bios_event_log)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -161,10 +167,16 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = devm_add_action(&chip->dev, tpm_bios_log_free, log->bios_event_log);
|
||||
if (ret) {
|
||||
log->bios_event_log = NULL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
return format;
|
||||
|
||||
err:
|
||||
kfree(log->bios_event_log);
|
||||
tpm_bios_log_free(log->bios_event_log);
|
||||
log->bios_event_log = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Thiebaud Weksteen <tweek@google.com>
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/efi.h>
|
||||
#include <linux/tpm_eventlog.h>
|
||||
|
||||
@@ -55,7 +56,7 @@ int tpm_read_log_efi(struct tpm_chip *chip)
|
||||
}
|
||||
|
||||
/* malloc EventLog space */
|
||||
log->bios_event_log = kmemdup(log_tbl->log, log_size, GFP_KERNEL);
|
||||
log->bios_event_log = devm_kmemdup(&chip->dev, log_tbl->log, log_size, GFP_KERNEL);
|
||||
if (!log->bios_event_log) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
@@ -76,7 +77,7 @@ int tpm_read_log_efi(struct tpm_chip *chip)
|
||||
MEMREMAP_WB);
|
||||
if (!final_tbl) {
|
||||
pr_err("Could not map UEFI TPM final log\n");
|
||||
kfree(log->bios_event_log);
|
||||
devm_kfree(&chip->dev, log->bios_event_log);
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
@@ -91,11 +92,11 @@ int tpm_read_log_efi(struct tpm_chip *chip)
|
||||
* Allocate memory for the 'combined log' where we will append the
|
||||
* 'final events log' to.
|
||||
*/
|
||||
tmp = krealloc(log->bios_event_log,
|
||||
log_size + final_events_log_size,
|
||||
GFP_KERNEL);
|
||||
tmp = devm_krealloc(&chip->dev, log->bios_event_log,
|
||||
log_size + final_events_log_size,
|
||||
GFP_KERNEL);
|
||||
if (!tmp) {
|
||||
kfree(log->bios_event_log);
|
||||
devm_kfree(&chip->dev, log->bios_event_log);
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* Read the event log created by the firmware on PPC64
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/tpm_eventlog.h>
|
||||
@@ -65,7 +66,7 @@ int tpm_read_log_of(struct tpm_chip *chip)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
log->bios_event_log = kmemdup(__va(base), size, GFP_KERNEL);
|
||||
log->bios_event_log = devm_kmemdup(&chip->dev, __va(base), size, GFP_KERNEL);
|
||||
if (!log->bios_event_log)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -267,7 +267,6 @@ static void tpm_dev_release(struct device *dev)
|
||||
idr_remove(&dev_nums_idr, chip->dev_num);
|
||||
mutex_unlock(&idr_lock);
|
||||
|
||||
kfree(chip->log.bios_event_log);
|
||||
kfree(chip->work_space.context_buf);
|
||||
kfree(chip->work_space.session_buf);
|
||||
kfree(chip->allocated_banks);
|
||||
|
||||
@@ -31,6 +31,7 @@ static const struct mtk_gate_regs bdp1_cg_regs = {
|
||||
GATE_MTK(_id, _name, _parent, &bdp1_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
static const struct mtk_gate bdp_clks[] = {
|
||||
GATE_DUMMY(CLK_DUMMY, "bdp_dummy"),
|
||||
GATE_BDP0(CLK_BDP_BRG_BA, "brg_baclk", "mm_sel", 0),
|
||||
GATE_BDP0(CLK_BDP_BRG_DRAM, "brg_dram", "mm_sel", 1),
|
||||
GATE_BDP0(CLK_BDP_LARB_DRAM, "larb_dram", "mm_sel", 2),
|
||||
|
||||
@@ -22,6 +22,7 @@ static const struct mtk_gate_regs img_cg_regs = {
|
||||
GATE_MTK(_id, _name, _parent, &img_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate img_clks[] = {
|
||||
GATE_DUMMY(CLK_DUMMY, "img_dummy"),
|
||||
GATE_IMG(CLK_IMG_SMI_COMM, "img_smi_comm", "mm_sel", 0),
|
||||
GATE_IMG(CLK_IMG_RESZ, "img_resz", "mm_sel", 1),
|
||||
GATE_IMG(CLK_IMG_JPGDEC_SMI, "img_jpgdec_smi", "mm_sel", 5),
|
||||
|
||||
@@ -31,6 +31,7 @@ static const struct mtk_gate_regs vdec1_cg_regs = {
|
||||
GATE_MTK(_id, _name, _parent, &vdec1_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
static const struct mtk_gate vdec_clks[] = {
|
||||
GATE_DUMMY(CLK_DUMMY, "vdec_dummy"),
|
||||
GATE_VDEC0(CLK_VDEC_CKGEN, "vdec_cken", "vdec_sel", 0),
|
||||
GATE_VDEC1(CLK_VDEC_LARB, "vdec_larb_cken", "mm_sel", 0),
|
||||
};
|
||||
|
||||
@@ -21,6 +21,22 @@
|
||||
#include "clk-gate.h"
|
||||
#include "clk-mux.h"
|
||||
|
||||
const struct mtk_gate_regs cg_regs_dummy = { 0, 0, 0 };
|
||||
EXPORT_SYMBOL_GPL(cg_regs_dummy);
|
||||
|
||||
static int mtk_clk_dummy_enable(struct clk_hw *hw)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mtk_clk_dummy_disable(struct clk_hw *hw) { }
|
||||
|
||||
const struct clk_ops mtk_clk_dummy_ops = {
|
||||
.enable = mtk_clk_dummy_enable,
|
||||
.disable = mtk_clk_dummy_disable,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mtk_clk_dummy_ops);
|
||||
|
||||
static void mtk_init_clk_data(struct clk_hw_onecell_data *clk_data,
|
||||
unsigned int clk_num)
|
||||
{
|
||||
|
||||
@@ -22,6 +22,25 @@
|
||||
|
||||
struct platform_device;
|
||||
|
||||
/*
|
||||
* We need the clock IDs to start from zero but to maintain devicetree
|
||||
* backwards compatibility we can't change bindings to start from zero.
|
||||
* Only a few platforms are affected, so we solve issues given by the
|
||||
* commonized MTK clocks probe function(s) by adding a dummy clock at
|
||||
* the beginning where needed.
|
||||
*/
|
||||
#define CLK_DUMMY 0
|
||||
|
||||
extern const struct clk_ops mtk_clk_dummy_ops;
|
||||
extern const struct mtk_gate_regs cg_regs_dummy;
|
||||
|
||||
#define GATE_DUMMY(_id, _name) { \
|
||||
.id = _id, \
|
||||
.name = _name, \
|
||||
.regs = &cg_regs_dummy, \
|
||||
.ops = &mtk_clk_dummy_ops, \
|
||||
}
|
||||
|
||||
struct mtk_fixed_clk {
|
||||
int id;
|
||||
const char *name;
|
||||
|
||||
@@ -1136,8 +1136,18 @@ static struct clk_regmap g12a_cpu_clk_div16_en = {
|
||||
.hw.init = &(struct clk_init_data) {
|
||||
.name = "cpu_clk_div16_en",
|
||||
.ops = &clk_regmap_gate_ro_ops,
|
||||
.parent_hws = (const struct clk_hw *[]) {
|
||||
&g12a_cpu_clk.hw
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
/*
|
||||
* Note:
|
||||
* G12A and G12B have different cpu clocks (with
|
||||
* different struct clk_hw). We fallback to the global
|
||||
* naming string mechanism so this clock picks
|
||||
* up the appropriate one. Same goes for the other
|
||||
* clock using cpu cluster A clock output and present
|
||||
* on both G12 variant.
|
||||
*/
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
.num_parents = 1,
|
||||
/*
|
||||
@@ -1202,7 +1212,10 @@ static struct clk_regmap g12a_cpu_clk_apb_div = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "cpu_clk_apb_div",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
@@ -1236,7 +1249,10 @@ static struct clk_regmap g12a_cpu_clk_atb_div = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "cpu_clk_atb_div",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
@@ -1270,7 +1286,10 @@ static struct clk_regmap g12a_cpu_clk_axi_div = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "cpu_clk_axi_div",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
@@ -1305,13 +1324,6 @@ static struct clk_regmap g12a_cpu_clk_trace_div = {
|
||||
.name = "cpu_clk_trace_div",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
/*
|
||||
* Note:
|
||||
* G12A and G12B have different cpu_clks (with
|
||||
* different struct clk_hw). We fallback to the global
|
||||
* naming string mechanism so cpu_clk_trace_div picks
|
||||
* up the appropriate one.
|
||||
*/
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
@@ -4187,7 +4199,7 @@ static MESON_GATE(g12a_spicc_1, HHI_GCLK_MPEG0, 14);
|
||||
static MESON_GATE(g12a_hiu_reg, HHI_GCLK_MPEG0, 19);
|
||||
static MESON_GATE(g12a_mipi_dsi_phy, HHI_GCLK_MPEG0, 20);
|
||||
static MESON_GATE(g12a_assist_misc, HHI_GCLK_MPEG0, 23);
|
||||
static MESON_GATE(g12a_emmc_a, HHI_GCLK_MPEG0, 4);
|
||||
static MESON_GATE(g12a_emmc_a, HHI_GCLK_MPEG0, 24);
|
||||
static MESON_GATE(g12a_emmc_b, HHI_GCLK_MPEG0, 25);
|
||||
static MESON_GATE(g12a_emmc_c, HHI_GCLK_MPEG0, 26);
|
||||
static MESON_GATE(g12a_audio_codec, HHI_GCLK_MPEG0, 28);
|
||||
|
||||
@@ -1270,14 +1270,13 @@ static struct clk_regmap gxbb_cts_i958 = {
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* This table skips a clock named 'cts_slow_oscin' in the documentation
|
||||
* This clock does not exist yet in this controller or the AO one
|
||||
*/
|
||||
static u32 gxbb_32k_clk_parents_val_table[] = { 0, 2, 3 };
|
||||
static const struct clk_parent_data gxbb_32k_clk_parent_data[] = {
|
||||
{ .fw_name = "xtal", },
|
||||
/*
|
||||
* FIXME: This clock is provided by the ao clock controller but the
|
||||
* clock is not yet part of the binding of this controller, so string
|
||||
* name must be use to set this parent.
|
||||
*/
|
||||
{ .name = "cts_slow_oscin", .index = -1 },
|
||||
{ .hw = &gxbb_fclk_div3.hw },
|
||||
{ .hw = &gxbb_fclk_div5.hw },
|
||||
};
|
||||
@@ -1287,6 +1286,7 @@ static struct clk_regmap gxbb_32k_clk_sel = {
|
||||
.offset = HHI_32K_CLK_CNTL,
|
||||
.mask = 0x3,
|
||||
.shift = 16,
|
||||
.table = gxbb_32k_clk_parents_val_table,
|
||||
},
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "32k_clk_sel",
|
||||
@@ -1310,7 +1310,7 @@ static struct clk_regmap gxbb_32k_clk_div = {
|
||||
&gxbb_32k_clk_sel.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT | CLK_DIVIDER_ROUND_CLOSEST,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -3771,7 +3771,7 @@ static struct clk_branch gcc_venus0_axi_clk = {
|
||||
|
||||
static struct clk_branch gcc_venus0_core0_vcodec0_clk = {
|
||||
.halt_reg = 0x4c02c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x4c02c,
|
||||
.enable_mask = BIT(0),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user