Re: [PATCH v2] arch/powerpc: Remove unused cede related functions

2024-05-14 Thread Naveen N Rao
On Tue, May 14, 2024 at 06:54:55PM GMT, Gautam Menghani wrote: > Remove extended_cede_processor() and its helpers as > extended_cede_processor() has no callers since > commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs") > > Signed-off-by: Gautam Menghani > --- > v1 -> v2:

[PATCH v4 0/5] Add generic data patching functions

2024-05-14 Thread Benjamin Gray
Currently patch_instruction() bases the write length on the value being written. If the value looks like a prefixed instruction it writes 8 bytes, otherwise it writes 4 bytes. This makes it potentially buggy to use for writing arbitrary data, as if you want to write 4 bytes but it decides to write

[PATCH v4 5/5] powerpc/code-patching: Add boot selftest for data patching

2024-05-14 Thread Benjamin Gray
Extend the code patching selftests with some basic coverage of the new data patching variants too. Signed-off-by: Benjamin Gray --- v4: * Change store to a check * Account for doubleword alignment v3: * New in v3 --- arch/powerpc/lib/test-code-patching.c | 41 +++

[PATCH v4 1/5] powerpc/code-patching: Add generic memory patching

2024-05-14 Thread Benjamin Gray
patch_instruction() is designed for patching instructions in otherwise readonly memory. Other consumers also sometimes need to patch readonly memory, so have abused patch_instruction() for arbitrary data patches. This is a problem on ppc64 as patch_instruction() decides on the patch width using

[PATCH v4 2/5] powerpc/code-patching: Add data patch alignment check

2024-05-14 Thread Benjamin Gray
The new data patching still needs to be aligned within a cacheline too for the flushes to work correctly. To simplify this requirement, we just say data patches must be aligned. Detect when data patching is not aligned, returning an invalid argument error. Signed-off-by: Benjamin Gray --- v3:

[PATCH v4 4/5] powerpc/32: Convert patch_instruction() to patch_uint()

