Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315762
| From | Brian Norris <computersforpeace@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() |
| Date | 2016-01-23 23:00 +0100 |
| Message-ID | <qUenT-2YV-3@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <qOA7M-3BQ-15@gated-at.bofh.it> <qOFTR-7OQ-19@gated-at.bofh.it> <qOKqu-2lS-29@gated-at.bofh.it> <qORBE-7kb-15@gated-at.bofh.it> <qRn4l-5eL-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, Jan 16, 2016 at 01:38:11AM +0100, Rafał Miłecki wrote: > So I wanted to stick to the cached mapping, [...] I mentioned this earlier on, but I don't feel like I've gotten a clear answer. Is a cached mapping actually safe here? From the looks of it, the memory mapping is a read-only memory-mapped flash, and flash writes / erasures are done through a different bus (register writes vis BCMA bus). So if we have a cached mapping of that memory, it doens't naturally synchronize with any write/erase operations. Doesn't this mean you might get stale data if you do a sequence of read / erase / read, for instance, since the 2nd read will return cached data from the 1st read? IIUC, this could be solved by: (a) using an uncached mapping or (b) explicitly invalidating the relevant region after doing flash writes or erasures But I wonder why you haven't seen any problems if you've been using KSEG0 (cached) this whole time. Maybe just luck? Or you don't actually write to the flash that much? Brian
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() Rafał Miłecki <zajec5@gmail.com> - 2016-01-16 01:40 +0100
Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() "Maciej W. Rozycki" <macro@linux-mips.org> - 2016-01-16 20:40 +0100
Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() Brian Norris <computersforpeace@gmail.com> - 2016-01-23 23:00 +0100
Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() Rafał Miłecki <zajec5@gmail.com> - 2016-01-24 10:50 +0100
Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() "Maciej W. Rozycki" <macro@imgtec.com> - 2016-01-24 21:30 +0100
Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() Rafał Miłecki <zajec5@gmail.com> - 2016-01-24 22:40 +0100
Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() "Maciej W. Rozycki" <macro@imgtec.com> - 2016-01-25 00:10 +0100
csiph-web