Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4980369imm; Tue, 9 Oct 2018 08:01:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV60yFJnXkWmhtjOoZF1zga8qCH2XjtXICOnALMuvBhx2xwUPT+X4Fh/3LgMTbt/ZSFvrbP8e X-Received: by 2002:a63:5a54:: with SMTP id k20-v6mr26104667pgm.297.1539097305658; Tue, 09 Oct 2018 08:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539097305; cv=none; d=google.com; s=arc-20160816; b=UQo/EVzlSQX7ypbL7YTeMZRcmwWC7Eq83J7qy7KtZbExVIqtTBQWjBZfL09cJ9O5hL 6C3PUcbwR20S1dn5TUhjkEbY1eCD8jpXzPRs93aMWOyOO9teHNPhUhxOqKwxM8d8cQgF YTMYyrd52sxpdWiSg6toR1cHJz4cvPKwhZ4w/8Pe3JXZbulsOQ4LVZtxyCyc58bMjPDx hgRShWmNZEdPA4orCOTzytR3RSOonp8XxFjG1lzu66eLx5eI59pClKBY57YIALUn9gQz ZfqlJDxNoWi5wnes9yMhr6S+SbsuPbzMbWyDvNsQ4XcskQQOyDcj4Cw2yCPdlE8DzVpx Dn/g== 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=HTfuLMsUP4ExDxuUqTc/db0b5eRIa1qgFO1SGPvSyNk=; b=lnF9z0qGUAioC4o+owzYEYe/cHisebWECHM4av//NCftkMy+eGb3MhXJ9DJFfE76Bk +lDEfdb9nglI323ZPMlONh+Bj3zEZ/ff/Nmy6HgNRsny8yWTnXndRLfRVkJRj45JpUsP R+mJsGH4TkmxeDP0dobaR96172LGsmwlkapHm4FrCuyNo18XcoMHri53kHonicuHzUtC WnrGx8GFxI2//lq8TsM2xkhQsiuB5Fuh7/kABjFxxhGSdOVCrAcyd9Z1dgBJT7sSdhke nxMhtBUmhKT94V3fXBFZk5pPg+U9Nm2k4m9NhZiJTND+HN/T6N1GE9reBibyKCYUkYgx bqsw== 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 y6-v6si21723216pfb.161.2018.10.09.08.01.26; Tue, 09 Oct 2018 08:01:45 -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 S1726713AbeJIWRv (ORCPT + 99 others); Tue, 9 Oct 2018 18:17:51 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:36158 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbeJIWRu (ORCPT ); Tue, 9 Oct 2018 18:17:50 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.09210706|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03306;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=16;RT=16;SR=0;TI=SMTPD_---.D.er2x5_1539097196; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.D.er2x5_1539097196) by smtp.aliyun-inc.com(10.147.41.187); Tue, 09 Oct 2018 22:59:56 +0800 Date: Tue, 9 Oct 2018 22:59:56 +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: <20181009145955.GA17681@guoren-Inspiron-7460> References: <404fb433-020e-28f9-2434-a22c6db36a15@arm.com> <20181009022357.GA826@guoren> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Oct 09, 2018 at 09:15:17AM +0100, Marc Zyngier wrote: > >>>+#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. > > Except that your SMP code does a request_irq on the result of > create_mapping. Who is going to do that if you don't pass the Linux irq > around? Yes, My SMP code does a request_irq on the result of create_mapping. Here is my smp.c code and it use a result of create_mapping by arch_ipi_irq_mapping() callback in irq-csky-mpintc.c void __init setup_smp_ipi(void) { int rc; ipi_irq = arch_ipi_irq_mapping(); if (ipi_irq == 0) panic("%s IRQ mapping failed\n", __func__); rc = request_percpu_irq(ipi_irq, handle_ipi, "IPI Interrupt", &ipi_dummy_dev); if (rc) panic("%s IRQ request failed\n", __func__); enable_smp_ipi(); } Best Regards Guo Ren