* [PATCH] io-mapping: remove fallback for writecombine
@ 2021-10-20 20:48 Lucas De Marchi
0 siblings, 0 replies; only message in thread
From: Lucas De Marchi @ 2021-10-20 20:48 UTC (permalink / raw)
To: dri-devel, linux-kernel
Cc: Chris Wilson, Daniel Vetter, Joonas Lahtinen, linux-mm,
Peter Zijlstra, Andrew Morton
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 <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: linux-mm@kvack.org
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
include/linux/io-mapping.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index e9743cfd8585..66a774d2710e 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -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;
}
--
2.33.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-20 20:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 20:48 [PATCH] io-mapping: remove fallback for writecombine Lucas De Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox