From patchwork Wed Jul 17 23:06:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 2829136 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BD835C0AB2 for ; Wed, 17 Jul 2013 23:07:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D98622042C for ; Wed, 17 Jul 2013 23:07:35 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B496C20445 for ; Wed, 17 Jul 2013 23:07:34 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uzao5-00047w-NG; Wed, 17 Jul 2013 23:06:50 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uzao3-0002n7-86; Wed, 17 Jul 2013 23:06:47 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uzanz-0002lX-Or for linux-arm-kernel@lists.infradead.org; Wed, 17 Jul 2013 23:06:44 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 47FC913F11E; Wed, 17 Jul 2013 23:06:22 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 3A5BC13F117; Wed, 17 Jul 2013 23:06:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from [10.46.166.8] (i-global252.qualcomm.com [199.106.103.252]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D403613F117; Wed, 17 Jul 2013 23:06:21 +0000 (UTC) Message-ID: <51E7236D.3010700@codeaurora.org> Date: Wed, 17 Jul 2013 16:06:21 -0700 From: Stephen Boyd User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Nicolas Pitre Subject: Re: [PATCH] irqchip: gic: Don't complain in gic_get_cpumask() if UP system References: <1373067573-29946-1-git-send-email-sboyd@codeaurora.org> <20130712111322.GC3213@e102654-lin.cambridge.arm.com> <20130712121023.GB27430@codeaurora.org> <51E71249.4050200@codeaurora.org> <51E71C78.6080604@codeaurora.org> In-Reply-To: X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130717_190643_877697_850D1728 X-CRM114-Status: GOOD ( 18.16 ) X-Spam-Score: -2.3 (--) Cc: Russell King , Javi Merino , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 07/17/13 15:53, Nicolas Pitre wrote: > On Wed, 17 Jul 2013, Stephen Boyd wrote: > >> On 07/17/13 15:34, Nicolas Pitre wrote: >>> On Wed, 17 Jul 2013, Stephen Boyd wrote: >>> >>>> On 07/12/13 05:10, Stephen Boyd wrote: >>>>> On 07/12, Javi Merino wrote: >>>>>> I agree, we should drop the check. It's annoying in uniprocessors and >>>>>> unlikely to be found in the real world unless your gic entry in the dt >>>>>> is wrong. >>> And that's a likely outcome in the real world. >>> >>>>> Ok. How about this? >>>> Any comments? >>> What about this instead: >> Unfortunately arm64 doesn't have SMP_ON_UP. > And why does that matter? Because the gic driver is compiled on both arm and arm64? I suppose we could define is_smp() to 1 on arm64 but its probably better to rely on generic kernel things instead of arch specific functions. > >> It sounds like you preferred the first patch using num_possible_cpus() > Probably, yes. I didn't follow the early conversation though. This was the first patch: ---8<---- diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 19ceaa6..589c760 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -368,7 +368,7 @@ static u8 gic_get_cpumask(struct gic_chip_data *gic) break; } - if (!mask) + if (!mask && num_possible_cpus() > 1) pr_crit("GIC CPU mask not found - kernel will fail to boot.\n"); return mask;