Re: [PATCH v2] powerpc/32s: fix boot failure with DEBUG_PAGEALLOC without KASAN.

2019-08-22 Thread Michael Ellerman
On Wed, 2019-08-14 at 10:02:20 UTC, Christophe Leroy wrote: > When KASAN is selected, the definitive hash table has to be > set up later, but there is already an early temporary one. > > When KASAN is not selected, there is no early hash table, > so the setup of the definitive hash table cannot be

Re: [PATCH] powerpc/hw_breakpoint: move instruction stepping out of hw_breakpoint_handler()

2019-08-22 Thread Michael Ellerman
On Fri, 2019-06-28 at 15:55:52 UTC, Christophe Leroy wrote: > On 8xx, breakpoints stop after executing the instruction, so > stepping/emulation is not needed. Move it into a sub-function and > remove the #ifdefs. > > Signed-off-by: Christophe Leroy > Reviewed-by: Ravi Bangoria Applied to powerp

Re: [PATCH v3] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt()

2019-08-22 Thread Michael Ellerman
On Wed, 2019-05-15 at 07:45:52 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > The calls to arch_add_memory()/arch_remove_memory() are always made > with the read-side cpu_hotplug_lock acquired via > memory_hotplug_begin(). On pSeries, > arch_add_memory()/arch_remove_memory() eve

Regression fix for bpf in v5.3 (was Re: [RFC PATCH] bpf: handle 32-bit zext during constant blinding)

2019-08-21 Thread Michael Ellerman
an be reproduced by running 'test_cgroup_storage' with > bpf_jit_harden=2. > > Fix this by emitting BPF_ZEXT during constant blinding if > prog->aux->verifier_zext is set. > > Fixes: a4b1d3c1ddf6cb ("bpf: verifier: insert zero extension according to > analysis res

Re: [PATCH v4 1/2] powerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64

2019-08-20 Thread Michael Ellerman
Christophe Leroy writes: > Hi Nick, > > > Le 07/06/2018 à 03:43, Nicholas Piggin a écrit : >> On Wed, 6 Jun 2018 14:21:08 + (UTC) >> Christophe Leroy wrote: >> >>> scaled cputime is only meaningfull when the processor has >>> SPURR and/or PURR, which means only on PPC64. >>> > > [...] > >>

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

2019-08-20 Thread Michael Ellerman
Will Deacon writes: > Hi Michael, > > On Fri, Aug 16, 2019 at 02:52:40PM +1000, Michael Ellerman wrote: >> Will Deacon writes: >> > Although Alpha, Itanic and PowerPC all override NM, only PowerPC does it >> > conditionally so I agree with you that passing &#

[PATCH] powerpc/Makefile: Always pass --synthetic to nm if supported

2019-08-20 Thread Michael Ellerman
loop. Debugged-by: Peter Collingbourne Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 2 -- 1 file changed, 2 deletions(-) See the original discussion here: https://lore.kernel.org/lkml/camn1go6p_vfdrjgzb67zs4kh0wjteqi0cbokmibtokhqogp...@mail.gmail.com/ diff --git a/arch

Re: [PATCH v1 05/10] powerpc/mm: Do early ioremaps from top to bottom on PPC64 too.

2019-08-19 Thread Michael Ellerman
Nicholas Piggin writes: > Christophe Leroy's on August 14, 2019 6:11 am: >> Until vmalloc system is up and running, ioremap basically >> allocates addresses at the border of the IOREMAP area. >> >> On PPC32, addresses are allocated down from the top of the area >> while on PPC64, addresses are al

Re: [PATCH v1 08/10] powerpc/mm: move __ioremap_at() and __iounmap_at() into ioremap.c

2019-08-19 Thread Michael Ellerman
Christophe Leroy writes: > diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c > index 57d742509cec..889ee656cf64 100644 > --- a/arch/powerpc/mm/ioremap.c > +++ b/arch/powerpc/mm/ioremap.c > @@ -103,3 +103,46 @@ void iounmap(volatile void __iomem *token) > vunmap(addr); > }

Re: [PATCH v1 07/10] powerpc/mm: move iounmap() into ioremap.c and drop __iounmap()

