[PATCH v3] powerpc/fadump: sysfs for fadump memory reservation

2019-08-10 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by fadump for saving the crash dump. Add an ABI doc entry for new sysfs interface. - /sys/kernel/fadump_mem_reserved Signed-off-by: Sourabh Jain --- Changelog: v1 -> v2: - Added ABI doc for new sysfs interface. v2 -&

Re: [PATCH v3] powerpc/fadump: sysfs for fadump memory reservation

2019-08-26 Thread Sourabh Jain
On 8/26/19 3:46 PM, Sourabh Jain wrote: > > > On 8/26/19 3:29 PM, Hari Bathini wrote: >> >> >> On 10/08/19 11:29 PM, Sourabh Jain wrote: >>> Add a sys interface to allow querying the memory reserved by >>> fadump for saving the crash dump. >>

Re: [PATCH v3] powerpc/fadump: sysfs for fadump memory reservation

2019-08-26 Thread Sourabh Jain
On 8/26/19 3:29 PM, Hari Bathini wrote: > > > On 10/08/19 11:29 PM, Sourabh Jain wrote: >> Add a sys interface to allow querying the memory reserved by >> fadump for saving the crash dump. >> >> Add an ABI doc entry for new sysfs interface. >>- /sys/

[PATCH 1/4] powerpc/fadump: replicate /sys/kernel/fadump_* sysfs into /sys/kernel/fadump/

2019-09-15 Thread Sourabh Jain
are replicated inside /sys/kernel/fadump/ and eventually get removed in future. Added ABI documentation for all the replicated FADump sysfs file in Documentation/ABI/testing/sysfs-kernel-fadump. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump | 41

[PATCH 4/4] powerpc/fadump: sysfs for fadump memory reservation

2019-09-15 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by FADump for saving the crash dump. Also added Documentation/ABI for the new sysfs file. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump| 7 +++ Documentation/powerpc/firmware-assisted-dump.rst

[PATCH 2/4] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_*

2019-09-15 Thread Sourabh Jain
Add the missing ABI documentation for the already available fadump sysfs files. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump_enabled | 7 +++ Documentation/ABI/testing/sysfs-kernel-fadump_registered | 8 Documentation/ABI/testing/sysfs-kernel

[PATCH 3/4] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-09-15 Thread Sourabh Jain
The /sys/kernel/fadump_* sysfs files are replicated under /sys/kernel/fadump/ directory. But we need to keep the old sysfs files to maintain the backward compatibility. The sysfs files are scheduled to remove by 2021. Signed-off-by: Sourabh Jain --- .../{testing => obsolete}/sysfs-ker

[PATCH 0/4] reorganize and add FADump sysfs files

2019-09-15 Thread Sourabh Jain
to this a new FADump sys interface is added to get the amount of memory reserved by FADump for saving the crash dump. The series applies on top of: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-September/196871.html Sourabh Jain (4): powerpc/fadump: replicate /sys/kernel/fadump_* sysfs

Re: [PATCH v3] powerpc/fadump: sysfs for fadump memory reservation

2019-09-18 Thread Sourabh Jain
On 8/27/19 11:32 AM, Hari Bathini wrote: > > > On 27/08/19 8:49 AM, Michael Ellerman wrote: >> Hari Bathini writes: >>> On 26/08/19 4:14 PM, Sourabh Jain wrote: >>>> On 8/26/19 3:46 PM, Sourabh Jain wrote: >>>>> On 8/26/19 3:29 PM, Hari

Re: [PATCH] powerpc/fadump: sysfs for fadump memory reservation

2019-08-07 Thread Sourabh Jain
On 8/7/19 8:40 AM, Michael Ellerman wrote: > Sourabh Jain writes: >> Add a sys interface to allow querying the memory reserved by fadump >> for saving the crash dump. >> >> Signed-off-by: Sourabh Jain >> --- >> Documentation/powerpc/firmware-assist

[PATCH] powerpc/fadump: sysfs for fadump memory reservation

2019-08-05 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by fadump for saving the crash dump. Signed-off-by: Sourabh Jain --- Documentation/powerpc/firmware-assisted-dump.rst | 5 + arch/powerpc/kernel/fadump.c | 14 ++ 2 files changed, 19 insertions

[PATCH v2] powerpc/fadump: sysfs for fadump memory reservation

2019-08-08 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by fadump for saving the crash dump. Add an ABI doc entry for new sysfs interface. - /sys/kernel/fadump_mem_reserved Signed-off-by: Sourabh Jain --- v1 -> v2: - Added ABI doc for new sysfs interface. --- Documentation/ABI/test

[PATCH v3 2/4] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-11-09 Thread Sourabh Jain
. Also consolidate ABI documentation for all the FADump sysfs files in a single file Documentation/ABI/testing/sysfs-kernel-fadump. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump | 41 +++ arch/powerpc/kernel/fadump.c | 38

