Skip to contentSkip to conversation

io-mapping: remove fallback for writecombine

PATCH Applied Lucas De Marchi 1 participant 1 message Oct 20, 2021 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io-mapping: remove fallback for writecombine

The fallback was introduced in commit 80c33624e472 ("io-mapping: Fixup for different names of writecombine") to fix the build on microblaze.

5 years later, it seems all archs now provide a pgprot_writecombine(), so just remove the other possible fallbacks. For microblaze, pgprot_writecombine() is available since commit 97ccedd793ac ("microblaze: Provide pgprot_device/writecombine macros for nommu").

This is build-tested on microblaze with the following hack to always build mm/io-mapping.o and without diying on a x86-only macro (_PAGE_CACHE_MASK)

Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Andrew Morton <[email protected]>
---
 include/linux/io-mapping.h | 6 ------
 1 file changed, 6 deletions(-)
include/linux/io-mapping.h +0 -6
index e9743cfd8585..66a774d2710e 100644
@@ -132,13 +132,7 @@ io_mapping_init_wc(struct io_mapping *iomap,
 
 	iomap->base = base;
 	iomap->size = size;
-#if defined(pgprot_noncached_wc) /* archs can't agree on a name ... */
-	iomap->prot = pgprot_noncached_wc(PAGE_KERNEL);
-#elif defined(pgprot_writecombine)
 	iomap->prot = pgprot_writecombine(PAGE_KERNEL);
-#else
-	iomap->prot = pgprot_noncached(PAGE_KERNEL);
-#endif
 
 	return iomap;
 }
Signature · 1 line
2.33.1