Re: [PATCH v5 11/17] qcom_minidump: Register ramoops region with minidump

2023-09-11 Thread Mukesh Ojha
On 9/11/2023 11:31 AM, Pavan Kondeti wrote: On Sun, Sep 10, 2023 at 01:46:12AM +0530, Mukesh Ojha wrote: Register all the pstore frontend with minidump, so that they can be dumped as default Linux minidump region to be collected on SoC where minidump is enabled. Helper functions is written i

Re: [PATCH v5 00/17] Add Qualcomm Minidump kernel driver related support

2023-09-11 Thread Kathiravan Thirumoorthy
On 9/10/2023 1:46 AM, Mukesh Ojha wrote: Hi All, This is to continuation from the conversation happened at v4 https://lore.kernel.org/lkml/632c5b97-4a91-c3e8-1e6c-33d6c4f64...@quicinc.com/ https://lore.kernel.org/lkml/695133e6-105f-de2a-5559-555cea0a0...@quicinc.com/ We have put abstract on

Re: [PATCH v5 13/17] firmware: qcom_scm: provide a read-modify-write function

2023-09-11 Thread Kathiravan Thirumoorthy
On 9/10/2023 1:46 AM, Mukesh Ojha wrote: It was realized by Srinivas K. that there is a need of read-modify-write scm exported function so that it can be used by multiple clients. Let's introduce qcom_scm_io_update_field() which masks out the bits and write the passed value to that bit-offset.

Re: [PATCH v5 15/17] firmware: scm: Modify only the download bits in TCSR register

2023-09-11 Thread Kathiravan Thirumoorthy
--- This change doesn't cleanly apply on next-20230911. Please rebase it. Validated this change on IPQ9574 and IPQ5332 and system is entering into the download mode. Tested-by: Kathiravan Thirumoorthy # IPQ9574 and IPQ5332 drivers/firmware/qcom_scm.c | 12 ++-- 1 file ch

Re: [PATCH v5 13/17] firmware: qcom_scm: provide a read-modify-write function

2023-09-11 Thread Kathiravan Thirumoorthy
On 9/11/2023 1:38 PM, Kathiravan Thirumoorthy wrote: On 9/10/2023 1:46 AM, Mukesh Ojha wrote: It was realized by Srinivas K. that there is a need of read-modify-write scm exported function so that it can be used by multiple clients. Let's introduce qcom_scm_io_update_field() which masks out

Re: [PATCH v5 15/17] firmware: scm: Modify only the download bits in TCSR register

2023-09-11 Thread Kathiravan Thirumoorthy
On 9/10/2023 1:46 AM, Mukesh Ojha wrote: Crashdump collection is based on the DLOAD bit of TCSR register. To retain other bits, we read the register and modify only the DLOAD bit as the other bits have their own significance. Co-developed-by: Poovendhan Selvaraj Poovendhan's signed-off is

Re: [PATCH v5 00/17] Add Qualcomm Minidump kernel driver related support

2023-09-11 Thread Bagas Sanjaya
On Sun, Sep 10, 2023 at 01:46:01AM +0530, Mukesh Ojha wrote: > Hi All, > > This is to continuation from the conversation happened at v4 > > https://lore.kernel.org/lkml/632c5b97-4a91-c3e8-1e6c-33d6c4f64...@quicinc.com/ > > https://lore.kernel.org/lkml/695133e6-105f-de2a-5559-555cea0a0...@quicinc

Re: [PATCH v5 00/17] Add Qualcomm Minidump kernel driver related support

2023-09-11 Thread Mukesh Ojha
On 9/11/2023 2:22 PM, Bagas Sanjaya wrote: On Sun, Sep 10, 2023 at 01:46:01AM +0530, Mukesh Ojha wrote: Hi All, This is to continuation from the conversation happened at v4 https://lore.kernel.org/lkml/632c5b97-4a91-c3e8-1e6c-33d6c4f64...@quicinc.com/ https://lore.kernel.org/lkml/695133e6-

