* [PATCH 2/8] powerpc/signal: Add unsafe_copy_{vsx,fpr}_from_user()
From: Christopher M. Riedl @ 2020-10-15 15:01 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20201015150159.28933-1-cmr@codefail.de>
Reuse the "safe" implementation from signal.c except for calling
unsafe_copy_from_user() to copy into a local buffer. Unlike the
unsafe_copy_{vsx,fpr}_to_user() functions the "copy from" functions
cannot use unsafe_get_user() directly to bypass the local buffer since
doing so significantly reduces signal handling performance.
Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
---
arch/powerpc/kernel/signal.h | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h
index 2559a681536e..e9aaeac0da37 100644
--- a/arch/powerpc/kernel/signal.h
+++ b/arch/powerpc/kernel/signal.h
@@ -53,6 +53,33 @@ unsigned long copy_ckfpr_from_user(struct task_struct *task, void __user *from);
&buf[i], label);\
} while (0)
+#define unsafe_copy_fpr_from_user(task, from, label) do { \
+ struct task_struct *__t = task; \
+ u64 __user *__f = (u64 __user *)from; \
+ u64 buf[ELF_NFPREG]; \
+ int i; \
+ \
+ unsafe_copy_from_user(buf, __f, ELF_NFPREG * sizeof(double), \
+ label); \
+ for (i = 0; i < ELF_NFPREG - 1; i++) \
+ __t->thread.TS_FPR(i) = buf[i]; \
+ __t->thread.fp_state.fpscr = buf[i]; \
+} while (0)
+
+#define unsafe_copy_vsx_from_user(task, from, label) do { \
+ struct task_struct *__t = task; \
+ u64 __user *__f = (u64 __user *)from; \
+ u64 buf[ELF_NVSRHALFREG]; \
+ int i; \
+ \
+ unsafe_copy_from_user(buf, __f, \
+ ELF_NVSRHALFREG * sizeof(double), \
+ label); \
+ for (i = 0; i < ELF_NVSRHALFREG ; i++) \
+ __t->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; \
+} while (0)
+
+
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
#define unsafe_copy_ckfpr_to_user(to, task, label) do { \
struct task_struct *__t = task; \
@@ -80,6 +107,10 @@ unsigned long copy_ckfpr_from_user(struct task_struct *task, void __user *from);
unsafe_copy_to_user(to, (task)->thread.fp_state.fpr, \
ELF_NFPREG * sizeof(double), label)
+#define unsafe_copy_fpr_from_user(task, from, label) \
+ unsafe_copy_from_user((task)->thread.fp_state.fpr, from \
+ ELF_NFPREG * sizeof(double), label)
+
static inline unsigned long
copy_fpr_to_user(void __user *to, struct task_struct *task)
{
@@ -115,6 +146,8 @@ copy_ckfpr_from_user(struct task_struct *task, void __user *from)
#else
#define unsafe_copy_fpr_to_user(to, task, label) do { } while (0)
+#define unsafe_copy_fpr_from_user(task, from, label) do { } while (0)
+
static inline unsigned long
copy_fpr_to_user(void __user *to, struct task_struct *task)
{
--
2.28.0
^ permalink raw reply related
* [PATCH 8/8] powerpc/signal64: Rewrite rt_sigreturn() to minimise uaccess switches
From: Christopher M. Riedl @ 2020-10-15 15:01 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Daniel Axtens
In-Reply-To: <20201015150159.28933-1-cmr@codefail.de>
From: Daniel Axtens <dja@axtens.net>
Add uaccess blocks and use the 'unsafe' versions of functions doing user
access where possible to reduce the number of times uaccess has to be
opened/closed.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
---
arch/powerpc/kernel/signal_64.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 3b97e3681a8f..0f4ff7a5bfc1 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -779,18 +779,22 @@ SYSCALL_DEFINE0(rt_sigreturn)
*/
regs->msr &= ~MSR_TS_MASK;
- if (__get_user(msr, &uc->uc_mcontext.gp_regs[PT_MSR]))
+ if (!user_read_access_begin(uc, sizeof(*uc)))
goto badframe;
+
+ unsafe_get_user(msr, &uc->uc_mcontext.gp_regs[PT_MSR], badframe_block);
+
if (MSR_TM_ACTIVE(msr)) {
/* We recheckpoint on return. */
struct ucontext __user *uc_transact;
/* Trying to start TM on non TM system */
if (!cpu_has_feature(CPU_FTR_TM))
- goto badframe;
+ goto badframe_block;
+
+ unsafe_get_user(uc_transact, &uc->uc_link, badframe_block);
+ user_read_access_end();
- if (__get_user(uc_transact, &uc->uc_link))
- goto badframe;
if (restore_tm_sigcontexts(current, &uc->uc_mcontext,
&uc_transact->uc_mcontext))
goto badframe;
@@ -810,12 +814,13 @@ SYSCALL_DEFINE0(rt_sigreturn)
* causing a TM bad thing.
*/
current->thread.regs->msr &= ~MSR_TS_MASK;
+
+#ifndef CONFIG_PPC_TRANSACTIONAL_MEM
if (!user_read_access_begin(uc, sizeof(*uc)))
- return -EFAULT;
- if (__unsafe_restore_sigcontext(current, NULL, 1, &uc->uc_mcontext)) {
- user_read_access_end();
goto badframe;
- }
+#endif
+ unsafe_restore_sigcontext(current, NULL, 1, &uc->uc_mcontext,
+ badframe_block);
user_read_access_end();
}
@@ -825,6 +830,8 @@ SYSCALL_DEFINE0(rt_sigreturn)
set_thread_flag(TIF_RESTOREALL);
return 0;
+badframe_block:
+ user_read_access_end();
badframe:
signal_fault(current, regs, "rt_sigreturn", uc);
--
2.28.0
^ permalink raw reply related
* [PATCH 7/8] powerpc/signal64: Rewrite handle_rt_signal64() to minimise uaccess switches
From: Christopher M. Riedl @ 2020-10-15 15:01 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Daniel Axtens
In-Reply-To: <20201015150159.28933-1-cmr@codefail.de>
From: Daniel Axtens <dja@axtens.net>
Add uaccess blocks and use the 'unsafe' versions of functions doing user
access where possible to reduce the number of times uaccess has to be
opened/closed.
There is no 'unsafe' version of copy_siginfo_to_user, so move it
slightly to allow for a "longer" uaccess block.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
---
arch/powerpc/kernel/signal_64.c | 54 ++++++++++++++++-----------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 6d4f7a5c4fbf..3b97e3681a8f 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -843,46 +843,42 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
/* Save the thread's msr before get_tm_stackpointer() changes it */
unsigned long msr = regs->msr;
#endif
-
frame = get_sigframe(ksig, tsk, sizeof(*frame), 0);
- if (!access_ok(frame, sizeof(*frame)))
+ if (!user_write_access_begin(frame, sizeof(*frame)))
goto badframe;
- err |= __put_user(&frame->info, &frame->pinfo);
- err |= __put_user(&frame->uc, &frame->puc);
- err |= copy_siginfo_to_user(&frame->info, &ksig->info);
- if (err)
- goto badframe;
+ unsafe_put_user(&frame->info, &frame->pinfo, badframe_block);
+ unsafe_put_user(&frame->uc, &frame->puc, badframe_block);
/* Create the ucontext. */
- err |= __put_user(0, &frame->uc.uc_flags);
- err |= __save_altstack(&frame->uc.uc_stack, regs->gpr[1]);
+ unsafe_put_user(0, &frame->uc.uc_flags, badframe_block);
+ unsafe_save_altstack(&frame->uc.uc_stack, regs->gpr[1], badframe_block);
+
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
if (MSR_TM_ACTIVE(msr)) {
/* The ucontext_t passed to userland points to the second
* ucontext_t (for transactional state) with its uc_link ptr.
*/
- err |= __put_user(&frame->uc_transact, &frame->uc.uc_link);
+ unsafe_put_user(&frame->uc_transact, &frame->uc.uc_link, badframe_block);
+ user_write_access_end();
err |= setup_tm_sigcontexts(&frame->uc.uc_mcontext,
&frame->uc_transact.uc_mcontext,
tsk, ksig->sig, NULL,
(unsigned long)ksig->ka.sa.sa_handler,
msr);
+ if (!user_write_access_begin(frame, sizeof(struct rt_sigframe)))
+ goto badframe;
+
} else
#endif
{
- err |= __put_user(0, &frame->uc.uc_link);
-
- if (!user_write_access_begin(frame, sizeof(struct rt_sigframe)))
- return -EFAULT;
- err |= __unsafe_setup_sigcontext(&frame->uc.uc_mcontext, tsk,
- ksig->sig, NULL,
- (unsigned long)ksig->ka.sa.sa_handler, 1);
- user_write_access_end();
+ unsafe_put_user(0, &frame->uc.uc_link, badframe_block);
+ unsafe_setup_sigcontext(&frame->uc.uc_mcontext, tsk, ksig->sig,
+ NULL, (unsigned long)ksig->ka.sa.sa_handler,
+ 1, badframe_block);
}
- err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
- if (err)
- goto badframe;
+
+ unsafe_copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set), badframe_block);
/* Make sure signal handler doesn't get spurious FP exceptions */
tsk->thread.fp_state.fpscr = 0;
@@ -891,15 +887,17 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
if (vdso64_rt_sigtramp && tsk->mm->context.vdso_base) {
regs->nip = tsk->mm->context.vdso_base + vdso64_rt_sigtramp;
} else {
- if (!user_write_access_begin(frame, sizeof(struct rt_sigframe)))
- return -EFAULT;
- err |= __unsafe_setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
- user_write_access_end();
- if (err)
- goto badframe;
+ unsafe_setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0],
+ badframe_block);
regs->nip = (unsigned long) &frame->tramp[0];
}
+ user_write_access_end();
+
+ /* Save the siginfo outside of the unsafe block. */
+ if (copy_siginfo_to_user(&frame->info, &ksig->info))
+ goto badframe;
+
/* Allocate a dummy caller frame for the signal handler. */
newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;
err |= put_user(regs->gpr[1], (unsigned long __user *)newsp);
@@ -939,6 +937,8 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
return 0;
+badframe_block:
+ user_write_access_end();
badframe:
signal_fault(current, regs, "handle_rt_signal64", frame);
--
2.28.0
^ permalink raw reply related
* [PATCH 1/8] powerpc/uaccess: Add unsafe_copy_from_user
From: Christopher M. Riedl @ 2020-10-15 15:01 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20201015150159.28933-1-cmr@codefail.de>
Implement raw_copy_from_user_allowed() which assumes that userspace read
access is open. Use this new function to implement raw_copy_from_user().
Finally, wrap the new function to follow the usual "unsafe_" convention
of taking a label argument. The new raw_copy_from_user_allowed() calls
__copy_tofrom_user() internally, but this is still safe to call in user
access blocks formed with user_*_access_begin()/user_*_access_end()
since asm functions are not instrumented for tracing.
Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
---
arch/powerpc/include/asm/uaccess.h | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
index 26781b044932..66940b4eb692 100644
--- a/arch/powerpc/include/asm/uaccess.h
+++ b/arch/powerpc/include/asm/uaccess.h
@@ -418,38 +418,45 @@ raw_copy_in_user(void __user *to, const void __user *from, unsigned long n)
}
#endif /* __powerpc64__ */
-static inline unsigned long raw_copy_from_user(void *to,
- const void __user *from, unsigned long n)
+static inline unsigned long
+raw_copy_from_user_allowed(void *to, const void __user *from, unsigned long n)
{
- unsigned long ret;
if (__builtin_constant_p(n) && (n <= 8)) {
- ret = 1;
+ unsigned long ret = 1;
switch (n) {
case 1:
barrier_nospec();
- __get_user_size(*(u8 *)to, from, 1, ret);
+ __get_user_size_allowed(*(u8 *)to, from, 1, ret);
break;
case 2:
barrier_nospec();
- __get_user_size(*(u16 *)to, from, 2, ret);
+ __get_user_size_allowed(*(u16 *)to, from, 2, ret);
break;
case 4:
barrier_nospec();
- __get_user_size(*(u32 *)to, from, 4, ret);
+ __get_user_size_allowed(*(u32 *)to, from, 4, ret);
break;
case 8:
barrier_nospec();
- __get_user_size(*(u64 *)to, from, 8, ret);
+ __get_user_size_allowed(*(u64 *)to, from, 8, ret);
break;
}
if (ret == 0)
return 0;
}
+ return __copy_tofrom_user((__force void __user *)to, from, n);
+}
+
+static inline unsigned long
+raw_copy_from_user(void *to, const void __user *from, unsigned long n)
+{
+ unsigned long ret;
+
barrier_nospec();
allow_read_from_user(from, n);
- ret = __copy_tofrom_user((__force void __user *)to, from, n);
+ ret = raw_copy_from_user_allowed(to, from, n);
prevent_read_from_user(from, n);
return ret;
}
@@ -571,6 +578,9 @@ user_write_access_begin(const void __user *ptr, size_t len)
#define unsafe_get_user(x, p, e) unsafe_op_wrap(__get_user_allowed(x, p), e)
#define unsafe_put_user(x, p, e) __put_user_goto(x, p, e)
+#define unsafe_copy_from_user(d, s, l, e) \
+ unsafe_op_wrap(raw_copy_from_user_allowed(d, s, l), e)
+
#define unsafe_copy_to_user(d, s, l, e) \
do { \
u8 __user *_dst = (u8 __user *)(d); \
--
2.28.0
^ permalink raw reply related
* [PATCH 3/8] powerpc: Mark functions called inside uaccess blocks w/ 'notrace'
From: Christopher M. Riedl @ 2020-10-15 15:01 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20201015150159.28933-1-cmr@codefail.de>
Functions called between user_*_access_begin() and user_*_access_end()
should be either inlined or marked 'notrace' to prevent leaving
userspace access exposed. Mark any such functions relevant to signal
handling so that subsequent patches can call them inside uaccess blocks.
Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
---
arch/powerpc/kernel/process.c | 20 ++++++++++----------
arch/powerpc/mm/mem.c | 4 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index ba2c987b8403..bf5d9654bd2c 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -84,7 +84,7 @@ extern unsigned long _get_SP(void);
*/
bool tm_suspend_disabled __ro_after_init = false;
-static void check_if_tm_restore_required(struct task_struct *tsk)
+static void notrace check_if_tm_restore_required(struct task_struct *tsk)
{
/*
* If we are saving the current thread's registers, and the
@@ -151,7 +151,7 @@ void notrace __msr_check_and_clear(unsigned long bits)
EXPORT_SYMBOL(__msr_check_and_clear);
#ifdef CONFIG_PPC_FPU
-static void __giveup_fpu(struct task_struct *tsk)
+static void notrace __giveup_fpu(struct task_struct *tsk)
{
unsigned long msr;
@@ -163,7 +163,7 @@ static void __giveup_fpu(struct task_struct *tsk)
tsk->thread.regs->msr = msr;
}
-void giveup_fpu(struct task_struct *tsk)
+void notrace giveup_fpu(struct task_struct *tsk)
{
check_if_tm_restore_required(tsk);
@@ -177,7 +177,7 @@ EXPORT_SYMBOL(giveup_fpu);
* Make sure the floating-point register state in the
* the thread_struct is up to date for task tsk.
*/
-void flush_fp_to_thread(struct task_struct *tsk)
+void notrace flush_fp_to_thread(struct task_struct *tsk)
{
if (tsk->thread.regs) {
/*
@@ -234,7 +234,7 @@ static inline void __giveup_fpu(struct task_struct *tsk) { }
#endif /* CONFIG_PPC_FPU */
#ifdef CONFIG_ALTIVEC
-static void __giveup_altivec(struct task_struct *tsk)
+static void notrace __giveup_altivec(struct task_struct *tsk)
{
unsigned long msr;
@@ -246,7 +246,7 @@ static void __giveup_altivec(struct task_struct *tsk)
tsk->thread.regs->msr = msr;
}
-void giveup_altivec(struct task_struct *tsk)
+void notrace giveup_altivec(struct task_struct *tsk)
{
check_if_tm_restore_required(tsk);
@@ -285,7 +285,7 @@ EXPORT_SYMBOL(enable_kernel_altivec);
* Make sure the VMX/Altivec register state in the
* the thread_struct is up to date for task tsk.
*/
-void flush_altivec_to_thread(struct task_struct *tsk)
+void notrace flush_altivec_to_thread(struct task_struct *tsk)
{
if (tsk->thread.regs) {
preempt_disable();
@@ -300,7 +300,7 @@ EXPORT_SYMBOL_GPL(flush_altivec_to_thread);
#endif /* CONFIG_ALTIVEC */
#ifdef CONFIG_VSX
-static void __giveup_vsx(struct task_struct *tsk)
+static void notrace __giveup_vsx(struct task_struct *tsk)
{
unsigned long msr = tsk->thread.regs->msr;
@@ -317,7 +317,7 @@ static void __giveup_vsx(struct task_struct *tsk)
__giveup_altivec(tsk);
}
-static void giveup_vsx(struct task_struct *tsk)
+static void notrace giveup_vsx(struct task_struct *tsk)
{
check_if_tm_restore_required(tsk);
@@ -352,7 +352,7 @@ void enable_kernel_vsx(void)
}
EXPORT_SYMBOL(enable_kernel_vsx);
-void flush_vsx_to_thread(struct task_struct *tsk)
+void notrace flush_vsx_to_thread(struct task_struct *tsk)
{
if (tsk->thread.regs) {
preempt_disable();
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index ddc32cc1b6cf..da2345a2abc6 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -378,7 +378,7 @@ static inline bool flush_coherent_icache(unsigned long addr)
* @start: the start address
* @stop: the stop address (exclusive)
*/
-static void invalidate_icache_range(unsigned long start, unsigned long stop)
+static void notrace invalidate_icache_range(unsigned long start, unsigned long stop)
{
unsigned long shift = l1_icache_shift();
unsigned long bytes = l1_icache_bytes();
@@ -402,7 +402,7 @@ static void invalidate_icache_range(unsigned long start, unsigned long stop)
* @start: the start address
* @stop: the stop address (exclusive)
*/
-void flush_icache_range(unsigned long start, unsigned long stop)
+void notrace flush_icache_range(unsigned long start, unsigned long stop)
{
if (flush_coherent_icache(start))
return;
--
2.28.0
^ permalink raw reply related
* Re: [PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
From: Florian Fainelli @ 2020-10-15 16:37 UTC (permalink / raw)
To: Serge Semin, Mathias Nyman, Felipe Balbi, Greg Kroah-Hartman,
Rob Herring, Alexey Brodkin, Vineet Gupta, Hauke Mehrtens,
Rafał Miłecki, bcm-kernel-feedback-list, Wei Xu,
Vladimir Zapolskiy, Maxime Coquelin, Alexandre Torgue,
Paul Cercueil, Thomas Bogendoerfer, Matthias Brugger,
Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
Cc: linux-arm-kernel, devicetree, linuxppc-dev, Neil Armstrong,
Kevin Hilman, Yoshihiro Shimoda, linux-usb, linux-mips,
Serge Semin, linux-kernel, Manu Gautam, Andy Gross,
Bjorn Andersson, Pavel Parkhomenko, linux-mediatek,
linux-snps-arc, Lad Prabhakar, linux-stm32, Alexey Malahov,
Roger Quadros
In-Reply-To: <20201014101402.18271-19-Sergey.Semin@baikalelectronics.ru>
On 10/14/20 3:14 AM, Serge Semin wrote:
> In accordance with the Generic EHCI/OHCI bindings the corresponding node
> name is suppose to comply with the Generic USB HCD DT schema, which
> requires the USB nodes to have the name acceptable by the regexp:
> "^usb(@.*)?" . Let's fix the DTS files, which have the nodes defined with
> incompatible names.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> ---
>
> Please, test the patch out to make sure it doesn't brake the dependent DTS
> files. I did only a manual grepping of the possible nodes dependencies.
> ---
> arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
> arch/arm/boot/dts/bcm53573.dtsi | 4 ++--
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply
* Re: [PATCH 07/20] dt-bindings: usb: xhci: Add Broadcom STB v2 compatible device
From: Florian Fainelli @ 2020-10-15 16:39 UTC (permalink / raw)
To: Serge Semin, Mathias Nyman, Felipe Balbi, Greg Kroah-Hartman,
Rob Herring
Cc: linux-arm-kernel, devicetree, linuxppc-dev, Neil Armstrong,
Kevin Hilman, Yoshihiro Shimoda, linux-usb, linux-mips,
Serge Semin, linux-kernel, Manu Gautam, Andy Gross,
Bjorn Andersson, Pavel Parkhomenko, linux-snps-arc, Lad Prabhakar,
Alexey Malahov, Roger Quadros
In-Reply-To: <20201014101402.18271-8-Sergey.Semin@baikalelectronics.ru>
On 10/14/20 3:13 AM, Serge Semin wrote:
> For some reason the "brcm,xhci-brcm-v2" compatible string has been missing
> in the original bindings file. Add it to the Generic xHCI Controllers DT
> schema since the controller driver expects it to be supported.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply
* [Bug 195755] rcu_sched detected stalls on CPUs/tasks: (detected by 0, t=6302 jiffies, g=11405, c=11404, q=1880), ppc64, G5
From: bugzilla-daemon @ 2020-10-15 18:31 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <bug-195755-206035@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=195755
Marco Descher (marco@descher.at) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marco@descher.at
--- Comment #30 from Marco Descher (marco@descher.at) ---
I experienced this problem today, a freeze on an
processor : 3
vendor_id : AuthenticAMD
cpu family : 22
model : 48
model name : AMD GX-412TC SOC
on Debian 10 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64
GNU/Linux
with more and more sysrq messages coming up resulting in the following syslog
entry
Oct 15 11:43:45 gate kernel: [1545118.045973] rcu: INFO: rcu_sched detected
stalls on CPUs/tasks:
leading to the system becoming unreachable. Only after a reboot this works
again.
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply
* Re: [PATCH 20/20] arch: dts: Fix DWC USB3 DT nodes name
From: Maxime Ripard @ 2020-10-15 14:04 UTC (permalink / raw)
To: Felipe Balbi
Cc: Andrew Lunn, linux-usb, Neil Armstrong, Tony Lindgren,
Bjorn Andersson, Wei Xu, linux-samsung-soc, Kevin Hilman,
Gregory Clement, Krzysztof Kozlowski, Chen-Yu Tsai, Kukjin Kim,
Andy Gross, linux-arm-msm, linux-snps-arc, Sebastian Hesselbarth,
devicetree, Jason Cooper, Mathias Nyman, linux-kernel,
Lad Prabhakar, Alexey Malahov, Rob Herring, Santosh Shilimkar,
linux-omap, linux-arm-kernel, Roger Quadros, linux-mips,
Greg Kroah-Hartman, Yoshihiro Shimoda, linuxppc-dev,
Patrice Chotard, Serge Semin, Li Yang, Serge Semin, Manu Gautam,
Benoît Cousson, Shawn Guo, Pavel Parkhomenko
In-Reply-To: <875z7blrqu.fsf@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]
On Thu, Oct 15, 2020 at 01:15:37PM +0300, Felipe Balbi wrote:
> Serge Semin <Sergey.Semin@baikalelectronics.ru> writes:
>
> > On Wed, Oct 14, 2020 at 05:09:37PM +0300, Felipe Balbi wrote:
> >>
> >> Hi Serge,
> >>
> >> Serge Semin <Sergey.Semin@baikalelectronics.ru> writes:
> >> > In accordance with the DWC USB3 bindings the corresponding node name is
> >> > suppose to comply with Generic USB HCD DT schema, which requires the USB
> >>
> >
> >> DWC3 is not a simple HDC, though.
> >
> > Yeah, strictly speaking it is equipped with a lot of vendor-specific stuff,
> > which are tuned by the DWC USB3 driver in the kernel. But after that the
> > controller is registered as xhci-hcd device so it's serviced by the xHCI driver,
>
> in Dual-role or host-only builds, that's correct. We can also have
> peripheral-only builds (both SW or HW versions) which means xhci isn't
> even in the picture.
It doesn't really matter though, or at least it does for what the new
name might be, but the old one currently used is still pretty bad.
The DT spec says that the node name is the class of the device. "usb" as
the HCD binding mandates is one, but the current nodes currently have
completely different names from one DT to another - which is already an
issue - and most of them have dwc3 or some variant of it, which doesn't
really qualify for a class name.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: linux-next: manual merge of the char-misc tree with the powerpc tree
From: Stephen Rothwell @ 2020-10-15 23:12 UTC (permalink / raw)
To: Michael Ellerman, PowerPC
Cc: Arnd Bergmann, Greg KH, Necip Fazil Yildiran,
Linux Kernel Mailing List, Linux Next Mailing List,
Frederic Barrat
In-Reply-To: <20201006183506.186a3562@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]
Hi all,
On Tue, 6 Oct 2020 18:35:06 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the char-misc tree got a conflict in:
>
> drivers/misc/ocxl/Kconfig
>
> between commit:
>
> dde6f18a8779 ("ocxl: Don't return trigger page when allocating an interrupt")
>
> from the powerpc tree and commit:
>
> 4b53a3c72116 ("ocxl: fix kconfig dependency warning for OCXL")
>
> from the char-misc tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc drivers/misc/ocxl/Kconfig
> index 0d815b2a40b3,947294f6d7f4..000000000000
> --- a/drivers/misc/ocxl/Kconfig
> +++ b/drivers/misc/ocxl/Kconfig
> @@@ -9,9 -9,8 +9,9 @@@ config OCXL_BAS
>
> config OCXL
> tristate "OpenCAPI coherent accelerator support"
> - depends on PPC_POWERNV && PCI && EEH && HOTPLUG_PCI_POWERNV
> + depends on PPC_POWERNV && PCI && EEH && PPC_XIVE_NATIVE
> ++ depends on HOTPLUG_PCI_POWERNV
> select OCXL_BASE
> - select HOTPLUG_PCI_POWERNV
> default m
> help
> Select this option to enable the ocxl driver for Open
This is now a conflict between the powerpc tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* [GIT PULL] Please pull powerpc/linux.git powerpc-5.10-1 tag
From: Michael Ellerman @ 2020-10-16 3:24 UTC (permalink / raw)
To: Linus Torvalds
Cc: ego, steve, srikar, ravi.bangoria, peterz, jniethe5, mahesh,
liushixin2, oohall, fthain, hofrat, hch, leobras.c, aneesh.kumar,
wangwensheng4, joel, yangyingliang, naveen.n.rao, mrochs,
zhengbin13, nathanl, biwen.li, ajd, sfr, kjain, npiggin, cai, clg,
vaibhav, dja, atrajeev, gromero, cheloha, yanaijie, linux-kernel,
leoyang.li, wsa, miaoqinglang, fbarrat, colin.king, linuxppc-dev,
davem, bauerman
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi Linus,
Please pull powerpc updates for 5.10.
Just two minor conflicts I'm aware of. The only slight subtlety is the conflict
in kasan_init() where "int ret" needs to move out of the for_each_mem_range()
and up to the function scope.
Notable out of area changes:
arch/sparc/kernel/smp_64.c # bafb056ce279 sparc64: remove mm_cpumask clearing to fix kthread_use_mm race
fs/exec.c # d53c3dfb23c4 mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race
include/uapi/linux/mman.h # e47168f3d1b1 powerpc/8xx: Support 16k hugepages with 4k pages
include/uapi/asm-generic/hugetlb_encode.h # as above
cheers
The following changes since commit d012a7190fc1fd72ed48911e77ca97ba4521bccd:
Linux 5.9-rc2 (2020-08-23 14:08:43 -0700)
are available in the git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerpc-5.10-1
for you to fetch changes up to ffd0b25ca049a477cb757e5bcf2d5e1664d12e5d:
Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed" (2020-10-15 13:42:49 +1100)
- ------------------------------------------------------------------
powerpc updates for 5.10
- A series from Nick adding ARCH_WANT_IRQS_OFF_ACTIVATE_MM & selecting it for
powerpc, as well as a related fix for sparc.
- Remove support for PowerPC 601.
- Some fixes for watchpoints & addition of a new ptrace flag for detecting ISA
v3.1 (Power10) watchpoint features.
- A fix for kernels using 4K pages and the hash MMU on bare metal Power9
systems with > 16TB of RAM, or RAM on the 2nd node.
- A basic idle driver for shallow stop states on Power10.
- Tweaks to our sched domains code to better inform the scheduler about the
hardware topology on Power9/10, where two SMT4 cores can be presented by
firmware as an SMT8 core.
- A series doing further reworks & cleanups of our EEH code.
- Addition of a filter for RTAS (firmware) calls done via sys_rtas(), to
prevent root from overwriting kernel memory.
- Other smaller features, fixes & cleanups.
Thanks to:
Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Athira Rajeev, Biwen
Li, Cameron Berkenpas, Cédric Le Goater, Christophe Leroy, Christoph Hellwig,
Colin Ian King, Daniel Axtens, David Dai, Finn Thain, Frederic Barrat, Gautham
R. Shenoy, Greg Kurz, Gustavo Romero, Ira Weiny, Jason Yan, Joel Stanley,
Jordan Niethe, Kajol Jain, Konrad Rzeszutek Wilk, Laurent Dufour, Leonardo
Bras, Liu Shixin, Luca Ceresoli, Madhavan Srinivasan, Mahesh Salgaonkar,
Nathan Lynch, Nicholas Mc Guire, Nicholas Piggin, Nick Desaulniers, Oliver
O'Halloran, Pedro Miraglia Franco de Carvalho, Pratik Rajesh Sampat, Qian Cai,
Qinglang Miao, Ravi Bangoria, Russell Currey, Satheesh Rajendran, Scott
Cheloha, Segher Boessenkool, Srikar Dronamraju, Stan Johnson, Stephen Kitt,
Stephen Rothwell, Thiago Jung Bauermann, Tyrel Datwyler, Vaibhav Jain,
Vaidyanathan Srinivasan, Vasant Hegde, Wang Wensheng, Wolfram Sang, Yang
Yingliang, zhengbin.
- ------------------------------------------------------------------
Andrew Donnellan (2):
powerpc/rtas: Restrict RTAS requests from userspace
selftests/powerpc: Add a rtas_filter selftest
Aneesh Kumar K.V (11):
powerpc/vmemmap: Fix memory leak with vmemmap list allocation failures.
powerpc/vmemmap: Don't warn if we don't find a mapping vmemmap list entry
powerpc/percpu: Update percpu bootmem allocator
powerpc/64/mm: implement page mapping percpu first chunk allocator
powerpc/book3s64/hash/4k: Support large linear mapping range with 4K
powerpc/mm/book3s: Split radix and hash MAX_PHYSMEM limit
powerepc/book3s64/hash: Align start/end address correctly with bolt mapping
powerpc/drmem: Make lmb_size 64 bit
powerpc/memhotplug: Make lmb size 64bit
powerpc/book3s64/radix: Make radix_mem_block_size 64bit
powerpc/lmb-size: Use addr #size-cells value when fetching lmb-size
Athira Rajeev (1):
powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints
Biwen Li (2):
powerpc/dts/t4240rdb: remove interrupts property
powerc/dtc/t1024rdb: remove interrupts property
Christoph Hellwig (1):
powerpc: switch 85xx defconfigs from legacy ide to libata
Christophe Leroy (52):
powerpc/32s: Fix assembler warning about r0
powerpc/hwirq: Remove stale forward irq_chip declaration
powerpc/irq: Drop forward declaration of struct irqaction
powerpc/fpu: Drop cvt_fd() and cvt_df()
powerpc: drop hard_reset_now() and poweroff_now() declaration
powerpc: Drop _nmask_and_or_msr()
powerpc: Remove flush_instruction_cache for book3s/32
powerpc: Move flush_instruction_cache() prototype in asm/cacheflush.h
powerpc: Rewrite 4xx flush_cache_instruction() in C
powerpc: Rewrite FSL_BOOKE flush_cache_instruction() in C
powerpc: Remove flush_instruction_cache() on 8xx
powerpc/uaccess: Use flexible addressing with __put_user()/__get_user()
powerpc/uaccess: Add pre-update addressing to __get_user_asm() and __put_user_asm()
powerpc/process: Remove unnecessary #ifdef CONFIG_FUNCTION_GRAPH_TRACER
powerpc: Fix random segfault when freeing hugetlb range
powerpc/8xx: Refactor calculation of number of entries per PTE in page tables
powerpc/8xx: Support 16k hugepages with 4k pages
powerpc/uaccess: Add pre-update addressing to __put_user_asm_goto()
powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto()
powerpc/uaccess: Switch __patch_instruction() to __put_user_asm_goto()
powerpc/uaccess: Remove __put_user_asm() and __put_user_asm2()
powerpc/32: Fix vmap stack - Do not activate MMU before reading task struct
powerpc/32: Fix vmap stack - Properly set r1 before activating MMU
powerpc/process: Replace an #ifdef CONFIG_PPC_47x by IS_ENABLED()
powerpc/process: Replace an #ifdef CONFIG_PPC_BOOK3S_64 by IS_ENABLED()
powerpc/process: Replace an #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) by IS_ENABLED()
powerpc/process: Replace #ifdef CONFIG_KALLSYMS by IS_ENABLED()
powerpc/process: Tag an #endif to help locate the matching #ifdef.
powerpc/process: Remove useless #ifdef CONFIG_VSX
powerpc/process: Remove useless #ifdef CONFIG_ALTIVEC
powerpc/process: Remove useless #ifdef CONFIG_SPE
powerpc/process: Remove useless #ifdef CONFIG_PPC_FPU
powerpc/powermac: Fix low_sleep_handler with KUAP and KUEP
powerpc/kasan: Fix CONFIG_KASAN_VMALLOC for 8xx
powerpc: Remove SYNC on non 6xx
powerpc: Remove CONFIG_PPC601_SYNC_FIX
powerpc: Drop SYNC_601() ISYNC_601() and SYNC()
powerpc: Remove PowerPC 601
powerpc: Remove support for PowerPC 601
powerpc: Tidy up a bit after removal of PowerPC 601.
powerpc: Remove __USE_RTC()
powerpc: Remove get_tb_or_rtc()
powerpc/time: Remove ifdef in get_dec() and set_dec()
powerpc/32s: Setup the early hash table at all time.
powerpc/32s: Rename head_32.S to head_book3s_32.S
powerpc/32s: Remove #ifdef CONFIG_PPC_BOOK3S_32 in head_book3s_32.S
powerpc/time: Rename mftbl() to mftb()
powerpc/time: Make mftb() common to PPC32 and PPC64
powerpc/time: Avoid using get_tbl() and get_tbu() internally
powerpc/time: Remove get_tbu()
powerpc/time: Make get_tbl() common to PPC32 and PPC64
powerpc/time: Make get_tb() common to PPC32 and PPC64
Colin Ian King (2):
powerpc/oprofile: fix spelling mistake "contex" -> "context"
macintosh: windfarm: remove detatch debug containing spelling mistakes
Cédric Le Goater (5):
powerpc/pci: unmap legacy INTx interrupts when a PHB is removed
powerpc/sysfs: Remove unused 'err' variable in sysfs_create_dscr_default()
powerpc/sstep: Remove empty if statement checking for invalid form
powerpc/xive: Make debug routines static
powerpc/32: Declare stack_overflow_exception() prototype
Daniel Axtens (1):
powerpc: PPC_SECURE_BOOT should not require PowerNV
Finn Thain (5):
powerpc/tau: Use appropriate temperature sample interval
powerpc/tau: Convert from timer to workqueue
powerpc/tau: Remove duplicated set_thresholds() call
powerpc/tau: Check processor type before enabling TAU interrupt
powerpc/tau: Disable TAU between measurements
Frederic Barrat (5):
scsi: cxlflash: Access interrupt trigger page from xive directly
ocxl: Access interrupt trigger page from xive directly
ocxl: Don't return trigger page when allocating an interrupt
ocxl: Remove custom service to allocate interrupts
cxl: Rework error message for incompatible slots
Gustavo Romero (1):
powerpc/tm: Save and restore AMR on treclaim and trechkpt
Jason Yan (1):
powerpc/ps3: make two symbols static
Joel Stanley (2):
powerpc/powernv: Print helpful message when cores guarded
powerpc: Warn about use of smt_snooze_delay
Jordan Niethe (3):
powerpc/boot: Update Makefile comment for 64bit wrapper
selftests/powerpc: Fix prefixes in alignment_handler signal handler
powerpc: Update documentation of ISA versions for Power10
Kajol Jain (5):
powerpc/perf/hv-gpci: Fix starting index value
Documentation/ABI: Add ABI documentation for hv-24x7 format
Documentation/ABI: Add ABI documentation for hv-gpci format
powerpc/perf/hv-gpci: Add cpu hotplug support
powerpc/hv-gpci: Add sysfs files inside hv-gpci device to show cpumask
Leonardo Bras (4):
powerpc/pseries/iommu: Create defines for operations in ibm, ddw-applicable
powerpc/pseries/iommu: Update call to ibm, query-pe-dma-windows
powerpc/pseries/iommu: Move window-removing part of remove_ddw into remove_dma_window
powerpc/pseries/iommu: Allow bigger 64bit window by removing default DMA window
Liu Shixin (1):
powerpc/pseries: convert to use DEFINE_SEQ_ATTRIBUTE macro
Mahesh Salgaonkar (1):
powerpc/powernv/elog: Fix race while processing OPAL error log event.
Michael Ellerman (24):
selftests/powerpc: Fix TM tests when CPU 0 is offline
selftests/powerpc: Don't use setaffinity in tm-tmspr
selftests/powerpc: Run tm-tmspr test for longer
selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac
selftests/powerpc: Give the bad_accesses test longer to run
selftests/powerpc: Move set_dscr() into rfi_flush.c
selftests/powerpc: Include asm/cputable.h from utils.h
selftests/powerpc: Don't run DSCR tests on old systems
selftests/powerpc: Skip security tests on older CPUs
selftests/powerpc: Skip L3 bank test on older CPUs
selftests/powerpc: Don't touch VMX/VSX on older CPUs
selftests/powerpc: Properly handle failure in switch_endian_test
powerpc/64: Remove unused generic_secondary_thread_init()
Merge branch 'fixes' into next
powerpc/64: Make VDSO32 track COMPAT on 64-bit
Merge coregroup support into next
powerpc/process: Fix uninitialised variable error
Merge branch 'topic/irqs-off-activate-mm' into next
powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning
powerpc/perf: Add declarations to fix sparse warnings
powerpc: Move arch_cpu_idle_dead() into smp.c
powerpc/smp: Fold cpu_die() into its only caller
powerpc/smp: Move ppc_md.cpu_die() to smp_ops.cpu_offline_self()
powerpc/prom_init: Check display props exist before enabling btext
Nathan Lynch (1):
powerpc/pseries: explicitly reschedule during drmem_lmb list traversal
Nicholas Mc Guire (2):
powerpc/pseries: Fix missing of_node_put() in rng_init()
powerpc/icp-hv: Fix missing of_node_put() in success path
Nicholas Piggin (15):
powerpc/64s: handle ISA v3.1 local copy-paste context switches
powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10
mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race
powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
sparc64: remove mm_cpumask clearing to fix kthread_use_mm race
powerpc/64s/radix: Fix mm_cpumask trimming race vs kthread_use_mm
powerpc: untangle cputable mce include
powerpc/64s: Add cp_abort after tlbiel to invalidate copy-buffer address
powerpc/pseries: add new branch prediction security bits for link stack
powerpc/64: fix irq replay missing preempt
powerpc/64: fix irq replay pt_regs->softe value
powerpc/64e: remove PACA_IRQ_EE_EDGE
powerpc/64e: remove 64s specific interrupt soft-mask code
powerpc/64: make restore_interrupts 64e only
powerpc/security: Fix link stack flush instruction
Oliver O'Halloran (18):
powerpc/powernv/smp: Fix spurious DBG() warning
powerpc/powernv: Include asm/powernv.h from the local powernv.h
powerpc/powernv: Staticify functions without prototypes
powerpc/powernv: Fix spurious kerneldoc warnings in opal-prd.c
powerpc/nx: Don't pack struct coprocessor_request_block
powerpc/pseries/eeh: Fix dumb linebreaks
powerpc/eeh: Rework EEH initialisation
powerpc/powernv: Stop using eeh_ops->init()
powerpc/pseries: Stop using eeh_ops->init()
powerpc/eeh: Delete eeh_ops->init
powerpc/eeh: Move EEH initialisation to an arch initcall
powerpc/pseries/eeh: Clean up pe_config_addr lookups
powerpc/pseries/eeh: Rework device EEH PE determination
powerpc/pseries/eeh: Allow zero to be a valid PE configuration address
powerpc/eeh: Clean up PE addressing
powerpc/eeh: Delete eeh_pe->config_addr
powerpc/pseries/eeh: Fix use of uninitialised variable
selftests/powerpc: Fix eeh-basic.sh exit codes
Qian Cai (1):
Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed"
Qinglang Miao (5):
macintosh: windfarm: use for_each_child_of_node() macro
drivers/macintosh/smu.c: use for_each_child_of_node() macro
macintosh: smu_sensors: use for_each_child_of_node() macro
serial: pmac_zilog: use for_each_child_of_node() macro
powerpc/powernv: fix wrong warning message in opalcore_config_init()
Ravi Bangoria (8):
powerpc/watchpoint: Fix quadword instruction handling on p10 predecessors
powerpc/watchpoint: Fix handling of vector instructions
powerpc/watchpoint/ptrace: Fix SETHWDEBUG when CONFIG_HAVE_HW_BREAKPOINT=N
powerpc/watchpoint: Move DAWR detection logic outside of hw_breakpoint.c
powerpc/watchpoint: Fix exception handling for CONFIG_HAVE_HW_BREAKPOINT=N
powerpc/watchpoint: Add hw_len wherever missing
powerpc/watchpoint/ptrace: Introduce PPC_DEBUG_FEATURE_DATA_BP_ARCH_31
selftests/powerpc: Tests for kernel accessing user memory
Russell Currey (1):
powerpc/tools: Remove 90 line limit in checkpatch script
Scott Cheloha (4):
powerpc/perf: consolidate GPCI hcall structs into asm/hvcall.h
powerpc/pseries: new lparcfg key/value pair: partition_affinity_score
pseries/drmem: don't cache node id in drmem_lmb struct
pseries/hotplug-memory: hot-add: skip redundant LMB lookup
Srikar Dronamraju (28):
sched/topology: Allow archs to override cpu_smt_mask
powerpc/topology: Override cpu_smt_mask
powerpc/numa: Restrict possible nodes based on platform
powerpc/numa: Set numa_node for all possible cpus
powerpc/numa: Prefer node id queried from vphn
powerpc/numa: Offline memoryless cpuless node 0
powerpc/smp: Fix a warning under !NEED_MULTIPLE_NODES
powerpc/smp: Merge Power9 topology with Power topology
powerpc/smp: Move powerpc_topology above
powerpc/smp: Move topology fixups into a new function
powerpc/smp: Dont assume l2-cache to be superset of sibling
powerpc/smp: Optimize start_secondary
powerpc/numa: Detect support for coregroup
powerpc/smp: Allocate cpumask only after searching thread group
powerpc/smp: Create coregroup domain
powerpc/smp: Implement cpu_to_coregroup_id
powerpc/topology: Update topology_core_cpumask
powerpc/smp: Stop updating cpu_core_mask
powerpc/smp: Remove get_physical_package_id
powerpc/smp: Optimize remove_cpu_from_masks
powerpc/smp: Limit CPUs traversed to within a node.
powerpc/smp: Stop passing mask to update_mask_by_l2
powerpc/smp: Depend on cpu_l1_cache_map when adding CPUs
powerpc/smp: Check for duplicate topologies and consolidate
powerpc/smp: Optimize update_mask_by_l2
powerpc/smp: Move coregroup mask updation to a new function
powerpc/smp: Optimize update_coregroup_mask
cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier
Stephen Kitt (1):
powerpc: Use simple i2c probe function
Stephen Rothwell (9):
powerpc: unrel_branch_check.sh: fix shellcheck complaints
powerpc: unrel_branch_check.sh: simplify and combine some executions
powerpc: unrel_branch_check.sh: simplify objdump's asm output
powerpc: unrel_branch_check.sh: convert grep | sed | awk to just sed
powerpc: unrel_branch_check.sh: simplify and tidy up the final loop
powerpc: unrel_branch_check.sh: fix up the file header
powerpc: unrel_branch_check.sh: exit silently for early errors
powerpc: unrel_branch_check.sh: use nm to find symbol value
powerpc: unrel_branch_check.sh: enable the use of llvm-objdump v9, 10 or 11
Thiago Jung Bauermann (1):
powerpc/pseries/svm: Allocate SWIOTLB buffer anywhere in memory
Vaibhav Jain (2):
powerpc/papr_scm: Fix warning triggered by perf_stats_show()
powerpc/papr_scm: Add PAPR command family to pass-through command-set
Wang Wensheng (2):
drivers/macintosh/smu.c: Fix undeclared symbol warning
powerpc/papr_scm: Fix warnings about undeclared variable
Yang Yingliang (1):
powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n
zhengbin (3):
powerpc/fadump: Remove set but not used variable 'elf'
powerpc/perf: Remove set but not used variable 'target'
powerpc/powernv: Remove set but not used variable 'parent'
Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7 | 25 ++
Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci | 38 ++
Documentation/powerpc/isa-versions.rst | 4 +
Documentation/powerpc/ptrace.rst | 1 +
arch/Kconfig | 7 +
arch/powerpc/Kconfig | 21 +-
arch/powerpc/Makefile | 3 +-
arch/powerpc/Makefile.postlink | 2 +-
arch/powerpc/boot/Makefile | 2 +-
arch/powerpc/boot/dts/fsl/t1024rdb.dts | 1 -
arch/powerpc/boot/dts/fsl/t4240rdb.dts | 1 -
arch/powerpc/boot/util.S | 15 +-
arch/powerpc/configs/85xx/mpc85xx_cds_defconfig | 6 +-
arch/powerpc/configs/85xx/tqm8540_defconfig | 6 +-
arch/powerpc/configs/85xx/tqm8541_defconfig | 6 +-
arch/powerpc/configs/85xx/tqm8555_defconfig | 6 +-
arch/powerpc/configs/85xx/tqm8560_defconfig | 6 +-
arch/powerpc/include/asm/asm-prototypes.h | 5 +-
arch/powerpc/include/asm/book3s/64/hash-4k.h | 18 +-
arch/powerpc/include/asm/book3s/64/hash-64k.h | 13 +
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 4 +-
arch/powerpc/include/asm/book3s/64/mmu.h | 17 +-
arch/powerpc/include/asm/book3s/64/pgtable.h | 7 +
arch/powerpc/include/asm/book3s/64/radix.h | 16 +
arch/powerpc/include/asm/cacheflush.h | 10 +
arch/powerpc/include/asm/cputable.h | 18 +-
arch/powerpc/include/asm/cputhreads.h | 1 -
arch/powerpc/include/asm/delay.h | 2 +-
arch/powerpc/include/asm/drmem.h | 43 +--
arch/powerpc/include/asm/eeh.h | 9 +-
arch/powerpc/include/asm/hvcall.h | 38 ++
arch/powerpc/include/asm/hw_breakpoint.h | 12 +
arch/powerpc/include/asm/hw_irq.h | 11 +-
arch/powerpc/include/asm/icswx.h | 6 +-
arch/powerpc/include/asm/irq.h | 1 -
arch/powerpc/include/asm/machdep.h | 3 -
arch/powerpc/include/asm/mmu_context.h | 2 +-
arch/powerpc/include/asm/nohash/32/hugetlb-8xx.h | 14 +
arch/powerpc/include/asm/nohash/32/pgtable.h | 20 +-
arch/powerpc/include/asm/pnv-ocxl.h | 3 -
arch/powerpc/include/asm/ppc_asm.h | 13 +-
arch/powerpc/include/asm/processor.h | 9 +-
arch/powerpc/include/asm/ptrace.h | 4 -
arch/powerpc/include/asm/reg.h | 20 +-
arch/powerpc/include/asm/reg_booke.h | 1 -
arch/powerpc/include/asm/smp.h | 24 +-
arch/powerpc/include/asm/svm.h | 4 +
arch/powerpc/include/asm/synch.h | 19 +-
arch/powerpc/include/asm/time.h | 86 +----
arch/powerpc/include/asm/timex.h | 3 -
arch/powerpc/include/asm/tlb.h | 13 -
arch/powerpc/include/asm/topology.h | 20 +-
arch/powerpc/include/asm/uaccess.h | 75 ++--
arch/powerpc/include/uapi/asm/ptrace.h | 1 +
arch/powerpc/kernel/Makefile | 6 +-
arch/powerpc/kernel/asm-offsets.c | 1 +
arch/powerpc/kernel/btext.c | 17 +-
arch/powerpc/kernel/cputable.c | 16 +-
arch/powerpc/kernel/dt_cpu_ftrs.c | 1 +
arch/powerpc/kernel/eeh.c | 145 +++-----
arch/powerpc/kernel/eeh_pe.c | 50 +--
arch/powerpc/kernel/entry_32.S | 35 +-
arch/powerpc/kernel/entry_64.S | 8 +-
arch/powerpc/kernel/exceptions-64e.S | 11 -
arch/powerpc/kernel/fadump.c | 2 -
arch/powerpc/kernel/fpu.S | 16 -
arch/powerpc/kernel/head_32.h | 73 ++--
arch/powerpc/kernel/head_40x.S | 1 -
arch/powerpc/kernel/head_64.S | 7 +-
arch/powerpc/kernel/{head_32.S => head_book3s_32.S} | 93 +----
arch/powerpc/kernel/head_booke.h | 1 -
arch/powerpc/kernel/hw_breakpoint.c | 149 +-------
arch/powerpc/kernel/hw_breakpoint_constraints.c | 162 +++++++++
arch/powerpc/kernel/idle.c | 8 -
arch/powerpc/kernel/irq.c | 73 ++--
arch/powerpc/kernel/l2cr_6xx.S | 3 +-
arch/powerpc/kernel/misc_32.S | 48 ---
arch/powerpc/kernel/misc_64.S | 1 -
arch/powerpc/kernel/process.c | 149 ++++----
arch/powerpc/kernel/prom.c | 5 +
arch/powerpc/kernel/prom_init.c | 17 +-
arch/powerpc/kernel/ptrace/ptrace-noadv.c | 9 +-
arch/powerpc/kernel/rtas.c | 153 ++++++++
arch/powerpc/kernel/security.c | 34 +-
arch/powerpc/kernel/setup_32.c | 2 +-
arch/powerpc/kernel/setup_64.c | 105 +++++-
arch/powerpc/kernel/smp.c | 374 ++++++++++++-------
arch/powerpc/kernel/sysfs.c | 49 ++-
arch/powerpc/kernel/tau_6xx.c | 147 +++-----
arch/powerpc/kernel/time.c | 62 +---
arch/powerpc/kernel/tm.S | 35 +-
arch/powerpc/kernel/traps.c | 4 -
arch/powerpc/kernel/vdso32/datapage.S | 2 -
arch/powerpc/kernel/vdso32/vdso32.lds.S | 2 -
arch/powerpc/kvm/book3s_hv.c | 7 +
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 8 +
arch/powerpc/lib/code-patching.c | 17 +-
arch/powerpc/lib/sstep.c | 9 +-
arch/powerpc/mm/book3s32/hash_low.S | 21 +-
arch/powerpc/mm/book3s32/mmu.c | 94 ++---
arch/powerpc/mm/book3s64/hash_native.c | 8 +-
arch/powerpc/mm/book3s64/hash_utils.c | 12 +-
arch/powerpc/mm/book3s64/internal.h | 2 +
arch/powerpc/mm/book3s64/mmu_context.c | 4 +-
arch/powerpc/mm/book3s64/radix_pgtable.c | 10 +-
arch/powerpc/mm/book3s64/radix_tlb.c | 35 +-
arch/powerpc/mm/book3s64/slb.c | 4 +-
arch/powerpc/mm/drmem.c | 6 +-
arch/powerpc/mm/hugetlbpage.c | 20 +-
arch/powerpc/mm/init_64.c | 39 +-
arch/powerpc/mm/kasan/kasan_init_32.c | 31 +-
arch/powerpc/mm/mem.c | 6 +-
arch/powerpc/mm/nohash/8xx.c | 7 -
arch/powerpc/mm/nohash/fsl_booke.c | 16 +
arch/powerpc/mm/nohash/tlb.c | 4 -
arch/powerpc/mm/numa.c | 101 +++++-
arch/powerpc/mm/pgtable.c | 6 +-
arch/powerpc/mm/ptdump/8xx.c | 5 +
arch/powerpc/mm/ptdump/bats.c | 59 ---
arch/powerpc/oprofile/cell/spu_task_sync.c | 2 +-
arch/powerpc/perf/hv-gpci-requests.h | 6 +-
arch/powerpc/perf/hv-gpci.c | 73 +++-
arch/powerpc/perf/hv-gpci.h | 27 --
arch/powerpc/perf/imc-pmu.c | 3 -
arch/powerpc/perf/isa207-common.c | 10 +
arch/powerpc/perf/isa207-common.h | 2 +
arch/powerpc/perf/power10-pmu.c | 1 -
arch/powerpc/perf/power5+-pmu.c | 2 +
arch/powerpc/perf/power5-pmu.c | 2 +
arch/powerpc/perf/power6-pmu.c | 2 +
arch/powerpc/perf/power7-pmu.c | 2 +
arch/powerpc/perf/ppc970-pmu.c | 2 +
arch/powerpc/platforms/44x/machine_check.c | 1 +
arch/powerpc/platforms/44x/ppc476.c | 5 +-
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 4 +-
arch/powerpc/platforms/85xx/smp.c | 4 +-
arch/powerpc/platforms/Kconfig | 29 +-
arch/powerpc/platforms/Kconfig.cputype | 18 +-
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 3 +-
arch/powerpc/platforms/embedded6xx/storcenter.c | 3 +-
arch/powerpc/platforms/powermac/pmac.h | 2 +-
arch/powerpc/platforms/powermac/setup.c | 2 +-
arch/powerpc/platforms/powermac/sleep.S | 15 +-
arch/powerpc/platforms/powermac/smp.c | 12 +-
arch/powerpc/platforms/powernv/eeh-powernv.c | 98 +++--
arch/powerpc/platforms/powernv/idle.c | 302 +++++++++++-----
arch/powerpc/platforms/powernv/ocxl.c | 30 --
arch/powerpc/platforms/powernv/opal-core.c | 2 +-
arch/powerpc/platforms/powernv/opal-elog.c | 33 +-
arch/powerpc/platforms/powernv/opal-msglog.c | 2 +
arch/powerpc/platforms/powernv/opal-prd.c | 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 8 -
arch/powerpc/platforms/powernv/powernv.h | 7 +
arch/powerpc/platforms/powernv/rng.c | 2 +-
arch/powerpc/platforms/powernv/setup.c | 24 ++
arch/powerpc/platforms/powernv/smp.c | 6 +-
arch/powerpc/platforms/powernv/vas-window.c | 9 +-
arch/powerpc/platforms/ps3/spu.c | 4 +-
arch/powerpc/platforms/pseries/eeh_pseries.c | 376 +++++++-------------
arch/powerpc/platforms/pseries/hotplug-cpu.c | 6 +-
arch/powerpc/platforms/pseries/hotplug-memory.c | 82 +++--
arch/powerpc/platforms/pseries/hvCall_inst.c | 23 +-
arch/powerpc/platforms/pseries/iommu.c | 242 ++++++++++---
arch/powerpc/platforms/pseries/lpar.c | 2 +
arch/powerpc/platforms/pseries/lparcfg.c | 35 ++
arch/powerpc/platforms/pseries/papr_scm.c | 10 +-
arch/powerpc/platforms/pseries/rng.c | 1 +
arch/powerpc/platforms/pseries/setup.c | 6 +
arch/powerpc/platforms/pseries/svm.c | 26 ++
arch/powerpc/sysdev/xics/icp-hv.c | 1 +
arch/powerpc/sysdev/xive/common.c | 4 +-
arch/powerpc/tools/checkpatch.sh | 1 -
arch/powerpc/tools/unrel_branch_check.sh | 125 ++++---
arch/powerpc/xmon/xmon.c | 1 +
arch/sparc/kernel/smp_64.c | 65 +---
drivers/cpufreq/powernv-cpufreq.c | 9 +-
drivers/cpuidle/cpuidle-powernv.c | 2 +-
drivers/macintosh/smu.c | 4 +-
drivers/macintosh/windfarm_lm75_sensor.c | 2 -
drivers/macintosh/windfarm_lm87_sensor.c | 2 -
drivers/macintosh/windfarm_smu_sat.c | 3 +-
drivers/macintosh/windfarm_smu_sensors.c | 3 +-
drivers/misc/cxl/pci.c | 4 +-
drivers/misc/ocxl/Kconfig | 2 +-
drivers/misc/ocxl/afu_irq.c | 12 +-
drivers/misc/ocxl/link.c | 15 +-
drivers/scsi/cxlflash/ocxl_hw.c | 21 +-
drivers/scsi/cxlflash/ocxl_hw.h | 1 -
fs/exec.c | 17 +-
include/linux/cpuhotplug.h | 1 +
include/linux/topology.h | 2 +-
include/misc/ocxl.h | 10 +-
include/uapi/asm-generic/hugetlb_encode.h | 1 +
include/uapi/linux/mman.h | 1 +
tools/testing/selftests/powerpc/alignment/alignment_handler.c | 12 +-
tools/testing/selftests/powerpc/benchmarks/context_switch.c | 6 +
tools/testing/selftests/powerpc/dscr/Makefile | 2 +-
tools/testing/selftests/powerpc/dscr/dscr_default_test.c | 2 +
tools/testing/selftests/powerpc/dscr/dscr_explicit_test.c | 2 +
tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c | 2 +
tools/testing/selftests/powerpc/dscr/dscr_inherit_test.c | 2 +
tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c | 2 +
tools/testing/selftests/powerpc/dscr/dscr_sysfs_thread_test.c | 2 +
tools/testing/selftests/powerpc/dscr/dscr_user_test.c | 2 +
tools/testing/selftests/powerpc/eeh/eeh-basic.sh | 9 +-
tools/testing/selftests/powerpc/include/utils.h | 2 +-
tools/testing/selftests/powerpc/mm/bad_accesses.c | 1 +
tools/testing/selftests/powerpc/pmu/count_stcx_fail.c | 1 -
tools/testing/selftests/powerpc/pmu/l3_bank_test.c | 3 +
tools/testing/selftests/powerpc/pmu/per_event_excludes.c | 2 -
tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c | 48 ++-
tools/testing/selftests/powerpc/security/rfi_flush.c | 38 ++
tools/testing/selftests/powerpc/security/spectre_v2.c | 3 +
tools/testing/selftests/powerpc/stringloops/memcmp.c | 2 +-
tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S | 23 +-
tools/testing/selftests/powerpc/syscalls/Makefile | 2 +-
tools/testing/selftests/powerpc/syscalls/rtas_filter.c | 285 +++++++++++++++
tools/testing/selftests/powerpc/tm/tm-poison.c | 11 +-
tools/testing/selftests/powerpc/tm/tm-tmspr.c | 10 +-
tools/testing/selftests/powerpc/tm/tm-trap.c | 10 +-
tools/testing/selftests/powerpc/tm/tm-unavailable.c | 9 +-
tools/testing/selftests/powerpc/tm/tm.h | 3 +-
tools/testing/selftests/powerpc/utils.c | 39 +-
223 files changed, 3245 insertions(+), 2491 deletions(-)
rename arch/powerpc/kernel/{head_32.S => head_book3s_32.S} (94%)
create mode 100644 arch/powerpc/kernel/hw_breakpoint_constraints.c
create mode 100644 tools/testing/selftests/powerpc/syscalls/rtas_filter.c
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEJFGtCPCthwEv2Y/bUevqPMjhpYAFAl+JEgwACgkQUevqPMjh
pYC+qw//UCrTOCAgxAIv4Dx2kmSYxIkrAdeRM0jo2gMOMCaKpeYkWrpW0QSHudik
ecZetcBIPNkXybvzBeBj6B1LNFiH+BdiL+LyUKcUWHQwmvfb7dh0hzjQJKQ+vPci
jDDLWe+jVNvJ30k6e5yczXDJWz/EhoT/u+7fBxfQDEvgXhZGL8l40aqKB5uYiMgl
9Yoq+ORh4BzE/0FF9ubLDlsRdX2AkeKcCgqSbx6nokIbbFokIktu/1stXtzrhSJt
qzf/drz2UZy5sqzT1PBH+1Zv9jkqsMAWniKy6OJWX0SzTk26U2sr86cf8DydI9Ug
MFFQdOxOEoOcPQrbi0vZUknoG9Cmz3MJWFcx427z0aDR5HuMg3S5CCCCfCEATxdN
HoVPRKmhtVfk3JGGANqOP/7KWvmP43Ya2OdOwtl7KIIKKOf14e7UJCahn9CQB+cI
BKTOvpgAv/RgcSEa3LGWLwjWrVyxmF3RLshPfQ0JA26HuLDe6gXHXsrVZaL7wMjV
/ubXq5V1PpiHHNHyU/O4tgV4qNVkqvwQzwZxwwzNqiV+Eh4pXSCINIxTw20JT+Eg
1YjniS1P/OAZgo6dTeMyLzsf7fuLPBlITSzSXWmYaVx9Aq1fMcgfgF0+1sVcgUwz
1fI5jsFxnY6iSEya/4lhlV/PoGwByeXnFv7Ho59ALhvl/Q6zAtU=
=Z++I
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: [PATCH v6 02/11] mm/gup: Use functions to track lockless pgtbl walks on gup_pgd_range
From: Aneesh Kumar K.V @ 2020-10-16 3:27 UTC (permalink / raw)
To: Michal Suchánek, Leonardo Bras
Cc: Christophe Leroy, linux-arch, linux-kernel, Arnd Bergmann,
Greg Kroah-Hartman, kvm-ppc, linuxppc-dev, Nicholas Piggin,
Steven Price, Mahesh Salgaonkar, linux-mm, Paul Mackerras,
Allison Randal, Andrew Morton, Mike Rapoport, Robin Murphy,
Thomas Gleixner, Reza Arbab
In-Reply-To: <20201015144641.GE29778@kitsune.suse.cz>
Hi Michal,
On 10/15/20 8:16 PM, Michal Suchánek wrote:
> Hello,
>
> On Thu, Feb 06, 2020 at 12:25:18AM -0300, Leonardo Bras wrote:
>> On Thu, 2020-02-06 at 00:08 -0300, Leonardo Bras wrote:
>>> gup_pgd_range(addr, end, gup_flags, pages, &nr);
>>> - local_irq_enable();
>>> + end_lockless_pgtbl_walk(IRQS_ENABLED);
>>> ret = nr;
>>> }
>>>
>>
>> Just noticed IRQS_ENABLED is not available on other archs than ppc64.
>> I will fix this for v7.
>
> Has threre been v7?
>
> I cannot find it.
>
> Thanks
>
> Michal
>
https://lore.kernel.org/linuxppc-dev/20200505071729.54912-1-aneesh.kumar@linux.ibm.com
This series should help here.
-aneesh
^ permalink raw reply
* [PATCH] usb: gadget: fsl: fix null pointer checking
From: Ran Wang @ 2020-10-16 4:33 UTC (permalink / raw)
To: Li Yang, Felipe Balbi, Greg Kroah-Hartman
Cc: Peter Chen, linux-usb, linuxppc-dev, linux-kernel, Ran Wang
fsl_ep_fifo_status() should return error if _ep->desc is null.
Fixes: 75eaa498c99e (“usb: gadget: Correct NULL pointer checking in fsl gadget”)
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
---
drivers/usb/gadget/udc/fsl_udc_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c
index de528e3..ad6ff9c 100644
--- a/drivers/usb/gadget/udc/fsl_udc_core.c
+++ b/drivers/usb/gadget/udc/fsl_udc_core.c
@@ -1051,7 +1051,7 @@ static int fsl_ep_fifo_status(struct usb_ep *_ep)
u32 bitmask;
struct ep_queue_head *qh;
- if (!_ep || _ep->desc || !(_ep->desc->bEndpointAddress&0xF))
+ if (!_ep || !_ep->desc || !(_ep->desc->bEndpointAddress&0xF))
return -ENODEV;
ep = container_of(_ep, struct fsl_ep, ep);
--
2.7.4
^ permalink raw reply related
* RE: [PATCH] usb: gadget: fsl: fix null pointer checking
From: Peter Chen @ 2020-10-16 6:11 UTC (permalink / raw)
To: Ran Wang, Leo Li, Felipe Balbi, Greg Kroah-Hartman
Cc: linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Ran Wang
In-Reply-To: <20201016043326.40442-1-ran.wang_1@nxp.com>
>
> Fixes: 75eaa498c99e (“usb: gadget: Correct NULL pointer checking in fsl
> gadget”)
> Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
> ---
> drivers/usb/gadget/udc/fsl_udc_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c
> b/drivers/usb/gadget/udc/fsl_udc_core.c
> index de528e3..ad6ff9c 100644
> --- a/drivers/usb/gadget/udc/fsl_udc_core.c
> +++ b/drivers/usb/gadget/udc/fsl_udc_core.c
> @@ -1051,7 +1051,7 @@ static int fsl_ep_fifo_status(struct usb_ep *_ep)
> u32 bitmask;
> struct ep_queue_head *qh;
>
> - if (!_ep || _ep->desc || !(_ep->desc->bEndpointAddress&0xF))
> + if (!_ep || !_ep->desc || !(_ep->desc->bEndpointAddress&0xF))
> return -ENODEV;
>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Peter
^ permalink raw reply
* Re: [PATCH 1/8] powerpc/uaccess: Add unsafe_copy_from_user
From: Christoph Hellwig @ 2020-10-16 6:54 UTC (permalink / raw)
To: Christopher M. Riedl; +Cc: linuxppc-dev, linux-kernel, viro
In-Reply-To: <20201015150159.28933-2-cmr@codefail.de>
On Thu, Oct 15, 2020 at 10:01:52AM -0500, Christopher M. Riedl wrote:
> Implement raw_copy_from_user_allowed() which assumes that userspace read
> access is open. Use this new function to implement raw_copy_from_user().
> Finally, wrap the new function to follow the usual "unsafe_" convention
> of taking a label argument. The new raw_copy_from_user_allowed() calls
> __copy_tofrom_user() internally, but this is still safe to call in user
> access blocks formed with user_*_access_begin()/user_*_access_end()
> since asm functions are not instrumented for tracing.
Please also add a fallback unsafe_copy_from_user to linux/uaccess.h
so this can be used as a generic API.
^ permalink raw reply
* Re: [PATCH 3/8] powerpc: Mark functions called inside uaccess blocks w/ 'notrace'
From: Christoph Hellwig @ 2020-10-16 6:56 UTC (permalink / raw)
To: Christopher M. Riedl; +Cc: peterz, linuxppc-dev, linux-kernel
In-Reply-To: <20201015150159.28933-4-cmr@codefail.de>
On Thu, Oct 15, 2020 at 10:01:54AM -0500, Christopher M. Riedl wrote:
> Functions called between user_*_access_begin() and user_*_access_end()
> should be either inlined or marked 'notrace' to prevent leaving
> userspace access exposed. Mark any such functions relevant to signal
> handling so that subsequent patches can call them inside uaccess blocks.
I don't think running this much code with uaccess enabled is a good
idea. Please refactor the code to reduce the criticial sections with
uaccess enabled.
Btw, does powerpc already have the objtool validation that we don't
accidentally jump out of unsafe uaccess critical sections?
^ permalink raw reply
* [PATCH v2] soc: fsl: dpio: Change 'cpumask_t mask' to the driver's private data
From: Yi Wang @ 2020-10-16 6:48 UTC (permalink / raw)
To: Roy.Pledge, laurentiu.tudor
Cc: wang.yi59, jiang.xuexin, Hao Si, linux-kernel, leoyang.li,
xue.zhihong, Lin Chen, linuxppc-dev, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 4556 bytes --]
From: Hao Si <si.hao@zte.com.cn>
The local variable 'cpumask_t mask' is in the stack memory, and its address
is assigned to 'desc->affinity' in 'irq_set_affinity_hint()'.
But the memory area where this variable is located is at risk of being
modified.
During LTP testing, the following error was generated:
Unable to handle kernel paging request at virtual address ffff000012e9b790
Mem abort info:
ESR = 0x96000007
Exception class = DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x00000007
CM = 0, WnR = 0
swapper pgtable: 4k pages, 48-bit VAs, pgdp = 0000000075ac5e07
[ffff000012e9b790] pgd=00000027dbffe003, pud=00000027dbffd003,
pmd=00000027b6d61003, pte=0000000000000000
Internal error: Oops: 96000007 [#1] PREEMPT SMP
Modules linked in: xt_conntrack
Process read_all (pid: 20171, stack limit = 0x0000000044ea4095)
CPU: 14 PID: 20171 Comm: read_all Tainted: G B W
Hardware name: NXP Layerscape LX2160ARDB (DT)
pstate: 80000085 (Nzcv daIf -PAN -UAO)
pc : irq_affinity_hint_proc_show+0x54/0xb0
lr : irq_affinity_hint_proc_show+0x4c/0xb0
sp : ffff00001138bc10
x29: ffff00001138bc10 x28: 0000ffffd131d1e0
x27: 00000000007000c0 x26: ffff8025b9480dc0
x25: ffff8025b9480da8 x24: 00000000000003ff
x23: ffff8027334f8300 x22: ffff80272e97d000
x21: ffff80272e97d0b0 x20: ffff8025b9480d80
x19: ffff000009a49000 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: 0000000000000000
x13: 0000000000000000 x12: 0000000000000040
x11: 0000000000000000 x10: ffff802735b79b88
x9 : 0000000000000000 x8 : 0000000000000000
x7 : ffff000009a49848 x6 : 0000000000000003
x5 : 0000000000000000 x4 : ffff000008157d6c
x3 : ffff00001138bc10 x2 : ffff000012e9b790
x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
irq_affinity_hint_proc_show+0x54/0xb0
seq_read+0x1b0/0x440
proc_reg_read+0x80/0xd8
__vfs_read+0x60/0x178
vfs_read+0x94/0x150
ksys_read+0x74/0xf0
__arm64_sys_read+0x24/0x30
el0_svc_common.constprop.0+0xd8/0x1a0
el0_svc_handler+0x34/0x88
el0_svc+0x10/0x14
Code: f9001bbf 943e0732 f94066c2 b4000062 (f9400041)
---[ end trace b495bdcb0b3b732b ]---
Kernel panic - not syncing: Fatal exception
SMP: stopping secondary CPUs
SMP: failed to stop secondary CPUs 0,2-4,6,8,11,13-15
Kernel Offset: disabled
CPU features: 0x0,21006008
Memory Limit: none
---[ end Kernel panic - not syncing: Fatal exception ]---
Fix it by changing 'cpumask_t mask' to the driver's private data.
Signed-off-by: Hao Si <si.hao@zte.com.cn>
Signed-off-by: Lin Chen <chen.lin5@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
v2: Place 'cpumask_t mask' in the driver's private data and while at it,
rename it to cpu_mask.
drivers/soc/fsl/dpio/dpio-driver.c | 9 +++++----
include/linux/fsl/mc.h | 2 ++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c
index 7b642c3..e9d820d 100644
--- a/drivers/soc/fsl/dpio/dpio-driver.c
+++ b/drivers/soc/fsl/dpio/dpio-driver.c
@@ -95,7 +95,7 @@ static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu)
{
int error;
struct fsl_mc_device_irq *irq;
- cpumask_t mask;
+ cpumask_t *cpu_mask;
irq = dpio_dev->irqs[0];
error = devm_request_irq(&dpio_dev->dev,
@@ -112,9 +112,10 @@ static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu)
}
/* set the affinity hint */
- cpumask_clear(&mask);
- cpumask_set_cpu(cpu, &mask);
- if (irq_set_affinity_hint(irq->msi_desc->irq, &mask))
+ cpu_mask = &dpio_dev->mask;
+ cpumask_clear(cpu_mask);
+ cpumask_set_cpu(cpu, cpu_mask);
+ if (irq_set_affinity_hint(irq->msi_desc->irq, cpu_mask))
dev_err(&dpio_dev->dev,
"irq_set_affinity failed irq %d cpu %d\n",
irq->msi_desc->irq, cpu);
diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h
index a428c61..ebdfb54 100644
--- a/include/linux/fsl/mc.h
+++ b/include/linux/fsl/mc.h
@@ -151,6 +151,7 @@ struct fsl_mc_obj_desc {
/**
* struct fsl_mc_device - MC object device object
* @dev: Linux driver model device object
+ * @mask: cpu mask for affinity_hint
* @dma_mask: Default DMA mask
* @flags: MC object device flags
* @icid: Isolation context ID for the device
@@ -184,6 +185,7 @@ struct fsl_mc_obj_desc {
*/
struct fsl_mc_device {
struct device dev;
+ cpumask_t mask;
u64 dma_mask;
u16 flags;
u16 icid;
--
2.15.2
^ permalink raw reply related
* Re: [PATCH 3/8] powerpc: Mark functions called inside uaccess blocks w/ 'notrace'
From: Christophe Leroy @ 2020-10-16 7:02 UTC (permalink / raw)
To: Christopher M. Riedl, linuxppc-dev
In-Reply-To: <20201015150159.28933-4-cmr@codefail.de>
Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit :
> Functions called between user_*_access_begin() and user_*_access_end()
> should be either inlined or marked 'notrace' to prevent leaving
> userspace access exposed. Mark any such functions relevant to signal
> handling so that subsequent patches can call them inside uaccess blocks.
Is it enough to mark it "notrace" ? I see that when I activate KASAN, there are still KASAN calls in
those functions.
In my series for 32 bits, I re-ordered stuff in order to do all those calls before doing the
_access_begin(), can't you do the same on PPC64 ? (See
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/f6eac65781b4a57220477c8864bca2b57f29a5d5.1597770847.git.christophe.leroy@csgroup.eu/)
Christophe
>
> Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> ---
> arch/powerpc/kernel/process.c | 20 ++++++++++----------
> arch/powerpc/mm/mem.c | 4 ++--
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index ba2c987b8403..bf5d9654bd2c 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -84,7 +84,7 @@ extern unsigned long _get_SP(void);
> */
> bool tm_suspend_disabled __ro_after_init = false;
>
> -static void check_if_tm_restore_required(struct task_struct *tsk)
> +static void notrace check_if_tm_restore_required(struct task_struct *tsk)
> {
> /*
> * If we are saving the current thread's registers, and the
> @@ -151,7 +151,7 @@ void notrace __msr_check_and_clear(unsigned long bits)
> EXPORT_SYMBOL(__msr_check_and_clear);
>
> #ifdef CONFIG_PPC_FPU
> -static void __giveup_fpu(struct task_struct *tsk)
> +static void notrace __giveup_fpu(struct task_struct *tsk)
> {
> unsigned long msr;
>
> @@ -163,7 +163,7 @@ static void __giveup_fpu(struct task_struct *tsk)
> tsk->thread.regs->msr = msr;
> }
>
> -void giveup_fpu(struct task_struct *tsk)
> +void notrace giveup_fpu(struct task_struct *tsk)
> {
> check_if_tm_restore_required(tsk);
>
> @@ -177,7 +177,7 @@ EXPORT_SYMBOL(giveup_fpu);
> * Make sure the floating-point register state in the
> * the thread_struct is up to date for task tsk.
> */
> -void flush_fp_to_thread(struct task_struct *tsk)
> +void notrace flush_fp_to_thread(struct task_struct *tsk)
> {
> if (tsk->thread.regs) {
> /*
> @@ -234,7 +234,7 @@ static inline void __giveup_fpu(struct task_struct *tsk) { }
> #endif /* CONFIG_PPC_FPU */
>
> #ifdef CONFIG_ALTIVEC
> -static void __giveup_altivec(struct task_struct *tsk)
> +static void notrace __giveup_altivec(struct task_struct *tsk)
> {
> unsigned long msr;
>
> @@ -246,7 +246,7 @@ static void __giveup_altivec(struct task_struct *tsk)
> tsk->thread.regs->msr = msr;
> }
>
> -void giveup_altivec(struct task_struct *tsk)
> +void notrace giveup_altivec(struct task_struct *tsk)
> {
> check_if_tm_restore_required(tsk);
>
> @@ -285,7 +285,7 @@ EXPORT_SYMBOL(enable_kernel_altivec);
> * Make sure the VMX/Altivec register state in the
> * the thread_struct is up to date for task tsk.
> */
> -void flush_altivec_to_thread(struct task_struct *tsk)
> +void notrace flush_altivec_to_thread(struct task_struct *tsk)
> {
> if (tsk->thread.regs) {
> preempt_disable();
> @@ -300,7 +300,7 @@ EXPORT_SYMBOL_GPL(flush_altivec_to_thread);
> #endif /* CONFIG_ALTIVEC */
>
> #ifdef CONFIG_VSX
> -static void __giveup_vsx(struct task_struct *tsk)
> +static void notrace __giveup_vsx(struct task_struct *tsk)
> {
> unsigned long msr = tsk->thread.regs->msr;
>
> @@ -317,7 +317,7 @@ static void __giveup_vsx(struct task_struct *tsk)
> __giveup_altivec(tsk);
> }
>
> -static void giveup_vsx(struct task_struct *tsk)
> +static void notrace giveup_vsx(struct task_struct *tsk)
> {
> check_if_tm_restore_required(tsk);
>
> @@ -352,7 +352,7 @@ void enable_kernel_vsx(void)
> }
> EXPORT_SYMBOL(enable_kernel_vsx);
>
> -void flush_vsx_to_thread(struct task_struct *tsk)
> +void notrace flush_vsx_to_thread(struct task_struct *tsk)
> {
> if (tsk->thread.regs) {
> preempt_disable();
> diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
> index ddc32cc1b6cf..da2345a2abc6 100644
> --- a/arch/powerpc/mm/mem.c
> +++ b/arch/powerpc/mm/mem.c
> @@ -378,7 +378,7 @@ static inline bool flush_coherent_icache(unsigned long addr)
> * @start: the start address
> * @stop: the stop address (exclusive)
> */
> -static void invalidate_icache_range(unsigned long start, unsigned long stop)
> +static void notrace invalidate_icache_range(unsigned long start, unsigned long stop)
> {
> unsigned long shift = l1_icache_shift();
> unsigned long bytes = l1_icache_bytes();
> @@ -402,7 +402,7 @@ static void invalidate_icache_range(unsigned long start, unsigned long stop)
> * @start: the start address
> * @stop: the stop address (exclusive)
> */
> -void flush_icache_range(unsigned long start, unsigned long stop)
> +void notrace flush_icache_range(unsigned long start, unsigned long stop)
> {
> if (flush_coherent_icache(start))
> return;
>
^ permalink raw reply
* Re: [PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
From: Serge Semin @ 2020-10-16 8:52 UTC (permalink / raw)
To: Alexandre Torgue
Cc: Neil Armstrong, Bjorn Andersson, Paul Cercueil, Paul Mackerras,
Pavel Parkhomenko, linux-stm32, Rafał Miłecki,
Alexey Brodkin, Wei Xu, Andy Gross, bcm-kernel-feedback-list,
Kevin Hilman, linux-snps-arc, devicetree, Mathias Nyman,
Hauke Mehrtens, Lad Prabhakar, Vladimir Zapolskiy, Rob Herring,
linux-mediatek, Matthias Brugger, Alexey Malahov,
linux-arm-kernel, Roger Quadros, Felipe Balbi,
Thomas Bogendoerfer, Greg Kroah-Hartman, Yoshihiro Shimoda,
linux-usb, linux-mips, Serge Semin, linux-kernel, Manu Gautam,
Maxime Coquelin, Vineet Gupta, linuxppc-dev
In-Reply-To: <8a7af322-227b-9923-8fb6-f284af582b40@st.com>
Hello Alexandre,
On Fri, Oct 16, 2020 at 09:08:23AM +0200, Alexandre Torgue wrote:
> Hi Serge,
>
> On 10/14/20 12:14 PM, Serge Semin wrote:
> > In accordance with the Generic EHCI/OHCI bindings the corresponding node
> > name is suppose to comply with the Generic USB HCD DT schema, which
> > requires the USB nodes to have the name acceptable by the regexp:
> > "^usb(@.*)?" . Let's fix the DTS files, which have the nodes defined with
> > incompatible names.
> >
> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> >
> > ---
> >
> > Please, test the patch out to make sure it doesn't brake the dependent DTS
> > files. I did only a manual grepping of the possible nodes dependencies.
> > ---
> > arch/arc/boot/dts/axs10x_mb.dtsi | 4 ++--
> > arch/arc/boot/dts/hsdk.dts | 4 ++--
> > arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 2 +-
> > arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
> > arch/arm/boot/dts/bcm53573.dtsi | 4 ++--
> > arch/arm/boot/dts/hisi-x5hd2.dtsi | 4 ++--
> > arch/arm/boot/dts/lpc18xx.dtsi | 4 ++--
> > arch/arm/boot/dts/stm32mp151.dtsi | 4 ++--
> > arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi | 4 ++--
> > arch/arm64/boot/dts/hisilicon/hip06.dtsi | 4 ++--
> > arch/arm64/boot/dts/hisilicon/hip07.dtsi | 4 ++--
> > arch/mips/boot/dts/ingenic/jz4740.dtsi | 2 +-
> > arch/mips/boot/dts/ingenic/jz4770.dtsi | 2 +-
> > arch/mips/boot/dts/mti/sead3.dts | 2 +-
> > arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 +-
> > arch/powerpc/boot/dts/akebono.dts | 6 +++---
> > 16 files changed, 28 insertions(+), 28 deletions(-)
> >
>
> I surely missed something, but we have here in the same patch modifications
> for different architectures and different vendors.
>
> Do you plan to split this patch after getting some Acked-by / Tested-by ?
Yeah, I'll split this patch and two next ones up in v3.
-Sergey
>
> regards
> Alex
>
>
^ permalink raw reply
* Re: [PATCH 3/8] powerpc: Mark functions called inside uaccess blocks w/ 'notrace'
From: Peter Zijlstra @ 2020-10-16 9:41 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linuxppc-dev, linux-kernel, Christopher M. Riedl
In-Reply-To: <20201016065616.GB9343@infradead.org>
On Fri, Oct 16, 2020 at 07:56:16AM +0100, Christoph Hellwig wrote:
> On Thu, Oct 15, 2020 at 10:01:54AM -0500, Christopher M. Riedl wrote:
> > Functions called between user_*_access_begin() and user_*_access_end()
> > should be either inlined or marked 'notrace' to prevent leaving
> > userspace access exposed. Mark any such functions relevant to signal
> > handling so that subsequent patches can call them inside uaccess blocks.
>
> I don't think running this much code with uaccess enabled is a good
> idea. Please refactor the code to reduce the criticial sections with
> uaccess enabled.
>
> Btw, does powerpc already have the objtool validation that we don't
> accidentally jump out of unsafe uaccess critical sections?
It does not, there was some effort on that a while ago, but I suspect
they're waiting for the ARM64 effort to land and build on that.
^ permalink raw reply
* Re: [PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
From: Alexandre Torgue @ 2020-10-16 7:08 UTC (permalink / raw)
To: Serge Semin, Mathias Nyman, Felipe Balbi, Greg Kroah-Hartman,
Rob Herring, Alexey Brodkin, Vineet Gupta, Hauke Mehrtens,
Rafał Miłecki, bcm-kernel-feedback-list, Wei Xu,
Vladimir Zapolskiy, Maxime Coquelin, Paul Cercueil,
Thomas Bogendoerfer, Matthias Brugger, Michael Ellerman,
Benjamin Herrenschmidt, Paul Mackerras
Cc: devicetree, linux-snps-arc, linux-mips, Neil Armstrong,
Kevin Hilman, Yoshihiro Shimoda, linux-usb, linux-kernel,
Lad Prabhakar, Serge Semin, Bjorn Andersson, Manu Gautam,
Andy Gross, linux-mediatek, Pavel Parkhomenko, Alexey Malahov,
linuxppc-dev, linux-stm32, linux-arm-kernel, Roger Quadros
In-Reply-To: <20201014101402.18271-19-Sergey.Semin@baikalelectronics.ru>
Hi Serge,
On 10/14/20 12:14 PM, Serge Semin wrote:
> In accordance with the Generic EHCI/OHCI bindings the corresponding node
> name is suppose to comply with the Generic USB HCD DT schema, which
> requires the USB nodes to have the name acceptable by the regexp:
> "^usb(@.*)?" . Let's fix the DTS files, which have the nodes defined with
> incompatible names.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> ---
>
> Please, test the patch out to make sure it doesn't brake the dependent DTS
> files. I did only a manual grepping of the possible nodes dependencies.
> ---
> arch/arc/boot/dts/axs10x_mb.dtsi | 4 ++--
> arch/arc/boot/dts/hsdk.dts | 4 ++--
> arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 2 +-
> arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
> arch/arm/boot/dts/bcm53573.dtsi | 4 ++--
> arch/arm/boot/dts/hisi-x5hd2.dtsi | 4 ++--
> arch/arm/boot/dts/lpc18xx.dtsi | 4 ++--
> arch/arm/boot/dts/stm32mp151.dtsi | 4 ++--
> arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi | 4 ++--
> arch/arm64/boot/dts/hisilicon/hip06.dtsi | 4 ++--
> arch/arm64/boot/dts/hisilicon/hip07.dtsi | 4 ++--
> arch/mips/boot/dts/ingenic/jz4740.dtsi | 2 +-
> arch/mips/boot/dts/ingenic/jz4770.dtsi | 2 +-
> arch/mips/boot/dts/mti/sead3.dts | 2 +-
> arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 +-
> arch/powerpc/boot/dts/akebono.dts | 6 +++---
> 16 files changed, 28 insertions(+), 28 deletions(-)
>
I surely missed something, but we have here in the same patch
modifications for different architectures and different vendors.
Do you plan to split this patch after getting some Acked-by / Tested-by ?
regards
Alex
> diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
> index 99d3e7175bf7..b64435385304 100644
> --- a/arch/arc/boot/dts/axs10x_mb.dtsi
> +++ b/arch/arc/boot/dts/axs10x_mb.dtsi
> @@ -87,13 +87,13 @@ gmac: ethernet@18000 {
> mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
> };
>
> - ehci@40000 {
> + usb@40000 {
> compatible = "generic-ehci";
> reg = < 0x40000 0x100 >;
> interrupts = < 8 >;
> };
>
> - ohci@60000 {
> + usb@60000 {
> compatible = "generic-ohci";
> reg = < 0x60000 0x100 >;
> interrupts = < 8 >;
> diff --git a/arch/arc/boot/dts/hsdk.dts b/arch/arc/boot/dts/hsdk.dts
> index dcaa44e408ac..fdd4f7f635d3 100644
> --- a/arch/arc/boot/dts/hsdk.dts
> +++ b/arch/arc/boot/dts/hsdk.dts
> @@ -234,7 +234,7 @@ phy0: ethernet-phy@0 { /* Micrel KSZ9031 */
> };
> };
>
> - ohci@60000 {
> + usb@60000 {
> compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
> reg = <0x60000 0x100>;
> interrupts = <15>;
> @@ -242,7 +242,7 @@ ohci@60000 {
> dma-coherent;
> };
>
> - ehci@40000 {
> + usb@40000 {
> compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
> reg = <0x40000 0x100>;
> interrupts = <15>;
> diff --git a/arch/arc/boot/dts/vdk_axs10x_mb.dtsi b/arch/arc/boot/dts/vdk_axs10x_mb.dtsi
> index cbb179770293..90a412026e64 100644
> --- a/arch/arc/boot/dts/vdk_axs10x_mb.dtsi
> +++ b/arch/arc/boot/dts/vdk_axs10x_mb.dtsi
> @@ -46,7 +46,7 @@ ethernet@18000 {
> clock-names = "stmmaceth";
> };
>
> - ehci@40000 {
> + usb@40000 {
> compatible = "generic-ehci";
> reg = < 0x40000 0x100 >;
> interrupts = < 8 >;
> diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
> index 0016720ce530..bf5656d79a55 100644
> --- a/arch/arm/boot/dts/bcm5301x.dtsi
> +++ b/arch/arm/boot/dts/bcm5301x.dtsi
> @@ -261,7 +261,7 @@ usb2: usb2@21000 {
>
> interrupt-parent = <&gic>;
>
> - ehci: ehci@21000 {
> + ehci: usb@21000 {
> #usb-cells = <0>;
>
> compatible = "generic-ehci";
> @@ -283,7 +283,7 @@ ehci_port2: port@2 {
> };
> };
>
> - ohci: ohci@22000 {
> + ohci: usb@22000 {
> #usb-cells = <0>;
>
> compatible = "generic-ohci";
> diff --git a/arch/arm/boot/dts/bcm53573.dtsi b/arch/arm/boot/dts/bcm53573.dtsi
> index 4af8e3293cff..51546fccc616 100644
> --- a/arch/arm/boot/dts/bcm53573.dtsi
> +++ b/arch/arm/boot/dts/bcm53573.dtsi
> @@ -135,7 +135,7 @@ usb2: usb2@4000 {
> #address-cells = <1>;
> #size-cells = <1>;
>
> - ehci: ehci@4000 {
> + ehci: usb@4000 {
> compatible = "generic-ehci";
> reg = <0x4000 0x1000>;
> interrupt-parent = <&gic>;
> @@ -155,7 +155,7 @@ ehci_port2: port@2 {
> };
> };
>
> - ohci: ohci@d000 {
> + ohci: usb@d000 {
> #usb-cells = <0>;
>
> compatible = "generic-ohci";
> diff --git a/arch/arm/boot/dts/hisi-x5hd2.dtsi b/arch/arm/boot/dts/hisi-x5hd2.dtsi
> index 3ee7967c202d..693b85b2cc7d 100644
> --- a/arch/arm/boot/dts/hisi-x5hd2.dtsi
> +++ b/arch/arm/boot/dts/hisi-x5hd2.dtsi
> @@ -452,14 +452,14 @@ gmac1: ethernet@1841000 {
> status = "disabled";
> };
>
> - usb0: ehci@1890000 {
> + usb0: usb@1890000 {
> compatible = "generic-ehci";
> reg = <0x1890000 0x1000>;
> interrupts = <0 66 4>;
> clocks = <&clock HIX5HD2_USB_CLK>;
> };
>
> - usb1: ohci@1880000 {
> + usb1: usb@1880000 {
> compatible = "generic-ohci";
> reg = <0x1880000 0x1000>;
> interrupts = <0 67 4>;
> diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi
> index 10b8249b8ab6..82ffd7b0ad8a 100644
> --- a/arch/arm/boot/dts/lpc18xx.dtsi
> +++ b/arch/arm/boot/dts/lpc18xx.dtsi
> @@ -121,7 +121,7 @@ mmcsd: mmcsd@40004000 {
> status = "disabled";
> };
>
> - usb0: ehci@40006100 {
> + usb0: usb@40006100 {
> compatible = "nxp,lpc1850-ehci", "generic-ehci";
> reg = <0x40006100 0x100>;
> interrupts = <8>;
> @@ -133,7 +133,7 @@ usb0: ehci@40006100 {
> status = "disabled";
> };
>
> - usb1: ehci@40007100 {
> + usb1: usb@40007100 {
> compatible = "nxp,lpc1850-ehci", "generic-ehci";
> reg = <0x40007100 0x100>;
> interrupts = <9>;
> diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
> index bfe29023fbd5..576f7da564c5 100644
> --- a/arch/arm/boot/dts/stm32mp151.dtsi
> +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> @@ -1404,7 +1404,7 @@ ethernet0: ethernet@5800a000 {
> status = "disabled";
> };
>
> - usbh_ohci: usbh-ohci@5800c000 {
> + usbh_ohci: usb@5800c000 {
> compatible = "generic-ohci";
> reg = <0x5800c000 0x1000>;
> clocks = <&rcc USBH>;
> @@ -1413,7 +1413,7 @@ usbh_ohci: usbh-ohci@5800c000 {
> status = "disabled";
> };
>
> - usbh_ehci: usbh-ehci@5800d000 {
> + usbh_ehci: usb@5800d000 {
> compatible = "generic-ehci";
> reg = <0x5800d000 0x1000>;
> clocks = <&rcc USBH>;
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi
> index 12bc1d3ed424..a4acecb75c89 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi
> @@ -585,7 +585,7 @@ pcie: pcie@9860000 {
> status = "disabled";
> };
>
> - ohci: ohci@9880000 {
> + ohci: usb@9880000 {
> compatible = "generic-ohci";
> reg = <0x9880000 0x10000>;
> interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
> @@ -600,7 +600,7 @@ ohci: ohci@9880000 {
> status = "disabled";
> };
>
> - ehci: ehci@9890000 {
> + ehci: usb@9890000 {
> compatible = "generic-ehci";
> reg = <0x9890000 0x10000>;
> interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
> diff --git a/arch/arm64/boot/dts/hisilicon/hip06.dtsi b/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> index 50ceaa959bdc..1226440d54ad 100644
> --- a/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> @@ -373,7 +373,7 @@ refclk: refclk {
> #clock-cells = <0>;
> };
>
> - usb_ohci: ohci@a7030000 {
> + usb_ohci: usb@a7030000 {
> compatible = "generic-ohci";
> reg = <0x0 0xa7030000 0x0 0x10000>;
> interrupt-parent = <&mbigen_usb>;
> @@ -382,7 +382,7 @@ usb_ohci: ohci@a7030000 {
> status = "disabled";
> };
>
> - usb_ehci: ehci@a7020000 {
> + usb_ehci: usb@a7020000 {
> compatible = "generic-ehci";
> reg = <0x0 0xa7020000 0x0 0x10000>;
> interrupt-parent = <&mbigen_usb>;
> diff --git a/arch/arm64/boot/dts/hisilicon/hip07.dtsi b/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> index 4773a533fce5..93f99a5255ac 100644
> --- a/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> @@ -1253,7 +1253,7 @@ uart0: uart@602b0000 {
> status = "disabled";
> };
>
> - usb_ohci: ohci@a7030000 {
> + usb_ohci: usb@a7030000 {
> compatible = "generic-ohci";
> reg = <0x0 0xa7030000 0x0 0x10000>;
> interrupt-parent = <&mbigen_usb>;
> @@ -1262,7 +1262,7 @@ usb_ohci: ohci@a7030000 {
> status = "disabled";
> };
>
> - usb_ehci: ehci@a7020000 {
> + usb_ehci: usb@a7020000 {
> compatible = "generic-ehci";
> reg = <0x0 0xa7020000 0x0 0x10000>;
> interrupt-parent = <&mbigen_usb>;
> diff --git a/arch/mips/boot/dts/ingenic/jz4740.dtsi b/arch/mips/boot/dts/ingenic/jz4740.dtsi
> index 1520585c235c..b989ff62ffbc 100644
> --- a/arch/mips/boot/dts/ingenic/jz4740.dtsi
> +++ b/arch/mips/boot/dts/ingenic/jz4740.dtsi
> @@ -281,7 +281,7 @@ dmac: dma-controller@13020000 {
> clocks = <&cgu JZ4740_CLK_DMA>;
> };
>
> - uhc: uhc@13030000 {
> + uhc: usb@13030000 {
> compatible = "ingenic,jz4740-ohci", "generic-ohci";
> reg = <0x13030000 0x1000>;
>
> diff --git a/arch/mips/boot/dts/ingenic/jz4770.dtsi b/arch/mips/boot/dts/ingenic/jz4770.dtsi
> index fa11ac950499..e45c03038826 100644
> --- a/arch/mips/boot/dts/ingenic/jz4770.dtsi
> +++ b/arch/mips/boot/dts/ingenic/jz4770.dtsi
> @@ -417,7 +417,7 @@ dmac1: dma-controller@13420100 {
> interrupts = <23>;
> };
>
> - uhc: uhc@13430000 {
> + uhc: usb@13430000 {
> compatible = "generic-ohci";
> reg = <0x13430000 0x1000>;
>
> diff --git a/arch/mips/boot/dts/mti/sead3.dts b/arch/mips/boot/dts/mti/sead3.dts
> index 192c26ff1d3d..1cf6728af8fe 100644
> --- a/arch/mips/boot/dts/mti/sead3.dts
> +++ b/arch/mips/boot/dts/mti/sead3.dts
> @@ -56,7 +56,7 @@ gic: interrupt-controller@1b1c0000 {
> interrupt-parent = <&cpu_intc>;
> };
>
> - ehci@1b200000 {
> + usb@1b200000 {
> compatible = "generic-ehci";
> reg = <0x1b200000 0x1000>;
>
> diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi
> index 892e8ab863c5..45bf96a3d17a 100644
> --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi
> +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi
> @@ -275,7 +275,7 @@ usb_phy: usb-phy@10120000 {
> reset-names = "host", "device";
> };
>
> - ehci@101c0000 {
> + usb@101c0000 {
> compatible = "generic-ehci";
> reg = <0x101c0000 0x1000>;
>
> diff --git a/arch/powerpc/boot/dts/akebono.dts b/arch/powerpc/boot/dts/akebono.dts
> index df18f8dc4642..343326c30380 100644
> --- a/arch/powerpc/boot/dts/akebono.dts
> +++ b/arch/powerpc/boot/dts/akebono.dts
> @@ -126,7 +126,7 @@ SATA0: sata@30000010000 {
> interrupts = <93 2>;
> };
>
> - EHCI0: ehci@30010000000 {
> + EHCI0: usb@30010000000 {
> compatible = "ibm,476gtr-ehci", "generic-ehci";
> reg = <0x300 0x10000000 0x0 0x10000>;
> interrupt-parent = <&MPIC>;
> @@ -140,14 +140,14 @@ SD0: sd@30000000000 {
> interrupt-parent = <&MPIC>;
> };
>
> - OHCI0: ohci@30010010000 {
> + OHCI0: usb@30010010000 {
> compatible = "ibm,476gtr-ohci", "generic-ohci";
> reg = <0x300 0x10010000 0x0 0x10000>;
> interrupt-parent = <&MPIC>;
> interrupts = <89 1>;
> };
>
> - OHCI1: ohci@30010020000 {
> + OHCI1: usb@30010020000 {
> compatible = "ibm,476gtr-ohci", "generic-ohci";
> reg = <0x300 0x10020000 0x0 0x10000>;
> interrupt-parent = <&MPIC>;
>
^ permalink raw reply
* Re: [PATCH -next] Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed"
From: Michael Ellerman @ 2020-10-16 11:02 UTC (permalink / raw)
To: Michael Ellerman, Qian Cai
Cc: Stephen Rothwell, Alexey Kardashevskiy, linux-kernel, linux-next,
Oliver O'Halloran, Cédric Le Goater, linuxppc-dev
In-Reply-To: <20201014182811.12027-1-cai@lca.pw>
On Wed, 14 Oct 2020 14:28:11 -0400, Qian Cai wrote:
> This reverts commit 3a3181e16fbde752007759f8759d25e0ff1fc425 which
> causes memory corruptions on POWER9 NV.
Applied to powerpc/next.
[1/1] Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed"
https://git.kernel.org/powerpc/c/ffd0b25ca049a477cb757e5bcf2d5e1664d12e5d
cheers
^ permalink raw reply
* Re: [PATCH] selftests/powerpc: Fix eeh-basic.sh exit codes
From: Michael Ellerman @ 2020-10-16 11:02 UTC (permalink / raw)
To: Oliver O'Halloran, linuxppc-dev
In-Reply-To: <20201014024711.1138386-1-oohall@gmail.com>
On Wed, 14 Oct 2020 13:47:11 +1100, Oliver O'Halloran wrote:
> The kselftests test running infrastructure expects tests to finish with an
> exit code of 4 if the test decided it should be skipped. Currently
> eeh-basic.sh exits with the number of devices that failed to recover, so if
> four devices didn't recover we'll report a skip instead of a fail.
>
> Fix this by checking if the return code is non-zero and report success
> and failure by returning 0 or 1 respectively. For the cases where should
> actually skip return 4.
Applied to powerpc/next.
[1/1] selftests/powerpc: Fix eeh-basic.sh exit codes
https://git.kernel.org/powerpc/c/996f9e0f93f16211945c8d5f18f296a88cb32f91
cheers
^ permalink raw reply
* Re: [PATCH] powerpc/opal_elog: Handle multiple writes to ack attribute
From: Michael Ellerman @ 2020-10-16 11:32 UTC (permalink / raw)
To: mpe, Aneesh Kumar K.V, linuxppc-dev
Cc: Oliver O'Halloran, Mahesh Salgaonkar
In-Reply-To: <20201014064813.109515-1-aneesh.kumar@linux.ibm.com>
On Wed, 14 Oct 2020 12:18:13 +0530, Aneesh Kumar K.V wrote:
> Even though we use self removing sysfs helper, we still need
> to make sure we do the final kobject delete conditionally.
> sysfs_remove_file_self() will handle parallel calls to remove
> the sysfs attribute file and returns true only in the caller
> that removed the attribute file. The other parallel callers
> are returned false. Do the final kobject delete checking
> the return value of sysfs_remove_file_self().
Applied to powerpc/fixes.
[1/1] powerpc/opal_elog: Handle multiple writes to ack attribute
https://git.kernel.org/powerpc/c/d4263b12a1a0e8816e021450be0765a1ad8bb53c
cheers
^ permalink raw reply
* Re: [PATCH v4 0/2] powerpc/mce: Fix mce handler and add selftest
From: Michael Ellerman @ 2020-10-16 11:32 UTC (permalink / raw)
To: mpe, Ganesh Goudar, linuxppc-dev; +Cc: msuchanek, mahesh, npiggin, keescook
In-Reply-To: <20201009064005.19777-1-ganeshgr@linux.ibm.com>
On Fri, 9 Oct 2020 12:10:03 +0530, Ganesh Goudar wrote:
> This patch series fixes mce handling for pseries, Adds LKDTM test
> for SLB multihit recovery and enables selftest for the same,
> basically to test MCE handling on pseries/powernv machines running
> in hash mmu mode.
>
> v4:
> * Use radix_enabled() to check if its in Hash or Radix mode.
> * Use FW_FEATURE_LPAR instead of machine_is_pseries().
>
> [...]
Patch 1 applied to powerpc/fixes.
[1/2] powerpc/mce: Avoid nmi_enter/exit in real mode on pseries hash
https://git.kernel.org/powerpc/c/8d0e2101274358d9b6b1f27232b40253ca48bab5
cheers
^ 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