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

ACPI / APEI: Remove ghes_ioremap_area

Now that nothing is using the ghes_ioremap_area pages, rip them out.

Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Borislav Petkov <bp@suse.de>
Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: All applicable <stable@vger.kernel.org>

authored by

James Morse and committed by
Rafael J. Wysocki
520e18a5 4f89fa28

+2 -37
+2 -37
drivers/acpi/apei/ghes.c
··· 114 114 * from BIOS to Linux can be determined only in NMI, IRQ or timer 115 115 * handler, but general ioremap can not be used in atomic context, so 116 116 * the fixmap is used instead. 117 - */ 118 - 119 - /* 120 - * Two virtual pages are used, one for IRQ/PROCESS context, the other for 121 - * NMI context (optionally). 122 - */ 123 - #define GHES_IOREMAP_PAGES 2 124 - #define GHES_IOREMAP_IRQ_PAGE(base) (base) 125 - #define GHES_IOREMAP_NMI_PAGE(base) ((base) + PAGE_SIZE) 126 - 127 - /* virtual memory area for atomic ioremap */ 128 - static struct vm_struct *ghes_ioremap_area; 129 - /* 117 + * 130 118 * These 2 spinlocks are used to prevent the fixmap entries from being used 131 119 * simultaneously. 132 120 */ ··· 128 140 static atomic_t ghes_estatus_cache_alloced; 129 141 130 142 static int ghes_panic_timeout __read_mostly = 30; 131 - 132 - static int ghes_ioremap_init(void) 133 - { 134 - ghes_ioremap_area = __get_vm_area(PAGE_SIZE * GHES_IOREMAP_PAGES, 135 - VM_IOREMAP, VMALLOC_START, VMALLOC_END); 136 - if (!ghes_ioremap_area) { 137 - pr_err(GHES_PFX "Failed to allocate virtual memory area for atomic ioremap.\n"); 138 - return -ENOMEM; 139 - } 140 - 141 - return 0; 142 - } 143 - 144 - static void ghes_ioremap_exit(void) 145 - { 146 - free_vm_area(ghes_ioremap_area); 147 - } 148 143 149 144 static void __iomem *ghes_ioremap_pfn_nmi(u64 pfn) 150 145 { ··· 1218 1247 1219 1248 ghes_nmi_init_cxt(); 1220 1249 1221 - rc = ghes_ioremap_init(); 1222 - if (rc) 1223 - goto err; 1224 - 1225 1250 rc = ghes_estatus_pool_init(); 1226 1251 if (rc) 1227 - goto err_ioremap_exit; 1252 + goto err; 1228 1253 1229 1254 rc = ghes_estatus_pool_expand(GHES_ESTATUS_CACHE_AVG_SIZE * 1230 1255 GHES_ESTATUS_CACHE_ALLOCED_MAX); ··· 1244 1277 return 0; 1245 1278 err_pool_exit: 1246 1279 ghes_estatus_pool_exit(); 1247 - err_ioremap_exit: 1248 - ghes_ioremap_exit(); 1249 1280 err: 1250 1281 return rc; 1251 1282 }