Re: [PATCH v5 07/17] soc: qcom: minidump: Add pending region registration

2023-09-11 Thread Krzysztof Kozlowski
On 09/09/2023 22:16, Mukesh Ojha wrote: > static int qcom_apss_minidump_probe(struct platform_device *pdev) > { > struct minidump_global_toc *mdgtoc; > @@ -571,7 +688,10 @@ static int qcom_apss_minidump_probe(struct > platform_device *pdev) > return ret; > } > > +

Re: [REBASE PATCH v5 15/17] firmware: scm: Modify only the download bits in TCSR register

2023-09-11 Thread Kathiravan Thirumoorthy
On 9/11/2023 4:23 PM, Mukesh Ojha wrote: Crashdump collection is based on the DLOAD bit of TCSR register. To retain other bits, we read the register and modify only the DLOAD bit as the other bits have their own significance. Co-developed-by: Poovendhan Selvaraj Signed-off-by: Poovendhan Selv

Re: [REBASE PATCH v5 06/17] soc: qcom: Add Qualcomm APSS minidump kernel driver

2023-09-11 Thread Krzysztof Kozlowski
On 11/09/2023 12:53, Mukesh Ojha wrote: ... > +module_platform_driver(qcom_minidump_driver); > + > +MODULE_DESCRIPTION("Qualcomm APSS minidump driver"); > +MODULE_LICENSE("GPL"); > +MODULE_ALIAS("platform:qcom-minidump-smem"); Nothing improved here and in other places. To avoid review being spre

[REBASE PATCH v5 07/17] soc: qcom: minidump: Add pending region registration

2023-09-11 Thread Mukesh Ojha
Pending regions are those apss minidump regions which came for registration before minidump was initialized or ready to do register the region. We can add regions to pending region list and register all of them from apss minidump driver probe in one go. Signed-off-by: Mukesh Ojha --- drivers/so

[REBASE PATCH v5 08/17] arm64: mm: Add dynamic ramoops region support through command line

2023-09-11 Thread Mukesh Ojha
The reserved memory region for ramoops is assumed to be at a fixed and known location when read from the devicetree. This may not be required for something like Qualcomm's minidump which is interested in knowing addresses of ramoops region but it does not put hard requirement of address being fixed

[REBASE PATCH v5 09/17] pstore/ram: Use dynamic ramoops reserve resource

2023-09-11 Thread Mukesh Ojha
As dynamic ramoops command line parsing is now added, so lets add the support in ramoops driver to get the resource structure and add it during platform device registration. Signed-off-by: Mukesh Ojha --- fs/pstore/ram.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --gi

Re: [PATCH v5 06/17] soc: qcom: Add Qualcomm APSS minidump kernel driver

