Skip to contentSkip to conversation

thermal/drivers/int340x: limit Kconfig to 64-bit

PATCH Applied Arnd Bergmann 4 participants 4 messages Nov 8, 2021 – Nov 16, 2021 Thermal

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal/drivers/int340x: limit Kconfig to 64-bit

From: Arnd Bergmann <[email protected]>

32-bit processors cannot generally access 64-bit MMIO registers atomically, and it is unknown in which order the two halves of this registers would need to be read:

drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c: In function 'send_mbox_cmd':
drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c:79:37: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]

   79 |                         *cmd_resp = readq((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_DATA));
      |                                     ^~~~~
      |                                     readl

The driver already does not build for anything other than x86, so limit it further to x86-64.

Fixes aeb58c860dc5 ("thermal/drivers/int340x: processor_thermal: Suppot 64 bit RFIM responses")
---
 drivers/thermal/intel/int340x_thermal/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/intel/int340x_thermal/Kconfig +2 -2
index 45c31f3d6054..5d046de96a5d 100644
@@ -5,12 +5,12 @@
 
 config INT340X_THERMAL
 	tristate "ACPI INT340X thermal drivers"
-	depends on X86 && ACPI && PCI
+	depends on X86_64 && ACPI && PCI
 	select THERMAL_GOV_USER_SPACE
 	select ACPI_THERMAL_REL
 	select ACPI_FAN
 	select INTEL_SOC_DTS_IOSF_CORE
-	select PROC_THERMAL_MMIO_RAPL if X86_64 && POWERCAP
+	select PROC_THERMAL_MMIO_RAPL if POWERCAP
 	help
 	  Newer laptops and tablets that use ACPI may have thermal sensors and
 	  other devices with thermal control capabilities outside the core
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

32-bit processors cannot generally access 64-bit MMIO registers atomically, and it is unknown in which order the two halves of this registers would need to be read:

drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c: In function 'send_mbox_cmd':
drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c:79:37:
error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
   79 |                         *cmd_resp = readq((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_DATA));
      |                                     ^~~~~
      |                                     readl

Quoted 6 lines

The driver already does not build for anything other than x86, so limit it further to x86-64.

Fixes aeb58c860dc5 ("thermal/drivers/int340x: processor_thermal:

Suppot 64 bit RFIM responses")

Quoted 26 lines

---
 drivers/thermal/intel/int340x_thermal/Kconfig | 4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/intel/int340x_thermal/Kconfig +0 -0
index 45c31f3d6054..5d046de96a5d 100644
@@ -5,12 +5,12 @@


 config INT340X_THERMAL
        tristate "ACPI INT340X thermal drivers"
-       depends on X86 && ACPI && PCI
+       depends on X86_64 && ACPI && PCI
        select THERMAL_GOV_USER_SPACE
        select ACPI_THERMAL_REL
        select ACPI_FAN
        select INTEL_SOC_DTS_IOSF_CORE
-       select PROC_THERMAL_MMIO_RAPL if X86_64 && POWERCAP +       select PROC_THERMAL_MMIO_RAPL if POWERCAP
        help
          Newer laptops and tablets that use ACPI may have thermal sensors and
          other devices with thermal control capabilities outside the core

Reviewed-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 31 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

32-bit processors cannot generally access 64-bit MMIO registers atomically, and it is unknown in which order the two halves of this registers would need to be read:

drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c: In function 'send_mbox_cmd':
drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c:79:37: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]

    79 |                         *cmd_resp = readq((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_DATA));
       |                                     ^~~~~
       |                                     readl

The driver already does not build for anything other than x86, so limit it further to x86-64.

Fixes aeb58c860dc5 ("thermal/drivers/int340x: processor_thermal: Suppot 64 bit RFIM responses")
---
  drivers/thermal/intel/int340x_thermal/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/intel/int340x_thermal/Kconfig +0 -1
index 45c31f3d6054..5d046de96a5d 100644
@@ -5,12 +5,12 @@
 
  config INT340X_THERMAL
  	tristate "ACPI INT340X thermal drivers"
-	depends on X86 && ACPI && PCI

drivers/thermal/intel/int340x_thermal/Kconfig line 16

Quoted 10 lines
drivers/thermal/intel/int340x_thermal/Kconfig +2 -1
+	depends on X86_64 && ACPI && PCI
  	select THERMAL_GOV_USER_SPACE
  	select ACPI_THERMAL_REL
  	select ACPI_FAN
  	select INTEL_SOC_DTS_IOSF_CORE
-	select PROC_THERMAL_MMIO_RAPL if X86_64 && POWERCAP
+	select PROC_THERMAL_MMIO_RAPL if POWERCAP
  	help
  	  Newer laptops and tablets that use ACPI may have thermal sensors and
  	  other devices with thermal control capabilities outside the core

Thanks.

Signature · 1 line
~Randy
maintainer Applied
#3 lore raw
In reply to Arnd Bergmann
Quoted 32 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

32-bit processors cannot generally access 64-bit MMIO registers atomically, and it is unknown in which order the two halves of this registers would need to be read:

drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c: In function 'send_mbox_cmd':
drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c:79:37: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]

   79 |                         *cmd_resp = readq((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_DATA));
      |                                     ^~~~~
      |                                     readl

The driver already does not build for anything other than x86, so limit it further to x86-64.

Fixes aeb58c860dc5 ("thermal/drivers/int340x: processor_thermal: Suppot 64 bit RFIM responses")
---
 drivers/thermal/intel/int340x_thermal/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/intel/int340x_thermal/Kconfig +1 -1
index 45c31f3d6054..5d046de96a5d 100644
@@ -5,12 +5,12 @@
 
 config INT340X_THERMAL
        tristate "ACPI INT340X thermal drivers"
-       depends on X86 && ACPI && PCI
+       depends on X86_64 && ACPI && PCI

drivers/thermal/intel/int340x_thermal/Kconfig

Quoted 10 lines
drivers/thermal/intel/int340x_thermal/Kconfig +1 -2
        select THERMAL_GOV_USER_SPACE
        select ACPI_THERMAL_REL
        select ACPI_FAN
        select INTEL_SOC_DTS_IOSF_CORE
-       select PROC_THERMAL_MMIO_RAPL if X86_64 && POWERCAP
+       select PROC_THERMAL_MMIO_RAPL if POWERCAP
        help
          Newer laptops and tablets that use ACPI may have thermal sensors and
          other devices with thermal control capabilities outside the core
--

Applied as 5.16-rc2 material, thanks!