Re: [PATCH v3 04/18] irqchip: add nps Internal and external irqchips

2015-12-03 Thread Marc Zyngier
Hi Noam, On 02/12/15 15:08, Noam Camus wrote: >> From: Marc Zyngier [mailto:marc.zyng...@arm.com] >> Sent: Tuesday, December 01, 2015 3:29 PM > >> + interrupt source. The value shall be 1. > >> So you never have to encode the interrupt trigger type? Do you only support >> edge or level? > I A

[PATCH 11/17] ARC: dw2 unwind: Elide REG_INVALID check

2015-12-03 Thread Vineet Gupta
REG_INVALID checks if reg_info[*].width is zero, which is compile time contant set to NON zero. No point in checking it. Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/arch/arc/kernel/unwind.c b/a

[PATCH 15/17] ARC: dw2 unwind: Single exit point for instrumentation

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c index 4f739716f908..e02d974ea789 100644 --- a/arch/arc/kernel/unwind.c +++ b/arch/arc/

[PATCH 16/17] ARC: dw2 unwind: skip regs not updated

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c index e02d974ea789..d5ffb4a78104 100644 --- a/arch/arc/kernel/unwind.c +++ b/arch/arc/kernel/unwind.c @@ -142,1

[PATCH 14/17] ARC: dw2 unwind: No need for __get_user

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c index b2053b55d076..4f739716f908 100644 --- a/arch/arc/kernel/unwind.c +++ b/arch/arc/kernel/unwind.c @@ -1056,7 +1056,7

[PATCH 17/17] xxx: instrument

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c index d5ffb4a78104..91f310465970 100644 --- a/arch/arc/kernel/unwind.c +++ b/arch/arc/kernel/

[PATCH 10/17] ARC: dw2 unwind: CIE parsing/validation done only once at startup

2015-12-03 Thread Vineet Gupta
There is only 1 CIE per unwind table and applicable to all FDEs, so validate it only once. No need to do validate it when prcoessing the FDE itself. Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 336 +-- 1 file changed, 153 insertions(+),

[PATCH 12/17] ARC: dw2 unwind: Elide a loop if DW_CFA_register not present

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c index b1a520afcbcb..6eb377c102c6 100644 --- a/arch/arc/kernel/unwind.c +++ b/arch/arc/kernel/unwi

[PATCH 13/17] ARC: dw2 unwind: Assume all regs to be unsigned long

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/include/asm/unwind.h | 3 +- arch/arc/kernel/unwind.c | 74 +++ 2 files changed, 6 insertions(+), 71 deletions(-) diff --git a/arch/arc/include/asm/unwind.h b/arch/arc/include/asm/unwind.h index 03ace2cc8bc5..

[PATCH 07/17] ARC: dw2 unwind: Refactor the FDE lookup table (eh_frame_header) code

2015-12-03 Thread Vineet Gupta
- Reduce 1 level of indenatation - Use struct members to identify what's going on ! - Nothing semantical Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 175 ++- 1 file changed, 83 insertions(+), 92 deletions(-) diff --git a/arch/arc/ker

[PATCH 03/17] ARC: dw2 unwind: Remove handling of for signal frame

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/include/asm/unwind.h | 3 --- arch/arc/kernel/unwind.c | 11 ++- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/arc/include/asm/unwind.h b/arch/arc/include/asm/unwind.h index 0e7f48e2686a..559ef55abce1 100644 --- a/arch/

[PATCH 09/17] ARC: dw2 unwind: Use striaght forward code to implement binary lookup

2015-12-03 Thread Vineet Gupta
The {start, pc} entries are already word aligned, no need to use read_pointer() inefficiency ! Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 40 +--- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/arch/arc/kernel/unwind.c b/arch/a

[PATCH 06/17] ARC: dw2 unwind: Don't verify Main FDE Table size everytime

2015-12-03 Thread Vineet Gupta
This is already done at boot time in setup_unwind_table() Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c index 2bb3c1c048bb..f57a0d50185c 100644 --- a/arch/arc/kern

[PATCH 02/17] ARC: dw2 unwind: remove unused cruft

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/include/asm/unwind.h | 34 +- arch/arc/kernel/unwind.c | 15 +-- 2 files changed, 10 insertions(+), 39 deletions(-) diff --git a/arch/arc/include/asm/unwind.h b/arch/arc/include/asm/unwind.h index 7ca628b6e

[PATCH 04/17] ARC: dw2 unwind: Remove FP based unwinding

2015-12-03 Thread Vineet Gupta
FP is disabled for ARC and even if it was enabled, it won't help with unwinding given ARC ABI so remove it. Typical ABI would - save BLINK (return address) on stack - save FP on stack - anchor FP for this frame - save any callee-regs and/or carve frame for local vars Thus FP remains fixed for

[PATCH 01/17] ARC: dw2 unwind: Elide generation of const propagated clones

2015-12-03 Thread Vineet Gupta
arc_unwind_core() is entry point into the actual dwarf unwinder and it gets called by various kernel APIs which provide the unwinding context (e.g. current task vs. a specific task, current pt_regs vs. some other crash context's pt_regs...) Currently multiple const propagated clones of arc_unwind_

[PATCH 08/17] ARC: dw2 unwind: Don't verify FDE lookup table metadata

2015-12-03 Thread Vineet Gupta
FDE Lookup table (eh_frame_header or it's equivalent constructed by hand) is already setup correctly in setup_unwind_table(). There's no point to re-parse it's header for every unwind call Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 37 - 1 file

[PATCH 05/17] ARC: dw2 unwind: Better printing

2015-12-03 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/kernel/unwind.c | 123 +-- 1 file changed, 45 insertions(+), 78 deletions(-) diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c index 0993a81e112b..2bb3c1c048bb 100644 --- a/arch/arc/kernel/unwind.

[RFC 00/17] ARC Dwarf unwinder improvements

2015-12-03 Thread Vineet Gupta
Hi guys, In light of perf -g stalling (as unwinder was taking ~3million cycles for non existent entries), I've revamped the dwarf unwinder. There are some optim tweaks and much of it is "De-generalization" for things which we can safely assume on ARC. Crude Instrumentation shows following improv