Re: Kernel 5.10-rc4 doesn't boot

2020-11-28 Thread Christophe Leroy
Le 29/11/2020 à 02:33, Stan Johnson a écrit : On 11/25/20 5:52 AM, Elimar Riesebieter wrote: * John Paul Adrian Glaubitz [2020-11-25 13:04 +0100]: On 11/25/20 12:40 PM, Elimar Riesebieter wrote: I tried to boot linux-image-5.10.0-rc4-powerpc on my PowerBook5,8. It seems the ramdisk

[Bug 209869] Kernel 5.10-rc1 fails to boot on a PowerMac G4 3,6 at an early stage

2020-11-28 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=209869 --- Comment #14 from Erhard F. (erhar...@mailbox.org) --- Thanks! -- You are receiving this mail because: You are watching the assignee of the bug.

Re: [PATCH 6/8] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-11-28 Thread Andy Lutomirski
On Sat, Nov 28, 2020 at 8:02 AM Nicholas Piggin wrote: > > On big systems, the mm refcount can become highly contented when doing > a lot of context switching with threaded applications (particularly > switching between the idle thread and an application thread). > > Abandoning lazy tlb slows

Re: [PATCH 1/8] lazy tlb: introduce exit_lazy_tlb

2020-11-28 Thread Andy Lutomirski
On Sat, Nov 28, 2020 at 8:01 AM Nicholas Piggin wrote: > > This is called at points where a lazy mm is switched away or made not > lazy (by its owner switching back). > > Signed-off-by: Nicholas Piggin > --- > arch/arm/mach-rpc/ecard.c| 1 + > arch/powerpc/mm/book3s64/radix_tlb.c |

Re: [PATCH 5/8] lazy tlb: allow lazy tlb mm switching to be configurable

2020-11-28 Thread Andy Lutomirski
On Sat, Nov 28, 2020 at 8:02 AM Nicholas Piggin wrote: > > NOMMU systems could easily go without this and save a bit of code > and the refcount atomics, because their mm switch is a no-op. I > haven't flipped them over because haven't audited all arch code to > convert over to using the _lazy_tlb

Re: [PATCH net v3 0/9] ibmvnic: assorted bug fixes

2020-11-28 Thread Jakub Kicinski
On Wed, 25 Nov 2020 18:04:23 -0600 Dany Madden wrote: > Assorted fixes for ibmvnic originated from "[PATCH net 00/15] ibmvnic: > assorted bug fixes" sent by Lijun Pan. Applied, thanks!

Re: [PATCH] powerpc: fix the allyesconfig build

2020-11-28 Thread Jakub Kicinski
On Sat, 28 Nov 2020 16:20:54 +1100 Stephen Rothwell wrote: > On Fri, 27 Nov 2020 17:56:42 -0800 Jakub Kicinski wrote: > > > > What's the offending structure in hisilicon? I'd rather have a look > > packing structs with pointers in 'em sounds questionable. > > > > I only see these two: > > > > $

Re: [PATCH] powerpc: Allow relative pointers in bug table entries

2020-11-28 Thread Christophe Leroy
Le 27/11/2020 à 04:02, Jordan Niethe a écrit : This enables GENERIC_BUG_RELATIVE_POINTERS on Power so that 32-bit offsets are stored in the bug entries rather than 64-bit pointers. Signed-off-by: Jordan Niethe --- arch/powerpc/Kconfig | 4 arch/powerpc/include/asm/bug.h |

Re: [PATCH v5] PCI: Unify ECAM constants in native PCI Express drivers

2020-11-28 Thread Bjorn Helgaas
On Fri, Nov 27, 2020 at 10:46:26AM +, Krzysztof Wilczyński wrote: > Unify ECAM-related constants into a single set of standard constants > defining memory address shift values for the byte-level address that can > be used when accessing the PCI Express Configuration Space, and then > move

