The MSR[RI]=0 recoverability check should be in the recovered machine
check case. Without this, a machine check that hits in a RI region that
has for example live SRRs, will cause the interrupted context to resume
with corrupted registers and crash unpredictably.
This does not affect 64s at the
System Reset and Machine Check interrupts that are not recoverable due
to being nested or interrupting when RI=0 currently panic. This is
not necessary, and can often just kill the current context and recover.
Reviewed-by: Christophe Leroy
Signed-off-by: Nicholas Piggin
---
Similarly to the previous patch, do not trace system reset. This code
is used when there is a crash or hang, and tracing disturbs the system
more and has been known to crash in the crash handling path.
Acked-by: Naveen N. Rao
Reviewed-by: Christophe Leroy
Signed-off-by: Nicholas Piggin
---
Rather than notrace annotations throughout a significant part of the
machine check code across kernel/ pseries/ and powernv/ which can
easily be broken and is infrequently tested, use paca->ftrace_enabled
to blanket-disable tracing of the real-mode non-maskable handler.
Acked-by: Naveen N. Rao
Signed-off-by: Nicholas Piggin
Reviewed-by: Christophe Leroy
---
arch/powerpc/include/asm/ftrace.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/powerpc/include/asm/ftrace.h
b/arch/powerpc/include/asm/ftrace.h
index f54a08a2cd70..bc76970b6ee5 100644
---
machine_check_early is taken as an NMI, so nmi_enter is used there.
machine_check_exception is no longer taken as an NMI (it's invoked
via irq_work in the case a machine check hits in kernel mode), so
remove the nmi_enter from that case.
In NMI context, hash faults don't try to refill the hash
With the previous patch, machine checks can use rtas_call_unlocked
which avoids the rtas spinlock which would deadlock if a machine
check hits while making an rtas call.
This also avoids the complex rtas error logging which has more rtas calls
and includes kmalloc (which can return memory beyond
This allows rtas_args to be put on the machine check stack, which
avoids a lot of complications with re-entrancy deadlocks.
Reviewed-by: Christophe Leroy
Reviewed-by: Mahesh Salgaonkar
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/setup_64.c | 15 ---
1 file changed, 12
PAPR does not specify that fwnmi sreset should be interlocked, and
PowerVM (and therefore now QEMU) do not require it.
These "ibm,nmi-interlock" calls are ignored by firmware, but there
is a possibility that the sreset could have interrupted a machine
check and release the machine check's
If there is some error with the fwnmi save area, r3 has already been
modified which doesn't help with debugging.
Only update r3 when to restore the saved value.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/platforms/pseries/ras.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
This was discovered developing qemu fwnmi sreset support. This
off-by-one bug means the last 16 bytes of the rtas area can not
be used for a 16 byte save area.
It's not a serious bug, and QEMU implementation has to retain a
workaround for old kernels, but it's good to tighten it.
Acked-by:
In the interest of reducing code and possible failures in the
machine check and system reset paths, grab the "ibm,nmi-interlock"
token at init time.
Reviewed-by: Christophe Leroy
Reviewed-by: Mahesh Salgaonkar
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/firmware.h| 1 +
pseries fwnmi machine check code pops the soft-irq checks in rtas_call
(after the previous patch to remove rtas_token from this call path).
Rather than play whack a mole with these and forever having fragile
code, it seems better to have the early machine check handler perform
the same kind of
A spare interrupt stack slot is needed to save irq state when
reconciling NMIs (sreset and decrementer soft-nmi). _DAR is used
for this, but we want to reconcile machine checks as well, which
do use _DAR. Switch to using RESULT instead, as it's used by
system calls.
Signed-off-by: Nicholas Piggin
Acked-by: Mahesh Salgaonkar
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 4
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index bbf3109c5cba..3322000316ab 100644
---
The architecture allows for machine check exceptions to cause idle
wakeups which resume at the 0x200 address which has to return via
the idle wakeup code, but the early machine check handler is run
first.
The case of a no state-loss sleep is broken because the early
handler uses non-volatile
Since v3, I fixed a compile error and returned the generic machine check
exception handler to be NMI on 32 and 64e, as caught by Christophe's
review.
Also added the last patch, just found it by looking at the code, a
review for 32s would be good.
Thanks,
Nick
Nicholas Piggin (16):
is the first
> failure, so I'll report back if we see this again.
Thanks for the report.
There's nothing newly in next-20200507 that seems related.
Odd that it just showed up.
cheers
> -- Forwarded message -
> From: Travis CI
> Date: Thu, May 7, 2020 at 9:40 AM
There are multiple similar definitions for arch_clear_hugepage_flags() on
various platforms. Lets just add it's generic fallback definition for
platforms that do not override. This help reduce code duplication.
Cc: Russell King
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Tony Luck
Cc: Fenghua Yu
There are multiple similar definitions for is_hugepage_only_range() on
various platforms. Lets just add it's generic fallback definition for
platforms that do not override. This help reduce code duplication.
Cc: Russell King
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Tony Luck
Cc: Fenghua Yu
This series adds the following new generic fallbacks. Before that it drops
__HAVE_ARCH_HUGE_PTEP_GET from arm64 platform.
1. is_hugepage_only_range()
2. arch_clear_hugepage_flags()
This has been boot tested on arm64 and x86 platforms but built tested on
some more platforms including the changed
Hi mpe,
Could you please take some changes for the commit message.
In the patch title
s/a future ISA version/ISA v3.1/
On Wed, May 6, 2020 at 1:47 PM Jordan Niethe wrote:
>
> Add the BOUNDARY SRR1 bit definition for when the cause of an alignment
> exception is a prefixed instruction that
Hi mpe,
On Wed, May 6, 2020 at 1:45 PM Jordan Niethe wrote:
>
> Currently unsigned ints are used to represent instructions on powerpc.
> This has worked well as instructions have always been 4 byte words.
> However, a future ISA version will introduce some changes to
s/a future ISA version will
Hi "Aneesh,
I love your patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.7-rc4 next-20200507]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '-
On Wed, May 6, 2020 at 1:45 PM Jordan Niethe wrote:
>
> Currently unsigned ints are used to represent instructions on powerpc.
> This has worked well as instructions have always been 4 byte words.
> However, a future ISA version will introduce some changes to
> instructions that mean this scheme
From: Ira Weiny
Most architectures define kmap_prot to be PAGE_KERNEL.
Let sparc and xtensa define there own and define PAGE_KERNEL as the
default if not overridden.
Suggested-by: Christoph Hellwig
Signed-off-by: Ira Weiny
---
Changes from V3:
Fix semicolon in macro
Changes from
On Thu, May 07, 2020 at 01:53:07PM -0700, Andrew Morton wrote:
> On Thu, 7 May 2020 08:00:03 -0700 ira.we...@intel.com wrote:
>
> > From: Ira Weiny
> >
> > Most architectures define kmap_prot to be PAGE_KERNEL.
> >
> > Let sparc and xtensa define there own and define PAGE_KERNEL as the
> >
On Thu, May 07, 2020 at 01:52:58PM -0700, Andrew Morton wrote:
> On Thu, 7 May 2020 08:00:01 -0700 ira.we...@intel.com wrote:
>
> > parisc reimplements the kmap calls except to flush it's dcache. This is
> > arguably an abuse of kmap but regardless it is messy and confusing.
> >
> > Remove the
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:
struct foo {
int stuff;
struct boo array[];
};
By
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:
struct foo {
int stuff;
struct boo array[];
};
By
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:
struct foo {
int stuff;
struct boo array[];
};
By
On Thu, 7 May 2020 at 16:43, Greg Kroah-Hartman
wrote:
>
> > >
> > > Greg, 3f65047c853a ("of_mdio: add helper to deregister fixed-link
> > > PHYs") needs to be backported as well for these.
> > >
> > > Original series can be found here:
> > >
> > >
> > >
The Cyrus board has GPIO connected power-off and reset, add device tree
nodes describing them.
Signed-off-by: Darren Stevens
---
arch/powerpc/boot/dts/fsl/cyrus_p5020.dts | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts
The Cyrus P5040 does not currently have a dts file in Linux, Add one.
Signed-off-by: Darren Stevens
Tested-by: Christian Zigotzky
---
arch/powerpc/boot/dts/fsl/cyrus_p5040.dts | 235 ++
1 file changed, 235 insertions(+)
diff --git
in patch da414bb923d9 (Add FSL Qoriq DPAA FMan support to the SoC
device tree(s)) we added aliases for all ethernet ports, and linked
them to specific hardware devices, but we put them in the pre.dtsi
include file meaning any board wishing to use this file is stuck with
this port layout, even if
The Cyrus board has its HDD LED connected to a GPIO pin. Add a device
tree entry for this.
Signed-off-By: Darren Stevens
---
arch/powerpc/boot/dts/fsl/cyrus_p5020.dts | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts
The Cyrus P5020 board has 2 ethernet ports, add the required device tree
entries.
Signed-off-by: Darren Stevens
---
arch/powerpc/boot/dts/fsl/cyrus_p5020.dts | 39
+++ 1 file changed, 39 insertions(+)
diff --git a/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts
On Thu, 7 May 2020 08:00:03 -0700 ira.we...@intel.com wrote:
> From: Ira Weiny
>
> Most architectures define kmap_prot to be PAGE_KERNEL.
>
> Let sparc and xtensa define there own and define PAGE_KERNEL as the
> default if not overridden.
>
checkpatch considered useful ;)
From: Andrew
On Thu, 7 May 2020 08:00:01 -0700 ira.we...@intel.com wrote:
> parisc reimplements the kmap calls except to flush it's dcache. This is
> arguably an abuse of kmap but regardless it is messy and confusing.
>
> Remove the duplicate code and have parisc define
> ARCH_HAS_FLUSH_ON_KUNMAP for a
Hi,
On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote:
> Hi
>
> On 14.04.2020 17:34, Mike Rapoport wrote:
> > From: Mike Rapoport
> >
> > Implement primitives necessary for the 4th level folding, add walks of p4d
> > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK.
> >
Hi Christophe,
I love your patch! Yet something to improve:
[auto build test ERROR on v5.7-rc4]
[cannot apply to powerpc/next next-20200507]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify
From: Ira Weiny
Most architectures define kmap_prot to be PAGE_KERNEL.
Let sparc and xtensa define there own and define PAGE_KERNEL as the
default if not overridden.
Suggested-by: Christoph Hellwig
Signed-off-by: Ira Weiny
---
Changes from V2:
New Patch for this series
---
From: Ira Weiny
linux/highmem.h has not been needed for the pte_offset_map =>
kmap_atomic use in sparc for some time (~2002)
Remove this include.
Suggested-by: Al Viro
Signed-off-by: Ira Weiny
---
Changes from V2:
New Patch for this series
---
arch/sparc/mm/io-unit.c | 1 -
From: Ira Weiny
kmap_atomic_to_page() has no callers and is only defined on 1 arch and
declared on another. Remove it.
Suggested-by: Al Viro
Signed-off-by: Ira Weiny
---
Changes from V2:
New Patch for this series
---
arch/csky/include/asm/highmem.h | 1 -
arch/csky/mm/highmem.c
From: Ira Weiny
kmap_atomic_prot() is now exported by all architectures. Use this
function rather than open coding a driver specific kmap_atomic.
Acked-by: Daniel Vetter
Reviewed-by: Christian König
Reviewed-by: Christoph Hellwig
Signed-off-by: Ira Weiny
---
From: Ira Weiny
parisc reimplements the kmap calls except to flush it's dcache. This is
arguably an abuse of kmap but regardless it is messy and confusing.
Remove the duplicate code and have parisc define
ARCH_HAS_FLUSH_ON_KUNMAP for a kunmap_flush_on_unmap() architecture
specific call to
From: Ira Weiny
To support kmap_atomic_prot(), all architectures need to support
protections passed to their kmap_atomic_high() function. Pass
protections into kmap_atomic_high() and change the name to
kmap_atomic_high_prot() to match.
Then define kmap_atomic_prot() as a core function which
From: Ira Weiny
We want to support kmap_atomic_prot() on all architectures and it makes
sense to define kmap_atomic() to use the default kmap_prot.
So we ensure all arch's have a globally available kmap_prot either as a
define or exported symbol.
Reviewed-by: Christoph Hellwig
Signed-off-by:
From: Ira Weiny
To support kmap_atomic_prot() on all architectures each arch must
support protections passed in to them.
Change csky, mips, nds32 and xtensa to use their global constant
kmap_prot rather than a hard coded value which was equal.
Reviewed-by: Christoph Hellwig
Signed-off-by: Ira
From: Ira Weiny
Every arch has the same code to ensure atomic operations and a check for
!HIGHMEM page.
Remove the duplicate code by defining a core kmap_atomic() which only
calls the arch specific kmap_atomic_high() when the page is high memory.
Reviewed-by: Christoph Hellwig
Signed-off-by:
From: Ira Weiny
Every single architecture (including !CONFIG_HIGHMEM) calls...
pagefault_enable();
preempt_enable();
... before returning from __kunmap_atomic(). Lift this code into the
kunmap_atomic() macro.
While we are at it rename __kunmap_atomic() to kunmap_atomic_high()
From: Ira Weiny
All architectures do exactly the same thing for kunmap(); remove all the
duplicate definitions and lift the call to the core.
This also has the benefit of changing kmap_unmap() on a number of
architectures to be an inline call rather than an actual function.
Reviewed-by:
From: Ira Weiny
The kmap code for all the architectures is almost 100% identical.
Lift the common code to the core. Use ARCH_HAS_KMAP_FLUSH_TLB to
indicate if an arch defines kmap_flush_tlb() and call if if needed.
This also has the benefit of changing kmap() on a number of
architectures to
From: Ira Weiny
During this kmap() conversion series we must maintain bisect-ability.
To do this, kmap_atomic_prot() in x86, powerpc, and microblaze need to
remain functional.
Create a temporary inline version of kmap_atomic_prot within these
architectures so we can rework their kmap_atomic()
From: Ira Weiny
Move the kmap() build bug to kmap_init() to facilitate patches to lift
kmap() to the core.
Reviewed-by: Christoph Hellwig
Signed-off-by: Ira Weiny
---
Changes from V1:
combine code onto 1 line.
---
arch/xtensa/include/asm/highmem.h | 5 -
arch/xtensa/mm/highmem.c
From: Ira Weiny
The kmap infrastructure has been copied almost verbatim to every architecture.
This series consolidates obvious duplicated code by defining core functions
which call into the architectures only when needed.
Some of the k[un]map_atomic() implementations have some similarities but
From: Ira Weiny
Replace the use of BUG_ON(in_interrupt()) in the kmap() and kunmap()
in favor of might_sleep().
Besides the benefits of might_sleep(), this normalizes the
implementations such that they can be made generic in subsequent
patches.
Reviewed-by: Dan Williams
Reviewed-by: Christoph
From: Wen Xiong
Several device drivers hit EEH(Extended Error handling) when triggering
kdump on Pseries PowerVM. This patch implemented a reset of the PHBs
in pci general code. PHB reset stop all PCI transactions from previous
kernel. We have tested the patch in several enviroments:
- direct
"Aneesh Kumar K.V" writes:
> 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
> ---
>
Avoid updating address value in the loop. If in real mode, convert the address
outside the loop. Also, use ___va() to convert the real address that will
skip the input validation. We can get interrupts with IR=0 and with NIP
value > PAGE_OFFSET.
Signed-off-by: Aneesh Kumar K.V
---
Use the newly added helper.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/kernel/traps.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index a47fb49b7af8..503097c6aab2 100644
--- a/arch/powerpc/kernel/traps.c
On ppc64, __va(x) do check for input argument to be less than PAGE_OFFSET.
In certain code paths, we want to skip that check. Add a variant ___va(x)
to be used in such cases.
Switch the #define to static inline. __pa() still doesn't benefit from this. But
a static inline done in this patch is
On Thu, May 07, 2020 at 10:33:24PM +1000, Michael Ellerman wrote:
> The "m<>" constraint breaks compilation with GCC 4.6.x era compilers.
>
> The use of the constraint allows the compiler to use update-form
> instructions, however in practice current compilers never generate
> those forms for any
On 2020/5/5 16:39, Marc Zyngier wrote:
Hi Tianjia,
On 2020-04-27 05:35, Tianjia Zhang wrote:
In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu'
structure. For historical reasons, many kvm-related function parameters
retain the 'kvm_run' and 'kvm_vcpu' parameters at
The "m<>" constraint breaks compilation with GCC 4.6.x era compilers.
The use of the constraint allows the compiler to use update-form
instructions, however in practice current compilers never generate
those forms for any of the current uses of __put_user_asm_goto().
We anticipate that GCC 4.6
Hi
On 14.04.2020 17:34, Mike Rapoport wrote:
> From: Mike Rapoport
>
> Implement primitives necessary for the 4th level folding, add walks of p4d
> level where appropriate, and remove __ARCH_USE_5LEVEL_HACK.
>
> Signed-off-by: Mike Rapoport
Today I've noticed that kexec is broken on ARM 32bit.
On Thu, 7 May 2020 10:29:59 +0800, ChenTao wrote:
> Fix the following warning:
>
> sound/soc/fsl/fsl_asrc.c:157:5: warning:
> symbol 'fsl_asrc_request_pair' was not declared. Should it be static?
> sound/soc/fsl/fsl_asrc.c:200:6: warning:
> symbol 'fsl_asrc_release_pair' was not declared. Should
From: Nicholas Piggin
It's not very nice to zero trap for this, because then system calls no
longer have trap_is_syscall(regs) invariant, and we can't distinguish
between sc and scv system calls (in a later patch).
Take one last unused bit from the low bits of the pt_regs.trap word
for this
From: Nicholas Piggin
A new system call interrupt will be added with a new trap number.
Hide the explicit 0xc00 test behind an accessor to reduce churn
in callers.
Signed-off-by: Nicholas Piggin
[mpe: Make it a static inline]
Signed-off-by: Michael Ellerman
---
From: Nicholas Piggin
The pt_regs.trap field keeps 4 low bits for some metadata about the
trap or how it was handled, which is masked off in order to test the
architectural trap number.
Add a set_trap() accessor to set this, equivalent to TRAP() for
returning it. This is actually not quite the
From: Nicholas Piggin
Signed-off-by: Nicholas Piggin
Signed-off-by: Michael Ellerman
---
arch/powerpc/include/asm/ptrace.h | 23 ---
arch/powerpc/kernel/process.c | 2 +-
2 files changed, 17 insertions(+), 8 deletions(-)
v2: Unchanged.
diff --git
On Thu, May 07, 2020 at 08:47:34AM +0200, Greg Kroah-Hartman wrote:
> On Thu, May 07, 2020 at 08:44:12AM +0200, Johan Hovold wrote:
> > On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote:
> > > On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote:
> > > >
> > > > Make sure to deregister
On Thu, 07 May 2020 05:54:07 +0200,
Samuel Zou wrote:
>
> Fix the following coccinelle warnings:
>
> sound/ppc/pmac.c:729:57-58: WARNING: sum of probable bitmasks, consider |
> sound/ppc/pmac.c:229:37-38: WARNING: sum of probable bitmasks, consider |
>
> Reported-by: Hulk Robot
>
On Wed, Apr 29, 2020 at 09:42:39PM +1000, Michael Ellerman wrote:
> Christoph Hellwig writes:
> > On Tue, Apr 28, 2020 at 09:48:11PM +1000, Michael Ellerman wrote:
> >>
> >> This comes from fcheck_files() via fcheck().
> >>
> >> It's pretty clearly documented that fcheck() must be wrapped with
On Thu, May 07, 2020 at 08:44:12AM +0200, Johan Hovold wrote:
> On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote:
> > On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote:
> > >
> > > Make sure to deregister and free any fixed-link PHY registered using
> > > of_phy_register_fixed_link()
On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote:
> On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote:
> >
> > Make sure to deregister and free any fixed-link PHY registered using
> > of_phy_register_fixed_link() on probe errors and on driver unbind.
> >
> > Fixes: 83895bedeee6
76 matches
Mail list logo