* Re: [PATCH] powerpc/traps: fix recoverability of machine check handling on book3s/32
From: Michal Suchánek @ 2020-09-14 12:46 UTC (permalink / raw)
To: Michael Ellerman
Cc: Christophe Leroy, linux-kernel, Nicholas Piggin, Paul Mackerras,
linuxppc-dev
In-Reply-To: <87pn6sqweq.fsf@mpe.ellerman.id.au>
On Fri, Sep 11, 2020 at 11:23:57PM +1000, Michael Ellerman wrote:
> Michal Suchánek <msuchanek@suse.de> writes:
> > Hello,
> >
> > does this logic apply to "Unrecoverable System Reset" as well?
>
> Which logic do you mean?
>
> We do call die() before checking MSR_RI in system_reset_exception():
>
> /*
> * No debugger or crash dump registered, print logs then
> * panic.
> */
> die("System Reset", regs, SIGABRT);
>
> mdelay(2*MSEC_PER_SEC); /* Wait a little while for others to print */
> add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
> nmi_panic(regs, "System Reset");
>
> out:
> #ifdef CONFIG_PPC_BOOK3S_64
> BUG_ON(get_paca()->in_nmi == 0);
> if (get_paca()->in_nmi > 1)
> die("Unrecoverable nested System Reset", regs, SIGABRT);
> #endif
> /* Must die if the interrupt is not recoverable */
> if (!(regs->msr & MSR_RI))
> die("Unrecoverable System Reset", regs, SIGABRT);
>
>
> So you should see the output from die("System Reset", ...) even if
> MSR[RI] was clear when you took the system reset.
Indeed, replied to the wrong patch. I was looking at daf00ae71dad
("powerpc/traps: restore recoverability of machine_check interrupts")
which has very similar commit message.
Sorry about the confusion.
Thanks
Michal
>
> cheers
>
> > On Tue, Jan 22, 2019 at 02:11:24PM +0000, Christophe Leroy wrote:
> >> Looks like book3s/32 doesn't set RI on machine check, so
> >> checking RI before calling die() will always be fatal
> >> allthought this is not an issue in most cases.
> >>
> >> Fixes: b96672dd840f ("powerpc: Machine check interrupt is a non-maskable interrupt")
> >> Fixes: daf00ae71dad ("powerpc/traps: restore recoverability of machine_check interrupts")
> >> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> >> Cc: stable@vger.kernel.org
> >> ---
> >> arch/powerpc/kernel/traps.c | 8 ++++----
> >> 1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> >> index 64936b60d521..c740f8bfccc9 100644
> >> --- a/arch/powerpc/kernel/traps.c
> >> +++ b/arch/powerpc/kernel/traps.c
> >> @@ -763,15 +763,15 @@ void machine_check_exception(struct pt_regs *regs)
> >> if (check_io_access(regs))
> >> goto bail;
> >>
> >> - /* Must die if the interrupt is not recoverable */
> >> - if (!(regs->msr & MSR_RI))
> >> - nmi_panic(regs, "Unrecoverable Machine check");
> >> -
> >> if (!nested)
> >> nmi_exit();
> >>
> >> die("Machine check", regs, SIGBUS);
> >>
> >> + /* Must die if the interrupt is not recoverable */
> >> + if (!(regs->msr & MSR_RI))
> >> + nmi_panic(regs, "Unrecoverable Machine check");
> >> +
> >> return;
> >>
> >> bail:
> >> --
> >> 2.13.3
> >>
^ permalink raw reply
* Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race
From: Anatoly Pugachev @ 2020-09-14 10:23 UTC (permalink / raw)
To: Nicholas Piggin
Cc: Jens Axboe, linux-arch, Peter Zijlstra, Aneesh Kumar K . V,
Linux Kernel list, linux-mm, Sparc kernel list, Andrew Morton,
linuxppc-dev, David S . Miller
In-Reply-To: <1600066040.vnmz9nxhwt.astroid@bobo.none>
On Mon, Sep 14, 2020 at 10:00 AM Nicholas Piggin <npiggin@gmail.com> wrote:
>
> Excerpts from Nicholas Piggin's message of September 14, 2020 2:52 pm:
>
> [...]
>
> > The basic fix for sparc64 is to remove its mm_cpumask clearing code. The
> > optimisation could be effectively restored by sending IPIs to mm_cpumask
> > members and having them remove themselves from mm_cpumask. This is more
> > tricky so I leave it as an exercise for someone with a sparc64 SMP.
> > powerpc has a (currently similarly broken) example.
>
> So this compiles and boots on qemu, but qemu does not support any
> sparc64 machines with SMP. Attempting some simple hacks doesn't get
> me far because openbios isn't populating an SMP device tree, which
> blows up everywhere.
>
> The patch is _relatively_ simple, hopefully it shouldn't explode, so
> it's probably ready for testing on real SMP hardware, if someone has
> a few cycles.
Nick,
applied this patch to over 'v5.9-rc5' tag , used my test VM (ldom)
with 32 vcpus.
Machine boot, stress-ng test ( run as
"stress-ng --cpu 8 --io 8 --vm 8 --vm-bytes 2G --fork 8 --timeout 15m" )
finishes without errors.
^ permalink raw reply
* [PATCH -next] drivers/macintosh/smu.c: Fix undeclared symbol warning
From: Wang Wensheng @ 2020-09-14 12:26 UTC (permalink / raw)
To: benh, gustavoars, linuxppc-dev, linux-kernel
Make kernel with `C=2`:
drivers/macintosh/smu.c:1018:30: warning: symbol
'__smu_get_sdb_partition' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
drivers/macintosh/smu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 96684581a25d..bae94caaad5c 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -1015,7 +1015,7 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id)
/* Note: Only allowed to return error code in pointers (using ERR_PTR)
* when interruptible is 1
*/
-const struct smu_sdbp_header *__smu_get_sdb_partition(int id,
+static const struct smu_sdbp_header *__smu_get_sdb_partition(int id,
unsigned int *size, int interruptible)
{
char pname[32];
--
2.25.0
^ permalink raw reply related
* Re: [PATCH v2] powerpc/papr_scm: Fix warning triggered by perf_stats_show()
From: Ira Weiny @ 2020-09-14 16:56 UTC (permalink / raw)
To: Vaibhav Jain
Cc: Santosh Sivaraj, linux-nvdimm, Aneesh Kumar K . V,
Oliver O'Halloran, Dan Williams, linuxppc-dev
In-Reply-To: <20200912081451.66225-1-vaibhav@linux.ibm.com>
On Sat, Sep 12, 2020 at 01:44:51PM +0530, Vaibhav Jain wrote:
> A warning is reported by the kernel in case perf_stats_show() returns
> an error code. The warning is of the form below:
>
> papr_scm ibm,persistent-memory:ibm,pmemory@44100001:
> Failed to query performance stats, Err:-10
> dev_attr_show: perf_stats_show+0x0/0x1c0 [papr_scm] returned bad count
> fill_read_buffer: dev_attr_show+0x0/0xb0 returned bad count
>
> On investigation it looks like that the compiler is silently truncating the
> return value of drc_pmem_query_stats() from 'long' to 'int', since the
> variable used to store the return code 'rc' is an 'int'. This
> truncated value is then returned back as a 'ssize_t' back from
> perf_stats_show() to 'dev_attr_show()' which thinks of it as a large
> unsigned number and triggers this warning..
>
> To fix this we update the type of variable 'rc' from 'int' to
> 'ssize_t' that prevents the compiler from truncating the return value
> of drc_pmem_query_stats() and returning correct signed value back from
> perf_stats_show().
>
> Fixes: 2d02bf835e573 ('powerpc/papr_scm: Fetch nvdimm performance
> stats from PHYP')
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> ---
> Changelog:
>
> v2: Added an explicit cast to the expression calling 'seq_buf_used()'
> and triggering this issue. [ Ira ]
> ---
> arch/powerpc/platforms/pseries/papr_scm.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
> index a88a707a608aa..5493bc847bd08 100644
> --- a/arch/powerpc/platforms/pseries/papr_scm.c
> +++ b/arch/powerpc/platforms/pseries/papr_scm.c
> @@ -785,7 +785,8 @@ static int papr_scm_ndctl(struct nvdimm_bus_descriptor *nd_desc,
> static ssize_t perf_stats_show(struct device *dev,
> struct device_attribute *attr, char *buf)
> {
> - int index, rc;
> + int index;
> + ssize_t rc;
> struct seq_buf s;
> struct papr_scm_perf_stat *stat;
> struct papr_scm_perf_stats *stats;
> @@ -820,7 +821,7 @@ static ssize_t perf_stats_show(struct device *dev,
>
> free_stats:
> kfree(stats);
> - return rc ? rc : seq_buf_used(&s);
> + return rc ? rc : (ssize_t)seq_buf_used(&s);
> }
> DEVICE_ATTR_ADMIN_RO(perf_stats);
>
> --
> 2.26.2
>
^ permalink raw reply
* Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race
From: David Miller @ 2020-09-14 19:59 UTC (permalink / raw)
To: npiggin
Cc: linux-arch, axboe, peterz, aneesh.kumar, linux-kernel, linux-mm,
sparclinux, akpm, linuxppc-dev
In-Reply-To: <20200914045219.3736466-4-npiggin@gmail.com>
From: Nicholas Piggin <npiggin@gmail.com>
Date: Mon, 14 Sep 2020 14:52:18 +1000
...
> The basic fix for sparc64 is to remove its mm_cpumask clearing code. The
> optimisation could be effectively restored by sending IPIs to mm_cpumask
> members and having them remove themselves from mm_cpumask. This is more
> tricky so I leave it as an exercise for someone with a sparc64 SMP.
> powerpc has a (currently similarly broken) example.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Sad to see this optimization go away, but what can I do:
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [PATCH 13/15] selftests/seccomp: powerpc: Set syscall return during ptrace syscall exit
From: Kees Cook @ 2020-09-14 20:20 UTC (permalink / raw)
To: Michael Ellerman
Cc: Thadeu Lima de Souza Cascardo, Will Drewry, linux-xtensa,
linux-kernel, Andy Lutomirski, Max Filippov, linux-arm-kernel,
linux-kselftest, linux-mips, linuxppc-dev, Christian Brauner
In-Reply-To: <87zh5sq59a.fsf@mpe.ellerman.id.au>
On Mon, Sep 14, 2020 at 03:47:13PM +1000, Michael Ellerman wrote:
> Kees Cook <keescook@chromium.org> writes:
> > Some archs (like ppc) only support changing the return code during
> > syscall exit when ptrace is used. As the syscall number might not
> > be available anymore during syscall exit, it needs to be saved
> > during syscall enter. Adjust the ptrace tests to do this.
>
> I'm not that across all the fixture stuff, but if I'm reading it right
> you're now calling change_syscall() on both entry and exit for all
> arches.
Correct.
> That should work, but it no longer tests changing the return code on
> entry on the arches that support it, which seems like a backward step?
That's a good point. I wouldn't be in a position to notice a regression
for the other architectures. I will refactor this one...
--
Kees Cook
^ permalink raw reply
* Re: [PATCH 00/15] selftests/seccomp: Refactor change_syscall()
From: Kees Cook @ 2020-09-14 20:32 UTC (permalink / raw)
To: Michael Ellerman
Cc: Thadeu Lima de Souza Cascardo, Will Drewry, linux-xtensa,
linux-kernel, Andy Lutomirski, Max Filippov, linux-arm-kernel,
linux-kselftest, linux-mips, linuxppc-dev, Christian Brauner
In-Reply-To: <87wo0wpnah.fsf@mpe.ellerman.id.au>
On Mon, Sep 14, 2020 at 10:15:18PM +1000, Michael Ellerman wrote:
> Kees Cook <keescook@chromium.org> writes:
> > Hi,
> >
> > This refactors the seccomp selftest macros used in change_syscall(),
> > in an effort to remove special cases for mips, arm, arm64, and xtensa,
> > which paves the way for powerpc fixes.
> >
> > I'm not entirely done testing, but all-arch build tests and x86_64
> > selftests pass. I'll be doing arm, arm64, and i386 selftests shortly,
> > but I currently don't have an easy way to check xtensa, mips, nor
> > powerpc. Any help there would be appreciated!
>
> The series builds fine for me, and all the tests pass (see below).
>
> Thanks for picking up those changes to deal with powerpc being oddball.
>
> Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Awesome; thanks!
However...
>
> cheers
>
>
> ./seccomp_bpf
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> # RUN global.kcmp ...
> # OK global.kcmp
> ok 1 global.kcmp
> [...]
> # RUN global.KILL_thread ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
Was this a mis-paste, or has something very very bad happened here in
global.KILL_one_arg_six finishes?
> # RUN global.kcmp ...
> # OK global.kcmp
> ok 1 global.kcmp
> [...]
> # RUN global.user_notification_basic ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_basic ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_signal ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_closed_listener ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_child_pid_ns ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_sibling_pid_ns ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_sibling_pid_ns ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_sibling_pid_ns ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_fault_recv ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_continue ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_filter_empty ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_filter_empty_threaded ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_addfd ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # RUN global.user_notification_addfd_rlimit ...
> TAP version 13
> 1..86
> # Starting 86 tests from 7 test cases.
> [...]
> # PASSED: 86 / 86 tests passed.
> # Totals: pass:86 fail:0 xfail:0 xpass:0 skip:0 error:0
And after every user_notification test? O_O
--
Kees Cook
^ permalink raw reply
* [PATCH v2 4/7] powerpc/xive: Make debug routines static
From: Cédric Le Goater @ 2020-09-14 21:10 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Christophe Leroy, linuxppc-dev, Cédric Le Goater
In-Reply-To: <20200914211007.2285999-1-clg@kaod.org>
This fixes a compile error with W=1.
CC arch/powerpc/sysdev/xive/common.o
../arch/powerpc/sysdev/xive/common.c:1568:6: error: no previous prototype for ‘xive_debug_show_cpu’ [-Werror=missing-prototypes]
void xive_debug_show_cpu(struct seq_file *m, int cpu)
^~~~~~~~~~~~~~~~~~~
../arch/powerpc/sysdev/xive/common.c:1602:6: error: no previous prototype for ‘xive_debug_show_irq’ [-Werror=missing-prototypes]
void xive_debug_show_irq(struct seq_file *m, u32 hw_irq, struct irq_data *d)
^~~~~~~~~~~~~~~~~~~
Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/sysdev/xive/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index f591be9f01f4..a80440af491a 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -1565,7 +1565,7 @@ static int __init xive_off(char *arg)
}
__setup("xive=off", xive_off);
-void xive_debug_show_cpu(struct seq_file *m, int cpu)
+static void xive_debug_show_cpu(struct seq_file *m, int cpu)
{
struct xive_cpu *xc = per_cpu(xive_cpu, cpu);
@@ -1599,7 +1599,7 @@ void xive_debug_show_cpu(struct seq_file *m, int cpu)
seq_puts(m, "\n");
}
-void xive_debug_show_irq(struct seq_file *m, u32 hw_irq, struct irq_data *d)
+static void xive_debug_show_irq(struct seq_file *m, u32 hw_irq, struct irq_data *d)
{
struct irq_chip *chip = irq_data_get_irq_chip(d);
int rc;
--
2.25.4
^ permalink raw reply related
* [PATCH v2 0/7] powerpc: Fix a few W=1 compile warnings
From: Cédric Le Goater @ 2020-09-14 21:10 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Christophe Leroy, linuxppc-dev, Cédric Le Goater
Hello,
Here is a small contribution improving compile with W=1.
Thanks,
C.
Changes in v2:
- Better commit logs
- Reworked early_reserve_mem() in prom
- Remove if statement in sstep
Cédric Le Goater (7):
powerpc/sysfs: Remove unused 'err' variable in
sysfs_create_dscr_default()
powerpc/prom: Introduce early_reserve_mem_old()
powerpc/sstep: Remove empty if statement checking for invalid form
powerpc/xive: Make debug routines static
powerpc/powernv/pci: Remove unused variable 'parent' in
pnv_ioda_configure_pe()
powerpc/perf: Remove unused variable 'target' in
trace_imc_event_init()
powerpc/32: Declare stack_overflow_exception() prototype
arch/powerpc/include/asm/asm-prototypes.h | 1 +
arch/powerpc/kernel/prom.c | 37 ++++++++++++-----------
arch/powerpc/kernel/sysfs.c | 3 +-
arch/powerpc/lib/sstep.c | 9 ++++--
arch/powerpc/perf/imc-pmu.c | 3 --
arch/powerpc/platforms/powernv/pci-ioda.c | 8 -----
arch/powerpc/sysdev/xive/common.c | 4 +--
7 files changed, 30 insertions(+), 35 deletions(-)
--
2.25.4
^ permalink raw reply
* [PATCH v2 2/7] powerpc/prom: Introduce early_reserve_mem_old()
From: Cédric Le Goater @ 2020-09-14 21:10 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Christophe Leroy, linuxppc-dev, Cédric Le Goater
In-Reply-To: <20200914211007.2285999-1-clg@kaod.org>
and condition its call with IS_ENABLED(CONFIG_PPC32). This fixes a
compile error with W=1.
arch/powerpc/kernel/prom.c: In function ‘early_reserve_mem’:
arch/powerpc/kernel/prom.c:625:10: error: variable ‘reserve_map’ set but not used [-Werror=unused-but-set-variable]
__be64 *reserve_map;
^~~~~~~~~~~
cc1: all warnings being treated as errors
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/kernel/prom.c | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index d8a2fb87ba0c..c958b67cf1a5 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -620,27 +620,14 @@ static void __init early_reserve_mem_dt(void)
}
}
-static void __init early_reserve_mem(void)
+static void __init early_reserve_mem_old(void)
{
__be64 *reserve_map;
reserve_map = (__be64 *)(((unsigned long)initial_boot_params) +
fdt_off_mem_rsvmap(initial_boot_params));
- /* Look for the new "reserved-regions" property in the DT */
- early_reserve_mem_dt();
-
-#ifdef CONFIG_BLK_DEV_INITRD
- /* Then reserve the initrd, if any */
- if (initrd_start && (initrd_end > initrd_start)) {
- memblock_reserve(ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE),
- ALIGN(initrd_end, PAGE_SIZE) -
- ALIGN_DOWN(initrd_start, PAGE_SIZE));
- }
-#endif /* CONFIG_BLK_DEV_INITRD */
-
-#ifdef CONFIG_PPC32
- /*
+ /*
* Handle the case where we might be booting from an old kexec
* image that setup the mem_rsvmap as pairs of 32-bit values
*/
@@ -658,9 +645,25 @@ static void __init early_reserve_mem(void)
DBG("reserving: %x -> %x\n", base_32, size_32);
memblock_reserve(base_32, size_32);
}
- return;
}
-#endif
+}
+
+static void __init early_reserve_mem(void)
+{
+ /* Look for the new "reserved-regions" property in the DT */
+ early_reserve_mem_dt();
+
+#ifdef CONFIG_BLK_DEV_INITRD
+ /* Then reserve the initrd, if any */
+ if (initrd_start && (initrd_end > initrd_start)) {
+ memblock_reserve(ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE),
+ ALIGN(initrd_end, PAGE_SIZE) -
+ ALIGN_DOWN(initrd_start, PAGE_SIZE));
+ }
+#endif /* CONFIG_BLK_DEV_INITRD */
+
+ if (IS_ENABLED(CONFIG_PPC32))
+ early_reserve_mem_old();
}
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
--
2.25.4
^ permalink raw reply related
* [PATCH v2 3/7] powerpc/sstep: Remove empty if statement checking for invalid form
From: Cédric Le Goater @ 2020-09-14 21:10 UTC (permalink / raw)
To: Michael Ellerman
Cc: Christophe Leroy, Jordan Niethe, linuxppc-dev,
Cédric Le Goater
In-Reply-To: <20200914211007.2285999-1-clg@kaod.org>
The check should be performed by the caller. This fixes a compile
error with W=1.
../arch/powerpc/lib/sstep.c: In function ‘mlsd_8lsd_ea’:
../arch/powerpc/lib/sstep.c:225:3: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
; /* Invalid form. Should already be checked for by caller! */
^
Cc: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/lib/sstep.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index caee8cc77e19..e9dcaba9a4f8 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -219,10 +219,13 @@ static nokprobe_inline unsigned long mlsd_8lsd_ea(unsigned int instr,
ea += regs->gpr[ra];
else if (!prefix_r && !ra)
; /* Leave ea as is */
- else if (prefix_r && !ra)
+ else if (prefix_r)
ea += regs->nip;
- else if (prefix_r && ra)
- ; /* Invalid form. Should already be checked for by caller! */
+
+ /*
+ * (prefix_r && ra) is an invalid form. Should already be
+ * checked for by caller!
+ */
return ea;
}
--
2.25.4
^ permalink raw reply related
* [PATCH v2 5/7] powerpc/powernv/pci: Remove unused variable 'parent' in pnv_ioda_configure_pe()
From: Cédric Le Goater @ 2020-09-14 21:10 UTC (permalink / raw)
To: Michael Ellerman
Cc: Christophe Leroy, Oliver O'Halloran, linuxppc-dev,
Cédric Le Goater
In-Reply-To: <20200914211007.2285999-1-clg@kaod.org>
This fixes a compile error with W=1.
CC arch/powerpc/platforms/powernv/pci-ioda.o
../arch/powerpc/platforms/powernv/pci-ioda.c: In function ‘pnv_ioda_configure_pe’:
../arch/powerpc/platforms/powernv/pci-ioda.c:897:18: error: variable ‘parent’ set but not used [-Werror=unused-but-set-variable]
struct pci_dev *parent;
^~~~~~
Cc: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 023a4f987bb2..2b4ceb5e6ce4 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -894,7 +894,6 @@ int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
{
- struct pci_dev *parent;
uint8_t bcomp, dcomp, fcomp;
long rc, rid_end, rid;
@@ -904,7 +903,6 @@ int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER;
fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER;
- parent = pe->pbus->self;
if (pe->flags & PNV_IODA_PE_BUS_ALL)
count = resource_size(&pe->pbus->busn_res);
else
@@ -925,12 +923,6 @@ int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
}
rid_end = pe->rid + (count << 8);
} else {
-#ifdef CONFIG_PCI_IOV
- if (pe->flags & PNV_IODA_PE_VF)
- parent = pe->parent_dev;
- else
-#endif /* CONFIG_PCI_IOV */
- parent = pe->pdev->bus->self;
bcomp = OpalPciBusAll;
dcomp = OPAL_COMPARE_RID_DEVICE_NUMBER;
fcomp = OPAL_COMPARE_RID_FUNCTION_NUMBER;
--
2.25.4
^ permalink raw reply related
* [PATCH v2 1/7] powerpc/sysfs: Remove unused 'err' variable in sysfs_create_dscr_default()
From: Cédric Le Goater @ 2020-09-14 21:10 UTC (permalink / raw)
To: Michael Ellerman
Cc: Christophe Leroy, Madhavan Srinivasan, linuxppc-dev,
Cédric Le Goater
In-Reply-To: <20200914211007.2285999-1-clg@kaod.org>
This fixes a compile error with W=1.
arch/powerpc/kernel/sysfs.c: In function ‘sysfs_create_dscr_default’:
arch/powerpc/kernel/sysfs.c:228:7: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
int err = 0;
^~~
cc1: all warnings being treated as errors
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/kernel/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 46b4ebc33db7..821a3dc4c924 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -225,14 +225,13 @@ static DEVICE_ATTR(dscr_default, 0600,
static void sysfs_create_dscr_default(void)
{
if (cpu_has_feature(CPU_FTR_DSCR)) {
- int err = 0;
int cpu;
dscr_default = spr_default_dscr;
for_each_possible_cpu(cpu)
paca_ptrs[cpu]->dscr_default = dscr_default;
- err = device_create_file(cpu_subsys.dev_root, &dev_attr_dscr_default);
+ device_create_file(cpu_subsys.dev_root, &dev_attr_dscr_default);
}
}
#endif /* CONFIG_PPC64 */
--
2.25.4
^ permalink raw reply related
* [PATCH v2 6/7] powerpc/perf: Remove unused variable 'target' in trace_imc_event_init()
From: Cédric Le Goater @ 2020-09-14 21:10 UTC (permalink / raw)
To: Michael Ellerman
Cc: Christophe Leroy, Anju T Sudhakar, linuxppc-dev,
Cédric Le Goater
In-Reply-To: <20200914211007.2285999-1-clg@kaod.org>
This fixes a compile error with W=1.
CC arch/powerpc/perf/imc-pmu.o
../arch/powerpc/perf/imc-pmu.c: In function ‘trace_imc_event_init’:
../arch/powerpc/perf/imc-pmu.c:1429:22: error: variable ‘target’ set but not used [-Werror=unused-but-set-variable]
struct task_struct *target;
^~~~~~
Cc: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/perf/imc-pmu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c
index 62d0b54086f8..9ed4fcccf8a9 100644
--- a/arch/powerpc/perf/imc-pmu.c
+++ b/arch/powerpc/perf/imc-pmu.c
@@ -1426,8 +1426,6 @@ static void trace_imc_event_del(struct perf_event *event, int flags)
static int trace_imc_event_init(struct perf_event *event)
{
- struct task_struct *target;
-
if (event->attr.type != event->pmu->type)
return -ENOENT;
@@ -1458,7 +1456,6 @@ static int trace_imc_event_init(struct perf_event *event)
mutex_unlock(&imc_global_refc.lock);
event->hw.idx = -1;
- target = event->hw.target;
event->pmu->task_ctx_nr = perf_hw_context;
event->destroy = reset_global_refc;
--
2.25.4
^ permalink raw reply related
* [PATCH v2 7/7] powerpc/32: Declare stack_overflow_exception() prototype
From: Cédric Le Goater @ 2020-09-14 21:10 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Christophe Leroy, linuxppc-dev, Cédric Le Goater
In-Reply-To: <20200914211007.2285999-1-clg@kaod.org>
This fixes a compile error with W=1.
CC arch/powerpc/kernel/traps.o
../arch/powerpc/kernel/traps.c:1663:6: error: no previous prototype for ‘stack_overflow_exception’ [-Werror=missing-prototypes]
void stack_overflow_exception(struct pt_regs *regs)
^~~~~~~~~~~~~~~~~~~~~~~~
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 3978eb78517c ("powerpc/32: Add early stack overflow detection with VMAP stack.")
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/include/asm/asm-prototypes.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
index de14b1a34d56..4957119604c7 100644
--- a/arch/powerpc/include/asm/asm-prototypes.h
+++ b/arch/powerpc/include/asm/asm-prototypes.h
@@ -67,6 +67,7 @@ void single_step_exception(struct pt_regs *regs);
void program_check_exception(struct pt_regs *regs);
void alignment_exception(struct pt_regs *regs);
void StackOverflow(struct pt_regs *regs);
+void stack_overflow_exception(struct pt_regs *regs);
void kernel_fp_unavailable_exception(struct pt_regs *regs);
void altivec_unavailable_exception(struct pt_regs *regs);
void vsx_unavailable_exception(struct pt_regs *regs);
--
2.25.4
^ permalink raw reply related
* [PATCH] ASoC: fsl_audmix: make clock and output src write only
From: Viorel Suman (OSS) @ 2020-09-14 17:24 UTC (permalink / raw)
To: Timur Tabi, Nicolin Chen, Xiubo Li, Fabio Estevam, Shengjiu Wang,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linuxppc-dev, linux-kernel
Cc: Viorel Suman, NXP Linux Team, Viorel Suman
From: Viorel Suman <viorel.suman@nxp.com>
"alsactl -f state.conf store/restore" sequence fails because setting
"mixing clock source" and "output source" requires active TDM clock
being started for configuration propagation. Make these two controls
write only so that their values are not stored at "alsactl store".
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
---
sound/soc/fsl/fsl_audmix.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
index a447baf..7ad5925 100644
--- a/sound/soc/fsl/fsl_audmix.c
+++ b/sound/soc/fsl/fsl_audmix.c
@@ -199,10 +199,18 @@ static int fsl_audmix_put_out_src(struct snd_kcontrol *kcontrol,
static const struct snd_kcontrol_new fsl_audmix_snd_controls[] = {
/* FSL_AUDMIX_CTR controls */
- SOC_ENUM_EXT("Mixing Clock Source", fsl_audmix_enum[0],
- snd_soc_get_enum_double, fsl_audmix_put_mix_clk_src),
- SOC_ENUM_EXT("Output Source", fsl_audmix_enum[1],
- snd_soc_get_enum_double, fsl_audmix_put_out_src),
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Mixing Clock Source",
+ .info = snd_soc_info_enum_double,
+ .access = SNDRV_CTL_ELEM_ACCESS_WRITE,
+ .put = fsl_audmix_put_mix_clk_src,
+ .private_value = (unsigned long)&fsl_audmix_enum[0] },
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Output Source",
+ .info = snd_soc_info_enum_double,
+ .access = SNDRV_CTL_ELEM_ACCESS_WRITE,
+ .put = fsl_audmix_put_out_src,
+ .private_value = (unsigned long)&fsl_audmix_enum[1] },
SOC_ENUM("Output Width", fsl_audmix_enum[2]),
SOC_ENUM("Frame Rate Diff Error", fsl_audmix_enum[3]),
SOC_ENUM("Clock Freq Diff Error", fsl_audmix_enum[4]),
--
2.7.4
^ permalink raw reply related
* [PATCH net] ibmvnic: update MAINTAINERS
From: Dany Madden @ 2020-09-15 0:35 UTC (permalink / raw)
To: davem; +Cc: Dany Madden, netdev, linuxppc-dev
Update supporters for IBM Power SRIOV Virtual NIC Device Driver.
Thomas Falcon is moving on to other works. Dany Madden, Lijun Pan
and Sukadev Bhattiprolu are the current supporters.
Signed-off-by: Dany Madden <drt@linux.ibm.com>
---
MAINTAINERS | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 2783a5f68d2c..923c69ad4eec 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8315,7 +8315,9 @@ S: Supported
F: drivers/pci/hotplug/rpaphp*
IBM Power SRIOV Virtual NIC Device Driver
-M: Thomas Falcon <tlfalcon@linux.ibm.com>
+M: Dany Madden <drt@linux.ibm.com>
+M: Lijun Pan <ljp@linux.ibm.com>
+M: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
L: netdev@vger.kernel.org
S: Supported
F: drivers/net/ethernet/ibm/ibmvnic.*
--
2.18.2
^ permalink raw reply related
* Re: [PATCH v3 1/5] dt-bindings: powerpc: define apm,apm82181 binding
From: Rob Herring @ 2020-09-15 1:02 UTC (permalink / raw)
To: Christian Lamparter; +Cc: devicetree, Chris Blake, Paul Mackerras, linuxppc-dev
In-Reply-To: <aa51a2aaffcbf98c90d378f6f6c7b926989b6c27.1599343429.git.chunkeey@gmail.com>
On Sun, Sep 06, 2020 at 12:06:11AM +0200, Christian Lamparter wrote:
> make a binding for the various boards based on the
> AppliedMicro/APM APM82181 SoC.
>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> ---
> .../bindings/powerpc/4xx/apm,apm82181.yaml | 29 +++++++++++++++++++
> 1 file changed, 29 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/powerpc/4xx/apm,apm82181.yaml
>
> diff --git a/Documentation/devicetree/bindings/powerpc/4xx/apm,apm82181.yaml b/Documentation/devicetree/bindings/powerpc/4xx/apm,apm82181.yaml
> new file mode 100644
> index 000000000000..03a3c02fe920
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/powerpc/4xx/apm,apm82181.yaml
> @@ -0,0 +1,29 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/powerpc/4xx/apm,apm82181.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: APM APM82181 device tree bindings
> +
> +description:
> + AppliedMicro APM82181 Wi-Fi/network SoCs based
> + on the PPC464-CPU architecture.
> +
> +maintainers:
> + - Christian Lamparter <chunkeey@gmail.com>
> +
> +properties:
> + $nodename:
> + const: '/'
> + compatible:
> + oneOf:
> + - description: APM82181 based boards
> + items:
> + - enum:
> + - apm,bluestone
> + - meraki,mr24
> + - wd,mybooklive
> + - const: amcc,apm82181
This doesn't match neither the existing dts nor your modifications.
^ permalink raw reply
* Re: [PATCH v3 2/5] powerpc: apm82181: create shared dtsi for APM bluestone
From: Rob Herring @ 2020-09-15 1:05 UTC (permalink / raw)
To: Christian Lamparter; +Cc: devicetree, Chris Blake, Paul Mackerras, linuxppc-dev
In-Reply-To: <47109d80c7bd481c7747c949e8a3ecd498d9c039.1599343429.git.chunkeey@gmail.com>
On Sun, Sep 06, 2020 at 12:06:12AM +0200, Christian Lamparter wrote:
> This patch adds an DTSI-File that can be used by various device-tree
> files for APM82181-based devices.
>
> Some of the nodes (like UART, PCIE, SATA) are used by the uboot and
> need to stick with the naming-conventions of the old times'.
> I've added comments whenever this was the case.
>
> Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> ---
> rfc v1 -> v2:
> - removed PKA (this CryptoPU will need driver)
> - stick with compatibles, nodes, ... from either
> Bluestone (APM82181) or Canyonlands (PPC460EX).
> - add labels for NAND and NOR to help with access.
> v2 -> v3:
> - nodename of pciex@d.... was changed to pcie@d..
> due to upstream patch.
> - use simple-bus on the ebc, opb and plb nodes
> ---
> arch/powerpc/boot/dts/apm82181.dtsi | 466 ++++++++++++++++++++++++++++
> 1 file changed, 466 insertions(+)
> create mode 100644 arch/powerpc/boot/dts/apm82181.dtsi
>
> diff --git a/arch/powerpc/boot/dts/apm82181.dtsi b/arch/powerpc/boot/dts/apm82181.dtsi
> new file mode 100644
> index 000000000000..60283430978d
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/apm82181.dtsi
> @@ -0,0 +1,466 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Device Tree template include for various APM82181 boards.
> + *
> + * The SoC is an evolution of the PPC460EX predecessor.
> + * This is why dt-nodes from the canyonlands EBC, OPB, USB,
> + * DMA, SATA, EMAC, ... ended up in here.
> + *
> + * Copyright (c) 2010, Applied Micro Circuits Corporation
> + * Author: Tirumala R Marri <tmarri@apm.com>,
> + * Christian Lamparter <chunkeey@gmail.com>,
> + * Chris Blake <chrisrblake93@gmail.com>
> + */
> +
> +#include <dt-bindings/dma/dw-dmac.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> + #address-cells = <2>;
> + #size-cells = <1>;
> + dcr-parent = <&{/cpus/cpu@0}>;
> +
> + aliases {
> + ethernet0 = &EMAC0; /* needed for BSP u-boot */
> + };
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + CPU0: cpu@0 {
> + device_type = "cpu";
> + model = "PowerPC,apm82181";
This doesn't match the existing bluestone dts file.
Please separate any restructuring from changes.
^ permalink raw reply
* Re: [PATCH v2 1/4] mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race
From: Nicholas Piggin @ 2020-09-15 2:48 UTC (permalink / raw)
To: peterz
Cc: Jens Axboe, linux-arch, linux-mm @ kvack . org,
Aneesh Kumar K . V, linux-kernel, Andy Lutomirski, Dave Hansen,
sparclinux, Andrew Morton, linuxppc-dev, David S . Miller
In-Reply-To: <20200914105617.GP1362448@hirez.programming.kicks-ass.net>
Excerpts from peterz@infradead.org's message of September 14, 2020 8:56 pm:
> On Mon, Sep 14, 2020 at 02:52:16PM +1000, Nicholas Piggin wrote:
>> Reading and modifying current->mm and current->active_mm and switching
>> mm should be done with irqs off, to prevent races seeing an intermediate
>> state.
>>
>> This is similar to commit 38cf307c1f20 ("mm: fix kthread_use_mm() vs TLB
>> invalidate"). At exec-time when the new mm is activated, the old one
>> should usually be single-threaded and no longer used, unless something
>> else is holding an mm_users reference (which may be possible).
>>
>> Absent other mm_users, there is also a race with preemption and lazy tlb
>> switching. Consider the kernel_execve case where the current thread is
>> using a lazy tlb active mm:
>>
>> call_usermodehelper()
>> kernel_execve()
>> old_mm = current->mm;
>> active_mm = current->active_mm;
>> *** preempt *** --------------------> schedule()
>> prev->active_mm = NULL;
>> mmdrop(prev active_mm);
>> ...
>> <-------------------- schedule()
>> current->mm = mm;
>> current->active_mm = mm;
>> if (!old_mm)
>> mmdrop(active_mm);
>>
>> If we switch back to the kernel thread from a different mm, there is a
>> double free of the old active_mm, and a missing free of the new one.
>>
>> Closing this race only requires interrupts to be disabled while ->mm
>> and ->active_mm are being switched, but the TLB problem requires also
>> holding interrupts off over activate_mm. Unfortunately not all archs
>> can do that yet, e.g., arm defers the switch if irqs are disabled and
>> expects finish_arch_post_lock_switch() to be called to complete the
>> flush; um takes a blocking lock in activate_mm().
>>
>> So as a first step, disable interrupts across the mm/active_mm updates
>> to close the lazy tlb preempt race, and provide an arch option to
>> extend that to activate_mm which allows architectures doing IPI based
>> TLB shootdowns to close the second race.
>>
>> This is a bit ugly, but in the interest of fixing the bug and backporting
>> before all architectures are converted this is a compromise.
>>
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>
> I'm thinking we want this selected on x86 as well. Andy?
Thanks for the ack. The plan was to take it through the powerpc tree,
but if you'd want x86 to select it, maybe a topic branch? Although
Michael will be away during the next merge window so I don't want to
get too fancy. Would you mind doing it in a follow up merge after
powerpc, being that it's (I think) a small change?
I do think all archs should be selecting this, and we want to remove
the divergent code paths from here as soon as possible. I was planning
to send patches for the N+1 window at least for all the easy archs.
But the sooner the better really, we obviously want to share code
coverage with x86 :)
Thanks,
Nick
^ permalink raw reply
* Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race
From: Nicholas Piggin @ 2020-09-15 2:49 UTC (permalink / raw)
To: Anatoly Pugachev
Cc: Jens Axboe, linux-arch, Peter Zijlstra, Aneesh Kumar K . V,
Linux Kernel list, linux-mm, Sparc kernel list, Andrew Morton,
linuxppc-dev, David S . Miller
In-Reply-To: <CADxRZqxkB9tzO+nf56vFfvdYBooo1rqEbst=QGZQJA3jWhKLYw@mail.gmail.com>
Excerpts from Anatoly Pugachev's message of September 14, 2020 8:23 pm:
> On Mon, Sep 14, 2020 at 10:00 AM Nicholas Piggin <npiggin@gmail.com> wrote:
>>
>> Excerpts from Nicholas Piggin's message of September 14, 2020 2:52 pm:
>>
>> [...]
>>
>> > The basic fix for sparc64 is to remove its mm_cpumask clearing code. The
>> > optimisation could be effectively restored by sending IPIs to mm_cpumask
>> > members and having them remove themselves from mm_cpumask. This is more
>> > tricky so I leave it as an exercise for someone with a sparc64 SMP.
>> > powerpc has a (currently similarly broken) example.
>>
>> So this compiles and boots on qemu, but qemu does not support any
>> sparc64 machines with SMP. Attempting some simple hacks doesn't get
>> me far because openbios isn't populating an SMP device tree, which
>> blows up everywhere.
>>
>> The patch is _relatively_ simple, hopefully it shouldn't explode, so
>> it's probably ready for testing on real SMP hardware, if someone has
>> a few cycles.
>
> Nick,
>
> applied this patch to over 'v5.9-rc5' tag , used my test VM (ldom)
> with 32 vcpus.
> Machine boot, stress-ng test ( run as
> "stress-ng --cpu 8 --io 8 --vm 8 --vm-bytes 2G --fork 8 --timeout 15m" )
> finishes without errors.
>
Thank you very much Anatoly.
Thanks,
Nick
^ permalink raw reply
* Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race
From: Nicholas Piggin @ 2020-09-15 3:24 UTC (permalink / raw)
To: David Miller
Cc: axboe, linux-arch, peterz, aneesh.kumar, linux-kernel, linux-mm,
sparclinux, akpm, linuxppc-dev
In-Reply-To: <20200914.125942.5644261129883859.davem@davemloft.net>
Excerpts from David Miller's message of September 15, 2020 5:59 am:
> From: Nicholas Piggin <npiggin@gmail.com>
> Date: Mon, 14 Sep 2020 14:52:18 +1000
>
> ...
>> The basic fix for sparc64 is to remove its mm_cpumask clearing code. The
>> optimisation could be effectively restored by sending IPIs to mm_cpumask
>> members and having them remove themselves from mm_cpumask. This is more
>> tricky so I leave it as an exercise for someone with a sparc64 SMP.
>> powerpc has a (currently similarly broken) example.
>>
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>
> Sad to see this optimization go away, but what can I do:
>
> Acked-by: David S. Miller <davem@davemloft.net>
>
Thanks Dave, any objection if we merge this via the powerpc tree
to keep the commits together?
Thanks,
Nick
^ permalink raw reply
* [5.9.0-rc5-20200914] Kernel crash while running LTP(mlock201)
From: Sachin Sant @ 2020-09-15 6:31 UTC (permalink / raw)
To: linux-next; +Cc: linuxppc-dev, willy
While running LTP tests (specifically mlock201) against next-20200914 tree
on a POWER9 LPAR results in following crash.
BUG: Kernel NULL pointer dereference on read at 0x00000000
Faulting instruction address: 0xc000000000454248
Oops: Kernel access of bad area, sig: 11 [#1]
LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
Modules linked in: af_packet(E) nft_ct(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) libcrc32c(E) ip6_tables(E) nft_compat(E) ip_set(E) rfkill(E) nf_tables(E) nfnetlink(E) vmx_crypto(E) uio_pdrv_genirq(E) gf128mul(E) uio(E) rtc_generic(E) crct10dif_vpmsum(E) sch_fq_codel(E) ip_tables(E) x_tables(E) ext4(E) crc16(E) mbcache(E) jbd2(E) sd_mod(E) t10_pi(E) sg(E) ibmvscsi(E) scsi_transport_srp(E) scsi_mod(E) ibmveth(E) crc32c_vpmsum(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E) autofs4(E)
CPU: 11 PID: 26435 Comm: mlock201 Tainted: G E 5.9.0-rc5-next-20200914-281.gf529200-default #1
NIP: c000000000454248 LR: c000000000445a74 CTR: c000000000413150
REGS: c0000008e645b770 TRAP: 0300 Tainted: G E (5.9.0-rc5-next-20200914-281.gf529200-default)
MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 28002482 XER: 20040000
CFAR: c00000000000fbb0 DAR: 0000000000000000 DSISR: 40000000 IRQMASK: 0
GPR00: c000000000445a74 c0000008e645ba00 c0000000017c4500 0000000000000000
GPR04: 0000000000000001 c0000008ea109e98 c0000008f0c40000 0000000000000000
GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000003
GPR12: c000000000413150 c00000001ec70200 0000000000000000 c000000001502038
GPR16: 00007fff9c61ffff 00007fff9c61ffff 00007fff9c61ffff c000000000cb02f8
GPR20: 00007fff9c5c0000 00007fff9c620000 c0000008e645bcd8 c0000008f0c40000
GPR24: c00c0000023c0d00 fffffffffffffe7f 0000000000000000 c0000008f0c40000
GPR28: c0000008ea109e98 0000000000000001 c0000008ea9288a8 0000000000000000
NIP [c000000000454248] PageHuge+0x8/0x60
LR [c000000000445a74] find_get_incore_page+0x114/0x160
Call Trace:
[c0000008e645ba00] [c000000000445994] find_get_incore_page+0x34/0x160 (unreliable)
[c0000008e645ba40] [c000000000412e54] mincore_page+0x24/0x160
[c0000008e645ba70] [c000000000413020] __mincore_unmapped_range+0x90/0x160
[c0000008e645bac0] [c000000000413680] mincore_pte_range+0x530/0x5d0
[c0000008e645bb40] [c000000000422a38] walk_pgd_range+0x4e8/0xae0
[c0000008e645bc30] [c0000000004230c4] __walk_page_range+0x94/0x250
[c0000008e645bcb0] [c0000000004233d8] walk_page_range+0x158/0x1e0
[c0000008e645bd40] [c00000000041386c] sys_mincore+0x14c/0x370
[c0000008e645bdc0] [c000000000033eb8] system_call_exception+0xf8/0x200
[c0000008e645be20] [c00000000000d140] system_call_common+0xf0/0x27c
Instruction dump:
e8410018 38210020 e8010010 7c0803a6 4e800020 60000000 3d400001 7d435378
4e800020 60000000 7c0802a6 60000000 <e9230000> 75290001 40820010 e9230008
---[ end trace 357eb14a3b22eab2 ]—
The function find_get_incore_page() was introduced with
3fcbe4eb49a0406e6202e8c8c3560f30965a8e79
mm: factor find_get_incore_page out of mincore_page
Thanks
-Sachin
^ permalink raw reply
* Re: [PATCH kernel] powerpc/dma: Fix dma_map_ops::get_required_mask
From: Christoph Hellwig @ 2020-09-15 6:50 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: Oliver OHalloran, linuxppc-dev@lists.ozlabs.org,
Christoph Hellwig, Cédric Le Goater
In-Reply-To: <0a7a992f-ad2e-e76a-7bee-1ed4ed607748@ozlabs.ru>
On Wed, Sep 09, 2020 at 07:36:04PM +1000, Alexey Kardashevskiy wrote:
> I want dma_get_required_mask() to return the bigger mask always.
>
> Now it depends on (in dma_alloc_direct()):
> 1. dev->dma_ops_bypass: set via pci_set_(coherent_)dma_mask();
> 2. dev->coherent_dma_mask - the same;
> 3. dev->bus_dma_limit - usually not set at all.
>
> So until we set the mask, dma_get_required_mask() returns smaller mask.
> So aacraid and likes (which calls dma_get_required_mask() before setting
> it) will remain prone for breaks.
Well, the original intent of dma_get_required_mask is to return the
mask that the driver then uses to figure out what to set, so what aacraid
does fits that use case. Of course that idea is pretty bogus for
PCIe devices.
I suspect the right fix is to just not query dma_get_required_mask for
PCIe devices in aacraid (and other drivers that do something similar).
^ permalink raw reply
* [powerpc:merge] BUILD SUCCESS 27e2fbcd815a088d7d83c7158f76b6e95ab07c50
From: kernel test robot @ 2020-09-15 8:32 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git merge
branch HEAD: 27e2fbcd815a088d7d83c7158f76b6e95ab07c50 Automatic merge of 'master', 'next' and 'fixes' (2020-09-14 23:28)
elapsed time: 1138m
configs tested: 154
configs skipped: 2
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
powerpc ppc40x_defconfig
mips vocore2_defconfig
m68k amcore_defconfig
mips maltaup_xpa_defconfig
mips rbtx49xx_defconfig
powerpc currituck_defconfig
riscv rv32_defconfig
arm clps711x_defconfig
arm iop32x_defconfig
powerpc wii_defconfig
arm lpc32xx_defconfig
powerpc icon_defconfig
powerpc redwood_defconfig
arm s3c6400_defconfig
sh j2_defconfig
powerpc sbc8548_defconfig
powerpc ppc6xx_defconfig
sh rsk7201_defconfig
arm shannon_defconfig
powerpc pcm030_defconfig
parisc generic-64bit_defconfig
sh dreamcast_defconfig
arm mps2_defconfig
arm pxa3xx_defconfig
sh defconfig
m68k m5307c3_defconfig
powerpc mgcoge_defconfig
sparc defconfig
arm nhk8815_defconfig
arm vt8500_v6_v7_defconfig
ia64 defconfig
mips bcm47xx_defconfig
arc nsimosci_defconfig
m68k hp300_defconfig
powerpc obs600_defconfig
riscv alldefconfig
arm multi_v5_defconfig
powerpc tqm8541_defconfig
arm hackkit_defconfig
arm ezx_defconfig
nds32 allnoconfig
m68k mvme16x_defconfig
arm omap1_defconfig
arm multi_v4t_defconfig
powerpc mpc866_ads_defconfig
m68k alldefconfig
mips jazz_defconfig
arm zx_defconfig
mips bmips_stb_defconfig
sh r7780mp_defconfig
arm aspeed_g5_defconfig
sparc sparc64_defconfig
powerpc tqm8560_defconfig
riscv allmodconfig
arm spear3xx_defconfig
powerpc mpc8540_ads_defconfig
powerpc gamecube_defconfig
c6x alldefconfig
arm trizeps4_defconfig
arm multi_v7_defconfig
powerpc mpc885_ads_defconfig
arm milbeaut_m10v_defconfig
microblaze defconfig
ia64 allmodconfig
ia64 allyesconfig
m68k defconfig
m68k allmodconfig
m68k allyesconfig
nios2 defconfig
c6x allyesconfig
arc allyesconfig
nds32 defconfig
csky defconfig
alpha defconfig
alpha allyesconfig
nios2 allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a004-20200914
x86_64 randconfig-a006-20200914
x86_64 randconfig-a003-20200914
x86_64 randconfig-a002-20200914
x86_64 randconfig-a001-20200914
x86_64 randconfig-a005-20200914
i386 randconfig-a004-20200913
i386 randconfig-a006-20200913
i386 randconfig-a003-20200913
i386 randconfig-a001-20200913
i386 randconfig-a002-20200913
i386 randconfig-a005-20200913
i386 randconfig-a004-20200914
i386 randconfig-a006-20200914
i386 randconfig-a001-20200914
i386 randconfig-a003-20200914
i386 randconfig-a002-20200914
i386 randconfig-a005-20200914
x86_64 randconfig-a014-20200913
x86_64 randconfig-a011-20200913
x86_64 randconfig-a012-20200913
x86_64 randconfig-a016-20200913
x86_64 randconfig-a015-20200913
x86_64 randconfig-a013-20200913
i386 randconfig-a015-20200913
i386 randconfig-a014-20200913
i386 randconfig-a011-20200913
i386 randconfig-a013-20200913
i386 randconfig-a016-20200913
i386 randconfig-a012-20200913
i386 randconfig-a015-20200914
i386 randconfig-a014-20200914
i386 randconfig-a011-20200914
i386 randconfig-a013-20200914
i386 randconfig-a016-20200914
i386 randconfig-a012-20200914
riscv allyesconfig
riscv allnoconfig
riscv defconfig
x86_64 rhel
x86_64 allyesconfig
x86_64 rhel-7.6-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 kexec
clang tested configs:
x86_64 randconfig-a014-20200914
x86_64 randconfig-a011-20200914
x86_64 randconfig-a016-20200914
x86_64 randconfig-a012-20200914
x86_64 randconfig-a015-20200914
x86_64 randconfig-a013-20200914
x86_64 randconfig-a006-20200913
x86_64 randconfig-a004-20200913
x86_64 randconfig-a003-20200913
x86_64 randconfig-a002-20200913
x86_64 randconfig-a005-20200913
x86_64 randconfig-a001-20200913
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox