| 34 | |
| 35 | Edit: |
| 36 | |
| 37 | ioremap_cache() is uncached by default since a long time. |
| 38 | |
| 39 | all 5.X kernels down to version 5.0 |
| 40 | all 4.X kernels down to version 4.0 |
| 41 | all 3.X kernels down to version 3.0 |
| 42 | |
| 43 | from version 2.6.25 onwards we know for sure |
| 44 | that ioremap_cache() has uncached semantics by default. |
| 45 | |
| 46 | [https://elixir.bootlin.com/linux/v2.6.25/source/include/asm-x86/io_64.h#L161][[BR]] |
| 47 | |
| 48 | {{{ |
| 49 | * This one maps high address device memory and turns off caching for that area. |
| 50 | * it's useful if some control registers are in such an area and write combining |
| 51 | * or read caching is not desirable: |
| 52 | */ |
| 53 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); |
| 54 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); |
| 55 | |
| 56 | /* |
| 57 | * The default ioremap() behavior is non-cached: |
| 58 | */ |
| 59 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) |
| 60 | { |
| 61 | return ioremap_nocache(offset, size); |
| 62 | } |
| 63 | }}} |
| 64 | |
| 65 | That means we can and should replace ioremap_nocache() usage |
| 66 | with ioremap_cache() and make kernel version 2.6.25 the tipping |
| 67 | point for this. |