Re: [PATCH 13/16] debug_vm_pgtable/pmd_clear: Don't use pmd/pud_clear on pte entries

2020-08-13 Thread Aneesh Kumar K.V
On 8/13/20 10:57 AM, Anshuman Khandual wrote: On 08/12/2020 12:03 PM, Aneesh Kumar K.V wrote: pmd_clear() should not be used to clear pmd level pte entries. Could you please elaborate on this. The proposed change set does not match the description here. pmd_clear is implemented such that

[PATCH] powerpc: Drop _nmask_and_or_msr()

2020-08-13 Thread Christophe Leroy
_nmask_and_or_msr() is only used at two places to set MSR_IP. The SYNC is unnecessary as the users are not PowerPC 601. Can be easily writen in C. Do it, and drop _nmask_and_or_msr() Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/misc_32.S | 13 - arch

[PATCH 1/5] powerpc: Remove flush_instruction_cache for book3s/32

2020-08-13 Thread Christophe Leroy
The only callers of flush_instruction_cache() are: arch/powerpc/kernel/swsusp_booke.S: bl flush_instruction_cache arch/powerpc/mm/nohash/40x.c: flush_instruction_cache(); arch/powerpc/mm/nohash/44x.c: flush_instruction_cache(); arch/powerpc/mm/nohash/fsl_booke.c: flush_instruction_cach

[PATCH 2/5] powerpc: Untangle flush_instruction_cache()

2020-08-13 Thread Christophe Leroy
flush_instruction_cache() is a mixup of each PPC32 sub-arch. Untangle it by making one complete function for each sub-arch. This makes it a lot more readable and maintainable. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/misc_32.S | 19 +++ 1 file changed, 11 inserti

[PATCH 3/5] powerpc: Remove flush_instruction_cache() on 8xx

2020-08-13 Thread Christophe Leroy
flush_instruction_cache() is never used on 8xx, remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/nohash/8xx.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/powerpc/mm/nohash/8xx.c b/arch/powerpc/mm/nohash/8xx.c index d2b37146ae6c..231ca95f9ffb 100644 --- a/arch/pow

[PATCH 4/5] powerpc: Rewrite FSL_BOOKE flush_cache_instruction() in C

2020-08-13 Thread Christophe Leroy
Nothing prevent flush_cache_instruction() from behing writen in C. Do it to improve readability and maintainability. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/misc_32.S | 17 - arch/powerpc/mm/nohash/fsl_booke.c | 16 2 files changed, 16 inser

[PATCH 5/5] powerpc: Rewrite 4xx flush_cache_instruction() in C

2020-08-13 Thread Christophe Leroy
Nothing prevent flush_cache_instruction() from behing writen in C. Do it to improve readability and maintainability. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/misc_32.S | 13 - arch/powerpc/mm/nohash/4xx.c| 15 +++ arch/powerpc/mm/nohash/Makefile | 1

Re: [PATCH 1/5] powerpc: Remove flush_instruction_cache for book3s/32

2020-08-13 Thread Christoph Hellwig
On Thu, Aug 13, 2020 at 10:12:00AM +, Christophe Leroy wrote: > -#ifndef CONFIG_PPC_8xx > +#if !defined(CONFIG_PPC_8xx) && !defined(CONFIG_PPC_BOOK3S_32) > _GLOBAL(flush_instruction_cache) > #if defined(CONFIG_4xx) > lis r3, KERNELBASE@h > @@ -290,18 +289,11 @@ _GLOBAL(flush_instruc

Re: [PATCH 1/5] powerpc: Remove flush_instruction_cache for book3s/32

2020-08-13 Thread Christoph Hellwig
On Thu, Aug 13, 2020 at 01:13:08PM +0100, Christoph Hellwig wrote: > On Thu, Aug 13, 2020 at 10:12:00AM +, Christophe Leroy wrote: > > -#ifndef CONFIG_PPC_8xx > > +#if !defined(CONFIG_PPC_8xx) && !defined(CONFIG_PPC_BOOK3S_32) > > _GLOBAL(flush_instruction_cache) > > #if defined(CONFIG_4xx) >

Re: [PATCH] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-08-13 Thread Aneesh Kumar K.V
On 8/13/20 10:04 AM, Vaibhav Jain wrote: The newly introduced 'perf_stats' attribute uses the default access mode of 0444 letting non-root users access performance stats of an nvdimm and potentially force the kernel into issuing large number of expensive HCALLs. Since the information exposed by t

[PATCH] sfc_ef100: Fix build failure on powerpc

