acpi.c (3eb66e91a25497065c5322b1268cbc3953642227) acpi.c (d44f1b8dd7e66d80cc4205809e5ace866bd851da)
1/*
2 * ARM64 Specific Low-Level ACPI Boot Support
3 *
4 * Copyright (C) 2013-2014, Linaro Ltd.
5 * Author: Al Stone <al.stone@linaro.org>
6 * Author: Graeme Gregory <graeme.gregory@linaro.org>
7 * Author: Hanjun Guo <hanjun.guo@linaro.org>
8 * Author: Tomasz Nowicki <tomasz.nowicki@linaro.org>

--- 13 unchanged lines hidden (view full) ---

22#include <linux/init.h>
23#include <linux/irq.h>
24#include <linux/irqdomain.h>
25#include <linux/memblock.h>
26#include <linux/of_fdt.h>
27#include <linux/smp.h>
28#include <linux/serial_core.h>
29
1/*
2 * ARM64 Specific Low-Level ACPI Boot Support
3 *
4 * Copyright (C) 2013-2014, Linaro Ltd.
5 * Author: Al Stone <al.stone@linaro.org>
6 * Author: Graeme Gregory <graeme.gregory@linaro.org>
7 * Author: Hanjun Guo <hanjun.guo@linaro.org>
8 * Author: Tomasz Nowicki <tomasz.nowicki@linaro.org>

--- 13 unchanged lines hidden (view full) ---

22#include <linux/init.h>
23#include <linux/irq.h>
24#include <linux/irqdomain.h>
25#include <linux/memblock.h>
26#include <linux/of_fdt.h>
27#include <linux/smp.h>
28#include <linux/serial_core.h>
29
30#include <acpi/ghes.h>
30#include <asm/cputype.h>
31#include <asm/cpu_ops.h>
31#include <asm/cputype.h>
32#include <asm/cpu_ops.h>
33#include <asm/daifflags.h>
32#include <asm/pgtable.h>
33#include <asm/smp_plat.h>
34
35int acpi_noirq = 1; /* skip ACPI IRQ initialization */
36int acpi_disabled = 1;
37EXPORT_SYMBOL(acpi_disabled);
38
39int acpi_pci_disabled = 1; /* skip ACPI PCI scan and IRQ initialization */

--- 211 unchanged lines hidden (view full) ---

251 if (attr & EFI_MEMORY_WB)
252 return PAGE_KERNEL;
253 if (attr & EFI_MEMORY_WT)
254 return __pgprot(PROT_NORMAL_WT);
255 if (attr & EFI_MEMORY_WC)
256 return __pgprot(PROT_NORMAL_NC);
257 return __pgprot(PROT_DEVICE_nGnRnE);
258}
34#include <asm/pgtable.h>
35#include <asm/smp_plat.h>
36
37int acpi_noirq = 1; /* skip ACPI IRQ initialization */
38int acpi_disabled = 1;
39EXPORT_SYMBOL(acpi_disabled);
40
41int acpi_pci_disabled = 1; /* skip ACPI PCI scan and IRQ initialization */

--- 211 unchanged lines hidden (view full) ---

253 if (attr & EFI_MEMORY_WB)
254 return PAGE_KERNEL;
255 if (attr & EFI_MEMORY_WT)
256 return __pgprot(PROT_NORMAL_WT);
257 if (attr & EFI_MEMORY_WC)
258 return __pgprot(PROT_NORMAL_NC);
259 return __pgprot(PROT_DEVICE_nGnRnE);
260}
261
262/*
263 * Claim Synchronous External Aborts as a firmware first notification.
264 *
265 * Used by KVM and the arch do_sea handler.
266 * @regs may be NULL when called from process context.
267 */
268int apei_claim_sea(struct pt_regs *regs)
269{
270 int err = -ENOENT;
271 unsigned long current_flags;
272
273 if (!IS_ENABLED(CONFIG_ACPI_APEI_GHES))
274 return err;
275
276 current_flags = arch_local_save_flags();
277
278 /*
279 * SEA can interrupt SError, mask it and describe this as an NMI so
280 * that APEI defers the handling.
281 */
282 local_daif_restore(DAIF_ERRCTX);
283 nmi_enter();
284 err = ghes_notify_sea();
285 nmi_exit();
286 local_daif_restore(current_flags);
287
288 return err;
289}