[PATCH v5] powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt.

2024-04-09 Thread Mahesh Salgaonkar
t embedded. Reviewed-by: Christophe Leroy Tested-by: Shirisha Ganta Signed-off-by: Mahesh Salgaonkar --- Changes in v5: - Invert the percpu chunk checks as suggested by mpe. - Fix mirowatt build, microwatt config has CONFIG_PPC64=y and CONFIG_SMP=n. - v4 at https://lore.kernel.org/li

[PATCH v4] powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt.

2024-02-14 Thread Mahesh Salgaonkar
d. Signed-off-by: Mahesh Salgaonkar --- Changes in v4: - Fix coding style issues. Changes in v3: - Address comments from Christophe Leroy to avoid using #ifdefs in the code - v2 at https://lore.kernel.org/linuxppc-dev/20240205053647.1763446-1-mah...@linux.ibm.com/ Changes in v2: - Rebase t

[PATCH v3] powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt.

2024-02-14 Thread Mahesh Salgaonkar
d. Signed-off-by: Mahesh Salgaonkar --- Changes in v3: - Address comments from Christophe Leroy to avoid using #ifdefs in the code - v2 at https://lore.kernel.org/linuxppc-dev/20240205053647.1763446-1-mah...@linux.ibm.com/ Changes in v2: - Rebase to upstream master - Use jump_labels, if CONFIG_

[PATCH v2] powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt.

2024-02-04 Thread Mahesh Salgaonkar
d. Signed-off-by: Mahesh Salgaonkar --- Changes in v2: - Rebase to upstream master - Use jump_labels, if CONFIG_JUMP_LABEL is enabled, to avoid redoing the test at each interrupt entry. - v1 is at https://lore.kernel.org/linuxppc-dev/164578465828.74956.6065296024817333750.stgit@jupiter/ --- ar

[RFC PATCH v2] powerpc: Make crashing cpu to be discovered first in kdump kernel.

2023-09-09 Thread Mahesh Salgaonkar
here X will be aligned up in multiple of SMT threads per core. Signed-off-by: Mahesh Salgaonkar --- Change in RFCv2: - Fix checkpatch.pl reported errors and build issues against few powerpc configs. - Move add_node_props() from file_load_64.c to core_64.c so that it can be reused. --- arch/powerpc/inclu

[RFC PATCH] powerpc: Make crashing cpu to be discovered first in kdump kernel.

2023-09-06 Thread Mahesh Salgaonkar
here X will be aligned up in multiple of SMT threads per core. Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/include/asm/kexec.h |1 arch/powerpc/kernel/prom.c| 13 arch/powerpc/kexec/core_64.c | 128 + arch/powerpc/kexec/file_load_64.c |

[PATCH v9 2/2] PCI: rpaphp: Error out on busy status from get-sensor-state

2023-08-18 Thread Mahesh Salgaonkar
) rpaphp_get_sensor_state() will continue to invoke rtas_get_sensor() as it was earlier with no change in existing behavior. Signed-off-by: Mahesh Salgaonkar Reviewed-by: Nathan Lynch Acked-by: Bjorn Helgaas --- Change in v9: - Move get-sensor-state specific #defines of rtas return code from rtas.h (

[PATCH v9 1/2] powerpc/rtas: export rtas_error_rc() for reuse.

2023-08-18 Thread Mahesh Salgaonkar
Also, #define descriptive names for common rtas return codes and use it instead of numeric values. Signed-off-by: Mahesh Salgaonkar --- Change in v9: - Keep the existing function name rtas_error_rc(). - Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL https://lore.kernel.org/all/877cpxdksx.fsf

[PATCH v8 2/2] PCI: rpaphp: Error out on busy status from get-sensor-state

2023-08-07 Thread Mahesh Salgaonkar
) rpaphp_get_sensor_state() will continue to invoke rtas_get_sensor() as it was earlier with no change in existing behavior. Signed-off-by: Mahesh Salgaonkar Reviewed-by: Nathan Lynch Acked-by: Bjorn Helgaas --- Change in v8: - Removed redundant #ifdef CONFIG_EEH and addressed other review comments.

