mbox

[GIT,PULL] ARM perf updates for 3.3

Message ID 20111202170231.GP5540@mudshark.cambridge.arm.com
State New
Headers show

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-rmk

Message

Will Deacon Dec. 2, 2011, 5:02 p.m. UTC
Hi Russell,

Please pull these updates to the ARM perf code for 3.3. The highlights are
probably the CTI stuff (which is in preparation for OMAP4 support coming from
Lei Ming, Benoit and Paul) and the cleanup of the event numbers for ARMv7 so
that they are easier to follow. I was hoping to add Cortex-A7 support but I
haven't got my paws on an FPGA yet.

I've not included my contextidr patch with this pull because it conflicts
quite badly with the LPAE patches. I can rework this for 3.4 later on (I
already have a fixup).

Cheers,

Will


The following changes since commit 5611cc4572e889b62a7b4c72a413536bf6a9c416:

  Linux 3.2-rc4 (2011-12-01 14:56:01 -0800)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-rmk

Ming Lei (2):
      arm: introduce cross trigger interface helpers
      arm: pmu: allow platform specific irq enable/disable handling

Will Deacon (4):
      ARM: perf: clean and update ARMv7 event numbers
      ARM: perf: add support for stalled cycle ABI events
      ARM: perf: remove unused armpmu_get_max_events
      Merge branches 'perf/event-nos', 'perf/updates' and 'perf/omap4' into for-rmk

 arch/arm/include/asm/cti.h          |  179 ++++++++++++++++
 arch/arm/include/asm/perf_event.h   |    3 -
 arch/arm/include/asm/pmu.h          |   15 +-
 arch/arm/kernel/perf_event.c        |   19 +-
 arch/arm/kernel/perf_event_v6.c     |   32 ++--
 arch/arm/kernel/perf_event_v7.c     |  401 +++++++++++++----------------------
 arch/arm/kernel/perf_event_xscale.c |   16 +-
 7 files changed, 379 insertions(+), 286 deletions(-)
 create mode 100644 arch/arm/include/asm/cti.h

Comments

Will Deacon Dec. 3, 2011, 10:21 a.m. UTC | #1
On Sat, Dec 03, 2011 at 09:26:59AM +0000, Russell King - ARM Linux wrote:
> On Fri, Dec 02, 2011 at 05:02:31PM +0000, Will Deacon wrote:
> > Please pull these updates to the ARM perf code for 3.3. The highlights are
> > probably the CTI stuff (which is in preparation for OMAP4 support coming from
> > Lei Ming, Benoit and Paul) and the cleanup of the event numbers for ARMv7 so
> > that they are easier to follow. I was hoping to add Cortex-A7 support but I
> > haven't got my paws on an FPGA yet.
> > 
> > I've not included my contextidr patch with this pull because it conflicts
> > quite badly with the LPAE patches. I can rework this for 3.4 later on (I
> > already have a fixup).
> 
> While merging this, I get conflicts in gic.c and omap's common.h.  I'm
> intending to resolve them as below - please check this _before_ I commit
> it (which means my tree is frozen until this is resolved.)

This doesn't sound quite right since I don't touch either of these files in
my perf changes. I suspect that you're getting changes from your recently
merged fixes branch back from my tree, which is based on -rc4.

Unfortunately, I depend on -rc4 for that exact reason (it has some perf
fixes in there)!

So the easiest solution might be to wait until you're using -rc4 as a base
(or I can rebase onto anything that contains your fixes branch).

> diff --cc arch/arm/common/gic.c
> index a1feb6b,410a546..0000000
> --- a/arch/arm/common/gic.c
> +++ b/arch/arm/common/gic.c
> @@@ -696,12 -582,16 +697,14 @@@ void __init gic_init_bases(unsigned in
>   	 * For primary GICs, skip over SGIs.
>   	 * For secondary GICs, skip over PPIs, too.
>   	 */
> + 	domain->hwirq_base = 32;
>   	if (gic_nr == 0) {
> - 		domain->hwirq_base = 16;
> - 		if (irq_start > 0)
> - 			irq_start = (irq_start & ~31) + 16;
> - 	} else
> - 		domain->hwirq_base = 32;
>  -		gic_cpu_base_addr = cpu_base;
>  -
> + 		if ((irq_start & 31) > 0) {
> + 			domain->hwirq_base = 16;
> + 			if (irq_start != -1)
> + 				irq_start = (irq_start & ~31) + 16;
> + 		}
> + 	}

