LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Disable kcov for slb routines.
From: Satheesh Rajendran @ 2019-03-07  4:37 UTC (permalink / raw)
  To: Mahesh J Salgaonkar
  Cc: linuxppc-dev, syzkaller, Paul Mackerras, Nicholas Piggin,
	Andrew Donnellan
In-Reply-To: <155168793242.4372.10864050702181452671.stgit@jupiter.in.ibm.com>

On Mon, Mar 04, 2019 at 01:55:51PM +0530, Mahesh J Salgaonkar wrote:
> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> 
> The kcov instrumentation inside SLB routines causes duplicate SLB entries
> to be added resulting into SLB multihit machine checks.
> Disable kcov instrumentation on slb.o
> 
> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> ---
>  arch/powerpc/mm/Makefile |    1 +
>  1 file changed, 1 insertion(+)

Fixes: https://github.com/linuxppc/issues/issues/230

Tested-by: Satheesh Rajendran <sathnaga@linux.vent.ibm.com>

> 
> diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
> index d4d32e229ace..f9cb40684746 100644
> --- a/arch/powerpc/mm/Makefile
> +++ b/arch/powerpc/mm/Makefile
> @@ -60,3 +60,4 @@ obj-$(CONFIG_PPC_MEM_KEYS)	+= pkeys.o
>  # This is necessary for booting with kcov enabled on book3e machines
>  KCOV_INSTRUMENT_tlb_nohash.o := n
>  KCOV_INSTRUMENT_fsl_booke_mmu.o := n
> +KCOV_INSTRUMENT_slb.o := n
> 


^ permalink raw reply

* Re: [PATCH v9 02/11] powerpc: prepare string/mem functions for KASAN
From: Christophe Leroy @ 2019-03-07  6:19 UTC (permalink / raw)
  To: Daniel Axtens, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Nicholas Piggin, Aneesh Kumar K.V,
	Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov
  Cc: linux-mm, linuxppc-dev, linux-kernel, kasan-dev
In-Reply-To: <87sgw31a85.fsf@dja-thinkpad.axtens.net>

Hi Daniel,

On 03/04/2019 05:26 AM, Daniel Axtens wrote:
> Hi Christophe,
>> diff --git a/arch/powerpc/include/asm/kasan.h b/arch/powerpc/include/asm/kasan.h
>> new file mode 100644
>> index 000000000000..c3161b8fc017
>> --- /dev/null
>> +++ b/arch/powerpc/include/asm/kasan.h
>> @@ -0,0 +1,15 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#ifndef __ASM_KASAN_H
>> +#define __ASM_KASAN_H
>> +
>> +#ifdef CONFIG_KASAN
>> +#define _GLOBAL_KASAN(fn)	.weak fn ; _GLOBAL(__##fn) ; _GLOBAL(fn)
>> +#define _GLOBAL_TOC_KASAN(fn)	.weak fn ; _GLOBAL_TOC(__##fn) ; _GLOBAL_TOC(fn)
>> +#define EXPORT_SYMBOL_KASAN(fn)	EXPORT_SYMBOL(__##fn) ; EXPORT_SYMBOL(fn)
> 
> I'm having some trouble with this. I get warnings like this:
> 
> WARNING: EXPORT symbol "__memcpy" [vmlinux] version generation failed, symbol will not be versioned.

I don't have this problem, neither with my PPC32 defconfigs nor with 
ppc64e_defconfig - SPARSEMEM_VMEMMAP + KASAN
Using GCC 8.1

I've been looking into it in more details and can't understand the need 
for a weak symbol. A weak symbol is to allow it's optional replacement 
by other code. But here KASAN replaces it inconditionally, so I see no 
point for a weak symbol here.

Regarding the export of the functions, I believe that when the functions 
are defined in KASAN, they should be exported by KASAN and not by the 
arch. But such a change is out of scope for now. So lets have a double 
export for now, one day we will drop it.

Regarding export of __memcpy() etc..., there is at least the LKDTM 
module which inhibits KASAN, so it really needs to be exported.

What about the patch below ?

Christophe

diff --git a/arch/powerpc/include/asm/kasan.h 
b/arch/powerpc/include/asm/kasan.h
new file mode 100644
index 000000000000..2c179a39d4ba
--- /dev/null
+++ b/arch/powerpc/include/asm/kasan.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_KASAN_H
+#define __ASM_KASAN_H
+
+#ifdef CONFIG_KASAN
+#define _GLOBAL_KASAN(fn)	_GLOBAL(__##fn)
+#define _GLOBAL_TOC_KASAN(fn)	_GLOBAL_TOC(__##fn)
+#define EXPORT_SYMBOL_KASAN(fn)	EXPORT_SYMBOL(__##fn)
+#else
+#define _GLOBAL_KASAN(fn)	_GLOBAL(fn)
+#define _GLOBAL_TOC_KASAN(fn)	_GLOBAL_TOC(fn)
+#define EXPORT_SYMBOL_KASAN(fn)
+#endif
+
+#endif
diff --git a/arch/powerpc/include/asm/string.h 
b/arch/powerpc/include/asm/string.h
index 1647de15a31e..9bf6dffb4090 100644
--- a/arch/powerpc/include/asm/string.h
+++ b/arch/powerpc/include/asm/string.h
@@ -4,14 +4,17 @@

  #ifdef __KERNEL__

+#ifndef CONFIG_KASAN
  #define __HAVE_ARCH_STRNCPY
  #define __HAVE_ARCH_STRNCMP
+#define __HAVE_ARCH_MEMCHR
+#define __HAVE_ARCH_MEMCMP
+#define __HAVE_ARCH_MEMSET16
+#endif
+
  #define __HAVE_ARCH_MEMSET
  #define __HAVE_ARCH_MEMCPY
  #define __HAVE_ARCH_MEMMOVE
-#define __HAVE_ARCH_MEMCMP
-#define __HAVE_ARCH_MEMCHR
-#define __HAVE_ARCH_MEMSET16
  #define __HAVE_ARCH_MEMCPY_FLUSHCACHE

  extern char * strcpy(char *,const char *);
@@ -27,7 +30,27 @@ extern int memcmp(const void *,const void 
*,__kernel_size_t);
  extern void * memchr(const void *,int,__kernel_size_t);
  extern void * memcpy_flushcache(void *,const void *,__kernel_size_t);

+void *__memset(void *s, int c, __kernel_size_t count);
+void *__memcpy(void *to, const void *from, __kernel_size_t n);
+void *__memmove(void *to, const void *from, __kernel_size_t n);
+
+#if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__)
+/*
+ * For files that are not instrumented (e.g. mm/slub.c) we
+ * should use not instrumented version of mem* functions.
+ */
+#define memcpy(dst, src, len) __memcpy(dst, src, len)
+#define memmove(dst, src, len) __memmove(dst, src, len)
+#define memset(s, c, n) __memset(s, c, n)
+
+#ifndef __NO_FORTIFY
+#define __NO_FORTIFY /* FORTIFY_SOURCE uses __builtin_memcpy, etc. */
+#endif
+
+#endif
+
  #ifdef CONFIG_PPC64
+#ifndef CONFIG_KASAN
  #define __HAVE_ARCH_MEMSET32
  #define __HAVE_ARCH_MEMSET64

@@ -49,8 +72,11 @@ static inline void *memset64(uint64_t *p, uint64_t v, 
__kernel_size_t n)
  {
  	return __memset64(p, v, n * 8);
  }
+#endif
  #else
+#ifndef CONFIG_KASAN
  #define __HAVE_ARCH_STRLEN
+#endif

  extern void *memset16(uint16_t *, uint16_t, __kernel_size_t);
  #endif
diff --git a/arch/powerpc/kernel/prom_init_check.sh 
b/arch/powerpc/kernel/prom_init_check.sh
index 667df97d2595..181fd10008ef 100644
--- a/arch/powerpc/kernel/prom_init_check.sh
+++ b/arch/powerpc/kernel/prom_init_check.sh
@@ -16,8 +16,16 @@
  # If you really need to reference something from prom_init.o add
  # it to the list below:

+grep "^CONFIG_KASAN=y$" .config >/dev/null
+if [ $? -eq 0 ]
+then
+	MEM_FUNCS="__memcpy __memset"
+else
+	MEM_FUNCS="memcpy memset"
+fi
+
  WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush
-_end enter_prom memcpy memset reloc_offset __secondary_hold
+_end enter_prom $MEM_FUNCS reloc_offset __secondary_hold
  __secondary_hold_acknowledge __secondary_hold_spinloop __start
  strcmp strcpy strlcpy strlen strncmp strstr kstrtobool logo_linux_clut224
  reloc_got2 kernstart_addr memstart_addr linux_banner _stext
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 79396e184bca..47a4de434c22 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -8,9 +8,14 @@ ccflags-$(CONFIG_PPC64)	:= $(NO_MINIMAL_TOC)
  CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE)
  CFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE)

-obj-y += string.o alloc.o code-patching.o feature-fixups.o
+obj-y += alloc.o code-patching.o feature-fixups.o

-obj-$(CONFIG_PPC32)	+= div64.o copy_32.o crtsavres.o strlen_32.o
+ifndef CONFIG_KASAN
+obj-y	+=	string.o memcmp_$(BITS).o
+obj-$(CONFIG_PPC32)	+= strlen_32.o
+endif
+
+obj-$(CONFIG_PPC32)	+= div64.o copy_32.o crtsavres.o

  obj-$(CONFIG_FUNCTION_ERROR_INJECTION)	+= error-inject.o

@@ -34,7 +39,7 @@ obj64-$(CONFIG_KPROBES_SANITY_TEST)	+= 
test_emulate_step.o \
  					   test_emulate_step_exec_instr.o

  obj-y			+= checksum_$(BITS).o checksum_wrappers.o \
-			   string_$(BITS).o memcmp_$(BITS).o
+			   string_$(BITS).o

  obj-y			+= sstep.o ldstfp.o quad.o
  obj64-y			+= quad.o
diff --git a/arch/powerpc/lib/copy_32.S b/arch/powerpc/lib/copy_32.S
index ba66846fe973..d5642481fb98 100644
--- a/arch/powerpc/lib/copy_32.S
+++ b/arch/powerpc/lib/copy_32.S
@@ -14,6 +14,7 @@
  #include <asm/ppc_asm.h>
  #include <asm/export.h>
  #include <asm/code-patching-asm.h>
+#include <asm/kasan.h>

  #define COPY_16_BYTES		\
  	lwz	r7,4(r4);	\
@@ -68,6 +69,7 @@ CACHELINE_BYTES = L1_CACHE_BYTES
  LG_CACHELINE_BYTES = L1_CACHE_SHIFT
  CACHELINE_MASK = (L1_CACHE_BYTES-1)

+#ifndef CONFIG_KASAN
  _GLOBAL(memset16)
  	rlwinm.	r0 ,r5, 31, 1, 31
  	addi	r6, r3, -4
@@ -81,6 +83,7 @@ _GLOBAL(memset16)
  	sth	r4, 4(r6)
  	blr
  EXPORT_SYMBOL(memset16)
+#endif

  /*
   * Use dcbz on the complete cache lines in the destination
@@ -91,7 +94,7 @@ EXPORT_SYMBOL(memset16)
   * We therefore skip the optimised bloc that uses dcbz. This jump is
   * replaced by a nop once cache is active. This is done in machine_init()
   */
-_GLOBAL(memset)
+_GLOBAL_KASAN(memset)
  	cmplwi	0,r5,4
  	blt	7f

@@ -151,6 +154,7 @@ _GLOBAL(memset)
  	bdnz	9b
  	blr
  EXPORT_SYMBOL(memset)
+EXPORT_SYMBOL_KASAN(memset)

  /*
   * This version uses dcbz on the complete cache lines in the
@@ -163,12 +167,12 @@ EXPORT_SYMBOL(memset)
   * We therefore jump to generic_memcpy which doesn't use dcbz. This 
jump is
   * replaced by a nop once cache is active. This is done in machine_init()
   */
-_GLOBAL(memmove)
+_GLOBAL_KASAN(memmove)
  	cmplw	0,r3,r4
  	bgt	backwards_memcpy
  	/* fall through */

-_GLOBAL(memcpy)
+_GLOBAL_KASAN(memcpy)
  1:	b	generic_memcpy
  	patch_site	1b, patch__memcpy_nocache

@@ -244,6 +248,8 @@ _GLOBAL(memcpy)
  65:	blr
  EXPORT_SYMBOL(memcpy)
  EXPORT_SYMBOL(memmove)
+EXPORT_SYMBOL_KASAN(memcpy)
+EXPORT_SYMBOL_KASAN(memmove)

  generic_memcpy:
  	srwi.	r7,r5,3
diff --git a/arch/powerpc/lib/mem_64.S b/arch/powerpc/lib/mem_64.S
index 3c3be02f33b7..7f6bd031c306 100644
--- a/arch/powerpc/lib/mem_64.S
+++ b/arch/powerpc/lib/mem_64.S
@@ -12,7 +12,9 @@
  #include <asm/errno.h>
  #include <asm/ppc_asm.h>
  #include <asm/export.h>
+#include <asm/kasan.h>

+#ifndef CONFIG_KASAN
  _GLOBAL(__memset16)
  	rlwimi	r4,r4,16,0,15
  	/* fall through */
@@ -29,8 +31,9 @@ _GLOBAL(__memset64)
  EXPORT_SYMBOL(__memset16)
  EXPORT_SYMBOL(__memset32)
  EXPORT_SYMBOL(__memset64)
+#endif

-_GLOBAL(memset)
+_GLOBAL_KASAN(memset)
  	neg	r0,r3
  	rlwimi	r4,r4,8,16,23
  	andi.	r0,r0,7			/* # bytes to be 8-byte aligned */
@@ -96,8 +99,9 @@ _GLOBAL(memset)
  	stb	r4,0(r6)
  	blr
  EXPORT_SYMBOL(memset)
+EXPORT_SYMBOL_KASAN(memset)

-_GLOBAL_TOC(memmove)
+_GLOBAL_TOC_KASAN(memmove)
  	cmplw	0,r3,r4
  	bgt	backwards_memcpy
  	b	memcpy
@@ -139,3 +143,4 @@ _GLOBAL(backwards_memcpy)
  	mtctr	r7
  	b	1b
  EXPORT_SYMBOL(memmove)
+EXPORT_SYMBOL_KASAN(memmove)
diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S
index 273ea67e60a1..25c3772c1dfb 100644
--- a/arch/powerpc/lib/memcpy_64.S
+++ b/arch/powerpc/lib/memcpy_64.S
@@ -11,6 +11,7 @@
  #include <asm/export.h>
  #include <asm/asm-compat.h>
  #include <asm/feature-fixups.h>
+#include <asm/kasan.h>

  #ifndef SELFTEST_CASE
  /* For big-endian, 0 == most CPUs, 1 == POWER6, 2 == Cell */
@@ -18,7 +19,7 @@
  #endif

  	.align	7
-_GLOBAL_TOC(memcpy)
+_GLOBAL_TOC_KASAN(memcpy)
  BEGIN_FTR_SECTION
  #ifdef __LITTLE_ENDIAN__
  	cmpdi	cr7,r5,0
@@ -230,3 +231,4 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
  	blr
  #endif
  EXPORT_SYMBOL(memcpy)
+EXPORT_SYMBOL_KASAN(memcpy)


> 
> It seems to be related to the export line, as if I swap the exports to
> do fn before __##fn I get:
> 
> WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned.
> 
> I have narrowed this down to combining 2 EXPORT_SYMBOL()s on one line.
> This works - no warning:
> 
> EXPORT_SYMBOL(memset)
> EXPORT_SYMBOL(__memset)
> 
> This throws a warning:
> 
> EXPORT_SYMBOL(memset) ; EXPORT_SYMBOL(__memset)
> 
> I notice in looking at the diff of preprocessed source we end up
> invoking an asm macro that doesn't seem to have a full final argument, I
> wonder if that's relevant...
> 
> -___EXPORT_SYMBOL __memset, __memset, ; ___EXPORT_SYMBOL memset, memset,
> +___EXPORT_SYMBOL __memset, __memset,
> +___EXPORT_SYMBOL memset, memset,
> 
> I also notice that nowhere else in the source do people have multiple
> EXPORT_SYMBOLs on the same line, and other arches seem to just
> unconditionally export both symbols on multiple lines.
> 
> I have no idea how this works for you - maybe it's affected by something 32bit.
> 
> How would you feel about this approach instead? I'm not tied to any of
> the names or anything.
> 
> diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
> index e0637730a8e7..7b6a91b448dd 100644
> --- a/arch/powerpc/include/asm/ppc_asm.h
> +++ b/arch/powerpc/include/asm/ppc_asm.h
> @@ -214,6 +214,9 @@ name: \
>   
>   #define DOTSYM(a)      a
>   
> +#define PROVIDE_WEAK_ALIAS(strongname, weakname) \
> +       .weak weakname ; .set weakname, strongname ;
> +
>   #else
>   
>   #define XGLUE(a,b) a##b
> @@ -236,6 +239,10 @@ GLUE(.,name):
>   
>   #define DOTSYM(a)      GLUE(.,a)
>   
> +#define PROVIDE_WEAK_ALIAS(strongname, weakname) \
> +       .weak weakname ; .set weakname, strongname ; \
> +       .weak DOTSYM(weakname) ; .set DOTSYM(weakname), DOTSYM(strongname) ;
> +
>   #endif
>   
>   #else /* 32-bit */
> @@ -251,6 +258,9 @@ GLUE(.,name):
>   
>   #define _GLOBAL_TOC(name) _GLOBAL(name)
>   
> +#define PROVIDE_WEAK_ALIAS(strongname, weakname) \
> +       .weak weakname ; .set weakname, strongname ;
> +
>   #endif
>   
>   /*
> --- a/arch/powerpc/lib/mem_64.S
> +++ b/arch/powerpc/lib/mem_64.S
> @@ -33,7 +33,8 @@ EXPORT_SYMBOL(__memset32)
>   EXPORT_SYMBOL(__memset64)
>   #endif
>   
> -_GLOBAL_KASAN(memset)
> +PROVIDE_WEAK_ALIAS(__memset,memset)
> +_GLOBAL(__memset)
>          neg     r0,r3
>          rlwimi  r4,r4,8,16,23
>          andi.   r0,r0,7                 /* # bytes to be 8-byte aligned */
> @@ -98,9 +99,11 @@ _GLOBAL_KASAN(memset)
>   10:    bflr    31
>          stb     r4,0(r6)
>          blr
> -EXPORT_SYMBOL_KASAN(memset)
> +EXPORT_SYMBOL(memset)
> +EXPORT_SYMBOL(__memset)
>   
> -_GLOBAL_TOC_KASAN(memmove)
> +PROVIDE_WEAK_ALIAS(__memmove,memove)
> +_GLOBAL_TOC(__memmove)
>          cmplw   0,r3,r4
>          bgt     backwards_memcpy
>          b       memcpy
> @@ -141,4 +144,5 @@ _GLOBAL(backwards_memcpy)
>          beq     2b
>          mtctr   r7
>          b       1b
> -EXPORT_SYMBOL_KASAN(memmove)
> +EXPORT_SYMBOL(memmove)
> +EXPORT_SYMBOL(__memmove)
> diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S
> index 862b515b8868..7c1b09556cad 100644
> --- a/arch/powerpc/lib/memcpy_64.S
> +++ b/arch/powerpc/lib/memcpy_64.S
> @@ -19,7 +19,8 @@
>   #endif
>   
>          .align  7
> -_GLOBAL_TOC_KASAN(memcpy)
> +PROVIDE_WEAK_ALIAS(__memcpy,memcpy)
> +_GLOBAL_TOC(__memcpy)
>   BEGIN_FTR_SECTION
>   #ifdef __LITTLE_ENDIAN__
>          cmpdi   cr7,r5,0
> @@ -230,4 +231,5 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
>   4:     ld      r3,-STACKFRAMESIZE+STK_REG(R31)(r1)     /* return dest pointer */
>          blr
>   #endif
> -EXPORT_SYMBOL_KASAN(memcpy)
> +EXPORT_SYMBOL(__memcpy)
> +EXPORT_SYMBOL(memcpy)
> 
> 
> Regards,
> Daniel
> 
> 
>> +#else
>> +#define _GLOBAL_KASAN(fn)	_GLOBAL(fn)
>> +#define _GLOBAL_TOC_KASAN(fn)	_GLOBAL_TOC(fn)
>> +#define EXPORT_SYMBOL_KASAN(fn)	EXPORT_SYMBOL(fn)
>> +#endif
>> +
>> +#endif
>> diff --git a/arch/powerpc/include/asm/string.h b/arch/powerpc/include/asm/string.h
>> index 1647de15a31e..9bf6dffb4090 100644
>> --- a/arch/powerpc/include/asm/string.h
>> +++ b/arch/powerpc/include/asm/string.h
>> @@ -4,14 +4,17 @@
>>   
>>   #ifdef __KERNEL__
>>   
>> +#ifndef CONFIG_KASAN
>>   #define __HAVE_ARCH_STRNCPY
>>   #define __HAVE_ARCH_STRNCMP
>> +#define __HAVE_ARCH_MEMCHR
>> +#define __HAVE_ARCH_MEMCMP
>> +#define __HAVE_ARCH_MEMSET16
>> +#endif
>> +
>>   #define __HAVE_ARCH_MEMSET
>>   #define __HAVE_ARCH_MEMCPY
>>   #define __HAVE_ARCH_MEMMOVE
>> -#define __HAVE_ARCH_MEMCMP
>> -#define __HAVE_ARCH_MEMCHR
>> -#define __HAVE_ARCH_MEMSET16
>>   #define __HAVE_ARCH_MEMCPY_FLUSHCACHE
>>   
>>   extern char * strcpy(char *,const char *);
>> @@ -27,7 +30,27 @@ extern int memcmp(const void *,const void *,__kernel_size_t);
>>   extern void * memchr(const void *,int,__kernel_size_t);
>>   extern void * memcpy_flushcache(void *,const void *,__kernel_size_t);
>>   
>> +void *__memset(void *s, int c, __kernel_size_t count);
>> +void *__memcpy(void *to, const void *from, __kernel_size_t n);
>> +void *__memmove(void *to, const void *from, __kernel_size_t n);
>> +
>> +#if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__)
>> +/*
>> + * For files that are not instrumented (e.g. mm/slub.c) we
>> + * should use not instrumented version of mem* functions.
>> + */
>> +#define memcpy(dst, src, len) __memcpy(dst, src, len)
>> +#define memmove(dst, src, len) __memmove(dst, src, len)
>> +#define memset(s, c, n) __memset(s, c, n)
>> +
>> +#ifndef __NO_FORTIFY
>> +#define __NO_FORTIFY /* FORTIFY_SOURCE uses __builtin_memcpy, etc. */
>> +#endif
>> +
>> +#endif
>> +
>>   #ifdef CONFIG_PPC64
>> +#ifndef CONFIG_KASAN
>>   #define __HAVE_ARCH_MEMSET32
>>   #define __HAVE_ARCH_MEMSET64
>>   
>> @@ -49,8 +72,11 @@ static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n)
>>   {
>>   	return __memset64(p, v, n * 8);
>>   }
>> +#endif
>>   #else
>> +#ifndef CONFIG_KASAN
>>   #define __HAVE_ARCH_STRLEN
>> +#endif
>>   
>>   extern void *memset16(uint16_t *, uint16_t, __kernel_size_t);
>>   #endif
>> diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh
>> index 667df97d2595..181fd10008ef 100644
>> --- a/arch/powerpc/kernel/prom_init_check.sh
>> +++ b/arch/powerpc/kernel/prom_init_check.sh
>> @@ -16,8 +16,16 @@
>>   # If you really need to reference something from prom_init.o add
>>   # it to the list below:
>>   
>> +grep "^CONFIG_KASAN=y$" .config >/dev/null
>> +if [ $? -eq 0 ]
>> +then
>> +	MEM_FUNCS="__memcpy __memset"
>> +else
>> +	MEM_FUNCS="memcpy memset"
>> +fi
>> +
>>   WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush
>> -_end enter_prom memcpy memset reloc_offset __secondary_hold
>> +_end enter_prom $MEM_FUNCS reloc_offset __secondary_hold
>>   __secondary_hold_acknowledge __secondary_hold_spinloop __start
>>   strcmp strcpy strlcpy strlen strncmp strstr kstrtobool logo_linux_clut224
>>   reloc_got2 kernstart_addr memstart_addr linux_banner _stext
>> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
>> index 79396e184bca..47a4de434c22 100644
>> --- a/arch/powerpc/lib/Makefile
>> +++ b/arch/powerpc/lib/Makefile
>> @@ -8,9 +8,14 @@ ccflags-$(CONFIG_PPC64)	:= $(NO_MINIMAL_TOC)
>>   CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE)
>>   CFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE)
>>   
>> -obj-y += string.o alloc.o code-patching.o feature-fixups.o
>> +obj-y += alloc.o code-patching.o feature-fixups.o
>>   
>> -obj-$(CONFIG_PPC32)	+= div64.o copy_32.o crtsavres.o strlen_32.o
>> +ifndef CONFIG_KASAN
>> +obj-y	+=	string.o memcmp_$(BITS).o
>> +obj-$(CONFIG_PPC32)	+= strlen_32.o
>> +endif
>> +
>> +obj-$(CONFIG_PPC32)	+= div64.o copy_32.o crtsavres.o
>>   
>>   obj-$(CONFIG_FUNCTION_ERROR_INJECTION)	+= error-inject.o
>>   
>> @@ -34,7 +39,7 @@ obj64-$(CONFIG_KPROBES_SANITY_TEST)	+= test_emulate_step.o \
>>   					   test_emulate_step_exec_instr.o
>>   
>>   obj-y			+= checksum_$(BITS).o checksum_wrappers.o \
>> -			   string_$(BITS).o memcmp_$(BITS).o
>> +			   string_$(BITS).o
>>   
>>   obj-y			+= sstep.o ldstfp.o quad.o
>>   obj64-y			+= quad.o
>> diff --git a/arch/powerpc/lib/copy_32.S b/arch/powerpc/lib/copy_32.S
>> index ba66846fe973..fc4fa7246200 100644
>> --- a/arch/powerpc/lib/copy_32.S
>> +++ b/arch/powerpc/lib/copy_32.S
>> @@ -14,6 +14,7 @@
>>   #include <asm/ppc_asm.h>
>>   #include <asm/export.h>
>>   #include <asm/code-patching-asm.h>
>> +#include <asm/kasan.h>
>>   
>>   #define COPY_16_BYTES		\
>>   	lwz	r7,4(r4);	\
>> @@ -68,6 +69,7 @@ CACHELINE_BYTES = L1_CACHE_BYTES
>>   LG_CACHELINE_BYTES = L1_CACHE_SHIFT
>>   CACHELINE_MASK = (L1_CACHE_BYTES-1)
>>   
>> +#ifndef CONFIG_KASAN
>>   _GLOBAL(memset16)
>>   	rlwinm.	r0 ,r5, 31, 1, 31
>>   	addi	r6, r3, -4
>> @@ -81,6 +83,7 @@ _GLOBAL(memset16)
>>   	sth	r4, 4(r6)
>>   	blr
>>   EXPORT_SYMBOL(memset16)
>> +#endif
>>   
>>   /*
>>    * Use dcbz on the complete cache lines in the destination
>> @@ -91,7 +94,7 @@ EXPORT_SYMBOL(memset16)
>>    * We therefore skip the optimised bloc that uses dcbz. This jump is
>>    * replaced by a nop once cache is active. This is done in machine_init()
>>    */
>> -_GLOBAL(memset)
>> +_GLOBAL_KASAN(memset)
>>   	cmplwi	0,r5,4
>>   	blt	7f
>>   
>> @@ -150,7 +153,7 @@ _GLOBAL(memset)
>>   9:	stbu	r4,1(r6)
>>   	bdnz	9b
>>   	blr
>> -EXPORT_SYMBOL(memset)
>> +EXPORT_SYMBOL_KASAN(memset)
>>   
>>   /*
>>    * This version uses dcbz on the complete cache lines in the
>> @@ -163,12 +166,12 @@ EXPORT_SYMBOL(memset)
>>    * We therefore jump to generic_memcpy which doesn't use dcbz. This jump is
>>    * replaced by a nop once cache is active. This is done in machine_init()
>>    */
>> -_GLOBAL(memmove)
>> +_GLOBAL_KASAN(memmove)
>>   	cmplw	0,r3,r4
>>   	bgt	backwards_memcpy
>>   	/* fall through */
>>   
>> -_GLOBAL(memcpy)
>> +_GLOBAL_KASAN(memcpy)
>>   1:	b	generic_memcpy
>>   	patch_site	1b, patch__memcpy_nocache
>>   
>> @@ -242,8 +245,8 @@ _GLOBAL(memcpy)
>>   	stbu	r0,1(r6)
>>   	bdnz	40b
>>   65:	blr
>> -EXPORT_SYMBOL(memcpy)
>> -EXPORT_SYMBOL(memmove)
>> +EXPORT_SYMBOL_KASAN(memcpy)
>> +EXPORT_SYMBOL_KASAN(memmove)
>>   
>>   generic_memcpy:
>>   	srwi.	r7,r5,3
>> diff --git a/arch/powerpc/lib/mem_64.S b/arch/powerpc/lib/mem_64.S
>> index 3c3be02f33b7..7cd6cf6822a2 100644
>> --- a/arch/powerpc/lib/mem_64.S
>> +++ b/arch/powerpc/lib/mem_64.S
>> @@ -12,7 +12,9 @@
>>   #include <asm/errno.h>
>>   #include <asm/ppc_asm.h>
>>   #include <asm/export.h>
>> +#include <asm/kasan.h>
>>   
>> +#ifndef CONFIG_KASAN
>>   _GLOBAL(__memset16)
>>   	rlwimi	r4,r4,16,0,15
>>   	/* fall through */
>> @@ -29,8 +31,9 @@ _GLOBAL(__memset64)
>>   EXPORT_SYMBOL(__memset16)
>>   EXPORT_SYMBOL(__memset32)
>>   EXPORT_SYMBOL(__memset64)
>> +#endif
>>   
>> -_GLOBAL(memset)
>> +_GLOBAL_KASAN(memset)
>>   	neg	r0,r3
>>   	rlwimi	r4,r4,8,16,23
>>   	andi.	r0,r0,7			/* # bytes to be 8-byte aligned */
>> @@ -95,9 +98,9 @@ _GLOBAL(memset)
>>   10:	bflr	31
>>   	stb	r4,0(r6)
>>   	blr
>> -EXPORT_SYMBOL(memset)
>> +EXPORT_SYMBOL_KASAN(memset)
>>   
>> -_GLOBAL_TOC(memmove)
>> +_GLOBAL_TOC_KASAN(memmove)
>>   	cmplw	0,r3,r4
>>   	bgt	backwards_memcpy
>>   	b	memcpy
>> @@ -138,4 +141,4 @@ _GLOBAL(backwards_memcpy)
>>   	beq	2b
>>   	mtctr	r7
>>   	b	1b
>> -EXPORT_SYMBOL(memmove)
>> +EXPORT_SYMBOL_KASAN(memmove)
>> diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S
>> index 273ea67e60a1..862b515b8868 100644
>> --- a/arch/powerpc/lib/memcpy_64.S
>> +++ b/arch/powerpc/lib/memcpy_64.S
>> @@ -11,6 +11,7 @@
>>   #include <asm/export.h>
>>   #include <asm/asm-compat.h>
>>   #include <asm/feature-fixups.h>
>> +#include <asm/kasan.h>
>>   
>>   #ifndef SELFTEST_CASE
>>   /* For big-endian, 0 == most CPUs, 1 == POWER6, 2 == Cell */
>> @@ -18,7 +19,7 @@
>>   #endif
>>   
>>   	.align	7
>> -_GLOBAL_TOC(memcpy)
>> +_GLOBAL_TOC_KASAN(memcpy)
>>   BEGIN_FTR_SECTION
>>   #ifdef __LITTLE_ENDIAN__
>>   	cmpdi	cr7,r5,0
>> @@ -229,4 +230,4 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
>>   4:	ld	r3,-STACKFRAMESIZE+STK_REG(R31)(r1)	/* return dest pointer */
>>   	blr
>>   #endif
>> -EXPORT_SYMBOL(memcpy)
>> +EXPORT_SYMBOL_KASAN(memcpy)
>> -- 
>> 2.13.3

