Re: [RESEND PATCH v4 2/3] tools: Move Makefile.arch from perf/config to tools/scripts

2015-12-16 Thread Wangnan (F)
On 2015/12/17 13:10, Naveen N. Rao wrote: On 2015/12/17 01:43AM, Wang Nan wrote: After this patch other directories can use this architecture detector without directly including it from perf's directory. Libbpf would utilize it to get proper $(ARCH) so it can receive correct uapi include direc

Re: [RESEND PATCH v4 2/3] tools: Move Makefile.arch from perf/config to tools/scripts

2015-12-16 Thread Naveen N. Rao
On 2015/12/17 01:43AM, Wang Nan wrote: > After this patch other directories can use this architecture detector > without directly including it from perf's directory. Libbpf would > utilize it to get proper $(ARCH) so it can receive correct uapi include > directory. > > Signed-off-by: Wang Nan > A

Re: [PATCH v4] perf: bpf: Fix build breakage due to libbpf

2015-12-16 Thread Naveen N. Rao
On 2015/12/17 09:29AM, Wang Nan wrote: > > > On 2015/12/17 3:42, Arnaldo Carvalho de Melo wrote: > >Em Tue, Dec 15, 2015 at 05:10:46PM +0530, Naveen N. Rao escreveu: > >>On 2015/12/15 08:51AM, Wang Nan wrote: > >>>From: "Naveen N. Rao" > >>> > >>>perf build is currently (v4.4-rc5) broken on powe

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Aravinda Prasad
On Thursday 17 December 2015 08:02 AM, David Gibson wrote: > On Wed, Dec 16, 2015 at 11:26:12AM +0530, Aravinda Prasad wrote: >> This patch modifies KVM to cause a guest exit with >> KVM_EXIT_NMI instead of immediately delivering a 0x200 >> interrupt to guest upon machine check exception in >> gu

Re: powerpc/vdso: Remove sys_ni_syscall and sys_call_table prototypes

2015-12-16 Thread Michael Ellerman
On Thu, 2015-03-12 at 11:31:06 UTC, Anton Blanchard wrote: > Prototypes for sys_ni_syscall and sys_call_table are available > in header files, so remove the prototypes in c code. > > This was noticed when building with -flto, because the prototype for > sys_ni_syscall doesn't match the function an

[PATCH v3 3/3] platforms/powernv: Add support for Nvlink NPUs

2015-12-16 Thread Alistair Popple
NVLink is a high speed interconnect that is used in conjunction with a PCI-E connection to create an interface between CPU and GPU that provides very high data bandwidth. A PCI-E connection to a GPU is used as the control path to initiate and report status of large data transfers sent via the NVLin

[PATCH v3 2/3] powerpc: Add __raw_rm_writeq() function

2015-12-16 Thread Alistair Popple
Move __raw_rw_writeq() from platforms/powernv/pci-ioda.c to include/asm/io.h so that it can be used by other code. Signed-off-by: Alistair Popple --- arch/powerpc/include/asm/io.h | 11 +++ arch/powerpc/platforms/powernv/pci-ioda.c | 10 -- 2 files changed, 11 inserti

[PATCH v3 1/3] Revert "powerpc/pci: Remove unused struct pci_dn.pcidev field"

