Re: [RFC PATCH] powerpc: allow allyesconfig to build more

2014-02-27 Thread Benjamin Herrenschmidt
On Fri, 2014-02-28 at 15:06 +1100, Michael Neuling wrote: > Stephen Rothwell wrote: > > > Fixes this build error: > > > > arch/powerpc/kernel/exceptions-64s.S: Assembler messages: > > arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org > > backwards > > > > Signed-off-by: St

Re: [PATCH] mm: numa: bugfix for LAST_CPUPID_NOT_IN_PAGE_FLAGS

2014-02-27 Thread liu ping fan
On Fri, Feb 28, 2014 at 12:47 PM, Aneesh Kumar K.V wrote: > Andrew Morton writes: > >> On Wed, 26 Feb 2014 13:22:16 +0530 "Aneesh Kumar K.V" >> wrote: >> >>> Andrew Morton writes: >>> >>> > On Wed, 5 Feb 2014 09:25:46 +0800 Liu Ping Fan >>> > wrote: >>> > >>> >> When doing some numa tests o

[PATCH 2/2] powerpc/perf: Add lost exception workaround

2014-02-27 Thread Michael Ellerman
Some power8 revisions have a hardware bug where we can lose a PMU exception, this commit adds a workaround to detect the bad condition and rectify the situation. See the comment in the commit for a full description. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/reg.h | 2 + ar

[PATCH 1/2] powerpc: Add a cpu feature CPU_FTR_PMAO_BUG

2014-02-27 Thread Michael Ellerman
Some power8 revisions have a hardware bug where we can lose a Performance Monitor (PMU) exception under certain circumstances. We will be adding a workaround for this case, see the next commit for details. The observed behaviour is that writing PMAO doesn't cause an exception as we would expect, h

[PATCH V2] mm: numa: bugfix for LAST_CPUPID_NOT_IN_PAGE_FLAGS

