[GIT PULL] Please pull powerpc/linux.git powerpc-5.11-2 tag

2020-12-23 Thread Michael Ellerman
to init_big_cores() Michael Ellerman (4): powerpc/boot: Fix build of dts/fsl powerpc/vdso: Block R_PPC_REL24 relocations powerpc/vdso: Don't pass 64-bit ABI cflags to 32-bit VDSO powerpc/vdso: Fix DOTSYM for 32-bit LE VDSO arch/powerpc/boot/Makefile | 2 ++ arch/powerpc

Re: [PATCH] powerpc/32s: Fix RTAS machine check with VMAP stack

2020-12-23 Thread Michael Ellerman
Christophe Leroy writes: > Le 22/12/2020 à 08:11, Christophe Leroy a écrit : >> When we have VMAP stack, exception prolog 1 sets r1, not r11. > > But exception prolog 1 uses r1 to setup r1 when machine check happens in > kernel. > So r1 must be restored when the branch is not taken. See

Re: [PATCH] powerpc/32s: Fix RTAS machine check with VMAP stack

2020-12-22 Thread Michael Ellerman
On Tue, 22 Dec 2020 07:11:18 + (UTC), Christophe Leroy wrote: > When we have VMAP stack, exception prolog 1 sets r1, not r11. Applied to powerpc/fixes. [1/1] powerpc/32s: Fix RTAS machine check with VMAP stack https://git.kernel.org/powerpc/c/9c7422b92cb27369653c371ad9c44a502e5eea8f

Re: [PATCH] powerpc/time: Force inlining of get_tb()

2020-12-22 Thread Michael Ellerman
On Sun, 20 Dec 2020 18:18:26 + (UTC), Christophe Leroy wrote: > Force inlining of get_tb() in order to avoid getting > following function in vdso32, leading to suboptimal > performance in clock_gettime() > > 0688 <.get_tb>: > 688: 7c 6d 42 a6 mftbu r3 > 68c: 7c 8c 42 a6 mftb

Re: [PATCH] powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too

2020-12-22 Thread Michael Ellerman
On Mon, 21 Dec 2020 06:18:03 + (UTC), Christophe Leroy wrote: > We need r1 to be properly set before activating MMU, otherwise any new > exception taken while saving registers into the stack in syscall > prologs will use the user stack, which is wrong and will even lockup > or crash when KUAP

Re: [PATCH v2 1/1] powerpc/kvm: Fix mask size for emulated msgsndp

