Re: [PATCH v3 00/20] RTAS maintenance

2023-02-15 Thread Michael Ellerman
On Fri, 10 Feb 2023 12:41:48 -0600, Nathan Lynch wrote: > Proposed changes for the RTAS subsystem and client code. > > Fixes that are subject to backporting are at the front of the queue. > The rest of the queue is roughly ordered with respect to maturity: > i.e. patches that have already

Re: [PATCH v3] powerpc/pci: Add option for using pci_to_OF_bus_map

2023-02-15 Thread Michael Ellerman
On Mon, 6 Feb 2023 22:39:02 +1100, Michael Ellerman wrote: > From: Pali Rohár > > The "pci-OF-bus-map" property was declared deprecated in 2006 [1] and to > the best of everyone's knowledge is not used by anything anymore [2]. > > The creation of the property wa

Re: [PATCH] powerpc/hv-24x7: Fix pvr check when setting interface version

2023-02-15 Thread Michael Ellerman
On Wed, 1 Feb 2023 00:18:04 +0530, Kajol Jain wrote: > Commit ec3eb9d941a9 ("powerpc/perf: Use PVR rather than > oprofile field to determine CPU version") added usage > of pvr value instead of oprofile field to determine the > platform. In hv-24x7 pmu driver code, pvr check uses PVR_POWER8 > when

Re: [PATCH] ppc: iommu: fix memory leak with using debugfs_lookup()

2023-02-15 Thread Michael Ellerman
On Thu, 2 Feb 2023 15:19:19 +0100, Greg Kroah-Hartman wrote: > When calling debugfs_lookup() the result must have dput() called on it, > otherwise the memory will leak over time. To make things simpler, just > call debugfs_lookup_and_remove() instead which handles all of the logic > at once. > >

Re: [PATCH v2 0/2] PS3 patches

2023-02-15 Thread Michael Ellerman
On Tue, 03 Jan 2023 17:51:03 +, Geoff Levand wrote: > This v2 series is just the two PS3 specific patches of the v1 series. > > -Geoff > > The following changes since commit 88603b6dc419445847923fcb7fe5080067a30f98: > > Linux 6.2-rc2 (2023-01-01 13:53:16 -0800) > > [...] Applied to

Re: [PATCH v3] powerpc/mce: log the error for all unrecoverable errors

2023-02-15 Thread Michael Ellerman
On Wed, 1 Feb 2023 15:29:33 +0530, Ganesh Goudar wrote: > For all unrecoverable errors we are missing to log the > error, Since machine_check_log_err() is not getting called > for unrecoverable errors. machine_check_log_err() is called > from deferred handler, To run deferred handlers we have to

Re: [PATCH v6 00/26] pSeries dynamic secure boot secvar interface + platform keyring loading

2023-02-15 Thread Michael Ellerman
On Fri, 10 Feb 2023 19:03:35 +1100, Andrew Donnellan wrote: > This series exposes an interface to userspace for reading and writing > secure variables contained within the PowerVM LPAR Platform KeyStore > (PLPKS) for the purpose of configuring dynamic secure boot, and adds > the glue required to

Re: [PATCH] powerpc/powernv/ioda: Skip unallocated resources when mapping to PE

2023-02-15 Thread Michael Ellerman
On Fri, 20 Jan 2023 10:32:15 +0100, Frederic Barrat wrote: > pnv_ioda_setup_pe_res() calls opal to map a resource with a PE. However, > the code assumes the resource is allocated and it uses the resource > address to find out the segment(s) which need to be mapped to the > PE. In the unlikely case

Re: [PATCH v2 1/9] powerpc: Remove __kernel_text_address() in show_instructions()

