linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jason77.wang@gmail.com (Hui Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: i.MX6Quad PMU irq handling
Date: Thu, 28 Feb 2013 15:38:45 +0800	[thread overview]
Message-ID: <512F0985.306@gmail.com> (raw)
In-Reply-To: <512EFF43.5010502@de.bosch.com>

Dirk Behme wrote:
> Hi Hui,
>
> On 14.08.2012 03:46, Hui Wang wrote:
>> Will Deacon wrote:
>>> On Mon, Aug 13, 2012 at 10:11:37AM +0100, Hui Wang wrote:
>>>  
>>>> Hi Will Deacon,
>>>>     
>>> Hello,
>>>
>>>  
>>>> For SMP platforms, each CPU core has an independent PMU, and each 
>>>> PMU has a dedicated irq (SPI or PPI). Current perf subsystem 
>>>> framework only supports each PMU to have a dedicated SPI irq, and 
>>>> it will support each PMU to have a PPI irq (i have seen someone has 
>>>> sent out the patches), but there is a situation the subsystem 
>>>> doesn't support yet, the situation is multi PMUs share one same SPI 
>>>> irq, e.g. the i.MX6Quad CPU has 4 cortex-a9 cores, each core has a 
>>>> PMU, all PMU irqs are routed (ORed) to one SPI irq, do you know how 
>>>> to support this situation?
>>>>     
>>> That's what I like to call a braindead, broken system. Seriously, 
>>> CPU PMU
>>> interrupts *can only* be handled on the CPU which raised them -- 
>>> ORing these
>>> things together means ping-ponging the interrupt affinity around 
>>> until we
>>> find the right guy. There's also the fun case where multiple PMUs 
>>> assert
>>> simultaneously and I've even heard about platforms where they OR in the
>>> bloody L2 PMU interrupt as well for good measure!
>>>
>>> If you have to support such a device, take a look at the ux500 code
>>> (db8500_pmu_handler), but please take all of your profiling numbers 
>>> with a
>>> pinch of salt. For a quad-core processor, the numbers will probably 
>>> be even
>>> less accurate.
>>>
>>> Also, please go ahead and inflict sufficient injuries to your 
>>> hardware guys
>>> that they stop this madness!
>>>   
>> Got it, thanks for the information, it is very useful.
>
> Above you mention the the i.MX6Quad CPU.
>
> Have you done any work/patches for the i.MX6Quad PMU to work with the 
> ORed PMU irq?
Not yet. i implement a pmu_handler similar to db8500_pmu_handler, but it 
can't work stable on the imx6q. With the increasing number of cpu cores, 
the situation is worse.

>
> Have you talked with the Freescale hardware guys "that they stop this 
> madness"?
As Shawn said, this issue has been reported to FSL.


Regards,
Hui.
>
> We are facing some issues using perf top on the i.MX6Quad:
>
> http://www.spinics.net/lists/arm-kernel/msg227042.html
>
> Many thanks and best regards
>
> dirk
>

      parent reply	other threads:[~2013-02-28  7:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 17:36 [PATCH 0/9] ARM perf updates for 3.7 Will Deacon
2012-08-10 17:36 ` [PATCH 1/9] ARM: PMU: Add runtime PM Support Will Deacon
2012-08-11 15:09   ` Ming Lei
2012-08-13 10:40     ` Will Deacon
2012-08-16 13:56       ` Jon Hunter
2012-08-10 17:36 ` [PATCH 2/9] ARM: perf: add devicetree bindings for 11MPcore, A5, A7 and A15 PMUs Will Deacon
2012-08-10 18:42   ` Rob Herring
2012-08-10 17:36 ` [PATCH 3/9] ARM: pmu: remove unused reservation mechanism Will Deacon
2012-08-10 17:36 ` [PATCH 4/9] ARM: pmu: remove arm_pmu_type enumeration Will Deacon
2012-08-13 14:17   ` Linus Walleij
2012-08-13 21:57   ` Jiandong Zheng
2012-08-14  8:43     ` Sudeep KarkadaNagesha
2012-08-14 16:53       ` Jiandong Zheng
2012-08-16 13:59   ` Jon Hunter
2012-08-17 14:08   ` Jon Hunter
2012-08-20  9:01     ` Will Deacon
2012-08-20 13:05       ` Jon Hunter
2012-08-23  5:45   ` Kukjin Kim
2012-08-10 17:36 ` [PATCH 5/9] ARM: perf: remove mysterious compiler barrier Will Deacon
2012-08-10 17:36 ` [PATCH 6/9] ARM: perf: probe devicetree in preference to current CPU Will Deacon
2012-08-10 17:36 ` [PATCH 7/9] ARM: perf: prepare for moving CPU PMU code into separate file Will Deacon
2012-08-10 17:36 ` [PATCH 8/9] ARM: perf: move CPU-specific PMU handling " Will Deacon
2012-08-10 17:36 ` [PATCH 9/9] ARM: perf: move irq registration into pmu implementation Will Deacon
2012-08-13  9:11 ` [PATCH 0/9] ARM perf updates for 3.7 Hui Wang
2012-08-13  9:32   ` Will Deacon
2012-08-14  1:46     ` Hui Wang
2013-02-28  6:54       ` i.MX6Quad PMU irq handling (was: Re: [PATCH 0/9] ARM perf updates for 3.7) Dirk Behme
2013-02-28  7:27         ` Shawn Guo
2013-02-28  7:38         ` Hui Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512F0985.306@gmail.com \
    --to=jason77.wang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).