Re: Malta build errors with 2.6.26-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/5/29 Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>:
> On Wed, May 28, 2008 at 05:10:25PM +0200, Martin Michlmayr wrote:
>> * Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx> [2008-05-28 10:50]:
>> > 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...
>>
>> 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 <tsbogend@xxxxxxxxxxxxxxxx>
> ---
>
>  arch/mips/mips-boards/generic/amon.c |    4 ++--
>  include/asm-mips/gic.h               |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/mips/mips-boards/generic/amon.c b/arch/mips/mips-boards/generic/amon.c
> index b7633fd..96236bf 100644
> --- a/arch/mips/mips-boards/generic/amon.c
> +++ b/arch/mips/mips-boards/generic/amon.c
> @@ -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;
> diff --git a/include/asm-mips/gic.h b/include/asm-mips/gic.h
> index 3a492f2..954807d 100644
> --- a/include/asm-mips/gic.h
> +++ b/include/asm-mips/gic.h
> @@ -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

Tested-by: Dmitri Vorobiev <dmtiri.vorobiev@xxxxxxxxx>


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux