linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/cputable: fix oprofile_cpu_type on power8
@ 2013-05-28 20:39 Nishanth Aravamudan
  2013-06-05  4:34 ` Michael Neuling
  0 siblings, 1 reply; 4+ messages in thread
From: Nishanth Aravamudan @ 2013-05-28 20:39 UTC (permalink / raw)
  To: benh; +Cc: Maynard Johnson, Michael Neuling, linuxppc-dev

Maynard informed me that neither the oprofile kernel module nor oprofile
userspace has been updated to support that "legacy" oprofile module
interface for power8, which is indicated by "ppc64/power8." This results
in no samples. The solution is to default to the "timer" type, instead.
The raw entry also should be updated, as "ppc64/ibm-compat-v1" indicates
to oprofile userspace to use "compatibility events" which are obsolete
in ISA 2.07.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

---
Ben, if this seems reasonable to you, it would be great to get this into
3.10.

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index c60bbec..b8808bc 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -453,7 +453,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.icache_bsize		= 128,
 		.dcache_bsize		= 128,
 		.oprofile_type		= PPC_OPROFILE_POWER4,
-		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
+		.oprofile_cpu_type	= 0,
 		.cpu_setup		= __setup_cpu_power8,
 		.cpu_restore		= __restore_cpu_power8,
 		.platform		= "power8",
@@ -506,7 +506,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.dcache_bsize		= 128,
 		.num_pmcs		= 6,
 		.pmc_type		= PPC_PMC_IBM,
-		.oprofile_cpu_type	= "ppc64/power8",
+		.oprofile_cpu_type	= 0,
 		.oprofile_type		= PPC_OPROFILE_POWER4,
 		.cpu_setup		= __setup_cpu_power8,
 		.cpu_restore		= __restore_cpu_power8,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/cputable: fix oprofile_cpu_type on power8
  2013-05-28 20:39 [PATCH] powerpc/cputable: fix oprofile_cpu_type on power8 Nishanth Aravamudan
@ 2013-06-05  4:34 ` Michael Neuling
  2013-06-05  5:35   ` Michael Neuling
  2013-06-05  5:38   ` [PATCH] powerpc/power8: Fix oprofile and perf Michael Neuling
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Neuling @ 2013-06-05  4:34 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: Maynard Johnson, linuxppc-dev

Benh and Nish,

This breaks all perf HW events on POWER8.

Please revert this.  It's
2ac6f427ad837a69561160b282eff80d9f0c2466 upstream.

Noticed by mpe.

Mikey

