Re: kernel since 5.6 do not boot anymore on Apple PowerBook

2020-07-08 Thread Christophe Leroy
Hi Giuseppe, Le 08/07/2020 à 09:59, Giuseppe Sacco a écrit : Hello Cristophe, Il giorno mar, 07/07/2020 alle 17.34 +0200, Giuseppe Sacco ha scritto: Il giorno mar, 07/07/2020 alle 16.52 +0200, Christophe Leroy ha scritto: Le 07/07/2020 à 16:03, Giuseppe Sacco a écrit : Hello Cristophe,

Re: kernel since 5.6 do not boot anymore on Apple PowerBook

2020-07-08 Thread Giuseppe Sacco
Salut Cristophe, Il giorno mer, 08/07/2020 alle 10.38 +0200, Christophe Leroy ha scritto: > Hi Giuseppe, > > Le 08/07/2020 à 09:59, Giuseppe Sacco a écrit : > > Hello Cristophe, > > > > Il giorno mar, 07/07/2020 alle 17.34 +0200, Giuseppe Sacco ha > > scritto: [...] > > > > And can you try

Re: [PATCH 06/20] Documentation: gpu/komeda-kms: eliminate duplicated word

2020-07-08 Thread james qian wang (Arm Technology China)
On Tue, Jul 07, 2020 at 11:04:00AM -0700, Randy Dunlap wrote: > Drop the doubled word "and". > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: James (Qian) Wang > Cc: Liviu Dudau > Cc: Mihail Atanassov > Cc: Mali DP Maintainers > --- >

Re: kernel since 5.6 do not boot anymore on Apple PowerBook

2020-07-08 Thread Giuseppe Sacco
Hello Cristophe, Il giorno mar, 07/07/2020 alle 17.34 +0200, Giuseppe Sacco ha scritto: > Il giorno mar, 07/07/2020 alle 16.52 +0200, Christophe Leroy ha > scritto: > > Le 07/07/2020 à 16:03, Giuseppe Sacco a écrit : > > > Hello Cristophe, > > > > > > > Can you tell which defconfig you use or

Re: [PATCH v2 4/4] powerpc/mm/radix: Create separate mappings for hot-plugged memory

2020-07-08 Thread Aneesh Kumar K.V
On 7/8/20 10:14 AM, Michael Ellerman wrote: "Aneesh Kumar K.V" writes: To enable memory unplug without splitting kernel page table mapping, we force the max mapping size to the LMB size. LMB size is the unit in which hypervisor will do memory add/remove operation. This implies on pseries

Re: [PATCH v2 07/10] powerpc/perf: support BHRB disable bit and new filtering modes

2020-07-08 Thread Gautham R Shenoy
On Tue, Jul 07, 2020 at 05:17:55PM +1000, Michael Neuling wrote: > On Wed, 2020-07-01 at 05:20 -0400, Athira Rajeev wrote: > > PowerISA v3.1 has few updates for the Branch History Rolling Buffer(BHRB). > > First is the addition of BHRB disable bit and second new filtering > > modes for BHRB. > >

Re: [PATCH v3 0/6] powerpc: queued spinlocks and rwlocks

2020-07-08 Thread Peter Zijlstra
On Tue, Jul 07, 2020 at 03:57:06PM +1000, Nicholas Piggin wrote: > Yes, powerpc could certainly get more performance out of the slow > paths, and then there are a few parameters to tune. Can you clarify? The slow path is already in use on ARM64 which is weak, so I doubt there's superfluous

[PATCH v4 2/2] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask

2020-07-08 Thread Kajol Jain
Patch here adds a cpumask attr to hv_24x7 pmu along with ABI documentation. Primary use to expose the cpumask is for the perf tool which has the capability to parse the driver sysfs folder and understand the cpumask file. Having cpumask file will reduce the number of perf command line parameters

[PATCH v4 1/2] powerpc/perf/hv-24x7: Add cpu hotplug support

2020-07-08 Thread Kajol Jain
Patch here adds cpu hotplug functions to hv_24x7 pmu. A new cpuhp_state "CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE" enum is added. The online callback function updates the cpumask only if its empty. As the primary intention of adding hotplug support is to designate a CPU to make HCALL to collect the

Re: [PATCH v3 1/9] powerpc/watchpoint: Fix 512 byte boundary limit

2020-07-08 Thread Jordan Niethe
On Wed, Jul 8, 2020 at 2:53 PM Ravi Bangoria wrote: > > Milton Miller reported that we are aligning start and end address to > wrong size SZ_512M. It should be SZ_512. Fix that. > > While doing this change I also found a case where ALIGN() comparison > fails. Within a given aligned range, ALIGN()

Re: [PATCH v3 0/6] powerpc: queued spinlocks and rwlocks

2020-07-08 Thread Peter Zijlstra
On Tue, Jul 07, 2020 at 11:33:45PM -0400, Waiman Long wrote: > From 5d7941a498935fb225b2c7a3108cbf590114c3db Mon Sep 17 00:00:00 2001 > From: Waiman Long > Date: Tue, 7 Jul 2020 22:29:16 -0400 > Subject: [PATCH 2/9] locking/pvqspinlock: Introduce > CONFIG_PARAVIRT_QSPINLOCKS_LITE > > Add a new

Re: FSL P5020/P5040: DPAA Ethernet issue with the latest Git kernel

