Re: [PATCH] powerpc/module_64: Fix livepatching for RO modules

2021-12-08 Thread Michael Ellerman
Russell Currey writes: > On Tue, 2021-12-07 at 09:44 -0500, Joe Lawrence wrote: >> On 11/23/21 3:15 AM, Russell Currey wrote: >> >> [[ cc += livepatching list ]] >> >> Hi Russell, >> >> Thanks for writing a minimal fix for stable / backporting.  As I >> mentioned on the github issue [1], this

Re: [PATCH] powerpc: platforms: cell: pervasive: fix clang -Wimplicit-fallthrough

2021-12-08 Thread Michael Ellerman
Anders Roxell writes: > Clang warns: > > arch/powerpc/platforms/cell/pervasive.c:81:2: error: unannotated fall-through > between switch labels [-Werror,-Wimplicit-fallthrough] > case SRR1_WAKEEE: > ^ > arch/powerpc/platforms/cell/pervasive.c:81:2: note: insert 'break;' to avoid

Re: [PATCH] powerpc/603: Fix boot failure with DEBUG_PAGEALLOC and KFENCE

2021-12-08 Thread Michael Ellerman
Christophe Leroy writes: > Le 07/12/2021 à 11:34, Maxime Bizon a écrit : >> >> On Tue, 2021-12-07 at 06:10 +, Christophe Leroy wrote: >> >> Hello, >> >> With the patch applied and >> >> CONFIG_DEBUG_PAGEALLOC=y >> CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y >> CONFIG_DEBUG_VM=y >> >> I get

[Bug 215217] Kernel fails to boot at an early stage when built with GCC_PLUGIN_LATENT_ENTROPY=y (PowerMac G4 3,6)

2021-12-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215217 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added CC|

Re: [PATCH v2 0/6] KEXEC_SIG with appended signature

2021-12-08 Thread Nayna
On 11/25/21 13:02, Michal Suchanek wrote: Hello, Hi Michael, This is resend of the KEXEC_SIG patchset. The first patch is new because it'a a cleanup that does not require any change to the module verification code. The second patch is the only one that is intended to change any

Re: [PATCH 1/2] sizes.h: Add SZ_1T macro

2021-12-08 Thread Krzysztof Wilczyński
Hello Christophe, > Today drivers/pci/controller/pci-xgene.c defines SZ_1T > > Move it into linux/sizes.h so that it can be re-used elsewhere. Sounds like a good idea! By the way, there was an earlier version of this patch, did something happened? I think you simply extracted these changes

Re: [patch V2 20/23] PCI/MSI: Move msi_lock to struct pci_dev

2021-12-08 Thread Thomas Gleixner
On Wed, Dec 08 2021 at 11:29, Jason Gunthorpe wrote: > On Mon, Dec 06, 2021 at 11:27:56PM +0100, Thomas Gleixner wrote: >> if (!desc->pci.msi_attrib.can_mask) > > It looks like most of the time this is called by an irq_chip, except > for a few special cases list pci_msi_shutdown() > > Is this

[PATCH] powerpc/powermac: Add additional missing lockdep_register_key()

2021-12-08 Thread Christophe Leroy
Commit df1f679d19ed ("powerpc/powermac: Add missing lockdep_register_key()") fixed a problem that was causing a WARNING. There are two other places in the same file with the same problem originating from commit 9e607f72748d ("i2c_powermac: shut up lockdep warning"). Add missing

[PATCH v4 10/10] powerpc/mm: Properly randomise mmap with slices

2021-12-08 Thread Christophe Leroy
Now that powerpc switched to default topdown mmap layout, mm->mmap_base is properly randomised. However slice_find_area_bottomup() doesn't use mm->mmap_base but uses the fixed TASK_UNMAPPED_BASE instead. slice_find_area_bottomup() being used as a fallback to slice_find_area_topdown(), it can't

[PATCH v4 09/10] powerpc/mm: Convert to default topdown mmap layout

2021-12-08 Thread Christophe Leroy
Select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT and remove arch/powerpc/mm/mmap.c This change provides standard randomisation of mmaps. See commit 8b8addf891de ("x86/mm/32: Enable full randomization on i386 and X86_32") for all the benefits of mmap randomisation. Comparison between powerpc

[PATCH v4 08/10] powerpc/mm: Move get_unmapped_area functions to slice.c

