linux-next: build failure after merge of the tip tree
Subsystems (4)
Hi all,
After merging the tip tree, today's linux-next build (powerpc allyesconfig) failed like this:
drivers/video/fbdev/aty/atyfb_base.c: In function 'atyfb_setup_generic':drivers/video/fbdev/aty/atyfb_base.c:3447:2: error: implicit declaration of function 'ioremap_uc' [-Werror=implicit-function-declaration]
par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000);
^drivers/video/fbdev/aty/atyfb_base.c:3447:19: warning: assignment makes pointer from integer without a cast
par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000);
^Caused by commits
3cc2dac5be3f ("drivers/video/fbdev/atyfb: Replace MTRR UC hole with strong UC") 8c7ea50c010b ("x86/mm, asm-generic: Add IOMMU ioremap_uc() variant default")
The latter defines ioremap_uc() for x86 and those architectures that use asm-generic/io.h - which is not all of them :-( . The former commit then uses ioremap_uc().
I have reverted commit 3cc2dac5be3f (and 7d89a3cb159a that follows it) for today.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 18 lines · Stephen Rothwell
Hi all,
After merging the tip tree, today's linux-next build (powerpc allyesconfig) failed like this:
drivers/video/fbdev/aty/atyfb_base.c: In function 'atyfb_setup_generic':drivers/video/fbdev/aty/atyfb_base.c:3447:2: error: implicit declaration of function 'ioremap_uc' [-Werror=implicit-function-declaration]
par->ati_regbase=ioremap_uc(info->fix.mmio_start, 0x1000);
^drivers/video/fbdev/aty/atyfb_base.c:3447:19: warning: assignment makes pointer from integer without a castpar->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000); ^Caused by commits
3cc2dac5be3f("drivers/video/fbdev/atyfb: Replace MTRR UC hole with strong UC")8c7ea50c010b("x86/mm, asm-generic: Add IOMMUioremap_uc()variant default")
Quoted 6 lines
The latter defines
ioremap_uc()for x86 and those architectures that useasm-generic/io.h- which is not all of them :-( . The former commit then usesioremap_uc().I have reverted commit
3cc2dac5be3f(and7d89a3cb159athat follows it) for today.
This should be fixed by:
http://git.kernel.org/tip/8c7ea50c010b2f1e006ad37c43f98202a31de2cb
The way it was defined was to return NULL if an arch does not have it, *but* if the asm-generic io.h header is not included on some archs it will still fail, which leaves us no option but to then poke and define its implementaiton for archs which opt-out of asm-generic io.h
Benh, in this case I believe its OK to to just map it to ioremap(), let me know what you think.
arch/powerpc/include/asm/io.h +1 -0
@@ -721,6 +721,7 @@ extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size, unsigned long flags);extern void __iomem *ioremap_wc (phys_addr_t address,unsigned long size);#define ioremap_nocache (addr, size) ioremap((addr), (size)) +#define ioremap_uc (addr, size) ioremap((addr), (size))extern void iounmap (volatile void __iomem *addr);
Luis
Quoted 30 lines · Luis R. Rodriguez
Quoted 18 lines · Stephen Rothwell
Hi all,
After merging the tip tree, today's linux-next build (powerpc allyesconfig) failed like this:
drivers/video/fbdev/aty/atyfb_base.c: In function 'atyfb_setup_generic':drivers/video/fbdev/aty/atyfb_base.c:3447:2: error: implicit declaration of function 'ioremap_uc' [-Werror=implicit-function-declaration]
par->ati_regbase=ioremap_uc(info->fix.mmio_start, 0x1000);
^drivers/video/fbdev/aty/atyfb_base.c:3447:19: warning: assignment makes pointer from integer without a castpar->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000); ^Caused by commits
3cc2dac5be3f("drivers/video/fbdev/atyfb: Replace MTRR UC hole with strong UC")8c7ea50c010b("x86/mm, asm-generic: Add IOMMUioremap_uc()variant default")Quoted 6 lines
The latter defines
ioremap_uc()for x86 and those architectures that useasm-generic/io.h- which is not all of them :-( . The former commit then usesioremap_uc().I have reverted commit
3cc2dac5be3f(and7d89a3cb159athat follows it) for today.This should be fixed by:
http://git.kernel.org/tip/8c7ea50c010b2f1e006ad37c43f98202a31de2cb
Quoted 8 lines
The way it was defined was to return NULL if an arch does not have it, *but* if the asm-generic
io.hheader is not included on some archs it will still fail, which leaves us no option but to then poke and define its implementaiton for archs which opt-out of asm-genericio.hBenh, in this case I believe its OK to to just map it to
ioremap(), let me know what you think.
I checked and there are other architectures that do not include asm-generic/io.h, so here is the full patch fix, which I'll post next.
From: "Luis R. Rodriguez" <[email protected]>
Subject: [PATCH] arch/*/io.h: Add ioremap_uc() to all architectures
This adds ioremap_uc() only for architectures that do not include asm-generic.h/io.h as that already provides a default definition for them for both cases where you have CONFIG_MMU and you do not, and because of this, the number of architectures this patch address is less than the architectures that the ioremap_wt() patch addressed, "arch/*/io.h: Add ioremap_wt() to all architectures").
In order to reduce the number of architectures we have to modify by adding new architecture IO APIs we'll have to review the architectures in this patch, see why they can't add asm-generic.h/io.h or issues that would be created by doing so and then spread a consistent inclusion of this header towards the end of their own header. For instance arch/metag includes the asm-generic/io.h *before* the ioremap*() definitions, this should be the other way around but only once we have guard wrappers for the non-MMU case also for asm-generic/io.h.
--- arch/avr32/include/asm/io.h | 1 + arch/frv/include/asm/io.h | 1 + arch/m32r/include/asm/io.h | 1 + arch/m68k/include/asm/io_mm.h | 1 + arch/mn10300/include/asm/io.h | 1 + arch/powerpc/include/asm/io.h | 1 + arch/sh/include/asm/io.h | 1 + arch/tile/include/asm/io.h | 1 + 8 files changed, 8 insertions(+)
arch/avr32/include/asm/io.h +1 -0
@@ -297,6 +297,7 @@ extern void __iounmap(void __iomem *addr);#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocache#define cached (addr) P1SEGADDR(addr)#define uncached (addr) P2SEGADDR(addr)
arch/frv/include/asm/io.h +1 -0
@@ -278,6 +278,7 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned l }#define ioremap_wc ioremap_nocache +#define ioremap_uc ioremap_nocacheextern void iounmap (void volatile __iomem *addr);
arch/m32r/include/asm/io.h +1 -0
@@ -69,6 +69,7 @@ extern void iounmap(volatile void __iomem *addr);#define ioremap_nocache (off,size) ioremap(off,size)#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocache/* * IO bus memory addresses are also 1:1 with the physical address
arch/m68k/include/asm/io_mm.h +1 -0
@@ -468,6 +468,7 @@ static inline void __iomem *ioremap_nocache(unsigned long physaddr, unsigned lon {return __ioremap (physaddr, size,IOMAP_NOCACHE_SER ); } +#define ioremap_uc ioremap_nocachestatic inline void __iomem *ioremap_wt (unsigned long physaddr,unsigned long size) {
arch/mn10300/include/asm/io.h +1 -0
@@ -283,6 +283,7 @@ static inline void __iomem *ioremap_nocache(unsigned long offset, unsigned long#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocachestatic inline void iounmap (void __iomem *addr) {
arch/powerpc/include/asm/io.h +1 -0
@@ -721,6 +721,7 @@ extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size, unsigned long flags);extern void __iomem *ioremap_wc (phys_addr_t address,unsigned long size);#define ioremap_nocache (addr, size) ioremap((addr), (size)) +#define ioremap_uc (addr, size) ioremap((addr), (size))extern void iounmap (volatile void __iomem *addr);
arch/sh/include/asm/io.h +1 -0
@@ -368,6 +368,7 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }#endif #define ioremap_nocache ioremap +#define ioremap_uc ioremap#define iounmap __iounmap/*
arch/tile/include/asm/io.h +1 -0
@@ -55,6 +55,7 @@ extern void iounmap(volatile void __iomem *addr);#define ioremap_nocache (physaddr, size) ioremap(physaddr, size)#define ioremap_wc (physaddr, size) ioremap(physaddr, size)#define ioremap_wt (physaddr, size) ioremap(physaddr, size) +#define ioremap_uc (physaddr, size) ioremap(physaddr, size)#define ioremap_fullcache (physaddr, size) ioremap(physaddr, size)#define mmiowb ()
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
tip-bot for Luis R. Rodriguez
merge bot[tip:x86/mm] arch/*/io.h: Add ioremap_uc() to all architectures
arch/*/io.h: Add ioremap_uc() to all architectures
Commit-ID: 4c73e8926623ca0f64c2c6111289ab8096fa647a Gitweb: http://git.kernel.org/tip/4c73e8926623ca0f64c2c6111289ab8096fa647a Author: Luis R. Rodriguez <[email protected]> AuthorDate: Tue, 28 Jul 2015 20:17:13 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 29 Jul 2015 10:02:36 +0200
arch/*/io.h: Add ioremap_uc() to all architectures
This adds ioremap_uc() only for architectures that do not include asm-generic.h/io.h as that already provides a default definition for them for both cases where you have CONFIG_MMU and you do not, and because of this, the number of architectures this patch address is less than the architectures that the ioremap_wt() patch addressed, "arch/*/io.h: Add ioremap_wt() to all architectures").
In order to reduce the number of architectures we have to modify by adding new architecture IO APIs we'll have to review the architectures in this patch, see why they can't add asm-generic.h/io.h or issues that would be created by doing so and then spread a consistent inclusion of this header towards the end of their own header. For instance arch/metag includes the asm-generic/io.h *before* the ioremap*() definitions, this should be the other way around but only once we have guard wrappers for the non-MMU case also for asm-generic/io.h.
--- arch/avr32/include/asm/io.h | 1 + arch/frv/include/asm/io.h | 1 + arch/m32r/include/asm/io.h | 1 + arch/m68k/include/asm/io_mm.h | 1 + arch/mn10300/include/asm/io.h | 1 + arch/powerpc/include/asm/io.h | 1 + arch/sh/include/asm/io.h | 1 + arch/tile/include/asm/io.h | 1 + 8 files changed, 8 insertions(+)
arch/avr32/include/asm/io.h +1 -0
@@ -297,6 +297,7 @@ extern void __iounmap(void __iomem *addr);#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocache#define cached (addr) P1SEGADDR(addr)#define uncached (addr) P2SEGADDR(addr)
arch/frv/include/asm/io.h +1 -0
@@ -278,6 +278,7 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned l }#define ioremap_wc ioremap_nocache +#define ioremap_uc ioremap_nocacheextern void iounmap (void volatile __iomem *addr);
arch/m32r/include/asm/io.h +1 -0
@@ -69,6 +69,7 @@ extern void iounmap(volatile void __iomem *addr);#define ioremap_nocache (off,size) ioremap(off,size)#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocache/* * IO bus memory addresses are also 1:1 with the physical address
arch/m68k/include/asm/io_mm.h +1 -0
@@ -467,6 +467,7 @@ static inline void __iomem *ioremap_nocache(unsigned long physaddr, unsigned lon {return __ioremap (physaddr, size,IOMAP_NOCACHE_SER ); } +#define ioremap_uc ioremap_nocachestatic inline void __iomem *ioremap_wt (unsigned long physaddr,unsigned long size) {
arch/mn10300/include/asm/io.h +1 -0
@@ -283,6 +283,7 @@ static inline void __iomem *ioremap_nocache(unsigned long offset, unsigned long#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocachestatic inline void iounmap (void __iomem *addr) {
arch/powerpc/include/asm/io.h +1 -0
@@ -721,6 +721,7 @@ extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size, unsigned long flags);extern void __iomem *ioremap_wc (phys_addr_t address,unsigned long size);#define ioremap_nocache (addr, size) ioremap((addr), (size)) +#define ioremap_uc (addr, size) ioremap((addr), (size))extern void iounmap (volatile void __iomem *addr);
arch/sh/include/asm/io.h +1 -0
@@ -368,6 +368,7 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }#endif #define ioremap_nocache ioremap +#define ioremap_uc ioremap#define iounmap __iounmap/*
arch/tile/include/asm/io.h +1 -0
@@ -55,6 +55,7 @@ extern void iounmap(volatile void __iomem *addr);#define ioremap_nocache (physaddr, size) ioremap(physaddr, size)#define ioremap_wc (physaddr, size) ioremap(physaddr, size)#define ioremap_wt (physaddr, size) ioremap(physaddr, size) +#define ioremap_uc (physaddr, size) ioremap(physaddr, size)#define ioremap_fullcache (physaddr, size) ioremap(physaddr, size)#define mmiowb ()
Hans-Christian Egtvedt
Acked-byRe: [tip:x86/mm] arch/*/io.h: Add ioremap_uc() to all architectures
Quoted 60 lines · tip-bot for Luis R. Rodriguez
Commit-ID: 4c73e8926623ca0f64c2c6111289ab8096fa647a Gitweb: http://git.kernel.org/tip/4c73e8926623ca0f64c2c6111289ab8096fa647a Author: Luis R. Rodriguez <[email protected]> AuthorDate: Tue, 28 Jul 2015 20:17:13 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 29 Jul 2015 10:02:36 +0200
arch/*/io.h: Addioremap_uc()to all architecturesThis adds
ioremap_uc()only for architectures that do not includeasm-generic.h/io.has that already provides a default definition for them for both cases where you haveCONFIG_MMUand you do not, and because of this, the number of architectures this patch address is less than the architectures that theioremap_wt()patch addressed, "arch/*/io.h: Addioremap_wt()to all architectures").In order to reduce the number of architectures we have to modify by adding new architecture IO APIs we'll have to review the architectures in this patch, see why they can't add
asm-generic.h/io.hor issues that would be created by doing so and then spread a consistent inclusion of this header towards the end of their own header. For instancearch/metagincludes theasm-generic/io.h*before* the ioremap*() definitions, this should be the other way around but only once we have guard wrappers for the non-MMU case also forasm-generic/io.h.Reported-by Stephen Rothwell <[email protected]>Signed-off-by Luis R. Rodriguez <[email protected]>Cc Abhilash Kesavan <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Borislav Petkov <[email protected]>Cc Chris Metcalf <[email protected]>Cc David Howells <[email protected]>Cc Fengguang Wu <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Greg Ungerer <[email protected]>Cc Guenter Roeck <[email protected]>Cc Haavard Skinnemoen <[email protected]>Cc Hans-Christian Egtvedt <[email protected]>Cc Koichi Yasutake <[email protected]>Cc Kyle McMartin <[email protected]>Cc Linus Torvalds <[email protected]>Cc Michael Ellerman <[email protected]>Cc Paul Mackerras <[email protected]>Cc Peter Hurley <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Rob Herring <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Toshi Kani <[email protected]>Cc Will Deacon <[email protected]>Signed-off-by Ingo Molnar <[email protected]>
Quoted 2 lines
--- arch/avr32/include/asm/io.h | 1 +
For the avr32 part
Quoted 8 lines
arch/frv/include/asm/io.h | 1 + arch/m32r/include/asm/io.h | 1 + arch/m68k/include/asm/io_mm.h | 1 + arch/mn10300/include/asm/io.h | 1 + arch/powerpc/include/asm/io.h | 1 + arch/sh/include/asm/io.h | 1 + arch/tile/include/asm/io.h | 1 + 8 files changed, 8 insertions(+)
<snipp diff>
Signature · 1 line
HcE