[PATCH v5 2/8] powerpc/watchpoint: Fix handling of vector instructions

2020-08-24 Thread Ravi Bangoria
Vector instructions are special because they are always aligned. Thus unaligned EA needs to be aligned down before comparing it with watch ranges. Otherwise we might consider valid event as invalid. Fixes: 74c6881019b7 ("powerpc/watchpoint: Prepare handler to handle more than one watchpoint")

[PATCH v5 3/8] powerpc/watchpoint/ptrace: Fix SETHWDEBUG when CONFIG_HAVE_HW_BREAKPOINT=N

2020-08-24 Thread Ravi Bangoria
When kernel is compiled with CONFIG_HAVE_HW_BREAKPOINT=N, user can still create watchpoint using PPC_PTRACE_SETHWDEBUG, with limited functionalities. But, such watchpoints are never firing because of the missing privilege settings. Fix that. It's safe to set HW_BRK_TYPE_PRIV_ALL because we don't

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

2020-08-24 Thread Ravi Bangoria
Power10 hw has multiple DAWRs but hw doesn't tell which DAWR caused the exception. So we have a sw logic to detect that in hw_breakpoint.c. But hw_breakpoint.c gets compiled only with CONFIG_HAVE_HW_BREAKPOINT=Y. Move DAWR detection logic outside of hw_breakpoint.c so that it can be reused when

[PATCH v5 6/8] powerpc/watchpoint: Add hw_len wherever missing

2020-08-24 Thread Ravi Bangoria
There are couple of places where we set len but not hw_len. For ptrace/perf watchpoints, when CONFIG_HAVE_HW_BREAKPOINT=Y, hw_len will be calculated and set internally while parsing watchpoint. But when CONFIG_HAVE_HW_BREAKPOINT=N, we need to manually set 'hw_len'. Similarly for xmon as well,

[PATCH v5 7/8] powerpc/watchpoint/ptrace: Introduce PPC_DEBUG_FEATURE_DATA_BP_ARCH_31

2020-08-24 Thread Ravi Bangoria
PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 can be used to determine whether we are running on an ISA 3.1 compliant machine. Which is needed to determine DAR behaviour, 512 byte boundary limit etc. This was requested by Pedro Miraglia Franco de Carvalho for extending watchpoint features in gdb. Note that

[PATCH v5 8/8] powerpc/watchpoint/selftests: Tests for kernel accessing user memory

2020-08-24 Thread Ravi Bangoria
Introduce tests to cover simple scenarios where user is watching memory which can be accessed by kernel as well. We also support _MODE_EXACT with _SETHWDEBUG interface. Move those testcases out- side of _BP_RANGE condition. This will help to test _MODE_EXACT scenarios when

[PATCH v5 5/8] powerpc/watchpoint: Fix exception handling for CONFIG_HAVE_HW_BREAKPOINT=N

2020-08-24 Thread Ravi Bangoria
On powerpc, ptrace watchpoint works in one-shot mode. i.e. kernel disables event every time it fires and user has to re-enable it. Also, in case of ptrace watchpoint, kernel notifies ptrace user before executing instruction. With CONFIG_HAVE_HW_BREAKPOINT=N, kernel is missing to disable ptrace

[PATCH 00/29] treewide: Convert comma separated statements

2020-08-24 Thread Joe Perches
There are many comma separated statements in the kernel. See:https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2008201856110.2524@hadrien/ Convert the comma separated statements that are in if/do/while blocks to use braces and semicolons. Many comma separated statements still exist but those are

[PATCH 17/29] fs_enet: Avoid comma separated statements

2020-08-24 Thread Joe Perches
Use semicolons and braces. Signed-off-by: Joe Perches --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c

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

2020-08-24 Thread Giuseppe Sacco
Hello Christophe, Il giorno lun, 24/08/2020 alle 07.17 +0200, Christophe Leroy ha scritto: > Hello Giuseppe, [...] > The Oopses in the video are fixed in 5.9-rc2, see my response to your > other mail. Right, I just updated from git and rebuilt the kernel whith CONFIG_VMAP_STACK not set and the

[PATCH v2] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

2020-08-24 Thread Ye Bin
udc_controller->irq is "unsigned int" always >= 0, but platform_get_irq may return little than zero. So "dc_controller->irq < 0" condition is never accessible. Signed-off-by: Ye Bin --- drivers/usb/gadget/udc/fsl_udc_core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

