[PATCH v3 1/6] powerpc: Add LKDTM accessor for patching addr

2020-08-26 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.

Re: [PATCH v2] powerpc: Update documentation of ISA versions for Power10

2020-08-26 Thread Jordan Niethe
On Thu, Aug 27, 2020 at 2:49 PM Christophe Leroy wrote: > > > > Le 27/08/2020 à 06:05, Jordan Niethe a écrit : > > Update the CPU to ISA Version Mapping document to include Power10 and > > ISA v3.1. > > Maybe Documentation/powerpc/cpu_families.rst should be updated as well. Good idea it still

Re: [PATCH v5 08/23] powerpc/book3s64/kuap: Rename MMU_FTR_RADIX_KUAP to MMU_FTR_KUAP

2020-08-26 Thread Christophe Leroy
Le 27/08/2020 à 06:09, Aneesh Kumar K.V a écrit : This is in preparate to adding support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Also move the feature bit closer to MMU_FTR_KUEP. Signed-off-by: Aneesh Kumar K.V ---

Re: [PATCH v2] powerpc: Update documentation of ISA versions for Power10

2020-08-26 Thread Christophe Leroy
Le 27/08/2020 à 06:05, Jordan Niethe a écrit : Update the CPU to ISA Version Mapping document to include Power10 and ISA v3.1. Maybe Documentation/powerpc/cpu_families.rst should be updated as well. Christophe Signed-off-by: Jordan Niethe --- v2: Transactional Memory = No ---

[PATCH v5 23/23] powerpc/book3s64/pkeys: Optimize FTR_KUAP and FTR_KUEP disabled case

2020-08-26 Thread Aneesh Kumar K.V
If FTR_KUAP is disabled kernel will continue to run with the same AMR value with which it was entered. Hence there is a high chance that we can return without restoring the AMR value. This also helps the case when applications are not using the pkey feature. In this case, different applications

[PATCH v5 22/23] powerpc/book3s64/hash/kup: Don't hardcode kup key

2020-08-26 Thread Aneesh Kumar K.V
Make KUAP/KUEP key a variable and also check whether the platform limit the max key such that we can't use the key for KUAP/KEUP. Signed-off-by: Aneesh Kumar K.V --- .../powerpc/include/asm/book3s/64/hash-pkey.h | 22 +--- arch/powerpc/include/asm/book3s/64/pkeys.h| 1 +

[PATCH v5 21/23] powerpc/book3s64/hash/kuep: Enable KUEP on hash

2020-08-26 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 16ea0b2f0ea5..b862d5cd78ff 100644 --- a/arch/powerpc/mm/book3s64/pkeys.c +++

[PATCH v5 20/23] powerpc/book3s64/hash/kuap: Enable kuap on hash

2020-08-26 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 391230f93da2..16ea0b2f0ea5 100644 --- a/arch/powerpc/mm/book3s64/pkeys.c +++

[PATCH v5 19/23] powerpc/book3s64/kuep: Use Key 3 to implement KUEP with hash translation.

2020-08-26 Thread Aneesh Kumar K.V
Radix use IAMR Key 0 and hash translation use IAMR key 3. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/book3s/64/kup.h b/arch/powerpc/include/asm/book3s/64/kup.h index

[PATCH v5 18/23] powerpc/book3s64/kuap: Use Key 3 to implement KUAP with hash translation.

2020-08-26 Thread Aneesh Kumar K.V
Radix use AMR Key 0 and hash translation use AMR key 3. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/kup.h b/arch/powerpc/include/asm/book3s/64/kup.h

[PATCH v5 16/23] powerpc/book3s64/kuap: Restrict access to userspace based on userspace AMR

2020-08-26 Thread Aneesh Kumar K.V
If an application has configured address protection such that read/write is denied using pkey even the kernel should receive a FAULT on accessing the same. This patch use user AMR value stored in pt_regs.kuap to achieve the same. Signed-off-by: Aneesh Kumar K.V ---

[PATCH v5 17/23] powerpc/book3s64/kuap: Improve error reporting with KUAP

2020-08-26 Thread Aneesh Kumar K.V
With hash translation use DSISR_KEYFAULT to identify a wrong access. With Radix we look at the AMR value and type of fault. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/kup.h | 4 +-- arch/powerpc/include/asm/book3s/64/kup.h | 27

[PATCH v5 15/23] powerpc/book3s64/pkeys: Don't update SPRN_AMR when in kernel mode.

