alpha: make 'Jensen' IO functions build again
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Sep 2021 17:57:10 +0000 (10:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Sep 2021 17:57:10 +0000 (10:57 -0700)
commitcc9d3aaa5331577a8658e25473a27ba5949023d8
treec9ed47121877edc48da705fb45a8e28aca7d0860
parentefafec27c5658ed987e720130772f8933c685e87
alpha: make 'Jensen' IO functions build again

The Jensen IO functions are overly copmplicated because some of the IO
addresses refer to special 'local IO' ports, and they get accessed
differently.

That then makes gcc not actually inline them, and since they were marked
"extern inline" when included through the regular <asm/io.h> path, and
then only marked "inline" when included from sys_jensen.c, you never
necessarily got a body for the IO functions at all.

The intent of the sys_jensen.c code is to actually get the non-inlined
copy generated, so remove the 'inline' from the magic macro that is
supposed to sort this all out.

Also, do not mix 'extern inline' functions (that may or may not be
inlined and will not generate a function body if they are not) with
'static inline' (that _will_ generate a function body when not inlined).
Because gcc will complain about this situation:

   error: ‘jensen_bus_outb’ is static but used in inline function ‘jensen_outb’ which is not static

because gcc basically doesn't know whether to generate a body for that
static inline function or not for that call site.

So make all of these use that __EXTERN_INLINE marker.  Gcc will
generally not inline these things on use, and then generate the function
body out-of-line in sys_jensen.c.

This makes the core IO functions build for the alpha Jensen config.

Not that the rest then builds, because it turns out Jensen also doesn't
enable PCI, which then makes other drievrs very unhappy, but that's a
separate issue.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/alpha/include/asm/jensen.h
arch/alpha/kernel/sys_jensen.c