The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v6] staging: gpib: Fix i386 build issue
@ 2024-12-11 16:44 Dave Penkler
  2024-12-11 19:42 ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Penkler @ 2024-12-11 16:44 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel
  Cc: dan.carpenter, geert, Dave Penkler, Guenter Roeck

These drivers cast resource_type_t to void * causing the build to fail.

With a 32 bit build and PHYS_ADDR_T_64BIT enabled the resource_size_t
type is a 64bit unsigned int which cannot be cast to a 32 bit pointer.

Disable these drivers if not 64BIT and PHYS_ADDR_T_64BIT are configured.

Link: https://lore.kernel.org/linux-staging/2c6c7e9d-ca10-47a9-82a7-a2e26b1f51ef@roeck-us.net/
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/all/f10e976e-7a04-4454-b38d-39cd18f142da@roeck-us.net/
Fixes: e9dc69956d4d ("staging: gpib: Add Computer Boards GPIB driver")
Fixes: e1339245eba3 ("staging: gpib: Add Computer Equipment Corporation GPIB driver")
Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver")
Fixes: 0cd5b05551e0 ("staging: gpib: Add TNT4882 chip based GPIB driver")
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
v1 -> v2 changed pci_resource_start to pci_resource_len for second parameter of ioremap
v2 -> v3 add changes for cb7210 and tnt4882 drivers
v3 -> v4 disable build of drivers when X86_PAE is enabled
v4 -> v5 add missing signoff
v5 -> v6 Non x86 builds were also failing. See discussion under Link above.
         generalise the build dependencies to exclude the drivers when
	 the physical address type does not match the arch word length.

drivers/staging/gpib/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/gpib/Kconfig b/drivers/staging/gpib/Kconfig
index 95308d15a555..36a29b52ba30 100644
--- a/drivers/staging/gpib/Kconfig
+++ b/drivers/staging/gpib/Kconfig
@@ -50,6 +50,7 @@ config GPIB_CEC_PCI
 	tristate "CEC PCI board"
 	depends on PCI
 	depends on HAS_IOPORT
+	depends on 64BIT || !PHYS_ADDR_T_64BIT
 	select GPIB_COMMON
 	select GPIB_NEC7210
 	help
@@ -64,6 +65,7 @@ config GPIB_NI_PCI_ISA
 	depends on ISA_BUS || PCI || PCMCIA
 	select GPIB_COMMON
 	select GPIB_NEC7210
+	depends on 64BIT || !PHYS_ADDR_T_64BIT
 	help
 	  Enable support for National Instruments boards based
 	  on TNT4882 chips:
@@ -85,6 +87,7 @@ config GPIB_CB7210
        tristate "Measurement Computing compatible boards"
 	depends on HAS_IOPORT
 	depends on ISA_BUS || PCI || PCMCIA
+	depends on 64BIT || !PHYS_ADDR_T_64BIT
        select GPIB_COMMON
 	select GPIB_NEC7210
        help
@@ -176,6 +179,7 @@ config GPIB_INES
 	depends on HAS_IOPORT
        select GPIB_COMMON
        select GPIB_NEC7210
+       depends on 64BIT || !PHYS_ADDR_T_64BIT
        help
          GPIB driver for Ines compatible boards
 	 Ines
-- 
2.47.1


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

* Re: [PATCH v6] staging: gpib: Fix i386 build issue
  2024-12-11 16:44 [PATCH v6] staging: gpib: Fix i386 build issue Dave Penkler
@ 2024-12-11 19:42 ` Guenter Roeck
  2024-12-13 10:53   ` Dave Penkler
  0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2024-12-11 19:42 UTC (permalink / raw)
  To: Dave Penkler, gregkh, linux-staging, linux-kernel; +Cc: dan.carpenter, geert

On 12/11/24 08:44, Dave Penkler wrote:
> These drivers cast resource_type_t to void * causing the build to fail.
> 
> With a 32 bit build and PHYS_ADDR_T_64BIT enabled the resource_size_t
> type is a 64bit unsigned int which cannot be cast to a 32 bit pointer.
> 
> Disable these drivers if not 64BIT and PHYS_ADDR_T_64BIT are configured.
> 
> Link: https://lore.kernel.org/linux-staging/2c6c7e9d-ca10-47a9-82a7-a2e26b1f51ef@roeck-us.net/
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Closes: https://lore.kernel.org/all/f10e976e-7a04-4454-b38d-39cd18f142da@roeck-us.net/
> Fixes: e9dc69956d4d ("staging: gpib: Add Computer Boards GPIB driver")
> Fixes: e1339245eba3 ("staging: gpib: Add Computer Equipment Corporation GPIB driver")
> Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver")
> Fixes: 0cd5b05551e0 ("staging: gpib: Add TNT4882 chip based GPIB driver")
> Signed-off-by: Dave Penkler <dpenkler@gmail.com>

Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter


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

