Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3453561imm; Sun, 16 Sep 2018 19:10:09 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdby/nWbNXT0oq+6DMsfrOxnN/b/Ernt/rAOzr+uCBn+kmprSTl+cVcyN6tosc8j7pFZW0iN X-Received: by 2002:a65:46cd:: with SMTP id n13-v6mr21125534pgr.22.1537150209252; Sun, 16 Sep 2018 19:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537150209; cv=none; d=google.com; s=arc-20160816; b=BPTaOIZRsVIQVH/Z8zdLn3FUh8BmWNKEhWvyAvssg2mF2iZjGRXlM8My8oRi9rThD9 qfQ9R0WkGrke/pJj/sgzw16ZUglFGk/WxpcJc0GkojH+LlYw0jCDekIbGXkWRldsBbE3 ZBgjnvdMc72wjx7FQSbZ7PSXwMIXcPAevaDzyilfvexZCuTvTHHTxJgfQWm4NtMM+jtF m2cDYB7hM8r41FLdd1YxXhtpY1gabz6PIYTYc/rMORbYSJhT8ODWVt1Yz70RvUmwG9F/ UQwM9lNXltSP3FUsIsufUmdsz3/n6BoVnYVsu7b33SPGTlWQqmyJl2DZFh0J17sy8E1w YjCQ== 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=4VvtGZZyjO1nXxnDFboJJQMAJNDRRvZo7tz9pZN5LnY=; b=sy2HSE/+wLA0YcxSNiTncZIeFkI54HzWVRZEIuj2B5LrkBcw06u1YtYeR13OjwLfCS UmMUNyIxiYJhU8nmAX8trxJj5sTyDpxWC08by3RWjtV2v4+ZrS367c2QdFoCPtB8ODDj erShgy0QlfEQtwxFLeRvBLWHceHuqeojS8igoWtgmqNLfUlUWXjgAZik5XRkIDs4n5v0 Y8+4UdLmvibWqGOL5NYnXKHnVwSWPAAlz/IJGowrRRLASfjiAmOuddGwbriAmVPMY9O8 inGzOh902+fdENMqHW8ftulaW7Ri3zrtxjRW5LNDR2olCdJAwd/DECiS+Xs/V+JSggk9 0mWQ== 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 q16-v6si13525204pgg.619.2018.09.16.19.09.39; Sun, 16 Sep 2018 19:10:09 -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 S1727215AbeIQHel (ORCPT + 99 others); Mon, 17 Sep 2018 03:34:41 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:43161 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbeIQHel (ORCPT ); Mon, 17 Sep 2018 03:34:41 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07531099|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03273;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=7;RT=7;SR=0;TI=SMTPD_---.Crl3yJ3_1537150169; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.Crl3yJ3_1537150169) by smtp.aliyun-inc.com(10.147.41.138); Mon, 17 Sep 2018 10:09:29 +0800 Date: Mon, 17 Sep 2018 10:09:29 +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: <20180917020928.GA22452@guoren-Inspiron-7460> References: <86in35mfas.wl-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86in35mfas.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 On Sun, Sep 16, 2018 at 08:07:55PM +0100, Marc Zyngier wrote: > On Sun, 16 Sep 2018 09:50:02 +0100, > Guo Ren wrote: > > +static void csky_mpintc_handler(struct pt_regs *regs) > > +{ > > + void __iomem *reg_base = this_cpu_read(intcl_reg); > > + > > + do { > > + handle_domain_irq(NULL, > > It is definitely odd to call into handle_domain_irq without a > domain. A new architecture (which C-SKY apparently is) shouldn't > depend on this, and should always provide a domain. Ok, I'll change it to handle_domain_irq(root_domain and prepare the root_domain definition. > > + ret = of_property_read_u32(node, "csky,num-irqs", &nr_irq); > > + if (ret < 0) { > > + nr_irq = INTC_IRQS; > > + } > > Drop the extra braces. Ok, and change it to: if (ret < 0) nr_irq = INTC_IRQS > > + > > + irq_set_default_host(root_domain); > > Please drop this. There is no reason to use this on any modern, DT > based architecture. Please let me keep this and in my arch/csky/kernel/smp.c: void __init setup_smp_ipi(void) { ... irq_create_mapping(NULL, IPI_IRQ); I need irq_set_default_host to pass the domain and this api is used by a lot of drivers: $ grep irq_set_default_host drivers/irqchip -r | wc -l 16 In future we could find a better solution. > > diff --git a/irq-csky-apb-intc.c b/irq-csky-apb-intc.c > > new file mode 100644 > > index 0000000..d56e6b5 > > --- /dev/null > > +++ b/irq-csky-apb-intc.c > > This is a separate driver, right? Please make it a separate patch. Ok, no problem. > > +static inline int handle_irq_perbit(struct pt_regs *regs, u32 hwirq, u32 irq_base) > > Consider using bool as the return type, and use true/false as return > values. Ok, no problem. > > + int ret; > > bool. Ok, no problem. > > + int ret; > > bool. Ok, no problem.