From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rich Felker Date: Thu, 04 Aug 2016 16:42:50 +0000 Subject: Re: [PATCH v6 2/2] irqchip: add J-Core AIC driver Message-Id: <20160804164250.GH15995@brightrain.aerifal.cx> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Geert Uytterhoeven Cc: "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Linux-sh list , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland On Thu, Aug 04, 2016 at 04:32:57PM +0200, Geert Uytterhoeven wrote: > 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 you're not using a secondary cpu, there's no harm in ignoring its aic completely. Rich From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965453AbcHDQyI (ORCPT ); Thu, 4 Aug 2016 12:54:08 -0400 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:59575 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965352AbcHDQx6 (ORCPT ); Thu, 4 Aug 2016 12:53:58 -0400 Date: Thu, 4 Aug 2016 12:42:50 -0400 From: Rich Felker To: Geert Uytterhoeven Cc: "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Linux-sh list , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland Subject: Re: [PATCH v6 2/2] irqchip: add J-Core AIC driver Message-ID: <20160804164250.GH15995@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 04, 2016 at 04:32:57PM +0200, Geert Uytterhoeven wrote: > 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 you're not using a secondary cpu, there's no harm in ignoring its aic completely. Rich