Malta build errors with 2.6.26-rc1
Some Malta build errors:
cc1: warnings being treated as errorsarch/mips/mips-boards/malta/malta_int.c: In function ‘gcmp_probe’:arch/mips/mips-boards/malta/malta_int.c:408: warning: cast to pointer from integer of different size arch/mips/mips-boards/malta/malta_int.c: In function ‘arch_init_irq’:arch/mips/mips-boards/malta/malta_int.c:437: warning: cast to pointer from integer of different size arch/mips/mips-boards/malta/malta_int.c:441: warning: cast to pointer from integer of different size arch/mips/mips-boards/malta/malta_int.c: In function ‘malta_be_handler’:arch/mips/mips-boards/malta/malta_int.c:656: warning: cast to pointer from integer of different size arch/mips/mips-boards/malta/malta_int.c:657: warning: cast to pointer from integer of different size arch/mips/mips-boards/malta/malta_int.c:658: warning: cast to pointer from integer of different size arch/mips/mips-boards/malta/malta_int.c:704: warning: cast to pointer from integer of different size make[5]: *** [arch/mips/mips-boards/malta/malta_int.o] Error 1
and:
arch/mips/mips-boards/generic/amon.c: In function ‘amon_cpu_avail’:arch/mips/mips-boards/generic/amon.c:31: error: implicit declaration of function ‘KSEG0ADDR’
cc1: warnings being treated as errorsarch/mips/mips-boards/generic/amon.c:31: warning: cast to pointer from integer of different size arch/mips/mips-boards/generic/amon.c: In function ‘amon_cpu_start’:arch/mips/mips-boards/generic/amon.c:56: warning: cast to pointer from integer of different size make[4]: *** [arch/mips/mips-boards/malta] Error 2
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Quoted 4 lines · Martin Michlmayr
Some Malta build errors:
cc1: warnings being treated as errors
arch/mips/mips-boards/malta/malta_int.c: In function ‘gcmp_probe’:
Sorry, I forgot to mention that this is 64-bit Malta. 32-bit compiles fine.
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
2008/5/12 Martin Michlmayr <[email protected]>:
Quoted 17 lines
Some Malta build errors:
cc1: warnings being treated as errors
arch/mips/mips-boards/malta/malta_int.c: In function 'gcmp_probe':
arch/mips/mips-boards/malta/malta_int.c:408: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c: In function 'arch_init_irq':
arch/mips/mips-boards/malta/malta_int.c:437: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:441: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c: In function 'malta_be_handler':
arch/mips/mips-boards/malta/malta_int.c:656: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:657: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:658: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:704: warning: cast to pointer from integer of different size make[5]: *** [arch/mips/mips-boards/malta/malta_int.o] Error 1and:
Quoted 8 lines
arch/mips/mips-boards/generic/amon.c: In function 'amon_cpu_avail':
arch/mips/mips-boards/generic/amon.c:31: error: implicit declaration of function 'KSEG0ADDR'
cc1: warnings being treated as errors
arch/mips/mips-boards/generic/amon.c:31: warning: cast to pointer from integer of different sizearch/mips/mips-boards/generic/amon.c: In function 'amon_cpu_start':
arch/mips/mips-boards/generic/amon.c:56: warning: cast to pointer from integer of different size make[4]: *** [arch/mips/mips-boards/malta] Error 2
Known error. Please see this thread for some suggestions (and be warned that I did not try any of them):
http://marc.info/?t=120966332300004&r=1&w=2
Dmitri
Quoted 26 lines · Dmitri Vorobiev
Quoted 17 lines
Some Malta build errors:
cc1: warnings being treated as errors
arch/mips/mips-boards/malta/malta_int.c: In function 'gcmp_probe':
arch/mips/mips-boards/malta/malta_int.c:408: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c: In function 'arch_init_irq':
arch/mips/mips-boards/malta/malta_int.c:437: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:441: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c: In function 'malta_be_handler':
arch/mips/mips-boards/malta/malta_int.c:656: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:657: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:658: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:704: warning: cast to pointer from integer of different size make[5]: *** [arch/mips/mips-boards/malta/malta_int.o] Error 1and:
Quoted 8 lines
arch/mips/mips-boards/generic/amon.c: In function 'amon_cpu_avail':
arch/mips/mips-boards/generic/amon.c:31: error: implicit declaration of function 'KSEG0ADDR'
cc1: warnings being treated as errors
arch/mips/mips-boards/generic/amon.c:31: warning: cast to pointer from integer of different sizearch/mips/mips-boards/generic/amon.c: In function 'amon_cpu_start':
arch/mips/mips-boards/generic/amon.c:56: warning: cast to pointer from integer of different size make[4]: *** [arch/mips/mips-boards/malta] Error 2
Quoted 3 lines
Known error. Please see this thread for some suggestions (and be warned that I did not try any of them):
http://marc.info/?t=120966332300004&r=1&w=2
Isn't that a completely different issue? Anyway, I just tried and I still see the problems above (with 64 bit Malta) still after applying the traps.c patch from Thomas Bogendoerfer.
Is there a maintainer for Malta?
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Thomas Bogendoerfer
maintainerQuoted 27 lines · Martin Michlmayr
Quoted 26 lines · Dmitri Vorobiev
Quoted 25 lines
Some Malta build errors:
cc1: warnings being treated as errors
arch/mips/mips-boards/malta/malta_int.c: In function 'gcmp_probe':
arch/mips/mips-boards/malta/malta_int.c:408: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c: In function 'arch_init_irq':
arch/mips/mips-boards/malta/malta_int.c:437: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:441: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c: In function 'malta_be_handler':
arch/mips/mips-boards/malta/malta_int.c:656: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:657: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:658: warning: cast to pointer from integer of different sizearch/mips/mips-boards/malta/malta_int.c:704: warning: cast to pointer from integer of different size make[5]: *** [arch/mips/mips-boards/malta/malta_int.o] Error 1and:
arch/mips/mips-boards/generic/amon.c: In function 'amon_cpu_avail':
arch/mips/mips-boards/generic/amon.c:31: error: implicit declaration of function 'KSEG0ADDR'
cc1: warnings being treated as errors
arch/mips/mips-boards/generic/amon.c:31: warning: cast to pointer from integer of different sizearch/mips/mips-boards/generic/amon.c: In function 'amon_cpu_start':
arch/mips/mips-boards/generic/amon.c:56: warning: cast to pointer from integer of different size make[4]: *** [arch/mips/mips-boards/malta] Error 2
Quoted 7 lines
Quoted 3 lines
Known error. Please see this thread for some suggestions (and be warned that I did not try any of them):
http://marc.info/?t=120966332300004&r=1&w=2Isn't that a completely different issue? Anyway, I just tried and I still see the problems above (with 64 bit Malta) still after applying the
traps.cpatch from Thomas Bogendoerfer.
I didn't fix the problems above. The change to traps.c only fixes traps.c for 64bit builds and it's a totally different issue. Looking at the warning/errors someone needs to fix some data types and use CKSEG0ADDR(). I don't have the hardware, so I could only provide an untested patch, if no one else steps forward...
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a good idea. [ RFC1925, 2.3 ]
Quoted 5 lines · Thomas Bogendoerfer
I didn't fix the problems above. The change to
traps.conly fixestraps.cfor 64bit builds and it's a totally different issue. Looking at the warning/errors someone needs to fix some data types and useCKSEG0ADDR(). I don't have the hardware, so I could only provide an untested patch, if no one else steps forward...
QEMU emulates Malta, so I (or someone else here) should be able to test the patch.
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Thomas Bogendoerfer
maintainerQuoted 9 lines · Martin Michlmayr
Quoted 5 lines · Thomas Bogendoerfer
I didn't fix the problems above. The change to
traps.conly fixestraps.cfor 64bit builds and it's a totally different issue. Looking at the warning/errors someone needs to fix some data types and useCKSEG0ADDR(). I don't have the hardware, so I could only provide an untested patch, if no one else steps forward...QEMU emulates Malta, so I (or someone else here) should be able to test the patch.
Fix 64bit Malta by using CKSEG0ADDR and correct casts
---
arch/mips/mips-boards/generic/amon.c | 4 ++-- include/asm-mips/gic.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/mips/mips-boards/generic/amon.c +2 -2
@@ -28,7 +28,7 @@int amon_cpu_avail (int cpu) { -struct cpulaunch *launch = (struct cpulaunch *)KSEG0ADDR (CPULAUNCH ); +struct cpulaunch *launch = (struct cpulaunch *)CKSEG0ADDR (CPULAUNCH );if (cpu <0 || cpu >=NCPULAUNCH ) {pr_debug ("avail: cpu%d is out of range\n" , cpu);
@@ -53,7 +53,7 @@ void amon_cpu_start(int cpu, unsigned long gp, unsigned long a0) {volatile struct cpulaunch *launch = - (struct cpulaunch *)KSEG0ADDR (CPULAUNCH ); + (struct cpulaunch *)CKSEG0ADDR (CPULAUNCH );if (!amon_cpu_avail (cpu))return ;
include/asm-mips/gic.h +2 -2
@@ -24,8 +24,8 @@#define MSK (n) ((1 << (n)) - 1)#define REG32 (addr) (*(volatile unsigned int *) (addr)) -#define REG (base, offs) REG32((unsigned int)(base) + offs##_##OFS) -#define REGP (base, phys) REG32((unsigned int)(base) + (phys)) +#define REG (base, offs) REG32((unsigned long)(base) + offs##_##OFS) +#define REGP (base, phys) REG32((unsigned long)(base) + (phys))/* Accessors */ #define GIC_REG (segment, offset) \
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a good idea. [ RFC1925, 2.3 ]
Dmitri Vorobiev
Tested-by2008/5/29 Thomas Bogendoerfer <[email protected]>:
Quoted 48 lines · Martin Michlmayr
Quoted 9 lines · Thomas Bogendoerfer
Quoted 5 lines
I didn't fix the problems above. The change to
traps.conly fixestraps.cfor 64bit builds and it's a totally different issue. Looking at the warning/errors someone needs to fix some data types and useCKSEG0ADDR(). I don't have the hardware, so I could only provide an untested patch, if no one else steps forward...QEMU emulates Malta, so I (or someone else here) should be able to test the patch.
Fix 64bit Malta by using CKSEG0ADDR and correct casts
Signed-off-by Thomas Bogendoerfer <[email protected]>---
arch/mips/mips-boards/generic/amon.c | 4 ++-- include/asm-mips/gic.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)arch/mips/mips-boards/generic/amon.c +2
-2@@ -28,7 +28,7 @@int amon_cpu_avail (int cpu) { -struct cpulaunch *launch = (struct cpulaunch *)KSEG0ADDR (CPULAUNCH ); +struct cpulaunch *launch = (struct cpulaunch *)CKSEG0ADDR (CPULAUNCH );if (cpu <0 || cpu >=NCPULAUNCH ) {pr_debug ("avail: cpu%d is out of range\n" , cpu);@@ -53,7 +53,7 @@ void amon_cpu_start(int cpu, unsigned long gp, unsigned long a0) {volatile struct cpulaunch *launch = - (struct cpulaunch *)KSEG0ADDR (CPULAUNCH ); + (struct cpulaunch *)CKSEG0ADDR (CPULAUNCH );if (!amon_cpu_avail (cpu))return ;include/asm-mips/gic.h +0
-0
include/asm-mips/gic.h line 31
Quoted 10 lines
include/asm-mips/gic.h +2
-2@@ -24,8 +24,8 @@#define MSK (n) ((1 << (n)) - 1)#define REG32 (addr) (*(volatile unsigned int *) (addr)) -#define REG (base, offs) REG32((unsigned int)(base) + offs##_##OFS) -#define REGP (base, phys) REG32((unsigned int)(base) + (phys)) +#define REG (base, offs) REG32((unsigned long)(base) + offs##_##OFS) +#define REGP (base, phys) REG32((unsigned long)(base) + (phys))/* Accessors */ #define GIC_REG (segment, offset) \
My test was performed using a Malta 4Kc board. I was able to boot the target up to the shell prompt with this patch applied to the current Linus tree.
So, you might want to add
Dmitri Vorobiev
Tested-byQuoted 4 lines
So, you might want to add
Tested-by Dmitri Vorobiev <[email protected]>
Ouch, I made a typo. Corrected version:
P.S. Sorry for a duplicate post, but we're currently having some problems with email at linux-mips.org...
Dmitri
Quoted 1 line
Ralf Baechle
AppliedOn Thu, May 29, 2008 at 10:05:07PM +0200, Thomas Bogendoerfer wrote:
Thanks, applied.
Ralf
Quoted 5 lines
I didn't fix the problems above. The change to
traps.conly fixestraps.cfor 64bit builds and it's a totally different issue. Looking at the warning/errors someone needs to fix some data types and useCKSEG0ADDR(). I don't have the hardware, so I could only provide an untested patch, if no one else steps forward...
Please provide an untested patch. I have hardware here, so I can perform the test for you.
Thanks,
Dmitri
Quoted 7 lines
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]
Quoted 1 line
Is there a maintainer for Malta?
Well, I think I can volunteer. At least, I have the hardware and am pretty much interested in working with this platform. Ralf, what do you think?
Dmitri
Quoted 4 lines
--
Martin Michlmayr
http://www.cyrius.com/