Skip to content

Commit 4658fe8

Browse files
zhang-ruirafaeljw
authored andcommitted
powercap: RAPL: Fix CONFIG_IOSF_MBI dependency
After commit 3382388 ("intel_rapl: abstract RAPL common code"), accessing to IOSF_MBI interface is done in the RAPL common code. Thus it is the CONFIG_INTEL_RAPL_CORE that has dependency of CONFIG_IOSF_MBI, while CONFIG_INTEL_RAPL_MSR does not. This problem was not exposed previously because all the previous RAPL common code users, aka, the RAPL MSR and MMIO I/F drivers, have CONFIG_IOSF_MBI selected. Fix the CONFIG_IOSF_MBI dependency in RAPL code. This also fixes a build time failure when the RAPL TPMI I/F driver is introduced without selecting CONFIG_IOSF_MBI. x86_64-linux-ld: vmlinux.o: in function `set_floor_freq_atom': intel_rapl_common.c:(.text+0x2dac9b8): undefined reference to `iosf_mbi_write' x86_64-linux-ld: intel_rapl_common.c:(.text+0x2daca66): undefined reference to `iosf_mbi_read' Reference to iosf_mbi.h is also removed from the RAPL MSR I/F driver. Fixes: 3382388 ("intel_rapl: abstract RAPL common code") Reported-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Zhang Rui <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent d05b5e0 commit 4658fe8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/powercap/Kconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ if POWERCAP
1818
# Client driver configurations go here.
1919
config INTEL_RAPL_CORE
2020
tristate
21+
depends on PCI
22+
select IOSF_MBI
2123

2224
config INTEL_RAPL
2325
tristate "Intel RAPL Support via MSR Interface"
24-
depends on X86 && IOSF_MBI
26+
depends on X86 && PCI
2527
select INTEL_RAPL_CORE
2628
help
2729
This enables support for the Intel Running Average Power Limit (RAPL)

drivers/powercap/intel_rapl_msr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <linux/processor.h>
2323
#include <linux/platform_device.h>
2424

25-
#include <asm/iosf_mbi.h>
2625
#include <asm/cpu_device_id.h>
2726
#include <asm/intel-family.h>
2827

0 commit comments

Comments
 (0)