2020-07-08 Thread Christian Zigotzky
On 08 July 2020 at 08:03 am, Madalin Bucur (OSS) wrote: From: Christian Zigotzky Sent: Tuesday, July 7, 2020 9:26 PM To: Madalin Bucur (OSS) Cc: mad skateman ; Camelia Alexandra Groza ; linuxppc-...@ozlabs.org; net...@vger.kernel.org; R.T.Dickinson ; Darren Stevens Subject: Re: FSL

Re: [PATCH v3 1/9] powerpc/watchpoint: Fix 512 byte boundary limit

2020-07-08 Thread Christophe Leroy
Le 08/07/2020 à 09:44, Jordan Niethe a écrit : On Wed, Jul 8, 2020 at 2:53 PM Ravi Bangoria wrote: Milton Miller reported that we are aligning start and end address to wrong size SZ_512M. It should be SZ_512. Fix that. While doing this change I also found a case where ALIGN() comparison

Re: [PATCH 00/20] Documentation: eliminate duplicated words

2020-07-08 Thread Martin K. Petersen
On Tue, 7 Jul 2020 11:03:54 -0700, Randy Dunlap wrote: > Drop doubled words in various parts of Documentation/. > > [...] Applied to 5.9/scsi-queue, thanks! [17/20] scsi: advansys: docs: Eliminate duplicated word https://git.kernel.org/mkp/scsi/c/3010dfb0b77c -- Martin K. Petersen

Re: [PATCH 16/20] Documentation: s390/vfio-ap: eliminate duplicated word

2020-07-08 Thread Pierre Morel
On 2020-07-07 20:04, Randy Dunlap wrote: Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Cc: Tony Krowiak Cc: Pierre Morel Cc: Halil Pasic Cc: linux-s...@vger.kernel.org --- Documentation/s390/vfio-ap.rst |2 +- 1 file

Re: [PATCH v4 2/2] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask

2020-07-08 Thread Madhavan Srinivasan
On 7/8/20 2:29 PM, Kajol Jain wrote: Patch here adds a cpumask attr to hv_24x7 pmu along with ABI documentation. Primary use to expose the cpumask is for the perf tool which has the capability to parse the driver sysfs folder and understand the cpumask file. Having cpumask file will reduce

RE: FSL P5020/P5040: DPAA Ethernet issue with the latest Git kernel

2020-07-08 Thread Madalin Bucur (OSS)
> From: Christian Zigotzky > Sent: Tuesday, July 7, 2020 9:26 PM > To: Madalin Bucur (OSS) > Cc: mad skateman ; Camelia Alexandra Groza > ; > linuxppc-...@ozlabs.org; net...@vger.kernel.org; R.T.Dickinson > ; > Darren Stevens > Subject: Re: FSL P5020/P5040: DPAA Ethernet issue with the

[PATCH] powerpc/64s/exception: Fix 0x1500 interrupt handler crash

2020-07-08 Thread Nicholas Piggin
A typo caused the interrupt handler to branch immediately to the common "unknown interrupt" handler and skip the special case test for denormal cause. This does not affect KVM softpatch handling (e.g., for POWER9 TM assist) because the KVM test was moved to common code by commit 9600f261acaa

[PATCH v4 0/2] Add cpu hotplug support for powerpc/perf/hv-24x7

2020-07-08 Thread Kajol Jain
This patchset add cpu hotplug support for hv_24x7 driver by adding online/offline cpu hotplug function. It also add sysfs file "cpumask" to expose current online cpu that can be used for hv_24x7 event count. Changelog: v3 -> v4 - Make PMU initialization fail incase hotplug init failed. Rather

Re: [PATCH] selftests/powerpc: Purge extra count_pmc() calls of ebb selftests

2020-07-08 Thread Sachin Sant
> On 26-Jun-2020, at 10:17 PM, Desnes A. Nunes do Rosario > wrote: > > An extra count on ebb_state.stats.pmc_count[PMC_INDEX(pmc)] is being per- > formed when count_pmc() is used to reset PMCs on a few selftests. This > extra pmc_count can occasionally invalidate results, such as the ones

Re: [PATCH v2 06/10] powerpc/perf: power10 Performance Monitoring support

