[PATCH v5 1/1] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-07-19 Thread Pratik R. Sampat
Adds a generic interface to represent the energy and frequency related PAPR attributes on the system using the new H_CALL "H_GET_ENERGY_SCALE_INFO". H_GET_EM_PARMS H_CALL was previously responsible for exporting this information in the lparcfg, however the H_GET_EM_PARMS H_CALL will be deprecated

[PATCH v5 1/2] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-07-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency for CEDE(0)") sets the exit latency of CEDE(0) based on the latency values of the Extended CEDE states advertised by the platform On POWER9 LPARs, the firmwares advertise a very low value of 2us for CEDE1 exit

[PATCH v5 0/2] cpuidle/pseries: cleanup of the CEDE0 latency fixup code

2021-07-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the v5 of the patchset to fixup CEDE0 latency only from POWER10 onwards. The previous versions of the patches are v4 : https://lore.kernel.org/linux-pm/1623048014-16451-1-git-send-email-...@linux.vnet.ibm.com/ v3 :

[PATCH v5 2/2] cpuidle/pseries: Do not cap the CEDE0 latency in fixup_cede0_latency()

2021-07-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently in fixup_cede0_latency() code, we perform the fixup the CEDE(0) exit latency value only if minimum advertized extended CEDE latency values are less than 10us. This was done so as to not break the expected behaviour on POWER8 platforms where the advertised

Re: [PATCH v2] ppc64/numa: consider the max numa node for migratable LPAR

2021-07-19 Thread Laurent Dufour
Hi Michael, Is there a way to get that patch in 5.14? Thanks, Laurent. Le 11/05/2021 à 09:31, Laurent Dufour a écrit : When a LPAR is migratable, we should consider the maximum possible NUMA node instead the number of NUMA node from the actual system. The DT property

Re: [PATCH v5] pseries: prevent free CPU ids to be reused on another node

2021-07-19 Thread Laurent Dufour
Hi Michael, Is there a way to get that patch in 5.14? Thanks, Laurent. Le 29/04/2021 à 19:49, Laurent Dufour a écrit : When a CPU is hot added, the CPU ids are taken from the available mask from the lower possible set. If that set of values was previously used for CPU attached to a different

Re: [PATCH] powerpc/xive: Do not skip CPU-less nodes when creating the IPIs

2021-07-19 Thread Laurent Vivier
On 29/06/2021 15:15, Cédric Le Goater wrote: > On PowerVM, CPU-less nodes can be populated with hot-plugged CPUs at > runtime. Today, the IPI is not created for such nodes, and hot-plugged > CPUs use a bogus IPI, which leads to soft lockups. > > We could create the node IPI on demand but it is a

Re: [PATCH v5] pseries/drmem: update LMBs after LPM

2021-07-19 Thread Laurent Dufour
Hi Michael, Is there a way to get that patch in 5.14? Thanks, Laurent. Le 17/05/2021 à 11:06, Laurent Dufour a écrit : After a LPM, the device tree node ibm,dynamic-reconfiguration-memory may be updated by the hypervisor in the case the NUMA topology of the LPAR's memory is updated. This is

[PATCH v5 0/1] Interface to represent PAPR firmware attributes

2021-07-19 Thread Pratik R. Sampat
RFC: https://lkml.org/lkml/2021/6/4/791 PATCH v1: https://lkml.org/lkml/2021/6/16/805 PATCH v2: https://lkml.org/lkml/2021/7/6/138 PATCH v3: https://lkml.org/lkml/2021/7/12/2799 PATCH v4: https://lkml.org/lkml/2021/7/16/532 Changelog v4 --> v5 Based on comments from Fabiano 1. Cleaned up

Re: [PATCH] soc: fsl: qe: convert QE interrupt controller to platform_device