Re: [PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-11-28 Thread Andy Lutomirski
On Sat, Nov 28, 2020 at 8:02 AM Nicholas Piggin wrote: > > And get rid of the generic sync_core_before_usermode facility. This is > functionally a no-op in the core scheduler code, but it also catches > > This helper is the wrong way around I think. The idea that membarrier > state requires a

Re: [PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings

2020-11-28 Thread kernel test robot
. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/huge-vmalloc-mappings/20201128-232946 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next

Re: [PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings

2020-11-28 Thread kernel test robot
. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/huge-vmalloc-mappings/20201128-232946 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next

[Bug 204789] Boot failure with more than 256G of memory on Power9 with 4K pages & Hash MMU

2020-11-28 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204789 Cameron (c...@neo-zeon.de) changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[PATCH 8/8] powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN

2020-11-28 Thread Nicholas Piggin
On a 16-socket 192-core POWER8 system, a context switching benchmark with as many software threads as CPUs (so each switch will go in and out of idle), upstream can achieve a rate of about 1 million context switches per second. After this patch it goes up to 118 million. Signed-off-by: Nicholas

[PATCH 7/8] powerpc: use lazy mm refcount helper functions

2020-11-28 Thread Nicholas Piggin
Use _lazy_tlb functions for lazy mm refcounting in powerpc, to prepare to move to MMU_LAZY_TLB_SHOOTDOWN. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index

[PATCH 6/8] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-11-28 Thread Nicholas Piggin
On big systems, the mm refcount can become highly contented when doing a lot of context switching with threaded applications (particularly switching between the idle thread and an application thread). Abandoning lazy tlb slows switching down quite a bit in the important user->idle->user cases, so

[PATCH 5/8] lazy tlb: allow lazy tlb mm switching to be configurable

2020-11-28 Thread Nicholas Piggin
NOMMU systems could easily go without this and save a bit of code and the refcount atomics, because their mm switch is a no-op. I haven't flipped them over because haven't audited all arch code to convert over to using the _lazy_tlb refcounting. Signed-off-by: Nicholas Piggin --- arch/Kconfig

[PATCH 4/8] lazy tlb: introduce lazy mm refcount helper functions

2020-11-28 Thread Nicholas Piggin
Add explicit _lazy_tlb annotated functions for lazy mm refcounting. This makes things a bit more explicit, and allows explicit refcounting to be removed if it is not used. Signed-off-by: Nicholas Piggin --- arch/arm/mach-rpc/ecard.c| 2 +- arch/powerpc/mm/book3s64/radix_tlb.c | 4

[PATCH 3/8] x86: remove ARCH_HAS_SYNC_CORE_BEFORE_USERMODE

2020-11-28 Thread Nicholas Piggin
Switch remaining x86-specific users to asm/sync_core.h, remove the linux/sync_core.h header and ARCH_ option. Signed-off-by: Nicholas Piggin --- arch/x86/Kconfig| 1 - arch/x86/kernel/alternative.c | 2 +- arch/x86/kernel/cpu/mce/core.c | 2 +-

[PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-11-28 Thread Nicholas Piggin
And get rid of the generic sync_core_before_usermode facility. This is functionally a no-op in the core scheduler code, but it also catches This helper is the wrong way around I think. The idea that membarrier state requires a core sync before returning to user is the easy one that does not need

[PATCH 1/8] lazy tlb: introduce exit_lazy_tlb

2020-11-28 Thread Nicholas Piggin
This is called at points where a lazy mm is switched away or made not lazy (by its owner switching back). Signed-off-by: Nicholas Piggin --- arch/arm/mach-rpc/ecard.c| 1 + arch/powerpc/mm/book3s64/radix_tlb.c | 1 + fs/exec.c| 6 --

[PATCH 0/8] shoot lazy tlbs

2020-11-28 Thread Nicholas Piggin
This is a rebase now on top of Arnd's asm-generic tree, which has reduced most of the fluff from this patch series. The x86 refactoring is still in the way a bit, I hope to get some movement on that rather than rebase the main patches off it, because I think it's a good cleanup. I think it could

[PATCH v8 12/12] powerpc/64s/radix: Enable huge vmalloc mappings

2020-11-28 Thread Nicholas Piggin
Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin --- Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/powerpc/Kconfig| 1 + 2 files changed, 3 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt

[PATCH v8 04/12] mm/ioremap: rename ioremap_*_range to vmap_*_range

2020-11-28 Thread Nicholas Piggin
This will be used as a generic kernel virtual mapping function, so re-name it in preparation. Signed-off-by: Nicholas Piggin --- mm/ioremap.c | 64 +++- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/mm/ioremap.c b/mm/ioremap.c

[PATCH v8 09/12] mm: Move vmap_range from mm/ioremap.c to mm/vmalloc.c

2020-11-28 Thread Nicholas Piggin
This is a generic kernel virtual memory mapper, not specific to ioremap. Signed-off-by: Nicholas Piggin --- include/linux/vmalloc.h | 3 + mm/ioremap.c| 197 mm/vmalloc.c| 196 +++ 3 files

[PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings

2020-11-28 Thread Nicholas Piggin
Support huge page vmalloc mappings. Config option HAVE_ARCH_HUGE_VMALLOC enables support on architectures that define HAVE_ARCH_HUGE_VMAP and supports PMD sized vmap mappings. vmalloc will attempt to allocate PMD-sized pages if allocating PMD size or larger, and fall back to small pages if that

[PATCH v8 08/12] x86: inline huge vmap supported functions

2020-11-28 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Nicholas Piggin ---

[PATCH v8 10/12] mm/vmalloc: add vmap_range_noflush variant

2020-11-28 Thread Nicholas Piggin
As a side-effect, the order of flush_cache_vmap() and arch_sync_kernel_mappings() calls are switched, but that now matches the other callers in this file. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH v8 05/12] mm: HUGE_VMAP arch support cleanup

2020-11-28 Thread Nicholas Piggin
This changes the awkward approach where architectures provide init functions to determine which levels they can provide large mappings for, to one where the arch is queried for each call. This removes code and indirection, and allows constant-folding of dead code for unsupported levels. This

[PATCH v8 02/12] mm: apply_to_pte_range warn and fail if a large pte is encountered

2020-11-28 Thread Nicholas Piggin
apply_to_pte_range might mistake a large pte for bad, or treat it as a page table, resulting in a crash or corruption. Add a test to warn and return error if large entries are found. Signed-off-by: Nicholas Piggin --- mm/memory.c | 66 +++-- 1

[PATCH v8 06/12] powerpc: inline huge vmap supported functions

2020-11-28 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/vmalloc.h | 19 ---

[PATCH v8 07/12] arm64: inline huge vmap supported functions

2020-11-28 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Acked-by: Catalin Marinas Signed-off-by: Nicholas Piggin ---

[PATCH v8 03/12] mm/vmalloc: rename vmap_*_range vmap_pages_*_range

2020-11-28 Thread Nicholas Piggin
The vmalloc mapper operates on a struct page * array rather than a linear physical address, re-name it to make this distinction clear. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c

[PATCH v8 01/12] mm/vmalloc: fix vmalloc_to_page for huge vmap mappings

2020-11-28 Thread Nicholas Piggin
vmalloc_to_page returns NULL for addresses mapped by larger pages[*]. Whether or not a vmap is huge depends on the architecture details, alignments, boot options, etc., which the caller can not be expected to know. Therefore HUGE_VMAP is a regression for vmalloc_to_page. This change teaches

[PATCH v8 00/12] huge vmalloc mappings

2020-11-28 Thread Nicholas Piggin
Hi Andrew, Please consider this for -mm. Thanks, Nick Since v7: - Rebase, added some acks, compile fix - Removed "order=" from vmallocinfo, it's a bit confusing (nr_pages is in small page size for compatibility). - Added arch_vmap_pmd_supported() test before starting to allocate the large

[PATCH v3 19/19] powerpc/64s: power4 nap fixup in C

2020-11-28 Thread Nicholas Piggin
There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 15 + arch/powerpc/include/asm/processor.h | 1 + arch/powerpc/include/asm/thread_info.h | 6

[PATCH v3 18/19] powerpc/64s: runlatch interrupt handling in C

2020-11-28 Thread Nicholas Piggin
There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 7 +++ arch/powerpc/kernel/exceptions-64s.S | 18 -- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git

[PATCH v3 17/19] powerpc/64s: move NMI soft-mask handling to C

2020-11-28 Thread Nicholas Piggin
Saving and restoring soft-mask state can now be done in C using the interrupt handler wrapper functions. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 26 arch/powerpc/kernel/exceptions-64s.S | 60 2 files changed, 26

[PATCH v3 16/19] powerpc: move NMI entry/exit code into wrapper

2020-11-28 Thread Nicholas Piggin
This moves the common NMI entry and exit code into the interrupt handler wrappers. This changes the behaviour of soft-NMI (watchdog) and HMI interrupts, and also MCE interrupts on 64e, by adding missing parts of the NMI entry to them. It fixes a bug with sreset on pseries HPT guests which

[PATCH v3 15/19] powerpc/64: entry cpu time accounting in C

2020-11-28 Thread Nicholas Piggin
There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 7 +++ arch/powerpc/include/asm/ppc_asm.h | 24 arch/powerpc/kernel/exceptions-64e.S | 1 -

[PATCH v3 14/19] powerpc/64: move account_stolen_time into its own function

2020-11-28 Thread Nicholas Piggin
This will be used by interrupt entry as well. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/cputime.h | 15 +++ arch/powerpc/kernel/syscall_64.c | 10 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/cputime.h

[PATCH v3 12/19] powerpc/64s: move context tracking exit to interrupt exit path

2020-11-28 Thread Nicholas Piggin
The interrupt handler wrapper functions are not the ideal place to maintain context tracking because after they return, the low level exit code must then determine if there are interrupts to replay, or if the task should be preempted, etc. Those paths (e.g., schedule_user) include their own

[PATCH v3 11/19] powerpc: handle irq_enter/irq_exit in interrupt handler wrappers

2020-11-28 Thread Nicholas Piggin
Move irq_enter/irq_exit into asynchronous interrupt handler wrappers. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 2 ++ arch/powerpc/kernel/dbell.c | 3 +-- arch/powerpc/kernel/irq.c| 4 arch/powerpc/kernel/tau_6xx.c| 3 ---

[PATCH v3 13/19] powerpc/64s: reconcile interrupts in C

2020-11-28 Thread Nicholas Piggin
There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 15 +++ arch/powerpc/kernel/exceptions-64s.S | 26 -- 2 files changed, 11 insertions(+), 30 deletions(-)

[PATCH v3 10/19] powerpc/64: add context tracking to asynchronous interrupts

2020-11-28 Thread Nicholas Piggin
Previously context tracking was not done for asynchronous interrupts, (those that run in interrupt context), and if those would cause a reschedule when they exit, then scheduling functions (schedule_user, preempt_schedule_irq) call exception_enter/exit to fix this up and exit user context. This

[PATCH v3 09/19] powerpc/64: context tracking move to interrupt wrappers

2020-11-28 Thread Nicholas Piggin
This moves exception_enter/exit calls to wrapper functions for synchronous interrupts. More interrupt handlers are covered by this than previously. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 9 arch/powerpc/kernel/traps.c | 74

[PATCH v3 08/19] powerpc/64: context tracking remove _TIF_NOHZ

2020-11-28 Thread Nicholas Piggin
Add context tracking to the system call handler explicitly, and remove _TIF_NOHZ. This saves 35 cycles on gettid system call cost on POWER9 with a CONFIG_NOHZ_FULL kernel. Signed-off-by: Nicholas Piggin --- arch/Kconfig | 6 -- arch/powerpc/Kconfig

[PATCH v3 07/19] powerpc: add interrupt_cond_local_irq_enable helper

2020-11-28 Thread Nicholas Piggin
Simple helper for synchronous interrupt handlers to use to enable interrupts if they were taken in interrupt-enabled context. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 7 +++ arch/powerpc/kernel/traps.c | 24 +++-

[PATCH v3 06/19] powerpc: add interrupt wrapper entry / exit stub functions

2020-11-28 Thread Nicholas Piggin
These will be used by subsequent patches. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 66 1 file changed, 66 insertions(+) diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h index

[PATCH v3 05/19] powerpc: interrupt handler wrapper functions

2020-11-28 Thread Nicholas Piggin
Add wrapper functions (derived from x86 macros) for interrupt handler functions. This allows interrupt entry code to be written in C. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/asm-prototypes.h | 29 --- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 -

[PATCH v3 04/19] powerpc/perf: move perf irq/nmi handling details into traps.c

2020-11-28 Thread Nicholas Piggin
This is required in order to allow more significant differences between NMI type interrupt handlers and regular asynchronous handlers. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/traps.c | 31 +++- arch/powerpc/perf/core-book3s.c | 35

[PATCH v3 03/19] powerpc: bad_page_fault, do_break get registers from regs

2020-11-28 Thread Nicholas Piggin
Similar to the previous patch this makes interrupt handler function types more regular so they can be wrapped with the next patch. bad_page_fault and do_break are not performance critical. [32s DABR code from Christophe Leroy ] Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/bug.h

[PATCH v3 01/19] powerpc/64s: move the last of the page fault handling logic to C

2020-11-28 Thread Nicholas Piggin
The page fault handling still has some complex logic particularly around hash table handling, in asm. Implement this in C instead. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/include/asm/bug.h| 1 +

[PATCH v3 02/19] powerpc: remove arguments from fault handler functions

2020-11-28 Thread Nicholas Piggin
Make mm fault handlers all just take the pt_regs * argument and load DAR/DSISR from that. Make those that return a value return long. This is done to make the function signatures match other handlers, which will help with a future patch to add wrappers. Explicit arguments could be added for

[PATCH v3 00/19] powerpc: interrupt wrappers

2020-11-28 Thread Nicholas Piggin
This adds interrupt handler wrapper functions, similar to the generic / x86 code, and moves several common operations into them from either asm or open coded in the individual handlers. Since v1: - Fixed a couple of compile issues - Fixed perf weirdness (sometimes NMI, sometimes not) - Also move

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

2020-11-28 Thread Qinglang Miao
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 dlpar_cpu_add_by_count. I guess there might be a

[RFC PATCH] KVM: PPC: Book3S HV: Remove support for running HPT guest on RPT host without mixed mode support

2020-11-28 Thread Nicholas Piggin
This reverts much of commit c01015091a770 ("KVM: PPC: Book3S HV: Run HPT guests on POWER9 radix hosts"), which was required to run HPT guests on RPT hosts on early POWER9 CPUs without support for "mixed mode", which meant the host could not run with MMU on while guests were running. This code has

Re: [PATCH] ALSA: ppc: remove redundant checks in PS3 driver probe

2020-11-28 Thread Takashi Iwai
On Fri, 27 Nov 2020 16:22:59 +0100, Leonard Goehrs wrote: > > The check for the FW_FEATURE_PS3_LV1 firmware feature is already performed > in ps3_system_bus_init() before registering the driver. So if the probe > function is actually used, this feature is already known to be available. > > The

Re: [PATCH 2/2] powerpc/ps3: make system bus's remove and shutdown callbacks return void

2020-11-28 Thread Takashi Iwai
On Thu, 26 Nov 2020 17:59:50 +0100, Uwe Kleine-König wrote: > > The driver core ignores the return value of struct device_driver::remove > because there is only little that can be done. For the shutdown callback > it's ps3_system_bus_shutdown() which ignores the return value. > > To simplify the

Re: [PATCH 1/2] ALSA: ppc: drop if block with always false condition

2020-11-28 Thread Takashi Iwai
On Thu, 26 Nov 2020 17:59:49 +0100, Uwe Kleine-König wrote: > > The remove callback is only called for devices that were probed > successfully before. As the matching probe function cannot complete > without error if dev->match_id != PS3_MATCH_ID_SOUND, we don't have to > check this here. > >