Skip to contentSkip to conversation

ARM: riscpc: Unbreak the build

PATCH In review Bart Van Assche 3 participants 6 messages Aug 30, 2022 – Aug 31, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: riscpc: Unbreak the build

This patch fixes the following build error:

In file included from ./include/linux/io.h:13,
from ./arch/arm/mach-rpc/include/mach/uncompress.h:9, from arch/arm/boot/compressed/misc.c:31:
./arch/arm/include/asm/io.h:85:22: error: conflicting types for ‘__raw_writeb’
85 | #define __raw_writeb __raw_writeb

      |                      ^~~~~~~~~~~~
./arch/arm/include/asm/io.h:86:20: note: in expansion of macro ‘__raw_writeb’
   86 | static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
      |                    ^~~~~~~~~~~~
In file included from arch/arm/boot/compressed/misc.c:26:
arch/arm/boot/compressed/misc-ep93xx.h:13:20: note: previous definition of ‘__raw_writeb’ was here
   13 | static inline void __raw_writeb(unsigned char value, unsigned int ptr)
      |                    ^~~~~~~~~~~~

To: Russell King <[email protected]>

---
 arch/arm/mach-rpc/include/mach/uncompress.h | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-rpc/include/mach/uncompress.h +0 -1
index 1fbe7eb956fd..97edaf6a1f07 100644
@@ -6,7 +6,6 @@
  */
 #define VIDMEM ((char *)SCREEN_START)
  
-#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/page.h>

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#1 lore raw
Quoted 16 lines · Bart Van Assche

This patch fixes the following build error:

In file included from ./include/linux/io.h:13,
from ./arch/arm/mach-rpc/include/mach/uncompress.h:9, from arch/arm/boot/compressed/misc.c:31:
./arch/arm/include/asm/io.h:85:22: error: conflicting types for ‘__raw_writeb’
85 | #define __raw_writeb __raw_writeb

      |                      ^~~~~~~~~~~~
./arch/arm/include/asm/io.h:86:20: note: in expansion of macro ‘__raw_writeb’
   86 | static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
      |                    ^~~~~~~~~~~~
In file included from arch/arm/boot/compressed/misc.c:26:
arch/arm/boot/compressed/misc-ep93xx.h:13:20: note: previous definition of ‘__raw_writeb’ was here
   13 | static inline void __raw_writeb(unsigned char value, unsigned int ptr)
      |                    ^~~~~~~~~~~~
Quoted 4 lines

To: Russell King <[email protected]>

Please work out which commit caused this breakage, thanks.

Signature · 7 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw
Quoted 17 lines · Russell King (Oracle)
Quoted 16 lines · Bart Van Assche

This patch fixes the following build error:

In file included from ./include/linux/io.h:13,
from ./arch/arm/mach-rpc/include/mach/uncompress.h:9, from arch/arm/boot/compressed/misc.c:31:
./arch/arm/include/asm/io.h:85:22: error: conflicting types for ‘__raw_writeb’

    85 | #define __raw_writeb __raw_writeb
       |                      ^~~~~~~~~~~~

./arch/arm/include/asm/io.h:86:20: note: in expansion of macro ‘__raw_writeb’
86 | static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
| ^~~~~~~~~~~~
In file included from arch/arm/boot/compressed/misc.c:26:
arch/arm/boot/compressed/misc-ep93xx.h:13:20: note: previous definition of ‘__raw_writeb’ was here
13 | static inline void __raw_writeb(unsigned char value, unsigned int ptr)
| ^~~~~~~~~~~~

Quoted 6 lines
Quoted 4 lines

To: Russell King <[email protected]>

Please work out which commit caused this breakage, thanks.

Hi Russell,

A bisect led to the following:

Fixes 0361c7e504b1 ("ARM: ep93xx: multiplatform support")

Please let me know if you want me to repost this patch with the Fixes tag included.

Thanks,

Bart.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw
Quoted 25 lines · Bart Van Assche
Quoted 17 lines · Russell King (Oracle)
Quoted 16 lines · Bart Van Assche

This patch fixes the following build error:

In file included from ./include/linux/io.h:13,
from ./arch/arm/mach-rpc/include/mach/uncompress.h:9, from arch/arm/boot/compressed/misc.c:31:
./arch/arm/include/asm/io.h:85:22: error: conflicting types for ‘__raw_writeb’

    85 | #define __raw_writeb __raw_writeb
       |                      ^~~~~~~~~~~~

