ff-by: Hari Bathini
Tested-by: Pingfan Liu
Reviewed-by: Thiago Jung Bauermann
---
v4 -> v5:
* Unchanged. Added Reviewed-by tag from Thiago.
v3 -> v4:
* Added a FIXME tag to indicate issue in adding opal/rtas regions to
core image.
* Folded prepare_elf_headers() function into load_elfcore
While initrd, elfcorehdr and backup regions are already added to the
reserve map, there are a few missing regions that need to be added to
the memory reserve map. Add them here. And now that all the changes
to load panic kernel are in place, claim likewise.
Signed-off-by: Hari Bathini
Tested-by
address isn't available while loading, are placed in an intermediate
location till a flush to the actual destination address happens during
kexec boot sequence.
Signed-off-by: Hari Bathini
Tested-by: Pingfan Liu
Reviewed-by: Thiago Jung Bauermann
---
v4 -> v5:
* Unchanged.
v3 -> v4:
On 28/07/20 7:16 pm, Michael Ellerman wrote:
Hari Bathini writes:
Kernel built with CONFIG_PPC_EARLY_DEBUG_OPAL enabled expects r8 & r9
to be filled with OPAL base & entry addresses respectively. Setting
these registers allows the kernel to perform OPAL calls before the
device
On 28/07/20 7:14 pm, Michael Ellerman wrote:
Hari Bathini writes:
diff --git a/arch/powerpc/kexec/file_load_64.c
b/arch/powerpc/kexec/file_load_64.c
index 2df6f4273ddd..8df085a22fd7 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -17,9 +17,21
reserved
for crashkernel.
* Used the appropriate license header for the new files added.
* Added an option to merge ranges to minimize reallocations while
adding memory ranges.
* Dropped within_crashkernel parameter for add_opal_mem_range() &
add_rtas_mem_range() functions as it is not re
hole.
Also, add the missing declarations for arch overridable functions and
and drop the __weak descriptors in the declarations to avoid non-weak
definitions from becoming weak.
Reported-by: kernel test robot
[lkp: In v1, arch_kimage_file_post_load_cleanup() declaration was missing]
Signed-off-by:
Some of the kexec_file_load code isn't PPC64 specific. Move PPC64
specific code from kexec/file_load.c to kexec/file_load_64.c. Also,
rename purgatory/trampoline.S to purgatory/trampoline_64.S in the
same spirit. No functional changes.
Signed-off-by: Hari Bathini
Tested-by: Pingfan Liu
Rev
erstanding the subsequent changes better
and make it easy to setup the different memory ranges listed above, as
and when appropriate.
Signed-off-by: Hari Bathini
Tested-by: Pingfan Liu
Reviewed-by: Thiago Jung Bauermann
---
v5 -> v6:
* Dropped email address from copyright header of the n
ride arch_kexec_locate_mem_hole() to locate a memory hole taking
these ranges into account.
Signed-off-by: Hari Bathini
Reviewed-by: Thiago Jung Bauermann
---
v5 -> v6:
* Implemented all the add_foo_mem_ranges() functions that get used while
setting up exclude memory ranges.
v4 -> v5:
* Unchan
n
an error is encountered in the callback function.
Signed-off-by: Hari Bathini
Tested-by: Pingfan Liu
Reviewed-by: Thiago Jung Bauermann
---
v5 -> v6:
* Unchanged.
v4 -> v5:
* Unchanged.
v3 -> v4:
* Unchanged. Added Reviewed-by tag from Thiago.
v2 -> v3:
* Unchanged. Added Tested-by
as applicable. Restrict kdump kernel memory
to use only these regions by setting up usable-memory DT property.
Also, tell the kdump kernel to run at the loaded address by setting
the magic word at 0x5c.
Signed-off-by: Hari Bathini
Tested-by: Pingfan Liu
Reviewed-by: Thiago Jung Bauermann
---
v5
x27;s memory to avoid kdump kernel from accidentially using
that memory.
Signed-off-by: Hari Bathini
Reviewed-by: Thiago Jung Bauermann
---
v5 -> v6:
* Added Reviewed-by tag from Thiago.
* The comment explaining why a source buffer is needed for backup segment
is moved to appropriate place.
*
ff-by: Hari Bathini
Tested-by: Pingfan Liu
Reviewed-by: Thiago Jung Bauermann
---
v5 -> v6:
* Unchanged.
v4 -> v5:
* Unchanged. Added Reviewed-by tag from Thiago.
v3 -> v4:
* Added a FIXME tag to indicate issue in adding opal/rtas regions to
core image.
* Folded prepare_elf_headers()
While initrd, elfcorehdr and backup regions are already added to the
reserve map, there are a few missing regions that need to be added to
the memory reserve map. Add them here. And now that all the changes
to load panic kernel are in place, claim likewise.
Signed-off-by: Hari Bathini
Tested-by
address isn't available while loading, are placed in an intermediate
location till a flush to the actual destination address happens during
kexec boot sequence.
Signed-off-by: Hari Bathini
Tested-by: Pingfan Liu
Reviewed-by: Thiago Jung Bauermann
---
v5 -> v6:
* Unchanged.
v4 -> v5:
Kernel built with CONFIG_PPC_EARLY_DEBUG_OPAL enabled expects r8 & r9
to be filled with OPAL base & entry addresses respectively. Setting
these registers allows the kernel to perform OPAL calls before the
device tree is parsed.
Signed-off-by: Hari Bathini
Reviewed-by: Thiago Jung B
On 28/07/20 8:02 am, piliu wrote:
On 07/27/2020 03:36 AM, Hari Bathini wrote:
Sorry! There was a gateway issue on my system while posting v5, due to
which some patches did not make it through. Resending...
This patch series enables kdump support for kexec_file_load system
call (kexec -s
On 01/08/20 3:48 pm, Mike Rapoport wrote:
On Thu, Jul 30, 2020 at 10:15:13PM +1000, Michael Ellerman wrote:
Mike Rapoport writes:
From: Mike Rapoport
fadump_reserve_crash_area() reserves memory from a specified base address
till the end of the RAM.
Replace iteration through the memblock.
On 06/08/20 9:53 pm, Aneesh Kumar K.V wrote:
dt_root_addr_cells and dt_root_size_cells are __initdata variables.
So make a copy of the same which can be used post init.
This avoids doing the same thing at multiple places.
So, thanks for the patch, Aneesh.
Looks good to me.
but nitpick bel
switch to hash.
Update the memblock limit after mmu_early_init_devtree() if the kernel is going
to use radix translation. This forces some of the memblock allocations we do
before
mmu_early_init_devtree() to be within the RMA limit.
Minor comments below. Nonetheless...
Reviewed-by: Hari Bathini
On 06/08/20 6:22 pm, Aneesh Kumar K.V wrote:
use mem_addr_cells/mem_size_cells instead of fetching the values
again from device tree.
Looks good to me.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/mm/drmem.c | 24 ++--
1 file changed, 6 insertions(+), 18 deleti
c: Add BPF_PROBE_MEM support for 64bit JIT")
Hari Bathini (4):
bpf powerpc: refactor JIT compiler code
powerpc/ppc-opcode: introduce PPC_RAW_BRANCH() macro
bpf ppc32: Add BPF_PROBE_MEM support for JIT
bpf ppc32: Add addr > TASK_SIZE_MAX explicit check
Ravi Bangoria (4):
bpf pow
From: Ravi Bangoria
SEEN_STACK is unused on PowerPC. Remove it. Also, have
SEEN_TAILCALL use 0x4000.
Signed-off-by: Ravi Bangoria
---
* No changes in v2.
arch/powerpc/net/bpf_jit.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/net/bpf_jit.h b/arch/po
From: Ravi Bangoria
In case of extra_pass, usual JIT passes are always skipped. So,
extra_pass is always false while calling bpf_jit_build_body() and
thus it can be removed.
Signed-off-by: Ravi Bangoria
---
Changes in v2:
* Updated the changelog wording a bit.
arch/powerpc/net/bpf_jit.h
Define and use PPC_RAW_BRANCH() macro instead of open coding it. This
macro is used while adding BPF_PROBE_MEM support.
Signed-off-by: Hari Bathini
---
Changes in v2:
* New patch to introduce PPC_RAW_BRANCH() macro.
arch/powerpc/include/asm/ppc-opcode.h | 2 ++
arch/powerpc/net/bpf_jit.h
re chosen random, not real)
Signed-off-by: Ravi Bangoria
Signed-off-by: Hari Bathini
---
Changes in v2:
* Used JITing code after refactoring.
* Replaced 'xor reg,reg,reg' with 'li reg,0' where appropriate.
* Avoided unnecessary init during declaration.
arch/powerpc/n
-by: Hari Bathini
---
Changes in v2:
* Refactored the code based on Christophe's comments.
arch/powerpc/net/bpf_jit_comp64.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/arch/powerpc/net/bpf_jit_comp64.c
b/arch/powerpc/net/bpf_jit_comp64.c
index 2fc1
Refactor powerpc JITing. This simplifies adding BPF_PROBE_MEM support.
Signed-off-by: Hari Bathini
---
Changes in v2:
* New patch to refactor a bit of JITing code.
arch/powerpc/net/bpf_jit_comp32.c | 50 +++-
arch/powerpc/net/bpf_jit_comp64.c | 76
up=0xffe4 | /
0x4298 -->| insn=0xfe14 |
| fixup=0xffe8 |
+--+
(Addresses shown here are chosen random, not real)
Signed-off-by: Hari Bathini
---
Changes in v2:
* New patch to add BPF_PROBE_MEM support for PPC32.
arch/powerpc/net/bpf_jit.h
BPF exception table.
[Alexei suggested for x86]
Suggested-by: Alexei Starovoitov
Signed-off-by: Hari Bathini
---
Changes in v2:
* New patch to handle bad userspace pointers on PPC32.
arch/powerpc/net/bpf_jit_comp32.c | 39 +++
1 file changed, 39 insertions(+)
diff --
Hi Christophe,
Thanks for reviewing the series.
On 17/09/21 9:40 pm, Christophe Leroy wrote:
Le 17/09/2021 à 17:30, Hari Bathini a écrit :
Refactor powerpc JITing. This simplifies adding BPF_PROBE_MEM support.
Could you describe a bit more what you are refactoring exactly ?
I am trying
IT compilers respectively. Patch #6 & #8 handle bad userspace
pointers for PPC64 & PPC32 cases respectively.
Changes in v3:
* Addressed all the review comments from Christophe.
Hari Bathini (4):
bpf powerpc: refactor JIT compiler code
powerpc/ppc-opcode: introduce PPC_RAW_BRANCH() ma
From: Ravi Bangoria
SEEN_STACK is unused on PowerPC. Remove it. Also, have
SEEN_TAILCALL use 0x4000.
Signed-off-by: Ravi Bangoria
Reviewed-by: Christophe Leroy
---
Changes in v3:
* Added Reviewed-by tag from Chris.
arch/powerpc/net/bpf_jit.h | 3 +--
1 file changed, 1 insertion(+), 2 d
From: Ravi Bangoria
In case of extra_pass, usual JIT passes are always skipped. So,
extra_pass is always false while calling bpf_jit_build_body() and
can be removed.
Signed-off-by: Ravi Bangoria
---
Changes in v3:
* Updated the changelog wording a bit.
arch/powerpc/net/bpf_jit.h| 2
Refactor powerpc LDX JITing code to simplify adding BPF_PROBE_MEM
support.
Signed-off-by: Hari Bathini
---
Changes in v3:
* Dropped ST(X) JITing coderefactoring and ensured the changes are
minimal and relevant to BPF_PROBE_MEM support.
* Added a default for size switch case to ensure compiler
Define and use PPC_RAW_BRANCH() macro instead of open coding it. This
macro is used while adding BPF_PROBE_MEM support.
Signed-off-by: Hari Bathini
Reviewed-by: Christophe Leroy
---
Changes in v3:
* Added Reviewed-by tag from Chris.
arch/powerpc/include/asm/ppc-opcode.h | 2 ++
arch/powerpc
re chosen random, not real)
Signed-off-by: Ravi Bangoria
Signed-off-by: Hari Bathini
---
Changes in v3:
* Made all changes for bpf_add_extable_entry() in this patch instead
of updating it again in patch #7.
* Fixed a coding style issue.
arch/powerpc/net/bpf_jit.h|
: Hari Bathini
---
Changes in v3:
* Used is_kernel_addr() logic instead of using TASK_SIZE_MAX check
all the time.
* Addressed other comments from Christophe.
arch/powerpc/net/bpf_jit_comp64.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/arch/powerpc/net
up=0xffe4 | /
0x4298 -->| insn=0xfe14 |
| fixup=0xffe8 |
+--+
(Addresses shown here are chosen random, not real)
Signed-off-by: Hari Bathini
---
Changes in v3:
* Changed how BPF_FIXUP_LEN is defined based on Chris' suggestion.
arch
exception table.
[Alexei suggested for x86]
Suggested-by: Alexei Starovoitov
Signed-off-by: Hari Bathini
---
Changes in v3:
* Updated jump for PPC_BCC to always be the same while emitting
a NOP instruction when needed.
arch/powerpc/net/bpf_jit_comp32.c | 35 +++
1
From: Ravi Bangoria
In case of extra_pass, usual JIT passes are always skipped. So,
extra_pass is always false while calling bpf_jit_build_body() and
can be removed.
Signed-off-by: Ravi Bangoria
---
* No changes in v4.
arch/powerpc/net/bpf_jit.h| 2 +-
arch/powerpc/net/bpf_jit_comp.
IT compilers respectively. Patch #6 & #8 handle bad userspace
pointers for PPC64 & PPC32 cases respectively.
Changes in v4:
* Addressed all the review comments from Christophe.
Hari Bathini (4):
bpf powerpc: refactor JIT compiler code
powerpc/ppc-opcode: introduce PPC_RAW_BRANCH() ma
From: Ravi Bangoria
SEEN_STACK is unused on PowerPC. Remove it. Also, have
SEEN_TAILCALL use 0x4000.
Signed-off-by: Ravi Bangoria
Reviewed-by: Christophe Leroy
---
* No changes in v4.
arch/powerpc/net/bpf_jit.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/
Define and use PPC_RAW_BRANCH() macro instead of open coding it. This
macro is used while adding BPF_PROBE_MEM support.
Signed-off-by: Hari Bathini
Reviewed-by: Christophe Leroy
---
* No changes in v4.
arch/powerpc/include/asm/ppc-opcode.h | 2 ++
arch/powerpc/net/bpf_jit.h| 4
re chosen random, not real)
Signed-off-by: Ravi Bangoria
Signed-off-by: Hari Bathini
---
Changes in v4:
* Dropped explicit fallthrough statement for empty switch cases.
arch/powerpc/net/bpf_jit.h| 8 +++-
arch/powerpc/net/bpf_jit_comp.c | 70 ---
arch/po
: Hari Bathini
---
Changes in v4:
* Used IS_ENABLED() instead of #ifdef.
* Dropped the else case that is not applicable for PPC64.
arch/powerpc/net/bpf_jit_comp64.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/arch/powerpc/net/bpf_jit_comp64.c
b/arch/powerpc
up=0xffe4 | /
0x4298 -->| insn=0xfe14 |
| fixup=0xffe8 |
+--+
(Addresses shown here are chosen random, not real)
Signed-off-by: Hari Bathini
---
Changes in v4:
* Dropped explicit fallthrough statement for empty switch cases.
arch/powe
Refactor powerpc LDX JITing code to simplify adding BPF_PROBE_MEM
support.
Signed-off-by: Hari Bathini
---
Changes in v4:
* Dropped the default case in the switch statement for bpf size.
* Dropped explicit fallthrough statement for empty switch cases.
arch/powerpc/net/bpf_jit_comp32.c | 33
exception table.
[Alexei suggested for x86]
Suggested-by: Alexei Starovoitov
Signed-off-by: Hari Bathini
---
Changes in v4:
* Adjusted the emit code to avoid using temporary reg.
arch/powerpc/net/bpf_jit_comp32.c | 34 +++
1 file changed, 34 insertions(+)
diff
From: Ravi Bangoria
In case of extra_pass, usual JIT passes are always skipped. So,
extra_pass is always false while calling bpf_jit_build_body() and
can be removed.
Signed-off-by: Ravi Bangoria
---
* No changes in v4.
arch/powerpc/net/bpf_jit.h| 2 +-
arch/powerpc/net/bpf_jit_comp.
Refactor powerpc LDX JITing code to simplify adding BPF_PROBE_MEM
support.
Signed-off-by: Hari Bathini
Reviewed-by: Christophe Leroy
---
Changes in v4:
* Dropped the default case in the switch statement for bpf size.
* Dropped explicit fallthrough statement for empty switch cases.
arch
re chosen random, not real)
Signed-off-by: Ravi Bangoria
Signed-off-by: Hari Bathini
Reviewed-by: Christophe Leroy
---
Changes in v4:
* Dropped explicit fallthrough statement for empty switch cases.
arch/powerpc/net/bpf_jit.h| 8 +++-
arch/powerpc/net/bpf_jit_comp.c | 66 +
: Hari Bathini
Reviewed-by: Christophe Leroy
---
Changes in v4:
* Used IS_ENABLED() instead of #ifdef.
* Dropped the else case that is not applicable for PPC64.
arch/powerpc/net/bpf_jit_comp64.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/arch/powerpc/net
Define and use PPC_RAW_BRANCH() macro instead of open coding it. This
macro is used while adding BPF_PROBE_MEM support.
Signed-off-by: Hari Bathini
Reviewed-by: Christophe Leroy
---
* No changes in v4.
arch/powerpc/include/asm/ppc-opcode.h | 2 ++
arch/powerpc/net/bpf_jit.h| 2
up=0xffe4 | /
0x4298 -->| insn=0xfe14 |
| fixup=0xffe8 |
+--+
(Addresses shown here are chosen random, not real)
Signed-off-by: Hari Bathini
Reviewed-by: Christophe Leroy
---
Changes in v4:
* Dropped explicit fallthrough statement for empty swi
exception table.
[Alexei suggested for x86]
Suggested-by: Alexei Starovoitov
Signed-off-by: Hari Bathini
Reviewed-by: Christophe Leroy
---
Changes in v4:
* Adjusted the emit code to avoid using temporary reg.
arch/powerpc/net/bpf_jit_comp32.c | 34 +++
1 file
.@linux.vnet.ibm.com/
("[v2,00/10] powerpc/bpf: Various fixes")
Also, added Reviewed-by tag from Christophe for patches #3, #5, #6, #7 & #8.
Hari Bathini (4):
bpf powerpc: refactor JIT compiler code
powerpc/ppc-opcode: introduce PPC_RAW_BRANCH() macro
bpf ppc32: Add BPF_PROBE_MEM s
From: Ravi Bangoria
SEEN_STACK is unused on PowerPC. Remove it. Also, have
SEEN_TAILCALL use 0x4000.
Signed-off-by: Ravi Bangoria
Reviewed-by: Christophe Leroy
---
* No changes in v4.
arch/powerpc/net/bpf_jit.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/
-off-by: Wan Jiabing
Thanks for fixing this!
Acked-by: Hari Bathini
---
arch/powerpc/kexec/file_load_64.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kexec/file_load_64.c
b/arch/powerpc/kexec/file_load_64.c
index 5056e175ca2c..b4981b651d9a 100644
--- a/arch/powerpc/kexec
holding off write protection of JIT code until the extra
pass, where branch target addresses fixup happens.
Cc: sta...@vger.kernel.org
Fixes: 62e3d4210ac9 ("powerpc/bpf: Write protect JIT code")
Signed-off-by: Hari Bathini
---
arch/powerpc/net/bpf_jit_comp.c | 2 +-
1 file changed, 1
mit bab26238bbd4 ("powerpc: Offline CPU in stop_this_cpu()")
reverted that change.
To avoid vmcore from showing only one CPU as online in panic path,
skip marking non panic'ing CPUs as offline while stopping them
during fadump crash.
Signed-off-by: Hari Bathini
---
arch/powerpc/
On 11/11/21 11:44 am, Michael Ellerman wrote:
Hari Bathini writes:
In panic path, fadump is triggered via a panic notifier function.
Before calling panic notifier functions, smp_send_stop() gets called,
which stops all CPUs except the panic'ing CPU. Commit 8389b37dffdc
(&qu
On 11/11/21 6:50 pm, Nicholas Piggin wrote:
Excerpts from Hari Bathini's message of November 11, 2021 10:06 pm:
On 11/11/21 11:44 am, Michael Ellerman wrote:
Hari Bathini writes:
In panic path, fadump is triggered via a panic notifier function.
Before calling panic notifier func
sion in panic path"). Override this kdump friendly weak
function to handle crash_kexec_post_notifiers option appropriately
on powerpc.
Signed-off-by: Hari Bathini
---
* New patch to handle the case where kdump is triggered after
panic notifiers.
arch/powerpc/kernel/smp.c | 26 +++
crash_kexec_post_notifiers
option. Also, as register data for all CPUs is captured by f/w, skip
IPI callbacks here for fadump, to avoid any complications in finding
the right backtraces.
Signed-off-by: Hari Bathini
---
Changes in v2:
* Let panic(0 take crash friendly path when fadump is enabled
test robot
Fixes: 140777a3d8df ("powerpc/fadump: consider reserved ranges while reserving
memory")
Cc: sta...@vger.kernel.org
Signed-off-by: Hari Bathini
---
For reference:
- https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-May/211136.html
arch/powerpc/kernel/fadump.c |2 +
laims kdump support as all the
necessary changes are added.
Tested the changes successfully on P8, P9 lpars & an OpenPOWER box.
---
Hari Bathini (11):
kexec_file: allow archs to handle special regions while locating memory
hole
powerpc/kexec_file: mark PPC64 specific code
n
an error is encountered in the callback function.
Signed-off-by: Hari Bathini
---
arch/powerpc/include/asm/drmem.h |9 ++--
arch/powerpc/kernel/prom.c | 13 +++---
arch/powerpc/mm/drmem.c | 87 +-
arch/powerpc/mm/numa.c |
as applicable. Restrict kdump kernel memory
to use only these regions by setting up usable-memory DT property.
Also, tell the kdump kernel to run at the loaded address by setting
the magic word at 0x5c.
Signed-off-by: Hari Bathini
---
arch/powerpc/kexec/file_load_64.c | 400
pointer and applying RELA relocations as needed.
Signed-off-by: Hari Bathini
---
arch/powerpc/kexec/file_load_64.c | 338
arch/powerpc/purgatory/trampoline_64.S |8 +
2 files changed, 346 insertions(+)
diff --git a/arch/powerpc/kexec/file_load_64.c
b/arch
To avoid any weird errors, the purgatory should run with its own
stack. Set one up by adding the stack buffer to .data section of
the purgatory.
Signed-off-by: Hari Bathini
---
arch/powerpc/include/asm/kexec.h |4
arch/powerpc/kexec/file_load_64.c | 14 +-
arch
ry to avoid kdump kernel from accidentially
using that memory.
Signed-off-by: Hari Bathini
---
arch/powerpc/include/asm/crashdump-ppc64.h |5 +
arch/powerpc/include/asm/kexec.h |7 ++
arch/powerpc/kexec/elf_64.c|9 +++
arch/powerpc/kexec/file_load_64.c |
While initrd, elfcorehdr and backup regions are already added to the
reserve map, there are a few missing regions that need to be added to
the memory reserve map. Add them here. And now that all the changes
to load panic kernel are in place, claim likewise.
Signed-off-by: Hari Bathini
---
arch
On 28/06/20 7:44 am, piliu wrote:
> Hi Hari,
Hi Pingfan,
>
> After a quick through for this series, I have a few question/comment on
> this patch for the time being. Pls see comment inline.
>
> On 06/27/2020 03:05 AM, Hari Bathini wrote:
>> crashkernel region co
add_buffer definition for archs to override & take
>> care of special regions before trying to locate a memory hole.
>>
>> Signed-off-by: Hari Bathini
Thanks
Hari
Hi Christophe
Thanks for the review...
On 27/06/20 12:12 pm, Christophe Leroy wrote:
>
>
> Le 26/06/2020 à 21:04, Hari Bathini a écrit :
>> Some of the kexec_file_load code isn't PPC64 specific. Move PPC64
>> specific code from kexec/file_load.c to kexec/file_
Hi Petr,
On 29/06/20 5:09 pm, Petr Tesarik wrote:
> Hi Hari,
>
> is there any good reason to add two more functions with a very similar
> name to an existing function? AFAICS all you need is a way to call a
> PPC64-specific function from within kexec_add_buffer (PATCH 4/11), so
> you could add so
On 30/06/20 9:00 am, piliu wrote:
>
>
> On 06/29/2020 01:55 PM, Hari Bathini wrote:
>>
>>
>> On 28/06/20 7:44 am, piliu wrote:
>>> Hi Hari,
>>
>> Hi Pingfan,
>>
>>>
>>> After a quick through for this series, I have a fe
On 01/07/20 1:10 pm, Dave Young wrote:
> Hi Hari,
> On 06/27/20 at 12:35am, Hari Bathini wrote:
>> crashkernel region could have an overlap with special memory regions
>> like opal, rtas, tce-table & such. These regions are referred to as
>> exclude memory rang
On 01/07/20 1:16 pm, Dave Young wrote:
> On 06/29/20 at 05:26pm, Hari Bathini wrote:
>> Hi Petr,
>>
>> On 29/06/20 5:09 pm, Petr Tesarik wrote:
>>> Hi Hari,
>>>
>>> is there any good reason to add two more functions with a very similar
>>&g
ed an option to merge ranges to minimize reallocations while
adding memory ranges.
* Dropped within_crashkernel parameter for add_opal_mem_range() &
add_rtas_mem_range() functions as it is not really needed.
---
Hari Bathini (12):
kexec_file: allow archs to handle special regions while locating
hole.
Also, add the missing declarations for arch overridable functions and
and drop the __weak descriptors in the declarations to avoid non-weak
definitions from becoming weak.
Reported-by: kernel test robot
[lkp: In v1, arch_kimage_file_post_load_cleanup() declaration was missing]
Signed-off-by:
Some of the kexec_file_load code isn't PPC64 specific. Move PPC64
specific code from kexec/file_load.c to kexec/file_load_64.c. Also,
rename purgatory/trampoline.S to purgatory/trampoline_64.S in the
same spirit.
Signed-off-by: Hari Bathini
---
Changes in v2:
* No changes.
arch/po
erstanding the subsequent changes better
and make it easy to setup the different memory ranges listed above, as
and when appropriate.
Signed-off-by: Hari Bathini
---
Changes in v2:
* Added an option to merge ranges while sorting to minimize reallocations
for memory ranges list.
ride arch_kexec_locate_mem_hole() to locate a memory hole taking
these ranges into account.
Signed-off-by: Hari Bathini
---
Changes in v2:
* Did arch_kexec_locate_mem_hole() override to handle special regions.
* Ensured holes in the memory are accounted for while locating mem hole.
* Updated add_rtas_mem_r
as applicable. Restrict kdump kernel memory
to use only these regions by setting up usable-memory DT property.
Also, tell the kdump kernel to run at the loaded address by setting
the magic word at 0x5c.
Signed-off-by: Hari Bathini
---
Changes in v2:
* Fixed off-by-one error while setting up
n
an error is encountered in the callback function.
Signed-off-by: Hari Bathini
---
Changes in v2:
* No changes.
arch/powerpc/include/asm/drmem.h |9 ++--
arch/powerpc/kernel/prom.c | 13 +++---
arch/powerpc/mm/drmem.c | 87 +-
arch/powerp
pointer and applying RELA relocations as needed.
Reported-by: kernel test robot
[lkp: In v1, 'struct mem_sym' was declared in parameter list]
Signed-off-by: Hari Bathini
---
Changes in v2:
* Fixed wrong use of 'struct mem_sym' in local_entry_offset() as
reported by lkp. lkp
To avoid any weird errors, the purgatory should run with its own
stack. Set one up by adding the stack buffer to .data section of
the purgatory. Also, setup opal base & entry values in r8 & r9
registers to help early OPAL debugging.
Signed-off-by: Hari Bathini
---
Changes in v2:
* Se
ry to avoid kdump kernel from accidentially
using that memory.
Reported-by: kernel test robot
[lkp: In v1, purgatory() declaration was missing]
Signed-off-by: Hari Bathini
---
Changes in v2:
* Check if backup region is available before branching out. This is
to keep `kexec -l -s` flow as before as
ff-by: Hari Bathini
---
Changes in v2:
* Tried merging adjacent memory ranges on hitting maximum ranges limit
to reduce reallocations for memory ranges and also, minimize PT_LOAD
segments for elfcore.
* Updated add_rtas_mem_range() & add_opal_mem_range() callsites based on
the new prototype
While initrd, elfcorehdr and backup regions are already added to the
reserve map, there are a few missing regions that need to be added to
the memory reserve map. Add them here. And now that all the changes
to load panic kernel are in place, claim likewise.
Signed-off-by: Hari Bathini
address isn't available while loading, are placed in an intermediate
location till a flush to the actual destination address happens during
kexec boot sequence.
Signed-off-by: Hari Bathini
---
Changes in v2:
* New patch to fix locating memory hole for kexec_file_load (kexec -s -l)
when memo
As kprobe does not handle events happening in real mode, blacklist the
functions that only get called in real mode or in kexec sequence with
MMU turned off.
Signed-off-by: Hari Bathini
---
arch/powerpc/kernel/head_64.S|2 ++
arch/powerpc/kexec/core_64.c |6
roc/vmcore at all due
to incomplete configuration in the userspace at the time of crash.
Commit 0823c68b054b ("powerpc/fadump: re-register firmware-assisted
dump if already registered") ensures this change does not break
userspace.
Signed-off-by: Hari Bathini
---
Changes in V2:
On 07/05/19 9:30 PM, Segher Boessenkool wrote:
On Tue, May 07, 2019 at 07:43:56PM +0530, Mahesh J Salgaonkar wrote:
Can we use SPRN_* #defines which are already present in asm/reg.h instead of
hard coding numbers for switch cases ? You may want to add new #defines
for NIP, MSR and CCR.
But no
On 08/05/19 5:55 AM, Nicholas Piggin wrote:
Hari Bathini's on April 16, 2019 8:35 pm:
From: Hari Bathini
Export /proc/opalcore file to analyze opal crashes. Since opalcore can
be generated independent of CONFIG_FA_DUMP support in kernel, add this
support under a new kernel config o
On 07/05/19 10:43 PM, Mahesh J Salgaonkar wrote:
On 2019-04-16 16:06:13 Tue, Hari Bathini wrote:
OPAL loads kernel & initrd at 512MB offset (256MB size), also exported
as ibm,opal/dump/fw-load-area. So, if boot memory size of FADump is
less than 768MB, kernel memory to be exported as
sion in panic path"). Override this kdump friendly weak
function to handle crash_kexec_post_notifiers option appropriately
on powerpc.
Signed-off-by: Hari Bathini
[Fixed signature of crash_stop_this_cpu() - reported by l...@intel.com]
Reported-by: kernel test robot
501 - 600 of 825 matches
Mail list logo