diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-18 15:24:18 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-18 15:24:18 -0400 |
commit | a7a30232df01db886473324050d79c3122937c78 (patch) | |
tree | 76323b745b44b792173575843a72a2f6baa8a6da /arch/arc | |
parent | f86e0add813a3cc0e338089fa6c0928f5f6dc52d (diff) | |
parent | fce9e5bb25264153f9f002eada41757118d25ba9 (diff) |
Merge branch 'v3.17-next/cleanup-samsung' into v3.17-next/dt-s5pv210
Diffstat (limited to 'arch/arc')
-rw-r--r-- | arch/arc/include/asm/cache.h | 4 | ||||
-rw-r--r-- | arch/arc/include/uapi/asm/ptrace.h | 1 | ||||
-rw-r--r-- | arch/arc/kernel/ctx_sw_asm.S | 2 | ||||
-rw-r--r-- | arch/arc/kernel/devtree.c | 2 | ||||
-rw-r--r-- | arch/arc/kernel/head.S | 7 | ||||
-rw-r--r-- | arch/arc/kernel/ptrace.c | 4 | ||||
-rw-r--r-- | arch/arc/kernel/smp.c | 15 | ||||
-rw-r--r-- | arch/arc/kernel/vmlinux.lds.S | 2 | ||||
-rw-r--r-- | arch/arc/mm/cache_arc700.c | 25 |
9 files changed, 46 insertions, 16 deletions
diff --git a/arch/arc/include/asm/cache.h b/arch/arc/include/asm/cache.h index c1d3d2da1191..b3c750979aa1 100644 --- a/arch/arc/include/asm/cache.h +++ b/arch/arc/include/asm/cache.h | |||
@@ -60,7 +60,7 @@ extern void read_decode_cache_bcr(void); | |||
60 | #define ARC_REG_IC_IVIC 0x10 | 60 | #define ARC_REG_IC_IVIC 0x10 |
61 | #define ARC_REG_IC_CTRL 0x11 | 61 | #define ARC_REG_IC_CTRL 0x11 |
62 | #define ARC_REG_IC_IVIL 0x19 | 62 | #define ARC_REG_IC_IVIL 0x19 |
63 | #if defined(CONFIG_ARC_MMU_V3) || defined (CONFIG_ARC_MMU_V4) | 63 | #if defined(CONFIG_ARC_MMU_V3) |
64 | #define ARC_REG_IC_PTAG 0x1E | 64 | #define ARC_REG_IC_PTAG 0x1E |
65 | #endif | 65 | #endif |
66 | 66 | ||
@@ -74,7 +74,7 @@ extern void read_decode_cache_bcr(void); | |||
74 | #define ARC_REG_DC_IVDL 0x4A | 74 | #define ARC_REG_DC_IVDL 0x4A |
75 | #define ARC_REG_DC_FLSH 0x4B | 75 | #define ARC_REG_DC_FLSH 0x4B |
76 | #define ARC_REG_DC_FLDL 0x4C | 76 | #define ARC_REG_DC_FLDL 0x4C |
77 | #if defined(CONFIG_ARC_MMU_V3) || defined (CONFIG_ARC_MMU_V4) | 77 | #if defined(CONFIG_ARC_MMU_V3) |
78 | #define ARC_REG_DC_PTAG 0x5C | 78 | #define ARC_REG_DC_PTAG 0x5C |
79 | #endif | 79 | #endif |
80 | 80 | ||
diff --git a/arch/arc/include/uapi/asm/ptrace.h b/arch/arc/include/uapi/asm/ptrace.h index 2618cc13ba75..76a7739aab1c 100644 --- a/arch/arc/include/uapi/asm/ptrace.h +++ b/arch/arc/include/uapi/asm/ptrace.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef _UAPI__ASM_ARC_PTRACE_H | 11 | #ifndef _UAPI__ASM_ARC_PTRACE_H |
12 | #define _UAPI__ASM_ARC_PTRACE_H | 12 | #define _UAPI__ASM_ARC_PTRACE_H |
13 | 13 | ||
14 | #define PTRACE_GET_THREAD_AREA 25 | ||
14 | 15 | ||
15 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
16 | /* | 17 | /* |
diff --git a/arch/arc/kernel/ctx_sw_asm.S b/arch/arc/kernel/ctx_sw_asm.S index 2ff0347a2fd7..e248594097e7 100644 --- a/arch/arc/kernel/ctx_sw_asm.S +++ b/arch/arc/kernel/ctx_sw_asm.S | |||
@@ -10,9 +10,9 @@ | |||
10 | * -This is the more "natural" hand written assembler | 10 | * -This is the more "natural" hand written assembler |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/linkage.h> | ||
13 | #include <asm/entry.h> /* For the SAVE_* macros */ | 14 | #include <asm/entry.h> /* For the SAVE_* macros */ |
14 | #include <asm/asm-offsets.h> | 15 | #include <asm/asm-offsets.h> |
15 | #include <asm/linkage.h> | ||
16 | 16 | ||
17 | #define KSP_WORD_OFF ((TASK_THREAD + THREAD_KSP) / 4) | 17 | #define KSP_WORD_OFF ((TASK_THREAD + THREAD_KSP) / 4) |
18 | 18 | ||
diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c index 0b3ef4025d89..fffdb5e41b20 100644 --- a/arch/arc/kernel/devtree.c +++ b/arch/arc/kernel/devtree.c | |||
@@ -41,7 +41,7 @@ const struct machine_desc * __init setup_machine_fdt(void *dt) | |||
41 | { | 41 | { |
42 | const struct machine_desc *mdesc; | 42 | const struct machine_desc *mdesc; |
43 | unsigned long dt_root; | 43 | unsigned long dt_root; |
44 | void *clk; | 44 | const void *clk; |
45 | int len; | 45 | int len; |
46 | 46 | ||
47 | if (!early_init_dt_scan(dt)) | 47 | if (!early_init_dt_scan(dt)) |
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S index 07a58f2d3077..4d2481bd8b98 100644 --- a/arch/arc/kernel/head.S +++ b/arch/arc/kernel/head.S | |||
@@ -77,10 +77,11 @@ stext: | |||
77 | ; Clear BSS before updating any globals | 77 | ; Clear BSS before updating any globals |
78 | ; XXX: use ZOL here | 78 | ; XXX: use ZOL here |
79 | mov r5, __bss_start | 79 | mov r5, __bss_start |
80 | mov r6, __bss_stop | 80 | sub r6, __bss_stop, r5 |
81 | lsr.f lp_count, r6, 2 | ||
82 | lpnz 1f | ||
83 | st.ab 0, [r5, 4] | ||
81 | 1: | 84 | 1: |
82 | st.ab 0, [r5,4] | ||
83 | brlt r5, r6, 1b | ||
84 | 85 | ||
85 | ; Uboot - kernel ABI | 86 | ; Uboot - kernel ABI |
86 | ; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2 | 87 | ; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2 |
diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c index 5d76706139dd..13b3ffb27a38 100644 --- a/arch/arc/kernel/ptrace.c +++ b/arch/arc/kernel/ptrace.c | |||
@@ -146,6 +146,10 @@ long arch_ptrace(struct task_struct *child, long request, | |||
146 | pr_debug("REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n", request, addr, data); | 146 | pr_debug("REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n", request, addr, data); |
147 | 147 | ||
148 | switch (request) { | 148 | switch (request) { |
149 | case PTRACE_GET_THREAD_AREA: | ||
150 | ret = put_user(task_thread_info(child)->thr_ptr, | ||
151 | (unsigned long __user *)data); | ||
152 | break; | ||
149 | default: | 153 | default: |
150 | ret = ptrace_request(child, request, addr, data); | 154 | ret = ptrace_request(child, request, addr, data); |
151 | break; | 155 | break; |
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index cf90b6f4d3e0..c802bb500602 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c | |||
@@ -337,8 +337,19 @@ irqreturn_t do_IPI(int irq, void *dev_id) | |||
337 | * API called by platform code to hookup arch-common ISR to their IPI IRQ | 337 | * API called by platform code to hookup arch-common ISR to their IPI IRQ |
338 | */ | 338 | */ |
339 | static DEFINE_PER_CPU(int, ipi_dev); | 339 | static DEFINE_PER_CPU(int, ipi_dev); |
340 | |||
341 | static struct irqaction arc_ipi_irq = { | ||
342 | .name = "IPI Interrupt", | ||
343 | .flags = IRQF_PERCPU, | ||
344 | .handler = do_IPI, | ||
345 | }; | ||
346 | |||
340 | int smp_ipi_irq_setup(int cpu, int irq) | 347 | int smp_ipi_irq_setup(int cpu, int irq) |
341 | { | 348 | { |
342 | int *dev_id = &per_cpu(ipi_dev, smp_processor_id()); | 349 | if (!cpu) |
343 | return request_percpu_irq(irq, do_IPI, "IPI Interrupt", dev_id); | 350 | return setup_irq(irq, &arc_ipi_irq); |
351 | else | ||
352 | arch_unmask_irq(irq); | ||
353 | |||
354 | return 0; | ||
344 | } | 355 | } |
diff --git a/arch/arc/kernel/vmlinux.lds.S b/arch/arc/kernel/vmlinux.lds.S index 2555f5886af6..dd35bde39f69 100644 --- a/arch/arc/kernel/vmlinux.lds.S +++ b/arch/arc/kernel/vmlinux.lds.S | |||
@@ -116,7 +116,7 @@ SECTIONS | |||
116 | 116 | ||
117 | _edata = .; | 117 | _edata = .; |
118 | 118 | ||
119 | BSS_SECTION(0, 0, 0) | 119 | BSS_SECTION(4, 4, 4) |
120 | 120 | ||
121 | #ifdef CONFIG_ARC_DW2_UNWIND | 121 | #ifdef CONFIG_ARC_DW2_UNWIND |
122 | . = ALIGN(PAGE_SIZE); | 122 | . = ALIGN(PAGE_SIZE); |
diff --git a/arch/arc/mm/cache_arc700.c b/arch/arc/mm/cache_arc700.c index 1f676c4794e0..353b202c37c9 100644 --- a/arch/arc/mm/cache_arc700.c +++ b/arch/arc/mm/cache_arc700.c | |||
@@ -389,7 +389,7 @@ static inline void __dc_line_op(unsigned long paddr, unsigned long vaddr, | |||
389 | /*********************************************************** | 389 | /*********************************************************** |
390 | * Machine specific helper for per line I-Cache invalidate. | 390 | * Machine specific helper for per line I-Cache invalidate. |
391 | */ | 391 | */ |
392 | static void __ic_line_inv_vaddr(unsigned long paddr, unsigned long vaddr, | 392 | static void __ic_line_inv_vaddr_local(unsigned long paddr, unsigned long vaddr, |
393 | unsigned long sz) | 393 | unsigned long sz) |
394 | { | 394 | { |
395 | unsigned long flags; | 395 | unsigned long flags; |
@@ -405,6 +405,23 @@ static inline void __ic_entire_inv(void) | |||
405 | read_aux_reg(ARC_REG_IC_CTRL); /* blocks */ | 405 | read_aux_reg(ARC_REG_IC_CTRL); /* blocks */ |
406 | } | 406 | } |
407 | 407 | ||
408 | struct ic_line_inv_vaddr_ipi { | ||
409 | unsigned long paddr, vaddr; | ||
410 | int sz; | ||
411 | }; | ||
412 | |||
413 | static void __ic_line_inv_vaddr_helper(void *info) | ||
414 | { | ||
415 | struct ic_line_inv_vaddr_ipi *ic_inv = (struct ic_line_inv_vaddr_ipi*) info; | ||
416 | __ic_line_inv_vaddr_local(ic_inv->paddr, ic_inv->vaddr, ic_inv->sz); | ||
417 | } | ||
418 | |||
419 | static void __ic_line_inv_vaddr(unsigned long paddr, unsigned long vaddr, | ||
420 | unsigned long sz) | ||
421 | { | ||
422 | struct ic_line_inv_vaddr_ipi ic_inv = { paddr, vaddr , sz}; | ||
423 | on_each_cpu(__ic_line_inv_vaddr_helper, &ic_inv, 1); | ||
424 | } | ||
408 | #else | 425 | #else |
409 | 426 | ||
410 | #define __ic_entire_inv() | 427 | #define __ic_entire_inv() |
@@ -553,12 +570,8 @@ void flush_icache_range(unsigned long kstart, unsigned long kend) | |||
553 | */ | 570 | */ |
554 | void __sync_icache_dcache(unsigned long paddr, unsigned long vaddr, int len) | 571 | void __sync_icache_dcache(unsigned long paddr, unsigned long vaddr, int len) |
555 | { | 572 | { |
556 | unsigned long flags; | ||
557 | |||
558 | local_irq_save(flags); | ||
559 | __ic_line_inv_vaddr(paddr, vaddr, len); | ||
560 | __dc_line_op(paddr, vaddr, len, OP_FLUSH_N_INV); | 573 | __dc_line_op(paddr, vaddr, len, OP_FLUSH_N_INV); |
561 | local_irq_restore(flags); | 574 | __ic_line_inv_vaddr(paddr, vaddr, len); |
562 | } | 575 | } |
563 | 576 | ||
564 | /* wrapper to compile time eliminate alignment checks in flush loop */ | 577 | /* wrapper to compile time eliminate alignment checks in flush loop */ |