[Crash-utility] [PATCH] PPC64: Support virtual to physical address translation (VTOP) for huge pages.

2013-08-12 Thread Hari Bathini
the actual physical page for a given huge page. Signed-off-by: Hari Bathini hbath...@linux.vnet.ibm.com --- defs.h |6 +++- ppc64.c | 91 --- 2 files changed, 92 insertions(+), 5 deletions(-) diff --git a/defs.h b/defs.h index

Re: [Crash-utility] [PATCH] ppc64: fix 'bt' command for vmcore captured with fadump.

2017-01-24 Thread Hari Bathini
On Monday 23 January 2017 11:43 PM, Dave Anderson wrote: - Original Message - On Saturday 21 January 2017 02:00 AM, Dave Anderson wrote: - Original Message - ... [cut] ... Also, the exception frame doesn't even show the [bracketed] type of exception that occurred -- it's

Re: [Crash-utility] [PATCH] ppc64: fix 'bt' command for vmcore captured with fadump.

2017-01-24 Thread Hari Bathini
On Tuesday 24 January 2017 11:53 PM, Dave Anderson wrote: - Original Message - On Monday 23 January 2017 11:43 PM, Dave Anderson wrote: - Original Message - On Saturday 21 January 2017 02:00 AM, Dave Anderson wrote: - Original Message - ... [cut] ... Also, the

Re: [Crash-utility] [PATCH] ppc64: fix 'bt' command for vmcore captured with fadump.

2017-01-25 Thread Hari Bathini
On Wednesday 25 January 2017 01:09 AM, Dave Anderson wrote: - Original Message - All right, I'll check in your v2 patch along with the one-line addition to display the exception frame. For now we'll skip the NIP and LR translation, since in the case above, it's somewhat confusing.

Re: [Crash-utility] [PATCH] ppc64: fix 'bt' command for vmcore captured with fadump.

2017-01-23 Thread Hari Bathini
On Saturday 21 January 2017 02:00 AM, Dave Anderson wrote: - Original Message - ... [cut] ... Also, the exception frame doesn't even show the [bracketed] type of exception that occurred -- it's just a register dump followed by the remainder of the backtrace. Upon a quick glance,

Re: [Crash-utility] [PATCH] ppc64: fix 'bt' command for vmcore captured with fadump.

2017-01-19 Thread Hari Bathini
regs saved for active tasks before falling back to stack-search method. Also, getting rid of warnings like "‘is_hugepage’ declared inline after being called". Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> Hari, I only have 1 sample vmcore generated by FADUMP, and I see that

[Crash-utility] [PATCH] ppc64: fix 'bt' command for vmcore captured with fadump.

2017-01-18 Thread Hari Bathini
nings like "‘is_hugepage’ declared inline after being called". Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- diskdump.c | 22 ++ ppc64.c| 58 +- 2 files changed, 51 insertions(+), 2

Re: [Crash-utility] [PATCH] ppc64: fix 'bt' command for vmcore captured with fadump.

2017-01-20 Thread Hari Bathini
(null) at c000700b3b50 (unreliable)" for kernel dumps captured with fadump. Trying to use ptregs saved for active tasks before falling back to stack-search method. Also, getting rid of warnings like "‘is_hugepage’ declared inline after being called". Signed-off-by: Hari Bathini <hbath...@li

[Crash-utility] [PATCH v2] ppc64: fix 'bt' command for vmcore captured with fadump.

2017-01-20 Thread Hari Bathini
Without this patch, backtraces of active tasks maybe be of the form "#0 [c000700b3a90] (null) at c000700b3b50 (unreliable)" for kernel dumps captured with fadump. This patch uses the ptregs saved for active tasks before falling back to stack-search method. Signed-off-by: Ha

[Crash-utility] [PATCH 0/6] ppc64: Add support to understand Power ISA 3.0 based kernel

2016-09-14 Thread Hari Bathini
be great if someone can test these patches on BOOK3E. The changes effecting BOOK3E are minimal though. --- Hari Bathini (6): ppc64: fix vtop page translation for 4K pages ppc64: Use kernel terminology for each level in 4-level page table ppc64/book3s: address changes in kernel v4.5

