[PATCH] powerpc: add PPC_FEATURE userspace bits for SCV and DARN instructions

2017-05-19 Thread Nicholas Piggin
Providing "scv" support to userspace requires kernel support, so it must be advertised as independently to the base ISA 3 instruction set. The darn instruction relies on firmware enablement, so it has been decided to split this out from the core ISA 3 feature as well. Signed-off-by: Nicholas Pigg

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-19 Thread Nicholas Piggin
On Fri, 19 May 2017 15:43:45 -0400 Don Zickus wrote: > On Sat, May 20, 2017 at 12:53:06AM +1000, Nicholas Piggin wrote: > > > I am curious to know what IBM thinks there. Currently the HARDLOCKUP > > > detector sits on top of perf. I get the impression, you are removing that > > > dependency. I

[PATCH] powernv/npu-dma.c: Fix opal_npu_destroy_context call

2017-05-19 Thread Alistair Popple
opal_npu_destroy_context() should be called with the NPU PHB, not the PCIe PHB. Signed-off-by: Alistair Popple --- arch/powerpc/platforms/powernv/npu-dma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-19 Thread Don Zickus
On Sat, May 20, 2017 at 12:53:06AM +1000, Nicholas Piggin wrote: > > I am curious to know what IBM thinks there. Currently the HARDLOCKUP > > detector sits on top of perf. I get the impression, you are removing that > > dependency. Is that a permanent thing or are you thinking of switching back

[PATCH] drivers/rtc/interface.c: Validate alarm-time before handling rollover

2017-05-19 Thread Vaibhav Jain
In function __rtc_read_alarm() its possible for an alarm time-stamp to be invalid even after replacing missing components with current time-stamp. The condition 'alarm->time.tm_year < 70' will trigger this case and will cause the call to 'rtc_tm_to_time64(&alarm->time)' return a negative value for

Re: [PATCH 4/4] arch/powerpc/44x/fsp2: wdt tcr update instead of whole rewrite

2017-05-19 Thread Ivan Mikhaylov
Hi Michael, >> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c >> index 2b33cfa..f75e512 100644 >> --- a/arch/powerpc/kernel/time.c >> +++ b/arch/powerpc/kernel/time.c >> @@ -738,12 +738,28 @@ static int __init get_freq(char *name, int cells, >> unsigned long *val) >> >> s

Re: [PATCH 3/3] EDAC: mv64x60: replace in_le32/out_le32 with ioread32/iowrite32

2017-05-19 Thread Arnd Bergmann
On Fri, May 19, 2017 at 4:01 PM, David Laight wrote: > From: Arnd Bergmann >> Sent: 17 May 2017 22:40 >> >> On Wed, May 17, 2017 at 11:16 PM, Chris Packham >> wrote: >> > On 18/05/17 06:18, Borislav Petkov wrote: >> > One thing I would like confirmation on is is in_le32 -> ioread32 the >> > corre

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-19 Thread Nicholas Piggin
On Fri, 19 May 2017 09:17:53 -0400 Don Zickus wrote: > On Fri, May 19, 2017 at 09:07:31AM +1000, Nicholas Piggin wrote: > > On Thu, 18 May 2017 12:30:28 -0400 > > Don Zickus wrote: > > > > > (adding Uli) > > > > > > On Fri, May 19, 2017 at 01:50:26AM +1000, Nicholas Piggin wrote: > > > > I

[PATCH] powerpc/64: Use tick accounting by default

2017-05-19 Thread Anton Blanchard
From: Anton Blanchard ppc64 is the only architecture that turns on VIRT_CPU_ACCOUNTING_NATIVE by default. The overhead of this option is extremely high - a context switch microbenchmark using sched_yield() is almost 20% slower. To get finer grained user/hardirq/softirq statitics, the IRQ_TIME_AC

RE: [PATCH 3/3] EDAC: mv64x60: replace in_le32/out_le32 with ioread32/iowrite32

2017-05-19 Thread David Laight
From: Arnd Bergmann > Sent: 17 May 2017 22:40 > > On Wed, May 17, 2017 at 11:16 PM, Chris Packham > wrote: > > On 18/05/17 06:18, Borislav Petkov wrote: > > One thing I would like confirmation on is is in_le32 -> ioread32 the > > correct change? I tossed up between ioread32 and readl. Looking at

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-19 Thread Don Zickus
On Fri, May 19, 2017 at 09:07:31AM +1000, Nicholas Piggin wrote: > On Thu, 18 May 2017 12:30:28 -0400 > Don Zickus wrote: > > > (adding Uli) > > > > On Fri, May 19, 2017 at 01:50:26AM +1000, Nicholas Piggin wrote: > > > I'd like to make it easier for architectures that have their own NMI / > > >

Re: [PATCH] powerpc/sequoia: fix NAND partitions not to overlap

2017-05-19 Thread Pavel Machek
Hi! > >>> > > Signed-off-by: Pavel Machek > >>> > > >>> > Ping? Two partitions at same place are bad news... > >>> > >>> Please expand on "bad news"? What are the runtime effects of this > >>> change? Decisions about which kernel(s) to patch depend on this info. > >> > >> Well... two partitio

RE: [PATCH 2/9] timers: provide a "modern" variant of timers

