From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Date: Thu, 04 Aug 2016 14:32:57 +0000 Subject: Re: [PATCH v6 2/2] irqchip: add J-Core AIC driver Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Rich Felker Cc: "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Linux-sh list , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland Hi Rich, On Thu, Aug 4, 2016 at 6:30 AM, Rich Felker 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964912AbcHDOdB (ORCPT ); Thu, 4 Aug 2016 10:33:01 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:34284 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933869AbcHDOc7 (ORCPT ); Thu, 4 Aug 2016 10:32:59 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Geert Uytterhoeven Date: Thu, 4 Aug 2016 16:32:57 +0200 X-Google-Sender-Auth: MqsN_Rh2ro8AnGnbML4tf6VA17E Message-ID: Subject: Re: [PATCH v6 2/2] irqchip: add J-Core AIC driver To: Rich Felker Cc: "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Linux-sh list , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rich, On Thu, Aug 4, 2016 at 6:30 AM, Rich Felker 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