[PATCH v3 1/4] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_*

2019-11-09 Thread Sourabh Jain
Add the missing ABI documentation for the already available FADump sysfs files. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump_enabled | 7 +++ Documentation/ABI/testing/sysfs-kernel-fadump_registered | 8 Documentation/ABI/testing/sysfs-kernel

[PATCH v3 3/4] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-11-09 Thread Sourabh Jain
The /sys/kernel/fadump_* sysfs files are replicated under /sys/kernel/fadump/ directory. But we need to keep the old sysfs files to maintain the backward compatibility. The sysfs files are scheduled to remove by 2021. Signed-off-by: Sourabh Jain --- .../sysfs-kernel-fadump_enabled

[PATCH v3 4/4] powerpc/fadump: sysfs for fadump memory reservation

2019-11-09 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by FADump for saving the crash dump. Also added Documentation/ABI for the new sysfs file. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump| 7 +++ Documentation/powerpc/firmware-assisted-dump.rst

[PATCH v3 0/4] reorganize and add FADump sysfs files

2019-11-09 Thread Sourabh Jain
BI doc for exisiting sysfs file then replicate them under FADump kobject). v2->v3: - Remove the fadump_ prefix from replicated FADump sysfs file names. Sourabh Jain (4): Documentation/ABI: add ABI documentation for /sys/kernel/fadump_* powerpc/fadump: reorganize /sys/kernel/fadump_* sy

Re: [PATCH v2 3/4] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-11-05 Thread Sourabh Jain
On 11/5/19 10:31 PM, Hari Bathini wrote: > > > On 05/11/19 2:24 PM, Sourabh Jain wrote: >> >> >> On 10/21/19 1:11 PM, Hari Bathini wrote: >>> >>> >>> On 18/10/19 6:35 PM, Sourabh Jain wrote: >>>> The /sys/kernel/fadu

Re: [PATCH v3 2/4] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-11-16 Thread Sourabh Jain
On 11/9/19 6:29 PM, Michal Suchánek wrote: > On Sat, Nov 09, 2019 at 05:53:37PM +0530, Sourabh Jain wrote: >> As the number of FADump sysfs files increases it is hard to manage all of >> them inside /sys/kernel directory. It's better to have all the FADump >> related sysfs

Re: [PATCH v2 3/4] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-11-05 Thread Sourabh Jain
On 10/21/19 1:11 PM, Hari Bathini wrote: > > > On 18/10/19 6:35 PM, Sourabh Jain wrote: >> The /sys/kernel/fadump_* sysfs files are replicated under > > [...] > >> +Note: The following FADump sysfs files are deprecated. >> + >> +De

Re: [PATCH v3 2/4] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-12-03 Thread Sourabh Jain
s_link_entry_to_kobj) that adds a symlink to a kobject. But the problem is __compat_only_sysfs_link_entry_to_kobj function keeps the symlink file name similar to sysfs file and has no option to change it. We can't use the __compat_only_sysfs_link_entry_to_kobj function directly because our symlink file name must be different from the target file name. fadump_enabled -> fadump/enabled But the good thing is we can tweak the __compat_only_sysfs_link_entry_to_kobj function and allow the caller to change the sysmlink file name. So I am writing a separate patch that adds a wrapper function around the __compat_only_sysfs_link_entry_to_kobj function which will allow to have a custom symlink file name. Thanks, Sourabh Jain

[PATCH v5 1/6] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_*

2019-12-08 Thread Sourabh Jain
Add missing ABI documentation for existing FADump sysfs files. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump_enabled | 7 +++ Documentation/ABI/testing/sysfs-kernel-fadump_registered | 8 Documentation/ABI/testing/sysfs-kernel-fadump_release_mem

[PATCH v5 6/6] powerpc/fadump: sysfs for fadump memory reservation

2019-12-08 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by FADump for saving the crash dump. Also added Documentation/ABI for the new sysfs file. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump| 7 +++ Documentation/powerpc/firmware-assisted-dump.rst | 5