As it happens, I worked on this with Marc and that resolution looks ok to
me, although I don't have a board at hand to test it.

>   	/*
>   	 * Find out how many interrupts are supported.
> diff --cc arch/arm/plat-omap/include/plat/common.h
> index 346098f,3ff3e36..0000000
> --- a/arch/arm/plat-omap/include/plat/common.h
> +++ b/arch/arm/plat-omap/include/plat/common.h

[...]

Afraid I don't have a clue about this one.

Would you like me to base this on something else?

Will
Russell King - ARM Linux Dec. 3, 2011, 10:46 p.m. UTC | #2
On Sat, Dec 03, 2011 at 10:21:54AM +0000, Will Deacon wrote:
> On Sat, Dec 03, 2011 at 09:26:59AM +0000, Russell King - ARM Linux wrote:
> > While merging this, I get conflicts in gic.c and omap's common.h.  I'm
> > intending to resolve them as below - please check this _before_ I commit
> > it (which means my tree is frozen until this is resolved.)
> 
> This doesn't sound quite right since I don't touch either of these files in
> my perf changes. I suspect that you're getting changes from your recently
> merged fixes branch back from my tree, which is based on -rc4.

Yes, that'll be why.  I sent my previous message to Tony so he can
confirm the resolution himself.

The unfortunate thing about that is I can't complete the merge at the
moment, so I can't do anything with my git tree until Tony replies.
(I could abort the merge, but then I'd have to recreate the resolutions
which could be error prone.)

> As it happens, I worked on this with Marc and that resolution looks ok to
> me, although I don't have a board at hand to test it.

Well, I guess Tony won't reply until Monday afternoon, so there's no
immediate rush this weekend.
Will Deacon Dec. 5, 2011, 11:23 a.m. UTC | #3
On Sat, Dec 03, 2011 at 10:46:54PM +0000, Russell King - ARM Linux wrote:
> On Sat, Dec 03, 2011 at 10:21:54AM +0000, Will Deacon wrote:
> > As it happens, I worked on this with Marc and that resolution looks ok to
> > me, although I don't have a board at hand to test it.
> 
> Well, I guess Tony won't reply until Monday afternoon, so there's no
> immediate rush this weekend.

Right. I did the merge of my for-rmk branch with your devel branch and can
confirm that everything seems fine on my Versatile Express, so the GIC
resolution is ok.

Will
Russell King - ARM Linux Dec. 5, 2011, 9:11 p.m. UTC | #4
Tony,

Can you please treat this with the utmost urgency.  If I don't get a
reply from you within the next two hours, then I'm committing this
merge resolution whether or not it's correct for you - as I have other
stuff which needs to be committed to my tree and I can't wait any
longer for your reply.

Thanks.

On Sat, Dec 03, 2011 at 09:26:59AM +0000, Russell King - ARM Linux wrote:
> On Fri, Dec 02, 2011 at 05:02:31PM +0000, Will Deacon wrote:
> > Hi Russell,
> > 
> > Please pull these updates to the ARM perf code for 3.3. The highlights are
> > probably the CTI stuff (which is in preparation for OMAP4 support coming from
> > Lei Ming, Benoit and Paul) and the cleanup of the event numbers for ARMv7 so
> > that they are easier to follow. I was hoping to add Cortex-A7 support but I
> > haven't got my paws on an FPGA yet.
> > 
> > I've not included my contextidr patch with this pull because it conflicts
> > quite badly with the LPAE patches. I can rework this for 3.4 later on (I
> > already have a fixup).
> 
> While merging this, I get conflicts in gic.c and omap's common.h.  I'm
> intending to resolve them as below - please check this _before_ I commit
> it (which means my tree is frozen until this is resolved.)
> 
> diff --cc arch/arm/common/gic.c
> index a1feb6b,410a546..0000000
> --- a/arch/arm/common/gic.c
> +++ b/arch/arm/common/gic.c
> @@@ -696,12 -582,16 +697,14 @@@ void __init gic_init_bases(unsigned in
>   	 * For primary GICs, skip over SGIs.
>   	 * For secondary GICs, skip over PPIs, too.
>   	 */
> + 	domain->hwirq_base = 32;
>   	if (gic_nr == 0) {
> - 		domain->hwirq_base = 16;
> - 		if (irq_start > 0)
> - 			irq_start = (irq_start & ~31) + 16;
> - 	} else
> - 		domain->hwirq_base = 32;
>  -		gic_cpu_base_addr = cpu_base;
>  -
> + 		if ((irq_start & 31) > 0) {
> + 			domain->hwirq_base = 16;
> + 			if (irq_start != -1)
> + 				irq_start = (irq_start & ~31) + 16;
> + 		}
> + 	}
>   
>   	/*
>   	 * Find out how many interrupts are supported.
> diff --cc arch/arm/plat-omap/include/plat/common.h
> index 346098f,3ff3e36..0000000
> --- a/arch/arm/plat-omap/include/plat/common.h
> +++ b/arch/arm/plat-omap/include/plat/common.h
> @@@ -27,12 -27,97 +27,15 @@@
>   #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
>   #define __ARCH_ARM_MACH_OMAP_COMMON_H
>   
>  -#include <linux/delay.h>
>  -
>   #include <plat/i2c.h>
> + #include <plat/omap_hwmod.h>
>   
>  -struct sys_timer;
>  -
>  -extern void omap_map_common_io(void);
>  -extern struct sys_timer omap1_timer;
>  -extern struct sys_timer omap2_timer;
>  -extern struct sys_timer omap3_timer;
>  -extern struct sys_timer omap3_secure_timer;
>  -extern struct sys_timer omap4_timer;
>  -extern bool omap_32k_timer_init(void);
>   extern int __init omap_init_clocksource_32k(void);
>   extern unsigned long long notrace omap_32k_sched_clock(void);
>   
>   extern void omap_reserve(void);
>  -
>  -void omap2420_init_early(void);
>  -void omap2430_init_early(void);
>  -void omap3430_init_early(void);
>  -void omap35xx_init_early(void);
>  -void omap3630_init_early(void);
>  -void omap3_init_early(void);	/* Do not use this one */
>  -void am35xx_init_early(void);
>  -void ti816x_init_early(void);
>  -void omap4430_init_early(void);
>  -
> + extern int omap_dss_reset(struct omap_hwmod *);
> + 
>   void omap_sram_init(void);
>   
>  -/*
>  - * IO bases for various OMAP processors
>  - * Except the tap base, rest all the io bases
>  - * listed are physical addresses.
>  - */
>  -struct omap_globals {
>  -	u32		class;		/* OMAP class to detect */
>  -	void __iomem	*tap;		/* Control module ID code */
>  -	void __iomem	*sdrc;           /* SDRAM Controller */
>  -	void __iomem	*sms;            /* SDRAM Memory Scheduler */
>  -	void __iomem	*ctrl;           /* System Control Module */
>  -	void __iomem	*ctrl_pad;	/* PAD Control Module */
>  -	void __iomem	*prm;            /* Power and Reset Management */
>  -	void __iomem	*cm;             /* Clock Management */
>  -	void __iomem	*cm2;
>  -};
>  -
>  -void omap2_set_globals_242x(void);
>  -void omap2_set_globals_243x(void);
>  -void omap2_set_globals_3xxx(void);
>  -void omap2_set_globals_443x(void);
>  -void omap2_set_globals_ti816x(void);
>  -
>  -/* These get called from omap2_set_globals_xxxx(), do not call these */
>  -void omap2_set_globals_tap(struct omap_globals *);
>  -void omap2_set_globals_sdrc(struct omap_globals *);
>  -void omap2_set_globals_control(struct omap_globals *);
>  -void omap2_set_globals_prcm(struct omap_globals *);
>  -
>  -void omap242x_map_io(void);
>  -void omap243x_map_io(void);
>  -void omap3_map_io(void);
>  -void omap4_map_io(void);
>  -
>  -
>  -/**
>  - * omap_test_timeout - busy-loop, testing a condition
>  - * @cond: condition to test until it evaluates to true
>  - * @timeout: maximum number of microseconds in the timeout
>  - * @index: loop index (integer)
>  - *
>  - * Loop waiting for @cond to become true or until at least @timeout
>  - * microseconds have passed.  To use, define some integer @index in the
>  - * calling code.  After running, if @index == @timeout, then the loop has
>  - * timed out.
>  - */
>  -#define omap_test_timeout(cond, timeout, index)			\
>  -({								\
>  -	for (index = 0; index < timeout; index++) {		\
>  -		if (cond)					\
>  -			break;					\
>  -		udelay(1);					\
>  -	}							\
>  -})
>  -
>  -extern struct device *omap2_get_mpuss_device(void);
>  -extern struct device *omap2_get_iva_device(void);
>  -extern struct device *omap2_get_l3_device(void);
>  -extern struct device *omap4_get_dsp_device(void);
>  -
>   #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Tony Lindgren Dec. 5, 2011, 11:19 p.m. UTC | #5
* Russell King - ARM Linux <linux@arm.linux.org.uk> [111205 12:40]:
> Tony,
> 
> Can you please treat this with the utmost urgency.  If I don't get a
> reply from you within the next two hours, then I'm committing this
> merge resolution whether or not it's correct for you - as I have other
> stuff which needs to be committed to my tree and I can't wait any
> longer for your reply.