[Crash-utility] [PATCH 2/6] ppc64: Use kernel terminology for each level in 4-level page table

2016-09-14 Thread Hari Bathini
For 4-level page table, we are referring to level3 as PGD instead of PUD, which is not inline with how kernel refers to it. This patch corrects it by referring to level4 as PGD and level3 as PUD. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- defs.h

[Crash-utility] [PATCH 6/6] ppc64/book3s: support big endian Linux page tables

2016-09-14 Thread Hari Bathini
MMU modes in book3s 64. This patch makes the corresponding changes here. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- defs.h |2 ++ ppc64.c | 21 + tools.c | 16 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/de

[Crash-utility] [PATCH 3/6] ppc64/book3s: address changes in kernel v4.5

2016-09-14 Thread Hari Bathini
these changes here. While we are here, address a TODO for huge pages and also, replace all instances of pte_shift with pte_rpn_shift to be in sync with how it is referred to in the kernel. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- defs.h | 17 +--- ppc64.c

[Crash-utility] [PATCH 5/6] ppc64: use physical addresses and unfold pud for 64K page size

2016-09-14 Thread Hari Bathini
is changed since kernel v4.5 for book3e. This patch updates the corresponding changes here. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- defs.h | 34 +--- ppc64.c | 108 ++- 2 files changed, 129 inse

[Crash-utility] [PATCH 4/6] ppc64/book3s: address change in page flags for PowerISA v3.0

2016-09-14 Thread Hari Bathini
mits 849f86a6 & 84c95756. This patch makes the corresponding changes here. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- ppc64.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ppc64.c b/ppc64.c index 6b89eaa..8733d64 100644 --- a/ppc64

[Crash-utility] [PATCH 1/2] ppc64/book3s: use the same masked bit values for 4K and 64K pagesizes

2016-09-27 Thread Hari Bathini
Starting with kernel v4.7, masked bit values are the same for 4K and 64K pagesizes. This patch updates here accordingly. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- defs.h |4 ppc64.c | 14 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff

[Crash-utility] [PATCH] book3s/ppc64: Lower the max real address to 53 bits

2017-08-24 Thread Hari Bathini
Kernel commit 2f18d533757da3899f4bedab0b2c051b080079dc lowered the max real address to 53 bits. Max the necessary changes here. Without this patch, vmalloc address translation would fail. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- defs.h |5 +++-- 1 file chan

[Crash-utility] [PATCH] ppc64: fix bt for secondary threads for NMI IPIs

2017-12-13 Thread Hari Bathini
With latest NMI IPI changes, crash_ipi_callback is found multiple times on the stack. Ensure the chosen symbol relates to an actual backtrace. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- ppc64.c |8 1 file changed, 8 insertions(+) diff --git a/ppc64.c b/p

[Crash-utility] [PATCH] book3s/ppc64: update hash page table geometry

2017-11-09 Thread Hari Bathini
Starting with kernel 4.12, the hash page table geometry is updated to accommodate larger VA range. Update here accordingly. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- defs.h |4 ppc64.c | 18 ++ 2 files changed, 18 insertions(+), 4 del

Re: [Crash-utility] [PATCH v2] book3s/ppc64: update hash page table geometry

2017-11-09 Thread Hari Bathini
On Thursday 09 November 2017 10:13 PM, Dave Anderson wrote: - Original Message - Starting with kernel 4.12, the hash page table geometry is updated to accommodate larger VA range. Update here accordingly. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- changes

[Crash-utility] [PATCH v2] book3s/ppc64: update hash page table geometry

2017-11-09 Thread Hari Bathini
Starting with kernel 4.12, the hash page table geometry is updated to accommodate larger VA range. Update here accordingly. Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> --- changes in v1: * Kernel commit 92d9dfda8b54 reverted the geometry update for 4K hash pagetable. So, un