2020-08-26 Thread Aneesh Kumar K.V
Now that kernel correctly store/restore userspace AMR/IAMR values, avoid manipulating AMR and IAMR from the kernel on behalf of userspace. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 18 arch/powerpc/include/asm/processor.h | 4 --

[PATCH v5 14/23] powerpc/ptrace-view: Use pt_regs values instead of thread_struct based one.

2020-08-26 Thread Aneesh Kumar K.V
We will remove thread.amr/iamr/uamor in a later patch Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/ptrace/ptrace-view.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace-view.c b/arch/powerpc/kernel/ptrace/ptrace-view.c

[PATCH v5 13/23] powerpc/book3s64/pkeys: Reset userspace AMR correctly on exec

2020-08-26 Thread Aneesh Kumar K.V
On fork, we inherit from the parent and on exec, we should switch to default_amr values. Also, avoid changing the AMR register value within the kernel. The kernel now runs with different AMR values. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/pkeys.h | 2 ++

[PATCH v5 12/23] powerpc/book3s64/pkeys: Inherit correctly on fork.

2020-08-26 Thread Aneesh Kumar K.V
Child thread.kuap value is inherited from the parent in copy_thread_tls. We still need to make sure when the child returns from a fork in the kernel we start with the kernel default AMR value. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/process.c | 9 + 1 file changed, 9

[PATCH v5 11/23] powerpc/book3s64/pkeys: Store/restore userspace AMR/IAMR correctly on entry and exit from kernel

2020-08-26 Thread Aneesh Kumar K.V
This prepare kernel to operate with a different value than userspace AMR/IAMR. For this, AMR/IAMR need to be saved and restored on entry and return from the kernel. With KUAP we modify kernel AMR when accessing user address from the kernel via copy_to/from_user interfaces. We don't need to modify

[PATCH v5 10/23] powerpc/exec: Set thread.regs early during exec

2020-08-26 Thread Aneesh Kumar K.V
In later patches during exec, we would like to access default regs.kuap to control access to the user mapping. Having thread.regs set early makes the code changes simpler. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/thread_info.h | 2 -- arch/powerpc/kernel/process.c

[PATCH v5 08/23] powerpc/book3s64/kuap: Rename MMU_FTR_RADIX_KUAP to MMU_FTR_KUAP

2020-08-26 Thread Aneesh Kumar K.V
This is in preparate to adding support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Also move the feature bit closer to MMU_FTR_KUEP. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 18

[PATCH v5 09/23] powerpc/book3s64/kuap: Use Key 3 for kernel mapping with hash translation

2020-08-26 Thread Aneesh Kumar K.V
This patch updates kernel hash page table entries to use storage key 3 for its mapping. This implies all kernel access will now use key 3 to control READ/WRITE. The patch also prevents the allocation of key 3 from userspace and UAMOR value is updated such that userspace cannot modify key 3.

[PATCH v5 07/23] powerpc/book3s64/kuep: Move KUEP related function outside radix

2020-08-26 Thread Aneesh Kumar K.V
The next set of patches adds support for kuep with hash translation. In preparation for that rename/move kuap related functions to non radix names. Also set MMU_FTR_KUEP and add the missing isync(). Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 1 +

[PATCH v5 06/23] powerpc/book3s64/kup: Use the correct #ifdef when including headers

2020-08-26 Thread Aneesh Kumar K.V
Use CONFIG_PPC_BOOK3S_64 instead of CONFIG_PPC64. This avoid wrong inclusion with other 64bit platforms. To fix booke 64 build error add macro kuap_check_amr. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/kup.h | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v5 05/23] powerpc/book3s64/kuap: Move KUAP related function outside radix

2020-08-26 Thread Aneesh Kumar K.V
The next set of patches adds support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Signed-off-by: Aneesh Kumar K.V --- .../asm/book3s/64/{kup-radix.h => kup.h} | 6 ++--- arch/powerpc/include/asm/kup.h| 2 +-

[PATCH v5 04/23] powerpc/book3s64/kuap/kuep: Move uamor setup to pkey init

2020-08-26 Thread Aneesh Kumar K.V
This patch consolidates UAMOR update across pkey, kuap and kuep features. The boot cpu initialize UAMOR via pkey init and both radix/hash do the secondary cpu UAMOR init in early_init_mmu_secondary. We don't check for mmu_feature in radix secondary init because UAMOR is a supported SPRN with all

[PATCH v5 03/23] powerpc/book3s64/kuap/kuep: Make KUAP and KUEP a subfeature of PPC_MEM_KEYS

