[PATCH v3 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-04 Thread Benjamin Gray
Adds a generic text patching mechanism for patches of size int or long bytes. The patch_instruction function is reimplemented in terms of this more generic function. This generic implementation allows patching of arbitrary long data, such as pointers on 64-bit. On 32-bit patch_int is marked noinl

[PATCH v3 4/6] static_call: Move static call selftest to static_call_selftest.c

2022-10-04 Thread Benjamin Gray
These tests are out-of-line only, so moving them to the their own file allows them to be run when an arch does not implement inline static calls. Signed-off-by: Benjamin Gray Reviewed-by: Andrew Donnellan --- kernel/Makefile | 1 + kernel/static_call_inline.c | 43 -

[PATCH v3 3/6] powerpc/module: Optimise nearby branches in ELF V2 ABI stub

2022-10-04 Thread Benjamin Gray
Inserts a direct branch to the stub target when possible, replacing the mtctr/btctr sequence. The load into r12 could potentially be skipped too, but that change would need to refactor the arguments to indicate that the address does not have a separate local entry point. This helps the static cal

[PATCH v3 6/6] powerpc: Add tests for out-of-line static calls

2022-10-04 Thread Benjamin Gray
KUnit tests for the various combinations of caller/trampoline/target and kernel/module. They must be run from a module loaded at runtime to guarantee they have a different TOC to the kernel (64-bit ELF V2) and increase the chance of testing the non-direct branch path of the trampoline. For 64-bit

[PATCH v3 2/6] powerpc/module: Handle caller-saved TOC in module linker

2022-10-04 Thread Benjamin Gray
The callee may set a field in st_other to 1 to indicate r2 should be treated as caller-saved. This means a trampoline must be used to save the current TOC before calling it and restore it afterwards, much like external calls. This is necessary for supporting V2 ABI static calls that do not preserv

[PATCH v3 5/6] powerpc/64: Add support for out-of-line static calls

2022-10-04 Thread Benjamin Gray
Implement static call support for 64 bit V2 ABI. This requires making sure the TOC is kept correct across kernel-module boundaries. As a secondary concern, it tries to use the local entry point of a target wherever possible. It does so by checking if both tramp & target are kernel code, and falls b

[PATCH v3 0/6] Out-of-line static calls for powerpc64 ELF V2

2022-10-04 Thread Benjamin Gray
Implementation of out-of-line static calls for PowerPC 64-bit ELF V2 ABI. Static calls patch an indirect branch into a direct branch at runtime. Out-of-line specifically has a caller directly call a trampoline, and the trampoline gets patched to directly call the target. Previous versions here: V2

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-04 Thread Athira Rajeev
> On 04-Oct-2022, at 11:44 PM, Arnaldo Carvalho de Melo wrote: > > Em Tue, Oct 04, 2022 at 03:14:27PM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Tue, Oct 04, 2022 at 07:49:21AM -0700, Ian Rogers escreveu: >>> On Tue, Oct 4, 2022, 12:06 AM Athira Rajeev Thanks for helping with testin

[powerpc:next] BUILD SUCCESS 0fa6831811f62cfc10415d731bcf9fde2647ad81

2022-10-04 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next branch HEAD: 0fa6831811f62cfc10415d731bcf9fde2647ad81 powerpc/64: Fix msr_check_and_set/clear MSR[EE] race elapsed time: 759m configs tested: 82 configs skipped: 3 The following configs have been built success

Re: [PATCH 1/5] KVM: PPC: Book3S HV P9: Clear vcpu cpu fields before enabling host irqs

2022-10-04 Thread Michael Ellerman
On Thu, 8 Sep 2022 23:25:41 +1000, Nicholas Piggin wrote: > On guest entry, vcpu->cpu and vcpu->arch.thread_cpu are set after > disabling host irqs. On guest exit there is a window whre tick time > accounting briefly enables irqs before these fields are cleared. > > Move them up to ensure they are

[PATCH] powerpc/kasan/book3s_64: warn when running with hash MMU

2022-10-04 Thread Nathan Lynch
kasan is known to crash at boot on book3s_64 with non-radix MMU. As noted in commit 41b7a347bf14 ("powerpc: Book3S 64-bit outline-only KASAN support"): A kernel with CONFIG_KASAN=y will crash during boot on a machine using HPT translation because not all the entry points to the generic KASAN

Re: [PATCH v2 33/44] ftrace: WARN on rcuidle

2022-10-04 Thread Mark Rutland
On Mon, Sep 19, 2022 at 12:00:12PM +0200, Peter Zijlstra wrote: > CONFIG_GENERIC_ENTRY disallows any and all tracing when RCU isn't > enabled. > > XXX if s390 (the only other GENERIC_ENTRY user as of this writing) > isn't comfortable with this, we could switch to > HAVE_NOINSTR_VALIDATION which is

Re: [PATCH v2 00/44] cpuidle,rcu: Clean up the mess

2022-10-04 Thread Ulf Hansson
On Mon, 19 Sept 2022 at 12:18, Peter Zijlstra wrote: > > Hi All! > > At long last, a respin of the cpuidle vs rcu cleanup patches. > > v1: https://lkml.kernel.org/r/20220608142723.103523...@infradead.org > > These here patches clean up the mess that is cpuidle vs rcuidle. > > At the end of the rid

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-04 Thread Ian Rogers
On Tue, Oct 4, 2022, 12:06 AM Athira Rajeev wrote: > > > > On 04-Oct-2022, at 12:21 AM, Ian Rogers wrote: > > > > On Mon, Oct 3, 2022 at 7:03 AM atrajeev > wrote: > >> > >> On 2022-10-02 05:17, Ian Rogers wrote: > >>> On Thu, Sep 29, 2022 at 5:56 AM James Clark > >>> wrote: > > > >>>

Re: [PATCH net-next v6 6/9] net: dpaa: Convert to phylink

2022-10-04 Thread Russell King (Oracle)
On Fri, Sep 30, 2022 at 04:09:30PM -0400, Sean Anderson wrote: > +static void memac_validate(struct phylink_config *config, > +unsigned long *supported, > +struct phylink_link_state *state) > +{ > + __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-04 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 04, 2022 at 03:14:27PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Oct 04, 2022 at 07:49:21AM -0700, Ian Rogers escreveu: > > On Tue, Oct 4, 2022, 12:06 AM Athira Rajeev > > > Thanks for helping with testing. Can I add your Tested-by for the patch ? > > > Yep. > > > Tested-

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-04 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 04, 2022 at 07:49:21AM -0700, Ian Rogers escreveu: > On Tue, Oct 4, 2022, 12:06 AM Athira Rajeev > > Thanks for helping with testing. Can I add your Tested-by for the patch ? > Yep. > Tested-by: Ian Rogers > Thanks, > Ian

Re: [PATCH net-next v6 0/9] [RFT] net: dpaa: Convert to phylink

2022-10-04 Thread Sean Anderson
On 10/4/22 12:52 PM, Jakub Kicinski wrote: > On Tue, 4 Oct 2022 11:28:19 -0400 Sean Anderson wrote: >> I noticed that this series was marked "RFC" in patchwork. > > Because the cover letter has RTF in the subject, presumably. > >> I consider this series ready to apply. I am requesting *testing

Re: [PATCH net-next v6 0/9] [RFT] net: dpaa: Convert to phylink

2022-10-04 Thread Jakub Kicinski
On Tue, 4 Oct 2022 11:28:19 -0400 Sean Anderson wrote: > I noticed that this series was marked "RFC" in patchwork. Because the cover letter has RTF in the subject, presumably. > I consider this series ready to apply. I am requesting *testing*, in > particular on 10gec/dtsec boards (P-series). Sin

Re: [PATCH net-next v6 6/9] net: dpaa: Convert to phylink

2022-10-04 Thread Russell King (Oracle)
On Fri, Sep 30, 2022 at 04:09:30PM -0400, Sean Anderson wrote: > @@ -1064,43 +1061,50 @@ static struct phylink_pcs *memac_pcs_create(struct > device_node *mac_node, > return pcs; > } > > +static bool memac_supports(struct mac_device *mac_dev, phy_interface_t iface) > +{ > + /* If ther

Re: [PATCH net-next v6 6/9] net: dpaa: Convert to phylink

2022-10-04 Thread Sean Anderson
On 10/4/22 12:13 PM, Russell King (Oracle) wrote: > On Fri, Sep 30, 2022 at 04:09:30PM -0400, Sean Anderson wrote: >> @@ -1064,43 +1061,50 @@ static struct phylink_pcs *memac_pcs_create(struct >> device_node *mac_node, >> return pcs; >> } >> >> +static bool memac_supports(struct mac_dev

Re: [PATCH net-next v6 0/9] [RFT] net: dpaa: Convert to phylink

2022-10-04 Thread Sean Anderson
On 9/30/22 4:09 PM, Sean Anderson wrote: > This series converts the DPAA driver to phylink. > > I have tried to maintain backwards compatibility with existing device > trees whereever possible. However, one area where I was unable to > achieve this was with QSGMII. Please refer to patch 2 for d

Re: [PATCH net-next v6 5/9] net: fman: memac: Use lynx pcs driver

2022-10-04 Thread Sean Anderson
On 9/30/22 4:09 PM, Sean Anderson wrote: > Although not stated in the datasheet, as far as I can tell PCS for mEMACs > is a "Lynx." By reusing the existing driver, we can remove the PCS > management code from the memac driver. This requires calling some PCS > functions manually which phylink wou

Re: [PATCH] powerpc: udbg: Remove extern function prototypes

2022-10-04 Thread Michael Ellerman
On Tue, 23 Aug 2022 01:17:51 +0200, Pali Rohár wrote: > 'extern' keywork is pointless and deprecated for function prototypes. > > Applied to powerpc/next. [1/1] powerpc: udbg: Remove extern function prototypes https://git.kernel.org/powerpc/c/6bd7ff497b4af13ea3d53781ffca7dc744dbb4da chee

Re: [PATCH v6 00/25] powerpc: Syscall wrapper and register clearing

2022-10-04 Thread Michael Ellerman
On Wed, 21 Sep 2022 16:55:40 +1000, Rohan McLure wrote: > V5 available here: > > Link: > https://lore.kernel.org/all/20220916053300.786330-2-rmcl...@linux.ibm.com/T/ > > Implement a syscall wrapper, causing arguments to handlers to be passed > via a struct pt_regs on the stack. The syscall wrapp

Re: [PATCH v2] powerpc: Add support for early debugging via Serial 16550 console

2022-10-04 Thread Michael Ellerman
On Tue, 23 Aug 2022 01:15:01 +0200, Pali Rohár wrote: > Currently powerpc early debugging contains lot of platform specific > options, but does not support standard UART / serial 16550 console. > > Later legacy_serial.c code supports registering UART as early debug console > from device tree but i

Re: [PATCH] powerpc: dts: turris1x.dts: Fix NOR partitions labels

2022-10-04 Thread Michael Ellerman
On Wed, 31 Aug 2022 00:55:00 +0200, Pali Rohár wrote: > Partition partition@2 contains generic kernel image and it does not > have to be used only for rescue purposes. Partition partition@1c > contains bootable rescue system and partition partition@34 contains > factory image/data for r

Re: [PATCH v3 0/7] powerpc/64: interrupt soft-mask and context fixes

2022-10-04 Thread Michael Ellerman
On Mon, 26 Sep 2022 15:42:58 +1000, Nicholas Piggin wrote: > No real changes since last posting, I just pulled fixes from several > series together and rearranged them and updated changelogs slightly. > > Thanks, > Nick > > Nicholas Piggin (7): > powerpc/64/interrupt: Fix false warning in conte

Re: [PATCH] powerpc: dts: turris1x.dts: Fix labels in DSA cpu port nodes

2022-10-04 Thread Michael Ellerman
On Sat, 27 Aug 2022 15:15:38 +0200, Pali Rohár wrote: > DSA cpu port node has to be marked with "cpu" label. > So fix it for both cpu port nodes. > > Applied to powerpc/next. [1/1] powerpc: dts: turris1x.dts: Fix labels in DSA cpu port nodes https://git.kernel.org/powerpc/c/8bf056f57f1d16

Re: [PATCH] powerpc/boot: Explicitly disable usage of SPE instructions

2022-10-04 Thread Michael Ellerman
On Sat, 27 Aug 2022 15:44:54 +0200, Pali Rohár wrote: > uImage boot wrapper should not use SPE instructions, like kernel itself. > Boot wrapper has already disabled Altivec and VSX instructions but not SPE. > Options -mno-spe and -mspe=no already set when compilation of kernel, but > not when compi

Re: [PATCH v2 0/5] powerpc/64s: improve boot debugging

2022-10-04 Thread Michael Ellerman
On Mon, 26 Sep 2022 15:56:15 +1000, Nicholas Piggin wrote: > This series provides a machine check handler to catch out of > bounds memory accesses in early boot before the MMU is enabled. > > Since v1: > - 64e compile fix > > Nicholas Piggin (5): > powerpc/64s/interrupt: move early boot ILE fix

Re: [PATCH 1/2] powerpc: Fix SPE Power ISA properties for e500v1 platforms

2022-10-04 Thread Michael Ellerman
On Fri, 2 Sep 2022 23:21:02 +0200, Pali Rohár wrote: > Commit 2eb28006431c ("powerpc/e500v2: Add Power ISA properties to comply > with ePAPR 1.1") introduced new include file e500v2_power_isa.dtsi and > should have used it for all e500v2 platforms. But apparently it was used > also for e500v1 platf

Re: [PATCH v4 1/2] powerpc: add ISA v3.0 / v3.1 wait opcode macro

2022-10-04 Thread Michael Ellerman
On Tue, 20 Sep 2022 22:22:58 +1000, Nicholas Piggin wrote: > The wait instruction encoding changed between ISA v2.07 and ISA v3.0. > In v3.1 the instruction gained a new field. > > Update the PPC_WAIT macro to the current encoding. Rename the older > incompatible one with a _v203 suffix as it was

Re: [PATCH v2 0/7] powerpc: build / linker improvements

2022-10-04 Thread Michael Ellerman
On Fri, 16 Sep 2022 14:07:48 +1000, Nicholas Piggin wrote: > This series is mainly about moving more things out of writable and > executable memory, and slightly moving the linker script in the > direction of the binutils ld internal linker script as we do. > > Thanks, > Nick > > [...] Applied t

Re: [PATCH v2 0/5] powerpc/64: avoid GOT addressing, don't put data in TOC

2022-10-04 Thread Michael Ellerman
On Mon, 26 Sep 2022 13:40:52 +1000, Nicholas Piggin wrote: > This is a cleaned up set of the initial prep patches from the pcrel > series, dealing with regularising addressing variables from asm > and using helper macros more consistently. > > Changes since v1: > - Use "REGS" stack frame marker fo

Re: [PATCH] powerpc/time: avoid programming DEC at the start of the timer interrupt

2022-10-04 Thread Michael Ellerman
On Sat, 10 Sep 2022 00:24:57 +1000, Nicholas Piggin wrote: > Setting DEC to maximum at the start of the timer interrupt is not > necessary and can be avoided for performance when MSR[EE] is not > enabled during the handler as explained in commit 0faf20a1ad16 > ("powerpc/64s/interrupt: Don't enable

Re: [PATCH] powerpc: remove orphan systbl_chk.sh

2022-10-04 Thread Michael Ellerman
On Thu, 29 Sep 2022 13:21:20 +1000, Nicholas Piggin wrote: > arch/powerpc/kernel/systbl_chk.sh has not been referenced since commit > ab66dcc76d6a ("powerpc: generate uapi header and system call table > files"). Remove it. > > Applied to powerpc/next. [1/1] powerpc: remove orphan systbl_chk.sh

Re: [PATCH v3 1/4] powerpc/64s: Add DEBUG_PAGEALLOC for radix

2022-10-04 Thread Michael Ellerman
On Mon, 26 Sep 2022 07:57:23 +, Nicholas Miehlbradt wrote: > There is support for DEBUG_PAGEALLOC on hash but not on radix. > Add support on radix. > > Applied to powerpc/next. [1/4] powerpc/64s: Add DEBUG_PAGEALLOC for radix https://git.kernel.org/powerpc/c/5e8b2c4dd3a0a4a2966e61d60d

Re: [PATCH] powerpc/pseries: move hcall_tracepoint_refcount out of .toc

2022-10-04 Thread Michael Ellerman
On Mon, 26 Sep 2022 15:38:23 +1000, Nicholas Piggin wrote: > The .toc section is not really intended for arbitrary data. Writable > data in particular prevents making the TOC read-only after relocation. > Move hcall_tracepoint_refcount into the .data section. > > Applied to powerpc/next. [1/1]

Re: [PATCH] powerpc/64s: POWER10 CPU Kconfig build option

2022-10-04 Thread Michael Ellerman
On Fri, 23 Sep 2022 13:30:04 +1000, Nicholas Piggin wrote: > This adds basic POWER10_CPU option, which builds with -mcpu=power10. > > Applied to powerpc/next. [1/1] powerpc/64s: POWER10 CPU Kconfig build option https://git.kernel.org/powerpc/c/4b2a9315f20d98576e25c9e4572e9a8e028d7aa2 che

Re: (subset) [PATCH 1/5] KVM: PPC: Book3S HV P9: Clear vcpu cpu fields before enabling host irqs

2022-10-04 Thread Michael Ellerman
On Thu, 8 Sep 2022 23:25:41 +1000, Nicholas Piggin wrote: > On guest entry, vcpu->cpu and vcpu->arch.thread_cpu are set after > disabling host irqs. On guest exit there is a window whre tick time > accounting briefly enables irqs before these fields are cleared. > > Move them up to ensure they are

Re: [PATCH 1/2] powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5

2022-10-04 Thread Michael Ellerman
On Wed, 21 Sep 2022 11:41:02 +1000, Nicholas Piggin wrote: > Big-endian GENERIC_CPU supports 970, but builds with -mcpu=power5. > POWER5 is ISA v2.02 whereas 970 is v2.01 plus Altivec. 2.02 added > the popcntb instruction which a compiler might use. > > Use -mcpu=power4. > > > [...] Applied to

Re: [PATCH v3] powerpc/smp: poll cpu_callin_map more aggressively in __cpu_up()

2022-10-04 Thread Michael Ellerman
On Mon, 26 Sep 2022 17:02:50 -0500, Nathan Lynch wrote: > At boot time, it is not necessary to delay between polls of > cpu_callin_map when waiting for a kicked CPU to come up. Remove the > delay intervals, but preserve the overall deadline (five seconds). > > At run time, the first poll result is

Re: [PATCH v2 0/2] powerpc/pseries: restrict error injection and DT changes when locked down

2022-10-04 Thread Michael Ellerman
On Mon, 26 Sep 2022 08:16:41 -0500, Nathan Lynch wrote: > Add two new lockdown reasons for use in powerpc's pseries platform > code. > > The pseries platform allows hardware-level error injection via certain > calls to the RTAS (Run Time Abstraction Services) firmware. ACPI-based > error injection

Re: [PATCH] powerpc: Always select HAVE_EFFICIENT_UNALIGNED_ACCESS

2022-10-04 Thread Michael Ellerman
On Fri, 16 Sep 2022 23:15:23 +1000, Michael Ellerman wrote: > Currently powerpc selects HAVE_EFFICIENT_UNALIGNED_ACCESS in all cases > but one. The exception is if the kernel is being built little endian and > explicitly targetted for Power7. > > The combination of Power7 and little endian was nev

Re: [PATCH v3 1/6] powerpc: Add hardware description string

2022-10-04 Thread Michael Ellerman
On Fri, 30 Sep 2022 18:27:04 +1000, Michael Ellerman wrote: > Create a hardware description string, which we will use to record > various details of the hardware platform we are running on. > > Print the accumulated description at boot, and use it to set the generic > description which is printed

Re: [PATCH] powerpc/64s: Remove lost/old comment

2022-10-04 Thread Michael Ellerman
On Wed, 28 Sep 2022 23:09:41 +1000, Michael Ellerman wrote: > The bulk of this was moved/reworded in: > 57f266497d81 ("powerpc: Use gas sections for arranging exception vectors") > > And now appears around line 700 in arch/powerpc/kernel/exceptions-64s.S. > > Applied to powerpc/next. [1/1] p

Re: [PATCH] powerpc/microwatt: Remove unused early debug code

2022-10-04 Thread Michael Ellerman
On Mon, 19 Sep 2022 15:27:55 +1000, Michael Ellerman wrote: > The original microwatt submission[1] included some early debug code for > using the Microwatt "potato" UART. > > The series that was eventually merged switched to using a standard UART, > and so doesn't need any special early debug hand

Re: [PATCH] powerpc: Drops STABS_DEBUG from linker scripts

2022-10-04 Thread Michael Ellerman
On Wed, 28 Sep 2022 23:09:51 +1000, Michael Ellerman wrote: > No toolchain we support should be generating stabs debug information > anymore. Drop the sections entirely from our linker scripts. > > We removed all the manual stabs annotations in commit > 12318163737c ("powerpc/32: Remove remaining

Re: [PATCH] powerpc/configs: Enable PPC_UV in powernv_defconfig

2022-10-04 Thread Michael Ellerman
On Thu, 29 Sep 2022 15:15:17 +1000, Michael Ellerman wrote: > Make sure the ultravisor code at least gets some build testing by > enabling it in powernv_defconfig. > > Applied to powerpc/next. [1/1] powerpc/configs: Enable PPC_UV in powernv_defconfig https://git.kernel.org/powerpc/c/d91c3

Re: [PATCH] powerpc/64s: Remove old STAB comment

2022-10-04 Thread Michael Ellerman
On Wed, 28 Sep 2022 23:09:12 +1000, Michael Ellerman wrote: > This used to be about the 0x4300 handler, but that was moved in commit > da2bc4644c75 ("powerpc/64s: Add new exception vector macros"). > > Note that "STAB" here refers to "Segment Table" not the debug format. > > Applied to powerpc/

Re: [PATCH] powerpc/64: Remove unused SYS_CALL_TABLE symbol

2022-10-04 Thread Michael Ellerman
On Tue, 13 Sep 2022 22:45:45 +1000, Michael Ellerman wrote: > In interrupt_64.S, formerly entry_64.S, there are two toc entries > created for sys_call_table and compat_sys_call_table. > > These are no longer used, since the system call entry was converted from > asm to C, so remove them. > > > [

Re: [PATCH 1/2] powerpc/vmlinux.lds: Ensure STRICT_ALIGN_SIZE is at least page aligned

2022-10-04 Thread Michael Ellerman
On Fri, 16 Sep 2022 23:14:21 +1000, Michael Ellerman wrote: > Add a check that STRICT_ALIGN_SIZE is aligned to at least PAGE_SIZE. > > That then makes the alignment to PAGE_SIZE immediately after the > alignment to STRICT_ALIGN_SIZE redundant, so remove it. > > Applied to powerpc/next. [1/2] p

Re: [PATCH 1/2] powerpc/mm/64s: Drop pgd_huge()

2022-10-04 Thread Michael Ellerman
On Sat, 3 Sep 2022 22:36:39 +1000, Michael Ellerman wrote: > On powerpc there are two ways for huge pages to be represented in the > top level page table, aka PGD (Page Global Directory). > > If the address space mapped by an individual PGD entry does not > correspond to a given huge page size, th

Re: [PATCH 1/2] powerpc: Make stack frame marker upper case

2022-10-04 Thread Michael Ellerman
On Wed, 28 Sep 2022 01:04:18 +1000, Michael Ellerman wrote: > Now that the stack frame regs marker is only 32-bits it is not as > obvious in memory dumps and easier to miss, eg: > > c4733e40 || > c4733e50 0

Re: [PATCH] powerpc: update config files

2022-10-04 Thread Michael Ellerman
On Thu, 29 Sep 2022 12:15:02 +0200, Lukas Bulwahn wrote: > Clean up config files by: > - removing configs that were deleted in the past > - removing configs not in tree and without recently pending patches > - adding new configs that are replacements for old configs in the file > > For some

Re: [PATCH] powerpc/kprobes: Fix null pointer reference in arch_prepare_kprobe()

2022-10-04 Thread Michael Ellerman
On Fri, 23 Sep 2022 17:32:53 +0800, Li Huafei wrote: > I found a null pointer reference in arch_prepare_kprobe(): > > # echo 'p cmdline_proc_show' > kprobe_events > # echo 'p cmdline_proc_show+16' >> kprobe_events > [ 67.278533][ T122] Kernel attempted to read user page (0) - exploit > a

Re: [PATCH v2] ppc64/kdump: Limit kdump base to 512MB

2022-10-04 Thread Michael Ellerman
On Mon, 12 Sep 2022 12:20:31 +0530, Hari Bathini wrote: > Since commit e641eb03ab2b0 ("powerpc: Fix up the kdump base cap to > 128M") memory for kdump kernel has been reserved at an offset of > 128MB. This held up well for a long time before running into boot > failure on LPARs having a lot of core

Re: [PATCH v3] powerpc: Ignore DSI error caused by the copy/paste instruction

2022-10-04 Thread Michael Ellerman
On Tue, 27 Sep 2022 18:29:27 -0700, Haren Myneni wrote: > The data storage interrupt (DSI) error will be generated when the > paste operation is issued on the suspended Nest Accelerator (NX) > window due to NX state changes. The hypervisor expects the > partition to ignore this error during page fa

Re: [PATCH] powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL

2022-10-04 Thread Michael Ellerman
On Wed, 28 Sep 2022 18:57:33 -0700, Haren Myneni wrote: > Generally the hypervisor decides to allocate a window on different > VAS instances. But if the user space wishes to allocate on the > current VAS instance where the process is executing, the kernel has > to pass associativity domain IDs to a

Re: [PATCH] powerpc/pseries: Move vas_migration_handler early during migration

2022-10-04 Thread Michael Ellerman
On Thu, 22 Sep 2022 01:27:07 -0700, Haren Myneni wrote: > When the migration is initiated, the hypervisor changes VAS > mappings as part of pre-migration event. Then the OS gets the > migration event which closes all VAS windows before the migration > starts. NX generates continuous faults until wi

Re: (subset) [PATCH v1 0/3] coding-style.rst: document BUG() and WARN() rules

2022-10-04 Thread Michael Ellerman
On Tue, 20 Sep 2022 14:22:59 +0200, David Hildenbrand wrote: > As it seems to be rather unclear if/when to use BUG(), BUG_ON(), > VM_BUG_ON(), WARN_ON_ONCE(), ... let's try to document the result of a > recent discussion. > > Details can be found in patch #1. > > RFC -> v1: > * "coding-style.rst:

Re: [PATCH v2 01/19] powerpc/Kconfig: Fix non existing CONFIG_PPC_FSL_BOOKE

2022-10-04 Thread Michael Ellerman
On Mon, 19 Sep 2022 19:01:25 +0200, Christophe Leroy wrote: > CONFIG_PPC_FSL_BOOKE doesn't exist. Should be CONFIG_FSL_BOOKE. > > Applied to powerpc/next. [01/19] powerpc/Kconfig: Fix non existing CONFIG_PPC_FSL_BOOKE https://git.kernel.org/powerpc/c/d1203f32d86987a3ccd7de9ba2448ba12d8

Re: [PATCH] powerpc: Reduce redundancy in pgtable.h

2022-10-04 Thread Michael Ellerman
On Wed, 7 Sep 2022 12:05:01 +0200, Christophe Leroy wrote: > PAGE_KERNEL_TEXT, PAGE_KERNEL_EXEC and PAGE_AGP are the same > for all powerpcs. > > Remove duplicated definitions. > > Applied to powerpc/next. [1/1] powerpc: Reduce redundancy in pgtable.h https://git.kernel.org/powerpc/c/b99

Re: [PATCH] powerpc: Make PAGE_KERNEL_xxx macros grep-friendly

2022-10-04 Thread Michael Ellerman
On Wed, 7 Sep 2022 12:05:21 +0200, Christophe Leroy wrote: > Avoid multi-lines to help getting a complete view when using > grep. They still remain under the 100 chars limit. > > Applied to powerpc/next. [1/1] powerpc: Make PAGE_KERNEL_xxx macros grep-friendly https://git.kernel.org/power

Re: [PATCH] powerpc/irq: Refactor irq_soft_mask_{set,or}_return()

2022-10-04 Thread Michael Ellerman
On Tue, 20 Sep 2022 08:41:08 +0200, Christophe Leroy wrote: > This partialy reapply commit ef5b570d3700 ("powerpc/irq: Don't > open code irq_soft_mask helpers") which was reverted by > commit 684c68d92e2e ("Revert "powerpc/irq: Don't open code > irq_soft_mask helpers"") > > irq_soft_mask_set_retur

Re: [PATCH] powerpc/highmem: Properly handle fragmented memory

2022-10-04 Thread Michael Ellerman
On Tue, 20 Sep 2022 19:36:42 +0200, Christophe Leroy wrote: > In addition to checking whether a page is reserved before allocating > it to highmem, verify that it is valid memory. > > Otherwise the kernel Oopses as below: > > [0.00] mem auto-init: stack:off, heap alloc:off, heap free:off

Re: [PATCH] powerpc/book3s: Inline first level of update_mmu_cache()

2022-10-04 Thread Michael Ellerman
On Mon, 5 Sep 2022 11:38:25 +0200, Christophe Leroy wrote: > update_mmu_cache() voids when hash page tables are not used. > On PPC32 that means when MMU_FTR_HPTE_TABLE is not defined. > On PPC64 that means when RADIX is enabled. > > Rename core part of update_mmu_cache() as __update_mmu_cache() >

Re: [PATCH 1/2] powerpc/nohash: Remove pgd_huge() stub

2022-10-04 Thread Michael Ellerman
On Wed, 7 Sep 2022 11:34:44 +0200, Christophe Leroy wrote: > linux/hugetlb.h has a fallback pgd_huge() macro for when > pgd_huge is not defined. > > Remove the powerpc redundant definitions. > > Applied to powerpc/next. [1/2] powerpc/nohash: Remove pgd_huge() stub https://git.kernel.org/

Re: [PATCH linux-next] powerpc/pseries/vas: Remove the unneeded result variable

2022-10-04 Thread Michael Ellerman
On Thu, 25 Aug 2022 07:26:57 +, cgel@gmail.com wrote: > From: ye xingchen > > Return the value vas_register_coproc_api() directly instead of storing it > in another redundant variable. > > Applied to powerpc/next. [1/1] powerpc/pseries/vas: Remove the unneeded result variable ht

Re: [PATCH] powerpc/mm: Fix UBSAN warning reported on hugetlb

2022-10-04 Thread Michael Ellerman
On Thu, 8 Sep 2022 12:54:40 +0530, Aneesh Kumar K.V wrote: > Powerpc architecture supports 16GB hugetlb pages with hash translation. For 4K > page size, this is implemented as a hugepage directory entry at PGD level and > for 64K it is implemented as a huge page pte at PUD level > > With 16GB huge

Re: [PATCH v2] powerpc/mm: Update max/min_low_pfn in the same function

2022-10-04 Thread Michael Ellerman
On Mon, 4 Jul 2022 12:08:51 +0530, Aneesh Kumar K.V wrote: > For both CONFIG_NUMA enabled/disabled use mem_topology_setup to > update max/min_low_pfn. > > This also add min_low_pfn update to CONFIG_NUMA which was initialized > to zero before. > > > [...] Applied to powerpc/next. [1/1] powerpc/

Re: [PATCH linux-next] ocxl: Remove the unneeded result variable

2022-10-04 Thread Michael Ellerman
On Tue, 6 Sep 2022 07:20:06 +, cgel@gmail.com wrote: > From: ye xingchen > > Return the value opal_npu_spa_clear_cache() directly instead of storing > it in another redundant variable. > > Applied to powerpc/next. [1/1] ocxl: Remove the unneeded result variable https://git.kerne

Re: (subset) [PATCH V2 1/3] powerpc/perf: Fix branch_filter support for multiple filters in powerpc

2022-10-04 Thread Michael Ellerman
On Wed, 21 Sep 2022 20:22:53 +0530, Athira Rajeev wrote: > For PERF_SAMPLE_BRANCH_STACK sample type, different branch_sample_type > ie branch filters are supported. The branch filters are requested via > event attribute "branch_sample_type". Multiple branch filters can be > passed in event attribut

Re: [PATCH] powerpc/mm/book3s/hash: Rename flush_tlb_pmd_range

2022-10-04 Thread Michael Ellerman
On Wed, 7 Sep 2022 13:49:41 +0530, Aneesh Kumar K.V wrote: > This function does the hash page table update. Hence rename it to > indicate this better to avoid confusion with flush_pmd_tlb_range() > > Applied to powerpc/next. [1/1] powerpc/mm/book3s/hash: Rename flush_tlb_pmd_range https:/

[PATCH] powerpc/64s/interrupt: stack backtrace fix

2022-10-04 Thread Nicholas Piggin
The value of the stack frame regs marker that gets saved on the stack in interrupt entry code does not match the regs marker value, which breaks stack frame marker matching. This stray instruction looks to have been introduced in a mismerge. Fixes: bf75a3258a403 ("powerpc/64s/interrupt: move earl

Re: [PATCH] KVM: PPC: Book3S HV: Fix decrementer migration

2022-10-04 Thread Michael Ellerman
On Tue, 16 Aug 2022 19:25:17 -0300, Fabiano Rosas wrote: > We used to have a workaround[1] for a hang during migration that was > made ineffective when we converted the decrementer expiry to be > relative to guest timebase. > > The point of the workaround was that in the absence of an explicit > d

Re: [PATCH v2 12/44] cpuidle,dt: Push RCU-idle into driver

2022-10-04 Thread Ulf Hansson
On Tue, 4 Oct 2022 at 13:03, Ulf Hansson wrote: > > On Mon, 19 Sept 2022 at 12:18, Peter Zijlstra wrote: > > > > Doing RCU-idle outside the driver, only to then temporarily enable it > > again before going idle is daft. > > > > Notably: this converts all dt_init_idle_driver() and > > __CPU_PM_CPU

Re: [PATCH v1 1/3] coding-style.rst: document BUG() and WARN() rules ("do not crash the kernel")

2022-10-04 Thread David Hildenbrand
On 26.09.22 09:44, Kalle Valo wrote: David Hildenbrand writes: +Use WARN_ON_ONCE() rather than WARN() or WARN_ON() +** + +WARN_ON_ONCE() is generally preferred over WARN() or WARN_ON(), because it +is common for a given warning condition, if it o

Re: [RFC PATCH 0/3] powerpc/32: nohz full support

2022-10-04 Thread Christophe Leroy
Le 04/10/2022 à 08:33, Nicholas Piggin a écrit : > Doesn't seem to be much more involved in adding context tracking and > generic virt cpu accounting support for 32-bit, which is all that's > left to support NO_HZ_FULL. > > I tested this with e5500 SMP kernel with isolated and nohz CPU, and > it

Re: [PATCH v2 38/44] cpuidle,powerdomain: Remove trace_.*_rcuidle()

2022-10-04 Thread Ulf Hansson
On Mon, 19 Sept 2022 at 12:17, Peter Zijlstra wrote: > > OMAP was the one and only user. > > Signed-off-by: Peter Zijlstra (Intel) There are changes to the runtime PM core as part of $subject patch. Perhaps move those parts into a separate patch? In any case, the code looks good to me. Reviewed

Re: [PATCH v2 39/44] cpuidle,clk: Remove trace_.*_rcuidle()

2022-10-04 Thread Ulf Hansson
On Mon, 19 Sept 2022 at 12:17, Peter Zijlstra wrote: > > OMAP was the one and only user. OMAP? :-) > > Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ulf Hansson Kind regards Uffe > --- > drivers/clk/clk.c |8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > --- a/dri

Re: [PATCH v2 23/44] arm,smp: Remove trace_.*_rcuidle() usage

2022-10-04 Thread Ulf Hansson
On Mon, 19 Sept 2022 at 12:18, Peter Zijlstra wrote: > > None of these functions should ever be ran with RCU disabled anymore. > > Specifically, do_handle_IPI() is only called from handle_IPI() which > explicitly does irq_enter()/irq_exit() which ensures RCU is watching. > > The problem with smp_c

Re: [PATCH v2 14/44] cpuidle,cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}()

2022-10-04 Thread Ulf Hansson
On Mon, 19 Sept 2022 at 12:17, Peter Zijlstra wrote: > > All callers should still have RCU enabled. > > Signed-off-by: Peter Zijlstra (Intel) > Acked-by: Mark Rutland Reviewed-by: Ulf Hansson Kind regards Uffe > --- > kernel/cpu_pm.c |9 - > 1 file changed, 9 deletions(-) > > --

Re: [PATCH v2 12/44] cpuidle,dt: Push RCU-idle into driver

2022-10-04 Thread Ulf Hansson
On Mon, 19 Sept 2022 at 12:18, Peter Zijlstra wrote: > > Doing RCU-idle outside the driver, only to then temporarily enable it > again before going idle is daft. > > Notably: this converts all dt_init_idle_driver() and > __CPU_PM_CPU_IDLE_ENTER() users for they are inextrably intertwined. > > Sign

Re: [RFC PATCH 1/3] powerpc/32: Implement HAVE_CONTEXT_TRACKING_USER support

2022-10-04 Thread Christophe Leroy
Le 04/10/2022 à 08:33, Nicholas Piggin a écrit : > Context tracking involves tracking user, kernel, guest switches. This > enables existing context tracking code for interrupt entry on 32-bit. > KVM and interrupt exit already has context tracking calls. > > Signed-off-by: Nicholas Piggin > ---

Re: [PATCH 1/2] powerpc/64s/interrupt: Change must-hard-mask interrupt check from BUG to WARN

2022-10-04 Thread Sachin Sant
> On 04-Oct-2022, at 10:41 AM, Nicholas Piggin wrote: > > This new assertion added is generally harmless and gets fixed up > naturally, but it does indicate a problem with MSR manipulation > somewhere. > > Fixes: c39fb71a54f0 ("powerpc/64s/interrupt: masked handler debug check for > previous

Re: [RFC PATCH 2/2] powerpc: nop trap instruction after WARN_ONCE fires

2022-10-04 Thread Christophe Leroy
Le 04/10/2022 à 06:31, Nicholas Piggin a écrit : > On Sat Sep 24, 2022 at 2:47 AM AEST, Christophe Leroy wrote: >> >> >> Le 23/09/2022 à 17:41, Nicholas Piggin a écrit : >>> WARN_ONCE and similar are often used in frequently executed code, and >>> should not crash the system. The program check in

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-04 Thread Athira Rajeev
> On 04-Oct-2022, at 12:21 AM, Ian Rogers wrote: > > On Mon, Oct 3, 2022 at 7:03 AM atrajeev wrote: >> >> On 2022-10-02 05:17, Ian Rogers wrote: >>> On Thu, Sep 29, 2022 at 5:56 AM James Clark >>> wrote: On 29/09/2022 09:49, Athira Rajeev wrote: > > >> O