All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rich Felker <dalias@libc.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v6 2/2] irqchip: add J-Core AIC driver
Date: Thu, 04 Aug 2016 14:32:57 +0000	[thread overview]
Message-ID: <CAMuHMdWiGCLQracGnD6Z5JiAJfYMsEdO0m52Xo4mkrVXEHgakg@mail.gmail.com> (raw)
In-Reply-To: <c3b89ef74aaa6477575dbe2d410eb1d182503243.147018b6529.git.dalias@libc.org>

Hi Rich,

On Thu, Aug 4, 2016 at 6:30 AM, Rich Felker <dalias@libc.org> wrote:
> --- /dev/null
> +++ b/drivers/irqchip/irq-jcore-aic.c

> +int __init aic_irq_of_init(struct device_node *node, struct device_node *parent)
> +{
> +       unsigned min_irq = JCORE_AIC2_MIN_HWIRQ;
> +       unsigned dom_sz = JCORE_AIC_MAX_HWIRQ+1;
> +       struct irq_domain *domain;
> +
> +       pr_info("Initializing J-Core AIC\n");
> +
> +       /* AIC1 needs priority initialization to receive interrupts. */
> +       if (of_device_is_compatible(node, "jcore,aic1")) {
> +               unsigned cpu;
> +
> +               for_each_present_cpu(cpu) {
> +                       void __iomem *base = of_iomap(node, cpu);

Just double checking, these regions are per-cpu hardware registers,
and not related to other functionality at all?

I.e. when booting on an SMP-capable system a kernel compiled with
CONFIG_SMP=n, or using the kernel command line option maxcpusto reduce the number of CPUs, no ill effects happen by not mapping the
region and not writing to the register below?

> +
> +                       if (!base) {
> +                               pr_err("Unable to map AIC for cpu %u\n", cpu);
> +                               return -ENOMEM;
> +                       }
> +                       __raw_writel(0xffffffff, base + JCORE_AIC1_INTPRI_REG);
> +                       iounmap(base);
> +               }
> +               min_irq = JCORE_AIC1_MIN_HWIRQ;
> +       }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rich Felker <dalias@libc.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v6 2/2] irqchip: add J-Core AIC driver
Date: Thu, 4 Aug 2016 16:32:57 +0200	[thread overview]
Message-ID: <CAMuHMdWiGCLQracGnD6Z5JiAJfYMsEdO0m52Xo4mkrVXEHgakg@mail.gmail.com> (raw)
In-Reply-To: <c3b89ef74aaa6477575dbe2d410eb1d182503243.147018b6529.git.dalias@libc.org>

Hi Rich,

On Thu, Aug 4, 2016 at 6:30 AM, Rich Felker <dalias@libc.org> wrote:
> --- /dev/null
> +++ b/drivers/irqchip/irq-jcore-aic.c

> +int __init aic_irq_of_init(struct device_node *node, struct device_node *parent)
> +{
> +       unsigned min_irq = JCORE_AIC2_MIN_HWIRQ;
> +       unsigned dom_sz = JCORE_AIC_MAX_HWIRQ+1;
> +       struct irq_domain *domain;
> +
> +       pr_info("Initializing J-Core AIC\n");
> +
> +       /* AIC1 needs priority initialization to receive interrupts. */
> +       if (of_device_is_compatible(node, "jcore,aic1")) {
> +               unsigned cpu;
> +
> +               for_each_present_cpu(cpu) {
> +                       void __iomem *base = of_iomap(node, cpu);

Just double checking, these regions are per-cpu hardware registers,
and not related to other functionality at all?

I.e. when booting on an SMP-capable system a kernel compiled with
CONFIG_SMP=n, or using the kernel command line option maxcpus=
to reduce the number of CPUs, no ill effects happen by not mapping the
region and not writing to the register below?

> +
> +                       if (!base) {
> +                               pr_err("Unable to map AIC for cpu %u\n", cpu);
> +                               return -ENOMEM;
> +                       }
> +                       __raw_writel(0xffffffff, base + JCORE_AIC1_INTPRI_REG);
> +                       iounmap(base);
> +               }
> +               min_irq = JCORE_AIC1_MIN_HWIRQ;
> +       }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2016-08-04 14:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  1:08 [PATCH v6 0/2] J-Core interrupt controller support Rich Felker
2016-08-03  1:08 ` Rich Felker
2016-08-03  1:08 ` Rich Felker
     [not found] ` <cover.1470186529.git.dalias-8zAoT0mYgF4@public.gmane.org>
2016-03-17 23:12   ` [PATCH v6 2/2] irqchip: add J-Core AIC driver Rich Felker
2016-03-17 23:12     ` Rich Felker
2016-03-17 23:12     ` Rich Felker
2016-05-17 23:18 ` [PATCH v6 1/2] of: add J-Core interrupt controller bindings Rich Felker
2016-08-04  4:30 ` [PATCH v6 0/2] J-Core interrupt controller support Rich Felker
2016-08-04  4:30   ` Rich Felker
2016-08-04  4:30   ` [PATCH v6 2/2] irqchip: add J-Core AIC driver Rich Felker
2016-08-04 14:32     ` Geert Uytterhoeven [this message]
2016-08-04 14:32       ` Geert Uytterhoeven
2016-08-04 16:42       ` Rich Felker
2016-08-04 16:42         ` Rich Felker
2016-08-04  4:30   ` [PATCH v6 1/2] of: add J-Core interrupt controller bindings Rich Felker
2016-08-04 14:31   ` [PATCH v6 0/2] J-Core interrupt controller support Jason Cooper
2016-08-04 14:31     ` Jason Cooper
2016-08-16 13:53     ` Jason Cooper

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=CAMuHMdWiGCLQracGnD6Z5JiAJfYMsEdO0m52Xo4mkrVXEHgakg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=dalias@libc.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.