linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds
@ 2023-06-14 17:36 Rob Herring
  2023-06-14 17:36 ` [PATCH 2/2] ata: octeon: Add compile test support Rob Herring
  2023-06-15  9:11 ` [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds Thomas Bogendoerfer
  0 siblings, 2 replies; 12+ messages in thread
From: Rob Herring @ 2023-06-14 17:36 UTC (permalink / raw)
  To: Damien Le Moal, Sergey Shtylyov, Thomas Bogendoerfer
  Cc: linux-ide, linux-mips, linux-kernel

Test 32-bit builds have an error in cvmx_writeq_csr/cvmx_readq_csr:

arch/mips/include/asm/octeon/cvmx.h:282:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

As the default for allyesconfig/allmodconfig is 32-bit, fixing these
functions for 32-bit is needed to enable Cavium Octeon drivers for
COMPILE_TEST.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 arch/mips/include/asm/octeon/cvmx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
index 72e775bf31e6..2265a92995a8 100644
--- a/arch/mips/include/asm/octeon/cvmx.h
+++ b/arch/mips/include/asm/octeon/cvmx.h
@@ -279,7 +279,7 @@ static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val)
 
 static inline void cvmx_writeq_csr(void __iomem *csr_addr, uint64_t val)
 {
-	cvmx_write_csr((__force uint64_t)csr_addr, val);
+	cvmx_write_csr((__force uintptr_t)csr_addr, val);
 }
 
 static inline void cvmx_write_io(uint64_t io_addr, uint64_t val)