2015-12-16 Thread Alistair Popple
This commit removed the pcidev field from struct pci_dn as it was no longer in use by the kernel. However to support finding the association of Nvlink devices to GPU devices from the device-tree this field is required. This reverts commit 250c7b277c65 ("powerpc/pci: Remove unused struct pci_dn.pci

[PATCH v3 0/3] Add support for NVLink

2015-12-16 Thread Alistair Popple
This series adds support for NVLink, a high speed interconnect that is used in conjunction with PCI-E to create a high bandwidth interface between GPU and CPU. As the NVLink hardware interface is similar to IBM's existing PCIe host bridges no major new kernel or user interfaces are added by this p

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread David Gibson
On Wed, Dec 16, 2015 at 11:26:12AM +0530, Aravinda Prasad wrote: > This patch modifies KVM to cause a guest exit with > KVM_EXIT_NMI instead of immediately delivering a 0x200 > interrupt to guest upon machine check exception in > guest address. Exiting the guest enables QEMU to build > error log an

[RESEND PATCH v4 2/3] tools: Move Makefile.arch from perf/config to tools/scripts

2015-12-16 Thread Wang Nan
After this patch other directories can use this architecture detector without directly including it from perf's directory. Libbpf would utilize it to get proper $(ARCH) so it can receive correct uapi include directory. Signed-off-by: Wang Nan Acked-by: Jiri Olsa Tested-by: Naveen N. Rao Cc: Arn

[RESEND PATCH v4 3/3] perf: bpf: Fix build breakage due to libbpf

2015-12-16 Thread Wang Nan
From: "Naveen N. Rao" perf build is currently (v4.4-rc5) broken on powerpc: bpf.c:28:4: error: #error __NR_bpf not defined. libbpf does not support your arch. # error __NR_bpf not defined. libbpf does not support your arch. ^ Fix this by including tools/scripts/Makefile.arch for the prope

[RESEND PATCH v4 0/3] perf build: PowerPC: Fix build breakage due to libbpf

2015-12-16 Thread Wang Nan
Fix PowerPC build breakage found by Naveen. Perf building should not be blocked if BPF syscall is broken in some platform. In v3 a problem in 3/3 is found and fixed, but I only sent v4 of 3/3. Send all 3 patches together again. Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Naveen N. Rao Cc:

[RESEND PATCH v4 1/3] perf tools: Fix PowerPC native building

2015-12-16 Thread Wang Nan
Checks BPF syscall number, turn off libbpf building on platform doesn't correctly support sys_bpf instead of blocking compiling. Reported-by: Naveen N. Rao Acked-by: Jiri Olsa Tested-by: Naveen N. Rao Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Sukadev Bhattiprolu --- tools/bui

Re: [PATCH v4] perf: bpf: Fix build breakage due to libbpf

2015-12-16 Thread Wangnan (F)
On 2015/12/17 3:42, Arnaldo Carvalho de Melo wrote: Em Tue, Dec 15, 2015 at 05:10:46PM +0530, Naveen N. Rao escreveu: On 2015/12/15 08:51AM, Wang Nan wrote: From: "Naveen N. Rao" perf build is currently (v4.4-rc5) broken on powerpc: bpf.c:28:4: error: #error __NR_bpf not defined. libbpf do

Re: [PATCH] 82xx: FCC: Fixing a bug causing to FCC port lock-up

2015-12-16 Thread David Miller
From: Martin Roth Date: Tue, 15 Dec 2015 04:17:53 +0200 > The patch fixes FCC port lock-up, which occurs as a result of a bug > during underrun/collision handling. Within the tx_startup() function > in mac-fcc.c, the address of last BD is not calculated correctly. > As a result of wrong calculati

[PATCH v3 6/6] powerpc/pseries: Enable kernel CPU dlpar from sysfs

2015-12-16 Thread Nathan Fontenot
Enable new kernel cpu hotplug functionality by allowing cpu dlpar requests to be initiated from sysfs. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/pla

[PATCH v3 4/6] powerpc/pseries: Add CPU dlpar remove functionality

2015-12-16 Thread Nathan Fontenot
Add the ability to dlpar remove CPUs via hotplug rtas events, either by specifying the drc-index of the CPU to remove or providing a count of cpus to remove. To remove multiple cpus in a single request we create a list of possible DR (Dynamic Reconfiguration) cpus and their drc indexes that can be

[PATCH v3 5/6] powerpc/pseries: Add CPU dlpar add functionality

2015-12-16 Thread Nathan Fontenot
Add the ability to hotplug add cpus via rtas hotplug events by either specifying the drc index of the CPU to add, or providing a count of the number of CPUs to add. Signed-off-by: Nathan Fontenot --- v3: - Add new routine valid_cpu_drc_index() to validate the drc index of a CPU before trying

[PATCH v3 3/6] powerpc/pseries: Update CPU hotplug error recovery

2015-12-16 Thread Nathan Fontenot
Update the cpu dlpar add/remove paths to do better error recovery when a failure occurs during the add/remove operation. Signed-off-by: Nathan Fontenot --- v2: - Corrected some pr_* statements moving pr_info to pr_debug statements and pr_debug to pr_warn statements. arch/powerpc/platforms/p

[PATCH v3 2/6] powerpc/pseries: Factor out common cpu hotplug code

2015-12-16 Thread Nathan Fontenot
Re-factor the cpu hotplug code to support doing cpu hotplug completely in the kernel and using the existing sysfs probe/release interfaces. This patch pulls out pieces of existing cpu hotplug code into common routines, dlpar_cpu_add() and dlpar_cpu_remove(), to be used by both interfaces. There are

[PATCH v3 1/6] powerpc/pseries: Consolidate CPU hotplug code to hotplug-cpu.c

2015-12-16 Thread Nathan Fontenot
No functional changes, this patch is simply a move of the cpu hotplug code from pseries/dlpar.c to pseries/hotplug-cpu.c. This is in an effort to consolidate all of the cpu hotplug code in a common place. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c | 226

[PATCH v3] powerpc/pseries: Move CPU DLPAR into the kernel

2015-12-16 Thread Nathan Fontenot
To better support CPU hotplug in PowerKVM and PowerVM environments, the handling of CPU dlpar should be done entirely in the kernel. This will allow a common entry point to be used for PowerVM and PowerKVM CPU dlpar requests. For both environments the entry point is the same one introduced in a pr

RE: [PATCH 1/1] powerpc/irq: tidy up inconsistent context in migrate_irqs()

2015-12-16 Thread Zhang Zhuoyu
> -Original Message- > From: Denis Kirjanov [mailto:k...@linux-powerpc.org] > Sent: Wednesday, December 16, 2015 7:55 PM > To: Michael Ellerman > Cc: Daniel Axtens; Zhang Zhuoyu; b...@kernel.crashing.org; > pau...@samba.org; t...@linutronix.de; jiang@linux.intel.com; > zhangzhu...@cmss

Re: [RFC PATCH 3/3] vfio-pci: Allow to mmap MSI-X table if EEH is supported

2015-12-16 Thread Alex Williamson
On Fri, 2015-12-11 at 16:53 +0800, Yongji Xie wrote: > Current vfio-pci implementation disallows to mmap MSI-X table in > case that user get to touch this directly. > > However, EEH mechanism could ensure that a given pci device > can only shoot the MSIs assigned for its PE and guest kernel also >

Re: [RFC PATCH 2/3] vfio-pci: Allow to mmap sub-page MMIO BARs if all MMIO BARs are page aligned

2015-12-16 Thread Alex Williamson
On Fri, 2015-12-11 at 16:53 +0800, Yongji Xie wrote: > Current vfio-pci implementation disallows to mmap > sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio page > may be shared with other BARs. > > But we should allow to mmap these sub-page MMIO BARs if all MMIO BARs > are page aligne

Re: [PATCH v4] perf: bpf: Fix build breakage due to libbpf

2015-12-16 Thread Arnaldo Carvalho de Melo
Em Tue, Dec 15, 2015 at 05:10:46PM +0530, Naveen N. Rao escreveu: > On 2015/12/15 08:51AM, Wang Nan wrote: > > From: "Naveen N. Rao" > > > > perf build is currently (v4.4-rc5) broken on powerpc: > > > > bpf.c:28:4: error: #error __NR_bpf not defined. libbpf does not support > > your arch. > > #

Re: [RFC][PATCH] ppc: Implement save_stack_trace_regs()

2015-12-16 Thread Steven Rostedt
On Wed, 09 Dec 2015 12:03:05 +1100 Michael Ellerman wrote: > > > Should I take this via powerpc or do you want it to go in via tracing? > > > > You can take it. And you can replace the PT_R1 if you want. I just > > noticed that it was defined, and I try to use macro names instead of > > hard c

Re: [PATCH 1/1] powerpc/irq: tidy up inconsistent context in migrate_irqs()

2015-12-16 Thread Denis Kirjanov
On 12/16/15, Michael Ellerman wrote: > On Wed, 2015-12-16 at 17:08 +1100, Daniel Axtens wrote: >> Hi, >> >> A couple of things. >> >> Firstly, your two email addresses don't match: >> >> Zhang Zhuoyu writes: > >> > From: Zhang Zhuoyu >> >> These lines do seem odd! Are they causing a problem? >>

Re: [PATCH 1/1] powerpc/irq: tidy up inconsistent context in migrate_irqs()

2015-12-16 Thread Michael Ellerman
On Wed, 2015-12-16 at 17:08 +1100, Daniel Axtens wrote: > Hi, > > A couple of things. > > Firstly, your two email addresses don't match: > > Zhang Zhuoyu writes: > > From: Zhang Zhuoyu > > These lines do seem odd! Are they causing a problem? > > I'd be more comfortable removing them if I un

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Aravinda Prasad
On Wednesday 16 December 2015 03:10 PM, Thomas Huth wrote: > On 16/12/15 06:56, Aravinda Prasad wrote: >> This patch modifies KVM to cause a guest exit with >> KVM_EXIT_NMI instead of immediately delivering a 0x200 >> interrupt to guest upon machine check exception in >> guest address. Exiting th

[PATCH] Partial revert of "powerpc: Individual System V IPC system calls"

2015-12-16 Thread Michael Ellerman
This partially reverts commit a34236155afb1cc41945e58388ac988431bcb0b8. While reviewing the glibc patch to exploit the individual IPC calls, Arnd & Andreas noticed that we were still requiring userspace to pass IPC_64 in order to get the new style IPC API. With a bit of cleanup in the kernel we c

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Thomas Huth
On 16/12/15 06:56, Aravinda Prasad wrote: > This patch modifies KVM to cause a guest exit with > KVM_EXIT_NMI instead of immediately delivering a 0x200 > interrupt to guest upon machine check exception in > guest address. Exiting the guest enables QEMU to build > error log and deliver machine check