Re: [PATCH v3 4/4] arc: Use generic dump_stack_print_cmdline() implementation

2022-10-09 Thread Vineet Gupta
On 8/8/22 06:09, Helge Deller wrote: The process program name and command line is now shown in generic code in dump_stack_print_info(), so drop the arc-specific implementation. Signed-off-by: Helge Deller But that info printing was added back in 2018 by e36df28f532f882. I don't think arc is

[PATCH] powerpc: suppress some linker warnings in recent linker versions

2022-10-09 Thread Stephen Rothwell
This is a follow on from commit 0d362be5b142 ("Makefile: link with -z noexecstack --no-warn-rwx-segments") for arch/powerpc/boot to address wanrings like: ld: warning: opal-calls.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will

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

2022-10-09 Thread Andrew Donnellan
On Mon, 2022-10-10 at 11:29 +1100, Benjamin Gray wrote: > Adds a generic memory 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

Re: [PATCH linux-next][RFC] powerpc: avoid lockdep when we are offline

2022-10-09 Thread Zhouyi Zhou
On Mon, Oct 10, 2022 at 11:49 AM Nicholas Piggin wrote: > > On Thu Sep 29, 2022 at 11:48 AM AEST, Zhouyi Zhou wrote: > > On Wed, Sep 28, 2022 at 10:51 AM Nicholas Piggin wrote: > > > > > > On Wed Sep 28, 2022 at 11:48 AM AEST, Zhouyi Zhou wrote: > > > > Thank Nick for reviewing my patch > > > >

Re: [PATCH linux-next][RFC] powerpc: avoid lockdep when we are offline

2022-10-09 Thread Nicholas Piggin
On Thu Sep 29, 2022 at 11:48 AM AEST, Zhouyi Zhou wrote: > On Wed, Sep 28, 2022 at 10:51 AM Nicholas Piggin wrote: > > > > On Wed Sep 28, 2022 at 11:48 AM AEST, Zhouyi Zhou wrote: > > > Thank Nick for reviewing my patch > > > > > > On Tue, Sep 27, 2022 at 12:25 PM Nicholas Piggin > > > wrote: >

[PATCH v3] powerpc/pseries/vas: Add VAS IRQ primary handler

2022-10-09 Thread Haren Myneni
irq_default_primary_handler() can be used only with IRQF_ONESHOT flag, but the flag disables IRQ before executing the thread handler and enables it after the interrupt is handled. But this IRQ disable sets the VAS IRQ OFF state in the hypervisor. In case if NX faults during this window, the

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

2022-10-09 Thread Nicholas Piggin
On Fri Oct 7, 2022 at 4:07 AM AEST, Christophe Leroy wrote: > > > Le 23/09/2022 à 08:23, Nicholas Piggin a écrit : > > On Fri Sep 23, 2022 at 3:46 PM AEST, Christophe Leroy wrote: > >> > >> > >> Le 23/09/2022 à 05:30, Nicholas Piggin a écrit : > >>> This adds basic POWER10_CPU option, which builds

[PATCH linux-next][RFC] powerpc: fix HOTPLUG error in rcutorture

2022-10-09 Thread Zhouyi Zhou
I think we should avoid torture offline the cpu who do tick timer when nohz full is running. Tested on PPC VM of Open Source Lab of Oregon State University. The test results show that after the fix, the success rate of rcutorture is improved. After: Successes: 40 Failures: 9 Before: Successes: 38

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

2022-10-09 Thread Benjamin Gray
A function symbol may set a value in the st_other field to indicate the TOC should be treated as caller-saved. The linker should ensure the current TOC is saved before calling it and restore the TOC afterwards, much like external calls. This is necessary for supporting V2 ABI static calls that do

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

2022-10-09 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 Reviewed-by: Christophe Leroy --- kernel/Makefile | 1 +

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

2022-10-09 Thread Benjamin Gray
Adds a generic memory 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. As a performance optimisation the

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

2022-10-09 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

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

2022-10-09 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

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

2022-10-09 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:

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

2022-10-09 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

[powerpc:merge] BUILD SUCCESS faa0d25c9b7020a688dc48f058bc62602d13ecf0

