Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1354901
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] arc: use little endian accesses |
| Date | 2016-03-10 08:50 +0100 |
| Message-ID | <rb3w6-3HD-11@gated-at.bofh.it> (permalink) |
| References | <raQ5R-2LL-29@gated-at.bofh.it> <rb11g-2cG-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thursday 10 March 2016, Vineet Gupta wrote: > On Wednesday 09 March 2016 10:51 PM, Lada Trimasova wrote: > > Memory access primitives should use cpu_to_le16, cpu_to_le32, le16_to_cpu > > and le32_to_cpu because it is not really guaranteed that drivers handles > > any ordering themselves. > > That is the driver issue. readxx as API simply returns data in native endianness. > We've had EZChip running big endian and so far and they didn't need this change. Most drivers using readl() or readl_relaxed() expect those to perform byte swaps on big-endian architectures, as the registers tend to be fixed endian, so the change seems reasonable. It depends a little bit on how endian mode is implemented in the CPU: do you follow the normal model of swapping byte order in the load/store instructions of the CPU when running big-endian, or is the CPU always running little-endian but the bus addresses get mangled on byte accesses to give the illusion of a big-endian system? Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] arc: use little endian accesses Lada Trimasova <Lada.Trimasova@synopsys.com> - 2016-03-09 18:30 +0100
Re: [PATCH] arc: use little endian accesses Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-10 06:10 +0100
Re: [PATCH] arc: use little endian accesses Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-10 06:30 +0100
Re: [PATCH] arc: use little endian accesses Arnd Bergmann <arnd@arndb.de> - 2016-03-10 08:50 +0100
Re: [PATCH] arc: use little endian accesses Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-11 06:20 +0100
Re: [PATCH] arc: use little endian accesses Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-03-10 08:50 +0100
Re: [PATCH] arc: use little endian accesses Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-10 11:00 +0100
Re: [PATCH] arc: use little endian accesses Lada Trimasova <Lada.Trimasova@synopsys.com> - 2016-03-10 20:00 +0100
Re: [PATCH] arc: use little endian accesses Arnd Bergmann <arnd@arndb.de> - 2016-03-10 20:30 +0100
Re: [PATCH] arc: use little endian accesses Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-11 13:50 +0100
Re: [PATCH] arc: use little endian accesses Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-12 05:30 +0100
Re: [PATCH] arc: use little endian accesses Noam Camus <noamca@mellanox.com> - 2016-03-11 06:30 +0100
csiph-web