Re: [PATCH 08/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver

2018-06-06 Thread Geert Uytterhoeven
Hi Finn, On Wed, Jun 6, 2018 at 8:57 AM, Finn Thain wrote: > On Mon, 4 Jun 2018, Geert Uytterhoeven wrote: >> > Don't call pmu_shutdown() or pmu_restart() on early PowerBooks: the >> > PMU device found in these PowerBooks isn't supported. >> >> Shouldn't that be a separate patch? >> >> > --- a/ar

Re: [PATCH 2/2] powerpc: Add support for function error injection

2018-06-06 Thread Naveen N. Rao
Naveen N. Rao wrote: Michael Ellerman wrote: I guess if it doesn't already apply to tip you should rebase it. You've probably missed 4.18 anyway. Oh ok. I just tried and it seems to apply just fine. I'll post v2 after giving this a quick test. I didn't post a v2 since I have decided agains

[PATCH v2] powerpc: Add support for function error injection

2018-06-06 Thread Naveen N. Rao
We implement regs_set_return_value() and override_function_with_return() for this purpose. On powerpc, a return from a function (blr) just branches to the location contained in the link register. So, we can just update pt_regs rather than redirecting execution to a dummy function that returns. S

RE: [PATCH 09/10] dpaa_eth: add support for hardware timestamping

2018-06-06 Thread Y.b. Lu
Hi Richard, > -Original Message- > From: Richard Cochran [mailto:richardcoch...@gmail.com] > Sent: Tuesday, June 5, 2018 9:58 PM > To: Y.b. Lu > Cc: net...@vger.kernel.org; Madalin-cristian Bucur > ; Rob Herring ; Shawn Guo > ; David S . Miller ; > devicet...@vger.kernel.org; linuxppc-dev

[PATCH v4 2/2] powerpc/time: no steal_time when CONFIG_PPC_SPLPAR is not selected

2018-06-06 Thread Christophe Leroy
If CONFIG_PPC_SPLPAR is not selected, steal_time will always be NUL, so accounting it is pointless Signed-off-by: Christophe Leroy --- v4: removed the check in vtime_account_system(), the compiler removes the code regardless. v3: new arch/powerpc/kernel/time.c | 9 + 1 file changed,

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

2018-06-06 Thread Christophe Leroy
scaled cputime is only meaningfull when the processor has SPURR and/or PURR, which means only on PPC64. Removing it on PPC32 significantly reduces the size of vtime_account_system() and vtime_account_idle() on an 8xx: Before: l F .text 00a8 vtime_delta 0280 g F .text 00

Re: [PATCH v6 2/4] powerpc/64: enhance memcmp() with VMX instruction for long bytes comparision

2018-06-06 Thread Segher Boessenkool
On Wed, Jun 06, 2018 at 02:42:27PM +0800, Simon Guo wrote: > I now felt unformatable to use mcrf like: > mcrf7,0 > > since I cannot 100% confident that compiler will not use CR7 or other > CR# in exit_vmx_ops(). It wasn't clear to me this macro boils down to a function call. You can use CR2,

Re: powerpc/64s/radix: Fix missing ptesync in flush_cache_vmap

2018-06-06 Thread Michael Ellerman
On Wed, 2018-06-06 at 01:40:08 UTC, Nicholas Piggin wrote: > There is a typo in f1cb8f9beb ("powerpc/64s/radix: avoid ptesync after > set_pte and ptep_set_access_flags") config ifdef, which results in the > necessary ptesync not being issued after vmalloc. > > This causes random kernel faults in m

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

2018-06-06 Thread Nicholas Piggin
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. > > Removing it on PPC32 significantly reduces the size of > vtime_account_system() and vtime_account_idle() on an 8xx: >

[PATCH v8 0/5] powerpc/64: memcmp() optimization

2018-06-06 Thread wei . guo . simon
From: Simon Guo There is some room to optimize memcmp() in powerpc 64 bits version for following 2 cases: (1) Even src/dst addresses are not aligned with 8 bytes at the beginning, memcmp() can align them and go with .Llong comparision mode without fallback to .Lshort comparision mode do compare b

[PATCH v8 1/5] powerpc/64: Align bytes before fall back to .Lshort in powerpc64 memcmp()

2018-06-06 Thread wei . guo . simon
From: Simon Guo Currently memcmp() 64bytes version in powerpc will fall back to .Lshort (compare per byte mode) if either src or dst address is not 8 bytes aligned. It can be opmitized in 2 situations: 1) if both addresses are with the same offset with 8 bytes boundary: memcmp() can compare the

[PATCH v8 2/5] powerpc: add vcmpequd/vcmpequb ppc instruction macro

2018-06-06 Thread wei . guo . simon
From: Simon Guo Some old tool chains don't know about instructions like vcmpequd. This patch adds .long macro for vcmpequd and vcmpequb, which is a preparation to optimize ppc64 memcmp with VMX instructions. Signed-off-by: Simon Guo --- arch/powerpc/include/asm/ppc-opcode.h | 11 +++

[PATCH v8 3/5] powerpc/64: enhance memcmp() with VMX instruction for long bytes comparision

2018-06-06 Thread wei . guo . simon
From: Simon Guo This patch add VMX primitives to do memcmp() in case the compare size is equal or greater than 4K bytes. KSM feature can benefit from this. Test result with following test program(replace the "^>" with ""): -- ># cat tools/testing/selftests/powerpc/stringloops/memcmp.c >#incl

[PATCH v8 4/5] powerpc/64: add 32 bytes prechecking before using VMX optimization on memcmp()

