Re: [PATCH] powerpc/xive: Fix some incorrect memory allocation

2022-06-25 Thread Cédric Le Goater
Hello Christophe, On 6/25/22 11:49, Christophe JAILLET wrote: 'xibm->count' really looks like a number of bits (see how it is used in __xive_irq_bitmap_alloc()), so use the bitmap API to allocate and free this bitmap. This improves semantic and potentially avoids some over memory allocation.

Re: [PATCH] powerpc/xive/spapr: correct bitmap allocation size

2022-06-23 Thread Cédric Le Goater
ate and initialize the irq bitmap, paired with bitmap_free() for consistency. Signed-off-by: Nathan Lynch Reviewed-by: Cédric Le Goater Thanks, C. --- arch/powerpc/sysdev/xive/spapr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/spapr.

Re: [PATCH] powerpc/xive: Fix refcount leak in xive_spapr_init

2022-05-12 Thread Cédric Le Goater
rrupt controller") Signed-off-by: Miaoqian Lin Reviewed-by: Cédric Le Goater Thanks, C. --- arch/powerpc/sysdev/xive/spapr.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xive/spapr.c b/arch/powerpc/sysdev/xive/spapr.c index 29456c255f9f..50

Re: [PATCH kernel] KVM: PPC: Book3s: Remove real mode interrupt controller hcalls handlers

2022-05-10 Thread Cédric Le Goater
tros (kernel < 4.14), I doubt anyone will complain. Signed-off-by: Alexey Kardashevskiy Acked-by: Cédric Le Goater Thanks, C. --- arch/powerpc/kvm/Makefile | 2 +- arch/powerpc/include/asm/kvm_ppc.h | 7 - arch/powerpc/kvm/book3s_xive.h

Re: [PATCH] powerpc/xive: fix return value of __setup handler

2022-03-14 Thread Cédric Le Goater
1ee04f11ae ("powerpc/xive: Add a kernel parameter for StoreEOI") Signed-off-by: Randy Dunlap From: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0de...@omprussia.ru Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Cédric Le Goater Cc: Paul Mackerras Reviewed-

Re: [PATCH 3/6] KVM: PPC: Book3S HV P9: Move cede logic out of XIVE escalation rearming

