* [PATCH v2] MIPS: fix duplicate define
@ 2016-11-09 20:44 Sudip Mukherjee
2016-11-10 12:23 ` kbuild test robot
0 siblings, 1 reply; 3+ messages in thread
From: Sudip Mukherjee @ 2016-11-09 20:44 UTC (permalink / raw)
To: Ralf Baechle, Paul Burton
Cc: linux-kernel, linux-mips, james.hogan, 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>
---
v2: corrected a silly mistake of overlooking #else
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..3d6d3b0 100644
--- a/arch/mips/include/asm/mach-generic/spaces.h
+++ b/arch/mips/include/asm/mach-generic/spaces.h
@@ -22,11 +22,13 @@
#endif
#ifdef CONFIG_32BIT
+#ifndef CAC_BASE
#ifdef CONFIG_KVM_GUEST
#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] 3+ messages in thread
* Re: [PATCH v2] MIPS: fix duplicate define
2016-11-09 20:44 [PATCH v2] MIPS: fix duplicate define Sudip Mukherjee
@ 2016-11-10 12:23 ` kbuild test robot
2016-11-10 12:37 ` Sudip Mukherjee
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2016-11-10 12:23 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: kbuild-all, Ralf Baechle, Paul Burton, linux-kernel, linux-mips,
james.hogan, Sudip Mukherjee
[-- Attachment #1: Type: text/plain, Size: 4209 bytes --]
Hi Sudip,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.9-rc4 next-20161110]
[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/20161110-044738
config: mips-ip27_defconfig (attached as .config)
compiler: mips64-linux-gnuabi64-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 errors (new ones prefixed by >>):
In file included from arch/mips/include/asm/page.h:194:0,
from arch/mips/vdso/vdso.h:26,
from arch/mips/vdso/gettimeofday.c:11:
arch/mips/include/asm/io.h: In function 'phys_to_virt':
>> arch/mips/include/asm/io.h:138:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
^
arch/mips/include/asm/io.h: In function 'isa_bus_to_virt':
arch/mips/include/asm/io.h:151:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
return (void *)(address + PAGE_OFFSET);
^
cc1: all warnings being treated as errors
vim +138 arch/mips/include/asm/io.h
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 122 }
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 123
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 124 /*
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 125 * phys_to_virt - map physical address to virtual
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 126 * @address: address to remap
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 127 *
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 128 * The returned virtual address is a current CPU mapping for
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 129 * the memory address given. It is only valid to use this function on
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 130 * addresses that have a kernel mapping
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 131 *
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 132 * This function does not handle bus mappings for DMA transfers. In
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 133 * almost all conceivable cases a device driver should not be using
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 134 * this function
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 135 */
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 136 static inline void * phys_to_virt(unsigned long address)
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 137 {
6f284a2c include/asm-mips/io.h Franck Bui-Huu 2007-01-10 @138 return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 139 }
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 140
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 141 /*
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 142 * ISA I/O bus memory addresses are 1:1 with the physical address.
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 143 */
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 144 static inline unsigned long isa_virt_to_bus(volatile void * address)
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 145 {
^1da177e include/asm-mips/io.h Linus Torvalds 2005-04-16 146 return (unsigned long)address - PAGE_OFFSET;
:::::: The code at line 138 was first introduced by commit
:::::: 6f284a2ce7b8bc49cb8455b1763357897a899abb [MIPS] FLATMEM: introduce 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: 15252 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] MIPS: fix duplicate define
2016-11-10 12:23 ` kbuild test robot
@ 2016-11-10 12:37 ` Sudip Mukherjee
0 siblings, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2016-11-10 12:37 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Ralf Baechle, Paul Burton, linux-kernel, linux-mips,
james.hogan
On Thu, Nov 10, 2016 at 08:23:58PM +0800, kbuild test robot wrote:
> Hi Sudip,
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.9-rc4 next-20161110]
> [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/20161110-044738
> config: mips-ip27_defconfig (attached as .config)
> compiler: mips64-linux-gnuabi64-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 errors (new ones prefixed by >>):
>
> In file included from arch/mips/include/asm/page.h:194:0,
> from arch/mips/vdso/vdso.h:26,
> from arch/mips/vdso/gettimeofday.c:11:
> arch/mips/include/asm/io.h: In function 'phys_to_virt':
> >> arch/mips/include/asm/io.h:138:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
> ^
> arch/mips/include/asm/io.h: In function 'isa_bus_to_virt':
> arch/mips/include/asm/io.h:151:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> return (void *)(address + PAGE_OFFSET);
> ^
> cc1: all warnings being treated as errors
I have seen this before submitting and it is not related to the patch I
submitted. My patch fixed one build failure, the build continued and it
again failed in some other error which needs to be fixed also. I will
have a look after this patch is accepted.
Thanks
Sudip
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-10 12:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-09 20:44 [PATCH v2] MIPS: fix duplicate define Sudip Mukherjee
2016-11-10 12:23 ` kbuild test robot
2016-11-10 12:37 ` Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).