[PATCH v8 1/2] powerpc/rtas: Rename rtas_error_rc to rtas_generic_errno

2023-08-07 Thread Mahesh Salgaonkar
rtas_generic_errno() function will convert the generic rtas return codes into errno. Also, #define descriptive names for rtas return codes and use it instead of numeric values. Signed-off-by: Mahesh Salgaonkar --- (no changes since v7) Change in V7: - Until v6 there was only one patch

[PATCH v7 2/2] PCI: rpaphp: Error out on busy status from get-sensor-state

2023-07-24 Thread Mahesh Salgaonkar
case) rpaphp_get_sensor_state() will continue to invoke rtas_get_sensor() as it was earlier with no change in existing behavior. Signed-off-by: Mahesh Salgaonkar Reviewed-by: Nathan Lynch --- Change in v7: - Modified patch description to explain affect of timeout on NIC functioning. - Fix few nits requested

[PATCH v7 1/2] powerpc/rtas: Rename rtas_error_rc to rtas_generic_errno

2023-07-24 Thread Mahesh Salgaonkar
rtas_generic_errno() function will convert the generic rtas return codes into errno. Also, #define descriptive names for rtas return codes and use it instead of numeric values. Signed-off-by: Mahesh Salgaonkar --- - Until v6 there was only one patch with subject "PCI hotplug: rpaphp:

[PATCH v2] powernv/opal-prd: Silence memcpy() run-time false positive warnings

