Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

alpha: stop using asm-generic/iomap.h

Alpha has custom definitions for ioread64()/iowrite64(), which now
don't exist in the lib/iomap.c variant. This is an endless source
of build failures, since alpha tries to share a couple of function
declarations.

Change alpha to have its own prototypes that match the definitions
in arch/alpha/kerne/io.c instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+17 -14
+17 -14
arch/alpha/include/asm/io.h
··· 10 10 #include <asm/machvec.h> 11 11 #include <asm/hwrpb.h> 12 12 13 - /* The generic header contains only prototypes. Including it ensures that 14 - the implementation we have here matches that interface. */ 15 - #include <asm-generic/iomap.h> 16 - 17 13 /* 18 14 * Virtual -> physical identity mapping starts at this offset 19 15 */ ··· 272 276 #define __raw_writel __raw_writel 273 277 #define __raw_writeq __raw_writeq 274 278 275 - /* 276 - * Mapping from port numbers to __iomem space is pretty easy. 277 - */ 279 + extern unsigned int ioread8(const void __iomem *); 280 + extern unsigned int ioread16(const void __iomem *); 281 + extern unsigned int ioread32(const void __iomem *); 282 + extern u64 ioread64(const void __iomem *); 278 283 279 - /* These two have to be extern inline because of the extern prototype from 280 - <asm-generic/iomap.h>. It is not legal to mix "extern" and "static" for 281 - the same declaration. */ 284 + extern void iowrite8(u8, void __iomem *); 285 + extern void iowrite16(u16, void __iomem *); 286 + extern void iowrite32(u32, void __iomem *); 287 + extern void iowrite64(u64, void __iomem *); 288 + 289 + extern void ioread8_rep(const void __iomem *port, void *buf, unsigned long count); 290 + extern void ioread16_rep(const void __iomem *port, void *buf, unsigned long count); 291 + extern void ioread32_rep(const void __iomem *port, void *buf, unsigned long count); 292 + 293 + extern void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count); 294 + extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count); 295 + extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count); 296 + 282 297 extern inline void __iomem *ioport_map(unsigned long port, unsigned int size) 283 298 { 284 299 return IO_CONCAT(__IO_PREFIX,ioportmap) (port); ··· 636 629 #define RTC_PORT(x) (0x70 + (x)) 637 630 #define RTC_ALWAYS_BCD 0 638 631 639 - /* 640 - * These get provided from <asm-generic/iomap.h> since alpha does not 641 - * select GENERIC_IOMAP. 642 - */ 643 632 #define ioread64 ioread64 644 633 #define iowrite64 iowrite64 645 634 #define ioread8_rep ioread8_rep