From 9548b209a37397f3036aa5bd3d5b4d3b725aa11a Mon Sep 17 00:00:00 2001 From: Ivan Kokshaysky Date: Mon, 17 Dec 2007 16:19:57 -0800 Subject: 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 Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-alpha/io_trivial.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/asm-alpha') 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) __EXTERN_INLINE u8 IO_CONCAT(__IO_PREFIX,readb)(const volatile void __iomem *a) { - return IO_CONCAT(__IO_PREFIX,ioread8)((void __iomem *)a); + void __iomem *addr = (void __iomem *)a; + return IO_CONCAT(__IO_PREFIX,ioread8)(addr); } __EXTERN_INLINE u16 IO_CONCAT(__IO_PREFIX,readw)(const volatile void __iomem *a) { - return IO_CONCAT(__IO_PREFIX,ioread16)((void __iomem *)a); + void __iomem *addr = (void __iomem *)a; + return IO_CONCAT(__IO_PREFIX,ioread16)(addr); } __EXTERN_INLINE void IO_CONCAT(__IO_PREFIX,writeb)(u8 b, volatile void __iomem *a) { - IO_CONCAT(__IO_PREFIX,iowrite8)(b, (void __iomem *)a); + void __iomem *addr = (void __iomem *)a; + IO_CONCAT(__IO_PREFIX,iowrite8)(b, addr); } __EXTERN_INLINE void IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a) { - IO_CONCAT(__IO_PREFIX,iowrite16)(b, (void __iomem *)a); + void __iomem *addr = (void __iomem *)a; + IO_CONCAT(__IO_PREFIX,iowrite16)(b, addr); } #endif -- cgit v1.2.3