Re: [PATCH net RESEND] PCI: fix oops when try to find Root Port for a PCI device

2017-08-16 Thread Michael Ellerman
Ding Tianhong writes: > Eric report a oops when booting the system after applying > the commit a99b646afa8a ("PCI: Disable PCIe Relaxed..."): I'm seeing a similar oops on powerpc: [0.177242] pci_bus 0015:70: root bus resource [bus 70-ff] [0.178012] Unable to

Re: [RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X table

2017-08-16 Thread Benjamin Herrenschmidt
On Wed, 2017-08-16 at 10:56 -0600, Alex Williamson wrote: > > > WTF Alex, can you stop once and for all with all that "POWER is > > not standard" bullshit please ? It's completely wrong. > > As you've stated, the MSI-X vector table on POWER is currently updated > via a hypercall. POWER is

Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc

2017-08-16 Thread Michael Ellerman
Bart Van Assche writes: > On Wed, 2017-08-16 at 22:30 +0530, Abdul Haleem wrote: >> As of next-20170809, linux-next on powerpc boot hung with below trace >> message. >> >> [ ... ] >> >> A bisection resulted in first bad commit (270065e92 - scsi: scsi-mq: >> Always

[PATCH 1/1] selftests/powerpc: Improve tm-resched-dscr

2017-08-16 Thread Sam Bobroff
The tm-resched-dscr self test can, in some situations, run for several minutes before being successfully interrupted by the context switch it needs in order to perform the test. This often seems to occur when the test is being run in a virtual machine. Improve the test by running it under

Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc

2017-08-16 Thread Brian King
On 08/16/2017 12:21 PM, Bart Van Assche wrote: > On Wed, 2017-08-16 at 22:30 +0530, Abdul Haleem wrote: >> As of next-20170809, linux-next on powerpc boot hung with below trace >> message. >> >> [ ... ] >> >> A bisection resulted in first bad commit (270065e92 - scsi: scsi-mq: >> Always unprepare

Re: [PATCH v2 1/1] rtc: rtctest: Improve support detection

2017-08-16 Thread Shuah Khan
On 08/15/2017 02:46 AM, Lukáš Doktor wrote: > The rtc-generic and opal-rtc are failing to run this test as they do not > support all the features. Let's treat the error returns and skip to the > following test. > > Theoretically the test_DATE should be also adjusted, but as it's enabled > on

Re: [PATCH v6 01/17] powerpc/vas: Define macros, register fields and structures

2017-08-16 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu writes: > > > Nicholas Piggin [npig...@gmail.com] wrote: > >> On Mon, 14 Aug 2017 15:21:48 +1000 > >> Michael Ellerman wrote: > >> > >> > Sukadev Bhattiprolu

Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc

2017-08-16 Thread Bart Van Assche
On Wed, 2017-08-16 at 22:30 +0530, Abdul Haleem wrote: > As of next-20170809, linux-next on powerpc boot hung with below trace > message. > [ ... ] > System booted fine when the below commit is reverted: Hello Abdul, Can you check whether applying the following commit on top of next-20170809

Re: WARNING: CPU: 15 PID: 0 at block/blk-mq.c:1111 __blk_mq_run_hw_queue+0x1d8/0x1f0

2017-08-16 Thread Brian King
On 08/16/2017 01:15 PM, Bart Van Assche wrote: > On Wed, 2017-08-16 at 23:37 +0530, Abdul Haleem wrote: >> Linux-next booted with the below warnings on powerpc >> >> [ ... ] >> >> boot warnings: >> -- >> kvm: exiting hardware virtualization >> [ cut here ] >>

Re: [PATCH] soc: Convert to using %pOF instead of full_name

2017-08-16 Thread Arnd Bergmann
On Thu, Aug 10, 2017 at 12:09 AM, Rob Herring wrote: > On Tue, Jul 18, 2017 at 4:43 PM, Rob Herring wrote: >> Now that we have a custom printf format specifier, convert users of >> full_name to use %pOF instead. This is preparation to remove storing >> of the

Re: WARNING: CPU: 15 PID: 0 at block/blk-mq.c:1111 __blk_mq_run_hw_queue+0x1d8/0x1f0

2017-08-16 Thread Bart Van Assche
On Wed, 2017-08-16 at 23:37 +0530, Abdul Haleem wrote: > Linux-next booted with the below warnings on powerpc > > [ ... ] > > boot warnings: > -- > kvm: exiting hardware virtualization > [ cut here ] > WARNING: CPU: 15 PID: 0 at block/blk-mq.c:

WARNING: CPU: 15 PID: 0 at block/blk-mq.c:1111 __blk_mq_run_hw_queue+0x1d8/0x1f0

2017-08-16 Thread Abdul Haleem
Hi, Linux-next booted with the below warnings on powerpc Test: Reboot Machine Type : Power 8 bare-metal Kernel version : 4.13.0-rc4-next-20170808 gcc : 4.8.5 config: Tul-NV-config file attached Issue is rare to hit (found once for 3 retries) A WARN_ON_ONCE is being triggered from function

Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc

2017-08-16 Thread Bart Van Assche
On Wed, 2017-08-16 at 22:30 +0530, Abdul Haleem wrote: > As of next-20170809, linux-next on powerpc boot hung with below trace > message. > > [ ... ] > > A bisection resulted in first bad commit (270065e92 - scsi: scsi-mq: > Always unprepare ...) in the merge branch 'scsi/for-next' > > System

[BUG][bisected 270065e] linux-next fails to boot on powerpc

2017-08-16 Thread Abdul Haleem
Hi Bart, As of next-20170809, linux-next on powerpc boot hung with below trace message. Test : Boot Machine Type : Power 8 bare-metal Kernel version : 4.13.0-rc4-next-2017081 gcc : 4.8.5 config: Tul-NV-config file attached Boot logs: - oprofile: using timer interrupt. ipip: IPv4 and

Re: [RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X table

2017-08-16 Thread Alex Williamson
On Wed, 16 Aug 2017 10:35:49 +1000 Benjamin Herrenschmidt wrote: > On Tue, 2017-08-15 at 10:37 -0600, Alex Williamson wrote: > > Of course I don't think either of those are worth imposing a > > performance penalty where we don't otherwise need one. However, if we > >

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-16 Thread Paul E. McKenney
On Wed, Aug 16, 2017 at 05:56:17AM -0700, Paul E. McKenney wrote: > On Wed, Aug 16, 2017 at 10:43:52PM +1000, Michael Ellerman wrote: > > "Paul E. McKenney" writes: > > ... > > > > > > commit 33103e7b1f89ef432dfe3337d2a6932cdf5c1312 > > > Author: Paul E. McKenney

[PATCH] powerpc/perf: Fix usage of nest_imc_refc

2017-08-16 Thread Madhavan Srinivasan
nest_imc_refc is a reference count struct, used to track number of active perf sessions using the nest units. It is preferred to access nest_imc_refc using per-cpu pointer 'local_nest_imc_refc'. Since, nest_imc_refc is not initialized using node_id as array index. Patch to fix the same. Fixes:

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-16 Thread Nicholas Piggin
On Wed, 16 Aug 2017 05:56:17 -0700 "Paul E. McKenney" wrote: > On Wed, Aug 16, 2017 at 10:43:52PM +1000, Michael Ellerman wrote: > > "Paul E. McKenney" writes: > > ... > > > > > > commit 33103e7b1f89ef432dfe3337d2a6932cdf5c1312 > > >

Re: [PATCH v2 2/3] livepatch: send a fake signal to all blocking tasks

2017-08-16 Thread Petr Mladek
On Thu 2017-08-10 12:48:14, Miroslav Benes wrote: > Live patching consistency model is of LEAVE_PATCHED_SET and > SWITCH_THREAD. This means that all tasks in the system have to be marked > one by one as safe to call a new patched function. Safe means when a > task is not (sleeping) in a set of

Re: [PATCH] powerpc/xmon: Exclude all of xmon/ from ftrace

2017-08-16 Thread Naveen N. Rao
Hi Michael, Sorry -- was off since last week. On 2017/08/15 08:04PM, Michael Ellerman wrote: > Michael Ellerman writes: > > > "Naveen N. Rao" writes: > > > >> diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile > >> index

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-16 Thread Paul E. McKenney
On Wed, Aug 16, 2017 at 10:43:52PM +1000, Michael Ellerman wrote: > "Paul E. McKenney" writes: > ... > > > > commit 33103e7b1f89ef432dfe3337d2a6932cdf5c1312 > > Author: Paul E. McKenney > > Date: Mon Aug 14 08:54:39 2017 -0700 > > > >

Re: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Chris Wilson
Quoting Christian König (2017-08-16 08:49:07) > Am 16.08.2017 um 04:12 schrieb Chris Mi: > > Using current TC code, it is very slow to insert a lot of rules. > > > > In order to improve the rules update rate in TC, > > we introduced the following two changes: > > 1) changed cls_flower to

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-16 Thread Michael Ellerman
"Paul E. McKenney" writes: ... > > commit 33103e7b1f89ef432dfe3337d2a6932cdf5c1312 > Author: Paul E. McKenney > Date: Mon Aug 14 08:54:39 2017 -0700 > > EXP: Trace tick return from tick_nohz_stop_sched_tick > > Signed-off-by:

Re: [PATCH 0/3] ALSA: make snd_kcontrol_new const

2017-08-16 Thread Takashi Iwai
On Wed, 16 Aug 2017 10:44:08 +0200, Bhumika Goyal wrote: > > Make these structures const. Done using Coccinelle. > > Bhumika Goyal (3): > ALSA: aoa: make snd_kcontrol_new const > ALSA: pcxhr: make snd_kcontrol_new const > ALSA: hda: make snd_kcontrol_new const Applied all three patches

[PATCH] powerpc: powernv: Fix build error on const discarding

2017-08-16 Thread Corentin Labbe
When building a random powerpc kernel I hit this build error: CC arch/powerpc/platforms/powernv/opal-imc.o arch/powerpc/platforms/powernv/opal-imc.c: In function «  disable_nest_pmu_counters »: arch/powerpc/platforms/powernv/opal-imc.c:130:13: error : assignment discards «  const »

Re: powerpc/mm/nohash: add definition of PGALLOC_GFP

2017-08-16 Thread Michael Ellerman
On Tue, 2017-08-15 at 03:46:36 UTC, Balbir Singh wrote: > fixes > (de3b876 powerpc/mm/book(e)(3s)/64: Add page table accounting) > > I missed adding PGALLOC_GFP for nohash/64 > > Reported-by: Michael Ellerman > Signed-off-by: Balbir Singh Applied to

Re: powerpc: fix invalid use of register expressions

2017-08-16 Thread Michael Ellerman
On Mon, 2017-08-14 at 18:42:43 UTC, Andreas Schwab wrote: > This fixes another invalid use of register expressions. > > Signed-off-by: Andreas Schwab Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/6c80d3164ece26e55dc2dbfceba948 cheers

Re: Fix for supporting nest events on muti socket system

2017-08-16 Thread Michael Ellerman
On Mon, 2017-08-14 at 11:42:23 UTC, Anju T wrote: > In a multi node system with discontinuous node id, nest event values > are not showing up properly.That is, > > snip from lscpu output: > > .. > NUMA node0 CPU(s): 0-15 > NUMA node8 CPU(s): 16-31 > .. > > Nest event values on such systems are

Re: powerpc/8xx: fix two CONFIG_8xx left behind

2017-08-16 Thread Michael Ellerman
On Mon, 2017-08-14 at 07:14:19 UTC, Christophe Leroy wrote: > Commit 968159c0031ac ("powerpc/8xx: Getting rid of remaining > use of CONFIG_8xx") removed all but 2 references to 8xx in > Kconfigs. > > This patch removes the two remaining ones. > > Signed-off-by: Christophe Leroy

Re: powerpc: store the intended structure

2017-08-16 Thread Michael Ellerman
On Sun, 2017-08-13 at 13:24:23 UTC, Julia Lawall wrote: > Normally the values in the resource field and the argument to ARRAY_SIZE > in the num_resources are the same. In this case, the value in the reousrce > field is the same as the one in the previous platform_device structure, and > appears

Re: powerpc/perf: double unlock bug in imc_common_cpuhp_mem_free()

2017-08-16 Thread Michael Ellerman
On Fri, 2017-08-11 at 20:05:41 UTC, Dan Carpenter wrote: > There is a typo so we call unlock instead of lock. > > Fixes: 885dcd709ba9 ("powerpc/perf: Add nest IMC PMU support") > Signed-off-by: Dan Carpenter Applied to powerpc next, thanks.

Re: drivers/macintosh: make wf_control_ops and wf_pid_param const

2017-08-16 Thread Michael Ellerman
On Fri, 2017-08-11 at 17:38:45 UTC, Bhumika Goyal wrote: > Make wf_control_ops const as they are only stored in the ops field of a > wf_control structure, which is const. > Make wf_pid_param const as they are only used during a copy operation. > Done using Coccinelle. > > Signed-off-by: Bhumika

Re: powerpc/iommu: Avoid undefined right shift in iommu_range_alloc()

2017-08-16 Thread Michael Ellerman
On Tue, 2017-08-08 at 07:06:32 UTC, Michael Ellerman wrote: > In iommu_range_alloc() we generate a mask by right shifting ~0, > however if the specified alignment is 0 then we right shift by 64, > which is undefined. UBSAN tells us so: > > UBSAN: Undefined behaviour in

Re: [v3,2/2] powerpc/xmon: Disable tracing when entering xmon

2017-08-16 Thread Michael Ellerman
On Wed, 2017-08-02 at 20:14:06 UTC, Breno Leitao wrote: > If tracing is enabled and you get into xmon, the tracing buffer > continues to be updated, causing possible loss of data and unnecessary > tracing information coming from xmon functions. > > This patch simple disables tracing when entering

Re: [v3, 1/2] powerpc/xmon: Dump ftrace buffers for the current CPU only

2017-08-16 Thread Michael Ellerman
On Wed, 2017-08-02 at 20:14:05 UTC, Breno Leitao wrote: > Current xmon 'dt' command dumps the tracing buffer for all the CPUs, > which makes it very hard to read due to the fact that most of > powerpc machines currently have many CPUs. Other than that, the CPU > lines are interleaved in the ftrace

Re: powerpc/xmon: Exclude all of xmon/ from ftrace

2017-08-16 Thread Michael Ellerman
On Wed, 2017-08-02 at 18:25:38 UTC, "Naveen N. Rao" wrote: > Exclude core xmon files from ftrace (along with an xmon xive helper > outside of xmon/) to minimize impact of ftrace while within xmon. > > Before patch: > root@ubuntu:/sys/kernel/debug/tracing# cat available_filter_functions | >

Re: [v3, 1/5] powerpc/mm: Ensure change_page_attr() doesn't invalidate pinned TLBs

2017-08-16 Thread Michael Ellerman
On Wed, 2017-08-02 at 13:51:01 UTC, Christophe Leroy wrote: > __change_page_attr() uses flush_tlb_page(). > flush_tlb_page() uses tlbie instruction, which also invalidates > pinned TLBs, which is not what we expect. > > This patch modifies the implementation to use flush_tlb_kernel_range() >

Re: powerpc/hugetlb: fix page rights verification in gup_hugepte()

2017-08-16 Thread Michael Ellerman
On Wed, 2017-07-12 at 15:03:42 UTC, Christophe Leroy wrote: > gup_hugepte() checks if pages are present and readable, and > when 'write' is set, also checks if the pages are writable. > > Initially this was done by checking if _PAGE_PRESENT and > _PAGE_READ were set. In addition, _PAGE_WRITE was

Re: [1/7] powerpc/8xx: Ensures RAM mapped with LTLB is seen as block mapped on 8xx.

2017-08-16 Thread Michael Ellerman
On Wed, 2017-07-12 at 10:08:45 UTC, Christophe Leroy wrote: > On the 8xx, the RAM mapped with LTLBs must be seen as block mapped, > just like areas mapped with BATs on standard PPC32. > > Signed-off-by: Christophe Leroy Series applied to powerpc next, thanks.

Re: [PATCH v6 01/17] powerpc/vas: Define macros, register fields and structures

2017-08-16 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > Nicholas Piggin [npig...@gmail.com] wrote: >> On Mon, 14 Aug 2017 15:21:48 +1000 >> Michael Ellerman wrote: >> >> > Sukadev Bhattiprolu writes: >> >> > > arch/powerpc/include/asm/vas.h

Re: [PATCH 05/11] powerpc/topology: Remove the unused parent_node() macro

2017-08-16 Thread Michael Ellerman
Dou Liyang writes: > Hi Michael, > > At 07/27/2017 10:21 AM, Michael Ellerman wrote: >> Dou Liyang writes: >> >>> Commit a7be6e5a7f8d ("mm: drop useless local parameters of >>> __register_one_node()") removes the last user of parent_node().

Re: [PATCH] powerpc: Use reg.h values for program check reason codes

2017-08-16 Thread Cyril Bur
On Wed, 2017-08-16 at 10:52 +0200, Christophe LEROY wrote: > Hi, > > Le 16/08/2017 à 08:50, Cyril Bur a écrit : > > Small amount of #define duplication, makes sense for these to be in > > reg.h. > > > > Signed-off-by: Cyril Bur > > Looks similar to the following applies

Re: [PATCH] powerpc: Use reg.h values for program check reason codes

2017-08-16 Thread Christophe LEROY
Hi, Le 16/08/2017 à 08:50, Cyril Bur a écrit : Small amount of #define duplication, makes sense for these to be in reg.h. Signed-off-by: Cyril Bur Looks similar to the following applies commit, doesn't it ?

[PATCH 1/3] ALSA: aoa: make snd_kcontrol_new const

2017-08-16 Thread Bhumika Goyal
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- sound/aoa/codecs/onyx.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c

[PATCH 3/3] ALSA: hda: make snd_kcontrol_new const

2017-08-16 Thread Bhumika Goyal
Make these const as they are only passed as the 3rd argument to the function snd_hda_gen_add_kctl, which is of type const. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- sound/pci/hda/patch_analog.c | 4 ++-- sound/pci/hda/patch_sigmatel.c | 2 +- 2 files changed,

[PATCH 2/3] ALSA: pcxhr: make snd_kcontrol_new const

2017-08-16 Thread Bhumika Goyal
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- sound/pci/pcxhr/pcxhr_mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/pcxhr/pcxhr_mixer.c

[PATCH 0/3] ALSA: make snd_kcontrol_new const

2017-08-16 Thread Bhumika Goyal
Make these structures const. Done using Coccinelle. Bhumika Goyal (3): ALSA: aoa: make snd_kcontrol_new const ALSA: pcxhr: make snd_kcontrol_new const ALSA: hda: make snd_kcontrol_new const sound/aoa/codecs/onyx.c| 12 ++-- sound/pci/hda/patch_analog.c | 4 ++--

Re: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Christian König
Am 16.08.2017 um 04:12 schrieb Chris Mi: Using current TC code, it is very slow to insert a lot of rules. In order to improve the rules update rate in TC, we introduced the following two changes: 1) changed cls_flower to use IDR to manage the filters. 2) changed all act_xxx

[PATCH] powerpc: Use reg.h values for program check reason codes

2017-08-16 Thread Cyril Bur
Small amount of #define duplication, makes sense for these to be in reg.h. Signed-off-by: Cyril Bur --- arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/kernel/traps.c| 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git

Re: should "linux-phandle" be "linux,phandle"?

2017-08-16 Thread Michael Ellerman
rpj...@crashcourse.ca writes: >pedantic nitpickery but, in arch/powerpc/kernel/prom_init.c, line 2426, > should that diagnostic message print "" and not > ""? Yeah I guess. AFAICS it can't happen though, we created the "linux,phandle" string just prior, around line 2488.

[PATCH 5/5] powerpc: Remove more redundant VSX save/tests

2017-08-16 Thread Benjamin Herrenschmidt
__giveup_vsx/save_vsx are completely equivalent to testing MSR_FP and MSR_VEC and calling the corresponding giveup/save function so just remove the spurious VSX cases. Also add WARN_ONs checking that we never have VSX enabled without the two other. Signed-off-by: Benjamin Herrenschmidt

[PATCH 2/5] powerpc: Fix missing CR before {

2017-08-16 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 883216b4296a..14b9a3c46c5d 100644 ---

Re: [PATCH 1/5] powerpc: Test MSR_FP and MSR_VEC when enabling/flushing VSX

2017-08-16 Thread Benjamin Herrenschmidt
On Wed, 2017-08-16 at 16:01 +1000, Benjamin Herrenschmidt wrote: > VSX uses a combination of the old vector registers, the old FP registers > and new "second halves" of the FP registers. > > Thus when we need to see the VSX state in the thread struct > (flush_vsx_to_thread) or when we'll use the

[PATCH 1/5] powerpc: Test MSR_FP and MSR_VEC when enabling/flushing VSX

2017-08-16 Thread Benjamin Herrenschmidt
VSX uses a combination of the old vector registers, the old FP registers and new "second halves" of the FP registers. Thus when we need to see the VSX state in the thread struct (flush_vsx_to_thread) or when we'll use the VSX in the kernel (enable_kernel_vsx) we need to ensure they are all

[PATCH 3/5] powerpc: Remove redundant fp/altivec giveup code

2017-08-16 Thread Benjamin Herrenschmidt
__giveup_vsx already calls those two functions Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/process.c | 4 1 file changed, 4 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 14b9a3c46c5d..bfbd6083f841

[PATCH 4/5] powerpc: Remove redundant clear of MSR_VSX in __giveup_vsx()

2017-08-16 Thread Benjamin Herrenschmidt
__giveup_fpu() already does it and we cannot have MSR_VSX set without having MSR_FP also set. This also adds a warning to check we indeed do Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/process.c | 14 +++--- 1 file changed, 11 insertions(+),