mtd: physmap: actually prevent unaligned accesses
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | mtd: simple_map: make NO_XIP actually prevent unaligned accessesinclude/ | +23 | 0 replies | |
| 2/3 | mtd: physmap: allow setting no_unaligned_access for !OFdrivers/ include/ | +4 | 0 replies | |
| 3/3 | MIPS: BCM63XX: disable unaligned accesses for SMParch/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] mtd: physmap: actually prevent unaligned accesses
Commit d0788ce4924758249c9552c91cc33024d3434419 ("mtd: physmap_of: Add "no-unaligned-direct-access" DT property") intended to prevent unaligned accesses to the mapped flash by setting map.virt to NO_XIP.
But simple mapping's read_from/write_to still just call memcpy, which will do unaligned reads/writes at least on mips.
This causes problems on e.g. bcm63xx with smp, as both cores share a unaligned load/store unit, and unaligned reads sometimes read garbage.
This patchset aims at preventing unaligned accesses for good by making read_from/write_to check for NO_XIP and do a bytewise copy if one of to or from is unaligned.
Since this is mostly mtd stuff, it should go through the mtd tree.
Jonas Gorski (3):
mtd: simple_map: make NO_XIP actually prevent unaligned accesses
mtd: physmap: allow setting no_unaligned_access for !OF
MIPS: BCM63XX: disable unaligned accesses for SMP
arch/mips/bcm63xx/dev-flash.c | 1 + drivers/mtd/maps/physmap.c | 3 +++ include/linux/mtd/map.h | 26 +++++++++++++++++++++++--- include/linux/mtd/physmap.h | 1 + 4 files changed, 28 insertions(+), 3 deletions(-)
Signature · 1 line
2.0.0