Re: [PATCH v6 38/48] KVM: PPC: Book3S HV: Remove support for dependent threads mode on P9

2021-04-06 Thread Paul Mackerras
On Mon, Apr 05, 2021 at 11:19:38AM +1000, Nicholas Piggin wrote: > Radix guest support will be removed from the P7/8 path, so disallow > dependent threads mode on P9. Dependent threads mode on P9 was added in order to support the mode where for security reasons you want to restrict the vcpus that

[PATCH v2 4/4] powerpc/selftests: Add selftest to test concurrent perf/ptrace events

2021-04-06 Thread Ravi Bangoria
ptrace and perf watchpoints can't co-exists if their address range overlaps. See commit 29da4f91c0c1 ("powerpc/watchpoint: Don't allow concurrent perf and ptrace events") for more detail. Add selftest for the same. Sample o/p: # ./ptrace-perf-hwbreak test: ptrace-perf-hwbreak tags: git_versi

[PATCH v2 3/4] powerpc/selftests/perf-hwbreak: Add testcases for 2nd DAWR

2021-04-06 Thread Ravi Bangoria
Extend perf-hwbreak.c selftest to test multiple DAWRs. Also add testcase for testing 512 byte boundary removal. Sample o/p: # ./perf-hwbreak ... TESTED: Process specific, Two events, diff addr TESTED: Process specific, Two events, same addr TESTED: Process specific, Two events, diff addr

[PATCH v2 2/4] powerpc/selftests/perf-hwbreak: Coalesce event creation code

2021-04-06 Thread Ravi Bangoria
perf-hwbreak selftest opens hw-breakpoint event at multiple places for which it has same code repeated. Coalesce that code into a function. Signed-off-by: Ravi Bangoria --- .../selftests/powerpc/ptrace/perf-hwbreak.c | 78 +-- 1 file changed, 38 insertions(+), 40 deletions(-)

[PATCH v2 1/4] powerpc/selftests/ptrace-hwbreak: Add testcases for 2nd DAWR

2021-04-06 Thread Ravi Bangoria
Add selftests to test multiple active DAWRs with ptrace interface. Sample o/p: $ ./ptrace-hwbreak ... PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DW ALIGNED, WO, len: 6: Ok PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DW UNALIGNED, RO, len: 6: Ok PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DAWR Overlap, WO, l

[PATCH v2 0/4] powerpc/selftests: Add Power10 2nd DAWR selftests

2021-04-06 Thread Ravi Bangoria
Add selftests for 2nd DAWR supported by Power10. v1: https://lore.kernel.org/r/20200723102058.312282-1-ravi.bango...@linux.ibm.com v1->v2: - Kvm patches are already upstream - Rebased selftests to powerpc/next Ravi Bangoria (4): powerpc/selftests/ptrace-hwbreak: Add testcases for 2nd DAWR

[PATCH 16/20] kbuild: powerpc: use common install script

2021-04-06 Thread Greg Kroah-Hartman
The common scripts/install.sh script will now work for powerpc, all that is needed is to add it to the list of arches that do not put the version number in the installed file name. After the kernel is installed, powerpc also likes to install a few random files, so provide the ability to do that as

[PATCH] powerpc/mce: save ignore_event flag unconditionally for UE

2021-04-06 Thread Ganesh Goudar
When we hit an UE while using machine check safe copy routines, ignore_event flag is set and the event is ignored by mce handler, And the flag is also saved for defered handling and printing of mce event information, But as of now saving of this flag is done on checking if the effective address is

