[PATCH 4/5] powerpc/perf: Change name type of 'pred' in power_pmu_bhrb_read

2015-06-30 Thread Anshuman Khandual
Branch record attributes 'mispred' and 'predicted' are single bit fields as defined in the perf ABI. Hence the data type of the field 'pred' used during BHRB processing should be changed from integer to bool. This patch also changes the name of the variable from 'pred' to 'mispred' making the

[PATCH V10 2/8] powerpc/perf: Re organize BHRB processing

2015-06-30 Thread Anshuman Khandual
This patch cleans up some existing indentation problem in code and re organizes the BHRB processing code with an helper function named 'update_branch_entry' making it more readable. This patch does not change any functionality. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com ---

[PATCH V10 1/8] powerpc/perf: Restore privilege level filter support for BHRB

2015-06-30 Thread Anshuman Khandual
'commit 9de5cb0f6df8 (powerpc/perf: Add per-event excludes on Power8)' broke the PMU based BHRB privilege level filter. BHRB depends on the same MMCR0 bits for privilege level filter which was used to freeze all the PMCs as a group. Once we moved to individual event based privilege filters through

[PATCH 0/5] BHRB fixes, improvements and cleanups

2015-06-30 Thread Anshuman Khandual
The five generic patches from BHRB SW branch filter enablement series have been separated and grouped together in this series. These patches are required to be applied before using the upcoming V10 of the BHRB SW branch filter patch series. Anshuman Khandual (5): powerpc/perf: Drop the

[PATCH 5/5] powerpc/perf: Re organize PMU branch filter processing on POWER8

2015-06-30 Thread Anshuman Khandual
This patch does some code re-arrangements to make it clear that kernel ignores any separate privilege level branch filter request and does not support any combinations of HW PMU branch filters. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 22

[PATCH 2/5] powerpc/perf: Change type of the bhrb_users variable

2015-06-30 Thread Anshuman Khandual
This patch just changes data type of bhrb_users variable from int to unsigned int because it never contains a negative value. Reported-by: Daniel Axtens d...@axtens.net Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/core-book3s.c | 4 ++-- 1 file changed, 2

[PATCH 1/5] powerpc/perf: Drop the branch sample when 'from' cannot be fetched

2015-06-30 Thread Anshuman Khandual
BHRB (Branch History Rolling Buffer) is a rolling buffer. Hence we might end up in a situation where we have read one target address but when we try to read the next entry indicating the from address of the target address, the buffer just overflows. In this case, the captured from address will be

[PATCH V10 8/8] selftests/powerpc: Add test for BHRB branch filters (HW SW)

2015-06-30 Thread Anshuman Khandual
This patch adds a test for verifying that all the branch stack sampling filters supported on powerpc work correctly. It also adds some assembly helper functions in this regard. This patch extends the generic event description to handle kernel mapped ring buffers. Signed-off-by: Anshuman Khandual

[PATCH 3/5] powerpc/perf: Replace last usage of get_cpu_var with this_cpu_ptr

2015-06-30 Thread Anshuman Khandual
The commit 69111bac42f5ce (powerpc: Replace __get_cpu_var uses) replaced all usage of get_cpu_var with this_cpu_ptr inside core perf event handling on powerpc. But it skipped one of them which is being replaced with this patch. Reported-by: Daniel Axtens d...@axtens.net Signed-off-by: Anshuman

[PATCH V10 5/8] powerpc/perf: Enable SW filtering in branch stack sampling framework

2015-06-30 Thread Anshuman Khandual
This patch enables SW based post processing of BHRB captured branches to be able to meet more user defined branch filtration criteria in perf branch stack sampling framework. These changes increase the number of branch filters and their valid combinations on any powerpc64 server platform with BHRB

[PATCH V10 6/8] powerpc/perf: Change POWER8 PMU configuration to work with SW filters

2015-06-30 Thread Anshuman Khandual
The kernel now supports SW based branch filters for book3s systems with some specific requirements while dealing with HW supported branch filters in order to achieve overall OR semantics prevailing in perf branch stack sampling framework. This patch adapts the BHRB branch filter configuration to

Re: [PATCH] macintosh: Delete an unnecessary check before the function call of_node_put

2015-06-30 Thread SF Markus Elfring
Am 04.02.2015 um 21:36 schrieb SF Markus Elfring: From: Markus Elfring elfr...@users.sourceforge.net Date: Wed, 4 Feb 2015 21:32:27 +0100 The of_node_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was

[PATCH V10 7/8] powerpc/perf: Enable privilege mode SW branch filters

2015-06-30 Thread Anshuman Khandual
This patch enables privilege mode SW branch filters. Also modifies POWER8 PMU branch filter configuration so that the privilege mode branch filter implemented as part of base PMU event configuration is reflected in bhrb filter mask. As a result, the SW will skip and not try to process the

[PATCH V10 4/8] powerpc/lib: Add new branch analysis support functions

2015-06-30 Thread Anshuman Khandual
Generic powerpc branch analysis support added in the code patching library which will help the subsequent patch on SW based filtering of branch records in perf. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/code-patching.h | 15

