Re: [PATCH v2] of: fix memory leak related to safe_name()

2016-06-16 Thread Mathieu Malaterre
I only tested v2. I confirm this solve the symptoms I was seeing in the bug report. Tested-by: Mathieu Malaterre thanks, your patch is actually much cleaner! On Wed, Jun 15, 2016 at 10:42 PM, Frank Rowand wrote: > From: Frank Rowand > > Fix a memory leak resulting from memory allocation in sa

Re: [PATCH] tools/perf: fix the word selected in find_*_bit

2016-06-16 Thread Madhavan Srinivasan
On Thursday 16 June 2016 01:21 AM, Yury Norov wrote: > Hi Madhavan, > > On Wed, Jun 15, 2016 at 05:12:53PM +0530, Madhavan Srinivasan wrote: >> When decoding the perf_regs mask in regs_dump__printf(), >> we loop through the mask using find_first_bit and find_next_bit functions. >> And mask is of

Re: [PATCH] tools/perf: fix the word selected in find_*_bit

2016-06-16 Thread Madhavan Srinivasan
On Wednesday 15 June 2016 06:14 PM, George Spelvin wrote: > Madhavan Srinivasan wrote: >> +#if (__BYTE_ORDER == __BIG_ENDIAN) && (BITS_PER_LONG != 64) >> +tmp = addr[(((nbits - 1)/BITS_PER_LONG) - (start / BITS_PER_LONG))] >> +^ inve

Re: [PATCH v2] of: fix memory leak related to safe_name()

2016-06-16 Thread Mathieu Malaterre
Sorry, symptoms not solved. According to kmemleak, I have now: [ 661.323100] kmemleak: 100 new suspected memory leaks (see /sys/kernel/debug/kmemleak) [ 1260.226120] kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) # head -40 /sys/kernel/debug/kmemleak unreferenced object

Re: unrecoverable exception on G5 with CONFIG_PPC_EARLY_DEBUG enabled

2016-06-16 Thread Denis Kirjanov
On 6/6/16, Michael Ellerman wrote: > On Mon, 2016-06-06 at 10:52 +0300, Denis Kirjanov wrote: > >> Update: now with the proper mailing address. >> >> Hi, >> >> Posting if anyone knows how to quickly fix it :) > > Sorry but no. > >> Enabling CONFIG_PPC_EARLY_DEBUG on my quad G5 causes kernel to di

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Aneesh Kumar K.V
"Darrick J. Wong" writes: > On Thu, Jun 16, 2016 at 03:23:47PM +1000, Michael Ellerman wrote: >> On Wed, 2016-06-15 at 21:33 -0700, Darrick J. Wong wrote: >> >> > Hi Aneesh, >> > >> > I noticed when trying out 4.7-rc3 on qemu-2.5 that the kernel no longer >> > boots. 4.6 booted just fine, so I

Re: [V3, 2/2] powerpc/drivers: Add driver for operator panel on FSP machines

2016-06-16 Thread Michael Ellerman
On Thu, 2016-28-04 at 07:02:38 UTC, Suraj Jitindar Singh wrote: > Implement new character device driver to allow access from user space > to the 2x16 character operator panel display present on IBM Power Systems > machines with FSPs. I looked at this previously and somehow convinced myself it depe

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > "Darrick J. Wong" writes: > >> On Thu, Jun 16, 2016 at 03:23:47PM +1000, Michael Ellerman wrote: >>> On Wed, 2016-06-15 at 21:33 -0700, Darrick J. Wong wrote: >>> >>> > Hi Aneesh, >>> > >>> > I noticed when trying out 4.7-rc3 on qemu-2.5 that the kernel no longer >

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > "Aneesh Kumar K.V" writes: > >> "Darrick J. Wong" writes: >> >>> On Thu, Jun 16, 2016 at 03:23:47PM +1000, Michael Ellerman wrote: On Wed, 2016-06-15 at 21:33 -0700, Darrick J. Wong wrote: > Hi Aneesh, > > I noticed when trying out 4.7-rc3

[PATCH v2 2/2] tools include: Fix wrong macro definitions for cpu_to_le* for big endian

2016-06-16 Thread He Kuang
From: Wang Nan The cpu_to_le* macros in kernel.h are defined without considering endianese. This patch includes "byteoder/generic.h" instead to fix the bug, and removes redundant definitions of those macros in intel-bts.c and intel-pt-pkt-decoder.c. Signed-off-by: Wang Nan Signed-off-by: He Kua