2018-06-06 Thread wei . guo . simon
From: Simon Guo This patch is based on the previous VMX patch on memcmp(). To optimize ppc64 memcmp() with VMX instruction, we need to think about the VMX penalty brought with: If kernel uses VMX instruction, it needs to save/restore current thread's VMX registers. There are 32 x 128 bits VMX re

[PATCH v8 5/5] powerpc:selftest update memcmp_64 selftest for VMX implementation

2018-06-06 Thread wei . guo . simon
From: Simon Guo This patch reworked selftest memcmp_64 so that memcmp selftest can cover more test cases. It adds testcases for: - memcmp over 4K bytes size. - s1/s2 with different/random offset on 16 bytes boundary. - enter/exit_vmx_ops pairness. Signed-off-by: Simon Guo --- .../selftests/po

[v2, 00/10] Support DPAA PTP clock and timestamping

2018-06-06 Thread Yangbo Lu
This patchset is to support DPAA FMAN PTP clock and HW timestamping. - The patch #1 to patch #5 are to support DPAA FMAN 1588 timer in ptp_qoriq driver. - The patch #6 to patch #10 are to add HW timestamping support in DPAA ethernet driver. Yangbo Lu (10): fsl/fman: share the event interrupt

[v2, 01/10] fsl/fman: share the event interrupt

2018-06-06 Thread Yangbo Lu
This patch is to share fman event interrupt because the 1588 timer driver will also use this interrupt. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/freescale/fman/fman.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/n

[v2, 02/10] ptp: support DPAA FMan 1588 timer in ptp_qoriq

2018-06-06 Thread Yangbo Lu
This patch is to support DPAA (Data Path Acceleration Architecture) 1588 timer by adding "fsl,fman-ptp-timer" compatible, sharing interrupt with FMan, adding FSL_DPAA_ETH dependency, and fixing up register offset. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/ptp/Kconf

[v2, 03/10] dt-binding: ptp_qoriq: add DPAA FMan support

2018-06-06 Thread Yangbo Lu
This patch is to add bindings description for DPAA FMan 1588 timer, and also remove its description in fsl-fman dt-bindings document. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- Documentation/devicetree/bindings/net/fsl-fman.txt | 25 +--- .../devicetree/bi

[v2, 04/10] powerpc/mpc85xx: move ptp timer out of fman in dts

2018-06-06 Thread Yangbo Lu
This patch is to move ptp timer node out of fman. Because ptp timer will be probed by ptp_qoriq driver, it should be an independent device in case of conflict memory mapping. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi | 14 +++

[v2, 05/10] arm64: dts: fsl: move ptp timer out of fman

2018-06-06 Thread Yangbo Lu
This patch is to move ptp timer node out of fman. Because ptp timer will be probed by ptp_qoriq driver, it should be an independent device in case of conflict memory mapping. Signed-off-by: Yangbo Lu --- Changes for v2: - Fixed address-cells for ptp-timer. --- arch/arm64/boot/dts/freesca

[v2, 06/10] fsl/fman: add set_tstamp interface

2018-06-06 Thread Yangbo Lu
This patch is to add set_tstamp interface for memac, dtsec, and 10GEC controllers to configure HW timestamping. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/freescale/fman/fman_dtsec.c | 27 ++ drivers/net/ethernet/freescale/fman/fma

[v2, 07/10] fsl/fman_port: support getting timestamp field

2018-06-06 Thread Yangbo Lu
This patch is to add fman_port_get_tstamp_field() interface to get timestamp field data. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/freescale/fman/fman_port.c | 12 drivers/net/ethernet/freescale/fman/fman_port.h |3 +++ 2 files chang

[v2, 08/10] fsl/fman: define frame description command UPD

2018-06-06 Thread Yangbo Lu
Defined frame description command FM_FD_CMD_UPD for prepended data updating. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/freescale/fman/fman.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/fm

[v2, 09/10] dpaa_eth: add support for hardware timestamping

2018-06-06 Thread Yangbo Lu
This patch is to add hardware timestamping support for dpaa_eth. On Rx, timestamping is enabled for all frames. On Tx, we only instruct the hardware to timestamp the frames marked accordingly by the stack. Signed-off-by: Yangbo Lu --- Changes for v2: - Removed ifdef for timestamp code.

[v2, 10/10] dpaa_eth: add the get_ts_info interface for ethtool

2018-06-06 Thread Yangbo Lu
Added the get_ts_info interface for ethtool to check the timestamping capability. Signed-off-by: Yangbo Lu --- Changes for v2: - Removed ifdef for hw timestamp. --- drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 39 1 files changed, 39 insertions(+), 0 deleti

Re: [PATCH 08/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver

2018-06-06 Thread Finn Thain
On Wed, 6 Jun 2018, Geert Uytterhoeven wrote: > So 4.17 mac_defconfig won't work on PMU_68K_V1 machines? Perhaps that > should be fixed first. > AFAICT there's nothing to fix. $ grep PMU arch/m68k/configs/mac_defconfig CONFIG_ADB_PMU68K=y This works fine for PMU_68K_V2 machines. But if you t

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-06 Thread Christoph Hellwig
On Thu, May 31, 2018 at 08:43:58PM +0300, Michael S. Tsirkin wrote: > Pls work on a long term solution. Short term needs can be served by > enabling the iommu platform in qemu. So, I spent some time looking at converting virtio to dma ops overrides, and the current virtio spec, and the sad through

[mainline] [powerpc/powervm]Kernel OOPS while executing memory hotplug on Power8 baremetal

2018-06-06 Thread vrbagal1
Greetings!!! Observing Kernel oops and machine reboots while executing memory hotplug test case, on Power8 Baremetal machine. I see this is introduced some where between rc6 and 4.17. Machine: Power 8 Baremetal(PowerNV) Kernel Veriosn: Linux version 4.17.0-autotest gcc Version: gcc version 4.