2020-08-26 Thread Aneesh Kumar K.V
The next set of patches adds support for kuap with hash translation. Hence make KUAP a BOOK3S_64 feature. Also make it a subfeature of PPC_MEM_KEYS. Hash translation is going to use pkeys to support KUAP/KUEP. Adding this dependency reduces the code complexity and enables us to move some of the

[PATCH v5 02/23] KVM: PPC: BOOK3S: PR: Ignore UAMOR SPR

2020-08-26 Thread Aneesh Kumar K.V
With power7 and above we expect the cpu to support keys. The number of keys are firmware controlled based on device tree. PR KVM do not expose key details via device tree. Hence when running with PR KVM we do run with MMU_FTR_KEY support disabled. But we can still get updates on UAMOR. Hence

[PATCH v5 01/23] powerpc: Add new macro to handle NESTED_IFCLR

2020-08-26 Thread Aneesh Kumar K.V
This will be used by the following patches Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/feature-fixups.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/feature-fixups.h b/arch/powerpc/include/asm/feature-fixups.h index b0af97add751..122c22161268

[PATCH v5 00/23] Kernel userspace access/execution prevention with hash translation

2020-08-26 Thread Aneesh Kumar K.V
This patch series implements KUAP and KUEP with hash translation mode using memory keys. The kernel now uses memory protection key 3 to control access to the kernel. Kernel page table entries are now configured with key 3. Access to locations configured with any other key value is denied when in

[PATCH v2] powerpc: Update documentation of ISA versions for Power10

2020-08-26 Thread Jordan Niethe
Update the CPU to ISA Version Mapping document to include Power10 and ISA v3.1. Signed-off-by: Jordan Niethe --- v2: Transactional Memory = No --- Documentation/powerpc/isa-versions.rst | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/powerpc/isa-versions.rst

[PATCH] powerpc/64s: Remove TM from Power10 features

2020-08-26 Thread Jordan Niethe
ISA v3.1 removes transactional memory and hence it should not be present in cpu_features or cpu_user_features2. Remove CPU_FTR_TM_COMP from CPU_FTRS_POWER10. Remove PPC_FEATURE2_HTM_COMP and PPC_FEATURE2_HTM_NOSC_COMP from COMMON_USER2_POWER10. Fixes: a3ea40d5c736 ("powerpc: Add POWER10

Re: [PATCH] ASoC: fsl_spdif: Fix unnecessary check infsl_spdif_probe()

2020-08-26 Thread Tang Bin
Hi Mark 在 2020/8/27 0:53, Mark Brown 写道: On Wed, Aug 26, 2020 at 11:09:18PM +0800, Tang Bin wrote: The function fsl_spdif_probe() is only called with an openfirmware platform device. Therefore there is no need to check that the passed in device is NULL. Why is this an issue - the check will

Re: [PATCH v5 4/8] powerpc/watchpoint: Move DAWR detection logic outside of hw_breakpoint.c

2020-08-26 Thread kernel test robot
Hi Ravi, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.9-rc2 next-20200826] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented

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

2020-08-26 Thread Giuseppe Sacco
Hello Christophe, Il giorno mer, 26/08/2020 alle 15.53 +0200, Christophe Leroy ha scritto: [...] > If there is no warning, then the issue is something else, bad luck. > > Could you increase the loglevel and try again both with and without > VMAP_STACK ? Maybe we'll get more information on where

Re: fsl_espi errors on v5.7.15

2020-08-26 Thread Chris Packham
(adding Nicholas) On 26/08/20 6:38 pm, Heiner Kallweit wrote: > On 26.08.2020 08:07, Chris Packham wrote: >> On 26/08/20 1:48 pm, Chris Packham wrote: >>> On 26/08/20 10:22 am, Chris Packham wrote: On 25/08/20 7:22 pm, Heiner Kallweit wrote: > I've been staring at

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

2020-08-26 Thread Christophe Leroy
Hello Giuseppe, Le 24/08/2020 à 22:48, Giuseppe Sacco a écrit : Hello Christophe, Il giorno lun, 24/08/2020 alle 07.17 +0200, Christophe Leroy ha scritto: Hello Giuseppe, [...] The Oopses in the video are fixed in 5.9-rc2, see my response to your other mail. Right, I just updated from git

Re: [PATCH] ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe()

2020-08-26 Thread Mark Brown
On Wed, Aug 26, 2020 at 11:09:18PM +0800, Tang Bin wrote: > The function fsl_spdif_probe() is only called with an openfirmware > platform device. Therefore there is no need to check that the passed > in device is NULL. Why is this an issue - the check will make things more robust if someone

