Re: questions around Book III-E and branch trace

2013-04-18 Thread Benjamin Herrenschmidt
On Wed, 2013-04-17 at 12:44 -0600, Chris Friesen wrote: Hi, I'm trying to wrap my head around how linux handles branch tracing on Book III-E. I think I understand how we set MSR[DE] and DBCR0[IDM|BT], and how we handle fixing things up if an instruction being traced causes an exception.

Re: [PATCH] powerpc/mm: Use tlbiel for 4KB pages

2013-04-18 Thread Benjamin Herrenschmidt
On Thu, 2013-04-18 at 13:33 +0800, Gavin Shan wrote: The firmware should have supplied correct information for the kernel to figure out the page size array, which is traced by mmu_psize_defs[]. Otherwise, the kernel will fail back to use solely 4KB page size and copy mmu_psize_defaults_old[]

linux-next: manual merge of the ppc-temp tree with the metag tree

2013-04-18 Thread Stephen Rothwell
Hi Michael, Today's linux-next merge of the ppc-temp tree got a conflict in arch/metag/mm/Kconfig between commit 2b8660ed3bfe (memblock: Kill ARCH_POPULATES_NODE_MAP once more) from the metag tree and commit 45b02f8d94e3 (memblock: kill config MAX_ACTIVE_REGIONS) from the ppc-temp tree. I fixed

[PATCH V3 4/5] powerpc, perf: Define BHRB generic functions, data and flags for POWER8

2013-04-18 Thread Anshuman Khandual
This patch populates BHRB specific data for power_pmu structure. It also implements POWER8 specific BHRB filter and configuration functions. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 57 +- 1 file

[PATCH V3 3/5] powerpc, perf: Add new BHRB related generic functions, data and flags

2013-04-18 Thread Anshuman Khandual
This patch adds couple of generic functions to power_pmu structure which would configure the BHRB and it's filters. It also adds representation of the number of BHRB entries present on the PMU. A new PMU flag PPMU_BHRB would indicate presence of BHRB feature. Signed-off-by: Anshuman Khandual

[PATCH V3 1/5] powerpc, perf: Add new BHRB related instructions for POWER8

2013-04-18 Thread Anshuman Khandual
This patch adds new POWER8 instruction encoding for reading the BHRB buffer entries and also clearing it. Encoding for clrbhrb instruction is straight forward. But mfbhrbe encoding involves reading a certain index of BHRB buffer into a particular GPR register. Signed-off-by: Anshuman Khandual

[PATCH V3 5/5] powerpc, perf: Enable branch stack sampling framework

2013-04-18 Thread Anshuman Khandual
Provides basic enablement for perf branch stack sampling framework on POWER8 processor based platforms. Adds new BHRB related elements into cpu_hw_event structure to represent current BHRB config, BHRB filter configuration, manage context and to hold output BHRB buffer during PMU interrupt before

[PATCH V3 2/5] powerpc, perf: Add basic assembly code to read BHRB entries on POWER8

2013-04-18 Thread Anshuman Khandual
This patch adds the basic assembly code to read BHRB buffer. BHRB entries are valid only after a PMU interrupt has happened (when MMCR0[PMAO]=1) and BHRB has been freezed. BHRB read should not be attempted when it is still enabled (MMCR0[PMAE]=1) and getting updated, as this can produce

[PATCH V3 0/5] powerpc, perf: BHRB based branch stack enablement on POWER8

2013-04-18 Thread Anshuman Khandual
Branch History Rolling Buffer (BHRB) is a new PMU feaure in IBM POWER8 processor which records the branch instructions inside the execution pipeline. This patchset enables the basic functionality of the feature through generic perf branch stack sampling framework. Sample output