2022-03-09 Thread Cédric Le Goater
On 3/3/22 06:33, Nicholas Piggin wrote: Move the cede abort logic out of xive escalation rearming and into the caller to prepare for handling a similar case with nested guest entry. Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater In xive_esc_irq() : if (vcpu

[PATCH] net/ibmvnic: Cleanup workaround doing an EOI after partition migration

2022-02-18 Thread Cédric Le Goater
XIVE interrupt mode. Cc: Sukadev Bhattiprolu Cc: Dany Madden Signed-off-by: Cédric Le Goater --- drivers/net/ethernet/ibm/ibmvnic.c | 35 ++ 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm

Re: [PATCH v2] powerpc/xive: Add some error handling code to 'xive_spapr_init()'

2022-02-01 Thread Cédric Le Goater
-by: Cédric Le Goater --- NOT compile tested (I don't have a cross compiler and won't install one). So if some correction or improvement are needed, feel free to propose and commit it directly. A cross compiler takes a couple of seconds to install on any distro. It takes a little more to compile

Re: ppc: hard lockup / hang in v5.17-rc1 under QEMU

2022-01-26 Thread Cédric Le Goater
On 1/26/22 15:16, Miguel Ojeda wrote: Hi PPC folks, Our ppc64le CI deterministically triggers a hard lockup / hang under QEMU since v5.17-rc1 (upgrading from v5.16). Bisecting points to 0faf20a1ad16 ("powerpc/64s/interrupt: Don't enable MSR[EE] in irq handlers unless perf is in use").

Re: [PATCH kernel v5] KVM: PPC: Merge powerpc's debugfs entry content into generic entry

2022-01-24 Thread Cédric Le Goater
KVM: let kvm_destroy_vm_debugfs clean up vCPU debugfs directories"). Suggested-by: Fabiano Rosas Signed-off-by: Alexey Kardashevskiy Reviewed-by: Cédric Le Goater Thanks, C. --- Changes: v5: * fixed e500mc2 v4: * added "kvm-xive-%p" v3: * reworked commit log, especially, the b

Re: [PATCH]powerpc/xive: Export XIVE IPI information for online-only processors.

2022-01-06 Thread Cédric Le Goater
-by: Cédric Le Goater Signed-off-by: Sachin Sant Reviewed-by: Cédric Le Goater Thanks, C. --- diff -Naurp a/arch/p werpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c --- a/arch/powerpc/sysdev/xive/common.c 2022-01-05 08:52:59.460118219 -0500 +++ b/arch/powerpc/sysdev/xive/common.c 2022

Re: [PATCH]powerpc/xmon: Dump XIVE information for online-only processors.

2022-01-05 Thread Cédric Le Goater
information(dxa) to be displayed for online processors only. Signed-off-by: Sachin Sant Looks good to me. We should do the same for : /sys/kernel/debug/powerpc/xive/ipis Reviewed-by: Cédric Le Goater Thanks, C. --- diff -Naurp a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c

Re: [PATCH] powerpc/xive: Add missing null check after calling kmalloc

2022-01-02 Thread Cédric Le Goater
On 12/26/21 14:54, Ammar Faizi wrote: Commit 930914b7d528fc ("powerpc/xive: Add a debugfs file to dump internal XIVE state") forgot to add a null check. Add it. Cc: Cédric Le Goater Cc: Michael Ellerman Fixes: 930914b7d528fc6b0249bffc00564100bcf6ef75 ("powerpc/xive: Add

Re: [PATCH kernel v4] KVM: PPC: Merge powerpc's debugfs entry content into generic entry

2021-12-21 Thread Cédric Le Goater
- xive->dentry = debugfs_create_file(name, S_IRUGO, arch_debugfs_dir, + xive->dentry = debugfs_create_file("xive", S_IRUGO, xive->kvm->debugfs_dentry, xive, _debug_fops); The KVM XIVE device implements a "xics-on-xive" interface, the XICS

Re: [PATCH kernel v4] KVM: PPC: Merge powerpc's debugfs entry content into generic entry

2021-12-19 Thread Cédric Le Goater
KVM: let kvm_destroy_vm_debugfs clean up vCPU debugfs directories"). Suggested-by: Fabiano Rosas Signed-off-by: Alexey Kardashevskiy Reviewed-by: Cédric Le Goater One comment below. --- Changes: v4: * added "kvm-xive-%p" v3: * reworked commit log, especially, the bit about rem

Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity()

2021-12-18 Thread Cédric Le Goater
see on my screen; open to ideas on that front! Bah. Fix below. That's a fix for the issue I was seeing on pseries with NVMe. Tested-by: Cédric Le Goater Thanks, C. Thanks, tglx --- diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c index 71802410e2ab..9b4910befeda 100644 ---

Re: [PATCH kernel v3] KVM: PPC: Merge powerpc's debugfs entry content into generic entry

2021-12-16 Thread Cédric Le Goater
On 12/17/21 04:07, Alexey Kardashevskiy wrote: On 12/16/21 05:11, Cédric Le Goater wrote: On 12/15/21 02:33, Alexey Kardashevskiy wrote: At the moment KVM on PPC creates 3 types of entries under the kvm debugfs: 1) "%pid-%fd" per a KVM instance (for all platforms); 2) "v

Re: [PATCH kernel v3] KVM: PPC: Merge powerpc's debugfs entry content into generic entry

2021-12-15 Thread Cédric Le Goater
On 12/15/21 02:33, Alexey Kardashevskiy wrote: At the moment KVM on PPC creates 3 types of entries under the kvm debugfs: 1) "%pid-%fd" per a KVM instance (for all platforms); 2) "vm%pid" (for PPC Book3s HV KVM); 3) "vm%u_vcpu%u_timing" (for PPC Book3e KVM). The problem with this is that

Re: linux-next: manual merge of the audit tree with the powerpc tree

2021-12-14 Thread Cédric Le Goater
On 12/14/21 20:32, Christophe Leroy wrote: Le 14/12/2021 à 19:23, Paul Moore a écrit : On Tue, Dec 14, 2021 at 12:59 PM Christophe Leroy wrote: Hello Paul, I've been trying to setup your test suite on my powerpc board but it's based on Perl and on a lot of optional Perl packages. I was

Re: [patch V2 01/23] powerpc/4xx: Remove MSI support which never worked

2021-12-08 Thread Cédric Le Goater
On 12/7/21 21:42, Thomas Gleixner wrote: Cedric, On Tue, Dec 07 2021 at 16:50, Cédric Le Goater wrote: On 12/7/21 12:36, Michael Ellerman wrote: This patch should drop those selects I guess. Can you send an incremental diff for Thomas to squash in? Sure. Removing all the tendrils

Re: [patch V2 01/23] powerpc/4xx: Remove MSI support which never worked

2021-12-07 Thread Cédric Le Goater
On 12/7/21 12:36, Michael Ellerman wrote: Cédric Le Goater writes: Hello Thomas, On 12/6/21 23:27, Thomas Gleixner wrote: This code is broken since day one. ppc4xx_setup_msi_irqs() has the following gems: 1) The handling of the result of msi_bitmap_alloc_hwirqs() is completely

Re: [patch V2 01/23] powerpc/4xx: Remove MSI support which never worked

