diff options
author | James Morse <james.morse@arm.com> | 2017-11-06 13:44:25 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-11-07 06:13:21 -0500 |
commit | 520e18a5080d2c444a03280d99c8a35cb667d321 (patch) | |
tree | 3f49440e7a49516a3c02e4c8c896c8ef795bfe56 | |
parent | 4f89fa286f6729312e227e7c2d764e8e7b9d340e (diff) |
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>
-rw-r--r-- | drivers/acpi/apei/ghes.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 572b6c7303ed..f14695e744d0 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -114,19 +114,7 @@ static DEFINE_MUTEX(ghes_list_mutex); | |||
114 | * from BIOS to Linux can be determined only in NMI, IRQ or timer | 114 | * from BIOS to Linux can be determined only in NMI, IRQ or timer |
115 | * handler, but general ioremap can not be used in atomic context, so | 115 | * handler, but general ioremap can not be used in atomic context, so |
116 | * the fixmap is used instead. | 116 | * the fixmap is used instead. |
117 | */ | 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 | /* | ||
130 | * These 2 spinlocks are used to prevent the fixmap entries from being used | 118 | * These 2 spinlocks are used to prevent the fixmap entries from being used |
131 | * simultaneously. | 119 | * simultaneously. |
132 | */ | 120 | */ |
@@ -141,23 +129,6 @@ static atomic_t ghes_estatus_cache_alloced; | |||
141 | 129 | ||
142 | static int ghes_panic_timeout __read_mostly = 30; | 130 | static int ghes_panic_timeout __read_mostly = 30; |
143 | 131 | ||
144 | static int ghes_ioremap_init(void) | ||
145 | { | ||
146 | ghes_ioremap_area = __get_vm_area(PAGE_SIZE * GHES_IOREMAP_PAGES, | ||
147 | VM_IOREMAP, VMALLOC_START, VMALLOC_END); | ||
148 | if (!ghes_ioremap_area) { | ||
149 | pr_err(GHES_PFX "Failed to allocate virtual memory area for atomic ioremap.\n"); | ||
150 | return -ENOMEM; | ||
151 | } | ||
152 | |||
153 | return 0; | ||
154 | } | ||
155 | |||
156 | static void ghes_ioremap_exit(void) | ||
157 | { | ||
158 | free_vm_area(ghes_ioremap_area); | ||
159 | } | ||
160 | |||
161 | static void __iomem *ghes_ioremap_pfn_nmi(u64 pfn) | 132 | static void __iomem *ghes_ioremap_pfn_nmi(u64 pfn) |
162 | { | 133 | { |
163 | phys_addr_t paddr; | 134 | phys_addr_t paddr; |
@@ -1247,13 +1218,9 @@ static int __init ghes_init(void) | |||
1247 | 1218 | ||
1248 | ghes_nmi_init_cxt(); | 1219 | ghes_nmi_init_cxt(); |
1249 | 1220 | ||
1250 | rc = ghes_ioremap_init(); | ||
1251 | if (rc) | ||
1252 | goto err; | ||
1253 | |||
1254 | rc = ghes_estatus_pool_init(); | 1221 | rc = ghes_estatus_pool_init(); |
1255 | if (rc) | 1222 | if (rc) |
1256 | goto err_ioremap_exit; | 1223 | goto err; |
1257 | 1224 | ||
1258 | rc = ghes_estatus_pool_expand(GHES_ESTATUS_CACHE_AVG_SIZE * | 1225 | rc = ghes_estatus_pool_expand(GHES_ESTATUS_CACHE_AVG_SIZE * |
1259 | GHES_ESTATUS_CACHE_ALLOCED_MAX); | 1226 | GHES_ESTATUS_CACHE_ALLOCED_MAX); |
@@ -1277,8 +1244,6 @@ static int __init ghes_init(void) | |||
1277 | return 0; | 1244 | return 0; |
1278 | err_pool_exit: | 1245 | err_pool_exit: |
1279 | ghes_estatus_pool_exit(); | 1246 | ghes_estatus_pool_exit(); |
1280 | err_ioremap_exit: | ||
1281 | ghes_ioremap_exit(); | ||
1282 | err: | 1247 | err: |
1283 | return rc; | 1248 | return rc; |
1284 | } | 1249 | } |