Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1517603 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2016-11-08 22:50 +0100 |
| Last post | 2016-11-09 11:00 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] MIPS: fix duplicate define Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-11-08 22:50 +0100
Re: [PATCH] MIPS: fix duplicate define kbuild test robot <lkp@intel.com> - 2016-11-09 00:50 +0100
Re: [PATCH] MIPS: fix duplicate define James Hogan <james.hogan@imgtec.com> - 2016-11-09 11:00 +0100
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-11-08 22:50 +0100 |
| Subject | [PATCH] MIPS: fix duplicate define |
| Message-ID | <sBmrf-6Av-7@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-11-09 00:50 +0100 |
| Message-ID | <sBojo-7S6-21@gated-at.bofh.it> |
| In reply to | #1517603 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [next] | [standalone]
| From | James Hogan <james.hogan@imgtec.com> |
|---|---|
| Date | 2016-11-09 11:00 +0100 |
| Message-ID | <sBxPI-5yX-21@gated-at.bofh.it> |
| In reply to | #1517603 |
[Multipart message — attachments visible in raw view] — view raw
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
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web