[Crash-utility] [PATCH] book3s/ppc64: Increase the VA range

2018-06-19 Thread Hari Bathini
Since kernel commit c2b4d8b7417a ("powerpc/mm/hash64: Increase the VA range"), the max virtual (effective) address value has been increased to 4PB. Update page table index values accordingly. Signed-off-by: Hari Bathini --- defs.h |1 + ppc64.c |5 - 2 files changed, 5

[Crash-utility] [PATCH] ppc64: rework bt command

2018-09-07 Thread Hari Bathini
on exception frames. Signed-off-by: Hari Bathini --- ppc64.c | 140 +-- 1 file changed, 99 insertions(+), 41 deletions(-) diff --git a/ppc64.c b/ppc64.c index f5d0dac..03fecd3 100644 --- a/ppc64.c +++ b/ppc64.c @@ -2093,15 +2093,10

[Crash-utility] [PATCH 1/2] ppc64/opal: add a flag to determine if the kernel is running on OPAL firmware

2018-10-01 Thread Hari Bathini
Add PPC64 specific flag for kernels running on platforms based on OPAL firmware. Use this flag before processing commands specific to OPAL based systems. Signed-off-by: Hari Bathini --- defs.h |8 ppc64.c | 36 2 files changed, 24 insertions

[Crash-utility] [PATCH 2/2] ppc64/opal: Improve bt output when R1 falls in OPAL range

2018-10-01 Thread Hari Bathini
On OPAL based systems, when a thread is running an OPAL API, the stack pointer and instruction pointer would be pointing at OPAL address but 'bt' output for such thread would complain that the stack pointer is invalid. Update error/log message for better context. Signed-off-by: Hari Bathini

[Crash-utility] [PATCH] ppc64: increase MAX_PHYSMEM_BITS to 128TB

2018-09-26 Thread Hari Bathini
With kernel commit 7d4340bb92a9 ("powerpc/mm: Increase MAX_PHYSMEM_BITS to 128TB with SPARSEMEM_VMEMMAP config"), MAX_PHYSMEM_BITS is bumped up to 47. Make the appropriate update here. Signed-off-by: Hari Bathini --- defs.h |1 + ppc64.c |5 - 2 files changed, 5 insert

[Crash-utility] [PATCH] ppc64: increase MAX_PHYSMEM_BITS to 2PB

2018-12-04 Thread Hari Bathini
With kernel commit 4ffe713b7587 ("powerpc/mm: Increase the max addressable memory to 2PB"), MAX_PHYSMEM_BITS is bumped up to 51 for SPARSEMEM_VMEMMAP and SPARSEMEM_EXTREME case. Make the appropriate update here. Signed-off-by: Hari Bathini --- defs.h |1 + ppc6

Re: [Crash-utility] [PATCH] ppc64: rework bt command

2018-09-18 Thread Hari Bathini
lue". The patch has been ACK'd offline by Hari Bathini. Thanks, Dave -- Crash-utility mailing list Crash-utility@redhat.com https://www.redhat.com/mailman/listinfo/crash-utility

[Crash-utility] [PATCH] fix "kmem -[sS]" for caches created during SLUB bootstrap

2020-04-08 Thread Hari Bathini
gt;random == 0. Signed-off-by: Hari Bathini --- memory.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c index ccc2944..c2433eb 100644 --- a/memory.c +++ b/memory.c @@ -19244,7 +19244,7 @@ count_free_objects(struct meminfo *si, ulong freelist) sta

[Crash-utility] [PATCH] task.c: avoid unnecessary cpu cycles during init

2020-11-13 Thread Hari Bathini
optimize while listing the other two options as TODO items for follow-up. Signed-off-by: Hari Bathini --- On a system with about 1500 CPUs 165K running tasks, it was taking about a day to get to the crash prompt without this patch, while it takes only about 5-10 mins with this change.. task.

[Crash-utility] [PATCH] mod: fix module object file lookup