[PATCH V10 3/8] powerpc/perf: Change the name of HW PMU branch filter tracking variable

2015-06-30 Thread Anshuman Khandual
This patch simply changes the name of the variable from 'bhrb_filter' to 'bhrb_hw_filter' in order to add one more variable which will track SW filters in generic powerpc book3s code which will be implemented in the subsequent patch. This patch does not change any functionality. Signed-off-by:

[PATCH V10 0/8] powerpc/perf: Enable SW branch filters

2015-06-30 Thread Anshuman Khandual
This is the continuation (rebased and reworked) of the series posted at https://lkml.org/lkml/2014/5/5/153 (which is V6). I remember to have incremented the version count for the re-send of the first four patches of the series to Peter Z for generic review which got pulled in last year.

Re: [PATCH v5 42/42] pci/hotplug: PowerPC PowerNV PCI hotplug driver

2015-06-30 Thread Gavin Shan
On Tue, Jun 30, 2015 at 07:18:04PM +0100, Grant Likely wrote: On Thu, 4 Jun 2015 16:42:11 +1000 , Gavin Shan gws...@linux.vnet.ibm.com wrote: The patch intends to add standalone driver to support PCI hotplug for PowerPC PowerNV platform, which runs on top of skiboot firmware. The firmware

Re: [PATCH SLOF v3 5/5] disk-label: add support for booting from GPT FAT partition

2015-06-30 Thread Nikunj A Dadhania
Thomas Huth th...@redhat.com writes: Sorry, every time I look at this gpt stuff, my eyes stumble over something new ... No worries :-) On Tue, 30 Jun 2015 16:31:21 +0530 Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: For a GPT+LVM combination disk, older bootloader that does not

Re: [PATCH RESEND] Update kernel math-emu code from current glibc soft-fp

2015-06-30 Thread Joseph Myers
On Tue, 30 Jun 2015, Michael Ellerman wrote: Is there some way you can imagine of splitting this up into smaller chunks, so that different arches can merge the pieces separately? Well, it could be split as: 1. Rename include/math-emu to math-emu-old and update architectures for the renaming

[PATCH v2] powerpc32: rearrange instructions order in ip_fast_csum()

2015-06-30 Thread Christophe Leroy
On PPC_8xx, lwz has a 2 cycles latency, and branching also takes 2 cycles. On some other powerpc, lwz has 3 cycles. As the size of the header is minimum 5 words, we can unroll the loop for the first words to reduce number of branching, and we can re-order the instructions to limit loading

[PATCH 0/2] powerpc32: Optimise csum_partial()

2015-06-30 Thread Christophe Leroy
The purpose of this patchset is to optimise csum_partial() on powerpc32. In the first part, we remove some unneccessary instructions In the second part, we partially unloop the main loop Christophe Leroy (2): Optimise a few instructions in csum_partial() Optimise csum_partial() loop

[PATCH 1/2] powerpc32: optimise a few instructions in csum_partial()

2015-06-30 Thread Christophe Leroy
r5 does contain the value to be updated, so lets use r5 all way long for that. It makes the code more readable. To avoid confusion, it is better to use adde instead of addc The first addition is useless. Its only purpose is to clear carry. As r4 is a signed int that is always positive, this can

[PATCH 2/2] powerpc32: optimise csum_partial() loop

2015-06-30 Thread Christophe Leroy
On the 8xx, load latency is 2 cycles and taking branches also takes 2 cycles. So let's unroll the loop. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/lib/checksum_32.S | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] Fix pSeries boot failure, by returning interrupt controller node when an interrupt-map property doesn't exist

2015-06-30 Thread Grant Likely
On Tue, 30 Jun 2015 13:23:33 +1000 , Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Mon, 2015-06-29 at 18:50 -0500, Jeremy Linton wrote: This is a reformat of the patch attached to pSeries boot failure due to wrong interrupt controller. It allows of_irq_parse_raw() to return

Re: [PATCH] Fix pSeries boot failure, by returning interrupt controller node when an interrupt-map property doesn't exist

2015-06-30 Thread Jeremy Linton
On 6/30/2015 11:01 AM, Grant Likely wrote: Merged, thanks. Thanks! Jeremy, please check your mailer configuration. The patch was mangled and would not apply. I had to fix it up manually. Sorry about that, I will see about creating a better setup (aka not gmail/web client) for

Re: [PATCH v5 39/42] drivers/of: Unflatten nodes equal or deeper than specified level

2015-06-30 Thread Grant Likely
On Thu, 4 Jun 2015 16:42:08 +1000 , Gavin Shan gws...@linux.vnet.ibm.com wrote: unflatten_dt_node() is called recursively to unflatten FDT nodes with the assumption that FDT blob has only one root node, which isn't true when the FDT blob represents device sub-tree. The patch improves the

Re: [PATCH SLOF v3 5/5] disk-label: add support for booting from GPT FAT partition

2015-06-30 Thread Thomas Huth
On Tue, 30 Jun 2015 17:54:14 +0530 Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: disk-label: add support for booting from GPT FAT partition For a GPT+LVM combination disk, older bootloader that does not support LVM, cannot load kernel from LVM. The patch adds

