[PATCH] watchdog: mpc8xxx: provide boot status

2018-09-13 Thread Christophe Leroy
mpc8xxx watchdog driver supports the following platforms: - mpc8xx - mpc83xx - mpc86xx Those three platforms have a 32 bits register which provides the reason of the last boot, including whether it was caused by the watchdog. mpc8xx: Register RSR, bit SWRS (bit 3) mpc83xx: Register RSR, bit SWRS

Re: MPC83xx reset status register (RSR, offset 0x910)

2018-09-13 Thread Christophe LEROY
Le 11/09/2018 à 00:17, Radu Rendec a écrit : Hi, On Mon, 2018-09-10 at 07:37 +0200, Christophe Leroy wrote: Le 10/09/2018 à 01:13, Radu Rendec a écrit : I'm using U-boot as well, but it's just not configured to read or clear the RSR. I'm curious: if U-boot reads/clears the RSR in your case

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-13 Thread Benjamin Herrenschmidt
On Wed, 2018-09-12 at 11:58 -0500, Bjorn Helgaas wrote: > > Add the generic PCI core error recovery files to the powerpc EEH > > MAINTAINERS entry so the powerpc folks will be copied on changes to the > > generic PCI error handling strategy. > > I really want to make sure the powerpc folks are plu

Re: [PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-13 Thread Felipe Balbi
Arnd Bergmann writes: > A handful of drivers all have a trivial wrapper around their ioctl > handler, but don't call the compat_ptr() conversion function at the > moment. In practice this does not matter, since none of them are used > on the s390 architecture and for all other architectures, comp

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-13 Thread Oliver
On Thu, Sep 13, 2018 at 6:35 PM, Benjamin Herrenschmidt wrote: > On Wed, 2018-09-12 at 11:58 -0500, Bjorn Helgaas wrote: >> > Add the generic PCI core error recovery files to the powerpc EEH >> > MAINTAINERS entry so the powerpc folks will be copied on changes to the >> > generic PCI error handlin

Re: [PATCH 0/2] sriov enablement on s390

2018-09-13 Thread Sebastian Ott
On Wed, 12 Sep 2018, Bjorn Helgaas wrote: > [+cc Arnd, powerpc folks] > > On Wed, Sep 12, 2018 at 02:34:09PM +0200, Sebastian Ott wrote: > > Hello Bjorn, > > > > On s390 we currently handle SRIOV within firmware. Which means > > that the PF is under firmware control and not visible to operating >

[PATCH 1/2] pci: provide add_vfs/del_vfs callbacks

2018-09-13 Thread Sebastian Ott
Provide callbacks that can be used by PCI host bridge implementations to override the behavior of the generic vf detection and device creation code. Signed-off-by: Sebastian Ott --- drivers/pci/iov.c | 51 +++ include/linux/pci.h | 2 ++ 2 files

[PATCH 2/2] s390/pci: handle function enumeration after sriov enablement

2018-09-13 Thread Sebastian Ott
Implement add_vfs|del_vfs callbacks as empty functions. VF creation will be triggered by the hotplug code. Signed-off-by: Sebastian Ott --- arch/s390/pci/pci.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 9381d5d98156..2ba2cbfaa

Re: [PATCH v2 02/24] drivers/video/fbdev: use ioremap_wc/wt() instead of __ioremap()

2018-09-13 Thread Daniel Vetter
On Wed, Sep 12, 2018 at 03:58:17PM +, Christophe Leroy wrote: > _PAGE_NO_CACHE is a platform specific flag. In addition, this flag > is misleading because one would think it requests a noncached page > whereas a noncached page is _PAGE_NO_CACHE | _PAGE_GUARDED > > _PAGE_NO_CACHE alone means wr

[PATCH 4.14 074/115] powerpc/platforms/85xx: fix t1042rdb_diu.c build errors & warning

2018-09-13 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Randy Dunlap [ Upstream commit f5daf77a55ef0e695cc90c440ed6503073ac5e07 ] Fix build errors and warnings in t1042rdb_diu.c by adding header files and MODULE_LICENSE(). ../arch/powerpc/platform

[PATCH 4.18 124/197] powerpc/platforms/85xx: fix t1042rdb_diu.c build errors & warning

2018-09-13 Thread Greg Kroah-Hartman
4.18-stable review patch. If anyone has any objections, please let me know. -- From: Randy Dunlap [ Upstream commit f5daf77a55ef0e695cc90c440ed6503073ac5e07 ] Fix build errors and warnings in t1042rdb_diu.c by adding header files and MODULE_LICENSE(). ../arch/powerpc/platform

Re: [PATCH v3 6/9] kbuild: consolidate Devicetree dtb build rules

2018-09-13 Thread Geert Uytterhoeven
Hi Yamada-san, On Wed, Sep 12, 2018 at 3:02 AM Masahiro Yamada wrote: > 2018-09-12 0:40 GMT+09:00 Rob Herring : > > On Mon, Sep 10, 2018 at 10:04 AM Rob Herring wrote: > >> There is nothing arch specific about building dtb files other than their > >> location under /arch/*/boot/dts/. Keeping eac

Re: [PATCH v2 02/24] drivers/video/fbdev: use ioremap_wc/wt() instead of __ioremap()

2018-09-13 Thread Bartlomiej Zolnierkiewicz
On 09/12/2018 05:58 PM, Christophe Leroy wrote: > _PAGE_NO_CACHE is a platform specific flag. In addition, this flag > is misleading because one would think it requests a noncached page > whereas a noncached page is _PAGE_NO_CACHE | _PAGE_GUARDED > > _PAGE_NO_CACHE alone means write combined non

Re: [PATCH] watchdog: mpc8xxx: provide boot status

2018-09-13 Thread Guenter Roeck
On Thu, Sep 13, 2018 at 08:07:21AM +, Christophe Leroy wrote: > mpc8xxx watchdog driver supports the following platforms: > - mpc8xx > - mpc83xx > - mpc86xx > > Those three platforms have a 32 bits register which provides the > reason of the last boot, including whether it was caused by the >

[PATCH 1/3] libfdt: Ensure INT_MAX is defined in libfdt_env.h

2018-09-13 Thread Rob Herring
The next update of libfdt has a new dependency on INT_MAX. Update the instances of libfdt_env.h in the kernel to either include the necessary header with the definition or define it locally. Cc: Russell King Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-arm-ker..

[PATCH 2/3] scripts/dtc: Add yamltree.c to dtc sources

2018-09-13 Thread Rob Herring
dtc has a new source file, yamltree.c, that needs to be copied when syncing dtc sources. Signed-off-by: Rob Herring --- scripts/dtc/update-dtc-source.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh index 1

[PATCH 3/3] scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4

2018-09-13 Thread Rob Herring
Major changes are I2C and SPI bus checks, YAML output format (for future validation), some new libfdt functions, and more libfdt validation of dtbs. The YAML addition adds an optional dependency on libyaml. pkg-config is used to test for it and pkg-config became a kconfig dependency in 4.18. This

[PATCH] Correct PowerPC VDSO call frame info

2018-09-13 Thread Alan Modra
There is control flow in __kernel_clock_gettime that reaches label 99 without saving lr in r12. CFI info however is interpreted by the unwinder without reference to control flow: It's a simple matter of "Execute all the CFI opcodes up to the current address". That means the unwinder thinks r12 co

Re: [PATCH] Correct PowerPC VDSO call frame info

2018-09-13 Thread Michael Neuling
Alan, Thanks for the patch... A few minor comments... > Re: [PATCH] Correct PowerPC VDSO call frame info Our convention is to add powerpc: to the start. ie [PATCH] powerpc: Correct VDSO call frame info or even: [PATCH] powerpc/vdso: Correct call frame info On Fri, 2018-09-14 at 08:57 +

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-13 Thread Sam Bobroff
On Thu, Sep 13, 2018 at 12:26:55PM +1000, Russell Currey wrote: > On Wed, 2018-09-12 at 11:58 -0500, Bjorn Helgaas wrote: > > On Wed, Sep 12, 2018 at 11:55:26AM -0500, Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > The original PCI error recovery functionality was for the powerpc-spec

[PATCH v4] powerpc: Avoid code patching freed init sections

2018-09-13 Thread Michael Neuling
This stops us from doing code patching in init sections after they've been freed. In this chain: kvm_guest_init() -> kvm_use_magic_page() -> fault_in_pages_readable() -> __get_user() -> __get_user_nocheck() -> barrier_nospec(); We have a code patching

[PATCH v4] powerpc/64s: reimplement book3s idle code in C

2018-09-13 Thread Nicholas Piggin
Reimplement Book3S idle code in C, moving POWER7/8/9 implementation speific HV idle code to the powernv platform code. Book3S assembly stubs are kept in common code and used only to save the stack frame and non-volatile GPRs before executing architected idle instructions, and restoring the stack a

Re: [PATCH 1/2] powerpc/boot: Fix crt0.S syntax for clang

2018-09-13 Thread Joel Stanley
On Tue, 11 Sep 2018 at 21:02, Segher Boessenkool wrote: > > On Mon, Sep 10, 2018 at 06:57:13PM +1000, Joel Stanley wrote: > > Clang's assembler does not like the syntax of the cmpdi: > > > > arch/powerpc/boot/crt0.S:168:22: error: unexpected modifier on variable > > reference > > cmpdi

Re: [PATCH] Correct PowerPC VDSO call frame info

2018-09-13 Thread Reza Arbab
On Fri, Sep 14, 2018 at 08:57:04AM +0930, Alan Modra wrote: There is control flow in __kernel_clock_gettime that reaches label 99 without saving lr in r12. CFI info however is interpreted by the unwinder without reference to control flow: It's a simple matter of "Execute all the CFI opcodes up t

[PATCH] PowerPC/VDSO: Correct call frame information

2018-09-13 Thread Alan Modra
Call Frame Information is used by gdb for back-traces and inserting breakpoints on function return for the "finish" command. This failed when inside __kernel_clock_gettime. More concerning than difficulty debugging is that CFI is also used by stack frame unwinding code to implement exceptions. I

[PATCH v2 0/5] powerpc: Clang build fixes

2018-09-13 Thread Joel Stanley
v2 rolls up all of the fixes I have into the one series, and adds a few more fixes. With a one patch[1] on top of clang master I can build and boot a powernv kernel. Note that we can't build altivec code using clang yet[2], hence disabling MD_RAID456. $ make ARCH=powerpc powernv_defconfig $ ./scr

[PATCH v2 1/5] powerpc/Makefiles: Fix clang/llvm build

2018-09-13 Thread Joel Stanley
From: Anton Blanchard Commit 15a3204d24a3 ("powerpc/64s: Set assembler machine type to POWER4") passes -mpower4 to the assembler. We have more recent instructions in our assembly files, but gas permits them. The clang/llvm integrated assembler is more strict, and we get a build failure. Fix this

[PATCH v2 2/5] powerpc/boot: Fix crt0.S syntax for clang

2018-09-13 Thread Joel Stanley
Clang's assembler does not like the syntax of the cmpdi: arch/powerpc/boot/crt0.S:168:22: error: unexpected modifier on variable reference cmpdi 12,RELACOUNT@l ^ arch/powerpc/boot/crt0.S:168:11: error: unknown operand cmpdi 12,RELACOUNT@l

[PATCH v2 3/5] powerpc/boot: Ensure _zimage_start is a weak symbol

2018-09-13 Thread Joel Stanley
When building with clang crt0's _zimage_start is not marked weak, which breaks the build when linking the kernel image: $ objdump -t arch/powerpc/boot/crt0.o |grep _zimage_start$ 0058 g .text _zimage_start ld: arch/powerpc/boot/wrapper.a(crt0.o): in function

[PATCH v2 4/5] powerpc: Fix duplicate const clang warning in user access code

2018-09-13 Thread Joel Stanley
From: Anton Blanchard This re-applies b91c1e3e7a6f which was reverted in f2ca80905929 d466f6c5cac1 f84ed59a612d (powerpc/sparse: Constify the address pointer ..."). We see a large number of duplicate const errors in the user access code when building with llvm/clang: include/linux/pagemap.h:5

[PATCH v2 5/5] powerpc: Remove -mno-sched-epilog

2018-09-13 Thread Joel Stanley
This effectively reverts 7563dc645853 ("powerpc: Work around gcc's -fno-omit-frame-pointer bug"), a workaround for a bug in GCC 4.1.3 when building 2.6.26 kernel. The flag is not supported by clang, but reading the history of the bug[1] suggests it is no longer required by supported GCC versions,

Re: [PATCH v4] powerpc: Avoid code patching freed init sections

2018-09-13 Thread Nicholas Piggin
On Fri, 14 Sep 2018 11:14:11 +1000 Michael Neuling wrote: > This stops us from doing code patching in init sections after they've > been freed. > > In this chain: > kvm_guest_init() -> > kvm_use_magic_page() -> > fault_in_pages_readable() -> >__get_user() -> > __get_

Re: [PATCH v2 5/5] powerpc: Remove -mno-sched-epilog

2018-09-13 Thread Nicholas Piggin
On Fri, 14 Sep 2018 13:36:49 +0930 Joel Stanley wrote: > This effectively reverts 7563dc645853 ("powerpc: Work around gcc's > -fno-omit-frame-pointer bug"), a workaround for a bug in GCC 4.1.3 when > building 2.6.26 kernel. > > The flag is not supported by clang, but reading the history of the >

[PATCH 0/3] -mno-sched-epilog removal

2018-09-13 Thread Nicholas Piggin
This removes -mno-sched-epilog on clang and gcc 4.9 and newer. Not tested with old compilers though. Nicholas Piggin (3): powerpc: remove old GCC version checks powerpc: consolidate -mno-sched-epilog into FTRACE flags powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer arch/powerpc/Makef

[PATCH 1/3] powerpc: remove old GCC version checks

2018-09-13 Thread Nicholas Piggin
GCC 4.6 is the minimum supported now. Signed-off-by: Nicholas Piggin --- arch/powerpc/Makefile | 31 ++- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 11a1acba164a..2ecd0976914a 100644 --- a/arch/pow

[PATCH 2/3] powerpc: consolidate -mno-sched-epilog into FTRACE flags

2018-09-13 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/Makefile| 12 ++-- arch/powerpc/kernel/Makefile | 8 arch/powerpc/kernel/trace/Makefile | 2 +- arch/powerpc/platforms/powermac/Makefile | 2 +- arch/powerpc/xmon/Makefile | 2

[PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer

2018-09-13 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/Makefile | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index be47cf8a0798..07d9dce7eda6 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -165,8 +165,12 @@ C

Re: [PATCH v4] powerpc: Avoid code patching freed init sections

2018-09-13 Thread Christophe LEROY
Le 14/09/2018 à 03:14, Michael Neuling a écrit : This stops us from doing code patching in init sections after they've been freed. In this chain: kvm_guest_init() -> kvm_use_magic_page() -> fault_in_pages_readable() -> __get_user() -> __get_user_nocheck() ->