Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755339AbdIGMrW (ORCPT ); Thu, 7 Sep 2017 08:47:22 -0400 Received: from foss.arm.com ([217.140.101.70]:59378 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755282AbdIGMrT (ORCPT ); Thu, 7 Sep 2017 08:47:19 -0400 Subject: Re: [PATCH v4 1/6] irqdomain: rename variables in irq_domain_{push,pop}_irq() To: Masahiro Yamada , Thomas Gleixner , Linus Walleij , linux-gpio@vger.kernel.org, Rob Herring Cc: Jassi Brar , devicetree@vger.kernel.org, Jason Cooper , Masami Hiramatsu , David Daney , linux-kernel@vger.kernel.org References: <1504784522-26841-1-git-send-email-yamada.masahiro@socionext.com> <1504784522-26841-2-git-send-email-yamada.masahiro@socionext.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: Date: Thu, 7 Sep 2017 13:47:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1504784522-26841-2-git-send-email-yamada.masahiro@socionext.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1252 Lines: 32 On 07/09/17 12:41, Masahiro Yamada wrote: > The meaning of "root" in irq_domain_{push,pop} is opposite to the > documentation. Documentation/IRQ-domain.txt depicts the hierarchy > IRQ domain as follows: > > CPU Vector irq_domain (root irq_domain to manage CPU vectors) > ^ > | > Interrupt Remapping irq_domain (manage irq_remapping entries) > ^ > | > IOAPIC irq_domain (manage IOAPIC delivery entries/pins) > > From above, the inner-most domain (nearest to the CPU) is "root". > > The document also says, "When building irq_domain hierarchy, the > irq_domain near to the device is child and the irq_domain near to > CPU is parent." This is how irq_data->parent_data works. In > contrast, these function use a variable "child_irq_data" for that. The exact opposite argument could be used for the data structure. The irq_desc is the root of the list ordered with parent_data. Yes, this is confusing, but because we're using the same English words to describe two different things, we're bound to make one thing more difficult. I'm unconvinced that this change helps anything (it certainly confuses me more than anything else). Thanks, M. -- Jazz is not dead. It just smells funny...