Re: [PATCH v5 42/42] pci/hotplug: PowerPC PowerNV PCI hotplug driver

2015-06-30 Thread Grant Likely
On Thu, 4 Jun 2015 16:42:11 +1000 , Gavin Shan gws...@linux.vnet.ibm.com wrote: The patch intends to add standalone driver to support PCI hotplug for PowerPC PowerNV platform, which runs on top of skiboot firmware. The firmware identified hotpluggable slots and marked their device tree node

Re: [PATCH v5 40/42] drivers/of: Allow to specify root node in of_fdt_unflatten_tree()

2015-06-30 Thread Grant Likely
On Thu, 4 Jun 2015 16:42:09 +1000 , Gavin Shan gws...@linux.vnet.ibm.com wrote: The patch introduces one more argument to of_fdt_unflatten_tree() to specify the root node for the FDT blob, which is going to be unflattened. In the result, the function can be used to unflatten FDT blob, which

[HELP/RFC] Moving ppc8xx microcode patch from micropatch.c to firmware

2015-06-30 Thread christophe leroy
I'm trying to move the 3 microcode patches included in arch/powerpc/sysdev/micropatch.c into the firmware directory in order to use request_firmware() and then be able to add additional micropatch that I need to relocate SMC2 on my MPC885. I have written the below patch in order to test the

[PATCH SLOF v3 0/5] GPT fixes/cleanup and LVM support with FAT

2015-06-30 Thread Nikunj A Dadhania
Following patchset implements some improvements and cleanup for the GPT booting code: patch 1: Simplify the gpt detection code with lesser scopes and add comments. patch 2: Introduce 8byte LE helpers: x@-le and x!-le patch 3: Rename block / read-sector to indicate it a allocated buffer

[PATCH SLOF v3 1/5] disk-label: simplify gpt-prep-partition? routine

2015-06-30 Thread Nikunj A Dadhania
Signed-off-by: Nikunj A Dadhania nik...@linux.vnet.ibm.com Reviewed-by: Thomas Huth th...@redhat.com --- slof/fs/packages/disk-label.fs | 41 +++-- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/slof/fs/packages/disk-label.fs

[PATCH SLOF v3 3/5] disk-label: rename confusing block word

2015-06-30 Thread Nikunj A Dadhania
block word is not a block number, actually its an allocated host address. Rename it to disk-buf along with a associated size(disk-buf-size=4096) for using during allocation/free. Also renaming the helper routine read-sector to read-disk-buf. This routine assumes the address to be disk-buf and

[PATCH SLOF v3 2/5] introduce 8-byte LE helpers

2015-06-30 Thread Nikunj A Dadhania
Signed-off-by: Nikunj A Dadhania nik...@linux.vnet.ibm.com Reviewed-by: Thomas Huth th...@redhat.com --- slof/fs/little-endian.fs | 6 ++ slof/fs/packages/disk-label.fs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/slof/fs/little-endian.fs

[PATCH SLOF v3 4/5] disk-label: introduce helper to check fat filesystem

2015-06-30 Thread Nikunj A Dadhania
Signed-off-by: Nikunj A Dadhania nik...@linux.vnet.ibm.com Reviewed-by: Thomas Huth th...@redhat.com --- slof/fs/packages/disk-label.fs | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs index

[PATCH SLOF v3 5/5] disk-label: add support for booting from GPT FAT partition

2015-06-30 Thread Nikunj A Dadhania
For a GPT+LVM combination disk, older bootloader that does not support LVM, cannot load kernel from LVM. The patch adds support to read from BASIC_DATA UUID partitions for the case that the OS installer has installed the CHRP-BOOT config on a FAT file system. Makes GPT detection robust * Check

Re: [PATCH SLOF v3 5/5] disk-label: add support for booting from GPT FAT partition

2015-06-30 Thread Thomas Huth
Sorry, every time I look at this gpt stuff, my eyes stumble over something new ... On Tue, 30 Jun 2015 16:31:21 +0530 Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: For a GPT+LVM combination disk, older bootloader that does not support LVM, cannot load kernel from LVM. The patch adds

Re: [PATCH RESEND] Update kernel math-emu code from current glibc soft-fp

2015-06-30 Thread Michael Ellerman
On Tue, 2015-06-30 at 10:48 +, Joseph Myers wrote: On Tue, 30 Jun 2015, Michael Ellerman wrote: Is there some way you can imagine of splitting this up into smaller chunks, so that different arches can merge the pieces separately? Well, it could be split as: 1. Rename

Re: [PATCH v5 40/42] drivers/of: Allow to specify root node in of_fdt_unflatten_tree()

2015-06-30 Thread Benjamin Herrenschmidt
On Tue, 2015-06-30 at 19:06 +0100, Grant Likely wrote: It may be time to dump the special allocation of fdt.c entirely and treat all nodes the same way, with name and properties all allocated with normal kmallocs Investigation is needed to figure out if this is feasible. kmalloc isn't