2024-05-14 Thread Benjamin Gray
These changes are for patch_instruction() uses on data. Unlike ppc64 these should not be incorrect as-is, but using the patch_uint() alias better reflects what kind of data being patched and allows for benchmarking the effect of different patch_* implementations (e.g., skipping instruction

[PATCH v4 3/5] powerpc/64: Convert patch_instruction() to patch_u32()

2024-05-14 Thread Benjamin Gray
This use of patch_instruction() is working on 32 bit data, and can fail if the data looks like a prefixed instruction and the extra write crosses a page boundary. Use patch_u32() to fix the write size. Fixes: 8734b41b3efe ("powerpc/module_64: Fix livepatching for RO modules") Link:

Re: Administrivia: remove old list address

2024-05-14 Thread Stephen Rothwell
Hi all, On Fri, 3 May 2024 13:32:13 +1000 Stephen Rothwell wrote: > > Many years ago, linuxppc-dev was moved from ozlabs.org to > lists.ozlabs.org. These days most of the mail sent to linuxppc-dev > @ozlabs.org is spam (causing added burden to the list owner i.e. me), > so I intend to drop

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-14 Thread Peter Xu
On Tue, May 14, 2024 at 10:26:49PM +0200, Oscar Salvador wrote: > On Fri, May 10, 2024 at 03:29:48PM -0400, Peter Xu wrote: > > IMHO we shouldn't mention that detail, but only state the effect which is > > to not report the event to syslog. > > > > There's no hard rule that a pte marker can't

Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors

2024-05-14 Thread Oscar Salvador
On Fri, May 10, 2024 at 03:29:48PM -0400, Peter Xu wrote: > IMHO we shouldn't mention that detail, but only state the effect which is > to not report the event to syslog. > > There's no hard rule that a pte marker can't reflect a real page poison in > the future even MCE. Actually I still

[PATCH 3/3] crypto: Update Kconfig and Makefile for ppc64le x25519.

2024-05-14 Thread Danny Tsen
Defined CRYPTO_CURVE25519_PPC64 to support X25519 for ppc64le. Added new module curve25519-ppc64le for X25519. Signed-off-by: Danny Tsen --- arch/powerpc/crypto/Kconfig | 11 +++ arch/powerpc/crypto/Makefile | 2 ++ 2 files changed, 13 insertions(+) diff --git

[PATCH 2/3] crypto: X25519 core functions for ppc64le

2024-05-14 Thread Danny Tsen
X25519 core functions to handle scalar multiplication for ppc64le. Signed-off-by: Danny Tsen --- arch/powerpc/crypto/curve25519-ppc64le-core.c | 299 ++ 1 file changed, 299 insertions(+) create mode 100644 arch/powerpc/crypto/curve25519-ppc64le-core.c diff --git

[PATCH 0/3] crypto: X25519 supports for ppc64le

2024-05-14 Thread Danny Tsen
This patch series provide X25519 support for ppc64le with a new module curve25519-ppc64le. The implementation is based on CRYPTOGAMs perl output from x25519-ppc64.pl. Modified and added 3 supporting functions. This patch has passed the selftest by running modprobe curve25519-ppc64le. Danny Tsen

[PATCH 1/3] crypto: X25519 low-level primitives for ppc64le.

2024-05-14 Thread Danny Tsen
Use the perl output of x25519-ppc64.pl from CRYPTOGAMs and added three supporting functions, x25519_fe51_sqr_times, x25519_fe51_frombytes and x25519_fe51_tobytes. Signed-off-by: Danny Tsen --- arch/powerpc/crypto/curve25519-ppc64le_asm.S | 648 +++ 1 file changed, 648

[PATCH v2 2/2] powerpc: hotplug driver bridge support

2024-05-14 Thread Krishna Kumar
There is an issue with the hotplug operation when it's done on the bridge/switch slot. The bridge-port and devices behind the bridge, which become offline by hot-unplug operation, don't get hot-plugged/enabled by doing hot-plug operation on that slot. Only the first port of the bridge gets enabled

[PATCH v2 1/2] pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv

2024-05-14 Thread Krishna Kumar
Description of the problem: The hotplug driver for powerpc (pci/hotplug/pnv_php.c) gives kernel crash when we try to hot-unplug/disable the PCIe switch/bridge from the PHB. Root Cause of Crash: The crash is due to the reason that, though the msi data structure has been released during

[PATCH v2 0/2] PCI hotplug driver fixes

2024-05-14 Thread Krishna Kumar
The fix of Powerpc hotplug driver (drivers/pci/hotplug/pnv_php.c) addresses below two issues. 1. Kernel Crash during hot unplug of bridge/switch slot. 2. DPC-Support Enablement - Previously, when we do a hot-unplug operation on a bridge slot, all the ports and devices behind the bridge-ports

[powerpc:merge] BUILD SUCCESS 47279113c5d094a564909879dd1983f3c72c2ee5

2024-05-14 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20240514 gcc arc randconfig-002-20240514 gcc arc

[PATCH v2] arch/powerpc: Remove unused cede related functions

2024-05-14 Thread Gautam Menghani
Remove extended_cede_processor() and its helpers as extended_cede_processor() has no callers since commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs") Signed-off-by: Gautam Menghani --- v1 -> v2: 1. Remove helpers of extended_cede_processor()

Re: [PATCH 2/2] arch/powerpc: hotplug driver bridge support

2024-05-14 Thread krishna kumar
Thanks Sourabh for review. I have incorporated your comments and will be sending my patch soon. Best Regards, Krishna On 5/13/24 15:15, Sourabh Jain wrote: Hello Krishna, Is "arch" in commit title really required? On 09/05/24 17:35, Krishna Kumar wrote: There is an issue with the hotplug

Re: [PATCH 2/2] arch/powerpc: hotplug driver bridge support

2024-05-14 Thread krishna kumar
Thanks Andy for review. I have incorporated your comments and will be sending the patch soon. On 5/11/24 11:12, Andy Shevchenko wrote: Thu, May 09, 2024 at 05:35:54PM +0530, Krishna Kumar kirjoitti: There is an issue with the hotplug operation when it's done on the bridge/switch slot. The

[PATCH v5 7/7] PCI: Create helper to print TLP Header and Prefix Log

2024-05-14 Thread Ilpo Järvinen
Add pcie_print_tlp_log() helper to print TLP Header and Prefix Log. Print End-End Prefixes only if they are non-zero. Consolidate the few places which currently print TLP using custom formatting. The first attempt used pr_cont() instead of building a string first but it turns out pr_cont() is

[PATCH v5 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-05-14 Thread Ilpo Järvinen
pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also TLP Prefix Log. The relevant registers are formatted identically in AER and DPC Capability, but

[PATCH v5 5/7] PCI: Store # of supported End-End TLP Prefixes

2024-05-14 Thread Ilpo Järvinen
eetlp_prefix_path in the struct pci_dev tells if End-End TLP Prefixes are supported by the path or not, the value is only calculated if CONFIG_PCI_PASID is set. The Max End-End TLP Prefixes field in the Device Capabilities Register 2 also tells how many (1-4) End-End TLP Prefixes are supported

[PATCH v5 4/7] PCI: Use unsigned int i in pcie_read_tlp_log()

2024-05-14 Thread Ilpo Järvinen
Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/tlp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/tlp.c b/drivers/pci/pcie/tlp.c index

[PATCH v5 3/7] PCI: Make pcie_read_tlp_log() signature same

2024-05-14 Thread Ilpo Järvinen
pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/tlp.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff

Re: [PATCH] arch/powerpc: Remove the definition of unused cede function

2024-05-14 Thread Gautam Menghani
On Tue, May 14, 2024 at 04:20:04PM GMT, Naveen N Rao wrote: > On Tue, May 14, 2024 at 03:35:03PM GMT, Gautam Menghani wrote: > > Remove extended_cede_processor() definition as it has no callers since > > commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs") > >

[PATCH v5 2/7] PCI: Move TLP Log handling to own file

2024-05-14 Thread Ilpo Järvinen
TLP Log is PCIe feature and is processed only by AER and DPC. Configwise, DPC depends AER being enabled. In lack of better place, the TLP Log handling code was initially placed into pci.c but it can be easily placed in a separate file. Move TLP Log handling code to own file under pcie/

[PATCH v5 1/7] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem

2024-05-14 Thread Ilpo Järvinen
pcie_read_tlp_log() was exposed by the commit 0a5a46a6a61b ("PCI/AER: Generalize TLP Header Log reading") but this is now considered a mistake. No drivers outside of PCI subsystem should build their own diagnostic logging but should rely on PCI core doing it for them. There's currently one driver

[PATCH v5 0/7] PCI: Consolidate TLP Log reading and printing

2024-05-14 Thread Ilpo Järvinen
This series has the remaining patches of the AER & DPC TLP Log handling consolidation and now includes a few minor improvements to the earlier accepted TLP Logging code. v5: - Fix build with AER=y and DPC=n - Match kerneldoc and function parameter name v4: - Added patches: - Remove

Re: [PATCH] arch/powerpc: Remove the definition of unused cede function

2024-05-14 Thread Naveen N Rao
On Tue, May 14, 2024 at 03:35:03PM GMT, Gautam Menghani wrote: > Remove extended_cede_processor() definition as it has no callers since > commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs") extended_cede_processor() was added in commit 69ddb57cbea0 ("powerpc/pseries: Add

Re: [PATCH v3 3/5] powerpc/64: Convert patch_instruction() to patch_u32()

2024-05-14 Thread Naveen N Rao
On Tue, May 14, 2024 at 04:39:30AM GMT, Christophe Leroy wrote: > > > Le 14/05/2024 à 04:59, Benjamin Gray a écrit : > > On Tue, 2024-04-23 at 15:09 +0530, Naveen N Rao wrote: > >> On Mon, Mar 25, 2024 at 04:53:00PM +1100, Benjamin Gray wrote: > >>> This use of patch_instruction() is working on

[PATCH] arch/powerpc: Remove the definition of unused cede function

2024-05-14 Thread Gautam Menghani
Remove extended_cede_processor() definition as it has no callers since commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs") Signed-off-by: Gautam Menghani --- arch/powerpc/include/asm/plpar_wrappers.h | 18 -- 1 file changed, 18 deletions(-) diff --git