Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp447924ybm; Fri, 29 May 2020 04:13:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqjwMtpitxnVQR/1LyL9BrHm6cBCWpqJYbPbCtcH9MGHvUFFT3lgj/CDqSvt6RZOkpISDf X-Received: by 2002:a17:906:415a:: with SMTP id l26mr6886800ejk.291.1590750820703; Fri, 29 May 2020 04:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590750820; cv=none; d=google.com; s=arc-20160816; b=iqV0br2dgftwGWkLIth95n7pmc8NhK0EiLZmbeCA02qfWctUOdOb5RHNDxuQOPjQm4 W4XeYDY1nIsSQT18DtvFZdTTLSQO1mDj0t761PhYU/7VoYqsl9kp0uSaP2TPjXoxIV1n 8tnP86LS5K/eLV/m5B6XL3Ki1mg3crx3XI37VL7yoCBL7lqLEXYgrWzTuuYxrvCgXa6i dkDDsTgoGMmgvfRLRFqwObxlH0U+Gy5WWoz2VxgYEtSEK+crlIg3kyDx5RXbx37N4ECx hPlCidmwMDDHwGlIo9DD0YMRbAA1h2I0UkaW32PiVSTfr8/Pvrq/617ASS2FP6EZTYBx 2eyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=kAJoDl9kiLoLe0Xu/DD/F8eUgyqese0h+4731dQfUxg=; b=yZ3UujTmnDbi3IFyOtrsopWqM67wozh86nPTnYccTjSWxOI6tnVF7Y8/S/+9PqIgvz cwFXIeddcjYkWU2IPmU+DVIRag2+1NzwtuejNQg6NoNVl81TbQIXJ18eQ2TLbMXy7GJm nUmHctIYBwOrqbGz0fRtlFJKgAPNtAx/XoxEZRSJCw9Hh7CwKgjySQ4Cx6djc1lf6vo0 KhnRaCleicH2Q9YfzDckNYQJvfNsPt/YLjTRqYXwBCVZCE6HvXQgyEKAg7CMS7t5PGTL tKQU7rBrxcLNBxXujJNXCq73qwQGBAptU9/7ALLRPrJQcQ+kn8giy3L7tKfggXjyF3zt f+kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HRSm1UVD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u9si853311ejx.370.2020.05.29.04.13.16; Fri, 29 May 2020 04:13:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HRSm1UVD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726849AbgE2LKy (ORCPT + 99 others); Fri, 29 May 2020 07:10:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:43454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbgE2LKv (ORCPT ); Fri, 29 May 2020 07:10:51 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91FFB206E2; Fri, 29 May 2020 11:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590750650; bh=7sAH5Q45SSZ5h/+VQ6sNe8Zzwnwl+WDutlBrtkbM3pY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HRSm1UVDjEXhxcM4AYUshIjsvg+h6LpIgL9pfCP9PBNYjM6O4bcDvIDnTyth01CWO Z2bBWl2YzHy8r2ctznmpfv/d+Ub8ih1P0UnDareE6ov4DskZ9ZflGTsivy8oocOtFb hYuBdgf0ZbYIug9lV3/XrY63b5qwxXtqPxuTRfao= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jecuX-00GFga-1a; Fri, 29 May 2020 12:10:49 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 29 May 2020 12:10:48 +0100 From: Marc Zyngier To: Anup Patel Cc: Anup Patel , Palmer Dabbelt , Paul Walmsley , Albert Ou , Daniel Lezcano , Thomas Gleixner , Jason Cooper , Atish Patra , Alistair Francis , linux-riscv , "linux-kernel@vger.kernel.org List" Subject: Re: [PATCH v5 3/6] irqchip: RISC-V per-HART local interrupt controller driver In-Reply-To: References: <20200521133301.816665-1-anup.patel@wdc.com> <20200521133301.816665-4-anup.patel@wdc.com> <140c6fa723225ff138e8b39c4f16c9c0@kernel.org> User-Agent: Roundcube Webmail/1.4.4 Message-ID: <40251a7764fc23ed19426df0adf0fc4d@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: anup@brainfault.org, anup.patel@wdc.com, palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, daniel.lezcano@linaro.org, tglx@linutronix.de, jason@lakedaemon.net, atish.patra@wdc.com, Alistair.Francis@wdc.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-05-29 11:45, Anup Patel wrote: > On Fri, May 29, 2020 at 3:39 PM Marc Zyngier wrote: >> >> On 2020-05-21 14:32, Anup Patel wrote: [...] >> > +/* Get the OF device node used by INTC irq domain */ >> > +struct device_node *riscv_of_intc_domain_node(void) >> > +{ >> > + return intc_domain_node; >> > +} >> > +EXPORT_SYMBOL_GPL(riscv_of_intc_domain_node); >> >> Why do you need this? Why can't the timer node refer to its >> interrupt-parent? The irqchip shouldn't be in the business of >> working around DT issues. >> >> At worse, use the default irqdomain if you must, but please >> avoid this kind of construct. > > Even, I don't like exporting riscv_of_intc_domain_node(). > > Thanks for your suggestion, I will certainly use the default irqdomain. This should be a last resort solution. The irqdomain should naturally come from the parent interrupt controller, accessible from the device (the timer in this case) node. Use it to for backward compatibility if you *really* must, but this is generally a very bad idea as it allows all kind of bizarre fallbacks and hides bugs. Thanks, M. -- Jazz is not dead. It just smells funny...