Sorry only now saw this. Looking at it now.

Tony
Marc Zyngier Dec. 7, 2011, 3:24 p.m. UTC | #6
On 07/12/11 14:17, Cousson, Benoit wrote:
> + Marc
> 
> Hi Tony,
> 
> On 12/6/2011 5:52 PM, Tony Lindgren wrote:
>> * Tony Lindgren<tony@atomide.com>  [111205 15:34]:
>>> * Tony Lindgren<tony@atomide.com>  [111205 14:51]:
>>>> * Russell King - ARM Linux<linux@arm.linux.org.uk>  [111205 12:40]:
>>>>> Tony,
>>>>>
>>>>> Can you please treat this with the utmost urgency.  If I don't get a
>>>>> reply from you within the next two hours, then I'm committing this
>>>>> merge resolution whether or not it's correct for you - as I have other
>>>>> stuff which needs to be committed to my tree and I can't wait any
>>>>> longer for your reply.
>>>>
>>>> Sorry only now saw this. Looking at it now.
>>>
>>> Here's what I would do:
>>>
>>> 1. Apply Santosh' omap2plus_defconfig patches first into devel-stable at
>>>     commit 53fadbdd83039bb1181e4ff76123d612cdf26c37 (Merge branch
>>>     'irqchip-consolidation' ...). The patches in question are 7188/1 and
>>>     patch 7189/1.
>>>
>>> 2. Pull Will's for-rmk branch on top of that
>>>
>>> 3. Run git mergetool which produces the resolution you posted earlier
>>>
>>> 4. Before committing apply the following build fix and run git update-index
>>>     arch/arm/mach-omap2/display.c. This came from the DSS fixes in -rc4.
>>>
>>> Then it all builds and boots fine.
>>
>> Added the following fix into patch system as 7194/1. Russell, can you
>> please apply that one into your devel-stable so we have a common
>> base for folks to base other omap patches on?
> 
> Please note that we still have a regression for the OMAP3/4 DT boot on this branch.
> The board-generic.c file was not updated for all the machine descriptors inside it
> during irqchip-consolidation series.
> 
> The following patch fixes that.
> 
> Regards,
> Benoit 
> 
> ---
> From 0c8b4ed454ab9d5cbb267eaf236d0b14c7c6896a Mon Sep 17 00:00:00 2001
> From: Benoit Cousson <b-cousson@ti.com>
> Date: Wed, 7 Dec 2011 13:46:55 +0100
> Subject: [PATCH] ARM: OMAP2+: board-generic: Add missing handle_irq callbacks
> 
> The following commit: 6b2f55d7851aa358d3a99cff344c560c4967f042,
> is adding the support for the CONFIG_MULTI_IRQ_HANDLER but did
> not update all the machine descriptors supported in the DT
> board-generic.c file.
> It thus break the DT boot on OMAP3 and OMAP4 boards.
> 
> Add the proper handle_irq callbacks for OMAP3 and OMAP4 generic
> machine descriptors.
> 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> ---
>  arch/arm/mach-omap2/board-generic.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
Tony Lindgren Dec. 7, 2011, 7:44 p.m. UTC | #7
* Marc Zyngier <marc.zyngier@arm.com> [111207 06:52]:
> On 07/12/11 14:17, Cousson, Benoit wrote:
> > 
> > The following commit: 6b2f55d7851aa358d3a99cff344c560c4967f042,
> > is adding the support for the CONFIG_MULTI_IRQ_HANDLER but did
> > not update all the machine descriptors supported in the DT
> > board-generic.c file.
> > It thus break the DT boot on OMAP3 and OMAP4 boards.
> > 
> > Add the proper handle_irq callbacks for OMAP3 and OMAP4 generic
> > machine descriptors.
> > 
> > Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Marc Zyngier <marc.zyngier@arm.com>
> > ---
> >  arch/arm/mach-omap2/board-generic.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>

Thanks I'll apply this into omap dt branch.

Regards,

Tony