[PATCH v2 1/2] tools include: Adopt byte ordering macros from byteorder/generic.h

2016-06-16 Thread He Kuang
From: Wang Nan This patch adopts the macros for byte order conversion from "include/linux/byteorder/generic.h" to "tools/include/linux/byteorder/generic.h" tools/perf/MANIFEST is also updated for 'make perf-*-src-pkg'. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/include/linux/b

Re: [PATCH v2 1/2] tools include: Adopt byte ordering macros from byteorder/generic.h

2016-06-16 Thread Jiri Olsa
On Thu, Jun 16, 2016 at 10:41:31AM +, He Kuang wrote: > From: Wang Nan > > This patch adopts the macros for byte order conversion from > "include/linux/byteorder/generic.h" to > "tools/include/linux/byteorder/generic.h" > > tools/perf/MANIFEST is also updated for 'make perf-*-src-pkg'. othe

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Benjamin Herrenschmidt
<1466054627.5400.5.ca...@ellerman.id.au> <20160616055746.gc22...@birch.djwong.org> <8737oda1lt@skywalker.in.ibm.com> <87ziql8l93@skywalker.in.ibm.com> <87wplp8kxh@skywalker.in.ibm.com> Organization: IBM Australia

Re: unrecoverable exception on G5 with CONFIG_PPC_EARLY_DEBUG enabled

2016-06-16 Thread Michael Ellerman
On Thu, 2016-06-16 at 11:12 +0300, Denis Kirjanov wrote: > On 6/6/16, Michael Ellerman wrote: > > On Mon, 2016-06-06 at 10:52 +0300, Denis Kirjanov wrote: > > > I haven't bisected this yet. Photo attached. > > > > A bisect would be awesome. > > Ok, the issue was introduced by the commit > caca28

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Michael Ellerman
On Wed, 2016-06-15 at 12:01 -0400, Tejun Heo wrote: > On Wed, Jun 15, 2016 at 03:14:15PM +0200, Peter Zijlstra wrote: > > On Wed, Jun 15, 2016 at 06:20:33PM +0530, Gautham R Shenoy wrote: > > > We will no longer have the optimization in > > > restore_unbound_workers_cpumask() but I suppose we don't

[PATCH] powerpc/align: Use #ifdef __BIG_ENDIAN__ #else for REG_BYTE

2016-06-16 Thread Michael Ellerman
From: Daniel Axtens Sparse complains that it doesn't know what REG_BYTE is: arch/powerpc/kernel/align.c:313:29: error: undefined identifier 'REG_BYTE' REG_BYTE is defined differently based on whether we're compiling for LE, BE32 or BE64. Sparse apparently doesn't provide __BIG_ENDIAN__ or __L

Re: [PATCH] cxl: Make vPHB device node match adapter's

2016-06-16 Thread Frederic Barrat
Thanks, Ian. Here is a hopefully better commit message: cxl: Make vPHB device node match adapter's On bare-metal, when a device is attached to the cxl card, lsvpd shows a location code such as (with cxlflash): # lsvpd -l sg22 ... *YL U78CB.001.WZS0073-P1-C33-B0-T0-L0 which makes it h

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Peter Zijlstra
On Thu, Jun 16, 2016 at 10:11:24PM +1000, Michael Ellerman wrote: > Peterz do you want to send a SOB'ed patch, or can we take what you posted and > add your SOB? So I took Ego's first patch, so as to not steal his credits take that one and then see below. --- Subject: workqueue: Fix setting affin

Re: [v5, 1/2] cxl: Add mechanism for delivering AFU driver specific events

2016-06-16 Thread Michael Ellerman
On Mon, 2016-23-05 at 12:49:01 UTC, Philippe Bergheaud wrote: > This adds an afu_driver_ops structure with deliver_event() and > event_delivered() callbacks. An AFU driver such as cxlflash can fill > this out and associate it with a context to enable passing custom > AFU specific events to userspac

Re: cxl: Refine slice error debug messages.

2016-06-16 Thread Michael Ellerman
On Wed, 2016-11-05 at 14:10:53 UTC, Philippe Bergheaud wrote: > Signed-off-by: Philippe Bergheaud > Acked-by: Ian Munsie This conflicted with "cxl: Abstract the differences between the PSL and XSL" so I dropped this. Please rebase and resend if you still want it to go in. cheers _

Re: [PATCH] tools/perf: fix the word selected in find_*_bit