2020-07-08 Thread Athira Rajeev
> On 07-Jul-2020, at 12:20 PM, Michael Neuling wrote: > > >> @@ -480,6 +520,7 @@ int isa207_compute_mmcr(u64 event[], int n_ev, >> mmcr[1] = mmcr1; >> mmcr[2] = mmcra; >> mmcr[3] = mmcr2; >> +mmcr[4] = mmcr3; > > This is fragile like the kvm vcpu case I commented on

Re: [PATCH 2/2] KVM: PPC: Book3S HV: rework secure mem slot dropping

2020-07-08 Thread Bharata B Rao
On Fri, Jul 03, 2020 at 05:59:14PM +0200, Laurent Dufour wrote: > When a secure memslot is dropped, all the pages backed in the secure device > (aka really backed by secure memory by the Ultravisor) should be paged out > to a normal page. Previously, this was achieved by triggering the page >

Re: [PATCH v2 4/4] powerpc/mm/radix: Create separate mappings for hot-plugged memory

2020-07-08 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > On 7/8/20 10:14 AM, Michael Ellerman wrote: >> "Aneesh Kumar K.V" writes: >>> To enable memory unplug without splitting kernel page table >>> mapping, we force the max mapping size to the LMB size. LMB >>> size is the unit in which hypervisor will do memory

Re: [PATCH v2 03/10] powerpc/xmon: Add PowerISA v3.1 PMU SPRs

2020-07-08 Thread Michael Ellerman
Athira Rajeev writes: > From: Madhavan Srinivasan > > PowerISA v3.1 added three new perfromance > monitoring unit (PMU) speical purpose register (SPR). > They are Monitor Mode Control Register 3 (MMCR3), > Sampled Instruction Event Register 2 (SIER2), > Sampled Instruction Event Register 3

Re: [PATCH v2 04/10] powerpc/perf: Add power10_feat to dt_cpu_ftrs

2020-07-08 Thread Michael Ellerman
Athira Rajeev writes: > From: Madhavan Srinivasan > > Add power10 feature function to dt_cpu_ftrs.c along > with a power10 specific init() to initialize pmu sprs. > > Signed-off-by: Madhavan Srinivasan > --- > arch/powerpc/include/asm/reg.h| 3 +++ >

Re: [PATCH] selftests/powerpc: Purge extra count_pmc() calls of ebb selftests

2020-07-08 Thread Desnes Augusto Nunes do Rosario
On 7/8/20 7:38 AM, Sachin Sant wrote: On 26-Jun-2020, at 10:17 PM, Desnes A. Nunes do Rosario wrote: An extra count on ebb_state.stats.pmc_count[PMC_INDEX(pmc)] is being per- formed when count_pmc() is used to reset PMCs on a few selftests. This extra pmc_count can occasionally invalidate

Re: [PATCH V4 2/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_alloc_block_buf()

2020-07-08 Thread Catalin Marinas
On Mon, Jul 06, 2020 at 08:26:17AM +0530, Anshuman Khandual wrote: > There are many instances where vmemap allocation is often switched between > regular memory and device memory just based on whether altmap is available > or not. vmemmap_alloc_block_buf() is used in various platforms to allocate

Re: [PATCH v2 07/10] powerpc/perf: support BHRB disable bit and new filtering modes

2020-07-08 Thread Athira Rajeev
> On 07-Jul-2020, at 12:47 PM, Michael Neuling wrote: > > On Wed, 2020-07-01 at 05:20 -0400, Athira Rajeev wrote: >> PowerISA v3.1 has few updates for the Branch History Rolling Buffer(BHRB). >> First is the addition of BHRB disable bit and second new filtering >> modes for BHRB. >> >> BHRB

[PATCH] arch: powerpc: Remove unnecessary cast in kfree()

2020-07-08 Thread Xu Wang
Remove unnecassary casts in the argument to kfree. Signed-off-by: Xu Wang --- arch/powerpc/platforms/pseries/dlpar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index

Re: [PATCH v2 10/10] powerpc/perf: Add extended regs support for power10 platform

2020-07-08 Thread Michael Ellerman
Athira Rajeev writes: > Include capability flag `PERF_PMU_CAP_EXTENDED_REGS` for power10 > and expose MMCR3, SIER2, SIER3 registers as part of extended regs. > Also introduce `PERF_REG_PMU_MASK_31` to define extended mask > value at runtime for power10 > > Signed-off-by: Athira Rajeev > --- >

Re: [PATCH 04/20] Documentation: kgdb: eliminate duplicated word

2020-07-08 Thread Daniel Thompson
On Tue, Jul 07, 2020 at 11:03:58AM -0700, Randy Dunlap wrote: > Drop the doubled word "driver". > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: Jason Wessel > Cc: Daniel Thompson > Cc: Douglas Anderson > Cc: kgdb-bugrep...@lists.sourceforge.net

Re: [PATCH 18/20] Documentation: security/keys: eliminate duplicated word

2020-07-08 Thread Jarkko Sakkinen
On Tue, Jul 07, 2020 at 11:04:12AM -0700, Randy Dunlap wrote: > Drop the doubled word "in". > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: James Bottomley > Cc: Jarkko Sakkinen > Cc: Mimi Zohar > Cc: linux-integr...@vger.kernel.org > Cc:

Re: Failure to build librseq on ppc

2020-07-08 Thread Mathieu Desnoyers
- On Jul 8, 2020, at 8:33 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jul 7, 2020, at 8:59 PM, Segher Boessenkool > seg...@kernel.crashing.org > wrote: [...] >> >> So perhaps you have code like >> >> int *p; >> int x; >> ... >> asm ("lwz %0,%1" : "=r"(x) :

Re: [PATCH v2 01/10] powerpc/perf: Add support for ISA3.1 PMU SPRs

2020-07-08 Thread Michael Ellerman
Athira Rajeev writes: ... > diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c > index cd6a742..5c64bd3 100644 > --- a/arch/powerpc/perf/core-book3s.c > +++ b/arch/powerpc/perf/core-book3s.c > @@ -39,10 +39,10 @@ struct cpu_hw_events { > unsigned int

Re: Failure to build librseq on ppc

2020-07-08 Thread Mathieu Desnoyers
- On Jul 7, 2020, at 8:59 PM, Segher Boessenkool seg...@kernel.crashing.org wrote: > Hi! > > On Tue, Jul 07, 2020 at 03:17:10PM -0400, Mathieu Desnoyers wrote: >> I'm trying to build librseq at: >> >> https://git.kernel.org/pub/scm/libs/librseq/librseq.git >> >> on powerpc, and I get

Re: [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'

2020-07-08 Thread Andrew Donnellan
On 8/7/20 10:57 pm, Lee Jones wrote: Keeping the pointer increment though. Fixes the following W=1 kernel build warning: drivers/misc/cxl/flash.c: In function ‘update_devicetree’: drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]

Re: [PATCH v2 07/10] powerpc/perf: support BHRB disable bit and new filtering modes

2020-07-08 Thread Michael Ellerman
Athira Rajeev writes: > PowerISA v3.1 has few updates for the Branch History Rolling Buffer(BHRB). ^ a > First is the addition of BHRB disable bit and second new filtering ^

Re: [PATCH v2 09/10] tools/perf: Add perf tools support for extended register capability in powerpc

2020-07-08 Thread Michael Ellerman
Athira Rajeev writes: > From: Anju T Sudhakar > > Add extended regs to sample_reg_mask in the tool side to use > with `-I?` option. Perf tools side uses extended mask to display > the platform supported register names (with -I? option) to the user > and also send this mask to the kernel to

Re: [PATCH 2/2] KVM: PPC: Book3S HV: rework secure mem slot dropping

2020-07-08 Thread Laurent Dufour
Le 08/07/2020 à 13:25, Bharata B Rao a écrit : On Fri, Jul 03, 2020 at 05:59:14PM +0200, Laurent Dufour wrote: When a secure memslot is dropped, all the pages backed in the secure device (aka really backed by secure memory by the Ultravisor) should be paged out to a normal page. Previously,

Re: Failure to build librseq on ppc

2020-07-08 Thread Michael Ellerman
Segher Boessenkool writes: > Hi! > > On Tue, Jul 07, 2020 at 03:17:10PM -0400, Mathieu Desnoyers wrote: >> I'm trying to build librseq at: >> >> https://git.kernel.org/pub/scm/libs/librseq/librseq.git >> >> on powerpc, and I get these errors when building the rseq basic >> test mirrored from

[PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'

2020-07-08 Thread Lee Jones
Keeping the pointer increment though. Fixes the following W=1 kernel build warning: drivers/misc/cxl/flash.c: In function ‘update_devicetree’: drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable] 178 | __be32 *data, drc_index, phandle;

Re: Failure to build librseq on ppc

2020-07-08 Thread Christophe Leroy
Le 08/07/2020 à 16:00, Mathieu Desnoyers a écrit : - On Jul 8, 2020, at 8:33 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: - On Jul 7, 2020, at 8:59 PM, Segher Boessenkool seg...@kernel.crashing.org wrote: [...] So perhaps you have code like int *p; int x;

[PATCH 1/5] dma-mapping: move the remaining DMA API calls out of line

2020-07-08 Thread Christoph Hellwig
For a long time the DMA API has been implemented inline in dma-mapping.h, but the function bodies can be quite large. Move them all out of line. This also removes all the dma_direct_* exports as those are just implementation details and should never be used by drivers directly. Signed-off-by:

Re: [PATCH] powerpc: select ARCH_HAS_MEMBARRIER_SYNC_CORE

2020-07-08 Thread Mathieu Desnoyers
- On Jul 8, 2020, at 1:17 AM, Nicholas Piggin npig...@gmail.com wrote: > Excerpts from Mathieu Desnoyers's message of July 7, 2020 9:25 pm: >> - On Jul 7, 2020, at 1:50 AM, Nicholas Piggin npig...@gmail.com wrote: >> [...] >>> I should actually change the comment for 64-bit because soft

Re: powerpc: Incorrect stw operand modifier in __set_pte_at

2020-07-08 Thread Christophe Leroy
Le 08/07/2020 à 16:45, Mathieu Desnoyers a écrit : Hi, Reviewing use of the patterns "Un%Xn" with lwz and stw instructions (where n should be the operand number) within the Linux kernel led me to spot those 2 weird cases: arch/powerpc/include/asm/nohash/pgtable.h:__set_pte_at()

[PATCH 4/5] dma-mapping: add a dma_ops_bypass flag to struct device

2020-07-08 Thread Christoph Hellwig
Several IOMMU drivers have a bypass mode where they can use a direct mapping if the devices DMA mask is large enough. Add generic support to the core dma-mapping code to do that to switch those drivers to a common solution. Signed-off-by: Christoph Hellwig --- include/linux/device.h | 8 +

Re: Failure to build librseq on ppc

2020-07-08 Thread Christophe Leroy
Le 08/07/2020 à 16:32, Mathieu Desnoyers a écrit : - On Jul 8, 2020, at 10:21 AM, Christophe Leroy christophe.le...@csgroup.eu wrote: Le 08/07/2020 à 16:00, Mathieu Desnoyers a écrit : - On Jul 8, 2020, at 8:33 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: - On

powerpc: Incorrect stw operand modifier in __set_pte_at

2020-07-08 Thread Mathieu Desnoyers
Hi, Reviewing use of the patterns "Un%Xn" with lwz and stw instructions (where n should be the operand number) within the Linux kernel led me to spot those 2 weird cases: arch/powerpc/include/asm/nohash/pgtable.h:__set_pte_at() __asm__ __volatile__("\

Re: kernel since 5.6 do not boot anymore on Apple PowerBook

2020-07-08 Thread Giuseppe Sacco
Hello, while trying to debug a problem using git bisect, I am now at a point where I cannot build the kernel at all. This is the error message I get: $ LANG=C make ARCH=powerpc \ CROSS_COMPILE=powerpc-linux- \ CONFIG_MODULE_COMPRESS_GZIP=true \ INSTALL_MOD_STRIP=1 CONFIG_MODULE_COMPRESS=1 \

Re: Failure to build librseq on ppc

2020-07-08 Thread Mathieu Desnoyers
- On Jul 8, 2020, at 10:21 AM, Christophe Leroy christophe.le...@csgroup.eu wrote: > Le 08/07/2020 à 16:00, Mathieu Desnoyers a écrit : >> - On Jul 8, 2020, at 8:33 AM, Mathieu Desnoyers >> mathieu.desnoy...@efficios.com wrote: >> >>> - On Jul 7, 2020, at 8:59 PM, Segher Boessenkool

generic DMA bypass flag v4

2020-07-08 Thread Christoph Hellwig
Hi all, I've recently beeing chatting with Lu about using dma-iommu and per-device DMA ops in the intel IOMMU driver, and one missing feature in dma-iommu is a bypass mode where the direct mapping is used even when an iommu is attached to improve performance. The powerpc code already has a

[PATCH 3/5] dma-mapping: make support for dma ops optional

2020-07-08 Thread Christoph Hellwig
Avoid the overhead of the dma ops support for tiny builds that only use the direct mapping. Signed-off-by: Christoph Hellwig --- arch/alpha/Kconfig | 1 + arch/arm/Kconfig| 1 + arch/ia64/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/parisc/Kconfig

[PATCH 2/5] dma-mapping: inline the fast path dma-direct calls

2020-07-08 Thread Christoph Hellwig
Inline the single page map/unmap/sync dma-direct calls into the now out of line generic wrappers. This restores the behavior of a single function call that we had before moving the generic calls out of line. Besides the dma-mapping callers there are just a few callers in IOMMU drivers that have a

[PATCH 5/5] powerpc: use the generic dma_ops_bypass mode

2020-07-08 Thread Christoph Hellwig
Use the DMA API bypass mechanism for direct window mappings. This uses common code and speed up the direct mapping case by avoiding indirect calls just when not using dma ops at all. It also fixes a problem where the sync_* methods were using the bypass check for DMA allocations, but those are

Re: kernel since 5.6 do not boot anymore on Apple PowerBook

2020-07-08 Thread Christophe Leroy
Hi Le 08/07/2020 à 19:00, Giuseppe Sacco a écrit : Hello, while trying to debug a problem using git bisect, I am now at a point where I cannot build the kernel at all. This is the error message I get: $ LANG=C make ARCH=powerpc \ CROSS_COMPILE=powerpc-linux- \

Re: kernel since 5.6 do not boot anymore on Apple PowerBook

2020-07-08 Thread Giuseppe Sacco
Hi Cristophe, Il giorno mer, 08/07/2020 alle 19.09 +0200, Christophe Leroy ha scritto: > Hi > > Le 08/07/2020 à 19:00, Giuseppe Sacco a écrit : > > Hello, > > while trying to debug a problem using git bisect, I am now at a point > > where I cannot build the kernel at all. This is the error

[PATCH 1/1] powerpc: Fix incorrect stw{, ux, u, x} instructions in __set_pte_at

2020-07-08 Thread Mathieu Desnoyers
The placeholder for instruction selection should use the second argument's operand, which is %1, not %0. This could generate incorrect assembly code if the instruction selection for argument %0 ever differs from argument %1. Fixes: 9bf2b5cdc5fe ("powerpc: Fixes for CONFIG_PTE_64BIT for SMP

Re: kernel since 5.6 do not boot anymore on Apple PowerBook

2020-07-08 Thread Christophe Leroy
Le 08/07/2020 à 19:36, Giuseppe Sacco a écrit : Hi Cristophe, Il giorno mer, 08/07/2020 alle 19.09 +0200, Christophe Leroy ha scritto: Hi Le 08/07/2020 à 19:00, Giuseppe Sacco a écrit : Hello, while trying to debug a problem using git bisect, I am now at a point where I cannot build the

Re: [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'

2020-07-08 Thread kernel test robot
Hi Lee, I love your patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on soc/for-next linux/master linus/master v5.8-rc4 next-20200708] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

Re: [PATCH v2 2/4] powerpc/mm/radix: Free PUD table when freeing pagetable

2020-07-08 Thread Reza Arbab
On Thu, Jun 25, 2020 at 12:15:45PM +0530, Aneesh Kumar K.V wrote: remove_pagetable() isn't freeing PUD table. This causes memory leak during memory unplug. Fix this. This has come up before: https://lore.kernel.org/linuxppc-dev/20190731061920.ga18...@in.ibm.com/ tl;dr, x86 intentionally does

[PATCH 1/2] powerpc/vas: Report proper error for address translation failure

2020-07-08 Thread Haren Myneni
DMA controller uses CC=5 internally for translation fault handling. So OS should be using CC=250 and should report this error to the user space when NX encounters address translation failure on the request buffer. Not an issue in earlier releases as NX does not get faults on kernel addresses.

Re: Failure to build librseq on ppc

2020-07-08 Thread Segher Boessenkool
Hi! On Wed, Jul 08, 2020 at 10:27:27PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > You'll have to show the actual failing machine code, and with enough > > context that we can relate this to the source code. > > > > -save-temps helps, or use -S instead of -c, etc. > >

Re: [PATCH v3 0/6] powerpc: queued spinlocks and rwlocks

2020-07-08 Thread Waiman Long
On 7/8/20 4:41 AM, Peter Zijlstra wrote: On Tue, Jul 07, 2020 at 03:57:06PM +1000, Nicholas Piggin wrote: Yes, powerpc could certainly get more performance out of the slow paths, and then there are a few parameters to tune. Can you clarify? The slow path is already in use on ARM64 which is

Re: Failure to build librseq on ppc

2020-07-08 Thread Mathieu Desnoyers
- Segher Boessenkool wrote: > Hi! > > On Wed, Jul 08, 2020 at 10:27:27PM +1000, Michael Ellerman wrote: > > Segher Boessenkool writes: > > > You'll have to show the actual failing machine code, and with enough > > > context that we can relate this to the source code. > > > > > >

Re: Failure to build librseq on ppc

2020-07-08 Thread Segher Boessenkool
Hi! On Wed, Jul 08, 2020 at 10:00:01AM -0400, Mathieu Desnoyers wrote: > >> So perhaps you have code like > >> > >> int *p; > >> int x; > >> ... > >> asm ("lwz %0,%1" : "=r"(x) : "m"(*p)); > > > > We indeed have explicit "lwz" and "stw" instructions in there. > > > >> > >> where that last

Re: Failure to build librseq on ppc

2020-07-08 Thread Segher Boessenkool
On Wed, Jul 08, 2020 at 10:32:20AM -0400, Mathieu Desnoyers wrote: > > As far as I can see, %U is mentioned in > > https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html in the > > powerpc subpart, at the "m" constraint. > > Yep, I did notice it, but mistakenly thought it was only needed for

Re: Failure to build librseq on ppc

2020-07-08 Thread Segher Boessenkool
On Wed, Jul 08, 2020 at 08:01:23PM -0400, Mathieu Desnoyers wrote: > > > #define RSEQ_ASM_OP_CMPEQ(var, expect, label) > > > \ > > > LOAD_WORD "%%r17, %[" __rseq_str(var) "]\n\t" > > > \ > > > > The way this hardcodes r17

[PATCH 2/2] selftests/powerpc: Use proper error code to check fault address

2020-07-08 Thread Haren Myneni
ERR_NX_TRANSLATION (CSB.CC=5) is for internal to VAS for fault handling and should not used by OS. ERR_NX_AT_FAULT(CSB.CC=250) is the proper error code reported by OS when NX encounters address translation failure. This patch uses ERR_NX_AT_FAULT (CSB.CC=250) to determine the fault address when

Re: [PATCH v3 0/6] powerpc: queued spinlocks and rwlocks

2020-07-08 Thread Waiman Long
On 7/8/20 4:32 AM, Peter Zijlstra wrote: On Tue, Jul 07, 2020 at 11:33:45PM -0400, Waiman Long wrote: From 5d7941a498935fb225b2c7a3108cbf590114c3db Mon Sep 17 00:00:00 2001 From: Waiman Long Date: Tue, 7 Jul 2020 22:29:16 -0400 Subject: [PATCH 2/9] locking/pvqspinlock: Introduce

Re: [PATCH v3 0/6] powerpc: queued spinlocks and rwlocks

2020-07-08 Thread Waiman Long
On 7/8/20 1:10 AM, Nicholas Piggin wrote: Excerpts from Waiman Long's message of July 8, 2020 1:33 pm: On 7/7/20 1:57 AM, Nicholas Piggin wrote: Yes, powerpc could certainly get more performance out of the slow paths, and then there are a few parameters to tune. We don't have a good alternate

Re: [PATCH v3 0/6] powerpc: queued spinlocks and rwlocks

2020-07-08 Thread Waiman Long
On 7/8/20 7:50 PM, Waiman Long wrote: On 7/8/20 1:10 AM, Nicholas Piggin wrote: Excerpts from Waiman Long's message of July 8, 2020 1:33 pm: On 7/7/20 1:57 AM, Nicholas Piggin wrote: Yes, powerpc could certainly get more performance out of the slow paths, and then there are a few parameters

Re: [PATCH] powerpc/64s/exception: Fix 0x1500 interrupt handler crash

2020-07-08 Thread Michael Ellerman
On Wed, 8 Jul 2020 17:49:42 +1000, Nicholas Piggin wrote: > A typo caused the interrupt handler to branch immediately to the common > "unknown interrupt" handler and skip the special case test for denormal > cause. > > This does not affect KVM softpatch handling (e.g., for POWER9 TM assist) >

Re: powerpc: Incorrect stw operand modifier in __set_pte_at

2020-07-08 Thread Segher Boessenkool
On Wed, Jul 08, 2020 at 06:16:54PM +0200, Christophe Leroy wrote: > Le 08/07/2020 à 16:45, Mathieu Desnoyers a écrit : > >Reviewing use of the patterns "Un%Xn" with lwz and stw instructions > >(where n should be the operand number) within the Linux kernel led > >me to spot those 2 weird cases: > >

Re: [PATCH v2 03/10] powerpc/xmon: Add PowerISA v3.1 PMU SPRs

2020-07-08 Thread Athira Rajeev
> On 08-Jul-2020, at 4:34 PM, Michael Ellerman wrote: > > Athira Rajeev > writes: >> From: Madhavan Srinivasan >> >> PowerISA v3.1 added three new perfromance >> monitoring unit (PMU) speical purpose register (SPR). >> They are Monitor Mode Control

Re: [PATCH v2 07/10] powerpc/perf: support BHRB disable bit and new filtering modes

2020-07-08 Thread Athira Rajeev
> On 08-Jul-2020, at 1:13 PM, Gautham R Shenoy wrote: > > On Tue, Jul 07, 2020 at 05:17:55PM +1000, Michael Neuling wrote: >> On Wed, 2020-07-01 at 05:20 -0400, Athira Rajeev wrote: >>> PowerISA v3.1 has few updates for the Branch History Rolling Buffer(BHRB). >>> First is the addition of BHRB

Re: [PATCH v2 07/10] powerpc/perf: support BHRB disable bit and new filtering modes

2020-07-08 Thread Athira Rajeev
> On 08-Jul-2020, at 5:12 PM, Michael Ellerman wrote: > > Athira Rajeev > writes: > >> PowerISA v3.1 has few updates for the Branch History Rolling Buffer(BHRB). > ^ > a >> First is the addition of BHRB disable bit and

Re: [PATCH v2 09/10] tools/perf: Add perf tools support for extended register capability in powerpc

2020-07-08 Thread Athira Rajeev
> On 08-Jul-2020, at 5:34 PM, Michael Ellerman wrote: > > Athira Rajeev > writes: >> From: Anju T Sudhakar >> >> Add extended regs to sample_reg_mask in the tool side to use >> with `-I?` option. Perf tools side uses extended mask to display >> the

[PATCH v2 4/5] powerpc/lib: Add LKDTM accessor for patching addr

2020-07-08 Thread Christopher M. Riedl
When live patching a STRICT_RWX kernel, a mapping is installed at a "patching address" with temporary write permissions. Provide a LKDTM-only accessor function for this address in preparation for a LKDTM test which attempts to "hijack" this mapping by writing to it from another CPU.

[PATCH v2 1/5] powerpc/mm: Introduce temporary mm

2020-07-08 Thread Christopher M. Riedl
x86 supports the notion of a temporary mm which restricts access to temporary PTEs to a single CPU. A temporary mm is useful for situations where a CPU needs to perform sensitive operations (such as patching a STRICT_KERNEL_RWX kernel) requiring temporary mappings without exposing said mappings to

[PATCH 0/5] Use per-CPU temporary mappings for patching

2020-07-08 Thread Christopher M. Riedl
When compiled with CONFIG_STRICT_KERNEL_RWX, the kernel must create temporary mappings when patching itself. These mappings temporarily override the strict RWX text protections to permit a write. Currently, powerpc allocates a per-CPU VM area for patching. Patching occurs as follows: 1.

Re: [PATCH 1/1] KVM/PPC: Fix typo on H_DISABLE_AND_GET hcall

2020-07-08 Thread Paul Mackerras
On Mon, Jul 06, 2020 at 09:48:12PM -0300, Leonardo Bras wrote: > On PAPR+ the hcall() on 0x1B0 is called H_DISABLE_AND_GET, but got > defined as H_DISABLE_AND_GETC instead. > > This define was introduced with a typo in commit > ("[PATCH] powerpc: Extends HCALL interface for InfiniBand usage"),

[PATCH v2 5/5] powerpc: Add LKDTM test to hijack a patch mapping

2020-07-08 Thread Christopher M. Riedl
When live patching with STRICT_KERNEL_RWX, the CPU doing the patching must use a temporary mapping which allows for writing to kernel text. During the entire window of time when this temporary mapping is in use, another CPU could write to the same mapping and maliciously alter kernel text.

[PATCH v2 3/5] powerpc/lib: Use a temporary mm for code patching

2020-07-08 Thread Christopher M. Riedl
Currently, code patching a STRICT_KERNEL_RWX exposes the temporary mappings to other CPUs. These mappings should be kept local to the CPU doing the patching. Use the pre-initialized temporary mm and patching address for this purpose. Also add a check after patching to ensure the patch succeeded.

[PATCH v2 2/5] powerpc/lib: Initialize a temporary mm for code patching

2020-07-08 Thread Christopher M. Riedl
When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is temporarily mapped with permissive memory protections. Currently, a per-cpu vmalloc patch area is used for this purpose. While the patch area is per-cpu, the temporary page mapping is inserted into the

Re: [PATCH v2 2/3] powerpc/64s: remove PROT_SAO support

2020-07-08 Thread Paul Mackerras
On Fri, Jul 03, 2020 at 11:19:57AM +1000, Nicholas Piggin wrote: > ISA v3.1 does not support the SAO storage control attribute required to > implement PROT_SAO. PROT_SAO was used by specialised system software > (Lx86) that has been discontinued for about 7 years, and is not thought > to be used

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-07-08 Thread Palmer Dabbelt
On Sun, 07 Jun 2020 00:59:46 PDT (-0700), a...@ghiti.fr wrote: This is a preparatory patch for relocatable kernel. The kernel used to be linked at PAGE_OFFSET address and used to be loaded physically at the beginning of the main memory. Therefore, we could use the linear mapping for the kernel

Re: [RFC PATCH v0 2/2] KVM: PPC: Book3S HV: Use H_RPT_INVALIDATE in nested KVM

2020-07-08 Thread Paul Mackerras
On Fri, Jul 03, 2020 at 04:14:20PM +0530, Bharata B Rao wrote: > In the nested KVM case, replace H_TLB_INVALIDATE by the new hcall > H_RPT_INVALIDATE if available. The availability of this hcall > is determined from "hcall-rpt-invalidate" string in ibm,hypertas-functions > DT property. What are

[PATCH v5 1/2] powerpc/perf/hv-24x7: Add cpu hotplug support

2020-07-08 Thread Kajol Jain
Patch here adds cpu hotplug functions to hv_24x7 pmu. A new cpuhp_state "CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE" enum is added. The online callback function updates the cpumask only if its empty. As the primary intention of adding hotplug support is to designate a CPU to make HCALL to collect the

[PATCH v5 2/2] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask

2020-07-08 Thread Kajol Jain
Patch here adds a cpumask attr to hv_24x7 pmu along with ABI documentation. Primary use to expose the cpumask is for the perf tool which has the capability to parse the driver sysfs folder and understand the cpumask file. Having cpumask file will reduce the number of perf command line parameters

[PATCH v5 0/2] Add cpu hotplug support for powerpc/perf/hv-24x7

2020-07-08 Thread Kajol Jain
This patchset add cpu hotplug support for hv_24x7 driver by adding online/offline cpu hotplug function. It also add sysfs file "cpumask" to expose current online cpu that can be used for hv_24x7 event count. Changelog: v4 -> v5 - Since we are making PMU fail incase hotplug init failed, hence

[powerpc:merge] BUILD SUCCESS 71d6070a8e0e0a1ed82365544f97b86475cb161e

2020-07-08 Thread kernel test robot
allmodconfig powerpc defconfig powerpc allyesconfig powerpc rhel-kconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a002-20200708 i386

[PATCH v6 00/23] powerpc/book3s/64/pkeys: Simplify the code

2020-07-08 Thread Aneesh Kumar K.V
This patch series update the pkey subsystem with more documentation and rename variables so that it is easy to follow the code. We drop the changes to support KUAP/KUEP with hash translation in this update. The changes are adding 200 cycles to null syscalls benchmark and I want to look at that

[PATCH v6 05/23] powerpc/book3s64/pkeys: Explain key 1 reservation details

2020-07-08 Thread Aneesh Kumar K.V
This explains the details w.r.t key 1. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index d69b4cfc5792..6ff9fe4112ef 100644 ---

[PATCH v6 06/23] powerpc/book3s64/pkeys: Simplify the key initialization

2020-07-08 Thread Aneesh Kumar K.V
Add documentation explaining the execute_only_key. The reservation and initialization mask details are also explained in this patch. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 199 ++- 1 file changed,

[PATCH v6 07/23] powerpc/book3s64/pkeys: Prevent key 1 modification from userspace.

2020-07-08 Thread Aneesh Kumar K.V
Key 1 is marked reserved by ISA. Setup uamor to prevent userspace modification of the same. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index

[PATCH v6 09/23] powerpc/book3s64/pkeys: Simplify pkey disable branch

2020-07-08 Thread Aneesh Kumar K.V
Make the default value FALSE (pkey enabled) and set to TRUE when we find the total number of keys supported to be zero. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 2 +- arch/powerpc/mm/book3s64/pkeys.c | 7 +++ 2 files changed, 4 insertions(+), 5 deletions(-)

[PATCH v6 10/23] powerpc/book3s64/pkeys: Convert pkey_total to num_pkey

2020-07-08 Thread Aneesh Kumar K.V
num_pkey now represents max number of keys supported such that we return to userspace 0 - num_pkey - 1. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 7 +-- arch/powerpc/mm/book3s64/pkeys.c | 14 +++--- 2 files changed, 12 insertions(+), 9 deletions(-)

[PATCH v6 13/23] powerpc/book3s64/pkeys: Add MMU_FTR_PKEY

2020-07-08 Thread Aneesh Kumar K.V
Parse storage keys related device tree entry in early_init_devtree and enable MMU feature MMU_FTR_PKEY if pkeys are supported. MMU feature is used instead of CPU feature because this enables us to group MMU_FTR_KUAP and MMU_FTR_PKEY in asm feature fixup code. Signed-off-by: Aneesh Kumar K.V ---

[PATCH v6 12/23] powerpc/book3s64/pkeys: Mark all the pkeys above max pkey as reserved

2020-07-08 Thread Aneesh Kumar K.V
The hypervisor can return less than max allowed pkey (for ex: 31) instead of 32. We should mark all the pkeys above max allowed as reserved so that we avoid the allocation of the wrong pkey(for ex: key 31 in the above case) by userspace. Signed-off-by: Aneesh Kumar K.V ---

[PATCH v6 11/23] powerpc/book3s64/pkeys: Make initial_allocation_mask static

2020-07-08 Thread Aneesh Kumar K.V
initial_allocation_mask is not used outside this file. Also mark reserved_allocation_mask and initial_allocation_mask __ro_after_init; Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 1 - arch/powerpc/mm/book3s64/pkeys.c | 7 +-- 2 files changed, 5 insertions(+), 3

  1   2   >