From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753534AbcCZREp (ORCPT ); Sat, 26 Mar 2016 13:04:45 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:46085 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753351AbcCZREn (ORCPT ); Sat, 26 Mar 2016 13:04:43 -0400 Subject: Re: [PATCH] Documentation/IRQ-domain.txt: Document irq_domain_create_{linear, tree} To: Jianyu Zhan , jiang.liu@linux.intel.com, marc.zyngier@arm.com, corbet@lwn.net, grant.likely@secretlab.ca References: <1458997642-4241-1-git-send-email-nasa4836@gmail.com> Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org From: Randy Dunlap Message-ID: <56F6C127.3020405@infradead.org> Date: Sat, 26 Mar 2016 10:04:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1458997642-4241-1-git-send-email-nasa4836@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/26/16 06:07, Jianyu Zhan wrote: > They have the same functionalities as irq_domain_add_{linear, tree}, > except fro accepting different first argument. > > Signed-off-by: Jianyu Zhan > --- > Documentation/IRQ-domain.txt | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt > index 8d990bd..89dda22 100644 > --- a/Documentation/IRQ-domain.txt > +++ b/Documentation/IRQ-domain.txt > @@ -70,6 +70,7 @@ of the reverse map types are described below: > > ==== Linear ==== > irq_domain_add_linear() > +irq_domain_create_linear() > > The linear reverse map maintains a fixed size table indexed by the > hwirq number. When a hwirq is mapped, an irq_desc is allocated for > @@ -81,10 +82,16 @@ map are fixed time lookup for IRQ numbers, and irq_descs are only > allocated for in-use IRQs. The disadvantage is that the table must be > as large as the largest possible hwirq number. > > +irq_domain_add_linear() and irq_domain_create_linear() are functionally > +equivalent, except for the first argument is different - the former > +accepts an Open Firmware specific 'struct device_node', while the latter > +accepts a more general abstration 'struct fwnode_handle'. abstraction > + > The majority of drivers should use the linear map. > > ==== Tree ==== > irq_domain_add_tree() > +irq_domain_create_tree() > > The irq_domain maintains a radix tree map from hwirq numbers to Linux > IRQs. When an hwirq is mapped, an irq_desc is allocated and the > @@ -95,6 +102,11 @@ since it doesn't need to allocate a table as large as the largest > hwirq number. The disadvantage is that hwirq to IRQ number lookup is > dependent on how many entries are in the table. > > +irq_domain_add_tree() and irq_domain_create_tree() are functionally > +equivalent, except for the first argument is different - the former > +accepts an Open Firmware specific 'struct device_node', while the latter > +accepts a more general abstration 'struct fwnode_handle'. ditto > + > Very few drivers should need this mapping. > > ==== No Map ===- > -- ~Randy