2020-12-21 Thread Michael Ellerman
On Tue, 8 Dec 2020 18:57:08 -0300, Leonardo Bras wrote: > According to ISAv3.1 and ISAv3.0b, the msgsndp is described to split RB in: > msgtype <- (RB) 32:36 > payload <- (RB) 37:63 > t <- (RB) 57:63 > > The current way of getting 'msgtype', and 't' is missing their MSB: > msgtype: ((arg >>

Re: [PATCH] KVM: PPC: Book3S: Assign boolean values to a bool variable

2020-12-21 Thread Michael Ellerman
On Sat, 7 Nov 2020 14:26:22 +0800, xiakaixu1...@gmail.com wrote: > Fix the following coccinelle warnings: > > ./arch/powerpc/kvm/book3s_xics.c:476:3-15: WARNING: Assignment of 0/1 to bool > variable > ./arch/powerpc/kvm/book3s_xics.c:504:3-15: WARNING: Assignment of 0/1 to bool > variable

Re: [PATCH] powerpc/memhotplug: quieting some DLPAR operations

2020-12-21 Thread Michael Ellerman
On Fri, 11 Dec 2020 15:59:54 +0100, Laurent Dufour wrote: > When attempting to remove by index a set of LMB a lot of messages are > displayed on the console, even when everything goes fine: > > pseries-hotplug-mem: Attempting to hot-remove LMB, drc index 802d > Offlined Pages 4096 >

Re: [PATCH] powerpc/mm: Fix hugetlb_free_pmd_range() and hugetlb_free_pud_range()

2020-12-21 Thread Michael Ellerman
On Sat, 12 Dec 2020 13:41:25 + (UTC), Christophe Leroy wrote: > Commit 7bfe54b5f165 ("powerpc/mm: Refactor the floor/ceiling check in > hugetlb range freeing functions") inadvertely removed the mask > applied to start parameter in those two functions, leading to the > following crash on

Re: [PATCH] powerpc: force inlining of csum_partial() to avoid multiple csum_partial() with GCC10

2020-12-21 Thread Michael Ellerman
On Thu, 15 Oct 2020 10:52:20 + (UTC), Christophe Leroy wrote: > ppc-linux-objdump -d vmlinux | grep -e "" -e > "<__csum_partial>" > > With gcc9 I get: > > c0017ef8 <__csum_partial>: > c00182fc: 4b ff fb fd bl c0017ef8 <__csum_partial> > c0018478:

Re: [PATCH 01/23] kernel: irq: irqdescs: warn on spurious IRQ

2020-12-20 Thread Michael Ellerman
Andy Shevchenko writes: > On Fri, Dec 18, 2020 at 4:37 PM Enrico Weigelt, metux IT consult > wrote: > >> + if (printk_ratelimit()) >> + pr_warn("spurious IRQ: irq=%d hwirq=%d nr_irqs=%d\n", >> + irq, hwirq, nr_irqs); > > Perhaps

[GIT PULL] Please pull powerpc/linux.git powerpc-5.11-1 tag

2020-12-17 Thread Michael Ellerman
: Book3S HV: Fix mask size for emulated msgsndp Madhavan Srinivasan (2): powerpc/perf: Use regs->nip when SIAR is zero powerpc/perf: Fix Threshold Event Counter Multiplier width for P10 Mathieu Desnoyers (1): powerpc: Fix incorrect stw{, ux, u, x} instructions in __set_pte_at

Re: [PATCH 0/3] powerpc: convert to use ARCH_ATOMIC

2020-12-15 Thread Michael Ellerman
On Wed, 11 Nov 2020 21:07:20 +1000, Nicholas Piggin wrote: > This conversion seems to require generic atomic64 changes, looks > like nothing else uses ARCH_ATOMIC and GENERIC_ATOMIC64 yet. > > Thanks, > Nick > > Nicholas Piggin (3): > asm-generic/atomic64: Add support for ARCH_ATOMIC >

Re: [PATCH v4 1/6] powerpc/book3s64/kuap: Improve error reporting with KUAP

2020-12-15 Thread Michael Ellerman
On Wed, 9 Dec 2020 05:29:20 + (UTC), Christophe Leroy wrote: > This partially reverts commit eb232b162446 ("powerpc/book3s64/kuap: Improve > error reporting with KUAP") and update the fault handler to print > > [ 55.022514] Kernel attempted to access user page (7e6725b7) - exploit >

Re: [PATCH v1 01/20] powerpc/feature: Fix CPU_FTRS_ALWAYS by removing CPU_FTRS_GENERIC_32

2020-12-15 Thread Michael Ellerman
On Thu, 22 Oct 2020 06:29:26 + (UTC), Christophe Leroy wrote: > On 8xx, we get the following features: > > [0.00] cpu_features = 0x0100 > [0.00] possible= 0x0120 > [0.00] always = 0x > > This is not

Re: [PATCH] powerpc/8xx: Fix early debug when SMC1 is relocated

2020-12-15 Thread Michael Ellerman
On Fri, 4 Dec 2020 10:11:34 + (UTC), Christophe Leroy wrote: > When SMC1 is relocated and early debug is selected, the > board hangs is ppc_md.setup_arch(). This is because ones > the microcode has been loaded and SMC1 relocated, early > debug writes in the weed. > > To allow smooth

Re: [PATCH] powerpc/mm: Refactor the floor/ceiling check in hugetlb range freeing functions

2020-12-15 Thread Michael Ellerman
On Fri, 6 Nov 2020 13:20:54 + (UTC), Christophe Leroy wrote: > All hugetlb range freeing functions have a verification like the following, > which only differs by the mask used, depending on the page table level. > > start &= MASK; > if (start < floor) > return; >

Re: [PATCH] powerpc/rtas: fix typo of ibm,open-errinjct in rtas filter

2020-12-15 Thread Michael Ellerman
On Tue, 8 Dec 2020 13:54:34 -0600, Tyrel Datwyler wrote: > Commit bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace") > introduced the following error when invoking the errinjct userspace > tool. > > [root@ltcalpine2-lp5 librtas]# errinjct open > [327884.071171] sys_rtas: RTAS

Re: [PATCH v1 1/3] powerpc/32s: Remove unused counters incremented by create_hpte()

2020-12-15 Thread Michael Ellerman
On Tue, 24 Nov 2020 19:51:55 + (UTC), Christophe Leroy wrote: > primary_pteg_full and htab_hash_searches are not used. > > Remove them. Applied to powerpc/next. [1/3] powerpc/32s: Remove unused counters incremented by create_hpte()

Re: [PATCH v3 0/5] Extend Parsing "ibm, thread-groups" for Shared-L2 information

2020-12-15 Thread Michael Ellerman
On Thu, 10 Dec 2020 16:08:54 +0530, Gautham R. Shenoy wrote: > This is the v2 of the patchset to extend parsing of "ibm,thread-groups" > property > to discover the Shared-L2 cache information. > > The previous versions can be found here : > > v2 : >

Re: [PATCH] powerpc: fix spelling mistake in Kconfig "seleted" -> "selected"

2020-12-15 Thread Michael Ellerman
On Mon, 7 Dec 2020 15:54:20 +, Colin King wrote: > There is a spelling mistake in the help text of the Kconfig. Fix it. Applied to powerpc/next. [1/1] powerpc: fix spelling mistake in Kconfig "seleted" -> "selected"

Re: [PATCH] powerpc/process: Remove target specific __set_dabr()

2020-12-15 Thread Michael Ellerman
On Fri, 4 Dec 2020 10:12:51 + (UTC), Christophe Leroy wrote: > __set_dabr() are simple functions that can be inline directly > inside set_dabr() and using IS_ENABLED() instead of #ifdef Applied to powerpc/next. [1/1] powerpc/process: Remove target specific __set_dabr()

Re: [PATCH v1 1/6] powerpc/8xx: DEBUG_PAGEALLOC doesn't require an ITLB miss exception handler

2020-12-15 Thread Michael Ellerman
On Tue, 24 Nov 2020 15:24:54 + (UTC), Christophe Leroy wrote: > Since commit e611939fc8ec ("powerpc/mm: Ensure change_page_attr() > doesn't invalidate pinned TLBs"), pinned TLBs are not anymore > invalidated by __kernel_map_pages() when CONFIG_DEBUG_PAGEALLOC is > selected. > > Remove the

Re: [PATCH v2] powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK

2020-12-15 Thread Michael Ellerman
On Tue, 8 Dec 2020 05:24:19 + (UTC), Christophe Leroy wrote: > low_sleep_handler() can't restore the context from standard > stack because the stack can hardly be accessed with MMU OFF. > > Store everything in a global storage area instead of storing > a pointer to the stack in that global

Re: [PATCH] powerpc/32s: Handle PROTFAULT in hash_page() also for CONFIG_PPC_KUAP

2020-12-15 Thread Michael Ellerman
On Mon, 16 Nov 2020 16:09:31 + (UTC), Christophe Leroy wrote: > On hash 32 bits, handling minor protection faults like unsetting > dirty flag is heavy if done from the normal page_fault processing, > because it implies hash table software lookup for flushing the entry > and then a DSI is taken

Re: [PATCH 2/2] powerpc/64s: Trim offlined CPUs from mm_cpumasks

2020-12-15 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from Michael Ellerman's message of December 14, 2020 8:43 pm: >> Nicholas Piggin writes: >>> Excerpts from Geert Uytterhoeven's message of December 10, 2020 7:06 pm: Hi Nicholas, On Fri, Nov 20, 2020 at 4:01 AM Nicholas Piggin wrote: >

Re: [PATCH 2/2] powerpc/64s: Trim offlined CPUs from mm_cpumasks

2020-12-14 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from Geert Uytterhoeven's message of December 10, 2020 7:06 pm: >> Hi Nicholas, >> >> On Fri, Nov 20, 2020 at 4:01 AM Nicholas Piggin wrote: >>> >>> When offlining a CPU, powerpc/64s does not flush TLBs, rather it just >>> leaves the CPU set in mm_cpumasks, so

[GIT PULL] Please pull powerpc/linux.git powerpc-5.10-6 tag

2020-12-10 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull one final powerpc fix for 5.10: The following changes since commit a1ee28117077c3bf24e5ab6324c835eaab629c45: powerpc/64s/powernv: Fix memory corruption when saving SLB entries on MCE (2020-12-02 23:16:40 +1100) are

Re: [PATCH v2 00/25] powerpc: Switch signal 32 to using unsafe_put_user() and friends

2020-12-10 Thread Michael Ellerman
On Tue, 18 Aug 2020 17:19:11 + (UTC), Christophe Leroy wrote: > This series leads to a reduction from 2.55s to 1.73s of > the system CPU time with the following microbench app > on an mpc832x with KUAP (approx 32%) > > This series replaces copies to users by unsafe_put_user() and friends >

Re: [PATCH] powerpc/mm: MMU_FTR_NEED_DTLB_SW_LRU is only possible with CONFIG_PPC_83xx

2020-12-10 Thread Michael Ellerman
On Mon, 12 Oct 2020 08:05:49 + (UTC), Christophe Leroy wrote: > Only mpc83xx will set MMU_FTR_NEED_DTLB_SW_LRU and its > definition is enclosed in #ifdef CONFIG_PPC_83xx. > > Make MMU_FTR_NEED_DTLB_SW_LRU possible only when > CONFIG_PPC_83xx is set. Applied to powerpc/next. [1/1]

Re: [PATCH] powerpc/mm: Fix verification of MMU_FTR_TYPE_44x

2020-12-10 Thread Michael Ellerman
On Sat, 10 Oct 2020 17:30:59 + (UTC), Christophe Leroy wrote: > MMU_FTR_TYPE_44x cannot be checked by cpu_has_feature() > > Use mmu_has_feature() instead Applied to powerpc/next. [1/1] powerpc/mm: Fix verification of MMU_FTR_TYPE_44x

Re: [PATCH] powerpc/feature: Add CPU_FTR_NOEXECUTE to G2_LE

2020-12-10 Thread Michael Ellerman
On Mon, 12 Oct 2020 08:02:13 + (UTC), Christophe Leroy wrote: > G2_LE has a 603 core, add CPU_FTR_NOEXECUTE. Applied to powerpc/next. [1/1] powerpc/feature: Add CPU_FTR_NOEXECUTE to G2_LE https://git.kernel.org/powerpc/c/197493af414ee22427be3343637ac290a791925a cheers

Re: [PATCH] powerpc/mm: Remove useless #ifndef CPU_FTR_COHERENT_ICACHE in mem.c

2020-12-10 Thread Michael Ellerman
On Mon, 12 Oct 2020 08:02:30 + (UTC), Christophe Leroy wrote: > Since commit 10b35d9978ac ("[PATCH] powerpc: merged asm/cputable.h"), > CPU_FTR_COHERENT_ICACHE has always been defined. > > Remove the #ifndef CPU_FTR_COHERENT_ICACHE block. Applied to powerpc/next. [1/1] powerpc/mm: Remove

Re: [PATCH] powerpc/time: Remove ifdef in get_vtb()

2020-12-10 Thread Michael Ellerman
On Thu, 1 Oct 2020 10:59:20 + (UTC), Christophe Leroy wrote: > SPRN_VTB and CPU_FTR_ARCH_207S are always defined, > no need of an ifdef. Applied to powerpc/next. [1/1] powerpc/time: Remove ifdef in get_vtb() https://git.kernel.org/powerpc/c/c3cb5dbd85dbd9ae51fadf867782dc34806f04d8

Re: [PATCH 1/2] powerpc: Retire e200 core (mpc555x processor)

2020-12-10 Thread Michael Ellerman
On Tue, 17 Nov 2020 05:07:58 + (UTC), Christophe Leroy wrote: > There is no defconfig selecting CONFIG_E200, and no platform. > > e200 is an earlier version of booke, a predecessor of e500, > with some particularities like an unified cache instead of both an > instruction cache and a data

Re: [PATCH v2 1/2] powerpc/44x: Don't support 440 when CONFIG_PPC_47x is set

2020-12-10 Thread Michael Ellerman
On Sun, 18 Oct 2020 17:25:17 + (UTC), Christophe Leroy wrote: > As stated in platform/44x/Kconfig, CONFIG_PPC_47x is not > compatible with 440 and 460 variants. > > This is confirmed in asm/cache.h as L1_CACHE_SHIFT is different > for 47x, meaning a kernel built for 47x will not run correctly

Re: [PATCH] powerpc: inline iomap accessors

2020-12-10 Thread Michael Ellerman
On Sat, 21 Nov 2020 17:59:19 + (UTC), Christophe Leroy wrote: > ioreadXX()/ioreadXXbe() accessors are equivalent to ppc > in_leXX()/in_be16() accessors but they are not inlined. > > Since commit 0eb573682872 ("powerpc/kerenl: Enable EEH for IO > accessors"), the 'le' versions are equivalent

Re: [PATCH v3 1/3] powerpc/uaccess: Don't use "m<>" constraint with GCC 4.9

2020-12-10 Thread Michael Ellerman
On Thu, 22 Oct 2020 09:29:19 + (UTC), Christophe Leroy wrote: > GCC 4.9 sometimes fails to build with "m<>" constraint in > inline assembly. > > CC lib/iov_iter.o > In file included from ./arch/powerpc/include/asm/cmpxchg.h:6:0, > from

Re: [PATCH v3 0/2] powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too

2020-12-10 Thread Michael Ellerman
On Thu, 19 Nov 2020 17:01:54 +0100, Oleg Nesterov wrote: > Can we finally fix this problem? ;) > > My previous attempt was ignored, see > > https://lore.kernel.org/lkml/20190917121256.ga8...@redhat.com/ > > Now that gpr_get() was changed to use membuf API we can make a simpler fix. > >

Re: [PATCH] powerpc/xmon: Change printk() to pr_cont()

2020-12-10 Thread Michael Ellerman
On Fri, 4 Dec 2020 10:35:38 + (UTC), Christophe Leroy wrote: > Since some time now, printk() adds carriage return, leading to > unusable xmon output: > > [ 54.288722] sysrq: Entering xmon > [ 54.292209] Vector: 0 at [cace3d2c] > [ 54.292274] pc: > [ 54.292331] c0023650 > [

Re: [PATCH v1 1/8] powerpc/32s: Always map kernel text and rodata with BATs

2020-12-10 Thread Michael Ellerman
On Wed, 25 Nov 2020 07:10:46 + (UTC), Christophe Leroy wrote: > Since commit 2b279c0348af ("powerpc/32s: Allow mapping with BATs with > DEBUG_PAGEALLOC"), there is no real situation where mapping without > BATs is required. > > In order to simplify memory handling, always map kernel text >

Re: [PATCH v2 1/2] powerpc/feature: Fix CPU_FTRS_ALWAYS by removing CPU_FTRS_GENERIC_32

2020-12-10 Thread Michael Ellerman
On Tue, 13 Oct 2020 11:11:20 + (UTC), Christophe Leroy wrote: > On 8xx, we get the following features: > > [0.00] cpu_features = 0x0100 > [0.00] possible= 0x0120 > [0.00] always = 0x > > This is not

Re: [PATCH] powerpc: Use common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro

2020-12-10 Thread Michael Ellerman
On Fri, 27 Nov 2020 15:07:37 +0800, Youling Tang wrote: > Use the common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro rule for > the linker script in an effort. Applied to powerpc/next. [1/1] powerpc: Use common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro

Re: [PATCH v2 0/4] Powerpc: Better preemption for shared processor

2020-12-10 Thread Michael Ellerman
On Wed, 2 Dec 2020 10:34:52 +0530, Srikar Dronamraju wrote: > Currently, vcpu_is_preempted will return the yield_count for > shared_processor. On a PowerVM LPAR, Phyp schedules at SMT8 core boundary > i.e all CPUs belonging to a core are either group scheduled in or group > scheduled out. This can

Re: [PATCH v1 00/30] Modernise VDSO setup

2020-12-10 Thread Michael Ellerman
On Sun, 27 Sep 2020 09:16:16 + (UTC), Christophe Leroy wrote: > This series modernises the setup of VDSO: > - Switch to using _install_special_mapping() which has replaced > install_special_mapping() > - Move datapage in front of text like most other architectures to simplify > its

Re: [PATCH] powerpc/mm: Desintegrate MMU_FTR_PPCAS_ARCH_V2

2020-12-10 Thread Michael Ellerman
On Mon, 12 Oct 2020 08:04:24 + (UTC), Christophe Leroy wrote: > MMU_FTR_PPCAS_ARCH_V2 is defined in cpu_table.h > as MMU_FTR_TLBIEL | MMU_FTR_16M_PAGE. > > MMU_FTR_TLBIEL and MMU_FTR_16M_PAGE are defined in mmu.h > > MMU_FTR_PPCAS_ARCH_V2 is used only in mmu.h and it is used only once. > >

Re: [PATCH v2] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-09 Thread Michael Ellerman
On Mon, 7 Dec 2020 16:58:01 + (UTC), Christophe Leroy wrote: > Since commit c33165253492 ("powerpc: use non-set_fs based maccess > routines"), userspace access is not granted anymore when using > copy_from_kernel_nofault() > > However, kthread_probe_data() uses copy_from_kernel_nofault() > to

Re: [PATCH v1 2/6] powerpc/8xx: Always pin kernel text TLB

2020-12-09 Thread Michael Ellerman
Christophe Leroy writes: > Le 09/12/2020 à 11:43, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> There is no big poing in not pinning kernel text anymore, as now >>> we can keep pinned TLB even with things like DEBUG_PAGEALLOC. >>> >>>

Re: linux-next: build warning after merge of the akpm tree

2020-12-09 Thread Michael Ellerman
Stephen Rothwell writes: > Hi Michael, > > On Wed, 09 Dec 2020 15:44:35 +1100 Michael Ellerman > wrote: >> >> They should really be in DATA_DATA or similar shouldn't they? > > No other architecture appears t need them ... Any arch with orphan-handling=warn should see them I thought? cheers

Re: [PATCH v1 2/6] powerpc/8xx: Always pin kernel text TLB

2020-12-09 Thread Michael Ellerman
Christophe Leroy writes: > There is no big poing in not pinning kernel text anymore, as now > we can keep pinned TLB even with things like DEBUG_PAGEALLOC. > > Remove CONFIG_PIN_TLB_TEXT, making it always right. > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/Kconfig | 3

Re: linux-next: build warning after merge of the akpm tree

2020-12-08 Thread Michael Ellerman
Stephen Rothwell writes: > Hi Stephen, > > On Fri, 4 Dec 2020 21:00:00 +1100 Stephen Rothwell > wrote: >> >> Hi all, >> >> After merging the akpm tree, today's linux-next build (powerpc >> allyesconfig) produced warnings like this: >> >> ld: warning: orphan section `.data..Lubsan_data177'

Re: [PATCH 1/3] powerpc/smp: Parse ibm,thread-groups with multiple properties

2020-12-08 Thread Michael Ellerman
Gautham R Shenoy writes: > Hello Srikar, > > Thanks for taking a look at the patch. > > On Mon, Dec 07, 2020 at 05:40:42PM +0530, Srikar Dronamraju wrote: >> * Gautham R. Shenoy [2020-12-04 10:18:45]: >> >> > From: "Gautham R. Shenoy" >> >> >> >> > >> > static int

Re: [PATCH] EDAC/mv64x60: Remove orphan mv64x60 driver

2020-12-08 Thread Michael Ellerman
Borislav Petkov writes: > On Mon, Dec 07, 2020 at 03:02:53PM +1100, Michael Ellerman wrote: >> The mv64x60 EDAC driver depends on CONFIG_MV64X60. But that symbol is >> not user-selectable, and the last code that selected it was removed >> with the C2K board

Re: [PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-07 Thread Michael Ellerman
"Enrico Weigelt, metux IT consult" writes: > All archs, except Alpha, print out the irq number in hex, but the message > looks like it was a decimal number, which is quite confusing. Fixing this > by adding "0x" prefix. Arguably decimal would be better, /proc/interrupts and /proc/irq/ both use

Re: [PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-07 Thread Michael Ellerman
Christophe Leroy writes: > Le 07/12/2020 à 01:24, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> Since commit c33165253492 ("powerpc: use non-set_fs based maccess >>> routines"), userspace access is not granted anymore when using >>&

[PATCH] EDAC/mv64x60: Remove orphan mv64x60 driver

2020-12-06 Thread Michael Ellerman
so remove it. Suggested-by: Borislav Petkov Signed-off-by: Michael Ellerman --- drivers/edac/Kconfig| 7 - drivers/edac/Makefile | 1 - drivers/edac/mv64x60_edac.c | 883 drivers/edac/mv64x60_edac.h | 114 - 4 files changed, 1005

Re: [PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-06 Thread Michael Ellerman
Christophe Leroy writes: > Since commit c33165253492 ("powerpc: use non-set_fs based maccess > routines"), userspace access is not granted anymore when using > copy_from_kernel_nofault() > > However, kthread_probe_data() uses copy_from_kernel_nofault() > to check validity of pointers. When the

[GIT PULL] Please pull powerpc/linux.git powerpc-5.10-5 tag

2020-12-05 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.10. The change to kernel/cpu.c is just adding an optional arch override, and has Peter's ack. cheers The following changes since commit b6b79dd53082db11070b4368d85dd6699ff0b063:

Re: WARN_ON_ONCE

2020-12-05 Thread Michael Ellerman
Alexey Kardashevskiy writes: > On 04/12/2020 12:25, Michael Ellerman wrote: >> Dmitry Vyukov writes: >>> On Thu, Dec 3, 2020 at 10:19 AM Dmitry Vyukov wrote: >>>> On Thu, Dec 3, 2020 at 10:10 AM Alexey Kardashevskiy >>>> wrote: >>>>&g

Re: [PATCH] MAINTAINERS: Update 68k Mac entry

2020-12-05 Thread Michael Ellerman
uot;M68K ON APPLE MACINTOSH" section > accordingly. > > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Joshua Thompson > Cc: linuxppc-...@lists.ozlabs.org > Cc: linux-m...@lists.linux-m68k.org > Signed-off-by: Finn Thain > --- > MAINTAINERS | 2 ++ > 1 fi

Re: [PATCH] powerpc: Stop exporting __clear_user which is now inlined.

2020-12-05 Thread Michael Ellerman
> > Signed-off-by: Michal Suchanek > --- > arch/powerpc/lib/ppc_ksyms.c | 1 - > 1 file changed, 1 deletion(-) Acked-by: Michael Ellerman cheers > diff --git a/arch/powerpc/lib/ppc_ksyms.c b/arch/powerpc/lib/ppc_ksyms.c > index c7f8e9586316..4b81fd96aa3e 100644 > --- a/arch/p

Re: [PATCH] powerpc/xmon: Change printk() to pr_cont()

2020-12-04 Thread Michael Ellerman
Christophe Leroy writes: > Since some time now, printk() adds carriage return, leading to > unusable xmon output: > > [ 54.288722] sysrq: Entering xmon > [ 54.292209] Vector: 0 at [cace3d2c] > [ 54.292274] pc: > [ 54.292331] c0023650 ... > diff --git a/arch/powerpc/xmon/nonstdio.c

Re: WARN_ON_ONCE

2020-12-03 Thread Michael Ellerman
Dmitry Vyukov writes: > On Thu, Dec 3, 2020 at 10:19 AM Dmitry Vyukov wrote: >> On Thu, Dec 3, 2020 at 10:10 AM Alexey Kardashevskiy wrote: >> > >> > Hi! >> > >> > Syzkaller triggered WARN_ON_ONCE at >> > >> >

Re: [PATCH] powerpc/mm: Don't see NULL pointer dereference as a KUAP fault

2020-12-03 Thread Michael Ellerman
Christophe Leroy writes: > Sometimes, NULL pointer dereferences are expected. Even when they > are accidental they are unlikely an exploit attempt because the > first page is never mapped. The first page can be mapped if mmap_min_addr is 0. Blocking all faults to the first page would

Re: [PATCH] EDAC, mv64x60: Fix error return code in mv64x60_pci_err_probe()

2020-12-03 Thread Michael Ellerman
Borislav Petkov writes: > On Tue, Nov 24, 2020 at 02:30:09PM +0800, Wang ShaoBo wrote: >> Fix to return -ENODEV error code when edac_pci_add_device() failed instaed >> of 0 in mv64x60_pci_err_probe(), as done elsewhere in this function. >> >> Fixes: 4f4aeeabc061 ("drivers-edac: add marvell

Re: [PATCH v2 02/24] exec: Simplify unshare_files

2020-12-01 Thread Michael Ellerman
Arnd Bergmann writes: ... > > If there are no objections, I can also send a patch to remove > CONFIG_PPC_CELL_NATIVE, PPC_IBM_CELL_BLADE and > everything that depends on those symbols, leaving only the > bits needed by ps3 in the arch/powerpc/platforms/cell directory. I'm not sure I'd merge it.

Re: [PATCH 5/5] powerpc/configs: drop unused BACKLIGHT_GENERIC option

2020-11-30 Thread Michael Ellerman
/configs/powernv_defconfig | 1 - > 1 file changed, 1 deletion(-) Acked-by: Michael Ellerman cheers > diff --git a/arch/powerpc/configs/powernv_defconfig > b/arch/powerpc/configs/powernv_defconfig > index cf30fc24413b..60a30fffeda0 100644 > --- a/arch/powerpc/configs/powernv_defconf

Re: [PATCH 2/3] powerpc/pseries/hotplug-cpu: fix memleak in dlpar_cpu_add_by_count

2020-11-29 Thread Michael Ellerman
Qinglang Miao writes: > kfree(cpu_drcs) should be called when it fails to perform > of_find_node_by_path("/cpus") in dlpar_cpu_add_by_count, > otherwise there would be a memleak. > > In fact, the patch a0ff72f9f5a7 ought to remove kfree in > find_dlpar_cpus_to_add rather than

[GIT PULL] Please pull powerpc/linux.git powerpc-5.10-4 tag

2020-11-27 Thread Michael Ellerman
(1): KVM: PPC: Book3S HV: XIVE: Fix possible oops when accessing ESB page Michael Ellerman (2): powerpc: Drop -me200 addition to build flags Merge tag 'powerpc-cve-2020-4788' into fixes Nicholas Piggin (2): powerpc/64s: Fix KVM system reset handling when CONFIG_PPC_PSERIES

Re: [PATCH v3 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping()

2020-11-25 Thread Michael Ellerman
Marc Zyngier writes: > On 2020-11-25 16:24, Laurent Vivier wrote: >> On 25/11/2020 17:05, Denis Kirjanov wrote: >>> On 11/25/20, Laurent Vivier wrote: With virtio multiqueue, normally each queue IRQ is mapped to a CPU. But since commit 0d9f0a52c8b9f ("virtio_scsi: use virtio IRQ

Re: [PATCH v3 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping()

2020-11-25 Thread Michael Ellerman
the CPUs > on pseries. > > BugId: https://bugzilla.redhat.com/show_bug.cgi?id=1702939 > Signed-off-by: Laurent Vivier > Reviewed-by: Greg Kurz > --- > arch/powerpc/platforms/pseries/msi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Michael Ellerman

Re: [PATCH] powerpc/mm: Fix comparing pointer to 0 warning

2020-11-25 Thread Michael Ellerman
On Tue, 10 Nov 2020 10:56:01 +0800, xiakaixu1...@gmail.com wrote: > Fixes coccicheck warning: > > ./arch/powerpc/mm/pgtable_32.c:87:11-12: WARNING comparing pointer to 0 > > Avoid pointer type value compared to 0. Applied to powerpc/next. [1/1] powerpc/mm: Fix comparing pointer to 0 warning

Re: [PATCH] powerpc/powernv/sriov: fix unsigned int win compared to less than zero

2020-11-25 Thread Michael Ellerman
On Tue, 10 Nov 2020 19:19:30 +0800, xiakaixu1...@gmail.com wrote: > Fix coccicheck warning: > > ./arch/powerpc/platforms/powernv/pci-sriov.c:443:7-10: WARNING: Unsigned > expression compared with zero: win < 0 > ./arch/powerpc/platforms/powernv/pci-sriov.c:462:7-10: WARNING: Unsigned >

Re: [PATCH v2 0/8] powernv/memtrace: don't abuse memory hot(un)plug infrastructure for memory allocations

2020-11-25 Thread Michael Ellerman
On Wed, 11 Nov 2020 15:53:14 +0100, David Hildenbrand wrote: > Based on latest linux/master > > powernv/memtrace is the only in-kernel user that rips out random memory > it never added (doesn't own) in order to allocate memory without a > linear mapping. Let's stop abusing memory hot(un)plug

Re: [PATCH] powerpc: Use the common INIT_DATA_SECTION macro in vmlinux.lds.S

2020-11-25 Thread Michael Ellerman
On Wed, 4 Nov 2020 18:59:10 +0800, Youling Tang wrote: > Use the common INIT_DATA_SECTION rule for the linker script in an effort > to regularize the linker script. Applied to powerpc/next. [1/1] powerpc: Use the common INIT_DATA_SECTION macro in vmlinux.lds.S

Re: [PATCHv2] selftests/powerpc/eeh: disable kselftest timeout setting for eeh-basic

2020-11-25 Thread Michael Ellerman
On Fri, 23 Oct 2020 10:45:39 +0800, Po-Hsu Lin wrote: > The eeh-basic test got its own 60 seconds timeout (defined in commit > 414f50434aa2 "selftests/eeh: Bump EEH wait time to 60s") per breakable > device. > > And we have discovered that the number of breakable devices varies > on different

Re: [PATCH] powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

2020-11-25 Thread Michael Ellerman
On Wed, 28 Oct 2020 17:15:51 +0800, Qinglang Miao wrote: > I noticed that iounmap() of msgr_block_addr before return from > mpic_msgr_probe() in the error handling case is missing. So use > devm_ioremap() instead of just ioremap() when remapping the message > register block, so the mapping will be

Re: [PATCH v1 0/4] powernv/memtrace: don't abuse memory hot(un)plug infrastructure for memory allocations

2020-11-25 Thread Michael Ellerman
On Thu, 29 Oct 2020 17:27:14 +0100, David Hildenbrand wrote: > powernv/memtrace is the only in-kernel user that rips out random memory > it never added (doesn't own) in order to allocate memory without a > linear mapping. Let's stop abusing memory hot(un)plug infrastructure for > that - use

Re: [PATCH] powerpc/bitops: Fix possible undefined behaviour with fls() and fls64()

2020-11-25 Thread Michael Ellerman
On Thu, 22 Oct 2020 14:05:46 + (UTC), Christophe Leroy wrote: > fls() and fls64() are using __builtin_ctz() and _builtin_ctzll(). > On powerpc, those builtins trivially use ctlzw and ctlzd power > instructions. > > Allthough those instructions provide the expected result with > input argument

Re: [PATCH v2 1/3] powerpc/64s: Replace RFI by RFI_TO_KERNEL and remove RFI

2020-11-25 Thread Michael Ellerman
On Sun, 8 Nov 2020 16:57:35 + (UTC), Christophe Leroy wrote: > In head_64.S, we have two places using RFI to return to > kernel. Use RFI_TO_KERNEL instead. > > They are the two only places using RFI on book3s/64, so > the RFI macro can go away. Applied to powerpc/next. [1/3] powerpc/64s:

Re: [PATCH v13 0/8] powerpc: switch VDSO to C implementation

2020-11-25 Thread Michael Ellerman
On Tue, 3 Nov 2020 18:07:11 + (UTC), Christophe Leroy wrote: > This is a series to switch powerpc VDSO to generic C implementation. > > Changes in v13: > - Reorganised headers to avoid the need for a fake 32 bits config for > building VDSO32 on PPC64 > - Rebased after the removal of powerpc

Re: [PATCH] powerpc: avoid broken GCC __attribute__((optimize))

2020-11-25 Thread Michael Ellerman
On Wed, 28 Oct 2020 09:04:33 +0100, Ard Biesheuvel wrote: > Commit 7053f80d9696 ("powerpc/64: Prevent stack protection in early boot") > introduced a couple of uses of __attribute__((optimize)) with function > scope, to disable the stack protector in some early boot code. > > Unfortunately, and

Re: [PATCH 1/3] perf/core: Flush PMU internal buffers for per-CPU events

2020-11-25 Thread Michael Ellerman
Namhyung Kim writes: > Hello, > > On Mon, Nov 23, 2020 at 8:00 PM Michael Ellerman wrote: >> >> Namhyung Kim writes: >> > Hi Peter and Kan, >> > >> > (Adding PPC folks) >> > >> > On Tue, Nov 17, 2020 at 2:01 PM Namhyung Kim wro

Re: linux-next: build failure in Linus' tree

2020-11-24 Thread Michael Ellerman
Daniel Axtens writes: > Thanks sfr and mpe. > >> Applied to powerpc/fixes. >> >> [1/1] powerpc/64s: Fix allnoconfig build since uaccess flush >> >> https://git.kernel.org/powerpc/c/b6b79dd53082db11070b4368d85dd6699ff0b063 > > We also needed a similar fix for stable, which has also been

Re: [PATCH v3 2/2] powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too

2020-11-23 Thread Michael Ellerman
Oleg Nesterov writes: > Christophe, et al, > > So what? > > Are you going to push your change or should I re-send 1-2 without > whitespace cleanups? I'll take your 1 & 2 and fixup the whitespace issues when applying. cheers > On 11/19, Oleg Nesterov wrote: >> >> On 11/19, Christophe Leroy

Re: linux-next: build failure in Linus' tree

2020-11-23 Thread Michael Ellerman
On Mon, 23 Nov 2020 18:40:16 +1100, Stephen Rothwell wrote: > After merging most of the trees, today's linux-next build (powerpc64 > allnoconfig) failed like this: > > In file included from arch/powerpc/include/asm/kup.h:18, > from arch/powerpc/include/asm/uaccess.h:9, >

Re: [PATCH 1/3] perf/core: Flush PMU internal buffers for per-CPU events

2020-11-23 Thread Michael Ellerman
Namhyung Kim writes: > Hi Peter and Kan, > > (Adding PPC folks) > > On Tue, Nov 17, 2020 at 2:01 PM Namhyung Kim wrote: >> >> Hello, >> >> On Thu, Nov 12, 2020 at 4:54 AM Liang, Kan wrote: >> > >> > >> > >> > On 11/11/2020 11:25 AM, Peter Zijlstra wrote: >> > > On Mon, Nov 09, 2020 at

Re: [PATCH] selftests/seccomp: powerpc: Fix typo in macro variable name

2020-11-18 Thread Michael Ellerman
pf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) I hit that and thought I'd sent a patch for it, but seems I never actually sent it. So thanks. I assume Shuah will take it. Acked-by: Michael Ellerman cheers > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c

Re: [PATCH v2 7/8] powerpc/mm: remove linear mapping if __add_pages() fails in arch_add_memory()

2020-11-17 Thread Michael Ellerman
David Hildenbrand writes: > On 17.11.20 16:51, Oscar Salvador wrote: >> On Wed, Nov 11, 2020 at 03:53:21PM +0100, David Hildenbrand wrote: >>> Let's revert what we did in case seomthing goes wrong and we return an >> "something" :-) > > Thanks! :) > > @Michael, I assume if I don't have to resend,

Re: [PATCH 2/3] Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"

2020-11-17 Thread Michael Ellerman
"Gustavo A. R. Silva" writes: > On Tue, Nov 17, 2020 at 11:10:26AM -0800, Nick Desaulniers wrote: >> On Mon, Nov 16, 2020 at 7:02 PM Nathan Chancellor >> wrote: >> > >> > On Sun, Nov 15, 2020 at 08:35:31PM -0800, Nick Desaulniers wrote: >> > > This reverts commit 6a9dc5fd6170 ("lib: Revert use

Re: [PATCH 3/3] powerpc: fix -Wimplicit-fallthrough

2020-11-17 Thread Michael Ellerman
com/ClangBuiltLinux/linux/issues/236 > Signed-off-by: Nick Desaulniers > --- > arch/powerpc/kernel/prom_init.c | 1 + > arch/powerpc/kernel/uprobes.c | 1 + > arch/powerpc/perf/imc-pmu.c | 1 + > 3 files changed, 3 insertions(+) Acked-by: Michael Ellerman cheers

Re: [PATCH 1/3] powerpc: boot: include compiler_attributes.h

2020-11-17 Thread Michael Ellerman
t; -include compiler_types.h like the main kernel does, though testing that > produces a whole sea of warnings to cleanup. This approach is minimally > invasive. > > arch/powerpc/boot/Makefile | 1 + > arch/powerpc/boot/decompress.c | 1 - > 2 files changed, 1 insertion(+), 1 deletion(-) Acked-by: Michael Ellerman cheers

Re: [PATCH] powerpc: Drop -me200 addition to build flags

2020-11-17 Thread Michael Ellerman
On Mon, 16 Nov 2020 23:09:13 +1100, Michael Ellerman wrote: > Currently a build with CONFIG_E200=y will fail with: > > Error: invalid switch -me200 > Error: unrecognized option -me200 > > Upstream binutils has never supported an -me200 option. Presumably it > was su

Re: [PATCH 1/2] kbuild: Hoist '--orphan-handling' into Kconfig

2020-11-17 Thread Michael Ellerman
kefile | 4 +++- > arch/arm64/Kconfig| 1 + > arch/arm64/Makefile | 4 > arch/powerpc/Kconfig | 1 + > arch/powerpc/Makefile | 1 - Acked-by: Michael Ellerman (powerpc) > arch/x86/Kconfig | 1 + > arch

Re: [PATCH] powerpc/powernv/sriov: fix unsigned int win compared to less than zero

2020-11-16 Thread Michael Ellerman
Andrew Donnellan writes: > On 10/11/20 10:19 pm, xiakaixu1...@gmail.com wrote: >> From: Kaixu Xia >> >> Fix coccicheck warning: >> >> ./arch/powerpc/platforms/powernv/pci-sriov.c:443:7-10: WARNING: Unsigned >> expression compared with zero: win < 0 >>

Re: [PATCH V3] sched/rt, powerpc: Prepare for PREEMPT_RT

2020-11-16 Thread Michael Ellerman
Wang Qing writes: > PREEMPT_RT is a separate preemption model, CONFIG_PREEMPT will > be disabled when CONFIG_PREEMPT_RT is enabled, so we need > to add CONFIG_PREEMPT_RT output to __die(). > > Signed-off-by: Wang Qing Something fairly similar was posted previously. That time I said: I

[PATCH] powerpc: Drop -me200 addition to build flags

2020-11-16 Thread Michael Ellerman
that we can't even build test, so drop the addition of -me200 to the build flags, so we can at least build with CONFIG_E200=y. Reported-by: Németh Márton Reported-by: kernel test robot Signed-off-by: Michael Ellerman --- More discussion: https://lore.kernel.org/lkml/202011131146.g8dplqdd

Re: Error: invalid switch -me200

2020-11-15 Thread Michael Ellerman
Christophe Leroy writes: > Le 14/11/2020 à 01:20, Segher Boessenkool a écrit : >> On Fri, Nov 13, 2020 at 12:14:18PM -0800, Nick Desaulniers wrote: >> Error: invalid switch -me200 >> Error: unrecognized option -me200 > > 251 cpu-as-$(CONFIG_E200) += -Wa,-me200 > > Are

Re: [PATCH v2 1/2] powerpc/8xx: Always fault when _PAGE_ACCESSED is not set

2020-11-08 Thread Michael Ellerman
On Mon, 12 Oct 2020 08:54:31 + (UTC), Christophe Leroy wrote: > The kernel expects pte_young() to work regardless of CONFIG_SWAP. > > Make sure a minor fault is taken to set _PAGE_ACCESSED when it > is not already set, regardless of the selection of CONFIG_SWAP. > > This adds at least 3

Re: [PATCH] powerpc/40x: Always fault when _PAGE_ACCESSED is not set

2020-11-08 Thread Michael Ellerman
On Sat, 10 Oct 2020 15:14:29 + (UTC), Christophe Leroy wrote: > The kernel expects pte_young() to work regardless of CONFIG_SWAP. > > Make sure a minor fault is taken to set _PAGE_ACCESSED when it > is not already set, regardless of the selection of CONFIG_SWAP. Applied to powerpc/fixes.

<    1   2   3   4   5   6   7   8   9   10   >