Re: [PATCH v1 4/9] powerpc/vdso: Remove unnecessary ifdefs in vdso_pagelist initialization

2020-08-26 Thread Christophe Leroy
Le 26/08/2020 à 16:58, Michael Ellerman a écrit : Christophe Leroy writes: diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index daef14a284a3..bbb69832fd46 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -718,16 +710,14 @@ static int __init

[PATCH] ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe()

2020-08-26 Thread Tang Bin
The function fsl_spdif_probe() is only called with an openfirmware platform device. Therefore there is no need to check that the passed in device is NULL. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin --- sound/soc/fsl/fsl_spdif.c | 3 --- 1 file changed, 3 deletions(-) diff --git

Re: [PATCH v1 4/9] powerpc/vdso: Remove unnecessary ifdefs in vdso_pagelist initialization

2020-08-26 Thread Michael Ellerman
Christophe Leroy writes: > diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c > index daef14a284a3..bbb69832fd46 100644 > --- a/arch/powerpc/kernel/vdso.c > +++ b/arch/powerpc/kernel/vdso.c > @@ -718,16 +710,14 @@ static int __init vdso_init(void) ... > > - > -#ifdef

[PATCH v2 16/23] powerpc: use asm-generic/mmu_context.h for no-op implementations

2020-08-26 Thread Nicholas Piggin
Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/mmu_context.h | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git

[Bug 208957] 5.9-rc1 fails to build for a PowerMac G5: .../book3s64/hash_utils.c:1119:21: error: ‘default_uamor’ undeclared (first use in this function) 1119 | mtspr(SPRN_UAMOR, default_uamor);

2020-08-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208957 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|RESOLVED|CLOSED --

[Bug 208957] 5.9-rc1 fails to build for a PowerMac G5: .../book3s64/hash_utils.c:1119:21: error: ‘default_uamor’ undeclared (first use in this function) 1119 | mtspr(SPRN_UAMOR, default_uamor);

2020-08-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208957 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added CC|

Re: [PATCH v8 2/8] powerpc/vdso: Remove __kernel_datapage_offset and simplify __get_datapage()

2020-08-26 Thread Michael Ellerman
Christophe Leroy writes: > Le 04/08/2020 à 13:17, Christophe Leroy a écrit : >> On 07/16/2020 02:59 AM, Michael Ellerman wrote: >>> Christophe Leroy writes: The VDSO datapage and the text pages are always located immediately next to each other, so it can be hardcoded without an

Re: [PATCH v2 1/4] powerpc/drmem: Make lmb_size 64 bit

2020-08-26 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.8.2, v5.7.16, v5.4.59, v4.19.140, v4.14.193, v4.9.232, v4.4.232. v5.8.2: Build

Re: [PATCH] powerpc/pseries: Do not initiate shutdown when system is running on UPS

2020-08-26 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a "Fixes:" tag fixing commit: 79872e35469b ("powerpc/pseries: All events of EPOW_SYSTEM_SHUTDOWN must initiate shutdown"). The bot has tested the following trees: v5.8.2, v5.7.16, v5.4.59, v4.19.140, v4.14.193,

Re: [PATCH v2 3/4] powerpc/memhotplug: Make lmb size 64bit

2020-08-26 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.8.2, v5.7.16, v5.4.59, v4.19.140, v4.14.193, v4.9.232, v4.4.232. v5.8.2: Build

Re: [PATCH v2 1/2] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-26 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.8.2, v5.7.16, v5.4.59, v4.19.140, v4.14.193, v4.9.232, v4.4.232. v5.8.2: Build

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

2020-08-26 Thread Christophe Leroy
Hello Giuseppe, Le 24/08/2020 à 22:48, Giuseppe Sacco a écrit : Hello Christophe, Il giorno lun, 24/08/2020 alle 07.17 +0200, Christophe Leroy ha scritto: Hello Giuseppe, [...] The Oopses in the video are fixed in 5.9-rc2, see my response to your other mail. Right, I just updated from git

Re: [PATCH v7 06/12] powerpc: inline huge vmap supported functions

2020-08-26 Thread Michael Ellerman
Nicholas Piggin writes: > This allows unsupported levels to be constant folded away, and so > p4d_free_pud_page can be removed because it's no longer linked to. > > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Nicholas Piggin > --- > > Ack or objection if this goes via the -mm tree? Fine

Re: Please apply commit 0828137e8f16 ("powerpc/64s: Don't init FSCR_DSCR in __init_FSCR()") to v4.14.y, v4.19.y, v5.4.y, v5.7.y