2016-06-16 Thread Madhavan Srinivasan
On Thursday 16 June 2016 02:41 AM, Yury Norov wrote: > On Wed, Jun 15, 2016 at 10:51:27PM +0300, Yury Norov wrote: >> Hi Madhavan, >> >> On Wed, Jun 15, 2016 at 05:12:53PM +0530, Madhavan Srinivasan wrote: >>> When decoding the perf_regs mask in regs_dump__printf(), >>> we loop through the mask u

Re: [v5, 1/2] cxl: Add mechanism for delivering AFU driver specific events

2016-06-16 Thread Philippe Bergheaud
Michael Ellerman wrote: On Mon, 2016-23-05 at 12:49:01 UTC, Philippe Bergheaud wrote: This adds an afu_driver_ops structure with deliver_event() and event_delivered() callbacks. An AFU driver such as cxlflash can fill this out and associate it with a context to enable passing custom AFU specifi

Re: [PATCH] powerpc/align: Use #ifdef __BIG_ENDIAN__ #else for REG_BYTE

2016-06-16 Thread Arnd Bergmann
On Thursday, June 16, 2016 10:33:41 PM CEST Michael Ellerman wrote: > From: Daniel Axtens > > Sparse complains that it doesn't know what REG_BYTE is: > > arch/powerpc/kernel/align.c:313:29: error: undefined identifier 'REG_BYTE' > > REG_BYTE is defined differently based on whether we're compi

[v6, 1/2] cxl: Add mechanism for delivering AFU driver specific events

