linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/18] arm64: initial support for GICv3
Date: Thu, 27 Feb 2014 12:07:30 +0000	[thread overview]
Message-ID: <20140227120730.GE30003@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <530DE3CE.1010002@arm.com>

On Wed, Feb 26, 2014 at 12:53:34PM +0000, Marc Zyngier wrote:
> On 25/02/14 18:06, Will Deacon wrote:
> > Not sure if you care, but readq is a show-stopper if you want to build this
> > with arch/arm/.
> 
> I realized that recently. Any reason why we don't have writeq/readq on
> LPAE-capable stuff (other than the obvious runtime detection madness)?

I'm not sure that you'd be guaranteed single-copy atomicity for such an
access, which is probably assumed by readq/writeq.

> >> +                       if ((typer >> 32) == aff) {
> >> +                               gic_data_rdist_rd_base() = ptr;
> >> +                               pr_info("CPU%d: found redistributor %llx @%p\n",
> >> +                                       smp_processor_id(),
> >> +                                       (unsigned long long) mpidr, ptr);
> >> +                               return 0;
> >> +                       }
> >> +
> >> +                       if (gic_data.redist_stride) {
> >> +                               ptr += gic_data.redist_stride;
> >> +                       } else {
> >> +                               ptr += SZ_64K * 2; /* Skip RD_base + SGI_base */
> >> +                               if (typer & GICR_TYPER_VLPIS)
> >> +                                       ptr += SZ_64K * 2; /* Skip VLPI_base + reserved page */
> >> +                       }
> >
> > VLPIS is RES0 in GICv3.
> 
> Indeed. But we still want this driver to run on GICv4 HW, even if we
> don't use VLPIs just yet.

Ok, just mention that in the commit then.

> >> +static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
> >> +                           bool force)
> >> +{
> >> +       unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
> >> +       void __iomem *reg;
> >> +       u64 val;
> >> +
> >> +       if (gic_irq(d) < 32)
> >> +               return -EINVAL;
> >> +
> >> +       reg = gic_dist_base(d) + GICD_IROUTER + (gic_irq(d) * 8);
> >> +       val = gic_mpidr_to_affinity(cpu_logical_map(cpu));
> >> +
> >> +       writeq_relaxed(val, reg);
> >
> > How do you ensure that the interrupt has actually moved?
> 
> There is no way to ensure it actually did (other than reading back from
> the same register, if that's what you're aiming for?).

I guess it depends how angry Linux will get if the interrupt fires on the
wrong CPU. If the interrupt is pending when the moving takes place, will it
be asserted on the new target?

Will

  reply	other threads:[~2014-02-27 12:07 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 13:30 [PATCH 00/18] arm64: GICv3 support Marc Zyngier
2014-02-05 13:30 ` [PATCH 01/18] arm64: initial support for GICv3 Marc Zyngier
2014-02-07  8:59   ` Arnab Basu
2014-02-07 13:52     ` Christopher Covington
2014-02-13 15:28     ` Marc Zyngier
2014-02-17  1:19   ` Christoffer Dall
2014-02-17 16:41     ` Marc Zyngier
2014-02-17 18:10       ` Christoffer Dall
2014-02-25 18:06   ` Will Deacon
2014-02-26 12:53     ` Marc Zyngier
2014-02-27 12:07       ` Will Deacon [this message]
2014-03-15 15:22         ` Radha Mohan
2014-02-05 13:30 ` [PATCH 02/18] arm64: GICv3 device tree binding documentation Marc Zyngier
2014-02-07  5:41   ` Arnab Basu
2014-02-13 12:59     ` Marc Zyngier
2014-02-13 13:27       ` Rob Herring
2014-02-13 13:26   ` Rob Herring
2014-02-13 14:00     ` Marc Zyngier
2014-02-17  1:21   ` Christoffer Dall
2014-02-17 16:57     ` Marc Zyngier
2014-02-05 13:30 ` [PATCH 03/18] arm64: boot protocol documentation update for GICv3 Marc Zyngier
2014-02-05 15:03   ` Catalin Marinas
2014-02-25 18:06   ` Will Deacon
2014-02-26 14:37     ` Marc Zyngier
2014-02-26 15:31       ` Will Deacon
2014-02-26 15:59         ` Marc Zyngier
2014-02-26 16:01           ` Will Deacon
2014-02-05 13:30 ` [PATCH 04/18] KVM: arm/arm64: vgic: move GICv2 registers to their own structure Marc Zyngier
2014-03-04  3:32   ` Christoffer Dall
2014-02-05 13:30 ` [PATCH 05/18] KVM: ARM: vgic: introduce vgic_ops and LR manipulation primitives Marc Zyngier
2014-02-05 13:30 ` [PATCH 06/18] KVM: ARM: vgic: abstract access to the ELRSR bitmap Marc Zyngier
2014-02-05 13:30 ` [PATCH 07/18] KVM: ARM: vgic: abstract EISR bitmap access Marc Zyngier
2014-02-05 13:30 ` [PATCH 08/18] KVM: ARM: vgic: abstract MISR decoding Marc Zyngier
2014-02-05 13:30 ` [PATCH 09/18] KVM: ARM: vgic: move underflow handling to vgic_ops Marc Zyngier
2014-02-05 13:30 ` [PATCH 10/18] KVM: ARM: vgic: abstract VMCR access Marc Zyngier
2014-02-05 13:30 ` [PATCH 11/18] KVM: ARM: vgic: introduce vgic_enable Marc Zyngier
2014-02-05 13:30 ` [PATCH 12/18] KVM: ARM: introduce vgic_params structure Marc Zyngier
2014-02-05 13:30 ` [PATCH 13/18] KVM: ARM: vgic: split GICv2 backend from the main vgic code Marc Zyngier
2014-02-05 13:30 ` [PATCH 14/18] arm64: KVM: remove __kvm_hyp_code_{start, end} from hyp.S Marc Zyngier
2014-02-05 13:30 ` [PATCH 15/18] arm64: KVM: split GICv2 world switch from hyp code Marc Zyngier
2014-02-25 18:07   ` Will Deacon
2014-02-05 13:30 ` [PATCH 16/18] arm64: KVM: move hcr_el2 setting into vgic-v2-switch.S Marc Zyngier
2014-02-05 13:30 ` [PATCH 17/18] KVM: ARM: vgic: add the GICv3 backend Marc Zyngier
2014-02-25 18:07   ` Will Deacon
2014-02-26 18:18     ` Marc Zyngier
2014-02-27 12:12       ` Will Deacon
2014-02-05 13:30 ` [PATCH 18/18] arm64: KVM: vgic: add GICv3 world switch Marc Zyngier
2014-02-25 18:08   ` Will Deacon
2014-02-26 18:06     ` Marc Zyngier

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=20140227120730.GE30003@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.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).