2021-07-19 Thread Maxim Kochetkov
15.07.2021 01:29, Li Yang wrote: From the original code, this should be type = "qeic". It is not defined in current binding but probably needed for backward compatibility. I took these strings from this part: np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); if (!np) {

[PATCH v2] soc: fsl: qe: convert QE interrupt controller to platform_device

2021-07-19 Thread Maxim Kochetkov
Since 5.13 QE's ucc nodes can't get interrupts from devicetree: ucc@2000 { cell-index = <1>; reg = <0x2000 0x200>; interrupts = <32>; interrupt-parent = <>; }; Now fw_devlink expects driver to create and probe a

Re: [PATCH v5 01/11] powerpc/pseries/iommu: Replace hard-coded page shift

2021-07-19 Thread Frederic Barrat
On 16/07/2021 10:27, Leonardo Bras wrote: Some functions assume IOMMU page size can only be 4K (pageshift == 12). Update them to accept any page size passed, so we can use 64K pages. In the process, some defines like TCE_SHIFT were made obsolete, and then removed. IODA3 Revision 3.0_prd1

Re: [PATCH v5 02/11] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2021-07-19 Thread Frederic Barrat
On 16/07/2021 10:27, Leonardo Bras wrote: @@ -1099,18 +1105,13 @@ int iommu_take_ownership(struct iommu_table *tbl) for (i = 0; i < tbl->nr_pools; i++) spin_lock_nest_lock(>pools[i].lock, >large_pool.lock); - iommu_table_release_pages(tbl); - - if

Re: [PATCH v5 03/11] powerpc/pseries/iommu: Add iommu_pseries_alloc_table() helper

2021-07-19 Thread Frederic Barrat
On 16/07/2021 10:27, Leonardo Bras wrote: Creates a helper to allow allocating a new iommu_table without the need to reallocate the iommu_group. This will be helpful for replacing the iommu_table for the new DMA window, after we remove the old one with iommu_tce_table_put(). Signed-off-by:

Re: [PATCH v5 04/11] powerpc/pseries/iommu: Add ddw_list_new_entry() helper

2021-07-19 Thread Frederic Barrat
On 16/07/2021 10:27, Leonardo Bras wrote: There are two functions creating direct_window_list entries in a similar way, so create a ddw_list_new_entry() to avoid duplicity and simplify those functions. Signed-off-by: Leonardo Bras Reviewed-by: Alexey Kardashevskiy --- LGTM Reviewed-by:

[PATCH] PCI: Move pci_dev_is/assign_added() to pci.h

2021-07-19 Thread Niklas Schnelle
The helper function pci_dev_is_added() from drivers/pci/pci.h is used in PCI arch code of both s390 and powerpc leading to awkward relative includes. Move it to the global include/linux/pci.h and get rid of these includes just for that one function. Signed-off-by: Niklas Schnelle ---

[PATCH] powerpc: use IRQF_NO_DEBUG for IPIs

2021-07-19 Thread Cédric Le Goater
There is no need to use the lockup detector ("noirqdebug") for IPIs. The ipistorm benchmark measures a ~10% improvement on high systems when this flag is set. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/xics-common.c | 2 +-

Re: [PATCH] replace if with min

2021-07-19 Thread Christophe Leroy
Salah Triki a écrit : Replace if with min in order to make code more clean. Signed-off-by: Salah Triki --- drivers/crypto/nx/nx-842.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c index

FAILED: patch "[PATCH] drm/radeon/ni_dpm: Fix booting bug" failed to apply to 5.13-stable tree

2021-07-19 Thread Christian Zigotzky
On 19 July 2021 at 04:32 pm, Stan Johnson wrote: On 7/18/21 10:23 PM, Christian Zigotzky wrote: Hello Stan, We had the same issue during the 5.14 merge window. Please look in the following thread: https://forum.hyperion-entertainment.com/viewtopic.php?p=53511#p53511 There is a patch

[PATCH 5.13 345/351] perf script python: Fix buffer size to report iregs in perf script

2021-07-19 Thread Greg Kroah-Hartman
From: Kajol Jain [ Upstream commit dea8cfcc33695f70f56023b416cf88ae44c8a45a ] Commit 48a1f565261d2ab1 ("perf script python: Add more PMU fields to event handler dict") added functionality to report fields like weight, iregs, uregs etc via perf report. That commit predefined buffer size to 512

[PATCH 5.12 286/292] perf script python: Fix buffer size to report iregs in perf script

2021-07-19 Thread Greg Kroah-Hartman
From: Kajol Jain [ Upstream commit dea8cfcc33695f70f56023b416cf88ae44c8a45a ] Commit 48a1f565261d2ab1 ("perf script python: Add more PMU fields to event handler dict") added functionality to report fields like weight, iregs, uregs etc via perf report. That commit predefined buffer size to 512

Re: FAILED: patch "[PATCH] drm/radeon/ni_dpm: Fix booting bug" failed to apply to 5.13-stable tree

2021-07-19 Thread Christian Zigotzky
On 19 July 2021 04:58 pm, Christian Zigotzky wrote: On 19 July 2021 at 04:32 pm, Stan Johnson wrote: On 7/18/21 10:23 PM, Christian Zigotzky wrote: Hello Stan, We had the same issue during the 5.14 merge window. Please look in the following thread:

Re: [PATCH] replace if with min

2021-07-19 Thread Segher Boessenkool
On Mon, Jul 19, 2021 at 06:12:05PM +0200, Christophe Leroy wrote: > Salah Triki a écrit : > >Replace if with min in order to make code more clean. > >--- a/drivers/crypto/nx/nx-842.c > >+++ b/drivers/crypto/nx/nx-842.c > >@@ -134,8 +134,7 @@ EXPORT_SYMBOL_GPL(nx842_crypto_exit); > > static void

Re: [PATCH v5 03/11] powerpc/pseries/iommu: Add iommu_pseries_alloc_table() helper

2021-07-19 Thread Leonardo Brás
On Mon, 2021-07-19 at 16:04 +0200, Frederic Barrat wrote: > > > On 16/07/2021 10:27, Leonardo Bras wrote: > > Creates a helper to allow allocating a new iommu_table without the > > need > > to reallocate the iommu_group. > > > > This will be helpful for replacing the iommu_table for the new DMA

Re: [PATCH v5 04/11] powerpc/pseries/iommu: Add ddw_list_new_entry() helper

2021-07-19 Thread Leonardo Brás
On Mon, 2021-07-19 at 16:14 +0200, Frederic Barrat wrote: > > > On 16/07/2021 10:27, Leonardo Bras wrote: > > There are two functions creating direct_window_list entries in a > > similar way, so create a ddw_list_new_entry() to avoid duplicity > > and > > simplify those functions. > > > >

Re: [PATCH v5 01/11] powerpc/pseries/iommu: Replace hard-coded page shift

2021-07-19 Thread Leonardo Brás
On Mon, 2021-07-19 at 15:48 +0200, Frederic Barrat wrote: > > > On 16/07/2021 10:27, Leonardo Bras wrote: > > Some functions assume IOMMU page size can only be 4K (pageshift == > > 12). > > Update them to accept any page size passed, so we can use 64K > > pages. > > > > In the process, some

Re: [PATCH v5 1/1] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-07-19 Thread Fabiano Rosas
"Pratik R. Sampat" writes: > + pgs = kcalloc(num_attrs, sizeof(*pgs), GFP_KERNEL); > + if (!pgs) > + goto out; > + > + papr_kobj = kobject_create_and_add("papr", firmware_kobj); > + if (!papr_kobj) { > + pr_warn("kobject_create_and_add papr failed\n"); > +

Re: [PATCH v1 13/16] xen: swiotlb: return error code from xen_swiotlb_map_sg()

2021-07-19 Thread Boris Ostrovsky
On 7/15/21 12:45 PM, Logan Gunthorpe wrote: > From: Martin Oliveira > > The .map_sg() op now expects an error code instead of zero on failure. > > xen_swiotlb_map_sg() may only fail if xen_swiotlb_map_page() fails, but > xen_swiotlb_map_page() only supports returning errors as >

[RFC 1/2] ppc/fpu: Add generic FPU api similar to x86

2021-07-19 Thread Anson Jacob
- Add kernel_fpu_begin & kernel_fpu_end API as x86 - Add logic similar to x86 to ensure fpu begin/end call correctness - Add kernel_fpu_enabled to know if FPU is enabled Signed-off-by: Anson Jacob --- arch/powerpc/include/asm/switch_to.h | 29 ++ arch/powerpc/kernel/process.c|

[RFC 2/2] drm/amd/display: Use PPC FPU functions

2021-07-19 Thread Anson Jacob
Use kernel_fpu_begin & kernel_fpu_end for PPC Depends on "ppc/fpu: Add generic FPU api similar to x86" Signed-off-by: Anson Jacob --- drivers/gpu/drm/amd/display/dc/os_types.h | 28 ++- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git

[RFC 0/2] Add generic FPU api similar to x86

2021-07-19 Thread Anson Jacob
This is an attempt to have generic FPU enable/disable calls similar to x86. So that we can simplify gpu/drm/amd/display/dc/os_types.h Also adds FPU correctness logic seen in x86. Anson Jacob (2): ppc/fpu: Add generic FPU api similar to x86 drm/amd/display: Use PPC FPU functions

Re: [PATCH v5 1/1] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-07-19 Thread Pratik Sampat
On 20/07/21 12:39 am, Fabiano Rosas wrote: "Pratik R. Sampat" writes: + pgs = kcalloc(num_attrs, sizeof(*pgs), GFP_KERNEL); + if (!pgs) + goto out; + + papr_kobj = kobject_create_and_add("papr", firmware_kobj); + if (!papr_kobj) { +

[PATCH v6 0/1] Interface to represent PAPR firmware attributes

2021-07-19 Thread Pratik R. Sampat
RFC: https://lkml.org/lkml/2021/6/4/791 PATCH v1: https://lkml.org/lkml/2021/6/16/805 PATCH v2: https://lkml.org/lkml/2021/7/6/138 PATCH v3: https://lkml.org/lkml/2021/7/12/2799 PATCH v4: https://lkml.org/lkml/2021/7/16/532 PATCH v5: https://lkml.org/lkml/2021/7/19/247 Changelog v5 --> v6 1. On

[PATCH v6 1/1] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-07-19 Thread Pratik R. Sampat
Adds a generic interface to represent the energy and frequency related PAPR attributes on the system using the new H_CALL "H_GET_ENERGY_SCALE_INFO". H_GET_EM_PARMS H_CALL was previously responsible for exporting this information in the lparcfg, however the H_GET_EM_PARMS H_CALL will be deprecated

Re: [PATCH v5 02/11] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2021-07-19 Thread Leonardo Brás
Hello Fred, thanks for this feedback! Sorry if I miss anything, this snippet was written for v1 over an year ago, and I have not taken a look at it ever since. On Mon, 2021-07-19 at 15:53 +0200, Frederic Barrat wrote: > > > On 16/07/2021 10:27, Leonardo Bras wrote: > > @@ -1099,18 +1105,13 @@