* [PATCH] MIPS: fix duplicate define
@ 2016-11-08 21:43 Sudip Mukherjee
2016-11-08 23:46 ` kbuild test robot
2016-11-09 9:53 ` James Hogan
0 siblings, 2 replies; 5+ messages in thread
From: Sudip Mukherjee @ 2016-11-08 21:43 UTC (permalink / raw)
To: Ralf Baechle, Paul Burton; +Cc: linux-kernel, linux-mips, Sudip Mukherjee
The mips build of ip27_defconfig is failing with the error:
In file included from ../arch/mips/include/asm/mach-ip27/spaces.h:29:0,
from ../arch/mips/include/asm/page.h:12,
from ../arch/mips/vdso/vdso.h:26,
from ../arch/mips/vdso/gettimeofday.c:11:
../arch/mips/include/asm/mach-generic/spaces.h:28:0:
error: "CAC_BASE" redefined [-Werror]
#define CAC_BASE _AC(0x80000000, UL)
In file included from ../arch/mips/include/asm/page.h:12:0,
from ../arch/mips/vdso/vdso.h:26,
from ../arch/mips/vdso/gettimeofday.c:11:
../arch/mips/include/asm/mach-ip27/spaces.h:22:0:
note: this is the location of the previous definition
#define CAC_BASE 0xa800000000000000
Add a condition to check if CAC_BASE is already defined, and define it
only if it is not yet defined.
Fixes: 3ffc17d8768b ("MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0")
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
Build log is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/174134289
arch/mips/include/asm/mach-generic/spaces.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
index 952b0fd..61b75da 100644
--- a/arch/mips/include/asm/mach-generic/spaces.h
+++ b/arch/mips/include/asm/mach-generic/spaces.h
@@ -23,10 +23,12 @@
#ifdef CONFIG_32BIT
#ifdef CONFIG_KVM_GUEST
+#ifndef CAC_BASE
#define CAC_BASE _AC(0x40000000, UL)
#else
#define CAC_BASE _AC(0x80000000, UL)
#endif
+#endif
#ifndef IO_BASE
#define IO_BASE _AC(0xa0000000, UL)
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: fix duplicate define
@ 2016-11-08 23:46 ` kbuild test robot
0 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2016-11-08 23:46 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: kbuild-all, Ralf Baechle, Paul Burton, linux-kernel, linux-mips,
Sudip Mukherjee
[-- Attachment #1: Type: text/plain, Size: 5703 bytes --]
Hi Sudip,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.9-rc4 next-20161108]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Sudip-Mukherjee/MIPS-fix-duplicate-define/20161109-054643
config: mips-jz4740 (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=mips
All error/warnings (new ones prefixed by >>):
In file included from arch/mips/include/asm/mach-ip22/spaces.h:25:0,
from arch/mips/include/asm/addrspace.h:13,
from arch/mips/include/asm/barrier.h:11,
from arch/mips/include/asm/bitops.h:18,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/linux/sched.h:17,
from arch/mips/kernel/asm-offsets.c:13:
arch/mips/include/asm/page.h: In function '___pa':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
>> arch/mips/include/asm/page.h:190:13: note: in expansion of macro 'PAGE_OFFSET'
return x - PAGE_OFFSET + PHYS_OFFSET;
^~~~~~~~~~~
arch/mips/include/asm/mach-generic/spaces.h:93:23: note: each undeclared identifier is reported only once for each function it appears in
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
>> arch/mips/include/asm/page.h:190:13: note: in expansion of macro 'PAGE_OFFSET'
return x - PAGE_OFFSET + PHYS_OFFSET;
^~~~~~~~~~~
arch/mips/include/asm/io.h: In function 'phys_to_virt':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
>> arch/mips/include/asm/io.h:138:28: note: in expansion of macro 'PAGE_OFFSET'
return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
^~~~~~~~~~~
arch/mips/include/asm/io.h: In function 'isa_virt_to_bus':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
arch/mips/include/asm/io.h:146:34: note: in expansion of macro 'PAGE_OFFSET'
return (unsigned long)address - PAGE_OFFSET;
^~~~~~~~~~~
arch/mips/include/asm/io.h: In function 'isa_bus_to_virt':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
arch/mips/include/asm/io.h:151:28: note: in expansion of macro 'PAGE_OFFSET'
return (void *)(address + PAGE_OFFSET);
^~~~~~~~~~~
include/linux/mm.h: In function 'lowmem_page_address':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
arch/mips/include/asm/page.h:193:49: note: in expansion of macro 'PAGE_OFFSET'
#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
^~~~~~~~~~~
>> include/linux/mm.h:76:25: note: in expansion of macro '__va'
#define page_to_virt(x) __va(PFN_PHYS(page_to_pfn(x)))
^~~~
>> include/linux/mm.h:1005:9: note: in expansion of macro 'page_to_virt'
return page_to_virt(page);
^~~~~~~~~~~~
make[2]: *** [arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2
vim +/CAC_BASE +93 arch/mips/include/asm/mach-generic/spaces.h
875d43e7 include/asm-mips/mach-generic/spaces.h Ralf Baechle 2005-09-03 87 #endif /* CONFIG_64BIT */
^1da177e include/asm-mips/mach-generic/spaces.h Linus Torvalds 2005-04-16 88
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 89 /*
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 90 * This handles the memory map.
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 91 */
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 92 #ifndef PAGE_OFFSET
db385015 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 @93 #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 94 #endif
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 95
565b60de arch/mips/include/asm/mach-generic/spaces.h Kevin Cernekee 2010-09-07 96 #ifndef FIXADDR_TOP
:::::: The code at line 93 was first introduced by commit
:::::: db38501511a7513ec4f0ae9922d847c135cf3c78 [MIPS] Make PAGE_OFFSET aware of PHYS_OFFSET
:::::: TO: Franck Bui-Huu <fbuihuu@gmail.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 19122 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: fix duplicate define
@ 2016-11-08 23:46 ` kbuild test robot
0 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2016-11-08 23:46 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: kbuild-all, Ralf Baechle, Paul Burton, linux-kernel, linux-mips
[-- Attachment #1: Type: text/plain, Size: 5703 bytes --]
Hi Sudip,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.9-rc4 next-20161108]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Sudip-Mukherjee/MIPS-fix-duplicate-define/20161109-054643
config: mips-jz4740 (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=mips
All error/warnings (new ones prefixed by >>):
In file included from arch/mips/include/asm/mach-ip22/spaces.h:25:0,
from arch/mips/include/asm/addrspace.h:13,
from arch/mips/include/asm/barrier.h:11,
from arch/mips/include/asm/bitops.h:18,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/linux/sched.h:17,
from arch/mips/kernel/asm-offsets.c:13:
arch/mips/include/asm/page.h: In function '___pa':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
>> arch/mips/include/asm/page.h:190:13: note: in expansion of macro 'PAGE_OFFSET'
return x - PAGE_OFFSET + PHYS_OFFSET;
^~~~~~~~~~~
arch/mips/include/asm/mach-generic/spaces.h:93:23: note: each undeclared identifier is reported only once for each function it appears in
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
>> arch/mips/include/asm/page.h:190:13: note: in expansion of macro 'PAGE_OFFSET'
return x - PAGE_OFFSET + PHYS_OFFSET;
^~~~~~~~~~~
arch/mips/include/asm/io.h: In function 'phys_to_virt':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
>> arch/mips/include/asm/io.h:138:28: note: in expansion of macro 'PAGE_OFFSET'
return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
^~~~~~~~~~~
arch/mips/include/asm/io.h: In function 'isa_virt_to_bus':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
arch/mips/include/asm/io.h:146:34: note: in expansion of macro 'PAGE_OFFSET'
return (unsigned long)address - PAGE_OFFSET;
^~~~~~~~~~~
arch/mips/include/asm/io.h: In function 'isa_bus_to_virt':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
arch/mips/include/asm/io.h:151:28: note: in expansion of macro 'PAGE_OFFSET'
return (void *)(address + PAGE_OFFSET);
^~~~~~~~~~~
include/linux/mm.h: In function 'lowmem_page_address':
>> arch/mips/include/asm/mach-generic/spaces.h:93:23: error: 'CAC_BASE' undeclared (first use in this function)
#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
^
arch/mips/include/asm/page.h:193:49: note: in expansion of macro 'PAGE_OFFSET'
#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
^~~~~~~~~~~
>> include/linux/mm.h:76:25: note: in expansion of macro '__va'
#define page_to_virt(x) __va(PFN_PHYS(page_to_pfn(x)))
^~~~
>> include/linux/mm.h:1005:9: note: in expansion of macro 'page_to_virt'
return page_to_virt(page);
^~~~~~~~~~~~
make[2]: *** [arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2
vim +/CAC_BASE +93 arch/mips/include/asm/mach-generic/spaces.h
875d43e7 include/asm-mips/mach-generic/spaces.h Ralf Baechle 2005-09-03 87 #endif /* CONFIG_64BIT */
^1da177e include/asm-mips/mach-generic/spaces.h Linus Torvalds 2005-04-16 88
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 89 /*
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 90 * This handles the memory map.
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 91 */
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 92 #ifndef PAGE_OFFSET
db385015 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 @93 #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 94 #endif
c4612c85 include/asm-mips/mach-generic/spaces.h Franck Bui-Huu 2007-06-04 95
565b60de arch/mips/include/asm/mach-generic/spaces.h Kevin Cernekee 2010-09-07 96 #ifndef FIXADDR_TOP
:::::: The code at line 93 was first introduced by commit
:::::: db38501511a7513ec4f0ae9922d847c135cf3c78 [MIPS] Make PAGE_OFFSET aware of PHYS_OFFSET
:::::: TO: Franck Bui-Huu <fbuihuu@gmail.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 19122 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: fix duplicate define
@ 2016-11-09 9:53 ` James Hogan
0 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2016-11-09 9:53 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: Ralf Baechle, Paul Burton, linux-kernel, linux-mips
[-- Attachment #1: Type: text/plain, Size: 2214 bytes --]
On Tue, Nov 08, 2016 at 09:43:35PM +0000, Sudip Mukherjee wrote:
> The mips build of ip27_defconfig is failing with the error:
> In file included from ../arch/mips/include/asm/mach-ip27/spaces.h:29:0,
> from ../arch/mips/include/asm/page.h:12,
> from ../arch/mips/vdso/vdso.h:26,
> from ../arch/mips/vdso/gettimeofday.c:11:
> ../arch/mips/include/asm/mach-generic/spaces.h:28:0:
> error: "CAC_BASE" redefined [-Werror]
> #define CAC_BASE _AC(0x80000000, UL)
>
> In file included from ../arch/mips/include/asm/page.h:12:0,
> from ../arch/mips/vdso/vdso.h:26,
> from ../arch/mips/vdso/gettimeofday.c:11:
> ../arch/mips/include/asm/mach-ip27/spaces.h:22:0:
> note: this is the location of the previous definition
> #define CAC_BASE 0xa800000000000000
>
> Add a condition to check if CAC_BASE is already defined, and define it
> only if it is not yet defined.
>
> Fixes: 3ffc17d8768b ("MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0")
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
>
> Build log is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/174134289
>
> arch/mips/include/asm/mach-generic/spaces.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
> index 952b0fd..61b75da 100644
> --- a/arch/mips/include/asm/mach-generic/spaces.h
> +++ b/arch/mips/include/asm/mach-generic/spaces.h
> @@ -23,10 +23,12 @@
>
> #ifdef CONFIG_32BIT
> #ifdef CONFIG_KVM_GUEST
> +#ifndef CAC_BASE
This is wrong. Should it be one line up? Note the else...
> #define CAC_BASE _AC(0x40000000, UL)
> #else
here ^^^
i.e. you appear to be changing
CONFIG_KVM_GUEST:
CAC_BASE=0x40000000
!CONFIG_KVM_GUEST:
CAC_BASE=0x80000000
to:
CONFIG_KVM_GUEST:
!CAC_BASE:
CAC_BASE=0x40000000
CAC_BASE:
CAC_BASE=0x80000000
!CONFIG_KVM_GUEST:
(nothing)
Cheers
James
> #define CAC_BASE _AC(0x80000000, UL)
> #endif
> +#endif
> #ifndef IO_BASE
> #define IO_BASE _AC(0xa0000000, UL)
> #endif
> --
> 1.9.1
>
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: fix duplicate define
@ 2016-11-09 9:53 ` James Hogan
0 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2016-11-09 9:53 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: Ralf Baechle, Paul Burton, linux-kernel, linux-mips
[-- Attachment #1: Type: text/plain, Size: 2214 bytes --]
On Tue, Nov 08, 2016 at 09:43:35PM +0000, Sudip Mukherjee wrote:
> The mips build of ip27_defconfig is failing with the error:
> In file included from ../arch/mips/include/asm/mach-ip27/spaces.h:29:0,
> from ../arch/mips/include/asm/page.h:12,
> from ../arch/mips/vdso/vdso.h:26,
> from ../arch/mips/vdso/gettimeofday.c:11:
> ../arch/mips/include/asm/mach-generic/spaces.h:28:0:
> error: "CAC_BASE" redefined [-Werror]
> #define CAC_BASE _AC(0x80000000, UL)
>
> In file included from ../arch/mips/include/asm/page.h:12:0,
> from ../arch/mips/vdso/vdso.h:26,
> from ../arch/mips/vdso/gettimeofday.c:11:
> ../arch/mips/include/asm/mach-ip27/spaces.h:22:0:
> note: this is the location of the previous definition
> #define CAC_BASE 0xa800000000000000
>
> Add a condition to check if CAC_BASE is already defined, and define it
> only if it is not yet defined.
>
> Fixes: 3ffc17d8768b ("MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0")
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
>
> Build log is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/174134289
>
> arch/mips/include/asm/mach-generic/spaces.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
> index 952b0fd..61b75da 100644
> --- a/arch/mips/include/asm/mach-generic/spaces.h
> +++ b/arch/mips/include/asm/mach-generic/spaces.h
> @@ -23,10 +23,12 @@
>
> #ifdef CONFIG_32BIT
> #ifdef CONFIG_KVM_GUEST
> +#ifndef CAC_BASE
This is wrong. Should it be one line up? Note the else...
> #define CAC_BASE _AC(0x40000000, UL)
> #else
here ^^^
i.e. you appear to be changing
CONFIG_KVM_GUEST:
CAC_BASE=0x40000000
!CONFIG_KVM_GUEST:
CAC_BASE=0x80000000
to:
CONFIG_KVM_GUEST:
!CAC_BASE:
CAC_BASE=0x40000000
CAC_BASE:
CAC_BASE=0x80000000
!CONFIG_KVM_GUEST:
(nothing)
Cheers
James
> #define CAC_BASE _AC(0x80000000, UL)
> #endif
> +#endif
> #ifndef IO_BASE
> #define IO_BASE _AC(0xa0000000, UL)
> #endif
> --
> 1.9.1
>
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-09 9:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 21:43 [PATCH] MIPS: fix duplicate define Sudip Mukherjee
2016-11-08 23:46 ` kbuild test robot
2016-11-08 23:46 ` kbuild test robot
2016-11-09 9:53 ` James Hogan
2016-11-09 9:53 ` James Hogan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.