Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp469934ybm; Fri, 29 May 2020 04:47:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdSoQdWJa+hnjrKCKeLQA3H5I9UGnHQPDNgu/CL2XptoN3t1CyOvv9s1vphbj291vet6La X-Received: by 2002:a50:af85:: with SMTP id h5mr1189610edd.86.1590752851399; Fri, 29 May 2020 04:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590752851; cv=none; d=google.com; s=arc-20160816; b=kFbmW7A+AB9V0fEWl/GbofYVHrfR1BzLtmnMbGzdkOgK1PHThFuqdBRqtXukk3V/ie sAdAFQGQjG7Zavwk9MT/PzbsPrfo2tG1a5fqaXsg9lHDCi9MrMxh7n7+CIdwDbnQj3lg WG95hVQkvsgZlwmHkvLCIOgnc1ikV9VHMs0lq2bu9H/Dr5TLw1ia7NeE5FwLVxvx8pJB lUTSbjM5JI2sxkau2g4ZpR1bpNdYoaOaHOJ4g48UUYZZs8Ku04v4Ut6JCFiVWTulhVRL hbqZ9UELL/KGoZbPNaC36tK/bIVMtc/UsETN3Jb+4POTeSzrrIoLvJ+D5OZGlXJGfjEf OQCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=80bZ25LFkYGpnK4fJsT/jM+faHqe+BrPlD3nVDw+J14=; b=axTTCnkas01NkK3CDqPyn3JzIKVvvHKz4z18oEB81KEsuO9mKgNZwRumZlU2tjwmbS BWDvrljoANs5QQi3i9U6wYyud6HeDvf/Pc5VmYZlXH4ECi9WgX2zcnMDXS9IHS8GhESh cqbSLepE1qh96Bm63AJUCPj5p5ENbIJpbSKlhDJPLcaL+Q/Xy3bcvUDJ4vOQrV8E//6U DBk9h3MIsCcswsJ/N2pA+NgkyhKrqXsznGovJbXC3gLcECWAr9zpSFZGVYtOLGwV4msG FUHXwL4HlQ8yHrYCtsFj2sl13j1v7ILfZThDUv1pUBGxEk+7ShlVD1v+9LabAQYIuoNB giRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=VDHKN3Ki; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk10si4122067edb.73.2020.05.29.04.47.07; Fri, 29 May 2020 04:47:31 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=VDHKN3Ki; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726282AbgE2LpR (ORCPT + 99 others); Fri, 29 May 2020 07:45:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725562AbgE2LpR (ORCPT ); Fri, 29 May 2020 07:45:17 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5CA2C03E969 for ; Fri, 29 May 2020 04:45:16 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id u26so6635204wmn.1 for ; Fri, 29 May 2020 04:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=80bZ25LFkYGpnK4fJsT/jM+faHqe+BrPlD3nVDw+J14=; b=VDHKN3KiPbGZ3Mzh+XkZikTPHkyenzVkfUUwGGUCDvfp6R/oF8pzZPhfjO74WCMiXF mgroetUQKkE5exrhLOpB39/PTeZQ9VHiMxUCxJA7paRI10BDZ7oSMoDpaODmQzfTtmE3 qSR4XNxpu3P3rLBnNAgCHGx4rhtQik1REA2yABgyw2jIULosWqLwLfuLCwzE1YBsHiw2 IPRlf7zwYiQ15DjBjiIiKhijoJPxjjZlBL4xSprayMNOlk+aNPL7zM4P1iS/8jbKkZX0 q2AOJ43bY5CPs3kMQHlooAXFXR8zSyXCYCox5dD+2zeVO5MJxw/fxMWN0GB0DbYZR7+F 56fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=80bZ25LFkYGpnK4fJsT/jM+faHqe+BrPlD3nVDw+J14=; b=ZV12WvcD71X6M4eQqWb6mNsCW5V3zBNCbswrCfG7dmM9vEebFC9QVQz7VTgmQB50cT yyk20Ipz+J+2VarZy0ZI6se7oL/4NrhAIi7A7tc/gWZ0WeAhTKn+CVpZ8nasAR/ptzUZ x4t1bT9YiawDy9isXNsfs8qKLpPNHGCBztqyMweI5keP5MKVjZ+HtRkNuiK/KKUGla3j Ckf8/fZeJwJdASV3zUBMKO9S/QgUzirWaJCmf127GabfjWnFU367gTcV5PbRCc685d02 cETivefkawtZ+RNmUScCuoV2wHzQZIc0HDJLgEW0yvVh2OxTb34e9aqk9hCDN9LPG/an 5rTQ== X-Gm-Message-State: AOAM530UB1EHcXLZL18aGl/EdXqNHePp+9jF+THp8rYNESaqeRoX+N+l N7ykVxRkl6wDOYGl6uEB114NWgYjsGUWAXRf1xQRrQ== X-Received: by 2002:a7b:c5d7:: with SMTP id n23mr8784679wmk.185.1590752715012; Fri, 29 May 2020 04:45:15 -0700 (PDT) MIME-Version: 1.0 References: <20200521133301.816665-1-anup.patel@wdc.com> <20200521133301.816665-4-anup.patel@wdc.com> <140c6fa723225ff138e8b39c4f16c9c0@kernel.org> <40251a7764fc23ed19426df0adf0fc4d@kernel.org> In-Reply-To: <40251a7764fc23ed19426df0adf0fc4d@kernel.org> From: Anup Patel Date: Fri, 29 May 2020 17:15:03 +0530 Message-ID: Subject: Re: [PATCH v5 3/6] irqchip: RISC-V per-HART local interrupt controller driver To: Marc Zyngier 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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 29, 2020 at 4:40 PM Marc Zyngier wrote: > > 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. Okay, I will explore other approaches and keep default irqdomain as a last resort solution. Regards, Anup