2022-10-09 Thread kernel test robot
randconfig-a005 x86_64 rhel-8.3-func x86_64randconfig-a013 i386defconfig x86_64rhel-8.3-kselftests arc randconfig-r043-20221009 x86_64

Re: linux-next: manual merge of the powerpc tree with the kbuild tree

2022-10-09 Thread Stephen Rothwell
Hi all, On Tue, 4 Oct 2022 09:16:06 +1100 Stephen Rothwell wrote: > > Today's linux-next merge of the powerpc tree got a conflict in: > > arch/powerpc/Makefile > > between commit: > > ce697ccee1a8 ("kbuild: remove head-y syntax") > > from the kbuild tree and commit: > > dfc3095cec27

Re: linux-next: manual merge of the powerpc tree with the kbuild tree

2022-10-09 Thread Stephen Rothwell
Hi all, On Tue, 4 Oct 2022 09:12:05 +1100 Stephen Rothwell wrote: > > Today's linux-next merge of the powerpc tree got a conflict in: > > arch/powerpc/kernel/Makefile > > between commit: > > 321648455061 ("kbuild: use obj-y instead extra-y for objects placed at the > head") > > from

Re: [PATCH v5 0/7] treewide cleanup of random integer usage

2022-10-09 Thread Jason A. Donenfeld
On Sat, Oct 08, 2022 at 08:41:14PM -0700, Kees Cook wrote: > On Fri, Oct 07, 2022 at 11:53:52PM -0600, Jason A. Donenfeld wrote: > > This is a five part treewide cleanup of random integer handling. The > > rules for random integers are: > > Reviewing the delta between of my .cocci rules and your

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-09 Thread pr-tracker-bot
The pull request you sent on Sun, 09 Oct 2022 22:01:39 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-6.1-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/4899a36f91a9f9b06878471096bd143e7253006d Thank you! --

[PATCH] powerpc: Use swapper_pg_dir instead of init_mm->pgd

2022-10-09 Thread Christophe Leroy
init_mm->pgd is always swapper_pg_dir[] which is known at build time. Directly use the later instead of loading it from init_mm struct at every time. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH] soc: fsl: qe: Add check for ioremap

2022-10-09 Thread Christophe Leroy
Le 08/10/2022 à 04:38, Jiasheng Jiang a écrit : > As ioremap can return NULL pointer, it should > be better to check the return value return error > if fails. > Moreover, the return value of qe_reset should be > checked by cascade. > > Fixes: 68f047e3d62e ("fsl/qe: add rx_sync and tx_sync for

[PATCH] powerpc/sysdev: Remove some duplicate prefix in some messages

2022-10-09 Thread Christophe JAILLET
At the beginning of the file, we have: #define pr_fmt(fmt) "xive: " fmt So, there is no need to duplicate "XIVE:" in debug and error messages. For the records, these useless prefix have been added in commit 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller")

Re: [PATCH] powerpc: dts: turris1x.dts: Add channel labels for temperature sensor

2022-10-09 Thread Pali Rohár
On Friday 30 September 2022 14:46:18 Pali Rohár wrote: > + CC hwmon ML > > On Friday 30 September 2022 14:39:01 Pali Rohár wrote: > > Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip > > itself is located on the board) and channel 1 of SA56004ED chip refers to > >

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

2022-10-09 Thread Pali Rohár
Hello! Any comments on this? It would be nice to take these two patches (or at least patch 2) to finally enable PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT by default where possible. Per following comment there can be an issue with early powermac so seems that PPC_PCI_OF_BUS_MAP_FILL still has to be by