2016-06-16 Thread Philippe Bergheaud
This adds an afu_driver_ops structure with fetch_event() and event_delivered() callbacks. An AFU driver such as cxlflash can fill this out and associate it with a context to enable passing custom AFU specific events to userspace. This also adds a new kernel API function cxl_context_pending_events(

[v6,2/2] cxl: Add set and get private data to context struct

2016-06-16 Thread Philippe Bergheaud
From: Michael Neuling This provides AFU drivers a means to associate private data with a cxl context. This is particularly intended for make the new callbacks for driver specific events easier for AFU drivers to use, as they can easily get back to any private data structures they may use. Signed

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > "Aneesh Kumar K.V" writes: > >> "Aneesh Kumar K.V" writes: >> >>> "Darrick J. Wong" writes: >>> On Thu, Jun 16, 2016 at 03:23:47PM +1000, Michael Ellerman wrote: > On Wed, 2016-06-15 at 21:33 -0700, Darrick J. Wong wrote: > > > Hi Aneesh, > >

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > > <1466054627.5400.5.ca...@ellerman.id.au> > > > <20160616055746.gc22...@birch.djwong.org> > > > <8737oda1lt@skywalker.in.ibm.com> > ><87ziql8l93@skywalker.in.ibm.com> ><87wplp8kxh@skywalker.

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Darrick J. Wong
On Thu, Jun 16, 2016 at 04:16:00PM +0530, Aneesh Kumar K.V wrote: > "Aneesh Kumar K.V" writes: > > > "Darrick J. Wong" writes: > > > >> On Thu, Jun 16, 2016 at 03:23:47PM +1000, Michael Ellerman wrote: > >>> On Wed, 2016-06-15 at 21:33 -0700, Darrick J. Wong wrote: > >>> > >>> > Hi Aneesh, > >>

Re: [PATCH v2] of: fix memory leak related to safe_name()

2016-06-16 Thread Frank Rowand
On 06/16/16 00:51, Mathieu Malaterre wrote: > Sorry, symptoms not solved. According to kmemleak, I have now: > > [ 661.323100] kmemleak: 100 new suspected memory leaks (see > /sys/kernel/debug/kmemleak) > [ 1260.226120] kmemleak: 1 new suspected memory leaks (see > /sys/kernel/debug/kmemleak) >

[PATCH v3] of: fix memory leak related to safe_name()

2016-06-16 Thread Frank Rowand
From: Frank Rowand Fix a memory leak resulting from memory allocation in safe_name(). This patch fixes all call sites of safe_name(). Mathieu Malaterre reported the memory leak on boot: On my PowerMac device-tree would generate a duplicate name: [0.023043] device-tree: Duplicate name in Po

Re: [PATCH 1/2] workqueue: Move wq_update_unbound_numa() to the beginning of CPU_ONLINE

2016-06-16 Thread Tejun Heo
Hello, So, the issue of the initial worker not having its affinity set correctly wasn't caused by the order of the operations. Reordering just made set_cpus_allowed tried one more time late enough so that it hides the race condition most of the time. The problem is that CPU_ONLINE callbacks are

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Tejun Heo
On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > Subject: workqueue: Fix setting affinity of unbound worker threads > From: Peter Zijlstra > Date: Thu Jun 16 14:38:42 CEST 2016 > > With commit e9d867a67fd03ccc ("sched: Allow per-cpu kernel threads to > run on online && !active"),

Re: unrecoverable exception on G5 with CONFIG_PPC_EARLY_DEBUG enabled

2016-06-16 Thread Denis Kirjanov
>> Ok, the issue was introduced by the commit >> caca285e5ab4a7a19fede51688106ceed6fc45dd (powerpc/mm/radix: Use >> STD_MMU_64 to properly isolate hash related code) and 970mp dies on >> the following condition: > >> +BEGIN_MMU_FTR_SECTION >> bl slb_allocate_realmode >> - >> +END_MMU_F

Re: [PATCH v2 0/9] kexec_file_load implementation for PowerPC

2016-06-16 Thread Thiago Jung Bauermann
Am Donnerstag, 16 Juni 2016, 15:48:30 schrieb Michael Ellerman: > On Tue, 2016-06-14 at 11:59 -0300, Thiago Jung Bauermann wrote: > > Hello, > > > > This patch series implements the kexec_file_load system call on PowerPC. > > Can you tell me what this syscall does and why I would want it? Sorry,

Re: [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-16 Thread Thiago Jung Bauermann
Am Donnerstag, 16 Juni 2016, 09:58:53 schrieb Dave Young: > On 06/15/16 at 01:21pm, Thiago Jung Bauermann wrote: > > +/** > > + * arch_kexec_walk_mem - call func(data) on free memory regions > > + * @image_type:kimage.type > > + * @top_down: Start from the highest address? > > + * @data:

Re: possible bug in powerpc LE compat syscalls with 64-bit args

2016-06-16 Thread Adhemerval Zanella
On 16/06/2016 12:36, Chris Metcalf wrote: > Adhemerval Zanella is cleaning up the preadv/pwritev implementation in glibc > and came across an issue with the tilepro/tilegx32 implementation of argument > passing for 64-bit arguments in split register pairs. > > The glibc code base uses __LONG_LON

possible bug in powerpc LE compat syscalls with 64-bit args

2016-06-16 Thread Chris Metcalf
Adhemerval Zanella is cleaning up the preadv/pwritev implementation in glibc and came across an issue with the tilepro/tilegx32 implementation of argument passing for 64-bit arguments in split register pairs. The glibc code base uses __LONG_LONG_PAIR to split 64-bit arguments, passing "hi, lo" fo

Re: possible bug in powerpc LE compat syscalls with 64-bit args

2016-06-16 Thread Andreas Schwab
Chris Metcalf writes: > Reviewing what other platforms do, it seems like powerpc compat mode may > have the opposite problem in little-endian mode, since arguments are passed > in "hi, lo" order unconditionally in arch/powerpc/kernel/sys_ppc32.c. PPC32 is always big-endian. Andreas. -- Andrea

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Benjamin Herrenschmidt
On Thu, 2016-06-16 at 20:01 +0530, Aneesh Kumar K.V wrote: > The pHyp part of the comment was added by you in  > 3c726f8dee6f55e96475574e9f645327e461884c ([PATCH] ppc64: support 64k > page) really an old commit. I also remember we having the discussion and > concluding that it should be safe to ass

Re: unrecoverable exception on G5 with CONFIG_PPC_EARLY_DEBUG enabled

2016-06-16 Thread Benjamin Herrenschmidt
On Thu, 2016-06-16 at 22:49 +0300, Denis Kirjanov wrote: > - > +BEGIN_MMU_FTR_SECTION > +   b   2f > +END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX) >     andi.   r10,r12,MSR_RI  /* check for unrecoverable exception > */ >     beq-    2f Are we taking an SLB miss before we do the fixup m

[PATCH v2 2/5] firmware: annotate thou shalt not request fw on init or probe

2016-06-16 Thread Luis R. Rodriguez
Thou shalt not make firmware calls early on init or probe. systemd already ripped support out for the usermode helper a while ago, there are still users that require the usermode helper, however systemd's use of the usermode helper exacerbated a long lasting issue of the fact that we have many dri

[Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-16 Thread Chris Smart
Calling ISA 3.0 instructions copy, copy_first, paste and paste_last generates an alignment fault when copying or pasting unaligned data (128 byte). We catch this and send SIGBUS to the userspace process that caused it. We do not emulate these because paste may contain additional metadata when pas

[Patch v2 2/2] selftests/powerpc: Test unaligned copy and paste

2016-06-16 Thread Chris Smart
Test that an ISA 3.0 compliant machine performing an unaligned copy, copy_first, paste or paste_last is sent a SIGBUS. Signed-off-by: Chris Smart --- Changes since v1: - check that the instruction we trapped on was the one we want - split out tests into common code tools/testing/selftests/powe

Re: unrecoverable exception on G5 with CONFIG_PPC_EARLY_DEBUG enabled

2016-06-16 Thread Michael Ellerman
On Fri, 2016-06-17 at 08:33 +1000, Benjamin Herrenschmidt wrote: > On Thu, 2016-06-16 at 22:49 +0300, Denis Kirjanov wrote: > > - > > +BEGIN_MMU_FTR_SECTION > > + b 2f > > +END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX) > > andi. r10,r12,MSR_RI /* check for unrecoverable exception

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Michael Ellerman
On Thu, 2016-06-16 at 15:39 -0400, Tejun Heo wrote: > On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > > Subject: workqueue: Fix setting affinity of unbound worker threads > > From: Peter Zijlstra > > Date: Thu Jun 16 14:38:42 CEST 2016 > > > > With commit e9d867a67fd03ccc ("sche

Re: kernel bug in "Drop WIMG in favour of new constants"?

2016-06-16 Thread Darrick J. Wong
On Thu, Jun 16, 2016 at 08:01:55PM +0530, Aneesh Kumar K.V wrote: > "Aneesh Kumar K.V" writes: > > > "Aneesh Kumar K.V" writes: > > > >> "Aneesh Kumar K.V" writes: > >> > >>> "Darrick J. Wong" writes: > >>> > On Thu, Jun 16, 2016 at 03:23:47PM +1000, Michael Ellerman wrote: > > On Wed

Re: possible bug in powerpc LE compat syscalls with 64-bit args

2016-06-16 Thread Michael Ellerman
On Thu, 2016-06-16 at 11:36 -0400, Chris Metcalf wrote: > Adhemerval Zanella is cleaning up the preadv/pwritev implementation in glibc > and came across an issue with the tilepro/tilegx32 implementation of argument > passing for 64-bit arguments in split register pairs. > > The glibc code base us

Re: [PATCH v2 1/2] tools include: Adopt byte ordering macros from byteorder/generic.h

2016-06-16 Thread Hekuang
在 2016/6/16 19:36, Jiri Olsa 写道: On Thu, Jun 16, 2016 at 10:41:31AM +, He Kuang wrote: From: Wang Nan This patch adopts the macros for byte order conversion from "include/linux/byteorder/generic.h" to "tools/include/linux/byteorder/generic.h" tools/perf/MANIFEST is also updated for 'mak

Re: [PATCH v12.update2 02/15] PCI: Let pci_mmap_page_range() take resource address

2016-06-16 Thread Bjorn Helgaas
On Thu, Jun 09, 2016 at 03:25:52PM -0700, Yinghai Lu wrote: > In 8c05cd08a7 ("PCI: fix offset check for sysfs mmapped files"), try > to check exposed value with resource start/end in proc mmap path. > > |start = vma->vm_pgoff; > |size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_

Re: [PATCH 2/3] cxlflash: Add device dependent flags

2016-06-16 Thread Manoj Kumar
On 6/15/2016 6:49 PM, Uma Krishnan wrote: Device dependent flags are needed to support functions that are specific to a particular device. Acked-by: Manoj N. Kumar ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.o

[PATCH] powerpc/eeh: Fix invalid cached PE primary bus

2016-06-16 Thread Gavin Shan
The PE primary bus cannot be got from its child devices when having full hotplug in error recovery. The PE primary bus is cached, which is done in commit <05ba75f84864> ("powerpc/eeh: Fix stale cached primary bus"). In eeh_reset_device(), the flag (EEH_PE_PRI_BUS) is cleared before the PCI hot remo

Re: [PATCH] powerpc/align: Use #ifdef __BIG_ENDIAN__ #else for REG_BYTE

2016-06-16 Thread Daniel Axtens
> It would be better to fix the sparse compilation so the same endianess > is set that you get when calling gcc. I will definitely work on a patch to sparse! I'd still like this or something like it to go in though, so we can keep working on reducing the sparse warning count while the sparse patch

Re: [PATCH] cxl: Make vPHB device node match adapter's

2016-06-16 Thread Michael Neuling
On Thu, 2016-06-16 at 07:53 +1000, Ian Munsie wrote: > This could probably use a description in the commit message, perhaps > including output showing the before/after difference this makes to > lsvpd, but otherwise it looks fine to me. > > @Mikey - this look OK to you? Yeah I think this is a goo

Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-16 Thread Segher Boessenkool
On Fri, Jun 17, 2016 at 09:33:45AM +1000, Chris Smart wrote: > +#define PPC_INST_COPY0x7c00060c > +#define PPC_INST_COPY_FIRST 0x7c20060c > +#define PPC_INST_PASTE 0x7c00070c > +#define PPC_INST_PASTE_LAST 0x7c20070d That's not quite

[PATCH v2 1/2] selftests/powerpc: exec() with suspended transaction

2016-06-16 Thread Cyril Bur
Perform an exec() class syscall with a suspended transaction. Signed-off-by: Cyril Bur --- V2: No change tools/testing/selftests/powerpc/tm/Makefile | 3 +- tools/testing/selftests/powerpc/tm/tm-exec.c| 55 + tools/testing/selftests/powerpc/tm/tm-execed.c | 47

[PATCH v2 2/2] powerpc: tm: Always reclaim in start_thread() for exec() class syscalls

2016-06-16 Thread Cyril Bur
Userspace can quite legitimately perform an exec() syscall with a suspended transaction. exec() does not return to the old process, rather it load a new one and starts that, the expectation therefore is that the new process starts not in a transaction. Currently exec() is not treated any differentl

[PATCH] tools/perf: Fix the mask in regs_dump__printf

2016-06-16 Thread Madhavan Srinivasan
When decoding the perf_regs mask in regs_dump__printf(), we loop through the mask using find_first_bit and find_next_bit functions. And mask is of type "u64". But "u64" is send as a "unsigned long *" to lib functions along with sizeof(). While the exisitng code works fine in most of the case, when

[PATCH] powerpc/pci: Fix SRIOV not building without EEH enabled

2016-06-16 Thread Russell Currey
On Book3E CPUs (and possibly other configs), it is possible to have SRIOV (CONFIG_PCI_IOV) set without CONFIG_EEH. The SRIOV code does not check for this, and if EEH is disabled, pci_dn.c fails to build. Fix this by gating the EEH-specific code in the SRIOV implementation behind CONFIG_EEH. Fixe

Re: [PATCH] powerpc/align: Use #ifdef __BIG_ENDIAN__ #else for REG_BYTE

2016-06-16 Thread Michael Ellerman
On Thu, 2016-06-16 at 15:05 +0200, Arnd Bergmann wrote: > On Thursday, June 16, 2016 10:33:41 PM CEST Michael Ellerman wrote: > > From: Daniel Axtens > > > > Sparse complains that it doesn't know what REG_BYTE is: > > > > arch/powerpc/kernel/align.c:313:29: error: undefined identifier 'REG_BYT

[PATCH] powerpc/mm/hash: Don't add memory coherence if cache inhibited is set

2016-06-16 Thread Aneesh Kumar K.V
H_ENTER hcall handling in qemu had assumptions that a cache inhibited hpte entry won't have memory conference set. Also older kernel mentioned that some version of pHyp required this (the code removed by the below commit says: /* Make pHyp happy */ if ((rflags & _PAGE_NO_CACHE) && !(rflags

[PATCH V2] powerpc/mm/radix: Update Radix tree size as per ISA 3.0

2016-06-16 Thread Aneesh Kumar K.V
ISA 3.0 updated it to be encoded as Radix tree size = 2^(RTS + 31). We have it encoded as 2^(RTS + 28). Add a helper with the correct encoding and use it instead of opencoding. Fixes commit 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routine ") Reviewed-by: Balbir Singh S

Re: [PATCH] tools/perf: Fix the mask in regs_dump__printf

2016-06-16 Thread Jiri Olsa
On Fri, Jun 17, 2016 at 10:52:38AM +0530, Madhavan Srinivasan wrote: > When decoding the perf_regs mask in regs_dump__printf(), > we loop through the mask using find_first_bit and find_next_bit functions. > And mask is of type "u64". But "u64" is send as a "unsigned long *" to > lib functions along