From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dgHWK-0006nT-1h for linux-mtd@lists.infradead.org; Fri, 11 Aug 2017 21:31:06 +0000 Received: by mail-oi0-x242.google.com with SMTP id s21so4445373oie.5 for ; Fri, 11 Aug 2017 14:30:40 -0700 (PDT) MIME-Version: 1.0 Sender: arndbergmann@gmail.com In-Reply-To: References: <1501851740-14125-1-git-send-email-matthew.weber@rockwellcollins.com> <20170809201047.57fd6976@bbrezillon> From: Arnd Bergmann Date: Fri, 11 Aug 2017 23:30:39 +0200 Message-ID: Subject: Re: [PATCH] map-ram chip driver: 16-bit block transfer To: Sanjay Tandel Cc: Boris Brezillon , Matt Weber , linux-mtd Content-Type: text/plain; charset="UTF-8" List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Aug 11, 2017 at 11:03 PM, Sanjay Tandel wrote: > On Fri, Aug 11, 2017 at 2:41 PM, Arnd Bergmann wrote: >> On Fri, Aug 11, 2017 at 6:50 PM, Sanjay Tandel >> On almost all ARM platforms, it would use 32-bit accesses these days. On what >> kernel version, ARM platform and endianess do you see memcpy_toio() use 8-bit >> access? >> > > We use version 4.1.8 with Freescale LS1021A( cortex-a7 core, little-endian). > With the newer versions of kernel also, I can see same 8-bit > implementation for 32-bit ARM arch. I see. Commit 7ddfe625cbc1 ("ARM: optimize memset_io()/memcpy_fromio()/memcpy_toio()") was merged in linux-4.2 and changed this to use mostly 32-bit accesses and a bug in it fixed in commit 1bd46782d08b ("ARM: avoid unwanted GCC memset()/memcpy() optimisations for IO variants"). > BTW, for other arch also memcpy_toio() uses combination of 32-bit(or > 64-bit) and 8-bit accesses, > which may not work here.Because we need all accesses to be of same > size(bank-width). Could you try with a newer kernel or with the 7ddfe625cbc1/1bd46782d08b commits backported to see if that works for you though? At the very least that should impact the description of the patch we end up applying, since your current text no longer matches what the kernel does. Arnd