diff options
Diffstat (limited to 'arch/arc')
| -rw-r--r-- | arch/arc/include/asm/entry.h | 4 | ||||
| -rw-r--r-- | arch/arc/include/asm/irqflags-compact.h | 2 | ||||
| -rw-r--r-- | arch/arc/include/asm/pgtable.h | 2 | ||||
| -rw-r--r-- | arch/arc/include/uapi/asm/elf.h | 11 | ||||
| -rw-r--r-- | arch/arc/kernel/arcksyms.c | 2 | ||||
| -rw-r--r-- | arch/arc/kernel/process.c | 2 | ||||
| -rw-r--r-- | arch/arc/kernel/setup.c | 6 | ||||
| -rw-r--r-- | arch/arc/mm/cache.c | 9 | ||||
| -rw-r--r-- | arch/arc/mm/highmem.c | 1 |
9 files changed, 30 insertions, 9 deletions
diff --git a/arch/arc/include/asm/entry.h b/arch/arc/include/asm/entry.h index ad7860c5ce15..51597f344a62 100644 --- a/arch/arc/include/asm/entry.h +++ b/arch/arc/include/asm/entry.h | |||
| @@ -142,7 +142,7 @@ | |||
| 142 | 142 | ||
| 143 | #ifdef CONFIG_ARC_CURR_IN_REG | 143 | #ifdef CONFIG_ARC_CURR_IN_REG |
| 144 | ; Retrieve orig r25 and save it with rest of callee_regs | 144 | ; Retrieve orig r25 and save it with rest of callee_regs |
| 145 | ld.as r12, [r12, PT_user_r25] | 145 | ld r12, [r12, PT_user_r25] |
| 146 | PUSH r12 | 146 | PUSH r12 |
| 147 | #else | 147 | #else |
| 148 | PUSH r25 | 148 | PUSH r25 |
| @@ -198,7 +198,7 @@ | |||
| 198 | 198 | ||
| 199 | ; SP is back to start of pt_regs | 199 | ; SP is back to start of pt_regs |
| 200 | #ifdef CONFIG_ARC_CURR_IN_REG | 200 | #ifdef CONFIG_ARC_CURR_IN_REG |
| 201 | st.as r12, [sp, PT_user_r25] | 201 | st r12, [sp, PT_user_r25] |
| 202 | #endif | 202 | #endif |
| 203 | .endm | 203 | .endm |
| 204 | 204 | ||
diff --git a/arch/arc/include/asm/irqflags-compact.h b/arch/arc/include/asm/irqflags-compact.h index c1d36458bfb7..4c6eed80cd8b 100644 --- a/arch/arc/include/asm/irqflags-compact.h +++ b/arch/arc/include/asm/irqflags-compact.h | |||
| @@ -188,10 +188,10 @@ static inline int arch_irqs_disabled(void) | |||
| 188 | .endm | 188 | .endm |
| 189 | 189 | ||
| 190 | .macro IRQ_ENABLE scratch | 190 | .macro IRQ_ENABLE scratch |
| 191 | TRACE_ASM_IRQ_ENABLE | ||
| 191 | lr \scratch, [status32] | 192 | lr \scratch, [status32] |
| 192 | or \scratch, \scratch, (STATUS_E1_MASK | STATUS_E2_MASK) | 193 | or \scratch, \scratch, (STATUS_E1_MASK | STATUS_E2_MASK) |
| 193 | flag \scratch | 194 | flag \scratch |
| 194 | TRACE_ASM_IRQ_ENABLE | ||
| 195 | .endm | 195 | .endm |
| 196 | 196 | ||
| 197 | #endif /* __ASSEMBLY__ */ | 197 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h index 0f92d97432a2..89eeb3720051 100644 --- a/arch/arc/include/asm/pgtable.h +++ b/arch/arc/include/asm/pgtable.h | |||
| @@ -280,7 +280,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep) | |||
| 280 | 280 | ||
| 281 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) | 281 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) |
| 282 | #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) | 282 | #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) |
| 283 | #define pfn_pte(pfn, prot) (__pte(((pte_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) | 283 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
| 284 | 284 | ||
| 285 | /* Don't use virt_to_pfn for macros below: could cause truncations for PAE40*/ | 285 | /* Don't use virt_to_pfn for macros below: could cause truncations for PAE40*/ |
| 286 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) | 286 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) |
diff --git a/arch/arc/include/uapi/asm/elf.h b/arch/arc/include/uapi/asm/elf.h index 0f99ac8fcbb2..0037a587320d 100644 --- a/arch/arc/include/uapi/asm/elf.h +++ b/arch/arc/include/uapi/asm/elf.h | |||
| @@ -13,8 +13,15 @@ | |||
| 13 | 13 | ||
| 14 | /* Machine specific ELF Hdr flags */ | 14 | /* Machine specific ELF Hdr flags */ |
| 15 | #define EF_ARC_OSABI_MSK 0x00000f00 | 15 | #define EF_ARC_OSABI_MSK 0x00000f00 |
| 16 | #define EF_ARC_OSABI_ORIG 0x00000000 /* MUST be zero for back-compat */ | 16 | |
| 17 | #define EF_ARC_OSABI_CURRENT 0x00000300 /* v3 (no legacy syscalls) */ | 17 | #define EF_ARC_OSABI_V3 0x00000300 /* v3 (no legacy syscalls) */ |
| 18 | #define EF_ARC_OSABI_V4 0x00000400 /* v4 (64bit data any reg align) */ | ||
| 19 | |||
| 20 | #if __GNUC__ < 6 | ||
| 21 | #define EF_ARC_OSABI_CURRENT EF_ARC_OSABI_V3 | ||
| 22 | #else | ||
| 23 | #define EF_ARC_OSABI_CURRENT EF_ARC_OSABI_V4 | ||
| 24 | #endif | ||
| 18 | 25 | ||
| 19 | typedef unsigned long elf_greg_t; | 26 | typedef unsigned long elf_greg_t; |
| 20 | typedef unsigned long elf_fpregset_t; | 27 | typedef unsigned long elf_fpregset_t; |
diff --git a/arch/arc/kernel/arcksyms.c b/arch/arc/kernel/arcksyms.c index 4d9e77724bed..000dd041ab42 100644 --- a/arch/arc/kernel/arcksyms.c +++ b/arch/arc/kernel/arcksyms.c | |||
| @@ -28,6 +28,7 @@ extern void __muldf3(void); | |||
| 28 | extern void __divdf3(void); | 28 | extern void __divdf3(void); |
| 29 | extern void __floatunsidf(void); | 29 | extern void __floatunsidf(void); |
| 30 | extern void __floatunsisf(void); | 30 | extern void __floatunsisf(void); |
| 31 | extern void __udivdi3(void); | ||
| 31 | 32 | ||
| 32 | EXPORT_SYMBOL(__ashldi3); | 33 | EXPORT_SYMBOL(__ashldi3); |
| 33 | EXPORT_SYMBOL(__ashrdi3); | 34 | EXPORT_SYMBOL(__ashrdi3); |
| @@ -45,6 +46,7 @@ EXPORT_SYMBOL(__muldf3); | |||
| 45 | EXPORT_SYMBOL(__divdf3); | 46 | EXPORT_SYMBOL(__divdf3); |
| 46 | EXPORT_SYMBOL(__floatunsidf); | 47 | EXPORT_SYMBOL(__floatunsidf); |
| 47 | EXPORT_SYMBOL(__floatunsisf); | 48 | EXPORT_SYMBOL(__floatunsisf); |
| 49 | EXPORT_SYMBOL(__udivdi3); | ||
| 48 | 50 | ||
| 49 | /* ARC optimised assembler routines */ | 51 | /* ARC optimised assembler routines */ |
| 50 | EXPORT_SYMBOL(memset); | 52 | EXPORT_SYMBOL(memset); |
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c index b5db9e7fd649..be1972bd2729 100644 --- a/arch/arc/kernel/process.c +++ b/arch/arc/kernel/process.c | |||
| @@ -199,7 +199,7 @@ int elf_check_arch(const struct elf32_hdr *x) | |||
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | eflags = x->e_flags; | 201 | eflags = x->e_flags; |
| 202 | if ((eflags & EF_ARC_OSABI_MSK) < EF_ARC_OSABI_CURRENT) { | 202 | if ((eflags & EF_ARC_OSABI_MSK) != EF_ARC_OSABI_CURRENT) { |
| 203 | pr_err("ABI mismatch - you need newer toolchain\n"); | 203 | pr_err("ABI mismatch - you need newer toolchain\n"); |
| 204 | force_sigsegv(SIGSEGV, current); | 204 | force_sigsegv(SIGSEGV, current); |
| 205 | return 0; | 205 | return 0; |
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index a946400a86d0..f52a0d0dc462 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c | |||
| @@ -291,8 +291,10 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len) | |||
| 291 | cpu->dccm.base_addr, TO_KB(cpu->dccm.sz), | 291 | cpu->dccm.base_addr, TO_KB(cpu->dccm.sz), |
| 292 | cpu->iccm.base_addr, TO_KB(cpu->iccm.sz)); | 292 | cpu->iccm.base_addr, TO_KB(cpu->iccm.sz)); |
| 293 | 293 | ||
| 294 | n += scnprintf(buf + n, len - n, | 294 | n += scnprintf(buf + n, len - n, "OS ABI [v%d]\t: %s\n", |
| 295 | "OS ABI [v3]\t: no-legacy-syscalls\n"); | 295 | EF_ARC_OSABI_CURRENT >> 8, |
| 296 | EF_ARC_OSABI_CURRENT == EF_ARC_OSABI_V3 ? | ||
| 297 | "no-legacy-syscalls" : "64-bit data any register aligned"); | ||
| 296 | 298 | ||
| 297 | return buf; | 299 | return buf; |
| 298 | } | 300 | } |
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c index 5a294b2c3cb3..0b10efe3a6a7 100644 --- a/arch/arc/mm/cache.c +++ b/arch/arc/mm/cache.c | |||
| @@ -921,6 +921,15 @@ void arc_cache_init(void) | |||
| 921 | 921 | ||
| 922 | printk(arc_cache_mumbojumbo(0, str, sizeof(str))); | 922 | printk(arc_cache_mumbojumbo(0, str, sizeof(str))); |
| 923 | 923 | ||
| 924 | /* | ||
| 925 | * Only master CPU needs to execute rest of function: | ||
| 926 | * - Assume SMP so all cores will have same cache config so | ||
| 927 | * any geomtry checks will be same for all | ||
| 928 | * - IOC setup / dma callbacks only need to be setup once | ||
| 929 | */ | ||
| 930 | if (cpu) | ||
| 931 | return; | ||
| 932 | |||
| 924 | if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE)) { | 933 | if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE)) { |
| 925 | struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache; | 934 | struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache; |
| 926 | 935 | ||
diff --git a/arch/arc/mm/highmem.c b/arch/arc/mm/highmem.c index 04f83322c9fd..77ff64a874a1 100644 --- a/arch/arc/mm/highmem.c +++ b/arch/arc/mm/highmem.c | |||
| @@ -61,6 +61,7 @@ void *kmap(struct page *page) | |||
| 61 | 61 | ||
| 62 | return kmap_high(page); | 62 | return kmap_high(page); |
| 63 | } | 63 | } |
| 64 | EXPORT_SYMBOL(kmap); | ||
| 64 | 65 | ||
| 65 | void *kmap_atomic(struct page *page) | 66 | void *kmap_atomic(struct page *page) |
| 66 | { | 67 | { |
