Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1579569
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 06/33] irqchip/gic-v3-its: Add probing for VLPI properties |
| Date | 2017-02-13 11:10 +0100 |
| Message-ID | <talK1-2iF-3@gated-at.bofh.it> (permalink) |
| References | <t0zbz-5Tg-15@gated-at.bofh.it> <t0zbA-5Tg-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 17 Jan 2017, Marc Zyngier wrote:
> + typer = gic_read_typer(its_base + GITS_TYPER);
> its->base = its_base;
> its->phys_base = res->start;
> - its->ite_size = ((gic_read_typer(its_base + GITS_TYPER) >> 4) & 0xf) + 1;
> + its->ite_size = ((typer >> 4) & 0xf) + 1;
> + its->is_v4 = !!(typer & GITS_TYPER_VLPIS);
> + if (its->is_v4 && !(typer & GITS_TYPER_VMOVP)) {
> + int its_number;
> +
> + its_number = find_first_zero_bit(&its_list_map, 16);
s/16/ITS_MAX_ENTITIES or whatever.
> + if (its_number >= 16) {
> + pr_err("ITS@%pa: No ITSList entry available!\n",
> + &res->start);
> + err = -EINVAL;
> + goto out_free_its;
> + }
> +
> + ctlr = readl_relaxed(its_base + GITS_CTLR);
> + ctlr &= ~GITS_CTLR_ITS_NUMBER;
> + ctlr |= its_number << GITS_CTLR_ITS_NUMBER_SHIFT;
> + writel_relaxed(ctlr, its_base + GITS_CTLR);
> + ctlr = readl_relaxed(its_base + GITS_CTLR);
> + if ((ctlr & GITS_CTLR_ITS_NUMBER) != (its_number << GITS_CTLR_ITS_NUMBER_SHIFT)) {
> + its_number = ctlr & GITS_CTLR_ITS_NUMBER;
> + its_number >>= GITS_CTLR_ITS_NUMBER_SHIFT;
> + }
> +
> + if (test_and_set_bit(its_number, &its_list_map)) {
You just established above that the bit is not set. I assume that this is
code which has no concurrency concerns....
Thanks,
tglx
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [RFC PATCH 06/33] irqchip/gic-v3-its: Add probing for VLPI properties Thomas Gleixner <tglx@linutronix.de> - 2017-02-13 11:10 +0100 Re: [RFC PATCH 06/33] irqchip/gic-v3-its: Add probing for VLPI properties Auger Eric <eric.auger@redhat.com> - 2017-02-16 14:50 +0100
csiph-web