diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2015-08-19 07:53:58 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-08-20 09:35:49 -0400 |
commit | 090749502ff20d7d9ec244036fe636b6bf0433b6 (patch) | |
tree | 52ce66c6c0a525b4a9eff0ee5917c52f72479ead | |
parent | 6de6066c0d24a66df465cf87a4041ef7ef35ba6f (diff) |
ARC: add/fix some comments in code - no functional change
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | arch/arc/boot/dts/axc003.dtsi | 13 | ||||
-rw-r--r-- | arch/arc/include/asm/cmpxchg.h | 22 | ||||
-rw-r--r-- | arch/arc/include/asm/perf_event.h | 2 | ||||
-rw-r--r-- | arch/arc/kernel/perf_event.c | 4 | ||||
-rw-r--r-- | arch/arc/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/arc/plat-axs10x/axs10x.c | 2 |
6 files changed, 23 insertions, 22 deletions
diff --git a/arch/arc/boot/dts/axc003.dtsi b/arch/arc/boot/dts/axc003.dtsi index 1cd5e82f5dc2..846481f37eef 100644 --- a/arch/arc/boot/dts/axc003.dtsi +++ b/arch/arc/boot/dts/axc003.dtsi | |||
@@ -72,12 +72,13 @@ | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * This INTC is actually connected to DW APB GPIO | 75 | * The DW APB ICTL intc on MB is connected to CPU intc via a |
76 | * which acts as a wire between MB INTC and CPU INTC. | 76 | * DT "invisible" DW APB GPIO block, configured to simply pass thru |
77 | * GPIO INTC is configured in platform init code | 77 | * interrupts - setup accordinly in platform init (plat-axs10x/ax10x.c) |
78 | * and here we mimic direct connection from MB INTC to | 78 | * |
79 | * CPU INTC, thus we set "interrupts = <7>" instead of | 79 | * So here we mimic a direct connection betwen them, ignoring the |
80 | * "interrupts = <12>" | 80 | * ABPG GPIO. Thus set "interrupts = <24>" (DW APB GPIO to core) |
81 | * instead of "interrupts = <12>" (DW APB ICTL to DW APB GPIO) | ||
81 | * | 82 | * |
82 | * This intc actually resides on MB, but we move it here to | 83 | * This intc actually resides on MB, but we move it here to |
83 | * avoid duplicating the MB dtsi file given that IRQ from | 84 | * avoid duplicating the MB dtsi file given that IRQ from |
diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h index 44fd531f4d7b..af7a2db139c9 100644 --- a/arch/arc/include/asm/cmpxchg.h +++ b/arch/arc/include/asm/cmpxchg.h | |||
@@ -110,18 +110,18 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr, | |||
110 | sizeof(*(ptr)))) | 110 | sizeof(*(ptr)))) |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * On ARC700, EX insn is inherently atomic, so by default "vanilla" xchg() need | 113 | * xchg() maps directly to ARC EX instruction which guarantees atomicity. |
114 | * not require any locking. However there's a quirk. | 114 | * However in !LLSC config, it also needs to be use @atomic_ops_lock spinlock |
115 | * ARC lacks native CMPXCHG, thus emulated (see above), using external locking - | 115 | * due to a subtle reason: |
116 | * incidently it "reuses" the same atomic_ops_lock used by atomic APIs. | 116 | * - For !LLSC, cmpxchg() needs to use that lock (see above) and there is lot |
117 | * Now, llist code uses cmpxchg() and xchg() on same data, so xchg() needs to | 117 | * of kernel code which calls xchg()/cmpxchg() on same data (see llist.h) |
118 | * abide by same serializing rules, thus ends up using atomic_ops_lock as well. | 118 | * Hence xchg() needs to follow same locking rules. |
119 | * | 119 | * |
120 | * This however is only relevant if SMP and/or ARC lacks LLSC | 120 | * Technically the lock is also needed for UP (boils down to irq save/restore) |
121 | * if (UP or LLSC) | 121 | * but we can cheat a bit since cmpxchg() atomic_ops_lock() would cause irqs to |
122 | * xchg doesn't need serialization | 122 | * be disabled thus can't possibly be interrpted/preempted/clobbered by xchg() |
123 | * else <==> !(UP or LLSC) <==> (!UP and !LLSC) <==> (SMP and !LLSC) | 123 | * Other way around, xchg is one instruction anyways, so can't be interrupted |
124 | * xchg needs serialization | 124 | * as such |
125 | */ | 125 | */ |
126 | 126 | ||
127 | #if !defined(CONFIG_ARC_HAS_LLSC) && defined(CONFIG_SMP) | 127 | #if !defined(CONFIG_ARC_HAS_LLSC) && defined(CONFIG_SMP) |
diff --git a/arch/arc/include/asm/perf_event.h b/arch/arc/include/asm/perf_event.h index 2b8880e953a2..e2eaf6fb0468 100644 --- a/arch/arc/include/asm/perf_event.h +++ b/arch/arc/include/asm/perf_event.h | |||
@@ -95,7 +95,7 @@ static const char * const arc_pmu_ev_hw_map[] = { | |||
95 | 95 | ||
96 | /* counts condition */ | 96 | /* counts condition */ |
97 | [PERF_COUNT_HW_INSTRUCTIONS] = "iall", | 97 | [PERF_COUNT_HW_INSTRUCTIONS] = "iall", |
98 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmp", | 98 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmp", /* Excludes ZOL jumps */ |
99 | [PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */ | 99 | [PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */ |
100 | [PERF_COUNT_HW_BRANCH_MISSES] = "bpfail", /* NP-T, PT-NT, PNT-T */ | 100 | [PERF_COUNT_HW_BRANCH_MISSES] = "bpfail", /* NP-T, PT-NT, PNT-T */ |
101 | 101 | ||
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c index 1287388c258a..79ab199a9778 100644 --- a/arch/arc/kernel/perf_event.c +++ b/arch/arc/kernel/perf_event.c | |||
@@ -199,8 +199,8 @@ static void arc_pmu_start(struct perf_event *event, int flags) | |||
199 | event->hw.state = 0; | 199 | event->hw.state = 0; |
200 | 200 | ||
201 | /* enable ARC pmu here */ | 201 | /* enable ARC pmu here */ |
202 | write_aux_reg(ARC_REG_PCT_INDEX, idx); | 202 | write_aux_reg(ARC_REG_PCT_INDEX, idx); /* counter # */ |
203 | write_aux_reg(ARC_REG_PCT_CONFIG, hwc->config); | 203 | write_aux_reg(ARC_REG_PCT_CONFIG, hwc->config); /* condition */ |
204 | } | 204 | } |
205 | 205 | ||
206 | static void arc_pmu_stop(struct perf_event *event, int flags) | 206 | static void arc_pmu_stop(struct perf_event *event, int flags) |
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c index 44092456776f..91d5a0f1f3f7 100644 --- a/arch/arc/kernel/process.c +++ b/arch/arc/kernel/process.c | |||
@@ -65,7 +65,7 @@ asmlinkage void ret_from_fork(void); | |||
65 | * ------------------ | 65 | * ------------------ |
66 | * | r25 | <==== top of Stack (thread.ksp) | 66 | * | r25 | <==== top of Stack (thread.ksp) |
67 | * ~ ~ | 67 | * ~ ~ |
68 | * | --to-- | (CALLEE Regs of user mode) | 68 | * | --to-- | (CALLEE Regs of kernel mode) |
69 | * | r13 | | 69 | * | r13 | |
70 | * ------------------ | 70 | * ------------------ |
71 | * | fp | | 71 | * | fp | |
diff --git a/arch/arc/plat-axs10x/axs10x.c b/arch/arc/plat-axs10x/axs10x.c index e7769c3ab5f2..ad9825d4026a 100644 --- a/arch/arc/plat-axs10x/axs10x.c +++ b/arch/arc/plat-axs10x/axs10x.c | |||
@@ -46,7 +46,7 @@ static void __init axs10x_enable_gpio_intc_wire(void) | |||
46 | * ------------------- ------------------- | 46 | * ------------------- ------------------- |
47 | * | snps,dw-apb-gpio | | snps,dw-apb-gpio | | 47 | * | snps,dw-apb-gpio | | snps,dw-apb-gpio | |
48 | * ------------------- ------------------- | 48 | * ------------------- ------------------- |
49 | * | | | 49 | * | #12 | |
50 | * | [ Debug UART on cpu card ] | 50 | * | [ Debug UART on cpu card ] |
51 | * | | 51 | * | |
52 | * ------------------------ | 52 | * ------------------------ |