Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Michael Neuling
Peter, > > On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, > > despite there being no breakpoint on this CPU. This is because the call > > the task_bp_pinned, checks all CPUs, rather than just the current CPU. > > POWER7 only has one hardware breakpoint per CPU (ie. HBP_N

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Michael Neuling
> > > > On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, > > > > despite there being no breakpoint on this CPU. This is because the call > > > > the task_bp_pinned, checks all CPUs, rather than just the current CPU. > > > > POWER7 only has one hardware breakpoint per CPU (i

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-17 Thread Michael Neuling
Frederic Weisbecker wrote: > On Thu, Aug 16, 2012 at 02:23:54PM +1000, Michael Neuling wrote: > > Hi, > > > > I've been trying to get hardware breakpoints with perf to work on POWER7 > > but I'm getting the following: > > > > % perf

[PATCH 0/2] powerpc: perf hardware breakpoint fixes

2012-08-22 Thread Michael Neuling
Here are a couple of patches for perf for hardware breakpoints. Along with https://lkml.org/lkml/2012/8/16/5 hardware breakpoints now work for me powerpc. These patches don't depend on that patch though. Michael Neuling (2): powerpc: Remove unessasary ifdefs powerpc: Fix null pointer

[PATCH] powerpc: Remove unnecessary ifdefs

2012-08-22 Thread Michael Neuling
Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/cputable.h |2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 50d82c8..b3c083d 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc

[PATCH] powerpc: Fix null pointer deref in perf hardware breakpoints

2012-08-22 Thread Michael Neuling
(Data Access) at 1480 SP (ff8679e0) is in userspace This is because we don't check to see if the break point is associated with task before we deference the task_struct pointer. This checks pointer before dereferencing it. Signed-off-by: Michael Neuling --- arch/powerpc/k

[PATCH] powerpc: Fix null pointer deref in perf hardware breakpoints

2012-08-22 Thread Michael Neuling
(Data Access) at 1480 SP (ff8679e0) is in userspace This is because we don't check to see if the break point is associated with task before we deference the task_struct pointer. This changes the update to use current. Signed-off-by: Michael Neuling --- v2: mpe pointed out th

[PATCH 1/5] powerpc: Pack arch_hw_breakpoint to avoid holes in struct

2012-09-05 Thread Michael Neuling
No functional change Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/hw_breakpoint.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/hw_breakpoint.h b/arch/powerpc/include/asm/hw_breakpoint.h index be04330..39b323e 100644 --- a

[PATCH 2/5] powerpc: Use consistent name info for arch_hw_breakpoint

2012-09-05 Thread Michael Neuling
Change bp_info to info to be consistent with the rest of this file. Signed-off-by: Michael Neuling --- arch/powerpc/kernel/hw_breakpoint.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c

[PATCH 3/5] powerpc: Use the XDABR hcall

2012-09-05 Thread Michael Neuling
We never use the XDABR hcall since we check for DABR hcall first. XDABR syscall is better since it allows us to also set the DABRX. Signed-off-by: Michael Neuling --- arch/powerpc/platforms/pseries/setup.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc

[PATCH 4/5] powerpc: Rework set_dabr so it can take a DABRX value as well

2012-09-05 Thread Michael Neuling
sure the hcall doesn't fail. Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/debug.h |2 +- arch/powerpc/include/asm/hw_breakpoint.h |2 +- arch/powerpc/include/asm/machdep.h |3 ++- arch/powerpc/include/asm/processor.h |1 + arch/powerpc/includ

[PATCH 5/5] powerpc: Dynamically calculate the dabrx based on kernel/user/hypervisor

2012-09-05 Thread Michael Neuling
Currently we mark the DABRX to interrupt on all matches (hypervisor/kernel/user and then filter in software. We can be a lot smarter now that we can set the DABRX dynamically. This sets the DABRX based on the flags passed by the user. Signed-off-by: Michael Neuling --- arch/powerpc/include

Re: [PATCH 5/5] powerpc: Dynamically calculate the dabrx based on kernel/user/hypervisor

2012-09-05 Thread Michael Neuling
Michael Neuling wrote: > Currently we mark the DABRX to interrupt on all matches > (hypervisor/kernel/user and then filter in software. We can be a lot > smarter now that we can set the DABRX dynamically. > > This sets the DABRX based on the flags passed by the user. >

Re: [PATCH 4/5] powerpc: Rework set_dabr so it can take a DABRX value as well

2012-09-06 Thread Michael Neuling
Geert Uytterhoeven wrote: > On Thu, Sep 6, 2012 at 7:17 AM, Michael Neuling wrote: > > Rework set_dabr to take a DABRX value as well. We are not actually > > changing any functionality at this stage, just preparing for that. > > You are changing functionality. You are rig

Re: [PATCH 4/5] powerpc: Rework set_dabr so it can take a DABRX value as well

2012-09-06 Thread Michael Neuling
Geert Uytterhoeven wrote: > Hi Mikey, > > On Fri, 7 Sep 2012, Michael Neuling wrote: > > Geert Uytterhoeven wrote: > > > On Thu, Sep 6, 2012 at 7:17 AM, Michael Neuling wrote: > > > > Rework set_dabr to take a DABRX value as well. We are not actuall

[PATCH v2 0/3] powerpc: HW filtering of breakpoint for user/kernel/hypervisor events

2012-09-07 Thread Michael Neuling
This is in response to Geerts concerns. Only posting last two patches again as first 3 are already in benh's next tree. Added another patch to cleanup some #defines that we can now remove Michael Neuling (3): powerpc: Rework set_dabr so it can take a DABRX value as well po

[PATCH 1/3] powerpc: Rework set_dabr so it can take a DABRX value as well

2012-09-07 Thread Michael Neuling
zero, we modify the DABRX value to make it valid so that the hcall won't fail. Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/debug.h |2 +- arch/powerpc/include/asm/hw_breakpoint.h |2 +- arch/powerpc/include/asm/machdep.h |3 ++- arch/powerpc/includ

[PATCH 2/3] powerpc: Dynamically calculate the dabrx based on kernel/user/hypervisor

2012-09-07 Thread Michael Neuling
Currently we mark the DABRX to interrupt on all matches (hypervisor/kernel/user and then filter in software. We can be a lot smarter now that we can set the DABRX dynamically. This sets the DABRX based on the flags passed by the user. Signed-off-by: Michael Neuling --- arch/powerpc/include

[PATCH 3/3] powerpc: cleanup old DABRX #defines

2012-09-07 Thread Michael Neuling
These are no longer used so get rid of them Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/hvcall.h |5 - 1 file changed, 5 deletions(-) diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index 423cf9e..7a86706 100644 --- a/arch/powerpc

Re: [PATCH 2/6] powerpc: Add enable_ppr kernel parameter to enable PPR save/restore

2012-09-09 Thread Michael Neuling
Benjamin Herrenschmidt wrote: > On Sun, 2012-09-09 at 04:37 -0700, Haren Myneni wrote: > > enable_ppr kernel parameter is used to enable PPR save and restore. > > Supported on Power7 and later processors. > > > > By default, CPU_FTR_HAS_PPR is set for POWER7. If this parameter is not > > passed,

[PATCH] powerpc: add denormalisation exception handling for POWER6/7

2012-09-09 Thread Michael Neuling
ation exception for POWER6 and POWER7. It also add a CONFIG_PPC_DENORMALISATION option and sets it in pseries/ppc64_defconfig. This is useful on bare metal systems only. Based on patch from Milton Miller. Signed-off-by: Michael Neuling --- It's been a year since I posted this. I forgot

Re: [PATCH] powerpc: add denormalisation exception handling for POWER6/7

2012-09-10 Thread Michael Neuling
Michael Ellerman wrote: > On Mon, 2012-09-10 at 16:54 +1000, Michael Neuling wrote: > > On POWER6 and POWER7 if the input operand to an instruction is a > > denormalised single precision binary floatin

[PATCH] powerpc: add denormalisation exception handling for POWER6/7

2012-09-10 Thread Michael Neuling
this denormalisation exception for POWER6 and POWER7. It also add a CONFIG_PPC_DENORMALISATION option and sets it in pseries/ppc64_defconfig. This is useful on bare metal systems only. Based on patch from Milton Miller. Signed-off-by: Michael Neuling --- v3 as per mpe's comments. diff --

Re: [PATCH V10] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-09-18 Thread Michael Neuling
> +static int __devinit fsl_pci_probe(struct platform_device *pdev) > +{ > + int ret; > + struct device_node *node; > + struct pci_controller *hose; > + > + node = pdev->dev.of_node; > + ret = fsl_add_bridge(node, fsl_pci_primary == node); > > #ifdef CONFIG_SWIOTLB > - /*

Re: [PATCH] powerpc/fsl-pci: fix warning when CONFIG_SWIOTLB is disabled

2012-09-18 Thread Michael Neuling
Jia Hongtao wrote: > Fix the following warning: > arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_probe': > arch/powerpc/sysdev/fsl_pci.c:867:25: error: unused variable 'hose' > > Signed-off-by: Jia Hongtao Acked-by: Michael Neuling > --- > arc

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-09-25 Thread Michael Neuling
Michael Neuling wrote: > Frederic Weisbecker wrote: > > > On Thu, Aug 16, 2012 at 02:23:54PM +1000, Michael Neuling wrote: > > > Hi, > > > > > > I've been trying to get hardware breakpoints with perf to work on POWER7 > > > but I'm

net: fix typo in freescale/ucc_geth.c

2012-10-08 Thread Michael Neuling
The following patch: acb600d net: remove skb recycling added dev_free_skb() to drivers/net/ethernet/freescale/ucc_geth.c This is a typo and should be dev_kfree_skb(). This fixes this. Signed-off-by: Michael Neuling --- This hit as a compile error in next-20121008 with mpc85xx_defconfig

Re: [PATCH] powerpc: Build fix for powerpc KVM

2012-10-16 Thread Michael Neuling
Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > Fix build failure for powerpc KVM What was the failure? > > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/include/asm/kvm_book3s_32.h |1 + > arch/powerpc/kvm/book3s_32_mmu_host.c|4 ++-- > 2 files changed, 3 inserti

Re: [PATCH] powerpc: Build fix for powerpc KVM

2012-10-16 Thread Michael Neuling
Aneesh Kumar K.V wrote: > Michael Neuling writes: > > > Aneesh Kumar K.V wrote: > > > >> From: "Aneesh Kumar K.V" > >> > >> Fix build failure for powerpc KVM > > > > What was the failure? > > > arch/powerpc/kvm

[PATCH 0/3] powerpc/ptrace: hw breakpoint book3s repost and cleanups

2012-10-28 Thread Michael Neuling
This is a repost of K.Prasad hw breakpoint support for book3s and some other junk I found along the way. K.Prasad (1): powerpc/hw-breakpoint: Use generic hw-breakpoint interfaces for new PPC ptrace flags Michael Neuling (2): powerpc/ptrace: Fix spelling mistake powerpc/ptrace: Remove

[PATCH 1/3] powerpc/hw-breakpoint: Use generic hw-breakpoint interfaces for new PPC ptrace flags

2012-10-28 Thread Michael Neuling
breakpoint specification (length of the variable can be specified). Mikey added: rebased and added dbginfo.features around #ifdef CONFIG_HAVE_HW_BREAKPOINT Signed-off-by: K.Prasad Acked-by: David Gibson Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Neuling --- Doc

[PATCH 2/3] powerpc/ptrace: Fix spelling mistake

2012-10-28 Thread Michael Neuling
s/intruction/instruction/ Signed-off-by: Michael Neuling --- arch/powerpc/kernel/ptrace.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 140238a..7dd32d1 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b

[PATCH 3/3] powerpc/ptrace: Remove unused addr parameter in ppc_del_hwdebug()

2012-10-28 Thread Michael Neuling
Signed-off-by: Michael Neuling --- arch/powerpc/kernel/ptrace.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 7dd32d1..817b411 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel

[PATCH 1/4] powerpc: make POWER7 setup code generic name

2012-10-30 Thread Michael Neuling
We are going to reuse this in POWER8 so make the name generic. Signed-off-by: Michael Neuling --- arch/powerpc/kernel/Makefile |2 +- .../{cpu_setup_power7.S => cpu_setup_power.S} |0 2 files changed, 1 insertion(+), 1 deletion(-) rename arch/powerpc/ker

[PATCH 2/4] powerpc: Add POWER8 setup code

2012-10-30 Thread Michael Neuling
Just a copy of POWER7 for now. Will update with new code later. Signed-off-by: Michael Neuling --- arch/powerpc/kernel/cpu_setup_power.S | 24 arch/powerpc/kernel/cputable.c|2 ++ 2 files changed, 26 insertions(+) diff --git a/arch/powerpc/kernel

[PATCH 3/4] powerpc: POWER8 cputable entry

2012-10-30 Thread Michael Neuling
Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/cputable.h | 12 ++-- arch/powerpc/include/asm/mmu.h |1 + arch/powerpc/include/asm/reg.h |1 + arch/powerpc/kernel/cputable.c | 21 + 4 files changed, 33 insertions(+), 2 deletions

[PATCH 4/4] powerpc/pseries: Update ibm, architecture.vec for PAPR 2.7/POWER8

2012-10-30 Thread Michael Neuling
Update ibm,architecture.vec for Sub-Processor Representation Level. Allows us to support more than one parition per core. This is untested so far as we don't have pHyp Signed-off-by: Michael Neuling --- arch/powerpc/kernel/prom_init.c |4 +++- 1 file changed, 3 insertions(+), 1 del

Re: [PATCH 0/6] powerpc: SMT priority (PPR) save and restore

2012-10-31 Thread Michael Neuling
Haren Myneni wrote: > [PATCH 0/6] powerpc: SMT priority (PPR) save and restore > > On P7 systems, users can define SMT priority levels 2,3 and 4 for > processes so that some can run higher priority than the other ones. > In the current kernel, the default priority is set to 4 which prohibits > p

[PATCH] powerpc: Fix denorm symbol name

2012-10-31 Thread Michael Neuling
Fix global symbol name to match actual denorm_exception_hv label. Signed-off-by: Michael Neuling --- arch/powerpc/kernel/exceptions-64s.S |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index

[PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt

2012-11-05 Thread Michael Neuling
uggy power7 counters and if it is, record it and continue. If none of the PMCs match this, then we make note that we couldn't find the PMC that caused the IRQ. Signed-off-by: Michael Neuling Reviewed-by: Sukadev Bhattiprolu cc: Paul Mackerras cc: Anton Blanchard cc: Linux

[PATCH 2/2] powerpc/perf: Fix for PMCs not making progress

2012-11-05 Thread Michael Neuling
. Signed-off-by: Michael Neuling Reviewed-by: Sukadev Bhattiprolu cc: Paul Mackerras cc: Anton Blanchard cc: Linux PPC dev --- arch/powerpc/perf/core-book3s.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 3575def

Re: [PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt

2012-11-05 Thread Michael Neuling
> Thanks for looking into this mess. One small thing we can fix in a > follow up patch: > > + if (!found) > > + printk(KERN_WARNING "Can't find PMC that caused > > I think it would be worth making that a printk_ratelimited. We are > probably dead at this stage but we shouldn't spam the

[PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt

2012-11-05 Thread Michael Neuling
uggy power7 counters and if it is, record it and continue. If none of the PMCs match this, then we make note that we couldn't find the PMC that caused the IRQ. Signed-off-by: Michael Neuling Reviewed-by: Sukadev Bhattiprolu cc: Paul Mackerras cc: Anton Blanchard cc: Linux

Re: [PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt

2012-11-06 Thread Michael Neuling
Anshuman Khandual wrote: > On 11/06/2012 07:23 AM, Michael Neuling wrote: > > > + if (!found && pvr_version_is(PVR_POWER7)) { > > + /* check active counters for special buggy p7 overflow */ > > + for (i = 0; i < cpuhw->n_events; ++i) {

Re: [PATCH] Enable hardware breakpoint upon re-registering

2012-11-06 Thread Michael Neuling
hout unregistering. > > This patch enables hardware breakpoint if the caller is re-registering. > > Signed-off-by: Aravinda Prasad Passes my tests here and I don't think it'll break existing gdb. So FWIW Acked-by: Michael Neuling Thanks! > --- > arch/powerpc/ker

[PATCH 1/2] powerpc/pseries: Allow firmware features to match partial strings

2012-11-06 Thread Michael Neuling
This allows firmware_features_table names to add a '*' at the end so that only partial strings are matched. When a '*' is added, only upto the '*' is matched when setting firmware feature bits. This is useful for the matching best energy feature. Signed-off-by: Mic

[PATCH 2/2] powerpc/pseries: Cleanup best_energy_hcall detection

2012-11-06 Thread Michael Neuling
Currently we search for the best_energy hcall using a custom function. Move this to using the firmware_feature_table. Signed-off-by: Michael Neuling cc: Vaidyanathan Srinivasan cc: Linux PPC dev --- arch/powerpc/include/asm/firmware.h |4 ++- arch/powerpc/platforms/pseries

[PATCH 00/14] powerpc: Add support for POWER8 relocation on exceptions

2012-11-08 Thread Michael Neuling
hvcall.h and remove duplicate function powerpc: Enable relocation on during exceptions at boot powerpc: Disable relocation on exceptions when kexecing Michael Neuling (9): powerpc: Add POWER8 architected mode to cputable powerpc: Whitespace changes in exception64s.S powerpc: Remove uness

[PATCH 01/14] powerpc: Fix name denorm hypervisor symbol

2012-11-08 Thread Michael Neuling
Signed-off-by: Michael Neuling --- arch/powerpc/kernel/exceptions-64s.S |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 10b658a..5663018 100644 --- a/arch/powerpc/kernel/exceptions-64s.S

[PATCH 02/14] powerpc: Whitespace changes in exception64s.S

2012-11-08 Thread Michael Neuling
Remove redundancy spaces and make tab usage consistent. Signed-off-by: Michael Neuling --- arch/powerpc/kernel/exceptions-64s.S | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel

[PATCH 03/14] powerpc: Remove unessessary 0x3000 location enforcement

2012-11-08 Thread Michael Neuling
This removes the large gap between 0x1800 and 0x3000. Signed-off-by: Michael Neuling --- arch/powerpc/kernel/exceptions-64s.S |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 29cf7b1

[PATCH 04/14] powerpc: Make load_hander handle upto 64k offset

2012-11-08 Thread Michael Neuling
If we change load_hander() to use an ori instead of addi, we can load handlers upto 64k away provided we are still 64k aligned. --- arch/powerpc/include/asm/exception-64s.h |3 ++- arch/powerpc/kernel/exceptions-64s.S |4 ++-- arch/powerpc/kernel/setup_64.c |5 + 3 fi

[PATCH 05/14] powerpc: Turn syscall handler into macros

2012-11-08 Thread Michael Neuling
This turns the syscall handler into macros as we are going to want to reuse them again later. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/exceptions-64s.S | 63 +- 1 file changed, 40 insertions(+), 23 deletions(-) diff

[PATCH 06/14] powerpc: Add new macros needed for relocation on exceptions

2012-11-08 Thread Michael Neuling
y: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/exception-64s.h | 90 ++ arch/powerpc/kernel/exceptions-64s.S | 25 + 2 files changed, 115 insertions(+) diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerp

[PATCH 07/14] powerpc: Add relocation on exception vector handlers

2012-11-08 Thread Michael Neuling
e __end_interrupts marker down past these new 0x4000 vectors since they will need to be copied down to 0x0 when the kernel is not at 0x0. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/exception-64s.h |4 +- arch/powerpc/kernel/exception

[PATCH 08/14] powerpc: Move initial mfspr LPCR out of __init_LPCR

2012-11-08 Thread Michael Neuling
We want to change what's initially set in the LPCR, so start by taking the move from LPCR out of the function and into the caller. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/cpu_setup_power.S |6 +- 1 file changed, 5 insertions(+), 1 del

[PATCH 09/14] powerpc: Setup relocation on exceptions for bare metal systems

2012-11-08 Thread Michael Neuling
This turns on MMU on execptions via AIL field in the LPCR. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/reg.h|2 ++ arch/powerpc/kernel/cpu_setup_power.S |2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/powerpc/include/asm

[PATCH 10/14] powerpc: Add set_mode hcall

2012-11-08 Thread Michael Neuling
From: Ian Munsie This new hcall in POWER8 is used to set various resource mode registers. eg. it can set address translation mode on interrupt (note: partition wide scope) Signed-off-by: Ian Munsie Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/firmware.h |4

[PATCH 10/12] powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function

2012-11-08 Thread Michael Neuling
From: Ian Munsie I am going to use this in the next patch, better to have this code in one place rather than three. Signed-off-by: Ian Munsie Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/hvcall.h | 20 drivers/infiniband/hw/ehca/hcp_if.c

[PATCH 11/14] powerpc: Add wrappers to enable/disable relocation on exceptions

2012-11-08 Thread Michael Neuling
returned. Signed-off-by: Ian Munsie Signed-off-by: Michael Neuling --- arch/powerpc/platforms/pseries/plpar_wrappers.h | 25 +++ 1 file changed, 25 insertions(+) diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h

[PATCH 12/14] powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function

2012-11-08 Thread Michael Neuling
From: Ian Munsie I am going to use this in the next patch, better to have this code in one place rather than three. Signed-off-by: Ian Munsie Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/hvcall.h | 20 drivers/infiniband/hw/ehca/hcp_if.c

[PATCH 13/14] powerpc: Enable relocation on during exceptions at boot

2012-11-08 Thread Michael Neuling
From: Ian Munsie We currently do this synchronously at boot from setup_arch. On a large system this could hypothetically take a little while to complete, so currently we will give up if we are asked to wait for more than a second in total. If we actually start hitting that timeout in practice we

[PATCH 14/14] powerpc: Disable relocation on exceptions when kexecing

2012-11-08 Thread Michael Neuling
that we are execing ourselves and will be able to handle them anyway. Signed-off-by: Ian Munsie Signed-off-by: Michael Neuling --- arch/powerpc/platforms/pseries/setup.c | 33 1 file changed, 33 insertions(+) diff --git a/arch/powerpc/platforms/pseries/setup

[PATCH] powerpc/pseries: Update ibm, architecture.vec for PAPR 2.7/POWER8

2012-11-08 Thread Michael Neuling
Update ibm,architecture.vec for POWER8 and allows us to support more than one parition per core. Signed-off-by: Michael Neuling --- v2: Missed some bits in the original post.. arch/powerpc/kernel/prom_init.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH] powerpc: Add POWER8 architected mode to cputable

2012-11-08 Thread Michael Neuling
A PVR of 0x0F04 means we are arch v2.07 complicate ie, POWER8. Signed-off-by: Michael Neuling diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 216ff84..75a3d71 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -435,6

Re: [PATCH 12/14] powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function

2012-11-09 Thread Michael Neuling
Stephen Rothwell wrote: > Hi Mikey, > > On Fri, 9 Nov 2012 17:19:11 +1100 Michael Neuling wrote: > > > > From: Ian Munsie > > > > I am going to use this in the next patch, better to have this code in > > one place rather than three. > > >

Re: [PATCH 00/14] powerpc: Add support for POWER8 relocation on exceptions

2012-11-09 Thread Michael Neuling
> > This set of patches adds support for taking exceptions with the MMU on > > which is > > supported by POWER8. > > > > A new set of exception vectors is added at 0xc000___4xxx. When the > > HW > > takes us here, MSR IR/DR will be set already and we no longer need a costly > > RFID to

Re: [PATCH] powerpc: Add POWER8 architected mode to cputable

2012-11-09 Thread Michael Neuling
> On Fri, Nov 09, 2012 at 05:26:42PM +1100, Michael Neuling wrote: > > A PVR of 0x0F04 means we are arch v2.07 complicate ie, POWER8. > > Huh? > > s/complicate/compliant/ ? Yes, compliant. Thanks > Also ie has to be written with dots

Re: Hijacking CPU_FTR_VSX for BGQ QPX

2012-11-09 Thread Michael Neuling
Benjamin Herrenschmidt wrote: > On Fri, 2012-11-09 at 11:43 -0600, Jimi Xenidis wrote: > > The CPU_FTR_* values are pretty tight (a few bits left) yes I need to save > > and restore the QPX registers. > > There are 32 QPX registers, each 32 bytes in size, it is otherwise managed > > by the FPSC

Re: [PATCH 09/14] powerpc: Setup relocation on exceptions for bare metal systems

2012-11-11 Thread Michael Neuling
Segher Boessenkool wrote: > > --- a/arch/powerpc/include/asm/reg.h > > +++ b/arch/powerpc/include/asm/reg.h > > @@ -249,6 +249,8 @@ > > #define LPCR_RMLS0x1C00 /* impl dependent rmo limit sel */ > > #define LPCR_RMLS_SH (63-37) > > #define LPCR_ILE 0x0200 /*

[PATCH] powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET for POWER8 updates

2012-11-14 Thread Michael Neuling
. Signed-off-by: Michael Neuling diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 9ffb542..779f340 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -773,7 +773,7 @@ static unsigned char ibm_architecture_vec

Re: [PATCH 4/6] powerpc: Define ppr in thread_struct

2012-11-22 Thread Michael Neuling
Haren Myneni wrote: > [PATCH 4/6] powerpc: Define ppr in thread_struct > > ppr in thread_struct is used to save PPR and restore it before process exits > from kernel. > > This patch sets the default priority to 3 when tasks are created such > that users can use 4 for higher priority tasks. > >

Re: [PATCH 5/6] powerpc: Macros for saving/restore PPR

2012-11-22 Thread Michael Neuling
Haren Myneni wrote: > [PATCH 5/6] powerpc: Macros for saving/restore PPR > > Several macros are defined for saving and restore user defined PPR value. > > Signed-off-by: Haren Myneni > --- > arch/powerpc/include/asm/exception-64s.h | 29 + > arch/powerpc/include/

Re: [PATCH 2/6] powerpc: Define CPU_FTR_HAS_PPR

2012-11-22 Thread Michael Neuling
Heaven Myneni wrote: > [PATCH 2/6] powerpc: Define CPU_FTR_HAS_PPR > > CPU_FTR_HAS_PPR is defined for POWER7. > > Signed-off-by: Haren Myneni > --- > arch/powerpc/include/asm/cputable.h |6 -- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/include/as

[PATCH 00/16] powerpc: Hardware transactional memory support for POWER8

2012-11-26 Thread Michael Neuling
POWER8 implements hardware transactional memory support. This patch series adds kernel support so that user programs can use this hardware transactional memory and the new state is properly context switched. It is not currently used by the kernel itself. This patch series was originally develope

[PATCH 01/16] powerpc: Add new CPU feature bit for transactional memory

2012-11-26 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/cputable.h |8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index fc4d2c5..f2163da 100644 --- a/arch/powerpc/include/asm

[PATCH 02/16] powerpc: Add new instructions for transactional memory

2012-11-26 Thread Michael Neuling
ns an abort reason. trecheckpoint allows us to inject into the checkpointed state as if it were at the tbegin. It does this by copying the current architected state into the checkpointed state. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/ppc-opcode.h |

[PATCH 03/16] powerpc: Add additional state needed for transactional memory to thread struct

2012-11-26 Thread Michael Neuling
Set of new archtected state for saving away on context switch. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/processor.h | 28 1 file changed, 28 insertions(+) diff --git a/arch/powerpc/include/asm/processor.h b/arch

[PATCH 04/16] powerpc: New macros for transactional memory support

2012-11-26 Thread Michael Neuling
This adds new macros for saving and restoring checkpointed architected state from and to the thread_struct. It also adds some debugging macros for when your brain explodes trying to debug your transactional memory enabled kernel. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling

[PATCH 05/16] powerpc: Register defines for various transactional memory registers

2012-11-26 Thread Michael Neuling
Defines for MSR bits and transactional memory related SPRs TFIAR, TEXASR and TEXASRU. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/reg.h | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/powerpc/include/asm/reg.h b/arch

[PATCH 06/16] powerpc: Add transactional memory paca scratch register to show_regs

2012-11-26 Thread Michael Neuling
Add transactional memory paca scratch register to show_regs. This is useful for debugging. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/paca.h |1 + arch/powerpc/kernel/asm-offsets.c |1 + arch/powerpc/kernel/entry_64.S|4 arch

[PATCH 07/16] powerpc: Add helper functions for transactional memory context switching

2012-11-26 Thread Michael Neuling
Here we add the helper functions to be used when context switching. These allow us to fully reclaim and recheckpoint a transaction. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/reg.h |2 +- arch/powerpc/include/asm/tm.h | 19 ++ arch/powerpc

[PATCH 08/16] powerpc: Add FP/VSX and VMX register load functions for transactional memory

2012-11-26 Thread Michael Neuling
d for VMX registers. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/fpu.S| 54 ++ arch/powerpc/kernel/vector.S | 51 +++ 2 files changed, 105 insertions(+) diff --git a/arch/po

[PATCH 09/16] powerpc: Add reclaim and recheckpoint functions for context switching transactional memory processes

2012-11-26 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/process.c | 113 + 1 file changed, 113 insertions(+) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index fd5ce1b..1bf2c6c7 100644 --- a/arch/powe

[PATCH 10/16] powerpc: Add transactional memory unavaliable execption handler

2012-11-26 Thread Michael Neuling
These should never happen since we always turn on MSR TM when in userspace. We don't do lazy TM. Hence if we hit this, we barf and kill the task as something's gone horribly wrong. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/exceptions-64

[PATCH 11/16] powerpc: Assembler routines for FP/VSX/VMX unavailable during a transaction

2012-11-26 Thread Michael Neuling
P, VMX and VSX. It doesn't hook them into the rest of the code yet. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/traps.c | 95 +++ 1 file changed, 95 insertions(+) diff --git a/arch/powerpc/kernel/traps.c b/arch

[PATCH 12/16] powerpc: Hook in new transactional memory code

2012-11-26 Thread Michael Neuling
This hooks the new transactional memory code into context switching, FP/VMX/VMX unavailable and exception return. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/kernel/entry_64.S | 22 arch/powerpc/kernel/exceptions-64s.S | 48

[PATCH 13/16] powerpc: Add transactional memory to POWER8 cpu features

2012-11-26 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/cputable.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index f2163da..74458e69 100644 --- a/arch/powerpc

[PATCH 14/16] powerpc: Add config option for transactional memory

2012-11-26 Thread Michael Neuling
Kconfig option for transactional memory on powerpc. Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/Kconfig |8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index a902a5c..ece67ca 100644 --- a/arch/powerpc

[PATCH 15/16] powerpc: Add transactional memory to pseries and ppc64 defconfigs

2012-11-26 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- arch/powerpc/configs/ppc64_defconfig |1 + arch/powerpc/configs/pseries_defconfig |1 + 2 files changed, 2 insertions(+) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index

[PATCH 16/16] powerpc: Documentation for transactional memory on powerpc

2012-11-26 Thread Michael Neuling
Signed-off-by: Matt Evans Signed-off-by: Michael Neuling --- Documentation/powerpc/transactional_memory.txt | 119 1 file changed, 119 insertions(+) create mode 100644 Documentation/powerpc/transactional_memory.txt diff --git a/Documentation/powerpc

Re: Hijacking CPU_FTR_VSX for BGQ QPX

2012-12-05 Thread Michael Neuling
Jimi Xenidis wrote: > Sorry for the pause, lots of other things getting done... questions below. > > On Nov 9, 2012, at 10:33 PM, Michael Neuling wrote: > > > Benjamin Herrenschmidt wrote: > > > >> On Fri, 2012-11-09 at 11:43 -0600, Jimi Xenidis wrote: >

[PATCH stable-2.6.27] powerpc: Add more Power7 specific definitions

2012-02-12 Thread Michael Neuling
newer processors when running in hypervisor mode. Along with some other P7 specific bits and pieces Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/ppc_asm.h |1 arch/powerpc/include/asm/reg.h | 45 +++

Re: Boot failure with next-20120208

2012-02-12 Thread Michael Neuling
> Just a quick note to say I got a boot OOPs with next-20120208 and 9 on a > Power7 blade (my other PowerPC boot tests are ok. I'll investigate this > further on Monday. > > The line referenced below is: > > BUG_ON(!kobj || !kobj->sd || !attr); > > in sysfs_create_file(). > > calling .topology_i

Re: [PATCH stable-2.6.27] powerpc: Add more Power7 specific definitions

2012-02-13 Thread Michael Neuling
Willy, > > stable-2.6.27.60 added c24cb8e5 which uses PV_POWER7 but it's not > > defined. Following patch adds these definitions. > > Thank you for the report Michael, I have no PPC toolchain so I have > not tested this one. Added now. No problem. > Just one question, with this release, no -rc

Build fail in hugetlbpage.c with linux-next and mpc85xx_defconfig

2012-02-15 Thread Michael Neuling
Becky, This has been broken in linux-next for a while. Looks like a merge issue but you were the last to touch it... arch/powerpc/mm/hugetlbpage.c: In function 'reserve_hugetlb_gpages': arch/powerpc/mm/hugetlbpage.c:313: error: passing argument 5 of 'parse_args' makes integer from pointer witho

Re: Build fail in hugetlbpage.c with linux-next and mpc85xx_defconfig

2012-02-15 Thread Michael Neuling
> > Becky, > > > > This has been broken in linux-next for a while. =A0Looks like a merge > > issue but you were the last to touch it... > > > > arch/powerpc/mm/hugetlbpage.c: In function 'reserve_hugetlb_gpages': > > arch/powerpc/mm/hugetlbpage.c:313: error: passing argument 5 of 'parse_ar= > gs' m

Re: Build fail in hugetlbpage.c with linux-next and mpc85xx_defconfig

2012-02-15 Thread Michael Neuling
In message you wrote: > On Wed, Feb 15, 2012 at 11:37 PM, Michael Neuling wrote: > >> > Becky, > >> > > >> > This has been broken in linux-next for a while. =3DA0Looks like a merge > >> > issue but you were the last to touch it... >

[PATCH] powerpc/of: add OF_DYNAMIC for chroma

2012-02-19 Thread Michael Neuling
PPC_CHROMA. Signed-off-by: Michael Neuling diff --git a/arch/powerpc/platforms/wsp/Kconfig b/arch/powerpc/platforms/wsp/Kconfig index 57d22a2..79d2225 100644 --- a/arch/powerpc/platforms/wsp/Kconfig +++ b/arch/powerpc/platforms/wsp/Kconfig @@ -25,6 +25,7 @@ config PPC_CHROMA bool "

Re: [PATCH] powerpc/of: add OF_DYNAMIC for chroma

2012-02-20 Thread Michael Neuling
Grant, This seems to be broken in your tree (since 301b605ff6), so you should probably pick up this patch. Mikey In message <5a594805-c5ce-46e7-a15f-df86e6fe6...@pobox.com> you wrote: > > On Feb 19, 2012, at 4:48 PM, Michael Neuling wrote: > > > linux ne

<    4   5   6   7   8   9   10   11   12   13   >