2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00
linux-next/drivers
Chen Yu cdc1719cd8 cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver
There is a corner case that if the intel_pstate driver fails to be
registered (might be due to invalid MSR access) and acpi_cpufreq
takse over, the intel_pstate sysfs interface is still populated
which may confuse user space (turbostat for example):

grep . /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
acpi-cpufreq

grep . /sys/devices/system/cpu/intel_pstate/*
/sys/devices/system/cpu/intel_pstate/max_perf_pct:0
/sys/devices/system/cpu/intel_pstate/min_perf_pct:0
grep: /sys/devices/system/cpu/intel_pstate/no_turbo: Resource temporarily unavailable
grep: /sys/devices/system/cpu/intel_pstate/num_pstates: Resource temporarily unavailable
/sys/devices/system/cpu/intel_pstate/status:off
grep: /sys/devices/system/cpu/intel_pstate/turbo_pct: Resource temporarily unavailable

The mere presence of the intel_pstate sysfs interface does not mean
that intel_pstate is in use (for example, echo "off" to "status"),
but it should not be created in the failing case.

Fix this issue by deleting the intel_pstate sysfs if the driver
registration fails.

Reported-by: Wendy Wang <wendy.wang@intel.com>
Suggested-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com
[ rjw: Refactor code to avoid jumps, change function name, changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-10-16 16:33:12 +02:00
..
accessibility Char/Misc driver fixes for 5.9-rc3 2020-08-26 10:50:50 -07:00
acpi Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
amba
android drivers: android: Fix the SPDX comment style 2020-07-29 17:05:44 +02:00
ata ata: ahci: mvebu: Make SATA PHY optional for Armada 3720 2020-10-09 12:47:56 -06:00
atm atm: eni: fix the missed pci_disable_device() for eni_init_one() 2020-09-04 21:42:57 -07:00
auxdisplay A trivial patch for auxdisplay: 2020-09-05 14:22:46 -07:00
base Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
bcma bcma: gpio: Use irqchip template 2020-08-02 18:26:51 +03:00
block drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2020-07-31 15:11:52 -07:00
bus arch, drivers: replace for_each_membock() with for_each_mem_range() 2020-10-13 18:38:35 -07:00
cdrom gdrom: use bdev_check_media_change 2020-09-10 09:32:31 -06:00
char block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
clk clk: socfpga: stratix10: fix the divider for the emac_ptp_free_clk 2020-09-22 12:54:41 -07:00
clocksource hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
connector
counter counter: microchip-tcb-capture: check the correct variable 2020-08-22 11:38:42 +01:00
cpufreq cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver 2020-10-16 16:33:12 +02:00
cpuidle Merge back cpuidle material for 5.10. 2020-09-28 16:31:25 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-10-13 08:50:16 -07:00
dax device-dax: add a range mapping allocation attribute 2020-10-13 18:38:29 -07:00
dca
devfreq PM / devfreq: tegra30: Improve initial hardware resetting 2020-09-29 17:50:10 +09:00
dio
dma dmaengine: dmatest: Prevent to run on misconfigured channel 2020-09-22 20:18:05 +05:30
dma-buf dmabuf: fix NULL pointer dereference in dma_buf_release() 2020-09-21 11:17:06 +02:00
edac EFI changes for v5.10: 2020-10-12 13:26:49 -07:00
eisa
extcon
firewire treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
firmware Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
fpga Linux 5.8-rc7 2020-07-27 11:49:37 +02:00
fsi
gnss
gpio GPIO bulk changes for the v5.10 kernel cycle: 2020-10-13 10:09:33 -07:00
gpu objtool changes for v5.10: 2020-10-14 10:13:37 -07:00
greybus greybus: Use fallthrough pseudo-keyword 2020-07-29 16:58:08 +02:00
hid hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
hsi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hv hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
hwmon hwmon: (pmbus/max20730) adjust the vout reading given voltage divider 2020-10-06 14:54:55 -07:00
hwspinlock hwspinlock: qcom: Allow mmio usage in addition to syscon 2020-07-13 22:29:28 -07:00
hwtracing treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
i2c i2c: owl: Clear NACK and BUS error bits 2020-10-10 13:15:46 +02:00
i3c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ide block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
idle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
iio iio: adc: qcom-spmi-adc5: fix driver name 2020-09-22 13:33:19 +01:00
infiniband block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
input hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
interconnect interconnect: qcom: Fix small BW votes being truncated to zero 2020-09-04 00:07:12 +03:00
iommu Surgery of the MSI interrupt handling to prepare the support of upcoming 2020-10-12 11:40:41 -07:00
ipack
irqchip memblock: implement for_each_reserved_mem_region() using __next_mem_region() 2020-10-13 18:38:35 -07:00
isdn treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
leds LEDs changes for 5.9-rc1. 2020-08-05 19:24:27 -07:00
lightnvm treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
macintosh treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mailbox iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
mcb
md drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
media media: dvb-frontends/drxk_hard.c: fix uninitialized variable warning 2020-10-08 14:15:14 +02:00
memory PM / devfreq: event: Change prototype of devfreq_event_get_edev_by_phandle function 2020-09-29 17:50:10 +09:00
memstick Merge branch 'fixes' into next 2020-09-28 12:17:36 +02:00
message treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mfd - Bug Fixes 2020-08-28 10:15:33 -07:00
misc Initial support for sharing virtual addresses between the CPU and 2020-10-12 10:40:34 -07:00
mmc block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
most drivers: most: add USB adapter driver 2020-07-31 14:38:12 +02:00
mtd block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
mux treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
net hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
ntb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nubus
nvdimm mm/memremap_pages: support multiple ranges per invocation 2020-10-13 18:38:28 -07:00
nvme drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
nvmem nvmem: qcom-spmi-sdam: Enable multiple devices 2020-07-29 17:12:09 +02:00
of of: address: Work around missing device_type property in pcie nodes 2020-08-19 16:30:57 -06:00
opp Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-10-06 12:26:45 +02:00
oprofile module: Fix up module_notifier return values 2020-09-01 09:58:03 +02:00
parisc Merge branch 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-08-12 12:41:15 -07:00
parport treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pci Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
pcmcia treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
perf perf: arm-cmn: Fix conversion specifiers for node type 2020-10-01 22:30:07 +01:00
phy phy: Second round of fixes for 5.9 2020-09-29 17:21:54 +02:00
pinctrl GPIO bulk changes for the v5.10 kernel cycle: 2020-10-13 10:09:33 -07:00
platform platform-drivers-x86 for v5.10-1 2020-10-14 10:43:24 -07:00
pnp
power Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
powercap powercap: include header to fix -Wmissing-prototypes 2020-09-25 16:46:01 +02:00
pps
ps3 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ptp ptp: ptp_clockmatrix: use i2c_master_send for i2c write 2020-08-19 16:23:22 -07:00
pwm pwm: Changes for v5.9-rc1 2020-08-14 16:00:09 -07:00
rapidio rapidio: Replace 'select' DMAENGINES 'with depends on' 2020-09-05 19:52:54 +03:00
ras RAS/CEC: Convert to DEFINE_SHOW_ATTRIBUTE() 2020-09-25 19:05:31 +02:00
regulator Merge remote-tracking branch 'regulator/for-5.10' into regulator-next 2020-10-05 16:54:56 +01:00
remoteproc remoteproc: scp: add COMPILE_TEST dependency 2020-09-26 09:40:05 +02:00
reset treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rpmsg treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rtc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
s390 block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
sbus
scsi hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
sfi
sh iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
siox
slimbus
soc Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
soundwire soundwire: fix double free of dangling pointer 2020-09-03 14:10:19 +05:30
spi spi: Fix for v5.9 2020-10-09 18:05:12 -07:00
spmi
ssb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
staging media updates for v5.10-rc1 2020-10-13 09:37:02 -07:00
target block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
tc
tee Enable multi-stage OP-TEE bus enumeration 2020-07-13 15:11:44 +02:00
thermal - Fix bogus thermal shutdowns for omap4430 where bogus values 2020-09-04 12:49:03 -07:00
thunderbolt thunderbolt: Fix for v5.9-rc6 2020-09-15 13:52:14 +02:00
tty serial: 8250_pci: Add Realtek 816a and 816b 2020-09-16 13:23:33 +02:00
uio
usb usbcore/driver: Accommodate usbip 2020-09-25 16:53:02 +02:00
vdpa vdpa/mlx5: Fix dependency on MLX5_CORE 2020-10-08 16:02:00 -04:00
vfio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vhost vhost-vdpa: fix page pinning leakage in error path 2020-10-04 03:47:02 -04:00
video drm-misc-fixes for v5.9: 2020-10-06 12:38:28 +10:00
virt
virtio virtio-mem: don't special-case ZONE_MOVABLE 2020-10-13 18:38:33 -07:00
visorbus
vlynq
vme
w1
watchdog treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen xen: branch for v5.10-rc1 2020-10-14 10:34:45 -07:00
zorro zorro: Fix address space collision message with RAM expansion boards 2020-08-26 13:26:52 +02:00
Kconfig
Makefile