Re: [PATCH] rpmsg: char: Export alias for RPMSG ID rpmsg-raw from table

2024-08-08 Thread Hari Nagalla
the original "rpmsg_chrdev" ID. This was the ID used for this driver before it was upstreamed (as reflected by the module alias). Signed-off-by: Andrew Davis Acked/Tested-by: Hari Nagalla --- drivers/rpmsg/rpmsg_char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

Re: [PATCH 1/7] remoteproc: keystone: Use devm_kasprintf() to build name string

2024-08-08 Thread Hari Nagalla
On 8/2/24 13:22, Andrew Davis wrote: This is simpler and removes the need to assume the id length to be 1 digit, which then removes a W=1 compile warning about the same. Signed-off-by: Andrew Davis Acked/Tested-by: Hari Nagalla --- drivers/remoteproc/keystone_remoteproc.c | 6 +- 1

Re: [PATCH 0/4] remoteproc: k3-r5: Introduce suspend to ram support

2024-07-01 Thread Hari Nagalla
On 6/21/24 10:00, Richard Genoud wrote: Richard Genoud (4): remoteproc: k3-r5: Fix IPC-only mode detection remoteproc: k3-r5: Introduce PM suspend/resume handlers remoteproc: k3-r5: k3_r5_rproc_stop: code reorder remoteproc: k3-r5: support for graceful stop of remote cores IMO, the pa

Re: [PATCH 1/4] remoteproc: k3-r5: Fix IPC-only mode detection

2024-07-01 Thread Hari Nagalla
our assessment seems to be correct. That said I'd like to have an RB or a TB from someone in the TI delegation - guys please have a look. Agree with Richard's assessment, and the proposed fix looks good. Reviewed-by: Hari Nagalla

[PATCH v3] dt-bindings: remoteproc: k3-dsp: correct optional sram properties for AM62A SoCs

2024-06-04 Thread Hari Nagalla
The C7xv-dsp on AM62A have 32KB L1 I-cache and a 64KB L1 D-cache. It does not have an addressable l1dram . So, remove this optional sram property from the bindings to fix device tree build warnings. Signed-off-by: Hari Nagalla --- Changes in v3: *) Use allOf keyword with separate ifs for each

[PATCH v2] dt-bindings: remoteproc: k3-dsp: correct optional sram properties for AM62A SoCs

2024-05-30 Thread Hari Nagalla
The C7xv-dsp on AM62A have 32KB L1 I-cache and a 64KB L1 D-cache. It does not have an addressable l1dram . So, remove this optional sram property from the bindings to fix device tree build warnings. Signed-off-by: Hari Nagalla --- Changes from v1 to v2: *) Kept back memory-regions property, as

Re: [PATCH 13/13] mailbox: omap: Remove kernel FIFO message queuing

2024-04-01 Thread Hari Nagalla
On 3/25/24 12:20, Andrew Davis wrote: The kernel FIFO queue has a couple issues. The biggest issue is that it causes extra latency in a path that can be used in real-time tasks, such as communication with real-time remote processors. The whole FIFO idea itself looks to be a leftover from before

