Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5358799ybi; Tue, 4 Jun 2019 05:35:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQ+6oU2gtv7MCZLWq5Qj4wPGJ56XdTg2k0a6Lw46EpdOn2e05OTJntsp7dUM509PiCFB7J X-Received: by 2002:a17:902:968b:: with SMTP id n11mr2320684plp.120.1559651749840; Tue, 04 Jun 2019 05:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559651749; cv=none; d=google.com; s=arc-20160816; b=wFpMLRzqA2aEgk5X8Ax8qftySgfyOKxXtJaPlA6uESocXIB+Z/5uzP4Rnte/nKv+jB Mboo0ORArZwVKhU5+j/GMZtrU1kKzxvTEnOewadn/Fi8sQOk8XX0YWytbii5Yr2xatwg U1Xp4JpqZFAvYyGRQ7Ybi7vhmFSWWh6MpjgLbSqnirXyGLqmQsfCECoQfHMcgy3YECd4 ml0u70cFaxCmaWU1C1zyQuKaJnOUboXZ8O52ZppUP92y0gcanU91mxrXohz8zET4ecFV bS9mMH6CV2H5E2/KR/GFUNKoRJ+bdnuVbPtLjaKUs377P8iwsd9WmUKViDwvtTo2TBIS E31Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=YYesUmqNEpI5e+yF3XRfDzteaQtpXVsdE9/+rHeX1rU=; b=aJQmIxk7u7F0q/+Tn8X/SJ4ZYYlIIwbd4+jIE7QDnXOU49O+SoHWbXUA8aERmELMpu lIRwcCml53o5A5DYDY339OOVZeZec4R6a20l5/YIqNyenrTa81YMDC9s87UHfVBaqvPr 1FajvV8MTJvgqAJuDMOSWSd/jfWJt47HUc6Zny0+4CE/hjeud3yd6POTIWpTgc0ZRzTK sF8A7Uwx5coAaOCSubUDzIN6aLIYAbvbNe9Ft8GW9KcOrgfV/Fn+/3a1L3xA1VBIgsUk D83B2WutA3aE3/k5+g97t+9lBp63xafr448BR4+U/qKVS/rKl7Ox8fZunztg0yj2JSTS quQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NNm+b4jC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b16si24517050pgk.387.2019.06.04.05.35.31; Tue, 04 Jun 2019 05:35:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NNm+b4jC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727913AbfFDMcW (ORCPT + 99 others); Tue, 4 Jun 2019 08:32:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:36690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727403AbfFDMcW (ORCPT ); Tue, 4 Jun 2019 08:32:22 -0400 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4309724B7E; Tue, 4 Jun 2019 12:32:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559651541; bh=mQdOZZdjwnnzpAJPKdYd3WuB5icZFW/aX0zjXI6udbw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NNm+b4jCy+R9bfD2mCX97LmKHmX1zgYOBq7iHxDQsFY1uRnqcaj42F+SBy3Uj4OCi FLIC1jGHNYtbmrDZ4ej2I6X+mGB8gjPhJSJ6EGoP1r9Jv9EDBZTq9Bbxr8Bv55jFK1 bnX+XhS0rJbOGNODFNVAnhJa9CcSRHG/hTBpia4w= Received: by mail-wm1-f53.google.com with SMTP id s3so7351867wms.2; Tue, 04 Jun 2019 05:32:21 -0700 (PDT) X-Gm-Message-State: APjAAAWICTRPiaiQs7OoO9GndXkdma3yLSFbi3+494nbPBSeM50iZmpd NyonBOaLi/Jy6otdR7fyGARY2J7k7HIDiER2eWI= X-Received: by 2002:a05:600c:20c3:: with SMTP id y3mr2007579wmm.3.1559651539850; Tue, 04 Jun 2019 05:32:19 -0700 (PDT) MIME-Version: 1.0 References: <1559646306-18860-1-git-send-email-guoren@kernel.org> <1559646306-18860-4-git-send-email-guoren@kernel.org> <7943816e-1cf0-dbc9-157d-71a83c5016c6@arm.com> In-Reply-To: <7943816e-1cf0-dbc9-157d-71a83c5016c6@arm.com> From: Guo Ren Date: Tue, 4 Jun 2019 20:32:08 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V4 3/4] irqchip/irq-csky-mpintc: Support auto irq deliver to all cpus To: Marc Zyngier Cc: mark.rutland@arm.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, jason@lakedaemon.net, linux-csky@vger.kernel.org, Guo Ren Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Marc, On Tue, Jun 4, 2019 at 7:54 PM Marc Zyngier wrote: > > On 04/06/2019 12:05, guoren@kernel.org wrote: > > From: Guo Ren > > > > The csky,mpintc could deliver a external irq to one cpu or all cpus, but > > it couldn't deliver a external irq to a group of cpus with cpu_mask. So > > we only use auto deliver mode when affinity mask_val is equal to > > cpu_present_mask. > > > > There is no limitation for only two cpus in SMP system. > > > > Signed-off-by: Guo Ren > > Cc: Marc Zyngier > > --- > > drivers/irqchip/irq-csky-mpintc.c | 15 +++++++++++++-- > > 1 file changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/irqchip/irq-csky-mpintc.c b/drivers/irqchip/irq-csky-mpintc.c > > index a451a07..2740dd5 100644 > > --- a/drivers/irqchip/irq-csky-mpintc.c > > +++ b/drivers/irqchip/irq-csky-mpintc.c > > @@ -143,8 +143,19 @@ static int csky_irq_set_affinity(struct irq_data *d, > > if (cpu >= nr_cpu_ids) > > return -EINVAL; > > > > - /* Enable interrupt destination */ > > - cpu |= BIT(31); > > + /* > > + * The csky,mpintc could support auto irq deliver, but it only > > + * could deliver external irq to one cpu or all cpus. So it > > + * doesn't support deliver external irq to a group of cpus > > + * with cpu_mask. > > + * SO we only use auto deliver mode when affinity mask_val is > > + * equal to cpu_present_mask. > > + * > > + */ > > + if (cpumask_equal(mask_val, cpu_present_mask)) > > + cpu = 0; > > + else > > + cpu |= BIT(31); > > > > writel_relaxed(cpu, INTCG_base + INTCG_CIDSTR + offset); > > > > > > Isn't that the same patch as [1]? In which case, I've queued it as a fix > already. Yes, they are the same. It's duplicate. I think you've queued this one: https://lore.kernel.org/lkml/1558425245-20995-1-git-send-email-guoren@kernel.org/ That's OK. Best Regards Guo Ren