From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Hunter Subject: Re: [RFC PATCH V2 1/8] irqdomain: Ensure type settings match for an existing mapping Date: Tue, 22 Dec 2015 11:27:02 +0000 Message-ID: <56793386.3020208@nvidia.com> References: <1450349309-8107-1-git-send-email-jonathanh@nvidia.com> <1450349309-8107-2-git-send-email-jonathanh@nvidia.com> <5673DB87.6040106@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Linus Walleij Cc: Thomas Gleixner , Jason Cooper , Marc Zyngier , Jiang Liu , Stephen Warren , Thierry Reding , Kevin Hilman , Geert Uytterhoeven , Grygorii Strashko , Lars-Peter Clausen , Soren Brinkmann , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-tegra@vger.kernel.org On 22/12/15 10:00, Linus Walleij wrote: > On Tue, Dec 22, 2015 at 10:58 AM, Linus Walleij > wrote: >> On Fri, Dec 18, 2015 at 11:10 AM, Jon Hunter wrote: >>> On 17/12/15 13:16, Linus Walleij wrote: >>>> On Thu, Dec 17, 2015 at 11:48 AM, Jon Hunter wrote: >>>>> + } else { >>>>> + virq = irq_domain_alloc_descs(-1, 1, hwirq, >>>>> + of_node_to_nid(of_node)); >>>> >>>> What is this all of a sudden? Not even mentioned in the >>>> commit. Plus I bet ACPI need something else than OF nid >>>> passed here. >>> >>> Do you mean the else part of all of the above? >> >> Yes >> >>> So in the current code, the else part calls irq_create_mapping() (...) >> >> No, not that... The fact that you all of a sudden have started >> calling irq_domain_alloc_descs() which the function didn't do >> before, totally changing the calling semantics for everyone in >> the kernel, leading to the problem I then describe with this >> potentially being called before the irqdomain for the irqchip >> is initialized and descs getting "random" numbers. > > I see I didn't go into those details in my first answer. Hm, I > guess I got uncertain and deleted it because I remember > writing it... > > I am simply worries that starting to call irq_domain_alloc_descs() > has unintended side effects, especially on platforms using > legacy or simple irqdomains. Ok, no problem I will keep the existing irq_create_mapping() instead then. Cheers Jon From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753754AbbLVL1L (ORCPT ); Tue, 22 Dec 2015 06:27:11 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:9629 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549AbbLVL1I (ORCPT ); Tue, 22 Dec 2015 06:27:08 -0500 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 22 Dec 2015 03:23:25 -0800 Subject: Re: [RFC PATCH V2 1/8] irqdomain: Ensure type settings match for an existing mapping To: Linus Walleij References: <1450349309-8107-1-git-send-email-jonathanh@nvidia.com> <1450349309-8107-2-git-send-email-jonathanh@nvidia.com> <5673DB87.6040106@nvidia.com> CC: Thomas Gleixner , Jason Cooper , Marc Zyngier , Jiang Liu , Stephen Warren , Thierry Reding , Kevin Hilman , "Geert Uytterhoeven" , Grygorii Strashko , Lars-Peter Clausen , "Soren Brinkmann" , "linux-kernel@vger.kernel.org" , "linux-tegra@vger.kernel.org" From: Jon Hunter Message-ID: <56793386.3020208@nvidia.com> Date: Tue, 22 Dec 2015 11:27:02 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.21.132.159] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/12/15 10:00, Linus Walleij wrote: > On Tue, Dec 22, 2015 at 10:58 AM, Linus Walleij > wrote: >> On Fri, Dec 18, 2015 at 11:10 AM, Jon Hunter wrote: >>> On 17/12/15 13:16, Linus Walleij wrote: >>>> On Thu, Dec 17, 2015 at 11:48 AM, Jon Hunter wrote: >>>>> + } else { >>>>> + virq = irq_domain_alloc_descs(-1, 1, hwirq, >>>>> + of_node_to_nid(of_node)); >>>> >>>> What is this all of a sudden? Not even mentioned in the >>>> commit. Plus I bet ACPI need something else than OF nid >>>> passed here. >>> >>> Do you mean the else part of all of the above? >> >> Yes >> >>> So in the current code, the else part calls irq_create_mapping() (...) >> >> No, not that... The fact that you all of a sudden have started >> calling irq_domain_alloc_descs() which the function didn't do >> before, totally changing the calling semantics for everyone in >> the kernel, leading to the problem I then describe with this >> potentially being called before the irqdomain for the irqchip >> is initialized and descs getting "random" numbers. > > I see I didn't go into those details in my first answer. Hm, I > guess I got uncertain and deleted it because I remember > writing it... > > I am simply worries that starting to call irq_domain_alloc_descs() > has unintended side effects, especially on platforms using > legacy or simple irqdomains. Ok, no problem I will keep the existing irq_create_mapping() instead then. Cheers Jon