Re: [PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic

2024-04-01 Thread Hari Nagalla
On 3/25/24 12:20, Andrew Davis wrote: static int omap_mbox_chan_send_noirq(struct omap_mbox *mbox, u32 msg) { - int ret = -EBUSY; + if (mbox_fifo_full(mbox)) + return -EBUSY; - if (!mbox_fifo_full(mbox)) { - omap_mbox_enable_irq(mbox, IRQ_RX); -

[PATCH v7 3/5] remoteproc: k3: Move out functions common with M4 driver

2024-02-02 Thread Hari Nagalla
From: Martyn Welch In the next commit we will be adding the M4F driver which shares a lot of commonality with the DSP driver. Move this shared functionality out so that it can be used by both drivers. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes since v2: - New patch

[PATCH v7 4/5] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-02-02 Thread Hari Nagalla
and the other, a local reset is only for the M4F processing core. When loading the image, the driver first releases the subsystem reset, loads the firmware image and then releases the local reset to let the M4F processing core run. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla

[PATCH v7 1/5] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2024-02-02 Thread Hari Nagalla
e M4F subsystems. The YAML binding document provides the various node properties to be configured by the consumers of the M4F subsystem. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes since v1: - Spelling corrections - Corrected to pass DT checks Changes since v2: - Missed spe

[PATCH v7 5/5] arm64: defconfig: Enable TI K3 M4 remote proc driver

2024-02-02 Thread Hari Nagalla
Enable CONFIG_TI_K3_M4_REMOTEPROC Some K3 platform devices (AM64x, AM62x) have a Cortex M4 core. Build the M4 remote proc driver as a module for these platforms. Signed-off-by: Hari Nagalla --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs

[PATCH v7 2/5] remoteproc: k3: Move out data structures common with M4 driver

2024-02-02 Thread Hari Nagalla
From: Martyn Welch We will be adding the M4F driver which shares a lot of commonality with the DSP driver. Common data structures are introduced here. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes since v5: - Created a separate patch for data structures to ease review

[PATCH v7 0/5] TI K3 M4F support on AM64x and AM62x SoCs

2024-02-02 Thread Hari Nagalla
/5ba77847343f22b5f9ec2b7aeabc410aaf8cdf45 Hari Nagalla (2): dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs arm64: defconfig: Enable TI K3 M4 remote proc driver Martyn Welch (3): remoteproc: k3: Move out data structures common with M4 driver remoteproc: k3: Move out functions common with M4

Re: [PATCH v3 3/5] remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs

2023-12-08 Thread Hari Nagalla
On 11/2/23 11:43, Jan Kiszka wrote: RTI1 watchdog also powers up R5F core 1. And this could happen either in When writing "... also powers up...", other than R5F core 1, what else is being powered? Would be a question for the SoC vendor - I assumed that only mcu_rti1 [1] goes on when enabling i

Re: [PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-13 Thread Hari Nagalla
$id:http://devicetree.org/schemas/remoteproc/ti,k3-m4f-rproc.yaml# >> +$schema:http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: TI K3 M4F processor subsystems >> + >> +maintainers: >> + - Hari Nagalla >> + - Mathieu Poirier > Are you sure

[PATCH v6 3/4] remoteproc: k3: Split out functions common with M4 driver

2023-09-13 Thread Hari Nagalla
From: Martyn Welch In the next commit we will be adding the M4F driver which shares a lot of commonality with the DSP driver. Split this shared functionality out so that it can be used by both drivers. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes since v2: - New patch

[PATCH v6 0/4] TI K3 M4F support on AM64x and AM62x SoCs

2023-09-13 Thread Hari Nagalla
2022) for further details: https://www.ti.com/lit/pdf/SPRUIV7A Hari Nagalla (1): dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs Martyn Welch (3): remoteproc: k3: Split out data structures common with M4 driver remoteproc: k3: Split out functions common with M4 driver remoteproc: k3-m4

[PATCH v6 4/4] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2023-09-13 Thread Hari Nagalla
and the other, a local reset is only for the M4F processing core. When loading the image, the driver first releases the subsystem reset, loads the firmware image and then releases the local reset to let the M4F processing core run. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla

[PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-13 Thread Hari Nagalla
e M4F subsystems. The YAML binding document provides the various node properties to be configured by the consumers of the M4F subsystem. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes since v1: - Spelling corrections - Corrected to pass DT checks Changes since v2: - Missed spe

[PATCH v6 2/4] remoteproc: k3: Split out data structures common with M4 driver

2023-09-13 Thread Hari Nagalla
From: Martyn Welch We will be adding the M4F driver which shares a lot of commonality with the DSP driver. Common data structures are introduced here. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes in v6: - Created a separate patch for data structures to ease review

Re: [PATCH] powerpc/kdump: fix kdump kernel hangup issue with hot add CPUs

2021-04-16 Thread Hari Bathini
ll? Yeah, there won't be a hang in regular kexec_file_load case but for correctness, that kernel should also not see stale CPU info in FDT? Thanks Hari

Re: [PATCH v2] powerpc/kexec_file: Restore FDT size estimation for kdump kernel

2021-02-20 Thread Hari Bathini
s. Therefore change kexec_fdt_totalsize_ppc64() to calculate just the extra space needed by the kdump kernel, and change the function name so that it better reflects what the function is now doing. Thanks for fixing this, Thiago. Reviewed-by: Hari Bathini Signed-off-by: Thiago Jung Bauermann Reviewed-by: Lak

Re: [PATCH 06/15] powerpc: fadamp: simplify fadump_reserve_crash_area()

2020-08-01 Thread Hari Bathini
+--- 1 file changed, 1 insertion(+), 19 deletions(-) I think this looks OK to me, but I don't have a setup to test it easily. I've added Hari to Cc who might be able to. But I'll give you an ack in the hope that it works :) Actually, I did some digging in the git log and the trav

Re: [RESEND PATCH v5 00/11] ppc64: enable kdump support for kexec_file_load syscall

2020-07-29 Thread Hari Bathini
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

[PATCH v6 11/11] ppc64/kexec_file: enable early kernel's OPAL calls

2020-07-29 Thread Hari Bathini
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

[PATCH v6 09/11] ppc64/kexec_file: add appropriate regions for memory reserve map

2020-07-29 Thread Hari Bathini
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

[PATCH v6 08/11] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-29 Thread Hari Bathini
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()

[PATCH v6 10/11] ppc64/kexec_file: fix kexec load failure with lack of memory hole

2020-07-29 Thread 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 Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann --- v5 -> v6: * Unchanged. v4 -> v5:

[PATCH v6 07/11] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-29 Thread Hari Bathini
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. *

[PATCH v6 06/11] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-29 Thread Hari Bathini
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

[PATCH v6 05/11] powerpc/drmem: make lmb walk a bit more flexible

2020-07-29 Thread Hari Bathini
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

[PATCH v6 04/11] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-29 Thread Hari Bathini
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

[PATCH v6 02/11] powerpc/kexec_file: mark PPC64 specific code

2020-07-29 Thread Hari Bathini
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

[PATCH v6 03/11] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-29 Thread Hari Bathini
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

[PATCH v6 01/11] kexec_file: allow archs to handle special regions while locating memory hole

2020-07-29 Thread Hari Bathini
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:

[PATCH v6 00/11] ppc64: enable kdump support for kexec_file_load syscall

2020-07-29 Thread Hari Bathini
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

Re: [RESEND PATCH v5 06/11] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-28 Thread Hari Bathini
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

Re: [RESEND PATCH v5 07/11] ppc64/kexec_file: enable early kernel's OPAL calls

2020-07-28 Thread Hari Bathini
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

[RESEND PATCH v5 10/11] ppc64/kexec_file: add appropriate regions for memory reserve map

2020-07-26 Thread Hari Bathini
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

[RESEND PATCH v5 11/11] ppc64/kexec_file: fix kexec load failure with lack of memory hole

2020-07-26 Thread 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 Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann --- v4 -> v5: * Unchanged. v3 -> v4:

[RESEND PATCH v5 09/11] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-26 Thread Hari Bathini
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

[RESEND PATCH v5 07/11] ppc64/kexec_file: enable early kernel's OPAL calls

2020-07-26 Thread Hari Bathini
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 --- v4 -> v5: * New pat

[RESEND PATCH v5 06/11] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-26 Thread Hari Bathini
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 --- v4 -> v5: * Renamed get_node_path

[RESEND PATCH v5 08/11] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-26 Thread Hari Bathini
x27;s memory to avoid kdump kernel from accidentially using that memory. Signed-off-by: Hari Bathini --- v4 -> v5: * Did not add Reviewed-by tag from Thiago yet as he might want to reconsider it with the changes in this patch. * Wrote backup region copy code in assembler. Also, dropped the pa

[RESEND PATCH v5 05/11] powerpc/drmem: make lmb walk a bit more flexible

2020-07-26 Thread Hari Bathini
n an error is encountered in the callback function. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann --- v4 -> v5: * Unchanged. v3 -> v4: * Unchanged. Added Reviewed-by tag from Thiago. v2 -> v3: * Unchanged. Added Tested-by tag from Pingfan. v

[RESEND PATCH v5 04/11] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-26 Thread Hari Bathini
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 --- v4 -> v5: * Unchanged. Added Reviewed-by tag from Thiago. v3 -> v4: * Dropped KDUMP_BUF_MIN & KDUMP_BUF_MAX macros and fixed off-by-

[RESEND PATCH v5 03/11] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-26 Thread Hari Bathini
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 --- v4 -> v5: * Added Reviewed-by tag from Thiago. * Added the mi

[RESEND PATCH v5 02/11] powerpc/kexec_file: mark PPC64 specific code

2020-07-26 Thread Hari Bathini
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

[RESEND PATCH v5 01/11] kexec_file: allow archs to handle special regions while locating memory hole

2020-07-26 Thread Hari Bathini
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:

[RESEND PATCH v5 00/11] ppc64: enable kdump support for kexec_file_load syscall

2020-07-26 Thread Hari Bathini
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 really needed. --- Hari Bathini (11): kexec_file: allow archs to handle special

[PATCH v5 00/11] ppc64: enable kdump support for kexec_file_load syscall

2020-07-24 Thread Hari Bathini
meter for add_opal_mem_range() & add_rtas_mem_range() functions as it is not really needed. --- Hari Bathini (11): kexec_file: allow archs to handle special regions while locating memory hole powerpc/kexec_file: mark PPC64 specific code powerpc/kexec_file: add helper func

[PATCH v5 01/11] kexec_file: allow archs to handle special regions while locating memory hole

2020-07-24 Thread Hari Bathini
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:

[PATCH v5 02/11] powerpc/kexec_file: mark PPC64 specific code

2020-07-24 Thread Hari Bathini
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

Re: [PATCH v4 06/12] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-24 Thread Hari Bathini
On 24/07/20 5:36 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> Kdump kernel, used for capturing the kernel core image, is supposed >> to use only specific memory regions to avoid corrupting the image to >> be captured. The regions are crashkernel

Re: [PATCH v4 07/12] ppc64/kexec_file: add support to relocate purgatory

2020-07-22 Thread Hari Bathini
On 22/07/20 9:55 am, Michael Ellerman wrote: > Hari Bathini writes: >> Right now purgatory implementation is only minimal. But if purgatory >> code is to be enhanced to copy memory to the backup region and verify >> sha256 digest, relocations may have to be applied to the

Re: [PATCH v4 03/12] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-20 Thread Hari Bathini
On 20/07/20 6:21 pm, Hari Bathini wrote: > In kexec case, the kernel to be loaded uses the same memory layout as > the running kernel. So, passing on the DT of the running kernel would > be good enough. > > But in case of kdump, different memory ranges are needed to manage >

[PATCH v4 12/12] ppc64/kexec_file: fix kexec load failure with lack of memory hole

2020-07-20 Thread 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 Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann --- v3 -> v4: * Unchanged. Added Reviewed-by

[PATCH v4 11/12] ppc64/kexec_file: add appropriate regions for memory reserve map

2020-07-20 Thread Hari Bathini
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

[PATCH v4 07/12] ppc64/kexec_file: add support to relocate purgatory

2020-07-20 Thread Hari Bathini
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 --- * Michael, can you share your opinion on the below: - https://lore.kernel.org/patchwork/patch/1272027/ - My

[PATCH v4 08/12] ppc64/kexec_file: setup the stack for purgatory

2020-07-20 Thread Hari Bathini
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 Tested-by: Pingfan Liu Rev

[PATCH v4 10/12] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-20 Thread Hari Bathini
ff-by: Hari Bathini Tested-by: Pingfan Liu --- v3 -> v4: * Added a FIXME tag to indicate issue in adding opal/rtas regions to core image. * Folded prepare_elf_headers() function into load_elfcorehdr_segment(). v2 -> v3: * Unchanged. Added Tested-by tag from Pingfan. v1 -> v2: * Tried me

[PATCH v4 09/12] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-20 Thread Hari Bathini
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 --- v3 -> v4: * Moved fdt_add_mem_rsv() for backup region under kdump flag, on Thiago's suggestion, as it is only

[PATCH v4 06/12] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-20 Thread Hari Bathini
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 --- v3 -> v4: * Updated get_node_path()

[PATCH v4 04/12] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-20 Thread Hari Bathini
ride arch_kexec_locate_mem_hole() to locate a memory hole taking these ranges into account. Signed-off-by: Hari Bathini --- v3 -> v4: * Dropped KDUMP_BUF_MIN & KDUMP_BUF_MAX macros and fixed off-by-one error in arch_locate_mem_hole() helper routines. v2 -> v3: * If there are no exclude ranges, t

[PATCH v4 02/12] powerpc/kexec_file: mark PPC64 specific code

2020-07-20 Thread Hari Bathini
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

[PATCH v4 05/12] powerpc/drmem: make lmb walk a bit more flexible

2020-07-20 Thread Hari Bathini
n an error is encountered in the callback function. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann --- v3 -> v4: * Unchanged. Added Reviewed-by tag from Thiago. v2 -> v3: * Unchanged. Added Tested-by tag from Pingfan. v1 -> v2: * No changes.

[PATCH v4 01/12] kexec_file: allow archs to handle special regions while locating memory hole

2020-07-20 Thread Hari Bathini
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:

[PATCH v4 03/12] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-20 Thread Hari Bathini
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 --- v3 -> v4: * Unchanged. Added Reviewed-by tag from Thiago. v2 -> v3: * Unchanged. Added Acked-by

[PATCH v4 00/12] ppc64: enable kdump support for kexec_file_load syscall

2020-07-20 Thread Hari Bathini
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 really neede

Re: [PATCH v3 03/12] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-17 Thread Hari Bathini
On 17/07/20 10:02 am, Hari Bathini wrote: > > > On 15/07/20 5:19 am, Thiago Jung Bauermann wrote: >> >> Hello Hari, >> >> Hari Bathini writes: >> >>> In kexec case, the kernel to be loaded uses the same memory layout as >>> the ru

Re: [PATCH v3 02/12] powerpc/kexec_file: mark PPC64 specific code

2020-07-16 Thread Hari Bathini
On 16/07/20 7:19 am, Thiago Jung Bauermann wrote: > > I didn't forget about this patch. I just wanted to see more of the > changes before comenting on it. > > Hari Bathini writes: > >> Some of the kexec_file_load code isn't PPC64 specific. Move PPC64 >&

Re: [PATCH v3 03/12] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-16 Thread Hari Bathini
On 15/07/20 5:19 am, Thiago Jung Bauermann wrote: > > Hello Hari, > > Hari Bathini writes: > >> In kexec case, the kernel to be loaded uses the same memory layout as >> the running kernel. So, passing on the DT of the running kernel would >> be good e

Re: [PATCH v3 06/12] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-16 Thread Hari Bathini
On 17/07/20 3:33 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> On 16/07/20 4:22 am, Thiago Jung Bauermann wrote: >>> >>> Hari Bathini writes: >>> >>>> + * each representing a memory range. >>>> + */

Re: [PATCH v3 07/12] ppc64/kexec_file: add support to relocate purgatory

2020-07-16 Thread Hari Bathini
On 16/07/20 5:50 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> Right now purgatory implementation is only minimal. But if purgatory >> code is to be enhanced to copy memory to the backup region and verify > > Can't the memcpy be done

Re: [PATCH v3 06/12] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-16 Thread Hari Bathini
On 16/07/20 4:22 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> +/** >> + * get_node_path - Get the full path of the given node. >> + * @dn:Node. >> + * @path: Updated with the full path of the node. >> + * >

Re: [PATCH v3 09/12] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-16 Thread Hari Bathini
On 16/07/20 7:08 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> @@ -968,7 +1040,7 @@ int setup_new_fdt_ppc64(const struct kimage *image, >> void *fdt, >> >> /* >> * Restrict memory usage for kdump kernel by set

Re: [PATCH v3 05/12] powerpc/drmem: make lmb walk a bit more flexible

2020-07-16 Thread Hari Bathini
On 15/07/20 9:20 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> @@ -534,7 +537,7 @@ static int __init early_init_dt_scan_memory_ppc(unsigned >> long node, >> #ifdef CONFIG_PPC_PSERIES >> if (depth == 1 && >> st

Re: [PATCH v3 04/12] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-16 Thread Hari Bathini
On 15/07/20 8:09 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> +/** >> + * __locate_mem_hole_top_down - Looks top down for a large enough memory >> hole >> + * in the memory regi

Re: [PATCH v3 03/12] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-16 Thread Hari Bathini
nges; j++) { >> +if (rngs[idx].start > rngs[j].start) >> +idx = j; >> +} >> +if (idx != i) { >> +rng = rngs[idx]; >> +rngs[idx] = rngs[i]; >> +rngs[i] = rng; >> +} >> +} > > Would it work using sort() from lib/sort.c here? Yeah. I think we could reuse it with a simple compare callback. Will do that. Thanks Hari

Re: [PATCH v3 10/12] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-16 Thread Hari Bathini
On 16/07/20 7:52 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> /** >> + * get_crash_memory_ranges - Get crash memory ranges. This list includes >> + * first/crashing kernel's memory regions that >> + *

[PATCH v3 11/12] ppc64/kexec_file: add appropriate regions for memory reserve map

2020-07-13 Thread Hari Bathini
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

[PATCH v3 12/12] ppc64/kexec_file: fix kexec load failure with lack of memory hole

2020-07-13 Thread 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 Tested-by: Pingfan Liu --- v2 -> v3: * Unchanged. Added Tested-by tag from Pingfan. v1 -> v2: * N

[PATCH v3 04/12] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-13 Thread Hari Bathini
ride arch_kexec_locate_mem_hole() to locate a memory hole taking these ranges into account. Signed-off-by: Hari Bathini --- v2 -> v3: * If there are no exclude ranges, the right thing to do is fallbacking back to default kexec_locate_mem_hole() implementation instead of returning 0. Fixed that. v

[PATCH v3 09/12] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-13 Thread Hari Bathini
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 --- v2 -> v3: * Dropped check for backup_start in trampoline_64.S as purgatory() takes care of it anyway. v1 -> v2:

[PATCH v3 10/12] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-13 Thread Hari Bathini
ff-by: Hari Bathini Tested-by: Pingfan Liu --- v2 -> v3: * Unchanged. Added Tested-by tag from Pingfan. v1 -> 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

[PATCH v3 06/12] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-13 Thread Hari Bathini
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 --- v2 -> v3: * Unchanged. Added Tested

[PATCH v3 05/12] powerpc/drmem: make lmb walk a bit more flexible

2020-07-13 Thread Hari Bathini
n an error is encountered in the callback function. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu --- Patch 05/12 v2 -> v3: * Unchanged. Added Tested-by tag from Pingfan. v1 -> v2: * No changes. arch/powerpc/include/asm/drmem.h |9 ++-- arch/powerpc/kernel/prom.c | 13 ++

[PATCH v3 07/12] ppc64/kexec_file: add support to relocate purgatory

2020-07-13 Thread Hari Bathini
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 --- v2 -> v3: * Fixed get_toc_section() to return the section info that had relocations applied, to calculate th

[PATCH v3 02/12] powerpc/kexec_file: mark PPC64 specific code

2020-07-13 Thread Hari Bathini
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 Tested-by: Pingfan Liu --- v2 -> v3: * U

[PATCH v3 08/12] ppc64/kexec_file: setup the stack for purgatory

2020-07-13 Thread Hari Bathini
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 Tested-by: Pingfan Liu

[PATCH v3 03/12] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-13 Thread Hari Bathini
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 --- v2 -> v3: * Unchanged. Added Tested-by tag from Pingfan. v1 -> v2: * Added an option to merge ranges

[PATCH v3 00/12] ppc64: enable kdump support for kexec_file_load syscall

2020-07-13 Thread Hari Bathini
* 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 really needed. --- Hari Bat

[PATCH v3 01/12] kexec_file: allow archs to handle special regions while locating memory hole

2020-07-13 Thread Hari Bathini
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:

[PATCH v3 00/12] ppc64: enable kdump support for kexec_file_load syscall

2020-07-13 Thread Hari Bathini
xec kernel and also claims kdump support for kdump as all the necessary changes are added. The last patch fixes a lookup issue for `kexec -l -s` case when memory is reserved for crashkernel. --- Hari Bathini (12): kexec_file: allow archs to handle special regions while locating memory h

[PATCH v2 11/12] ppc64/kexec_file: add appropriate regions for memory reserve map

2020-07-02 Thread Hari Bathini
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

[PATCH v2 12/12] ppc64/kexec_file: fix kexec load failure with lack of memory hole

2020-07-02 Thread 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

[PATCH v2 10/12] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-02 Thread Hari Bathini
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

[PATCH v2 09/12] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-02 Thread Hari Bathini
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

[PATCH v2 08/12] ppc64/kexec_file: setup the stack for purgatory

2020-07-02 Thread Hari Bathini
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

  1   2   3   4   >