* Re: [PATCH v6] staging: gpib: Fix i386 build issue
  2024-12-11 19:42 ` Guenter Roeck
@ 2024-12-13 10:53   ` Dave Penkler
  2024-12-13 18:09     ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Penkler @ 2024-12-13 10:53 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: gregkh, linux-staging, linux-kernel, dan.carpenter, geert, arnd

On Wed, Dec 11, 2024 at 11:42:36AM -0800, Guenter Roeck wrote:
> On 12/11/24 08:44, Dave Penkler wrote:
> > These drivers cast resource_type_t to void * causing the build to fail.
> > 
> > With a 32 bit build and PHYS_ADDR_T_64BIT enabled the resource_size_t
> > type is a 64bit unsigned int which cannot be cast to a 32 bit pointer.
> > 
> > Disable these drivers if not 64BIT and PHYS_ADDR_T_64BIT are configured.
> > 
> > Link: https://lore.kernel.org/linux-staging/2c6c7e9d-ca10-47a9-82a7-a2e26b1f51ef@roeck-us.net/
> > Reported-by: Guenter Roeck <linux@roeck-us.net>
> > Closes: https://lore.kernel.org/all/f10e976e-7a04-4454-b38d-39cd18f142da@roeck-us.net/
> > Fixes: e9dc69956d4d ("staging: gpib: Add Computer Boards GPIB driver")
> > Fixes: e1339245eba3 ("staging: gpib: Add Computer Equipment Corporation GPIB driver")
> > Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver")
> > Fixes: 0cd5b05551e0 ("staging: gpib: Add TNT4882 chip based GPIB driver")
> > Signed-off-by: Dave Penkler <dpenkler@gmail.com>
> 
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> 
> Guenter
> 
Hi Guenter,
These nice patches from Arnd fix the i386 build issue without having applied 
my v6 patch:
Link: https://lore.kernel.org/linux-staging/20241213064959.1045243-1-arnd@kernel.org/

I tested only 
make ARCH=i386 allmodconfig
make ARCH=i386 M=drivers/staging/gpib

-Dave

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

* Re: [PATCH v6] staging: gpib: Fix i386 build issue
  2024-12-13 10:53   ` Dave Penkler
@ 2024-12-13 18:09     ` Guenter Roeck
  0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2024-12-13 18:09 UTC (permalink / raw)
  To: Dave Penkler
  Cc: gregkh, linux-staging, linux-kernel, dan.carpenter, geert, arnd

On 12/13/24 02:53, Dave Penkler wrote:
> On Wed, Dec 11, 2024 at 11:42:36AM -0800, Guenter Roeck wrote:
>> On 12/11/24 08:44, Dave Penkler wrote:
>>> These drivers cast resource_type_t to void * causing the build to fail.
>>>
>>> With a 32 bit build and PHYS_ADDR_T_64BIT enabled the resource_size_t
>>> type is a 64bit unsigned int which cannot be cast to a 32 bit pointer.
>>>
>>> Disable these drivers if not 64BIT and PHYS_ADDR_T_64BIT are configured.
>>>
>>> Link: https://lore.kernel.org/linux-staging/2c6c7e9d-ca10-47a9-82a7-a2e26b1f51ef@roeck-us.net/
>>> Reported-by: Guenter Roeck <linux@roeck-us.net>
>>> Closes: https://lore.kernel.org/all/f10e976e-7a04-4454-b38d-39cd18f142da@roeck-us.net/
>>> Fixes: e9dc69956d4d ("staging: gpib: Add Computer Boards GPIB driver")
>>> Fixes: e1339245eba3 ("staging: gpib: Add Computer Equipment Corporation GPIB driver")
>>> Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver")
>>> Fixes: 0cd5b05551e0 ("staging: gpib: Add TNT4882 chip based GPIB driver")
>>> Signed-off-by: Dave Penkler <dpenkler@gmail.com>
>>
>> Tested-by: Guenter Roeck <linux@roeck-us.net>
>>
>> Guenter
>>
> Hi Guenter,
> These nice patches from Arnd fix the i386 build issue without having applied
> my v6 patch:
> Link: https://lore.kernel.org/linux-staging/20241213064959.1045243-1-arnd@kernel.org/
> 
> I tested only
> make ARCH=i386 allmodconfig
> make ARCH=i386 M=drivers/staging/gpib
> 
> -Dave

I don't care how this is fixed. What I do care about it that we are close to -rc3, and my
test builds still fail.

Build results:
	total: 161 pass: 155 fail: 6
Failed builds:
	csky:allmodconfig
	i386:allyesconfig
	i386:allmodconfig
	openrisc:allmodconfig
	s390:allmodconfig
	xtensa:allmodconfig

all because of GPIB problems. Given that this is a staging driver, I am inclined to just
hard-disable GPIB completely in my test coverage. I'll do that after -rc3 is out.

Guenter


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

end of thread, other threads:[~2024-12-13 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 16:44 [PATCH v6] staging: gpib: Fix i386 build issue Dave Penkler
2024-12-11 19:42 ` Guenter Roeck
2024-12-13 10:53   ` Dave Penkler
2024-12-13 18:09     ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox