aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-alpha/io_trivial.h
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2007-12-17 19:19:57 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-17 22:28:16 -0500
commit9548b209a37397f3036aa5bd3d5b4d3b725aa11a (patch)
tree9861b26f3ad69f0ac30ac04cf877faa951c9acd5 /include/asm-alpha/io_trivial.h
parentb47b6f38e5202c924bfe7632dce5dda4e3d40731 (diff)
alpha: build fixes
This fixes some of the alpha-specific build problems, except a) modpost warning about COMMON symbol "saved_config" and b) nasty final link failure with gcc-4.x, -Os and scsi-disk driver configured built-in (due to jump table in .rodata referencing discarded .exit.text). - build failure with gcc-4.2.x: fix up casts in cia_io* routines to avoid warnings ('discards qualifiers from pointer target type'), which are failures, thanks to -Werror; - modpost warnings: add missing __init qualifier for titan and marvel; for non-generic build, move machine vectors from .data to .data.init.refok section; - unbreak CPU-specific optimization: rearrange cpuflags-y assignments so that extended -mcpu value (ev56, pca56, ev67) overrides basic one (ev5, ev6) and not vice versa. Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-alpha/io_trivial.h')
-rw-r--r--include/asm-alpha/io_trivial.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-alpha/io_trivial.h b/include/asm-alpha/io_trivial.h
index b10d1aa4cdd1..1c77f10b4b36 100644
--- a/include/asm-alpha/io_trivial.h
+++ b/include/asm-alpha/io_trivial.h
@@ -72,25 +72,29 @@ IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a)
72__EXTERN_INLINE u8 72__EXTERN_INLINE u8
73IO_CONCAT(__IO_PREFIX,readb)(const volatile void __iomem *a) 73IO_CONCAT(__IO_PREFIX,readb)(const volatile void __iomem *a)
74{ 74{
75 return IO_CONCAT(__IO_PREFIX,ioread8)((void __iomem *)a); 75 void __iomem *addr = (void __iomem *)a;
76 return IO_CONCAT(__IO_PREFIX,ioread8)(addr);
76} 77}
77 78
78__EXTERN_INLINE u16 79__EXTERN_INLINE u16
79IO_CONCAT(__IO_PREFIX,readw)(const volatile void __iomem *a) 80IO_CONCAT(__IO_PREFIX,readw)(const volatile void __iomem *a)
80{ 81{
81 return IO_CONCAT(__IO_PREFIX,ioread16)((void __iomem *)a); 82 void __iomem *addr = (void __iomem *)a;
83 return IO_CONCAT(__IO_PREFIX,ioread16)(addr);
82} 84}
83 85
84__EXTERN_INLINE void 86__EXTERN_INLINE void
85IO_CONCAT(__IO_PREFIX,writeb)(u8 b, volatile void __iomem *a) 87IO_CONCAT(__IO_PREFIX,writeb)(u8 b, volatile void __iomem *a)
86{ 88{
87 IO_CONCAT(__IO_PREFIX,iowrite8)(b, (void __iomem *)a); 89 void __iomem *addr = (void __iomem *)a;
90 IO_CONCAT(__IO_PREFIX,iowrite8)(b, addr);
88} 91}
89 92
90__EXTERN_INLINE void 93__EXTERN_INLINE void
91IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a) 94IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a)
92{ 95{
93 IO_CONCAT(__IO_PREFIX,iowrite16)(b, (void __iomem *)a); 96 void __iomem *addr = (void __iomem *)a;
97 IO_CONCAT(__IO_PREFIX,iowrite16)(b, addr);
94} 98}
95#endif 99#endif
96 100