2021-12-08 Thread Christophe Leroy
hugetlb_get_unmapped_area() is now identical to the generic version if only RADIX is enabled, so move it to slice.c and let it fallback on the generic one when HASH MMU is not compiled in. Do the same with arch_get_unmapped_area() and arch_get_unmapped_area_topdown(). Signed-off-by: Christophe

[PATCH v4 05/10] powerpc/mm: Remove CONFIG_PPC_MM_SLICES

2021-12-08 Thread Christophe Leroy
CONFIG_PPC_MM_SLICES is always selected by hash book3s/64. CONFIG_PPC_MM_SLICES is never selected by other platforms. Remove it. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm/hugetlb.h | 2 +- arch/powerpc/include/asm/paca.h| 7 ---

[PATCH v4 04/10] powerpc/mm: Make slice specific to book3s/64

2021-12-08 Thread Christophe Leroy
Since commit 555904d07eef ("powerpc/8xx: MM_SLICE is not needed anymore") only book3s/64 selects CONFIG_PPC_MM_SLICES. Move slice.c into mm/book3s64/ Move necessary stuff in asm/book3s/64/slice.h and remove asm/slice.h Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin ---

[PATCH v4 07/10] powerpc/mm: Use generic_hugetlb_get_unmapped_area()

2021-12-08 Thread Christophe Leroy
Use the generic version of arch_hugetlb_get_unmapped_area() which is now available at all time. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hugetlb.h | 4 -- arch/powerpc/mm/book3s64/radix_hugetlbpage.c | 55 arch/powerpc/mm/hugetlbpage.c

[PATCH v4 02/10] mm, hugetlbfs: Allow an arch to always use generic versions of get_unmapped_area functions

2021-12-08 Thread Christophe Leroy
Unlike most architectures, powerpc can only define at runtime if it is going to use the generic arch_get_unmapped_area() or not. Today, powerpc has a copy of the generic arch_get_unmapped_area() because when selection HAVE_ARCH_UNMAPPED_AREA the generic arch_get_unmapped_area() is not available.

[PATCH v4 03/10] powerpc/mm: Move vma_mmu_pagesize()

2021-12-08 Thread Christophe Leroy
vma_mmu_pagesize() is only required for slices, otherwise there is a generic weak version doing the exact same thing. Move it to slice.c Signed-off-by: Christophe Leroy --- arch/powerpc/mm/hugetlbpage.c | 11 --- arch/powerpc/mm/slice.c | 9 + 2 files changed, 9

[PATCH v4 01/10] mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT

2021-12-08 Thread Christophe Leroy
Commit e7142bf5d231 ("arm64, mm: make randomization selected by generic topdown mmap layout") introduced a default version of arch_randomize_brk() provided when CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT is selected. powerpc could select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT but needs to

[PATCH v4 00/10] Convert powerpc to default topdown mmap layout

2021-12-08 Thread Christophe Leroy
Rebased on top of Nic's series "powerpc: Make hash MMU code build configurable" in today's powerpc/merge-test on github This series converts powerpc to default topdown mmap layout. powerpc requires its own arch_get_unmapped_area() only when slices are needed, which is only for book3s/64. First

[PATCH v4 06/10] powerpc/mm: Use generic_get_unmapped_area() and call it from arch_get_unmapped_area()

2021-12-08 Thread Christophe Leroy
Use the generic version of arch_get_unmapped_area() which is now available at all time instead of its copy radix__arch_get_unmapped_area() Instead of setting mm->get_unmapped_area() to either arch_get_unmapped_area() or generic_get_unmapped_area(), always set it to arch_get_unmapped_area() and

[PATCH v2] of/fdt: Rework early_init_dt_scan_memory() to call directly

2021-12-08 Thread Rob Herring
Use of the of_scan_flat_dt() function predates libfdt and is discouraged as libfdt provides a nicer set of APIs. Rework early_init_dt_scan_memory() to be called directly and use libfdt. Cc: John Crispin Cc: Thomas Bogendoerfer Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras

Re: [patch V2 20/23] PCI/MSI: Move msi_lock to struct pci_dev

2021-12-08 Thread Jason Gunthorpe
On Mon, Dec 06, 2021 at 11:27:56PM +0100, Thomas Gleixner wrote: > It's only required for PCI/MSI. So no point in having it in every struct > device. > > Signed-off-by: Thomas Gleixner > --- > V2: New patch > --- > drivers/base/core.c|1 - > drivers/pci/msi/msi.c |2 +- >

Re: [PATCH v3] powerpc/pseries: read the lpar name from the firmware

2021-12-08 Thread Nathan Lynch
Laurent Dufour writes: > On 07/12/2021, 18:07:50, Nathan Lynch wrote: >> Laurent Dufour writes: >>> On 07/12/2021, 15:32:39, Nathan Lynch wrote: Is there a reasonable fallback for VMs where this parameter doesn't exist? PowerVM partitions should always have it, but what do we want the

[Bug 215217] Kernel fails to boot at an early stage when built with GCC_PLUGIN_LATENT_ENTROPY=y (PowerMac G4 3,6)

2021-12-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215217 --- Comment #4 from Erhard F. (erhar...@mailbox.org) --- Created attachment 299935 --> https://bugzilla.kernel.org/attachment.cgi?id=299935=edit kernel .config (4.18.20, PowerMac G4 DP) Hmm, strange... I tried to bisect but found out that

[PATCH 2/2] powerpc: Simplify and move arch_randomize_brk()

2021-12-08 Thread Christophe Leroy
arch_randomize_brk() is only needed for hash on book3s/64, for other platforms the one provided by the default mmap layout is good enough. Move it to hash_utils.c and use randomize_page() like the generic one. And properly opt out the radix case instead of making an assumption on

[PATCH 1/2] sizes.h: Add SZ_1T macro

2021-12-08 Thread Christophe Leroy
Today drivers/pci/controller/pci-xgene.c defines SZ_1T Move it into linux/sizes.h so that it can be re-used elsewhere. Cc: Toan Le Cc: linux-...@vger.kernel.org Signed-off-by: Christophe Leroy --- drivers/pci/controller/pci-xgene.c | 1 - include/linux/sizes.h | 2 ++ 2 files

Re: [PATCH] sound: fsl: add missing put_device() call in imx_hdmi_probe()

2021-12-08 Thread Mark Brown
On Tue, Dec 07, 2021 at 04:56:58AM -0800, Qing Wang wrote: > From: Wang Qing > > of_find_device_by_node() takes a reference to the embedded struct device > which needs to be dropped when error return. ... > data = devm_kzalloc(>dev, sizeof(*data), GFP_KERNEL); > if (!data) { > +

Re: [patch V2 01/23] powerpc/4xx: Remove MSI support which never worked

2021-12-08 Thread Cédric Le Goater
On 12/7/21 21:42, Thomas Gleixner wrote: Cedric, On Tue, Dec 07 2021 at 16:50, Cédric Le Goater wrote: On 12/7/21 12:36, Michael Ellerman wrote: This patch should drop those selects I guess. Can you send an incremental diff for Thomas to squash in? Sure. Removing all the tendrils in

Re: [PATCH v6 15/18] powerpc/64s: Always define arch unmapped area calls

2021-12-08 Thread Christophe Leroy
Le 01/12/2021 à 15:41, Nicholas Piggin a écrit : > To avoid any functional changes to radix paths when building with hash > MMU support disabled (and CONFIG_PPC_MM_SLICES=n), always define the > arch get_unmapped_area calls on 64s platforms. > > Signed-off-by: Nicholas Piggin > --- >

Re: [PATCH v2 0/6] KEXEC_SIG with appended signature

2021-12-08 Thread Philipp Rudo
Hi Michal, On Tue, 7 Dec 2021 18:32:21 +0100 Michal Suchánek wrote: > On Tue, Dec 07, 2021 at 05:10:14PM +0100, Philipp Rudo wrote: > > Hi Michal, > > > > i finally had the time to take a closer look at the series. Except for > > the nit in patch 4 and my personal preference in patch 6 the

Re: [PATCH v6 15/18] powerpc/64s: Always define arch unmapped area calls

2021-12-08 Thread Christophe Leroy
Le 01/12/2021 à 15:41, Nicholas Piggin a écrit : > To avoid any functional changes to radix paths when building with hash > MMU support disabled (and CONFIG_PPC_MM_SLICES=n), always define the > arch get_unmapped_area calls on 64s platforms. > > Signed-off-by: Nicholas Piggin > --- >