[PATCH v4] dt-bindings: misc: convert fsl,qoriq-mc from txt to YAML

2020-11-23 Thread Laurentiu Tudor
From: Ionut-robert Aron Convert fsl,qoriq-mc to YAML in order to automate the verification process of dts files. In addition, update MAINTAINERS accordingly and, while at it, add some missing files. Signed-off-by: Ionut-robert Aron [laurentiu.tu...@nxp.com: update MINTAINERS, updates & fixes in

[PATCH] powerpc/perf: Fix crash with 'is_sier_available' when pmu is not set

2020-11-23 Thread Athira Rajeev
On systems without any platform specific PMU driver support registered or Generic Compat PMU support registered, running 'perf record' with —intr-regs will crash ( perf record -I ). The relevant portion from crash logs and Call Trace: Unable to handle kernel paging request for data at address 0

Re: [PATCH V2 1/5] ocxl: Assign a register set to a Logical Partition

2020-11-23 Thread Frederic Barrat
On 20/11/2020 18:32, Christophe Lombard wrote: Platform specific function to assign a register set to a Logical Partition. The "ibm,mmio-atsd" property, provided by the firmware, contains the 16 base ATSD physical addresses (ATSD0 through ATSD15) of the set of MMIO registers (XTS MMIO ATSDx LP

Re: [PATCH V2 2/5] ocxl: Initiate a TLB invalidate command

2020-11-23 Thread Frederic Barrat
On 20/11/2020 18:32, Christophe Lombard wrote: When a TLB Invalidate is required for the Logical Partition, the following sequence has to be performed: 1. Load MMIO ATSD AVA register with the necessary value, if required. 2. Write the MMIO ATSD launch register to initiate the TLB Invalidate

Re: [PATCH V2 3/5] ocxl: Update the Process Element Entry

2020-11-23 Thread Frederic Barrat
On 20/11/2020 18:32, Christophe Lombard wrote: To complete the MMIO based mechanism, the fields: PASID, bus, device and function of the Process Element Entry have to be filled. (See OpenCAPI Power Platform Architecture document) Hypervisor Process Element Entry Word 0

Re: [PATCH V2 4/5] ocxl: Add mmu notifier

2020-11-23 Thread Frederic Barrat
On 20/11/2020 18:32, Christophe Lombard wrote: Add invalidate_range mmu notifier, when required (ATSD access of MMIO registers is available), to initiate TLB invalidation commands. For the time being, the ATSD0 set of registers is used by default. The pasid and bdf values have to be configure

Re: [PATCH] powerpc/perf: Fix crash with 'is_sier_available' when pmu is not set

2020-11-23 Thread Sachin Sant
> When perf record session started with "-I" option, capture registers > via intr-regs, on each sample ‘is_sier_available()'i is called to check > for the SIER ( Sample Instruction Event Register) availability in the > platform. This function in core-book3s access 'ppmu->flags'. If platform > speci

Re: [PATCH 1/3] perf/core: Flush PMU internal buffers for per-CPU events

2020-11-23 Thread Michael Ellerman
Namhyung Kim writes: > Hi Peter and Kan, > > (Adding PPC folks) > > On Tue, Nov 17, 2020 at 2:01 PM Namhyung Kim wrote: >> >> Hello, >> >> On Thu, Nov 12, 2020 at 4:54 AM Liang, Kan wrote: >> > >> > >> > >> > On 11/11/2020 11:25 AM, Peter Zijlstra wrote: >> > > On Mon, Nov 09, 2020 at 09:49:31AM

Re: [PATCH] powerpc/perf: Fix crash with 'is_sier_available' when pmu is not set

2020-11-23 Thread Michael Ellerman
Hi Athira, Athira Rajeev writes: > On systems without any platform specific PMU driver support registered or > Generic Compat PMU support registered, The compat PMU is registered just like other PMUs, so I don't see how we can crash like this if the compat PMU is active? ie. if we're using the

Re: [PATCH] powerpc/perf: Fix crash with 'is_sier_available' when pmu is not set

2020-11-23 Thread Athira Rajeev
> On 23-Nov-2020, at 4:49 PM, Michael Ellerman wrote: > > Hi Athira, > > Athira Rajeev writes: >> On systems without any platform specific PMU driver support registered or >> Generic Compat PMU support registered, > > The compat PMU is registered just like other PMUs, so I don't see how we

Re: Linux kernel: powerpc: RTAS calls can be used to compromise kernel integrity

2020-11-23 Thread Andrew Donnellan
On 9/10/20 12:20 pm, Andrew Donnellan wrote: The Linux kernel for powerpc has an issue with the Run-Time Abstraction Services (RTAS) interface, allowing root (or CAP_SYS_ADMIN users) in a VM to overwrite some parts of memory, including kernel memory. This issue impacts guests running on top of

Re: [PATCH v2 04/19] powerpc/perf: move perf irq/nmi handling details into traps.c

2020-11-23 Thread Athira Rajeev
> On 11-Nov-2020, at 3:13 PM, Nicholas Piggin wrote: > > This is required in order to allow more significant differences between > NMI type interrupt handlers and regular asynchronous handlers. > > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/kernel/traps.c | 31 +

Re: [PATCH v3 2/2] powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too

2020-11-23 Thread Oleg Nesterov
Christophe, et al, So what? Are you going to push your change or should I re-send 1-2 without whitespace cleanups? On 11/19, Oleg Nesterov wrote: > > On 11/19, Christophe Leroy wrote: > > > > I think the following should work, and not require the first patch (compile > > tested only). > > > > --

Re: [PATCH v3 3/3] powerpc/64s: feature: Work around inline asm issues

2020-11-23 Thread Segher Boessenkool
(Please don't top-post.) > On Sun, Nov 22, 2020 at 10:36 PM Segher Boessenkool > wrote: > > "true" (as a result of a comparison) in as is -1, not 1. On Mon, Nov 23, 2020 at 11:43:11AM -0800, Bill Wendling wrote: > What Segher said. :-) Also, if you reverse the comparison, you'll get > a build er

Re: [PATCH v3 3/3] powerpc/64s: feature: Work around inline asm issues

2020-11-23 Thread Segher Boessenkool
On Mon, Nov 23, 2020 at 12:01:01PM -0800, Bill Wendling wrote: > On Mon, Nov 23, 2020 at 11:58 AM Segher Boessenkool > wrote: > > > On Sun, Nov 22, 2020 at 10:36 PM Segher Boessenkool > > > wrote: > > > > "true" (as a result of a comparison) in as is -1, not 1. > > > > On Mon, Nov 23, 2020 at 11:

Re: linux-next: build failure in Linus' tree

2020-11-23 Thread Michael Ellerman
On Mon, 23 Nov 2020 18:40:16 +1100, Stephen Rothwell wrote: > After merging most of the trees, today's linux-next build (powerpc64 > allnoconfig) failed like this: > > In file included from arch/powerpc/include/asm/kup.h:18, > from arch/powerpc/include/asm/uaccess.h:9, >

Re: linux-next: build failure in Linus' tree

2020-11-23 Thread Daniel Axtens
Thanks sfr and mpe. > Applied to powerpc/fixes. > > [1/1] powerpc/64s: Fix allnoconfig build since uaccess flush > > https://git.kernel.org/powerpc/c/b6b79dd53082db11070b4368d85dd6699ff0b063 We also needed a similar fix for stable, which has also been applied. I guess I should build some

Re: [PATCH 00/25] Rid W=1 warnings in SoC

2020-11-23 Thread Li Yang
On Tue, Nov 3, 2020 at 9:29 AM Lee Jones wrote: > > This set is part of a larger effort attempting to clean-up W=1 > kernel builds, which are currently overwhelmingly riddled with > niggly little warnings. > > Lee Jones (25): > soc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanou

Re: [PATCH 25/25] soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq'

2020-11-23 Thread Li Yang
Hi Roy, On Tue, Nov 3, 2020 at 9:31 AM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/soc/fsl/qbman/qman.c: In function ‘qman_shutdown_fq’: > drivers/soc/fsl/qbman/qman.c:2700:8: warning: variable ‘dequeue_wq’ set but > not used [-Wunused-but-set-variable] >

Re: [PATCH v3 2/2] powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too

2020-11-23 Thread Michael Ellerman
Oleg Nesterov writes: > Christophe, et al, > > So what? > > Are you going to push your change or should I re-send 1-2 without > whitespace cleanups? I'll take your 1 & 2 and fixup the whitespace issues when applying. cheers > On 11/19, Oleg Nesterov wrote: >> >> On 11/19, Christophe Leroy wrote

Re: [PATCH v3] soc: fsl: dpio: Get the cpumask through cpumask_of(cpu)

2020-11-23 Thread Li Yang
On Mon, Oct 19, 2020 at 9:15 PM Yi Wang wrote: > > From: Hao Si > > The local variable 'cpumask_t mask' is in the stack memory, and its address > is assigned to 'desc->affinity' in 'irq_set_affinity_hint()'. > But the memory area where this variable is located is at risk of being > modified. > >

[powerpc:merge] BUILD SUCCESS 7c94b5d4e9d328a69d43a11d7e3dfd7a6d762cb6

2020-11-23 Thread kernel test robot
nfig sparc defconfig i386defconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a00

[powerpc:next-test] BUILD SUCCESS c250581fcf84c34cbaf5b535512b60a5e96970f6

2020-11-23 Thread kernel test robot
randconfig-a004-20201120 x86_64 randconfig-a005-20201120 x86_64 randconfig-a001-20201120 x86_64 randconfig-a002-20201120 i386 randconfig-a004-20201123 i386 randconfig-a003-20201123 i386 randconfig-a002-20201123 i386

[powerpc:fixes-test] BUILD SUCCESS b6b79dd53082db11070b4368d85dd6699ff0b063

2020-11-23 Thread kernel test robot
randconfig-a004-20201123 i386 randconfig-a003-20201123 i386 randconfig-a002-20201123 i386 randconfig-a005-20201123 i386 randconfig-a001-20201123 i386 randconfig-a006-20201123 x86_64 randconfig

[PATCH V2] powerpc/perf: Fix crash with is_sier_available when pmu is not set

2020-11-23 Thread Athira Rajeev
On systems without any specific PMU driver support registered, running 'perf record' with —intr-regs will crash ( perf record -I ). The relevant portion from crash logs and Call Trace: Unable to handle kernel paging request for data at address 0x0068 Faulting instruction address: 0xc000

Re: [PATCH v3 3/3] powerpc/64s: feature: Work around inline asm issues

2020-11-23 Thread Michael Ellerman
Bill Wendling writes: > On Mon, Nov 23, 2020 at 12:10 PM Segher Boessenkool > wrote: >> On Mon, Nov 23, 2020 at 12:01:01PM -0800, Bill Wendling wrote: >> > On Mon, Nov 23, 2020 at 11:58 AM Segher Boessenkool >> > wrote: >> > > > On Sun, Nov 22, 2020 at 10:36 PM Segher Boessenkool >> > > > wrote

Re: [PATCH 1/3] ibmvfc: byte swap login_buf.resp values in attribute show functions

2020-11-23 Thread Martin K. Petersen
On Tue, 17 Nov 2020 12:50:29 -0600, Tyrel Datwyler wrote: > Both ibmvfc_show_host_(capabilities|npiv_version) functions retrieve > values from vhost->login_buf.resp buffer. This is the MAD response > buffer from the VIOS and as such any multi-byte non-string values are in > big endian format. > >

Re: [PATCH 1/3] perf/core: Flush PMU internal buffers for per-CPU events

2020-11-23 Thread Namhyung Kim
Hello, On Mon, Nov 23, 2020 at 8:00 PM Michael Ellerman wrote: > > Namhyung Kim writes: > > Hi Peter and Kan, > > > > (Adding PPC folks) > > > > On Tue, Nov 17, 2020 at 2:01 PM Namhyung Kim wrote: > >> > >> Hello, > >> > >> On Thu, Nov 12, 2020 at 4:54 AM Liang, Kan > >> wrote: > >> > > >> >

Re: [PATCH 1/3] perf/core: Flush PMU internal buffers for per-CPU events

2020-11-23 Thread Madhavan Srinivasan
On 11/24/20 10:21 AM, Namhyung Kim wrote: Hello, On Mon, Nov 23, 2020 at 8:00 PM Michael Ellerman wrote: Namhyung Kim writes: Hi Peter and Kan, (Adding PPC folks) On Tue, Nov 17, 2020 at 2:01 PM Namhyung Kim wrote: Hello, On Thu, Nov 12, 2020 at 4:54 AM Liang, Kan wrote: On 11/11/

Re: [PATCH v3 0/6] ibmvfc: Protocol definition updates and new targetWWPN Support

2020-11-23 Thread Martin K. Petersen
On Tue, 17 Nov 2020 19:10:58 -0600, Tyrel Datwyler wrote: > Several Management Datagrams (MADs) have been reversioned to add a targetWWPN > field that is intended to better identify a target over in place of the > scsi_id. > This patchset adds the new protocol definitions and implements support f

[PATCH kernel v4 2/8] genirq/irqdomain: Clean legacy IRQ allocation

2020-11-23 Thread Alexey Kardashevskiy
There are 10 users of __irq_domain_alloc_irqs() and only one - IOAPIC - passes realloc==true. There is no obvious reason for handling this specific case in the generic code. This splits out __irq_domain_alloc_irqs_data() to make it clear what IOAPIC does and makes __irq_domain_alloc_irqs() cleaner

[PATCH kernel v4 1/8] genirq/ipi: Simplify irq_reserve_ipi

2020-11-23 Thread Alexey Kardashevskiy
__irq_domain_alloc_irqs() can already handle virq==-1 and free descriptors if it failed allocating hardware interrupts so let's skip this extra step. Signed-off-by: Alexey Kardashevskiy --- kernel/irq/ipi.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/ker

[PATCH kernel v4 4/8] genirq: Free IRQ descriptor via embedded kobject

2020-11-23 Thread Alexey Kardashevskiy
At the moment the IRQ descriptor is freed via the free_desc() helper. We want to add reference counting to IRQ descriptors and there is already kobj embedded into irq_desc which we want to reuse. This shuffles free_desc()/etc to make it simply call kobject_put() and moves all the cleanup into the

[PATCH kernel v4 0/8] genirq/irqdomain: Add reference counting to IRQs

2020-11-23 Thread Alexey Kardashevskiy
This is another attempt to add reference counting to IRQ descriptors; or - more to the point - reuse already existing kobj from irq_desc. This allows the same IRQ to be used several times (such as legacy PCI INTx) and when disposing those, only the last reference drop clears the hardware mappings.

[PATCH kernel v4 7/8] genirq/irqdomain: Reference irq_desc for already mapped irqs

2020-11-23 Thread Alexey Kardashevskiy
This references an irq_desc if already mapped interrupt requested to map again. This happends for PCI legacy interrupts where 4 interrupts are shared among all devices on the same PCI host bus adapter. >From now on, the users shall call irq_dispose_mapping() for every irq_create_fwspec_mapping().

[PATCH kernel v4 3/8] genirq/irqdomain: Drop unused realloc parameter from __irq_domain_alloc_irqs

2020-11-23 Thread Alexey Kardashevskiy
The two previous patches made @realloc obsolete. This finishes removing it. Signed-off-by: Alexey Kardashevskiy --- include/linux/irqdomain.h | 4 +--- arch/x86/kernel/apic/io_apic.c | 2 +- drivers/gpio/gpiolib.c | 1 - drivers/irqchip/irq-armada-370-xp.c | 2 +- dri

[PATCH kernel v4 5/8] genirq: Add free_irq hook for IRQ descriptor and use for mapping disposal

2020-11-23 Thread Alexey Kardashevskiy
We want to make the irq_desc.kobj's release hook free associated resources but we do not want to pollute the irqdesc code with domains. This adds a free_irq hook which is called when the last reference to the descriptor is dropped. The first user is mapped irqs. This potentially can break the exi

[PATCH kernel v4 6/8] genirq/irqdomain: Move hierarchical IRQ cleanup to kobject_release

2020-11-23 Thread Alexey Kardashevskiy
This moves hierarchical domain's irqs cleanup into the kobject release hook to make irq_domain_free_irqs() as simple as kobject_put. Signed-off-by: Alexey Kardashevskiy --- kernel/irq/irqdomain.c | 43 +- 1 file changed, 22 insertions(+), 21 deletions(-)

[PATCH kernel v4 8/8] powerpc/pci: Remove LSI mappings on device teardown

2020-11-23 Thread Alexey Kardashevskiy
From: Oliver O'Halloran When a passthrough IO adapter is removed from a pseries machine using hash MMU and the XIVE interrupt mode, the POWER hypervisor expects the guest OS to clear all page table entries related to the adapter. If some are still present, the RTAS call which isolates the PCI slo

Re: [PATCH v2 00/19] Add generic vdso_base tracking

2020-11-23 Thread Christophe Leroy
et is based on linux-next (next-20201123) and it depends on changes in x86/cleanups (those reclaim TIF_IA32/TIF_X32) and also on my changes in akpm (fixing several mremap() issues). I have a series that cleans up VDSO init on powerpc and migrates powerpc to _install_special_mapping() (patch 1

[PATCH] net: fs_enet: Fix incorrect IS_ERR_VALUE macro usages

2020-11-23 Thread Wei Li
IS_ERR_VALUE macro should be used only with unsigned long type. Especially it works incorrectly with unsigned shorter types on 64bit machines. Fixes: 976de6a8c304 ("fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.") Fixes: 4c35630ccda5 ("[POWERPC] Change rheap functions t

[PATCH] net/ethernet/freescale: Fix incorrect IS_ERR_VALUE macro usages

2020-11-23 Thread Wei Li
IS_ERR_VALUE macro should be used only with unsigned long type. Especially it works incorrectly with unsigned shorter types on 64bit machines. Fixes: 4c35630ccda5 ("[POWERPC] Change rheap functions to use ulongs instead of pointers") Signed-off-by: Wei Li --- drivers/net/ethernet/freescale/ucc_