On 10/04/2013 07:40 PM, Victor Kamensky wrote:
Hi Maxim,
readl and writel are stronger version of readl_realxed and writel_relaxed:
#define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; }) #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
They just add __iormb and __iowmb, I think it is very dangerous thing to drop those memory barriers. I don't think your change is correct and/or it requires way better explanation.
I've run into the same crash while working on 3.12-rc3 BE issues. In fact I saw this failure on both BE and LE and on old versions of BE kernels when I tried to use 4.8 gcc version from 13.09 release. When I fall back to 4.7 (i.e 13.04) it works fine
I would think it is compiler issue or preexisting issue in the code uncovered by compiler change. Personally I think it is the first. Since I am chasing another problem I did not have time to look more deeply into the issue. IMHO it definitely require more digging. In mean time you can quickly check your current version and try another one if your looks as one described in this email.
Thanks, Victor
Ah, yes, it __raw_write has direct access and writel swaps bits.
If it's compiler issue then it has to be simple to compare objdump disasm output for that function.
Maxim.
On 4 October 2013 05:42, Maxim Uvarov maxim.uvarov@linaro.org wrote:
On 10/04/2013 04:30 PM, Antonio Terceiro wrote:
On Thu, Oct 03, 2013 at 01:23:14PM +0300, Fathi Boudra wrote:
Our aarch64 support doesn't use QEMU. We use OE and extract archives of cross-built binaries.
According to previous comments, the problem is that we try to run Ubuntu specific commands. Most likely because LAVA code path detects the rootfs and seems to think it's Ubuntu.
In BE case, LAVA behavior should be similar to aarch64:
- LAVA detects OE
- we don't run native OS commands but only extract archives (QEMU
isn't involved, or flash-kernel...)
Actually those commands are run regardless of which OS is in the image, but on little endian images it is harmless. The fix for this is to make the second commmand (the one that failed aborting the job) condition on the first one, which is allowed to fail:
https://git.linaro.org/gitweb?p=lava/lava-dispatcher.git%3Ba=commitdiff%3Bh=...
With this change in, I was able to reproduce that job up to the point of booting the big endian kernel - but the kernel does not boot:
https://staging.validation.linaro.org/scheduler/job/3369/log_file
(note that is the staging LAVA server, I will be looking into deploying this change to the production server later today)
I failed on xhci.
Needed fix like that: diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 77600ce..6d40a4d 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1572,12 +1572,12 @@ static inline struct usb_hcd *xhci_to_hcd(struct xhci_hcd *xhci) static inline unsigned int xhci_readl(const struct xhci_hcd *xhci, __le32 __iomem *regs) {
return readl(regs);
} static inline void xhci_writel(struct xhci_hcd *xhci, const unsigned int val, __le32 __iomem *regs) {return readl_relaxed(regs);
writel(val, regs);
writel_relaxed(val, regs);
}
/*
@@ -1593,8 +1593,8 @@ static inline u64 xhci_read_64(const struct xhci_hcd *xhci, __le64 __iomem *regs) { __u32 __iomem *ptr = (__u32 __iomem *) regs;
u64 val_lo = readl(ptr);
u64 val_hi = readl(ptr + 1);
u64 val_lo = readl_relaxed(ptr);
} static inline void xhci_write_64(struct xhci_hcd *xhci,u64 val_hi = readl_relaxed(ptr + 1); return val_lo + (val_hi << 32);
@@ -1604,8 +1604,8 @@ static inline void xhci_write_64(struct xhci_hcd *xhci, u32 val_lo = lower_32_bits(val); u32 val_hi = upper_32_bits(val);
writel(val_lo, ptr);
writel(val_hi, ptr + 1);
writel_relaxed(val_lo, ptr);
}writel_relaxed(val_hi, ptr + 1);
Please let me know when it will be possible to run be kernels in lava. I can test patch.
Thank you, Maxim.