diff options
| -rw-r--r-- | Documentation/arm64/memory.txt | 12 | ||||
| -rw-r--r-- | arch/arm64/Kconfig | 1 | ||||
| -rw-r--r-- | arch/arm64/include/asm/elf.h | 5 | ||||
| -rw-r--r-- | arch/arm64/include/asm/fpsimd.h | 5 | ||||
| -rw-r--r-- | arch/arm64/include/asm/io.h | 8 | ||||
| -rw-r--r-- | arch/arm64/include/asm/processor.h | 2 | ||||
| -rw-r--r-- | arch/arm64/include/asm/unistd.h | 1 | ||||
| -rw-r--r-- | arch/arm64/kernel/perf_event.c | 10 | ||||
| -rw-r--r-- | arch/arm64/kernel/process.c | 18 | ||||
| -rw-r--r-- | arch/arm64/kernel/smp.c | 3 | ||||
| -rw-r--r-- | arch/arm64/mm/init.c | 2 |
11 files changed, 20 insertions, 47 deletions
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt index dbbdcbba75a3..4110cca96bd6 100644 --- a/Documentation/arm64/memory.txt +++ b/Documentation/arm64/memory.txt | |||
| @@ -27,17 +27,17 @@ Start End Size Use | |||
| 27 | ----------------------------------------------------------------------- | 27 | ----------------------------------------------------------------------- |
| 28 | 0000000000000000 0000007fffffffff 512GB user | 28 | 0000000000000000 0000007fffffffff 512GB user |
| 29 | 29 | ||
| 30 | ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc | 30 | ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc |
| 31 | 31 | ||
| 32 | ffffffbbfffd0000 ffffffbcfffdffff 64KB [guard page] | 32 | ffffffbbffff0000 ffffffbbffffffff 64KB [guard page] |
| 33 | 33 | ||
| 34 | ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O space | 34 | ffffffbc00000000 ffffffbdffffffff 8GB vmemmap |
| 35 | 35 | ||
| 36 | ffffffbbffff0000 ffffffbcffffffff 64KB [guard page] | 36 | ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap] |
| 37 | 37 | ||
| 38 | ffffffbc00000000 ffffffbdffffffff 8GB vmemmap | 38 | ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space |
| 39 | 39 | ||
| 40 | ffffffbe00000000 ffffffbffbffffff ~8GB [guard, future vmmemap] | 40 | ffffffbbffff0000 ffffffbcffffffff ~2MB [guard] |
| 41 | 41 | ||
| 42 | ffffffbffc000000 ffffffbfffffffff 64MB modules | 42 | ffffffbffc000000 ffffffbfffffffff 64MB modules |
| 43 | 43 | ||
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index ef54a59a9e89..15ac18a56c93 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | config ARM64 | 1 | config ARM64 |
| 2 | def_bool y | 2 | def_bool y |
| 3 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 3 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE |
| 4 | select ARCH_WANT_COMPAT_IPC_PARSE_VERSION | ||
| 4 | select GENERIC_CLOCKEVENTS | 5 | select GENERIC_CLOCKEVENTS |
| 5 | select GENERIC_HARDIRQS_NO_DEPRECATED | 6 | select GENERIC_HARDIRQS_NO_DEPRECATED |
| 6 | select GENERIC_IOMAP | 7 | select GENERIC_IOMAP |
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index cf284649dfcb..07fea290d7c1 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h | |||
| @@ -25,12 +25,10 @@ | |||
| 25 | #include <asm/user.h> | 25 | #include <asm/user.h> |
| 26 | 26 | ||
| 27 | typedef unsigned long elf_greg_t; | 27 | typedef unsigned long elf_greg_t; |
| 28 | typedef unsigned long elf_freg_t[3]; | ||
| 29 | 28 | ||
| 30 | #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) | 29 | #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) |
| 31 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 30 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
| 32 | 31 | typedef struct user_fpsimd_state elf_fpregset_t; | |
| 33 | typedef struct user_fp elf_fpregset_t; | ||
| 34 | 32 | ||
| 35 | #define EM_AARCH64 183 | 33 | #define EM_AARCH64 183 |
| 36 | 34 | ||
| @@ -87,7 +85,6 @@ typedef struct user_fp elf_fpregset_t; | |||
| 87 | #define R_AARCH64_MOVW_PREL_G2_NC 292 | 85 | #define R_AARCH64_MOVW_PREL_G2_NC 292 |
| 88 | #define R_AARCH64_MOVW_PREL_G3 293 | 86 | #define R_AARCH64_MOVW_PREL_G3 293 |
| 89 | 87 | ||
| 90 | |||
| 91 | /* | 88 | /* |
| 92 | * These are used to set parameters in the core dumps. | 89 | * These are used to set parameters in the core dumps. |
| 93 | */ | 90 | */ |
diff --git a/arch/arm64/include/asm/fpsimd.h b/arch/arm64/include/asm/fpsimd.h index b42fab9f62a9..c43b4ac13008 100644 --- a/arch/arm64/include/asm/fpsimd.h +++ b/arch/arm64/include/asm/fpsimd.h | |||
| @@ -25,9 +25,8 @@ | |||
| 25 | * - FPSR and FPCR | 25 | * - FPSR and FPCR |
| 26 | * - 32 128-bit data registers | 26 | * - 32 128-bit data registers |
| 27 | * | 27 | * |
| 28 | * Note that user_fp forms a prefix of this structure, which is relied | 28 | * Note that user_fpsimd forms a prefix of this structure, which is |
| 29 | * upon in the ptrace FP/SIMD accessors. struct user_fpsimd_state must | 29 | * relied upon in the ptrace FP/SIMD accessors. |
| 30 | * form a prefix of struct fpsimd_state. | ||
| 31 | */ | 30 | */ |
| 32 | struct fpsimd_state { | 31 | struct fpsimd_state { |
| 33 | union { | 32 | union { |
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 74a2a7d304a9..54f6116697f7 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h | |||
| @@ -114,7 +114,7 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) | |||
| 114 | * I/O port access primitives. | 114 | * I/O port access primitives. |
| 115 | */ | 115 | */ |
| 116 | #define IO_SPACE_LIMIT 0xffff | 116 | #define IO_SPACE_LIMIT 0xffff |
| 117 | #define PCI_IOBASE ((void __iomem *)0xffffffbbfffe0000UL) | 117 | #define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_2M)) |
| 118 | 118 | ||
| 119 | static inline u8 inb(unsigned long addr) | 119 | static inline u8 inb(unsigned long addr) |
| 120 | { | 120 | { |
| @@ -225,9 +225,9 @@ extern void __iounmap(volatile void __iomem *addr); | |||
| 225 | #define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_XN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) | 225 | #define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_XN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) |
| 226 | #define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) | 226 | #define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) |
| 227 | 227 | ||
| 228 | #define ioremap(addr, size) __ioremap((addr), (size), PROT_DEVICE_nGnRE) | 228 | #define ioremap(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) |
| 229 | #define ioremap_nocache(addr, size) __ioremap((addr), (size), PROT_DEVICE_nGnRE) | 229 | #define ioremap_nocache(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) |
| 230 | #define ioremap_wc(addr, size) __ioremap((addr), (size), PROT_NORMAL_NC) | 230 | #define ioremap_wc(addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC)) |
| 231 | #define iounmap __iounmap | 231 | #define iounmap __iounmap |
| 232 | 232 | ||
| 233 | #define ARCH_HAS_IOREMAP_WC | 233 | #define ARCH_HAS_IOREMAP_WC |
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 5d810044feda..77f696c14339 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h | |||
| @@ -43,6 +43,8 @@ | |||
| 43 | #else | 43 | #else |
| 44 | #define STACK_TOP STACK_TOP_MAX | 44 | #define STACK_TOP STACK_TOP_MAX |
| 45 | #endif /* CONFIG_COMPAT */ | 45 | #endif /* CONFIG_COMPAT */ |
| 46 | |||
| 47 | #define ARCH_LOW_ADDRESS_LIMIT PHYS_MASK | ||
| 46 | #endif /* __KERNEL__ */ | 48 | #endif /* __KERNEL__ */ |
| 47 | 49 | ||
| 48 | struct debug_info { | 50 | struct debug_info { |
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 63f853f8b718..68aff2816e86 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #ifdef CONFIG_COMPAT | 16 | #ifdef CONFIG_COMPAT |
| 17 | #define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION | ||
| 18 | #define __ARCH_WANT_COMPAT_STAT64 | 17 | #define __ARCH_WANT_COMPAT_STAT64 |
| 19 | #define __ARCH_WANT_SYS_GETHOSTNAME | 18 | #define __ARCH_WANT_SYS_GETHOSTNAME |
| 20 | #define __ARCH_WANT_SYS_PAUSE | 19 | #define __ARCH_WANT_SYS_PAUSE |
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index ecbf2d81ec5c..c76c7241125b 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c | |||
| @@ -613,17 +613,11 @@ enum armv8_pmuv3_perf_types { | |||
| 613 | ARMV8_PMUV3_PERFCTR_BUS_ACCESS = 0x19, | 613 | ARMV8_PMUV3_PERFCTR_BUS_ACCESS = 0x19, |
| 614 | ARMV8_PMUV3_PERFCTR_MEM_ERROR = 0x1A, | 614 | ARMV8_PMUV3_PERFCTR_MEM_ERROR = 0x1A, |
| 615 | ARMV8_PMUV3_PERFCTR_BUS_CYCLES = 0x1D, | 615 | ARMV8_PMUV3_PERFCTR_BUS_CYCLES = 0x1D, |
| 616 | |||
| 617 | /* | ||
| 618 | * This isn't an architected event. | ||
| 619 | * We detect this event number and use the cycle counter instead. | ||
| 620 | */ | ||
| 621 | ARMV8_PMUV3_PERFCTR_CPU_CYCLES = 0xFF, | ||
| 622 | }; | 616 | }; |
| 623 | 617 | ||
| 624 | /* PMUv3 HW events mapping. */ | 618 | /* PMUv3 HW events mapping. */ |
| 625 | static const unsigned armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX] = { | 619 | static const unsigned armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX] = { |
| 626 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV8_PMUV3_PERFCTR_CPU_CYCLES, | 620 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES, |
| 627 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV8_PMUV3_PERFCTR_INSTR_EXECUTED, | 621 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV8_PMUV3_PERFCTR_INSTR_EXECUTED, |
| 628 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_ACCESS, | 622 | [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_ACCESS, |
| 629 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_REFILL, | 623 | [PERF_COUNT_HW_CACHE_MISSES] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_REFILL, |
| @@ -1106,7 +1100,7 @@ static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc, | |||
| 1106 | unsigned long evtype = event->config_base & ARMV8_EVTYPE_EVENT; | 1100 | unsigned long evtype = event->config_base & ARMV8_EVTYPE_EVENT; |
| 1107 | 1101 | ||
| 1108 | /* Always place a cycle counter into the cycle counter. */ | 1102 | /* Always place a cycle counter into the cycle counter. */ |
| 1109 | if (evtype == ARMV8_PMUV3_PERFCTR_CPU_CYCLES) { | 1103 | if (evtype == ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES) { |
| 1110 | if (test_and_set_bit(ARMV8_IDX_CYCLE_COUNTER, cpuc->used_mask)) | 1104 | if (test_and_set_bit(ARMV8_IDX_CYCLE_COUNTER, cpuc->used_mask)) |
| 1111 | return -EAGAIN; | 1105 | return -EAGAIN; |
| 1112 | 1106 | ||
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index f22965ea1cfc..e04cebdbb47f 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
| @@ -310,24 +310,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | /* | 312 | /* |
| 313 | * Fill in the task's elfregs structure for a core dump. | ||
| 314 | */ | ||
| 315 | int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs) | ||
| 316 | { | ||
| 317 | elf_core_copy_regs(elfregs, task_pt_regs(t)); | ||
| 318 | return 1; | ||
| 319 | } | ||
| 320 | |||
| 321 | /* | ||
| 322 | * fill in the fpe structure for a core dump... | ||
| 323 | */ | ||
| 324 | int dump_fpu (struct pt_regs *regs, struct user_fp *fp) | ||
| 325 | { | ||
| 326 | return 0; | ||
| 327 | } | ||
| 328 | EXPORT_SYMBOL(dump_fpu); | ||
| 329 | |||
| 330 | /* | ||
| 331 | * Shuffle the argument into the correct register before calling the | 313 | * Shuffle the argument into the correct register before calling the |
| 332 | * thread function. x1 is the thread argument, x2 is the pointer to | 314 | * thread function. x1 is the thread argument, x2 is the pointer to |
| 333 | * the thread function, and x3 points to the exit function. | 315 | * the thread function, and x3 points to the exit function. |
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 226b6bf6e9c2..538300f2273d 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
| @@ -211,8 +211,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
| 211 | * before we continue. | 211 | * before we continue. |
| 212 | */ | 212 | */ |
| 213 | set_cpu_online(cpu, true); | 213 | set_cpu_online(cpu, true); |
| 214 | while (!cpu_active(cpu)) | 214 | complete(&cpu_running); |
| 215 | cpu_relax(); | ||
| 216 | 215 | ||
| 217 | /* | 216 | /* |
| 218 | * OK, it's off to the idle thread for us | 217 | * OK, it's off to the idle thread for us |
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index efbf7df05d3f..4cd28931dba9 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c | |||
| @@ -80,7 +80,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) | |||
| 80 | #ifdef CONFIG_ZONE_DMA32 | 80 | #ifdef CONFIG_ZONE_DMA32 |
| 81 | /* 4GB maximum for 32-bit only capable devices */ | 81 | /* 4GB maximum for 32-bit only capable devices */ |
| 82 | max_dma32 = min(max, MAX_DMA32_PFN); | 82 | max_dma32 = min(max, MAX_DMA32_PFN); |
| 83 | zone_size[ZONE_DMA32] = max_dma32 - min; | 83 | zone_size[ZONE_DMA32] = max(min, max_dma32) - min; |
| 84 | #endif | 84 | #endif |
| 85 | zone_size[ZONE_NORMAL] = max - max_dma32; | 85 | zone_size[ZONE_NORMAL] = max - max_dma32; |
| 86 | 86 | ||
