[PATCH] ARM: riscpc: Unbreak the build

Arnd Bergmann arnd at arndb.de
Wed Aug 31 00:33:24 PDT 2022


On Tue, Aug 30, 2022, at 11:27 PM, Russell King (Oracle) wrote:
> On Tue, Aug 30, 2022 at 01:55:50PM -0700, Bart Van Assche wrote:
>> > > 
>> > > 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.
>
> 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



More information about the linux-arm-kernel mailing list