2021-09-03 Thread Hari Bathini
searching for the object file under /usr/lib/debug/lib/modules directory. Signed-off-by: Naveen N. Rao Signed-off-by: Hari Bathini --- kernel.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/kernel.c b/kernel.c index 36fdea2..b2c8a0c 100644 --- a/kernel.c +++ b

[Crash-utility] [PATCH v2 3/6] ppc64: rename ppc64_paca_init to ppc64_paca_percpu_offset_init

2022-07-03 Thread Hari Bathini
ppc64_paca_init() function is specifically used to initialize percpu data_offset for kernels older than v2.6.36. So, the name is slightly misleading. Rename it to ppc64_paca_percpu_offset_init to reflect its purpose. Signed-off-by: Hari Bathini --- * No changes in v2. ppc64.c | 9

[Crash-utility] [PATCH v2 0/6] bt fixes and cleanup for ppc64

2022-07-03 Thread Hari Bathini
->machspec to optimize code and improve readability. Changes in v2: * Print "(unused)", if hwintrstack is not being used. * Avoid using variable length array for paca_ptrs. * With 'mach' command, print emergency stack data by default (no special option). Hari Bathini (6): ppc64: fix bt

[Crash-utility] [PATCH v2 1/6] ppc64: fix bt for '-S' case

2022-07-03 Thread Hari Bathini
Passing '-S' option to 'bt' command was intended to specify the stack pointer manually. But get_stack_frame() handling on ppc64 is ignoring this option altogether. Fix it. Signed-off-by: Hari Bathini --- * No changes in v2. ppc64.c | 16 1 file changed, 16 insertions

Re: [Crash-utility] [PATCH 2/6] ppc64: dynamically allocate h/w interrupt stack

2022-07-03 Thread Hari Bathini
On 04/07/22 8:29 am, HAGIO KAZUHITO(萩尾 一仁) wrote: Hi Hari thank you for the patches. On 2022/06/29 4:19, Hari Bathini wrote: Only older kernel (v2.4) used h/w interrupt stack to store frames when CPU received IPI. Memory used for this in 'struct machine_specific' is useless for later

[Crash-utility] [PATCH v2 6/6] ppc64: use a variable for machdep->machspec

2022-07-03 Thread Hari Bathini
machdpep->machspec is referred to multiple times. The compiler would likely optimize this but nonetheless, use a variable to optimize in coding and also improve readability. No functional change. Signed-off-by: Hari Bathini --- * No changes in v2. ppc64.c |

[Crash-utility] [PATCH v2 5/6] ppc64: print emergency stacks info with 'mach' command

2022-07-03 Thread Hari Bathini
Print top address of emergency stacks with 'mach' command. Signed-off-by: Hari Bathini --- Changes in v2: * With 'mach' command, print emergency stack data by default (no special option). ppc64.c | 40 1 file changed, 40 insertions(+) diff --git

[Crash-utility] [PATCH v2 4/6] ppc64: handle backtrace when CPU is in an emerency stack

2022-07-03 Thread Hari Bathini
backtrace is processed appropriately even when a CPU is in any one of these emergency stacks. Also, if stack info cannot be found, print that message always instead of only when verbose logs are enabled. Signed-off-by: Hari Bathini --- Changes in v2: * Avoid using variable length array for paca_ptrs

[Crash-utility] [PATCH v2 2/6] ppc64: dynamically allocate h/w interrupt stack

2022-07-03 Thread Hari Bathini
being wasted. Signed-off-by: Hari Bathini --- Changes in v2: * Print "(unused)", if hwintrstack is not being used. defs.h | 2 +- ppc64.c | 51 +-- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/defs.h b/defs.h ind

Re: [Crash-utility] [PATCH v2 4/6] ppc64: handle backtrace when CPU is in an emerency stack

2022-07-04 Thread Hari Bathini
On 04/07/22 2:09 pm, HAGIO KAZUHITO(萩尾 一仁) wrote: On 2022/07/04 14:25, Hari Bathini wrote: A CPU could be in an emergency stack when it is running in real mode or any special scenario like TM bad thing. Also, there are dedicated emergency stacks for machine check and system reset interrupt