2023-07-06 Thread Mahesh Salgaonkar
-time warning. Reported-by: Aneesh Kumar K.V Signed-off-by: Mahesh Salgaonkar --- Change from v1: - Rework the memcpy to copy message header and rest of the message separately without adding flex array. --- arch/powerpc/platforms/powernv/opal-prd.c |4 +++- 1 file changed, 3 insertions(+

[PATCH] powernv/opal-prd: Silence memcpy() run-time false positive warnings

2023-06-26 Thread Mahesh Salgaonkar
positive run-time warning. Reported-by: Aneesh Kumar K.V Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/platforms/powernv/opal-prd.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal-prd.c b/arch/powerpc/platforms/powernv/opa

[PATCH v6] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-04-26 Thread Mahesh Salgaonkar
tinue to invoke rtas_get_sensor() as it was earlier with no change in existing behavior. Signed-off-by: Mahesh Salgaonkar Reviewed-by: Nathan Lynch --- Change in v6: - Fixed typo's in the patch description as per review comments. Change in v5: - Fixup #define macros with parentheses around the

[PATCH v5] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-03-09 Thread Mahesh Salgaonkar
tinue to invoke rtas_get_sensor() as it was earlier with no change in existing behavior. Signed-off-by: Mahesh Salgaonkar --- Change in v5: - Fixup #define macros with parentheses around the values. Change in V4: - Error out on sensor busy only if pe is going through EEH recovery instead of a

[PATCH] powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt.

2022-02-25 Thread Mahesh Salgaonkar
d. Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/include/asm/interrupt.h | 15 +++ arch/powerpc/include/asm/percpu.h|2 ++ arch/powerpc/kernel/setup_64.c |3 +++ 3 files changed, 20 insertions(+) diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/power

[PATCH v4] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-01-30 Thread Mahesh Salgaonkar
tinue to invoke rtas_get_sensor() as it was earlier with no change in existing behavior. Signed-off-by: Mahesh Salgaonkar --- Change in V4: - Error out on sensor busy only if pe is going through EEH recovery instead of always error out. Change in V3: - Invoke rtas_call(get-sensor-state

[PATCH v3] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2021-12-03 Thread Mahesh Salgaonkar
ck returns BUSY condition. In normal cases it returns immediately with a correct presence state value. Hence this change has no impact on normal pci dlpar operations. Signed-off-by: Mahesh Salgaonkar --- Change in V3: - Invoke rtas_call(get-sensor-state) directly from rpaphp_get_sensor_state() directly

[PATCH] powerpc/rtas: Introduce rtas_get_sensor_nonblocking() for pci hotplug driver.

2021-11-29 Thread Mahesh Salgaonkar
get_sensor_fast() variant, but it thorws WARN_ON on BUSY condition. The rtas_get_sensor_nonblocking() suppresses WARN_ON. Signed-off-by: Mahesh Salgaonkar --- This is an alternate approach to fix the EEH issue instead of delaying slot presence check proposed at https://lists.ozlabs.org/pipermail/li

[PATCH] powerpc/eeh: Delay slot presence check once driver is notified about the pci error.

2021-11-23 Thread Mahesh Salgaonkar
c32364] dev_watchdog+0x434/0x440 To fix this issue, delay the slot presence check after notifying the driver about the pci error. Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/kernel/eeh_driver.c | 42 -- 1 file changed, 22 insertions(+), 20 del

[PATCH] pseries/eeh: fix the kdump kernel crash during eeh_pseries_init

2021-09-20 Thread Mahesh Salgaonkar
PCIE PHB reset") Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/platforms/pseries/eeh_pseries.c |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index bc15200852b7c..8780e7d33a0f5 1006

[PATCH] powerpc/eeh: skip slot presence check when PE is temporarily unavailable.

2021-05-06 Thread Mahesh Salgaonkar
if device PE state is temporarily unavailable(5). Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/include/asm/eeh.h |1 + arch/powerpc/kernel/eeh.c| 14 -- arch/powerpc/kernel/eeh_driver.c | 18 ++ 3 files changed, 31 insertions(+), 2 deletions(-) diff

[PATCH v2] powerpc/eeh: Fix EEH handling for hugepages in ioremap space.

2021-04-12 Thread Mahesh Salgaonkar
00 [ 964.324002] EEH: PE location: N/A, PHB location: N/A [ 964.324006] EEH: Frozen PHB#30-PE#1 detected <..> Cc: sta...@vger.kernel.org Fixes: 33439620680be ("powerpc/eeh: Handle hugepages in ioremap space") Signed-off-by: Mahesh Salgaonkar Signed-off-by: Aneesh Kumar K.V R

[PATCH] powerpc/eeh: Fix EEH handling for hugepages in ioremap space.

2021-04-10 Thread Mahesh Salgaonkar
00 [ 964.324002] EEH: PE location: N/A, PHB location: N/A [ 964.324006] EEH: Frozen PHB#30-PE#1 detected <..> Cc: sta...@vger.kernel.org Fixes: 33439620680be ("powerpc/eeh: Handle hugepages in ioremap space") Signed-off-by: Mahesh Salgaonkar Signed-off-by: Aneesh Kumar K.V

[PATCH v4] powernv/elog: Fix the race while processing OPAL error log event.

2020-10-06 Thread Mahesh Salgaonkar
day and there is need as well. Hence change it to return void to make this fix complete. Fixes: 774fea1a38c6 ("powerpc/powernv: Read OPAL error log and export it through sysfs") Cc: # v3.15+ Reported-by: Oliver O'Halloran Signed-off-by: Mahesh Salgaonkar Signed-off-by: Aneesh Kumar

[PATCH v3] powernv/elog: Fix the race while processing OPAL error log event.

2020-10-05 Thread Mahesh Salgaonkar
sed today and there is need as well. Hence change it to return void to make this fix complete. Fixes: 774fea1a38c6 ("powerpc/powernv: Read OPAL error log and export it through sysfs") Cc: # v3.15+ Reported-by: Oliver O'Halloran Signed-off-by: Mahesh Salgaonkar Signed-off-by: Ane

[PATCH v2] powernv/elog: Fix the race while processing OPAL error log event.

2020-10-04 Thread Mahesh Salgaonkar
ion/notification by holding an additional reference count on kobject until we safely send kobject_uevent(). Reported-by: Oliver O'Halloran Signed-off-by: Mahesh Salgaonkar Signed-off-by: Aneesh Kumar K.V --- Change in v2: - Instead of mutex and use extra reference count on kobject to avoid the r

[PATCH] powernv/elog: Fix the race while processing OPAL error log event.

2020-10-04 Thread Mahesh Salgaonkar
ion/notification using mutex lock per elog record. Reported-by: Oliver O'Halloran Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/platforms/powernv/opal-elog.c | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powe

[PATCH v2] hmi: Move hmi irq stat from percpu variable to paca.

2020-06-23 Thread Mahesh Salgaonkar
inside paca for safe access in realmode. [1] https://lore.kernel.org/linuxppc-dev/20200608070904.387440-1-aneesh.ku...@linux.ibm.com/ Suggested-by: Aneesh Kumar K.V Signed-off-by: Mahesh Salgaonkar --- Machine check handling as well touches percpu variables in realmode. Will address that in separate

[PATCH] hmi: Move hmi irq stat from percpu variable to paca.

2020-06-22 Thread Mahesh Salgaonkar
by moving the hmi irq stat inside paca for safe access in realmode. Suggested-by: Aneesh Kumar K.V Signed-off-by: Mahesh Salgaonkar --- Machine check handling as well touches percpu variables in realmode. Will address that in separate patchset. --- arch/powerpc/include/asm/hardirq.h |1 - arch

[PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors

2020-02-13 Thread Mahesh Salgaonkar
: 2950.00MHz revision: 17.0 (pvr 004f 1100) With this change it reflects the correct revision: $ cat /proc/cpuinfo processor : 0 cpu : POWER9P, altivec supported clock : 2633.00MHz revision: 1.0 (pvr 004f 1100) Signed-off-by: Mahesh Salgaonkar

[PATCH v3 3/3] powernv/mce: print additional information about mce error.

2019-04-29 Thread Mahesh Salgaonkar
Software error (some chance of hardware cause) Signed-off-by: Mahesh Salgaonkar --- Change in v2: - Rephrase the wording for error class as suggested by Michael. --- arch/powerpc/include/asm/mce.h | 10 arch/powerpc/kernel/mce.c | 12 arch/powerpc/kernel/mce_power.c | 107

[PATCH v3 2/3] powernv/mce: Print correct severity for mce error.

2019-04-29 Thread Mahesh Salgaonkar
Currently all machine check errors are printed as severe errors which isn't correct. Print soft errors as warning instead of severe errors. Signed-off-by: Mahesh Salgaonkar --- change in v2: - Use kernel types i.e. u8, u64 etc. - Define sync_error as bool. --- arch/powerpc/include/asm/mce.h

[PATCH v3 1/3] powernv/mce: reduce mce console logs to lesser lines.

2019-04-29 Thread Mahesh Salgaonkar
: PID: 24765 Comm: qemu-system-ppc Guest NIP: [7fffa309dc60] [ 1289.447634] MCE: CPU80: Probable software error (some chance of hardware cause) Signed-off-by: Mahesh Salgaonkar --- CHange in v3: - Print physical address if available. Change in v2: - Address comments from Michael. --- arch

[PATCH -tip tracing/kprobes v3] Powerpc port of the kprobe-based event tracer

2010-01-20 Thread Mahesh Salgaonkar
. - regs_within_kernel_stack(struct pt_regs *regs, unsigned long addr) Check the address is in the kernel stack. - regs_get_kernel_stack_nth(struct pt_regs *reg, unsigned int nth) Get Nth entry of the kernel stack. (N = 0) Signed-off-by: Mahesh Salgaonkar mah...@linux.vnet.ibm.com Acked

[PATCH -tip tracing/kprobes v2] Powerpc port of the kprobe-based event tracer

2010-01-11 Thread Mahesh Salgaonkar
, unsigned int nth) Get Nth entry of the kernel stack. (N = 0) Signed-off-by: Mahesh Salgaonkar mah...@linux.vnet.ibm.com Acked-by: Masami Hiramatsu mhira...@redhat.com --- arch/powerpc/include/asm/ptrace.h | 61 ++ arch/powerpc/kernel/ptrace.c | 102

[PATCH -tip tracing/kprobes] PPC: Powerpc port of the kprobe-based event tracer

2009-12-15 Thread Mahesh Salgaonkar
is in the kernel stack. - regs_get_kernel_stack_nth(struct pt_regs *reg, unsigned int nth) Get Nth entry of the kernel stack. (N = 0) - regs_get_argument_nth(struct pt_regs *reg, unsigned int nth) Get Nth argument at function call. (N = 0) Signed-off-by: Mahesh Salgaonkar mah