@@ -296,7 +296,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr)
 
 static inline uint64_t cvmx_readq_csr(void __iomem *csr_addr)
 {
-	return cvmx_read_csr((__force uint64_t) csr_addr);
+	return cvmx_read_csr((__force uintptr_t) csr_addr);
 }
 
 static inline void cvmx_send_single(uint64_t data)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-14 17:36 [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds Rob Herring
@ 2023-06-14 17:36 ` Rob Herring
  2023-06-15  0:45   ` Damien Le Moal
                     ` (2 more replies)
  2023-06-15  9:11 ` [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds Thomas Bogendoerfer
  1 sibling, 3 replies; 12+ messages in thread
From: Rob Herring @ 2023-06-14 17:36 UTC (permalink / raw)
  To: Damien Le Moal, Sergey Shtylyov, Thomas Bogendoerfer
  Cc: linux-ide, linux-mips, linux-kernel

Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
so other arches can't be enabled.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Tested on allmodconfig build. Not sure if there's other MIPS configs 
where this doesn't work. We'll see what 0-day says.

 drivers/ata/Kconfig          | 4 ++--
 drivers/ata/pata_octeon_cf.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 42b51c9812a0..4572f837e504 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -239,7 +239,7 @@ config AHCI_MVEBU
 
 config AHCI_OCTEON
 	tristate "Cavium Octeon Soc Serial ATA"
-	depends on SATA_AHCI_PLATFORM && CAVIUM_OCTEON_SOC
+	depends on SATA_AHCI_PLATFORM && MIPS && (CAVIUM_OCTEON_SOC || COMPILE_TEST)
 	default y
 	help
 	  This option enables support for Cavium Octeon SoC Serial ATA.
@@ -373,7 +373,7 @@ config PDC_ADMA
 
 config PATA_OCTEON_CF
 	tristate "OCTEON Boot Bus Compact Flash support"
-	depends on CAVIUM_OCTEON_SOC
+	depends on MIPS && (CAVIUM_OCTEON_SOC || COMPILE_TEST)
 	select PATA_TIMINGS
 	help
 	  This option enables a polled compact flash driver for use with
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 57b2166a6d5d..cc9e4b63ded9 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -853,8 +853,8 @@ static int octeon_cf_probe(struct platform_device *pdev)
 					of_node_put(dma_node);
 					return -EINVAL;
 				}
-				cf_port->dma_base = (u64)devm_ioremap(&pdev->dev, res_dma->start,
-									 resource_size(res_dma));
+				cf_port->dma_base = (uintptr_t)devm_ioremap(&pdev->dev, res_dma->start,
+									    resource_size(res_dma));
 				if (!cf_port->dma_base) {
 					put_device(&dma_dev->dev);
 					of_node_put(dma_node);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-14 17:36 ` [PATCH 2/2] ata: octeon: Add compile test support Rob Herring
@ 2023-06-15  0:45   ` Damien Le Moal
  2023-06-16  2:08   ` Damien Le Moal
  2023-06-21 16:51   ` Guenter Roeck
  2 siblings, 0 replies; 12+ messages in thread
From: Damien Le Moal @ 2023-06-15  0:45 UTC (permalink / raw)
  To: Rob Herring, Sergey Shtylyov, Thomas Bogendoerfer
  Cc: linux-ide, linux-mips, linux-kernel

On 6/15/23 02:36, Rob Herring wrote:
> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
> so other arches can't be enabled.

Yes, I tried... That is unfortunate.

Looks good to me though. If I get an Ack for patch 1, I can queue this up
through the ata tree.

> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Tested on allmodconfig build. Not sure if there's other MIPS configs 
> where this doesn't work. We'll see what 0-day says.
> 
>  drivers/ata/Kconfig          | 4 ++--
>  drivers/ata/pata_octeon_cf.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index 42b51c9812a0..4572f837e504 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -239,7 +239,7 @@ config AHCI_MVEBU
>  
>  config AHCI_OCTEON
>  	tristate "Cavium Octeon Soc Serial ATA"
> -	depends on SATA_AHCI_PLATFORM && CAVIUM_OCTEON_SOC
> +	depends on SATA_AHCI_PLATFORM && MIPS && (CAVIUM_OCTEON_SOC || COMPILE_TEST)
>  	default y
>  	help
>  	  This option enables support for Cavium Octeon SoC Serial ATA.
> @@ -373,7 +373,7 @@ config PDC_ADMA
>  
>  config PATA_OCTEON_CF
>  	tristate "OCTEON Boot Bus Compact Flash support"
> -	depends on CAVIUM_OCTEON_SOC
> +	depends on MIPS && (CAVIUM_OCTEON_SOC || COMPILE_TEST)
>  	select PATA_TIMINGS
>  	help
>  	  This option enables a polled compact flash driver for use with
> diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
> index 57b2166a6d5d..cc9e4b63ded9 100644
> --- a/drivers/ata/pata_octeon_cf.c
> +++ b/drivers/ata/pata_octeon_cf.c
> @@ -853,8 +853,8 @@ static int octeon_cf_probe(struct platform_device *pdev)
>  					of_node_put(dma_node);
>  					return -EINVAL;
>  				}
> -				cf_port->dma_base = (u64)devm_ioremap(&pdev->dev, res_dma->start,
> -									 resource_size(res_dma));
> +				cf_port->dma_base = (uintptr_t)devm_ioremap(&pdev->dev, res_dma->start,
> +									    resource_size(res_dma));
>  				if (!cf_port->dma_base) {
>  					put_device(&dma_dev->dev);
>  					of_node_put(dma_node);

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds
  2023-06-14 17:36 [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds Rob Herring
  2023-06-14 17:36 ` [PATCH 2/2] ata: octeon: Add compile test support Rob Herring
@ 2023-06-15  9:11 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Bogendoerfer @ 2023-06-15  9:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: Damien Le Moal, Sergey Shtylyov, linux-ide, linux-mips, linux-kernel

On Wed, Jun 14, 2023 at 11:36:31AM -0600, Rob Herring wrote:
> Test 32-bit builds have an error in cvmx_writeq_csr/cvmx_readq_csr:
> 
> arch/mips/include/asm/octeon/cvmx.h:282:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> 
> As the default for allyesconfig/allmodconfig is 32-bit, fixing these
> functions for 32-bit is needed to enable Cavium Octeon drivers for
> COMPILE_TEST.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  arch/mips/include/asm/octeon/cvmx.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
> index 72e775bf31e6..2265a92995a8 100644
> --- a/arch/mips/include/asm/octeon/cvmx.h
> +++ b/arch/mips/include/asm/octeon/cvmx.h
> @@ -279,7 +279,7 @@ static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val)
>  
>  static inline void cvmx_writeq_csr(void __iomem *csr_addr, uint64_t val)
>  {
> -	cvmx_write_csr((__force uint64_t)csr_addr, val);
> +	cvmx_write_csr((__force uintptr_t)csr_addr, val);
>  }
>  
>  static inline void cvmx_write_io(uint64_t io_addr, uint64_t val)
> @@ -296,7 +296,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr)
>  
>  static inline uint64_t cvmx_readq_csr(void __iomem *csr_addr)
>  {
> -	return cvmx_read_csr((__force uint64_t) csr_addr);
> +	return cvmx_read_csr((__force uintptr_t) csr_addr);
>  }
>  
>  static inline void cvmx_send_single(uint64_t data)
> -- 
> 2.39.2

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-14 17:36 ` [PATCH 2/2] ata: octeon: Add compile test support Rob Herring
  2023-06-15  0:45   ` Damien Le Moal
@ 2023-06-16  2:08   ` Damien Le Moal
  2023-06-21 16:51   ` Guenter Roeck
  2 siblings, 0 replies; 12+ messages in thread
From: Damien Le Moal @ 2023-06-16  2:08 UTC (permalink / raw)
  To: Rob Herring, Sergey Shtylyov, Thomas Bogendoerfer
  Cc: linux-ide, linux-mips, linux-kernel

On 6/15/23 02:36, Rob Herring wrote:
> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
> so other arches can't be enabled.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Applied this and 1/2 to for-6.5. Thanks !

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-14 17:36 ` [PATCH 2/2] ata: octeon: Add compile test support Rob Herring
  2023-06-15  0:45   ` Damien Le Moal
  2023-06-16  2:08   ` Damien Le Moal
@ 2023-06-21 16:51   ` Guenter Roeck
  2023-06-22  0:57     ` Damien Le Moal
  2 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2023-06-21 16:51 UTC (permalink / raw)
  To: Rob Herring
  Cc: Damien Le Moal, Sergey Shtylyov, Thomas Bogendoerfer, linux-ide,
	linux-mips, linux-kernel

On Wed, Jun 14, 2023 at 11:36:33AM -0600, Rob Herring wrote:
> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
> so other arches can't be enabled.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Tested on allmodconfig build. Not sure if there's other MIPS configs 
> where this doesn't work. We'll see what 0-day says.

Odd, in next-20230621 I get:

Building mips:allmodconfig ... failed
--------------
Error log:
ERROR: modpost: "__udivdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
ERROR: modpost: "octeon_get_io_clock_rate" [drivers/ata/pata_octeon_cf.ko] undefined!
ERROR: modpost: "__tracepoint_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
ERROR: modpost: "__traceiter_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
ERROR: modpost: "__divdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
make[2]: [scripts/Makefile.modpost:144: Module.symvers] Error 1 (ignored)
make[2]: *** No rule to make target 'kernel/locking/locktorture.ko', needed by '__modfinal'.  Stop.
make[1]: [Makefile:1933: modules] Error 2 (ignored)

Guenter

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-21 16:51   ` Guenter Roeck
@ 2023-06-22  0:57     ` Damien Le Moal
  2023-06-22  3:01       ` Guenter Roeck
  0 siblings, 1 reply; 12+ messages in thread
From: Damien Le Moal @ 2023-06-22  0:57 UTC (permalink / raw)
  To: Guenter Roeck, Rob Herring
  Cc: Sergey Shtylyov, Thomas Bogendoerfer, linux-ide, linux-mips,
	linux-kernel

On 6/22/23 01:51, Guenter Roeck wrote:
> On Wed, Jun 14, 2023 at 11:36:33AM -0600, Rob Herring wrote:
>> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
>> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
>> so other arches can't be enabled.
>>
>> Signed-off-by: Rob Herring <robh@kernel.org>
>> ---
>> Tested on allmodconfig build. Not sure if there's other MIPS configs 
>> where this doesn't work. We'll see what 0-day says.
> 
> Odd, in next-20230621 I get:
> 
> Building mips:allmodconfig ... failed

Indeed odd. Given that this is an allmodconfig, I would assume that
CONFIG_CAVIUM_OCTEON_SOC is set ?

> --------------
> Error log:
> ERROR: modpost: "__udivdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
> ERROR: modpost: "octeon_get_io_clock_rate" [drivers/ata/pata_octeon_cf.ko] undefined!
> ERROR: modpost: "__tracepoint_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
> ERROR: modpost: "__traceiter_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
> ERROR: modpost: "__divdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
> make[2]: [scripts/Makefile.modpost:144: Module.symvers] Error 1 (ignored)
> make[2]: *** No rule to make target 'kernel/locking/locktorture.ko', needed by '__modfinal'.  Stop.
> make[1]: [Makefile:1933: modules] Error 2 (ignored)
> 
> Guenter

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-22  0:57     ` Damien Le Moal
@ 2023-06-22  3:01       ` Guenter Roeck
  2023-06-22  4:26         ` Damien Le Moal
  0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2023-06-22  3:01 UTC (permalink / raw)
  To: Damien Le Moal, Rob Herring
  Cc: Sergey Shtylyov, Thomas Bogendoerfer, linux-ide, linux-mips,
	linux-kernel

On 6/21/23 17:57, Damien Le Moal wrote:
> On 6/22/23 01:51, Guenter Roeck wrote:
>> On Wed, Jun 14, 2023 at 11:36:33AM -0600, Rob Herring wrote:
>>> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
>>> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
>>> so other arches can't be enabled.
>>>
>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> ---
>>> Tested on allmodconfig build. Not sure if there's other MIPS configs
>>> where this doesn't work. We'll see what 0-day says.
>>
>> Odd, in next-20230621 I get:
>>
>> Building mips:allmodconfig ... failed
> 
> Indeed odd. Given that this is an allmodconfig, I would assume that
> CONFIG_CAVIUM_OCTEON_SOC is set ?
> 

No, it is not. CONFIG_CAVIUM_OCTEON_SOC is a choice option,
meaning only one of the choices can be set, and mips:allmodconfig
selects a different choice.

Guenter

>> --------------
>> Error log:
>> ERROR: modpost: "__udivdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
>> ERROR: modpost: "octeon_get_io_clock_rate" [drivers/ata/pata_octeon_cf.ko] undefined!
>> ERROR: modpost: "__tracepoint_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
>> ERROR: modpost: "__traceiter_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
>> ERROR: modpost: "__divdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
>> make[2]: [scripts/Makefile.modpost:144: Module.symvers] Error 1 (ignored)
>> make[2]: *** No rule to make target 'kernel/locking/locktorture.ko', needed by '__modfinal'.  Stop.
>> make[1]: [Makefile:1933: modules] Error 2 (ignored)
>>
>> Guenter
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-22  3:01       ` Guenter Roeck
@ 2023-06-22  4:26         ` Damien Le Moal
  2023-06-22  5:10           ` Guenter Roeck
  2023-06-22 13:41           ` Rob Herring
  0 siblings, 2 replies; 12+ messages in thread
From: Damien Le Moal @ 2023-06-22  4:26 UTC (permalink / raw)
  To: Guenter Roeck, Rob Herring
  Cc: Sergey Shtylyov, Thomas Bogendoerfer, linux-ide, linux-mips,
	linux-kernel

On 6/22/23 12:01, Guenter Roeck wrote:
> On 6/21/23 17:57, Damien Le Moal wrote:
>> On 6/22/23 01:51, Guenter Roeck wrote:
>>> On Wed, Jun 14, 2023 at 11:36:33AM -0600, Rob Herring wrote:
>>>> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
>>>> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
>>>> so other arches can't be enabled.
>>>>
>>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>>> ---
>>>> Tested on allmodconfig build. Not sure if there's other MIPS configs
>>>> where this doesn't work. We'll see what 0-day says.
>>>
>>> Odd, in next-20230621 I get:
>>>
>>> Building mips:allmodconfig ... failed
>>
>> Indeed odd. Given that this is an allmodconfig, I would assume that
>> CONFIG_CAVIUM_OCTEON_SOC is set ?
>>
> 
> No, it is not. CONFIG_CAVIUM_OCTEON_SOC is a choice option,
> meaning only one of the choices can be set, and mips:allmodconfig
> selects a different choice.

OK. Then I think I need to drop this patch as I do not see how to allow
COMPILE_TEST without CONFIG_CAVIUM_OCTEON_SOC being set.

Rob ?

> 
> Guenter
> 
>>> --------------
>>> Error log:
>>> ERROR: modpost: "__udivdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
>>> ERROR: modpost: "octeon_get_io_clock_rate" [drivers/ata/pata_octeon_cf.ko] undefined!
>>> ERROR: modpost: "__tracepoint_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
>>> ERROR: modpost: "__traceiter_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
>>> ERROR: modpost: "__divdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
>>> make[2]: [scripts/Makefile.modpost:144: Module.symvers] Error 1 (ignored)
>>> make[2]: *** No rule to make target 'kernel/locking/locktorture.ko', needed by '__modfinal'.  Stop.
>>> make[1]: [Makefile:1933: modules] Error 2 (ignored)
>>>
>>> Guenter
>>
> 

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-22  4:26         ` Damien Le Moal
@ 2023-06-22  5:10           ` Guenter Roeck
  2023-06-22 13:41           ` Rob Herring
  1 sibling, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2023-06-22  5:10 UTC (permalink / raw)
  To: Damien Le Moal, Rob Herring
  Cc: Sergey Shtylyov, Thomas Bogendoerfer, linux-ide, linux-mips,
	linux-kernel

On 6/21/23 21:26, Damien Le Moal wrote:
> On 6/22/23 12:01, Guenter Roeck wrote:
>> On 6/21/23 17:57, Damien Le Moal wrote:
>>> On 6/22/23 01:51, Guenter Roeck wrote:
>>>> On Wed, Jun 14, 2023 at 11:36:33AM -0600, Rob Herring wrote:
>>>>> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
>>>>> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
>>>>> so other arches can't be enabled.
>>>>>
>>>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>>>> ---
>>>>> Tested on allmodconfig build. Not sure if there's other MIPS configs
>>>>> where this doesn't work. We'll see what 0-day says.
>>>>
>>>> Odd, in next-20230621 I get:
>>>>
>>>> Building mips:allmodconfig ... failed
>>>
>>> Indeed odd. Given that this is an allmodconfig, I would assume that
>>> CONFIG_CAVIUM_OCTEON_SOC is set ?
>>>
>>
>> No, it is not. CONFIG_CAVIUM_OCTEON_SOC is a choice option,
>> meaning only one of the choices can be set, and mips:allmodconfig
>> selects a different choice.
> 
> OK. Then I think I need to drop this patch as I do not see how to allow
> COMPILE_TEST without CONFIG_CAVIUM_OCTEON_SOC being set.
> 

That is a contradiction anyway. COMPILE_TEST implies that the target is
independent of any other compile flags. If it depends on CONFIG_CAVIUM_OCTEON_SOC,
overriding that with COMPILE_TEST does not make sense.

Guenter

> Rob ?
> 
>>
>> Guenter
>>
>>>> --------------
>>>> Error log:
>>>> ERROR: modpost: "__udivdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
>>>> ERROR: modpost: "octeon_get_io_clock_rate" [drivers/ata/pata_octeon_cf.ko] undefined!
>>>> ERROR: modpost: "__tracepoint_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
>>>> ERROR: modpost: "__traceiter_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
>>>> ERROR: modpost: "__divdi3" [drivers/ata/pata_octeon_cf.ko] undefined!
>>>> make[2]: [scripts/Makefile.modpost:144: Module.symvers] Error 1 (ignored)
>>>> make[2]: *** No rule to make target 'kernel/locking/locktorture.ko', needed by '__modfinal'.  Stop.
>>>> make[1]: [Makefile:1933: modules] Error 2 (ignored)
>>>>
>>>> Guenter
>>>
>>
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-22  4:26         ` Damien Le Moal
  2023-06-22  5:10           ` Guenter Roeck
@ 2023-06-22 13:41           ` Rob Herring
  2023-06-22 21:52             ` Damien Le Moal
  1 sibling, 1 reply; 12+ messages in thread
From: Rob Herring @ 2023-06-22 13:41 UTC (permalink / raw)
  To: Damien Le Moal
  Cc: Guenter Roeck, Sergey Shtylyov, Thomas Bogendoerfer, linux-ide,
	linux-mips, linux-kernel

On Wed, Jun 21, 2023 at 10:26 PM Damien Le Moal <dlemoal@kernel.org> wrote:
>
> On 6/22/23 12:01, Guenter Roeck wrote:
> > On 6/21/23 17:57, Damien Le Moal wrote:
> >> On 6/22/23 01:51, Guenter Roeck wrote:
> >>> On Wed, Jun 14, 2023 at 11:36:33AM -0600, Rob Herring wrote:
> >>>> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
> >>>> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
> >>>> so other arches can't be enabled.
> >>>>
> >>>> Signed-off-by: Rob Herring <robh@kernel.org>
> >>>> ---
> >>>> Tested on allmodconfig build. Not sure if there's other MIPS configs
> >>>> where this doesn't work. We'll see what 0-day says.
> >>>
> >>> Odd, in next-20230621 I get:
> >>>
> >>> Building mips:allmodconfig ... failed
> >>
> >> Indeed odd. Given that this is an allmodconfig, I would assume that
> >> CONFIG_CAVIUM_OCTEON_SOC is set ?
> >>
> >
> > No, it is not. CONFIG_CAVIUM_OCTEON_SOC is a choice option,
> > meaning only one of the choices can be set, and mips:allmodconfig
> > selects a different choice.
>
> OK. Then I think I need to drop this patch as I do not see how to allow
> COMPILE_TEST without CONFIG_CAVIUM_OCTEON_SOC being set.
>
> Rob ?

These could be fixed, but not sure it's worth the effort.

> >
> > Guenter
> >
> >>> --------------
> >>> Error log:
> >>> ERROR: modpost: "__udivdi3" [drivers/ata/pata_octeon_cf.ko] undefined!

This is due to 64-bit divides on 32-bit build, so do_div() needs to be used.

> >>> ERROR: modpost: "octeon_get_io_clock_rate" [drivers/ata/pata_octeon_cf.ko] undefined!

We'd need a static inline in the header for octeon_get_io_clock_rate().

Of course the real fix is Octeon needs to move to use the clock framework.

> >>> ERROR: modpost: "__tracepoint_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!
> >>> ERROR: modpost: "__traceiter_ata_bmdma_stop" [drivers/ata/pata_octeon_cf.ko] undefined!

Probably can just drop the trace_ata_bmdma_stop() call. It was added
to replace a printk.

Rob

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] ata: octeon: Add compile test support
  2023-06-22 13:41           ` Rob Herring
@ 2023-06-22 21:52             ` Damien Le Moal
  0 siblings, 0 replies; 12+ messages in thread
From: Damien Le Moal @ 2023-06-22 21:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: Guenter Roeck, Sergey Shtylyov, Thomas Bogendoerfer, linux-ide,
	linux-mips, linux-kernel

On 6/22/23 22:41, Rob Herring wrote:
> On Wed, Jun 21, 2023 at 10:26 PM Damien Le Moal <dlemoal@kernel.org> wrote:
>>
>> On 6/22/23 12:01, Guenter Roeck wrote:
>>> On 6/21/23 17:57, Damien Le Moal wrote:
>>>> On 6/22/23 01:51, Guenter Roeck wrote:
>>>>> On Wed, Jun 14, 2023 at 11:36:33AM -0600, Rob Herring wrote:
>>>>>> Add COMPILE_TEST to enable building Cavium Octeon drivers in MIPS
>>>>>> allyesconfig/allmodconfig builds. There's a dependency on MIPS headers,
>>>>>> so other arches can't be enabled.
>>>>>>
>>>>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>>>>> ---
>>>>>> Tested on allmodconfig build. Not sure if there's other MIPS configs
>>>>>> where this doesn't work. We'll see what 0-day says.
>>>>>
>>>>> Odd, in next-20230621 I get:
>>>>>
>>>>> Building mips:allmodconfig ... failed
>>>>
>>>> Indeed odd. Given that this is an allmodconfig, I would assume that
>>>> CONFIG_CAVIUM_OCTEON_SOC is set ?
>>>>
>>>
>>> No, it is not. CONFIG_CAVIUM_OCTEON_SOC is a choice option,
>>> meaning only one of the choices can be set, and mips:allmodconfig
>>> selects a different choice.
>>
>> OK. Then I think I need to drop this patch as I do not see how to allow
>> COMPILE_TEST without CONFIG_CAVIUM_OCTEON_SOC being set.
>>
>> Rob ?
> 
> These could be fixed, but not sure it's worth the effort.

Agreed. And given that we are at rc7 already, this effort should not be now
anyway. I will drop this patch.


-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-06-22 21:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 17:36 [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds Rob Herring
2023-06-14 17:36 ` [PATCH 2/2] ata: octeon: Add compile test support Rob Herring
2023-06-15  0:45   ` Damien Le Moal
2023-06-16  2:08   ` Damien Le Moal
2023-06-21 16:51   ` Guenter Roeck
2023-06-22  0:57     ` Damien Le Moal
2023-06-22  3:01       ` Guenter Roeck
2023-06-22  4:26         ` Damien Le Moal
2023-06-22  5:10           ` Guenter Roeck
2023-06-22 13:41           ` Rob Herring
2023-06-22 21:52             ` Damien Le Moal
2023-06-15  9:11 ` [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).