This is the 5.10.173 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmQMoPMACgkQONu9yGCS aT4a1Q//WHnQOEgEykqbHMree6UQD5F6crB0kUcJTSDB5lblviYGxpOadw2j+670 AGsFg00cm8Sb8p78v3SA+X2UzScGnY5Cwhe+B/JucUSr+4rDlZ9FjOGXbKdlYFc2 sOTp9j/9KrETf0K/VVuCa48rKBPUFvrT7pZUAblZ0vVmk6cSzPW/1iBa4W6Ho6Ec LxqNzCDtyTWX0JCzdv5DvjW7WALvPiEiw8CX8+psZTD8RHdAjtnW2DKp8ZnznzJS YVBf2ulsD1g3zKEqDm5nMcUyN3fSEWci97bmbEzIeMTULfsj+aQF5a7JoXIkj7Yb QIvZ1fG6RSviVplt5SoT5ucDN2cGqLt7+4b3v6DKQX1dMTDrAPdU+T1VU0LRxB6h 5M3ZZ925ktJu2YTmKi4QvgP01ZVJv0dNWytbmAnIVvJRGY3gHQt5tx0W2lnQdHE9 mJeW2MXcLKeho7d5p3wRl6yEWAJuAoioZCd95NPyNnVZMMhYRu6iTIIzY8EdNegQ 5ve9Rsda9uobvWRCWefyS0pHvuJ2HJrJONnU92MHKSojEC9oAjURvRGWpXYcQFM/ EiywE1oBRA6NrGI7BomAH6khVoTi01yBsQ0QEt30mTOuyxa6j/oR9iEsNv7bmjZC SoApcWDPNy6RpHX7SDtch0Qj1l7YfYDNNj66Y94o5E70eHebU9Q= =vHOd -----END PGP SIGNATURE----- Merge 5.10.173 into android12-5.10-lts Changes in 5.10.173 HID: asus: Remove check for same LED brightness on set HID: asus: use spinlock to protect concurrent accesses HID: asus: use spinlock to safely schedule workers powerpc/mm: Rearrange if-else block to avoid clang warning ARM: OMAP2+: Fix memory leak in realtime_counter_init() arm64: dts: qcom: qcs404: use symbol names for PCIe resets ARM: zynq: Fix refcount leak in zynq_early_slcr_init arm64: dts: mediatek: mt8183: Fix systimer 13 MHz clock description arm64: dts: qcom: sdm845-db845c: fix audio codec interrupt pin name arm64: dts: qcom: sc7180: correct SPMI bus address cells arm64: dts: meson-gx: Fix Ethernet MAC address unit name arm64: dts: meson-g12a: Fix internal Ethernet PHY unit name arm64: dts: meson-gx: Fix the SCPI DVFS node name and unit address arm64: dts: qcom: ipq8074: correct USB3 QMP PHY-s clock output names arm64: dts: qcom: Fix IPQ8074 PCIe PHY nodes arm64: dts: qcom: ipq8074: fix PCIe PHY serdes size arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY arm64: dts: qcom: ipq8074: correct Gen2 PCIe ranges arm64: dts: qcom: ipq8074: fix Gen3 PCIe node arm64: dts: qcom: ipq8074: correct PCIe QMP PHY output clock names arm64: dts: meson: remove CPU opps below 1GHz for G12A boards ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init() ARM: s3c: fix s3c64xx_set_timer_source prototype arm64: dts: ti: k3-j7200: Fix wakeup pinmux range ARM: dts: exynos: correct wr-active property in Exynos3250 Rinato ARM: imx: Call ida_simple_remove() for ida_simple_get arm64: dts: amlogic: meson-gx: fix SCPI clock dvfs node name arm64: dts: amlogic: meson-axg: fix SCPI clock dvfs node name arm64: dts: amlogic: meson-gx: add missing SCPI sensors compatible arm64: dts: amlogic: meson-gxl-s905d-sml5442tw: drop invalid clock-names property arm64: dts: amlogic: meson-gx: add missing unit address to rng node name arm64: dts: amlogic: meson-gxl: add missing unit address to eth-phy-mux node name arm64: dts: amlogic: meson-gx-libretech-pc: fix update button name arm64: dts: amlogic: meson-gxl-s905d-phicomm-n1: fix led node name arm64: dts: amlogic: meson-gxbb-kii-pro: fix led node name arm64: dts: renesas: beacon-renesom: Fix gpio expander reference ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference ARM: dts: imx7s: correct iomuxc gpr mux controller cells arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node blk-mq: avoid sleep in blk_mq_alloc_request_hctx blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx blk-mq: correct stale comment of .get_budget s390/dasd: Prepare for additional path event handling s390/dasd: Fix potential memleak in dasd_eckd_init() sched/deadline,rt: Remove unused parameter from pick_next_[rt|dl]_entity() sched/rt: pick_next_rt_entity(): check list_entry x86/perf/zhaoxin: Add stepping check for ZXC block: bio-integrity: Copy flags when bio_integrity_payload is cloned wifi: rsi: Fix memory leak in rsi_coex_attach() wifi: rtlwifi: rtl8821ae: don't call kfree_skb() under spin_lock_irqsave() wifi: rtlwifi: rtl8188ee: don't call kfree_skb() under spin_lock_irqsave() wifi: rtlwifi: rtl8723be: don't call kfree_skb() under spin_lock_irqsave() wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave() wifi: libertas: fix memory leak in lbs_init_adapter() wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave() rtlwifi: fix -Wpointer-sign warning wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit() libbpf: Fix btf__align_of() by taking into account field offsets wifi: ipw2x00: don't call dev_kfree_skb() under spin_lock_irqsave() wifi: ipw2200: fix memory leak in ipw_wdev_init() wifi: wilc1000: fix potential memory leak in wilc_mac_xmit() wifi: brcmfmac: fix potential memory leak in brcmf_netdev_start_xmit() wifi: brcmfmac: unmap dma buffer in brcmf_msgbuf_alloc_pktid() wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave() wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave() wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave() wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave() wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave() crypto: x86/ghash - fix unaligned access in ghash_setkey() ACPICA: Drop port I/O validation for some regions genirq: Fix the return type of kstat_cpu_irqs_sum() rcu-tasks: Improve comments explaining tasks_rcu_exit_srcu purpose rcu-tasks: Remove preemption disablement around srcu_read_[un]lock() calls rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes() lib/mpi: Fix buffer overrun when SG is too long crypto: ccp: Use the stack for small SEV command buffers crypto: ccp: Use the stack and common buffer for status commands crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory leak crypto: ccp - Avoid page allocation failure warning for SEV_GET_ID2 ACPICA: nsrepair: handle cases without a return value correctly thermal/drivers/tsens: Drop msm8976-specific defines thermal/drivers/qcom/tsens_v1: Enable sensor 3 on MSM8976 thermal/drivers/tsens: Add compat string for the qcom,msm8960 thermal/drivers/tsens: Sort out msm8976 vs msm8956 data wifi: rtl8xxxu: Fix memory leaks with RTL8723BU, RTL8192EU wifi: orinoco: check return value of hermes_write_wordrec() wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function ath9k: hif_usb: simplify if-if to if-else ath9k: htc: clean up statistics macros wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails wifi: ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback() wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup wifi: cfg80211: Fix extended KCK key length check in nl80211_set_rekey_data() ACPI: battery: Fix missing NUL-termination with large strings crypto: ccp - Failure on re-initialization due to duplicate sysfs filename crypto: essiv - Handle EBUSY correctly crypto: seqiv - Handle EBUSY correctly powercap: fix possible name leak in powercap_register_zone() x86/cpu: Init AP exception handling from cpu_init_secondary() x86/microcode: Replace deprecated CPU-hotplug functions. x86: Mark stop_this_cpu() __noreturn x86/microcode: Rip out the OLD_INTERFACE x86/microcode: Default-disable late loading x86/microcode: Print previous version of microcode after reload x86/microcode: Add a parameter to microcode_check() to store CPU capabilities x86/microcode: Check CPU capabilities after late microcode update correctly x86/microcode: Adjust late loading result reporting message net: ethernet: ti: am65-cpsw: fix tx csum offload for multi mac mode net: ethernet: ti: am65-cpsw: handle deferred probe with dev_err_probe() net: ethernet: ti: add missing of_node_put before return crypto: xts - Handle EBUSY correctly leds: led-class: Add missing put_device() to led_put() crypto: ccp - Refactor out sev_fw_alloc() crypto: ccp - Flush the SEV-ES TMR memory before giving it to firmware bpftool: profile online CPUs instead of possible net/mlx5: Enhance debug print in page allocation failure irqchip: Fix refcount leak in platform_irqchip_probe irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe s390/vmem: fix empty page tables cleanup under KASAN net: add sock_init_data_uid() tun: tun_chr_open(): correctly initialize socket uid tap: tap_open(): correctly initialize socket uid OPP: fix error checking in opp_migrate_dentry() Bluetooth: L2CAP: Fix potential user-after-free libbpf: Fix alen calculation in libbpf_nla_dump_errormsg() rds: rds_rm_zerocopy_callback() correct order for list_add_tail() crypto: rsa-pkcs1pad - Use akcipher_request_complete m68k: /proc/hardware should depend on PROC_FS RISC-V: time: initialize hrtimer based broadcast clock event device wifi: iwl3945: Add missing check for create_singlethread_workqueue wifi: iwl4965: Add missing check for create_singlethread_workqueue() wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize() selftests/bpf: Fix out-of-srctree build crypto: crypto4xx - Call dma_unmap_page when done wifi: mac80211: make rate u32 in sta_set_rate_info_rx() thermal/drivers/hisi: Drop second sensor hi3660 can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error bpf: Fix global subprog context argument resolution logic irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts selftests/net: Interpret UDP_GRO cmsg data as an int value l2tp: Avoid possible recursive deadlock in l2tp_tunnel_register() net: bcmgenet: fix MoCA LED control selftest: fib_tests: Always cleanup before exit sefltests: netdevsim: wait for devlink instance after netns removal drm: Fix potential null-ptr-deref due to drmm_mode_config_init() drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats drm: mxsfb: DRM_MXSFB should depend on ARCH_MXS || ARCH_MXC drm/bridge: megachips: Fix error handling in i2c_register_driver() drm/vkms: Fix null-ptr-deref in vkms_release() drm/vc4: dpi: Add option for inverting pixel clock and output enable drm/vc4: dpi: Fix format mapping for RGB565 drm: tidss: Fix pixel format definition gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id() drm/msm/hdmi: Add missing check for alloc_ordered_workqueue pinctrl: qcom: pinctrl-msm8976: Correct function names for wcss pins pinctrl: stm32: Fix refcount leak in stm32_pctrl_get_irq_domain pinctrl: rockchip: add support for rk3568 pinctrl: rockchip: do coding style for mux route struct pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups drm/vc4: hvs: Set AXI panic modes drm/vc4: hvs: Fix colour order for xRGB1555 on HVS5 drm/vc4: hdmi: Correct interlaced timings again ASoC: fsl_sai: initialize is_dsp_mode flag drm/msm/adreno: Fix null ptr access in adreno_gpu_cleanup() ALSA: hda/ca0132: minor fix for allocation size drm/msm/dpu: Disallow unallocated resources to be returned drm/bridge: lt9611: fix sleep mode setup drm/bridge: lt9611: fix HPD reenablement drm/bridge: lt9611: fix polarity programming drm/bridge: lt9611: fix programming of video modes drm/bridge: lt9611: fix clock calculation drm/bridge: lt9611: pass a pointer to the of node drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness drm/msm: use strscpy instead of strncpy drm/msm/dpu: Add check for cstate drm/msm/dpu: Add check for pstates drm/msm/mdp5: Add check for kzalloc pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback() pinctrl: mediatek: Initialize variable pullen and pullup to zero pinctrl: mediatek: Initialize variable *buf to zero gpu: host1x: Don't skip assigning syncpoints to channels drm/mediatek: dsi: Reduce the time of dsi from LP11 to sending cmd drm/mediatek: Use NULL instead of 0 for NULL pointer drm/mediatek: Drop unbalanced obj unref drm/mediatek: mtk_drm_crtc: Add checks for devm_kcalloc drm/mediatek: Clean dangling pointer on bind error path ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress() gpio: vf610: connect GPIO label to dev name spi: dw_bt1: fix MUX_MMIO dependencies ASoC: mchp-spdifrx: fix controls which rely on rsr register ASoC: atmel: fix spelling mistakes ASoC: mchp-spdifrx: fix return value in case completion times out ASoC: mchp-spdifrx: fix controls that works with completion mechanism ASoC: mchp-spdifrx: disable all interrupts in mchp_spdifrx_dai_remove() ASoC: mchp-spdifrx: Fix uninitialized use of mr in mchp_spdifrx_hw_params() ASoC: dt-bindings: meson: fix gx-card codec node regex hwmon: (ltc2945) Handle error case in ltc2945_value_store drm/amdgpu: fix enum odm_combine_mode mismatch scsi: mpt3sas: Fix a memory leak scsi: aic94xx: Add missing check for dma_map_single() spi: bcm63xx-hsspi: fix pm_runtime spi: bcm63xx-hsspi: Fix multi-bit mode setting hwmon: (mlxreg-fan) Return zero speed for broken fan ASoC: tlv320adcx140: fix 'ti,gpio-config' DT property init dm: remove flush_scheduled_work() during local_exit() NFS: Fix up handling of outstanding layoutcommit in nfs_update_inode() NFSv4: keep state manager thread active if swap is enabled nfs4trace: fix state manager flag printing NFS: fix disabling of swap spi: synquacer: Fix timeout handling in synquacer_spi_transfer_one() ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared HID: bigben: use spinlock to protect concurrent accesses HID: bigben_worker() remove unneeded check on report_field HID: bigben: use spinlock to safely schedule workers hid: bigben_probe(): validate report count nfsd: fix race to check ls_layouts cifs: Fix lost destroy smbd connection when MR allocate failed cifs: Fix warning and UAF when destroy the MR list gfs2: jdata writepage fix perf llvm: Fix inadvertent file creation leds: led-core: Fix refcount leak in of_led_get() perf tools: Fix auto-complete on aarch64 sparc: allow PM configs for sparc32 COMPILE_TEST selftests/ftrace: Fix bash specific "==" operator printf: fix errname.c list objtool: add UACCESS exceptions for __tsan_volatile_read/write mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read() clk: qcom: gcc-qcs404: disable gpll[04]_out_aux parents clk: qcom: gcc-qcs404: fix names of the DSI clocks used as parents RISC-V: fix funct4 definition for c.jalr in parse_asm.h mtd: rawnand: sunxi: Fix the size of the last OOB region Input: iqs269a - drop unused device node references Input: iqs269a - increase interrupt handler return delay Input: iqs269a - configure device with a single block write linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in <linux/kernel.h> clk: renesas: cpg-mssr: Fix use after free if cpg_mssr_common_init() failed clk: renesas: cpg-mssr: Remove superfluous check in resume code clk: imx: avoid memory leak Input: ads7846 - don't report pressure for ads7845 Input: ads7846 - convert to full duplex Input: ads7846 - convert to one message Input: ads7846 - always set last command to PWRDOWN Input: ads7846 - don't check penirq immediately for 7845 clk: qcom: gpucc-sc7180: fix clk_dis_wait being programmed for CX GDSC clk: qcom: gpucc-sdm845: fix clk_dis_wait being programmed for CX GDSC powerpc/powernv/ioda: Skip unallocated resources when mapping to PE clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled() powerpc/perf/hv-24x7: add missing RTAS retry status handling powerpc/pseries/lpar: add missing RTAS retry status handling powerpc/pseries/lparcfg: add missing RTAS retry status handling powerpc/rtas: make all exports GPL powerpc/rtas: ensure 4KB alignment for rtas_data_buf powerpc/eeh: Small refactor of eeh_handle_normal_event() powerpc/eeh: Set channel state after notifying the drivers MIPS: SMP-CPS: fix build error when HOTPLUG_CPU not set MIPS: vpe-mt: drop physical_memsize vdpa/mlx5: Don't clear mr struct on destroy MR alpha/boot/tools/objstrip: fix the check for ELF header Input: iqs269a - do not poll during suspend or resume Input: iqs269a - do not poll during ATI remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers media: ti: cal: fix possible memory leak in cal_ctx_create() media: platform: ti: Add missing check for devm_regulator_get powerpc: Remove linker flag from KBUILD_AFLAGS builddeb: clean generated package content media: max9286: Fix memleak in max9286_v4l2_register() media: ov2740: Fix memleak in ov2740_init_controls() media: ov5675: Fix memleak in ov5675_init_controls() media: i2c: ov772x: Fix memleak in ov772x_probe() media: i2c: imx219: remove redundant writes media: i2c: imx219: Split common registers from mode tables media: i2c: imx219: Fix binning for RAW8 capture media: rc: Fix use-after-free bugs caused by ene_tx_irqsim() media: i2c: ov7670: 0 instead of -EINVAL was returned media: usb: siano: Fix use after free bugs caused by do_submit_urb media: saa7134: Use video_unregister_device for radio_dev rpmsg: glink: Avoid infinite loop on intent for missing channel udf: Define EFSCORRUPTED error code ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy blk-iocost: fix divide by 0 error in calc_lcoefs() wifi: ath9k: Fix use-after-free in ath9k_hif_usb_disconnect() wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf_c_preinit_dcmds() rcu: Make RCU_LOCKDEP_WARN() avoid early lockdep checks rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait() rcu-tasks: Make rude RCU-Tasks work well with CPU hotplug wifi: ath11k: debugfs: fix to work with multiple PCI devices thermal: intel: Fix unsigned comparison with less than zero timers: Prevent union confusion from unexpected restart_syscall() x86/bugs: Reset speculation control settings on init wifi: brcmfmac: ensure CLM version is null-terminated to prevent stack-out-of-bounds wifi: mt7601u: fix an integer underflow inet: fix fast path in __inet_hash_connect() ice: add missing checks for PF vsi type ACPI: Don't build ACPICA with '-Os' clocksource: Suspend the watchdog temporarily when high read latency detected crypto: hisilicon: Wipe entire pool on error net: bcmgenet: Add a check for oversized packets m68k: Check syscall_trace_enter() return code wifi: mt76: dma: free rx_head in mt76_dma_rx_cleanup ACPI: video: Fix Lenovo Ideapad Z570 DMI match net/mlx5: fw_tracer: Fix debug print coda: Avoid partial allocation of sig_inputArgs uaccess: Add minimum bounds check on kernel buffer size PM: EM: fix memory leak with using debugfs_lookup() Bluetooth: btusb: Add VID:PID 13d3:3529 for Realtek RTL8821CE drm/amd/display: Fix potential null-deref in dm_resume drm/omap: dsi: Fix excessive stack usage HID: Add Mapping for System Microphone Mute drm/tiny: ili9486: Do not assume 8-bit only SPI controllers drm/radeon: free iio for atombios when driver shutdown drm: amd: display: Fix memory leakage drm/msm/dsi: Add missing check for alloc_ordered_workqueue docs/scripts/gdb: add necessary make scripts_gdb step ASoC: kirkwood: Iterate over array indexes instead of using pointer math regulator: max77802: Bounds check regulator id against opmode regulator: s5m8767: Bounds check id indexing into arrays gfs2: Improve gfs2_make_fs_rw error handling hwmon: (coretemp) Simplify platform device handling pinctrl: at91: use devm_kasprintf() to avoid potential leaks HID: logitech-hidpp: Don't restart communication if not necessary drm: panel-orientation-quirks: Add quirk for Lenovo IdeaPad Duet 3 10IGL5 dm thin: add cond_resched() to various workqueue loops dm cache: add cond_resched() to various workqueue loops nfsd: zero out pointers after putting nfsd_files on COPY setup error wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu firmware: coreboot: framebuffer: Ignore reserved pixel color bits rtc: pm8xxx: fix set-alarm race ipmi_ssif: Rename idle state and check s390/extmem: return correct segment type in __segment_load() s390: discard .interp section s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler s390/kprobes: fix current_kprobe never cleared after kprobes reenter cifs: Fix uninitialized memory read in smb3_qfs_tcon() ARM: dts: exynos: correct HDMI phy compatible in Exynos4 hfs: fix missing hfs_bnode_get() in __hfs_bnode_create fs: hfsplus: fix UAF issue in hfsplus_put_super exfat: fix reporting fs error when reading dir beyond EOF exfat: fix unexpected EOF while reading dir exfat: redefine DIR_DELETED as the bad cluster number exfat: fix inode->i_blocks for non-512 byte sector size device f2fs: fix information leak in f2fs_move_inline_dirents() f2fs: fix cgroup writeback accounting with fs-layer encryption ocfs2: fix defrag path triggering jbd2 ASSERT ocfs2: fix non-auto defrag path not working issue udf: Truncate added extents on failed expansion udf: Do not bother merging very long extents udf: Do not update file length for failed writes to inline files udf: Preserve link count of system files udf: Detect system inodes linked into directory hierarchy udf: Fix file corruption when appending just after end of preallocated extent KVM: Destroy target device if coalesced MMIO unregistration fails KVM: x86: Inject #GP if WRMSR sets reserved bits in APIC Self-IPI KVM: s390: disable migration mode when dirty tracking is disabled x86/virt: Force GIF=1 prior to disabling SVM (for reboot flows) x86/crash: Disable virt in core NMI crash handler to avoid double shootdown x86/reboot: Disable virtualization in an emergency if SVM is supported x86/reboot: Disable SVM, not just VMX, when stopping CPUs x86/kprobes: Fix __recover_optprobed_insn check optimizing logic x86/kprobes: Fix arch_check_optimized_kprobe check within optimized_kprobe range x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter x86/microcode/AMD: Add a @cpu parameter to the reloading functions x86/microcode/AMD: Fix mixed steppings support x86/speculation: Allow enabling STIBP with legacy IBRS Documentation/hw-vuln: Document the interaction between IBRS and STIBP brd: return 0/-error from brd_insert_page() ima: Align ima_file_mmap() parameters with mmap_file LSM hook irqdomain: Fix association race irqdomain: Fix disassociation race irqdomain: Drop bogus fwspec-mapping error handling io_uring: handle TIF_NOTIFY_RESUME when checking for task_work io_uring: mark task TASK_RUNNING before handling resume/task work io_uring: add a conditional reschedule to the IOPOLL cancelation loop io_uring/rsrc: disallow multi-source reg buffers io_uring: remove MSG_NOSIGNAL from recvmsg io_uring/poll: allow some retries for poll triggering spuriously ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls() ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC jbd2: fix data missing when reusing bh which is ready to be checkpointed ext4: optimize ea_inode block expansion ext4: refuse to create ea block when umounted mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type dm: add cond_resched() to dm_wq_work() wifi: rtl8xxxu: Use a longer retry limit of 48 wifi: cfg80211: Fix use after free for wext thermal: intel: powerclamp: Fix cur_state for multi package system dm flakey: fix logic when corrupting a bio dm flakey: don't corrupt the zero page ARM: dts: exynos: correct TMU phandle in Exynos4210 ARM: dts: exynos: correct TMU phandle in Exynos4 ARM: dts: exynos: correct TMU phandle in Odroid XU3 family ARM: dts: exynos: correct TMU phandle in Exynos5250 ARM: dts: exynos: correct TMU phandle in Odroid XU ARM: dts: exynos: correct TMU phandle in Odroid HC1 rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails alpha: fix FEN fault handling dax/kmem: Fix leak of memory-hotplug resources mips: fix syscall_get_nr media: ipu3-cio2: Fix PM runtime usage_count in driver unbind remoteproc/mtk_scp: Move clk ops outside send_lock docs: gdbmacros: print newest record mm: memcontrol: deprecate charge moving mm/thp: check and bail out if page in deferred queue already ktest.pl: Give back console on Ctrt^C on monitor ktest.pl: Fix missing "end_monitor" when machine check fails ktest.pl: Add RUN_TIMEOUT option with default unlimited ring-buffer: Handle race between rb_move_tail and rb_check_pages scsi: qla2xxx: Fix link failure in NPIV environment scsi: qla2xxx: Fix DMA-API call trace on NVMe LS requests scsi: qla2xxx: Fix erroneous link down scsi: ses: Don't attach if enclosure has no components scsi: ses: Fix slab-out-of-bounds in ses_enclosure_data_process() scsi: ses: Fix possible addl_desc_ptr out-of-bounds accesses scsi: ses: Fix possible desc_ptr out-of-bounds accesses scsi: ses: Fix slab-out-of-bounds in ses_intf_remove() riscv: jump_label: Fixup unaligned arch_static_branch function PCI/PM: Observe reset delay irrespective of bridge_d3 PCI: hotplug: Allow marking devices as disconnected during bind/unbind PCI: Avoid FLR for AMD FCH AHCI adapters vfio/type1: prevent underflow of locked_vm via exec() drm/i915/quirks: Add inverted backlight quirk for HP 14-r206nv drm/radeon: Fix eDP for single-display iMac11,2 drm/edid: fix AVI infoframe aspect ratio handling arm64: dts: qcom: ipq8074: fix Gen2 PCIe QMP PHY wifi: ath9k: use proper statements in conditionals pinctrl: rockchip: fix mux route data for rk3568 pinctrl: rockchip: fix reading pull type on rk3568 kbuild: Port silent mode detection to future gnu make. net/sched: Retire tcindex classifier fs/jfs: fix shift exponent db_agl2size negative objtool: Fix memory leak in create_static_call_sections() pwm: sifive: Reduce time the controller lock is held pwm: sifive: Always let the first pwm_apply_state succeed pwm: stm32-lp: fix the check on arr and cmp registers update f2fs: use memcpy_{to,from}_page() where possible fs: f2fs: initialize fsdata in pagecache_write() um: vector: Fix memory leak in vector_config ubi: ensure that VID header offset + VID header size <= alloc, size ubifs: Fix build errors as symbol undefined ubifs: Rectify space budget for ubifs_symlink() if symlink is encrypted ubifs: Rectify space budget for ubifs_xrename() ubifs: Fix wrong dirty space budget for dirty inode ubifs: do_rename: Fix wrong space budget when target inode's nlink > 1 ubifs: Reserve one leb for each journal head while doing budget ubi: Fix use-after-free when volume resizing failed ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume() ubifs: Fix memory leak in alloc_wbufs() ubi: Fix possible null-ptr-deref in ubi_free_volume() ubifs: Re-statistic cleaned znode count if commit failed ubifs: dirty_cow_znode: Fix memleak in error handling path ubifs: ubifs_writepage: Mark page dirty after writing inode failed ubi: fastmap: Fix missed fm_anchor PEB in wear-leveling after disabling fastmap ubi: Fix UAF wear-leveling entry in eraseblk_count_seq_show() ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path watchdog: Fix kmemleak in watchdog_cdev_register watchdog: pcwd_usb: Fix attempting to access uninitialized memory netfilter: ctnetlink: fix possible refcount leak in ctnetlink_create_conntrack() netfilter: ebtables: fix table blob use-after-free ipv6: Add lwtunnel encap size of all siblings in nexthop calculation sctp: add a refcnt in sctp_stream_priorities to avoid a nested loop net: fix __dev_kfree_skb_any() vs drop monitor 9p/xen: fix version parsing 9p/xen: fix connection sequence 9p/rdma: unmap receive dma buffer in rdma_request()/post_recv() net/mlx5: Geneve, Fix handling of Geneve object id as error code nfc: fix memory leak of se_io context in nfc_genl_se_io net/sched: act_sample: fix action bind logic ARM: dts: spear320-hmi: correct STMPE GPIO compatible tcp: tcp_check_req() can be called from process context vc_screen: modify vcs_size() handling in vcs_read() rtc: sun6i: Always export the internal oscillator scsi: ipr: Work around fortify-string warning loop: loop_set_status_from_info() check before assignment ASoC: adau7118: don't disable regulators on device unbind ASoC: zl38060: Remove spurious gpiolib select ASoC: zl38060 add gpiolib dependency thermal: intel: quark_dts: fix error pointer dereference thermal: intel: BXT_PMIC: select REGMAP instead of depending on it tracing: Add NULL checks for buffer in ring_buffer_free_read_page() firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3 bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak IB/hfi1: Update RMT size calculation media: uvcvideo: Handle cameras with invalid descriptors media: uvcvideo: Handle errors from calls to usb_string media: uvcvideo: Quirk for autosuspend in Logitech B910 and C910 media: uvcvideo: Silence memcpy() run-time false positive warnings staging: emxx_udc: Add checks for dma_alloc_coherent() tty: fix out-of-bounds access in tty_driver_lookup_tty() tty: serial: fsl_lpuart: disable the CTS when send break signal serial: sc16is7xx: setup GPIO controller later in probe mei: bus-fixup:upon error print return values of send and receive tools/iio/iio_utils:fix memory leak iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word() iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() PCI: loongson: Prevent LS7A MRRS increases usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math USB: ene_usb6250: Allocate enough memory for full object usb: uvc: Enumerate valid values for color matching usb: gadget: uvc: Make bSourceID read/write PCI: Align extra resources for hotplug bridges properly PCI: Take other bus devices into account when distributing resources kernel/fail_function: fix memory leak with using debugfs_lookup() PCI: loongson: Add more devices that need MRRS quirk PCI: Add ACS quirk for Wangxun NICs phy: rockchip-typec: Fix unsigned comparison with less than zero soundwire: cadence: Remove wasted space in response_buf soundwire: cadence: Drain the RX FIFO after an IO timeout net: tls: avoid hanging tasks on the tx_lock x86/resctrl: Apply READ_ONCE/WRITE_ONCE to task_struct.{rmid,closid} x86/resctl: fix scheduler confusion with 'current' drm/display/dp_mst: Fix down/up message handling after sink disconnect drm/display/dp_mst: Fix down message handling after a packet reception error Bluetooth: hci_sock: purge socket queues in the destruct() callback tcp: Fix listen() regression in 5.10.163 drm/virtio: Fix error code in virtio_gpu_object_shmem_init() media: uvcvideo: Provide sync and async uvc_ctrl_status_event media: uvcvideo: Fix race condition with usb_kill_urb Revert "scsi: mpt3sas: Fix return value check of dma_get_required_mask()" scsi: mpt3sas: Don't change DMA mask while reallocating pools scsi: mpt3sas: re-do lost mpt3sas DMA mask fix scsi: mpt3sas: Remove usage of dma_get_required_mask() API malidp: Fix NULL vs IS_ERR() checking usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails Linux 5.10.173 Change-Id: Iedcbc093feb171d48c70976d0aa99e972fac3ad1 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
0847230e9b
@ -52,7 +52,7 @@ Date: Dec 2014
|
||||
KernelVersion: 4.0
|
||||
Description: Default output terminal descriptors
|
||||
|
||||
All attributes read only:
|
||||
All attributes read only except bSourceID:
|
||||
|
||||
============== =============================================
|
||||
iTerminal index of string descriptor
|
||||
|
@ -82,6 +82,8 @@ Brief summary of control files.
|
||||
memory.swappiness set/show swappiness parameter of vmscan
|
||||
(See sysctl's vm.swappiness)
|
||||
memory.move_charge_at_immigrate set/show controls of moving charges
|
||||
This knob is deprecated and shouldn't be
|
||||
used.
|
||||
memory.oom_control set/show oom controls.
|
||||
memory.numa_stat show the number of memory usage per numa
|
||||
node
|
||||
@ -740,8 +742,15 @@ NOTE2:
|
||||
It is recommended to set the soft limit always below the hard limit,
|
||||
otherwise the hard limit will take precedence.
|
||||
|
||||
8. Move charges at task migration
|
||||
=================================
|
||||
8. Move charges at task migration (DEPRECATED!)
|
||||
===============================================
|
||||
|
||||
THIS IS DEPRECATED!
|
||||
|
||||
It's expensive and unreliable! It's better practice to launch workload
|
||||
tasks directly from inside their target cgroup. Use dedicated workload
|
||||
cgroups to allow fine-grained policy adjustments without having to
|
||||
move physical pages between control domains.
|
||||
|
||||
Users can move charges associated with a task along with task migration, that
|
||||
is, uncharge task's pages from the old cgroup and charge them to the new cgroup.
|
||||
|
@ -479,8 +479,16 @@ Spectre variant 2
|
||||
On Intel Skylake-era systems the mitigation covers most, but not all,
|
||||
cases. See :ref:`[3] <spec_ref3>` for more details.
|
||||
|
||||
On CPUs with hardware mitigation for Spectre variant 2 (e.g. Enhanced
|
||||
IBRS on x86), retpoline is automatically disabled at run time.
|
||||
On CPUs with hardware mitigation for Spectre variant 2 (e.g. IBRS
|
||||
or enhanced IBRS on x86), retpoline is automatically disabled at run time.
|
||||
|
||||
Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at
|
||||
boot, by setting the IBRS bit, and they're automatically protected against
|
||||
Spectre v2 variant attacks, including cross-thread branch target injections
|
||||
on SMT systems (STIBP). In other words, eIBRS enables STIBP too.
|
||||
|
||||
Legacy IBRS systems clear the IBRS bit on exit to userspace and
|
||||
therefore explicitly enable STIBP for that
|
||||
|
||||
The retpoline mitigation is turned on by default on vulnerable
|
||||
CPUs. It can be forced on or off by the administrator
|
||||
@ -504,9 +512,12 @@ Spectre variant 2
|
||||
For Spectre variant 2 mitigation, individual user programs
|
||||
can be compiled with return trampolines for indirect branches.
|
||||
This protects them from consuming poisoned entries in the branch
|
||||
target buffer left by malicious software. Alternatively, the
|
||||
programs can disable their indirect branch speculation via prctl()
|
||||
(See :ref:`Documentation/userspace-api/spec_ctrl.rst <set_spec_ctrl>`).
|
||||
target buffer left by malicious software.
|
||||
|
||||
On legacy IBRS systems, at return to userspace, implicit STIBP is disabled
|
||||
because the kernel clears the IBRS bit. In this case, the userspace programs
|
||||
can disable indirect branch speculation via prctl() (See
|
||||
:ref:`Documentation/userspace-api/spec_ctrl.rst <set_spec_ctrl>`).
|
||||
On x86, this will turn on STIBP to guard against attacks from the
|
||||
sibling thread when the user program is running, and use IBPB to
|
||||
flush the branch target buffer when switching to/from the program.
|
||||
|
@ -312,10 +312,10 @@ define dmesg
|
||||
set var $prev_flags = $info->flags
|
||||
end
|
||||
|
||||
set var $id = ($id + 1) & $id_mask
|
||||
if ($id == $end_id)
|
||||
loop_break
|
||||
end
|
||||
set var $id = ($id + 1) & $id_mask
|
||||
end
|
||||
end
|
||||
document dmesg
|
||||
|
@ -39,6 +39,10 @@ Setup
|
||||
this mode. In this case, you should build the kernel with
|
||||
CONFIG_RANDOMIZE_BASE disabled if the architecture supports KASLR.
|
||||
|
||||
- Build the gdb scripts (required on kernels v5.1 and above)::
|
||||
|
||||
make scripts_gdb
|
||||
|
||||
- Enable the gdb stub of QEMU/KVM, either
|
||||
|
||||
- at VM startup time by appending "-s" to the QEMU command line
|
||||
|
@ -61,7 +61,7 @@ patternProperties:
|
||||
description: phandle of the CPU DAI
|
||||
|
||||
patternProperties:
|
||||
"^codec-[0-9]+$":
|
||||
"^codec(-[0-9]+)?$":
|
||||
type: object
|
||||
description: |-
|
||||
Codecs:
|
||||
|
@ -4036,6 +4036,18 @@ not holding a previously reported uncorrected error).
|
||||
:Parameters: struct kvm_s390_cmma_log (in, out)
|
||||
:Returns: 0 on success, a negative value on error
|
||||
|
||||
Errors:
|
||||
|
||||
====== =============================================================
|
||||
ENOMEM not enough memory can be allocated to complete the task
|
||||
ENXIO if CMMA is not enabled
|
||||
EINVAL if KVM_S390_CMMA_PEEK is not set but migration mode was not enabled
|
||||
EINVAL if KVM_S390_CMMA_PEEK is not set but dirty tracking has been
|
||||
disabled (and thus migration mode was automatically disabled)
|
||||
EFAULT if the userspace address is invalid or if no page table is
|
||||
present for the addresses (e.g. when using hugepages).
|
||||
====== =============================================================
|
||||
|
||||
This ioctl is used to get the values of the CMMA bits on the s390
|
||||
architecture. It is meant to be used in two scenarios:
|
||||
|
||||
@ -4116,12 +4128,6 @@ mask is unused.
|
||||
|
||||
values points to the userspace buffer where the result will be stored.
|
||||
|
||||
This ioctl can fail with -ENOMEM if not enough memory can be allocated to
|
||||
complete the task, with -ENXIO if CMMA is not enabled, with -EINVAL if
|
||||
KVM_S390_CMMA_PEEK is not set but migration mode was not enabled, with
|
||||
-EFAULT if the userspace address is invalid or if no page table is
|
||||
present for the addresses (e.g. when using hugepages).
|
||||
|
||||
4.108 KVM_S390_SET_CMMA_BITS
|
||||
----------------------------
|
||||
|
||||
|
@ -302,6 +302,10 @@ Allows userspace to start migration mode, needed for PGSTE migration.
|
||||
Setting this attribute when migration mode is already active will have
|
||||
no effects.
|
||||
|
||||
Dirty tracking must be enabled on all memslots, else -EINVAL is returned. When
|
||||
dirty tracking is disabled on any memslot, migration mode is automatically
|
||||
stopped.
|
||||
|
||||
:Parameters: none
|
||||
:Returns: -ENOMEM if there is not enough free memory to start migration mode;
|
||||
-EINVAL if the state of the VM is invalid (e.g. no memory defined);
|
||||
|
13
Makefile
13
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 172
|
||||
SUBLEVEL = 173
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
@ -93,9 +93,16 @@ endif
|
||||
|
||||
# If the user is running make -s (silent mode), suppress echoing of
|
||||
# commands
|
||||
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
|
||||
|
||||
ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
|
||||
quiet=silent_
|
||||
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
|
||||
silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
|
||||
else
|
||||
silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
|
||||
endif
|
||||
|
||||
ifeq ($(silence),s)
|
||||
quiet=silent_
|
||||
endif
|
||||
|
||||
export quiet Q KBUILD_VERBOSE
|
||||
|
@ -148,7 +148,7 @@ main (int argc, char *argv[])
|
||||
#ifdef __ELF__
|
||||
elf = (struct elfhdr *) buf;
|
||||
|
||||
if (elf->e_ident[0] == 0x7f && str_has_prefix((char *)elf->e_ident + 1, "ELF")) {
|
||||
if (memcmp(&elf->e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) {
|
||||
if (elf->e_type != ET_EXEC) {
|
||||
fprintf(stderr, "%s: %s is not an ELF executable\n",
|
||||
prog_name, inname);
|
||||
|
@ -235,7 +235,21 @@ do_entIF(unsigned long type, struct pt_regs *regs)
|
||||
{
|
||||
int signo, code;
|
||||
|
||||
if ((regs->ps & ~IPL_MAX) == 0) {
|
||||
if (type == 3) { /* FEN fault */
|
||||
/* Irritating users can call PAL_clrfen to disable the
|
||||
FPU for the process. The kernel will then trap in
|
||||
do_switch_stack and undo_switch_stack when we try
|
||||
to save and restore the FP registers.
|
||||
|
||||
Given that GCC by default generates code that uses the
|
||||
FP registers, PAL_clrfen is not useful except for DoS
|
||||
attacks. So turn the bleeding FPU back on and be done
|
||||
with it. */
|
||||
current_thread_info()->pcb.flags |= 1;
|
||||
__reload_thread(¤t_thread_info()->pcb);
|
||||
return;
|
||||
}
|
||||
if (!user_mode(regs)) {
|
||||
if (type == 1) {
|
||||
const unsigned int *data
|
||||
= (const unsigned int *) regs->pc;
|
||||
@ -368,20 +382,6 @@ do_entIF(unsigned long type, struct pt_regs *regs)
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* FEN fault */
|
||||
/* Irritating users can call PAL_clrfen to disable the
|
||||
FPU for the process. The kernel will then trap in
|
||||
do_switch_stack and undo_switch_stack when we try
|
||||
to save and restore the FP registers.
|
||||
|
||||
Given that GCC by default generates code that uses the
|
||||
FP registers, PAL_clrfen is not useful except for DoS
|
||||
attacks. So turn the bleeding FPU back on and be done
|
||||
with it. */
|
||||
current_thread_info()->pcb.flags |= 1;
|
||||
__reload_thread(¤t_thread_info()->pcb);
|
||||
return;
|
||||
|
||||
case 5: /* illoc */
|
||||
default: /* unexpected instruction-fault type */
|
||||
;
|
||||
|
@ -249,7 +249,7 @@ &fimd {
|
||||
i80-if-timings {
|
||||
cs-setup = <0>;
|
||||
wr-setup = <0>;
|
||||
wr-act = <1>;
|
||||
wr-active = <1>;
|
||||
wr-hold = <0>;
|
||||
};
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
/ {
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu-thermal {
|
||||
thermal-sensors = <&tmu 0>;
|
||||
thermal-sensors = <&tmu>;
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
trips {
|
||||
|
@ -605,7 +605,7 @@ i2c_8: i2c@138e0000 {
|
||||
status = "disabled";
|
||||
|
||||
hdmi_i2c_phy: hdmiphy@38 {
|
||||
compatible = "exynos4210-hdmiphy";
|
||||
compatible = "samsung,exynos4210-hdmiphy";
|
||||
reg = <0x38>;
|
||||
};
|
||||
};
|
||||
|
@ -382,7 +382,6 @@ &cpu_alert2 {
|
||||
&cpu_thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tmu 0>;
|
||||
};
|
||||
|
||||
&gic {
|
||||
|
@ -1109,7 +1109,7 @@ timer {
|
||||
&cpu_thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tmu 0>;
|
||||
thermal-sensors = <&tmu>;
|
||||
|
||||
cooling-maps {
|
||||
map0 {
|
||||
|
@ -116,7 +116,6 @@ &clock_audss {
|
||||
};
|
||||
|
||||
&cpu0_thermal {
|
||||
thermal-sensors = <&tmu_cpu0 0>;
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
|
||||
|
@ -605,7 +605,7 @@ dp_phy: dp-video-phy {
|
||||
};
|
||||
|
||||
mipi_phy: mipi-video-phy {
|
||||
compatible = "samsung,s5pv210-mipi-video-phy";
|
||||
compatible = "samsung,exynos5420-mipi-video-phy";
|
||||
syscon = <&pmu_system_controller>;
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ blueled {
|
||||
|
||||
thermal-zones {
|
||||
cpu0_thermal: cpu0-thermal {
|
||||
thermal-sensors = <&tmu_cpu0 0>;
|
||||
thermal-sensors = <&tmu_cpu0>;
|
||||
trips {
|
||||
cpu0_alert0: cpu-alert-0 {
|
||||
temperature = <70000>; /* millicelsius */
|
||||
@ -84,7 +84,7 @@ map1 {
|
||||
};
|
||||
};
|
||||
cpu1_thermal: cpu1-thermal {
|
||||
thermal-sensors = <&tmu_cpu1 0>;
|
||||
thermal-sensors = <&tmu_cpu1>;
|
||||
trips {
|
||||
cpu1_alert0: cpu-alert-0 {
|
||||
temperature = <70000>;
|
||||
@ -128,7 +128,7 @@ map1 {
|
||||
};
|
||||
};
|
||||
cpu2_thermal: cpu2-thermal {
|
||||
thermal-sensors = <&tmu_cpu2 0>;
|
||||
thermal-sensors = <&tmu_cpu2>;
|
||||
trips {
|
||||
cpu2_alert0: cpu-alert-0 {
|
||||
temperature = <70000>;
|
||||
@ -172,7 +172,7 @@ map1 {
|
||||
};
|
||||
};
|
||||
cpu3_thermal: cpu3-thermal {
|
||||
thermal-sensors = <&tmu_cpu3 0>;
|
||||
thermal-sensors = <&tmu_cpu3>;
|
||||
trips {
|
||||
cpu3_alert0: cpu-alert-0 {
|
||||
temperature = <70000>;
|
||||
@ -216,7 +216,7 @@ map1 {
|
||||
};
|
||||
};
|
||||
gpu_thermal: gpu-thermal {
|
||||
thermal-sensors = <&tmu_gpu 0>;
|
||||
thermal-sensors = <&tmu_gpu>;
|
||||
trips {
|
||||
gpu_alert0: gpu-alert-0 {
|
||||
temperature = <70000>;
|
||||
|
@ -50,7 +50,7 @@ fan0: pwm-fan {
|
||||
|
||||
thermal-zones {
|
||||
cpu0_thermal: cpu0-thermal {
|
||||
thermal-sensors = <&tmu_cpu0 0>;
|
||||
thermal-sensors = <&tmu_cpu0>;
|
||||
polling-delay-passive = <250>;
|
||||
polling-delay = <0>;
|
||||
trips {
|
||||
@ -139,7 +139,7 @@ cpu0_cooling_map4: map4 {
|
||||
};
|
||||
};
|
||||
cpu1_thermal: cpu1-thermal {
|
||||
thermal-sensors = <&tmu_cpu1 0>;
|
||||
thermal-sensors = <&tmu_cpu1>;
|
||||
polling-delay-passive = <250>;
|
||||
polling-delay = <0>;
|
||||
trips {
|
||||
@ -212,7 +212,7 @@ cpu1_cooling_map4: map4 {
|
||||
};
|
||||
};
|
||||
cpu2_thermal: cpu2-thermal {
|
||||
thermal-sensors = <&tmu_cpu2 0>;
|
||||
thermal-sensors = <&tmu_cpu2>;
|
||||
polling-delay-passive = <250>;
|
||||
polling-delay = <0>;
|
||||
trips {
|
||||
@ -285,7 +285,7 @@ cpu2_cooling_map4: map4 {
|
||||
};
|
||||
};
|
||||
cpu3_thermal: cpu3-thermal {
|
||||
thermal-sensors = <&tmu_cpu3 0>;
|
||||
thermal-sensors = <&tmu_cpu3>;
|
||||
polling-delay-passive = <250>;
|
||||
polling-delay = <0>;
|
||||
trips {
|
||||
@ -358,7 +358,7 @@ cpu3_cooling_map4: map4 {
|
||||
};
|
||||
};
|
||||
gpu_thermal: gpu-thermal {
|
||||
thermal-sensors = <&tmu_gpu 0>;
|
||||
thermal-sensors = <&tmu_gpu>;
|
||||
polling-delay-passive = <250>;
|
||||
polling-delay = <0>;
|
||||
trips {
|
||||
|
@ -494,7 +494,7 @@ gpr: iomuxc-gpr@30340000 {
|
||||
|
||||
mux: mux-controller {
|
||||
compatible = "mmio-mux";
|
||||
#mux-control-cells = <0>;
|
||||
#mux-control-cells = <1>;
|
||||
mux-reg-masks = <0x14 0x00000010>;
|
||||
};
|
||||
|
||||
|
@ -242,7 +242,7 @@ stmpe811@41 {
|
||||
irq-trigger = <0x1>;
|
||||
|
||||
stmpegpio: stmpe-gpio {
|
||||
compatible = "stmpe,gpio";
|
||||
compatible = "st,stmpe-gpio";
|
||||
reg = <0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
@ -57,7 +57,7 @@ reg_vdd_cpux: vdd-cpux-regulator {
|
||||
regulator-ramp-delay = <50>; /* 4ms */
|
||||
|
||||
enable-active-high;
|
||||
enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
||||
enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
||||
gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
|
||||
gpios-states = <0x1>;
|
||||
states = <1100000 0>, <1300000 1>;
|
||||
|
@ -99,6 +99,7 @@ struct mmdc_pmu {
|
||||
cpumask_t cpu;
|
||||
struct hrtimer hrtimer;
|
||||
unsigned int active_events;
|
||||
int id;
|
||||
struct device *dev;
|
||||
struct perf_event *mmdc_events[MMDC_NUM_COUNTERS];
|
||||
struct hlist_node node;
|
||||
@ -433,8 +434,6 @@ static enum hrtimer_restart mmdc_pmu_timer_handler(struct hrtimer *hrtimer)
|
||||
static int mmdc_pmu_init(struct mmdc_pmu *pmu_mmdc,
|
||||
void __iomem *mmdc_base, struct device *dev)
|
||||
{
|
||||
int mmdc_num;
|
||||
|
||||
*pmu_mmdc = (struct mmdc_pmu) {
|
||||
.pmu = (struct pmu) {
|
||||
.task_ctx_nr = perf_invalid_context,
|
||||
@ -452,15 +451,16 @@ static int mmdc_pmu_init(struct mmdc_pmu *pmu_mmdc,
|
||||
.active_events = 0,
|
||||
};
|
||||
|
||||
mmdc_num = ida_simple_get(&mmdc_ida, 0, 0, GFP_KERNEL);
|
||||
pmu_mmdc->id = ida_simple_get(&mmdc_ida, 0, 0, GFP_KERNEL);
|
||||
|
||||
return mmdc_num;
|
||||
return pmu_mmdc->id;
|
||||
}
|
||||
|
||||
static int imx_mmdc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct mmdc_pmu *pmu_mmdc = platform_get_drvdata(pdev);
|
||||
|
||||
ida_simple_remove(&mmdc_ida, pmu_mmdc->id);
|
||||
cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node);
|
||||
perf_pmu_unregister(&pmu_mmdc->pmu);
|
||||
iounmap(pmu_mmdc->mmdc_base);
|
||||
@ -474,7 +474,6 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
|
||||
{
|
||||
struct mmdc_pmu *pmu_mmdc;
|
||||
char *name;
|
||||
int mmdc_num;
|
||||
int ret;
|
||||
const struct of_device_id *of_id =
|
||||
of_match_device(imx_mmdc_dt_ids, &pdev->dev);
|
||||
@ -497,14 +496,14 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
|
||||
cpuhp_mmdc_state = ret;
|
||||
}
|
||||
|
||||
mmdc_num = mmdc_pmu_init(pmu_mmdc, mmdc_base, &pdev->dev);
|
||||
pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
|
||||
if (mmdc_num == 0)
|
||||
name = "mmdc";
|
||||
else
|
||||
name = devm_kasprintf(&pdev->dev,
|
||||
GFP_KERNEL, "mmdc%d", mmdc_num);
|
||||
ret = mmdc_pmu_init(pmu_mmdc, mmdc_base, &pdev->dev);
|
||||
if (ret < 0)
|
||||
goto pmu_free;
|
||||
|
||||
name = devm_kasprintf(&pdev->dev,
|
||||
GFP_KERNEL, "mmdc%d", ret);
|
||||
|
||||
pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
|
||||
pmu_mmdc->devtype_data = (struct fsl_mmdc_devtype_data *)of_id->data;
|
||||
|
||||
hrtimer_init(&pmu_mmdc->hrtimer, CLOCK_MONOTONIC,
|
||||
@ -525,6 +524,7 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
|
||||
|
||||
pmu_register_err:
|
||||
pr_warn("MMDC Perf PMU failed (%d), disabled\n", ret);
|
||||
ida_simple_remove(&mmdc_ida, pmu_mmdc->id);
|
||||
cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node);
|
||||
hrtimer_cancel(&pmu_mmdc->hrtimer);
|
||||
pmu_free:
|
||||
|
@ -165,7 +165,7 @@ static int __init omap1_dm_timer_init(void)
|
||||
kfree(pdata);
|
||||
|
||||
err_free_pdev:
|
||||
platform_device_unregister(pdev);
|
||||
platform_device_put(pdev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ static void __init realtime_counter_init(void)
|
||||
}
|
||||
|
||||
rate = clk_get_rate(sys_clk);
|
||||
clk_put(sys_clk);
|
||||
|
||||
if (soc_is_dra7xx()) {
|
||||
/*
|
||||
|
@ -173,7 +173,8 @@ static struct samsung_pwm_variant s3c64xx_pwm_variant = {
|
||||
.tclk_mask = (1 << 7) | (1 << 6) | (1 << 5),
|
||||
};
|
||||
|
||||
void __init s3c64xx_set_timer_source(unsigned int event, unsigned int source)
|
||||
void __init s3c64xx_set_timer_source(enum s3c64xx_timer_mode event,
|
||||
enum s3c64xx_timer_mode source)
|
||||
{
|
||||
s3c64xx_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
|
||||
s3c64xx_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
|
||||
|
@ -213,6 +213,7 @@ int __init zynq_early_slcr_init(void)
|
||||
zynq_slcr_regmap = syscon_regmap_lookup_by_compatible("xlnx,zynq-slcr");
|
||||
if (IS_ERR(zynq_slcr_regmap)) {
|
||||
pr_err("%s: failed to find zynq-slcr\n", __func__);
|
||||
of_node_put(np);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ scpi {
|
||||
scpi_clocks: clocks {
|
||||
compatible = "arm,scpi-clocks";
|
||||
|
||||
scpi_dvfs: clock-controller {
|
||||
scpi_dvfs: clocks-0 {
|
||||
compatible = "arm,scpi-dvfs-clocks";
|
||||
#clock-cells = <1>;
|
||||
clock-indices = <0>;
|
||||
@ -160,7 +160,7 @@ scpi_dvfs: clock-controller {
|
||||
};
|
||||
|
||||
scpi_sensors: sensors {
|
||||
compatible = "amlogic,meson-gxbb-scpi-sensors";
|
||||
compatible = "amlogic,meson-gxbb-scpi-sensors", "arm,scpi-sensors";
|
||||
#thermal-sensor-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
@ -1727,7 +1727,7 @@ int_mdio: mdio@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
internal_ephy: ethernet_phy@8 {
|
||||
internal_ephy: ethernet-phy@8 {
|
||||
compatible = "ethernet-phy-id0180.3301",
|
||||
"ethernet-phy-ieee802.3-c22";
|
||||
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
@ -57,26 +57,6 @@ cpu_opp_table: opp-table {
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <666666666>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <731000>;
|
||||
|
@ -17,7 +17,7 @@ adc-keys {
|
||||
io-channel-names = "buttons";
|
||||
keyup-threshold-microvolt = <1800000>;
|
||||
|
||||
update-button {
|
||||
button-update {
|
||||
label = "update";
|
||||
linux,code = <KEY_VENDOR>;
|
||||
press-threshold-microvolt = <1300000>;
|
||||
|
@ -226,7 +226,7 @@ sn: sn@14 {
|
||||
reg = <0x14 0x10>;
|
||||
};
|
||||
|
||||
eth_mac: eth_mac@34 {
|
||||
eth_mac: eth-mac@34 {
|
||||
reg = <0x34 0x10>;
|
||||
};
|
||||
|
||||
@ -243,7 +243,7 @@ scpi {
|
||||
scpi_clocks: clocks {
|
||||
compatible = "arm,scpi-clocks";
|
||||
|
||||
scpi_dvfs: scpi_clocks@0 {
|
||||
scpi_dvfs: clocks-0 {
|
||||
compatible = "arm,scpi-dvfs-clocks";
|
||||
#clock-cells = <1>;
|
||||
clock-indices = <0>;
|
||||
@ -524,7 +524,7 @@ periphs: bus@c8834000 {
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>;
|
||||
|
||||
hwrng: rng {
|
||||
hwrng: rng@0 {
|
||||
compatible = "amlogic,meson-rng";
|
||||
reg = <0x0 0x0 0x0 0x4>;
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ / {
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
status {
|
||||
led {
|
||||
gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
|
||||
default-state = "off";
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
|
@ -18,7 +18,7 @@ cvbs-connector {
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
status {
|
||||
led {
|
||||
label = "n1:white:status";
|
||||
gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
|
@ -75,6 +75,5 @@ bluetooth {
|
||||
enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
|
||||
max-speed = <2000000>;
|
||||
clocks = <&wifi32k>;
|
||||
clock-names = "lpo";
|
||||
};
|
||||
};
|
||||
|
@ -759,7 +759,7 @@ mux {
|
||||
};
|
||||
};
|
||||
|
||||
eth-phy-mux {
|
||||
eth-phy-mux@55c {
|
||||
compatible = "mdio-mux-mmioreg", "mdio-mux";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -428,6 +428,7 @@ uart3: serial@11005000 {
|
||||
pwm: pwm@11006000 {
|
||||
compatible = "mediatek,mt7622-pwm";
|
||||
reg = <0 0x11006000 0 0x1000>;
|
||||
#pwm-cells = <2>;
|
||||
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&topckgen CLK_TOP_PWM_SEL>,
|
||||
<&pericfg CLK_PERI_PWM_PD>,
|
||||
|
@ -205,6 +205,15 @@ psci {
|
||||
method = "smc";
|
||||
};
|
||||
|
||||
clk13m: fixed-factor-clock-13m {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
clocks = <&clk26m>;
|
||||
clock-div = <2>;
|
||||
clock-mult = <1>;
|
||||
clock-output-names = "clk13m";
|
||||
};
|
||||
|
||||
clk26m: oscillator {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
@ -355,8 +364,7 @@ systimer: timer@10017000 {
|
||||
"mediatek,mt6765-timer";
|
||||
reg = <0 0x10017000 0 0x1000>;
|
||||
interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&topckgen CLK_TOP_CLK13M>;
|
||||
clock-names = "clk13m";
|
||||
clocks = <&clk13m>;
|
||||
};
|
||||
|
||||
gce: mailbox@10238000 {
|
||||
|
@ -108,7 +108,7 @@ usb1_ssphy: lane@58200 {
|
||||
#phy-cells = <0>;
|
||||
clocks = <&gcc GCC_USB1_PIPE_CLK>;
|
||||
clock-names = "pipe0";
|
||||
clock-output-names = "gcc_usb1_pipe_clk_src";
|
||||
clock-output-names = "usb3phy_1_cc_pipe_clk";
|
||||
};
|
||||
};
|
||||
|
||||
@ -151,7 +151,7 @@ usb0_ssphy: lane@78200 {
|
||||
#phy-cells = <0>;
|
||||
clocks = <&gcc GCC_USB0_PIPE_CLK>;
|
||||
clock-names = "pipe0";
|
||||
clock-output-names = "gcc_usb0_pipe_clk_src";
|
||||
clock-output-names = "usb3phy_0_cc_pipe_clk";
|
||||
};
|
||||
};
|
||||
|
||||
@ -167,34 +167,61 @@ qusb_phy_0: phy@79000 {
|
||||
resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
|
||||
};
|
||||
|
||||
pcie_phy0: phy@86000 {
|
||||
compatible = "qcom,ipq8074-qmp-pcie-phy";
|
||||
reg = <0x00086000 0x1000>;
|
||||
#phy-cells = <0>;
|
||||
clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
|
||||
clock-names = "pipe_clk";
|
||||
clock-output-names = "pcie20_phy0_pipe_clk";
|
||||
pcie_qmp0: phy@84000 {
|
||||
compatible = "qcom,ipq8074-qmp-gen3-pcie-phy";
|
||||
reg = <0x00084000 0x1bc>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
clocks = <&gcc GCC_PCIE0_AUX_CLK>,
|
||||
<&gcc GCC_PCIE0_AHB_CLK>;
|
||||
clock-names = "aux", "cfg_ahb";
|
||||
resets = <&gcc GCC_PCIE0_PHY_BCR>,
|
||||
<&gcc GCC_PCIE0PHY_PHY_BCR>;
|
||||
reset-names = "phy",
|
||||
"common";
|
||||
status = "disabled";
|
||||
|
||||
pcie_phy0: phy@84200 {
|
||||
reg = <0x84200 0x16c>,
|
||||
<0x84400 0x200>,
|
||||
<0x84800 0x1f0>,
|
||||
<0x84c00 0xf4>;
|
||||
#phy-cells = <0>;
|
||||
#clock-cells = <0>;
|
||||
clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
|
||||
clock-names = "pipe0";
|
||||
clock-output-names = "pcie20_phy0_pipe_clk";
|
||||
};
|
||||
};
|
||||
|
||||
pcie_phy1: phy@8e000 {
|
||||
pcie_qmp1: phy@8e000 {
|
||||
compatible = "qcom,ipq8074-qmp-pcie-phy";
|
||||
reg = <0x0008e000 0x1000>;
|
||||
#phy-cells = <0>;
|
||||
clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
|
||||
clock-names = "pipe_clk";
|
||||
clock-output-names = "pcie20_phy1_pipe_clk";
|
||||
reg = <0x0008e000 0x1c4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
clocks = <&gcc GCC_PCIE1_AUX_CLK>,
|
||||
<&gcc GCC_PCIE1_AHB_CLK>;
|
||||
clock-names = "aux", "cfg_ahb";
|
||||
resets = <&gcc GCC_PCIE1_PHY_BCR>,
|
||||
<&gcc GCC_PCIE1PHY_PHY_BCR>;
|
||||
reset-names = "phy",
|
||||
"common";
|
||||
status = "disabled";
|
||||
|
||||
pcie_phy1: phy@8e200 {
|
||||
reg = <0x8e200 0x130>,
|
||||
<0x8e400 0x200>,
|
||||
<0x8e800 0x1f8>;
|
||||
#phy-cells = <0>;
|
||||
#clock-cells = <0>;
|
||||
clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
|
||||
clock-names = "pipe0";
|
||||
clock-output-names = "pcie20_phy1_pipe_clk";
|
||||
};
|
||||
};
|
||||
|
||||
tlmm: pinctrl@1000000 {
|
||||
@ -581,9 +608,9 @@ pcie1: pci@10000000 {
|
||||
phy-names = "pciephy";
|
||||
|
||||
ranges = <0x81000000 0 0x10200000 0x10200000
|
||||
0 0x100000 /* downstream I/O */
|
||||
0x82000000 0 0x10300000 0x10300000
|
||||
0 0xd00000>; /* non-prefetchable memory */
|
||||
0 0x10000>, /* downstream I/O */
|
||||
<0x82000000 0 0x10220000 0x10220000
|
||||
0 0xfde0000>; /* non-prefetchable memory */
|
||||
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -626,16 +653,18 @@ IRQ_TYPE_LEVEL_HIGH>, /* int_c */
|
||||
};
|
||||
|
||||
pcie0: pci@20000000 {
|
||||
compatible = "qcom,pcie-ipq8074";
|
||||
compatible = "qcom,pcie-ipq8074-gen3";
|
||||
reg = <0x20000000 0xf1d>,
|
||||
<0x20000f20 0xa8>,
|
||||
<0x00080000 0x2000>,
|
||||
<0x20001000 0x1000>,
|
||||
<0x00080000 0x4000>,
|
||||
<0x20100000 0x1000>;
|
||||
reg-names = "dbi", "elbi", "parf", "config";
|
||||
reg-names = "dbi", "elbi", "atu", "parf", "config";
|
||||
device_type = "pci";
|
||||
linux,pci-domain = <0>;
|
||||
bus-range = <0x00 0xff>;
|
||||
num-lanes = <1>;
|
||||
max-link-speed = <3>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@ -643,9 +672,9 @@ pcie0: pci@20000000 {
|
||||
phy-names = "pciephy";
|
||||
|
||||
ranges = <0x81000000 0 0x20200000 0x20200000
|
||||
0 0x100000 /* downstream I/O */
|
||||
0x82000000 0 0x20300000 0x20300000
|
||||
0 0xd00000>; /* non-prefetchable memory */
|
||||
0 0x10000>, /* downstream I/O */
|
||||
<0x82000000 0 0x20220000 0x20220000
|
||||
0 0xfde0000>; /* non-prefetchable memory */
|
||||
|
||||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -663,28 +692,30 @@ IRQ_TYPE_LEVEL_HIGH>, /* int_c */
|
||||
clocks = <&gcc GCC_SYS_NOC_PCIE0_AXI_CLK>,
|
||||
<&gcc GCC_PCIE0_AXI_M_CLK>,
|
||||
<&gcc GCC_PCIE0_AXI_S_CLK>,
|
||||
<&gcc GCC_PCIE0_AHB_CLK>,
|
||||
<&gcc GCC_PCIE0_AUX_CLK>;
|
||||
|
||||
<&gcc GCC_PCIE0_AXI_S_BRIDGE_CLK>,
|
||||
<&gcc GCC_PCIE0_RCHNG_CLK>;
|
||||
clock-names = "iface",
|
||||
"axi_m",
|
||||
"axi_s",
|
||||
"ahb",
|
||||
"aux";
|
||||
"axi_bridge",
|
||||
"rchng";
|
||||
|
||||
resets = <&gcc GCC_PCIE0_PIPE_ARES>,
|
||||
<&gcc GCC_PCIE0_SLEEP_ARES>,
|
||||
<&gcc GCC_PCIE0_CORE_STICKY_ARES>,
|
||||
<&gcc GCC_PCIE0_AXI_MASTER_ARES>,
|
||||
<&gcc GCC_PCIE0_AXI_SLAVE_ARES>,
|
||||
<&gcc GCC_PCIE0_AHB_ARES>,
|
||||
<&gcc GCC_PCIE0_AXI_MASTER_STICKY_ARES>;
|
||||
<&gcc GCC_PCIE0_AXI_MASTER_STICKY_ARES>,
|
||||
<&gcc GCC_PCIE0_AXI_SLAVE_STICKY_ARES>;
|
||||
reset-names = "pipe",
|
||||
"sleep",
|
||||
"sticky",
|
||||
"axi_m",
|
||||
"axi_s",
|
||||
"ahb",
|
||||
"axi_m_sticky";
|
||||
"axi_m_sticky",
|
||||
"axi_s_sticky";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
@ -775,7 +775,7 @@ pcie_phy: phy@7786000 {
|
||||
|
||||
clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
|
||||
resets = <&gcc GCC_PCIEPHY_0_PHY_BCR>,
|
||||
<&gcc 21>;
|
||||
<&gcc GCC_PCIE_0_PIPE_ARES>;
|
||||
reset-names = "phy", "pipe";
|
||||
|
||||
clock-output-names = "pcie_0_pipe_clk";
|
||||
@ -1305,12 +1305,12 @@ pcie: pci@10000000 {
|
||||
<&gcc GCC_PCIE_0_SLV_AXI_CLK>;
|
||||
clock-names = "iface", "aux", "master_bus", "slave_bus";
|
||||
|
||||
resets = <&gcc 18>,
|
||||
<&gcc 17>,
|
||||
<&gcc 15>,
|
||||
<&gcc 19>,
|
||||
resets = <&gcc GCC_PCIE_0_AXI_MASTER_ARES>,
|
||||
<&gcc GCC_PCIE_0_AXI_SLAVE_ARES>,
|
||||
<&gcc GCC_PCIE_0_AXI_MASTER_STICKY_ARES>,
|
||||
<&gcc GCC_PCIE_0_CORE_STICKY_ARES>,
|
||||
<&gcc GCC_PCIE_0_BCR>,
|
||||
<&gcc 16>;
|
||||
<&gcc GCC_PCIE_0_AHB_ARES>;
|
||||
reset-names = "axi_m",
|
||||
"axi_s",
|
||||
"axi_m_sticky",
|
||||
|
@ -3066,8 +3066,8 @@ spmi_bus: spmi@c440000 {
|
||||
interrupts-extended = <&pdc 1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,ee = <0>;
|
||||
qcom,channel = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <4>;
|
||||
cell-index = <0>;
|
||||
|
@ -896,7 +896,7 @@ sdc2_card_det_n: sd-card-det-n {
|
||||
};
|
||||
|
||||
wcd_intr_default: wcd_intr_default {
|
||||
pins = <54>;
|
||||
pins = "gpio54";
|
||||
function = "gpio";
|
||||
|
||||
input-enable;
|
||||
|
@ -399,20 +399,6 @@ wm8962_endpoint: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
/* 0 - lcd_reset */
|
||||
/* 1 - lcd_pwr */
|
||||
/* 2 - lcd_select */
|
||||
/* 3 - backlight-enable */
|
||||
/* 4 - Touch_shdwn */
|
||||
/* 5 - LCD_H_pol */
|
||||
/* 6 - lcd_V_pol */
|
||||
gpio_exp1: gpio@20 {
|
||||
compatible = "onnn,pca9654";
|
||||
reg = <0x20>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
|
||||
touchscreen@26 {
|
||||
compatible = "ilitek,ili2117";
|
||||
reg = <0x26>;
|
||||
@ -445,6 +431,16 @@ hd3ss3220_ep: endpoint {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gpio_exp1: gpio@70 {
|
||||
compatible = "nxp,pca9538";
|
||||
reg = <0x70>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-line-names = "lcd_reset", "lcd_pwr", "lcd_select",
|
||||
"backlight-enable", "Touch_shdwn",
|
||||
"LCD_H_pol", "lcd_V_pol";
|
||||
};
|
||||
};
|
||||
|
||||
&lvds0 {
|
||||
|
@ -16,7 +16,7 @@ chosen {
|
||||
};
|
||||
};
|
||||
|
||||
&wkup_pmx0 {
|
||||
&wkup_pmx2 {
|
||||
mcu_cpsw_pins_default: mcu-cpsw-pins-default {
|
||||
pinctrl-single,pins = <
|
||||
J721E_WKUP_IOPAD(0x0068, PIN_OUTPUT, 0) /* MCU_RGMII1_TX_CTL */
|
||||
|
@ -56,7 +56,34 @@ chipid@43000014 {
|
||||
wkup_pmx0: pinctrl@4301c000 {
|
||||
compatible = "pinctrl-single";
|
||||
/* Proxy 0 addressing */
|
||||
reg = <0x00 0x4301c000 0x00 0x178>;
|
||||
reg = <0x00 0x4301c000 0x00 0x34>;
|
||||
#pinctrl-cells = <1>;
|
||||
pinctrl-single,register-width = <32>;
|
||||
pinctrl-single,function-mask = <0xffffffff>;
|
||||
};
|
||||
|
||||
wkup_pmx1: pinctrl@0x4301c038 {
|
||||
compatible = "pinctrl-single";
|
||||
/* Proxy 0 addressing */
|
||||
reg = <0x00 0x4301c038 0x00 0x8>;
|
||||
#pinctrl-cells = <1>;
|
||||
pinctrl-single,register-width = <32>;
|
||||
pinctrl-single,function-mask = <0xffffffff>;
|
||||
};
|
||||
|
||||
wkup_pmx2: pinctrl@0x4301c068 {
|
||||
compatible = "pinctrl-single";
|
||||
/* Proxy 0 addressing */
|
||||
reg = <0x00 0x4301c068 0x00 0xec>;
|
||||
#pinctrl-cells = <1>;
|
||||
pinctrl-single,register-width = <32>;
|
||||
pinctrl-single,function-mask = <0xffffffff>;
|
||||
};
|
||||
|
||||
wkup_pmx3: pinctrl@0x4301c174 {
|
||||
compatible = "pinctrl-single";
|
||||
/* Proxy 0 addressing */
|
||||
reg = <0x00 0x4301c174 0x00 0x20>;
|
||||
#pinctrl-cells = <1>;
|
||||
pinctrl-single,register-width = <32>;
|
||||
pinctrl-single,function-mask = <0xffffffff>;
|
||||
|
@ -47,6 +47,8 @@ do_trace:
|
||||
jbsr syscall_trace_enter
|
||||
RESTORE_SWITCH_STACK
|
||||
addql #4,%sp
|
||||
addql #1,%d0
|
||||
jeq ret_from_exception
|
||||
movel %sp@(PT_OFF_ORIG_D0),%d1
|
||||
movel #-ENOSYS,%d0
|
||||
cmpl #NR_syscalls,%d1
|
||||
|
@ -19,6 +19,7 @@ config HEARTBEAT
|
||||
# We have a dedicated heartbeat LED. :-)
|
||||
config PROC_HARDWARE
|
||||
bool "/proc/hardware support"
|
||||
depends on PROC_FS
|
||||
help
|
||||
Say Y here to support the /proc/hardware file, which gives you
|
||||
access to information about the machine you're running on,
|
||||
|
@ -92,6 +92,8 @@ ENTRY(system_call)
|
||||
jbsr syscall_trace_enter
|
||||
RESTORE_SWITCH_STACK
|
||||
addql #4,%sp
|
||||
addql #1,%d0
|
||||
jeq ret_from_exception
|
||||
movel %d3,%a0
|
||||
jbsr %a0@
|
||||
movel %d0,%sp@(PT_OFF_D0) /* save the return value */
|
||||
|
@ -167,9 +167,12 @@ do_trace_entry:
|
||||
jbsr syscall_trace
|
||||
RESTORE_SWITCH_STACK
|
||||
addql #4,%sp
|
||||
addql #1,%d0 | optimization for cmpil #-1,%d0
|
||||
jeq ret_from_syscall
|
||||
movel %sp@(PT_OFF_ORIG_D0),%d0
|
||||
cmpl #NR_syscalls,%d0
|
||||
jcs syscall
|
||||
jra ret_from_syscall
|
||||
badsys:
|
||||
movel #-ENOSYS,%sp@(PT_OFF_D0)
|
||||
jra ret_from_syscall
|
||||
|
@ -38,7 +38,7 @@ static inline bool mips_syscall_is_indirect(struct task_struct *task,
|
||||
static inline long syscall_get_nr(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
return current_thread_info()->syscall;
|
||||
return task_thread_info(task)->syscall;
|
||||
}
|
||||
|
||||
static inline void mips_syscall_update_nr(struct task_struct *task,
|
||||
|
@ -104,7 +104,6 @@ struct vpe_control {
|
||||
struct list_head tc_list; /* Thread contexts */
|
||||
};
|
||||
|
||||
extern unsigned long physical_memsize;
|
||||
extern struct vpe_control vpecontrol;
|
||||
extern const struct file_operations vpe_fops;
|
||||
|
||||
|
@ -423,9 +423,11 @@ static void cps_shutdown_this_cpu(enum cpu_death death)
|
||||
wmb();
|
||||
}
|
||||
} else {
|
||||
pr_debug("Gating power to core %d\n", core);
|
||||
/* Power down the core */
|
||||
cps_pm_enter_state(CPS_PM_POWER_GATED);
|
||||
if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) {
|
||||
pr_debug("Gating power to core %d\n", core);
|
||||
/* Power down the core */
|
||||
cps_pm_enter_state(CPS_PM_POWER_GATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,12 +92,11 @@ int vpe_run(struct vpe *v)
|
||||
write_tc_c0_tchalt(read_tc_c0_tchalt() & ~TCHALT_H);
|
||||
|
||||
/*
|
||||
* The sde-kit passes 'memsize' to __start in $a3, so set something
|
||||
* here... Or set $a3 to zero and define DFLT_STACK_SIZE and
|
||||
* DFLT_HEAP_SIZE when you compile your program
|
||||
* We don't pass the memsize here, so VPE programs need to be
|
||||
* compiled with DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined.
|
||||
*/
|
||||
mttgpr(7, 0);
|
||||
mttgpr(6, v->ntcs);
|
||||
mttgpr(7, physical_memsize);
|
||||
|
||||
/* set up VPE1 */
|
||||
/*
|
||||
|
@ -22,12 +22,6 @@
|
||||
DEFINE_SPINLOCK(ebu_lock);
|
||||
EXPORT_SYMBOL_GPL(ebu_lock);
|
||||
|
||||
/*
|
||||
* This is needed by the VPE loader code, just set it to 0 and assume
|
||||
* that the firmware hardcodes this value to something useful.
|
||||
*/
|
||||
unsigned long physical_memsize = 0L;
|
||||
|
||||
/*
|
||||
* this struct is filled by the soc specific detection code and holds
|
||||
* information about the specific soc type, revision and name
|
||||
|
@ -92,7 +92,7 @@ aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
|
||||
|
||||
ifeq ($(HAS_BIARCH),y)
|
||||
KBUILD_CFLAGS += -m$(BITS)
|
||||
KBUILD_AFLAGS += -m$(BITS) -Wl,-a$(BITS)
|
||||
KBUILD_AFLAGS += -m$(BITS)
|
||||
KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION)
|
||||
endif
|
||||
|
||||
|
@ -1054,45 +1054,46 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
|
||||
}
|
||||
|
||||
pr_info("EEH: Recovery successful.\n");
|
||||
} else {
|
||||
/*
|
||||
* About 90% of all real-life EEH failures in the field
|
||||
* are due to poorly seated PCI cards. Only 10% or so are
|
||||
* due to actual, failed cards.
|
||||
*/
|
||||
pr_err("EEH: Unable to recover from failure from PHB#%x-PE#%x.\n"
|
||||
"Please try reseating or replacing it\n",
|
||||
pe->phb->global_number, pe->addr);
|
||||
goto out;
|
||||
}
|
||||
|
||||
eeh_slot_error_detail(pe, EEH_LOG_PERM);
|
||||
/*
|
||||
* About 90% of all real-life EEH failures in the field
|
||||
* are due to poorly seated PCI cards. Only 10% or so are
|
||||
* due to actual, failed cards.
|
||||
*/
|
||||
pr_err("EEH: Unable to recover from failure from PHB#%x-PE#%x.\n"
|
||||
"Please try reseating or replacing it\n",
|
||||
pe->phb->global_number, pe->addr);
|
||||
|
||||
/* Notify all devices that they're about to go down. */
|
||||
eeh_set_channel_state(pe, pci_channel_io_perm_failure);
|
||||
eeh_set_irq_state(pe, false);
|
||||
eeh_pe_report("error_detected(permanent failure)", pe,
|
||||
eeh_report_failure, NULL);
|
||||
eeh_slot_error_detail(pe, EEH_LOG_PERM);
|
||||
|
||||
/* Mark the PE to be removed permanently */
|
||||
eeh_pe_state_mark(pe, EEH_PE_REMOVED);
|
||||
/* Notify all devices that they're about to go down. */
|
||||
eeh_set_irq_state(pe, false);
|
||||
eeh_pe_report("error_detected(permanent failure)", pe,
|
||||
eeh_report_failure, NULL);
|
||||
eeh_set_channel_state(pe, pci_channel_io_perm_failure);
|
||||
|
||||
/*
|
||||
* Shut down the device drivers for good. We mark
|
||||
* all removed devices correctly to avoid access
|
||||
* the their PCI config any more.
|
||||
*/
|
||||
if (pe->type & EEH_PE_VF) {
|
||||
eeh_pe_dev_traverse(pe, eeh_rmv_device, NULL);
|
||||
eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
|
||||
} else {
|
||||
eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
|
||||
eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
|
||||
/* Mark the PE to be removed permanently */
|
||||
eeh_pe_state_mark(pe, EEH_PE_REMOVED);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
pci_hp_remove_devices(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
/* The passed PE should no longer be used */
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* Shut down the device drivers for good. We mark
|
||||
* all removed devices correctly to avoid access
|
||||
* the their PCI config any more.
|
||||
*/
|
||||
if (pe->type & EEH_PE_VF) {
|
||||
eeh_pe_dev_traverse(pe, eeh_rmv_device, NULL);
|
||||
eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
|
||||
} else {
|
||||
eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
|
||||
eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
pci_hp_remove_devices(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
/* The passed PE should no longer be used */
|
||||
return;
|
||||
}
|
||||
|
||||
out:
|
||||
@ -1188,10 +1189,10 @@ void eeh_handle_special_event(void)
|
||||
|
||||
/* Notify all devices to be down */
|
||||
eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
|
||||
eeh_set_channel_state(pe, pci_channel_io_perm_failure);
|
||||
eeh_pe_report(
|
||||
"error_detected(permanent failure)", pe,
|
||||
eeh_report_failure, NULL);
|
||||
eeh_set_channel_state(pe, pci_channel_io_perm_failure);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
list_for_each_entry(hose, &hose_list, list_node) {
|
||||
|
@ -52,10 +52,10 @@ struct rtas_t rtas = {
|
||||
EXPORT_SYMBOL(rtas);
|
||||
|
||||
DEFINE_SPINLOCK(rtas_data_buf_lock);
|
||||
EXPORT_SYMBOL(rtas_data_buf_lock);
|
||||
EXPORT_SYMBOL_GPL(rtas_data_buf_lock);
|
||||
|
||||
char rtas_data_buf[RTAS_DATA_BUF_SIZE] __cacheline_aligned;
|
||||
EXPORT_SYMBOL(rtas_data_buf);
|
||||
char rtas_data_buf[RTAS_DATA_BUF_SIZE] __aligned(SZ_4K);
|
||||
EXPORT_SYMBOL_GPL(rtas_data_buf);
|
||||
|
||||
unsigned long rtas_rmo_buf;
|
||||
|
||||
@ -64,7 +64,7 @@ unsigned long rtas_rmo_buf;
|
||||
* This is done like this so rtas_flash can be a module.
|
||||
*/
|
||||
void (*rtas_flash_term_hook)(int);
|
||||
EXPORT_SYMBOL(rtas_flash_term_hook);
|
||||
EXPORT_SYMBOL_GPL(rtas_flash_term_hook);
|
||||
|
||||
/* RTAS use home made raw locking instead of spin_lock_irqsave
|
||||
* because those can be called from within really nasty contexts
|
||||
@ -312,7 +312,7 @@ void rtas_progress(char *s, unsigned short hex)
|
||||
|
||||
spin_unlock(&progress_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_progress); /* needed by rtas_flash module */
|
||||
EXPORT_SYMBOL_GPL(rtas_progress); /* needed by rtas_flash module */
|
||||
|
||||
int rtas_token(const char *service)
|
||||
{
|
||||
@ -322,7 +322,7 @@ int rtas_token(const char *service)
|
||||
tokp = of_get_property(rtas.dev, service, NULL);
|
||||
return tokp ? be32_to_cpu(*tokp) : RTAS_UNKNOWN_SERVICE;
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_token);
|
||||
EXPORT_SYMBOL_GPL(rtas_token);
|
||||
|
||||
int rtas_service_present(const char *service)
|
||||
{
|
||||
@ -482,7 +482,7 @@ int rtas_call(int token, int nargs, int nret, int *outputs, ...)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_call);
|
||||
EXPORT_SYMBOL_GPL(rtas_call);
|
||||
|
||||
/* For RTAS_BUSY (-2), delay for 1 millisecond. For an extended busy status
|
||||
* code of 990n, perform the hinted delay of 10^n (last digit) milliseconds.
|
||||
@ -517,7 +517,7 @@ unsigned int rtas_busy_delay(int status)
|
||||
|
||||
return ms;
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_busy_delay);
|
||||
EXPORT_SYMBOL_GPL(rtas_busy_delay);
|
||||
|
||||
static int rtas_error_rc(int rtas_rc)
|
||||
{
|
||||
@ -563,7 +563,7 @@ int rtas_get_power_level(int powerdomain, int *level)
|
||||
return rtas_error_rc(rc);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_get_power_level);
|
||||
EXPORT_SYMBOL_GPL(rtas_get_power_level);
|
||||
|
||||
int rtas_set_power_level(int powerdomain, int level, int *setlevel)
|
||||
{
|
||||
@ -581,7 +581,7 @@ int rtas_set_power_level(int powerdomain, int level, int *setlevel)
|
||||
return rtas_error_rc(rc);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_set_power_level);
|
||||
EXPORT_SYMBOL_GPL(rtas_set_power_level);
|
||||
|
||||
int rtas_get_sensor(int sensor, int index, int *state)
|
||||
{
|
||||
@ -599,7 +599,7 @@ int rtas_get_sensor(int sensor, int index, int *state)
|
||||
return rtas_error_rc(rc);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_get_sensor);
|
||||
EXPORT_SYMBOL_GPL(rtas_get_sensor);
|
||||
|
||||
int rtas_get_sensor_fast(int sensor, int index, int *state)
|
||||
{
|
||||
@ -660,7 +660,7 @@ int rtas_set_indicator(int indicator, int index, int new_value)
|
||||
return rtas_error_rc(rc);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_set_indicator);
|
||||
EXPORT_SYMBOL_GPL(rtas_set_indicator);
|
||||
|
||||
/*
|
||||
* Ignoring RTAS extended delay
|
||||
|
@ -941,15 +941,12 @@ static inline void __radix__flush_tlb_range(struct mm_struct *mm,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
bool hflush = false;
|
||||
bool hflush;
|
||||
unsigned long hstart, hend;
|
||||
|
||||
if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
|
||||
hstart = (start + PMD_SIZE - 1) & PMD_MASK;
|
||||
hend = end & PMD_MASK;
|
||||
if (hstart < hend)
|
||||
hflush = true;
|
||||
}
|
||||
hstart = (start + PMD_SIZE - 1) & PMD_MASK;
|
||||
hend = end & PMD_MASK;
|
||||
hflush = IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) && hstart < hend;
|
||||
|
||||
if (local) {
|
||||
asm volatile("ptesync": : :"memory");
|
||||
|
@ -79,9 +79,8 @@ static u32 phys_coresperchip; /* Physical cores per chip */
|
||||
*/
|
||||
void read_24x7_sys_info(void)
|
||||
{
|
||||
int call_status, len, ntypes;
|
||||
|
||||
spin_lock(&rtas_data_buf_lock);
|
||||
const s32 token = rtas_token("ibm,get-system-parameter");
|
||||
int call_status;
|
||||
|
||||
/*
|
||||
* Making system parameter: chips and sockets and cores per chip
|
||||
@ -91,32 +90,27 @@ void read_24x7_sys_info(void)
|
||||
phys_chipspersocket = 1;
|
||||
phys_coresperchip = 1;
|
||||
|
||||
call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
|
||||
NULL,
|
||||
PROCESSOR_MODULE_INFO,
|
||||
__pa(rtas_data_buf),
|
||||
RTAS_DATA_BUF_SIZE);
|
||||
do {
|
||||
spin_lock(&rtas_data_buf_lock);
|
||||
call_status = rtas_call(token, 3, 1, NULL, PROCESSOR_MODULE_INFO,
|
||||
__pa(rtas_data_buf), RTAS_DATA_BUF_SIZE);
|
||||
if (call_status == 0) {
|
||||
int ntypes = be16_to_cpup((__be16 *)&rtas_data_buf[2]);
|
||||
int len = be16_to_cpup((__be16 *)&rtas_data_buf[0]);
|
||||
|
||||
if (len >= 8 && ntypes != 0) {
|
||||
phys_sockets = be16_to_cpup((__be16 *)&rtas_data_buf[4]);
|
||||
phys_chipspersocket = be16_to_cpup((__be16 *)&rtas_data_buf[6]);
|
||||
phys_coresperchip = be16_to_cpup((__be16 *)&rtas_data_buf[8]);
|
||||
}
|
||||
}
|
||||
spin_unlock(&rtas_data_buf_lock);
|
||||
} while (rtas_busy_delay(call_status));
|
||||
|
||||
if (call_status != 0) {
|
||||
pr_err("Error calling get-system-parameter %d\n",
|
||||
call_status);
|
||||
} else {
|
||||
len = be16_to_cpup((__be16 *)&rtas_data_buf[0]);
|
||||
if (len < 8)
|
||||
goto out;
|
||||
|
||||
ntypes = be16_to_cpup((__be16 *)&rtas_data_buf[2]);
|
||||
|
||||
if (!ntypes)
|
||||
goto out;
|
||||
|
||||
phys_sockets = be16_to_cpup((__be16 *)&rtas_data_buf[4]);
|
||||
phys_chipspersocket = be16_to_cpup((__be16 *)&rtas_data_buf[6]);
|
||||
phys_coresperchip = be16_to_cpup((__be16 *)&rtas_data_buf[8]);
|
||||
}
|
||||
|
||||
out:
|
||||
spin_unlock(&rtas_data_buf_lock);
|
||||
}
|
||||
|
||||
/* Domains for which more than one result element are returned for each event. */
|
||||
|
@ -2260,7 +2260,8 @@ static void pnv_ioda_setup_pe_res(struct pnv_ioda_pe *pe,
|
||||
int index;
|
||||
int64_t rc;
|
||||
|
||||
if (!res || !res->flags || res->start > res->end)
|
||||
if (!res || !res->flags || res->start > res->end ||
|
||||
res->flags & IORESOURCE_UNSET)
|
||||
return;
|
||||
|
||||
if (res->flags & IORESOURCE_IO) {
|
||||
|
@ -1433,22 +1433,22 @@ static inline void __init check_lp_set_hblkrm(unsigned int lp,
|
||||
|
||||
void __init pseries_lpar_read_hblkrm_characteristics(void)
|
||||
{
|
||||
const s32 token = rtas_token("ibm,get-system-parameter");
|
||||
unsigned char local_buffer[SPLPAR_TLB_BIC_MAXLENGTH];
|
||||
int call_status, len, idx, bpsize;
|
||||
|
||||
if (!firmware_has_feature(FW_FEATURE_BLOCK_REMOVE))
|
||||
return;
|
||||
|
||||
spin_lock(&rtas_data_buf_lock);
|
||||
memset(rtas_data_buf, 0, RTAS_DATA_BUF_SIZE);
|
||||
call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
|
||||
NULL,
|
||||
SPLPAR_TLB_BIC_TOKEN,
|
||||
__pa(rtas_data_buf),
|
||||
RTAS_DATA_BUF_SIZE);
|
||||
memcpy(local_buffer, rtas_data_buf, SPLPAR_TLB_BIC_MAXLENGTH);
|
||||
local_buffer[SPLPAR_TLB_BIC_MAXLENGTH - 1] = '\0';
|
||||
spin_unlock(&rtas_data_buf_lock);
|
||||
do {
|
||||
spin_lock(&rtas_data_buf_lock);
|
||||
memset(rtas_data_buf, 0, RTAS_DATA_BUF_SIZE);
|
||||
call_status = rtas_call(token, 3, 1, NULL, SPLPAR_TLB_BIC_TOKEN,
|
||||
__pa(rtas_data_buf), RTAS_DATA_BUF_SIZE);
|
||||
memcpy(local_buffer, rtas_data_buf, SPLPAR_TLB_BIC_MAXLENGTH);
|
||||
local_buffer[SPLPAR_TLB_BIC_MAXLENGTH - 1] = '\0';
|
||||
spin_unlock(&rtas_data_buf_lock);
|
||||
} while (rtas_busy_delay(call_status));
|
||||
|
||||
if (call_status != 0) {
|
||||
pr_warn("%s %s Error calling get-system-parameter (0x%x)\n",
|
||||
|
@ -322,6 +322,7 @@ static void parse_mpp_x_data(struct seq_file *m)
|
||||
*/
|
||||
static void parse_system_parameter_string(struct seq_file *m)
|
||||
{
|
||||
const s32 token = rtas_token("ibm,get-system-parameter");
|
||||
int call_status;
|
||||
|
||||
unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
|
||||
@ -331,16 +332,15 @@ static void parse_system_parameter_string(struct seq_file *m)
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock(&rtas_data_buf_lock);
|
||||
memset(rtas_data_buf, 0, SPLPAR_MAXLENGTH);
|
||||
call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
|
||||
NULL,
|
||||
SPLPAR_CHARACTERISTICS_TOKEN,
|
||||
__pa(rtas_data_buf),
|
||||
RTAS_DATA_BUF_SIZE);
|
||||
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
|
||||
local_buffer[SPLPAR_MAXLENGTH - 1] = '\0';
|
||||
spin_unlock(&rtas_data_buf_lock);
|
||||
do {
|
||||
spin_lock(&rtas_data_buf_lock);
|
||||
memset(rtas_data_buf, 0, SPLPAR_MAXLENGTH);
|
||||
call_status = rtas_call(token, 3, 1, NULL, SPLPAR_CHARACTERISTICS_TOKEN,
|
||||
__pa(rtas_data_buf), RTAS_DATA_BUF_SIZE);
|
||||
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
|
||||
local_buffer[SPLPAR_MAXLENGTH - 1] = '\0';
|
||||
spin_unlock(&rtas_data_buf_lock);
|
||||
} while (rtas_busy_delay(call_status));
|
||||
|
||||
if (call_status != 0) {
|
||||
printk(KERN_INFO
|
||||
|
@ -18,6 +18,7 @@ static __always_inline bool arch_static_branch(struct static_key *key,
|
||||
bool branch)
|
||||
{
|
||||
asm_volatile_goto(
|
||||
" .align 2 \n\t"
|
||||
" .option push \n\t"
|
||||
" .option norelax \n\t"
|
||||
" .option norvc \n\t"
|
||||
@ -39,6 +40,7 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key,
|
||||
bool branch)
|
||||
{
|
||||
asm_volatile_goto(
|
||||
" .align 2 \n\t"
|
||||
" .option push \n\t"
|
||||
" .option norelax \n\t"
|
||||
" .option norvc \n\t"
|
||||
|
@ -125,7 +125,7 @@
|
||||
#define FUNCT3_C_J 0xa000
|
||||
#define FUNCT3_C_JAL 0x2000
|
||||
#define FUNCT4_C_JR 0x8000
|
||||
#define FUNCT4_C_JALR 0xf000
|
||||
#define FUNCT4_C_JALR 0x9000
|
||||
|
||||
#define FUNCT12_SRET 0x10200000
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/of_clk.h>
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/delay.h>
|
||||
#include <asm/sbi.h>
|
||||
@ -28,6 +29,8 @@ void __init time_init(void)
|
||||
|
||||
of_clk_init(NULL);
|
||||
timer_probe();
|
||||
|
||||
tick_setup_hrtimer_broadcast();
|
||||
}
|
||||
|
||||
void clocksource_arch_init(struct clocksource *cs)
|
||||
|
@ -241,6 +241,7 @@ static void pop_kprobe(struct kprobe_ctlblk *kcb)
|
||||
{
|
||||
__this_cpu_write(current_kprobe, kcb->prev_kprobe.kp);
|
||||
kcb->kprobe_status = kcb->prev_kprobe.status;
|
||||
kcb->prev_kprobe.kp = NULL;
|
||||
}
|
||||
NOKPROBE_SYMBOL(pop_kprobe);
|
||||
|
||||
@ -402,12 +403,11 @@ static int post_kprobe_handler(struct pt_regs *regs)
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
resume_execution(p, regs);
|
||||
if (kcb->kprobe_status != KPROBE_REENTER && p->post_handler) {
|
||||
kcb->kprobe_status = KPROBE_HIT_SSDONE;
|
||||
p->post_handler(p, regs, 0);
|
||||
}
|
||||
|
||||
resume_execution(p, regs);
|
||||
pop_kprobe(kcb);
|
||||
preempt_enable_no_resched();
|
||||
|
||||
|
@ -188,5 +188,6 @@ SECTIONS
|
||||
DISCARDS
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.interp)
|
||||
}
|
||||
}
|
||||
|
@ -5012,6 +5012,23 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
|
||||
/* When we are protected, we should not change the memory slots */
|
||||
if (kvm_s390_pv_get_handle(kvm))
|
||||
return -EINVAL;
|
||||
|
||||
if (!kvm->arch.migration_mode)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Turn off migration mode when:
|
||||
* - userspace creates a new memslot with dirty logging off,
|
||||
* - userspace modifies an existing memslot (MOVE or FLAGS_ONLY) and
|
||||
* dirty logging is turned off.
|
||||
* Migration mode expects dirty page logging being enabled to store
|
||||
* its dirty bitmap.
|
||||
*/
|
||||
if (change != KVM_MR_DELETE &&
|
||||
!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES))
|
||||
WARN(kvm_s390_vm_stop_migration(kvm),
|
||||
"Failed to stop migration mode");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -289,15 +289,17 @@ segment_overlaps_others (struct dcss_segment *seg)
|
||||
|
||||
/*
|
||||
* real segment loading function, called from segment_load
|
||||
* Must return either an error code < 0, or the segment type code >= 0
|
||||
*/
|
||||
static int
|
||||
__segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long *end)
|
||||
{
|
||||
unsigned long start_addr, end_addr, dummy;
|
||||
struct dcss_segment *seg;
|
||||
int rc, diag_cc;
|
||||
int rc, diag_cc, segtype;
|
||||
|
||||
start_addr = end_addr = 0;
|
||||
segtype = -1;
|
||||
seg = kmalloc(sizeof(*seg), GFP_KERNEL | GFP_DMA);
|
||||
if (seg == NULL) {
|
||||
rc = -ENOMEM;
|
||||
@ -326,9 +328,9 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long
|
||||
seg->res_name[8] = '\0';
|
||||
strlcat(seg->res_name, " (DCSS)", sizeof(seg->res_name));
|
||||
seg->res->name = seg->res_name;
|
||||
rc = seg->vm_segtype;
|
||||
if (rc == SEG_TYPE_SC ||
|
||||
((rc == SEG_TYPE_SR || rc == SEG_TYPE_ER) && !do_nonshared))
|
||||
segtype = seg->vm_segtype;
|
||||
if (segtype == SEG_TYPE_SC ||
|
||||
((segtype == SEG_TYPE_SR || segtype == SEG_TYPE_ER) && !do_nonshared))
|
||||
seg->res->flags |= IORESOURCE_READONLY;
|
||||
|
||||
/* Check for overlapping resources before adding the mapping. */
|
||||
@ -386,7 +388,7 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long
|
||||
out_free:
|
||||
kfree(seg);
|
||||
out:
|
||||
return rc;
|
||||
return rc < 0 ? rc : segtype;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -296,7 +296,7 @@ static void try_free_pmd_table(pud_t *pud, unsigned long start)
|
||||
if (end > VMALLOC_START)
|
||||
return;
|
||||
#ifdef CONFIG_KASAN
|
||||
if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end)
|
||||
if (start < KASAN_SHADOW_END && end > KASAN_SHADOW_START)
|
||||
return;
|
||||
#endif
|
||||
pmd = pmd_offset(pud, start);
|
||||
@ -371,7 +371,7 @@ static void try_free_pud_table(p4d_t *p4d, unsigned long start)
|
||||
if (end > VMALLOC_START)
|
||||
return;
|
||||
#ifdef CONFIG_KASAN
|
||||
if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end)
|
||||
if (start < KASAN_SHADOW_END && end > KASAN_SHADOW_START)
|
||||
return;
|
||||
#endif
|
||||
|
||||
@ -425,7 +425,7 @@ static void try_free_p4d_table(pgd_t *pgd, unsigned long start)
|
||||
if (end > VMALLOC_START)
|
||||
return;
|
||||
#ifdef CONFIG_KASAN
|
||||
if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end)
|
||||
if (start < KASAN_SHADOW_END && end > KASAN_SHADOW_START)
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
@ -293,7 +293,7 @@ config FORCE_MAX_ZONEORDER
|
||||
This config option is actually maximum order plus one. For example,
|
||||
a value of 13 means that the largest free memory block is 2^12 pages.
|
||||
|
||||
if SPARC64
|
||||
if SPARC64 || COMPILE_TEST
|
||||
source "kernel/power/Kconfig"
|
||||
endif
|
||||
|
||||
|
@ -771,6 +771,7 @@ static int vector_config(char *str, char **error_out)
|
||||
|
||||
if (parsed == NULL) {
|
||||
*error_out = "vector_config failed to parse parameters";
|
||||
kfree(params);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -1336,17 +1336,16 @@ config MICROCODE_AMD
|
||||
If you select this option, microcode patch loading support for AMD
|
||||
processors will be enabled.
|
||||
|
||||
config MICROCODE_OLD_INTERFACE
|
||||
bool "Ancient loading interface (DEPRECATED)"
|
||||
config MICROCODE_LATE_LOADING
|
||||
bool "Late microcode loading (DANGEROUS)"
|
||||
default n
|
||||
depends on MICROCODE
|
||||
help
|
||||
DO NOT USE THIS! This is the ancient /dev/cpu/microcode interface
|
||||
which was used by userspace tools like iucode_tool and microcode.ctl.
|
||||
It is inadequate because it runs too late to be able to properly
|
||||
load microcode on a machine and it needs special tools. Instead, you
|
||||
should've switched to the early loading method with the initrd or
|
||||
builtin microcode by now: Documentation/x86/microcode.rst
|
||||
Loading microcode late, when the system is up and executing instructions
|
||||
is a tricky business and should be avoided if possible. Just the sequence
|
||||
of synchronizing all cores and SMT threads is one fragile dance which does
|
||||
not guarantee that cores might not softlock after the loading. Therefore,
|
||||
use this at your own risk. Late loading taints the kernel too.
|
||||
|
||||
config X86_MSR
|
||||
tristate "/dev/cpu/*/msr - Model-specific register support"
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <crypto/internal/simd.h>
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/simd.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#define GHASH_BLOCK_SIZE 16
|
||||
#define GHASH_DIGEST_SIZE 16
|
||||
@ -54,15 +55,14 @@ static int ghash_setkey(struct crypto_shash *tfm,
|
||||
const u8 *key, unsigned int keylen)
|
||||
{
|
||||
struct ghash_ctx *ctx = crypto_shash_ctx(tfm);
|
||||
be128 *x = (be128 *)key;
|
||||
u64 a, b;
|
||||
|
||||
if (keylen != GHASH_BLOCK_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
/* perform multiplication by 'x' in GF(2^128) */
|
||||
a = be64_to_cpu(x->a);
|
||||
b = be64_to_cpu(x->b);
|
||||
a = get_unaligned_be64(key);
|
||||
b = get_unaligned_be64(key + 8);
|
||||
|
||||
ctx->shash.a = (b << 1) | (a >> 63);
|
||||
ctx->shash.b = (a << 1) | (b >> 63);
|
||||
|
@ -541,7 +541,13 @@ __init int zhaoxin_pmu_init(void)
|
||||
|
||||
switch (boot_cpu_data.x86) {
|
||||
case 0x06:
|
||||
if (boot_cpu_data.x86_model == 0x0f || boot_cpu_data.x86_model == 0x19) {
|
||||
/*
|
||||
* Support Zhaoxin CPU from ZXC series, exclude Nano series through FMS.
|
||||
* Nano FMS: Family=6, Model=F, Stepping=[0-A][C-D]
|
||||
* ZXC FMS: Family=6, Model=F, Stepping=E-F OR Family=6, Model=0x19, Stepping=0-3
|
||||
*/
|
||||
if ((boot_cpu_data.x86_model == 0x0f && boot_cpu_data.x86_stepping >= 0x0e) ||
|
||||
boot_cpu_data.x86_model == 0x19) {
|
||||
|
||||
x86_pmu.max_period = x86_pmu.cntval_mask >> 1;
|
||||
|
||||
|
@ -131,7 +131,7 @@ static inline unsigned int x86_cpuid_family(void)
|
||||
int __init microcode_init(void);
|
||||
extern void __init load_ucode_bsp(void);
|
||||
extern void load_ucode_ap(void);
|
||||
void reload_early_microcode(void);
|
||||
void reload_early_microcode(unsigned int cpu);
|
||||
extern bool get_builtin_firmware(struct cpio_data *cd, const char *name);
|
||||
extern bool initrd_gone;
|
||||
void microcode_bsp_resume(void);
|
||||
@ -139,7 +139,7 @@ void microcode_bsp_resume(void);
|
||||
static inline int __init microcode_init(void) { return 0; };
|
||||
static inline void __init load_ucode_bsp(void) { }
|
||||
static inline void load_ucode_ap(void) { }
|
||||
static inline void reload_early_microcode(void) { }
|
||||
static inline void reload_early_microcode(unsigned int cpu) { }
|
||||
static inline void microcode_bsp_resume(void) { }
|
||||
static inline bool
|
||||
get_builtin_firmware(struct cpio_data *cd, const char *name) { return false; }
|
||||
|
@ -47,12 +47,12 @@ struct microcode_amd {
|
||||
extern void __init load_ucode_amd_bsp(unsigned int family);
|
||||
extern void load_ucode_amd_ap(unsigned int family);
|
||||
extern int __init save_microcode_in_initrd_amd(unsigned int family);
|
||||
void reload_ucode_amd(void);
|
||||
void reload_ucode_amd(unsigned int cpu);
|
||||
#else
|
||||
static inline void __init load_ucode_amd_bsp(unsigned int family) {}
|
||||
static inline void load_ucode_amd_ap(unsigned int family) {}
|
||||
static inline int __init
|
||||
save_microcode_in_initrd_amd(unsigned int family) { return -EINVAL; }
|
||||
static inline void reload_ucode_amd(void) {}
|
||||
static inline void reload_ucode_amd(unsigned int cpu) {}
|
||||
#endif
|
||||
#endif /* _ASM_X86_MICROCODE_AMD_H */
|
||||
|
@ -54,6 +54,10 @@
|
||||
#define SPEC_CTRL_RRSBA_DIS_S_SHIFT 6 /* Disable RRSBA behavior */
|
||||
#define SPEC_CTRL_RRSBA_DIS_S BIT(SPEC_CTRL_RRSBA_DIS_S_SHIFT)
|
||||
|
||||
/* A mask for bits which the kernel toggles when controlling mitigations */
|
||||
#define SPEC_CTRL_MITIGATIONS_MASK (SPEC_CTRL_IBRS | SPEC_CTRL_STIBP | SPEC_CTRL_SSBD \
|
||||
| SPEC_CTRL_RRSBA_DIS_S)
|
||||
|
||||
#define MSR_IA32_PRED_CMD 0x00000049 /* Prediction Command */
|
||||
#define PRED_CMD_IBPB BIT(0) /* Indirect Branch Prediction Barrier */
|
||||
|
||||
|
@ -682,6 +682,7 @@ extern void load_direct_gdt(int);
|
||||
extern void load_fixmap_gdt(int);
|
||||
extern void load_percpu_segment(int);
|
||||
extern void cpu_init(void);
|
||||
extern void cpu_init_secondary(void);
|
||||
extern void cpu_init_exception_handling(void);
|
||||
extern void cr4_init(void);
|
||||
|
||||
@ -838,8 +839,9 @@ bool xen_set_default_idle(void);
|
||||
#define xen_set_default_idle 0
|
||||
#endif
|
||||
|
||||
void stop_this_cpu(void *dummy);
|
||||
void microcode_check(void);
|
||||
void __noreturn stop_this_cpu(void *dummy);
|
||||
void microcode_check(struct cpuinfo_x86 *prev_info);
|
||||
void store_cpu_caps(struct cpuinfo_x86 *info);
|
||||
|
||||
enum l1tf_mitigations {
|
||||
L1TF_MITIGATION_OFF,
|
||||
|
@ -25,6 +25,8 @@ void __noreturn machine_real_restart(unsigned int type);
|
||||
#define MRR_BIOS 0
|
||||
#define MRR_APM 1
|
||||
|
||||
void cpu_emergency_disable_virtualization(void);
|
||||
|
||||
typedef void (*nmi_shootdown_cb)(int, struct pt_regs*);
|
||||
void nmi_panic_self_stop(struct pt_regs *regs);
|
||||
void nmi_shootdown_cpus(nmi_shootdown_cb callback);
|
||||
|
@ -51,24 +51,27 @@ DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key);
|
||||
* simple as possible.
|
||||
* Must be called with preemption disabled.
|
||||
*/
|
||||
static void __resctrl_sched_in(void)
|
||||
static inline void __resctrl_sched_in(struct task_struct *tsk)
|
||||
{
|
||||
struct resctrl_pqr_state *state = this_cpu_ptr(&pqr_state);
|
||||
u32 closid = state->default_closid;
|
||||
u32 rmid = state->default_rmid;
|
||||
u32 tmp;
|
||||
|
||||
/*
|
||||
* If this task has a closid/rmid assigned, use it.
|
||||
* Else use the closid/rmid assigned to this cpu.
|
||||
*/
|
||||
if (static_branch_likely(&rdt_alloc_enable_key)) {
|
||||
if (current->closid)
|
||||
closid = current->closid;
|
||||
tmp = READ_ONCE(tsk->closid);
|
||||
if (tmp)
|
||||
closid = tmp;
|
||||
}
|
||||
|
||||
if (static_branch_likely(&rdt_mon_enable_key)) {
|
||||
if (current->rmid)
|
||||
rmid = current->rmid;
|
||||
tmp = READ_ONCE(tsk->rmid);
|
||||
if (tmp)
|
||||
rmid = tmp;
|
||||
}
|
||||
|
||||
if (closid != state->cur_closid || rmid != state->cur_rmid) {
|
||||
@ -78,17 +81,17 @@ static void __resctrl_sched_in(void)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void resctrl_sched_in(void)
|
||||
static inline void resctrl_sched_in(struct task_struct *tsk)
|
||||
{
|
||||
if (static_branch_likely(&rdt_enable_key))
|
||||
__resctrl_sched_in();
|
||||
__resctrl_sched_in(tsk);
|
||||
}
|
||||
|
||||
void resctrl_cpu_detect(struct cpuinfo_x86 *c);
|
||||
|
||||
#else
|
||||
|
||||
static inline void resctrl_sched_in(void) {}
|
||||
static inline void resctrl_sched_in(struct task_struct *tsk) {}
|
||||
static inline void resctrl_cpu_detect(struct cpuinfo_x86 *c) {}
|
||||
|
||||
#endif /* CONFIG_X86_CPU_RESCTRL */
|
||||
|
@ -120,7 +120,21 @@ static inline void cpu_svm_disable(void)
|
||||
|
||||
wrmsrl(MSR_VM_HSAVE_PA, 0);
|
||||
rdmsrl(MSR_EFER, efer);
|
||||
wrmsrl(MSR_EFER, efer & ~EFER_SVME);
|
||||
if (efer & EFER_SVME) {
|
||||
/*
|
||||
* Force GIF=1 prior to disabling SVM to ensure INIT and NMI
|
||||
* aren't blocked, e.g. if a fatal error occurred between CLGI
|
||||
* and STGI. Note, STGI may #UD if SVM is disabled from NMI
|
||||
* context between reading EFER and executing STGI. In that
|
||||
* case, GIF must already be set, otherwise the NMI would have
|
||||
* been blocked, so just eat the fault.
|
||||
*/
|
||||
asm_volatile_goto("1: stgi\n\t"
|
||||
_ASM_EXTABLE(1b, %l[fault])
|
||||
::: "memory" : fault);
|
||||
fault:
|
||||
wrmsrl(MSR_EFER, efer & ~EFER_SVME);
|
||||
}
|
||||
}
|
||||
|
||||
/** Makes sure SVM is disabled, if it is supported on the CPU
|
||||
|
@ -136,9 +136,17 @@ void __init check_bugs(void)
|
||||
* have unknown values. AMD64_LS_CFG MSR is cached in the early AMD
|
||||
* init code as it is not enumerated and depends on the family.
|
||||
*/
|
||||
if (boot_cpu_has(X86_FEATURE_MSR_SPEC_CTRL))
|
||||
if (cpu_feature_enabled(X86_FEATURE_MSR_SPEC_CTRL)) {
|
||||
rdmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
|
||||
|
||||
/*
|
||||
* Previously running kernel (kexec), may have some controls
|
||||
* turned ON. Clear them and let the mitigations setup below
|
||||
* rediscover them based on configuration.
|
||||
*/
|
||||
x86_spec_ctrl_base &= ~SPEC_CTRL_MITIGATIONS_MASK;
|
||||
}
|
||||
|
||||
/* Select the proper CPU mitigations before patching alternatives: */
|
||||
spectre_v1_select_mitigation();
|
||||
spectre_v2_select_mitigation();
|
||||
@ -1058,14 +1066,18 @@ spectre_v2_parse_user_cmdline(void)
|
||||
return SPECTRE_V2_USER_CMD_AUTO;
|
||||
}
|
||||
|
||||
static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode)
|
||||
static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)
|
||||
{
|
||||
return mode == SPECTRE_V2_IBRS ||
|
||||
mode == SPECTRE_V2_EIBRS ||
|
||||
return mode == SPECTRE_V2_EIBRS ||
|
||||
mode == SPECTRE_V2_EIBRS_RETPOLINE ||
|
||||
mode == SPECTRE_V2_EIBRS_LFENCE;
|
||||
}
|
||||
|
||||
static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode)
|
||||
{
|
||||
return spectre_v2_in_eibrs_mode(mode) || mode == SPECTRE_V2_IBRS;
|
||||
}
|
||||
|
||||
static void __init
|
||||
spectre_v2_user_select_mitigation(void)
|
||||
{
|
||||
@ -1128,12 +1140,19 @@ spectre_v2_user_select_mitigation(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* If no STIBP, IBRS or enhanced IBRS is enabled, or SMT impossible,
|
||||
* STIBP is not required.
|
||||
* If no STIBP, enhanced IBRS is enabled, or SMT impossible, STIBP
|
||||
* is not required.
|
||||
*
|
||||
* Enhanced IBRS also protects against cross-thread branch target
|
||||
* injection in user-mode as the IBRS bit remains always set which
|
||||
* implicitly enables cross-thread protections. However, in legacy IBRS
|
||||
* mode, the IBRS bit is set only on kernel entry and cleared on return
|
||||
* to userspace. This disables the implicit cross-thread protection,
|
||||
* so allow for STIBP to be selected in that case.
|
||||
*/
|
||||
if (!boot_cpu_has(X86_FEATURE_STIBP) ||
|
||||
!smt_possible ||
|
||||
spectre_v2_in_ibrs_mode(spectre_v2_enabled))
|
||||
spectre_v2_in_eibrs_mode(spectre_v2_enabled))
|
||||
return;
|
||||
|
||||
/*
|
||||
@ -2227,7 +2246,7 @@ static ssize_t mmio_stale_data_show_state(char *buf)
|
||||
|
||||
static char *stibp_state(void)
|
||||
{
|
||||
if (spectre_v2_in_ibrs_mode(spectre_v2_enabled))
|
||||
if (spectre_v2_in_eibrs_mode(spectre_v2_enabled))
|
||||
return "";
|
||||
|
||||
switch (spectre_v2_user_stibp) {
|
||||
|
@ -2048,13 +2048,12 @@ void cpu_init_exception_handling(void)
|
||||
|
||||
/*
|
||||
* cpu_init() initializes state that is per-CPU. Some data is already
|
||||
* initialized (naturally) in the bootstrap process, such as the GDT
|
||||
* and IDT. We reload them nevertheless, this function acts as a
|
||||
* 'CPU state barrier', nothing should get across.
|
||||
* initialized (naturally) in the bootstrap process, such as the GDT. We
|
||||
* reload it nevertheless, this function acts as a 'CPU state barrier',
|
||||
* nothing should get across.
|
||||
*/
|
||||
void cpu_init(void)
|
||||
{
|
||||
struct tss_struct *tss = this_cpu_ptr(&cpu_tss_rw);
|
||||
struct task_struct *cur = current;
|
||||
int cpu = raw_smp_processor_id();
|
||||
|
||||
@ -2067,8 +2066,6 @@ void cpu_init(void)
|
||||
early_cpu_to_node(cpu) != NUMA_NO_NODE)
|
||||
set_numa_node(early_cpu_to_node(cpu));
|
||||
#endif
|
||||
setup_getcpu(cpu);
|
||||
|
||||
pr_debug("Initializing CPU#%d\n", cpu);
|
||||
|
||||
if (IS_ENABLED(CONFIG_X86_64) || cpu_feature_enabled(X86_FEATURE_VME) ||
|
||||
@ -2080,7 +2077,6 @@ void cpu_init(void)
|
||||
* and set up the GDT descriptor:
|
||||
*/
|
||||
switch_to_new_gdt(cpu);
|
||||
load_current_idt();
|
||||
|
||||
if (IS_ENABLED(CONFIG_X86_64)) {
|
||||
loadsegment(fs, 0);
|
||||
@ -2100,12 +2096,6 @@ void cpu_init(void)
|
||||
initialize_tlbstate_and_flush();
|
||||
enter_lazy_tlb(&init_mm, cur);
|
||||
|
||||
/* Initialize the TSS. */
|
||||
tss_setup_ist(tss);
|
||||
tss_setup_io_bitmap(tss);
|
||||
set_tss_desc(cpu, &get_cpu_entry_area(cpu)->tss.x86_tss);
|
||||
|
||||
load_TR_desc();
|
||||
/*
|
||||
* sp0 points to the entry trampoline stack regardless of what task
|
||||
* is running.
|
||||
@ -2127,35 +2117,64 @@ void cpu_init(void)
|
||||
load_fixmap_gdt(cpu);
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_SMP
|
||||
void cpu_init_secondary(void)
|
||||
{
|
||||
/*
|
||||
* Relies on the BP having set-up the IDT tables, which are loaded
|
||||
* on this CPU in cpu_init_exception_handling().
|
||||
*/
|
||||
cpu_init_exception_handling();
|
||||
cpu_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MICROCODE_LATE_LOADING
|
||||
/**
|
||||
* store_cpu_caps() - Store a snapshot of CPU capabilities
|
||||
* @curr_info: Pointer where to store it
|
||||
*
|
||||
* Returns: None
|
||||
*/
|
||||
void store_cpu_caps(struct cpuinfo_x86 *curr_info)
|
||||
{
|
||||
/* Reload CPUID max function as it might've changed. */
|
||||
curr_info->cpuid_level = cpuid_eax(0);
|
||||
|
||||
/* Copy all capability leafs and pick up the synthetic ones. */
|
||||
memcpy(&curr_info->x86_capability, &boot_cpu_data.x86_capability,
|
||||
sizeof(curr_info->x86_capability));
|
||||
|
||||
/* Get the hardware CPUID leafs */
|
||||
get_cpu_cap(curr_info);
|
||||
}
|
||||
|
||||
/**
|
||||
* microcode_check() - Check if any CPU capabilities changed after an update.
|
||||
* @prev_info: CPU capabilities stored before an update.
|
||||
*
|
||||
* The microcode loader calls this upon late microcode load to recheck features,
|
||||
* only when microcode has been updated. Caller holds microcode_mutex and CPU
|
||||
* hotplug lock.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void microcode_check(void)
|
||||
void microcode_check(struct cpuinfo_x86 *prev_info)
|
||||
{
|
||||
struct cpuinfo_x86 info;
|
||||
struct cpuinfo_x86 curr_info;
|
||||
|
||||
perf_check_microcode();
|
||||
|
||||
/* Reload CPUID max function as it might've changed. */
|
||||
info.cpuid_level = cpuid_eax(0);
|
||||
store_cpu_caps(&curr_info);
|
||||
|
||||
/*
|
||||
* Copy all capability leafs to pick up the synthetic ones so that
|
||||
* memcmp() below doesn't fail on that. The ones coming from CPUID will
|
||||
* get overwritten in get_cpu_cap().
|
||||
*/
|
||||
memcpy(&info.x86_capability, &boot_cpu_data.x86_capability, sizeof(info.x86_capability));
|
||||
|
||||
get_cpu_cap(&info);
|
||||
|
||||
if (!memcmp(&info.x86_capability, &boot_cpu_data.x86_capability, sizeof(info.x86_capability)))
|
||||
if (!memcmp(&prev_info->x86_capability, &curr_info.x86_capability,
|
||||
sizeof(prev_info->x86_capability)))
|
||||
return;
|
||||
|
||||
pr_warn("x86/CPU: CPU features have changed after loading microcode, but might not take effect.\n");
|
||||
pr_warn("x86/CPU: Please consider either early loading through initrd/built-in or a potential BIOS update.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Invoked from core CPU hotplug code after hotplug operations
|
||||
|
@ -55,7 +55,9 @@ struct cont_desc {
|
||||
};
|
||||
|
||||
static u32 ucode_new_rev;
|
||||
static u8 amd_ucode_patch[PATCH_MAX_SIZE];
|
||||
|
||||
/* One blob per node. */
|
||||
static u8 amd_ucode_patch[MAX_NUMNODES][PATCH_MAX_SIZE];
|
||||
|
||||
/*
|
||||
* Microcode patch container file is prepended to the initrd in cpio
|
||||
@ -429,7 +431,7 @@ apply_microcode_early_amd(u32 cpuid_1_eax, void *ucode, size_t size, bool save_p
|
||||
patch = (u8 (*)[PATCH_MAX_SIZE])__pa_nodebug(&amd_ucode_patch);
|
||||
#else
|
||||
new_rev = &ucode_new_rev;
|
||||
patch = &amd_ucode_patch;
|
||||
patch = &amd_ucode_patch[0];
|
||||
#endif
|
||||
|
||||
desc.cpuid_1_eax = cpuid_1_eax;
|
||||
@ -548,8 +550,7 @@ void load_ucode_amd_ap(unsigned int cpuid_1_eax)
|
||||
apply_microcode_early_amd(cpuid_1_eax, cp.data, cp.size, false);
|
||||
}
|
||||
|
||||
static enum ucode_state
|
||||
load_microcode_amd(bool save, u8 family, const u8 *data, size_t size);
|
||||
static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t size);
|
||||
|
||||
int __init save_microcode_in_initrd_amd(unsigned int cpuid_1_eax)
|
||||
{
|
||||
@ -567,19 +568,19 @@ int __init save_microcode_in_initrd_amd(unsigned int cpuid_1_eax)
|
||||
if (!desc.mc)
|
||||
return -EINVAL;
|
||||
|
||||
ret = load_microcode_amd(true, x86_family(cpuid_1_eax), desc.data, desc.size);
|
||||
ret = load_microcode_amd(x86_family(cpuid_1_eax), desc.data, desc.size);
|
||||
if (ret > UCODE_UPDATED)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void reload_ucode_amd(void)
|
||||
void reload_ucode_amd(unsigned int cpu)
|
||||
{
|
||||
struct microcode_amd *mc;
|
||||
u32 rev, dummy __always_unused;
|
||||
struct microcode_amd *mc;
|
||||
|
||||
mc = (struct microcode_amd *)amd_ucode_patch;
|
||||
mc = (struct microcode_amd *)amd_ucode_patch[cpu_to_node(cpu)];
|
||||
|
||||
rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy);
|
||||
|
||||
@ -845,9 +846,10 @@ static enum ucode_state __load_microcode_amd(u8 family, const u8 *data,
|
||||
return UCODE_OK;
|
||||
}
|
||||
|
||||
static enum ucode_state
|
||||
load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
|
||||
static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t size)
|
||||
{
|
||||
struct cpuinfo_x86 *c;
|
||||
unsigned int nid, cpu;
|
||||
struct ucode_patch *p;
|
||||
enum ucode_state ret;
|
||||
|
||||
@ -860,23 +862,23 @@ load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
|
||||
return ret;
|
||||
}
|
||||
|
||||
p = find_patch(0);
|
||||
if (!p) {
|
||||
return ret;
|
||||
} else {
|
||||
if (boot_cpu_data.microcode >= p->patch_id)
|
||||
return ret;
|
||||
for_each_node(nid) {
|
||||
cpu = cpumask_first(cpumask_of_node(nid));
|
||||
c = &cpu_data(cpu);
|
||||
|
||||
p = find_patch(cpu);
|
||||
if (!p)
|
||||
continue;
|
||||
|
||||
if (c->microcode >= p->patch_id)
|
||||
continue;
|
||||
|
||||
ret = UCODE_NEW;
|
||||
|
||||
memset(&amd_ucode_patch[nid], 0, PATCH_MAX_SIZE);
|
||||
memcpy(&amd_ucode_patch[nid], p->data, min_t(u32, p->size, PATCH_MAX_SIZE));
|
||||
}
|
||||
|
||||
/* save BSP's matching patch for early load */
|
||||
if (!save)
|
||||
return ret;
|
||||
|
||||
memset(amd_ucode_patch, 0, PATCH_MAX_SIZE);
|
||||
memcpy(amd_ucode_patch, p->data, min_t(u32, p->size, PATCH_MAX_SIZE));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -901,12 +903,11 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device,
|
||||
{
|
||||
char fw_name[36] = "amd-ucode/microcode_amd.bin";
|
||||
struct cpuinfo_x86 *c = &cpu_data(cpu);
|
||||
bool bsp = c->cpu_index == boot_cpu_data.cpu_index;
|
||||
enum ucode_state ret = UCODE_NFOUND;
|
||||
const struct firmware *fw;
|
||||
|
||||
/* reload ucode container only on the boot cpu */
|
||||
if (!refresh_fw || !bsp)
|
||||
if (!refresh_fw)
|
||||
return UCODE_OK;
|
||||
|
||||
if (c->x86 >= 0x15)
|
||||
@ -921,7 +922,7 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device,
|
||||
if (!verify_container(fw->data, fw->size, false))
|
||||
goto fw_release;
|
||||
|
||||
ret = load_microcode_amd(bsp, c->x86, fw->data, fw->size);
|
||||
ret = load_microcode_amd(c->x86, fw->data, fw->size);
|
||||
|
||||
fw_release:
|
||||
release_firmware(fw);
|
||||
|
@ -55,7 +55,7 @@ LIST_HEAD(microcode_cache);
|
||||
* All non cpu-hotplug-callback call sites use:
|
||||
*
|
||||
* - microcode_mutex to synchronize with each other;
|
||||
* - get/put_online_cpus() to synchronize with
|
||||
* - cpus_read_lock/unlock() to synchronize with
|
||||
* the cpu-hotplug-callback call sites.
|
||||
*
|
||||
* We guarantee that only a single cpu is being
|
||||
@ -315,7 +315,7 @@ struct cpio_data find_microcode_in_initrd(const char *path, bool use_pa)
|
||||
#endif
|
||||
}
|
||||
|
||||
void reload_early_microcode(void)
|
||||
void reload_early_microcode(unsigned int cpu)
|
||||
{
|
||||
int vendor, family;
|
||||
|
||||
@ -329,7 +329,7 @@ void reload_early_microcode(void)
|
||||
break;
|
||||
case X86_VENDOR_AMD:
|
||||
if (family >= 0x10)
|
||||
reload_ucode_amd();
|
||||
reload_ucode_amd(cpu);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -390,101 +390,10 @@ static int apply_microcode_on_target(int cpu)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MICROCODE_OLD_INTERFACE
|
||||
static int do_microcode_update(const void __user *buf, size_t size)
|
||||
{
|
||||
int error = 0;
|
||||
int cpu;
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
|
||||
enum ucode_state ustate;
|
||||
|
||||
if (!uci->valid)
|
||||
continue;
|
||||
|
||||
ustate = microcode_ops->request_microcode_user(cpu, buf, size);
|
||||
if (ustate == UCODE_ERROR) {
|
||||
error = -1;
|
||||
break;
|
||||
} else if (ustate == UCODE_NEW) {
|
||||
apply_microcode_on_target(cpu);
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
static int microcode_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return capable(CAP_SYS_RAWIO) ? stream_open(inode, file) : -EPERM;
|
||||
}
|
||||
|
||||
static ssize_t microcode_write(struct file *file, const char __user *buf,
|
||||
size_t len, loff_t *ppos)
|
||||
{
|
||||
ssize_t ret = -EINVAL;
|
||||
unsigned long nr_pages = totalram_pages();
|
||||
|
||||
if ((len >> PAGE_SHIFT) > nr_pages) {
|
||||
pr_err("too much data (max %ld pages)\n", nr_pages);
|
||||
return ret;
|
||||
}
|
||||
|
||||
get_online_cpus();
|
||||
mutex_lock(µcode_mutex);
|
||||
|
||||
if (do_microcode_update(buf, len) == 0)
|
||||
ret = (ssize_t)len;
|
||||
|
||||
if (ret > 0)
|
||||
perf_check_microcode();
|
||||
|
||||
mutex_unlock(µcode_mutex);
|
||||
put_online_cpus();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct file_operations microcode_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.write = microcode_write,
|
||||
.open = microcode_open,
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct miscdevice microcode_dev = {
|
||||
.minor = MICROCODE_MINOR,
|
||||
.name = "microcode",
|
||||
.nodename = "cpu/microcode",
|
||||
.fops = µcode_fops,
|
||||
};
|
||||
|
||||
static int __init microcode_dev_init(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = misc_register(µcode_dev);
|
||||
if (error) {
|
||||
pr_err("can't misc_register on minor=%d\n", MICROCODE_MINOR);
|
||||
return error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit microcode_dev_exit(void)
|
||||
{
|
||||
misc_deregister(µcode_dev);
|
||||
}
|
||||
#else
|
||||
#define microcode_dev_init() 0
|
||||
#define microcode_dev_exit() do { } while (0)
|
||||
#endif
|
||||
|
||||
/* fake device for request_firmware */
|
||||
static struct platform_device *microcode_pdev;
|
||||
|
||||
#ifdef CONFIG_MICROCODE_LATE_LOADING
|
||||
/*
|
||||
* Late loading dance. Why the heavy-handed stomp_machine effort?
|
||||
*
|
||||
@ -599,16 +508,27 @@ static int __reload_late(void *info)
|
||||
*/
|
||||
static int microcode_reload_late(void)
|
||||
{
|
||||
int ret;
|
||||
int old = boot_cpu_data.microcode, ret;
|
||||
struct cpuinfo_x86 prev_info;
|
||||
|
||||
atomic_set(&late_cpus_in, 0);
|
||||
atomic_set(&late_cpus_out, 0);
|
||||
|
||||
ret = stop_machine_cpuslocked(__reload_late, NULL, cpu_online_mask);
|
||||
if (ret == 0)
|
||||
microcode_check();
|
||||
/*
|
||||
* Take a snapshot before the microcode update in order to compare and
|
||||
* check whether any bits changed after an update.
|
||||
*/
|
||||
store_cpu_caps(&prev_info);
|
||||
|
||||
pr_info("Reload completed, microcode revision: 0x%x\n", boot_cpu_data.microcode);
|
||||
ret = stop_machine_cpuslocked(__reload_late, NULL, cpu_online_mask);
|
||||
if (!ret) {
|
||||
pr_info("Reload succeeded, microcode revision: 0x%x -> 0x%x\n",
|
||||
old, boot_cpu_data.microcode);
|
||||
microcode_check(&prev_info);
|
||||
} else {
|
||||
pr_info("Reload failed, current microcode revision: 0x%x\n",
|
||||
boot_cpu_data.microcode);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -629,7 +549,7 @@ static ssize_t reload_store(struct device *dev,
|
||||
if (val != 1)
|
||||
return size;
|
||||
|
||||
get_online_cpus();
|
||||
cpus_read_lock();
|
||||
|
||||
ret = check_online_cpus();
|
||||
if (ret)
|
||||
@ -644,7 +564,7 @@ static ssize_t reload_store(struct device *dev,
|
||||
mutex_unlock(µcode_mutex);
|
||||
|
||||
put:
|
||||
put_online_cpus();
|
||||
cpus_read_unlock();
|
||||
|
||||
if (ret == 0)
|
||||
ret = size;
|
||||
@ -652,6 +572,9 @@ static ssize_t reload_store(struct device *dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR_WO(reload);
|
||||
#endif
|
||||
|
||||
static ssize_t version_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
@ -668,7 +591,6 @@ static ssize_t pf_show(struct device *dev,
|
||||
return sprintf(buf, "0x%x\n", uci->cpu_sig.pf);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR_WO(reload);
|
||||
static DEVICE_ATTR(version, 0444, version_show, NULL);
|
||||
static DEVICE_ATTR(processor_flags, 0444, pf_show, NULL);
|
||||
|
||||
@ -785,7 +707,7 @@ void microcode_bsp_resume(void)
|
||||
if (uci->valid && uci->mc)
|
||||
microcode_ops->apply_microcode(cpu);
|
||||
else if (!uci->mc)
|
||||
reload_early_microcode();
|
||||
reload_early_microcode(cpu);
|
||||
}
|
||||
|
||||
static struct syscore_ops mc_syscore_ops = {
|
||||
@ -821,7 +743,9 @@ static int mc_cpu_down_prep(unsigned int cpu)
|
||||
}
|
||||
|
||||
static struct attribute *cpu_root_microcode_attrs[] = {
|
||||
#ifdef CONFIG_MICROCODE_LATE_LOADING
|
||||
&dev_attr_reload.attr,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -853,14 +777,14 @@ int __init microcode_init(void)
|
||||
if (IS_ERR(microcode_pdev))
|
||||
return PTR_ERR(microcode_pdev);
|
||||
|
||||
get_online_cpus();
|
||||
cpus_read_lock();
|
||||
mutex_lock(µcode_mutex);
|
||||
|
||||
error = subsys_interface_register(&mc_cpu_interface);
|
||||
if (!error)
|
||||
perf_check_microcode();
|
||||
mutex_unlock(µcode_mutex);
|
||||
put_online_cpus();
|
||||
cpus_read_unlock();
|
||||
|
||||
if (error)
|
||||
goto out_pdev;
|
||||
@ -873,10 +797,6 @@ int __init microcode_init(void)
|
||||
goto out_driver;
|
||||
}
|
||||
|
||||
error = microcode_dev_init();
|
||||
if (error)
|
||||
goto out_ucode_group;
|
||||
|
||||
register_syscore_ops(&mc_syscore_ops);
|
||||
cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:starting",
|
||||
mc_cpu_starting, NULL);
|
||||
@ -887,18 +807,14 @@ int __init microcode_init(void)
|
||||
|
||||
return 0;
|
||||
|
||||
out_ucode_group:
|
||||
sysfs_remove_group(&cpu_subsys.dev_root->kobj,
|
||||
&cpu_root_microcode_group);
|
||||
|
||||
out_driver:
|
||||
get_online_cpus();
|
||||
cpus_read_lock();
|
||||
mutex_lock(µcode_mutex);
|
||||
|
||||
subsys_interface_unregister(&mc_cpu_interface);
|
||||
|
||||
mutex_unlock(µcode_mutex);
|
||||
put_online_cpus();
|
||||
cpus_read_unlock();
|
||||
|
||||
out_pdev:
|
||||
platform_device_unregister(microcode_pdev);
|
||||
|
@ -311,7 +311,7 @@ static void update_cpu_closid_rmid(void *info)
|
||||
* executing task might have its own closid selected. Just reuse
|
||||
* the context switch code.
|
||||
*/
|
||||
resctrl_sched_in();
|
||||
resctrl_sched_in(current);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -532,7 +532,7 @@ static void _update_task_closid_rmid(void *task)
|
||||
* Otherwise, the MSR is updated when the task is scheduled in.
|
||||
*/
|
||||
if (task == current)
|
||||
resctrl_sched_in();
|
||||
resctrl_sched_in(task);
|
||||
}
|
||||
|
||||
static void update_task_closid_rmid(struct task_struct *t)
|
||||
@ -563,11 +563,11 @@ static int __rdtgroup_move_task(struct task_struct *tsk,
|
||||
*/
|
||||
|
||||
if (rdtgrp->type == RDTCTRL_GROUP) {
|
||||
tsk->closid = rdtgrp->closid;
|
||||
tsk->rmid = rdtgrp->mon.rmid;
|
||||
WRITE_ONCE(tsk->closid, rdtgrp->closid);
|
||||
WRITE_ONCE(tsk->rmid, rdtgrp->mon.rmid);
|
||||
} else if (rdtgrp->type == RDTMON_GROUP) {
|
||||
if (rdtgrp->mon.parent->closid == tsk->closid) {
|
||||
tsk->rmid = rdtgrp->mon.rmid;
|
||||
WRITE_ONCE(tsk->rmid, rdtgrp->mon.rmid);
|
||||
} else {
|
||||
rdt_last_cmd_puts("Can't move task to different control group\n");
|
||||
return -EINVAL;
|
||||
@ -2312,8 +2312,8 @@ static void rdt_move_group_tasks(struct rdtgroup *from, struct rdtgroup *to,
|
||||
for_each_process_thread(p, t) {
|
||||
if (!from || is_closid_match(t, from) ||
|
||||
is_rmid_match(t, from)) {
|
||||
t->closid = to->closid;
|
||||
t->rmid = to->mon.rmid;
|
||||
WRITE_ONCE(t->closid, to->closid);
|
||||
WRITE_ONCE(t->rmid, to->mon.rmid);
|
||||
|
||||
/*
|
||||
* Order the closid/rmid stores above before the loads
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <linux/kdebug.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/virtext.h>
|
||||
#include <asm/intel_pt.h>
|
||||
#include <asm/crash.h>
|
||||
#include <asm/cmdline.h>
|
||||
@ -94,15 +93,6 @@ static void kdump_nmi_callback(int cpu, struct pt_regs *regs)
|
||||
*/
|
||||
cpu_crash_vmclear_loaded_vmcss();
|
||||
|
||||
/* Disable VMX or SVM if needed.
|
||||
*
|
||||
* We need to disable virtualization on all CPUs.
|
||||
* Having VMX or SVM enabled on any CPU may break rebooting
|
||||
* after the kdump kernel has finished its task.
|
||||
*/
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_svm_disable();
|
||||
|
||||
/*
|
||||
* Disable Intel PT to stop its logging
|
||||
*/
|
||||
@ -161,12 +151,7 @@ void native_machine_crash_shutdown(struct pt_regs *regs)
|
||||
*/
|
||||
cpu_crash_vmclear_loaded_vmcss();
|
||||
|
||||
/* Booting kdump kernel with VMX or SVM enabled won't work,
|
||||
* because (among other limitations) we can't disable paging
|
||||
* with the virt flags.
|
||||
*/
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_svm_disable();
|
||||
cpu_emergency_disable_virtualization();
|
||||
|
||||
/*
|
||||
* Disable Intel PT to stop its logging
|
||||
|
@ -46,8 +46,8 @@ unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr)
|
||||
/* This function only handles jump-optimized kprobe */
|
||||
if (kp && kprobe_optimized(kp)) {
|
||||
op = container_of(kp, struct optimized_kprobe, kp);
|
||||
/* If op->list is not empty, op is under optimizing */
|
||||
if (list_empty(&op->list))
|
||||
/* If op is optimized or under unoptimizing */
|
||||
if (list_empty(&op->list) || optprobe_queued_unopt(op))
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
@ -351,7 +351,7 @@ int arch_check_optimized_kprobe(struct optimized_kprobe *op)
|
||||
|
||||
for (i = 1; i < op->optinsn.size; i++) {
|
||||
p = get_kprobe(op->kp.addr + i);
|
||||
if (p && !kprobe_disabled(p))
|
||||
if (p && !kprobe_disarmed(p))
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
|
@ -720,7 +720,7 @@ bool xen_set_default_idle(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
void stop_this_cpu(void *dummy)
|
||||
void __noreturn stop_this_cpu(void *dummy)
|
||||
{
|
||||
local_irq_disable();
|
||||
/*
|
||||
|
@ -214,7 +214,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
|
||||
switch_fpu_finish(next_p);
|
||||
|
||||
/* Load the Intel cache allocation PQR MSR. */
|
||||
resctrl_sched_in();
|
||||
resctrl_sched_in(next_p);
|
||||
|
||||
return prev_p;
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
|
||||
}
|
||||
|
||||
/* Load the Intel cache allocation PQR MSR. */
|
||||
resctrl_sched_in();
|
||||
resctrl_sched_in(next_p);
|
||||
|
||||
return prev_p;
|
||||
}
|
||||
|
@ -528,33 +528,29 @@ static inline void kb_wait(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void vmxoff_nmi(int cpu, struct pt_regs *regs)
|
||||
{
|
||||
cpu_emergency_vmxoff();
|
||||
}
|
||||
static inline void nmi_shootdown_cpus_on_restart(void);
|
||||
|
||||
/* Use NMIs as IPIs to tell all CPUs to disable virtualization */
|
||||
static void emergency_vmx_disable_all(void)
|
||||
static void emergency_reboot_disable_virtualization(void)
|
||||
{
|
||||
/* Just make sure we won't change CPUs while doing this */
|
||||
local_irq_disable();
|
||||
|
||||
/*
|
||||
* Disable VMX on all CPUs before rebooting, otherwise we risk hanging
|
||||
* the machine, because the CPU blocks INIT when it's in VMX root.
|
||||
* Disable virtualization on all CPUs before rebooting to avoid hanging
|
||||
* the system, as VMX and SVM block INIT when running in the host.
|
||||
*
|
||||
* We can't take any locks and we may be on an inconsistent state, so
|
||||
* use NMIs as IPIs to tell the other CPUs to exit VMX root and halt.
|
||||
* use NMIs as IPIs to tell the other CPUs to disable VMX/SVM and halt.
|
||||
*
|
||||
* Do the NMI shootdown even if VMX if off on _this_ CPU, as that
|
||||
* doesn't prevent a different CPU from being in VMX root operation.
|
||||
* Do the NMI shootdown even if virtualization is off on _this_ CPU, as
|
||||
* other CPUs may have virtualization enabled.
|
||||
*/
|
||||
if (cpu_has_vmx()) {
|
||||
/* Safely force _this_ CPU out of VMX root operation. */
|
||||
__cpu_emergency_vmxoff();
|
||||
if (cpu_has_vmx() || cpu_has_svm(NULL)) {
|
||||
/* Safely force _this_ CPU out of VMX/SVM operation. */
|
||||
cpu_emergency_disable_virtualization();
|
||||
|
||||
/* Halt and exit VMX root operation on the other CPUs. */
|
||||
nmi_shootdown_cpus(vmxoff_nmi);
|
||||
/* Disable VMX/SVM and halt on other CPUs. */
|
||||
nmi_shootdown_cpus_on_restart();
|
||||
}
|
||||
}
|
||||
|
||||
@ -590,7 +586,7 @@ static void native_machine_emergency_restart(void)
|
||||
unsigned short mode;
|
||||
|
||||
if (reboot_emergency)
|
||||
emergency_vmx_disable_all();
|
||||
emergency_reboot_disable_virtualization();
|
||||
|
||||
tboot_shutdown(TB_SHUTDOWN_REBOOT);
|
||||
|
||||
@ -795,6 +791,17 @@ void machine_crash_shutdown(struct pt_regs *regs)
|
||||
/* This is the CPU performing the emergency shutdown work. */
|
||||
int crashing_cpu = -1;
|
||||
|
||||
/*
|
||||
* Disable virtualization, i.e. VMX or SVM, to ensure INIT is recognized during
|
||||
* reboot. VMX blocks INIT if the CPU is post-VMXON, and SVM blocks INIT if
|
||||
* GIF=0, i.e. if the crash occurred between CLGI and STGI.
|
||||
*/
|
||||
void cpu_emergency_disable_virtualization(void)
|
||||
{
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_svm_disable();
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SMP)
|
||||
|
||||
static nmi_shootdown_cb shootdown_callback;
|
||||
@ -817,7 +824,14 @@ static int crash_nmi_callback(unsigned int val, struct pt_regs *regs)
|
||||
return NMI_HANDLED;
|
||||
local_irq_disable();
|
||||
|
||||
shootdown_callback(cpu, regs);
|
||||
if (shootdown_callback)
|
||||
shootdown_callback(cpu, regs);
|
||||
|
||||
/*
|
||||
* Prepare the CPU for reboot _after_ invoking the callback so that the
|
||||
* callback can safely use virtualization instructions, e.g. VMCLEAR.
|
||||
*/
|
||||
cpu_emergency_disable_virtualization();
|
||||
|
||||
atomic_dec(&waiting_for_crash_ipi);
|
||||
/* Assume hlt works */
|
||||
@ -828,18 +842,32 @@ static int crash_nmi_callback(unsigned int val, struct pt_regs *regs)
|
||||
return NMI_HANDLED;
|
||||
}
|
||||
|
||||
/*
|
||||
* Halt all other CPUs, calling the specified function on each of them
|
||||
/**
|
||||
* nmi_shootdown_cpus - Stop other CPUs via NMI
|
||||
* @callback: Optional callback to be invoked from the NMI handler
|
||||
*
|
||||
* This function can be used to halt all other CPUs on crash
|
||||
* or emergency reboot time. The function passed as parameter
|
||||
* will be called inside a NMI handler on all CPUs.
|
||||
* The NMI handler on the remote CPUs invokes @callback, if not
|
||||
* NULL, first and then disables virtualization to ensure that
|
||||
* INIT is recognized during reboot.
|
||||
*
|
||||
* nmi_shootdown_cpus() can only be invoked once. After the first
|
||||
* invocation all other CPUs are stuck in crash_nmi_callback() and
|
||||
* cannot respond to a second NMI.
|
||||
*/
|
||||
void nmi_shootdown_cpus(nmi_shootdown_cb callback)
|
||||
{
|
||||
unsigned long msecs;
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
/*
|
||||
* Avoid certain doom if a shootdown already occurred; re-registering
|
||||
* the NMI handler will cause list corruption, modifying the callback
|
||||
* will do who knows what, etc...
|
||||
*/
|
||||
if (WARN_ON_ONCE(crash_ipi_issued))
|
||||
return;
|
||||
|
||||
/* Make a note of crashing cpu. Will be used in NMI callback. */
|
||||
crashing_cpu = safe_smp_processor_id();
|
||||
|
||||
@ -867,7 +895,17 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
|
||||
msecs--;
|
||||
}
|
||||
|
||||
/* Leave the nmi callback set */
|
||||
/*
|
||||
* Leave the nmi callback set, shootdown is a one-time thing. Clearing
|
||||
* the callback could result in a NULL pointer dereference if a CPU
|
||||
* (finally) responds after the timeout expires.
|
||||
*/
|
||||
}
|
||||
|
||||
static inline void nmi_shootdown_cpus_on_restart(void)
|
||||
{
|
||||
if (!crash_ipi_issued)
|
||||
nmi_shootdown_cpus(NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -897,6 +935,8 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
|
||||
/* No other CPUs to shoot down */
|
||||
}
|
||||
|
||||
static inline void nmi_shootdown_cpus_on_restart(void) { }
|
||||
|
||||
void run_crash_ipi_callback(struct pt_regs *regs)
|
||||
{
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <asm/mce.h>
|
||||
#include <asm/trace/irq_vectors.h>
|
||||
#include <asm/kexec.h>
|
||||
#include <asm/virtext.h>
|
||||
#include <asm/reboot.h>
|
||||
|
||||
/*
|
||||
* Some notes on x86 processor bugs affecting SMP operation:
|
||||
@ -122,7 +122,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
|
||||
if (raw_smp_processor_id() == atomic_read(&stopping_cpu))
|
||||
return NMI_HANDLED;
|
||||
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_disable_virtualization();
|
||||
stop_this_cpu(NULL);
|
||||
|
||||
return NMI_HANDLED;
|
||||
@ -134,7 +134,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
|
||||
DEFINE_IDTENTRY_SYSVEC(sysvec_reboot)
|
||||
{
|
||||
ack_APIC_irq();
|
||||
cpu_emergency_vmxoff();
|
||||
cpu_emergency_disable_virtualization();
|
||||
stop_this_cpu(NULL);
|
||||
}
|
||||
|
||||
|
@ -227,8 +227,7 @@ static void notrace start_secondary(void *unused)
|
||||
load_cr3(swapper_pg_dir);
|
||||
__flush_tlb_all();
|
||||
#endif
|
||||
cpu_init_exception_handling();
|
||||
cpu_init();
|
||||
cpu_init_secondary();
|
||||
rcu_cpu_starting(raw_smp_processor_id());
|
||||
x86_cpuinit.early_percpu_clock_init();
|
||||
smp_callin();
|
||||
|
@ -264,6 +264,14 @@ static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
|
||||
"Lenovo ideapad D330-10IGM"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Lenovo IdeaPad Duet 3 10IGL5 with 1200x1920 portrait screen */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
|
||||
"IdeaPad Duet 3 10IGL5"),
|
||||
},
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
|
@ -1185,9 +1185,7 @@ void __init trap_init(void)
|
||||
|
||||
idt_setup_traps();
|
||||
|
||||
/*
|
||||
* Should be a barrier for any external CPU state:
|
||||
*/
|
||||
cpu_init_exception_handling();
|
||||
cpu_init();
|
||||
|
||||
idt_setup_ist_traps();
|
||||
|
@ -2115,10 +2115,14 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
|
||||
break;
|
||||
|
||||
case APIC_SELF_IPI:
|
||||
if (apic_x2apic_mode(apic))
|
||||
kvm_apic_send_ipi(apic, APIC_DEST_SELF | (val & APIC_VECTOR_MASK), 0);
|
||||
else
|
||||
/*
|
||||
* Self-IPI exists only when x2APIC is enabled. Bits 7:0 hold
|
||||
* the vector, everything else is reserved.
|
||||
*/
|
||||
if (!apic_x2apic_mode(apic) || (val & ~APIC_VECTOR_MASK))
|
||||
ret = 1;
|
||||
else
|
||||
kvm_apic_send_ipi(apic, APIC_DEST_SELF | val, 0);
|
||||
break;
|
||||
default:
|
||||
ret = 1;
|
||||
|
@ -17,8 +17,10 @@ int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
|
||||
{
|
||||
long ret;
|
||||
|
||||
asm("syscall" : "=a" (ret) :
|
||||
"0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory");
|
||||
asm("syscall"
|
||||
: "=a" (ret)
|
||||
: "0" (__NR_clock_gettime), "D" (clock), "S" (ts)
|
||||
: "rcx", "r11", "memory");
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -29,8 +31,10 @@ int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
|
||||
{
|
||||
long ret;
|
||||
|
||||
asm("syscall" : "=a" (ret) :
|
||||
"0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory");
|
||||
asm("syscall"
|
||||
: "=a" (ret)
|
||||
: "0" (__NR_gettimeofday), "D" (tv), "S" (tz)
|
||||
: "rcx", "r11", "memory");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user