Re: [PATCH] selftests/powerpc: Fix TM resched DSCR test with some compilers

2017-05-18 Thread Michael Neuling
On Fri, 2017-05-19 at 11:37 +1000, Michael Ellerman wrote: > The tm-resched-dscr test has started failing sometimes, depending on > what compiler it's built with, eg: > >   test: tm_resched_dscr >   Check DSCR TM context switch: tm-resched-dscr: tm-resched-dscr.c:76: > test_body: Assertion `rv' fa

Re: [PATCH] powerpc/sequoia: fix NAND partitions not to overlap

2017-05-18 Thread Michael Ellerman
Pavel Machek writes: > On Wed 2017-05-17 14:37:17, Andrew Morton wrote: >> On Wed, 17 May 2017 14:06:13 +0200 Pavel Machek wrote: >> >> > On Sun 2017-04-02 12:05:36, Pavel Machek wrote: >> > > Fix overlapping NAND partitions. >> > > >> > > Signed-off-by: Pavel Machek >> > >> > Ping? Two part

[PATCH] powerpc: Add HAVE_IRQ_TIME_ACCOUNTING

2017-05-18 Thread Anton Blanchard
From: Anton Blanchard Allow us to enable IRQ_TIME_ACCOUNTING. Even though we currently use VIRT_CPU_ACCOUNTING_NATIVE, that option is quite heavy weight and IRQ_TIME_ACCOUNTING might be better in some cases. Signed-off-by: Anton Blanchard --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 inser

[PATCH] selftests/powerpc: Fix TM resched DSCR test with some compilers

2017-05-18 Thread Michael Ellerman
The tm-resched-dscr test has started failing sometimes, depending on what compiler it's built with, eg: test: tm_resched_dscr Check DSCR TM context switch: tm-resched-dscr: tm-resched-dscr.c:76: test_body: Assertion `rv' failed. !! child died by signal 6 When it fails we see that the compi

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-18 Thread Nicholas Piggin
On Thu, 18 May 2017 12:30:28 -0400 Don Zickus wrote: > (adding Uli) > > On Fri, May 19, 2017 at 01:50:26AM +1000, Nicholas Piggin wrote: > > I'd like to make it easier for architectures that have their own NMI / > > hard lockup detector to reuse various configuration interfaces that are > > prov

Re: [PATCH net-next] ibmvnic: fix missing unlock on error in __ibmvnic_reset()

2017-05-18 Thread David Miller
From: Wei Yongjun Date: Thu, 18 May 2017 15:24:52 + > From: Wei Yongjun > > Add the missing unlock before return from function __ibmvnic_reset() > in the error handling case. > > Fixes: ed651a10875f ("ibmvnic: Updated reset handling") > Signed-off-by: Wei Yongjun Applied.

Re: [PATCH] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-18 Thread Breno Leitao
On Thu, May 18, 2017 at 08:37:31PM +1000, Michael Ellerman wrote: > virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on > an address. What this means in practice is that it should only return true for > addresses in the linear mapping which are backed by a valid PFN. > >

Re: [PATCH] perf: libdw support for powerpc

2017-05-18 Thread Paolo Bonzini
On 18/05/2017 20:19, Naveen N. Rao wrote: > Paolo Bonzini wrote: >> The ARM and x86 architectures already use libdw, and it is useful to >> have as much common code for the unwinder as possible. Porting PPC >> to libdw only needs an architecture-specific hook to move the register >> state from p

Re: [PATCH] perf: libdw support for powerpc

2017-05-18 Thread Naveen N. Rao
Paolo Bonzini wrote: The ARM and x86 architectures already use libdw, and it is useful to have as much common code for the unwinder as possible. Porting PPC to libdw only needs an architecture-specific hook to move the register state from perf to libdw. Thanks. Ravi has had a similar patch loc