./arch/arm/include/asm/io.h:86:20: note: in expansion of macro ‘__raw_writeb’
86 | static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
| ^~~~~~~~~~~~
In file included from arch/arm/boot/compressed/misc.c:26:
arch/arm/boot/compressed/misc-ep93xx.h:13:20: note: previous definition of ‘__raw_writeb’ was here
13 | static inline void __raw_writeb(unsigned char value, unsigned int ptr)
| ^~~~~~~~~~~~

Quoted 6 lines
Quoted 4 lines

To: Russell King <[email protected]>

Please work out which commit caused this breakage, thanks.

Quoted 8 lines

Hi Russell,

A bisect led to the following:

Fixes 0361c7e504b1 ("ARM: ep93xx: multiplatform support")

Please let me know if you want me to repost this patch with the Fixes tag included.

That is indeed the cause, and I'd say that the patch to fix it is incorrect.

misc-ep93xx.h brings in EP93xx specific raw IO accessors into the decompressor, but we've already had (and correctly had) linux/io.h included.

The problem is misc-ep93xx.h. Why is it defining these accessors? That's a question for Arnd.

Signature · 7 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw
Quoted 15 lines · Russell King (Oracle)
Quoted 10 lines · Bart Van Assche
Quoted 3 lines
Quoted 3 lines

In file included from ./include/linux/io.h:13,
from ./arch/arm/mach-rpc/include/mach/uncompress.h:9,

A bisect led to the following:

Fixes 0361c7e504b1 ("ARM: ep93xx: multiplatform support")

Please let me know if you want me to repost this patch with the Fixes tag included.

That is indeed the cause, and I'd say that the patch to fix it is incorrect.

Quoted 6 lines

misc-ep93xx.h brings in EP93xx specific raw IO accessors into the decompressor, but we've already had (and correctly had) linux/io.h included.

The problem is misc-ep93xx.h. Why is it defining these accessors? That's a question for Arnd.

The mach-ep93xx uncompress.h had these since the ep93xx got added in 2006, the idea was probably to avoid including linux/*.h headers in the decompressor and it was copied from arch-l7200, which was the first to do the same thing.

Having the custom definition was probably never needed on ep93xx even if it was perhaps needed on one of the others that did the same thing.

I agree that removing the #include from the rpc version is the wrong fix, but I can see a couple of others that all seem fine to me:

- put the '#include "misc-ep93xx.h"' in an #ifdef as we do for the users

- rename the custom __raw_writel etc to something with ep93xx prefix, or just open-code them

- remove the custom functions and include linux/io.h unconditionally

The last one is probably the cleanest, but also the most likely the cause regressions for another corner case. The other two remaining uncompress.h versions each just open-code the pointer dereference.

Arnd

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw
In reply to Russell King (Oracle)
Quoted 15 lines · Russell King (Oracle)
Quoted 10 lines · Bart Van Assche
Quoted 3 lines
Quoted 3 lines

In file included from ./include/linux/io.h:13,
from ./arch/arm/mach-rpc/include/mach/uncompress.h:9,

A bisect led to the following:

Fixes 0361c7e504b1 ("ARM: ep93xx: multiplatform support")

Please let me know if you want me to repost this patch with the Fixes tag included.

That is indeed the cause, and I'd say that the patch to fix it is incorrect.

Quoted 6 lines

misc-ep93xx.h brings in EP93xx specific raw IO accessors into the decompressor, but we've already had (and correctly had) linux/io.h included.

The problem is misc-ep93xx.h. Why is it defining these accessors? That's a question for Arnd.

The mach-ep93xx uncompress.h had these since the ep93xx got added in 2006, the idea was probably to avoid including linux/*.h headers in the decompressor and it was copied from arch-l7200, which was the first to do the same thing.

Having the custom definition was probably never needed on ep93xx even if it was perhaps needed on one of the others that did the same thing.

I agree that removing the #include from the rpc version is the wrong fix, but I can see a couple of others that all seem fine to me:

- put the '#include "misc-ep93xx.h"' in an #ifdef as we do for the users

- rename the custom __raw_writel etc to something with ep93xx prefix, or just open-code them

- remove the custom functions and include linux/io.h unconditionally

The last one is probably the cleanest, but also the most likely the cause regressions for another corner case. The other two remaining uncompress.h versions each just open-code the pointer dereference.

Arnd

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel