Re: [PATCH v2 6/6] powerpc/eeh: Refactor around eeh_probe_devices()

2019-06-18 Thread Sam Bobroff
On Wed, Jun 05, 2019 at 03:49:15PM +1000, Oliver wrote: > On Tue, May 7, 2019 at 2:30 PM Sam Bobroff wrote: > > > > Now that EEH support for all devices (on PowerNV and pSeries) is > > provided by the pcibios bus add device hooks, eeh_probe_devices() and > > eeh_addr_cache_build() are redundant

Re: [PATCH 4/7] powerpc/ftrace: Additionally nop out the preceding mflr with -mprofile-kernel

2019-06-18 Thread Michael Ellerman
Hi Naveen, Sorry I meant to reply to this earlier .. :/ "Naveen N. Rao" writes: > With -mprofile-kernel, gcc emits 'mflr r0', followed by 'bl _mcount' to > enable function tracing and profiling. So far, with dynamic ftrace, we > used to only patch out the branch to _mcount(). However, mflr is >

Re: [PATCH v2 1/1] cpuidle-powernv : forced wakeup for stop states

2019-06-18 Thread Nicholas Piggin
Abhishek Goel's on June 17, 2019 7:56 pm: > Currently, the cpuidle governors determine what idle state a idling CPU > should enter into based on heuristics that depend on the idle history on > that CPU. Given that no predictive heuristic is perfect, there are cases > where the governor predicts a

Re: [PATCH v2 3/6] powerpc/eeh: Improve debug messages around device addition

2019-06-18 Thread Sam Bobroff
On Tue, Jun 11, 2019 at 03:47:58PM +1000, Alexey Kardashevskiy wrote: > > > On 07/05/2019 14:30, Sam Bobroff wrote: > > Also remove useless comment. > > > > Signed-off-by: Sam Bobroff > > Reviewed-by: Alexey Kardashevskiy > > --- > > arch/powerpc/kernel/eeh.c| 2 +- > >

[PATCH kernel] powerpc/powernv/npu: Export symbols as GPL

2019-06-18 Thread Alexey Kardashevskiy
The out-of-tree NVIDIA driver has been re-licensed recently to MIT/GPL so we can do the right thing and restrict the exported symbols to GPL only. Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/platforms/powernv/npu-dma.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

Re: [PATCH kernel 1/2] powerpc/pseries/dma: Allow swiotlb

2019-06-18 Thread Thiago Jung Bauermann
Alexey Kardashevskiy writes: > On 11/05/2019 08:36, Thiago Jung Bauermann wrote: >> >> Alexey Kardashevskiy writes: >> >>> The commit 8617a5c5bc00 ("powerpc/dma: handle iommu bypass in >>> dma_iommu_ops") merged direct DMA ops into the IOMMU DMA ops allowing >>> SWIOTLB as well but only for

Re: [PATCH 1/3] powerpc/64: __ioremap_at clean up in the error case

2019-06-18 Thread Nicholas Piggin
Christophe Leroy's on June 11, 2019 4:28 pm: > > > Le 10/06/2019 à 05:08, Nicholas Piggin a écrit : >> __ioremap_at error handling is wonky, it requires caller to clean up >> after it. Implement a helper that does the map and error cleanup and >> remove the requirement from the caller. >> >>

Re: [PATCH 2/3] powerpc/64s/radix: ioremap use ioremap_page_range

2019-06-18 Thread Nicholas Piggin
Christophe Leroy's on June 11, 2019 4:46 pm: > > > Le 10/06/2019 à 05:08, Nicholas Piggin a écrit : >> Radix can use ioremap_page_range for ioremap, after slab is available. >> This makes it possible to enable huge ioremap mapping support. >> >> Signed-off-by: Nicholas Piggin >> --- >>

Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/

2019-06-18 Thread Nicholas Piggin
Christophe Leroy's on June 11, 2019 3:24 pm: > > > Le 10/06/2019 à 06:38, Nicholas Piggin a écrit : >> ioremap_page_range is a generic function to create a kernel virtual >> mapping, move it to mm/vmalloc.c and rename it vmap_range. >> >> For clarity with this move, also: >> - Rename

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-18 Thread Nicholas Piggin
Christophe Leroy's on June 11, 2019 3:39 pm: > > > Le 10/06/2019 à 06:38, Nicholas Piggin a écrit : >> For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow vmalloc to >> allocate huge pages and map them > > Will this be compatible with Russell's series >

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-18 Thread Nicholas Piggin
Anshuman Khandual's on June 11, 2019 4:17 pm: > > > On 06/10/2019 08:14 PM, Nicholas Piggin wrote: >> Mark Rutland's on June 11, 2019 12:10 am: >>> Hi, >>> >>> On Mon, Jun 10, 2019 at 02:38:38PM +1000, Nicholas Piggin wrote: For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-18 Thread Nicholas Piggin
Anshuman Khandual's on June 11, 2019 4:59 pm: > On 06/11/2019 05:46 AM, Nicholas Piggin wrote: >> Anshuman Khandual's on June 10, 2019 6:53 pm: >>> On 06/10/2019 10:08 AM, Nicholas Piggin wrote: For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow vmalloc to allocate huge pages

Re: [PATCH kernel] powerpc/pci/of: Parse unassigned resources

2019-06-18 Thread Alexey Kardashevskiy
On 18/06/2019 22:15, Michael Ellerman wrote: > Alexey Kardashevskiy writes: >> The pseries platform uses the PCI_PROBE_DEVTREE method of PCI probing >> which is basically reading "assigned-addresses" of every PCI device. >> However if the property is missing or zero sized, then there is >> no

Re: [PATCH v5 2/2] powerpc: Fix compile issue with force DAWR

2019-06-18 Thread Michael Neuling
On Tue, 2019-06-18 at 18:28 +0200, Christophe Leroy wrote: > > Le 04/06/2019 à 05:00, Michael Neuling a écrit : > > If you compile with KVM but without CONFIG_HAVE_HW_BREAKPOINT you fail > > at linking with: > >arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x708): undefined > > reference to

Re: [PATCH 0/1] PPC32: fix ptrace() access to FPU registers

2019-06-18 Thread Daniel Axtens
Andreas Schwab writes: > On Jun 18 2019, Radu Rendec wrote: > >> Since you already have a working setup, it would be nice if you could >> add a printk to arch_ptrace() to print the address and confirm what I >> believe happens (by reading the gdb source code). > > A ppc32 ptrace syscall goes

Re: [PATCH 3/4] powerpc/powernv: remove dead NPU DMA code

2019-06-18 Thread Alexey Kardashevskiy
On 23/05/2019 17:49, Christoph Hellwig wrote: > None of these routines were ever used since they were added to the > kernel. It is still being used exactly in the way as it was explained before in previous respins. Thanks. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH v4 3/6] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2019-06-18 Thread Thiago Jung Bauermann
Hello Bharata, Bharata B Rao writes: > diff --git a/arch/powerpc/include/asm/kvm_book3s_hmm.h > b/arch/powerpc/include/asm/kvm_book3s_hmm.h > index 21f3de5f2acb..3e13dab7f690 100644 > --- a/arch/powerpc/include/asm/kvm_book3s_hmm.h > +++ b/arch/powerpc/include/asm/kvm_book3s_hmm.h > @@ -11,6

Re: [PATCH v4 1/3] PM: wakeup: Add routine to help fetch wakeup source object.

2019-06-18 Thread Rafael J. Wysocki
On Monday, May 20, 2019 11:52:36 AM CEST Ran Wang wrote: > Some user might want to go through all registered wakeup sources > and doing things accordingly. For example, SoC PM driver might need to > do HW programming to prevent powering down specific IP which wakeup > source depending on. And is

[PATCH v1 22/22] admin-guide: add kdump documentation into it

2019-06-18 Thread Mauro Carvalho Chehab
The Kdump documentation describes procedures with admins use in order to solve issues on their systems. Signed-off-by: Mauro Carvalho Chehab --- Documentation/admin-guide/bug-hunting.rst| 4 ++-- Documentation/admin-guide/index.rst | 1 + Documentation/{ =>

[PATCH V2] crypto/NX: Set receive window credits to max number of CRBs in RxFIFO

2019-06-18 Thread Haren Myneni
System gets checkstop if RxFIFO overruns with more requests than the maximum possible number of CRBs in FIFO at the same time. The max number of requests per window is controlled by window credits. So find max CRBs from FIFO size and set it to receive window credits. Fixes: b0d6c9bab5e4

Re: [EXTERNAL] Re: crypto/NX: Set receive window credits to max number of CRBs in RxFIFO

2019-06-18 Thread Haren Myneni
On 06/18/2019 05:35 AM, Michael Ellerman wrote: > Haren Myneni writes: >> >> System gets checkstop if RxFIFO overruns with more requests than the >> maximum possible number of CRBs in FIFO at the same time. So find max >> CRBs from FIFO size and set it to receive window credits. >> >>

Re: [PATCH 5/7] powerpc/ftrace: Update ftrace_location() for powerpc -mprofile-kernel

2019-06-18 Thread Steven Rostedt
On Tue, 18 Jun 2019 23:53:11 +0530 "Naveen N. Rao" wrote: > Naveen N. Rao wrote: > > Steven Rostedt wrote: > >> On Tue, 18 Jun 2019 20:17:04 +0530 > >> "Naveen N. Rao" wrote: > >> > >>> @@ -1551,7 +1551,7 @@ unsigned long ftrace_location_range(unsigned long > >>> start, unsigned long end)

Re: [PATCH 5/7] powerpc/ftrace: Update ftrace_location() for powerpc -mprofile-kernel

2019-06-18 Thread Naveen N. Rao
Naveen N. Rao wrote: Steven Rostedt wrote: On Tue, 18 Jun 2019 20:17:04 +0530 "Naveen N. Rao" wrote: @@ -1551,7 +1551,7 @@ unsigned long ftrace_location_range(unsigned long start, unsigned long end) key.flags = end;/* overload flags, as it is unsigned long */ for (pg =

Re: [PATCH 5/7] powerpc/ftrace: Update ftrace_location() for powerpc -mprofile-kernel

2019-06-18 Thread Naveen N. Rao
Steven Rostedt wrote: On Tue, 18 Jun 2019 20:17:04 +0530 "Naveen N. Rao" wrote: @@ -1551,7 +1551,7 @@ unsigned long ftrace_location_range(unsigned long start, unsigned long end) key.flags = end;/* overload flags, as it is unsigned long */ for (pg = ftrace_pages_start; pg;

Re: [PATCH 0/1] PPC32: fix ptrace() access to FPU registers

2019-06-18 Thread Andreas Schwab
On Jun 18 2019, Radu Rendec wrote: > Since you already have a working setup, it would be nice if you could > add a printk to arch_ptrace() to print the address and confirm what I > believe happens (by reading the gdb source code). A ppc32 ptrace syscall goes through compat_arch_ptrace.

Re: [PATCH] ps3_gelic: Use [] to denote a flexible array member

2019-06-18 Thread David Miller
From: Geert Uytterhoeven Date: Mon, 17 Jun 2019 13:50:44 +0200 > Flexible array members should be denoted using [] instead of [0], else > gcc will not warn when they are no longer at the end of a struct. > > Signed-off-by: Geert Uytterhoeven Applied to net-next, thanks.

Re: [PATCH v5 2/2] powerpc: Fix compile issue with force DAWR

2019-06-18 Thread Christophe Leroy
Le 04/06/2019 à 05:00, Michael Neuling a écrit : If you compile with KVM but without CONFIG_HAVE_HW_BREAKPOINT you fail at linking with: arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x708): undefined reference to `dawr_force_enable' This was caused by commit c1fe190c0672 ("powerpc: Add

Re: [PATCH 00/15] kbuild: refactor headers_install and support compile-test of UAPI headers

2019-06-18 Thread Masahiro Yamada
On Tue, Jun 4, 2019 at 7:15 PM Masahiro Yamada wrote: > > > Multiple people have suggested to compile-test UAPI headers. > > Currently, Kbuild provides simple sanity checks by headers_check > but they are not enough to catch bugs. > > The most recent patch I know is David Howells' work: >

Re: [PATCH 5/7] powerpc/ftrace: Update ftrace_location() for powerpc -mprofile-kernel

2019-06-18 Thread Steven Rostedt
On Tue, 18 Jun 2019 20:17:04 +0530 "Naveen N. Rao" wrote: > @@ -1551,7 +1551,7 @@ unsigned long ftrace_location_range(unsigned long > start, unsigned long end) > key.flags = end;/* overload flags, as it is unsigned long */ > > for (pg = ftrace_pages_start; pg; pg =

Re: Re: [PATCH v3 4/9] KVM: PPC: Ultravisor: Add generic ultravisor call handler

2019-06-18 Thread Ram Pai
On Tue, Jun 18, 2019 at 06:47:01AM -0500, Segher Boessenkool wrote: > Hi Paul, > > On Mon, Jun 17, 2019 at 12:06:32PM +1000, Paul Mackerras wrote: > > The thing we need to consider is that when SMFCTRL[E] = 0, a ucall > > instruction becomes a hcall (that is, sc 2 is executed as if it was > > sc

[PATCH 3/7] ftrace: Expose __ftrace_replace_code()

2019-06-18 Thread Naveen N. Rao
While over-riding ftrace_replace_code(), we still want to reuse the existing __ftrace_replace_code() function. Rename the function and make it available for other kernel code. Signed-off-by: Naveen N. Rao --- include/linux/ftrace.h | 1 + kernel/trace/ftrace.c | 8 2 files changed, 5

[PATCH 5/7] powerpc/ftrace: Update ftrace_location() for powerpc -mprofile-kernel

2019-06-18 Thread Naveen N. Rao
Now that we are patching the preceding 'mflr r0' instruction with -mprofile-kernel, we need to update ftrace_location[_range]() to recognise that as being part of ftrace. To do this, we make a small change to ftrace_location_range() and convert ftrace_cmp_recs() into a weak function. We implement

[PATCH 6/7] kprobes/ftrace: Use ftrace_location() when [dis]arming probes

2019-06-18 Thread Naveen N. Rao
Ftrace location could include more than a single instruction in case of some architectures (powerpc64, for now). In this case, kprobe is permitted on any of those instructions, and uses ftrace infrastructure for functioning. However, [dis]arm_kprobe_ftrace() uses the kprobe address when setting

[PATCH 7/7] powerpc/kprobes: Allow probing on any ftrace address

2019-06-18 Thread Naveen N. Rao
With KPROBES_ON_FTRACE, kprobe is allowed to be inserted on instructions that branch to _mcount (referred to as ftrace location). With -mprofile-kernel, we now include the preceding 'mflr r0' as being part of the ftrace location. However, by default, probing on an instruction that is not actually

[PATCH 4/7] powerpc/ftrace: Additionally nop out the preceding mflr with -mprofile-kernel

2019-06-18 Thread Naveen N. Rao
With -mprofile-kernel, gcc emits 'mflr r0', followed by 'bl _mcount' to enable function tracing and profiling. So far, with dynamic ftrace, we used to only patch out the branch to _mcount(). However, mflr is executed by the branch unit that can only execute one per cycle on POWER9 and shared with

[PATCH 2/7] x86/ftrace: Fix use of flags in ftrace_replace_code()

2019-06-18 Thread Naveen N. Rao
In commit a0572f687fb3c ("ftrace: Allow ftrace_replace_code() to be schedulable), the generic ftrace_replace_code() function was modified to accept a flags argument in place of a single 'enable' flag. However, the x86 version of this function was not updated. Fix the same. Fixes: a0572f687fb3c

[PATCH 1/7] ftrace: Expose flags used for ftrace_replace_code()

2019-06-18 Thread Naveen N. Rao
Since ftrace_replace_code() is a __weak function and can be overridden, we need to expose the flags that can be set. So, move the flags enum to the header file. Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Naveen N. Rao --- include/linux/ftrace.h | 5 + kernel/trace/ftrace.c | 5

[PATCH 0/7] powerpc/ftrace: Patch out -mprofile-kernel instructions

2019-06-18 Thread Naveen N. Rao
Changes since RFC: - Patches 1 and 2: No changes - Patch 3: rename function to ftrace_replace_code_rec() to signify that it acts on a ftrace record. - Patch 4: numerous small changes, including those suggested by Nick Piggin. - Patch 4: additionally handle scenario where __ftrace_make_call()

Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length calculation for unaligned target

2019-06-18 Thread Michael Neuling
On Tue, 2019-06-18 at 09:57 +0530, Ravi Bangoria wrote: > Watchpoint match range is always doubleword(8 bytes) aligned on > powerpc. If the given range is crossing doubleword boundary, we > need to increase the length such that next doubleword also get > covered. Ex, > > address len =

Re: [PATCH] powerpc/mm: Ensure Huge-page memory is free before allocation

2019-06-18 Thread Vaibhav Jain
Michael Ellerman writes: > Vaibhav Jain writes: >> We recently discovered an bug where physical memory meant for >> allocation of Huge-pages was inadvertently allocated by another component >> during early boot. > > Can you give me some more detail on what that was? You're seemingly the > only

Re: [PATCH] powerpc/mm: Ensure Huge-page memory is free before allocation

2019-06-18 Thread Aneesh Kumar K.V
On 6/18/19 5:37 PM, Michael Ellerman wrote: Vaibhav Jain writes: We recently discovered an bug where physical memory meant for allocation of Huge-pages was inadvertently allocated by another component during early boot. Can you give me some more detail on what that was? You're seemingly the

Re: [PATCH] powerpc/32s: fix initial setup of segment registers on secondary CPU

2019-06-18 Thread Christophe Leroy
Le 18/06/2019 à 14:31, Michael Ellerman a écrit : Christophe Leroy writes: Le 11/06/2019 à 17:47, Christophe Leroy a écrit : The patch referenced below moved the loading of segment registers out of load_up_mmu() in order to do it earlier in the boot sequence. However, the secondary CPU

Re: [PATCH v4 19/28] docs: powerpc: convert docs to ReST and rename to *.rst

2019-06-18 Thread Michael Ellerman
Jonathan Corbet writes: > On Wed, 12 Jun 2019 14:52:55 -0300 > Mauro Carvalho Chehab wrote: > >> Convert docs to ReST and add them to the arch-specific >> book. >> >> The conversion here was trivial, as almost every file there >> was already using an elegant format close to ReST standard. >>

Re: crypto/NX: Set receive window credits to max number of CRBs in RxFIFO

2019-06-18 Thread Michael Ellerman
Haren Myneni writes: > > System gets checkstop if RxFIFO overruns with more requests than the > maximum possible number of CRBs in FIFO at the same time. So find max > CRBs from FIFO size and set it to receive window credits. > > CC: sta...@vger.kernel.org # v4.14+ > Signed-off-by:Haren

Re: [PATCH] selftests/powerpc: Add missing newline at end of file

2019-06-18 Thread Geert Uytterhoeven
Hi Michael, On Tue, Jun 18, 2019 at 2:23 PM Michael Ellerman wrote: > Geert Uytterhoeven writes: > > "git diff" says: > > > > \ No newline at end of file > > > > after modifying the file. > > Is that a problem? > > Just curious because it was presumably me that broke it :) It looks messy

Re: [PATCH] powerpc/32s: fix initial setup of segment registers on secondary CPU

2019-06-18 Thread Michael Ellerman
Christophe Leroy writes: > Le 11/06/2019 à 17:47, Christophe Leroy a écrit : >> The patch referenced below moved the loading of segment registers >> out of load_up_mmu() in order to do it earlier in the boot sequence. >> However, the secondary CPU still needs it to be done when loading up >> the

Re: [PATCH kernel] powerpc/pci/of: Parse unassigned resources

2019-06-18 Thread Benjamin Herrenschmidt
On Tue, 2019-06-18 at 22:15 +1000, Michael Ellerman wrote: > Alexey Kardashevskiy writes: > > The pseries platform uses the PCI_PROBE_DEVTREE method of PCI probing > > which is basically reading "assigned-addresses" of every PCI device. > > However if the property is missing or zero sized, then

Re: [PATCH v2] perf ioctl: Add check for the sample_period value

2019-06-18 Thread Michael Ellerman
Ravi Bangoria writes: > Peter / mpe, > > Is the v2 looks good? If so, can anyone of you please pick this up. I usually wouldn't take it, it's generic perf code. Unless peter/ingo/acme tell me otherwise. It's sort of a bug fix for 0819b2e30ccb, should it have a fixes and/or stable tag? Fixes:

Re: [PATCH] selftests/powerpc: Add missing newline at end of file

2019-06-18 Thread Michael Ellerman
Geert Uytterhoeven writes: > "git diff" says: > > \ No newline at end of file > > after modifying the file. Is that a problem? Just curious because it was presumably me that broke it :) cheers > diff --git a/tools/testing/selftests/powerpc/mm/.gitignore >

Re: [PATCH v1 1/6] mm: Section numbers use the type "unsigned long"

2019-06-18 Thread Michael Ellerman
Andrew Morton writes: > On Sat, 15 Jun 2019 10:06:54 +0200 Christophe Leroy > wrote: >> Le 14/06/2019 à 21:00, Andrew Morton a écrit : >> > On Fri, 14 Jun 2019 12:01:09 +0200 David Hildenbrand >> > wrote: >> > >> >> We are using a mixture of "int" and "unsigned long". Let's make this >> >>

Re: [PATCH 0/1] PPC32: fix ptrace() access to FPU registers

2019-06-18 Thread Radu Rendec
On Tue, 2019-06-18 at 16:42 +1000, Daniel Axtens wrote: > Radu Rendec < > radu.ren...@gmail.com > > writes: > > > On Mon, 2019-06-17 at 11:19 +1000, Daniel Axtens wrote: > > > Radu Rendec < > > > radu.ren...@gmail.com > > > > > > > writes: > > > > Hi Everyone, > > > > > > > > I'm following up

Re: [PATCH kernel] powerpc/pci/of: Parse unassigned resources

2019-06-18 Thread Michael Ellerman
Alexey Kardashevskiy writes: > The pseries platform uses the PCI_PROBE_DEVTREE method of PCI probing > which is basically reading "assigned-addresses" of every PCI device. > However if the property is missing or zero sized, then there is > no fallback of any kind and the PCI resources remain

Re: [PATCH] powerpc/mm: Ensure Huge-page memory is free before allocation

2019-06-18 Thread Michael Ellerman
Vaibhav Jain writes: > We recently discovered an bug where physical memory meant for > allocation of Huge-pages was inadvertently allocated by another component > during early boot. Can you give me some more detail on what that was? You're seemingly the only person who's ever hit this :) > The

Re: [PATCH] selftests/powerpc: Fix earlyclobber in tm-vmxcopy

2019-06-18 Thread Segher Boessenkool
On Mon, Jun 17, 2019 at 05:24:58PM -0400, Gustavo Romero wrote: > In some cases, compiler can allocate the same register for operand 'res' > and 'vecoutptr', resulting in segfault at 'stxvd2x 40,0,%[vecoutptr]' > because base register will contain 1, yielding a false-positive. > > This is because

Re: [PATCH v3 4/9] KVM: PPC: Ultravisor: Add generic ultravisor call handler

2019-06-18 Thread Segher Boessenkool
Hi Paul, On Mon, Jun 17, 2019 at 12:06:32PM +1000, Paul Mackerras wrote: > The thing we need to consider is that when SMFCTRL[E] = 0, a ucall > instruction becomes a hcall (that is, sc 2 is executed as if it was > sc 1). In that case, the first argument to the ucall will be > interpreted as the

Re: [PATCH 3/5] Powerpc/hw-breakpoint: Refactor set_dawr()

2019-06-18 Thread Ravi Bangoria
On 6/18/19 11:41 AM, Michael Neuling wrote: > This is going to collide with this patch > https://patchwork.ozlabs.org/patch/1109594/ Yeah, I'm aware of the patch. I just developed this on powerpc/next. I'll rebase my patches accordingly once mpe picks up that patche.

Re: [PATCH 2/5] Powerpc/hw-breakpoint: Refactor hw_breakpoint_arch_parse()

2019-06-18 Thread Ravi Bangoria
On 6/18/19 11:51 AM, Christophe Leroy wrote: > > > Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : >> Move feature availability check at the start of the function. >> Rearrange comment to it's associated code. Use hw->address and >> hw->len in the 512 bytes boundary check(to write if statement

Re: [PATCH kernel v3 0/3] powerpc/ioda2: Yet another attempt to allow DMA masks between 32 and 59

2019-06-18 Thread Shawn Anastasio
On 6/18/19 1:39 AM, Alexey Kardashevskiy wrote: On 18/06/2019 14:26, Shawn Anastasio wrote: On 6/12/19 2:15 PM, Shawn Anastasio wrote: On 6/12/19 2:07 AM, Alexey Kardashevskiy wrote: On 12/06/2019 15:05, Shawn Anastasio wrote: On 6/5/19 11:11 PM, Shawn Anastasio wrote: On 5/30/19 2:03

Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length calculation for unaligned target

2019-06-18 Thread Christophe Leroy
Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : Watchpoint match range is always doubleword(8 bytes) aligned on powerpc. If the given range is crossing doubleword boundary, we need to increase the length such that next doubleword also get covered. Ex, address len = 6 bytes

Re: [PATCH 0/1] PPC32: fix ptrace() access to FPU registers

2019-06-18 Thread Daniel Axtens
Radu Rendec writes: > On Mon, 2019-06-17 at 11:19 +1000, Daniel Axtens wrote: >> Radu Rendec < >> radu.ren...@gmail.com >> > writes: >> >> > Hi Everyone, >> > >> > I'm following up on the ptrace() problem that I reported a few days ago. >> > I believe my version of the code handles all cases

Re: [PATCH kernel v3 0/3] powerpc/ioda2: Yet another attempt to allow DMA masks between 32 and 59

2019-06-18 Thread Alexey Kardashevskiy
On 18/06/2019 14:26, Shawn Anastasio wrote: > On 6/12/19 2:15 PM, Shawn Anastasio wrote: >> On 6/12/19 2:07 AM, Alexey Kardashevskiy wrote: >>> >>> >>> On 12/06/2019 15:05, Shawn Anastasio wrote: On 6/5/19 11:11 PM, Shawn Anastasio wrote: > On 5/30/19 2:03 AM, Alexey Kardashevskiy

Re: [PATCH 4/5] Powerpc/hw-breakpoint: Optimize disable path

2019-06-18 Thread Christophe Leroy
Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : Directly setting dawr and dawrx with 0 should be enough to disable watchpoint. No need to reset individual bits in variable and then set in hw. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/hw_breakpoint.h | 3 ++-

Re: [PATCH 3/5] Powerpc/hw-breakpoint: Refactor set_dawr()

2019-06-18 Thread Christophe Leroy
Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : Remove unnecessary comments. Code itself is self explanatory. And, ISA already talks about MRD field. I Don't think we need to re-describe it. In an RFC patch you may "don't think". But in the final patch you need to make a decision and write

Re: [PATCH 2/5] Powerpc/hw-breakpoint: Refactor hw_breakpoint_arch_parse()

2019-06-18 Thread Christophe Leroy
Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : Move feature availability check at the start of the function. Rearrange comment to it's associated code. Use hw->address and hw->len in the 512 bytes boundary check(to write if statement in a single line). Add spacing between code blocks. Are

Re: [PATCH 0/5] Powerpc/hw-breakpoint: Fixes plus Code refactor

2019-06-18 Thread Michael Neuling
On Tue, 2019-06-18 at 08:01 +0200, Christophe Leroy wrote: > > Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : > > patch 1-3: Code refactor > > patch 4: Speedup disabling breakpoint > > patch 5: Fix length calculation for unaligned targets > > While you are playing with hw breakpoints, did you

Re: [PATCH 4/5] Powerpc/hw-breakpoint: Optimize disable path

2019-06-18 Thread Michael Neuling
On Tue, 2019-06-18 at 09:57 +0530, Ravi Bangoria wrote: > Directly setting dawr and dawrx with 0 should be enough to > disable watchpoint. No need to reset individual bits in > variable and then set in hw. This seems like a pointless optimisation to me. I'm all for adding more code/complexity

Re: [PATCH 1/5] Powerpc/hw-breakpoint: Replace stale do_dabr() with do_break()

2019-06-18 Thread Christophe Leroy
The subject text should mention you are changing comments. Here it suggests you are changing code text. Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : do_dabr() was renamed with do_break() long ago. But I still see some comments mentioning do_dabr(). Replace it. s/Replace it/Replace them/

Re: [PATCH 3/5] Powerpc/hw-breakpoint: Refactor set_dawr()

2019-06-18 Thread Michael Neuling
This is going to collide with this patch https://patchwork.ozlabs.org/patch/1109594/ Mikey On Tue, 2019-06-18 at 09:57 +0530, Ravi Bangoria wrote: > Remove unnecessary comments. Code itself is self explanatory. > And, ISA already talks about MRD field. I Don't think we need > to re-describe

Re: [PATCH 1/5] Powerpc/hw-breakpoint: Replace stale do_dabr() with do_break()

2019-06-18 Thread Michael Neuling
> Subject: Powerpc/hw-breakpoint: Replace stale do_dabr() with do_break() Can you add the word "comment" to this subject. Currently it implies there are code changes here. Mikey On Tue, 2019-06-18 at 09:57 +0530, Ravi Bangoria wrote: > do_dabr() was renamed with do_break() long ago. But I

Re: [PATCH 0/5] Powerpc/hw-breakpoint: Fixes plus Code refactor

2019-06-18 Thread Christophe Leroy
Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : patch 1-3: Code refactor patch 4: Speedup disabling breakpoint patch 5: Fix length calculation for unaligned targets While you are playing with hw breakpoints, did you have a look at https://github.com/linuxppc/issues/issues/38 ? Christophe