^ permalink raw reply related

* Re: [PATCH] powerpc: silence unused-but-set-variable warnings
From: Christophe Leroy @ 2019-03-07  6:34 UTC (permalink / raw)
  To: Qian Cai, benh, paulus, mpe; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20190307034821.48769-1-cai@lca.pw>



On 03/07/2019 03:48 AM, Qian Cai wrote:
> pte_unmap() compiles away on some powerpc platforms, so silence the
> warnings below by using the argument to pte_unmap() as a nop. Also, fix
> checkpatch.pl warnings "Single statement macros should not use a do {}
> while (0) loop".
> 
> mm/memory.c: In function 'copy_pte_range':
> mm/memory.c:820:24: warning: variable 'orig_dst_pte' set but not used
> [-Wunused-but-set-variable]
> mm/memory.c:820:9: warning: variable 'orig_src_pte' set but not used
> [-Wunused-but-set-variable]
> mm/madvise.c: In function 'madvise_free_pte_range':
> mm/madvise.c:318:9: warning: variable 'orig_pte' set but not used
> [-Wunused-but-set-variable]
> mm/swap_state.c: In function 'swap_ra_info':
> mm/swap_state.c:634:15: warning: variable 'orig_pte' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
>   arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +-
>   arch/powerpc/include/asm/nohash/64/pgtable.h | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
> index 868fcaf56f6b..ec00ce6dd312 100644
> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@ -1006,7 +1006,7 @@ extern struct page *pgd_page(pgd_t pgd);
>   	(((pte_t *) pmd_page_vaddr(*(dir))) + pte_index(addr))
>   
>   #define pte_offset_map(dir,addr)	pte_offset_kernel((dir), (addr))
> -#define pte_unmap(pte)			do { } while(0)
> +#define pte_unmap(pte)			(void)(pte)

I think it would be better with a static inline

--- a/arch/powerpc/include/asm/nohash/64/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/64/pgtable.h
@@ -205,7 +205,8 @@ static inline void pgd_set(pgd_t *pgdp, unsigned 
long val)
    (((pte_t *) pmd_page_vaddr(*(dir))) + (((addr) >> PAGE_SHIFT) & 
(PTRS_PER_PTE - 1)))

  #define pte_offset_map(dir,addr)	pte_offset_kernel((dir), (addr))
-#define pte_unmap(pte)			do { } while(0)
+
+static inline void pte_unmap(pte_t *pte) { }

  /* to find an entry in a kernel page-table-directory */
  /* This now only contains the vmalloc pages */


Christophe

>   
>   /* to find an entry in a kernel page-table-directory */
>   /* This now only contains the vmalloc pages */
> diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h
> index e77ed9761632..103071afab3d 100644
> --- a/arch/powerpc/include/asm/nohash/64/pgtable.h
> +++ b/arch/powerpc/include/asm/nohash/64/pgtable.h
> @@ -205,7 +205,7 @@ static inline void pgd_set(pgd_t *pgdp, unsigned long val)
>     (((pte_t *) pmd_page_vaddr(*(dir))) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
>   
>   #define pte_offset_map(dir,addr)	pte_offset_kernel((dir), (addr))
> -#define pte_unmap(pte)			do { } while(0)
> +#define pte_unmap(pte)			(void)(pte)
>   
>   /* to find an entry in a kernel page-table-directory */
>   /* This now only contains the vmalloc pages */
> 

^ permalink raw reply

* [5.0.0-next-20190306] [powerpc] kernel BUG at mm/page_alloc.c:3124 while running stress
From: Sachin Sant @ 2019-03-07  8:09 UTC (permalink / raw)
  To: linux-next, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 3628 bytes --]

While running stress test from avocado-misc-test against next-20190306 (SHA: cf08baa296)
on a POWER9 LPAR ran into following kernel bug followed by panic.
next-20190305 was good.

 (1/1) avocado-misc-tests/perf/stress.py:Stress.test:  [  947.743425] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