Re: [PATCH] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-18 Thread Balbir Singh
On Thu, May 18, 2017 at 8:37 PM, Michael Ellerman wrote: > virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on > an address. What this means in practice is that it should only return true for > addresses in the linear mapping which are backed by a valid PFN. > > We are f

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-18 Thread Will Deacon
On Wed, May 17, 2017 at 10:01:29AM +0200, Jiri Slaby wrote: > On 05/15/2017, 03:16 PM, Will Deacon wrote: > > Whilst I think this is a good idea, the code in question actually results > > in undefined behaviour per the C spec and is reported by UBSAN. > > Hi, yes, I know -- this patch was the 1st

Re: [PATCH net-next] ibmvnic: fix missing unlock on error in __ibmvnic_reset()

2017-05-18 Thread Nathan Fontenot
On 05/18/2017 10:24 AM, Wei Yongjun wrote: > From: Wei Yongjun > > Add the missing unlock before return from function __ibmvnic_reset() > in the error handling case. > > Fixes: ed651a10875f ("ibmvnic: Updated reset handling") > Signed-off-by: Wei Yongjun Reviewed-by: Nathan Fontenot > --- >

Re: [PATCH] powerpc: Tweak copy selection parameter in __copy_tofrom_user_power7()

2017-05-18 Thread Anton Blanchard
Hi Andrew, > Experiments with the netperf benchmark indicated that the size > selecting VMX-based copies in __copy_tofrom_user_power7() was > suboptimal on POWER8. Measurements showed that parity was in the > neighbourhood of 3328 bytes, rather than greater than 4096. The > change gives a 1.5-2.0%

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-18 Thread Don Zickus
(adding Uli) On Fri, May 19, 2017 at 01:50:26AM +1000, Nicholas Piggin wrote: > I'd like to make it easier for architectures that have their own NMI / > hard lockup detector to reuse various configuration interfaces that are > provided by generic detectors (cmdline, sysctl, suspend/resume calls).

[RFC] arch hardlockup detector interfaces improvement

2017-05-18 Thread Nicholas Piggin
I'd like to make it easier for architectures that have their own NMI / hard lockup detector to reuse various configuration interfaces that are provided by generic detectors (cmdline, sysctl, suspend/resume calls). I'd also like to remove the dependency of arch hard lockup detectors on the softlock

[PATCH net-next] ibmvnic: fix missing unlock on error in __ibmvnic_reset()

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun Add the missing unlock before return from function __ibmvnic_reset() in the error handling case. Fixes: ed651a10875f ("ibmvnic: Updated reset handling") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drive

Re: [PATCH] powerpc/mm/hugetlb: Add support for reserving gigantic huge pages via kernel command line