2020-08-26 Thread Michael Ellerman
Greg KH writes: > On Tue, Aug 25, 2020 at 07:44:08PM -0300, Thadeu Lima de Souza Cascardo wrote: >> After commit 912c0a7f2b5daa3cbb2bc10f303981e493de73bd ("powerpc/64s: Save >> FSCR >> to init_task.thread.fscr after feature init"), which has been applied to the >> referred branches, when

Re: Please apply commit 0828137e8f16 ("powerpc/64s: Don't init FSCR_DSCR in __init_FSCR()") to v4.14.y, v4.19.y, v5.4.y, v5.7.y

2020-08-26 Thread Greg KH
On Tue, Aug 25, 2020 at 07:44:08PM -0300, Thadeu Lima de Souza Cascardo wrote: > After commit 912c0a7f2b5daa3cbb2bc10f303981e493de73bd ("powerpc/64s: Save FSCR > to init_task.thread.fscr after feature init"), which has been applied to the > referred branches, when userspace sets the user DSCR MSR,

Re: [PATCH v7 07/12] arm64: inline huge vmap supported functions

2020-08-26 Thread Catalin Marinas
On Wed, Aug 26, 2020 at 12:57:48AM +1000, Nicholas Piggin wrote: > This allows unsupported levels to be constant folded away, and so > p4d_free_pud_page can be removed because it's no longer linked to. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: linux-arm-ker...@lists.infradead.org >

Re: [PATCH] Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check"

2020-08-26 Thread Vaidyanathan Srinivasan
* Pratik Rajesh Sampat [2020-08-26 13:59:18]: > Cpuidle stop state implementation has minor optimizations for P10 > where hardware preserves more SPR registers compared to P9. > The current P9 driver works for P10, although does few extra > save-restores. P9 driver can provide the required power

Re: [PATCH] Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check"

2020-08-26 Thread Pratik Sampat
On 26/08/20 2:07 pm, Christophe Leroy wrote: Le 26/08/2020 à 10:29, Pratik Rajesh Sampat a écrit : Cpuidle stop state implementation has minor optimizations for P10 where hardware preserves more SPR registers compared to P9. The current P9 driver works for P10, although does few extra

Re: [PATCH] Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check"

2020-08-26 Thread Christophe Leroy
Le 26/08/2020 à 10:29, Pratik Rajesh Sampat a écrit : Cpuidle stop state implementation has minor optimizations for P10 where hardware preserves more SPR registers compared to P9. The current P9 driver works for P10, although does few extra save-restores. P9 driver can provide the required

[PATCH] Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check"

2020-08-26 Thread Pratik Rajesh Sampat
Cpuidle stop state implementation has minor optimizations for P10 where hardware preserves more SPR registers compared to P9. The current P9 driver works for P10, although does few extra save-restores. P9 driver can provide the required power management features like SMT thread folding and core

Re: [PATCH] selftests/powerpc: Fix prefixes in alignment_handler signal handler

2020-08-26 Thread Jordan Niethe
On Mon, Aug 24, 2020 at 11:12 PM Jordan Niethe wrote: > > The signal handler in the alignment handler self test has the ability to > jump over the instruction that triggered the signal. It does this by > incrementing the PT_NIP in the user context by 4. If it were a prefixed > instruction this

[PATCH] powerpc/perf: Fix reading of MSR[HV PR] bits in trace-imc

2020-08-26 Thread Athira Rajeev
IMC trace-mode uses MSR[HV PR] bits to set the cpumode for the instruction pointer captured in each sample. The bits are fetched from third DW of the trace record. Reading third DW from IMC trace record should use be64_to_cpu along with READ_ONCE inorder to fetch correct MSR[HV PR] bits. Patch

Re: fsl_espi errors on v5.7.15

2020-08-26 Thread Heiner Kallweit
On 26.08.2020 08:07, Chris Packham wrote: > > On 26/08/20 1:48 pm, Chris Packham wrote: >> >> On 26/08/20 10:22 am, Chris Packham wrote: >>> On 25/08/20 7:22 pm, Heiner Kallweit wrote: >>> >>> I've been staring at spi-fsl-espi.c for while now and I think I've > identified a couple of

Re: fsl_espi errors on v5.7.15

2020-08-26 Thread Chris Packham
On 26/08/20 1:48 pm, Chris Packham wrote: > > On 26/08/20 10:22 am, Chris Packham wrote: >> On 25/08/20 7:22 pm, Heiner Kallweit wrote: >> >> >>> I've been staring at spi-fsl-espi.c for while now and I think I've identified a couple of deficiencies that may or may not be related to my