2023-09-11 Thread Krzysztof Kozlowski
On 09/09/2023 22:16, Mukesh Ojha wrote: > +/** > + * qcom_minidump_region_register() - Register region in APSS Minidump table. > + * @region: minidump region. > + * > + * Return: On success, it returns 0 and negative error value on failure. > + */ > +int qcom_minidump_region_register(const struct q

[REBASE PATCH v5 04/17] remoteproc: qcom: Remove minidump related data from qcom_common.c

2023-09-11 Thread Mukesh Ojha
As minidump specific data structure and functions move under config QCOM_RPROC_MINIDUMP, so remove minidump specific data from driver/remoteproc/qcom_common.c . Signed-off-by: Mukesh Ojha --- drivers/remoteproc/qcom_common.c | 160 --- 1 file changed, 160 dele

Re: [PATCH v5 06/17] soc: qcom: Add Qualcomm APSS minidump kernel driver

2023-09-11 Thread Jeff Johnson
On 9/11/2023 4:07 AM, Krzysztof Kozlowski wrote: On 09/09/2023 22:16, Mukesh Ojha wrote: +/** + * qcom_minidump_region_register() - Register region in APSS Minidump table. + * @region: minidump region. + * + * Return: On success, it returns 0 and negative error value on failure. + */ +int qcom_m

[REBASE PATCH v5 12/17] MAINTAINERS: Add entry for minidump related files

2023-09-11 Thread Mukesh Ojha
Add the entries into maintainer file for all the minidump related modules. Signed-off-by: Mukesh Ojha --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2833e2da63e0..2ec5fafe7060 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17787,6

Re: [PATCH v5 06/17] soc: qcom: Add Qualcomm APSS minidump kernel driver

2023-09-11 Thread Konrad Dybcio
On 11.09.2023 21:09, Jeff Johnson wrote: > On 9/11/2023 4:07 AM, Krzysztof Kozlowski wrote: >> On 09/09/2023 22:16, Mukesh Ojha wrote: >>> +/** >>> + * qcom_minidump_region_register() - Register region in APSS Minidump >>> table. >>> + * @region: minidump region. >>> + * >>> + * Return: On success

[REBASE PATCH v5 11/17] qcom_minidump: Register ramoops region with minidump

2023-09-11 Thread Mukesh Ojha
Register all the pstore frontend with minidump, so that they can be dumped as default Linux minidump region to be collected on SoC where minidump is enabled. Helper functions is written in separate file and built along with the minidump driver, since it is client of minidump and also call it at ap

Re: [PATCH v5 06/17] soc: qcom: Add Qualcomm APSS minidump kernel driver

2023-09-11 Thread Krzysztof Kozlowski
On 09/09/2023 22:16, Mukesh Ojha wrote: > Minidump is a best effort mechanism to collect useful and predefined > data for first level of debugging on end user devices running on > Qualcomm SoCs. It is built on the premise that System on Chip (SoC) > or subsystem part of SoC crashes, due to a range

Re: [PATCH v5 00/17] Add Qualcomm Minidump kernel driver related support

2023-09-11 Thread Bagas Sanjaya
On 11/09/2023 17:39, Mukesh Ojha wrote: > > > On 9/11/2023 2:22 PM, Bagas Sanjaya wrote: >> On Sun, Sep 10, 2023 at 01:46:01AM +0530, Mukesh Ojha wrote: >>> Hi All, >>> >>> This is to continuation from the conversation happened at v4 >>> >>> https://lore.kernel.org/lkml/632c5b97-4a91-c3e8-1e6c-33

[REBASE PATCH v5 06/17] soc: qcom: Add Qualcomm APSS minidump kernel driver

2023-09-11 Thread Mukesh Ojha
Minidump is a best effort mechanism to collect useful and predefined data for first level of debugging on end user devices running on Qualcomm SoCs. It is built on the premise that System on Chip (SoC) or subsystem part of SoC crashes, due to a range of hardware and software bugs. Hence, the abilit

[REBASE PATCH v5 02/17] soc: qcom: Add qcom_rproc_minidump module

2023-09-11 Thread Mukesh Ojha
Add qcom_rproc_minidump module in a preparation to remove minidump specific code from driver/remoteproc/qcom_common.c and provide needed exported API, this as well helps to abstract minidump specific data layout from qualcomm's remoteproc driver. It is just a copying of qcom_minidump() functionali

[REBASE PATCH v5 05/17] init: export linux_banner data variable

2023-09-11 Thread Mukesh Ojha
Some debug loadable module like minidump is interested in knowing the kernel version against which it is being build. Let's export linux_banner. Signed-off-by: Mukesh Ojha --- include/linux/init.h | 3 +++ init/version-timestamp.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/inclu

[REBASE PATCH v5 03/17] remoteproc: qcom_q6v5_pas: Use qcom_rproc_minidump()

2023-09-11 Thread Mukesh Ojha
Now, as all the minidump specific data structure is moved to minidump specific files and implementation wise qcom_rproc_minidump() and qcom_minidump() exactly same and the name qcom_rproc_minidump make more sense as it happen to collect the minidump for the remoteproc processors. So, let's use qcom

[REBASE PATCH v5 14/17] pinctrl: qcom: Use qcom_scm_io_update_field()

2023-09-11 Thread Mukesh Ojha
Use qcom_scm_io_update_field() exported function in pinctrl-msm driver. Signed-off-by: Mukesh Ojha --- drivers/pinctrl/qcom/pinctrl-msm.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index

Re: [PATCH v5 09/17] pstore/ram: Use dynamic ramoops reserve resource

2023-09-11 Thread Mukesh Ojha
On 9/11/2023 11:03 AM, Pavan Kondeti wrote: On Sun, Sep 10, 2023 at 01:46:10AM +0530, Mukesh Ojha wrote: As dynamic ramoops command line parsing is now added, so lets add the support in ramoops driver to get the resource structure and add it during platform device registration. Signed-off-by

Re: [PATCH v5 07/17] soc: qcom: minidump: Add pending region registration

2023-09-11 Thread Jeff Johnson
On 9/9/2023 1:16 PM, Mukesh Ojha wrote: +/** + * struct minidump_pregion - Minidump pending region + * @list : Pending region list pointer + * @region : APSS minidump client region does kernel-doc parse this correctly? should not be whitespace between @ID and ":" refer to

Re: [PATCH v5 11/17] qcom_minidump: Register ramoops region with minidump

2023-09-11 Thread Krzysztof Kozlowski
On 09/09/2023 22:16, Mukesh Ojha wrote: > Register all the pstore frontend with minidump, so that they can > be dumped as default Linux minidump region to be collected on > SoC where minidump is enabled. > ... > + > + record.type = type; > + record.id = 0; > + max_dump_cnt = 0; > +

[REBASE PATCH v5 16/17] firmware: qcom_scm: Refactor code to support multiple download mode

2023-09-11 Thread Mukesh Ojha
Currently on Qualcomm SoC, download_mode is enabled if CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is selected. Refactor the code such that it supports multiple download modes and drop CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT config instead, give interface to set the download mode from module parameter. S

Re: [REBASE PATCH v5 01/17] docs: qcom: Add qualcomm minidump guide

2023-09-11 Thread Krzysztof Kozlowski
On 11/09/2023 12:53, Mukesh Ojha wrote: > Add the qualcomm minidump guide for the users which tries to cover > the dependency, API use and the way to test and collect minidump > on Qualcomm supported SoCs. > > Signed-off-by: Mukesh Ojha > --- Please let us review your previous patch before sendi

[REBASE PATCH v5 10/17] pstore: Add pstore_region_defined() helper and export it

2023-09-11 Thread Mukesh Ojha
There are users like Qualcomm minidump which is interested in knowing the pstore frontend addresses and sizes from the backend (ram) to be able to register it with firmware to finally collect them during crash for debugging. Signed-off-by: Mukesh Ojha --- fs/pstore/platform.c | 15

[REBASE PATCH v5 17/17] firmware: qcom_scm: Add multiple download mode support

2023-09-11 Thread Mukesh Ojha
Currently, scm driver only supports full dump when download mode is selected. Add support to enable minidump as well as enable it along with fulldump. Signed-off-by: Mukesh Ojha --- drivers/firmware/qcom_scm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/firmw

[REBASE PATCH v5 00/17] Add Qualcomm Minidump kernel driver related support

2023-09-11 Thread Mukesh Ojha
Hi All, I apologise that the last v5 was on sent on older tag and it was reported that it does not apply to linux-next tag cleanly, thanks to Kathiravan and Bagas.S for giving me early notice. I would like continue the conversation happened at v4 https://lore.kernel.org/lkml/632c5b97-4a91-c3e8-1

[REBASE PATCH v5 15/17] firmware: scm: Modify only the download bits in TCSR register

2023-09-11 Thread Mukesh Ojha
Crashdump collection is based on the DLOAD bit of TCSR register. To retain other bits, we read the register and modify only the DLOAD bit as the other bits have their own significance. Co-developed-by: Poovendhan Selvaraj Signed-off-by: Poovendhan Selvaraj Signed-off-by: Mukesh Ojha Tested-by:

[REBASE PATCH v5 13/17] firmware: qcom_scm: provide a read-modify-write function

2023-09-11 Thread Mukesh Ojha
It was realized by Srinivas K. that there is a need of read-modify-write scm exported function so that it can be used by multiple clients. Let's introduce qcom_scm_io_update_field() which masks out the bits and write the passed value to that bit-offset. Subsequent patch will use this function. Su

[REBASE PATCH v5 01/17] docs: qcom: Add qualcomm minidump guide

2023-09-11 Thread Mukesh Ojha
Add the qualcomm minidump guide for the users which tries to cover the dependency, API use and the way to test and collect minidump on Qualcomm supported SoCs. Signed-off-by: Mukesh Ojha --- Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/qcom_minidump.rst | 272 ++

Re: [PATCH V11 07/17] riscv: qspinlock: Introduce qspinlock param for command line

2023-09-11 Thread Waiman Long
On 9/10/23 04:29, guo...@kernel.org wrote: From: Guo Ren Allow cmdline to force the kernel to use queued_spinlock when CONFIG_RISCV_COMBO_SPINLOCKS=y. Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/riscv/kernel/setup.c

Re: [PATCH] sched: Change the name of preempt mode from full to low_latency

2023-09-11 Thread Peter Zijlstra
On Mon, Sep 11, 2023 at 07:00:46PM +0800, Yajun Deng wrote: > There is a similar name fully in Kconfig.preempt, but it corresponds to > PREEMPT_RT. In order to distinguish them, change the name of preempt mode > from full to low_latency. > > Also, define a global array and variable that used to sa

Re: [PATCH V11 01/17] asm-generic: ticket-lock: Reuse arch_spinlock_t of qspinlock

2023-09-11 Thread Leonardo Brás
On Sun, 2023-09-10 at 04:28 -0400, guo...@kernel.org wrote: > From: Guo Ren > > The arch_spinlock_t of qspinlock has contained the atomic_t val, which > satisfies the ticket-lock requirement. Thus, unify the arch_spinlock_t > into qspinlock_types.h. This is the preparation for the next combo > sp

Re: [PATCH V11 07/17] riscv: qspinlock: Introduce qspinlock param for command line

2023-09-11 Thread Waiman Long
On 9/10/23 04:29, guo...@kernel.org wrote: From: Guo Ren Allow cmdline to force the kernel to use queued_spinlock when CONFIG_RISCV_COMBO_SPINLOCKS=y. Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/riscv/kernel/setup.c

Re: [PATCH V11 00/17] riscv: Add Native/Paravirt qspinlock support

2023-09-11 Thread Conor Dooley
On Mon, Sep 11, 2023 at 11:36:27AM +0800, Guo Ren wrote: > On Mon, Sep 11, 2023 at 3:45 AM Conor Dooley wrote: > > > > On Sun, Sep 10, 2023 at 05:49:13PM +0800, Guo Ren wrote: > > > On Sun, Sep 10, 2023 at 5:32 PM Conor Dooley wrote: > > > > > > > > On Sun, Sep 10, 2023 at 05:16:46PM +0800, Guo R

Re: [PATCH V11 04/17] locking/qspinlock: Improve xchg_tail for number of cpus >= 16k

2023-09-11 Thread Waiman Long
On 9/10/23 23:09, Guo Ren wrote: On Mon, Sep 11, 2023 at 10:35 AM Waiman Long wrote: On 9/10/23 04:28, guo...@kernel.org wrote: From: Guo Ren The target of xchg_tail is to write the tail to the lock value, so adding prefetchw could help the next cmpxchg step, which may decrease the cmpxchg

[PATCH] sched: Change the name of preempt mode from full to low_latency

2023-09-11 Thread Yajun Deng
There is a similar name fully in Kconfig.preempt, but it corresponds to PREEMPT_RT. In order to distinguish them, change the name of preempt mode from full to low_latency. Also, define a global array and variable that used to save preempt mode name and size. Signed-off-by: Yajun Deng --- .../ad

[PATCH v2] Documentation: stable: clarify patch series prerequisites

2023-09-11 Thread Hugo Villeneuve
From: Hugo Villeneuve Add some clarifications for patches that have dependencies within the patch series. Signed-off-by: Hugo Villeneuve --- Changes since v1: rebase on latest torvalds/master Documentation/process/stable-kernel-rules.rst | 13 + 1 file changed, 13 insertions(+) d

Re: [PATCH v5 09/17] pstore/ram: Use dynamic ramoops reserve resource

2023-09-11 Thread Pavan Kondeti
On Mon, Sep 11, 2023 at 04:21:44PM +0530, Mukesh Ojha wrote: > > > On 9/11/2023 11:03 AM, Pavan Kondeti wrote: > > On Sun, Sep 10, 2023 at 01:46:10AM +0530, Mukesh Ojha wrote: > > > As dynamic ramoops command line parsing is now added, so > > > lets add the support in ramoops driver to get the re

Re: [PATCH V11 07/17] riscv: qspinlock: Introduce qspinlock param for command line

2023-09-11 Thread Guo Ren
On Mon, Sep 11, 2023 at 11:34 PM Waiman Long wrote: > > On 9/10/23 04:29, guo...@kernel.org wrote: > > From: Guo Ren > > > > Allow cmdline to force the kernel to use queued_spinlock when > > CONFIG_RISCV_COMBO_SPINLOCKS=y. > > > > Signed-off-by: Guo Ren > > Signed-off-by: Guo Ren > > --- > >

Re: [PATCH V11 04/17] locking/qspinlock: Improve xchg_tail for number of cpus >= 16k

2023-09-11 Thread Guo Ren
On Mon, Sep 11, 2023 at 9:03 PM Waiman Long wrote: > > On 9/10/23 23:09, Guo Ren wrote: > > On Mon, Sep 11, 2023 at 10:35 AM Waiman Long wrote: > >> > >> On 9/10/23 04:28, guo...@kernel.org wrote: > >>> From: Guo Ren > >>> > >>> The target of xchg_tail is to write the tail to the lock value, so

Re: [PATCH V11 07/17] riscv: qspinlock: Introduce qspinlock param for command line

2023-09-11 Thread Guo Ren
On Mon, Sep 11, 2023 at 11:22 PM Waiman Long wrote: > > On 9/10/23 04:29, guo...@kernel.org wrote: > > From: Guo Ren > > > > Allow cmdline to force the kernel to use queued_spinlock when > > CONFIG_RISCV_COMBO_SPINLOCKS=y. > > > > Signed-off-by: Guo Ren > > Signed-off-by: Guo Ren > > --- > >

Re: [PATCH V11 00/17] riscv: Add Native/Paravirt qspinlock support

2023-09-11 Thread Guo Ren
On Mon, Sep 11, 2023 at 8:53 PM Conor Dooley wrote: > > On Mon, Sep 11, 2023 at 11:36:27AM +0800, Guo Ren wrote: > > On Mon, Sep 11, 2023 at 3:45 AM Conor Dooley wrote: > > > > > > On Sun, Sep 10, 2023 at 05:49:13PM +0800, Guo Ren wrote: > > > > On Sun, Sep 10, 2023 at 5:32 PM Conor Dooley wrote