2017-05-18 Thread Anshuman Khandual
On 05/17/2017 12:29 PM, Aneesh Kumar K.V wrote: > > > On Wednesday 17 May 2017 10:31 AM, Anshuman Khandual wrote: >> On 05/16/2017 02:54 PM, Aneesh Kumar K.V wrote: >>> +void __init reserve_hugetlb_gpages(void) >>> +{ >>> +char buf[10]; >>> +phys_addr_t base; >>> +unsigned long gpage_

Re: [PATCH] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-18 Thread Paul Mackerras
On Thu, May 18, 2017 at 08:37:31PM +1000, Michael Ellerman wrote: > virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on > an address. What this means in practice is that it should only return true for > addresses in the linear mapping which are backed by a valid PFN. > >

Re: [PATCH 3/3] EDAC: mv64x60: replace in_le32/out_le32 with ioread32/iowrite32

2017-05-18 Thread Arnd Bergmann
On Thu, May 18, 2017 at 7:36 AM, Michael Ellerman wrote: > Borislav Petkov writes: > >> Top-posting so that the PPC list can see the whole patch below. >> >> Since I don't know PPC, let me add PPC ML to CC for a confirmation this >> change is correct. >> >> Which brings me to the tangential: this

Re: kernel BUG at mm/usercopy.c:72!

2017-05-18 Thread Balbir Singh
On Thu, May 18, 2017 at 8:16 PM, Michael Ellerman wrote: > Kees Cook writes: >> On Tue, May 16, 2017 at 4:09 AM, Michael Ellerman >> wrote: >>> Yeah it looks like powerpc also suffers from the same bug that arm64 >>> used to, ie. virt_addr_valid() will return true for some vmalloc >>> addresses

[PATCH] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-18 Thread Michael Ellerman
virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on an address. What this means in practice is that it should only return true for addresses in the linear mapping which are backed by a valid PFN. We are failing to properly check that the address is in the linear mapping,

Re: kernel BUG at mm/usercopy.c:72!

2017-05-18 Thread Michael Ellerman
Breno Leitao writes: > Hello, > > Kernel 4.12-rc1 is showing a bug when I try it on a POWER8 virtual > machine. Justing SSHing into the machine causes this issue. Can you try this? cheers diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index 2a32483c7b6c..8da5d4c

Re: kernel BUG at mm/usercopy.c:72!

2017-05-18 Thread Michael Ellerman
Kees Cook writes: > On Tue, May 16, 2017 at 4:09 AM, Michael Ellerman wrote: >> Yeah it looks like powerpc also suffers from the same bug that arm64 >> used to, ie. virt_addr_valid() will return true for some vmalloc >> addresses. >> >> virt_addr_valid() is used pretty widely, I'm not sure if we

Re: [PATCH] powerpc/sequoia: fix NAND partitions not to overlap

2017-05-18 Thread Pavel Machek
On Wed 2017-05-17 14:37:17, Andrew Morton wrote: > On Wed, 17 May 2017 14:06:13 +0200 Pavel Machek wrote: > > > On Sun 2017-04-02 12:05:36, Pavel Machek wrote: > > > Fix overlapping NAND partitions. > > > > > > Signed-off-by: Pavel Machek > > > > Ping? Two partitions at same place are bad news

Re: Mainline build brakes on powerpc with error : fs/xfs/xfs_iomap.c:1152: undefined reference to `.put_dax

2017-05-18 Thread Abdul Haleem
On Tue, 2017-05-16 at 13:17 +0200, Arnd Bergmann wrote: > On Tue, May 16, 2017 at 1:02 PM, Abdul Haleem > wrote: > > Hi, > > > > Today's mainline 4.12-rc1 fails to build for the attached configuration > > file on Power7 box with below errors. > > > > $ make > > fs/built-in.o: In function `xfs_file

Re: [PATCH 2/9] timers: provide a "modern" variant of timers

2017-05-18 Thread Arnd Bergmann
On Thu, May 18, 2017 at 10:41 AM, Christoph Hellwig wrote: > On Thu, May 18, 2017 at 10:24:48AM +0200, Christoph Hellwig wrote: >> > b) give the union a name (breaks any reference to timer_list->func in C >> > code): >> > >> > + union { >> > + void(*func)(struct

Re: [PATCH v3 2/2] powerpc/mm/hugetlb: Add support for 1G huge pages

2017-05-18 Thread Aneesh Kumar K.V
On Thursday 18 May 2017 02:17 PM, Michael Ellerman wrote: "Aneesh Kumar K.V" writes: On Thursday 18 May 2017 10:51 AM, Michael Ellerman wrote: "Aneesh Kumar K.V" writes: POWER9 supports hugepages of size 2M and 1G in radix MMU mode. This patch enables the usage of 1G page size for hugetl

Re: [PATCH v3 2/2] powerpc/mm/hugetlb: Add support for 1G huge pages

2017-05-18 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > On Thursday 18 May 2017 10:51 AM, Michael Ellerman wrote: >> "Aneesh Kumar K.V" writes: >> >>> POWER9 supports hugepages of size 2M and 1G in radix MMU mode. This patch >>> enables the usage of 1G page size for hugetlbfs. This also update the helper >>> such we can

Re: [PATCH 2/9] timers: provide a "modern" variant of timers

2017-05-18 Thread Christoph Hellwig
On Thu, May 18, 2017 at 10:24:48AM +0200, Christoph Hellwig wrote: > > b) give the union a name (breaks any reference to timer_list->func in C > > code): > > > > + union { > > + void(*func)(struct timer_list *timer); > > + void(*functio

[PATCH v2 3/3] EDAC: mv64x60: replace in_le32/out_le32 with readl/writel

2017-05-18 Thread Chris Packham
To allow this driver to be used on non-powerpc platforms it needs to use io accessors suitable for all platforms. Signed-off-by: Chris Packham --- Notes: Changes in v2: - use readl/writel as suggested. drivers/edac/mv64x60_edac.c | 84 ++--- 1 fi

[PATCH v2 0/3] EDAC: mv64x60: updates

2017-05-18 Thread Chris Packham
I'm looking at making use of the mv64x60_edac driver for the armada processors. It appears that at least the DRAM ECC error reporting is the same block from the old Marvell Discovery class of processors. On the ARM side I need to get the error interrupts exposed first before I can send my second se

[PATCH v2 1/3] EDAC: mv64x60: remove unused variable

2017-05-18 Thread Chris Packham
Signed-off-by: Chris Packham --- drivers/edac/mv64x60_edac.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c index 14b7e7b71eaa..454e1e26ee7c 100644 --- a/drivers/edac/mv64x60_edac.c +++ b/drivers/edac/mv64x60_edac.c @@ -853,8 +853,6

[PATCH v2 2/3] EDAC: mv64x60: Fix pdata->name

2017-05-18 Thread Chris Packham
Change this from mpc85xx_pci_err to mv64x60_pci_err. The former is likely a hangover from when this driver was created. Signed-off-by: Chris Packham --- drivers/edac/mv64x60_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv6

Re: RFC: better timer interface

2017-05-18 Thread Christoph Hellwig
On Tue, May 16, 2017 at 10:26:39PM +0200, Arnd Bergmann wrote: > If we keep the unusual *_timer() naming (rather than timer_*() as hrtimer > has), we could use one of > > a) start_timer(struct timer_list *timer, unsigned long ms); > b) restart_timer(struct timer_list *timer, unsigned long ms); > c

Re: [PATCH 9/9] timers: remove old timer initialization macros

2017-05-18 Thread Christoph Hellwig
On Tue, May 16, 2017 at 09:43:34PM +0200, Arnd Bergmann wrote: > > - * Don't use the macros below, use DECLARE_TIMER and INIT_TIMER with their > > + * Don't use the macro below, use DECLARE_TIMER and INIT_TIMER with their > > * improved callback signature above. > > */ > > -#define __TIMER_INIT

Re: [PATCH 2/9] timers: provide a "modern" variant of timers

2017-05-18 Thread Christoph Hellwig
> b) give the union a name (breaks any reference to timer_list->func in C code): > > + union { > + void(*func)(struct timer_list *timer); > + void(*function)(unsigned long); > + } u; I'll look into that, as it seems a lot safer,

Re: [PATCH 3/9] kthread: remove unused macros

2017-05-18 Thread Christoph Hellwig
On Wed, May 17, 2017 at 02:09:52PM +0200, Petr Mladek wrote: > On Tue 2017-05-16 13:48:06, Christoph Hellwig wrote: > > KTHREAD_DELAYED_WORK_INIT and DEFINE_KTHREAD_DELAYED_WORK are unused > > and are using a timer helper that's about to go away. > > A patch using this API is flying around, see >

Re: [PATCH 3/3] EDAC: mv64x60: replace in_le32/out_le32 with ioread32/iowrite32

2017-05-18 Thread Borislav Petkov
On Wed, May 17, 2017 at 09:16:47PM +, Chris Packham wrote: > MV64x60 is pretty old. I considered gutting mv64x60_edac.c to make a > separate driver but that would just be more code to maintain. Well, one thing we did with layerscape and mpc85xx EDAC modules is share the FSL memory controller