diff options
| -rw-r--r-- | arch/arm64/include/asm/jump_label.h | 4 | ||||
| -rw-r--r-- | arch/arm64/kernel/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm64/kernel/crash_core.c | 19 | ||||
| -rw-r--r-- | arch/arm64/kernel/machine_kexec.c | 11 | ||||
| -rw-r--r-- | include/asm-generic/io.h | 3 |
5 files changed, 24 insertions, 14 deletions
diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h index 1b5e0e843c3a..7e2b3e360086 100644 --- a/arch/arm64/include/asm/jump_label.h +++ b/arch/arm64/include/asm/jump_label.h | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | static __always_inline bool arch_static_branch(struct static_key *key, bool branch) | 29 | static __always_inline bool arch_static_branch(struct static_key *key, bool branch) |
| 30 | { | 30 | { |
| 31 | asm goto("1: nop\n\t" | 31 | asm_volatile_goto("1: nop\n\t" |
| 32 | ".pushsection __jump_table, \"aw\"\n\t" | 32 | ".pushsection __jump_table, \"aw\"\n\t" |
| 33 | ".align 3\n\t" | 33 | ".align 3\n\t" |
| 34 | ".quad 1b, %l[l_yes], %c0\n\t" | 34 | ".quad 1b, %l[l_yes], %c0\n\t" |
| @@ -42,7 +42,7 @@ l_yes: | |||
| 42 | 42 | ||
| 43 | static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) | 43 | static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) |
| 44 | { | 44 | { |
| 45 | asm goto("1: b %l[l_yes]\n\t" | 45 | asm_volatile_goto("1: b %l[l_yes]\n\t" |
| 46 | ".pushsection __jump_table, \"aw\"\n\t" | 46 | ".pushsection __jump_table, \"aw\"\n\t" |
| 47 | ".align 3\n\t" | 47 | ".align 3\n\t" |
| 48 | ".quad 1b, %l[l_yes], %c0\n\t" | 48 | ".quad 1b, %l[l_yes], %c0\n\t" |
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 95ac7374d723..4c8b13bede80 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile | |||
| @@ -54,6 +54,7 @@ arm64-obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o \ | |||
| 54 | arm64-obj-$(CONFIG_ARM64_RELOC_TEST) += arm64-reloc-test.o | 54 | arm64-obj-$(CONFIG_ARM64_RELOC_TEST) += arm64-reloc-test.o |
| 55 | arm64-reloc-test-y := reloc_test_core.o reloc_test_syms.o | 55 | arm64-reloc-test-y := reloc_test_core.o reloc_test_syms.o |
| 56 | arm64-obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 56 | arm64-obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
| 57 | arm64-obj-$(CONFIG_CRASH_CORE) += crash_core.o | ||
| 57 | arm64-obj-$(CONFIG_ARM_SDE_INTERFACE) += sdei.o | 58 | arm64-obj-$(CONFIG_ARM_SDE_INTERFACE) += sdei.o |
| 58 | arm64-obj-$(CONFIG_ARM64_SSBD) += ssbd.o | 59 | arm64-obj-$(CONFIG_ARM64_SSBD) += ssbd.o |
| 59 | 60 | ||
diff --git a/arch/arm64/kernel/crash_core.c b/arch/arm64/kernel/crash_core.c new file mode 100644 index 000000000000..ca4c3e12d8c5 --- /dev/null +++ b/arch/arm64/kernel/crash_core.c | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0 | ||
| 2 | /* | ||
| 3 | * Copyright (C) Linaro. | ||
| 4 | * Copyright (C) Huawei Futurewei Technologies. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <linux/crash_core.h> | ||
| 8 | #include <asm/memory.h> | ||
| 9 | |||
| 10 | void arch_crash_save_vmcoreinfo(void) | ||
| 11 | { | ||
| 12 | VMCOREINFO_NUMBER(VA_BITS); | ||
| 13 | /* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */ | ||
| 14 | vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n", | ||
| 15 | kimage_voffset); | ||
| 16 | vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n", | ||
| 17 | PHYS_OFFSET); | ||
| 18 | vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset()); | ||
| 19 | } | ||
diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index f6a5c6bc1434..922add8adb74 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c | |||
| @@ -358,14 +358,3 @@ void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) | |||
| 358 | } | 358 | } |
| 359 | } | 359 | } |
| 360 | #endif /* CONFIG_HIBERNATION */ | 360 | #endif /* CONFIG_HIBERNATION */ |
| 361 | |||
| 362 | void arch_crash_save_vmcoreinfo(void) | ||
| 363 | { | ||
| 364 | VMCOREINFO_NUMBER(VA_BITS); | ||
| 365 | /* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */ | ||
| 366 | vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n", | ||
| 367 | kimage_voffset); | ||
| 368 | vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n", | ||
| 369 | PHYS_OFFSET); | ||
| 370 | vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset()); | ||
| 371 | } | ||
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 66d1d45fa2e1..d356f802945a 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
| @@ -1026,7 +1026,8 @@ static inline void __iomem *ioremap_wt(phys_addr_t offset, size_t size) | |||
| 1026 | #define ioport_map ioport_map | 1026 | #define ioport_map ioport_map |
| 1027 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) | 1027 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) |
| 1028 | { | 1028 | { |
| 1029 | return PCI_IOBASE + (port & MMIO_UPPER_LIMIT); | 1029 | port &= IO_SPACE_LIMIT; |
| 1030 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; | ||
| 1030 | } | 1031 | } |
| 1031 | #endif | 1032 | #endif |
| 1032 | 1033 | ||
