linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: fu.wei@linaro.org (Fu Wei)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver
Date: Fri, 7 Apr 2017 02:07:40 +0800	[thread overview]
Message-ID: <CADyBb7suSedttCma7Q6-RGfduJBOD5AWCpOA3pyvjDn6z+uSow@mail.gmail.com> (raw)
In-Reply-To: <20170406175252.GB11871@leverpostej>

Hi Mark,

On 7 April 2017 at 01:52, Mark Rutland <mark.rutland@arm.com> wrote:
> On Fri, Apr 07, 2017 at 01:39:09AM +0800, Fu Wei wrote:
>> On 7 April 2017 at 01:24, Mark Rutland <mark.rutland@arm.com> wrote:
>> > On Fri, Apr 07, 2017 at 12:47:47AM +0800, Fu Wei wrote:
>> >> On 6 April 2017 at 02:38, Mark Rutland <mark.rutland@arm.com> wrote:
>> >> > On Sat, Apr 01, 2017 at 01:51:03AM +0800, fu.wei at linaro.org wrote:
>
>> > However, I would prefer to simplify this such that we only free the
>> > IRQs in the error path.
>> >
>> > We should be able to iterate over all freams, freeing any non-zero
>> > interrupt, since !valid frames shouldn't have non-zero interrupts.
>>
>> Yes, that is what I am doing :
>>
>>  if (!frame->valid)
>>           continue;
>
> What I meant was that we won't look at the frame->valid flag at all;
> only the interrupts. e.g.
>
> for (int i = 0; i < ARCH_TIMER_MEM_MAX_FRAMES; i++) {
>         if (frame->phys_irq > 0)
>                 free_the_phys_irq_somehow();
>         if (frame->virt_irq > 0)
>                 free_the_virt_irq_somehow();
> }

Since we use "kcalloc" to allocate struct arch_timer_mem, this should be OK.

>
> ... where we somehow figure out the GSI, or we introduce an api like
> unregister_gsi_for_irq(irq).

Yes, If you are OK with introducing a new API , this problem is solved :-)

>
> Since the !valid frames should all have zero for their interrupt fields,
> no special handling is necessary.
>
> That way, we only free the IRQs in one place, it's obvious that we
> consistently free all of them, etc.
>
>> Lorenzo addressed the API issue, we may can fix it by getting GSI info
>> from DT, then register it until we figure the best frame.
>> It may need some big change in DT code
>
> I'd prefer to keep this constrained to the ACPI code. ;)
>
> Thanks,
> Mark.



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

  reply	other threads:[~2017-04-06 18:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 17:50 [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 01/11] clocksource: arm_arch_timer: add MMIO CNTFRQ helper fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 02/11] clocksource: arm_arch_timer: split dt-only rate handling fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 03/11] clocksource: arm_arch_timer: refactor arch_timer_needs_probing fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 04/11] clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call fu.wei at linaro.org
2017-03-31 17:50 ` [PATCH v23 05/11] clocksource: arm_arch_timer: add structs to describe MMIO timer fu.wei at linaro.org
2017-03-31 17:51 ` [PATCH v23 06/11] clocksource: arm_arch_timer: refactor MMIO timer probing fu.wei at linaro.org
2017-04-05 18:42   ` Mark Rutland
2017-04-06 10:45     ` Fu Wei
2017-03-31 17:51 ` [PATCH v23 07/11] acpi/arm64: Add GTDT table parse driver fu.wei at linaro.org
2017-03-31 17:51 ` [PATCH v23 08/11] clocksource: arm_arch_timer: simplify ACPI support code fu.wei at linaro.org
2017-03-31 17:51 ` [PATCH v23 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver fu.wei at linaro.org
2017-04-03  9:49   ` Will Deacon
2017-04-03 10:45   ` Lorenzo Pieralisi
2017-04-06 17:11     ` Fu Wei
2017-04-05 18:38   ` Mark Rutland
2017-04-06 10:07     ` Mark Rutland
2017-04-06 16:47     ` Fu Wei
2017-04-06 17:24       ` Mark Rutland
2017-04-06 17:39         ` Fu Wei
2017-04-06 17:52           ` Mark Rutland
2017-04-06 18:07             ` Fu Wei [this message]
2017-03-31 17:51 ` [PATCH v23 10/11] clocksource: arm_arch_timer: add GTDT support for memory-mapped timer fu.wei at linaro.org
2017-03-31 17:51 ` [PATCH v23 11/11] acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver fu.wei at linaro.org
2017-04-01  2:14 ` [PATCH v23 00/11] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer Xiongfeng Wang
2017-04-01  3:49   ` Fu Wei
2017-04-04 20:39 ` Timur Tabi

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=CADyBb7suSedttCma7Q6-RGfduJBOD5AWCpOA3pyvjDn6z+uSow@mail.gmail.com \
    --to=fu.wei@linaro.org \
    --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).