2014-02-27 Thread Aneesh Kumar K.V
From: Liu Ping Fan When doing some numa tests on powerpc, I triggered an oops bug. I find it is caused by using page->_last_cpupid. It should be initialized as "-1 & LAST_CPUPID_MASK", but not "-1". Otherwise, in task_numa_fault(), we will miss the checking (last_cpupid == (-1 & LAST_CPUPID_MASK

[PATCH 2/2] powerpc/powernv: Fix indirect XSCOM unmangling

2014-02-27 Thread Benjamin Herrenschmidt
We need to unmangle the full address, not just the register number, and we also need to support the real indirect bit being set for in-kernel uses. Signed-off-by: Benjamin Herrenschmidt CC: [v3.13] --- arch/powerpc/platforms/powernv/opal-xscom.c | 21 - 1 file changed, 12 in

[PATCH 1/2] powerpc/powernv: Fix opal_xscom_{read,write} prototype

2014-02-27 Thread Benjamin Herrenschmidt
The OPAL firmware functions opal_xscom_read and opal_xscom_write take a 64-bit argument for the XSCOM (PCB) address in order to support the indirect mode on P8. Signed-off-by: Benjamin Herrenschmidt CC: [v3.13] --- arch/powerpc/include/asm/opal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 del

Re: [PATCH] mm: numa: bugfix for LAST_CPUPID_NOT_IN_PAGE_FLAGS

2014-02-27 Thread Aneesh Kumar K.V
Andrew Morton writes: > On Wed, 26 Feb 2014 13:22:16 +0530 "Aneesh Kumar K.V" > wrote: > >> Andrew Morton writes: >> >> > On Wed, 5 Feb 2014 09:25:46 +0800 Liu Ping Fan wrote: >> > >> >> When doing some numa tests on powerpc, I triggered an oops bug. I find >> >> it is caused by using page-

Re: [RFC PATCH] powerpc: allow allyesconfig to build more

2014-02-27 Thread Michael Neuling
Stephen Rothwell wrote: > Fixes this build error: > > arch/powerpc/kernel/exceptions-64s.S: Assembler messages: > arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org > backwards > > Signed-off-by: Stephen Rothwell Builds and boots for me Acked-off-by: Michael Neuling >

Re: [PATCH] mm: numa: bugfix for LAST_CPUPID_NOT_IN_PAGE_FLAGS

2014-02-27 Thread liu ping fan
On Fri, Feb 28, 2014 at 7:41 AM, Andrew Morton wrote: > On Wed, 26 Feb 2014 13:22:16 +0530 "Aneesh Kumar K.V" > wrote: > >> Andrew Morton writes: >> >> > On Wed, 5 Feb 2014 09:25:46 +0800 Liu Ping Fan wrote: >> > >> >> When doing some numa tests on powerpc, I triggered an oops bug. I find >>

[PATCH] powerpc/powernv: Read OPAL error log and export it through sysfs

2014-02-27 Thread Stewart Smith
Based on a patch by: Mahesh Salgaonkar This patch adds support to read error logs from OPAL and export them to userspace through a sysfs interface. We export each log entry as a directory in /sys/firmware/opal/elog/ Currently, OPAL will buffer up to 128 error log records, we don't need to have

Re: [PATCH] mm: numa: bugfix for LAST_CPUPID_NOT_IN_PAGE_FLAGS

2014-02-27 Thread Andrew Morton
On Wed, 26 Feb 2014 13:22:16 +0530 "Aneesh Kumar K.V" wrote: > Andrew Morton writes: > > > On Wed, 5 Feb 2014 09:25:46 +0800 Liu Ping Fan wrote: > > > >> When doing some numa tests on powerpc, I triggered an oops bug. I find > >> it is caused by using page->_last_cpupid. It should be initia

[PATCH v3 11/11] powerpc/perf/hv_{gpci, 24x7}: add documentation of device attributes

2014-02-27 Thread Cody P Schafer
gpci and 24x7 expose some device specific attributes. Add some documentation for them. Signed-off-by: Cody P Schafer --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 23 .../testing/sysfs-bus-event_source-devices-hv_gpci | 43 ++ 2 files changed, 66 inser

[PATCH v3 10/11] powerpc/perf: add kconfig option for hypervisor provided counters

2014-02-27 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/pseries/Kconfig | 12 2 files changed, 14 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..f9c083a 100644 --- a/arch/powerpc/perf

[PATCH v3 09/11] powerpc/perf: add support for the hv 24x7 interface

2014-02-27 Thread Cody P Schafer
This provides a basic interface between hv_24x7 and perf. Similar to the one provided for gpci, it lacks transaction support and does not list any events. Example usage via perf tool: perf stat -e 'hv_24x7/domain=2,offset=8,starting_index=0,lpar=0x/' -r 0 -C 0 -x ' ' sleep 0.1

[PATCH v3 08/11] powerpc/perf: add support for the hv gpci (get performance counter info) interface

2014-02-27 Thread Cody P Schafer
This provides a basic link between perf and hv_gpci. Notably, it does not yet support transactions and does not list any events (they can still be manually composed). Example usage via perf tool: perf stat -e 'hv_gpci/counter_info_version=3,offset=0,length=8,secondary_index=0,starting_in

[PATCH v3 07/11] powerpc/perf: add a shared interface to get gpci version and capabilities

2014-02-27 Thread Cody P Schafer
This exposes a simple way to grab the firmware provided collect_priveliged, ga, expanded, and lab capability bits. All of these bits come in from the same gpci request, so we've exposed all of them. Only the collect_priveliged bit is really used by the hv-gpci/hv-24x7 code, the other bits are simp

[PATCH v3 06/11] powerpc/perf: add 24x7 interface headers

2014-02-27 Thread Cody P Schafer
24x7 (also called hv_24x7 or H_24X7) is an interface to obtain performance counters from the hypervisor. These counters do not have a fixed format/possition and are instead documented in a "24x7 Catalog", which is provided by the hypervisor (that interface is also documented paritialy in the includ

[PATCH v3 05/11] powerpc/perf: add hv_gpci interface header

2014-02-27 Thread Cody P Schafer
"H_GetPerformanceCounterInfo" (refered to as hv_gpci or just gpci from here on) is an interface to retrieve specific performance counters and other data from the hypervisor. All outputs have a fixed format. This header only describes the portions of the interface that we plan on using in linux at t

[PATCH v3 02/11] perf: add PMU_FORMAT_RANGE() helper for use by sw-like pmus

2014-02-27 Thread Cody P Schafer
Add PMU_FORMAT_RANGE() and PMU_FORMAT_RANGE_RESERVED() (for reserved areas) which generate functions to extract the relevent bits from event->attr.config{,1,2} for use by sw-like pmus where the 'config{,1,2}' values don't map directly to hardware registers. Signed-off-by: Cody P Schafer --- incl

[PATCH v3 03/11] perf: provide a common perf_event_nop_0() for use with .event_idx

2014-02-27 Thread Cody P Schafer
Rather an having every pmu that needs a function that just returns 0 for .event_idx define their own copy, reuse the one in kernel/events/core.c. Rename from perf_swevent_event_idx() because we're no longer using it for just software events. Naming is based on the perf_pmu_nop_*() functions. Sign

[PATCH v3 04/11] powerpc: add hvcalls for 24x7 and gpci (get performance counter info)

2014-02-27 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- arch/powerpc/include/asm/hvcall.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index d8b600b..5dbbb29 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/

[PATCH v3 00/11] powerpc: Add support for Power Hypervisor supplied performance counters

2014-02-27 Thread Cody P Schafer
These patches add basic pmus for 2 powerpc hypervisor interfaces to obtain performance counters: gpci ("get performance counter info") and 24x7. The counters supplied by these interfaces are continually counting and never need to be (and cannot be) disabled or enabled. They additionally do not gen

[PATCH v3 01/11] sysfs: create bin_attributes under the requested group

2014-02-27 Thread Cody P Schafer
bin_attributes created/updated in create_files() (such as those listed via (struct device).attribute_groups) were not placed under the specified group, and instead appeared in the base kobj directory. Fix this by making bin_attributes use creating code similar to normal attributes. A quick grep s

[PATCH] Fix physical address range check comparision and force address to be virtual address

2014-02-27 Thread Benjamin Krill
The previous code added wrong TLBs and causes machine check errors. Signed-off-by: Ralph E. Bellofatto Signed-off-by: Benjamin Krill --- arch/powerpc/mm/tlb_low_64e.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64

Re: [PATCH v2 02/11] perf core: export swevent hrtimer helpers

2014-02-27 Thread Cody P Schafer
On 02/26/2014 12:29 AM, Peter Zijlstra wrote: On Tue, Feb 25, 2014 at 01:38:31PM -0800, Cody P Schafer wrote: On 02/25/2014 02:20 AM, Peter Zijlstra wrote: On Tue, Feb 25, 2014 at 02:33:26PM +1100, Michael Ellerman wrote: On Fri, 2014-14-02 at 22:02:06 UTC, Cody P Schafer wrote: Export the sw