Re: [PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

2020-08-24 Thread Greg KH
On Mon, Aug 24, 2020 at 04:04:37PM +0800, Ye Bin wrote: > Signed-off-by: Ye Bin I can't take patches without any changelog text, sorry. greg k-h

Re: [PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

2020-08-24 Thread Joakim Tjernlund
On Mon, 2020-08-24 at 10:21 +0200, Greg KH wrote: > > On Mon, Aug 24, 2020 at 04:04:37PM +0800, Ye Bin wrote: > > Signed-off-by: Ye Bin > > I can't take patches without any changelog text, sorry. Still taking patches for fsl_udc_core.c ? I figured this driver was obsolete and should be moved

[PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

2020-08-24 Thread Ye Bin
Signed-off-by: Ye Bin --- drivers/usb/gadget/udc/fsl_udc_core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index a6f7b2594c09..3e98740b8cfc 100644 ---

Re: Re:Re: [PATCH] powerpc: Fix a bug in __div64_32 if divisor is zero

2020-08-24 Thread Guohua Zhong
>> Yet, I have noticed that there is no checking of 'base' in these functions. >> But I am not sure how to check is better.As we know that the result is >> undefined when divisor is zero. It maybe good to print error and dump stack. >> Let the process to know that the divisor is zero by sending

Re: [PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

2020-08-24 Thread Felipe Balbi
Joakim Tjernlund writes: > On Mon, 2020-08-24 at 10:21 +0200, Greg KH wrote: >> >> On Mon, Aug 24, 2020 at 04:04:37PM +0800, Ye Bin wrote: >> > Signed-off-by: Ye Bin >> >> I can't take patches without any changelog text, sorry. > > Still taking patches for fsl_udc_core.c ? > I figured this

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

2020-08-24 Thread Jordan Niethe
The signal handler in the alignment handler self test has the ability to jump over the instruction that triggered the signal. It does this by incrementing the PT_NIP in the user context by 4. If it were a prefixed instruction this will mean that the suffix is then executed which is incorrect.

Re: [PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

2020-08-24 Thread Joakim Tjernlund
On Mon, 2020-08-24 at 16:58 +0300, Felipe Balbi wrote: > Joakim Tjernlund writes: > > > On Mon, 2020-08-24 at 10:21 +0200, Greg KH wrote: > > > > > > On Mon, Aug 24, 2020 at 04:04:37PM +0800, Ye Bin wrote: > > > > Signed-off-by: Ye Bin > > > > > > I can't take patches without any changelog

Re: Re:Re: [PATCH] powerpc: Fix a bug in __div64_32 if divisor is zero

2020-08-24 Thread Guohua Zhong
>> >In generic version in lib/math/div64.c, there is no checking of 'base' >> >either. >> >Do we really want to add this check in the powerpc version only ? >> >> >The only user of __div64_32() is do_div() in >> >include/asm-generic/div64.h. Wouldn't it be better to do the check there ? >> >>

[PATCH AUTOSEL 5.4 36/38] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-08-24 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating

[PATCH AUTOSEL 4.4 6/6] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-08-24 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating

Re: Re:Re: [PATCH] powerpc: Fix a bug in __div64_32 if divisor is zero

2020-08-24 Thread Segher Boessenkool
On Mon, Aug 24, 2020 at 07:54:07PM +0800, Guohua Zhong wrote: > >> Yet, I have noticed that there is no checking of 'base' in these functions. > >> But I am not sure how to check is better.As we know that the result is > >> undefined when divisor is zero. It maybe good to print error and dump >

RE: [PATCH v2] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

2020-08-24 Thread Leo Li
> -Original Message- > From: Ye Bin > Sent: Monday, August 24, 2020 3:43 AM > To: Leo Li ; linux-...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org > Cc: Ye Bin > Subject: [PATCH v2] usb: gadget: fsl: Fix unsigned expression compared with > zero in fsl_udc_probe > >

RE: Re:Re: [PATCH] powerpc: Fix a bug in __div64_32 if divisor is zero

2020-08-24 Thread David Laight
From: Guohua Zhong > Sent: 24 August 2020 14:26 > > >> >In generic version in lib/math/div64.c, there is no checking of 'base' > >> >either. > >> >Do we really want to add this check in the powerpc version only ? > >> > >> >The only user of __div64_32() is do_div() in > >>

[PATCH AUTOSEL 5.8 59/63] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-08-24 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating

[PATCH AUTOSEL 4.9 8/8] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-08-24 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating

[PATCH AUTOSEL 4.14 11/11] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-08-24 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating

[PATCH AUTOSEL 4.19 21/21] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-08-24 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating

[PATCH AUTOSEL 5.7 50/54] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-08-24 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating

Re: fsl_espi errors on v5.7.15

2020-08-24 Thread Chris Packham
On 20/08/20 9:08 am, Chris Packham wrote: > > On 19/08/20 6:15 pm, Heiner Kallweit wrote: >> On 19.08.2020 00:44, Chris Packham wrote: >>> Hi Again, >>> >>> On 17/08/20 9:09 am, Chris Packham wrote: >>> On 14/08/20 6:19 pm, Heiner Kallweit wrote: > On 14.08.2020 04:48, Chris Packham

[Bug 209029] New: kernel 5.9-rc2 fails to boot on a PowerMac G5 11, 2 - BUG: Kernel NULL pointer dereference on read at 0x00000020

2020-08-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=209029 Bug ID: 209029 Summary: kernel 5.9-rc2 fails to boot on a PowerMac G5 11,2 - BUG: Kernel NULL pointer dereference on read at 0x0020 Product: Platform Specific/Hardware

[Bug 209029] kernel 5.9-rc2 fails to boot on a PowerMac G5 11,2 - BUG: Kernel NULL pointer dereference on read at 0x00000020

2020-08-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=209029 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 292155 --> https://bugzilla.kernel.org/attachment.cgi?id=292155=edit dmesg screenshot -- You are receiving this mail because: You are watching the assignee of the

[PATCH net] ibmvnic fix NULL tx_pools and rx_tools issue at do_reset

2020-08-24 Thread Dany Madden
From: Mingming Cao At the time of do_reset, ibmvnic tries to re-initalize the tx_pools and rx_pools to avoid re-allocating the long term buffer. However there is a window inside do_reset that the tx_pools and rx_pools were freed before re-initialized making it possible to deference null

[PATCH] powerpc/boot: Update Makefile comment for 64bit wrapper

2020-08-24 Thread Jordan Niethe
As of commit 147c05168fc8 ("powerpc/boot: Add support for 64bit little endian wrapper") the comment in the Makefile is misleading. The wrapper packaging 64bit kernel may built as a 32 or 64 bit elf. Update the comment to reflect this. Signed-off-by: Jordan Niethe --- arch/powerpc/boot/Makefile

Re: fsl_espi errors on v5.7.15

2020-08-24 Thread Chris Packham
On 25/08/20 10:04 am, Chris Packham wrote: > > On 20/08/20 9:08 am, Chris Packham wrote: >> >> On 19/08/20 6:15 pm, Heiner Kallweit wrote: >>> On 19.08.2020 00:44, Chris Packham wrote: Hi Again, On 17/08/20 9:09 am, Chris Packham wrote: > On 14/08/20 6:19 pm, Heiner

[PATCH v5 0/8] powerpc/watchpoint: Bug fixes plus new feature flag

2020-08-24 Thread Ravi Bangoria
Patch #1 fixes issue for quardword instruction on p10 predecessors. Patch #2 fixes issue for vector instructions. Patch #3 fixes a bug about watchpoint not firing when created with ptrace PPC_PTRACE_SETHWDEBUG and CONFIG_HAVE_HW_BREAKPOINT=N. The fix uses HW_BRK_TYPE_PRIV_ALL for

[PATCH v5 1/8] powerpc/watchpoint: Fix quarword instruction handling on p10 predecessors

2020-08-24 Thread Ravi Bangoria
On p10 predecessors, watchpoint with quarword access is compared at quardword length. If the watch range is doubleword or less than that in a first half of quarword aligned 16 bytes, and if there is any unaligned quadword access which will access only the 2nd half, the handler should consider it

Re: [GIT PULL] fallthrough pseudo-keyword macro conversions for 5.9-rc3

2020-08-24 Thread Nathan Chancellor
On Sun, Aug 23, 2020 at 10:48:41PM -0500, Gustavo A. R. Silva wrote: > Hi Linus, > > Not sure what the problem was with my pull-request for -rc2. So, I'm giving > this a second try because I think it is worth it. > > I have build-tested this patch on 10 different architectures: x86_64, i386, >

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

2020-08-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208957 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED

Re: [GIT PULL] fallthrough pseudo-keyword macro conversions for 5.9-rc3

2020-08-24 Thread Gustavo A. R. Silva
Hi Nathan, On 8/24/20 14:43, Nathan Chancellor wrote: >> Gustavo A. R. Silva (1): >> treewide: Use fallthrough pseudo-keyword > > $ scripts/config --file arch/powerpc/configs/powernv_defconfig -e KERNEL_XZ > > $ make -skj"$(nproc)" ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- distclean