[ 2873.201865] ------------[ cut here ]------------
[ 2873.201907] kernel BUG at mm/page_alloc.c:3124!
[ 2873.201918] Oops: Exception in kernel mode, sig: 5 [#1]
[ 2873.201928] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
[ 2873.201950] Dumping ftrace buffer:
[ 2873.201997]    (ftrace buffer empty)
[ 2873.202005] Modules linked in: unix_diag ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat ip6table_mangle ip6table_raw iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c iptable_mangle iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc sg uio_pdrv_genirq uio pseries_rng ip_tables ext4 mbcache jbd2 sr_mod cdrom sd_mod ibmvscsi scsi_transport_srp ibmveth dm_mirror dm_region_hash dm_log dm_mod
[ 2873.202108] CPU: 17 PID: 180 Comm: kcompactd1 Not tainted 5.0.0-next-20190306-autotest #1
[ 2873.202119] NIP:  c000000000327320 LR: c0000000002f1c10 CTR: c0000000002f1840
[ 2873.202131] REGS: c000000458eeb640 TRAP: 0700   Not tainted  (5.0.0-next-20190306-autotest)
[ 2873.202140] MSR:  8000000102029033 <SF,VEC,EE,ME,IR,DR,RI,LE,TM[E]>  CR: 24882088  XER: 20040000
[ 2873.202161] CFAR: c0000000002f1c0c IRQMASK: 1 
[ 2873.202161] GPR00: c0000000002f1c10 c000000458eeb8d0 c0000000012b9500 c0000008bff1cb58 
[ 2873.202161] GPR04: 0000000000000005 0000000000000308 c0000008bff1cc98 0000000000000780 
[ 2873.202161] GPR08: c000000001478220 0000000000000001 0000000000000000 0000000000000000 
[ 2873.202161] GPR12: 0000000024884082 c00000001ec54280 000000000006fd50 0000000000069b00 
[ 2873.202161] GPR16: 000000000007ad00 0000000000000035 ff40000022ffc700 0000000000000040 
[ 2873.202161] GPR20: c0000008bff1cc88 c0000008bff1cb58 0000000000000000 0000000000000000 
[ 2873.202161] GPR24: 0000000000000001 0000000000000000 0000000000000000 0000000000000005 
[ 2873.202161] GPR28: c0000008bff1c980 0000000000000000 0000000000000001 c0000008bff1cb58 
[ 2873.202251] NIP [c000000000327320] __isolate_free_page+0x90/0x2c0
[ 2873.202263] LR [c0000000002f1c10] compaction_alloc+0x3d0/0xae0
[ 2873.202271] Call Trace:
[ 2873.202280] [c000000458eeb8d0] [f0000000011d9800] 0xf0000000011d9800 (unreliable)
[ 2873.202293] [c000000458eeb940] [c0000000002f1c10] compaction_alloc+0x3d0/0xae0
[ 2873.202305] [c000000458eeba20] [c00000000036cd5c] unmap_and_move+0x7c/0x9a0
[ 2873.202315] [c000000458eeba90] [c00000000036ef14] migrate_pages+0x224/0x870
[ 2873.202326] [c000000458eebb60] [c0000000002f3c9c] compact_zone+0x3ac/0x1020
[ 2873.202336] [c000000458eebc60] [c0000000002f4de8] kcompactd_do_work+0x188/0x350
[ 2873.202347] [c000000458eebd40] [c0000000002f5068] kcompactd+0xb8/0x2a0
[ 2873.202359] [c000000458eebdb0] [c0000000001429d0] kthread+0x160/0x1a0
[ 2873.202371] [c000000458eebe20] [c00000000000b64c] ret_from_kernel_thread+0x5c/0x70
[ 2873.202380] Instruction dump:
[ 2873.202388] 3d02001c 3908ed20 78e71f24 794a57a0 6d29f000 1f4a0680 7d290034 7f28382a 
[ 2873.202401] 5529d97e 79290020 7fb9d214 69290001 <0b090000> 3fc2001b 3bde92b8 38a00002 
[ 2873.202418] ---[ end trace 65562a20cc8f8bc8 ]—

Have attached the console logs.

Thanks
-Sachin


[-- Attachment #2: next-20190306.txt --]
[-- Type: text/plain, Size: 70629 bytes --]

05:05:15 18:35:15 INFO | --- END kernel.build ---
05:05:15 18:35:15 INFO | 		GOOD	build	kernel.build	timestamp=1551915315	localtime=Mar 06 18:35:15	
05:05:15 18:35:15 INFO | TEST: install kernel
05:05:15 18:35:15 INFO | --- START kernel.install ---
05:05:26 18:35:26 INFO | --- START kernel.mkinitrd ---
05:05:26 18:35:26 ERROR| No directory 5.0.0-autotest found under /lib/modules. Initramfscreation will most likely fail and your new kernelwill fail to build
05:05:27 18:35:27 ERROR| [stderr] Kernel version 5.0.0-autotest has no module directory /lib/modules/5.0.0-autotest
05:05:57 18:35:57 INFO | --- END kernel.mkinitrd ---
05:06:03 18:36:03 INFO | 		GOOD	build	kernel.mkinitrd	timestamp=1551915357	localtime=Mar 06 18:35:57	
05:06:03 18:36:03 INFO | --- END kernel.install ---
05:06:03 18:36:03 INFO | 		GOOD	build	kernel.install	timestamp=1551915363	localtime=Mar 06 18:36:03	
05:06:03 18:36:03 INFO | 	END GOOD	----	kernel_build	timestamp=1551915363	localtime=Mar 06 18:36:03	
05:06:03 18:36:03 INFO | TEST: installing and booting the kernel
05:06:20 18:36:03 INFO | 	START	build	reboot	timestamp=1551915363	localtime=Mar 06 18:36:03	
05:06:20 18:36:03 INFO | 		GOOD	build	reboot.start	timestamp=1551915363	localtime=Mar 06 18:36:03	
05:06:20 18:36:04 INFO | --- STRIPPING VMLINUX AND INITRD ---
05:06:20 18:36:09 INFO | --- START kernel.mkinitrd ---
05:06:20 18:36:09 INFO | Existing /boot/initrd-autotest file, will remove it.
05:06:32 18:36:32 INFO | --- END kernel.mkinitrd ---
05:06:32 18:36:32 INFO | 		GOOD	build	kernel.mkinitrd	timestamp=1551915392	localtime=Mar 06 18:36:32	
05:06:32 18:36:32 ERROR| [stderr] Modified cmdline:rw ****=/dev/mapper/rhel_ltc--zzci--2-**** 
05:06:33 [ 1147.230422] kexec_core: Starting new kernel
05:06:33 

05:06:33 \aMessage from syslogd@ltc-zzci-2 at Mar  6 18:36:33 ...

05:06:33  kernel:kexec_core: Starting new kernel
05:06:33 
[ 1147.250504] kexec: waiting for cpu 28 (physical 28) to enter 1 state
05:06:33 [ 1147.250537] kexec: waiting for cpu 1 (physical 1) to enter 2 state
05:06:33 [ 1147.251453] kexec: waiting for cpu 5 (physical 5) to enter 2 state
05:06:33 [ 1147.251529] kexec: waiting for cpu 25 (physical 25) to enter 2 state
05:06:33 [ 1147.251662] kexec: waiting for cpu 27 (physical 27) to enter 2 state
05:06:33 [ 1147.251730] kexec: Starting switchover sequence.
05:06:34 I'm in purgatory
05:06:35 [    0.000000] hash-mmu: Page sizes from device-tree:
05:06:35 [    0.000000] hash-mmu: base_shift=12: shift=12, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=0
05:06:35 [    0.000000] hash-mmu: base_shift=12: shift=16, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=7
05:06:35 [    0.000000] hash-mmu: base_shift=12: shift=24, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=56
05:06:35 [    0.000000] hash-mmu: base_shift=16: shift=16, sllp=0x0110, avpnm=0x00000000, tlbiel=1, penc=1
05:06:35 [    0.000000] hash-mmu: base_shift=16: shift=24, sllp=0x0110, avpnm=0x00000000, tlbiel=1, penc=8
05:06:35 [    0.000000] hash-mmu: base_shift=24: shift=24, sllp=0x0100, avpnm=0x00000001, tlbiel=0, penc=0
05:06:35 [    0.000000] hash-mmu: base_shift=34: shift=34, sllp=0x0120, avpnm=0x000007ff, tlbiel=0, penc=3
05:06:35 [    0.000000] Using 1TB segments
05:06:35 [    0.000000] hash-mmu: Initializing hash mmu with SLB
05:06:35 [    0.000000] Linux version 5.0.0-next-20190306-autotest (****@ltc-zzci-2.aus.stglabs.ibm.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)) #1 SMP Wed Mar 6 18:27:07 EST 2019
05:06:35 [    0.000000] Found initrd at 0xc000000002ff0000:0xc00000000443c217
05:06:35 [    0.000000] Using pSeries machine description
05:06:35 [    0.000000] printk: bootconsole [udbg0] enabled
05:06:35 [    0.000000] Partition configured for 32 cpus.
05:06:35 [    0.000000] CPU maps initialized for 8 threads per core
05:06:35 [    0.000000] -----------------------------------------------------
05:06:35 [    0.000000] ppc64_pft_size    = 0x1c
05:06:35 [    0.000000] phys_mem_size     = 0x8c0000000
05:06:35 [    0.000000] dcache_bsize      = 0x80
05:06:35 [    0.000000] icache_bsize      = 0x80
05:06:35 [    0.000000] cpu_features      = 0x0000c07f8f5f91a7
05:06:35 [    0.000000]   possible        = 0x0000fbffcf5fb1a7
05:06:35 [    0.000000]   always          = 0x00000003800081a1
05:06:35 [    0.000000] cpu_user_features = 0xdc0065c2 0xefe00000
05:06:35 [    0.000000] mmu_features      = 0x7c006001
05:06:35 [    0.000000] firmware_features = 0x00000013c45bfc57
05:06:35 [    0.000000] htab_hash_mask    = 0x1fffff
05:06:35 [    0.000000] -----------------------------------------------------
05:06:35 [    0.000000] numa:   NODE_DATA [mem 0x45ff78980-0x45ff7ffff]
05:06:35 [    0.000000] numa:   NODE_DATA [mem 0x8bff1c980-0x8bff23fff]
05:06:35 [    0.000000] rfi-flush: fallback displacement flush available
05:06:35 [    0.000000] rfi-flush: mttrig type flush available
05:06:35 [    0.000000] count-cache-flush: full software flush sequence enabled.
05:06:35 [    0.000000] stf-barrier: eieio barrier available
05:06:35 [    0.000000] PPC64 nvram contains 15360 bytes
05:06:35 [    0.000000] barrier-nospec: using ORI speculation barrier
05:06:35 [    0.000000] Zone ranges:
05:06:35 [    0.000000]   Normal   [mem 0x0000000000000000-0x00000008bfffffff]
05:06:35 [    0.000000]   Device   empty
05:06:35 [    0.000000] Movable zone start for each node
05:06:35 [    0.000000] Early memory node ranges
05:06:35 [    0.000000]   node   0: [mem 0x0000000000000000-0x000000045fffffff]
05:06:35 [    0.000000]   node   1: [mem 0x0000000460000000-0x00000008bfffffff]
05:06:35 [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000045fffffff]
05:06:35 [    0.000000] Initmem setup node 1 [mem 0x0000000460000000-0x00000008bfffffff]
05:06:35 [    0.000000] random: get_random_u64 called from start_kernel+0xc0/0x670 with crng_init=0
05:06:35 [    0.000000] percpu: Embedded 4 pages/cpu @(____ptrval____) s168728 r0 d93416 u262144
05:06:35 [    0.000000] Built 2 zonelists, mobility grouping on.  Total pages: 572880
05:06:35 [    0.000000] Policy zone: Normal
05:06:35 [    0.000000] Kernel command line: rw ****=/dev/mapper/rhel_ltc--zzci--2-**** 
05:06:35 [    0.000000] Memory: 36574912K/36700160K available (10496K kernel code, 1600K rwdata, 3264K rodata, 4160K init, 3802K bss, 125248K reserved, 0K cma-reserved)
05:06:35 [    0.000000] SLUB: HWalign=128, Order=0-3, MinObjects=0, CPUs=32, Nodes=32
05:06:35 [    0.000000] ftrace: allocating 28452 entries in 11 pages
05:06:35 [    0.000000] rcu: Hierarchical RCU implementation.
05:06:35 [    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=2048 to nr_cpu_ids=32.
05:06:35 [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
05:06:35 [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=32
05:06:35 [    0.000000] NR_IRQS: 512, nr_irqs: 512, preallocated irqs: 16
05:06:35 [    0.000000] rcu: 	Offload RCU callbacks from CPUs: (none).
05:06:35 [    0.000002] time_init: 56 bit decrementer (max: 7fffffffffffff)
05:06:35 [    0.000066] clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x761537d007, max_idle_ns: 440795202126 ns
05:06:35 [    0.000175] clocksource: timebase mult[1f40000] shift[24] registered
05:06:35 [    0.000295] Console: colour dummy device 80x25
05:06:35 [    0.000345] printk: console [hvc0] enabled
05:06:35 [    0.000345] printk: console [hvc0] enabled
05:06:35 [    0.000392] printk: bootconsole [udbg0] disabled
05:06:35 [    0.000392] printk: bootconsole [udbg0] disabled
05:06:35 [    0.000570] mempolicy: Enabling automatic NUMA balancing. Configure with numa_balancing= or the kernel.numa_balancing sysctl
05:06:35 [    0.000584] pid_max: default: 32768 minimum: 301
05:06:35 [    0.006136] Dentry cache hash table entries: 8388608 (order: 10, 67108864 bytes)
05:06:35 [    0.008222] Inode-cache hash table entries: 4194304 (order: 9, 33554432 bytes)
05:06:35 [    0.008411] Mount-cache hash table entries: 131072 (order: 4, 1048576 bytes)
05:06:35 [    0.008482] Mountpoint-cache hash table entries: 131072 (order: 4, 1048576 bytes)
05:06:35 [    0.009378] *** VALIDATE proc ***
05:06:35 [    0.009517] *** VALIDATE cgroup1 ***
05:06:35 [    0.009522] *** VALIDATE cgroup2 ***
05:06:35 [    0.010360] EEH: pSeries platform initialized
05:06:35 [    0.010368] POWER9 performance monitor hardware support registered
05:06:35 [    0.010408] rcu: Hierarchical SRCU implementation.
05:06:35 [    0.011190] smp: Bringing up secondary CPUs ...
05:06:35 [    0.020149] smp: Brought up 2 nodes, 32 CPUs
05:06:35 [    0.020157] numa: Node 0 CPUs: 0-15
05:06:35 [    0.020161] numa: Node 1 CPUs: 16-31
05:06:35 [    0.020165] Using small cores at SMT level
05:06:35 [    0.020168] Using shared cache scheduler topology
05:06:35 [    0.024002] devtmpfs: initialized
05:06:35 [    0.027419] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
05:06:35 [    0.027437] futex hash table entries: 8192 (order: 4, 1048576 bytes)
05:06:35 [    0.028384] NET: Registered protocol family 16
05:06:35 [    0.028593] audit: initializing netlink subsys (disabled)
05:06:35 [    0.028644] audit: type=2000 audit(1551915396.020:1): state=initialized audit_enabled=0 res=1
05:06:35 [    0.028755] cpuidle: using governor menu
05:06:35 [    0.028952] pstore: Registered nvram as persistent store backend
05:06:35 [    0.034866] PCI: Probing PCI hardware
05:06:35 [    0.034871] EEH: No capable adapters found
05:06:35 [    0.034965] pseries-rng: Registering arch random hook.
05:06:35 [    0.036260] HugeTLB registered 16.0 MiB page size, pre-allocated 0 pages
05:06:35 [    0.036266] HugeTLB registered 16.0 GiB page size, pre-allocated 0 pages
05:06:35 [    0.037546] vgaarb: loaded
05:06:35 [    0.037707] SCSI subsystem initialized
05:06:35 [    0.037744] usbcore: registered new interface driver usbfs
05:06:35 [    0.037754] usbcore: registered new interface driver hub
05:06:35 [    0.037923] usbcore: registered new device driver usb
05:06:35 [    0.038153] EDAC MC: Ver: 3.0.0
05:06:35 [    0.038521] clocksource: Switched to clocksource timebase
05:06:35 [    0.050832] VFS: Disk quotas dquot_6.6.0
05:06:35 [    0.050949] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
05:06:35 [    0.051049] *** VALIDATE hugetlbfs ***
05:06:35 [    0.053807] NET: Registered protocol family 2
05:06:35 [    0.054027] tcp_listen_portaddr_hash hash table entries: 32768 (order: 3, 524288 bytes)
05:06:35 [    0.054103] TCP established hash table entries: 524288 (order: 6, 4194304 bytes)
05:06:35 [    0.054995] TCP bind hash table entries: 65536 (order: 4, 1048576 bytes)
05:06:35 [    0.055144] TCP: Hash tables configured (established 524288 bind 65536)
05:06:35 [    0.055187] UDP hash table entries: 32768 (order: 4, 1048576 bytes)
05:06:35 [    0.055318] UDP-Lite hash table entries: 32768 (order: 4, 1048576 bytes)
05:06:35 [    0.055571] NET: Registered protocol family 1
05:06:35 [    0.055608] Unpacking initramfs...
05:06:35 [    0.345059] Freeing initrd memory: 20736K
05:06:35 [    0.345220] numa: Starting topology update prrn_enabled
05:06:35 [    0.347835] IOMMU table initialized, virtual merging enabled
05:06:35 [    0.368814] hv-24x7: read 1530 catalog entries, created 537 event attrs (0 failures), 275 descs
05:06:35 [    0.370557] workingset: timestamp_bits=38 max_order=20 bucket_order=0
05:06:35 [    0.371779] zbud: loaded
05:06:36 [    0.642526] alg: No test for lzo-rle (lzo-rle-generic)
05:06:36 [    0.643348] alg: No test for lzo-rle (lzo-rle-scomp)
05:06:36 [    0.671029] NET: Registered protocol family 38
05:06:36 [    0.671038] Key type asymmetric registered
05:06:36 [    0.671041] Asymmetric key parser 'x509' registered
05:06:36 [    0.671059] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
05:06:36 [    0.671188] io scheduler mq-deadline registered
05:06:36 [    0.671193] io scheduler kyber registered
05:06:36 [    0.671857] atomic64_test: passed
05:06:36 [    0.671898] PowerPC PowerNV PCI Hotplug Driver version: 0.1
05:06:36 [    0.672288] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
05:06:36 [    0.672560] Non-volatile memory driver v1.3
05:06:36 [    0.672593] Linux agpgart interface v0.103
05:06:39 [    3.998540] random: fast init done
05:06:41 [    6.308674] tpm_ibmvtpm 30000003: CRQ initialization completed
05:06:41 [    6.308685] tpm_ibmvtpm 30000003: ibmvtpm device is not ready
05:06:41 [    6.308688] tpm_ibmvtpm 30000003: ibmvtpm device is not ready
05:06:41 [    6.308904] rdac: device handler registered
05:06:41 [    6.308953] hp_sw: device handler registered
05:06:41 [    6.308957] emc: device handler registered
05:06:41 [    6.309083] alua: device handler registered
05:06:41 [    6.309119] libphy: Fixed MDIO Bus: probed
05:06:41 [    6.309169] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
05:06:41 [    6.309180] ehci-pci: EHCI PCI platform driver
05:06:41 [    6.309188] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
05:06:41 [    6.309198] ohci-pci: OHCI PCI platform driver
05:06:41 [    6.309206] uhci_hcd: USB Universal Host Controller Interface driver
05:06:41 [    6.309239] usbcore: registered new interface driver usbserial_generic
05:06:41 [    6.309248] usbserial: USB Serial support registered for generic
05:06:41 [    6.309313] mousedev: PS/2 mouse device common for all mice
05:06:41 [    6.309406] rtc-generic rtc-generic: registered as rtc0
05:06:41 [    6.309759] nx_compress_pseries ibm,compression-v1: nx842_OF_upd: max_sync_size new:65536 old:0
05:06:41 [    6.309768] nx_compress_pseries ibm,compression-v1: nx842_OF_upd: max_sync_sg new:510 old:0
05:06:41 [    6.309774] nx_compress_pseries ibm,compression-v1: nx842_OF_upd: max_sg_len new:4080 old:0
05:06:41 [    6.309845] alg: No test for 842 (842-nx)
05:06:41 [    6.310956] hidraw: raw HID events driver (C) Jiri Kosina
05:06:41 [    6.311050] usbcore: registered new interface driver usbhid
05:06:41 [    6.311054] usbhid: USB HID core driver
05:06:41 [    6.311167] drop_monitor: Initializing network drop monitor service
05:06:41 [    6.311266] Initializing XFRM netlink socket
05:06:41 [    6.311853] NET: Registered protocol family 10
05:06:41 [    6.312286] Segment Routing with IPv6
05:06:41 [    6.312309] NET: Registered protocol family 17
05:06:41 [    6.312595] registered taskstats version 1
05:06:41 [    6.312635] zswap: loaded using pool lzo/zbud
05:06:41 [    6.312692] pstore: Using crash dump compression: deflate
05:06:41 [    6.316152] Key type big_key registered
05:06:41 [    6.316366] rtc-generic rtc-generic: setting system clock to 2019-03-06T23:36:42 UTC (1551915402)
05:06:41 [    6.317457] Freeing unused kernel memory: 4160K
05:06:41 [    6.317462] This architecture does not have kernel memory protection.
05:06:41 [    6.317467] Run /init as init process
05:06:41 [    6.327584] random: systemd: uninitialized urandom read (16 bytes read)
05:06:41 [    6.328036] random: systemd: uninitialized urandom read (16 bytes read)
05:06:41 [    6.328053] random: systemd: uninitialized urandom read (16 bytes read)
05:06:41 [    6.336221] systemd[1]: systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
05:06:41 [    6.336393] systemd[1]: Detected architecture ppc64-le.
05:06:41 [    6.336399] systemd[1]: Running in initial RAM disk.
05:06:41 
05:06:41 Welcome to ^[[0;34mRed Hat Enterprise Linux Server 7.5 (Maipo) dracut-033-535.el7 (Initramfs)^[[0m!
05:06:41 
05:06:41 [    6.336570] systemd[1]: Set hostname to <ltc-zzci-2.aus.stglabs.ibm.com>.
05:06:41 [^[[32m  OK  ^[[0m] Reached target Timers.
05:06:41 [    6.369540] systemd[1]: Reached target Timers.
05:06:41 [    6.369554] systemd[1]: Starting Timers.
05:06:41 [^[[32m  OK  ^[[0m] Reached target Swap.
05:06:41 [    6.369676] systemd[1]: Reached target Swap.
05:06:41 [    6.369689] systemd[1]: Starting Swap.
05:06:41 [^[[32m  OK  ^[[0m] Reached target Local File Systems.
05:06:41 [    6.369811] systemd[1]: Reached target Local File Systems.
05:06:41 [    6.369824] systemd[1]: Starting Local File Systems.
05:06:41 [^[[32m  OK  ^[[0m] Created slice Root Slice.
05:06:41 [^[[32m  OK  ^[[0m] Created slice System Slice.
05:06:41 [^[[32m  OK  ^[[0m] Reached target Slices.
05:06:41 [^[[32m  OK  ^[[0m] Listening on Journal Socket.
05:06:41          Starting Journal Service...
05:06:41          Starting Setup Virtual Console...
05:06:41          Starting Apply Kernel Variables...
05:06:41          Starting Create list of required st... nodes for the current kernel...
05:06:41 [^[[32m  OK  ^[[0m] Listening on udev Kernel Socket.
05:06:41 [^[[32m  OK  ^[[0m] Listening on udev Control Socket.
05:06:41 [^[[32m  OK  ^[[0m] Reached target Sockets.
05:06:41          Starting dracut cmdline hook...
05:06:41 [^[[32m  OK  ^[[0m] Started Apply Kernel Variables.
05:06:41 [^[[32m  OK  ^[[0m] Started Create list of required sta...ce nodes for the current kernel.
05:06:41          Starting Create Static Device Nodes in /dev...
05:06:41 [^[[32m  OK  ^[[0m] Started Journal Service.
05:06:41 [^[[32m  OK  ^[[0m] Started Create Static Device Nodes in /dev.
05:06:42 [^[[32m  OK  ^[[0m] Started Setup Virtual Console.
05:06:42 [^[[32m  OK  ^[[0m] Started dracut cmdline hook.
05:06:42          Starting dracut pre-udev hook...
05:06:42 [    6.479227] device-mapper: uevent: version 1.0.3
05:06:42 [    6.479404] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
05:06:42 [^[[32m  OK  ^[[0m] Started dracut pre-udev hook.
05:06:42          Starting udev Kernel Device Manager...
05:06:42 [^[[32m  OK  ^[[0m] Started udev Kernel Device Manager.
05:06:42          Starting udev Coldplug all Devices...
05:06:42          Mounting Configuration File System...
05:06:42 [^[[32m  OK  ^[[0m] Mounted Configuration File System.
05:06:42 [    6.525284] synth uevent: /devices/vio: failed to send uevent
05:06:42 [    6.525295] vio vio: uevent: failed to send synthetic uevent
05:06:42 [    6.525365] synth uevent: /devices/vio/4000: failed to send uevent
05:06:42 [    6.525371] vio 4000: uevent: failed to send synthetic uevent
05:06:42 [    6.525385] synth uevent: /devices/vio/4001: failed to send uevent
05:06:42 [    6.525390] vio 4001: uevent: failed to send synthetic uevent
05:06:42 [    6.525404] synth uevent: /devices/vio/4002: failed to send uevent
05:06:42 [    6.525409] vio 4002: uevent: failed to send synthetic uevent
05:06:42 [    6.525422] synth uevent: /devices/vio/4004: failed to send uevent
05:06:42 [    6.525427] vio 4004: uevent: failed to send synthetic uevent
05:06:42 [^[[32m  OK  ^[[0m] Started udev Coldplug all Devices.
05:06:42          Starting dracut initqueue hook...
05:06:42          Starting Show Plymouth Boot Screen...
05:06:42 [^[[32m  OK  ^[[0m] Reached target System Initialization.
05:06:42 [    6.545663] ibmvscsi 30000066: SRP_VERSION: 16.a
05:06:42 [^[[32m  OK  ^[[0m] Started Show Plymouth Boot Screen.

05:06:42 [^[[32m  OK  ^[[0m] Reached target Paths.

05:06:42 [^[[32m  OK  ^[[0m] Reached target Basic System.

05:06:42 ^[%G[   17.468610] ibmvscsi 30000066: SRP_VERSION: 16.a
05:06:53 [   17.468711] ibmvscsi 30000066: Maximum ID: 64 Maximum LUN: 32 Maximum Channel: 3
05:06:53 [   17.468718] scsi host0: IBM POWER Virtual SCSI Adapter 1.5.9
05:06:53 [   17.469066] ibmvscsi 30000066: partner initialization complete
05:06:53 [   17.469125] ibmvscsi 30000066: host srp version: 16.a, host partition ltc-zzci-vios1 (100), OS 3, max io 1048576
05:06:53 [   17.469193] ibmvscsi 30000066: Client reserve enabled
05:06:53 [   17.469203] ibmvscsi 30000066: sent SRP login
05:06:53 [   17.469231] ibmvscsi 30000066: SRP_LOGIN succeeded
05:06:53 [   17.498946] scsi 0:0:1:0: Direct-Access     AIX      VDASD            0001 PQ: 0 ANSI: 3
05:06:53 [   17.499361] scsi 0:0:2:0: CD-ROM            AIX      VOPTA                 PQ: 0 ANSI: 4
05:06:53 [   17.532445] sr 0:0:2:0: [sr0] scsi-1 drive
05:06:53 [   17.532456] cdrom: Uniform CD-ROM driver Revision: 3.20
05:06:53 [   17.532830] sd 0:0:1:0: [sda] 585105408 512-byte logical blocks: (300 GB/279 GiB)
05:06:53 [   17.532883] sd 0:0:1:0: [sda] Write Protect is off
05:06:53 [   17.532926] sd 0:0:1:0: [sda] Cache data unavailable
05:06:53 [   17.532932] sd 0:0:1:0: [sda] Assuming drive cache: write through
05:06:53 [   17.532982] sd 0:0:1:0: [sda] Optimal transfer size 0 bytes < PAGE_SIZE (65536 bytes)
05:06:53 [   17.539412]  sda: sda1 sda2 sda3
05:06:53 [   17.540207] sd 0:0:1:0: [sda] Attached SCSI disk
05:06:53 [^[[32m  OK  ^[[0m] Found device /dev/mapper/rhel_ltc--zzci--2-****.

05:06:53          Starting File System Check on /dev/mapper/rhel_ltc--zzci--2-****...

05:06:53 [^[[32m  OK  ^[[0m] Started dracut initqueue hook.

05:06:53 [^[[32m  OK  ^[[0m] Reached target Remote File Systems (Pre).

05:06:53 [^[[32m  OK  ^[[0m] Reached target Remote File Systems.

05:06:54 [   18.483474] random: crng init done
05:06:54 [   18.483485] random: 7 urandom warning(s) missed due to ratelimiting
05:06:56 [^[[32m  OK  ^[[0m] Started File System Check on /dev/mapper/rhel_ltc--zzci--2-****.

05:06:56          Mounting /sys****...

05:06:56 [   21.269747] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
05:06:56 [^[[32m  OK  ^[[0m] Mounted /sys****.

05:06:56 [^[[32m  OK  ^[[0m] Reached target Initrd Root File System.

05:06:56          Starting Reload Configuration from the Real Root...

05:06:56 [^[[32m  OK  ^[[0m] Started Reload Configuration from the Real Root.

05:06:56 [^[[32m  OK  ^[[0m] Reached target Initrd File Systems.

05:06:56 [^[[32m  OK  ^[[0m] Reached target Initrd Default Target.

05:06:56          Starting dracut pre-pivot and cleanup hook...

05:06:57 [^[[32m  OK  ^[[0m] Started dracut pre-pivot and cleanup hook.

05:06:57          Starting Cleaning Up and Shutting Down Daemons...

05:06:57 [^[[32m  OK  ^[[0m] Stopped Cleaning Up and Shutting Down Daemons.

05:06:57 [^[[32m  OK  ^[[0m] Stopped dracut pre-pivot and cleanup hook.

05:06:57          Stopping dracut pre-pivot and cleanup hook...

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Remote File Systems.

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Remote File Systems (Pre).

05:06:57          Starting Plymouth switch **** service...

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Initrd Default Target.

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Basic System.

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Slices.

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Paths.

05:06:57 [^[[32m  OK  ^[[0m] Stopped target System Initialization.

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Swap.

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Local File Systems.

05:06:57 [^[[32m  OK  ^[[0m] Stopped Apply Kernel Variables.

05:06:57          Stopping Apply Kernel Variables...

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Sockets.

05:06:57 [^[[32m  OK  ^[[0m] Stopped dracut initqueue hook.

05:06:57          Stopping dracut initqueue hook...

05:06:57 [^[[32m  OK  ^[[0m] Stopped udev Coldplug all Devices.

05:06:57          Stopping udev Coldplug all Devices...

05:06:57 [^[[32m  OK  ^[[0m] Stopped target Timers.

05:06:57          Stopping udev Kernel Device Manager...

05:06:57 [^[[32m  OK  ^[[0m] Stopped udev Kernel Device Manager.

05:06:57 [^[[32m  OK  ^[[0m] Stopped dracut pre-udev hook.

05:06:57          Stopping dracut pre-udev hook...

05:06:57 [^[[32m  OK  ^[[0m] Stopped dracut cmdline hook.

05:06:57          Stopping dracut cmdline hook...

05:06:57 [^[[32m  OK  ^[[0m] Stopped Create Static Device Nodes in /dev.

05:06:57          Stopping Create Static Device Nodes in /dev...

05:06:57 [^[[32m  OK  ^[[0m] Stopped Create list of required sta...ce nodes for the current kernel.

05:06:57          Stopping Create list of required st... nodes for the current kernel...

05:06:57 [^[[32m  OK  ^[[0m] Closed udev Control Socket.

05:06:57 [^[[32m  OK  ^[[0m] Closed udev Kernel Socket.

05:06:57          Starting Cleanup udevd DB...

05:06:57 [^[[32m  OK  ^[[0m] Started Plymouth switch **** service.

05:06:57 [^[[32m  OK  ^[[0m] Started Cleanup udevd DB.

05:06:57 [^[[32m  OK  ^[[0m] Reached target Switch Root.

05:06:57          Starting Switch Root...

05:06:57 [   21.677561] systemd-journald[360]: Received SIGTERM from PID 1 (systemd).
05:06:57 [   21.759118] printk: systemd: 23 output lines suppressed due to ratelimiting
05:06:57 [   22.000422] systemd[1]: Inserted module 'ip_tables'
05:06:57 

05:06:57 Welcome to ^[[0;31mRed Hat Enterprise Linux Server 7.5 (Maipo)^[[0m!

05:06:57 

05:06:58 [^[[32m  OK  ^[[0m] Stopped Switch Root.

05:06:58 [^[[32m  OK  ^[[0m] Stopped Journal Service.

05:06:58          Starting Journal Service...

05:06:58 [^[[32m  OK  ^[[0m] Listening on LVM2 poll daemon socket.

05:06:58 [^[[32m  OK  ^[[0m] Listening on LVM2 metadata daemon socket.

05:06:58 [^[[32m  OK  ^[[0m] Listening on udev Kernel Socket.

05:06:58 [^[[32m  OK  ^[[0m] Stopped target Switch Root.

05:06:58 [^[[32m  OK  ^[[0m] Stopped target Initrd Root File System.

05:06:58          Starting Replay Read-Ahead Data...

05:06:58 [^[[32m  OK  ^[[0m] Listening on Device-mapper event daemon FIFOs.

05:06:58          Starting Monitoring of LVM2 mirrors... dmeventd or progress polling...

05:06:58 [^[[32m  OK  ^[[0m] Listening on Delayed Shutdown Socket.

05:06:58          Mounting Debug File System...

05:06:58 [^[[32m  OK  ^[[0m] Set up automount Arbitrary Executab...ats File System Automount Point.

05:06:58 [^[[32m  OK  ^[[0m] Created slice system-getty.slice.

05:06:58 [^[[32m  OK  ^[[0m] Listening on /dev/initctl Compatibility Named Pipe.

05:06:58 [^[[32m  OK  ^[[0m] Listening on udev Control Socket.

05:06:58 [^[[32m  OK  ^[[0m] Created slice system-systemd\x2dfsck.slice.

05:06:58 [^[[32m  OK  ^[[0m] Created slice User and Session Slice.

05:06:58 [^[[32m  OK  ^[[0m] Reached target Slices.

05:06:58          Starting Read and set NIS domainname from /etc/sysconfig/network...

05:06:58 [^[[32m  OK  ^[[0m] Stopped target Initrd File Systems.

05:06:58          Starting Create list of required st... nodes for the current kernel...

05:06:58 [^[[32m  OK  ^[[0m] Created slice system-serial\x2dgetty.slice.

05:06:58          Starting Collect Read-Ahead Data...

05:06:58          Mounting Huge Pages File System...

05:06:58          Mounting POSIX Message Queue File System...

05:06:58 [^[[32m  OK  ^[[0m] Created slice system-selinux\x2dpol...grate\x2dlocal\x2dchanges.slice.

05:06:58 [^[[32m  OK  ^[[0m] Started Collect Read-Ahead Data.

05:06:58 [^[[32m  OK  ^[[0m] Started Create list of required sta...ce nodes for the current kernel.

05:06:58 [^[[32m  OK  ^[[0m] Started Replay Read-Ahead Data.

05:06:58          Starting Remount Root and Kernel File Systems...

05:06:58          Starting Create Static Device Nodes in /dev...

05:06:58          Starting Apply Kernel Variables...

05:06:58 [^[[32m  OK  ^[[0m] Started Apply Kernel Variables.

05:06:58 [^[[32m  OK  ^[[0m] Started Journal Service.

05:06:58 [^[[32m  OK  ^[[0m] Started Create Static Device Nodes in /dev.

05:06:58          Starting udev Kernel Device Manager...

05:06:59 [^[[32m  OK  ^[[0m] Mounted Huge Pages File System.

05:06:59 [   23.497772] EXT4-fs (dm-0): re-mounted. Opts: (null)
05:06:59 [^[[32m  OK  ^[[0m] Started Read and set NIS domainname from /etc/sysconfig/network.

05:06:59 [^[[32m  OK  ^[[0m] Mounted Debug File System.

05:06:59 [^[[32m  OK  ^[[0m] Mounted POSIX Message Queue File System.

05:06:59 [^[[32m  OK  ^[[0m] Started Remount Root and Kernel File Systems.

05:06:59          Starting Load/Save Random Seed...

05:06:59          Starting Flush Journal to Persistent Storage...

05:06:59          Starting Configure read-only **** support...

05:06:59          Starting udev Coldplug all Devices...

05:06:59 [^[[32m  OK  ^[[0m] Started Load/Save Random Seed.

05:06:59 [   23.541657] systemd-journald[732]: Received request to flush runtime journal from PID 1
05:06:59 [   23.552632] synth uevent: /devices/vio: failed to send uevent
05:06:59 [   23.552642] vio vio: uevent: failed to send synthetic uevent
05:06:59 [   23.552888] synth uevent: /devices/vio/4000: failed to send uevent
05:06:59 [   23.552894] vio 4000: uevent: failed to send synthetic uevent
05:06:59 [   23.552907] synth uevent: /devices/vio/4001: failed to send uevent
05:06:59 [   23.552912] vio 4001: uevent: failed to send synthetic uevent
05:06:59 [   23.552925] synth uevent: /devices/vio/4002: failed to send uevent
05:06:59 [   23.552929] vio 4002: uevent: failed to send synthetic uevent
05:06:59 [   23.552941] synth uevent: /devices/vio/4004: failed to send uevent
05:06:59 [   23.552946] vio 4004: uevent: failed to send synthetic uevent
05:06:59 [^[[32m  OK  ^[[0m] Started udev Coldplug all Devices.

05:06:59          Starting udev Wait for Complete Device Initialization...

05:06:59 [^[[32m  OK  ^[[0m] Started Flush Journal to Persistent Storage.

05:06:59 [^[[32m  OK  ^[[0m] Started LVM2 metadata daemon.

05:06:59          Starting LVM2 metadata daemon...

05:06:59 [^[[32m  OK  ^[[0m] Started Configure read-only **** support.

05:06:59 [^[[32m  OK  ^[[0m] Started udev Kernel Device Manager.

05:06:59 [^[[32m  OK  ^[[0m] Found device /dev/hvc0.

05:06:59 [   24.058478] pseries_rng: Registering IBM pSeries RNG driver
05:06:59 ^[%G[   24.106651] sd 0:0:1:0: Attached scsi generic sg0 type 0
05:06:59 [   24.106706] sr 0:0:2:0: Attached scsi generic sg1 type 5
05:06:59 [^[[32m  OK  ^[[0m] Created slice system-lvm2\x2dpvscan.slice.

05:06:59          Starting LVM2 PV scan on device 8:3...

05:07:00 [^[[32m  OK  ^[[0m] Found device /dev/mapper/rhel_ltc--zzci--2-swap.

05:07:00          Activating swap /dev/mapper/rhel_ltc--zzci--2-swap...

05:07:00 [   24.418603] Adding 40886208k swap on /dev/mapper/rhel_ltc--zzci--2-swap.  Priority:-2 extents:1 across:40886208k FS
05:07:00 [^[[32m  OK  ^[[0m] Activated swap /dev/mapper/rhel_ltc--zzci--2-swap.

05:07:00 [^[[32m  OK  ^[[0m] Reached target Swap.

05:07:00 [^[[32m  OK  ^[[0m] Found device VDASD 2.

05:07:00 [^[[32m  OK  ^[[0m] Started Monitoring of LVM2 mirrors,...ng dmeventd or progress polling.

05:07:00 [^[[32m  OK  ^[[0m] Reached target Local File Systems (Pre).

05:07:00          Starting File System Check on /dev/...7-2846-4606-a8c3-2c10a13de684...

05:07:00 [^[[32m  OK  ^[[0m] Started udev Wait for Complete Device Initialization.

05:07:00          Starting Activation of DM RAID sets...

05:07:00 [^[[32m  OK  ^[[0m] Started Activation of DM RAID sets.

05:07:00 [^[[32m  OK  ^[[0m] Reached target Local Encrypted Volumes.

05:07:00 [   24.872348] systemd-fsck[1483]: /dev/sda2: recovering journal

05:07:00 [   25.110769] systemd-fsck[1483]: /dev/sda2: clean, 306/655360 files, 177656/2621440 blocks

05:07:00 [^[[32m  OK  ^[[0m] Started File System Check on /dev/d...1b7-2846-4606-a8c3-2c10a13de684.

05:07:00          Mounting /boot...

05:07:00 [   25.204678] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
05:07:00 [^[[32m  OK  ^[[0m] Mounted /boot.

05:07:00 [^[[32m  OK  ^[[0m] Reached target Local File Systems.

05:07:00          Starting Preprocess NFS configuration...

05:07:00          Starting Tell Plymouth To Write Out Runtime Data...

05:07:00          Starting Import network configuration from initramfs...

05:07:00 [^[[32m  OK  ^[[0m] Started Preprocess NFS configuration.

05:07:00 [^[[32m  OK  ^[[0m] Started Tell Plymouth To Write Out Runtime Data.

05:07:00 [^[[32m  OK  ^[[0m] Started Import network configuration from initramfs.

05:07:00          Starting Create Volatile Files and Directories...

05:07:01 [^[[32m  OK  ^[[0m] Started Create Volatile Files and Directories.

05:07:01          Starting Security Auditing Service...

05:07:01          Mounting RPC Pipe File System...

05:07:01 [^[[32m  OK  ^[[0m] Started Security Auditing Service.

05:07:01          Starting Update UTMP about System Boot/Shutdown...

05:07:01 [^[[32m  OK  ^[[0m] Started Update UTMP about System Boot/Shutdown.

05:07:01 [^[[32m  OK  ^[[0m] Reached target System Initialization.

05:07:01 [^[[32m  OK  ^[[0m] Listening on RPCbind Server Activation Socket.

05:07:01          Starting RPC bind service...

05:07:01 [^[[32m  OK  ^[[0m] Reached target Paths.

05:07:01 [^[[32m  OK  ^[[0m] Listening on D-Bus System Message Bus Socket.

05:07:01 [^[[32m  OK  ^[[0m] Listening on Open-iSCSI iscsiuio Socket.

05:07:01 [^[[32m  OK  ^[[0m] Listening on Open-iSCSI iscsid Socket.

05:07:01 [^[[32m  OK  ^[[0m] Reached target Sockets.

05:07:01 [^[[32m  OK  ^[[0m] Reached target Basic System.

05:07:01          Starting Resets System Activity Logs...

05:07:01          Starting GSSAPI Proxy Daemon...

05:07:01 [^[[32m  OK  ^[[0m] Started irqbalance daemon.

05:07:01          Starting irqbalance daemon...

05:07:01 [   25.629584] RPC: Registered named UNIX socket transport module.
05:07:01 [   25.629594] RPC: Registered udp transport module.
05:07:01 [   25.629598] RPC: Registered tcp transport module.
05:07:01 [   25.629604] RPC: Registered tcp NFSv4.1 backchannel transport module.
05:07:01          Starting NTP client/server...

05:07:01 [^[[32m  OK  ^[[0m] Started D-Bus System Message Bus.

05:07:01          Starting D-Bus System Message Bus...

05:07:01          Starting Login Service...

05:07:01 [^[[32m  OK  ^[[0m] Started ABRT Automated Bug Reporting Tool.

05:07:01          Starting ABRT Automated Bug Reporting Tool...

05:07:01 [^[[32m  OK  ^[[0m] Started ABRT kernel log watcher.

05:07:01          Starting ABRT kernel log watcher...

05:07:01          Starting Install ABRT coredump hook...

05:07:01 [^[[32m  OK  ^[[0m] Started Hardware RNG Entropy Gatherer Daemon.

05:07:01          Starting Hardware RNG Entropy Gatherer Daemon...

05:07:01          Starting Authorization Manager...

05:07:01          Starting Dump dmesg to /var/log/dmesg...

05:07:01 [^[[32m  OK  ^[[0m] Started libstoragemgmt plug-in server daemon.

05:07:01          Starting libstoragemgmt plug-in server daemon...

05:07:01          Starting ppc64-diag rtas_errd (platform error handling) Service...

05:07:01 [^[[32m  OK  ^[[0m] Started Self Monitoring and Reporting Technology (SMART) Daemon.

05:07:01          Starting Self Monitoring and Reporting Technology (SMART) Daemon...

05:07:01 [^[[32m  OK  ^[[0m] Reached target Timers.

05:07:01 [^[[32m  OK  ^[[0m] Mounted RPC Pipe File System.

05:07:01 [^[[32m  OK  ^[[0m] Started RPC bind service.

05:07:01 [^[[32m  OK  ^[[0m] Started Resets System Activity Logs.

05:07:01 [^[[32m  OK  ^[[0m] Started GSSAPI Proxy Daemon.

05:07:01 [^[[32m  OK  ^[[0m] Started Install ABRT coredump hook.

05:07:01 [^[[32m  OK  ^[[0m] Started Dump dmesg to /var/log/dmesg.

05:07:01 [^[[32m  OK  ^[[0m] Reached target rpc_pipefs.target.

05:07:01 [^[[32m  OK  ^[[0m] Reached target NFS client services.

05:07:01 [^[[32m  OK  ^[[0m] Started Login Service.

05:07:01 [^[[32m  OK  ^[[0m] Started NTP client/server.

05:07:01 [^[[32m  OK  ^[[0m] Started ppc64-diag rtas_errd (platform error handling) Service.

05:07:01 [^[[32m  OK  ^[[0m] Started Authorization Manager.

05:07:01          Starting firewalld - dynamic firewall daemon...

05:07:01 [^[[32m  OK  ^[[0m] Started LVM2 PV scan on device 8:3.

05:07:01 [^[[32m  OK  ^[[0m] Started firewalld - dynamic firewall daemon.

05:07:01 [^[[32m  OK  ^[[0m] Reached target Network (Pre).

05:07:01          Starting Network Manager...

05:07:02          Starting Hostname Service...

05:07:02 [^[[32m  OK  ^[[0m] Started Hostname Service.

05:07:02 [^[[32m  OK  ^[[0m] Started Network Manager.

05:07:02          Starting Network Manager Script Dispatcher Service...

05:07:02          Starting Network Manager Wait Online...

05:07:02 [^[[32m  OK  ^[[0m] Started Network Manager Script Dispatcher Service.

05:07:02 [   26.555163] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
05:07:02 [^[[32m  OK  ^[[0m] Started Network Manager Wait Online.

05:07:02          Starting LSB: Bring up/down networking...

05:07:03 [^[[32m  OK  ^[[0m] Started LSB: Bring up/down networking.

05:07:03 [^[[32m  OK  ^[[0m] Reached target Network.

05:07:03          Starting Postfix Mail Transport Agent...

05:07:03          Starting Logout off all iSCSI sessions on shutdown...

05:07:03          Starting Enable periodic update of entitlement certificates....

05:07:03          Starting OpenSSH server daemon...

05:07:03          Starting Dynamic System Tuning Daemon...

05:07:03 [^[[32m  OK  ^[[0m] Reached target Network is Online.

05:07:03          Starting System Logging Service...

05:07:03          Starting Notify NFS peers of a restart...

05:07:03 [^[[32m  OK  ^[[0m] Started System Logging Service.

05:07:03 [^[[32m  OK  ^[[0m] Started Logout off all iSCSI sessions on shutdown.

05:07:03 [^[[32m  OK  ^[[0m] Started Enable periodic update of entitlement certificates..

05:07:03 [^[[32m  OK  ^[[0m] Reached target Remote File Systems (Pre).

05:07:03 [^[[32m  OK  ^[[0m] Reached target Remote File Systems.

05:07:03          Starting LSB: Starts the Spacewalk Daemon...

05:07:03          Starting Permit User Sessions...

05:07:03          Starting Crash recovery kernel arming...

05:07:03          Starting Availability of block devices...

05:07:03 [^[[32m  OK  ^[[0m] Started Permit User Sessions.

05:07:03 [^[[32m  OK  ^[[0m] Started Availability of block devices.

05:07:03 [^[[32m  OK  ^[[0m] Started Job spooling tools.

05:07:03          Starting Job spooling tools...

05:07:03          Starting Terminate Plymouth Boot Screen...

05:07:03 [^[[32m  OK  ^[[0m] Started Command Scheduler.

05:07:03          Starting Command Scheduler...

05:07:03          Starting Wait for Plymouth Boot Screen to Quit...

05:07:03 [^[[32m  OK  ^[[0m] Started Notify NFS peers of a restart.

05:07:03 [^[[32m  OK  ^[[0m] Started LSB: Starts the Spacewalk Daemon.

05:07:03          Starting (null)...

05:07:03 [^[[1;31mFAILED^[[0m] Failed to start Crash recovery kernel arming.

05:07:03 See 'systemctl status kdump.service' for details.

05:07:04 

05:07:04 Red Hat Enterprise Linux Server 7.5 (Maipo)
05:07:04 Kernel 5.0.0-next-20190306-autotest on an ppc64le
05:07:04 
05:07:04 ltc-zzci-2 login: ****
05:08:22 
****

05:08:22 Password: ****
05:08:29 

05:08:29 Last login: Wed Mar  6 18:21:20 on hvc0
05:08:35 PS1=[pexpect]#
05:08:36 
[****@ltc-zzci-2 ~]# PS1=[pexpect]#
05:08:36 06:38:36 PM INFO  |   Shell prompt changed
05:08:36 
05:08:36 06:38:36 PM INFO  |  Enable kernel ftrace:
05:08:39 sysctl -w kernel.ftrace_dump_on_oops=1
05:08:40 

05:08:45 [pexpect]#sysctl -w kernel.ftrace_dump_on_oops=1
05:08:45 kernel.ftrace_dump_on_oops = 1
05:08:45 [pexpect]#./autotest/client/autotest-local ./autotest/client/tests/kernelorg/kernel-build.py --continue
05:08:49 
./autotest/client/autotest-local ./autotest/client/tests/kernelorg/ker 
nel-build.py --continue
05:08:54 18:38:49 INFO | Writing results to /****/autotest/client/results/default
05:08:54 18:38:50 INFO | 	END GOOD	build	reboot	patch8=b	kernel=5.0.0-next-20190306-autotest	patch9=o	patch0=k	patch1=e	patch2=x	patch3=e	patch4=c	patch5= 	patch6=r	patch7=e	timestamp=1551915530	patch10=o	patch11=t	localtime=Mar 06 18:38:50	
05:08:54 18:38:50 INFO | TEST: running host test
05:08:54 18:38:50 INFO | Test: running sleeptest tests
05:08:54 18:38:50 INFO | sleeptest
05:08:54 18:38:50 INFO | 	START	sleeptest	sleeptest	timestamp=1551915530	localtime=Mar 06 18:38:50	
05:08:54 18:38:51 INFO | 		GOOD	sleeptest	sleeptest	timestamp=1551915531	localtime=Mar 06 18:38:51	completed successfully
05:08:54 18:38:51 INFO | 	END GOOD	sleeptest	sleeptest	timestamp=1551915531	localtime=Mar 06 18:38:51	
05:08:54 18:38:51 INFO | END GOOD	----	----	timestamp=1551915531	localtime=Mar 06 18:38:51	
05:08:54 18:38:51 INFO | Report successfully generated at /****/autotest/client/results/default/job_report.html
05:08:54 [pexpect]#/****/autotest/client/tools/results2junit.py /****/autotest/client/results/default/ > /****/autotest/client/results/default//results.xml
05:08:57 
/****/autotest/client/tools/results2junit.py /****/autotest/client/res 
ults/default/ > /****/autotest/client/results/default//results.xml
05:09:02   ** Warning: The requested file (/****/autotest/client/results/default/kernel_build/debug/kernel_build.DEBUG) does not exist.
05:09:02 [pexpect]#mkdir -p /****/avocado-korg/
05:09:06 
mkdir -p /****/avocado-korg/
05:09:11 [pexpect]#rm -rf /****/avocado-korg/*
05:09:15 
rm -rf /****/avocado-korg/*
05:09:20 [pexpect]#cd avocado-fvt-wrapper
05:09:24 
cd avocado-fvt-wrapper
05:09:29 [pexpect]#yes | cp -rf /boot/config-autotest /boot/config-$(uname -r)
05:09:33 
yes | cp -rf /boot/config-autotest /boot/config-$(uname -r)
05:09:38 [pexpect]#mkdir -p /****/avocado-korg/korg_pvm
05:09:41 
mkdir -p /****/avocado-korg/korg_pvm
05:09:46 [pexpect]#python avocado-setup.py --run-suite host_korg_pvm --output-dir /****/avocado-korg/korg_pvm --no-deps-check
05:09:50 
python avocado-setup.py --run-suite host_korg_pvm --output-dir /****/a 
vocado-korg/korg_pvm --no-deps-check
05:09:55 18:39:50 INFO    : Check for environment
05:09:55 18:39:50 INFO    : Creating temporary mux dir
05:09:55 18:39:54 WARNING : Avocado vt plugin not installed
05:09:55 18:39:54 INFO    : Avocado vt plugin needs to installed
05:09:55 18:39:55 WARNING : Avocado vt-list plugin not installed
05:09:55 18:39:55 INFO    : Avocado vt-list plugin needs to installed
05:09:55 18:39:55 WARNING : Avocado vt-bootstrap plugin not installed
05:09:55 18:39:55 INFO    : Avocado vt-bootstrap plugin needs to installed
05:09:55 18:39:55 INFO    : Creating Avocado Config
05:09:55 18:39:55 INFO    : Uninstalling avocado and autotest from environment
05:09:58 18:39:58 INFO    : Bootstrapping
05:09:58 18:39:58 INFO    : Updating the repo: avocado in /****/avocado-fvt-wrapper/avocado
05:09:58 18:39:58 INFO    : Installing repo: /****/avocado-fvt-wrapper/avocado
05:10:00 18:40:00 INFO    : Updating the repo: avocado-vt in /****/avocado-fvt-wrapper/avocado-vt
05:10:00 18:40:00 INFO    : Installing repo: /****/avocado-fvt-wrapper/avocado-vt
05:10:08 18:40:08 INFO    : Bootstrapping vt libvirt
05:10:11 18:40:11 INFO    : Bootstrapping vt qemu
05:10:12 18:40:12 INFO    : creating test repo dir /****/avocado-fvt-wrapper/tests
05:10:12 18:40:12 INFO    : Updating the repo: avocado-misc-tests in /****/avocado-fvt-wrapper/tests/avocado-misc-tests
05:10:14 18:40:14 WARNING : Avocado varianter_yaml_to_mux plugin not installed
05:10:14 18:40:14 INFO    : Installing optional plugin: varianter_yaml_to_mux
05:10:21 18:40:21 INFO    : 
05:10:21 18:40:21 INFO    : Running Host Tests Suite korg_pvm_cpustress
05:10:21 18:40:21 INFO    : Running: /bin/avocado run avocado-misc-tests/cpu/cpustress.py --force-job-id 6a4bdec619023bae6d056de93bdc61a37dab9ed5  --job-results-dir /****/avocado-korg/korg_pvm/results
05:10:22 JOB ID     : 6a4bdec619023bae6d056de93bdc61a37dab9ed5
05:10:22 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.40-6a4bdec/job.log
05:10:22  (1/1) avocado-misc-tests/cpu/cpustress.py:cpustresstest.test:  [  588.553418] process 6383 (sh) no longer affine to cpu0
05:16:24 [  589.033416] process 6389 (sh) no longer affine to cpu1
05:16:25 [  589.763394] process 6395 (sh) no longer affine to cpu2
05:16:26 [  590.553430] process 6401 (sh) no longer affine to cpu3
05:16:26 [  591.233445] process 6407 (sh) no longer affine to cpu4
05:16:27 [  591.823487] process 6413 (sh) no longer affine to cpu5
05:16:28 [  592.613486] process 6419 (sh) no longer affine to cpu6
05:16:28 [  593.353537] process 6425 (sh) no longer affine to cpu7
05:16:29 [  594.083745] process 6431 (sh) no longer affine to cpu8
05:16:30 [  594.743762] process 6437 (sh) no longer affine to cpu9
05:16:31 [  595.423768] process 6443 (sh) no longer affine to cpu10
05:16:31 [  596.093802] process 6449 (sh) no longer affine to cpu11
05:16:32 [  596.813828] process 6455 (sh) no longer affine to cpu12
05:16:33 [  597.493860] process 6461 (sh) no longer affine to cpu13
05:16:34 [  598.513869] process 6467 (sh) no longer affine to cpu14
05:16:34 [  599.353918] process 6473 (sh) no longer affine to cpu15
05:16:35 [  600.094254] process 6479 (sh) no longer affine to cpu16
05:16:36 [  600.774217] process 6485 (sh) no longer affine to cpu17
05:16:37 [  601.484205] process 6491 (sh) no longer affine to cpu18
05:16:37 [  602.024241] process 6497 (sh) no longer affine to cpu19
05:16:38 [  602.814234] process 6503 (sh) no longer affine to cpu20
05:16:38 [  603.344255] process 6509 (sh) no longer affine to cpu21
05:16:39 [  603.934240] process 6515 (sh) no longer affine to cpu22
05:16:40 [  604.734298] process 6521 (sh) no longer affine to cpu23
05:16:40 [  605.294495] process 6527 (sh) no longer affine to cpu24
05:16:41 [  605.764509] process 6533 (sh) no longer affine to cpu25
05:16:41 [  606.284505] process 6539 (sh) no longer affine to cpu26
05:16:42 [  606.744548] process 6545 (sh) no longer affine to cpu27
05:16:42 [  607.284530] process 6551 (sh) no longer affine to cpu28
05:16:43 [  607.584541] process 6557 (sh) no longer affine to cpu29
05:16:43 [  607.974505] process 6563 (sh) no longer affine to cpu30
05:17:35 [  660.259248] cpu 24 (hwid 24) Ready to die...
05:17:35 [  660.408117] cpu 25 (hwid 25) Ready to die...
05:17:36 [  660.507990] cpu 26 (hwid 26) Ready to die...
05:17:36 [  660.608033] cpu 27 (hwid 27) Ready to die...
05:17:36 [  660.717963] cpu 28 (hwid 28) Ready to die...
05:17:36 [  660.797986] cpu 29 (hwid 29) Ready to die...
05:17:36 [  660.833700] cpu 30 (hwid 30) Ready to die...
05:17:36 [  660.898053] cpu 31 (hwid 31) Ready to die...
05:17:38 [  662.478178] cpu 24 (hwid 24) Ready to die...
05:17:38 [  662.558188] cpu 25 (hwid 25) Ready to die...
05:17:38 [  662.698174] cpu 26 (hwid 26) Ready to die...
05:17:38 [  662.818180] cpu 27 (hwid 27) Ready to die...
05:17:38 [  662.968147] cpu 28 (hwid 28) Ready to die...
05:17:38 [  663.088124] cpu 29 (hwid 29) Ready to die...
05:17:38 [  663.168107] cpu 30 (hwid 30) Ready to die...
05:17:38 [  663.248110] cpu 31 (hwid 31) Ready to die...
05:17:40 [  665.038326] cpu 24 (hwid 24) Ready to die...
05:17:40 [  665.148340] cpu 25 (hwid 25) Ready to die...
05:17:40 [  665.278310] cpu 26 (hwid 26) Ready to die...
05:17:40 [  665.388343] cpu 27 (hwid 27) Ready to die...
05:17:41 [  665.498322] cpu 28 (hwid 28) Ready to die...
05:17:41 [  665.598299] cpu 29 (hwid 29) Ready to die...
05:17:41 [  665.738268] cpu 30 (hwid 30) Ready to die...
05:17:41 [  665.818260] cpu 31 (hwid 31) Ready to die...
05:17:42 [  667.378493] cpu 24 (hwid 24) Ready to die...
05:17:43 [  667.498528] cpu 25 (hwid 25) Ready to die...
05:17:43 [  667.598509] cpu 26 (hwid 26) Ready to die...
05:17:43 [  667.718510] cpu 27 (hwid 27) Ready to die...
05:17:43 [  667.808443] cpu 28 (hwid 28) Ready to die...
05:17:43 [  667.918481] cpu 29 (hwid 29) Ready to die...
05:17:43 [  668.038438] cpu 30 (hwid 30) Ready to die...
05:17:43 [  668.138445] cpu 31 (hwid 31) Ready to die...
05:17:45 [  669.728623] cpu 24 (hwid 24) Ready to die...
05:17:45 [  669.848670] cpu 25 (hwid 25) Ready to die...
05:17:45 [  669.958655] cpu 26 (hwid 26) Ready to die...
05:17:45 [  670.038626] cpu 27 (hwid 27) Ready to die...
05:17:45 [  670.138614] cpu 28 (hwid 28) Ready to die...
05:17:45 [  670.238598] cpu 29 (hwid 29) Ready to die...
05:17:45 [  670.318563] cpu 30 (hwid 30) Ready to die...
05:17:45 [  670.428578] cpu 31 (hwid 31) Ready to die...
05:17:47 [  672.038764] cpu 24 (hwid 24) Ready to die...
05:17:47 [  672.138824] cpu 25 (hwid 25) Ready to die...
05:17:47 [  672.298803] cpu 26 (hwid 26) Ready to die...
05:17:47 [  672.408835] cpu 27 (hwid 27) Ready to die...
05:17:48 [  672.518774] cpu 28 (hwid 28) Ready to die...
05:17:48 [  672.668794] cpu 29 (hwid 29) Ready to die...
05:17:48 [  672.758728] cpu 30 (hwid 30) Ready to die...
05:17:48 [  672.838737] cpu 31 (hwid 31) Ready to die...
05:17:49 [  674.358925] cpu 24 (hwid 24) Ready to die...
05:17:50 [  674.438959] cpu 25 (hwid 25) Ready to die...
05:17:50 [  674.528931] cpu 26 (hwid 26) Ready to die...
05:17:50 [  674.608920] cpu 27 (hwid 27) Ready to die...
05:17:50 [  674.738903] cpu 28 (hwid 28) Ready to die...
05:17:50 [  674.818880] cpu 29 (hwid 29) Ready to die...
05:17:50 [  674.898866] cpu 30 (hwid 30) Ready to die...
05:17:50 [  674.988869] cpu 31 (hwid 31) Ready to die...
05:17:52 [  676.689086] cpu 24 (hwid 24) Ready to die...
05:17:52 [  676.769100] cpu 25 (hwid 25) Ready to die...
05:17:52 [  676.859092] cpu 26 (hwid 26) Ready to die...
05:17:52 [  676.959107] cpu 27 (hwid 27) Ready to die...
05:17:52 [  677.039054] cpu 28 (hwid 28) Ready to die...
05:17:52 [  677.139048] cpu 29 (hwid 29) Ready to die...
05:17:52 [  677.219013] cpu 30 (hwid 30) Ready to die...
05:17:52 [  677.309014] cpu 31 (hwid 31) Ready to die...
05:17:54 [  678.869251] cpu 24 (hwid 24) Ready to die...
05:17:54 [  678.959274] cpu 25 (hwid 25) Ready to die...
05:17:54 [  679.059256] cpu 26 (hwid 26) Ready to die...
05:17:54 [  679.159256] cpu 27 (hwid 27) Ready to die...
05:17:54 [  679.289208] cpu 28 (hwid 28) Ready to die...
05:17:54 [  679.389182] cpu 29 (hwid 29) Ready to die...
05:17:55 [  679.479170] cpu 30 (hwid 30) Ready to die...
05:17:55 [  679.579186] cpu 31 (hwid 31) Ready to die...
05:17:56 [  681.419420] cpu 24 (hwid 24) Ready to die...
05:17:57 [  681.539440] cpu 25 (hwid 25) Ready to die...
05:17:57 [  681.639422] cpu 26 (hwid 26) Ready to die...
05:17:57 [  681.759447] cpu 27 (hwid 27) Ready to die...
05:17:57 [  681.859377] cpu 28 (hwid 28) Ready to die...
05:17:57 [  681.969381] cpu 29 (hwid 29) Ready to die...
05:17:57 [  682.049340] cpu 30 (hwid 30) Ready to die...
05:17:57 [  682.159364] cpu 31 (hwid 31) Ready to die...
05:18:06 PASS (463.43 s)
05:18:06 RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
05:18:06 JOB TIME   : 463.83 s
05:18:06 JOB HTML   : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.40-6a4bdec/results.html
05:18:06 18:48:06 INFO    : 
05:18:06 18:48:06 INFO    : 
05:18:06 18:48:06 INFO    : Running Host Tests Suite korg_pvm_ebizzy
05:18:06 18:48:06 INFO    : Running: /bin/avocado run avocado-misc-tests/cpu/ebizzy.py --force-job-id 5d8da7a094cfe62d49ada09a14f0f57147b5b7ee  --job-results-dir /****/avocado-korg/korg_pvm/results
05:18:07 JOB ID     : 5d8da7a094cfe62d49ada09a14f0f57147b5b7ee
05:18:07 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.48-5d8da7a/job.log
05:18:07  (1/1) avocado-misc-tests/cpu/ebizzy.py:Ebizzy.test:  PASS (101.60 s)
05:19:49 RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
05:19:49 JOB TIME   : 102.00 s
05:19:49 JOB HTML   : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.48-5d8da7a/results.html
05:19:49 18:49:49 INFO    : 
05:19:49 18:49:49 INFO    : 
05:19:49 18:49:49 INFO    : Running Host Tests Suite korg_pvm_hugepage_sanity
05:19:49 18:49:49 INFO    : Running: /bin/avocado run avocado-misc-tests/memory/hugepage_sanity.py --force-job-id bdefa024a31f027416b03df931fcdd9fb427aa93  --job-results-dir /****/avocado-korg/korg_pvm/results
05:19:49 JOB ID     : bdefa024a31f027416b03df931fcdd9fb427aa93
05:19:49 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.49-bdefa02/job.log
05:19:50  (1/1) avocado-misc-tests/memory/hugepage_sanity.py:HugepageSanity.test:  PASS (10.49 s)
05:20:00 RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
05:20:00 JOB TIME   : 10.87 s
05:20:01 JOB HTML   : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.49-bdefa02/results.html
05:20:01 18:50:01 INFO    : 
05:20:01 18:50:01 INFO    : 
05:20:01 18:50:01 INFO    : Running Host Tests Suite korg_pvm_libhugetlbfs
05:20:01 18:50:01 INFO    : Running: /bin/avocado run avocado-misc-tests/memory/libhugetlbfs.py --force-job-id b969b09b2e130c5ea400729172d6598be49df4ef  --job-results-dir /****/avocado-korg/korg_pvm/results
05:20:01 JOB ID     : b969b09b2e130c5ea400729172d6598be49df4ef
05:20:01 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.50-b969b09/job.log
05:20:01  (1/1) avocado-misc-tests/memory/libhugetlbfs.py:libhugetlbfs.test:  [  812.464653] stack_grow_into[8964]: segfault (11) at 7efff83ab7d0 nip 10001764 lr 1000173c code 1 in stack_grow_into_huge[10000000+10000]
05:20:08 [  812.464685] stack_grow_into[8964]: code: f93f0028 4bfff949 e8410018 3d40efff 39000001 614afff0 48000014 60000000 
05:20:08 [  812.464693] stack_grow_into[8964]: code: 60000000 60000000 60420000 e9210000 <7d21516a> 39210020 91010020 7fa9f040 
05:20:08 [  812.464746] Process 8964(stack_grow_into) has RLIMIT_CORE set to 1
05:20:08 [  812.464750] Aborting core
05:20:08 [  813.050257] linkhuge_rw[9026]: segfault (11) at 100129c8 nip 100016b0 lr 100011b8 code 2 in linkhuge_rw[10000000+20000]
05:20:08 [  813.050281] linkhuge_rw[9026]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.050289] linkhuge_rw[9026]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:20:08 [  813.130881] linkhuge_rw[9028]: segfault (11) at 100029c8 nip 100016b0 lr 100011b8 code 2 in linkhuge_rw[10000000+20000]
05:20:08 [  813.130896] linkhuge_rw[9028]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.130904] linkhuge_rw[9028]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:20:08 [  813.150077] linkhuge_rw[9031]: segfault (11) at 100016a0 nip 100016b0 lr 100016a0 code 2 in linkhuge_rw[10000000+20000]
05:20:08 [  813.150089] linkhuge_rw[9031]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.150097] linkhuge_rw[9031]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:20:08 [  813.169255] linkhuge_rw[9034]: segfault (11) at 100016a0 nip 100016b0 lr 100016a0 code 2 in linkhuge_rw[10000000+20000]
05:20:08 [  813.169267] linkhuge_rw[9034]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.169274] linkhuge_rw[9034]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:20:08 [  813.194897] linkhuge_rw[9042]: segfault (11) at 100129c8 nip 100016b0 lr 100011b8 code 2 in libhugetlbfs.tmp.dDREut (deleted)[10000000+1000000]
05:20:08 [  813.194911] linkhuge_rw[9042]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.194919] linkhuge_rw[9042]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:20:08 [  813.214277] linkhuge_rw[9045]: segfault (11) at 100029c8 nip 100016b0 lr 100011b8 code 2 in libhugetlbfs.tmp.dDREut (deleted)[10000000+1000000]
05:20:08 [  813.214293] linkhuge_rw[9045]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.214301] linkhuge_rw[9045]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:20:08 [  813.233868] linkhuge_rw[9047]: segfault (11) at 100016a0 nip 100016b0 lr 100016a0 code 2 in libhugetlbfs.tmp.dDREut (deleted)[10000000+1000000]
05:20:08 [  813.233884] linkhuge_rw[9047]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.233892] linkhuge_rw[9047]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:20:08 [  813.252819] linkhuge_rw[9049]: segfault (11) at 100016a0 nip 100016b0 lr 100016a0 code 2 in libhugetlbfs.tmp.dDREut (deleted)[10000000+1000000]
05:20:08 [  813.252832] linkhuge_rw[9049]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.252840] linkhuge_rw[9049]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:20:08 [  813.285682] linkhuge_rw[9057]: segfault (11) at 100129c8 nip 100016b0 lr 100011b8 code 2 in linkhuge_rw[10000000+20000]
05:20:08 [  813.285703] linkhuge_rw[9057]: code: 81350018 2f890000 e9350008 419e001c 7d2903a6 7d2c4b78 f8410018 4e800421 
05:20:08 [  813.285711] linkhuge_rw[9057]: code: e8410018 7c691b78 39400000 38600000 <99490000> 4bfff7fd e8410018 480005a5 
05:21:54 PASS (112.27 s)
05:21:54 RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
05:21:54 JOB TIME   : 112.67 s
05:21:54 JOB HTML   : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.50-b969b09/results.html
05:21:54 18:51:54 INFO    : 
05:21:54 18:51:54 INFO    : 
05:21:54 18:51:54 INFO    : Running Host Tests Suite korg_pvm_perf_genericevents
05:21:54 18:51:54 INFO    : Running: /bin/avocado run avocado-misc-tests/perf/perf_genericevents.py --force-job-id fc11066cff326d89599e8c6d9605cd92bde6d152  --job-results-dir /****/avocado-korg/korg_pvm/results
05:21:55 JOB ID     : fc11066cff326d89599e8c6d9605cd92bde6d152
05:21:55 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.51-fc11066/job.log
05:21:55  (1/1) avocado-misc-tests/perf/perf_genericevents.py:test_generic_events.test:  FAIL: Failed to verify generic PMU event codes (0.09 s)
05:21:55 RESULTS    : PASS 0 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
05:21:55 JOB TIME   : 0.47 s
05:21:55 JOB HTML   : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.51-fc11066/results.html
05:21:55 18:51:55 INFO    : 
05:21:55 18:51:55 INFO    : 
05:21:55 18:51:55 INFO    : Running Host Tests Suite korg_pvm_perfmon
05:21:55 18:51:55 INFO    : Running: /bin/avocado run avocado-misc-tests/perf/perfmon.py --force-job-id ed945d164513823cb303d045faeb2af1f2c76c13  --job-results-dir /****/avocado-korg/korg_pvm/results
05:21:56 JOB ID     : ed945d164513823cb303d045faeb2af1f2c76c13
05:21:56 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.51-ed945d1/job.log
05:21:56  (1/1) avocado-misc-tests/perf/perfmon.py:Perfmon.test:  PASS (5.92 s)
05:22:02 RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
05:22:02 JOB TIME   : 6.31 s
05:22:02 JOB HTML   : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.51-ed945d1/results.html
05:22:03 18:52:03 INFO    : 
05:22:03 18:52:03 INFO    : 
05:22:03 18:52:03 INFO    : Running Host Tests Suite korg_pvm_stress-ng_stress-ng-network
05:22:03 18:52:03 INFO    : Running: /bin/avocado run avocado-misc-tests/generic/stress-ng.py -m /****/avocado-fvt-wrapper/tests/avocado-misc-tests/generic/stress-ng.py.data/stress-ng-network.yaml --force-job-id 61a968181e1afa3ebad75a4ba145fe155101f9bf  --job-results-dir /****/avocado-korg/korg_pvm/results
05:22:03 JOB ID     : 61a968181e1afa3ebad75a4ba145fe155101f9bf
05:22:03 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.52-61a9681/job.log
05:22:03  (1/1) avocado-misc-tests/generic/stress-ng.py:Stressng.test;exclude-stressors-workers-a67d:  [  947.742277] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:22:23 [  947.742486] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:22:23 [  947.742577] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:22:23 [  947.742586] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:22:23 [  947.742638] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:22:23 [  947.742762] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:22:23 [  947.742776] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33, throttling...
05:22:23 [  947.743297] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:22:23 [  947.743328] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:33:23 PASS (679.79 s)
05:33:23 RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
05:33:23 JOB TIME   : 680.21 s
05:33:24 JOB HTML   : /****/avocado-korg/korg_pvm/results/job-2019-03-06T18.52-61a9681/results.html
05:33:24 19:03:24 INFO    : 
05:33:24 19:03:24 INFO    : 
05:33:24 19:03:24 INFO    : Running Host Tests Suite korg_pvm_stress-ng_stress-ng-interrupt
05:33:24 19:03:24 INFO    : Running: /bin/avocado run avocado-misc-tests/generic/stress-ng.py -m /****/avocado-fvt-wrapper/tests/avocado-misc-tests/generic/stress-ng.py.data/stress-ng-interrupt.yaml --force-job-id 8922dbc88c6453e9dc267171544c326f48e7ba14  --job-results-dir /****/avocado-korg/korg_pvm/results
05:33:24 JOB ID     : 8922dbc88c6453e9dc267171544c326f48e7ba14
05:33:24 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T19.03-8922dbc/job.log
05:33:24  (1/1) avocado-misc-tests/generic/stress-ng.py:Stressng.test;exclude-stressors-workers-4d3c:  PASS (1200.30 s)
05:53:25 RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
05:53:25 JOB TIME   : 1200.71 s
05:53:25 JOB HTML   : /****/avocado-korg/korg_pvm/results/job-2019-03-06T19.03-8922dbc/results.html
05:53:25 19:23:25 INFO    : 
05:53:25 19:23:25 INFO    : 
05:53:25 19:23:25 INFO    : Running Host Tests Suite korg_pvm_stress
05:53:25 19:23:25 INFO    : Running: /bin/avocado run avocado-misc-tests/perf/stress.py --force-job-id 3351910945caf1b449f3565b78fd3b1401fb5551  --job-results-dir /****/avocado-korg/korg_pvm/results
05:53:26 JOB ID     : 3351910945caf1b449f3565b78fd3b1401fb5551
05:53:26 JOB LOG    : /****/avocado-korg/korg_pvm/results/job-2019-03-06T19.23-3351910/job.log
05:53:26  (1/1) avocado-misc-tests/perf/stress.py:Stress.test:  [  947.743425] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module net-pf-2-proto-33-type-6, throttling...
05:54:28 [ 2873.201865] ------------[ cut here ]------------
05:54:28 [ 2873.201907] kernel BUG at mm/page_alloc.c:3124!
05:54:28 [ 2873.201918] Oops: Exception in kernel mode, sig: 5 [#1]
05:54:28 [ 2873.201928] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
05:54:28 [ 2873.201950] Dumping ftrace buffer:
05:54:28 [ 2873.201997]    (ftrace buffer empty)
05:54:28 [ 2873.202005] Modules linked in: unix_diag ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat ip6table_mangle ip6table_raw iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c iptable_mangle iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc sg uio_pdrv_genirq uio pseries_rng ip_tables ext4 mbcache jbd2 sr_mod cdrom sd_mod ibmvscsi scsi_transport_srp ibmveth dm_mirror dm_region_hash dm_log dm_mod
05:54:28 [ 2873.202108] CPU: 17 PID: 180 Comm: kcompactd1 Not tainted 5.0.0-next-20190306-autotest #1
05:54:28 [ 2873.202119] NIP:  c000000000327320 LR: c0000000002f1c10 CTR: c0000000002f1840
05:54:28 [ 2873.202131] REGS: c000000458eeb640 TRAP: 0700   Not tainted  (5.0.0-next-20190306-autotest)
05:54:28 [ 2873.202140] MSR:  8000000102029033 <SF,VEC,EE,ME,IR,DR,RI,LE,TM[E]>  CR: 24882088  XER: 20040000
05:54:28 [ 2873.202161] CFAR: c0000000002f1c0c IRQMASK: 1 
05:54:28 [ 2873.202161] GPR00: c0000000002f1c10 c000000458eeb8d0 c0000000012b9500 c0000008bff1cb58 
05:54:28 [ 2873.202161] GPR04: 0000000000000005 0000000000000308 c0000008bff1cc98 0000000000000780 
05:54:28 [ 2873.202161] GPR08: c000000001478220 0000000000000001 0000000000000000 0000000000000000 
05:54:28 [ 2873.202161] GPR12: 0000000024884082 c00000001ec54280 000000000006fd50 0000000000069b00 
05:54:28 [ 2873.202161] GPR16: 000000000007ad00 0000000000000035 ff40000022ffc700 0000000000000040 
05:54:28 [ 2873.202161] GPR20: c0000008bff1cc88 c0000008bff1cb58 0000000000000000 0000000000000000 
05:54:28 [ 2873.202161] GPR24: 0000000000000001 0000000000000000 0000000000000000 0000000000000005 
05:54:28 [ 2873.202161] GPR28: c0000008bff1c980 0000000000000000 0000000000000001 c0000008bff1cb58 
05:54:28 [ 2873.202251] NIP [c000000000327320] __isolate_free_page+0x90/0x2c0
05:54:28 [ 2873.202263] LR [c0000000002f1c10] compaction_alloc+0x3d0/0xae0
05:54:28 [ 2873.202271] Call Trace:
05:54:28 [ 2873.202280] [c000000458eeb8d0] [f0000000011d9800] 0xf0000000011d9800 (unreliable)
05:54:28 [ 2873.202293] [c000000458eeb940] [c0000000002f1c10] compaction_alloc+0x3d0/0xae0
05:54:28 [ 2873.202305] [c000000458eeba20] [c00000000036cd5c] unmap_and_move+0x7c/0x9a0
05:54:28 [ 2873.202315] [c000000458eeba90] [c00000000036ef14] migrate_pages+0x224/0x870
05:54:28 [ 2873.202326] [c000000458eebb60] [c0000000002f3c9c] compact_zone+0x3ac/0x1020
05:54:28 [ 2873.202336] [c000000458eebc60] [c0000000002f4de8] kcompactd_do_work+0x188/0x350
05:54:28 [ 2873.202347] [c000000458eebd40] [c0000000002f5068] kcompactd+0xb8/0x2a0
05:54:28 [ 2873.202359] [c000000458eebdb0] [c0000000001429d0] kthread+0x160/0x1a0
05:54:28 [ 2873.202371] [c000000458eebe20] [c00000000000b64c] ret_from_kernel_thread+0x5c/0x70
05:54:28 [ 2873.202380] Instruction dump:
05:54:28 [ 2873.202388] 3d02001c 3908ed20 78e71f24 794a57a0 6d29f000 1f4a0680 7d290034 7f28382a 
05:54:28 [ 2873.202401] 5529d97e 79290020 7fb9d214 69290001 <0b090000> 3fc2001b 3bde92b8 38a00002 
05:54:28 [ 2873.202418] ---[ end trace 65562a20cc8f8bc8 ]---
05:54:28 [ 2873.203709] 
05:54:29 [ 2874.203737] Kernel panic - not syncing: Fatal exception
05:54:29 [ 2874.211867] Dumping ftrace buffer:
05:54:29 [ 2874.211883]    (ftrace buffer empty)
05:54:29 [ 2874.213931] WARNING: CPU: 17 PID: 180 at drivers/tty/vt/vt.c:4227 do_unblank_screen+0x1dc/0x250
05:54:29 [ 2874.213939] Modules linked in: unix_diag ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat ip6table_mangle ip6table_raw iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c iptable_mangle iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc sg uio_pdrv_genirq uio pseries_rng ip_tables ext4 mbcache jbd2 sr_mod cdrom sd_mod ibmvscsi scsi_transport_srp ibmveth dm_mirror dm_region_hash dm_log dm_mod
05:54:29 [ 2874.214002] CPU: 17 PID: 180 Comm: kcompactd1 Tainted: G      D           5.0.0-next-20190306-autotest #1
05:54:29 [ 2874.214011] NIP:  c00000000062085c LR: c000000000620844 CTR: c000000000a20af0
05:54:29 [ 2874.214020] REGS: c000000458eeb130 TRAP: 0700   Tainted: G      D            (5.0.0-next-20190306-autotest)
05:54:29 [ 2874.214028] MSR:  8000000000021033 <SF,ME,IR,DR,RI,LE>  CR: 28882042  XER: 20040009
05:54:29 [ 2874.214039] CFAR: c000000000191618 IRQMASK: 3 
05:54:29 [ 2874.214039] GPR00: c000000000620844 c000000458eeb3c0 c0000000012b9500 0000000000000000 
05:54:29 [ 2874.214039] GPR04: 0000000000000003 c0000004515c000e 0000000000001dd7 c000000458eeb300 
05:54:29 [ 2874.214039] GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000001001 
05:54:29 [ 2874.214039] GPR12: 0000000088882048 c00000001ec54280 000000000006fd50 0000000000069b00 
05:54:29 [ 2874.214039] GPR16: 000000000007ad00 0000000000000035 ff40000022ffc700 0000000000000040 
05:54:29 [ 2874.214039] GPR20: c0000008bff1cc88 c0000008bff1cb58 0000000000000000 0000000000000000 
05:54:29 [ 2874.214039] GPR24: 0000000000000001 0000000000000000 c000000001199fa0 c000000001485760 
05:54:29 [ 2874.214039] GPR28: c000000001485738 0000000000000000 c000000000c33550 c000000001594178 
05:54:29 [ 2874.214108] NIP [c00000000062085c] do_unblank_screen+0x1dc/0x250
05:54:29 [ 2874.214115] LR [c000000000620844] do_unblank_screen+0x1c4/0x250
05:54:29 [ 2874.214122] Call Trace:
05:54:29 [ 2874.214126] [c000000458eeb3c0] [c000000000620874] do_unblank_screen+0x1f4/0x250 (unreliable)
05:54:29 [ 2874.214138] [c000000458eeb440] [c000000000112754] panic+0x1dc/0x3b8
05:54:29 [ 2874.214146] [c000000458eeb4d0] [c0000000000288c4] oops_end+0x1e4/0x1f0
05:54:29 [ 2874.214155] [c000000458eeb550] [c00000000002b0cc] program_check_exception+0x2ac/0x3b0
05:54:29 [ 2874.214164] [c000000458eeb5d0] [c000000000008e00] program_check_common+0x130/0x140
05:54:29 [ 2874.214176] --- interrupt: 700 at __isolate_free_page+0x90/0x2c0
05:54:29 [ 2874.214176]     LR = compaction_alloc+0x3d0/0xae0
05:54:29 [ 2874.214187] [c000000458eeb8d0] [f0000000011d9800] 0xf0000000011d9800 (unreliable)
05:54:29 [ 2874.214196] [c000000458eeb940] [c0000000002f1c10] compaction_alloc+0x3d0/0xae0
05:54:29 [ 2874.214205] [c000000458eeba20] [c00000000036cd5c] unmap_and_move+0x7c/0x9a0
05:54:29 [ 2874.214213] [c000000458eeba90] [c00000000036ef14] migrate_pages+0x224/0x870
05:54:29 [ 2874.214221] [c000000458eebb60] [c0000000002f3c9c] compact_zone+0x3ac/0x1020
05:54:29 [ 2874.214230] [c000000458eebc60] [c0000000002f4de8] kcompactd_do_work+0x188/0x350
05:54:29 [ 2874.214239] [c000000458eebd40] [c0000000002f5068] kcompactd+0xb8/0x2a0
05:54:29 [ 2874.214247] [c000000458eebdb0] [c0000000001429d0] kthread+0x160/0x1a0
05:54:29 [ 2874.214256] [c000000458eebe20] [c00000000000b64c] ret_from_kernel_thread+0x5c/0x70
05:54:29 [ 2874.214263] Instruction dump:
05:54:29 [ 2874.214269] 7c0803a6 4e800020 60000000 60000000 60420000 4bb70dc9 60000000 2fa30000 
05:54:29 [ 2874.214280] 409efe88 813f0000 2f890000 409efe7c <0fe00000> 4bfffe74 60000000 60000000 
05:54:29 [ 2874.214291] ---[ end trace 65562a20cc8f8bc9 ]---
05:54:29 [ 2874.214299] Rebooting in 10 seconds..
05:54:42 
05:54:42 
05:54:42 
05:54:42 
05:54:42 

^ permalink raw reply

* [PATCH] powerpc/highmem: change BUG_ON() to WARN_ON()
From: Christophe Leroy @ 2019-03-07  9:47 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel

In arch/powerpc/mm/highmem.c, BUG_ON() is called only when
CONFIG_DEBUG_HIGHMEM is selected, this means the BUG_ON() is
not vital and can be replaced by a a WARN_ON

At the sametime, use IS_ENABLED() instead of #ifdef to clean a bit.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/mm/highmem.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/mm/highmem.c b/arch/powerpc/mm/highmem.c
index 82a0e37557a5..b68c9f20fbdf 100644
--- a/arch/powerpc/mm/highmem.c
+++ b/arch/powerpc/mm/highmem.c
@@ -43,9 +43,7 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot)
 	type = kmap_atomic_idx_push();
 	idx = type + KM_TYPE_NR*smp_processor_id();
 	vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
-#ifdef CONFIG_DEBUG_HIGHMEM
-	BUG_ON(!pte_none(*(kmap_pte-idx)));
-#endif
+	WARN_ON(IS_ENABLED(CONFIG_DEBUG_HIGHMEM) && !pte_none(*(kmap_pte - idx)));
 	__set_pte_at(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot), 1);
 	local_flush_tlb_page(NULL, vaddr);
 
@@ -56,7 +54,7 @@ EXPORT_SYMBOL(kmap_atomic_prot);
 void __kunmap_atomic(void *kvaddr)
 {
 	unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
-	int type __maybe_unused;
+	int type;
 
 	if (vaddr < __fix_to_virt(FIX_KMAP_END)) {
 		pagefault_enable();
@@ -66,12 +64,11 @@ void __kunmap_atomic(void *kvaddr)
 
 	type = kmap_atomic_idx();
 
-#ifdef CONFIG_DEBUG_HIGHMEM
-	{
+	if (IS_ENABLED(CONFIG_DEBUG_HIGHMEM)) {
 		unsigned int idx;
 
 		idx = type + KM_TYPE_NR * smp_processor_id();
-		BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx));
+		WARN_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx));
 
 		/*
 		 * force other mappings to Oops if they'll try to access
@@ -80,7 +77,6 @@ void __kunmap_atomic(void *kvaddr)
 		pte_clear(&init_mm, vaddr, kmap_pte-idx);
 		local_flush_tlb_page(NULL, vaddr);
 	}
-#endif
 
 	kmap_atomic_idx_pop();
 	pagefault_enable();
-- 
2.13.3


^ permalink raw reply related

* Re: [PATCH v2 5/7] counter: add FlexTimer Module Quadrature decoder counter driver
From: William Breathitt Gray @ 2019-03-07 11:32 UTC (permalink / raw)
  To: Patrick Havelange
  Cc: Mark Rutland, devicetree, Jonathan Cameron, linux-pwm, linux-iio,
	linuxppc-dev, Daniel Lezcano, linux-kernel, Li Yang, Rob Herring,
	Thierry Reding, linux-arm-kernel, Thomas Gleixner, Shawn Guo,
	Esben Haabendal
In-Reply-To: <20190306111208.7454-6-patrick.havelange@essensium.com>

On Wed, Mar 06, 2019 at 12:12:06PM +0100, Patrick Havelange wrote:
> This driver exposes the counter for the quadrature decoder of the
> FlexTimer Module, present in the LS1021A soc.
> 
> Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
> ---
> Changes v2
>  - Rebased on new counter subsystem
>  - Cleaned up included headers
>  - Use devm_ioremap()
>  - Correct order of devm_ and unmanaged resources
> ---
>  drivers/counter/Kconfig       |   9 +
>  drivers/counter/Makefile      |   1 +
>  drivers/counter/ftm-quaddec.c | 356 ++++++++++++++++++++++++++++++++++
>  3 files changed, 366 insertions(+)
>  create mode 100644 drivers/counter/ftm-quaddec.c

Overall, I think you utilized the Generic Counter interface correctly.
So good job on the conversion from your initial patch. :-)

Some minor inline suggestions/comments follow.

> 
> diff --git a/drivers/counter/Kconfig b/drivers/counter/Kconfig
> index 87c491a19c63..233ac305d878 100644
> --- a/drivers/counter/Kconfig
> +++ b/drivers/counter/Kconfig
> @@ -48,4 +48,13 @@ config STM32_LPTIMER_CNT
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called stm32-lptimer-cnt.
>  
> +config FTM_QUADDEC
> +	tristate "Flex Timer Module Quadrature decoder driver"
> +	help
> +	  Select this option to enable the Flex Timer Quadrature decoder
> +	  driver.
> +
> +	  To compile this driver as a module, choose M here: the
> +	  module will be called ftm-quaddec.
> +
>  endif # COUNTER
> diff --git a/drivers/counter/Makefile b/drivers/counter/Makefile
> index 5589976d37f8..0c9e622a6bea 100644
> --- a/drivers/counter/Makefile
> +++ b/drivers/counter/Makefile
> @@ -7,3 +7,4 @@ obj-$(CONFIG_COUNTER) += counter.o
>  obj-$(CONFIG_104_QUAD_8)	+= 104-quad-8.o
>  obj-$(CONFIG_STM32_TIMER_CNT)	+= stm32-timer-cnt.o
>  obj-$(CONFIG_STM32_LPTIMER_CNT)	+= stm32-lptimer-cnt.o
> +obj-$(CONFIG_FTM_QUADDEC)	+= ftm-quaddec.o
> diff --git a/drivers/counter/ftm-quaddec.c b/drivers/counter/ftm-quaddec.c
> new file mode 100644
> index 000000000000..1bc9e075a386
> --- /dev/null
> +++ b/drivers/counter/ftm-quaddec.c
> @@ -0,0 +1,356 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Flex Timer Module Quadrature decoder
> + *
> + * This module implements a driver for decoding the FTM quadrature
> + * of ex. a LS1021A
> + */
> +
> +#include <linux/fsl/ftm.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/of.h>
> +#include <linux/io.h>
> +#include <linux/mutex.h>
> +#include <linux/counter.h>
> +
> +struct ftm_quaddec {
> +	struct counter_device counter;
> +	struct platform_device *pdev;
> +	void __iomem *ftm_base;
> +	bool big_endian;
> +	struct mutex ftm_quaddec_mutex;
> +};
> +
> +static void ftm_read(struct ftm_quaddec *ftm, uint32_t offset, uint32_t *data)
> +{
> +	if (ftm->big_endian)
> +		*data = ioread32be(ftm->ftm_base + offset);
> +	else
> +		*data = ioread32(ftm->ftm_base + offset);
> +}
> +
> +static void ftm_write(struct ftm_quaddec *ftm, uint32_t offset, uint32_t data)
> +{
> +	if (ftm->big_endian)
> +		iowrite32be(data, ftm->ftm_base + offset);
> +	else
> +		iowrite32(data, ftm->ftm_base + offset);
> +}
> +
> +/*
> + * take mutex
> + * call ftm_clear_write_protection
> + * update settings
> + * call ftm_set_write_protection
> + * release mutex
> + */

Jonathan mentioned it before in the previous review, and I think I agree
too, that this comment block is superfluous: the context of this code is
simple enough that the function call order is naturally obvious (i.e.
write protection must be cleared before settings are modified).

The only important thing to mention here is that the mutex must be held
before the write protection state is modified so a comment along the
following lines should suffice:

/* hold mutex before modifying write protection state */

> +static void ftm_clear_write_protection(struct ftm_quaddec *ftm)
> +{
> +	uint32_t flag;
> +
> +	/* First see if it is enabled */
> +	ftm_read(ftm, FTM_FMS, &flag);
> +
> +	if (flag & FTM_FMS_WPEN) {
> +		ftm_read(ftm, FTM_MODE, &flag);
> +		ftm_write(ftm, FTM_MODE, flag | FTM_MODE_WPDIS);
> +	}
> +}
> +
> +static void ftm_set_write_protection(struct ftm_quaddec *ftm)
> +{
> +	ftm_write(ftm, FTM_FMS, FTM_FMS_WPEN);
> +}
> +
> +static void ftm_reset_counter(struct ftm_quaddec *ftm)
> +{
> +	/* Reset hardware counter to CNTIN */
> +	ftm_write(ftm, FTM_CNT, 0x0);
> +}
> +
> +static void ftm_quaddec_init(struct ftm_quaddec *ftm)
> +{
> +	ftm_clear_write_protection(ftm);
> +
> +	/*
> +	 * Do not write in the region from the CNTIN register through the
> +	 * PWMLOAD register when FTMEN = 0.
> +	 */
> +	ftm_write(ftm, FTM_MODE, FTM_MODE_FTMEN);
> +	ftm_write(ftm, FTM_CNTIN, 0x0000);
> +	ftm_write(ftm, FTM_MOD, 0xffff);
> +	ftm_write(ftm, FTM_CNT, 0x0);
> +	ftm_write(ftm, FTM_SC, FTM_SC_PS_1);
> +
> +	/* Select quad mode */
> +	ftm_write(ftm, FTM_QDCTRL, FTM_QDCTRL_QUADEN);
> +
> +	/* Unused features and reset to default section */
> +	ftm_write(ftm, FTM_POL, 0x0);
> +	ftm_write(ftm, FTM_FLTCTRL, 0x0);
> +	ftm_write(ftm, FTM_SYNCONF, 0x0);
> +	ftm_write(ftm, FTM_SYNC, 0xffff);
> +
> +	/* Lock the FTM */
> +	ftm_set_write_protection(ftm);
> +}
> +
> +static void ftm_quaddec_disable(struct ftm_quaddec *ftm)
> +{
> +	ftm_write(ftm, FTM_MODE, 0);
> +}

The ftm_quaddec_disable function is only used for cleanup when the
driver is being removed. Is disabling the FTM counter on removal
actually something we need to do?

While it's true that the register will keep updating, since the driver
is no longer loaded, we don't care about that register value. Once we
take control of the hardware again (by reloading our driver or via a new
one), we reinitialize the counter and set the count value back to 0
anyway -- so whatever value the register had no longer matters.

> +
> +static int ftm_quaddec_get_prescaler(struct counter_device *counter,
> +				     struct counter_count *count,
> +				     size_t *cnt_mode)
> +{
> +	struct ftm_quaddec *ftm = counter->priv;
> +	uint32_t scflags;
> +
> +	ftm_read(ftm, FTM_SC, &scflags);
> +
> +	*cnt_mode = scflags & FTM_SC_PS_MASK;
> +
> +	return 0;
> +}
> +
> +static int ftm_quaddec_set_prescaler(struct counter_device *counter,
> +				     struct counter_count *count,
> +				     size_t cnt_mode)
> +{
> +	struct ftm_quaddec *ftm = counter->priv;
> +
> +	uint32_t scflags;
> +
> +	mutex_lock(&ftm->ftm_quaddec_mutex);
> +
> +	ftm_read(ftm, FTM_SC, &scflags);
> +
> +	scflags &= ~FTM_SC_PS_MASK;
> +	cnt_mode &= FTM_SC_PS_MASK; /*just to be 100% sure*/
> +
> +	scflags |= cnt_mode;
> +
> +	/* Write */
> +	ftm_clear_write_protection(ftm);
> +	ftm_write(ftm, FTM_SC, scflags);
> +	ftm_set_write_protection(ftm);
> +
> +	/* Also resets the counter as it is undefined anyway now */
> +	ftm_reset_counter(ftm);
> +
> +	mutex_unlock(&ftm->ftm_quaddec_mutex);
> +	return 0;
> +}
> +
> +static const char * const ftm_quaddec_prescaler[] = {
> +	"1", "2", "4", "8", "16", "32", "64", "128"
> +};
> +
> +static struct counter_count_enum_ext ftm_quaddec_prescaler_enum = {
> +	.items = ftm_quaddec_prescaler,
> +	.num_items = ARRAY_SIZE(ftm_quaddec_prescaler),
> +	.get = ftm_quaddec_get_prescaler,
> +	.set = ftm_quaddec_set_prescaler
> +};
> +
> +enum ftm_quaddec_synapse_action {
> +	FTM_QUADDEC_SYNAPSE_ACTION_BOTH_EDGES,
> +};
> +
> +static enum counter_synapse_action ftm_quaddec_synapse_actions[] = {
> +	[FTM_QUADDEC_SYNAPSE_ACTION_BOTH_EDGES] =
> +	COUNTER_SYNAPSE_ACTION_BOTH_EDGES
> +};
> +
> +enum ftm_quaddec_count_function {
> +	FTM_QUADDEC_COUNT_ENCODER_MODE_1,
> +};

The FlexTimer Module supports more than just a quadrature counter mode
doesn't it?

We should keep this initial patch simple since we are still introducing
the Counter subsystem, but it'll be nice to add support in the future
for the other counter modes such as single-edge capture.

> +
> +static const enum counter_count_function ftm_quaddec_count_functions[] = {
> +	[FTM_QUADDEC_COUNT_ENCODER_MODE_1] =
> +	COUNTER_COUNT_FUNCTION_QUADRATURE_X4
> +};
> +
> +static int ftm_quaddec_count_read(struct counter_device *counter,
> +				  struct counter_count *count,
> +				  struct counter_count_read_value *val)
> +{
> +	struct ftm_quaddec *const ftm = counter->priv;
> +	uint32_t cntval;
> +
> +	ftm_read(ftm, FTM_CNT, &cntval);
> +
> +	counter_count_read_value_set(val, COUNTER_COUNT_POSITION, &cntval);
> +
> +	return 0;
> +}
> +
> +static int ftm_quaddec_count_write(struct counter_device *counter,
> +				   struct counter_count *count,
> +				   struct counter_count_write_value *val)
> +{
> +	struct ftm_quaddec *const ftm = counter->priv;
> +	u32 cnt;
> +	int err;
> +
> +	err = counter_count_write_value_get(&cnt, COUNTER_COUNT_POSITION, val);
> +	if (err)
> +		return err;
> +
> +	if (cnt != 0) {
> +		dev_warn(&ftm->pdev->dev, "Can only accept '0' as new counter value\n");
> +		return -EINVAL;
> +	}
> +
> +	ftm_reset_counter(ftm);
> +
> +	return 0;
> +}
> +
> +static int ftm_quaddec_count_function_get(struct counter_device *counter,
> +					  struct counter_count *count,
> +					  size_t *function)
> +{
> +	*function = FTM_QUADDEC_COUNT_ENCODER_MODE_1;
> +
> +	return 0;
> +}
> +
> +static int ftm_quaddec_action_get(struct counter_device *counter,
> +				  struct counter_count *count,
> +				  struct counter_synapse *synapse,
> +				  size_t *action)
> +{
> +	*action = FTM_QUADDEC_SYNAPSE_ACTION_BOTH_EDGES;
> +
> +	return 0;
> +}
> +
> +static const struct counter_ops ftm_quaddec_cnt_ops = {
> +	.count_read = ftm_quaddec_count_read,
> +	.count_write = ftm_quaddec_count_write,
> +	.function_get = ftm_quaddec_count_function_get,
> +	.action_get = ftm_quaddec_action_get,
> +};
> +
> +static struct counter_signal ftm_quaddec_signals[] = {
> +	{
> +		.id = 0,
> +		.name = "Channel 1 Quadrature A"
> +	},
> +	{
> +		.id = 1,
> +		.name = "Channel 1 Quadrature B"
> +	}
> +};

If possible, these names should match the FTM datasheet naming
convention. The reason is to make it easier for users to match the
input signals described in the datasheet with the Signal data provided
by the Generic Counter interface.

I think the FTM datasheet describes these signals as "Phase A" and
"Phase B", so perhaps "Channel 1 Phase A" and "Channel 1 Phase B" may be
more appropriate names in this case.

> +
> +static struct counter_synapse ftm_quaddec_count_synapses[] = {
> +	{
> +		.actions_list = ftm_quaddec_synapse_actions,
> +		.num_actions = ARRAY_SIZE(ftm_quaddec_synapse_actions),
> +		.signal = &ftm_quaddec_signals[0]
> +	},
> +	{
> +		.actions_list = ftm_quaddec_synapse_actions,
> +		.num_actions = ARRAY_SIZE(ftm_quaddec_synapse_actions),
> +		.signal = &ftm_quaddec_signals[1]
> +	}
> +};
> +
> +static const struct counter_count_ext ftm_quaddec_count_ext[] = {
> +	COUNTER_COUNT_ENUM("prescaler", &ftm_quaddec_prescaler_enum),
> +	COUNTER_COUNT_ENUM_AVAILABLE("prescaler", &ftm_quaddec_prescaler_enum),
> +};
> +
> +static struct counter_count ftm_quaddec_counts = {
> +	.id = 0,
> +	.name = "Channel 1 Count",
> +	.functions_list = ftm_quaddec_count_functions,
> +	.num_functions = ARRAY_SIZE(ftm_quaddec_count_functions),
> +	.synapses = ftm_quaddec_count_synapses,
> +	.num_synapses = ARRAY_SIZE(ftm_quaddec_count_synapses),
> +	.ext = ftm_quaddec_count_ext,
> +	.num_ext = ARRAY_SIZE(ftm_quaddec_count_ext)
> +};
> +
> +static int ftm_quaddec_probe(struct platform_device *pdev)
> +{
> +	struct ftm_quaddec *ftm;
> +
> +	struct device_node *node = pdev->dev.of_node;
> +	struct resource *io;
> +	int ret;
> +
> +	ftm = devm_kzalloc(&pdev->dev, sizeof(*ftm), GFP_KERNEL);
> +	if (!ftm)
> +		return -ENOMEM;
> +
> +	platform_set_drvdata(pdev, ftm);
> +
> +	io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	if (!io) {
> +		dev_err(&pdev->dev, "Failed to get memory region\n");
> +		return -ENODEV;
> +	}
> +
> +	ftm->pdev = pdev;
> +	ftm->big_endian = of_property_read_bool(node, "big-endian");
> +	ftm->ftm_base = devm_ioremap(&pdev->dev, io->start, resource_size(io));
> +
> +	if (!ftm->ftm_base) {
> +		dev_err(&pdev->dev, "Failed to map memory region\n");
> +		return -EINVAL;
> +	}
> +	ftm->counter.name = dev_name(&pdev->dev);
> +	ftm->counter.parent = &pdev->dev;
> +	ftm->counter.ops = &ftm_quaddec_cnt_ops;
> +	ftm->counter.counts = &ftm_quaddec_counts;
> +	ftm->counter.num_counts = 1;
> +	ftm->counter.signals = ftm_quaddec_signals;
> +	ftm->counter.num_signals = ARRAY_SIZE(ftm_quaddec_signals);
> +	ftm->counter.priv = ftm;
> +
> +	mutex_init(&ftm->ftm_quaddec_mutex);
> +
> +	ftm_quaddec_init(ftm);
> +
> +	ret = counter_register(&ftm->counter);
> +	if (ret)
> +		ftm_quaddec_disable(ftm);
> +
> +	return ret;
> +}
> +
> +static int ftm_quaddec_remove(struct platform_device *pdev)
> +{
> +	struct ftm_quaddec *ftm = platform_get_drvdata(pdev);
> +
> +	counter_unregister(&ftm->counter);
> +
> +	ftm_quaddec_disable(ftm);
> +
> +	return 0;
> +}

If the ftm_quaddec_disable is not necessary, then we can eliminate the
ftm_quaddec_remove function as well by replacing the counter_register
call with a devm_counter_register call.

William Breathitt Gray

> +
> +static const struct of_device_id ftm_quaddec_match[] = {
> +	{ .compatible = "fsl,ftm-quaddec" },
> +	{},
> +};
> +
> +static struct platform_driver ftm_quaddec_driver = {
> +	.driver = {
> +		.name = "ftm-quaddec",
> +		.owner = THIS_MODULE,
> +		.of_match_table = ftm_quaddec_match,
> +	},
> +	.probe = ftm_quaddec_probe,
> +	.remove = ftm_quaddec_remove,
> +};
> +
> +module_platform_driver(ftm_quaddec_driver);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Kjeld Flarup <kfa@deif.com");
> +MODULE_AUTHOR("Patrick Havelange <patrick.havelange@essensium.com");
> -- 
> 2.19.1
> 

^ permalink raw reply

* Re: [PATCH v2 6/7] counter: ftm-quaddec: Documentation: Add specific counter sysfs documentation
From: William Breathitt Gray @ 2019-03-07 11:42 UTC (permalink / raw)
  To: Patrick Havelange
  Cc: Mark Rutland, devicetree, Jonathan Cameron, linux-pwm, linux-iio,
	linuxppc-dev, Daniel Lezcano, linux-kernel, Li Yang, Rob Herring,
	Thierry Reding, linux-arm-kernel, Thomas Gleixner, Shawn Guo,
	Esben Haabendal
In-Reply-To: <20190306111208.7454-7-patrick.havelange@essensium.com>

On Wed, Mar 06, 2019 at 12:12:07PM +0100, Patrick Havelange wrote:
> This adds documentation for the specific prescaler entry.
> 
> Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
> ---
> Changes v2
>  - Add doc for prescaler entry
> ---
>  .../ABI/testing/sysfs-bus-counter-ftm-quaddec    | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-bus-counter-ftm-quaddec
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-counter-ftm-quaddec b/Documentation/ABI/testing/sysfs-bus-counter-ftm-quaddec
> new file mode 100644
> index 000000000000..2da629d6d485
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-bus-counter-ftm-quaddec
> @@ -0,0 +1,16 @@
> +What:		/sys/bus/counter/devices/counterX/countY/prescaler_available
> +KernelVersion:	5.1
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Discrete set of available values for the respective Count Y
> +		configuration are listed in this file. Values are delimited by
> +		newline characters.
> +
> +What:		/sys/bus/counter/devices/counterX/countY/prescaler
> +KernelVersion:	5.1
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Configure the prescaler value associated with Count Y.
> +		On the FlexTimer, the counter clock source passes through a
> +		prescaler that is a 7-bit counter. This acts like a clock
> +		divider.
> -- 
> 2.19.1

Hmm, prescalers seem common enough among counter devices to permit these
attributes to be listed in the sysfs-bus-counter documentation file.
However, I'd like to wait until we get another counter driver for a
device with a prescaler before we make that move. From there, we'll have
a better vantage point to determine a fitting standard prescaler
attribute behavior.

So for now, we'll keep these attributes documented here in the
sysfs-bus-counter-ftm-quaddec file, until the time comes to broach the
discussion again.

William Breathitt Gray

^ permalink raw reply

* Re: [PATCH v2 0/7] FlexTimer Module Quadrature decoder counter
From: William Breathitt Gray @ 2019-03-07 12:03 UTC (permalink / raw)
  To: Patrick Havelange, jic23
  Cc: Mark Rutland, devicetree, linux-pwm, linux-iio, linuxppc-dev,
	Daniel Lezcano, linux-kernel, Li Yang, Rob Herring,
	Thierry Reding, linux-arm-kernel, Thomas Gleixner, Shawn Guo,
	Esben Haabendal
In-Reply-To: <20190306111208.7454-1-patrick.havelange@essensium.com>

On Wed, Mar 06, 2019 at 12:12:01PM +0100, Patrick Havelange wrote:
> This patch serie is to be applied on top of 
> https://patchwork.kernel.org/project/linux-iio/list/?series=147
> (a more recent version of the serie is available here : 
> https://gitlab.com/vilhelmgray/iio/tree/generic_counter_v10 )
> 
> Main changes in v2: 
> The code is a bit simpler, thanks to more use of devm_* functions.
> The polling/32bit signed version has been dropped, as not needed and
> no other driver is doing that.
> 
> 
> Patrick Havelange (7):
>   include/fsl: add common FlexTimer #defines in a separate header.
>   drivers/pwm: pwm-fsl-ftm: use common header for FlexTimer #defines
>   drivers/clocksource: timer-fsl-ftm: use common header for FlexTimer
>     #defines
>   dt-bindings: counter: ftm-quaddec
>   counter: add FlexTimer Module Quadrature decoder counter driver
>   counter: ftm-quaddec: Documentation: Add specific counter sysfs
>     documentation
>   LS1021A: dtsi: add ftm quad decoder entries
> 
>  .../ABI/testing/sysfs-bus-counter-ftm-quaddec |  16 +
>  .../bindings/counter/ftm-quaddec.txt          |  18 +
>  arch/arm/boot/dts/ls1021a.dtsi                |  28 ++
>  drivers/clocksource/timer-fsl-ftm.c           |  15 +-
>  drivers/counter/Kconfig                       |   9 +
>  drivers/counter/Makefile                      |   1 +
>  drivers/counter/ftm-quaddec.c                 | 356 ++++++++++++++++++
>  drivers/pwm/pwm-fsl-ftm.c                     |  44 +--
>  include/linux/fsl/ftm.h                       |  88 +++++
>  9 files changed, 519 insertions(+), 56 deletions(-)
>  create mode 100644 Documentation/ABI/testing/sysfs-bus-counter-ftm-quaddec
>  create mode 100644 Documentation/devicetree/bindings/counter/ftm-quaddec.txt
>  create mode 100644 drivers/counter/ftm-quaddec.c
>  create mode 100644 include/linux/fsl/ftm.h
> 
> -- 
> 2.19.1

Patrick,

I see you dropped the polling support in this version. If the need
arises in the future, we can discuss a possible ways of resolving your
latency issues; I imagine interrupts during overflow/underflow events to
be a common behavior among counter devices so those too may result in
latency issues as you discovered in your case.

Jonathan,

If you are satisfied with the changes in this patchset, let me know
which patches you like and I'll add respective Reviewed-by tags for you
for the next Counter subsystem introduction patchset submission.

William Breathitt Gray

^ permalink raw reply

* [GIT PULL] Please pull powerpc/linux.git powerpc-5.1-1 tag
From: Michael Ellerman @ 2019-03-07 13:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: mark.rutland, sbobroff, maddy, clombard, gustavo, aik,
	mark.cave-ayland, peterx, yamada.masahiro, oohall, sandipan,
	mcroce, leitao, rashmica.g, hch, sergey.senozhatsky.work,
	joe.lawrence, sabyasachi.linux, aneesh.kumar, yuehaibing, rppt,
	firoz.khan, clabbe, jniethe5, nfont, rpjday, joel, igor.stoppa,
	nstange, j.neuschaefer, npiggin, cai, tyreld, natechancellor,
	arbab, dvyukov, chunkeey, geoff, prasannatsmkumar, linux-kernel,
	malat, tglx, jrdr.linux, andrew.donnellan, brajeswar.linux,
	fbarrat, vaibhav, linuxppc-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Linus,

Please pull powerpc updates for 5.1.

Stephen reported a couple of conflicts with the dma & swiotlb trees due to
Christoph's DMA series, but you haven't merged those trees yet so I'm not seeing
them when I test merge. They were both fairly trivial though so I don't think
they should cause any trouble.

cheers


The following changes since commit 1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8:

  Linux 5.0-rc2 (2019-01-14 10:41:12 +1200)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerpc-5.1-1

for you to fetch changes up to 9580b71b5a7863c24a9bd18bcd2ad759b86b1eff:

  powerpc/32: Clear on-stack exception marker upon exception return (2019-03-04 00:37:23 +1100)

- ------------------------------------------------------------------
powerpc updates for 5.1

Notable changes:

 - Enable THREAD_INFO_IN_TASK to move thread_info off the stack.

 - A big series from Christoph reworking our DMA code to use more of the generic
   infrastructure, as he said:
   "This series switches the powerpc port to use the generic swiotlb and
    noncoherent dma ops, and to use more generic code for the coherent direct
    mapping, as well as removing a lot of dead code."

 - Increase our vmalloc space to 512T with the Hash MMU on modern CPUs, allowing
   us to support machines with larger amounts of total RAM or distance between
   nodes.

 - Two series from Christophe, one to optimise TLB miss handlers on 6xx, and
   another to optimise the way STRICT_KERNEL_RWX is implemented on some 32-bit
   CPUs.

 - Support for KCOV coverage instrumentation which means we can run syzkaller
   and discover even more bugs in our code.

And as always many clean-ups, reworks and minor fixes etc.

Thanks to:
 Alan Modra, Alexey Kardashevskiy, Alistair Popple, Andrea Arcangeli, Andrew
 Donnellan, Aneesh Kumar K.V, Aravinda Prasad, Balbir Singh, Brajeswar Ghosh,
 Breno Leitao, Christian Lamparter, Christian Zigotzky, Christophe Leroy,
 Christoph Hellwig, Corentin Labbe, Daniel Axtens, David Gibson, Diana Craciun,
 Firoz Khan, Gustavo A. R. Silva, Igor Stoppa, Joe Lawrence, Joel Stanley,
 Jonathan Neuschäfer, Jordan Niethe, Laurent Dufour, Madhavan Srinivasan, Mahesh
 Salgaonkar, Mark Cave-Ayland, Masahiro Yamada, Mathieu Malaterre, Matteo Croce,
 Meelis Roos, Michael W. Bringmann, Nathan Chancellor, Nathan Fontenot, Nicholas
 Piggin, Nick Desaulniers, Nicolai Stange, Oliver O'Halloran, Paul Mackerras,
 Peter Xu, PrasannaKumar Muralidharan, Qian Cai, Rashmica Gupta, Reza Arbab,
 Robert P. J. Day, Russell Currey, Sabyasachi Gupta, Sam Bobroff, Sandipan Das,
 Sergey Senozhatsky, Souptick Joarder, Stewart Smith, Tyrel Datwyler, Vaibhav
 Jain, YueHaibing.

- ------------------------------------------------------------------
Alexey Kardashevskiy (4):
      powerpc/mm: Fix compile when CONFIG_PPC_RADIX_MMU is not defined
      powerpc/powernv: Remove never used pnv_power9_force_smt4
      powerpc/powernv/npu: Remove obsolete comment about TCE_KILL_INVAL_ALL
      powerpc/powernv/ioda: Fix locked_vm counting for memory used by IOMMU tables

Andrew Donnellan (1):
      powerpc: Enable kcov

Aneesh Kumar K.V (3):
      powerpc/book3s: Remove pgd/pud/pmd_set() interfaces
      powerpc/hugetlb: Handle mmap_min_addr correctly in get_unmapped_area callback
      powerpc/mm/hash: Handle mmap_min_addr correctly in get_unmapped_area topdown search

Brajeswar Ghosh (1):
      powerpc/kernel/time: Remove duplicate header

Breno Leitao (2):
      selftests/powerpc: New TM signal self test
      powerpc/ptrace: Mitigate potential Spectre v1

Christian Lamparter (1):
      powerpc: Enable kernel XZ compression option on 44x

Christoph Hellwig (32):
      net: pasemi: set a 64-bit DMA mask on the DMA device
      dma-direct: we might need GFP_DMA for 32-bit dma masks
      powerpc/dma: untangle vio_dma_mapping_ops from dma_iommu_ops
      powerpc/dma: handle iommu bypass in dma_iommu_ops
      powerpc/pseries: unwind dma_get_required_mask_pSeriesLP a bit
      powerpc/pseries: use the generic iommu bypass code
      powerpc/cell: move dma direct window setup out of dma_configure
      powerpc/cell: use the generic iommu bypass code
      powerpc/dart: remove dead cleanup code in iommu_init_early_dart
      powerpc/dart: use the generic iommu bypass code
      powerpc/powernv: remove pnv_pci_ioda_pe_single_vendor
      powerpc/powernv: remove pnv_npu_dma_set_mask
      powerpc/powernv: use the generic iommu bypass code
      powerpc/dma: stop overriding dma_get_required_mask
      powerpc/pci: remove the dma_set_mask pci_controller ops methods
      powerpc/dma: remove the iommu fallback for coherent allocations
      powerpc/dma: remove get_pci_dma_ops
      powerpc/dma: move pci_dma_dev_setup_swiotlb to fsl_pci.c
      powerpc/dma: remove max_direct_dma_addr
      powerpc/dma: fix an off-by-one in dma_capable
      dma-mapping, powerpc: simplify the arch dma_set_mask override
      powerpc/dma: use phys_to_dma instead of get_dma_offset
      powerpc/dma: remove dma_nommu_mmap_coherent
      powerpc/dma: remove dma_nommu_get_required_mask
      powerpc/dma: remove dma_nommu_dma_supported
      swiotlb: remove swiotlb_dma_supported
      powerpc/dma: use the dma-direct allocator for coherent platforms
      powerpc/dma: use the dma_direct mapping routines
      powerpc/dma: use the generic direct mapping bypass
      powerpc/dma: remove get_dma_offset
      powerpc/dma: remove set_dma_offset
      powerpc/dma: trim the fat from <asm/dma-mapping.h>

Christophe Leroy (66):
      powerpc/irq: drop arch_early_irq_init()
      powerpc/ipic: drop unused functions
      powerpc/traps: Fix the message printed when stack overflows
      powerpc: Drop page_is_ram() and walk_system_ram_range()
      powerpc: drop unused GENERIC_CSUM Kconfig item
      powerpc/selftest: fix type of mftb() in null_syscall
      powerpc/8xx: hide itlbie and dtlbie symbols
      powerpc/setup: display reason for not booting
      powerpc/32: Remove unneccessary MSR[RI] clearing for 8xx
      powerpc/traps: fix recoverability of machine check handling on book3s/32
      powerpc/83xx: Also save/restore SPRG4-7 during suspend
      powerpc: simplify BDI switch
      powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in RTAS
      powerpc/6xx: Store PGDIR physical address in a SPRG
      powerpc/603: use physical address directly in TLB miss handlers.
      powerpc/hash32: use physical address directly in hash handlers.
      powerpc/603: Don't handle kernel page TLB misses when not need
      powerpc/603: Don't handle _PAGE_RW and _PAGE_DIRTY on ITLB misses
      powerpc/603: let's handle PAGE_DIRTY directly
      powerpc/603: Don't worry about _PAGE_USER in TLB miss handlers
      powerpc/603: don't handle PAGE_ACCESSED in TLB miss handlers.
      powerpc/book3s32: Reorder _PAGE_XXX flags to simplify TLB handling
      powerpc/32: Fix CONFIG_VIRT_CPU_ACCOUNTING_NATIVE for 40x/booke
      tools/selftest/vm: allow choosing mem size and page size in map_hugetlb
      powerpc: dump as a single line areas mapping a single physical page.
      powerpc: Move page table dump files in a dedicated subdirectory
      powerpc/8xx: replace most #ifdef by IS_ENABLED() in 8xx_mmu.c
      powerpc/8xx: Map 32Mb of RAM at init.
      powerpc/wii: properly disable use of BATs when requested.
      powerpc/mm/32: add base address to mmu_mapin_ram()
      powerpc/mm/32s: rework mmu_mapin_ram()
      powerpc/mm/32s: use generic mmu_mapin_ram() for all blocks.
      powerpc/32: always populate page tables for Abatron BDI.
      powerpc/wii: remove wii_mmu_mapin_mem2()
      powerpc/mm/32s: use _PAGE_EXEC in setbat()
      powerpc/32: add helper to write into segment registers
      powerpc/mmu: add is_strict_kernel_rwx() helper
      powerpc/kconfig: define PAGE_SHIFT inside Kconfig
      powerpc/kconfig: define CONFIG_DATA_SHIFT and CONFIG_ETEXT_SHIFT
      powerpc/mm/32s: add setibat() clearibat() and update_bats()
      powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX
      powerpc/kconfig: make _etext and data areas alignment configurable on Book3s 32
      powerpc/8xx: don't disable large TLBs with CONFIG_STRICT_KERNEL_RWX
      powerpc/kconfig: make _etext and data areas alignment configurable on 8xx
      powerpc/irq: use memblock functions returning virtual address
      powerpc: Avoid circular header inclusion in mmu-hash.h
      powerpc: Only use task_struct 'cpu' field on SMP
      powerpc: prep stack walkers for THREAD_INFO_IN_TASK
      powerpc: Rename THREAD_INFO to TASK_STACK
      powerpc: call_do_[soft]irq() takes a pointer to the stack
      powerpc: Don't use CURRENT_THREAD_INFO to find the stack
      powerpc: Replace current_thread_info()->task with current
      powerpc: Update comments in preparation for THREAD_INFO_IN_TASK
      powerpc/64: Use task_stack_page() to initialise paca->kstack
      powerpc: Use sizeof(struct thread_info) in INIT_SP_LIMIT
      powerpc: Use linux/thread_info.h in processor.h
      powerpc: Use task_stack_page() in current_pt_regs()
      powerpc/idle/6xx: Use r1 with CURRENT_THREAD_INFO()
      powerpc: Activate CONFIG_THREAD_INFO_IN_TASK
      powerpc: regain entire stack space
      powerpc: 'current_set' is now a table of task_struct pointers
      powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU
      powerpc/64: Replace CURRENT_THREAD_INFO with PACA_THREAD_INFO
      powerpc: clean stack pointers naming
      powerpc/fsl: Fix the flush of branch predictor.
      powerpc/32: Clear on-stack exception marker upon exception return

Corentin Labbe (1):
      powerpc/dts: Build virtex dtbs

Firoz Khan (1):
      powerpc: remove nargs from __SYSCALL

Gustavo A. R. Silva (2):
      powerpc/ps3: Use struct_size() in kzalloc()
      powerpc/spufs: use struct_size() in kmalloc()

Igor Stoppa (1):
      powerpc: remove unnecessary unlikely()

Joe Lawrence (4):
      powerpc/livepatch: relax reliable stack tracer checks for first-frame
      powerpc/livepatch: small cleanups in save_stack_trace_tsk_reliable()
      powerpc/livepatch: return -ERRNO values in save_stack_trace_tsk_reliable()
      powerpc: Remove export of save_stack_trace_tsk_reliable()

Joel Stanley (2):
      powerpc: Use ALIGN instead of BLOCK
      powerpc/32: Include .branch_lt in data section

Jonathan Neuschäfer (2):
      powerpc: wii.dts: Add interrupt-related properties to GPIO node
      powerpc: wii.dts: Add GPIO keys

Jordan Niethe (1):
      powerpc/powernv: Make opal log only readable by root

Madhavan Srinivasan (1):
      powerpc/perf: Add mem access events to sysfs

Mark Cave-Ayland (1):
      powerpc: Fix 32-bit KVM-PR lockup and host crash with MacOS guest

Masahiro Yamada (3):
      KVM: powerpc: remove -I. header search paths
      powerpc: remove redundant header search path additions
      powerpc: math-emu: remove unneeded header search paths

Mathieu Malaterre (3):
      powerpc: Allow CPU selection of G4/74xx variant
      powerpc: Remove trailing semicolon after curly brace
      Move static keyword at beginning of declaration

Matteo Croce (1):
      powerpc/hvsi: Fix spelling mistake: "lenght" should be "length"

Michael Ellerman (19):
      powerpc: Stop using pr_cont() in __die()
      powerpc: Show PAGE_SIZE in __die() output
      powerpc/64s: Add MMU type to __die() output
      Merge branch 'fixes' into next
      KVM: PPC: Book3S HV: Context switch AMR on Power9
      Merge branch 'topic/dma' into next
      Merge branch 'topic/ppc-kvm' into next
      powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning
      powerpc/mm/hash: Increase vmalloc space to 512T with hash MMU
      powerpc/44x: Force PCI on for CURRITUCK
      powerpc/64: Make sys_switch_endian() traceable
      powerpc: Make PPC_64K_PAGES depend on only 44x or PPC_BOOK3S_64
      powerpc/64s: Fix logic when handling unknown CPU features
      powerpc/kvm: Save and restore host AMR/IAMR/UAMOR
      Revert "powerpc/book3s32: Reorder _PAGE_XXX flags to simplify TLB handling"
      powerpc/64s: Remove MSR_RI optimisation in system_call_exit()
      powerpc/64: Simplify __secondary_start paca->kstack handling
      selftests/powerpc: Remove duplicate header
      Merge branch 'topic/ppc-kvm' into next

Nathan Chancellor (1):
      powerpc/xmon: Fix opcode being uninitialized in print_insn_powerpc

Nathan Fontenot (1):
      powerpc/pseries: Perform full re-add of CPU for topology update post-migration

Nicholas Piggin (10):
      powerpc/64s/hash: Fix assert_slb_presence() use of the slbfee. instruction
      powerpc/smp: Fix NMI IPI timeout
      powerpc/smp: Fix NMI IPI xmon timeout
      powerpc/smp: Make __smp_send_nmi_ipi() static
      powerpc/64s: Fix HV NMI vs HV interrupt recoverability test
      powerpc/64s: system reset interrupt preserve HSRRs
      powerpc/64s: Prepare to handle data interrupts vs d-side MCE reentrancy
      powerpc/64s: Fix data interrupts vs d-side MCE reentrancy
      powerpc/powernv: move OPAL call wrapper tracing and interrupt handling to C
      powerpc/64s: Fix unrelocated interrupt trampoline address test

Nicolai Stange (2):
      powerpc/64s: Clear on-stack exception marker upon exception return
      powerpc/64s: Make reliable stacktrace dependency clearer

Oliver O'Halloran (8):
      powerpc/powernv: Escalate reset when IODA reset fails
      powerpc/eeh: Use debugfs_create_u32 for eeh_max_freezes
      powerpc/eeh_cache: Add pr_debug() prints for insert/remove
      powerpc/eeh_cache: Add a way to dump the EEH address cache
      powerpc/eeh_cache: Bump log level of eeh_addr_cache_print()
      powerpc/pci: Add pci_find_controller_for_domain()
      powerpc/eeh: Allow disabling recovery
      powerpc/eeh: Add eeh_force_recover to debugfs

Paul Mackerras (3):
      KVM: PPC: Book3S HV: Simplify machine check handling
      powerpc/64s: Better printing of machine check info for guest MCEs
      powerpc/powernv: Don't reprogram SLW image on every KVM guest entry/exit

Peter Xu (1):
      powerpc/powernv/npu: Remove redundant change_pte() hook

PrasannaKumar Muralidharan (1):
      powerpc sstep: Add support for modsw, moduw instructions

Qian Cai (2):
      powerpc/mm: Fix "sz" set but not used warning
      powerpc/mm: fix "section_base" set but not used

Rashmica Gupta (1):
      powerpc/mm: Check secondary hash page table

Reza Arbab (1):
      powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

Robert P. J. Day (1):
      powerpc/dts: Standardize DTS status assignments from "ok" to "okay"

Sabyasachi Gupta (2):
      powerpc/powernv: Remove duplicate header
      powerpc/cell: Remove duplicate header

Sam Bobroff (6):
      powerpc/eeh: Cleanup eeh_pe_clear_frozen_state()
      powerpc/eeh: remove sw_state from eeh_unfreeze_pe()
      powerpc/eeh: Add include_passed to eeh_pe_state_clear()
      powerpc/eeh: Add include_passed to eeh_clear_pe_frozen_state()
      powerpc/eeh: Improve recovery of passed-through devices
      powerpc/eeh: Correct retries in eeh_pe_reset_full()

Sandipan Das (8):
      powerpc: sstep: Add tests for compute type instructions
      powerpc: sstep: Add tests for add[.] instruction
      powerpc: sstep: Add tests for addc[.] instruction
      powerpc: sstep: Add support for maddhd, maddhdu, maddld instructions
      powerpc: sstep: Add support for darn instruction
      powerpc sstep: Add support for cnttzw, cnttzd instructions
      powerpc sstep: Add support for extswsli instruction
      powerpc sstep: Add support for modsd, modud instructions

Sergey Senozhatsky (1):
      powerpc: use a CONSOLE_LOGLEVEL_DEBUG macro

Tyrel Datwyler (1):
      powerpc/pseries: export timebase register sample in lparcfg

Vaibhav Jain (1):
      cxl: Wrap iterations over afu slices inside 'afu_list_lock'

YueHaibing (1):
      powerpc/mm: Fix debugfs_simple_attr.cocci warnings


 arch/powerpc/Kconfig                               |  79 ++-
 arch/powerpc/Kconfig.debug                         |   4 -
 arch/powerpc/Makefile                              |  11 +-
 arch/powerpc/boot/dts/Makefile                     |   1 +
 arch/powerpc/boot/dts/akebono.dts                  |   2 +-
 arch/powerpc/boot/dts/bluestone.dts                |   2 +-
 arch/powerpc/boot/dts/currituck.dts                |   2 +-
 arch/powerpc/boot/dts/iss4xx-mpic.dts              |   2 +-
 arch/powerpc/boot/dts/wii.dts                      |  22 +
 arch/powerpc/include/asm/asm-prototypes.h          |  14 +-
 arch/powerpc/include/asm/book3s/32/mmu-hash.h      |   2 +
 arch/powerpc/include/asm/book3s/32/pgtable.h       |  11 +
 arch/powerpc/include/asm/book3s/64/hash.h          |  32 +-
 arch/powerpc/include/asm/book3s/64/mmu-hash.h      |   2 +-
 arch/powerpc/include/asm/book3s/64/pgalloc.h       |   8 +-
 arch/powerpc/include/asm/book3s/64/pgtable.h       |  16 +-
 .../powerpc/include/asm/book3s/64/tlbflush-radix.h |  30 +-
 arch/powerpc/include/asm/checksum.h                |   4 -
 arch/powerpc/include/asm/device.h                  |  10 +-
 arch/powerpc/include/asm/dma-direct.h              |  18 +-
 arch/powerpc/include/asm/dma-mapping.h             |  92 ----
 arch/powerpc/include/asm/eeh.h                     |  10 +-
 arch/powerpc/include/asm/eeh_event.h               |   1 +
 arch/powerpc/include/asm/exception-64s.h           |   4 +-
 arch/powerpc/include/asm/hvsi.h                    |   2 +-
 arch/powerpc/include/asm/iommu.h                   |  17 +
 arch/powerpc/include/asm/ipic.h                    |   3 -
 arch/powerpc/include/asm/irq.h                     |  18 +-
 arch/powerpc/include/asm/kvm_ppc.h                 |   3 +-
 arch/powerpc/include/asm/livepatch.h               |   7 +-
 arch/powerpc/include/asm/machdep.h                 |   4 +-
 arch/powerpc/include/asm/mce.h                     |   2 +-
 arch/powerpc/include/asm/mmu.h                     |  13 +
 arch/powerpc/include/asm/nmi.h                     |   2 +
 arch/powerpc/include/asm/nohash/32/mmu-8xx.h       |   3 +-
 arch/powerpc/include/asm/page.h                    |  14 +-
 arch/powerpc/include/asm/pci-bridge.h              |   7 +-
 arch/powerpc/include/asm/pci.h                     |   2 -
 arch/powerpc/include/asm/pgtable.h                 |   1 -
 arch/powerpc/include/asm/powernv.h                 |   3 +-
 arch/powerpc/include/asm/ppc-opcode.h              |  16 +-
 arch/powerpc/include/asm/ppc-pci.h                 |   4 +-
 arch/powerpc/include/asm/processor.h               | 108 +----
 arch/powerpc/include/asm/ptrace.h                  |   2 +-
 arch/powerpc/include/asm/reg.h                     |   9 +-
 arch/powerpc/include/asm/sections.h                |   7 +
 arch/powerpc/include/asm/smp.h                     |  17 +-
 arch/powerpc/include/asm/swiotlb.h                 |   5 -
 arch/powerpc/include/asm/task_size_32.h            |  21 +
 arch/powerpc/include/asm/task_size_64.h            |  79 +++
 arch/powerpc/include/asm/thread_info.h             |  19 -
 arch/powerpc/include/asm/topology.h                |   2 +
 arch/powerpc/kernel/Makefile                       |  15 +-
 arch/powerpc/kernel/asm-offsets.c                  |  15 +-
 arch/powerpc/kernel/cpu_setup_6xx.S                |   4 +
 arch/powerpc/kernel/dma-iommu.c                    |  75 ++-
 arch/powerpc/kernel/dma-mask.c                     |  12 +
 arch/powerpc/kernel/dma-swiotlb.c                  |  89 ----
 arch/powerpc/kernel/dma.c                          | 362 --------------
 arch/powerpc/kernel/dt_cpu_ftrs.c                  |  17 +-
 arch/powerpc/kernel/eeh.c                          | 190 ++++++--
 arch/powerpc/kernel/eeh_cache.c                    |  36 +-
 arch/powerpc/kernel/eeh_driver.c                   |  86 ++--
 arch/powerpc/kernel/eeh_event.c                    |  16 +-
 arch/powerpc/kernel/eeh_pe.c                       |  68 ++-
 arch/powerpc/kernel/eeh_sysfs.c                    |   3 +-
 arch/powerpc/kernel/entry_32.S                     |  97 ++--
 arch/powerpc/kernel/entry_64.S                     |  53 +-
 arch/powerpc/kernel/epapr_hcalls.S                 |   5 +-
 arch/powerpc/kernel/exceptions-64e.S               |  14 +-
 arch/powerpc/kernel/exceptions-64s.S               |  94 +++-
 arch/powerpc/kernel/head_32.S                      | 160 +++---
 arch/powerpc/kernel/head_40x.S                     |   9 +-
 arch/powerpc/kernel/head_44x.S                     |   8 +-
 arch/powerpc/kernel/head_64.S                      |  20 +-
 arch/powerpc/kernel/head_8xx.S                     | 124 +++--
 arch/powerpc/kernel/head_booke.h                   |  12 +-
 arch/powerpc/kernel/head_fsl_booke.S               |  16 +-
 arch/powerpc/kernel/idle_6xx.S                     |   8 +-
 arch/powerpc/kernel/idle_book3e.S                  |   2 +-
 arch/powerpc/kernel/idle_e500.S                    |   8 +-
 arch/powerpc/kernel/idle_power4.S                  |   2 +-
 arch/powerpc/kernel/irq.c                          | 119 +----
 arch/powerpc/kernel/kgdb.c                         |  28 --
 arch/powerpc/kernel/machine_kexec_64.c             |   6 +-
 arch/powerpc/kernel/mce.c                          |  11 +-
 arch/powerpc/kernel/misc_32.S                      |  17 +-
 arch/powerpc/kernel/pci-common.c                   |  21 +-
 arch/powerpc/kernel/process.c                      |  68 +--
 arch/powerpc/kernel/ptrace.c                       |  18 +-
 arch/powerpc/kernel/setup-common.c                 |   5 +-
 arch/powerpc/kernel/setup_32.c                     |  26 +-
 arch/powerpc/kernel/setup_64.c                     |  51 +-
 arch/powerpc/kernel/smp.c                          | 109 ++---
 arch/powerpc/kernel/stacktrace.c                   | 102 ++--
 arch/powerpc/kernel/syscalls.c                     |   2 +-
 arch/powerpc/kernel/syscalls/syscalltbl.sh         |   4 +-
 arch/powerpc/kernel/systbl.S                       |   6 +-
 arch/powerpc/kernel/time.c                         |   1 -
 arch/powerpc/kernel/trace/Makefile                 |   3 +-
 arch/powerpc/kernel/trace/ftrace_64_mprofile.S     |   6 +-
 arch/powerpc/kernel/traps.c                        | 133 ++++-
 arch/powerpc/kernel/udbg.c                         |   2 +-
 arch/powerpc/kernel/vdso32/Makefile                |   1 +
 arch/powerpc/kernel/vdso64/Makefile                |   1 +
 arch/powerpc/kernel/vmlinux.lds.S                  |  14 +-
 arch/powerpc/kvm/Makefile                          |   5 -
 arch/powerpc/kvm/book3s.c                          |   7 +
 arch/powerpc/kvm/book3s_hv.c                       |  25 +-
 arch/powerpc/kvm/book3s_hv_hmi.c                   |   1 +
 arch/powerpc/kvm/book3s_hv_ras.c                   |  58 +--
 arch/powerpc/kvm/book3s_hv_rmhandlers.S            |  66 +--
 arch/powerpc/lib/Makefile                          |   3 +-
 arch/powerpc/lib/sstep.c                           | 114 ++++-
 arch/powerpc/lib/test_emulate_step.c               | 535 ++++++++++++++++++++-
 arch/powerpc/lib/test_emulate_step_exec_instr.S    | 150 ++++++
 arch/powerpc/math-emu/Makefile                     |   2 +-
 arch/powerpc/mm/40x_mmu.c                          |   2 +-
 arch/powerpc/mm/44x_mmu.c                          |   2 +-
 arch/powerpc/mm/8xx_mmu.c                          |  91 ++--
 arch/powerpc/mm/Makefile                           |  15 +-
 arch/powerpc/mm/dma-noncoherent.c                  |  40 +-
 arch/powerpc/mm/fsl_booke_mmu.c                    |   2 +-
 arch/powerpc/mm/hash_low_32.S                      |  76 ++-
 arch/powerpc/mm/hash_utils_64.c                    |   6 +-
 arch/powerpc/mm/hugetlbpage-hash64.c               |   3 +-
 arch/powerpc/mm/hugetlbpage-radix.c                |   5 +-
 arch/powerpc/mm/init_32.c                          |   6 +-
 arch/powerpc/mm/init_64.c                          |   2 -
 arch/powerpc/mm/mem.c                              |  61 +--
 arch/powerpc/mm/mmu_decl.h                         |  10 +-
 arch/powerpc/mm/numa.c                             |   9 +-
 arch/powerpc/mm/pgtable_32.c                       |  42 +-
 arch/powerpc/mm/ppc_mmu_32.c                       | 186 +++++--
 .../{dump_linuxpagetables-8xx.c => ptdump/8xx.c}   |   2 +-
 arch/powerpc/mm/ptdump/Makefile                    |   9 +
 arch/powerpc/mm/{dump_bats.c => ptdump/bats.c}     |   0
 .../book3s64.c}                                    |   2 +-
 .../hashpagetable.c}                               |   2 +-
 .../mm/{dump_linuxpagetables.c => ptdump/ptdump.c} |  20 +-
 .../mm/{dump_linuxpagetables.h => ptdump/ptdump.h} |   0
 .../mm/{dump_sr.c => ptdump/segment_regs.c}        |   0
 .../shared.c}                                      |   2 +-
 arch/powerpc/mm/slb.c                              |   5 +
 arch/powerpc/mm/slice.c                            |  10 +-
 arch/powerpc/mm/tlb_nohash.c                       |   2 +-
 arch/powerpc/net/bpf_jit32.h                       |   5 +-
 arch/powerpc/perf/power9-events-list.h             |  24 +
 arch/powerpc/perf/power9-pmu.c                     |   4 +
 arch/powerpc/platforms/44x/Kconfig                 |   1 +
 arch/powerpc/platforms/44x/ppc476.c                |   1 +
 arch/powerpc/platforms/44x/warp.c                  |   2 +-
 arch/powerpc/platforms/83xx/suspend-asm.S          |  34 +-
 arch/powerpc/platforms/85xx/corenet_generic.c      |   5 +-
 arch/powerpc/platforms/85xx/ge_imp3a.c             |   2 -
 arch/powerpc/platforms/85xx/mpc8536_ds.c           |   2 -
 arch/powerpc/platforms/85xx/mpc85xx_ds.c           |   4 -
 arch/powerpc/platforms/85xx/mpc85xx_mds.c          |   4 -
 arch/powerpc/platforms/85xx/p1010rdb.c             |   1 -
 arch/powerpc/platforms/85xx/p1022_ds.c             |   2 -
 arch/powerpc/platforms/85xx/p1022_rdk.c            |   2 -
 arch/powerpc/platforms/85xx/qemu_e500.c            |   1 +
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c         |   1 -
 arch/powerpc/platforms/Kconfig.cputype             |   9 +
 arch/powerpc/platforms/cell/iommu.c                | 172 +------
 arch/powerpc/platforms/cell/spu_callbacks.c        |   2 +-
 arch/powerpc/platforms/cell/spu_syscalls.c         |   1 -
 arch/powerpc/platforms/cell/spufs/file.c           |   5 +-
 arch/powerpc/platforms/embedded6xx/wii.c           |  24 -
 arch/powerpc/platforms/pasemi/iommu.c              |   2 +-
 arch/powerpc/platforms/pasemi/setup.c              |  51 --
 arch/powerpc/platforms/powernv/Makefile            |   5 +-
 arch/powerpc/platforms/powernv/idle.c              |  27 +-
 arch/powerpc/platforms/powernv/npu-dma.c           |  16 +-
 arch/powerpc/platforms/powernv/opal-call.c         | 283 +++++++++++
 arch/powerpc/platforms/powernv/opal-msglog.c       |   2 +-
 arch/powerpc/platforms/powernv/opal-wrappers.S     | 344 ++-----------
 arch/powerpc/platforms/powernv/opal.c              |   3 +-
 arch/powerpc/platforms/powernv/pci-ioda-tce.c      |   1 -
 arch/powerpc/platforms/powernv/pci-ioda.c          | 146 ++----
 arch/powerpc/platforms/powernv/smp.c               |  25 +
 arch/powerpc/platforms/ps3/device-init.c           |   4 +-
 arch/powerpc/platforms/ps3/os-area.c               |   4 +-
 arch/powerpc/platforms/ps3/system-bus.c            |   4 +-
 arch/powerpc/platforms/pseries/hotplug-cpu.c       |  19 +
 arch/powerpc/platforms/pseries/iommu.c             |  99 +---
 arch/powerpc/platforms/pseries/lparcfg.c           |   1 +
 arch/powerpc/platforms/pseries/vio.c               |  95 ++--
 arch/powerpc/sysdev/6xx-suspend.S                  |   5 +-
 arch/powerpc/sysdev/dart_iommu.c                   |  58 +--
 arch/powerpc/sysdev/fsl_pci.c                      |  25 +-
 arch/powerpc/sysdev/ipic.c                         |  35 --
 arch/powerpc/sysdev/tsi108_dev.c                   |   2 +-
 arch/powerpc/sysdev/xive/common.c                  |   2 +-
 arch/powerpc/xmon/Makefile                         |   1 +
 arch/powerpc/xmon/ppc-dis.c                        |   2 +-
 arch/powerpc/xmon/xmon.c                           |   2 +-
 drivers/misc/cxl/guest.c                           |   2 +
 drivers/misc/cxl/pci.c                             |  39 +-
 drivers/misc/cxl/vphb.c                            |   3 +-
 drivers/net/ethernet/pasemi/pasemi_mac.c           |   1 +
 drivers/vfio/vfio_spapr_eeh.c                      |   6 +-
 include/linux/swiotlb.h                            |   3 -
 kernel/dma/Kconfig                                 |   3 +
 kernel/dma/direct.c                                |   3 +-
 kernel/dma/mapping.c                               |  11 +-
 kernel/dma/swiotlb.c                               |  12 -
 kernel/resource.c                                  |   4 -
 .../selftests/powerpc/benchmarks/null_syscall.c    |   2 +-
 tools/testing/selftests/powerpc/include/reg.h      |   8 +
 tools/testing/selftests/powerpc/include/utils.h    |   2 +
 .../selftests/powerpc/pmu/ebb/fork_cleanup_test.c  |   1 -
 tools/testing/selftests/powerpc/tm/.gitignore      |   1 +
 tools/testing/selftests/powerpc/tm/Makefile        |   4 +-
 .../powerpc/tm/tm-signal-context-force-tm.c        | 184 +++++++
 tools/testing/selftests/vm/map_hugetlb.c           |  29 +-
 216 files changed, 3619 insertions(+), 2991 deletions(-)
 create mode 100644 arch/powerpc/include/asm/task_size_32.h
 create mode 100644 arch/powerpc/include/asm/task_size_64.h
 create mode 100644 arch/powerpc/kernel/dma-mask.c
 delete mode 100644 arch/powerpc/kernel/dma.c
 create mode 100644 arch/powerpc/lib/test_emulate_step_exec_instr.S
 rename arch/powerpc/mm/{dump_linuxpagetables-8xx.c => ptdump/8xx.c} (97%)
 create mode 100644 arch/powerpc/mm/ptdump/Makefile
 rename arch/powerpc/mm/{dump_bats.c => ptdump/bats.c} (100%)
 rename arch/powerpc/mm/{dump_linuxpagetables-book3s64.c => ptdump/book3s64.c} (98%)
 rename arch/powerpc/mm/{dump_hashpagetable.c => ptdump/hashpagetable.c} (99%)
 rename arch/powerpc/mm/{dump_linuxpagetables.c => ptdump/ptdump.c} (94%)
 rename arch/powerpc/mm/{dump_linuxpagetables.h => ptdump/ptdump.h} (100%)
 rename arch/powerpc/mm/{dump_sr.c => ptdump/segment_regs.c} (100%)
 rename arch/powerpc/mm/{dump_linuxpagetables-generic.c => ptdump/shared.c} (97%)
 create mode 100644 arch/powerpc/platforms/powernv/opal-call.c
 create mode 100644 tools/testing/selftests/powerpc/tm/tm-signal-context-force-tm.c
-----BEGIN PGP SIGNATURE-----

iQIcBAEBAgAGBQJcgRh2AAoJEFHr6jzI4aWA4FUQAKLSJ8WL30ez49KGsQbaOx0O
efhhYBYLPIbM/dm4Z0i9enKaOth9g+xDoxHj18E6bwL/IxOPe5O/fgo/JdPVfrgd
R0a53NEmx9c+cwJ1qzxUWuYF09g3+nGOHRRhDDeu4eiSC16zpym33jQzJNdhcuDX
6nhBBL7BRUTxiMnFa8ti9UNG5YmYIwNC4kycaXGzv2wjLbQs2i90XVXAev1xhdY4
lCHdx9oY4YCScraPeREA0ARMQI8uWvcmIG3UZ24gGd4TR7Pf/6UOBMyJ1JStQNhQ
2JM8aahrtY9Z2Cmt/UvPSe1DlE34YLN20vSwYGwihSW1JJrEDOVC5SIeslDE/k46
/6b92l1sZJDgT1OIWk7gmpwP9B7IzLI4CNuqmjs3sOO39UBFmhGq1NgglTxx63ul
w//kFhrVV0lqY0yzwpBnwWcsZtPPozCdPCCcFiRJ/BPLIsTlQtyGOOVqM42rOXez
MKB2yBzils33YEq9c9be+jWDJ3WvWK/MFzJYjw0sg6mebS5uJGJGGbGEcXHm1MiU
3o2IG0I8uvFvVuM0lI/NshId8lntVVPyfsGFq0bkQ4H6sEi1t7Og+LMfTEzvNB7C
ks9VvwJX+VI9dRM8S3OMa5rCv+cn5QNlfWlDSJ3mGPWAarVfFEao54ukIP+cEmR2
4ko9HU39nbrhLVPLr8oY
=8u6h
-----END PGP SIGNATURE-----

^ permalink raw reply

* [PATCH v6 0/4] Fix free/allocation of runtime gigantic pages
From: Alexandre Ghiti @ 2019-03-07 13:20 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Catalin Marinas, Will Deacon,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, Yoshinori Sato, Rich Felker,
	David S . Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	H . Peter Anvin, x86, Dave Hansen, Andy Lutomirski,
	Peter Zijlstra, Mike Kravetz, linux-arm-kernel, linux-kernel,
	linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-mm
  Cc: Alexandre Ghiti

This series fixes sh and sparc that did not advertise their gigantic page
support and then were not able to allocate and free those pages at runtime.
It renames MEMORY_ISOLATION && COMPACTION || CMA condition into the more
accurate CONTIG_ALLOC, since it allows the definition of alloc_contig_range
function.
Finally, it then fixes the wrong definition of ARCH_HAS_GIGANTIC_PAGE config
that, without MEMORY_ISOLATION && COMPACTION || CMA defined, did not allow
architectures to free boottime allocated gigantic pages although unrelated.

Changes in v6:
- Remove unnecessary goto since the fallthrough path does the same and is
  the 'normal' behaviour, as suggested by Dave Hensen
- Be more explicit in comment in set_max_huge_page: we return an error
  if alloc_contig_range is not defined and the user tries to allocate a
  gigantic page (we keep the same behaviour as before this patch), but we
  now let her free boottime gigantic page, as suggested by Dave Hensen
- Add Acked-by, thanks. 

Changes in v5:
- Fix bug in previous version thanks to Mike Kravetz
- Fix block comments that did not respect coding style thanks to Dave Hensen
- Define ARCH_HAS_GIGANTIC_PAGE only for sparc64 as advised by David Miller
- Factorize "def_bool" and "depends on" thanks to Vlastimil Babka

Changes in v4 as suggested by Dave Hensen:
- Split previous version into small patches
- Do not compile alloc_gigantic** functions for architectures that do not
  support those pages
- Define correct ARCH_HAS_GIGANTIC_PAGE in all arch that support them to avoid
  useless runtime check
- Add comment in set_max_huge_pages to explain that freeing is possible even
  without CONTIG_ALLOC defined
- Remove gigantic_page_supported function across all archs

Changes in v3 as suggested by Vlastimil Babka and Dave Hansen:
- config definition was wrong and is now in mm/Kconfig
- COMPACTION_CORE was renamed in CONTIG_ALLOC

Changes in v2 as suggested by Vlastimil Babka:
- Get rid of ARCH_HAS_GIGANTIC_PAGE
- Get rid of architecture specific gigantic_page_supported
- Factorize CMA or (MEMORY_ISOLATION && COMPACTION) into COMPACTION_CORE 

Alexandre Ghiti (4):
  sh: Advertise gigantic page support
  sparc: Advertise gigantic page support
  mm: Simplify MEMORY_ISOLATION && COMPACTION || CMA into CONTIG_ALLOC
  hugetlb: allow to free gigantic pages regardless of the configuration

 arch/arm64/Kconfig                           |  2 +-
 arch/arm64/include/asm/hugetlb.h             |  4 --
 arch/powerpc/include/asm/book3s/64/hugetlb.h |  7 ---
 arch/powerpc/platforms/Kconfig.cputype       |  2 +-
 arch/s390/Kconfig                            |  2 +-
 arch/s390/include/asm/hugetlb.h              |  3 --
 arch/sh/Kconfig                              |  1 +
 arch/sparc/Kconfig                           |  1 +
 arch/x86/Kconfig                             |  2 +-
 arch/x86/include/asm/hugetlb.h               |  4 --
 arch/x86/mm/hugetlbpage.c                    |  2 +-
 include/linux/gfp.h                          |  4 +-
 mm/Kconfig                                   |  3 ++
 mm/hugetlb.c                                 | 57 ++++++++++++--------
 mm/page_alloc.c                              |  7 ++-
 15 files changed, 50 insertions(+), 51 deletions(-)

-- 
2.20.1


^ permalink raw reply

* [PATCH v6 1/4] sh: Advertise gigantic page support
From: Alexandre Ghiti @ 2019-03-07 13:20 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Catalin Marinas, Will Deacon,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, Yoshinori Sato, Rich Felker,
	David S . Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	H . Peter Anvin, x86, Dave Hansen, Andy Lutomirski,
	Peter Zijlstra, Mike Kravetz, linux-arm-kernel, linux-kernel,
	linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-mm
  Cc: Alexandre Ghiti
In-Reply-To: <20190307132015.26970-1-alex@ghiti.fr>

sh actually supports gigantic pages and selecting
ARCH_HAS_GIGANTIC_PAGE allows it to allocate and free
gigantic pages at runtime.

At least sdk7786_defconfig exposes such a configuration with
huge pages of 64MB, pages of 4KB and MAX_ORDER = 11:
HPAGE_SHIFT (26) - PAGE_SHIFT (12) = 14 >= MAX_ORDER (11)

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
---
 arch/sh/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index a9c36f95744a..299a17bed67c 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -53,6 +53,7 @@ config SUPERH
 	select HAVE_FUTEX_CMPXCHG if FUTEX
 	select HAVE_NMI
 	select NEED_SG_DMA_LENGTH
+	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
 
 	help
 	  The SuperH is a RISC processor targeted for use in embedded systems
-- 
2.20.1


^ permalink raw reply related

* [PATCH v6 2/4] sparc: Advertise gigantic page support
From: Alexandre Ghiti @ 2019-03-07 13:20 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Catalin Marinas, Will Deacon,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, Yoshinori Sato, Rich Felker,
	David S . Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	H . Peter Anvin, x86, Dave Hansen, Andy Lutomirski,
	Peter Zijlstra, Mike Kravetz, linux-arm-kernel, linux-kernel,
	linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-mm
  Cc: Alexandre Ghiti
In-Reply-To: <20190307132015.26970-1-alex@ghiti.fr>

sparc actually supports gigantic pages and selecting
ARCH_HAS_GIGANTIC_PAGE allows it to allocate and free
gigantic pages at runtime.

sparc allows configuration such as huge pages of 16GB,
pages of 8KB and MAX_ORDER = 13 (default):
HPAGE_SHIFT (34) - PAGE_SHIFT (13) = 21 >= MAX_ORDER (13)

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Acked-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index d5dd652fb8cc..0b7f0e0fefa5 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -90,6 +90,7 @@ config SPARC64
 	select ARCH_CLOCKSOURCE_DATA
 	select ARCH_HAS_PTE_SPECIAL
 	select PCI_DOMAINS if PCI
+	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
 
 config ARCH_DEFCONFIG
 	string
-- 
2.20.1


^ permalink raw reply related

* [PATCH v6 3/4] mm: Simplify MEMORY_ISOLATION && COMPACTION || CMA into CONTIG_ALLOC
From: Alexandre Ghiti @ 2019-03-07 13:20 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Catalin Marinas, Will Deacon,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, Yoshinori Sato, Rich Felker,
	David S . Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	H . Peter Anvin, x86, Dave Hansen, Andy Lutomirski,
	Peter Zijlstra, Mike Kravetz, linux-arm-kernel, linux-kernel,
	linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-mm
  Cc: Alexandre Ghiti
In-Reply-To: <20190307132015.26970-1-alex@ghiti.fr>

This condition allows to define alloc_contig_range, so simplify
it into a more accurate naming.

Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
---
 arch/arm64/Kconfig                     | 2 +-
 arch/powerpc/platforms/Kconfig.cputype | 2 +-
 arch/s390/Kconfig                      | 2 +-
 arch/sh/Kconfig                        | 2 +-
 arch/sparc/Kconfig                     | 2 +-
 arch/x86/Kconfig                       | 2 +-
 arch/x86/mm/hugetlbpage.c              | 2 +-
 include/linux/gfp.h                    | 2 +-
 mm/Kconfig                             | 3 +++
 mm/page_alloc.c                        | 3 +--
 10 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a4168d366127..091a513b93e9 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -18,7 +18,7 @@ config ARM64
 	select ARCH_HAS_FAST_MULTIPLIER
 	select ARCH_HAS_FORTIFY_SOURCE
 	select ARCH_HAS_GCOV_PROFILE_ALL
-	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
+	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
 	select ARCH_HAS_KCOV
 	select ARCH_HAS_MEMBARRIER_SYNC_CORE
 	select ARCH_HAS_PTE_SPECIAL
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 8c7464c3f27f..f677c8974212 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -319,7 +319,7 @@ config ARCH_ENABLE_SPLIT_PMD_PTLOCK
 config PPC_RADIX_MMU
 	bool "Radix MMU Support"
 	depends on PPC_BOOK3S_64
-	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
+	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
 	default y
 	help
 	  Enable support for the Power ISA 3.0 Radix style MMU. Currently this
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index ed554b09eb3f..1c57b83c76f5 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -69,7 +69,7 @@ config S390
 	select ARCH_HAS_ELF_RANDOMIZE
 	select ARCH_HAS_FORTIFY_SOURCE
 	select ARCH_HAS_GCOV_PROFILE_ALL
-	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
+	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
 	select ARCH_HAS_KCOV
 	select ARCH_HAS_PTE_SPECIAL
 	select ARCH_HAS_SET_MEMORY
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 299a17bed67c..c7266302691c 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -53,7 +53,7 @@ config SUPERH
 	select HAVE_FUTEX_CMPXCHG if FUTEX
 	select HAVE_NMI
 	select NEED_SG_DMA_LENGTH
-	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
+	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
 
 	help
 	  The SuperH is a RISC processor targeted for use in embedded systems
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 0b7f0e0fefa5..ca33c80870e2 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -90,7 +90,7 @@ config SPARC64
 	select ARCH_CLOCKSOURCE_DATA
 	select ARCH_HAS_PTE_SPECIAL
 	select PCI_DOMAINS if PCI
-	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
+	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
 
 config ARCH_DEFCONFIG
 	string
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 68261430fe6e..8ba90f3e0038 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -23,7 +23,7 @@ config X86_64
 	def_bool y
 	depends on 64BIT
 	# Options that are inherently 64-bit kernel only:
-	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
+	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
 	select ARCH_SUPPORTS_INT128
 	select ARCH_USE_CMPXCHG_LOCKREF
 	select HAVE_ARCH_SOFT_DIRTY
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
index 92e4c4b85bba..fab095362c50 100644
--- a/arch/x86/mm/hugetlbpage.c
+++ b/arch/x86/mm/hugetlbpage.c
@@ -203,7 +203,7 @@ static __init int setup_hugepagesz(char *opt)
 }
 __setup("hugepagesz=", setup_hugepagesz);
 
-#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA)
+#ifdef CONFIG_CONTIG_ALLOC
 static __init int gigantic_pages_init(void)
 {
 	/* With compaction or CMA we can allocate gigantic pages at runtime */
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 5f5e25fd6149..1f1ad9aeebb9 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -585,7 +585,7 @@ static inline bool pm_suspended_storage(void)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA)
+#ifdef CONFIG_CONTIG_ALLOC
 /* The below functions must be run on a range from a single zone. */
 extern int alloc_contig_range(unsigned long start, unsigned long end,
 			      unsigned migratetype, gfp_t gfp_mask);
diff --git a/mm/Kconfig b/mm/Kconfig
index 25c71eb8a7db..137eadc18732 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -258,6 +258,9 @@ config ARCH_ENABLE_HUGEPAGE_MIGRATION
 config ARCH_ENABLE_THP_MIGRATION
 	bool
 
+config CONTIG_ALLOC
+       def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
+
 config PHYS_ADDR_T_64BIT
 	def_bool 64BIT
 
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 35fdde041f5c..ac9c45ffb344 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -8024,8 +8024,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count,
 	return true;
 }
 
-#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA)
-
+#ifdef CONFIG_CONTIG_ALLOC
 static unsigned long pfn_max_align_down(unsigned long pfn)
 {
 	return pfn & ~(max_t(unsigned long, MAX_ORDER_NR_PAGES,
-- 
2.20.1


^ permalink raw reply related

* [PATCH v6 4/4] hugetlb: allow to free gigantic pages regardless of the configuration
From: Alexandre Ghiti @ 2019-03-07 13:20 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Catalin Marinas, Will Deacon,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, Yoshinori Sato, Rich Felker,
	David S . Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	H . Peter Anvin, x86, Dave Hansen, Andy Lutomirski,
	Peter Zijlstra, Mike Kravetz, linux-arm-kernel, linux-kernel,
	linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-mm
  Cc: Alexandre Ghiti
In-Reply-To: <20190307132015.26970-1-alex@ghiti.fr>

On systems without CONTIG_ALLOC activated but that support gigantic pages,
boottime reserved gigantic pages can not be freed at all. This patch
simply enables the possibility to hand back those pages to memory
allocator.

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Acked-by: David S. Miller <davem@davemloft.net> [sparc]
---
 arch/arm64/Kconfig                           |  2 +-
 arch/arm64/include/asm/hugetlb.h             |  4 --
 arch/powerpc/include/asm/book3s/64/hugetlb.h |  7 ---
 arch/powerpc/platforms/Kconfig.cputype       |  2 +-
 arch/s390/Kconfig                            |  2 +-
 arch/s390/include/asm/hugetlb.h              |  3 --
 arch/sh/Kconfig                              |  2 +-
 arch/sparc/Kconfig                           |  2 +-
 arch/x86/Kconfig                             |  2 +-
 arch/x86/include/asm/hugetlb.h               |  4 --
 include/linux/gfp.h                          |  2 +-
 mm/hugetlb.c                                 | 57 ++++++++++++--------
 mm/page_alloc.c                              |  4 +-
 13 files changed, 44 insertions(+), 49 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 091a513b93e9..af687eff884a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -18,7 +18,7 @@ config ARM64
 	select ARCH_HAS_FAST_MULTIPLIER
 	select ARCH_HAS_FORTIFY_SOURCE
 	select ARCH_HAS_GCOV_PROFILE_ALL
-	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
+	select ARCH_HAS_GIGANTIC_PAGE
 	select ARCH_HAS_KCOV
 	select ARCH_HAS_MEMBARRIER_SYNC_CORE
 	select ARCH_HAS_PTE_SPECIAL
diff --git a/arch/arm64/include/asm/hugetlb.h b/arch/arm64/include/asm/hugetlb.h
index fb6609875455..59893e766824 100644
--- a/arch/arm64/include/asm/hugetlb.h
+++ b/arch/arm64/include/asm/hugetlb.h
@@ -65,8 +65,4 @@ extern void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr,
 
 #include <asm-generic/hugetlb.h>
 
-#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE
-static inline bool gigantic_page_supported(void) { return true; }
-#endif
-
 #endif /* __ASM_HUGETLB_H */
diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h
index 5b0177733994..d04a0bcc2f1c 100644
--- a/arch/powerpc/include/asm/book3s/64/hugetlb.h
+++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h
@@ -32,13 +32,6 @@ static inline int hstate_get_psize(struct hstate *hstate)
 	}
 }
 
-#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE
-static inline bool gigantic_page_supported(void)
-{
-	return true;
-}
-#endif
-
 /* hugepd entry valid bit */
 #define HUGEPD_VAL_BITS		(0x8000000000000000UL)
 
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index f677c8974212..dc0328de20cd 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -319,7 +319,7 @@ config ARCH_ENABLE_SPLIT_PMD_PTLOCK
 config PPC_RADIX_MMU
 	bool "Radix MMU Support"
 	depends on PPC_BOOK3S_64
-	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
+	select ARCH_HAS_GIGANTIC_PAGE
 	default y
 	help
 	  Enable support for the Power ISA 3.0 Radix style MMU. Currently this
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1c57b83c76f5..d84e536796b1 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -69,7 +69,7 @@ config S390
 	select ARCH_HAS_ELF_RANDOMIZE
 	select ARCH_HAS_FORTIFY_SOURCE
 	select ARCH_HAS_GCOV_PROFILE_ALL
-	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
+	select ARCH_HAS_GIGANTIC_PAGE
 	select ARCH_HAS_KCOV
 	select ARCH_HAS_PTE_SPECIAL
 	select ARCH_HAS_SET_MEMORY
diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h
index 2d1afa58a4b6..bd191560efcf 100644
--- a/arch/s390/include/asm/hugetlb.h
+++ b/arch/s390/include/asm/hugetlb.h
@@ -116,7 +116,4 @@ static inline pte_t huge_pte_modify(pte_t pte, pgprot_t newprot)
 	return pte_modify(pte, newprot);
 }
 
-#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE
-static inline bool gigantic_page_supported(void) { return true; }
-#endif
 #endif /* _ASM_S390_HUGETLB_H */
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index c7266302691c..404b12a0d871 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -53,7 +53,7 @@ config SUPERH
 	select HAVE_FUTEX_CMPXCHG if FUTEX
 	select HAVE_NMI
 	select NEED_SG_DMA_LENGTH
-	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
+	select ARCH_HAS_GIGANTIC_PAGE
 
 	help
 	  The SuperH is a RISC processor targeted for use in embedded systems
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index ca33c80870e2..234a6bd46e89 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -90,7 +90,7 @@ config SPARC64
 	select ARCH_CLOCKSOURCE_DATA
 	select ARCH_HAS_PTE_SPECIAL
 	select PCI_DOMAINS if PCI
-	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
+	select ARCH_HAS_GIGANTIC_PAGE
 
 config ARCH_DEFCONFIG
 	string
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 8ba90f3e0038..ff24eaeef211 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -23,7 +23,7 @@ config X86_64
 	def_bool y
 	depends on 64BIT
 	# Options that are inherently 64-bit kernel only:
-	select ARCH_HAS_GIGANTIC_PAGE if CONTIG_ALLOC
+	select ARCH_HAS_GIGANTIC_PAGE
 	select ARCH_SUPPORTS_INT128
 	select ARCH_USE_CMPXCHG_LOCKREF
 	select HAVE_ARCH_SOFT_DIRTY
diff --git a/arch/x86/include/asm/hugetlb.h b/arch/x86/include/asm/hugetlb.h
index 7469d321f072..f65cfb48cfdd 100644
--- a/arch/x86/include/asm/hugetlb.h
+++ b/arch/x86/include/asm/hugetlb.h
@@ -17,8 +17,4 @@ static inline void arch_clear_hugepage_flags(struct page *page)
 {
 }
 
-#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE
-static inline bool gigantic_page_supported(void) { return true; }
-#endif
-
 #endif /* _ASM_X86_HUGETLB_H */
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 1f1ad9aeebb9..58ea44bf75de 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -589,8 +589,8 @@ static inline bool pm_suspended_storage(void)
 /* The below functions must be run on a range from a single zone. */
 extern int alloc_contig_range(unsigned long start, unsigned long end,
 			      unsigned migratetype, gfp_t gfp_mask);
-extern void free_contig_range(unsigned long pfn, unsigned nr_pages);
 #endif
+extern void free_contig_range(unsigned long pfn, unsigned int nr_pages);
 
 #ifdef CONFIG_CMA
 /* CMA stuff */
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index afef61656c1e..9fc96ef5aa78 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1058,6 +1058,7 @@ static void free_gigantic_page(struct page *page, unsigned int order)
 	free_contig_range(page_to_pfn(page), 1 << order);
 }
 
+#ifdef CONFIG_CONTIG_ALLOC
 static int __alloc_gigantic_page(unsigned long start_pfn,
 				unsigned long nr_pages, gfp_t gfp_mask)
 {
@@ -1142,11 +1143,20 @@ static struct page *alloc_gigantic_page(struct hstate *h, gfp_t gfp_mask,
 
 static void prep_new_huge_page(struct hstate *h, struct page *page, int nid);
 static void prep_compound_gigantic_page(struct page *page, unsigned int order);
+#else /* !CONFIG_CONTIG_ALLOC */
+static struct page *alloc_gigantic_page(struct hstate *h, gfp_t gfp_mask,
+					int nid, nodemask_t *nodemask)
+{
+	return NULL;
+}
+#endif /* CONFIG_CONTIG_ALLOC */
 
 #else /* !CONFIG_ARCH_HAS_GIGANTIC_PAGE */
-static inline bool gigantic_page_supported(void) { return false; }
 static struct page *alloc_gigantic_page(struct hstate *h, gfp_t gfp_mask,
-		int nid, nodemask_t *nodemask) { return NULL; }
+					int nid, nodemask_t *nodemask)
+{
+	return NULL;
+}
 static inline void free_gigantic_page(struct page *page, unsigned int order) { }
 static inline void destroy_compound_gigantic_page(struct page *page,
 						unsigned int order) { }
@@ -1156,9 +1166,6 @@ static void update_and_free_page(struct hstate *h, struct page *page)
 {
 	int i;
 
-	if (hstate_is_gigantic(h) && !gigantic_page_supported())
-		return;
-
 	h->nr_huge_pages--;
 	h->nr_huge_pages_node[page_to_nid(page)]--;
 	for (i = 0; i < pages_per_huge_page(h); i++) {
@@ -2276,13 +2283,27 @@ static int adjust_pool_surplus(struct hstate *h, nodemask_t *nodes_allowed,
 }
 
 #define persistent_huge_pages(h) (h->nr_huge_pages - h->surplus_huge_pages)
-static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count,
-						nodemask_t *nodes_allowed)
+static int set_max_huge_pages(struct hstate *h, unsigned long count,
+			      nodemask_t *nodes_allowed)
 {
 	unsigned long min_count, ret;
 
-	if (hstate_is_gigantic(h) && !gigantic_page_supported())
-		return h->max_huge_pages;
+	spin_lock(&hugetlb_lock);
+
+	/*
+	 * Gigantic pages runtime allocation depend on the capability for large
+	 * page range allocation.
+	 * If the system does not provide this feature, return an error when
+	 * the user tries to allocate gigantic pages but let the user free the
+	 * boottime allocated gigantic pages.
+	 */
+	if (hstate_is_gigantic(h) && !IS_ENABLED(CONFIG_CONTIG_ALLOC)) {
+		if (count > persistent_huge_pages(h)) {
+			spin_unlock(&hugetlb_lock);
+			return -EINVAL;
+		}
+		/* Fall through to decrease pool */
+	}
 
 	/*
 	 * Increase the pool size
@@ -2295,7 +2316,6 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count,
 	 * pool might be one hugepage larger than it needs to be, but
 	 * within all the constraints specified by the sysctls.
 	 */
-	spin_lock(&hugetlb_lock);
 	while (h->surplus_huge_pages && count > persistent_huge_pages(h)) {
 		if (!adjust_pool_surplus(h, nodes_allowed, -1))
 			break;
@@ -2350,9 +2370,10 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count,
 			break;
 	}
 out:
-	ret = persistent_huge_pages(h);
+	h->max_huge_pages = persistent_huge_pages(h);
 	spin_unlock(&hugetlb_lock);
-	return ret;
+
+	return 0;
 }
 
 #define HSTATE_ATTR_RO(_name) \
@@ -2404,11 +2425,6 @@ static ssize_t __nr_hugepages_store_common(bool obey_mempolicy,
 	int err;
 	NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY);
 
-	if (hstate_is_gigantic(h) && !gigantic_page_supported()) {
-		err = -EINVAL;
-		goto out;
-	}
-
 	if (nid == NUMA_NO_NODE) {
 		/*
 		 * global hstate attribute
@@ -2428,15 +2444,12 @@ static ssize_t __nr_hugepages_store_common(bool obey_mempolicy,
 	} else
 		nodes_allowed = &node_states[N_MEMORY];
 
-	h->max_huge_pages = set_max_huge_pages(h, count, nodes_allowed);
+	err = set_max_huge_pages(h, count, nodes_allowed);
 
 	if (nodes_allowed != &node_states[N_MEMORY])
 		NODEMASK_FREE(nodes_allowed);
 
-	return len;
-out:
-	NODEMASK_FREE(nodes_allowed);
-	return err;
+	return err ? err : len;
 }
 
 static ssize_t nr_hugepages_store_common(bool obey_mempolicy,
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ac9c45ffb344..a4547d90fa7a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -8234,8 +8234,9 @@ int alloc_contig_range(unsigned long start, unsigned long end,
 				pfn_max_align_up(end), migratetype);
 	return ret;
 }
+#endif /* CONFIG_CONTIG_ALLOC */
 
-void free_contig_range(unsigned long pfn, unsigned nr_pages)
+void free_contig_range(unsigned long pfn, unsigned int nr_pages)
 {
 	unsigned int count = 0;
 
@@ -8247,7 +8248,6 @@ void free_contig_range(unsigned long pfn, unsigned nr_pages)
 	}
 	WARN(count != 0, "%d pages are still in use!\n", count);
 }
-#endif
 
 #ifdef CONFIG_MEMORY_HOTPLUG
 /*
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH v2 03/10] powerpc/6xx: Store PGDIR physical address in a SPRG
From: Guenter Roeck @ 2019-03-07 14:11 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <297f30d8ba75cb0e9ebe0a776d96c19750105570.1550745320.git.christophe.leroy@c-s.fr>

Hi,

On Thu, Feb 21, 2019 at 10:37:55AM +0000, Christophe Leroy wrote:
> Use SPRN_SPRG2 to store the current thread PGDIR and
> avoid reading thread_struct.pgdir at every TLB miss.
> 
This patch causes a number of silent (no crash) qemu boot stalls
in -next. See
https://kerneltests.org/builders/qemu-ppc-next/builds/1080/steps/qemubuildcommand/logs/stdio
for an example.

Unfortunately, it is not possible to revert the patch due to subsequent
patches, so I was unable to test a revert.

Bisect log is attached.

Guenter

---
# bad: [cf08baa29613dd899954089e7cc7dba1d478b365] Add linux-next specific files for 20190306
# good: [1c163f4c7b3f621efff9b28a47abb36f7378d783] Linux 5.0
git bisect start 'HEAD' 'v5.0'
# bad: [6cc8f3499ec8d31904ab9083980a91736512cb37] Merge remote-tracking branch 'vfs/for-next'
git bisect bad 6cc8f3499ec8d31904ab9083980a91736512cb37
# good: [63bdf4284c38a48af21745ceb148a087b190cd21] Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
git bisect good 63bdf4284c38a48af21745ceb148a087b190cd21
# good: [520b5fc601ab760fee7ea0c403b42d04e8ebfd93] Merge remote-tracking branch 'arm-soc/for-next'
git bisect good 520b5fc601ab760fee7ea0c403b42d04e8ebfd93
# bad: [d7f54e4e0d4e90f5df78da8d6a830bafad3b535a] Merge remote-tracking branch 'xtensa/xtensa-for-next'
git bisect bad d7f54e4e0d4e90f5df78da8d6a830bafad3b535a
# good: [0c1a78523542fb3d2e6c5ac7955c8ca8f6482e6f] Merge remote-tracking branch 'clk/clk-next'
git bisect good 0c1a78523542fb3d2e6c5ac7955c8ca8f6482e6f
# bad: [fb0b0a73b223fc113e961b1d921322844e9c30d9] powerpc: Enable kcov
git bisect bad fb0b0a73b223fc113e961b1d921322844e9c30d9
# good: [d0055df0c9c1471c389197a69f43e300185a75aa] Merge branch 'topic/dma' into next
git bisect good d0055df0c9c1471c389197a69f43e300185a75aa
# good: [0df977eafc792a5365a7f81d8d5920132e03afad] powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in RTAS
git bisect good 0df977eafc792a5365a7f81d8d5920132e03afad
# bad: [665bed2386e5dc29844ad78c7ef1464664b103ec] powerpc/8xx: replace most #ifdef by IS_ENABLED() in 8xx_mmu.c
git bisect bad 665bed2386e5dc29844ad78c7ef1464664b103ec
# bad: [78ca1108b10927b3d068c8da91352b0f4cd01fc5] powerpc/book3s32: Reorder _PAGE_XXX flags to simplify TLB handling
git bisect bad 78ca1108b10927b3d068c8da91352b0f4cd01fc5
# bad: [a8a121995b2e4f227fddc534c6bd5f1c02cbe2ee] powerpc/603: Don't handle kernel page TLB misses when not need
git bisect bad a8a121995b2e4f227fddc534c6bd5f1c02cbe2ee
# bad: [2c12393f577396a51b7e0537bd3eb29dcc26dc1b] powerpc/603: use physical address directly in TLB miss handlers.
git bisect bad 2c12393f577396a51b7e0537bd3eb29dcc26dc1b
# bad: [93c4a162b014d238a287f8264adb25c009c79e61] powerpc/6xx: Store PGDIR physical address in a SPRG
git bisect bad 93c4a162b014d238a287f8264adb25c009c79e61
# first bad commit: [93c4a162b014d238a287f8264adb25c009c79e61] powerpc/6xx: Store PGDIR physical address in a SPRG

^ permalink raw reply

* [PATCH v2] powerpc: silence unused-but-set-variable warnings
From: Qian Cai @ 2019-03-07 14:40 UTC (permalink / raw)
  To: benh, paulus, mpe; +Cc: Qian Cai, linuxppc-dev, linux-kernel

pte_unmap() compiles away on some powerpc platforms, so silence the
warnings below by making it a static inline function.

mm/memory.c: In function 'copy_pte_range':
mm/memory.c:820:24: warning: variable 'orig_dst_pte' set but not used
[-Wunused-but-set-variable]
mm/memory.c:820:9: warning: variable 'orig_src_pte' set but not used
[-Wunused-but-set-variable]
mm/madvise.c: In function 'madvise_free_pte_range':
mm/madvise.c:318:9: warning: variable 'orig_pte' set but not used
[-Wunused-but-set-variable]
mm/swap_state.c: In function 'swap_ra_info':
mm/swap_state.c:634:15: warning: variable 'orig_pte' set but not used
[-Wunused-but-set-variable]

Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Qian Cai <cai@lca.pw>
---

v2: make it a static inline function.

 arch/powerpc/include/asm/book3s/64/pgtable.h | 3 ++-
 arch/powerpc/include/asm/nohash/64/pgtable.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index 868fcaf56f6b..d798e33a0c86 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -1006,7 +1006,8 @@ extern struct page *pgd_page(pgd_t pgd);
 	(((pte_t *) pmd_page_vaddr(*(dir))) + pte_index(addr))
 
 #define pte_offset_map(dir,addr)	pte_offset_kernel((dir), (addr))
-#define pte_unmap(pte)			do { } while(0)
+
+static inline void pte_unmap(pte_t *pte) { }
 
 /* to find an entry in a kernel page-table-directory */
 /* This now only contains the vmalloc pages */
diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h
index e77ed9761632..0384a3302fb6 100644
--- a/arch/powerpc/include/asm/nohash/64/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/64/pgtable.h
@@ -205,7 +205,8 @@ static inline void pgd_set(pgd_t *pgdp, unsigned long val)
   (((pte_t *) pmd_page_vaddr(*(dir))) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
 
 #define pte_offset_map(dir,addr)	pte_offset_kernel((dir), (addr))
-#define pte_unmap(pte)			do { } while(0)
+
+static inline void pte_unmap(pte_t *pte) { }
 
 /* to find an entry in a kernel page-table-directory */
 /* This now only contains the vmalloc pages */
-- 
2.17.2 (Apple Git-113)


^ permalink raw reply related

* [PATCH] powerpc/mm: move warning from resize_hpt_for_hotplug()
From: Laurent Vivier @ 2019-03-07 14:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: linuxppc-dev, Laurent Vivier, David Gibson

resize_hpt_for_hotplug() reports a warning when it cannot
resize the hash page table ("Unable to resize hash page
table to target order") but in some cases it's not a problem
and can make user thinks something has not worked properly.

This patch moves the warning to arch_remove_memory() to
only report the problem when it is needed.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 arch/powerpc/include/asm/sparsemem.h  |  4 ++--
 arch/powerpc/mm/hash_utils_64.c       | 17 ++++++-----------
 arch/powerpc/mm/mem.c                 |  3 ++-
 arch/powerpc/platforms/pseries/lpar.c |  1 -
 4 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/include/asm/sparsemem.h b/arch/powerpc/include/asm/sparsemem.h
index 68da49320592..3192d454a733 100644
--- a/arch/powerpc/include/asm/sparsemem.h
+++ b/arch/powerpc/include/asm/sparsemem.h
@@ -17,9 +17,9 @@ extern int create_section_mapping(unsigned long start, unsigned long end, int ni
 extern int remove_section_mapping(unsigned long start, unsigned long end);
 
 #ifdef CONFIG_PPC_BOOK3S_64
-extern void resize_hpt_for_hotplug(unsigned long new_mem_size);
+extern int resize_hpt_for_hotplug(unsigned long new_mem_size);
 #else
-static inline void resize_hpt_for_hotplug(unsigned long new_mem_size) { }
+static inline int resize_hpt_for_hotplug(unsigned long new_mem_size) { return 0; }
 #endif
 
 #ifdef CONFIG_NUMA
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 0cc7fbc3bd1c..40bb2a8326bb 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -755,12 +755,12 @@ static unsigned long __init htab_get_table_size(void)
 }
 
 #ifdef CONFIG_MEMORY_HOTPLUG
-void resize_hpt_for_hotplug(unsigned long new_mem_size)
+int resize_hpt_for_hotplug(unsigned long new_mem_size)
 {
 	unsigned target_hpt_shift;
 
 	if (!mmu_hash_ops.resize_hpt)
-		return;
+		return 0;
 
 	target_hpt_shift = htab_shift_for_mem_size(new_mem_size);
 
@@ -773,15 +773,10 @@ void resize_hpt_for_hotplug(unsigned long new_mem_size)
 	 * current shift
 	 */
 	if ((target_hpt_shift > ppc64_pft_size)
-	    || (target_hpt_shift < (ppc64_pft_size - 1))) {
-		int rc;
-
-		rc = mmu_hash_ops.resize_hpt(target_hpt_shift);
-		if (rc && (rc != -ENODEV))
-			printk(KERN_WARNING
-			       "Unable to resize hash page table to target order %d: %d\n",
-			       target_hpt_shift, rc);
-	}
+	    || (target_hpt_shift < (ppc64_pft_size - 1)))
+		return mmu_hash_ops.resize_hpt(target_hpt_shift);
+
+	return 0;
 }
 
 int hash__create_section_mapping(unsigned long start, unsigned long end, int nid)
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 33cc6f676fa6..0d40d970cf4a 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -169,7 +169,8 @@ int __meminit arch_remove_memory(int nid, u64 start, u64 size,
 	 */
 	vm_unmap_aliases();
 
-	resize_hpt_for_hotplug(memblock_phys_mem_size());
+	if (resize_hpt_for_hotplug(memblock_phys_mem_size()) == -ENOSPC)
+		pr_warn("Hash collision while resizing HPT\n");
 
 	return ret;
 }
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index f2a9f0adc2d3..b407034a80ba 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -918,7 +918,6 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
 	if (rc != 0) {
 		switch (state.commit_rc) {
 		case H_PTEG_FULL:
-			pr_warn("Hash collision while resizing HPT\n");
 			return -ENOSPC;
 
 		default:
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH v2 03/10] powerpc/6xx: Store PGDIR physical address in a SPRG
From: Christophe Leroy @ 2019-03-07 18:14 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <20190307141143.GA26761@roeck-us.net>

Hi,

On 03/07/2019 02:11 PM, Guenter Roeck wrote:
> Hi,
> 
> On Thu, Feb 21, 2019 at 10:37:55AM +0000, Christophe Leroy wrote:
>> Use SPRN_SPRG2 to store the current thread PGDIR and
>> avoid reading thread_struct.pgdir at every TLB miss.
>>
> This patch causes a number of silent (no crash) qemu boot stalls
> in -next. See
> https://kerneltests.org/builders/qemu-ppc-next/builds/1080/steps/qemubuildcommand/logs/stdio
> for an example.

Oops.
Could you try the fix below ?

diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S 
b/arch/powerpc/kernel/cpu_setup_6xx.S
index 6f1c11e0691f..7534ecff5e92 100644
--- a/arch/powerpc/kernel/cpu_setup_6xx.S
+++ b/arch/powerpc/kernel/cpu_setup_6xx.S
@@ -24,9 +24,6 @@ BEGIN_MMU_FTR_SECTION
  	li	r10,0
  	mtspr	SPRN_SPRG_603_LRU,r10		/* init SW LRU tracking */
  END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)
-	lis	r10, (swapper_pg_dir - PAGE_OFFSET)@h
-	ori	r10, r10, (swapper_pg_dir - PAGE_OFFSET)@l
-	mtspr	SPRN_SPRG_PGDIR, r10

  BEGIN_FTR_SECTION
  	bl	__init_fpu_registers
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index ce6a972f2584..48051c8977c5 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -855,6 +855,9 @@ __secondary_start:
  	li	r3,0
  	stw	r3, RTAS_SP(r4)		/* 0 => not in RTAS */
  #endif
+	lis	r4, (swapper_pg_dir - PAGE_OFFSET)@h
+	ori	r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
+	mtspr	SPRN_SPRG_PGDIR, r4

  	/* enable MMU and jump to start_secondary */
  	li	r4,MSR_KERNEL
@@ -942,6 +945,9 @@ start_here:
  	li	r3,0
  	stw	r3, RTAS_SP(r4)		/* 0 => not in RTAS */
  #endif
+	lis	r4, (swapper_pg_dir - PAGE_OFFSET)@h
+	ori	r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
+	mtspr	SPRN_SPRG_PGDIR, r4

  	/* stack */
  	lis	r1,init_thread_union@ha
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index 1f13494efb2b..587e4550d83e 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -70,12 +70,12 @@ _GLOBAL(hash_page)
  	lis	r0,KERNELBASE@h		/* check if kernel address */
  	cmplw	0,r4,r0
  	ori	r3,r3,_PAGE_USER|_PAGE_PRESENT /* test low addresses as user */
-	mfspr	r5, SPRN_SPRG_PGDIR	/* virt page-table root */
+	mfspr	r5, SPRN_SPRG_PGDIR	/* phys page-table root */
  	blt+	112f			/* assume user more likely */
-	lis	r5,swapper_pg_dir@ha	/* if kernel address, use */
-	addi	r5,r5,swapper_pg_dir@l	/* kernel page table */
+	lis	r5, (swapper_pg_dir - PAGE_OFFSET)@ha	/* if kernel address, use */
+	addi	r5 ,r5 , (swapper_pg_dir - PAGE_OFFSET)@l	/* kernel page table */
  	rlwimi	r3,r9,32-12,29,29	/* MSR_PR -> _PAGE_USER */
-112:	tophys(r5, r5)
+112:
  #ifndef CONFIG_PTE_64BIT
  	rlwimi	r5,r4,12,20,29		/* insert top 10 bits of address */
  	lwz	r8,0(r5)		/* get pmd entry */


Thanks
Christophe

> 
> Unfortunately, it is not possible to revert the patch due to subsequent
> patches, so I was unable to test a revert.
> 
> Bisect log is attached.
> 
> Guenter
> 
> ---
> # bad: [cf08baa29613dd899954089e7cc7dba1d478b365] Add linux-next specific files for 20190306
> # good: [1c163f4c7b3f621efff9b28a47abb36f7378d783] Linux 5.0
> git bisect start 'HEAD' 'v5.0'
> # bad: [6cc8f3499ec8d31904ab9083980a91736512cb37] Merge remote-tracking branch 'vfs/for-next'
> git bisect bad 6cc8f3499ec8d31904ab9083980a91736512cb37
> # good: [63bdf4284c38a48af21745ceb148a087b190cd21] Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
> git bisect good 63bdf4284c38a48af21745ceb148a087b190cd21
> # good: [520b5fc601ab760fee7ea0c403b42d04e8ebfd93] Merge remote-tracking branch 'arm-soc/for-next'
> git bisect good 520b5fc601ab760fee7ea0c403b42d04e8ebfd93
> # bad: [d7f54e4e0d4e90f5df78da8d6a830bafad3b535a] Merge remote-tracking branch 'xtensa/xtensa-for-next'
> git bisect bad d7f54e4e0d4e90f5df78da8d6a830bafad3b535a
> # good: [0c1a78523542fb3d2e6c5ac7955c8ca8f6482e6f] Merge remote-tracking branch 'clk/clk-next'
> git bisect good 0c1a78523542fb3d2e6c5ac7955c8ca8f6482e6f
> # bad: [fb0b0a73b223fc113e961b1d921322844e9c30d9] powerpc: Enable kcov
> git bisect bad fb0b0a73b223fc113e961b1d921322844e9c30d9
> # good: [d0055df0c9c1471c389197a69f43e300185a75aa] Merge branch 'topic/dma' into next
> git bisect good d0055df0c9c1471c389197a69f43e300185a75aa
> # good: [0df977eafc792a5365a7f81d8d5920132e03afad] powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in RTAS
> git bisect good 0df977eafc792a5365a7f81d8d5920132e03afad
> # bad: [665bed2386e5dc29844ad78c7ef1464664b103ec] powerpc/8xx: replace most #ifdef by IS_ENABLED() in 8xx_mmu.c
> git bisect bad 665bed2386e5dc29844ad78c7ef1464664b103ec
> # bad: [78ca1108b10927b3d068c8da91352b0f4cd01fc5] powerpc/book3s32: Reorder _PAGE_XXX flags to simplify TLB handling
> git bisect bad 78ca1108b10927b3d068c8da91352b0f4cd01fc5
> # bad: [a8a121995b2e4f227fddc534c6bd5f1c02cbe2ee] powerpc/603: Don't handle kernel page TLB misses when not need
> git bisect bad a8a121995b2e4f227fddc534c6bd5f1c02cbe2ee
> # bad: [2c12393f577396a51b7e0537bd3eb29dcc26dc1b] powerpc/603: use physical address directly in TLB miss handlers.
> git bisect bad 2c12393f577396a51b7e0537bd3eb29dcc26dc1b
> # bad: [93c4a162b014d238a287f8264adb25c009c79e61] powerpc/6xx: Store PGDIR physical address in a SPRG
> git bisect bad 93c4a162b014d238a287f8264adb25c009c79e61
> # first bad commit: [93c4a162b014d238a287f8264adb25c009c79e61] powerpc/6xx: Store PGDIR physical address in a SPRG
> 

^ permalink raw reply related

* Re: [PATCH v2 03/10] powerpc/6xx: Store PGDIR physical address in a SPRG
From: Guenter Roeck @ 2019-03-07 19:07 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <2acc1691-0f74-8843-ecdd-64ba8705de20@c-s.fr>

On Thu, Mar 07, 2019 at 06:14:09PM +0000, Christophe Leroy wrote:
> Hi,
> 
> On 03/07/2019 02:11 PM, Guenter Roeck wrote:
> >Hi,
> >
> >On Thu, Feb 21, 2019 at 10:37:55AM +0000, Christophe Leroy wrote:
> >>Use SPRN_SPRG2 to store the current thread PGDIR and
> >>avoid reading thread_struct.pgdir at every TLB miss.
> >>
> >This patch causes a number of silent (no crash) qemu boot stalls
> >in -next. See
> >https://kerneltests.org/builders/qemu-ppc-next/builds/1080/steps/qemubuildcommand/logs/stdio
> >for an example.
> 
> Oops.
> Could you try the fix below ?
> 

Yes, that does the trick. With this patch applied on top of next-20190306,
all my ppc qemu boot tests pass.

Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S
> b/arch/powerpc/kernel/cpu_setup_6xx.S
> index 6f1c11e0691f..7534ecff5e92 100644
> --- a/arch/powerpc/kernel/cpu_setup_6xx.S
> +++ b/arch/powerpc/kernel/cpu_setup_6xx.S
> @@ -24,9 +24,6 @@ BEGIN_MMU_FTR_SECTION
>  	li	r10,0
>  	mtspr	SPRN_SPRG_603_LRU,r10		/* init SW LRU tracking */
>  END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)
> -	lis	r10, (swapper_pg_dir - PAGE_OFFSET)@h
> -	ori	r10, r10, (swapper_pg_dir - PAGE_OFFSET)@l
> -	mtspr	SPRN_SPRG_PGDIR, r10
> 
>  BEGIN_FTR_SECTION
>  	bl	__init_fpu_registers
> diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
> index ce6a972f2584..48051c8977c5 100644
> --- a/arch/powerpc/kernel/head_32.S
> +++ b/arch/powerpc/kernel/head_32.S
> @@ -855,6 +855,9 @@ __secondary_start:
>  	li	r3,0
>  	stw	r3, RTAS_SP(r4)		/* 0 => not in RTAS */
>  #endif
> +	lis	r4, (swapper_pg_dir - PAGE_OFFSET)@h
> +	ori	r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
> +	mtspr	SPRN_SPRG_PGDIR, r4
> 
>  	/* enable MMU and jump to start_secondary */
>  	li	r4,MSR_KERNEL
> @@ -942,6 +945,9 @@ start_here:
>  	li	r3,0
>  	stw	r3, RTAS_SP(r4)		/* 0 => not in RTAS */
>  #endif
> +	lis	r4, (swapper_pg_dir - PAGE_OFFSET)@h
> +	ori	r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
> +	mtspr	SPRN_SPRG_PGDIR, r4
> 
>  	/* stack */
>  	lis	r1,init_thread_union@ha
> diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
> index 1f13494efb2b..587e4550d83e 100644
> --- a/arch/powerpc/mm/hash_low_32.S
> +++ b/arch/powerpc/mm/hash_low_32.S
> @@ -70,12 +70,12 @@ _GLOBAL(hash_page)
>  	lis	r0,KERNELBASE@h		/* check if kernel address */
>  	cmplw	0,r4,r0
>  	ori	r3,r3,_PAGE_USER|_PAGE_PRESENT /* test low addresses as user */
> -	mfspr	r5, SPRN_SPRG_PGDIR	/* virt page-table root */
> +	mfspr	r5, SPRN_SPRG_PGDIR	/* phys page-table root */
>  	blt+	112f			/* assume user more likely */
> -	lis	r5,swapper_pg_dir@ha	/* if kernel address, use */
> -	addi	r5,r5,swapper_pg_dir@l	/* kernel page table */
> +	lis	r5, (swapper_pg_dir - PAGE_OFFSET)@ha	/* if kernel address, use */
> +	addi	r5 ,r5 , (swapper_pg_dir - PAGE_OFFSET)@l	/* kernel page table */
>  	rlwimi	r3,r9,32-12,29,29	/* MSR_PR -> _PAGE_USER */
> -112:	tophys(r5, r5)
> +112:
>  #ifndef CONFIG_PTE_64BIT
>  	rlwimi	r5,r4,12,20,29		/* insert top 10 bits of address */
>  	lwz	r8,0(r5)		/* get pmd entry */
> 
> 
> Thanks
> Christophe
> 
> >
> >Unfortunately, it is not possible to revert the patch due to subsequent
> >patches, so I was unable to test a revert.
> >
> >Bisect log is attached.
> >
> >Guenter
> >
> >---
> ># bad: [cf08baa29613dd899954089e7cc7dba1d478b365] Add linux-next specific files for 20190306
> ># good: [1c163f4c7b3f621efff9b28a47abb36f7378d783] Linux 5.0
> >git bisect start 'HEAD' 'v5.0'
> ># bad: [6cc8f3499ec8d31904ab9083980a91736512cb37] Merge remote-tracking branch 'vfs/for-next'
> >git bisect bad 6cc8f3499ec8d31904ab9083980a91736512cb37
> ># good: [63bdf4284c38a48af21745ceb148a087b190cd21] Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
> >git bisect good 63bdf4284c38a48af21745ceb148a087b190cd21
> ># good: [520b5fc601ab760fee7ea0c403b42d04e8ebfd93] Merge remote-tracking branch 'arm-soc/for-next'
> >git bisect good 520b5fc601ab760fee7ea0c403b42d04e8ebfd93
> ># bad: [d7f54e4e0d4e90f5df78da8d6a830bafad3b535a] Merge remote-tracking branch 'xtensa/xtensa-for-next'
> >git bisect bad d7f54e4e0d4e90f5df78da8d6a830bafad3b535a
> ># good: [0c1a78523542fb3d2e6c5ac7955c8ca8f6482e6f] Merge remote-tracking branch 'clk/clk-next'
> >git bisect good 0c1a78523542fb3d2e6c5ac7955c8ca8f6482e6f
> ># bad: [fb0b0a73b223fc113e961b1d921322844e9c30d9] powerpc: Enable kcov
> >git bisect bad fb0b0a73b223fc113e961b1d921322844e9c30d9
> ># good: [d0055df0c9c1471c389197a69f43e300185a75aa] Merge branch 'topic/dma' into next
> >git bisect good d0055df0c9c1471c389197a69f43e300185a75aa
> ># good: [0df977eafc792a5365a7f81d8d5920132e03afad] powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in RTAS
> >git bisect good 0df977eafc792a5365a7f81d8d5920132e03afad
> ># bad: [665bed2386e5dc29844ad78c7ef1464664b103ec] powerpc/8xx: replace most #ifdef by IS_ENABLED() in 8xx_mmu.c
> >git bisect bad 665bed2386e5dc29844ad78c7ef1464664b103ec
> ># bad: [78ca1108b10927b3d068c8da91352b0f4cd01fc5] powerpc/book3s32: Reorder _PAGE_XXX flags to simplify TLB handling
> >git bisect bad 78ca1108b10927b3d068c8da91352b0f4cd01fc5
> ># bad: [a8a121995b2e4f227fddc534c6bd5f1c02cbe2ee] powerpc/603: Don't handle kernel page TLB misses when not need
> >git bisect bad a8a121995b2e4f227fddc534c6bd5f1c02cbe2ee
> ># bad: [2c12393f577396a51b7e0537bd3eb29dcc26dc1b] powerpc/603: use physical address directly in TLB miss handlers.
> >git bisect bad 2c12393f577396a51b7e0537bd3eb29dcc26dc1b
> ># bad: [93c4a162b014d238a287f8264adb25c009c79e61] powerpc/6xx: Store PGDIR physical address in a SPRG
> >git bisect bad 93c4a162b014d238a287f8264adb25c009c79e61
> ># first bad commit: [93c4a162b014d238a287f8264adb25c009c79e61] powerpc/6xx: Store PGDIR physical address in a SPRG
> >

^ permalink raw reply

* Re: [PATCH v2 03/10] powerpc/6xx: Store PGDIR physical address in a SPRG
From: Christophe Leroy @ 2019-03-07 19:10 UTC (permalink / raw)
  To: Guenter Roeck, Michael Ellerman
  Cc: linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <20190307190748.GA21622@roeck-us.net>



Le 07/03/2019 à 20:07, Guenter Roeck a écrit :
> On Thu, Mar 07, 2019 at 06:14:09PM +0000, Christophe Leroy wrote:
>> Hi,
>>
>> On 03/07/2019 02:11 PM, Guenter Roeck wrote:
>>> Hi,
>>>
>>> On Thu, Feb 21, 2019 at 10:37:55AM +0000, Christophe Leroy wrote:
>>>> Use SPRN_SPRG2 to store the current thread PGDIR and
>>>> avoid reading thread_struct.pgdir at every TLB miss.
>>>>
>>> This patch causes a number of silent (no crash) qemu boot stalls
>>> in -next. See
>>> https://kerneltests.org/builders/qemu-ppc-next/builds/1080/steps/qemubuildcommand/logs/stdio
>>> for an example.
>>
>> Oops.
>> Could you try the fix below ?
>>
> 
> Yes, that does the trick. With this patch applied on top of next-20190306,
> all my ppc qemu boot tests pass.
> 
> Tested-by: Guenter Roeck <linux@roeck-us.net>

Thanks for testing.

I'll send a proper patch tomorrow morning, sorry for that.

Christophe

> 
> Guenter
> 
>> diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S
>> b/arch/powerpc/kernel/cpu_setup_6xx.S
>> index 6f1c11e0691f..7534ecff5e92 100644
>> --- a/arch/powerpc/kernel/cpu_setup_6xx.S
>> +++ b/arch/powerpc/kernel/cpu_setup_6xx.S
>> @@ -24,9 +24,6 @@ BEGIN_MMU_FTR_SECTION
>>   	li	r10,0
>>   	mtspr	SPRN_SPRG_603_LRU,r10		/* init SW LRU tracking */
>>   END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)
>> -	lis	r10, (swapper_pg_dir - PAGE_OFFSET)@h
>> -	ori	r10, r10, (swapper_pg_dir - PAGE_OFFSET)@l
>> -	mtspr	SPRN_SPRG_PGDIR, r10
>>
>>   BEGIN_FTR_SECTION
>>   	bl	__init_fpu_registers
>> diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
>> index ce6a972f2584..48051c8977c5 100644
>> --- a/arch/powerpc/kernel/head_32.S
>> +++ b/arch/powerpc/kernel/head_32.S
>> @@ -855,6 +855,9 @@ __secondary_start:
>>   	li	r3,0
>>   	stw	r3, RTAS_SP(r4)		/* 0 => not in RTAS */
>>   #endif
>> +	lis	r4, (swapper_pg_dir - PAGE_OFFSET)@h
>> +	ori	r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
>> +	mtspr	SPRN_SPRG_PGDIR, r4
>>
>>   	/* enable MMU and jump to start_secondary */
>>   	li	r4,MSR_KERNEL
>> @@ -942,6 +945,9 @@ start_here:
>>   	li	r3,0
>>   	stw	r3, RTAS_SP(r4)		/* 0 => not in RTAS */
>>   #endif
>> +	lis	r4, (swapper_pg_dir - PAGE_OFFSET)@h
>> +	ori	r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
>> +	mtspr	SPRN_SPRG_PGDIR, r4
>>
>>   	/* stack */
>>   	lis	r1,init_thread_union@ha
>> diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
>> index 1f13494efb2b..587e4550d83e 100644
>> --- a/arch/powerpc/mm/hash_low_32.S
>> +++ b/arch/powerpc/mm/hash_low_32.S
>> @@ -70,12 +70,12 @@ _GLOBAL(hash_page)
>>   	lis	r0,KERNELBASE@h		/* check if kernel address */
>>   	cmplw	0,r4,r0
>>   	ori	r3,r3,_PAGE_USER|_PAGE_PRESENT /* test low addresses as user */
>> -	mfspr	r5, SPRN_SPRG_PGDIR	/* virt page-table root */
>> +	mfspr	r5, SPRN_SPRG_PGDIR	/* phys page-table root */
>>   	blt+	112f			/* assume user more likely */
>> -	lis	r5,swapper_pg_dir@ha	/* if kernel address, use */
>> -	addi	r5,r5,swapper_pg_dir@l	/* kernel page table */
>> +	lis	r5, (swapper_pg_dir - PAGE_OFFSET)@ha	/* if kernel address, use */
>> +	addi	r5 ,r5 , (swapper_pg_dir - PAGE_OFFSET)@l	/* kernel page table */
>>   	rlwimi	r3,r9,32-12,29,29	/* MSR_PR -> _PAGE_USER */
>> -112:	tophys(r5, r5)
>> +112:
>>   #ifndef CONFIG_PTE_64BIT
>>   	rlwimi	r5,r4,12,20,29		/* insert top 10 bits of address */
>>   	lwz	r8,0(r5)		/* get pmd entry */
>>
>>
>> Thanks
>> Christophe
>>
>>>
>>> Unfortunately, it is not possible to revert the patch due to subsequent
>>> patches, so I was unable to test a revert.
>>>
>>> Bisect log is attached.
>>>
>>> Guenter
>>>
>>> ---
>>> # bad: [cf08baa29613dd899954089e7cc7dba1d478b365] Add linux-next specific files for 20190306
>>> # good: [1c163f4c7b3f621efff9b28a47abb36f7378d783] Linux 5.0
>>> git bisect start 'HEAD' 'v5.0'
>>> # bad: [6cc8f3499ec8d31904ab9083980a91736512cb37] Merge remote-tracking branch 'vfs/for-next'
>>> git bisect bad 6cc8f3499ec8d31904ab9083980a91736512cb37
>>> # good: [63bdf4284c38a48af21745ceb148a087b190cd21] Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
>>> git bisect good 63bdf4284c38a48af21745ceb148a087b190cd21
>>> # good: [520b5fc601ab760fee7ea0c403b42d04e8ebfd93] Merge remote-tracking branch 'arm-soc/for-next'
>>> git bisect good 520b5fc601ab760fee7ea0c403b42d04e8ebfd93
>>> # bad: [d7f54e4e0d4e90f5df78da8d6a830bafad3b535a] Merge remote-tracking branch 'xtensa/xtensa-for-next'
>>> git bisect bad d7f54e4e0d4e90f5df78da8d6a830bafad3b535a
>>> # good: [0c1a78523542fb3d2e6c5ac7955c8ca8f6482e6f] Merge remote-tracking branch 'clk/clk-next'
>>> git bisect good 0c1a78523542fb3d2e6c5ac7955c8ca8f6482e6f
>>> # bad: [fb0b0a73b223fc113e961b1d921322844e9c30d9] powerpc: Enable kcov
>>> git bisect bad fb0b0a73b223fc113e961b1d921322844e9c30d9
>>> # good: [d0055df0c9c1471c389197a69f43e300185a75aa] Merge branch 'topic/dma' into next
>>> git bisect good d0055df0c9c1471c389197a69f43e300185a75aa
>>> # good: [0df977eafc792a5365a7f81d8d5920132e03afad] powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in RTAS
>>> git bisect good 0df977eafc792a5365a7f81d8d5920132e03afad
>>> # bad: [665bed2386e5dc29844ad78c7ef1464664b103ec] powerpc/8xx: replace most #ifdef by IS_ENABLED() in 8xx_mmu.c
>>> git bisect bad 665bed2386e5dc29844ad78c7ef1464664b103ec
>>> # bad: [78ca1108b10927b3d068c8da91352b0f4cd01fc5] powerpc/book3s32: Reorder _PAGE_XXX flags to simplify TLB handling
>>> git bisect bad 78ca1108b10927b3d068c8da91352b0f4cd01fc5
>>> # bad: [a8a121995b2e4f227fddc534c6bd5f1c02cbe2ee] powerpc/603: Don't handle kernel page TLB misses when not need
>>> git bisect bad a8a121995b2e4f227fddc534c6bd5f1c02cbe2ee
>>> # bad: [2c12393f577396a51b7e0537bd3eb29dcc26dc1b] powerpc/603: use physical address directly in TLB miss handlers.
>>> git bisect bad 2c12393f577396a51b7e0537bd3eb29dcc26dc1b
>>> # bad: [93c4a162b014d238a287f8264adb25c009c79e61] powerpc/6xx: Store PGDIR physical address in a SPRG
>>> git bisect bad 93c4a162b014d238a287f8264adb25c009c79e61
>>> # first bad commit: [93c4a162b014d238a287f8264adb25c009c79e61] powerpc/6xx: Store PGDIR physical address in a SPRG
>>>

^ permalink raw reply

* Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.1-1 tag
From: pr-tracker-bot @ 2019-03-07 21:40 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: mark.rutland, sbobroff, maddy, clombard, gustavo, aik, jniethe5,
	mark.cave-ayland, peterx, yamada.masahiro, oohall, sandipan,
	mcroce, leitao, rashmica.g, hch, sergey.senozhatsky.work,
	joe.lawrence, sabyasachi.linux, aneesh.kumar, yuehaibing, rppt,
	firoz.khan, clabbe, nfont, rpjday, joel, igor.stoppa, nstange,
	prasannatsmkumar, j.neuschaefer, npiggin, cai, tyreld,
	natechancellor, arbab, dvyukov, chunkeey, geoff, linuxppc-dev,
	linux-kernel, malat, tglx, jrdr.linux, andrew.donnellan,
	brajeswar.linux, fbarrat, vaibhav, Linus Torvalds
In-Reply-To: <87a7i6x1yk.fsf@concordia.ellerman.id.au>

The pull request you sent on Fri, 08 Mar 2019 00:12:51 +1100:

> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerpc-5.1-1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6c3ac1134371b51c9601171af2c32153ccb11100

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply

* Re: [PATCH] powerpc/mm: move warning from resize_hpt_for_hotplug()
From: David Gibson @ 2019-03-08  0:09 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20190307145050.17886-1-lvivier@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4494 bytes --]

On Thu, Mar 07, 2019 at 03:50:50PM +0100, Laurent Vivier wrote:
> resize_hpt_for_hotplug() reports a warning when it cannot
> resize the hash page table ("Unable to resize hash page
> table to target order") but in some cases it's not a problem
> and can make user thinks something has not worked properly.
> 
> This patch moves the warning to arch_remove_memory() to
> only report the problem when it is needed.
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Looks ok, but apart from the H_PTEG_FULL case this does allow for some
error paths that previously warned to pass without error, which I
don't think is wise.

Specifically that will happen the prepare hcall returns H_PARAMETER or
H_RESOURCE.  Thse will result in -EINVAL or -EPERM from
pseries_lpar_resize_hpt() which previously would have tripped the
warning in resize_hpt_for_hotplug() but now will be silently ignored.

> ---
>  arch/powerpc/include/asm/sparsemem.h  |  4 ++--
>  arch/powerpc/mm/hash_utils_64.c       | 17 ++++++-----------
>  arch/powerpc/mm/mem.c                 |  3 ++-
>  arch/powerpc/platforms/pseries/lpar.c |  1 -
>  4 files changed, 10 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/sparsemem.h b/arch/powerpc/include/asm/sparsemem.h
> index 68da49320592..3192d454a733 100644
> --- a/arch/powerpc/include/asm/sparsemem.h
> +++ b/arch/powerpc/include/asm/sparsemem.h
> @@ -17,9 +17,9 @@ extern int create_section_mapping(unsigned long start, unsigned long end, int ni
>  extern int remove_section_mapping(unsigned long start, unsigned long end);
>  
>  #ifdef CONFIG_PPC_BOOK3S_64
> -extern void resize_hpt_for_hotplug(unsigned long new_mem_size);
> +extern int resize_hpt_for_hotplug(unsigned long new_mem_size);
>  #else
> -static inline void resize_hpt_for_hotplug(unsigned long new_mem_size) { }
> +static inline int resize_hpt_for_hotplug(unsigned long new_mem_size) { return 0; }
>  #endif
>  
>  #ifdef CONFIG_NUMA
> diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
> index 0cc7fbc3bd1c..40bb2a8326bb 100644
> --- a/arch/powerpc/mm/hash_utils_64.c
> +++ b/arch/powerpc/mm/hash_utils_64.c
> @@ -755,12 +755,12 @@ static unsigned long __init htab_get_table_size(void)
>  }
>  
>  #ifdef CONFIG_MEMORY_HOTPLUG
> -void resize_hpt_for_hotplug(unsigned long new_mem_size)
> +int resize_hpt_for_hotplug(unsigned long new_mem_size)
>  {
>  	unsigned target_hpt_shift;
>  
>  	if (!mmu_hash_ops.resize_hpt)
> -		return;
> +		return 0;
>  
>  	target_hpt_shift = htab_shift_for_mem_size(new_mem_size);
>  
> @@ -773,15 +773,10 @@ void resize_hpt_for_hotplug(unsigned long new_mem_size)
>  	 * current shift
>  	 */
>  	if ((target_hpt_shift > ppc64_pft_size)
> -	    || (target_hpt_shift < (ppc64_pft_size - 1))) {
> -		int rc;
> -
> -		rc = mmu_hash_ops.resize_hpt(target_hpt_shift);
> -		if (rc && (rc != -ENODEV))
> -			printk(KERN_WARNING
> -			       "Unable to resize hash page table to target order %d: %d\n",
> -			       target_hpt_shift, rc);
> -	}
> +	    || (target_hpt_shift < (ppc64_pft_size - 1)))
> +		return mmu_hash_ops.resize_hpt(target_hpt_shift);
> +
> +	return 0;
>  }
>  
>  int hash__create_section_mapping(unsigned long start, unsigned long end, int nid)
> diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
> index 33cc6f676fa6..0d40d970cf4a 100644
> --- a/arch/powerpc/mm/mem.c
> +++ b/arch/powerpc/mm/mem.c
> @@ -169,7 +169,8 @@ int __meminit arch_remove_memory(int nid, u64 start, u64 size,
>  	 */
>  	vm_unmap_aliases();
>  
> -	resize_hpt_for_hotplug(memblock_phys_mem_size());
> +	if (resize_hpt_for_hotplug(memblock_phys_mem_size()) == -ENOSPC)
> +		pr_warn("Hash collision while resizing HPT\n");
>  
>  	return ret;
>  }
> diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
> index f2a9f0adc2d3..b407034a80ba 100644
> --- a/arch/powerpc/platforms/pseries/lpar.c
> +++ b/arch/powerpc/platforms/pseries/lpar.c
> @@ -918,7 +918,6 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
>  	if (rc != 0) {
>  		switch (state.commit_rc) {
>  		case H_PTEG_FULL:
> -			pr_warn("Hash collision while resizing HPT\n");
>  			return -ENOSPC;
>  
>  		default:

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply

* [PATCH v5 01/10] powerpc/powernv/idle: Restore IAMR after idle
From: Michael Ellerman @ 2019-03-08  1:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: npiggin

From: Russell Currey <ruscur@russell.cc>

Without restoring the IAMR after idle, execution prevention on POWER9
with Radix MMU is overwritten and the kernel can freely execute
userspace without faulting.

This is necessary when returning from any stop state that modifies
user state, as well as hypervisor state.

To test how this fails without this patch, load the lkdtm driver and
do the following:

  $ echo EXEC_USERSPACE > /sys/kernel/debug/provoke-crash/DIRECT

which won't fault, then boot the kernel with powersave=off, where it
will fault. Applying this patch will fix this.

Fixes: 3b10d0095a1e ("powerpc/mm/radix: Prevent kernel execution of user space")
Cc: stable@vger.kernel.org # v4.10+
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
v5: Unchanged.
v4: mpe: Use a #define for the stack slot.

 arch/powerpc/kernel/idle_book3s.S | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
index 7f5ac2e8581b..36178000a2f2 100644
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -170,6 +170,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300)
 	bne-	core_idle_lock_held
 	blr
 
+/* Reuse an unused pt_regs slot for IAMR */
+#define PNV_POWERSAVE_IAMR	_DAR
+
 /*
  * Pass requested state in r3:
  *	r3 - PNV_THREAD_NAP/SLEEP/WINKLE in POWER8
@@ -200,6 +203,12 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300)
 	/* Continue saving state */
 	SAVE_GPR(2, r1)
 	SAVE_NVGPRS(r1)
+
+BEGIN_FTR_SECTION
+	mfspr	r5, SPRN_IAMR
+	std	r5, PNV_POWERSAVE_IAMR(r1)
+END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
+
 	mfcr	r5
 	std	r5,_CCR(r1)
 	std	r1,PACAR1(r13)
@@ -924,6 +933,17 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
 	REST_NVGPRS(r1)
 	REST_GPR(2, r1)
+
+BEGIN_FTR_SECTION
+	/* IAMR was saved in pnv_powersave_common() */
+	ld	r5, PNV_POWERSAVE_IAMR(r1)
+	mtspr	SPRN_IAMR, r5
+	/*
+	 * We don't need an isync here because the upcoming mtmsrd is
+	 * execution synchronizing.
+	 */
+END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
+
 	ld	r4,PACAKMSR(r13)
 	ld	r5,_LINK(r1)
 	ld	r6,_CCR(r1)
-- 
2.20.1


^ permalink raw reply related

* [PATCH v5 02/10] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle
From: Michael Ellerman @ 2019-03-08  1:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: npiggin
In-Reply-To: <20190308011619.22402-1-mpe@ellerman.id.au>

In order to implement KUAP (Kernel Userspace Access Protection) on
Power9 we will be using the AMR, and therefore indirectly the
UAMOR/AMOR.

So save/restore these regs in the idle code.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
v5: Unchanged.
v4: New.

 arch/powerpc/kernel/idle_book3s.S | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
index 36178000a2f2..4a860d3b9229 100644
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -170,8 +170,11 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300)
 	bne-	core_idle_lock_held
 	blr
 
-/* Reuse an unused pt_regs slot for IAMR */
+/* Reuse some unused pt_regs slots for AMR/IAMR/UAMOR/UAMOR */
+#define PNV_POWERSAVE_AMR	_TRAP
 #define PNV_POWERSAVE_IAMR	_DAR
+#define PNV_POWERSAVE_UAMOR	_DSISR
+#define PNV_POWERSAVE_AMOR	RESULT
 
 /*
  * Pass requested state in r3:
@@ -205,8 +208,16 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300)
 	SAVE_NVGPRS(r1)
 
 BEGIN_FTR_SECTION
+	mfspr	r4, SPRN_AMR
 	mfspr	r5, SPRN_IAMR
+	mfspr	r6, SPRN_UAMOR
+	std	r4, PNV_POWERSAVE_AMR(r1)
 	std	r5, PNV_POWERSAVE_IAMR(r1)
+	std	r6, PNV_POWERSAVE_UAMOR(r1)
+BEGIN_FTR_SECTION_NESTED(42)
+	mfspr	r7, SPRN_AMOR
+	std	r7, PNV_POWERSAVE_AMOR(r1)
+END_FTR_SECTION_NESTED_IFSET(CPU_FTR_HVMODE, 42)
 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
 
 	mfcr	r5
@@ -935,12 +946,20 @@ END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
 	REST_GPR(2, r1)
 
 BEGIN_FTR_SECTION
-	/* IAMR was saved in pnv_powersave_common() */
+	/* These regs were saved in pnv_powersave_common() */
+	ld	r4, PNV_POWERSAVE_AMR(r1)
 	ld	r5, PNV_POWERSAVE_IAMR(r1)
+	ld	r6, PNV_POWERSAVE_UAMOR(r1)
+	mtspr	SPRN_AMR, r4
 	mtspr	SPRN_IAMR, r5
+	mtspr	SPRN_UAMOR, r6
+BEGIN_FTR_SECTION_NESTED(42)
+	ld	r7, PNV_POWERSAVE_AMOR(r1)
+	mtspr	SPRN_AMOR, r7
+END_FTR_SECTION_NESTED_IFSET(CPU_FTR_HVMODE, 42)
 	/*
-	 * We don't need an isync here because the upcoming mtmsrd is
-	 * execution synchronizing.
+	 * We don't need an isync here after restoring IAMR because the upcoming
+	 * mtmsrd is execution synchronizing.
 	 */
 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
 
-- 
2.20.1


^ permalink raw reply related

* [PATCH v5 03/10] powerpc: Add framework for Kernel Userspace Protection
From: Michael Ellerman @ 2019-03-08  1:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: npiggin
In-Reply-To: <20190308011619.22402-1-mpe@ellerman.id.au>

From: Christophe Leroy <christophe.leroy@c-s.fr>

This patch adds a skeleton for Kernel Userspace Protection
functionnalities like Kernel Userspace Access Protection and Kernel
Userspace Execution Prevention

The subsequent implementation of KUAP for radix makes use of a MMU
feature in order to patch out assembly when KUAP is disabled or
unsupported. This won't work unless there's an entry point for KUP
support before the feature magic happens, so for PPC64 setup_kup() is
called early in setup.

On PPC32, feature_fixup() is done too early to allow the same.

Suggested-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
v5: Unchanged.
v4: Unchanged.

 arch/powerpc/include/asm/kup.h | 11 +++++++++++
 arch/powerpc/kernel/setup_64.c |  7 +++++++
 arch/powerpc/mm/init-common.c  |  5 +++++
 arch/powerpc/mm/init_32.c      |  3 +++
 4 files changed, 26 insertions(+)
 create mode 100644 arch/powerpc/include/asm/kup.h

diff --git a/arch/powerpc/include/asm/kup.h b/arch/powerpc/include/asm/kup.h
new file mode 100644
index 000000000000..7a88b8b9b54d
--- /dev/null
+++ b/arch/powerpc/include/asm/kup.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_POWERPC_KUP_H_
+#define _ASM_POWERPC_KUP_H_
+
+#ifndef __ASSEMBLY__
+
+void setup_kup(void);
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_POWERPC_KUP_H_ */
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index daa361fc6a24..47ffa0885081 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -68,6 +68,7 @@
 #include <asm/cputhreads.h>
 #include <asm/hw_irq.h>
 #include <asm/feature-fixups.h>
+#include <asm/kup.h>
 
 #include "setup.h"
 
@@ -331,6 +332,12 @@ void __init early_setup(unsigned long dt_ptr)
 	 */
 	configure_exceptions();
 
+	/*
+	 * Configure Kernel Userspace Protection. This needs to happen before
+	 * feature fixups for platforms that implement this using features.
+	 */
+	setup_kup();
+
 	/* Apply all the dynamic patching */
 	apply_feature_fixups();
 	setup_feature_keys();
diff --git a/arch/powerpc/mm/init-common.c b/arch/powerpc/mm/init-common.c
index 1e6910eb70ed..36d28e872289 100644
--- a/arch/powerpc/mm/init-common.c
+++ b/arch/powerpc/mm/init-common.c
@@ -24,6 +24,11 @@
 #include <linux/string.h>
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
+#include <asm/kup.h>
+
+void __init setup_kup(void)
+{
+}
 
 #define CTOR(shift) static void ctor_##shift(void *addr) \
 {							\
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 41a3513cadc9..80cc97cd8878 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -45,6 +45,7 @@
 #include <asm/tlb.h>
 #include <asm/sections.h>
 #include <asm/hugetlb.h>
+#include <asm/kup.h>
 
 #include "mmu_decl.h"
 
@@ -178,6 +179,8 @@ void __init MMU_init(void)
 	btext_unmap();
 #endif
 
+	setup_kup();
+
 	/* Shortly after that, the entire linear mapping will be available */
 	memblock_set_current_limit(lowmem_end_addr);
 }
-- 
2.20.1


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox