Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4364882ima; Mon, 4 Feb 2019 15:18:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IY8Z9Cox2F/Clh6roKU3TB5oz7ZBfPpqMTCn8MqhSWk0/Lgp4pLLurcYw0icBmuzh54qQG1 X-Received: by 2002:a62:9657:: with SMTP id c84mr1881334pfe.77.1549322293063; Mon, 04 Feb 2019 15:18:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549322293; cv=none; d=google.com; s=arc-20160816; b=ERZnIT+pqW6yXh9t6s+CGJ+SYcLAds/Gt2c+wsFr1im2U1q0mn+Bs/Z6TiYPOgw+rQ jFzwCJX5k5tfY6/Iks+jwN09bdzz+/7bAaYZnbOsdl+fKvgSn/0RWjBv7sNpToytT9YX lP+YrA6pUhtjHWSkfcz0ZxT6rDf+zA0PqGFHxkOty4bcmYnAi204P4X25rVRZGJu2klA 6NsHWfvV8KJSUl5cL5Kmk4bFTUAe28GD+2MWXwkce4dPp5xBWPpXc7GbyCfrxMXgiVk3 9W9o37TphIrZFaQ1XVWyjCzLvOaDpfWb1nZhvkTjfOETdSzz6Am5awB9lL/uRau570f6 57bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=miIqZ+lWusbBYoObf5376HkMcuNwAbK7xets7VyhXdQ=; b=hU88LJJK6C4wfWL7uhtwnTaYcyEL6kRFzyxnuT/hLV3buMGOlwcD+6tTGD1Yu6I3Vo y1jmwkmpmqcOdn5p6j1OUcn0mT4N1dAt4LDBhzNE40SrjxLQ7pffa993z6iNmiWHvA+v IUtg0IPJGAs/8oMorle/h4z0FiDll+9aJVQHcaXCU/H7apW2lh/T9QAw9LbFQ0m6yFwi 6KmHCwDdd2eVeljU7Epu8pDM+eE7sJXXaBHWhuCzyEayUhnMrXGn6gHXzPB31JgZ//tl YVZo/yJI1ZYimI5ct4mJbIz4NDpHxYgZwT89TKe/RnrBZP2jv+UGu+pKu2uCgOn7Gh5Y EZnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=0C9KPUI7; 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 b6si1290954pgd.292.2019.02.04.15.17.57; Mon, 04 Feb 2019 15:18:13 -0800 (PST) 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; dkim=fail header.i=@lechnology.com header.s=default header.b=0C9KPUI7; 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 S1727977AbfBDWmQ (ORCPT + 99 others); Mon, 4 Feb 2019 17:42:16 -0500 Received: from vern.gendns.com ([98.142.107.122]:36226 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbfBDWmP (ORCPT ); Mon, 4 Feb 2019 17:42:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=miIqZ+lWusbBYoObf5376HkMcuNwAbK7xets7VyhXdQ=; b=0C9KPUI7ZJzMNJrgA0v11fTW6f W66usJxFtq8l7qVOLRFxS+yBZBxuCnInz/XufCW/RmImzYOrwCwBFpxPCzrPEAvCpmVmQbG4QnHK/ yH+z+1K0RMX5TG1ZyoATgLeumQA+GTtmpBPeC3TJ156R6M/qJvsp3xERCc4bmgIwqHe0zaQEUbNkJ g+mFL0tKW4gpsMTFdlLirTG2vsMKxeFHbMCSTniYRSrXt6dB9L6bYO4/Xp1rzX29pJ7HTUCG9BY8b O3jf1X65Z7Xdt6vq25a8v+e1ozJ66Y3Zpv1lzQW/YgIjyKehBJIOahErPV9SGIWul+g3tPp9KC/5b 1V2JJ5QA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:58422 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gqmsw-0004cc-Cx; Mon, 04 Feb 2019 17:38:38 -0500 Subject: Re: [PATCH 07/35] ARM: davinci: aintc: use irq domain To: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20190131133928.17985-1-brgl@bgdev.pl> <20190131133928.17985-8-brgl@bgdev.pl> From: David Lechner Message-ID: <90995667-37cd-62a9-a40e-ee104016faf9@lechnology.com> Date: Mon, 4 Feb 2019 16:42:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190131133928.17985-8-brgl@bgdev.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/31/19 7:39 AM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > We need to create an irq domain if we want to select SPARSE_IRQ. The > cp-intc driver already supports it, but aintc doesn't. Use the helpers > provided by the generic irq chip abstraction. > > Signed-off-by: Bartosz Golaszewski > --- > arch/arm/mach-davinci/irq.c | 38 ++++++++++++++++++++++++++----------- > 1 file changed, 27 insertions(+), 11 deletions(-) > > diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c > index e539bc65d4ef..c874ea269411 100644 > --- a/arch/arm/mach-davinci/irq.c > +++ b/arch/arm/mach-davinci/irq.c > @@ -23,6 +23,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -43,6 +44,7 @@ > #define IRQ_INTPRI7_REG_OFFSET 0x004C > > static void __iomem *davinci_intc_base; > +static struct irq_domain *davinci_irq_domain; > > static inline void davinci_irq_writel(unsigned long value, int offset) > { > @@ -55,17 +57,15 @@ static inline unsigned long davinci_irq_readl(int offset) > } > > static __init void > -davinci_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) > +davinci_irq_setup_gc(void __iomem *base, > + unsigned int irq_start, unsigned int num) > { > struct irq_chip_generic *gc; > struct irq_chip_type *ct; > > - gc = irq_alloc_generic_chip("AINTC", 1, irq_start, base, handle_edge_irq); > - if (!gc) { > - pr_err("%s: irq_alloc_generic_chip for IRQ %u failed\n", > - __func__, irq_start); > - return; > - } > + gc = irq_get_domain_generic_chip(davinci_irq_domain, irq_start); check for (gc == NULL) here?