2017-05-19 Thread David Laight
From: Christoph Hellwig > Sent: 16 May 2017 12:48 > > The new callback gets a pointer to the timer_list itself, which can > then be used to get the containing structure using container_of > instead of casting from and to unsigned long all the time. What about sensible drivers that put some other v

Memory hotplug broken on powerkvm/pseries with CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y

2017-05-19 Thread Bharata B Rao
Hi, Memory hotplug for a pseries guest on PowerKVM fails with the following error when CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y in the guest kernel. (I am on commit b23afd384801) [root@localhost ~]# pseries-hotplug-mem: Attempting to hot-add 4 LMB(s) at index 8020 removing memory fails, becaus

Re: [PATCH 4/4] arch/powerpc/44x/fsp2: wdt tcr update instead of whole rewrite

2017-05-19 Thread Benjamin Herrenschmidt
On Mon, 2017-05-15 at 16:07 +0300, Ivan Mikhaylov wrote: > +#ifdef CONFIG_FSP2 > +   /* > +    * Prevent a kernel panic caused by unintentionally clearing TCR > +    * watchdog bits.  At this point in the kernel boot, the watchdog has > +    * already been enabled by u-boot.  The or

Re: [PATCH 4/4] arch/powerpc/44x/fsp2: wdt tcr update instead of whole rewrite

2017-05-19 Thread Michael Ellerman
Hi Ivan, Ivan Mikhaylov writes: > Prevent a kernel panic caused by unintentionally clearing TCR > watchdog bits. At this point in the kernel boot, the watchdog has > already been enabled by u-boot. The original code's attempt to > write to the TCR register results in an inadvertent clearing of

[PATCH] rtc/tpo: Implement rtc_class_ops.alarm_irq_enable callback

2017-05-19 Thread Vaibhav Jain
Provide an implementation of the callback rtc_class_ops.alarm_irq_enable callback for rtc-opal driver. This callback is called when the wake alarm is disabled via the command: 'echo 0 > /sys/class/rtc/rtc0/wakealarm' Without this the Timed-Power-On(TPO) config remains set even when its disabled b

[PATCH] rtc/tpo: Handle disabled TPO in opal_get_tpo_time()

2017-05-19 Thread Vaibhav Jain
On PowerNV platform when Timed-Power-On(TPO) is disabled, read of stored TPO yields value with all date components set to '0' inside opal_get_tpo_time(). The function opal_to_tm() then converts it to an offset from year 1900 yielding alarm-time == "1900-00-01 00:00:00". This causes problems with __

Re: [PATCH] powerpc/sequoia: fix NAND partitions not to overlap

2017-05-19 Thread Michael Ellerman
Michael Ellerman writes: > Pavel Machek writes: > >> On Wed 2017-05-17 14:37:17, Andrew Morton wrote: >>> On Wed, 17 May 2017 14:06:13 +0200 Pavel Machek wrote: >>> >>> > On Sun 2017-04-02 12:05:36, Pavel Machek wrote: >>> > > Fix overlapping NAND partitions. >>> > > >>> > > Signed-off-by: Pa

Re: [PATCH 3/3] EDAC: mv64x60: replace in_le32/out_le32 with ioread32/iowrite32

2017-05-19 Thread Michael Ellerman
Arnd Bergmann writes: > On Thu, May 18, 2017 at 7:36 AM, Michael Ellerman wrote: >> Borislav Petkov writes: >> >>> Top-posting so that the PPC list can see the whole patch below. >>> >>> Since I don't know PPC, let me add PPC ML to CC for a confirmation this >>> change is correct. >>> >>> Which

Re: powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash

2017-05-19 Thread Michael Ellerman
On Thu, 2017-05-18 at 10:37:31 UTC, Michael Ellerman wrote: > virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on > an address. What this means in practice is that it should only return true for > addresses in the linear mapping which are backed by a valid PFN. > > We ar

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

2017-05-19 Thread Michael Ellerman
Hi Linus, Please pull some powerpc fixes for 4.12: The following changes since commit 2ea659a9ef488125eb46da6eb571de5eae5c43f6: Linux 4.12-rc1 (2017-05-13 13:19:49 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerpc-4

[PATCH net-next v2] ibmveth: Support to enable LSO/CSO for Trunk VEA.

2017-05-19 Thread Sivakumar Krishnasamy
Current largesend and checksum offload feature in ibmveth driver, - Source VM sends the TCP packets with ip_summed field set as CHECKSUM_PARTIAL and TCP pseudo header checksum is placed in checksum field - CHECKSUM_PARTIAL flag in SKB will enable ibmveth driver to mark "no checksum" and

Re: [PATCH] powerpc/sequoia: fix NAND partitions not to overlap

2017-05-19 Thread Pavel Machek
Hi! > > Well... two partitions at same place. If you use one, you will corrupt > > information on the other one. > > > > OTOH this moves partition around (so that they don't overlap) so it is > > probably not stable candidate. > > > > I guess this is not huge issue; people using these boards proba

Re: [PATCH] perf: libdw support for powerpc

2017-05-19 Thread Paolo Bonzini
On 18/05/2017 20:48, Paolo Bonzini wrote: > > > On 18/05/2017 20:19, Naveen N. Rao wrote: >> Paolo Bonzini wrote: >>> The ARM and x86 architectures already use libdw, and it is useful to >>> have as much common code for the unwinder as possible. Porting PPC >>> to libdw only needs an architect