qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] ppc: Fix sam460ex devicetree when booting the L


From: BALATON Zoltan
Subject: Re: [Qemu-devel] [PATCH] ppc: Fix sam460ex devicetree when booting the Linux kernel
Date: Sat, 23 Jun 2018 22:55:11 +0200 (CEST)
User-agent: Alpine 2.21 (BSF 202 2017-01-01)

On Fri, 22 Jun 2018, Guenter Roeck wrote:
The problem is this (from the kernel diffs provided by aCube):

#if defined(CONFIG_PPC32)
-#define smc501_readl(addr)             ioread32be((addr))
-#define smc501_writel(val, addr)       iowrite32be((val), (addr))
+#define smc501_readl(addr)             ioread32((addr))
+#define smc501_writel(val, addr)       iowrite32((val), (addr))
#else
#define smc501_readl(addr)             readl(addr)
#define smc501_writel(val, addr)       writel(val, addr)

This is a bit fishy since the cpu is big endian and iowrite32be()
should be identical to iowrite32(), but apparently that is not the
case here. I don't think I'll have time to track this down, though.

Thanks for finding this, it helps even if you don't have time to track it down completely. Could this be related to using little endian PCI device on a big endian CPU? Not sure which implementation will this use but in arch/powerpc/kernel/iomap.c:

unsigned int ioread32(void __iomem *addr)
{
        return readl(addr);
}
unsigned int ioread32be(void __iomem *addr)
{
        return readl_be(addr);
}

so they don't look identical.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]