android_kernel_xiaomi_sm7250/drivers
Peter Zijlstra d2c10ea360 intel_idle: Disable IBRS during long idle
commit bf5835bcdb9635c97f85120dba9bfa21e111130f upstream.

Having IBRS enabled while the SMT sibling is idle unnecessarily slows
down the running sibling. OTOH, disabling IBRS around idle takes two
MSR writes, which will increase the idle latency.

Therefore, only disable IBRS around deeper idle states. Shallow idle
states are bounded by the tick in duration, since NOHZ is not allowed
for them by virtue of their short target residency.

Only do this for mwait-driven idle, since that keeps interrupts disabled
across idle, which makes disabling IBRS vs IRQ-entry a non-issue.

Note: C6 is a random threshold, most importantly C1 probably shouldn't
disable IBRS, benchmarking needed.

Suggested-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
[cascardo: no CPUIDLE_FLAG_IRQ_ENABLE]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
[cascardo: context adjustments]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Suleiman Souhlal <suleiman@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-23 07:53:45 +01:00
..
accessibility
acpi ACPI: video: Force backlight native for more TongFang devices 2022-11-03 23:52:26 +09:00
amba ARM: 9120/1: Revert "amba: make use of -1 IRQs warn" 2021-11-06 13:58:45 +01:00
android binder: fix UAF of ref->proc caused by race condition 2022-09-15 12:17:03 +02:00
ata ata: pata_legacy: fix pdc20230_set_piomode() 2022-11-10 17:46:51 +01:00
atm atm: idt77252: fix use-after-free bugs caused by tst_timer 2022-08-25 11:15:39 +02:00
auxdisplay auxdisplay: ht16k33: Fix frame buffer device blanking 2021-11-26 11:36:15 +01:00
base x86/bugs: Report AMD retbleed vulnerability 2022-11-23 07:53:44 +01:00
bcma bcma: Fix memory leak for internally-handled cores 2021-09-22 11:47:55 +02:00
block nbd: Fix hung when signal interrupts nbd_start_device_ioctl() 2022-10-26 13:19:40 +02:00
bluetooth Bluetooth: hci_intel: Add check for platform_driver_register 2022-08-25 11:15:11 +02:00
bus bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe() 2022-08-25 11:15:02 +02:00
cdrom
char random: use expired timer rather than wq for mixing fast pool 2022-10-26 13:19:19 +02:00
clk clk: bcm2835: Make peripheral PLLC critical 2022-10-26 13:19:41 +02:00
clocksource clocksource/drivers/sp804: Avoid error on multiple instances 2022-06-14 16:59:37 +02:00
connector
cpufreq x86/devicetable: Move x86 specific macro out of generic code 2022-11-23 07:53:43 +01:00
cpuidle cpuidle: Fix kobject memory leaks in error paths 2021-11-26 11:36:08 +01:00
crypto crypto: cavium - prevent integer overflow loading firmware 2022-10-26 13:19:35 +02:00
dax
dca
devfreq PM / devfreq: rk3399_dmc: Disable edev on remove() 2022-06-14 16:59:17 +02:00
dio
dma dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup() 2022-10-26 13:19:34 +02:00
dma-buf dma-buf/sync_file: Don't leak fences on merge failure 2021-07-28 11:13:45 +02:00
edac EDAC: Fix calculation of returned address and next offset in edac_align_ptr() 2022-02-23 11:58:40 +01:00
eisa
extcon extcon: Modify extcon device to be created after driver data is set 2022-06-14 16:59:37 +02:00
firewire firewire: core: extend card->lock in fw_core_handle_bus_reset 2022-05-12 12:20:24 +02:00
firmware efi: random: reduce seed size to 32 bytes 2022-11-10 17:46:55 +01:00
fmc
fpga fpga: altera-pr-ip: fix unsigned comparison with less than zero 2022-08-25 11:15:14 +02:00
fsi fsi: core: Check error number after calling ida_simple_get 2022-10-26 13:19:33 +02:00
gnss
gpio gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx 2022-09-28 11:02:51 +02:00
gpu drm/msm: Fix return type of mdp4_lvds_connector_mode_valid 2022-11-03 23:52:30 +09:00
hid HID: saitek: add madcatz variant of MMO7 mouse device ID 2022-11-10 17:46:54 +01:00
hsi HSI: omap_ssi_port: Fix dma_map_sg error check 2022-10-26 13:19:30 +02:00
hv Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region 2022-09-28 11:02:57 +02:00
hwmon hwmon/coretemp: Handle large core ID value 2022-11-03 23:52:24 +09:00
hwspinlock
hwtracing intel_th: pci: Add Meteor Lake-P support 2022-08-25 11:15:30 +02:00
i2c i2c: xiic: Add platform module alias 2022-11-10 17:46:54 +01:00
ide
idle intel_idle: Disable IBRS during long idle 2022-11-23 07:53:45 +01:00
iio iio: light: tsl2583: Fix module unloading 2022-11-03 23:52:28 +09:00
infiniband RDMA/qedr: clean up work queue on failure in qedr_alloc_resources() 2022-11-10 17:46:51 +01:00
input Input: xpad - fix wireless 360 controller breaking after suspend 2022-10-26 13:19:19 +02:00
iommu iommu/vt-d: Clean up si_domain in the init_dmars() error path 2022-11-03 23:52:26 +09:00
ipack ipack: ipoctal: fix module reference leak 2021-10-06 15:31:25 +02:00
irqchip irqchip/tegra: Fix overflow implicit truncation warnings 2022-08-25 11:15:43 +02:00
isdn isdn: mISDN: netjet: fix wrong check of device registration 2022-11-10 17:46:52 +01:00
leds
lightnvm lightnvm: disable the subsystem 2022-05-01 17:00:38 +02:00
macintosh macintosh/adb: fix oob read in do_adb_query() function 2022-08-11 12:48:41 +02:00
mailbox mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg 2022-10-26 13:19:34 +02:00
mcb mcb: fix error handling in mcb_alloc_bus() 2021-10-06 15:31:12 +02:00
md md: Replace snprintf with scnprintf 2022-10-26 13:19:42 +02:00
media media: dvb-frontends/drxk: initialize err to 0 2022-11-10 17:46:54 +01:00
memory memory: of: Fix refcount leak bug in of_get_ddr_timings() 2022-10-26 13:19:28 +02:00
memstick memstick/ms_block: Fix a memory leak 2022-08-25 11:15:16 +02:00
message
mfd mfd: sm501: Add check for platform_driver_register() 2022-10-26 13:19:33 +02:00
misc cxl: Fix a memory leak in an error handling path 2022-08-25 11:15:44 +02:00
mmc mmc: core: Fix kernel panic when remove non-standard SDIO card 2022-11-03 23:52:29 +09:00
mtd mtd: devices: docg3: check the return value of devm_ioremap() in the probe 2022-10-26 13:19:31 +02:00
mux
net wifi: brcmfmac: Fix potential buffer overflow in brcmf_fweh_event_worker() 2022-11-10 17:46:56 +01:00
nfc nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send() 2022-11-10 17:46:51 +01:00
ntb NTB: ntb_tool: uninitialized heap data in tool_fn_write() 2022-08-25 11:15:39 +02:00
nubus
nvdimm nvdimm: Fix badblocks clear off-by-one error 2022-07-07 17:35:09 +02:00
nvme nvme: copy firmware_rev on each init 2022-10-26 13:19:41 +02:00
nvmem nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells 2021-10-20 11:23:02 +02:00
of of: mdio: Add of_node_put() when breaking out of for_each_xx 2022-09-28 11:02:56 +02:00
opp opp: remove WARN when no valid OPPs remain 2021-09-03 09:58:01 +02:00
oprofile
parisc parisc: Export iosapic_serial_irq() symbol for serial port driver 2022-11-10 17:46:55 +01:00
parport parport: remove non-zero check on count 2021-09-22 11:48:08 +02:00
pci PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge 2022-10-26 13:19:22 +02:00
pcmcia pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards 2022-06-14 16:59:31 +02:00
perf perf/arm_pmu_platform: fix tests for platform_get_irq() failure 2022-09-20 12:26:48 +02:00
phy phy: qualcomm: call clk_disable_unprepare in the error handling 2022-10-26 13:19:33 +02:00
pinctrl pinctrl: amd: Don't save/restore interrupt status and wake status bits 2022-09-05 10:26:28 +02:00
platform platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading 2022-10-26 13:19:39 +02:00
pnp
power power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type() 2022-10-26 13:19:40 +02:00
powercap powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue 2022-10-26 13:19:36 +02:00
pps
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-15 14:15:00 +02:00
pwm pwm: lp3943: Fix duty calculation in case period was clamped 2022-06-14 16:59:31 +02:00
rapidio
ras
regulator regulator: qcom_rpm: Fix circular deferral regression 2022-10-26 13:19:21 +02:00
remoteproc remoteproc: qcom: wcnss: Fix handling of IRQs 2022-08-25 11:15:21 +02:00
reset reset: tegra-bpmp: Restore Handle errors in BPMP response 2022-04-27 13:39:43 +02:00
rpmsg rpmsg: qcom: glink: replace strncpy() with strscpy_pad() 2022-10-26 13:19:17 +02:00
rtc rtc: mt6397: check return value after calling platform_get_resource() 2022-06-14 16:59:32 +02:00
s390 s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup 2022-09-28 11:02:57 +02:00
sbus
scsi scsi: 3w-9xxx: Avoid disabling device if failing to enable it 2022-10-26 13:19:40 +02:00
sfi
sh maple: fix wrong return value of maple_bus_init(). 2021-11-26 11:36:21 +01:00
siox
slimbus slimbus: qcom: Fix IRQ check in qcom_slim_probe 2022-05-18 09:42:49 +02:00
sn
soc soc: qcom: smem_state: Add refcounting for the 'state->of_node' 2022-10-26 13:19:28 +02:00
soundwire soundwire: bus_type: fix remove and shutdown support 2022-08-25 11:15:15 +02:00
spi spi: s3c64xx: Fix large transfers with DMA 2022-10-26 13:19:26 +02:00
spmi spmi: pmic-arb: correct duplicate APID to PPID mapping logic 2022-10-26 13:19:34 +02:00
ssb
staging staging: vt6655: fix potential memory leak 2022-10-26 13:19:40 +02:00
target scsi: target: tcmu: Fix possible page UAF 2022-04-20 09:12:49 +02:00
tc
tee tee: add overflow check in register_shm_helper() 2022-08-25 11:15:48 +02:00
thermal thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-26 13:19:42 +02:00
thunderbolt thunderbolt: Use the actual buffer in tb_async_error() 2022-09-15 12:17:03 +02:00
tty parisc: Make 8250_gsc driver dependend on CONFIG_PARISC 2022-11-10 17:46:55 +01:00
uio
usb xhci: Remove device endpoints from bandwidth list when freeing the device 2022-11-03 23:52:28 +09:00
uwb
vfio vfio: Clear the caps->buf to NULL after free 2022-08-25 11:15:45 +02:00
vhost vhost/vsock: Use kvmalloc/kvfree for larger packets. 2022-10-26 13:19:26 +02:00
video fbdev: smscufx: Fix several use-after-free bugs 2022-11-03 23:52:28 +09:00
virt vboxguest: Do not use devm for irq 2022-08-25 11:15:43 +02:00
virtio virtio_mmio: Restore guest page size on resume 2022-07-21 21:09:30 +02:00
visorbus
vlynq
vme
w1 w1: w1_therm: fixes w1_seq for ds28ea00 sensors 2022-04-15 14:15:03 +02:00
watchdog ar7: fix kernel builds for compiler test 2021-11-26 11:36:15 +01:00
xen xen/gntdev: Prevent leaking grants 2022-11-03 23:52:29 +09:00
zorro
Kconfig
Makefile