Nishanth Aravamudan <nacc@linux.vnet.ibm.com> wrote:
> Maynard informed me that neither the oprofile kernel module nor oprofile
> userspace has been updated to support that "legacy" oprofile module
> interface for power8, which is indicated by "ppc64/power8." This results
> in no samples. The solution is to default to the "timer" type, instead.
> The raw entry also should be updated, as "ppc64/ibm-compat-v1" indicates
> to oprofile userspace to use "compatibility events" which are obsolete
> in ISA 2.07.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> 
> ---
> Ben, if this seems reasonable to you, it would be great to get this into
> 3.10.
> 
> diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
> index c60bbec..b8808bc 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -453,7 +453,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
>  		.icache_bsize		= 128,
>  		.dcache_bsize		= 128,
>  		.oprofile_type		= PPC_OPROFILE_POWER4,
> -		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
> +		.oprofile_cpu_type	= 0,
>  		.cpu_setup		= __setup_cpu_power8,
>  		.cpu_restore		= __restore_cpu_power8,
>  		.platform		= "power8",
> @@ -506,7 +506,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
>  		.dcache_bsize		= 128,
>  		.num_pmcs		= 6,
>  		.pmc_type		= PPC_PMC_IBM,
> -		.oprofile_cpu_type	= "ppc64/power8",
> +		.oprofile_cpu_type	= 0,
>  		.oprofile_type		= PPC_OPROFILE_POWER4,
>  		.cpu_setup		= __setup_cpu_power8,
>  		.cpu_restore		= __restore_cpu_power8,
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] powerpc/cputable: fix oprofile_cpu_type on power8
  2013-06-05  4:34 ` Michael Neuling
@ 2013-06-05  5:35   ` Michael Neuling
  2013-06-05  5:38   ` [PATCH] powerpc/power8: Fix oprofile and perf Michael Neuling
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Neuling @ 2013-06-05  5:35 UTC (permalink / raw)
  To: Nishanth Aravamudan, benh; +Cc: linuxppc-dev, Maynard Johnson

In 2ac6f42 powerpc/cputable: Fix oprofile_cpu_type on power8 
we broke all power8 hw events.

This reverts this change and uses oprofile_type instead. Perf now works
on POWER8 again and oprofile will revert to using timers on POWER8.

Kudos to mpe this fix.

Signed-off-by: Michael Neuling <mikey@neuling.org>

---
tag: for-3.10

benh: disregard my previous revert request and apply this instead

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 1f0937d..2a45d0f 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -452,8 +452,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.mmu_features		= MMU_FTRS_POWER8,
 		.icache_bsize		= 128,
 		.dcache_bsize		= 128,
-		.oprofile_type		= PPC_OPROFILE_POWER4,
-		.oprofile_cpu_type	= 0,
+		.oprofile_type		= PPC_OPROFILE_INVALID,
+		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
 		.cpu_setup		= __setup_cpu_power8,
 		.cpu_restore		= __restore_cpu_power8,
 		.platform		= "power8",
@@ -506,8 +506,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.dcache_bsize		= 128,
 		.num_pmcs		= 6,
 		.pmc_type		= PPC_PMC_IBM,
-		.oprofile_cpu_type	= 0,
-		.oprofile_type		= PPC_OPROFILE_POWER4,
+		.oprofile_cpu_type	= "ppc64/power8",
+		.oprofile_type		= PPC_OPROFILE_INVALID,
 		.cpu_setup		= __setup_cpu_power8,
 		.cpu_restore		= __restore_cpu_power8,
 		.platform		= "power8",

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] powerpc/power8: Fix oprofile and perf
  2013-06-05  4:34 ` Michael Neuling
  2013-06-05  5:35   ` Michael Neuling
@ 2013-06-05  5:38   ` Michael Neuling
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Neuling @ 2013-06-05  5:38 UTC (permalink / raw)
  To: Nishanth Aravamudan, benh; +Cc: linuxppc-dev, Maynard Johnson

In 2ac6f42 powerpc/cputable: Fix oprofile_cpu_type on power8 
we broke all power8 hw events.

This reverts this change and uses oprofile_type instead. Perf now works
on POWER8 again and oprofile will revert to using timers on POWER8.

Kudos to mpe this fix.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
tag: for-3.10

v2: renamed patch

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 1f0937d..2a45d0f 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -452,8 +452,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.mmu_features		= MMU_FTRS_POWER8,
 		.icache_bsize		= 128,
 		.dcache_bsize		= 128,
-		.oprofile_type		= PPC_OPROFILE_POWER4,
-		.oprofile_cpu_type	= 0,
+		.oprofile_type		= PPC_OPROFILE_INVALID,
+		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
 		.cpu_setup		= __setup_cpu_power8,
 		.cpu_restore		= __restore_cpu_power8,
 		.platform		= "power8",
@@ -506,8 +506,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.dcache_bsize		= 128,
 		.num_pmcs		= 6,
 		.pmc_type		= PPC_PMC_IBM,
-		.oprofile_cpu_type	= 0,
-		.oprofile_type		= PPC_OPROFILE_POWER4,
+		.oprofile_cpu_type	= "ppc64/power8",
+		.oprofile_type		= PPC_OPROFILE_INVALID,
 		.cpu_setup		= __setup_cpu_power8,
 		.cpu_restore		= __restore_cpu_power8,
 		.platform		= "power8",

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-05  5:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-28 20:39 [PATCH] powerpc/cputable: fix oprofile_cpu_type on power8 Nishanth Aravamudan
2013-06-05  4:34 ` Michael Neuling
2013-06-05  5:35   ` Michael Neuling
2013-06-05  5:38   ` [PATCH] powerpc/power8: Fix oprofile and perf Michael Neuling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).