Re: [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary

2022-10-09 Thread Pali Rohár
Hello! Any opinion on this patch? On Saturday 20 August 2022 14:33:27 Pali Rohár wrote: > If there's no PCI host bridge with ISA then check for PCI host bridge with > alias "pci0" (first PCI host bridge) and if it exists then choose it as the > primary PCI host bridge. > > This makes choice of

Re: [PATCH v3] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-10-09 Thread Pali Rohár
On Monday 29 August 2022 10:54:51 Pali Rohár wrote: > On Sunday 28 August 2022 17:43:53 Christophe Leroy wrote: > > Le 28/08/2022 à 19:41, Pali Rohár a écrit : > > > On Sunday 28 August 2022 17:39:25 Christophe Leroy wrote: > > >> Le 28/08/2022 à 19:33, Christophe Leroy a écrit : > > >>> > > >>> >

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

2022-10-09 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull powerpc updates for 6.1. No conflicts with your tree. There will be a conflict when you merge the kbuild tree, due to us renaming head_fsl_booke.S to head_85xx.S. The resolution is mostly trivial, linux-next has the correct

Re: [PATCH] powerpc/64: Remove unused prom_init_toc symbols

2022-10-09 Thread Michael Ellerman
On Tue, 20 Sep 2022 23:11:57 +1000, Michael Ellerman wrote: > Commit 24d33ac5b8ff ("powerpc/64s: Make prom_init require RELOCATABLE") > made prom_init depend on CONFIG_RELOCATABLE. > > But it missed cleaning up a case in the linker script for RELOCATABLE=n, > and associated symbols. Remove them

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

2022-10-09 Thread Michael Ellerman
On Tue, 4 Oct 2022 23:29:52 +1000, Nicholas Piggin wrote: > 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

Re: [PATCH] KVM: PPC: Book3S HV: Fix stack frame regs marker

2022-10-09 Thread Michael Ellerman
On Fri, 7 Oct 2022 00:33:45 +1000, Nicholas Piggin wrote: > The hard-coded marker is out of date now, fix it using the nice define. > > Applied to powerpc/next. [1/1] KVM: PPC: Book3S HV: Fix stack frame regs marker

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

2022-10-09 Thread Michael Ellerman
On Tue, 4 Oct 2022 15:11:56 +1000, 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. > > Applied to powerpc/next. [1/2] powerpc/64s/interrupt: Change must-hard-mask interrupt

Re: [PATCH v3 7/7] ASoC: imx-rpmsg: Assign platform driver used by machine driver to link with

2022-10-09 Thread Shengjiu Wang
On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu wrote: > Each ASoC platform driver is named by rpmsg channel. ASoC machine > driver can parse "fsl,rpmsg-channel-name" property to figure out which > ASoC platform driver it should link with. > > Signed-off-by: Chancel Liu > Acked-by: Shengjiu Wang

Re: [PATCH v3 6/7] ASoC: fsl_rpmsg: Multi-channel support in CPU DAI driver

2022-10-09 Thread Shengjiu Wang
On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu wrote: > Some sound card based on rpmsg may support multi-channel. This patch > expands the maximum channels to 32. > > Signed-off-by: Chancel Liu > Acked-by: Shengjiu Wang Best regards Wang Shengjiu > --- > sound/soc/fsl/fsl_rpmsg.c | 4 ++-- >

Re: [PATCH v3 5/7] ASoC: fsl_rpmsg: Register different ASoC machine devices

2022-10-09 Thread Shengjiu Wang
On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu wrote: > This driver helps register ASoC machine device thus use of > PLATFORM_DEVID_AUTO macro in API can automatically create device for > each sound card based on rpmsg. > > Signed-off-by: Chancel Liu > Acked-by: Shengjiu Wang Best regards Wang

Re: [PATCH v3 4/7] ASoC: imx-pcm-rpmsg: Multi-channel support for sound card based on rpmsg

2022-10-09 Thread Shengjiu Wang
On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu wrote: > Some sound card based on rpmsg may support multi-channel. The number of > channels can be sent to Cortex-M in rpmsg for process. > > Signed-off-by: Chancel Liu > Acked-by: Shengjiu Wang Best regards Wang Shengjiu > --- >

Re: [PATCH v3 3/7] ASoC: imx-pcm-rpmsg: Register different platform drivers

2022-10-09 Thread Shengjiu Wang
On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu wrote: > This patch can register different ASoC platform drivers if there are > several rpmsg channels. Thus sound cards based on different rpmsg > channels can link to their respective platform drivers. Besides, the > name of driver is equal to the

Re: [PATCH v3 2/7] ASoC: imx-audio-rpmsg: Create rpmsg channel for MICFIL

2022-10-09 Thread Shengjiu Wang
On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu wrote: > Rpmsg channel for MICFIL can also be created through rpmsg name service > announcement. If this driver is probed, Cortex-A can access MICFIL > which is actually controlled by Cortex-M through rpmsg channel for > MICFIL. This driver also helps