Re: [Crash-utility] [PATCH v2 0/6] bt fixes and cleanup for ppc64

2022-07-04 Thread Hari Bathini
On 04/07/22 2:14 pm, HAGIO KAZUHITO(萩尾 一仁) wrote: On 2022/07/04 14:25, Hari Bathini wrote: This patch series fixes a couple of issues with bt on ppc64 and also does some code cleanup. Patch #1 fixes the broken '-S' option on ppc64. The next patch changes h/w interrupt stack allocation

[Crash-utility] [PATCH 2/6] ppc64: dynamically allocate h/w interrupt stack

2022-06-28 Thread Hari Bathini
being wasted. Signed-off-by: Hari Bathini --- defs.h | 2 +- ppc64.c | 48 +++- 2 files changed, 20 insertions(+), 30 deletions(-) diff --git a/defs.h b/defs.h index 7d3b734..d1d3ea9 100644 --- a/defs.h +++ b/defs.h @@ -6303,7 +6303,7 @@ struct

[Crash-utility] [PATCH 5/6] ppc64: print emergency stacks info with 'mach -e'

2022-06-28 Thread Hari Bathini
Add '-e' option to 'mach' command to list top address of all emergency stacks of all present CPUs. Signed-off-by: Hari Bathini --- help.c | 31 +++ ppc64.c | 43 ++- 2 files changed, 73 insertions(+), 1 deletion(-) diff --git

[Crash-utility] [PATCH 6/6] ppc64: use a variable for machdep->machspec

2022-06-28 Thread Hari Bathini
machdpep->machspec is referred to multiple times. The compiler would likely optimize this but nonetheless, use a variable to optimize in coding and also improve readability. No functional change. Signed-off-by: Hari Bathini --- ppc64.c |

[Crash-utility] [PATCH 0/6] bt fixes and cleanup for ppc64

2022-06-28 Thread Hari Bathini
->machspec to optimize code and improve readability. Hari Bathini (6): ppc64: fix bt for '-S' case ppc64: dynamically allocate h/w interrupt stack ppc64: rename ppc64_paca_init to ppc64_paca_percpu_offset_init ppc64: handle backtrace when CPU is in an emerency stack ppc64: print emergency sta

[Crash-utility] [PATCH 1/6] ppc64: fix bt for '-S' case

2022-06-28 Thread Hari Bathini
Passing '-S' option to 'bt' command was intended to specify the stack pointer manually. But get_stack_frame() handling on ppc64 is ignoring this option altogether. Fix it. Signed-off-by: Hari Bathini --- ppc64.c | 16 1 file changed, 16 insertions(+) diff --git a/ppc64.c b

[Crash-utility] [PATCH 4/6] ppc64: handle backtrace when CPU is in an emerency stack

2022-06-28 Thread Hari Bathini
backtrace is processed appropriately even when a CPU is in any one of these emergency stacks. Also, if stack info cannot be found, print that message always instead of only when verbose logs are enabled. Signed-off-by: Hari Bathini --- defs.h | 12 ppc64.c | 196

[Crash-utility] [PATCH 3/6] ppc64: rename ppc64_paca_init to ppc64_paca_percpu_offset_init

2022-06-28 Thread Hari Bathini
ppc64_paca_init() function is specifically used to initialize percpu data_offset for kernels older than v2.6.36. So, the name is slightly misleading. Rename it to ppc64_paca_percpu_offset_init to reflect its purpose. Signed-off-by: Hari Bathini --- ppc64.c | 9 + 1 file changed, 5

Re: [Crash-utility] [PATCH] ppc64: still allow to move on if the emergency stacks info fails to initialize

2022-10-05 Thread Hari Bathini
which allows the crash move on. Reported-by: Dave Wysochanski Signed-off-by: Lianbo Jiang Looks good to me! Acked-by: Hari Bathini --- ppc64.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ppc64.c b/ppc64.c index 4ea1f7c0c6f8..f94b402ec64d 100644 --- a/