[PATCH v5 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-12-08 Thread Sourabh Jain
the FADump sysfs files in a single file Documentation/ABI/testing/sysfs-kernel-fadump. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump | 33 +++ arch/powerpc/kernel/fadump.c | 95 --- 2 files changed, 94 insertions(+), 34

[PATCH v5 2/6] sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name

2019-12-08 Thread Sourabh Jain
allows function caller to customize the symlink name. Signed-off-by: Sourabh Jain --- fs/sysfs/group.c | 28 +--- include/linux/sysfs.h | 12 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index

[PATCH v5 5/6] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-12-08 Thread Sourabh Jain
Add a deprecation note in FADump sysfs ABI documentation files and move them from ABI/testing to ABI/obsolete directory. Signed-off-by: Sourabh Jain --- .../ABI/{testing => obsolete}/sysfs-kernel-fadump_enabled | 2 ++ .../{testing => obsolete}/sysfs-kernel-fadump_registere

[PATCH v5 4/6] powerpc/powernv: move core and fadump_release_opalcore under new kobject

2019-12-08 Thread Sourabh Jain
/firmware/opal/core sysfs file. Signed-off-by: Sourabh Jain --- .../sysfs-kernel-fadump_release_opalcore | 2 + .../powerpc/firmware-assisted-dump.rst| 15 +++-- arch/powerpc/platforms/powernv/opal-core.c| 55 ++- 3 files changed, 51 insertions(+), 21 deletions

[PATCH v5 0/6] reorganize and add FADump sysfs files

2019-12-08 Thread Sourabh Jain
v5: - Changed the wrapper function name in 2/6. - Defined FADump kobject attributes using __ATTR_* macros. - Replace individual FADump sysfs file creation with group. - Added a macro to create symlink. Sourabh Jain (6): Documentation/ABI: add ABI documentation for /sys/kernel/fadump_

Re: [PATCH v4 2/6] sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name

2019-12-06 Thread Sourabh Jain
On 12/7/19 12:44 AM, Greg KH wrote: > On Fri, Dec 06, 2019 at 11:57:53PM +0530, Sourabh Jain wrote: >> >> >> On 12/6/19 6:16 PM, Greg KH wrote: >>> On Fri, Dec 06, 2019 at 05:54:30PM +0530, Sourabh Jain wrote: >>>> The __compat_only_sysfs_lin

[PATCH v6 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-12-11 Thread Sourabh Jain
the FADump sysfs files in a single file Documentation/ABI/testing/sysfs-kernel-fadump. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump | 33 + arch/powerpc/kernel/fadump.c | 118 +- 2 files changed, 117 insertions(+), 34

[PATCH v6 2/6] sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name

2019-12-11 Thread Sourabh Jain
allows function caller to customize the symlink name. Signed-off-by: Sourabh Jain --- fs/sysfs/group.c | 28 +--- include/linux/sysfs.h | 12 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index

[PATCH v6 4/6] powerpc/powernv: move core and fadump_release_opalcore under new kobject

2019-12-11 Thread Sourabh Jain
/firmware/opal/core sysfs file. Signed-off-by: Sourabh Jain --- .../sysfs-kernel-fadump_release_opalcore | 2 + .../powerpc/firmware-assisted-dump.rst| 15 +++-- arch/powerpc/platforms/powernv/opal-core.c| 55 ++- 3 files changed, 51 insertions(+), 21 deletions

[PATCH v6 1/6] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_*

2019-12-11 Thread Sourabh Jain
Add missing ABI documentation for existing FADump sysfs files. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump_enabled | 7 +++ Documentation/ABI/testing/sysfs-kernel-fadump_registered | 8 Documentation/ABI/testing/sysfs-kernel-fadump_release_mem

[PATCH v6 0/6] reorganize and add FADump sysfs files

2019-12-11 Thread Sourabh Jain
eation fails. - Removed CREATE_SYMLINK macro. Sourabh Jain (6): Documentation/ABI: add ABI documentation for /sys/kernel/fadump_* sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files powerpc/p

[PATCH v6 5/6] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-12-11 Thread Sourabh Jain
Add a deprecation note in FADump sysfs ABI documentation files and move them from ABI/testing to ABI/obsolete directory. Signed-off-by: Sourabh Jain --- .../ABI/{testing => obsolete}/sysfs-kernel-fadump_enabled | 2 ++ .../{testing => obsolete}/sysfs-kernel-fadump_registere

[PATCH v6 6/6] powerpc/fadump: sysfs for fadump memory reservation

2019-12-11 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by FADump for saving the crash dump. Also added Documentation/ABI for the new sysfs file. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump| 7 +++ Documentation/powerpc/firmware-assisted-dump.rst | 5

[PATCH v4 0/6] reorganize and add FADump sysfs files

2019-12-06 Thread Sourabh Jain
FADump kobject). v2 -> v3: - Remove the fadump_ prefix from replicated FADump sysfs file names. v3 -> v4: - New patch that adds a wrapper function to create symlink with custom symlink file name. - Add symlink instead of replicating the FADump sysfs files. - Move the OPAL core rel Sou

[PATCH v4 1/6] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_*

2019-12-06 Thread Sourabh Jain
Add missing ABI documentation for existing FADump sysfs files. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump_enabled | 7 +++ Documentation/ABI/testing/sysfs-kernel-fadump_registered | 8 Documentation/ABI/testing/sysfs-kernel-fadump_release_mem

[PATCH v4 2/6] sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name

2019-12-06 Thread Sourabh Jain
allows function caller to customize the symlink name. Signed-off-by: Sourabh Jain --- fs/sysfs/group.c | 28 +--- include/linux/sysfs.h | 12 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index d41c21fef138

[PATCH v4 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-12-06 Thread Sourabh Jain
the FADump sysfs files in a single file Documentation/ABI/testing/sysfs-kernel-fadump. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump | 33 ++ arch/powerpc/kernel/fadump.c | 66 ++- 2 files changed, 83 insertions(+), 16

[PATCH v4 4/6] powerpc/powernv: move core and fadump_release_opalcore under new kobject

2019-12-06 Thread Sourabh Jain
/firmware/opal/core sysfs file. Signed-off-by: Sourabh Jain --- .../sysfs-kernel-fadump_release_opalcore | 2 ++ .../powerpc/firmware-assisted-dump.rst| 15 + arch/powerpc/platforms/powernv/opal-core.c| 31 ++- 3 files changed, 34 insertions(+), 14

[PATCH v4 5/6] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-12-06 Thread Sourabh Jain
Add a deprecation note in FADump sysfs ABI documentation files and move them from ABI/testing to ABI/obsolete directory. Signed-off-by: Sourabh Jain --- .../ABI/{testing => obsolete}/sysfs-kernel-fadump_enabled | 2 ++ .../{testing => obsolete}/sysfs-kernel-fadump_registere

[PATCH v4 6/6] powerpc/fadump: sysfs for fadump memory reservation

2019-12-06 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by FADump for saving the crash dump. Also added Documentation/ABI for the new sysfs file. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump| 7 +++ Documentation/powerpc/firmware-assisted-dump.rst

Re: [PATCH v4 2/6] sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name

2019-12-06 Thread Sourabh Jain
On 12/6/19 6:16 PM, Greg KH wrote: > On Fri, Dec 06, 2019 at 05:54:30PM +0530, Sourabh Jain wrote: >> The __compat_only_sysfs_link_entry_to_kobj function creates a symlink to a >> kobject but doesn't provide an option to change the symlink file name. >> >> This pa

Re: [PATCH v4 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-12-06 Thread Sourabh Jain
On 12/6/19 6:15 PM, Greg KH wrote: > On Fri, Dec 06, 2019 at 05:54:31PM +0530, Sourabh Jain wrote: >> +static struct kobj_attribute release_attr = __ATTR(release_mem, >>

Re: [PATCH v4 4/6] powerpc/powernv: move core and fadump_release_opalcore under new kobject

2019-12-06 Thread Sourabh Jain
On 12/6/19 6:18 PM, Greg KH wrote: > On Fri, Dec 06, 2019 at 05:54:32PM +0530, Sourabh Jain wrote: >> The /sys/firmware/opal/core and /sys/kernel/fadump_release_opalcore sysfs >> files are used to export and release the OPAL memory on PowerNV platform. >> let's organize th

Re: [PATCH v4 6/6] powerpc/fadump: sysfs for fadump memory reservation

2019-12-06 Thread Sourabh Jain
On 12/6/19 6:18 PM, Greg KH wrote: > On Fri, Dec 06, 2019 at 05:54:34PM +0530, Sourabh Jain wrote: >> Add a sys interface to allow querying the memory reserved by FADump for >> saving the crash dump. >> >> Also added Documentation/ABI for the new sysfs file. >&g

Re: [PATCH v5 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-12-09 Thread Sourabh Jain
On 12/9/19 1:40 PM, Greg KH wrote: > On Mon, Dec 09, 2019 at 10:28:23AM +0530, Sourabh Jain wrote: >> +#define CREATE_SYMLINK(target, symlink_name) do {\ >> +rc = compat_only_sysfs_link_entry_to_kobj(kernel_kobj, fadump_kobj, \ >> +

[PATCH v2 1/4] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_*

2019-10-18 Thread Sourabh Jain
Add the missing ABI documentation for the already available FADump sysfs files. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump_enabled | 7 +++ Documentation/ABI/testing/sysfs-kernel-fadump_registered | 8 Documentation/ABI/testing/sysfs-kernel

[PATCH v2 2/4] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-10-18 Thread Sourabh Jain
are replicated inside /sys/kernel/fadump/ and eventually get removed in future. Consolidate ABI documentation for all the FADump sysfs file in a single file Documentation/ABI/testing/sysfs-kernel-fadump. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump | 41

[PATCH v2 0/4] reorganize and add FADump sysfs files

2019-10-18 Thread Sourabh Jain
BI doc for exisiting sysfs file then replicate them under FADump kobject). Sourabh Jain (4): Documentation/ABI: add ABI documentation for /sys/kernel/fadump_* powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated powerpc/

[PATCH v2 4/4] powerpc/fadump: sysfs for fadump memory reservation

2019-10-18 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by FADump for saving the crash dump. Also added Documentation/ABI for the new sysfs file. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump| 7 +++ Documentation/powerpc/firmware-assisted-dump.rst

[PATCH v2 3/4] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-10-18 Thread Sourabh Jain
The /sys/kernel/fadump_* sysfs files are replicated under /sys/kernel/fadump/ directory. But we need to keep the old sysfs files to maintain the backward compatibility. The sysfs files are scheduled to remove by 2021. Signed-off-by: Sourabh Jain --- .../sysfs-kernel-fadump_enabled

Re: [PATCH v3 2/4] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-11-26 Thread Sourabh Jain
On 11/25/19 12:10 AM, Michal Suchánek wrote: > On Sat, Nov 16, 2019 at 08:07:29PM +0530, Sourabh Jain wrote: >> >> >> On 11/9/19 6:29 PM, Michal Suchánek wrote: >>> On Sat, Nov 09, 2019 at 05:53:37PM +0530, Sourabh Jain wrote: >>>> As the number

[PATCH v3] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-04-09 Thread Sourabh Jain
update completes To avoid the race between the CPU who proceeds with the pstore and the CPU who triggers the crash, a delay of 500 milliseconds is added on fadump crash path to allow pstore update to complete before we trigger the crash. Signed-off-by: Sourabh Jain --- arch/powerpc/

[PATCH v2] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-04-01 Thread Sourabh Jain
update completes To avoid the race between the CPU who proceeds with the pstore and the CPU who triggers the crash, a delay of 500 milliseconds is added on fadump crash path to allow pstore update to complete before we trigger the crash. Signed-off-by: Sourabh Jain --- arch/powerpc/k

[PATCH] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-03-29 Thread Sourabh Jain
update completes In order to avoid the race between the CPU who proceeds with the pstore and the CPU who triggers the crash, a delay of 100 milliseconds is added on fadump crash path to allow pstore update to complete before we trigger the crash. Signed-off-by: Sourabh Jain --- arch

[PATCH v6] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-07-12 Thread Sourabh Jain
rash. A timeout is kept to ensure the primary CPU (one who initiates the crash) do not wait for secondary CPUs indefinitely. Signed-off-by: Sourabh Jain --- arch/powerpc/kernel/fadump.c | 24 1 file changed, 24 insertions(+) --- Chanagelog: v1 -> v3: - https://

[PATCH v5] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-06-17 Thread Sourabh Jain
rash. A timeout is kept to ensure the primary CPU (one who initiates the crash) do not wait for secondary CPUs indefinitely. Signed-off-by: Sourabh Jain --- arch/powerpc/kernel/fadump.c | 25 + 1 file changed, 25 insertions(+) --- Chanagelog: v1 -> v3: - https://

[PATCH] powerpc/fadump: update kernel logs before fadump crash begins

2020-06-05 Thread Sourabh Jain
c function). Signed-off-by: Sourabh Jain --- arch/powerpc/include/asm/bug.h | 2 ++ arch/powerpc/kernel/setup-common.c | 1 + arch/powerpc/kernel/traps.c| 12 +++- arch/powerpc/platforms/ps3/setup.c | 2 +- arch/powerpc/platforms/pseries/setup.c | 2 +- 5 fil

[PATCH v4] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-06-04 Thread Sourabh Jain
rash. A timeout is kept to ensure the primary CPU (one who initiates the crash) do not wait for secondary CPUs indefinitely. Signed-off-by: Sourabh Jain --- arch/powerpc/kernel/fadump.c | 24 1 file changed, 24 insertions(+) --- Chanagelog: v1 -> v3: - https://

[PATCH v6] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-26 Thread Sourabh Jain
("powerpc/kexec_file: Add appropriate regions for memory reserve map") Signed-off-by: Sourabh Jain Reviewed-by: Hari Bathini Cc: --- arch/powerpc/kexec/file_load_64.c | 88 +++ 1 file changed, 88 insertions(+) --- Changelog: v1 -> v5 - https://lis

[PATCH v7] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-29 Thread Sourabh Jain
("powerpc/kexec_file: Add appropriate regions for memory reserve map") Signed-off-by: Sourabh Jain Reviewed-by: Hari Bathini Cc: --- arch/powerpc/kexec/file_load_64.c | 92 +++ 1 file changed, 92 insertions(+) --- Changelog: v1 -> v5 - https://lis

Re: [PATCH v6] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-29 Thread Sourabh Jain
On 28/04/21 6:02 am, Tyrel Datwyler wrote: On 4/26/21 9:51 PM, Sourabh Jain wrote: kexec_file_load uses initial_boot_params in setting up the device-tree for the kernel to be loaded. Though initial_boot_params holds info about CPUs at the time of boot, it doesn't account for hot added CPUs

[PATCH v4] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-19 Thread Sourabh Jain
("powerpc/kexec_file: Add appropriate regions for memory reserve map") Signed-off-by: Sourabh Jain Reviewed-by: Hari Bathini Cc: --- arch/powerpc/kexec/file_load_64.c | 98 +++ 1 file changed, 98 insertions(+) --- Changelog: v1 -> v3 - https://lis

[PATCH v5] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-19 Thread Sourabh Jain
("powerpc/kexec_file: Add appropriate regions for memory reserve map") Signed-off-by: Sourabh Jain Reviewed-by: Hari Bathini Cc: --- arch/powerpc/kexec/file_load_64.c | 97 +++ 1 file changed, 97 insertions(+) --- Changelog: v1 -> v3 - https://lis

Re: [PATCH v4] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-19 Thread Sourabh Jain
On 19/04/21 5:51 pm, Michael Ellerman wrote: Hari Bathini writes: On 19/04/21 2:06 pm, Sourabh Jain wrote: kexec_file_load uses initial_boot_params in setting up the device-tree for the kernel to be loaded. Though initial_boot_params holds info about CPUs at the time of boot, it doesn't

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

2021-04-16 Thread Sourabh Jain
On 16/04/21 3:03 pm, Hari Bathini wrote: On 16/04/21 12:17 pm, Sourabh Jain wrote: With the kexec_file_load system call when system crashes on the hot add CPU the capture kernel hangs and failed to collect the vmcore.   Kernel panic - not syncing: sysrq triggered crash   CPU: 24 PID: 6065

[PATCH v2] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-16 Thread Sourabh Jain
("powerpc/kexec_file: Add appropriate regions for memory reserve map") Signed-off-by: Sourabh Jain --- arch/powerpc/kexec/file_load_64.c | 98 +++ 1 file changed, 98 insertions(+) --- Changelog: v1 -> v2 - fdt should be updated regardless of kexec typ

[PATCH v3] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-16 Thread Sourabh Jain
("powerpc/kexec_file: Add appropriate regions for memory reserve map") Signed-off-by: Sourabh Jain Cc: --- arch/powerpc/kexec/file_load_64.c | 98 +++ 1 file changed, 98 insertions(+) --- Changelog: v1 -> v2 - fdt should be updated regardless of kexec typ

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

2021-04-16 Thread Sourabh Jain
;) Signed-off-by: Sourabh Jain --- arch/powerpc/kexec/file_load_64.c | 100 ++ 1 file changed, 100 insertions(+) diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c index 02b9e4d0dc40..63a30f1ddc2c 100644 --- a/arch/powerpc/kexec/file

[PATCH 0/3] Update crashkernel offset to allow kernel to boot on large config LPARs

2021-10-08 Thread Sourabh Jain
Salgaonkar (2): fixup mmu_features immediately after getting cpu pa features. Remove 256MB limit restriction for boot cpu paca allocation Sourabh Jain (1): powerpc: Set crashkernel offset to mid of RMA region arch/powerpc/include/asm/book3s/64/mmu.h | 2 ++ arch/powerpc/include/asm/mmu.h

[PATCH 1/3] fixup mmu_features immediately after getting cpu pa features.

2021-10-08 Thread Sourabh Jain
ported segment size in HPT mode. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul haleem --- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc/include/asm/mmu.h | 1 + arch/powerpc/kernel/prom.c | 2 ++ arch/powerpc/

[PATCH 3/3] powerpc: Set crashkernel offset to mid of RMA region

2021-10-08 Thread Sourabh Jain
. The rest of LPAR specific initialization will still be done during pseries_probe_fw_features as usual. Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul haleem --- arch/powerpc/kernel/rtas.c | 4 arch/powerpc/kexec/core.c | 15 +++ 2 files changed, 15 insertions(+), 4

[PATCH 2/3] Remove 256MB limit restriction for boot cpu paca allocation

2021-10-08 Thread Sourabh Jain
allocation for boot cpu removes this restriction of 256MB limit. This allows kdump kernel to successfully boot and capture vmcore. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul haleem --- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc

[RESEND PATCH v2 2/3] Remove 256MB limit restriction for boot cpu paca allocation

2021-10-18 Thread Sourabh Jain
allocation for boot cpu removes this restriction of 256MB limit. This allows kdump kernel to successfully boot and capture vmcore. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul haleem --- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc

[RESEND PATCH v2 3/3] powerpc: Set crashkernel offset to mid of RMA region

2021-10-18 Thread Sourabh Jain
. The rest of LPAR specific initialization will still be done during pseries_probe_fw_features as usual. Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul haleem --- arch/powerpc/kernel/rtas.c | 4 arch/powerpc/kexec/core.c | 15 +++ 2 files changed, 15 insertions(+), 4

[RESEND PATCH v2 0/3] Update crashkernel offset to allow kernel to boot on large config LPARs

2021-10-18 Thread Sourabh Jain
: forgot to add version tag last time forgot to CCed PowerPC maintainer Mahesh Salgaonkar (2): fixup mmu_features immediately after getting cpu pa features. Remove 256MB limit restriction for boot cpu paca allocation Sourabh Jain (1): powerpc: Set crashkernel offset to mid

[RESEND PATCH v2 1/3] fixup mmu_features immediately after getting cpu pa features.

2021-10-18 Thread Sourabh Jain
ported segment size in HPT mode. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul haleem --- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc/include/asm/mmu.h | 1 + arch/powerpc/kernel/prom.c | 2 ++ arch/powerpc/

[PATCH 0/3] Update crashkernel offset to allow kernel to boot on large config LPARs

2021-10-04 Thread Sourabh Jain
that by fixing the radix bit in mmu_feature. Mahesh Salgaonkar (2): fixup mmu_features immediately after getting cpu pa features. Remove 256MB limit restriction for boot cpu paca allocation Sourabh Jain (1): powerpc: Set crashkernel offset to mid of RMA region arch/powerpc/include/asm/book3s

[PATCH 1/3] fixup mmu_features immediately after getting cpu pa features.

2021-10-04 Thread Sourabh Jain
ported segment size in HPT mode. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul haleem --- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc/include/asm/mmu.h | 1 + arch/powerpc/kernel/prom.c | 1 + arch/powerpc/mm/ini

[PATCH 2/3] Remove 256MB limit restriction for boot cpu paca allocation

2021-10-04 Thread Sourabh Jain
allocation for boot cpu removes this restriction of 256MB limit. This allows kdump kernel to successfully boot and capture vmcore. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul haleem --- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc

[PATCH 3/3] powerpc: Set crashkernel offset to mid of RMA region

2021-10-04 Thread Sourabh Jain
essential system resources. Given that the RMA region size can be 512MB or more, setting the crashkernel offset to mid of RMA size will leave enough space to kernel to allocate memory for other system resources in the first memory block. Signed-off-by: Sourabh Jain Reported-and-tested-by: Abdul

Re: [PATCH 3/3] powerpc: Set crashkernel offset to mid of RMA region

2021-10-04 Thread Sourabh Jain
plitting the probe_fw_features functions into two functions, one to detect FW_FEATURE_LPAR and another function to do the rest? also do we expect other firmware features to be set along with FW_FEATURE_LPAR? No only FW_FEATURE_LPAR feature so that kernel can decide the crashkernel offset accordingly. Thanks for the review. - Sourabh Jain

Re: [PATCH 3/3] powerpc: Set crashkernel offset to mid of RMA region

2021-10-05 Thread Sourabh Jain
On 04/10/21 21:36, Aneesh Kumar K.V wrote: On 10/4/21 20:41, Sourabh Jain wrote: On large config LPARs (having 192 and more cores), Linux fails to boot due to insufficient memory in the first memory block. It is due to the reserve crashkernel area starts at 128MB offset by default and which

Re: [RESEND PATCH v2 1/3] fixup mmu_features immediately after getting cpu pa features.

2021-11-17 Thread Sourabh Jain
Hi MPE, Any comments or suggestion on list patch series? Thanks, Sourabh Jain On 18/10/21 14:14, Sourabh Jain wrote: From: Mahesh Salgaonkar On system with radix support available, early_radix_enabled() starts returning true for a small window (until mmu_early_init_devtree() is called) even

[RFC v2 PATCH 5/5] powerpc/crash hp: add crash hotplug support for kexec_load

2022-03-14 Thread Sourabh Jain
segment is present. The only change was done to enabled crash hotplug support for kexec_load is updated the crash hotplug handler to identify the FDT segment from kexec segment array. Signed-off-by: Sourabh Jain --- arch/powerpc/kexec/core_64.c | 21 - 1 file changed, 20

[RFC v2 PATCH 4/5] powerpc/crash hp: add crash hotplug support for kexec_file_load

2022-03-14 Thread Sourabh Jain
memory crash hotplug support is not there yet the crash hotplug handler simply warn the user and return. Signed-off-by: Sourabh Jain --- arch/powerpc/kexec/core_64.c | 46 arch/powerpc/kexec/elf_64.c | 39 ++ 2 files changed, 85

[RFC v2 PATCH 2/5] powerpc/crash hp: introduce a new config option CRASH_HOTPLUG

2022-03-14 Thread Sourabh Jain
The option CRASH_HOTPLUG enables, in kernel update to kexec segments on hotplug events. All the updates needed on the capture kernel load path in the kernel for both kexec_load and kexec_file_load system will be kept under this config. Signed-off-by: Sourabh Jain --- arch/powerpc/Kconfig | 11

[RFC v2 PATCH 3/5] powrepc/crash hp: update kimage struct

2022-03-14 Thread Sourabh Jain
index; bool is_valid; } Signed-off-by: Sourabh Jain --- include/linux/kexec.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index e00c373c4095..e9038f2c75ee 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -306,6 +306,8

[RFC v2 PATCH 1/5] powerpc/kexec: make update_cpus_node non-static

2022-03-14 Thread Sourabh Jain
Make the update_cpus_node function non-static and export it for usage in other kexec components. The update_cpus_node definition is moved to core_64.c so that it can be used with both kexec_load and kexec_file_load system calls. Signed-off-by: Sourabh Jain --- arch/powerpc/include/asm/kexec.h

[RFC v2 PATCH 0/5] In kernel handling of CPU hotplug events for crash kernel

2022-03-14 Thread Sourabh Jain
// Given that we might need to update mutliple kexec segments + // then having array to keep indexes of all hotplug kexec segments + // will be helpful. + unsigned int fdt_index; }; struct arch_map_entry { --- Sourabh Jain (5): powerpc/kexec: make update_cpus_node non-sta

Re: [RFC PATCH 0/5] Avoid kdump service reload on CPU hotplug events

2022-02-24 Thread Sourabh Jain
Hello Baoquan, Hi, On 02/21/22 at 02:16pm, Sourabh Jain wrote: On hotplug event (CPU/memory) the CPU information prepared for the kdump kernel becomes stale unless it is prepared again. To keep the CPU information up-to-date a kdump service reload is triggered via the udev rule. The above

[RFC PATCH 0/5] Avoid kdump service reload on CPU hotplug events

2022-02-21 Thread Sourabh Jain
xec_load system call to work (not needed if -s option is used during kexec panic load): --- >From 37aa38713c163b31d9c6e80ddc059424c9fcd66d Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Mon, 22 Nov 2021 14:12:52 +0530 Subject: [PATCH] kexec/ppc64: use pre-allocated memory hole for kexec

[RFC PATCH 4/5] powerpc/kdump: enable kexec_file_load system call to use kexec crash FDT

2022-02-21 Thread Sourabh Jain
This patch enables the kexec_file_load system to utilize the pre-allocated space for kexec crash FDT during the system boot. Signed-off-by: Sourabh Jain --- arch/powerpc/kexec/elf_64.c | 22 +++--- arch/powerpc/kexec/file_load_64.c | 4 2 files changed, 23 insertions

[RFC PATCH 5/5] powerpc/kdump: export kexec crash FDT details via sysfs

2022-02-21 Thread Sourabh Jain
Export kexec crash FDT address and size to /sys/kernel/kexec_crash_fdt and /sys/kernel/kexec_crash_fdt_size files to enabled kexec tool to utilize pre-allocated space kdump FDT. Signed-off-by: Sourabh Jain --- arch/powerpc/kexec/core_64.c | 27 +++ 1 file changed, 27

[RFC PATCH 3/5] powerpc/kdump: update kexec crash FDT on CPU hot add event

2022-02-21 Thread Sourabh Jain
-off-by: Sourabh Jain --- arch/powerpc/include/asm/kexec.h | 1 + arch/powerpc/kexec/core_64.c | 89 arch/powerpc/kexec/file_load_64.c| 87 --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 7 ++ 4 files changed, 97

[RFC PATCH 1/5] powerpc/kdump: export functions from file_load_64.c

2022-02-21 Thread Sourabh Jain
and kexec_file_load system call can use them. Signed-off-by: Sourabh Jain --- arch/powerpc/include/asm/kexec.h | 4 + arch/powerpc/kexec/core_64.c | 150 ++ arch/powerpc/kexec/file_load_64.c | 148 - 3 files changed, 154 insertions(+), 148

[RFC PATCH 2/5] powerpc/kdump: setup kexec crash FDT

2022-02-21 Thread Sourabh Jain
and kexec_file_load system calls. A new config KEXEC_CRASH_FDT is added to include this feature at the build time. Signed-off-by: Sourabh Jain --- arch/powerpc/Kconfig | 11 +++ arch/powerpc/include/asm/kexec.h | 5 +++ arch/powerpc/kexec/core_64.c | 52

Re: [RFC v3 PATCH 4/5] powerpc/crash hp: add crash hotplug support for kexec_file_load

2022-03-25 Thread Sourabh Jain
Hello Eric, On 24/03/22 00:02, Eric DeVolder wrote: Notes below. eric On 3/21/22 03:04, Sourabh Jain wrote: Two major changes are done to enable the crash CPU hotplug handler. Firstly, updated the kexec_load path to prepare kimage for hotplug changes and secondly, implemented the crash

  1   2   3   4   >