2019-08-19 Thread Michael Ellerman
Christophe Leroy writes: > diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c > index 0c23660522ca..57d742509cec 100644 > --- a/arch/powerpc/mm/ioremap.c > +++ b/arch/powerpc/mm/ioremap.c > @@ -72,3 +75,31 @@ void __iomem *ioremap_prot(phys_addr_t addr, unsigned long > size, unsig

Re: [PATCH] powerpc/futex: fix warning: 'oldval' may be used uninitialized in this function

2019-08-16 Thread Michael Ellerman
Christophe Leroy writes: > CC kernel/futex.o > kernel/futex.c: In function 'do_futex': > kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this > function [-Wmaybe-uninitialized] >return oldval == cmparg; > ^ > kernel/futex.c:1651:6: note: 'oldval'

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

2019-08-15 Thread Michael Ellerman
Will Deacon writes: > On Tue, Aug 06, 2019 at 07:34:36PM -0700, Peter Collingbourne wrote: >> On Tue, Aug 6, 2019 at 4:50 PM Stephen Rothwell >> wrote: >> > After merging the arm64 tree, today's linux-next build (powerpc >> > ppc64_defconfig) was just spinning in make - it executing some scripts

Re: [PATCH] powerpc: Allow flush_(inval_)dcache_range to work across ranges >4GB

2019-08-15 Thread Michael Ellerman
D'Silva >> --- >> arch/powerpc/kernel/misc_64.S | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) Acked-by: Michael Ellerman > > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read: > https://w

Re: [PATCH v3 11/16] powerpc/pseries/svm: Export guest SVM status to user space via sysfs

2019-08-14 Thread Michael Ellerman
Thiago Jung Bauermann writes: > Michael Ellerman writes: >> Thiago Jung Bauermann writes: >>> From: Ryan Grimm >>> User space might want to know it's running in a secure VM. It can't do >>> a mfmsr because mfmsr is a privileged instruction

Re: [PATCH v3 08/16] powerpc/pseries/svm: Use shared memory for LPPACA structures

2019-08-14 Thread Michael Ellerman
Thiago Jung Bauermann writes: > Michael Ellerman writes: >> Thiago Jung Bauermann writes: >>> From: Anshuman Khandual >>> >>> LPPACA structures need to be shared with the host. Hence they need to be in >>> shared memory. Instead of allocatin

Re: [PATCH] powerpc/64e: drop stale call to smp_processor_id() which hangs SMP startup

2019-08-12 Thread Michael Ellerman
On Thu, 2019-08-08 at 12:48:26 UTC, Christophe Leroy wrote: > Santa commit ebb9d30a6a74 ("powerpc/mm: any thread in one core can be > the first to setup TLB1") removed the need to know the cpu_id in > early_init_this_mmu(), but the call to smp_processor_id() which was > marked __maybe_used remained

Re: [PATCH v3 11/16] powerpc/pseries/svm: Export guest SVM status to user space via sysfs

2019-08-12 Thread Michael Ellerman
Thiago Jung Bauermann writes: > From: Ryan Grimm > > User space might want to know it's running in a secure VM. It can't do > a mfmsr because mfmsr is a privileged instruction. > > The solution here is to create a cpu attribute: > > /sys/devices/system/cpu/svm > > which will read 0 or 1 based on

Re: [PATCH v3 08/16] powerpc/pseries/svm: Use shared memory for LPPACA structures

2019-08-12 Thread Michael Ellerman
Thiago Jung Bauermann writes: > From: Anshuman Khandual > > LPPACA structures need to be shared with the host. Hence they need to be in > shared memory. Instead of allocating individual chunks of memory for a > given structure from memblock, a contiguous chunk of memory is allocated > and then co

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.3-4 tag

2019-08-10 Thread Michael Ellerman
[ expanded Cc ] Linus Torvalds writes: > On Sat, Aug 10, 2019 at 3:11 AM Michael Ellerman wrote: >> >> Just one fix, a revert of a commit that was meant to be a minor improvement >> to >> some inline asm, but ended up having no real benefit with GCC and broke &g

Re: [PATCH 1/1] pseries/hotplug-memory.c: Replace nested ifs by switch-case

2019-08-10 Thread Michael Ellerman
On Thu, 2019-08-01 at 22:52:51 UTC, Leonardo Bras wrote: > I noticed these nested ifs can be easily replaced by switch-cases, > which can improve readability. > > Signed-off-by: Leonardo Bras > Reviewed-by: David Hildenbrand Series applied to powerpc next, thanks. https://git.kernel.org/powerp

Re: [PATCH 1/2] powerpc/xive: Use GFP_KERNEL instead of GFP_ATOMIC in 'xive_irq_bitmap_add()'

2019-08-10 Thread Michael Ellerman
On Thu, 2019-08-01 at 08:32:31 UTC, Christophe JAILLET wrote: > There is no need to use GFP_ATOMIC here. GFP_KERNEL should be enough. > GFP_KERNEL is also already used for another allocation just a few lines > below. > > Signed-off-by: Christophe JAILLET > Reviewed-by: Cédric Le Goater > Review

Re: [PATCH v2] powerpc/32: activate ARCH_HAS_PMEM_API and ARCH_HAS_UACCESS_FLUSHCACHE

2019-08-10 Thread Michael Ellerman
On Wed, 2019-07-31 at 06:31:41 UTC, Christophe Leroy wrote: > PPC32 also have flush_dcache_range() so it can also support > ARCH_HAS_PMEM_API and ARCH_HAS_UACCESS_FLUSHCACHE without changes. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/46

Re: [PATCH v2] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-08-10 Thread Michael Ellerman
On Mon, 2019-06-03 at 22:11:58 UTC, Nathan Chancellor wrote: > When building with -Wsometimes-uninitialized, clang warns: > > drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is > used uninitialized whenever 'for' loop exits because its condition is > false [-Wsometimes-uninitia

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

2019-08-10 Thread Michael Ellerman
Chancellor, Nick Desaulniers, Segher Boessenkool. - ------ Michael Ellerman (1): Revert "powerpc: slightly improve cache helpers" arch/powerpc/include/asm/cache.h | 8 1 file changed, 4 insertions(+), 4 deletio

Re: [PATCH v8 7/7] powerpc: add machine check safe copy_to_user

2019-08-10 Thread Michael Ellerman
Santosh Sivaraj writes: > Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe() > > Signed-off-by: Santosh Sivaraj > --- > arch/powerpc/Kconfig | 1 + > arch/powerpc/include/asm/uaccess.h | 14 ++ > 2 files changed, 15 insertions(+) > > diff --git a/arch/

Re: [PATCH v3] Revert "powerpc: slightly improve cache helpers"

2019-08-10 Thread Michael Ellerman
Nick Desaulniers writes: > This reverts commit 6c5875843b87c3adea2beade9d1b8b3d4523900a. > > Work around Clang bug preventing ppc32 from booting. > > Link: https://bugs.llvm.org/show_bug.cgi?id=42762 > Link: https://github.com/ClangBuiltLinux/linux/issues/593 > Debugged-by: Nathan Chancellor > Re

Re: [PATCH] powerpc/mm: Use refcount_t for refcount

2019-08-09 Thread Michael Ellerman
Chuhong Yuan writes: > Reference counters are preferred to use refcount_t instead of > atomic_t. > This is because the implementation of refcount_t can prevent > overflows and detect possible use-after-free. > So convert atomic_t ref counters to refcount_t. > > Signed-off-by: Chuhong Yuan Thanks

powerpc flush_inval_dcache_range() was buggy until v5.3-rc1 (was Re: [PATCH 4/4] powerpc/64: reuse PPC32 static inline flush_dcache_range())

2019-08-07 Thread Michael Ellerman
[ deliberately broke threading so this doesn't get buried ] Christophe Leroy writes: > diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S > index a4fd536efb44..1b0a42c50ef1 100644 > --- a/arch/powerpc/kernel/misc_64.S > +++ b/arch/powerpc/kernel/misc_64.S > @@ -115,35 +115

Re: linux-next: Tree for Aug 7

2019-08-07 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > Changes since 20190806: > > The arm64 tree introduced a patch that stopped the powerpc ppc64_defconfig > build from completing so I reverted that commit. > > The mips tree gained a conflict against Linus' tree. > > The crypto tree still had its build failure

Re: [PATCH v5 01/10] powerpc: unify definition of M_IF_NEEDED

2019-08-07 Thread Michael Ellerman
Jason Yan writes: > M_IF_NEEDED is defined too many times. Move it to a common place. The name is not great, can you call it MAS2_M_IF_NEEDED, which at least gives a clue what it's for? cheers > Signed-off-by: Jason Yan > Cc: Diana Craciun > Cc: Michael Ellerman > Cc: Ch

Re: [PATCH v5 00/10] implement KASLR for powerpc/fsl_booke/32

2019-08-07 Thread Michael Ellerman
Hi Jason, Jason Yan writes: > This series implements KASLR for powerpc/fsl_booke/32, as a security > feature that deters exploit attempts relying on knowledge of the location > of kernel internals. Thanks for doing this work. Sorry I didn't get a chance to look at this until v5, I sent a few co

Re: [PATCH v5 09/10] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter

2019-08-07 Thread Michael Ellerman
Jason Yan writes: > diff --git a/arch/powerpc/kernel/kaslr_booke.c > b/arch/powerpc/kernel/kaslr_booke.c > index c6b326424b54..436f9a03f385 100644 > --- a/arch/powerpc/kernel/kaslr_booke.c > +++ b/arch/powerpc/kernel/kaslr_booke.c > @@ -361,6 +361,18 @@ static unsigned long __init kaslr_choose_lo

Re: [PATCH v5 06/10] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-08-07 Thread Michael Ellerman
Jason Yan writes: > This patch add support to boot kernel from places other than KERNELBASE. > Since CONFIG_RELOCATABLE has already supported, what we need to do is > map or copy kernel to a proper place and relocate. Freescale Book-E > parts expect lowmem to be mapped by fixed TLB entries(TLB1).

Re: [PATCH v5 10/10] powerpc/fsl_booke/kaslr: dump out kernel offset information on panic

2019-08-07 Thread Michael Ellerman
Jason Yan writes: > When kaslr is enabled, the kernel offset is different for every boot. > This brings some difficult to debug the kernel. Dump out the kernel > offset when panic so that we can easily debug the kernel. Some of this is taken from the arm64 version right? Please say so when you co

Re: [PATCH v5 07/10] powerpc/fsl_booke/32: randomize the kernel image offset

2019-08-07 Thread Michael Ellerman
Jason Yan writes: > After we have the basic support of relocate the kernel in some > appropriate place, we can start to randomize the offset now. > > Entropy is derived from the banner and timer, which will change every > build and boot. This not so much safe so additionally the bootloader may > p

Re: [PATCH v5 03/10] powerpc: introduce kimage_vaddr to store the kernel base

2019-08-07 Thread Michael Ellerman
Jason Yan writes: > Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we > need a variable to store the kernel base. > > Signed-off-by: Jason Yan > Cc: Diana Craciun > Cc: Michael Ellerman > Cc: Christophe Leroy > Cc: Benjamin Herrenschmidt &g

Re: [PATCH v5 02/10] powerpc: move memstart_addr and kernstart_addr to init-common.c

2019-08-07 Thread Michael Ellerman
Jason Yan writes: > These two variables are both defined in init_32.c and init_64.c. Move > them to init-common.c. > > Signed-off-by: Jason Yan > Cc: Diana Craciun > Cc: Michael Ellerman > Cc: Christophe Leroy > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras

Re: SMP lockup at boot on Freescale/NXP T2080 (powerpc 64)

2019-08-06 Thread Michael Ellerman
Chris Packham writes: > On Tue, 2019-08-06 at 21:32 +1000, Michael Ellerman wrote: >> Chris Packham writes: >> > On Mon, 2019-08-05 at 14:06 +1200, Chris Packham wrote: >> > > >> > > Hi All, >> > > >> > > I have a custom boa

Re: SMP lockup at boot on Freescale/NXP T2080 (powerpc 64)

2019-08-06 Thread Michael Ellerman
Chris Packham writes: > On Mon, 2019-08-05 at 14:06 +1200, Chris Packham wrote: >> Hi All, >> >> I have a custom board that uses the Freescale/NXP T2080 SoC. >> >> The board boots fine using v4.19.60 but when I use v5.1.21 it locks >> up >> waiting for the other CPUs to come online (earlyprintk

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.3-3 tag

2019-08-05 Thread Michael Ellerman
Linus Torvalds writes: > On Sun, Aug 4, 2019 at 4:49 AM Michael Ellerman wrote: >> >> Please pull some more powerpc fixes for 5.3: > > Hmm. This was caught by the gmail spam-filter for some reason. I don't > see anything particularly different from your normal pul

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

2019-08-04 Thread Michael Ellerman
nline Christophe Leroy (1): powerpc/kasan: fix early boot failure on PPC32 Michael Ellerman (2): powerpc: Wire up clone3 syscall powerpc/spe: Mark expected switch fall-throughs Santosh Sivaraj (1): powerpc/kvm: Fall through switch case explicitly Stephen Rothwell (1): dr

Re: [PATCH 1/1] pseries/hotplug-memory.c: Replace nested ifs by switch-case

2019-08-02 Thread Michael Ellerman
Leonardo Bras writes: > I noticed these nested ifs can be easily replaced by switch-cases, > which can improve readability. > > Signed-off-by: Leonardo Bras > --- > .../platforms/pseries/hotplug-memory.c| 26 +-- > 1 file changed, 18 insertions(+), 8 deletions(-) Thanks,

Re: [PATCH v2] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-08-02 Thread Michael Ellerman
Bjorn Helgaas writes: > On Mon, Jul 22, 2019 at 02:05:12PM +1000, Michael Ellerman wrote: >> Nathan Chancellor writes: >> > On Mon, Jun 03, 2019 at 03:11:58PM -0700, Nathan Chancellor wrote: >> >> When building with -Wsometimes-uninitialized, clang warns: &g

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-08-02 Thread Michael Ellerman
Chuhong Yuan writes: > Chuhong Yuan 于2019年7月30日周二 下午2:39写道: >> Kees Cook 于2019年7月30日周二 下午12:26写道: >> > On Mon, Jul 29, 2019 at 11:13:46PM +0800, Chuhong Yuan wrote: >> > > strncmp(str, const, len) is error-prone. >> > > We had better use newly introduced >> > > str_has_prefix() instead of it. >>

Re: [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static

2019-08-02 Thread Michael Ellerman
Johannes Berg writes: >> Luca, you said this was already fixed in your internal tree, and the fix >> would appear soon in next, but I don't see anything in linux-next? > > Luca is still on vacation, but I just sent out a version of the patch we > had applied internally. Awesome, thanks. cheers

Re: [PATCH] drivers/macintosh/smu.c: Mark expected switch fall-through

2019-08-01 Thread Michael Ellerman
On Tue, 2019-07-30 at 04:37:04 UTC, Stephen Rothwell wrote: > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warning (Building: powerpc): > > drivers/macintosh/smu.c: In function 'smu_queue_i2c': > drivers/macintosh/smu.c:854:21: warning: this stateme

Re: [PATCH] powerpc/kasan: fix early boot failure on PPC32

2019-08-01 Thread Michael Ellerman
On Wed, 2019-07-31 at 06:01:42 UTC, Christophe Leroy wrote: > Due to commit 4a6d8cf90017 ("powerpc/mm: don't use pte_alloc_kernel() > until slab is available on PPC32"), pte_alloc_kernel() cannot be used > during early KASAN init. > > Fix it by using memblock_alloc() instead. > > Reported-by: Erh

Re: Build regressions/improvements in v5.3-rc2

2019-07-31 Thread Michael Ellerman
Geert Uytterhoeven writes: > Below is the list of build error/warning regressions/improvements in > v5.3-rc2[1] compared to v5.2[2]. > > Summarized: > - build errors: +10/-1 > - build warnings: +136/-133 > > JFYI, when comparing v5.3-rc2[1] to v5.3-rc1[3], the summaries are: > - build errors

Re: [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static

2019-07-31 Thread Michael Ellerman
Nick Desaulniers writes: > Commit r353569 in prerelease Clang-9 is producing a linkage failure: > > ld: drivers/net/wireless/intel/iwlwifi/fw/dbg.o: > in function `_iwl_fw_dbg_apply_point': > dbg.c:(.text+0x827a): undefined reference to `__compiletime_assert_2387' This breakage is also seen in ol

Re: [PATCH 107/107] perf vendor events power9: Added missing event descriptions

2019-07-31 Thread Michael Ellerman
alli > Cc: Carl Love > Cc: Michael Ellerman > Cc: Naveen N. Rao > Cc: Paul Clarke > Cc: Sukadev Bhattiprolu > Cc: linuxppc-...@ozlabs.org > LPU-Reference: 20190719100837.7503-1-mpet...@redhat.com > Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Michael Ellerman cheers

Re: [PATCH] drivers/macintosh/smu.c: Mark expected switch fall-through

2019-07-31 Thread Michael Ellerman
Kees Cook writes: > On Wed, Jul 31, 2019 at 12:28:55AM +1000, Michael Ellerman wrote: >> Stephen Rothwell writes: >> > Mark switch cases where we are expecting to fall through. >> > >> > This patch fixes the following warning (Building: powerpc): >> &

Re: [PATCH v2] powerpc: Wire up clone3 syscall

2019-07-30 Thread Michael Ellerman
On Wed, 2019-07-24 at 14:02:59 UTC, Michael Ellerman wrote: > Wire up the new clone3 syscall added in commit 7f192e3cd316 ("fork: > add clone3"). > > This requires a ppc_clone3 wrapper, in order to save the non-volatile > GPRs before calling into the generic syscall cod

Re: [PATCH] drivers/macintosh/smu.c: Mark expected switch fall-through

2019-07-30 Thread Michael Ellerman
Stephen Rothwell writes: > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warning (Building: powerpc): > > drivers/macintosh/smu.c: In function 'smu_queue_i2c': > drivers/macintosh/smu.c:854:21: warning: this statement may fall through > [-Wimplicit-f

Re: [PATCH] powerpc: workaround clang codegen bug in dcbz

2019-07-30 Thread Michael Ellerman
Arnd Bergmann writes: > On Mon, Jul 29, 2019 at 11:52 PM Segher Boessenkool > wrote: >> On Mon, Jul 29, 2019 at 01:32:46PM -0700, Nathan Chancellor wrote: >> > For the record: >> > >> > https://godbolt.org/z/z57VU7 >> > >> > This seems consistent with what Michael found so I don't think a revert

Re: [PATCH] powerpc: Wire up clone3 syscall

2019-07-24 Thread Michael Ellerman
Christian Brauner writes: > On Mon, Jul 22, 2019 at 11:22:31PM +1000, Michael Ellerman wrote: >> Wire up the new clone3 syscall added in commit 7f192e3cd316 ("fork: >> add clone3"). >> >> This requires a ppc_clone3 wrapper, in order to save the non-vol

[PATCH v2] powerpc: Wire up clone3 syscall

2019-07-24 Thread Michael Ellerman
sted using Christian's test code on a Power8 LE VM. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/unistd.h| 1 + arch/powerpc/kernel/entry_32.S | 8 arch/powerpc/kernel/entry_64.S | 5 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + 4 fi

Re: [PATCH] powerpc: Wire up clone3 syscall

2019-07-24 Thread Michael Ellerman
Christian Brauner writes: > On Wed, Jul 24, 2019 at 12:25:14PM +0700, Arseny Solokha wrote: >> Hi, >> >> may I also ask to provide ppc_clone3 symbol also for 32-bit powerpc? >> Otherwise >> Michael's patch breaks build for me: > > Makes sense. Michael, are you planning on picking this up? :) Ye

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

2019-07-24 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Linus, Please pull some powerpc fixes for 5.3: The following changes since commit 192f0f8e9db7efe4ac98d47f5fa4334e43c1204d: Merge tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux (2019-07-13 16:08:36 -0700)

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-22 Thread Michael Ellerman
Segher Boessenkool writes: > On Mon, Jul 22, 2019 at 08:15:14PM +1000, Michael Ellerman wrote: >> Segher Boessenkool writes: >> > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: >> >> 017c clear_user_page: >> >> 17c: 94

[PATCH] powerpc: Wire up clone3 syscall

2019-07-22 Thread Michael Ellerman
sted using Christian's test code on a Power8 LE VM. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/unistd.h| 1 + arch/powerpc/kernel/entry_64.S | 5 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + 3 files changed, 7 insertions(+) diff --git a/arch/powe

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-22 Thread Michael Ellerman
Segher Boessenkool writes: > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: >> I have attached the disassembly of arch/powerpc/kernel/mem.o with >> clear_page (working) and broken_clear_page (broken), along with the side >> by side diff. My assembly knowledge is fairly limited

Re: [PATCH v2] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-07-21 Thread Michael Ellerman
Nathan Chancellor writes: > On Mon, Jun 03, 2019 at 03:11:58PM -0700, Nathan Chancellor wrote: >> When building with -Wsometimes-uninitialized, clang warns: >> >> drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is >> used uninitialized whenever 'for' loop exits because its con

Re: [PATCH] powerpc/xive: Fix loop exit-condition in xive_find_target_in_mask()

2019-07-21 Thread Michael Ellerman
On Wed, 2019-07-17 at 10:35:24 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > xive_find_target_in_mask() has the following for(;;) loop which has a > bug when @first == cpumask_first(@mask) and condition 1 fails to hold > for every CPU in @mask. In this case we loop forever in th

Re: [PATCH 1/2] arch: mark syscall number 435 reserved for clone3

2019-07-19 Thread Michael Ellerman
Christian Brauner writes: > On Mon, Jul 15, 2019 at 03:56:04PM +0200, Christian Borntraeger wrote: >> I think Vasily already has a clone3 patch for s390x with 435. > > A quick follow-up on this. Helge and Michael have asked whether there > are any tests for clone3. Yes, there will be and I try to

Re: [PATCH] powerpc: remove meaningless KBUILD_ARFLAGS addition

2019-07-18 Thread Michael Ellerman
Segher Boessenkool writes: > On Thu, Jul 18, 2019 at 11:19:58AM +0900, Masahiro Yamada wrote: >> On Thu, Jul 18, 2019 at 1:46 AM Segher Boessenkool >> wrote: >> Kbuild always uses thin archives as far as vmlinux is concerned. >> >> But, there are some other call-sites. >> >> masahiro@pug:~/ref/

Re: [PATCH] powerpc: remove meaningless KBUILD_ARFLAGS addition

2019-07-16 Thread Michael Ellerman
Segher Boessenkool writes: > On Mon, Jul 15, 2019 at 05:05:34PM +1000, Michael Ellerman wrote: >> Segher Boessenkool writes: >> > Yes, that is why I used the environment variable, all binutils work >> > with that. There was no --target option in GNU ar before 2.22.

Re: [PATCH] powerpc: remove meaningless KBUILD_ARFLAGS addition

2019-07-15 Thread Michael Ellerman
Segher Boessenkool writes: > On Sun, Jul 14, 2019 at 07:45:15AM +0900, Masahiro Yamada wrote: >> On Sat, Jul 13, 2019 at 10:17 PM Segher Boessenkool >> wrote: >> > On Sat, Jul 13, 2019 at 07:47:44AM -0500, Segher Boessenkool wrote: >> > > On Sat, Jul 13, 2019 at 12:21:06PM +0900, Masahiro Yamada

Re: [PATCH 2/4] powerpc/32: activate ARCH_HAS_PMEM_API and ARCH_HAS_UACCESS_FLUSHCACHE

2019-07-14 Thread Michael Ellerman
Christophe Leroy writes: > PPC32 also have flush_dcache_range() so it can also support > ARCH_HAS_PMEM_API and ARCH_HAS_UACCESS_FLUSHCACHE without changes. > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/Kconfig | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH v3] powerpc/setup_64: fix -Wempty-body warnings

2019-07-14 Thread Michael Ellerman
Qian Cai writes: > At the beginning of setup_64.c, it has, > > #ifdef DEBUG > #define DBG(fmt...) udbg_printf(fmt) > #else > #define DBG(fmt...) > #endif > > where DBG() could be compiled away, and generate warnings, > > arch/powerpc/kernel/setup_64.c: In function 'initialize_cache_info'

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

2019-07-12 Thread Michael Ellerman
owerpc: Remove variable ‘path’ since not used powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool Michael Ellerman (5): Merge tag 'powerpc-5.2-6' into fixes Merge branch 'fixes' into next powerpc/64s/exception: Remove unused SOFTEN_VALUE_0x

Re: [PATCH v3 3/3] powerpc/module64: Use symbolic instructions names.

2019-07-12 Thread Michael Ellerman
Christophe Leroy writes: > Le 08/07/2019 à 02:56, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> To increase readability/maintainability, replace hard coded >>> instructions values by symbolic names. >>> >>> Signed-off-by: Christophe L

Re: [PATCH v3 1/2] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-10 Thread Michael Ellerman
On Fri, 2019-07-05 at 10:01:43 UTC, Masahiro Yamada wrote: > The next commit will make the way of passing CONFIG options more robust. > Unfortunately, it would uncover another hidden issue; without this > commit, skiroot_defconfig would be broken like this: > > | WRAParch/powerpc/boot/zImage

Re: [PATCH v3] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-08 Thread Michael Ellerman
Wen Yang writes: > The cpu variable is still being used in the of_get_property() call > after the of_node_put() call, which may result in use-after-free. > > Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak") > Signed-off-by: Wen Yang > Cc: "Rafael J. Wysocki" > Cc: Vires

Re: [PATCH v2] powerpc/mm: mark more tlb functions as __always_inline

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-21 at 13:13:24 UTC, Masahiro Yamada wrote: > With CONFIG_OPTIMIZE_INLINING enabled, Laura Abbott reported error > with gcc 9.1.1: > > arch/powerpc/mm/book3s64/radix_tlb.c: In function '_tlbiel_pid': > arch/powerpc/mm/book3s64/radix_tlb.c:104:2: warning: asm operand 3 probably

Re: [PATCH 1/4] powerpc/64: flush_inval_dcache_range() becomes flush_dcache_range()

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-14 at 09:05:13 UTC, Christophe Leroy wrote: > On most arches having function flush_dcache_range(), including PPC32, > this function does a writeback and invalidation of the cache bloc. > > On PPC64, flush_dcache_range() only does a writeback while > flush_inval_dcache_range() does

Re: [PATCH] selftests/powerpc: Add missing newline at end of file

2019-07-07 Thread Michael Ellerman
On Mon, 2019-06-17 at 14:52:04 UTC, Geert Uytterhoeven wrote: > "git diff" says: > > \ No newline at end of file > > after modifying the file. > > Signed-off-by: Geert Uytterhoeven Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/7b570361f6f66c91443541b19121038c076e7d64

Re: [PATCH v3 3/5] powerpc: Use the correct style for SPDX License Identifier

2019-07-07 Thread Michael Ellerman
On Tue, 2019-04-16 at 15:28:57 UTC, Nishad Kamdar wrote: > This patch corrects the SPDX License Identifier style > in the powerpc Hardware Architecture related files. > > Suggested-by: Joe Perches > Signed-off-by: Nishad Kamdar > Acked-by: Andrew Donnellan Applied to powerpc next, thanks. htt

Re: [PATCH v3 01/10] powerpc/8xx: move CPM1 related files from sysdev/ to platforms/8xx

2019-07-07 Thread Michael Ellerman
On Fri, 2019-06-14 at 06:41:38 UTC, Christophe Leroy wrote: > Only 8xx selects CPM1 and related CONFIG options are already > in platforms/8xx/Kconfig > > Move the related C files to platforms/8xx/. > > Signed-off-by: Christophe Leroy Series applied to powerpc next, thanks. https://git.kernel.o

Re: [PATCH] powerpc/cell: set no_llseek in spufs_cntl_fops

2019-07-07 Thread Michael Ellerman
On Sat, 2017-05-06 at 15:37:20 UTC, Geliang Tang wrote: > In spufs_cntl_fops, since we use nonseekable_open() to open, we > should use no_llseek() to seek, not generic_file_llseek(). > > Signed-off-by: Geliang Tang Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/658829dfe75c49

Re: [PATCH v3 1/3] powerpc/boot: don't force gzipped uImage

2019-07-07 Thread Michael Ellerman
On Fri, 2019-06-14 at 10:16:23 UTC, Christophe Leroy wrote: > This patch modifies the generation of uImage by handing over > the selected compression type instead of forcing gzip > > Signed-off-by: Christophe Leroy Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/fbded57

Re: [PATCH] powerpc/perf/24x7: use rb_entry

2019-07-07 Thread Michael Ellerman
On Tue, 2016-12-20 at 14:02:17 UTC, Geliang Tang wrote: > To make the code clearer, use rb_entry() instead of container_of() to > deal with rbtree. > > Signed-off-by: Geliang Tang Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/c197922f0a8072d286dff8001f8ad0d4b95ec1dd cheers

Re: [PATCH] powerpc/configs: Remove useless UEVENT_HELPER_PATH

2019-07-07 Thread Michael Ellerman
On Tue, 2019-06-04 at 08:00:33 UTC, Krzysztof Kozlowski wrote: > Remove the CONFIG_UEVENT_HELPER_PATH because: > 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable >CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was >made default to 'n', > 2. It is not

Re: [PATCH v3 1/3] powerpc: Move PPC_HA() PPC_HI() and PPC_LO() to ppc-opcode.h

2019-07-07 Thread Michael Ellerman
On Fri, 2019-05-03 at 06:40:15 UTC, Christophe Leroy wrote: > PPC_HA() PPC_HI() and PPC_LO() macros are nice macros. Move them > from module64.c to ppc-opcode.h in order to use them in other places. > > Signed-off-by: Christophe Leroy Series applied to powerpc next, thanks. https://git.kernel.o

Re: [PATCH 3/4] powerpc/32: define helpers to get L1 cache sizes.

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-14 at 09:05:15 UTC, Christophe Leroy wrote: > This patch defines C helpers to retrieve the size of > cache blocks and uses them in the cacheflush functions. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/d98fc70fc139b72ae098

Re: [PATCH] arch: powerpc: Kconfig: pedantic formatting

2019-07-07 Thread Michael Ellerman
On Wed, 2019-07-03 at 16:04:13 UTC, "Enrico Weigelt, metux IT consult" wrote: > Formatting of Kconfig files doesn't look so pretty, so let the > Great White Handkerchief come around and clean it up. > > Also convert "---help---" as requested on lkml. > > Signed-off-by: Enrico Weigelt, metux IT co

Re: [PATCH 4/4] powerpc/64: reuse PPC32 static inline flush_dcache_range()

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-14 at 09:05:16 UTC, Christophe Leroy wrote: > This patch drops the assembly PPC64 version of flush_dcache_range() > and re-uses the PPC32 static inline version. > > With GCC 8.1, the following code is generated: > > void flush_test(unsigned long start, unsigned long stop) > { >

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-07 Thread Michael Ellerman
On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > Cache instructions (dcbz, dcbi, dcbf and dcbst) take two registers > that are summed to obtain the target address. Using 'Z' constraint > and '%y0' argument gives GCC the opportunity to use both registers > instead of only one with the s

Re: [PATCH v3 3/3] powerpc/module64: Use symbolic instructions names.

2019-07-07 Thread Michael Ellerman
Christophe Leroy writes: > To increase readability/maintainability, replace hard coded > instructions values by symbolic names. > > Signed-off-by: Christophe Leroy > --- > v3: fixed warning by adding () in an 'if' around X | Y (unlike said in v2 > history, this change was forgotten in v2) > v2:

Re: [RFC PATCH] Replaces long number representation by BIT() macro

2019-07-07 Thread Michael Ellerman
Segher Boessenkool writes: > On Tue, Jul 02, 2019 at 11:16:35AM -0500, Segher Boessenkool wrote: >> On Wed, Jul 03, 2019 at 01:19:34AM +1000, Michael Ellerman wrote: >> > What we could do is switch to the `UL` macro from include/linux/const.h, >> > rather than using ou

Re: [PATCH v2] powerpc/boot: pass CONFIG options in a simpler and more robust way

2019-07-03 Thread Michael Ellerman
Masahiro Yamada writes: > Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") > was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix build failures > with -j 1") was also wrong. > > The correct dependency is: > > $(obj)/serial.o: $(obj)/autoconf.h > > However, I do not see

Re: [PATCH] powerpc/eeh_cache: fix a W=1 kernel-doc warning

2019-07-03 Thread Michael Ellerman
On Wed, 2019-06-05 at 20:46:19 UTC, Qian Cai wrote: > The opening comment mark "/**" is reserved for kernel-doc comments, so > it will generate a warning with "make W=1". > > arch/powerpc/kernel/eeh_cache.c:37: warning: cannot understand function > prototype: 'struct pci_io_addr_range > > Since t

Re: [PATCH 1/4] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-03 Thread Michael Ellerman
On Tue, 2019-06-25 at 14:52:36 UTC, Christoph Hellwig wrote: > This function has never been used anywhere in the kernel tree since it > was added to the tree. We also now have proper PCIe P2P APIs in the core > kernel, and any new P2P support should be using those. > > Signed-off-by: Christoph He

Re: [PATCH] powerpc/cacheflush: fix variable set but not used

2019-07-03 Thread Michael Ellerman
On Thu, 2019-06-06 at 13:58:13 UTC, Qian Cai wrote: > The powerpc's flush_cache_vmap() is defined as a macro and never use > both of its arguments, so it will generate a compilation warning, > > lib/ioremap.c: In function 'ioremap_page_range': > lib/ioremap.c:203:16: warning: variable 'start' set

Re: [PATCH] recordmcount: Fix spurious mcount entries on powerpc

2019-07-03 Thread Michael Ellerman
On Wed, 2019-06-26 at 18:38:01 UTC, "Naveen N. Rao" wrote: > The recent change enabling HAVE_C_RECORDMCOUNT on powerpc started > showing the following issue: > > # modprobe kprobe_example >ftrace-powerpc: Not expected bl: opcode is 3c4c0001 >WARNING: CPU: 0 PID: 227 at kernel/trace/ftrac

Re: [PATCH] powerpc/ftrace: Enable C Version of recordmcount

2019-07-03 Thread Michael Ellerman
On Tue, 2019-05-07 at 13:31:38 UTC, Christophe Leroy wrote: > Selects HAVE_C_RECORDMCOUNT to use the C version of the recordmcount > intead of the old Perl Version of recordmcount. > > This should improve build time. It also seems like the old Perl Version > misses some calls to _mcount that the C

Re: [RFC PATCH] Replaces long number representation by BIT() macro

2019-07-02 Thread Michael Ellerman
Hi Leonardo, Leonardo Bras writes: > The main reason of this change is to make these bitmasks more readable. > > The macro ASM_CONST() just appends an UL to it's parameter, so it can be > easily replaced by BIT_MASK, that already uses a UL representation. > > ASM_CONST() in this file may behave d

Re: [PATCH v2] powerpc/32s: fix suspend/resume when IBATs 4-7 are used

2019-06-30 Thread Michael Ellerman
On Mon, 2019-06-17 at 21:42:14 UTC, Christophe Leroy wrote: > Previously, only IBAT1 and IBAT2 were used to map kernel linear mem. > Since commit 63b2bc619565 ("powerpc/mm/32s: Use BATs for > STRICT_KERNEL_RWX"), we may have all 8 BATs used for mapping > kernel text. But the suspend/restore functio

Re: [PATCH v2] Powerpc/Watchpoint: Restore nvgprs while returning from exception

2019-06-30 Thread Michael Ellerman
On Thu, 2019-06-13 at 03:30:14 UTC, Ravi Bangoria wrote: > Powerpc hw triggers watchpoint before executing the instruction. To > make trigger-after-execute behavior, kernel emulates the instruction. > If the instruction is 'load something into non-volatile register', > exception handler should rest

Re: [PATCH] powerpc/mm/32s: fix condition that is always true

2019-06-30 Thread Michael Ellerman
On Mon, 2019-06-17 at 21:22:20 UTC, Andreas Schwab wrote: > Move a misplaced paren that makes the condition always true. > > Fixes: 63b2bc619565 ("powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX") > Signed-off-by: Andreas Schwab > Reviewed-by: Christophe Leroy Applied to powerpc next, thanks. h

Re: [PATCH] ps3: Use [] to denote a flexible array member

2019-06-30 Thread Michael Ellerman
On Mon, 2019-06-17 at 09:07:13 UTC, Geert Uytterhoeven wrote: > Flexible array members should be denoted using [] instead of [0], else > gcc will not warn when they are no longer at the end of the structure. > > Signed-off-by: Geert Uytterhoeven Applied to powerpc next, thanks. https://git.kern

<    4   5   6   7   8   9   10   11   12   13   >