Re: [PATCH net-next v3 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Florian Fainelli
On 4/6/2021 3:09 PM, Michael Walle wrote: > of_get_mac_address() already supports fetching the MAC address by an > nvmem provider. But until now, it was just working for platform devices. > Esp. it was not working for DSA ports and PCI devices. It gets more > common that PCI devices have a devic

Re: [PATCH 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Rob Herring
On Mon, Apr 5, 2021 at 11:47 AM Michael Walle wrote: > > of_get_mac_address() already supports fetching the MAC address by an > nvmem provider. But until now, it was just working for platform devices. > Esp. it was not working for DSA ports and PCI devices. It gets more > common that PCI devices h

RE: [PATCH v6] soc: fsl: enable acpi support in RCPM driver

2021-04-06 Thread Leo Li
> -Original Message- > From: Ran Wang > Sent: Tuesday, April 6, 2021 8:32 PM > To: Leo Li > Cc: Christophe Leroy ; linuxppc-dev > ; moderated list:ARM/FREESCALE IMX / MXC > ARM ARCHITECTURE ; lkml ker...@vger.kernel.org> > Subject: RE: [PATCH v6] soc: fsl: enable acpi support in RCPM d

RE: [PATCH v6] soc: fsl: enable acpi support in RCPM driver

2021-04-06 Thread Ran Wang
Hi Leo, On Wednesday, April 7, 2021 5:45 AM, Li Yang wrote: > > On Fri, Mar 12, 2021 at 2:56 AM Ran Wang wrote: > > > > From: Peng Ma > > > > This patch enables ACPI support in RCPM driver. > > > > Signed-off-by: Peng Ma > > Signed-off-by: Ran Wang > > --- > > Change in v6: > > - Remove copy

Re: [OpenRISC] [PATCH v6 1/9] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-04-06 Thread Stafford Horne
On Wed, Apr 07, 2021 at 12:51:56AM +0800, Boqun Feng wrote: > Hi, > > On Wed, Mar 31, 2021 at 02:30:32PM +, guo...@kernel.org wrote: > > From: Guo Ren > > > > Some architectures don't have sub-word swap atomic instruction, > > they only have the full word's one. > > > > The sub-word swap on

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Wei Liu
On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > kernel.h is being used as a dump for all kinds of stuff for a long time. > Here is the attempt to start cleaning it up by splitting out panic and > oops helpers. > > At the same time convert users in header and lib folder to use ne

[PATCH net-next v3 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-06 Thread Michael Walle
of_get_mac_address() returns a "const void*" pointer to a MAC address. Lately, support to fetch the MAC address by an NVMEM provider was added. But this will only work with platform devices. It will not work with PCI devices (e.g. of an integrated root complex) and esp. not with DSA ports. There i

[PATCH net-next v3 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Michael Walle
of_get_mac_address() already supports fetching the MAC address by an nvmem provider. But until now, it was just working for platform devices. Esp. it was not working for DSA ports and PCI devices. It gets more common that PCI devices have a device tree binding since SoCs contain integrated root com

[PATCH net-next v3 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-06 Thread Michael Walle
of_get_mac_address() is commonly used to fetch the MAC address from the device tree. It also supports reading it from a NVMEM provider. But the latter is only possible for platform devices, because only platform devices are searched for a matching device node. Add a second method to fetch the NVME

[PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-06 Thread Michael Walle
of_get_mac_address() returns a "const void*" pointer to a MAC address. Lately, support to fetch the MAC address by an NVMEM provider was added. But this will only work with platform devices. It will not work with PCI devices (e.g. of an integrated root complex) and esp. not with DSA ports. There i

[PATCH net-next v2 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Michael Walle
of_get_mac_address() already supports fetching the MAC address by an nvmem provider. But until now, it was just working for platform devices. Esp. it was not working for DSA ports and PCI devices. It gets more common that PCI devices have a device tree binding since SoCs contain integrated root com

[PATCH net-next v2 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-06 Thread Michael Walle
of_get_mac_address() is commonly used to fetch the MAC address from the device tree. It also supports reading it from a NVMEM provider. But the latter is only possible for platform devices, because only platform devices are searched for a matching device node. Add a second method to fetch the NVME

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Corey Minyard
On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > kernel.h is being used as a dump for all kinds of stuff for a long time. > Here is the attempt to start cleaning it up by splitting out panic and > oops helpers. > > At the same time convert users in header and lib folder to use ne

Re: [PATCH v1 0/3] Remove qe_io{read,write}* IO accessors

2021-04-06 Thread Li Yang
On Sat, Mar 6, 2021 at 12:11 PM Christophe Leroy wrote: > > Commit 6ac9b61786cc ("soc: fsl: qe: introduce qe_io{read,write}* > wrappers") added specific I/O accessors for qe because at that > time ioread/iowrite functions were sub-optimal on powerpc/32 > compared to the architecture specific in_/o

[PATCH v2] KVM: PPC: Book3S HV: Sanitise vcpu registers in nested path

2021-04-06 Thread Fabiano Rosas
As one of the arguments of the H_ENTER_NESTED hypercall, the nested hypervisor (L1) prepares a structure containing the values of various hypervisor-privileged registers with which it wants the nested guest (L2) to run. Since the nested HV runs in supervisor mode it needs the host to write to these

Re: [PATCH v6] soc: fsl: enable acpi support in RCPM driver

2021-04-06 Thread Li Yang
On Fri, Mar 12, 2021 at 2:56 AM Ran Wang wrote: > > From: Peng Ma > > This patch enables ACPI support in RCPM driver. > > Signed-off-by: Peng Ma > Signed-off-by: Ran Wang > --- > Change in v6: > - Remove copyright udpate to rebase on latest mainline > > Change in v5: > - Fix panic when dev->o

Re: [PATCH 1/2] vfio/pci: remove vfio_pci_nvlink2

2021-04-06 Thread Alex Williamson
On Fri, 26 Mar 2021 07:13:10 +0100 Christoph Hellwig wrote: > This driver never had any open userspace (which for VFIO would include > VM kernel drivers) that use it, and thus should never have been added > by our normal userspace ABI rules. > > Signed-off-by: Christoph Hellwig > Acked-by: Greg

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Kees Cook
On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > kernel.h is being used as a dump for all kinds of stuff for a long time. > Here is the attempt to start cleaning it up by splitting out panic and > oops helpers. > > At the same time convert users in header and lib folder to use ne

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

2021-04-06 Thread Laurent Dufour
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 node, this seems to application like if these CPUs have migrated from a node to another one which is not expected in real lif

Re: [PATCH v4 19/20] mips: Convert to GENERIC_CMDLINE

2021-04-06 Thread Daniel Walker
On Fri, Apr 02, 2021 at 03:18:21PM +, Christophe Leroy wrote: > -config CMDLINE_BOOL > - bool "Built-in kernel command line" > - help > - For most systems, it is firmware or second stage bootloader that > - by default specifies the kernel command line options. However, > -

Re: [PATCH v4 00/20] Implement GENERIC_CMDLINE

2021-04-06 Thread Daniel Walker
On Fri, Apr 02, 2021 at 03:18:01PM +, Christophe Leroy wrote: > The purpose of this series is to improve and enhance the > handling of kernel boot arguments. > > Current situation is that most if not all architectures are using > similar options to do some manupulation on command line argument

Re: [PATCH v6 1/9] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-04-06 Thread Boqun Feng
Hi, On Wed, Mar 31, 2021 at 02:30:32PM +, guo...@kernel.org wrote: > From: Guo Ren > > Some architectures don't have sub-word swap atomic instruction, > they only have the full word's one. > > The sub-word swap only improve the performance when: > NR_CPUS < 16K > * 0- 7: locked byte > *

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Luis Chamberlain
On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > diff --git a/include/linux/panic_notifier.h b/include/linux/panic_notifier.h > new file mode 100644 > index ..41e32483d7a7 > --- /dev/null > +++ b/include/linux/panic_notifier.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Iden

Re: [PATCH 6/8] drivers: firmware: efi: libstub: enable generic commandline

2021-04-06 Thread Daniel Walker
On Fri, Apr 02, 2021 at 07:36:53PM +0200, Christophe Leroy wrote: > > > Le 30/03/2021 à 19:57, Daniel Walker a écrit : > > This adds code to handle the generic command line changes. > > The efi code appears that it doesn't benefit as much from this design > > as it could. > > > > For example, if

Re: [PATCH 4/8] CMDLINE: powerpc: convert to generic builtin command line

2021-04-06 Thread Daniel Walker
On Fri, Apr 02, 2021 at 07:34:19PM +0200, Christophe Leroy wrote: > > > Le 30/03/2021 à 19:56, Daniel Walker a écrit : > > This updates the powerpc code to use the CONFIG_GENERIC_CMDLINE > > option. > > > > This includes a scripted mass convert of the config files to use > > the new generic cmdl

Re: [PATCH 2/8] CMDLINE: drivers: of: ifdef out cmdline section

2021-04-06 Thread Daniel Walker
On Fri, Apr 02, 2021 at 07:32:08PM +0200, Christophe Leroy wrote: > > > Le 30/03/2021 à 19:56, Daniel Walker a écrit : > > It looks like there's some seepage of cmdline stuff into > > the generic device tree code. This conflicts with the > > generic cmdline implementation so I remove it in the ca

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-04-06 Thread Daniel Walker
On Thu, Apr 01, 2021 at 03:08:04PM -0500, Rob Herring wrote: > On Tue, Mar 30, 2021 at 6:31 PM Daniel Walker wrote: > > > > On Tue, Mar 30, 2021 at 03:13:04PM -0500, Rob Herring wrote: > > > On Tue, Mar 30, 2021 at 12:33 PM Daniel Walker wrote: > > > > > > > > On Thu, Mar 25, 2021 at 05:29:44PM -

Re: [PATCH] powerpc/perf: prevent mixed EBB and non-EBB events

2021-04-06 Thread Athira Rajeev
> On 05-Mar-2021, at 11:20 AM, Athira Rajeev > wrote: > > > >> On 24-Feb-2021, at 5:51 PM, Thadeu Lima de Souza Cascardo >> wrote: >> >> EBB events must be under exclusive groups, so there is no mix of EBB and >> non-EBB events on the same PMU. This requirement worked fine as perf core >

[PATCH] powerpc/perf: Fix PMU constraint check for EBB events

2021-04-06 Thread Athira Rajeev
The power PMU group constraints includes check for EBB events to make sure all events in a group must agree on EBB. This will prevent scheduling EBB and non-EBB events together. But in the existing check, settings for constraint mask and value is interchanged. Patch fixes the same. Before the patc

Re: [PATCH] swim3: support highmem

2021-04-06 Thread Jens Axboe
On 4/6/21 12:18 AM, Christoph Hellwig wrote: > swim3 only uses the virtual address of a bio to stash it into the data > transfer using virt_to_bus. But the ppc32 virt_to_bus just uses the > physical address with an offset. Replace virt_to_bus with a local hack > that performs the equivalent trans

Re: [PATCH printk v2 2/5] printk: remove safe buffers

2021-04-06 Thread Petr Mladek
On Fri 2021-04-02 11:14:18, Sergey Senozhatsky wrote: > On (21/04/01 16:17), Petr Mladek wrote: > > > For the long term, we should introduce a printk-context API that allows > > > callers to perfectly pack their multi-line output into a single > > > entry. We discussed [0][1] this back in August 20

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Arnd Bergmann
On Tue, Apr 6, 2021 at 3:31 PM Andy Shevchenko wrote: > > kernel.h is being used as a dump for all kinds of stuff for a long time. > Here is the attempt to start cleaning it up by splitting out panic and > oops helpers. > > At the same time convert users in header and lib folder to use new header.

[PATCH] powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC

2021-04-06 Thread Athira Rajeev
Running perf fuzzer showed below in dmesg logs: "Can't find PMC that caused IRQ" This means a PMU exception happened, but none of the PMC's (Performance Monitor Counter) were found to be overflown. There are some corner cases that clears the PMCs after PMI gets masked. In such cases, the perf inte

[PATCH] powerpc/perf: Clear pending PMI in ppmu callbacks

2021-04-06 Thread Athira Rajeev
Running perf fuzzer testsuite popped up below messages in the dmesg logs: "Can't find PMC that caused IRQ" This means a PMU exception happened, but none of the PMC's (Performance Monitor Counter) were found to be overflown. Perf interrupt handler checks the PMC's to see which PMC has overflown an

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Christian Brauner
On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > kernel.h is being used as a dump for all kinds of stuff for a long time. > Here is the attempt to start cleaning it up by splitting out panic and > oops helpers. > > At the same time convert users in header and lib folder to use ne

Re: [PATCH] powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC

2021-04-06 Thread Athira Rajeev
Hi, Cover letter is missing in this patch. I will resent the patch along with cover letter. Sorry for the noise. Thanks, Athira > On 06-Apr-2021, at 7:44 PM, Athira Rajeev wrote: > > Running perf fuzzer showed below in dmesg logs: > "Can't find PMC that caused IRQ" > > This means a PMU excep

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Mike Rapoport
On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > kernel.h is being used as a dump for all kinds of stuff for a long time. > Here is the attempt to start cleaning it up by splitting out panic and > oops helpers. > > At the same time convert users in header and lib folder to use ne

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Bjorn Andersson
On Tue 06 Apr 08:31 CDT 2021, Andy Shevchenko wrote: > kernel.h is being used as a dump for all kinds of stuff for a long time. > Here is the attempt to start cleaning it up by splitting out panic and > oops helpers. > > At the same time convert users in header and lib folder to use new header. >

[PATCH] powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC

2021-04-06 Thread Athira Rajeev
Running perf fuzzer showed below in dmesg logs: "Can't find PMC that caused IRQ" This means a PMU exception happened, but none of the PMC's (Performance Monitor Counter) were found to be overflown. There are some corner cases that clears the PMCs after PMI gets masked. In such cases, the perf inte

[PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Andy Shevchenko
kernel.h is being used as a dump for all kinds of stuff for a long time. Here is the attempt to start cleaning it up by splitting out panic and oops helpers. At the same time convert users in header and lib folder to use new header. Though for time being include new header back to kernel.h to avoi

Re: [PATCH v6 30/48] KVM: PPC: Book3S HV P9: Implement the rest of the P9 path in C

2021-04-06 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of April 6, 2021 7:12 pm: > Excerpts from Paul Mackerras's message of April 6, 2021 5:27 pm: >> On Mon, Apr 05, 2021 at 11:19:30AM +1000, Nicholas Piggin wrote: >>> Almost all logic is moved to C, by introducing a new in_guest mode for >>> the P9 path that br

Re: [PATCH 4/9] sh: intc: Drop the use of irq_create_identity_mapping()

2021-04-06 Thread Marc Zyngier
On Tue, 06 Apr 2021 11:32:13 +0100, Geert Uytterhoeven wrote: > > Hi Marc, > > On Tue, Apr 6, 2021 at 11:44 AM Marc Zyngier wrote: > > Instead of playing games with using irq_create_identity_mapping() > > and irq_domain_associate(), drop the use of the former and only > > use the latter, togeth

Re: [PATCH 1/9] irqdomain: Reimplement irq_linear_revmap() with irq_find_mapping()

2021-04-06 Thread Marc Zyngier
Christophe, On Tue, 06 Apr 2021 12:21:33 +0100, Christophe Leroy wrote: > > > > Le 06/04/2021 à 11:35, Marc Zyngier a écrit : > > irq_linear_revmap() is supposed to be a fast path for domain > > lookups, but it only exposes low-level details of the irqdomain > > implementation, details which a

Re: [PATCH 6/9] mips: netlogic: Use irq_domain_simple_ops for XLP PIC

2021-04-06 Thread Thomas Bogendoerfer
On Tue, Apr 06, 2021 at 10:35:54AM +0100, Marc Zyngier wrote: > Use the generic irq_domain_simple_ops structure instead of > a home-grown one. > > Signed-off-by: Marc Zyngier > --- > arch/mips/netlogic/common/irq.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) Acked-by: Thomas Bo

Re: [PATCH 1/9] irqdomain: Reimplement irq_linear_revmap() with irq_find_mapping()

2021-04-06 Thread Christophe Leroy
Le 06/04/2021 à 11:35, Marc Zyngier a écrit : irq_linear_revmap() is supposed to be a fast path for domain lookups, but it only exposes low-level details of the irqdomain implementation, details which are better kept private. Can you elaborate with more details ? The *overhead* between th

Re: [PATCH printk v2 2/5] printk: remove safe buffers

2021-04-06 Thread John Ogness
On 2021-04-01, Petr Mladek wrote: >> Caller-id solves this problem and is easy to sort for anyone with >> `grep'. Yes, it is a shame that `dmesg' does not show it, but >> directly using any of the printk interfaces does show it (kmsg_dump, >> /dev/kmsg, syslog, console). > > True but frankly, the

Re: [PATCH 4/9] sh: intc: Drop the use of irq_create_identity_mapping()

2021-04-06 Thread Geert Uytterhoeven
Hi Marc, On Tue, Apr 6, 2021 at 11:44 AM Marc Zyngier wrote: > Instead of playing games with using irq_create_identity_mapping() > and irq_domain_associate(), drop the use of the former and only > use the latter, together with the allocation of the irq_desc > as needed. > > It doesn't make the co

[PATCH v1 1/2] powerpc/inst: ppc_inst_as_u64() becomes ppc_inst_as_ulong()

2021-04-06 Thread Christophe Leroy
In order to simplify use on PPC32, change ppc_inst_as_u64() into ppc_inst_as_ulong() that returns the 32 bits instruction on PPC32. Will be used when porting OPTPROBES to PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 13 +++-- arch/powerpc/kernel/optprobe

[PATCH v1 2/2] powerpc: Enable OPTPROBES on PPC32

2021-04-06 Thread Christophe Leroy
For that, create a 32 bits version of patch_imm64_load_insns() and create a patch_imm_load_insns() which calls patch_imm32_load_insns() on PPC32 and patch_imm64_load_insns() on PPC64. Adapt optprobes_head.S for PPC32. Use PPC_LL/PPC_STL macros instead of raw ld/std, opt out things linked to paca a

[PATCH 9/9] irqdomain: Kill irq_domain_add_legacy_isa

2021-04-06 Thread Marc Zyngier
This helper doesn't have a user anymore, let's remove it. Signed-off-by: Marc Zyngier --- Documentation/core-api/irq/irq-domain.rst | 1 - include/linux/irqdomain.h | 11 --- 2 files changed, 12 deletions(-) diff --git a/Documentation/core-api/irq/irq-domain.rst b/Docu

[PATCH 8/9] powerpc: Convert irq_domain_add_legacy_isa use to irq_domain_add_legacy

2021-04-06 Thread Marc Zyngier
irq_domain_add_legacy_isa is a pain. It only exists for the benefit of two PPC-specific drivers, and creates an ugly dependency between asm/irq.h and linux/irqdomain.h Instead, let's convert these two drivers to irq_domain_add_legacy(), stop using NUM_ISA_INTERRUPTS by directly setting NR_IRQS_LEG

[PATCH 5/9] irqdomain: Kill irq_create_strict_mappings()/irq_create_identity_mapping()

2021-04-06 Thread Marc Zyngier
No user of these APIs are left, remove them. Signed-off-by: Marc Zyngier --- include/linux/irqdomain.h | 9 - kernel/irq/irqdomain.c| 35 --- 2 files changed, 44 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index b9

[PATCH 7/9] irqdomain: Drop references to recusive irqdomain setup

2021-04-06 Thread Marc Zyngier
It was never completely implemented, and was removed a long time ago. Adjust the documentation to reflect this. Signed-off-by: Marc Zyngier --- kernel/irq/irqdomain.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index

[PATCH 6/9] mips: netlogic: Use irq_domain_simple_ops for XLP PIC

2021-04-06 Thread Marc Zyngier
Use the generic irq_domain_simple_ops structure instead of a home-grown one. Signed-off-by: Marc Zyngier --- arch/mips/netlogic/common/irq.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/mips/netlogic/common/irq.c b/arch/mips/netlogic/common/irq.c index cf33dd8a48

[PATCH 4/9] sh: intc: Drop the use of irq_create_identity_mapping()

2021-04-06 Thread Marc Zyngier
Instead of playing games with using irq_create_identity_mapping() and irq_domain_associate(), drop the use of the former and only use the latter, together with the allocation of the irq_desc as needed. It doesn't make the code less awful, but at least the intent is clearer. Signed-off-by: Marc Zy

[PATCH 0/9] Cleaning up some of the irqdomain features

2021-04-06 Thread Marc Zyngier
The irqdomain subsystem has grown quite a lot over the years, and some of its features are either oddly used or just pretty useless. Some other helpers expose internals that are likely to change soon. Here are the bits that I'm trying to get rid of: - irq_linear_revmap exposes the internals of th

[PATCH 1/9] irqdomain: Reimplement irq_linear_revmap() with irq_find_mapping()

2021-04-06 Thread Marc Zyngier
irq_linear_revmap() is supposed to be a fast path for domain lookups, but it only exposes low-level details of the irqdomain implementation, details which are better kept private. The *overhead* between the two is only a function call and a couple of tests, so it is likely that noone can show any

[PATCH 3/9] irqchip/jcore-aic: Kill use of irq_create_strict_mappings()

2021-04-06 Thread Marc Zyngier
irq_create_strict_mappings() is a poor way to allow the use of a linear IRQ domain as a legacy one. Let's be upfront about it. Signed-off-by: Marc Zyngier --- drivers/irqchip/irq-jcore-aic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-jcore-aic.c b

[PATCH 2/9] ARM: PXA: Kill use of irq_create_strict_mappings()

2021-04-06 Thread Marc Zyngier
irq_create_strict_mappings() is a poor way to allow the use of a linear IRQ domain as a legacy one. Let's be upfront about it and use a legacy domain when appropriate. Signed-off-by: Marc Zyngier --- arch/arm/mach-pxa/pxa_cplds_irqs.c | 24 +++- 1 file changed, 11 insertions(

Re: [PATCH v6 30/48] KVM: PPC: Book3S HV P9: Implement the rest of the P9 path in C

2021-04-06 Thread Nicholas Piggin
Excerpts from Paul Mackerras's message of April 6, 2021 5:27 pm: > On Mon, Apr 05, 2021 at 11:19:30AM +1000, Nicholas Piggin wrote: >> Almost all logic is moved to C, by introducing a new in_guest mode for >> the P9 path that branches very early in the KVM interrupt handler to >> P9 exit code. >>

Re: [PATCH v6 6/9] openrisc: qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-04-06 Thread Stafford Horne
On Wed, Mar 31, 2021 at 02:30:37PM +, guo...@kernel.org wrote: > From: Guo Ren > > We don't have native hw xchg16 instruction, so let qspinlock > generic code to deal with it. > > Using the full-word atomic xchg instructions implement xchg16 has > the semantic risk for atomic operations. >

Re: [PATCH v6 30/48] KVM: PPC: Book3S HV P9: Implement the rest of the P9 path in C

2021-04-06 Thread Paul Mackerras
On Mon, Apr 05, 2021 at 11:19:30AM +1000, Nicholas Piggin wrote: > Almost all logic is moved to C, by introducing a new in_guest mode for > the P9 path that branches very early in the KVM interrupt handler to > P9 exit code. > > The main P9 entry and exit assembly is now only about 160 lines of lo

Re: [PATCH v6 16/48] KVM: PPC: Book3S 64: Move interrupt early register setup to KVM

2021-04-06 Thread Nicholas Piggin
Excerpts from Paul Mackerras's message of April 6, 2021 2:37 pm: > On Mon, Apr 05, 2021 at 11:19:16AM +1000, Nicholas Piggin wrote: >> Like the earlier patch for hcalls, KVM interrupt entry requires a >> different calling convention than the Linux interrupt handlers >> set up. Move the code that co