2021-12-06 Thread Cédric Le Goater
Hello Thomas, On 12/6/21 23:27, Thomas Gleixner wrote: This code is broken since day one. ppc4xx_setup_msi_irqs() has the following gems: 1) The handling of the result of msi_bitmap_alloc_hwirqs() is completely broken: When the result is greater than or equal 0 (bitmap

[PATCH] powerpc/xive: Fix compile when !CONFIG_PPC_POWERNV.

2021-12-01 Thread Cédric Le Goater
initialization and move the 'save-restore' entry under the native (PowerNV) backend to fix compile when !CONFIG_PPC_POWERNV. Reported-by: kernel test robot Fixes: 1e7684dc4fc7 ("powerpc/xive: Add a debugfs toggle for save-restore") Signed-off-by: Cédric Le Goater --- arch/powerpc/sys

Re: [patch 05/22] genirq/msi: Fixup includes

2021-11-30 Thread Cédric Le Goater
On 11/30/21 23:41, Thomas Gleixner wrote: On Tue, Nov 30 2021 at 23:10, Thomas Gleixner wrote: On Tue, Nov 30 2021 at 22:48, Cédric Le Goater wrote: On 11/29/21 22:38, Thomas Gleixner wrote: On Mon, Nov 29 2021 at 08:33, Cédric Le Goater wrote: thanks for having a look. I fixed up

Re: [patch 05/22] genirq/msi: Fixup includes

2021-11-30 Thread Cédric Le Goater
On 11/29/21 22:38, Thomas Gleixner wrote: Cedric, On Mon, Nov 29 2021 at 08:33, Cédric Le Goater wrote: On 11/27/21 02:18, Thomas Gleixner wrote: Remove the kobject.h include from msi.h as it's not required and add a sysfs.h include to the core code instead. Signed-off-by: Thomas Gleixner

Re: [patch 00/22] genirq/msi, PCI/MSI: Spring cleaning - Part 1

2021-11-29 Thread Cédric Le Goater
On 11/27/21 02:18, Thomas Gleixner wrote: The [PCI] MSI code has gained quite some warts over time. A recent discussion unearthed a shortcoming: the lack of support for expanding PCI/MSI-X vectors after initialization of MSI-X. PCI/MSI-X has no requirement to setup all vectors when MSI-X is

Re: [patch 17/22] PCI/MSI: Split out !IRQDOMAIN code

2021-11-29 Thread Cédric Le Goater
On 11/27/21 02:19, Thomas Gleixner wrote: Split out the non irqdomain code into its own file. Signed-off-by: Thomas Gleixner --- drivers/pci/msi/Makefile |5 ++-- drivers/pci/msi/legacy.c | 51 +++ drivers/pci/msi/msi.c| 46

Re: [patch 17/22] PCI/MSI: Split out !IRQDOMAIN code

2021-11-28 Thread Cédric Le Goater
+void __weak arch_teardown_msi_irqs(struct pci_dev *dev) +{ + struct msi_desc *desc; + int i; + + for_each_pci_msi_entry(desc, dev) { + if (desc->irq) { + for (i = 0; i < entry->nvec_used; i++) I guess this is 'desc' ? Thanks, C. +

Re: [patch 05/22] genirq/msi: Fixup includes

2021-11-28 Thread Cédric Le Goater
On 11/27/21 02:18, Thomas Gleixner wrote: Remove the kobject.h include from msi.h as it's not required and add a sysfs.h include to the core code instead. Signed-off-by: Thomas Gleixner This patch breaks compile on powerpc : CC arch/powerpc/kernel/msi.o In file included from

Re: [PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

2021-11-25 Thread Cédric Le Goater
On 11/26/21 06:21, Nicholas Piggin wrote: KVM does not support VAS so guests always print a useless error on boot vas: HCALL(398) error -2, query_type 0, result buffer 0x57f2000 Change this to only print the message if the error is not H_FUNCTION. Just being curious, why is it even

Re: [PATCH 04/11] powerpc/xive: Introduce xive_core_debugfs_create()

2021-11-18 Thread Cédric Le Goater
On 11/18/21 10:21, Michael Ellerman wrote: Cédric Le Goater writes: and fix some compile issues when !CONFIG_DEBUG_FS. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/powerpc

Re: [PATCH 11/11] powerpc/smp: Add a doorbell=off kernel parameter

2021-11-18 Thread Cédric Le Goater
On 11/18/21 10:24, Michael Ellerman wrote: Cédric Le Goater writes: On 11/11/21 11:41, Michael Ellerman wrote: Cédric Le Goater writes: On processors with a XIVE interrupt controller (POWER9 and above), the kernel can use either doorbells or XIVE to generate CPU IPIs. Sending doorbell

Re: [PATCH] powerpc/xive: Change IRQ domain to a tree domain

2021-11-16 Thread Cédric Le Goater
On 11/16/21 17:58, Marc Zyngier wrote: On Tue, 16 Nov 2021 13:40:22 +, Cédric Le Goater wrote: Commit 4f86a06e2d6e ("irqdomain: Make normal and nomap irqdomains exclusive") introduced an IRQ_DOMAIN_FLAG_NO_MAP flag to isolate the 'nomap' domains still in use under the po

Re: [PATCH] powerpc/xive: Change IRQ domain to a tree domain

2021-11-16 Thread Cédric Le Goater
On 11/16/21 15:23, Greg Kurz wrote: On Tue, 16 Nov 2021 14:40:22 +0100 Cédric Le Goater wrote: Commit 4f86a06e2d6e ("irqdomain: Make normal and nomap irqdomains exclusive") introduced an IRQ_DOMAIN_FLAG_NO_MAP flag to isolate the 'nomap' domains still in use under the po

[PATCH] powerpc/xive: Change IRQ domain to a tree domain

2021-11-16 Thread Cédric Le Goater
.14+ Fixes: 4f86a06e2d6e ("irqdomain: Make normal and nomap irqdomains exclusive") Signed-off-by: Cédric Le Goater --- Marc, The Fixes tag is there because the patch in question revealed that something was broken in XIVE. genirq is not in cause. However, I don't know for PS3 and Cell. May be l

Re: [PATCH 16/39] irqdomain: Make normal and nomap irqdomains exclusive

2021-11-16 Thread Cédric Le Goater
Hello Marc, This patch is breaking the POWER9/POWER10 XIVE driver (these are not old PPC systems :) on machines sharing the same LSI HW IRQ. For instance, a linux KVM guest with a virtio-rng and a virtio-balloon device. In that case, Linux creates two distinct IRQ mappings which can lead to

Re: [PATCH 16/39] irqdomain: Make normal and nomap irqdomains exclusive

2021-11-15 Thread Cédric Le Goater
Hello Mark, On 5/20/21 18:37, Marc Zyngier wrote: Direct mappings are completely exclusive of normal mappings, meaning that we can refactor the code slightly so that we can get rid of the revmap_direct_max_irq field and use the revmap_size field instead, reducing the size of the irqdomain

Re: [PATCH 11/11] powerpc/smp: Add a doorbell=off kernel parameter

2021-11-11 Thread Cédric Le Goater
On 11/11/21 11:41, Michael Ellerman wrote: Cédric Le Goater writes: On processors with a XIVE interrupt controller (POWER9 and above), the kernel can use either doorbells or XIVE to generate CPU IPIs. Sending doorbell is generally preferred to using the XIVE IC because it is faster

[PATCH 07/11] powerpc/xive: Add a debugfs file to dump EQs

2021-11-05 Thread Cédric Le Goater
The XIVE driver under Linux uses a single interrupt priority and only one event queue is configured per CPU. Expose the contents under a 'xive/eqs/cpuX' debugfs file. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 37 +++ 1 file changed, 37

[PATCH 05/11] powerpc/xive: Change the debugfs file 'xive' into a directory

2021-11-05 Thread Cédric Le Goater
Use a 'cpus' file to dump CPU states and 'interrupts' to dump IRQ states. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 36 +-- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc

[PATCH 11/11] powerpc/smp: Add a doorbell=off kernel parameter

2021-11-05 Thread Cédric Le Goater
or performance. Only useful on POWER9 and above. Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/dbell.h| 1 + arch/powerpc/kernel/dbell.c | 17 + arch/powerpc/platforms/powernv/smp.c| 7 +-- arch/powerpc/platforms

[PATCH 06/11] powerpc/xive: Rename the 'cpus' debugfs file to 'ipis'

2021-11-05 Thread Cédric Le Goater
and remove the EQ entries output which is not very useful since only the next two events of the queue are taken into account. We will improve the dump of the EQ in the next patches. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 27 +++ 1 file

[PATCH 08/11] powerpc/xive: Add a debugfs toggle for StoreEOI

2021-11-05 Thread Cédric Le Goater
It can be used to deactivate temporarily StoreEOI for tests or performance on platforms supporting the feature (POWER10) Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/powerpc

[PATCH 00/11] powerpc/xive: Improve diagnostic and activate StoreEOI on P10 PowerNV

2021-11-05 Thread Cédric Le Goater
is activated. Doorbells cannot be used in that case. Finally, it activates StoreEOI support for the PowerNV platform. OPAL for P10 has been released and we are free to use this extension. Thanks, C. Cédric Le Goater (11): powerpc/xive: Replace pr_devel() by pr_debug() to ease debug powerpc

[PATCH 01/11] powerpc/xive: Replace pr_devel() by pr_debug() to ease debug

2021-11-05 Thread Cédric Le Goater
These routines are not on hot code paths and pr_debug() is easier to activate. Also add a '0x' prefix to hex printed values (HW IRQ number). Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 29 +++ arch/powerpc/sysdev/xive/spapr.c | 38

[PATCH 02/11] powerpc/xive: Introduce an helper to print out interrupt characteristics

2021-11-05 Thread Cédric Le Goater
and extend output of debugfs and xmon with addresses of the ESB management and trigger pages. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 54 +++ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/arch/powerpc/sysdev/xive

[PATCH 09/11] powerpc/xive: Add a kernel parameter for StoreEOI

2021-11-05 Thread Cédric Le Goater
StoreEOI is activated by default on platforms supporting the feature (POWER10) and will be used as soon as firmware advertises its availability. The kernel parameter provides a way to deactivate its use. It can be still be reactivated through debugfs. Signed-off-by: Cédric Le Goater --- arch

[PATCH 10/11] powerpc/xive: Add a debugfs toggle for save-restore

2021-11-05 Thread Cédric Le Goater
On POWER10, the automatic "save & restore" of interrupt context is always available. Provide a way to deactivate it for tests or performance. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/xive-internal.h | 1 + arch/powerpc/sysdev/xive/common.c| 1 + arch/

[PATCH 03/11] powerpc/xive: Activate StoreEOI on P10

2021-11-05 Thread Cédric Le Goater
igned-off-by: Cédric Le Goater --- arch/powerpc/include/asm/opal-api.h | 1 + arch/powerpc/sysdev/xive/native.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h index 0b63ba7d5917..a2bc4b95e703 100644 --- a/arch/powe

[PATCH 04/11] powerpc/xive: Introduce xive_core_debugfs_create()

2021-11-05 Thread Cédric Le Goater
and fix some compile issues when !CONFIG_DEBUG_FS. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index

[PATCH] powerpc/boot: Use CONFIG_PPC_POWERNV to compile OPAL support

2021-10-11 Thread Cédric Le Goater
CONFIG_PPC64_BOOT_WRAPPER is selected by CPU_LITTLE_ENDIAN which is used to compile support for other platforms such as Microwatt. There is no need for OPAL calls on these. Signed-off-by: Cédric Le Goater --- arch/powerpc/boot/serial.c | 2 +- arch/powerpc/boot/Makefile | 2 +- 2 files changed

[PATCH] powerpc/xive: Discard disabled interrupts in get_irqchip_state()

2021-10-11 Thread Cédric Le Goater
in get_irqchip_state(). Fixes: da15c03b047d ("powerpc/xive: Implement get_irqchip_state method for XIVE to fix shutdown race") Cc: sta...@vger.kernel.org#v5.4+ Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [RFC 1/5] ipmi:bt-bmc: Separate out ASPEED specific bits

2021-10-06 Thread Cédric Le Goater
. Signed-off-by: Anton Blanchard Reviewed-by: Cédric Le Goater Thanks, C. --- drivers/char/ipmi/bt-bmc.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c index 6e3d247b55d1..f85fafc96ef6

Re: [RFC 5/5] ipmi:bt-bmc: Add Microwatt

2021-10-06 Thread Cédric Le Goater
p_update_bits(bt_bmc->map, bt_bmc->offset + MICROWATT_IRQ_MASK, + (IRQ_HOST_TO_BMC_ATTN | IRQ_HOST_NOT_BUSY), + (IRQ_HOST_TO_BMC_ATTN | IRQ_HOST_NOT_BUSY)); This is the only difference. May be we could introduce a ->config_irq_hw()

Re: [RFC 3/5] ipmi:bt-bmc: Put arch specific function into bt_bmc_ops

2021-10-06 Thread Cédric Le Goater
On 10/6/21 04:12, Anton Blanchard wrote: While most of the driver is arch agnostic, setting up and handling interrupts, and enabling the hardware is not. Create bt_bmc_ops to handle these functions. Signed-off-by: Anton Blanchard See comment on patch 5. Any how, Reviewed-by: Cédric Le

Re: [PATCH 5/5] powerpc/64s: Fix unrecoverable MCE calling async handler from NMI

2021-10-04 Thread Cédric Le Goater
/include/asm/interrupt.h:168 BUG_ON(!arch_irq_disabled_regs(regs) && !(regs->msr & MSR_EE)); I was hitting this problem when I rebooted a P8 tuleta system and this series fixes it. Tested-by: Cédric Le Goater Thanks, C. Fix this by making an _async version of the handler

Re: [PATCH] powerpc/pseries/msi: Add an empty irq_write_msi_msg() handler

2021-09-30 Thread Cédric Le Goater
On 9/30/21 12:25, Cédric Le Goater wrote: The IPR drivers tests for MSI support at probe time with MSI vector 0 and when done, frees the IRQ with free_irq(). This test was introduced by 95fecd90397e ("ipr: add test for MSI interrupt support") as an improvement of commit 5a9ef25b14d3 (&

[PATCH] powerpc/pseries/msi: Add an empty irq_write_msi_msg() handler

2021-09-30 Thread Cédric Le Goater
ng hypervisor, PowerVM or QEMU/KVM. Cc: Wen Xiong Cc: Douglas Miller Cc: Brian King Fixes: a5f3d2c17b07 ("powerpc/pseries/pci: Add MSI domains") Signed-off-by: Cédric Le Goater --- We could also revert commit 95fecd90397e ("ipr: add test for MSI interrupt support") w

Re: [PATCH AUTOSEL 5.14 38/99] KVM: PPC: Book3S HV: XICS: Fix mapping of passthrough interrupts

2021-09-13 Thread Cédric Le Goater
On 9/11/21 4:35 PM, Sasha Levin wrote: > On Fri, Sep 10, 2021 at 07:48:18AM +0200, Cédric Le Goater wrote: >> On 9/10/21 2:14 AM, Sasha Levin wrote: >>> From: Cédric Le Goater >>> >>> [ Upstream commit 1753081f2d445f9157550692fcc4221cd3ff0958 ] >&g

[PATCH] powerpc/xics: Set the IRQ chip data for the ICS native backend

2021-09-13 Thread Cédric Le Goater
8af248a8f4 ("powerpc/xics: Rename the map handler in a check handler") Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/xics-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.

Re: [PATCH AUTOSEL 5.14 38/99] KVM: PPC: Book3S HV: XICS: Fix mapping of passthrough interrupts

2021-09-09 Thread Cédric Le Goater
On 9/10/21 2:14 AM, Sasha Levin wrote: > From: Cédric Le Goater > > [ Upstream commit 1753081f2d445f9157550692fcc4221cd3ff0958 ] > > PCI MSIs now live in an MSI domain but the underlying calls, which > will EOI the interrupt in real mode, need an HW IRQ number mapped in >

Re: [PATCH v2] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-23 Thread Cédric Le Goater
mpat syscall support") > added generic support for bi-arch. > > Convert powerpc to that bi-arch generic audit support. > > Signed-off-by: Christophe Leroy Reviewed-by: Cédric Le Goater Thanks, C. > --- > v2: > - Missing 'git add' for arch/powerpc/include/asm/unistd

[PATCH v2 1/2] powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is not set

2021-08-23 Thread Cédric Le Goater
as errors Cc: Christophe Leroy Signed-off-by: Cédric Le Goater --- arch/powerpc/kernel/prom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index f620e04dc9bf..44b2cdc0aae3 100644 --- a/arch/powerpc/kernel/prom.c +++ b

[PATCH v2 0/2] W=1 fixes

2021-08-23 Thread Cédric Le Goater
/dc14509a28a993738b1325211f412be72a4f9b1e.1629701132.git.christophe.le...@csgroup.eu/ Thanks, C. Changes in v2: - reworked early_reserve_mem_dt() - removed asmlinkage Cédric Le Goater (2): powerpc/prom: Fix unused variable ‘reserve_map’ when CONFIG_PPC32 is not set powerpc/compat_sys: Declare syscalls arch

[PATCH v2 2/2] powerpc/compat_sys: Declare syscalls

2021-08-23 Thread Cédric Le Goater
This fixes a compile error with W=1. Cc: Christophe Leroy Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/syscalls.h | 30 + 1 file changed, 30 insertions(+) diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h index

Re: [PATCH 5/6] audit: Declare ppc32_classify_syscall()

2021-08-23 Thread Cédric Le Goater
On 8/23/21 10:28 AM, Christophe Leroy wrote: > > > Le 19/08/2021 à 16:56, Christophe Leroy a écrit : >> >> >> Le 19/08/2021 à 14:56, Cédric Le Goater a écrit : >>> This fixes a compile error with W=1. >>> >>> Cc: Christophe Leroy >>

Re: [PATCH 1/6] powerpc/prom: Introduce early_reserve_mem_old()

2021-08-23 Thread Cédric Le Goater
On 8/19/21 4:42 PM, Christophe Leroy wrote: > > > Le 19/08/2021 à 14:56, Cédric Le Goater a écrit : >> and condition its call with IS_ENABLED(CONFIG_PPC32). This fixes a >> compile error with W=1. >> >> arch/powerpc/kernel/prom.c: In function ‘early_reserve_me

[PATCH 4/6] KVM: PPC: Book3S PR: Remove unused variable

2021-08-19 Thread Cédric Le Goater
This fixes a compile error with W=1. Signed-off-by: Cédric Le Goater --- May be, this was sent already ? arch/powerpc/kvm/book3s_64_mmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c index

[PATCH 0/6] W=1 fixes

2021-08-19 Thread Cédric Le Goater
. Cédric Le Goater (6): powerpc/prom: Introduce early_reserve_mem_old() powerpc/pseries/vas: Declare pseries_vas_fault_thread_fn() as static KVM: PPC: Book3S PR: Declare kvmppc_handle_exit_pr() KVM: PPC: Book3S PR: Remove unused variable audit: Declare ppc32_classify_syscall() powerpc

[PATCH 2/6] powerpc/pseries/vas: Declare pseries_vas_fault_thread_fn() as static

2021-08-19 Thread Cédric Le Goater
This fixes a compile error with W=1. Fixes: 6d0aaf5e0de0 ("powerpc/pseries/vas: Setup IRQ and fault handling") Cc: Haren Myneni Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/pseries/vas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc

[PATCH 5/6] audit: Declare ppc32_classify_syscall()

2021-08-19 Thread Cédric Le Goater
This fixes a compile error with W=1. Cc: Christophe Leroy Signed-off-by: Cédric Le Goater --- I don't think this is correct. Which file could we use ? arch/powerpc/include/asm/unistd.h | 3 +++ arch/powerpc/kernel/audit.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff

[PATCH 6/6] powerpc/compat_sys: Declare syscalls

2021-08-19 Thread Cédric Le Goater
This fixes a compile error with W=1. Cc: Christophe Leroy Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/syscalls.h | 31 + 1 file changed, 31 insertions(+) diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h index

[PATCH 3/6] KVM: PPC: Book3S PR: Declare kvmppc_handle_exit_pr()

2021-08-19 Thread Cédric Le Goater
This fixes a compile error with W=1. Signed-off-by: Cédric Le Goater --- arch/powerpc/kvm/book3s.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s.h b/arch/powerpc/kvm/book3s.h index 740e51def5a5..c08f93b7f523 100644 --- a/arch/powerpc/kvm/book3s.h +++ b/arch/powerpc

[PATCH 1/6] powerpc/prom: Introduce early_reserve_mem_old()

2021-08-19 Thread Cédric Le Goater
; ^~~ cc1: all warnings being treated as errors Cc: Christophe Leroy Signed-off-by: Cédric Le Goater --- Christophe, I think you had comments on this one ? Yes, I am being a bit lazy. arch/powerpc/kernel/prom.c | 37 - 1 file changed, 20

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

2021-08-10 Thread Cédric Le Goater
On 8/7/21 9:20 AM, 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 can not directly allocate and

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

2021-08-10 Thread Cédric Le Goater
> I forgot to add that this version does break irqbalance anymore, since ... does not break ... Sorry for the noise, > Linux is not mapping interrupts of CPU-less nodes. > > Anyhow, irqbalance is now fixed : > > >

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

2021-08-07 Thread Cédric Le Goater
y: Geetika Moolchandani Cc: Srikar Dronamraju Cc: Laurent Vivier Signed-off-by: Cédric Le Goater Message-Id: <20210629131542.743888-1-...@kaod.org> Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 35 +-- 1 file changed, 24 insertions(+), 11 de

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

2021-08-06 Thread Cédric Le Goater
On 6/29/21 3:15 PM, 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 nod

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

2021-08-02 Thread Cédric Le Goater
On 8/2/21 8:37 AM, Michael Ellerman wrote: > Cédric Le Goater writes: >> 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.

[PATCH 0/2] KVM: PPC: Book3S HV: XIVE: Improve guest entries and exits

2021-07-20 Thread Cédric Le Goater
The XIVE interrupt controller on P10 can automatically save and restore the state of the interrupt registers under the internal NVP structure representing the VCPU. This saves a costly store/load in guest entries and exits. Thanks, C. Cédric Le Goater (2): KVM: PPC: Book3S HV: XIVE: Add

[PATCH 1/2] KVM: PPC: Book3S HV: XIVE: Add a 'flags' field

2021-07-20 Thread Cédric Le Goater
Use it to hold platform specific features. P9 DD2 introduced single-escalation support. P10 will add others. Signed-off-by: Cédric Le Goater --- arch/powerpc/kvm/book3s_xive.h| 9 - arch/powerpc/kvm/book3s_xive.c| 19 ++- arch/powerpc/kvm

[PATCH 2/2] KVM: PPC: Book3S HV: XIVE: Add support for automatic save-restore

2021-07-20 Thread Cédric Le Goater
saves a costly store/load in guest entries and exits. If OPAL advertises the "save & restore" feature in the device tree, it should also have set the 'H' bit in the CAM line. Check that when vCPUs are connected to their ICP in KVM before going any further. Cc: Nicholas Piggin Sig

[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 +- arch/powerpc/s

[PATCH] powerpc/xive: Fix error handling when allocating an IPI

2021-07-01 Thread Cédric Le Goater
el test robot Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index f8ff558bc305..7bbb9bc83057 100644 --- a/arch/powerpc/sysdev/

[PATCH v2 22/32] powerpc/pci: Drop XIVE restriction on MSI domains

2021-07-01 Thread Cédric Le Goater
The PowerNV and pSeries platforms now have support for both the XICS and XIVE IRQ domains. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c | 4 +--- arch/powerpc/platforms/pseries/msi.c | 4 2 files changed, 1 insertion(+), 7 deletions(-) diff --git

[PATCH v2 30/32] KVM: PPC: Book3S HV: XICS: Fix mapping of passthrough interrupts

2021-07-01 Thread Cédric Le Goater
PCI MSIs now live in an MSI domain but the underlying calls, which will EOI the interrupt in real mode, need an HW IRQ number mapped in the XICS IRQ domain. Grab it there. Cc: Alexey Kardashevskiy Signed-off-by: Cédric Le Goater --- arch/powerpc/kvm/book3s_hv.c | 12 ++-- 1 file

[PATCH v2 31/32] powerpc/xive: Use XIVE domain under xmon and debugfs

2021-07-01 Thread Cédric Le Goater
The default domain of the PCI/MSIs is not the XIVE domain anymore. To list the IRQ mappings under XMON and debugfs, query the IRQ data from the low level XIVE domain. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 11 +-- 1 file changed, 5 insertions(+), 6

[PATCH v2 28/32] powerpc/powernv/pci: Set the IRQ chip data for P8/CXL devices

2021-07-01 Thread Cédric Le Goater
' driver. Rewriting this driver to support MSI would be a waste of time. Nevertheless, we can still remove the IRQ chip patch and set the IRQ chip data instead. This is cleaner. Cc: Frederic Barrat Cc: Christophe Lombard Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c

[PATCH v2 32/32] genirq: Improve "hwirq" output in /proc and /sys/

2021-07-01 Thread Cédric Le Goater
The HW IRQ numbers generated by the PCI MSI layer can be quite large on a pSeries machine when running under the IBM Hypervisor and they appear as negative. Use '%lu' instead to show them correctly. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- kernel/irq/irqdesc.c | 2 +- kernel/irq

[PATCH v2 15/32] KVM: PPC: Book3S HV: XIVE: Fix mapping of passthrough interrupts

2021-07-01 Thread Cédric Le Goater
-by: Cédric Le Goater --- arch/powerpc/kvm/book3s_xive.c | 3 ++- kernel/irq/irqdomain.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c index 434da541a20b..d30eb35cc7f0 100644 --- a/arch/powerpc/kvm

[PATCH v2 17/32] powerpc/xics: Rename the map handler in a check handler

2021-07-01 Thread Cédric Le Goater
-off-by: Cédric Le Goater --- arch/powerpc/include/asm/xics.h| 3 ++- arch/powerpc/sysdev/xics/ics-native.c | 13 +--- arch/powerpc/sysdev/xics/ics-opal.c| 27 + arch/powerpc/sysdev/xics/ics-rtas.c| 28 +- arch/powerpc/sysdev

[PATCH v2 20/32] powerpc/xics: Add support for IRQ domain hierarchy

2021-07-01 Thread Cédric Le Goater
XICS doesn't have any state associated with the IRQ. The support is straightforward and simpler than for XIVE. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/xics-common.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/arch/powerpc/sysdev/xics/xics

[PATCH v2 19/32] powerpc/xics: Add debug logging to the set_irq_affinity handlers

2021-07-01 Thread Cédric Le Goater
It really helps to know how the HW is configured when tweaking the IRQ subsystem. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/ics-opal.c | 2 +- arch/powerpc/sysdev/xics/ics-rtas.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/xics

[PATCH v2 29/32] powerpc/powernv/pci: Rework pnv_opal_pci_msi_eoi()

2021-07-01 Thread Cédric Le Goater
from the pnv_phb struct. Cc: Alexey Kardashevskiy Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/pnv-pci.h| 2 +- arch/powerpc/kvm/book3s_hv_rm_xics.c | 8 arch/powerpc/platforms/powernv/pci-ioda.c | 17 + 3 files changed, 18 insertions

[PATCH v2 25/32] powerpc/powernv/pci: Drop unused MSI code

2021-07-01 Thread Cédric Le Goater
MSIs should be fully managed by the PCI and IRQ subsystems now. Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci.h | 6 -- arch/powerpc/platforms/powernv/pci-ioda.c | 27 - arch/powerpc/platforms/powernv/pci.c | 67 --- 3 files

[PATCH v2 09/32] powerpc/pseries/pci: Add a msi_free() handler to clear XIVE data

2021-07-01 Thread Cédric Le Goater
irq_domain_free_irqs_top() when the handler data is still available. Use that to clear the XIVE controller data. Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/xive.h | 1 + arch/powerpc/platforms/pseries/msi.c | 16 +++- arch/powerpc/sysdev/xive/common.c| 5 - 3 files

[PATCH v2 27/32] powerpc/xics: Fix IRQ migration

2021-07-01 Thread Cédric Le Goater
desc->irq_data points to the top level IRQ data descriptor which is not necessarily in the XICS IRQ domain. MSIs are in another domain for instance. Fix that by looking for a mapping on the low level XICS IRQ domain. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/xics-common.c

[PATCH v2 14/32] KVM: PPC: Book3S HV: XIVE: Change interface of passthrough interrupt routines

2021-07-01 Thread Cédric Le Goater
The routine kvmppc_set_passthru_irq() calls kvmppc_xive_set_mapped() and kvmppc_xive_clr_mapped() with an IRQ descriptor. Use directly the host IRQ number to remove a useless conversion. Add some debug. Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/kvm_ppc.h | 4 ++-- arch

[PATCH v2 26/32] powerpc/powernv/pci: Adapt is_pnv_opal_msi() to detect passthrough interrupt

2021-07-01 Thread Cédric Le Goater
The pnv_ioda2_msi_eoi() chip handler is not used anymore for MSIs. Simply use the check on the PSI-MSI chip. Cc: Alexey Kardashevskiy Signed-off-by: Cédric Le Goater --- arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc

[PATCH v2 23/32] powerpc/xics: Drop unmask of MSIs at startup

2021-07-01 Thread Cédric Le Goater
That was a workaround in the XICS domain because of the lack of MSI domain. This is now handled. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/ics-opal.c | 11 --- arch/powerpc/sysdev/xics/ics-rtas.c | 9 - 2 files changed, 20 deletions(-) diff --git a/arch

  1   2   3   4   5   6   7   8   9   >