Skip to content

Commit ef0e1ea

Browse files
committed
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
2 parents 37c669b + c57653d commit ef0e1ea

File tree

9 files changed

+30
-9
lines changed

9 files changed

+30
-9
lines changed

arch/arc/include/asm/entry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142

143143
#ifdef CONFIG_ARC_CURR_IN_REG
144144
; 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]
146146
PUSH r12
147147
#else
148148
PUSH r25
@@ -198,7 +198,7 @@
198198

199199
; SP is back to start of pt_regs
200200
#ifdef CONFIG_ARC_CURR_IN_REG
201-
st.as r12, [sp, PT_user_r25]
201+
st r12, [sp, PT_user_r25]
202202
#endif
203203
.endm
204204

arch/arc/include/asm/irqflags-compact.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ static inline int arch_irqs_disabled(void)
188188
.endm
189189

190190
.macro IRQ_ENABLE scratch
191+
TRACE_ASM_IRQ_ENABLE
191192
lr \scratch, [status32]
192193
or \scratch, \scratch, (STATUS_E1_MASK | STATUS_E2_MASK)
193194
flag \scratch
194-
TRACE_ASM_IRQ_ENABLE
195195
.endm
196196

197197
#endif /* __ASSEMBLY__ */

arch/arc/include/asm/pgtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
280280

281281
#define pte_page(pte) pfn_to_page(pte_pfn(pte))
282282
#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))
284284

285285
/* Don't use virt_to_pfn for macros below: could cause truncations for PAE40*/
286286
#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)

arch/arc/include/uapi/asm/elf.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@
1313

1414
/* Machine specific ELF Hdr flags */
1515
#define EF_ARC_OSABI_MSK 0x00000f00
16-
#define EF_ARC_OSABI_ORIG 0x00000000 /* MUST be zero for back-compat */
17-
#define EF_ARC_OSABI_CURRENT 0x00000300 /* v3 (no legacy syscalls) */
16+
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
1825

1926
typedef unsigned long elf_greg_t;
2027
typedef unsigned long elf_fpregset_t;

arch/arc/kernel/arcksyms.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ extern void __muldf3(void);
2828
extern void __divdf3(void);
2929
extern void __floatunsidf(void);
3030
extern void __floatunsisf(void);
31+
extern void __udivdi3(void);
3132

3233
EXPORT_SYMBOL(__ashldi3);
3334
EXPORT_SYMBOL(__ashrdi3);
@@ -45,6 +46,7 @@ EXPORT_SYMBOL(__muldf3);
4546
EXPORT_SYMBOL(__divdf3);
4647
EXPORT_SYMBOL(__floatunsidf);
4748
EXPORT_SYMBOL(__floatunsisf);
49+
EXPORT_SYMBOL(__udivdi3);
4850

4951
/* ARC optimised assembler routines */
5052
EXPORT_SYMBOL(memset);

arch/arc/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ int elf_check_arch(const struct elf32_hdr *x)
199199
}
200200

201201
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) {
203203
pr_err("ABI mismatch - you need newer toolchain\n");
204204
force_sigsegv(SIGSEGV, current);
205205
return 0;

arch/arc/kernel/setup.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,10 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
291291
cpu->dccm.base_addr, TO_KB(cpu->dccm.sz),
292292
cpu->iccm.base_addr, TO_KB(cpu->iccm.sz));
293293

294-
n += scnprintf(buf + n, len - n,
295-
"OS ABI [v3]\t: no-legacy-syscalls\n");
294+
n += scnprintf(buf + n, len - n, "OS ABI [v%d]\t: %s\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");
296298

297299
return buf;
298300
}

arch/arc/mm/cache.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,15 @@ void arc_cache_init(void)
921921

922922
printk(arc_cache_mumbojumbo(0, str, sizeof(str)));
923923

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+
924933
if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE)) {
925934
struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache;
926935

arch/arc/mm/highmem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ void *kmap(struct page *page)
6161

6262
return kmap_high(page);
6363
}
64+
EXPORT_SYMBOL(kmap);
6465

6566
void *kmap_atomic(struct page *page)
6667
{

0 commit comments

Comments
 (0)