[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11273481.VQZWGoSGBC@wuerfel>
Date: Thu, 07 Feb 2013 01:34:37 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Michal Simek <monstr@...str.eu>
Cc: Grant Likely <grant.likely@...retlab.ca>,
Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Vineet Gupta <Vineet.Gupta1@...opsys.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
dahinds@...rs.sourceforge.net
Subject: Re: [PATCH] drivers/block/xsysace - replace in(out)_8/in(out)_be16/in(out)_le16 with generic iowrite(read)8/16(be)
On Wednesday 06 February 2013 17:21:37 Michal Simek wrote:
> I have looked at the patches from more practical side and I have tested it on
> microblaze big endian in 16bit mode and I have found that sysace driver
> stop to work.
> After that I have looked at ioread/iowrite microblaze implementation
> and implementation of that functions is wrong.
> I have fixed it but looking at using asm-generic/io.h for microblaze.
>
> I will do more tests and let you know.
Well, I think they are only wrong in the way that they ignore
endianess. You can fix that by changing them to be identical
to the in_le/in_be families.
However, I would also recommend changing your __raw_* accessors
to inline assembly functions rather than pointer dereferences,
because we have had problems in the past where gcc (when faced
with undefined C) silently turned 32-bit accesses into multiples
of byte accesses, which can be fatal for MMIO. The asm-generic
version obviously cannot get this right.
The PCI I/O space handling, as mentioned, is completely broken
on microblaze, and you can either use the approach from asm-generic
when you set PCI_IOBASE match your isa_io_base.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists