Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4296286imm; Mon, 8 Oct 2018 19:25:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV61E/WQXapLpajVbG4TqOLRglZ4ejIzEca42eKfFRjvuxFz0BFL11uiAckmJTBKN5YihRHjz X-Received: by 2002:a62:7a81:: with SMTP id v123-v6mr28441515pfc.240.1539051915031; Mon, 08 Oct 2018 19:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539051915; cv=none; d=google.com; s=arc-20160816; b=Xo0bTuDr7fK0NcPGm1enJo1gjuC7d1BSS35IrQh3u3QDc4PGk5WStTOvPJmEEuQWQA oxeUh+j2LkWNcS8J2xtKiFQclh+lIyWw8W/iIoOL3DWQMj2Jo6hlQAPHIhZnmNWexcZ8 yJvmEHl+0od+O9EjF8S/O1h7ukIiNxlktcqQPMqlwDZXTZ990Teg0HzRfcxIVJIj1dht anCSwUTW2HbNUDyYcuIqmyxtKNYupPvr2z5cJD37kox5hEu5sdMpHmTXw0lmDAx5uhYN Qt5/SRdeEhmlVaEeeGzY9RbPv4QRGPgFS4xkvTcRQ+fQfjVKSU6+yaeuVboUpVTwsEDM 8nmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=W7ks7DhEFIPItz//PI2ZkXE7J6ELlBvYuKySvLHaHLU=; b=D6Cr3WfMN+V87zTJ+1n5cR9K9bgX4WCN07Qa6go7A7P8aSk8HnrUurtPT4IW8+NOAq yDxRJzfNlfdUtfUIY5DssMBZsJrbMXx3v6KA74ir14/75ZbD5Qrk6HZ62dqqPwMiDvnc z+FMgqc4i83OKXZw4n83Iyi/W69l2ivCpZ7TMVwt3QDRxVQVJZ8xvcpAt8YixM5PEOVb lSLuCNVi+C+d4/NtvPP/p2nyAQk+UabyNMA2p+9VgVkQvxFRCEQUMf49J4y4WQEPFder KJWYyt4RY+nXG0L/iErpB+v/OuUpHkFEO1zSHTAwEbpE9Y4UV+MZXKz6r0GKPbwma5fp MmzA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y28-v6si19470437pfk.230.2018.10.08.19.24.59; Mon, 08 Oct 2018 19:25:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726799AbeJIJjC (ORCPT + 99 others); Tue, 9 Oct 2018 05:39:02 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:40749 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbeJIJjC (ORCPT ); Tue, 9 Oct 2018 05:39:02 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.0979709|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01e01542;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=16;RT=16;SR=0;TI=SMTPD_---.D.KWfkV_1539051852; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.D.KWfkV_1539051852) by smtp.aliyun-inc.com(10.147.40.26); Tue, 09 Oct 2018 10:24:12 +0800 Date: Tue, 9 Oct 2018 10:24:12 +0800 From: Guo Ren To: Marc Zyngier Cc: tglx@linutronix.de, jason@lakedaemon.net, robh+dt@kernel.org, mark.rutland@arm.com, daniel.lezcano@linaro.org, anurup.m@huawei.com, Jonathan.Cameron@huawei.com, will.deacon@arm.com, zhangshaokun@hisilicon.com, jhogan@kernel.org, paul.burton@mips.com, peterz@infradead.org, arnd@arndb.de, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH V10 1/8] irqchip: add C-SKY SMP interrupt controller Message-ID: <20181009022357.GA826@guoren> References: <404fb433-020e-28f9-2434-a22c6db36a15@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404fb433-020e-28f9-2434-a22c6db36a15@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On Mon, Oct 08, 2018 at 05:35:19PM +0100, Marc Zyngier wrote: > Hi Guo, > > On 04/10/18 18:22, Guo Ren wrote: > > - Irq-csky-mpintc is C-SKY smp system interrupt controller and it > > could support 16 soft irqs, 16 private irqs, and 992 max common > > irqs. > > > >Changelog: > > - pass checkpatch.pl > > - Move IPI_IRQ into the driver > > - Remove irq_set_default_host() and use set_ipi_irq_mapping() [...] > >+#ifdef CONFIG_SMP > >+static void csky_mpintc_send_ipi(const unsigned long *mask) > >+{ > > Why isn't this a cpumask? It should be this driver's job to convert the > cpumask to an interrupt-controller specific representation, and not the SMP > code's. Ok, use cpumask. [...] > >+#ifdef CONFIG_SMP > >+ set_send_ipi(&csky_mpintc_send_ipi); > >+ > >+ set_ipi_irq_mapping(&csky_mpintc_ipi_irq_mapping); > > Since you seem to be inventing a new set_send_ipi callback, why don't you > define it as: > > void set_send_ipi(void (*func)(const struct cpumask *), > unsigned int ipi_irq); > after having created the mapping for the IPI interrupt? It would avoid this > rather pointless mapping callback. I'll define it to: void set_send_ipi(void (*func)(const struct cpumask *)); IPI_IRQ only use software-irq-15 in mpintc driver, so arch needn't care about irq-num. /* * INTCL_SIGR[3:0] INTID * INTCL_SIGR[8:15] CPUMASK */ writel_relaxed((*mask) << 8 | IPI_IRQ, reg_base + INTCL_SIGR); We direct put IPI_IRQ to the hw-reg for the target core. Best Regards Guo Ren