Skip to content

Commit cc9d3aa

Browse files
committed
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>
1 parent efafec2 commit cc9d3aa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

arch/alpha/include/asm/jensen.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,18 @@ __EXTERN_INLINE void jensen_set_hae(unsigned long addr)
111111
* convinced that I need one of the newer machines.
112112
*/
113113

114-
static inline unsigned int jensen_local_inb(unsigned long addr)
114+
__EXTERN_INLINE unsigned int jensen_local_inb(unsigned long addr)
115115
{
116116
return 0xff & *(vuip)((addr << 9) + EISA_VL82C106);
117117
}
118118

119-
static inline void jensen_local_outb(u8 b, unsigned long addr)
119+
__EXTERN_INLINE void jensen_local_outb(u8 b, unsigned long addr)
120120
{
121121
*(vuip)((addr << 9) + EISA_VL82C106) = b;
122122
mb();
123123
}
124124

125-
static inline unsigned int jensen_bus_inb(unsigned long addr)
125+
__EXTERN_INLINE unsigned int jensen_bus_inb(unsigned long addr)
126126
{
127127
long result;
128128

@@ -131,7 +131,7 @@ static inline unsigned int jensen_bus_inb(unsigned long addr)
131131
return __kernel_extbl(result, addr & 3);
132132
}
133133

134-
static inline void jensen_bus_outb(u8 b, unsigned long addr)
134+
__EXTERN_INLINE void jensen_bus_outb(u8 b, unsigned long addr)
135135
{
136136
jensen_set_hae(0);
137137
*(vuip)((addr << 7) + EISA_IO + 0x00) = b * 0x01010101;

arch/alpha/kernel/sys_jensen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include <asm/ptrace.h>
1919

20-
#define __EXTERN_INLINE inline
20+
#define __EXTERN_INLINE
2121
#include <asm/io.h>
2222
#include <asm/jensen.h>
2323
#undef __EXTERN_INLINE

0 commit comments

Comments
 (0)