Commit ef0e1ea8 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arc-4.8-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:

 - support for Syscall ABI v4 with upstream gcc 6.x

 - lockdep fix (Daniel Mentz)

 - gdb register clobber (Liav Rehana)

 - couple of missing exports for modules

 - other fixes here and there

* tag 'arc-4.8-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: export __udivdi3 for modules
  ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS
  ARC: export kmap
  ARC: Support syscall ABI v4
  ARC: use correct offset in pt_regs for saving/restoring user mode r25
  ARC: Elide redundant setup of DMA callbacks
  ARC: Call trace_hardirqs_on() before enabling irqs
parents 37c669b2 c57653dc
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
#ifdef CONFIG_ARC_CURR_IN_REG #ifdef CONFIG_ARC_CURR_IN_REG
; Retrieve orig r25 and save it with rest of callee_regs ; Retrieve orig r25 and save it with rest of callee_regs
ld.as r12, [r12, PT_user_r25] ld r12, [r12, PT_user_r25]
PUSH r12 PUSH r12
#else #else
PUSH r25 PUSH r25
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
; SP is back to start of pt_regs ; SP is back to start of pt_regs
#ifdef CONFIG_ARC_CURR_IN_REG #ifdef CONFIG_ARC_CURR_IN_REG
st.as r12, [sp, PT_user_r25] st r12, [sp, PT_user_r25]
#endif #endif
.endm .endm
......
...@@ -188,10 +188,10 @@ static inline int arch_irqs_disabled(void) ...@@ -188,10 +188,10 @@ static inline int arch_irqs_disabled(void)
.endm .endm
.macro IRQ_ENABLE scratch .macro IRQ_ENABLE scratch
TRACE_ASM_IRQ_ENABLE
lr \scratch, [status32] lr \scratch, [status32]
or \scratch, \scratch, (STATUS_E1_MASK | STATUS_E2_MASK) or \scratch, \scratch, (STATUS_E1_MASK | STATUS_E2_MASK)
flag \scratch flag \scratch
TRACE_ASM_IRQ_ENABLE
.endm .endm
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -280,7 +280,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep) ...@@ -280,7 +280,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
#define pte_page(pte) pfn_to_page(pte_pfn(pte)) #define pte_page(pte) pfn_to_page(pte_pfn(pte))
#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
#define pfn_pte(pfn, prot) (__pte(((pte_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
/* Don't use virt_to_pfn for macros below: could cause truncations for PAE40*/ /* Don't use virt_to_pfn for macros below: could cause truncations for PAE40*/
#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
......
...@@ -13,8 +13,15 @@ ...@@ -13,8 +13,15 @@
/* Machine specific ELF Hdr flags */ /* Machine specific ELF Hdr flags */
#define EF_ARC_OSABI_MSK 0x00000f00 #define EF_ARC_OSABI_MSK 0x00000f00
#define EF_ARC_OSABI_ORIG 0x00000000 /* MUST be zero for back-compat */
#define EF_ARC_OSABI_CURRENT 0x00000300 /* v3 (no legacy syscalls) */ #define EF_ARC_OSABI_V3 0x00000300 /* v3 (no legacy syscalls) */
#define EF_ARC_OSABI_V4 0x00000400 /* v4 (64bit data any reg align) */
#if __GNUC__ < 6
#define EF_ARC_OSABI_CURRENT EF_ARC_OSABI_V3
#else
#define EF_ARC_OSABI_CURRENT EF_ARC_OSABI_V4
#endif
typedef unsigned long elf_greg_t; typedef unsigned long elf_greg_t;
typedef unsigned long elf_fpregset_t; typedef unsigned long elf_fpregset_t;
......
...@@ -28,6 +28,7 @@ extern void __muldf3(void); ...@@ -28,6 +28,7 @@ extern void __muldf3(void);
extern void __divdf3(void); extern void __divdf3(void);
extern void __floatunsidf(void); extern void __floatunsidf(void);
extern void __floatunsisf(void); extern void __floatunsisf(void);
extern void __udivdi3(void);
EXPORT_SYMBOL(__ashldi3); EXPORT_SYMBOL(__ashldi3);
EXPORT_SYMBOL(__ashrdi3); EXPORT_SYMBOL(__ashrdi3);
...@@ -45,6 +46,7 @@ EXPORT_SYMBOL(__muldf3); ...@@ -45,6 +46,7 @@ EXPORT_SYMBOL(__muldf3);
EXPORT_SYMBOL(__divdf3); EXPORT_SYMBOL(__divdf3);
EXPORT_SYMBOL(__floatunsidf); EXPORT_SYMBOL(__floatunsidf);
EXPORT_SYMBOL(__floatunsisf); EXPORT_SYMBOL(__floatunsisf);
EXPORT_SYMBOL(__udivdi3);
/* ARC optimised assembler routines */ /* ARC optimised assembler routines */
EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memset);
......
...@@ -199,7 +199,7 @@ int elf_check_arch(const struct elf32_hdr *x) ...@@ -199,7 +199,7 @@ int elf_check_arch(const struct elf32_hdr *x)
} }
eflags = x->e_flags; eflags = x->e_flags;
if ((eflags & EF_ARC_OSABI_MSK) < EF_ARC_OSABI_CURRENT) { if ((eflags & EF_ARC_OSABI_MSK) != EF_ARC_OSABI_CURRENT) {
pr_err("ABI mismatch - you need newer toolchain\n"); pr_err("ABI mismatch - you need newer toolchain\n");
force_sigsegv(SIGSEGV, current); force_sigsegv(SIGSEGV, current);
return 0; return 0;
......
...@@ -291,8 +291,10 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len) ...@@ -291,8 +291,10 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
cpu->dccm.base_addr, TO_KB(cpu->dccm.sz), cpu->dccm.base_addr, TO_KB(cpu->dccm.sz),
cpu->iccm.base_addr, TO_KB(cpu->iccm.sz)); cpu->iccm.base_addr, TO_KB(cpu->iccm.sz));
n += scnprintf(buf + n, len - n, n += scnprintf(buf + n, len - n, "OS ABI [v%d]\t: %s\n",
"OS ABI [v3]\t: no-legacy-syscalls\n"); EF_ARC_OSABI_CURRENT >> 8,
EF_ARC_OSABI_CURRENT == EF_ARC_OSABI_V3 ?
"no-legacy-syscalls" : "64-bit data any register aligned");
return buf; return buf;
} }
......
...@@ -921,6 +921,15 @@ void arc_cache_init(void) ...@@ -921,6 +921,15 @@ void arc_cache_init(void)
printk(arc_cache_mumbojumbo(0, str, sizeof(str))); printk(arc_cache_mumbojumbo(0, str, sizeof(str)));
/*
* Only master CPU needs to execute rest of function:
* - Assume SMP so all cores will have same cache config so
* any geomtry checks will be same for all
* - IOC setup / dma callbacks only need to be setup once
*/
if (cpu)
return;
if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE)) { if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE)) {
struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache; struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache;
......
...@@ -61,6 +61,7 @@ void *kmap(struct page *page) ...@@ -61,6 +61,7 @@ void *kmap(struct page *page)
return kmap_high(page); return kmap_high(page);
} }
EXPORT_SYMBOL(kmap);
void *kmap_atomic(struct page *page) void *kmap_atomic(struct page *page)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment