Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memregion: Drop unused IORES_DESC_* parameter from cpu_cache_invalidate_memregion()

The res_desc parameter was originally introduced for documentation purposes
and with the idea that with HDM-DB CXL invalidation could be triggered from
the device. That has not come to pass and the continued existence of the
option is confusing when we add a range in the following patch which might
not be a strict subset of the res_desc. So avoid that confusion by dropping
the parameter.

Link: https://lore.kernel.org/linux-mm/686eedb25ed02_24471002e@dwillia2-xfh.jf.intel.com.notmuch/
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

authored by

Jonathan Cameron and committed by
Conor Dooley
f49ae864 d52341da

+7 -8
+1 -1
arch/x86/mm/pat/set_memory.c
··· 368 368 } 369 369 EXPORT_SYMBOL_NS_GPL(cpu_cache_has_invalidate_memregion, "DEVMEM"); 370 370 371 - int cpu_cache_invalidate_memregion(int res_desc) 371 + int cpu_cache_invalidate_memregion(void) 372 372 { 373 373 if (WARN_ON_ONCE(!cpu_cache_has_invalidate_memregion())) 374 374 return -ENXIO;
+1 -1
drivers/cxl/core/region.c
··· 228 228 return -ENXIO; 229 229 } 230 230 231 - cpu_cache_invalidate_memregion(IORES_DESC_CXL); 231 + cpu_cache_invalidate_memregion(); 232 232 return 0; 233 233 } 234 234
+1 -1
drivers/nvdimm/region.c
··· 110 110 * here is ok. 111 111 */ 112 112 if (cpu_cache_has_invalidate_memregion()) 113 - cpu_cache_invalidate_memregion(IORES_DESC_PERSISTENT_MEMORY); 113 + cpu_cache_invalidate_memregion(); 114 114 } 115 115 116 116 static int child_notify(struct device *dev, void *data)
+1 -1
drivers/nvdimm/region_devs.c
··· 90 90 } 91 91 } 92 92 93 - cpu_cache_invalidate_memregion(IORES_DESC_PERSISTENT_MEMORY); 93 + cpu_cache_invalidate_memregion(); 94 94 out: 95 95 for (i = 0; i < nd_region->ndr_mappings; i++) { 96 96 struct nd_mapping *nd_mapping = &nd_region->mapping[i];
+3 -4
include/linux/memregion.h
··· 26 26 27 27 /** 28 28 * cpu_cache_invalidate_memregion - drop any CPU cached data for 29 - * memregions described by @res_desc 30 - * @res_desc: one of the IORES_DESC_* types 29 + * memregion 31 30 * 32 31 * Perform cache maintenance after a memory event / operation that 33 32 * changes the contents of physical memory in a cache-incoherent manner. ··· 45 46 * the cache maintenance. 46 47 */ 47 48 #ifdef CONFIG_ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION 48 - int cpu_cache_invalidate_memregion(int res_desc); 49 + int cpu_cache_invalidate_memregion(void); 49 50 bool cpu_cache_has_invalidate_memregion(void); 50 51 #else 51 52 static inline bool cpu_cache_has_invalidate_memregion(void) ··· 53 54 return false; 54 55 } 55 56 56 - static inline int cpu_cache_invalidate_memregion(int res_desc) 57 + static inline int cpu_cache_invalidate_memregion(void) 57 58 { 58 59 WARN_ON_ONCE("CPU cache invalidation required"); 59 60 return -ENXIO;