Al Stone | 3765516 | 2015-03-24 14:02:37 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013-2014, Linaro Ltd. |
| 3 | * Author: Al Stone <al.stone@linaro.org> |
| 4 | * Author: Graeme Gregory <graeme.gregory@linaro.org> |
| 5 | * Author: Hanjun Guo <hanjun.guo@linaro.org> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation; |
| 10 | */ |
| 11 | |
| 12 | #ifndef _ASM_ACPI_H |
| 13 | #define _ASM_ACPI_H |
| 14 | |
Mark Salter | 652261a | 2015-03-24 14:02:38 +0000 | [diff] [blame^] | 15 | #include <linux/mm.h> |
| 16 | |
Al Stone | 3765516 | 2015-03-24 14:02:37 +0000 | [diff] [blame] | 17 | /* Basic configuration for ACPI */ |
| 18 | #ifdef CONFIG_ACPI |
Mark Salter | 652261a | 2015-03-24 14:02:38 +0000 | [diff] [blame^] | 19 | /* ACPI table mapping after acpi_gbl_permanent_mmap is set */ |
| 20 | static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, |
| 21 | acpi_size size) |
| 22 | { |
| 23 | if (!page_is_ram(phys >> PAGE_SHIFT)) |
| 24 | return ioremap(phys, size); |
| 25 | |
| 26 | return ioremap_cache(phys, size); |
| 27 | } |
| 28 | #define acpi_os_ioremap acpi_os_ioremap |
| 29 | |
Al Stone | 3765516 | 2015-03-24 14:02:37 +0000 | [diff] [blame] | 30 | #define acpi_strict 1 /* No out-of-spec workarounds on ARM64 */ |
| 31 | extern int acpi_disabled; |
| 32 | extern int acpi_noirq; |
| 33 | extern int acpi_pci_disabled; |
| 34 | |
| 35 | static inline void disable_acpi(void) |
| 36 | { |
| 37 | acpi_disabled = 1; |
| 38 | acpi_pci_disabled = 1; |
| 39 | acpi_noirq = 1; |
| 40 | } |
| 41 | |
| 42 | /* |
| 43 | * It's used from ACPI core in kdump to boot UP system with SMP kernel, |
| 44 | * with this check the ACPI core will not override the CPU index |
| 45 | * obtained from GICC with 0 and not print some error message as well. |
| 46 | * Since MADT must provide at least one GICC structure for GIC |
| 47 | * initialization, CPU will be always available in MADT on ARM64. |
| 48 | */ |
| 49 | static inline bool acpi_has_cpu_in_madt(void) |
| 50 | { |
| 51 | return true; |
| 52 | } |
| 53 | |
| 54 | static inline void arch_fix_phys_package_id(int num, u32 slot) { } |
| 55 | |
| 56 | #endif /* CONFIG_ACPI */ |
| 57 | |
| 58 | #endif /*_ASM_ACPI_H*/ |