Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1584293imm; Wed, 19 Sep 2018 22:47:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaU4svWsa5WxiUSUiqEVarkYo9uBBW6+6XYf4a08pTwbk5egMCYntehew1Wa4K2CZh/HhZm X-Received: by 2002:a65:6104:: with SMTP id z4-v6mr8829057pgu.361.1537422461774; Wed, 19 Sep 2018 22:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537422461; cv=none; d=google.com; s=arc-20160816; b=iksuczVIbvcvEo3xx1SowTSZJj7+Veet4Rl8ejAzo4wuEc3DLSp0yW3Fp5YmbeEm64 R44VhY8tt0CVQ9c3X0C8VHd2jkb1TNPirYQIAEf/LETcLVTJ10cb+isT9hcj9pHSVvSS mS/jxzUevoQ5INZXWTveCVgC9aKly+leq0eqXBAxFjn3TKxBlszTD+04RCHphLjKkybh vPGpEtKa7Tif9USH8UZh0yu7O0aYH6LbDiEL2+1hANvKSRCxp8DDrnV3NAFXd+irqn/0 3F55Yo25qeoq4hs5lo5TmmuhNs4p8Kzyla89R2Jw6fRUU1gcRLsMJWLpwnthOItoyawy YXYw== 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=UQmWkcS+patkLK4srDHJpqliG3TvvvlZ9jKSjSy3Y4k=; b=brkDxBL265yOVtJqHo7XeFokzcS6cFNYH3Kxj2YhP+eB+uL19tk9ubEX9ucqpNCza7 xTUG0yZViHbYoW4M7FWvkBdWBBl2UFlfDpdtJWYyOIvTj+Dvp9uhX5O+OhVXQtfIMIha 3HQCZP0qAOuK8ZJ3gI0GuXd+mcvsXuPI/qpxbVFUN+jw/HgSK8FgyS+pr/K6GzMP4mZm NiPR02v4G1818kPF6cQ/02uPPnv+uw43i7yUuHjv6k0sds/S2M10AZ2ZmZfjJkMBeQcX 7HINy+X4/hI/PPmPLk3fGKdqf5cypscgcWX+ymivHDkRgh97HLBDibQV1EOd+u7qkNdS FJUQ== 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 x20-v6si25003834pff.333.2018.09.19.22.47.25; Wed, 19 Sep 2018 22:47:41 -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 S1731361AbeITL27 (ORCPT + 99 others); Thu, 20 Sep 2018 07:28:59 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:34288 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725725AbeITL26 (ORCPT ); Thu, 20 Sep 2018 07:28:58 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.136235|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01l07440;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=7;RT=7;SR=0;TI=SMTPD_---.CtHGZ6H_1537422434; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.CtHGZ6H_1537422434) by smtp.aliyun-inc.com(10.147.43.230); Thu, 20 Sep 2018 13:47:15 +0800 Date: Thu, 20 Sep 2018 13:47:14 +0800 From: Guo Ren To: Marc Zyngier Cc: tglx@linutronix.de, jason@lakedaemon.net, robh+dt@kernel.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers Message-ID: <20180920054713.GA5198@guoren-Inspiron-7460> References: <86in35mfas.wl-marc.zyngier@arm.com> <20180917020928.GA22452@guoren-Inspiron-7460> <86tvmoz22k.wl-marc.zyngier@arm.com> <20180918084331.GA10950@guoren> <86r2hqu82l.wl-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86r2hqu82l.wl-marc.zyngier@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 Tue, Sep 18, 2018 at 04:41:22PM +0100, Marc Zyngier wrote: > > +#define IPI_IRQ 15 > > + > > It feels really bizarre that the function that maps the interrupt is > specific to the interrupt controller, and yet the interrupt number is > defined at the architecture level. I'd expect this to be just as > interrupt controller specific. > Ok, move IPI_IRQ to irq-csky-mpintc.c. See my PATCH V8 > > + irq = arch_ipi_irq_mapping(); > > How about checking the validity of the interrupt and that > arch_ipi_irq_mapping is actually non-NULL? Ok. > > - rc = request_percpu_irq(IPI_IRQ, handle_ipi, "IPI Interrupt", &ipi_dummy_dev); > > + rc = request_percpu_irq(irq, handle_ipi, "IPI Interrupt", &ipi_dummy_dev); > > if (rc) > > panic("%s IRQ request failed\n", __func__); > > To be honest, I'd tend to question the need for this level of > abstraction, unless you actually plan for multiple SMP-capable > interrupt controllers... But at the end of the day, that's your call, > and the above code looks mostly correct. Thx for the review. I will consider your suggestion. Best Regards GUo Ren