2020-08-13 Thread Christophe Leroy
ppc6xx_defconfig fails building sfc.ko module, complaining about the lack of _umoddi3 symbol. This is due to the following test if (EFX_MIN_DMAQ_SIZE % reader->value) { Because reader->value is u64. As EFX_MIN_DMAQ_SIZE value is 512, reader->value is obviously small enough for a

[PATCH v3] powerpc/pseries: explicitly reschedule during drmem_lmb list traversal

2020-08-13 Thread Nathan Lynch
The drmem lmb list can have hundreds of thousands of entries, and unfortunately lookups take the form of linear searches. As long as this is the case, traversals have the potential to monopolize the CPU and provoke lockup reports, workqueue stalls, and the like unless they explicitly yield. Rather

Re: linux-next: runtime warning in Linus' tree

2020-08-13 Thread Johannes Weiner
On Thu, Aug 13, 2020 at 04:46:54PM +1000, Stephen Rothwell wrote: > [0.055220][T0] WARNING: CPU: 0 PID: 0 at mm/memcontrol.c:5220 > mem_cgroup_css_alloc+0x350/0x904 > [The line numbers in the final linux next are 5226 and 5141 due to > later patches.] > > Introduced (or exposed) by commi

Re: [PATCH] sfc_ef100: Fix build failure on powerpc

2020-08-13 Thread Segher Boessenkool
On Thu, Aug 13, 2020 at 02:39:10PM +, Christophe Leroy wrote: > ppc6xx_defconfig fails building sfc.ko module, complaining > about the lack of _umoddi3 symbol. > > This is due to the following test > > if (EFX_MIN_DMAQ_SIZE % reader->value) { > > Because reader->value is u64. >

[PATCH] powerpc/book3s64/radix: Fix boot failure with large amount of guest memory

2020-08-13 Thread Aneesh Kumar K.V
If the hypervisor doesn't support hugepages, the kernel ends up allocating a large number of page table pages. The early page table allocation was wrongly setting the max memblock limit to ppc64_rma_size with radix translation which resulted in boot failure as shown below. Kernel panic - not sync

Re: [PATCH v2 3/4] powerpc/memhotplug: Make lmb size 64bit

2020-08-13 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.8, v5.7.14, v5.4.57, v4.19.138, v4.14.193, v4.9.232, v4.4.232. v5.8: Build OK! v

[PATCH 3/9] powerpc: Remove CONFIG_PPC601_SYNC_FIX

2020-08-13 Thread Christophe Leroy
This config option isn't in any defconfig. The very first versions of Powerpc 601 have a bug which requires additional sync before and/or after some instructions. This was more than 25 years ago and time has come to retire those buggy versions of the 601 from the kernel. Signed-off-by: Christoph

[PATCH 1/9] powerpc: Remove flush_instruction_cache for book3s/32

2020-08-13 Thread Christophe Leroy
The only callers of flush_instruction_cache() are: arch/powerpc/kernel/swsusp_booke.S: bl flush_instruction_cache arch/powerpc/mm/nohash/40x.c: flush_instruction_cache(); arch/powerpc/mm/nohash/44x.c: flush_instruction_cache(); arch/powerpc/mm/nohash/fsl_booke.c: flush_instruction_cach

[PATCH 5/9] powerpc: Remove PowerPC 601

2020-08-13 Thread Christophe Leroy
Powerpc 601 is 25 years old. It is not selected by any defconfig. It requires a lot of special handling as it deviates from the standard 6xx. Retire it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/cputable.c | 15 --- arch/powerpc/platforms/Kconfig.cputype | 11

[PATCH 2/9] powerpc: Remove SYNC on non 6xx

2020-08-13 Thread Christophe Leroy
SYNC is usefull for Powerpc 601 only. On everything else, SYNC is empty. Remove it from code that is not made to run on 6xx. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 1 - arch/powerpc/kernel/head_booke.h | 1 - arch/powerpc/kernel/misc_64.S| 1 - 3 files change

[PATCH 4/9] powerpc: Drop SYNC_601() ISYNC_601() and SYNC()

2020-08-13 Thread Christophe Leroy
Those macros are now empty at all time. Drop them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc_asm.h | 4 arch/powerpc/kernel/entry_32.S | 17 + arch/powerpc/kernel/fpu.S | 1 - arch/powerpc/kernel/head_32.S | 9 - arch/p

[PATCH 8/9] powerpc: Remove __USE_RTC()

2020-08-13 Thread Christophe Leroy
Now that PowerPC 601 is gone, __USE_RTC() is never true. Remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/time.h | 9 +- arch/powerpc/kernel/time.c | 52 + 2 files changed, 9 insertions(+), 52 deletions(-) diff --git a/arch/power

[PATCH 9/9] powerpc: Remove get_tb_or_rtc()

2020-08-13 Thread Christophe Leroy
601 is gone, get_tb_or_rtc() is equivalent to get_tb(). Replace the former by the later. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/time.h | 5 - arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/kernel/time.c | 6 +++--- 3 files changed, 4 insertions(+), 9 deletio

[PATCH 7/9] powerpc: Tidy up a bit after removal of PowerPC 601.

2020-08-13 Thread Christophe Leroy
The removal of the 601 left some standalone blocks from former if/else. Drop the { } and re-indent. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/btext.c| 11 +++-- arch/powerpc/mm/book3s32/mmu.c | 45 +++--- 2 files changed, 24 insertions(+), 32 del

[PATCH 6/9] powerpc: Remove support for PowerPC 601

2020-08-13 Thread Christophe Leroy
PowerPC 601 has been retired. Remove all associated specific code. CPU_FTRS_PPC601 has CPU_FTR_COHERENT_ICACHE and CPU_FTR_COMMON. CPU_FTR_COMMON is already present via other CPU_FTRS. None of the remaining CPU selects CPU_FTR_COHERENT_ICACHE. So CPU_FTRS_PPC601 can be removed from the possible

Re: linux-next: runtime warning in Linus' tree

2020-08-13 Thread Roman Gushchin
On Thu, Aug 13, 2020 at 11:20:33AM -0400, Johannes Weiner wrote: > On Thu, Aug 13, 2020 at 04:46:54PM +1000, Stephen Rothwell wrote: > > [0.055220][T0] WARNING: CPU: 0 PID: 0 at mm/memcontrol.c:5220 > > mem_cgroup_css_alloc+0x350/0x904 > > > [The line numbers in the final linux next are 5

Re: [PATCH] arch/powerpc: use simple i2c probe function

2020-08-13 Thread Luca Ceresoli
Hi, On 07/08/20 17:27, Stephen Kitt wrote: > The i2c probe functions here don't use the id information provided in > their second argument, so the single-parameter i2c probe function > ("probe_new") can be used instead. > > This avoids scanning the identifier tables during probes. > > Signed-off

Re: [PATCH] sfc_ef100: Fix build failure on powerpc

2020-08-13 Thread Edward Cree
On 13/08/2020 15:39, Christophe Leroy wrote: > ppc6xx_defconfig fails building sfc.ko module, complaining > about the lack of _umoddi3 symbol. > > This is due to the following test > > if (EFX_MIN_DMAQ_SIZE % reader->value) { > > Because reader->value is u64. Already fixed in net.git

Re: [RFC PATCH 1/2] powerpc/numa: Introduce logical numa id

2020-08-13 Thread Nathan Lynch
Hi Aneesh, "Aneesh Kumar K.V" writes: > "Aneesh Kumar K.V" writes: >> On 8/8/20 2:15 AM, Nathan Lynch wrote: >>> "Aneesh Kumar K.V" writes: On 8/7/20 9:54 AM, Nathan Lynch wrote: > "Aneesh Kumar K.V" writes: >> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c >> in

Re: [PATCH] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-08-13 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > On 8/13/20 10:04 AM, Vaibhav Jain wrote: >> The newly introduced 'perf_stats' attribute uses the default access >> mode of 0444 letting non-root users access performance stats of an >> nvdimm and potentially force the kernel into issuing large number of >> expensive HC

fsl_espi errors on v5.7.15

2020-08-13 Thread Chris Packham
Hi, I'm seeing a problem with accessing spi-nor after upgrading a T2081 based system to linux v5.7.15 For this board u-boot and the u-boot environment live on spi-nor. When I use fw_setenv from userspace I get the following kernel logs # fw_setenv foo=1 fsl_espi ffe11.spi: Transfer done bu

Re: BUG: unable to handle kernel paging request in fl_dump_key

2020-08-13 Thread syzbot
syzbot has bisected this issue to: commit a51486266c3ba8e035a47fa96df67f274fe0c7d0 Author: Jiri Pirko Date: Sat Jun 15 09:03:49 2019 + net: sched: remove NET_CLS_IND config option bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1746350990 start commit: 1ca0fafd tcp:

[PATCH] powerpc: Add POWER10 raw mode cputable entry

2020-08-13 Thread Madhavan Srinivasan
Add a raw mode cputable entry for POWER10. Copies most of the fields from commit a3ea40d5c736 ("powerpc: Add POWER10 architected mode") except for oprofile_cpu_type, machine_check_early, pvr_mask and pvr_mask filed. On bare metal systems we use DT CPU features, which doesn't need a cputable entry.

[PATCH] kernel/watchdog: fix warning -Wunused-variable for watchdog_allowed_mask in ppc64

2020-08-13 Thread Balamuruhan S
In ppc64 config if `CONFIG_SOFTLOCKUP_DETECTOR` is not set then it warns for unused declaration of `watchdog_allowed_mask` while building, move the declaration inside ifdef later in the code. ``` kernel/watchdog.c:47:23: warning: ‘watchdog_allowed_mask’ defined but not used [-Wunused-variable] s

Re: [PATCH v3] powerpc/pseries: explicitly reschedule during drmem_lmb list traversal

2020-08-13 Thread Christophe Leroy
Le 13/08/2020 à 17:11, Nathan Lynch a écrit : The drmem lmb list can have hundreds of thousands of entries, and unfortunately lookups take the form of linear searches. As long as this is the case, traversals have the potential to monopolize the CPU and provoke lockup reports, workqueue stalls,

[PATCH v2] powerpc: Remove flush_instruction_cache() on 8xx

2020-08-13 Thread Christophe Leroy
flush_instruction_cache() is never used on 8xx, remove it. Signed-off-by: Christophe Leroy --- v2: Becomes a standalone patch independant of the series dismantling the ASM flush_instruction_cache() --- arch/powerpc/mm/nohash/8xx.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/p

Re: [PATCH 1/5] powerpc: Remove flush_instruction_cache for book3s/32

2020-08-13 Thread Christophe Leroy
Le 13/08/2020 à 14:14, Christoph Hellwig a écrit : On Thu, Aug 13, 2020 at 01:13:08PM +0100, Christoph Hellwig wrote: On Thu, Aug 13, 2020 at 10:12:00AM +, Christophe Leroy wrote: -#ifndef CONFIG_PPC_8xx +#if !defined(CONFIG_PPC_8xx) && !defined(CONFIG_PPC_BOOK3S_32) _GLOBAL(flush_inst

[PATCH v2 3/4] powerpc: Rewrite 4xx flush_cache_instruction() in C

2020-08-13 Thread Christophe Leroy
Nothing prevents flush_cache_instruction() from being writen in C. Do it to improve readability and maintainability. This function is very small and isn't called from assembly, make it static inline in asm/cacheflush.h Signed-off-by: Christophe Leroy --- v2: Written as a static inline instead o

[PATCH v2 1/4] powerpc: Remove flush_instruction_cache for book3s/32

2020-08-13 Thread Christophe Leroy
The only callers of flush_instruction_cache() are: arch/powerpc/kernel/swsusp_booke.S: bl flush_instruction_cache arch/powerpc/mm/nohash/40x.c: flush_instruction_cache(); arch/powerpc/mm/nohash/44x.c: flush_instruction_cache(); arch/powerpc/mm/nohash/fsl_booke.c: flush_instruction_cach

[PATCH v2 2/4] powerpc: Move flush_instruction_cache() prototype in asm/cacheflush.h

2020-08-13 Thread Christophe Leroy
flush_instruction_cache() belongs to the cache flushing function family. Move its prototype in asm/cacheflush.h Signed-off-by: Christophe Leroy --- v2: new --- arch/powerpc/include/asm/cacheflush.h | 2 ++ arch/powerpc/include/asm/processor.h | 1 - arch/powerpc/platforms/44x/machine

[PATCH v2 4/4] powerpc: Rewrite FSL_BOOKE flush_cache_instruction() in C

2020-08-13 Thread Christophe Leroy
Nothing prevents flush_cache_instruction() from being writen in C. Do it to improve readability and maintainability. This function is only use by low level callers, it is not intended to be used by module. Don't export it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/misc_32.S

Re: fsl_espi errors on v5.7.15

2020-08-13 Thread Heiner Kallweit
On 14.08.2020 04:48, Chris Packham wrote: > Hi, > > I'm seeing a problem with accessing spi-nor after upgrading a T2081 > based system to linux v5.7.15 > > For this board u-boot and the u-boot environment live on spi-nor. > > When I use fw_setenv from userspace I get the following kernel logs >

Re: [PATCH] powerpc: Add POWER10 raw mode cputable entry

2020-08-13 Thread kernel test robot
Hi Madhavan, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.8 next-20200814] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in http

[PATCH v2] powerpc: Drop _nmask_and_or_msr()

2020-08-13 Thread Christophe Leroy
_nmask_and_or_msr() is only used at two places to set MSR_IP. The SYNC is unnecessary as the users are not PowerPC 601. Can be easily writen in C. Do it, and drop _nmask_and_or_msr() Signed-off-by: Christophe Leroy --- v2: Removed the prototype in asm/processor.h --- arch/powerpc/include/asm/