2023-02-15 Thread Michael Ellerman
On Wed, 1 Feb 2023 11:04:23 +0100, Christophe Leroy wrote: > That test was introducted in 2006 by > commit 00ae36de49cc ("[POWERPC] Better check in show_instructions"). > At that time, there was no BPF progs. > > As seen in message of commit 89d21e259a94 ("powerpc/bpf/32: Fix Oops > on tail call

Re: [PATCH 0/5] Expand selftest utils

2023-02-15 Thread Michael Ellerman
On Fri, 3 Feb 2023 11:39:42 +1100, Benjamin Gray wrote: > Started this when writing tests for a feature I'm working on, needing a way to > read/write numbers to system files. After writing some utils to safely handle > file IO and parsing, I realised I'd made the ~6th file read/write >

Re: [PATCH] powerpc: Disable CPU unknown by CLANG when CC_IS_CLANG

2023-02-15 Thread Michael Ellerman
On Thu, 2 Feb 2023 12:01:04 +0100, Christophe Leroy wrote: > CLANG only knows the following CPUs: > > generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630, > g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500, > power3, pwr3, power4, pwr4, power5, pwr5, power5x,

Re: [PATCH] powerpc/kexec_file: fix implicit decl error

2023-02-15 Thread Michael Ellerman
On Sat, 4 Feb 2023 09:22:06 -0800, Randy Dunlap wrote: > kexec (PPC64) code calls memory_hotplug_max(). Add the header declaration > for it from . Using does not work since > the #include for depends on CONFIG_NUMA=y, which is not > set in this kernel config file. > > Fixes this build

Re: [PATCH] powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch

2023-02-15 Thread Michael Ellerman
On Mon, 6 Feb 2023 14:22:40 +1000, Nicholas Piggin wrote: > The RFI and STF security mitigation options can flip the > interrupt_exit_not_reentrant static branch condition concurrently with > the interrupt exit code which tests that branch. > > Interrupt exit tests this condition to set

Re: [PATCH v6 24/26] powerpc/pseries: Implement secvars for dynamic secure boot

2023-02-15 Thread Michael Ellerman
Andrew Donnellan writes: > On Mon, 2023-02-13 at 22:32 +1100, Michael Ellerman wrote: >> > > +   memcpy(, data, sizeof(flags)); >> > >> > conversion from bytestream to integer: I think in this case it >> > would be better to use >> > >

Re: [PATCH v3 09/24] powerpc: Remove COMMAND_LINE_SIZE from uapi

2023-02-14 Thread Michael Ellerman
nclude/uapi/asm/setup.h | 2 -- > 2 files changed, 1 insertion(+), 3 deletions(-) Acked-by: Michael Ellerman (powerpc) cheers

Re: Build regressions/improvements in v6.2-rc8

2023-02-13 Thread Michael Ellerman
Geert Uytterhoeven writes: > On Mon, 13 Feb 2023, Geert Uytterhoeven wrote: >> JFYI, when comparing v6.2-rc8[1] to v6.2-rc7[3], the summaries are: >> - build errors: +11/-1 > >+ {standard input}: Error: unrecognized opcode: `dcbfl': => 5736, 4743, > 4327, 4476, 4447, 5067, 4602, 5212,

Re: [PATCH v6 24/26] powerpc/pseries: Implement secvars for dynamic secure boot

2023-02-13 Thread Michael Ellerman
Stefan Berger writes: > On 2/10/23 03:03, Andrew Donnellan wrote: >> From: Russell Currey ... >> +static int plpks_set_variable(const char *key, u64 key_len, u8 *data, >> + u64 data_size) >> +{ >> +struct plpks_var var = {0}; >> +int rc = 0; >> +u64 flags; >>

[PATCH] powerpc/nohash: Fix build error with binutils >= 2.38

2023-02-13 Thread Michael Ellerman
500, which does support lbarx/stbcx. That is safe because the code already has the CPU_FTR_SMT check, which ensures the lbarx sequence doesn't run on e5500, which doesn't support SMT. Signed-off-by: Michael Ellerman --- arch/powerpc/mm/nohash/e500_hugetlbpage.c | 5 - 1 file changed, 4 inserti

Re: [PATCH] powerpc/machdep: warn when machine_is() used too early

2023-02-13 Thread Michael Ellerman
Christophe Leroy writes: > Le 11/02/2023 à 00:56, Nathan Lynch via B4 Submission Endpoint a écrit : >> From: Nathan Lynch >> >> machine_is() can't provide correct results before probe_machine() has >> run. Warn when it's used too early in boot. >> >> Signed-off-by: Nathan Lynch >> --- >>

Re: [PATCH v6 24/26] powerpc/pseries: Implement secvars for dynamic secure boot

2023-02-12 Thread Michael Ellerman
Andrew Donnellan writes: > On Fri, 2023-02-10 at 16:28 -0500, Stefan Berger wrote: >> > > +err: >> > > +    kfree(var.data); >> > >> > remove the kfree() >> >> Actually don't remove it but it should probably be >> >> if (var.data != ) >> kfree(var.data); >> > > Argh, thanks for catching

Re: linux-next: build failure after merge of the powerpc tree

2023-02-12 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > After merging the powerpc tree, today's linux-next build (powerpc64 > allnoconfig) failed like this: > > arch/powerpc/kernel/setup_64.c: In function 'early_setup': > arch/powerpc/kernel/setup_64.c:400:34: error: 'struct thread_info' has no > member named

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

2023-02-11 Thread Michael Ellerman
. - -- Michael Ellerman (1): powerpc: Don't select ARCH_WANTS_NO_INSTR Nicholas Piggin (1): powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch Randy Dunlap (1): powerpc/kexec_file: fix

Re: [PATCH v2 11/19] powerpc/rtas: add work area allocator

2023-02-09 Thread Michael Ellerman
Nathan Lynch writes: > Michael Ellerman writes: >> Nathan Lynch via B4 Submission Endpoint >> writes: ... >>> +struct rtas_work_area * __ref rtas_work_area_alloc(size_t size) >>> +{ >>> + struct rtas_work_area *area; >>>

Re: [PATCH v2 01/19] powerpc/rtas: handle extended delays safely in early boot

2023-02-09 Thread Michael Ellerman
Nathan Lynch writes: > Michael Ellerman writes: >> Nathan Lynch via B4 Submission Endpoint >> writes: >>> From: Nathan Lynch >>> >>> Some code that runs early in boot calls RTAS functions that can return >>> -2 or 990x statu

Re: [PATCH mm-unstable v1 17/26] powerpc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on 32bit book3s

2023-02-09 Thread Michael Ellerman
B 2 / MSB 29. There seems to be no real reason why that bit cannot > be used, and reusing it avoids having to steal one bit from the swap > offset. > > While at it, mask the type in __swp_entry(). > > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy > Signed-off-

Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info

2023-02-09 Thread Michael Ellerman
Geoff Levand writes: > On 1/16/23 23:26, Christophe Leroy wrote: >> Le 16/01/2023 à 21:08, Geoff Levand a écrit : >>> >>> As mentioned, I'd really like to keep PS3 included in ppc64_defconfig. My >>> original patch that basically just ignores the call to >>> mmu_hash_ops.updateboltedpp allows

Re: [PATCH v2 18/19] powerpc/rtas: introduce rtas_function_token() API

2023-02-08 Thread Michael Ellerman
Nathan Lynch via B4 Submission Endpoint writes: > From: Nathan Lynch > > Users of rtas_token() supply a string argument that can't be validated > at build time. A typo or misspelling has to be caught by inspection or > by observing wrong behavior at runtime. > > Since the core RTAS code now has

Re: [PATCH v2 11/19] powerpc/rtas: add work area allocator

2023-02-08 Thread Michael Ellerman
Nathan Lynch via B4 Submission Endpoint writes: > diff --git a/arch/powerpc/include/asm/rtas-work-area.h > b/arch/powerpc/include/asm/rtas-work-area.h > new file mode 100644 > index ..76ccb039cc37 > --- /dev/null > +++ b/arch/powerpc/include/asm/rtas-work-area.h > @@ -0,0 +1,45 @@ >

Re: [PATCH v2 07/19] powerpc/rtas: improve function information lookups

2023-02-08 Thread Michael Ellerman
Nathan Lynch via B4 Submission Endpoint writes: > From: Nathan Lynch > > The core RTAS support code and its clients perform two types of lookup > for RTAS firmware function information. > ... > diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h > index

Re: [PATCH v2 01/19] powerpc/rtas: handle extended delays safely in early boot

2023-02-08 Thread Michael Ellerman
Nathan Lynch via B4 Submission Endpoint writes: > From: Nathan Lynch > > Some code that runs early in boot calls RTAS functions that can return > -2 or 990x statuses, which mean the caller should retry. An example is > pSeries_cmo_feature_init(), which invokes ibm,get-system-parameter but >

[PATCH v3] powerpc/pci: Add option for using pci_to_OF_bus_map

2023-02-06 Thread Michael Ellerman
rk to fix build errors] Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 13 - arch/powerpc/include/asm/pci-bridge.h | 4 +++- arch/powerpc/kernel/pci_32.c | 17 - 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/arch/powe

Re: [PATCH 12/22] powerpc/cpu: Mark start_secondary_resume() __noreturn

2023-02-06 Thread Michael Ellerman
d once the generic prototype is __noreturn. But not a show-stopper. Acked-by: Michael Ellerman (powerpc) cheers > diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h > index f63505d74932..cfd42ca8765c 100644 > --- a/arch/powerpc/include/asm/smp.h > +++ b/arch/p

Re: [PATCH v2] powerpc/kexec_file: account hot-pluggable memory while estimating FDT size

2023-02-05 Thread Michael Ellerman
On Tue, 31 Jan 2023 08:36:15 +0530, Sourabh Jain wrote: > On Systems where online memory is lesser compared to max memory, the > kexec_file_load system call may fail to load the kdump kernel with the > below errors: > > "Failed to update fdt with linux,drconf-usable-memory property" >

Re: [PATCH] powerpc/kvm: Fix objtool warning for unannotated intra-function call in booke.o

2023-02-05 Thread Michael Ellerman
On Sat, 28 Jan 2023 18:11:58 +0530, Sathvika Vasireddy wrote: > Objtool throws the following warning: > arch/powerpc/kvm/booke.o: warning: objtool: kvmppc_fill_pt_regs+0x30: > unannotated intra-function call > > Fix this warning by allowing the function to set the value of 'nip' field > using

Re: [PATCH v2] powerpc/64: Fix perf profiling asynchronous interrupt handlers

2023-02-05 Thread Michael Ellerman
On Sat, 21 Jan 2023 20:01:56 +1000, Nicholas Piggin wrote: > Interrupt entry sets the soft mask to IRQS_ALL_DISABLED to match the > hard irq disabled state. So when should_hard_irq_enable() returns true > because we want PMI interrupts in irq handlers, MSR[EE] is enabled but > PMIs just get

Re: [PATCH] powerpc/64s: Fix local irq disable when PMIs are disabled

2023-02-05 Thread Michael Ellerman
On Sat, 21 Jan 2023 19:53:52 +1000, Nicholas Piggin wrote: > When PMI interrupts are soft-masked, local_irq_save() will clear the PMI > mask bit, allowing PMIs in and causing a race condition. This causes a > deadlock in native_hpte_insert via hash_preload, which depends on PMIs > being disabled

Re: [PATCH] powerpc: Fix objtool warning for unannotated intra-function call in head_85xx.o

2023-02-05 Thread Michael Ellerman
On Sat, 28 Jan 2023 18:11:38 +0530, Sathvika Vasireddy wrote: > Objtool throws the following warning: > arch/powerpc/kernel/head_85xx.o: warning: objtool: .head.text+0x1a6c: > unannotated intra-function call > > Fix this warning by annotating KernelSPE symbol with SYM_FUNC_START_LOCAL > and

Re: [PATCH] powerpc/kexec_file: Fix division by zero in extra size estimation

2023-02-05 Thread Michael Ellerman
On Mon, 30 Jan 2023 12:47:07 +1100, Michael Ellerman wrote: > In kexec_extra_fdt_size_ppc64() there's logic to estimate how much > extra space will be needed in the device tree for some memory related > properties. > > That logic uses the size of RAM divided by drmem_l

Re: [PATCH] powerpc/imc-pmu: Revert nest_init_lock to being a mutex

2023-02-05 Thread Michael Ellerman
On Mon, 30 Jan 2023 12:44:01 +1100, Michael Ellerman wrote: > The recent commit 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in > IRQs disabled section") fixed warnings (and possible deadlocks) in the > IMC PMU driver by converting the locking to use spinlocks. > > I

Re: [PATCH] powerpc/64s: Reconnect tlb_flush() to hash__tlb_flush()

2023-02-05 Thread Michael Ellerman
On Tue, 31 Jan 2023 22:14:07 +1100, Michael Ellerman wrote: > Commit baf1ed24b27d ("powerpc/mm: Remove empty hash__ functions") > removed some empty hash MMU flushing routines, but got a bit overeager > and also removed the call to hash__tlb_flush() from tlb_flush().

Re: [PATCH 1/2] powerpc/64s/radix: Fix crash with unaligned relocated kernel

2023-02-05 Thread Michael Ellerman
On Tue, 10 Jan 2023 23:47:52 +1100, Michael Ellerman wrote: > If a relocatable kernel is loaded at an address that is not 2MB aligned > and told not to relocate to zero, the kernel can crash due to > mark_rodata_ro() incorrectly changing some read-write data to read-only. > >

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

2023-02-04 Thread Michael Ellerman
-zero. - Reconnect tlb_flush() to hash__tlb_flush() Thanks to: Kajol Jain, Nicholas Piggin, Sachin Sant Sathvika Vasireddy, Sourabh Jain. - -- Michael Ellerman (5): powerpc/imc-pmu: Revert nest_init_lock to being a mutex

Re: [PATCH 1/2] powerpc/64: Set default CPU in Kconfig

2023-02-04 Thread Michael Ellerman
On Wed, 25 Jan 2023 08:38:59 +0100, Christophe Leroy wrote: > Since 0069f3d14e7a ("powerpc/64e: Tie PPC_BOOK3E_64 to PPC_E500MC"), the > only possible BOOK3E/64 are E500, so no need of a default CPU over the > E5500. > > When the user selects book3e, they must have an e500 compatible > compiler,

Re: [PATCH v2 0/4] powerpc/rtas: exports and locking

2023-02-04 Thread Michael Ellerman
On Tue, 24 Jan 2023 08:04:44 -0600, Nathan Lynch wrote: > This series began as a single patch[1] to convert the RTAS subsystem's > internal locks to raw spinlocks. The discussion of that patch > identified opportunities to update a few aspects of the RTAS API, so > the series begins with those and

Re: [PATCH 0/2] powerpc: Fix livepatch module re-patching issue

2023-02-04 Thread Michael Ellerman
On Tue, 24 Jan 2023 19:38:03 -0800, Josh Poimboeuf wrote: > Fix a livepatch bug seen when reloading a patched module. > > This is the powerpc counterpart to Song Liu's fix for a similar issue on > x86: > > https://lkml.kernel.org/lkml/20230121004945.697003-2-s...@kernel.org > > [...] Applied

Re: [PATCH] powerpc: Check !irq instead of irq == NO_IRQ and remove NO_IRQ

2023-02-04 Thread Michael Ellerman
On Mon, 23 Jan 2023 13:26:46 +0100, Christophe Leroy wrote: > NO_IRQ is a relic from the old days. It is not used anymore in core > functions. By the way, function irq_of_parse_and_map() returns value 0 > on error. > > In some drivers, NO_IRQ is erroneously used to check the return of >

Re: [PATCH 0/2] powerpc: Fix livepatch module re-patching issue

2023-02-04 Thread Michael Ellerman
Josh Poimboeuf writes: > On Tue, Jan 24, 2023 at 07:38:03PM -0800, Josh Poimboeuf wrote: >> Fix a livepatch bug seen when reloading a patched module. >> >> This is the powerpc counterpart to Song Liu's fix for a similar issue on >> x86: >> >>

[PATCH] powerpc: Don't select ARCH_WANTS_NO_INSTR

2023-02-02 Thread Michael Ellerman
nuxppc-dev/y9t6yoafro5yq...@hirez.programming.kicks-ass.net Reported-by: Sachin Sant Suggested-by: Peter Zijlstra Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b8c4ac56bddc..7a5f8dbfbdd0 100644

Re: [PATCH] powerpc/kexec_file: Fix division by zero in extra size estimation

2023-01-31 Thread Michael Ellerman
Sourabh Jain writes: > On 30/01/23 07:17, Michael Ellerman wrote: >> In kexec_extra_fdt_size_ppc64() there's logic to estimate how much >> extra space will be needed in the device tree for some memory related >> properties. >> >> That logic uses the size of RAM

Re: [PATCH v2] powerpc/mce: log the error for all unrecoverable errors

2023-01-31 Thread Michael Ellerman
Ganesh Goudar writes: > For all unrecoverable errors we are missing to log the > error, Since machine_check_log_err() is not getting called > for unrecoverable errors. > > Raise irq work in save_mce_event() for unrecoverable errors, > So that we log the error from MCE event handling block in >

[PATCH] powerpc/64s: Reconnect tlb_flush() to hash__tlb_flush()

2023-01-31 Thread Michael Ellerman
concerning. Presumably there are flushes happening via other paths such as arch_leave_lazy_mmu_mode(), and/or a bit of luck. Fix it by reinstating the call to hash__tlb_flush(). Fixes: baf1ed24b27d ("powerpc/mm: Remove empty hash__ functions") Signed-off-by: Michael Ellerman --- arch/powerp

Re: [PATCH v2] powerpc: Implement arch_within_stack_frames

2023-01-31 Thread Michael Ellerman
Nicholas Miehlbradt writes: > Walks the stack when copy_{to,from}_user address is in the stack to > ensure that the object being copied is entirely within a single stack > frame. ... and that it exists above the parameter save area, so is not pointing at any stack metadata right? > Substatially

Re: [PATCH] powerpc/tlb: Remove BUILD_BUG for book3s/32/tlbflush.h local_flush_tlb_page_psize

2023-01-30 Thread Michael Ellerman
Benjamin Gray writes: > On Wed, 2023-01-25 at 22:35 +1100, Michael Ellerman wrote: >> Can't we just fall back to flush_tlb_page(vma, vmaddr)? >> >> I'd guess those CPUs can't flush based on page size anyway. >> >> cheers > > Probably. Do they have a fixed page size? AFAIK yes. cheers

Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-29 Thread Michael Ellerman
- > arch/m68k/include/asm/page_no.h| 2 -- > arch/microblaze/include/asm/page.h | 1 - > arch/mips/include/asm/page.h | 13 - > arch/nios2/include/asm/page.h | 9 - > arch/openrisc/include/asm/page.h | 2 -- > arch/parisc/include/asm/page

Re: [PATCH v2] powerpc: macio: Make remove callback of macio driver void returned

2023-01-29 Thread Michael Ellerman
Dawei Li writes: > Commit fc7a6209d571 ("bus: Make remove callback return void") forces > bus_type::remove be void-returned, it doesn't make much sense for any > bus based driver implementing remove callbalk to return non-void to > its caller. > > This change is for macio bus based drivers. > >

Re: [PATCH] powerpc/kexec_file: account hot-pluggable memory while estimating FDT size

2023-01-29 Thread Michael Ellerman
Sourabh Jain writes: > On Systems where online memory is lesser compared to max memory, the > kexec_file_load system call may fail to load the kdump kernel with the > below errors: > > "Failed to update fdt with linux,drconf-usable-memory property" > "Error setting up usable-memory

[PATCH] powerpc/kexec_file: Fix division by zero in extra size estimation

2023-01-29 Thread Michael Ellerman
: 2377c92e37fe ("powerpc/kexec_file: fix FDT size estimation for kdump kernel") Cc: sta...@vger.kernel.org # v5.12+ Signed-off-by: Michael Ellerman --- arch/powerpc/kexec/file_load_64.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kexec/file

[PATCH] powerpc/imc-pmu: Revert nest_init_lock to being a mutex

2023-01-29 Thread Michael Ellerman
mutex, so that we can call sleeping functions while holding it. There is no interaction between nest_init_lock and the runtime spinlocks used by the actual PMU routines. Fixes: 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") Signed-off-by: Michael Ellerman --- a

[PATCH] powerpc/rtas: Drop unused export symbols

2023-01-27 Thread Michael Ellerman
Some RTAS symbols are never used by modular code, drop their exports. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/rtas.c | 4 1 file changed, 4 deletions(-) FYI: I'll slot this in prior to Nathan's series changing the exports to GPL. diff --git a/arch/powerpc/kernel/rtas.c b

Re: [PATCH v4 02/24] powerpc/pseries: Fix alignment of PLPKS structures and buffers

2023-01-27 Thread Michael Ellerman
Andrew Donnellan writes: > On Thu, 2023-01-26 at 17:31 +, David Laight wrote: >> Changing the size to kzalloc() doesn't help. >> The alignment depends on the allocator and is only required to have >> a relatively small alignment (ARCH_MINALIGN?) regardless of the size. >> >> IIRC one of the

Re: [PATCH v4 02/24] powerpc/pseries: Fix alignment of PLPKS structures and buffers

2023-01-27 Thread Michael Ellerman
Segher Boessenkool writes: > On Thu, Jan 26, 2023 at 12:09:53AM +1100, Michael Ellerman wrote: >> Andrew Donnellan writes: >> > A number of structures and buffers passed to PKS hcalls have alignment >> > requirements, which could on occasion cause problems: >>

Re: [PATCH] kasan: Fix Oops due to missing calls to kasan_arch_is_ready()

2023-01-26 Thread Michael Ellerman
Andrew Morton writes: > On Thu, 26 Jan 2023 08:04:47 +0100 Christophe Leroy > wrote: > >> On powerpc64, you can build a kernel with KASAN as soon as you build it >> with RADIX MMU support. However if the CPU doesn't have RADIX MMU, >> KASAN isn't enabled at init and the following Oops is

Re: [PATCH v4 5/7] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-01-26 Thread Michael Ellerman
Gorman > Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 6 +- Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH 1/2] powerpc/pci: Allow to disable filling deprecated pci-OF-bus-map

2023-01-26 Thread Michael Ellerman
Pali Rohár writes: > PING? It is more than 5 months since this patch series is there and it > still has not received any comment. There was some related discussion in another thread. I planned to pick it up last merge window, but it breaks the pmac32_defconfig build when

Re: [PATCH v2 05/14] powerpc: Remove linker flag from KBUILD_AFLAGS

2023-01-26 Thread Michael Ellerman
Masahiro Yamada writes: > On Thu, Jan 26, 2023 at 11:07 AM Nathan Chancellor wrote: >> >> On Thu, Jan 26, 2023 at 10:29:54AM +0900, Masahiro Yamada wrote: >> > On Wed, Jan 25, 2023 at 1:11 PM Michael Ellerman >> > wrote: >> > > >> > >

Re: [PATCH v4 04/10] powerpc/8xx: Use a larger CPM1 command check mask

2023-01-26 Thread Michael Ellerman
QMC extension CHANNEL_NUMBER > field. > > Signed-off-by: Herve Codina > Acked-by: Christophe Leroy > --- > arch/powerpc/platforms/8xx/cpm1.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Michael Ellerman (powerpc) cheers > diff --git a/arch/powerpc

Re: [PATCH v4 02/24] powerpc/pseries: Fix alignment of PLPKS structures and buffers

2023-01-25 Thread Michael Ellerman
Andrew Donnellan writes: > A number of structures and buffers passed to PKS hcalls have alignment > requirements, which could on occasion cause problems: > > - Authorisation structures must be 16-byte aligned and must not cross a > page boundary > > - Label structures must not cross page

Re: [PATCH] powerpc/tlb: Remove BUILD_BUG for book3s/32/tlbflush.h local_flush_tlb_page_psize

2023-01-25 Thread Michael Ellerman
Benjamin Gray writes: > Converts the BUILD_BUG to a WARN to allow building with a low/unoptimised > compiler. > > The original expectation was that a compiler would see that the only > usage of this function was in a function that is only called behind > radix-only guards. And it worked this way

Re: arch/powerpc/kernel/head_85xx.o: warning: objtool: .head.text+0x1a6c: unannotated intra-function call

2023-01-25 Thread Michael Ellerman
"Naveen N. Rao" writes: > Sathvika Vasireddy wrote: >> > arch/powerpc/kvm/booke.o: warning: objtool: kvmppc_fill_pt_regs+0x30: > unannotated intra-function call >> >> As an attempt to fix it, I tried expanding ANNOTATE_INTRA_FUNCTION_CALL >> macro to indicate that the branch target is

Re: [PATCH v2 06/14] powerpc/vdso: Remove unused '-s' flag from ASFLAGS

2023-01-24 Thread Michael Ellerman
Nathan Chancellor > Reviewed-by: Nick Desaulniers > Reviewed-by: Segher Boessenkool > --- > Cc: m...@ellerman.id.au Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH v2 05/14] powerpc: Remove linker flag from KBUILD_AFLAGS

2023-01-24 Thread Michael Ellerman
h-cpp -c -o /dev/null /dev/null &| grep gnu-as >"/usr/bin/powerpc64-linux-gnu-as" "-a32" "-mppc" "-many" "-o" "/dev/null" > "/tmp/null-ab8f8d.s" > > Remove this flag altogether to avoid future issues. > > Fixes: 1421dc6d4829 ("powerpc/kbuild: Use flags variables rather than > overriding LD/CC/AS") > Signed-off-by: Nathan Chancellor > Reviewed-by: Nick Desaulniers > --- > Cc: m...@ellerman.id.au Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH v4 21/24] powerpc/pseries: Pass PLPKS password on kexec

2023-01-24 Thread Michael Ellerman
Andrew Donnellan writes: > On Tue, 2023-01-24 at 14:36 +1000, Nicholas Piggin wrote: >> >> > +   prop = of_find_property(of_chosen, "ibm,plpks-pw", ); >> > +   if (prop) { >> > +   ospasswordlength = (u16)len; >> > +   ospassword = kzalloc(ospasswordlength,

Re: [PATCH -next] powerpc/64s/hash: change stress_hpt_timer_fn to static

2023-01-15 Thread Michael Ellerman
On Wed, 28 Dec 2022 17:36:03 +0800, Yang Yingliang wrote: > stress_hpt_timer_fn is only used in hash_utils.c now, > change it to static. > > Applied to powerpc/fixes. [1/1] powerpc/64s/hash: change stress_hpt_timer_fn to static

Re: [PATCH] powerpc/rtas: upgrade internal arch spinlocks

2023-01-15 Thread Michael Ellerman
Nathan Lynch writes: > Laurent Dufour writes: >> On 10/01/2023 05:42:55, Nathan Lynch wrote: >>> --- a/arch/powerpc/include/asm/rtas-types.h >>> +++ b/arch/powerpc/include/asm/rtas-types.h >>> @@ -18,7 +18,7 @@ struct rtas_t { >>> unsigned long entry;/* physical address pointer

Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info

2023-01-15 Thread Michael Ellerman
Geoff Levand writes: > On 1/9/23 09:41, Christophe Leroy wrote: >> >> >> Le 03/01/2023 à 18:51, Geoff Levand a écrit : >>> Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate >>> CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp() >>> to be called. Change the

[GIT PULL] Please pull powerpc/linux.git powerpc-6.2-3 tag

2023-01-15 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 6.2: The following changes since commit be5f95c8779e19779dd81927c8574fec5aaba36c: powerpc/vmlinux.lds: Don't discard .comment (2023-01-06 00:25:12 +1100) are available in the git repository at:

Re: [PATCH v2] powerpc: Fix a wrong version calculation issue in ld_version

2023-01-15 Thread Michael Ellerman
On Thu, 5 Jan 2023 01:54:37 +0530, Ojaswin Mujoo wrote: > ** The Issue ** > > The ld_version() function seems to compute the wrong version value for > certain ld versions like the following: > > $ ld --version GNU ld (GNU Binutils; SUSE Linux Enterprise 15) > 2.37.20211103-150100.7.37 > > [...]

Re: [PATCH] powerpc/imc-pmu: Fix IMC PMU code of using mutex in IRQs disabled section

2023-01-15 Thread Michael Ellerman
On Fri, 6 Jan 2023 12:21:57 +0530, Kajol Jain wrote: > Current imc-pmu code triggers a WARNING with CONFIG_DEBUG_ATOMIC_SLEEP and > CONFIG_PROVE_LOCKING enabled, while running a thread_imc event. > > Command to trigger the warning: > [command]# perf stat -e thread_imc/CPM_CS_FROM_L4_MEM_X_DPTEG/

[PATCH] powerpc/secvar: Use u64 in secvar_operations

2023-01-11 Thread Michael Ellerman
There's no reason for secvar_operations to use uint64_t vs the more common kernel type u64. The types are compatible, but they require different printk format strings which can lead to confusion. Change all the secvar related routines to use u64. Signed-off-by: Michael Ellerman --- arch

Re: [PATCH rcu 04/27] arch/powerpc/kvm: Remove "select SRCU"

2023-01-11 Thread Michael Ellerman
"Paul E. McKenney" writes: > Now that the SRCU Kconfig option is unconditionally selected, there is > no longer any point in selecting it. Therefore, remove the "select SRCU" > Kconfig statements. > > Signed-off-by: Paul E. McKenney > Cc: Michael

Re: usb.c:undefined reference to `qe_immr'

2023-01-10 Thread Michael Ellerman
Randy Dunlap writes: > [adding Cc's] > > > On 1/9/23 23:59, kernel test robot wrote: >> Hi Masahiro, >> >> FYI, the error/warning still remains. >> >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >> master >> head: 5a41237ad1d4b62008f93163af1d9b1da90729d8 >>

[PATCH 1/2] powerpc/64s/radix: Fix crash with unaligned relocated kernel

2023-01-10 Thread Michael Ellerman
with 2.00 MiB pages Fixes: c55d7b5e6426 ("powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE") Signed-off-by: Michael Ellerman --- arch/powerpc/mm/book3s64/radix_pgtable.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/powerpc/mm/book3s64/radix_pgtable

[PATCH 2/2] powerpc/64s/radix: Fix RWX mapping with relocated kernel

2023-01-10 Thread Michael Ellerman
there is a page boundary at the end of the interrupt region, so that the permission change only applies to the interrupt text, and not the region following it. Fixes: c55d7b5e6426 ("powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE") Signed-off-by: Michael Ellerman --- ar

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

2023-01-08 Thread Michael Ellerman
- Three fixes for various bogosity in our linker script, revealed by the recent commit which changed discard behaviour with some toolchains. - -- Michael Ellerman (3): powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT

Re: [PATCH 1/3] powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT

2023-01-08 Thread Michael Ellerman
On Fri, 6 Jan 2023 00:23:47 +1100, Michael Ellerman wrote: > The powerpc linker script explicitly includes .exit.text, because > otherwise the link fails due to references from __bug_table and > __ex_table. The code is freed (discarded) at runtime along with > .init.text and data. &

Re: [PATCH 4/4] powerpc/pseries: Implement signed update for PLPKS objects

2023-01-06 Thread Michael Ellerman
Andrew Donnellan writes: > From: Nayna Jain > > The Platform Keystore provides a signed update interface which can be used > to create, replace or append to certain variables in the PKS in a secure > fashion, with the hypervisor requiring that the update be signed using the > Platform Key. > >

Re: [PATCH v2 7/7] powerpc/pseries: Implement secvars for dynamic secure boot

2023-01-06 Thread Michael Ellerman
Russell Currey writes: > The pseries platform can support dynamic secure boot (i.e. secure boot > using user-defined keys) using variables contained with the PowerVM LPAR > Platform KeyStore (PLPKS). Using the powerpc secvar API, expose the > relevant variables for pseries dynamic secure boot

Re: [PATCH v2 6/7] powerpc/secvar: Extend sysfs to include config vars

2023-01-05 Thread Michael Ellerman
Russell Currey writes: > The forthcoming pseries consumer of the secvar API wants to expose a > number of config variables. Allowing secvar implementations to provide > their own sysfs attributes makes it easy for consumers to expose what > they need to. > > This is not being used by the OPAL

[PATCH 2/3] powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds

2023-01-05 Thread Michael Ellerman
t;arch: fix broken BuildID for arm64 and riscv") Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/vmlinux.lds.S | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index c5ea7d03d539..a4c6efa

[PATCH 1/3] powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT

2023-01-05 Thread Michael Ellerman
xt at all. 1: https://lore.kernel.org/lkml/87fscp2v7k@igel.home/ Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/vmlinu

[PATCH 3/3] powerpc/vmlinux.lds: Don't discard .comment

2023-01-05 Thread Michael Ellerman
even more so if the behaviour depends on the toolchain version. So don't discard .comment in order to maintain the existing behaviour in all cases. Fixes: 83a092cf95f2 ("powerpc: Link warning for orphan sections") Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/vmlinux.lds.S | 2 +- 1 fi

Re: Linux 6.2-rc2

2023-01-04 Thread Michael Ellerman
\ > } NOTES_HEADERS \ This also fixes errors seen in the powerpc build with binutils <= 2.35. Tested-by: Michael Ellerman (powerpc) cheers

Re: [PATCH net v2] powerpc: dts: t208x: Disable 10G on MAC1 and MAC2

2022-12-22 Thread Michael Ellerman
Jakub Kicinski writes: > On Thu, 22 Dec 2022 15:41:00 + Camelia Alexandra Groza wrote: >> > Reviewed-by: Camelia Groza >> > Tested-by: Camelia Groza >> >> I see the patch marked Not Applicable in the netdev patchwork. >> What tree will it go through? > > I could be wrong but I think DTS

Re: [RFC PATCH] mm: remove zap_page_range and change callers to use zap_vma_page_range

2022-12-20 Thread Michael Ellerman
rnel.org/linux-mm/20221114235507.294320-2-mike.krav...@oracle.com/ > Suggested-by: Peter Xu > Signed-off-by: Mike Kravetz > --- > arch/arm64/kernel/vdso.c| 4 ++-- > arch/powerpc/kernel/vdso.c | 2 +- > arch/powerpc/platforms/book3s/vas-api.c | 2 +- &g

Re: [PATCH] powerpc/code-patching: Fix oops with DEBUG_VM enabled

2022-12-18 Thread Michael Ellerman
On Fri, 16 Dec 2022 23:59:13 +1100, Michael Ellerman wrote: > Nathan reported that the new per-cpu mm patching oopses if DEBUG_VM is > enabled: > > [ cut here ] > kernel BUG at arch/powerpc/mm/pgtable.c:333! > Oops: Exception in kernel mode,

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

2022-12-18 Thread Michael Ellerman
ams: Add header file macro definition macintosh/windfarm_pid: Add header file macro definition Miaoqian Lin (2): cxl: Fix refcount leak in cxl_calc_capp_routing selftests/powerpc: Fix resource leaks Michael Ellerman (10): objtool/powerpc: Implement arch_pc_relative_relo

[PATCH] powerpc/code-patching: Fix oops with DEBUG_VM enabled

2022-12-16 Thread Michael Ellerman
. That also avoids the warning in assert_pte_locked(). With that it's no longer necessary to save the PTE in cpu_patching_context for the mm_patch_enabled() case. Fixes: c28c15b6d28a ("powerpc/code-patching: Use temporary mm for Radix MMU") Reported-by: Nathan Chancellor Signed-off-b

Re: Mass-building defconfigs: many fail with assembler errors

2022-12-15 Thread Michael Ellerman
Jan-Benedict Glaw writes: > On Tue, 2022-12-13 14:49:20 +1100, Michael Ellerman > wrote: > [...] >> Both treeboot-akebono.c and treeboot-currituck.c are for 476 so should >> probably be built with -mcpu=476. eg: >> >> diff --git a/arch/powerpc/boot/Make

Re: sched/debug: CPU hotplug operation suffers in a large cpu systems

2022-12-13 Thread Michael Ellerman
Phil Auld writes: > On Tue, Dec 13, 2022 at 07:23:54AM +0100 Greg Kroah-Hartman wrote: >> On Mon, Dec 12, 2022 at 02:17:58PM -0500, Phil Auld wrote: >> > Hi, >> > >> > On Tue, Nov 08, 2022 at 01:24:39PM +0100 Greg Kroah-Hartman wrote: >> > > On Tue, Nov 08, 2022 at 03:30:46PM +0530, Vishal

Re: Mass-building defconfigs: many fail with assembler errors

2022-12-12 Thread Michael Ellerman
Jan-Benedict Glaw writes: > Hi! > > Is anybody else routinely building current Binutils + GCC, to try to > build all the Linux defconfigs? I did for several years, but eventually stopped because it was taking too much time I needed to spend on other things. > For PPC, a good number of those

<    7   8   9   10   11   12   13   14   15   16   >