• Thomas Bogendoerfer's avatar
    MIPS: jazz: fix 64bit build · 9089bfb0
    Thomas Bogendoerfer authored
    [ Upstream commit 41af167f ]
    
    64bit JAZZ builds failed with
    
      linux-next/arch/mips/jazz/jazzdma.c: In function `vdma_init`:
      /linux-next/arch/mips/jazz/jazzdma.c:77:30: error: implicit declaration
        of function `KSEG1ADDR`; did you mean `CKSEG1ADDR`?
        [-Werror=implicit-function-declaration]
        pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl);
                                    ^~~~~~~~~
                                    CKSEG1ADDR
      /linux-next/arch/mips/jazz/jazzdma.c:77:10: error: cast to pointer from
        integer of different size [-Werror=int-to-pointer-cast]
        pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl);
                ^
      In file included from /linux-next/arch/mips/include/asm/barrier.h:11:0,
                       from /linux-next/include/linux/compiler.h:248,
                       from /linux-next/include/linux/kernel.h:10,
                       from /linux-next/arch/mips/jazz/jazzdma.c:11:
      /linux-next/arch/mips/include/asm/addrspace.h:41:29: error: cast from
        pointer to integer of different size [-Werror=pointer-to-int-cast]
       #define _ACAST32_  (_ATYPE_)(_ATYPE32_) /* widen if necessary */
                                   ^
      /linux-next/arch/mips/include/asm/addrspace.h:53:25: note: in
        expansion of macro `_ACAST32_`
       #define CPHYSADDR(a)  ((_ACAST32_(a)) & 0x1fffffff)
                               ^~~~~~~~~
      /linux-next/arch/mips/jazz/jazzdma.c:84:44: note: in expansion of
        macro `CPHYSADDR`
        r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE, CPHYSADDR(pgtbl));
    
    Using correct casts and CKSEG1ADDR when dealing with the pgtbl setup
    fixes this.
    Signed-off-by: 's avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
    Signed-off-by: 's avatarPaul Burton <paul.burton@mips.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: James Hogan <jhogan@kernel.org>
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    9089bfb0
Name
Last commit
Last update
..
alchemy Loading commit data...
ar7 Loading commit data...
ath25 Loading commit data...
ath79 Loading commit data...
bcm47xx Loading commit data...
bcm63xx Loading commit data...
bmips Loading commit data...
boot Loading commit data...
cavium-octeon Loading commit data...
cobalt Loading commit data...
configs Loading commit data...
crypto Loading commit data...
dec Loading commit data...
emma Loading commit data...
fw Loading commit data...
generic Loading commit data...
include Loading commit data...
jazz Loading commit data...
jz4740 Loading commit data...
kernel Loading commit data...
kvm Loading commit data...
lantiq Loading commit data...
lasat Loading commit data...
lib Loading commit data...
loongson32 Loading commit data...
loongson64 Loading commit data...
math-emu Loading commit data...
mm Loading commit data...
mti-malta Loading commit data...
net Loading commit data...
netlogic Loading commit data...
oprofile Loading commit data...
paravirt Loading commit data...
pci Loading commit data...
pic32 Loading commit data...
pistachio Loading commit data...
pmcs-msp71xx Loading commit data...
pnx833x Loading commit data...
power Loading commit data...
ralink Loading commit data...
rb532 Loading commit data...
sgi-ip22 Loading commit data...
sgi-ip27 Loading commit data...
sgi-ip32 Loading commit data...
sibyte Loading commit data...
sni Loading commit data...
tools Loading commit data...
txx9 Loading commit data...
vdso Loading commit data...
vr41xx Loading commit data...
Kbuild Loading commit data...
Kbuild.platforms Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...
Makefile.postlink Loading commit data...