Re: [PATCH v7 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC

2013-04-18 Thread Grant Likely
On Wed, 17 Apr 2013 12:22:23 -0400, Jason Cooper ja...@lakedaemon.net wrote: On Wed, Apr 17, 2013 at 05:17:48PM +0100, Grant Likely wrote: On Wed, Apr 17, 2013 at 5:10 PM, Jason Cooper ja...@lakedaemon.net wrote: On Wed, Apr 17, 2013 at 05:00:15PM +0100, Grant Likely wrote: On Tue, 16 Apr

Re: [PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-18 Thread Andrew Murray
On Wed, Apr 17, 2013 at 04:42:48PM +0100, Linus Walleij wrote: On Tue, Apr 16, 2013 at 12:18 PM, Andrew Murray andrew.mur...@arm.com wrote: This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray andrew.mur...@arm.com

Re: [PATCH v7 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC

2013-04-18 Thread Jason Cooper
On Thu, Apr 18, 2013 at 01:48:32PM +0100, Grant Likely wrote: On Wed, 17 Apr 2013 12:22:23 -0400, Jason Cooper ja...@lakedaemon.net wrote: On Wed, Apr 17, 2013 at 05:17:48PM +0100, Grant Likely wrote: On Wed, Apr 17, 2013 at 5:10 PM, Jason Cooper ja...@lakedaemon.net wrote: On Wed,

Re: [PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-18 Thread Jason Cooper
On Thu, Apr 18, 2013 at 01:59:10PM +0100, Andrew Murray wrote: On Wed, Apr 17, 2013 at 04:42:48PM +0100, Linus Walleij wrote: On Tue, Apr 16, 2013 at 12:18 PM, Andrew Murray andrew.mur...@arm.com wrote: This patch converts the pci_load_of_ranges function to use the new common

Re: [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-18 Thread Grant Likely
On Tue, 16 Apr 2013 11:18:27 +0100, Andrew Murray andrew.mur...@arm.com wrote: This patch factors out common implementation patterns to reduce overall kernel code and provide a means for host bridge drivers to directly obtain struct resources from the DT's ranges property without relying on

Re: [PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-18 Thread Grant Likely
On Tue, 16 Apr 2013 11:18:28 +0100, Andrew Murray andrew.mur...@arm.com wrote: This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray andrew.mur...@arm.com Signed-off-by: Liviu Dudau liviu.du...@arm.com Reviewed-by: Rob

Re: [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-18 Thread Andrew Murray
On Thu, Apr 18, 2013 at 02:44:01PM +0100, Grant Likely wrote: On Tue, 16 Apr 2013 11:18:27 +0100, Andrew Murray andrew.mur...@arm.com wrote: This patch factors out common implementation patterns to reduce overall kernel code and provide a means for host bridge drivers to directly obtain

Re: [PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-18 Thread Andrew Murray
On Thu, Apr 18, 2013 at 02:45:35PM +0100, Grant Likely wrote: On Tue, 16 Apr 2013 11:18:28 +0100, Andrew Murray andrew.mur...@arm.com wrote: This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray andrew.mur...@arm.com

Re: [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-18 Thread Grant Likely
On Thu, Apr 18, 2013 at 3:24 PM, Andrew Murray andrew.mur...@arm.com wrote: On Thu, Apr 18, 2013 at 02:44:01PM +0100, Grant Likely wrote: On Tue, 16 Apr 2013 11:18:27 +0100, Andrew Murray andrew.mur...@arm.com wrote: /* Act based on address space type */ res = NULL;

Re: [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-18 Thread Andrew Murray
On Thu, Apr 18, 2013 at 04:29:54PM +0100, Grant Likely wrote: On Thu, Apr 18, 2013 at 3:24 PM, Andrew Murray andrew.mur...@arm.com wrote: On Thu, Apr 18, 2013 at 02:44:01PM +0100, Grant Likely wrote: On Tue, 16 Apr 2013 11:18:27 +0100, Andrew Murray andrew.mur...@arm.com wrote:

Re: [PATCH 04/28] proc: Supply PDE attribute setting accessor functions [RFC]

2013-04-18 Thread Bjorn Helgaas
On Tue, Apr 16, 2013 at 12:26 PM, David Howells dhowe...@redhat.com wrote: Supply accessor functions to set attributes in proc_dir_entry structs. The following are supplied: proc_set_size() and proc_set_user(). Signed-off-by: David Howells dhowe...@redhat.com cc:

Re: [PATCH] [RFC] powerpc: Add VDSO version of time

2013-04-18 Thread Anton Blanchard
Hi Adhemerval, This patch implement the time syscall as vDSO. I have a glibc patch to use it as IFUNC (as latest gettimeofday patch). Below the perf numbers: Baseline PPC32: 380 nsec Baseline PPC64: 352 nsec vdso PPC32: 20 nsec vdso PPC64: 20 nsec Very nice speedup. One small

Re: [PATCH -V5 00/25] THP support for PPC64

2013-04-18 Thread Simon Jeons
Hi Aneesh, On 04/04/2013 01:57 PM, Aneesh Kumar K.V wrote: Hi, This patchset adds transparent hugepage support for PPC64. TODO: * hash preload support in update_mmu_cache_pmd (we don't do that for hugetlb) Some numbers: The latency measurements code from Anton found at

Re: [RFC PATCH powerpc] make CONFIG_NUMA depends on CONFIG_SMP

2013-04-18 Thread Li Zhong
On Thu, 2013-04-18 at 11:46 +1000, Michael Ellerman wrote: On Wed, May 30, 2012 at 05:31:58PM +0800, Li Zhong wrote: I'm not sure whether it makes sense to add this dependency to avoid CONFI_NUMA !CONFIG_SMP. I want to do this because I saw some build errors on next-tree when