Skip to contentSkip to conversation

mailbox: qcom-cpucp: fix 64BIT dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Jul 19, 2024 – Jul 25, 2024 Mailbox API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox: qcom-cpucp: fix 64BIT dependency

From: Arnd Bergmann <[email protected]>

This newly added driver fails compile testing on 32-bit architectures because it relies on 64-bit MMIO register access:

drivers/mailbox/qcom-cpucp-mbox.c: In function 'qcom_cpucp_mbox_irq_fn':
drivers/mailbox/qcom-cpucp-mbox.c:54:18: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Wimplicit-function-declaration]

   54 |         status = readq(cpucp->rx_base + APSS_CPUCP_RX_MBOX_STAT);
      |                  ^~~~~
      |                  readb
drivers/mailbox/qcom-cpucp-mbox.c:65:17: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Wimplicit-function-declaration]
   65 |                 writeq(BIT(i), cpucp->rx_base + APSS_CPUCP_RX_MBOX_CLEAR);
      |                 ^~~~~~
      |                 writeb

Change the Kconfig dependency to disallow that configuration as well.

Fixes 0e2a9a03106c ("mailbox: Add support for QTI CPUCP mailbox controller")
---
 drivers/mailbox/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/Kconfig +1 -1
index d1f6c758b5e8..4eed97295927 100644
@@ -278,7 +278,7 @@ config SPRD_MBOX
 
 config QCOM_CPUCP_MBOX
 	tristate "Qualcomm Technologies, Inc. CPUCP mailbox driver"
-	depends on ARCH_QCOM || (COMPILE_TEST && 64BIT)
+	depends on (ARCH_QCOM || COMPILE_TEST) && 64BIT
 	help
 	  Qualcomm Technologies, Inc. CPUSS Control Processor (CPUCP) mailbox
 	  controller driver enables communication between AP and CPUCP. Say
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This newly added driver fails compile testing on 32-bit architectures because it relies on 64-bit MMIO register access:

drivers/mailbox/qcom-cpucp-mbox.c: In function 'qcom_cpucp_mbox_irq_fn':
drivers/mailbox/qcom-cpucp-mbox.c:54:18: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Wimplicit-function-declaration]

   54 |         status = readq(cpucp->rx_base + APSS_CPUCP_RX_MBOX_STAT);
      |                  ^~~~~
      |                  readb
drivers/mailbox/qcom-cpucp-mbox.c:65:17: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Wimplicit-function-declaration]
   65 |                 writeq(BIT(i), cpucp->rx_base + APSS_CPUCP_RX_MBOX_CLEAR);
      |                 ^~~~~~
      |                 writeb
Quoted 5 lines

Change the Kconfig dependency to disallow that configuration as well.

Fixes 0e2a9a03106c ("mailbox: Add support for QTI CPUCP mailbox controller")

---

Thanks

Konrad

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

From: Arnd Bergmann <[email protected]>

This newly added driver fails compile testing on 32-bit architectures because it relies on 64-bit MMIO register access:

drivers/mailbox/qcom-cpucp-mbox.c: In function 'qcom_cpucp_mbox_irq_fn':
drivers/mailbox/qcom-cpucp-mbox.c:54:18: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Wimplicit-function-declaration]

    54 |         status = readq(cpucp->rx_base + APSS_CPUCP_RX_MBOX_STAT);
       |                  ^~~~~
       |                  readb
drivers/mailbox/qcom-cpucp-mbox.c:65:17: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Wimplicit-function-declaration]
    65 |                 writeq(BIT(i), cpucp->rx_base + APSS_CPUCP_RX_MBOX_CLEAR);
       |                 ^~~~~~
       |                 writeb

Change the Kconfig dependency to disallow that configuration as well.

Fixes 0e2a9a03106c ("mailbox: Add support for QTI CPUCP mailbox controller")
---
  drivers/mailbox/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/Kconfig +0 -0
index d1f6c758b5e8..4eed97295927 100644

drivers/mailbox/Kconfig config SPRD_MBOX · line 281

Quoted 5 lines
drivers/mailbox/Kconfig +1 -1
@@ -278,7 +278,7 @@ config SPRD_MBOX
 
  config QCOM_CPUCP_MBOX
  	tristate "Qualcomm Technologies, Inc. CPUCP mailbox driver"
-	depends on ARCH_QCOM || (COMPILE_TEST && 64BIT)
+	depends on (ARCH_QCOM || COMPILE_TEST) && 64BIT

Hey Arnd,

Thanks for the patch. This was first reported by Nathan [1] and I was planning on re-posting the series after the merge window. Thanks again.

[1] https://lore.kernel.org/lkml/20240715031451.GA2940276@thelio-3990X/

Quoted 3 lines
drivers/mailbox/Kconfig +0 -0
  	help
  	  Qualcomm Technologies, Inc. CPUSS Control Processor (CPUCP) mailbox
  	  controller driver enables communication between AP and CPUCP. Say