Re: [PATCH v4 1/5] powerpc: io.h: move iomap.h include so that it can use readq/writeq defs

From: Horia Geantă
Date: Thu Jul 20 2017 - 08:36:17 EST


On 7/20/2017 1:27 PM, Horia Geantă wrote:
> On 7/19/2017 7:04 PM, Logan Gunthorpe wrote:
>>
>>
>> On 18/07/17 11:57 PM, Michael Ellerman wrote:
>>> Seems fair enough, have you tested it at all?
>>
>> It's only been compile tested and the kbuild robot has beat up on it a bit.
>>
> Looks like the patch set does not compile on PPC (.config generated
> using make corenet64_smp_defconfig):
>
> [...]
> LD vmlinux.o
> MODPOST vmlinux.o
> drivers/crypto/caam/jr.o: In function `rd_reg64':
> /home/b05471/repos/cryptodev-2.6/drivers/crypto/caam/regs.h:154:
> undefined reference to `.ioread64be_lo_hi'
> /home/b05471/repos/cryptodev-2.6/drivers/crypto/caam/regs.h:151:
> undefined reference to `.ioread64_lo_hi'
> /home/b05471/repos/cryptodev-2.6/drivers/crypto/caam/regs.h:151:
> undefined reference to `.ioread64_lo_hi'
> /home/b05471/repos/cryptodev-2.6/drivers/crypto/caam/regs.h:154:
> undefined reference to `.ioread64be_lo_hi'
> drivers/crypto/caam/jr.o: In function `wr_reg64':
> /home/b05471/repos/cryptodev-2.6/drivers/crypto/caam/regs.h:141:
> undefined reference to `.iowrite64_lo_hi'
> /home/b05471/repos/cryptodev-2.6/drivers/crypto/caam/regs.h:141:
> undefined reference to `.iowrite64_lo_hi'
> /home/b05471/repos/cryptodev-2.6/drivers/crypto/caam/regs.h:144:
> undefined reference to `.iowrite64be_lo_hi'
> /home/b05471/repos/cryptodev-2.6/drivers/crypto/caam/regs.h:144:
> undefined reference to `.iowrite64be_lo_hi'
> make: *** [vmlinux] Error 1
>
include/asm-generic/iomap.h is included before
include/linux/io-64-nonatomic-lo-hi.h:

include/linux/io.h -> arch/powerpc/include/asm/io.h ->
include/asm-generic/iomap.h

Thus, the "extern" version of ioread64_lo_hi and friends will be used
(and not the inline version from io-64-nonatomic-lo-hi.h).

But for this kernel .config:
-CONFIG_GENERIC_IOMAP=n and
-there is no implementation of io{read|write}64[be]{_lo_hi|_hi_lo} in
arch/powerpc/kernel/iomap.c

Regards,
Horia