From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A9C8C63777 for ; Mon, 30 Nov 2020 21:42:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 049752084C for ; Mon, 30 Nov 2020 21:42:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="flvGJ0pX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1fSliX71" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729379AbgK3VmF (ORCPT ); Mon, 30 Nov 2020 16:42:05 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:51120 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726979AbgK3VmF (ORCPT ); Mon, 30 Nov 2020 16:42:05 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1606772483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NgAh9VYwDOpjvKBpD2kOK9tCCluKx8G046lvyTTuLAM=; b=flvGJ0pXm8+KoywzWh7TI7hPa+f4S8bNnctn1hTerxfblVkBvWtRmRzFNNnl1uYEtTMDWo BuDjZHkzhZgd8BRQ0Bga1Iskh5D+8Lmp/HSqtifCMCC9/Qi0mCjBhcqbV9zhiFZ0liDp3x BWh1TiP8AZgth915d7oNFSy0NLQabOvU2wVh8ZGg6i7tAccHC7PJiumKbQB6nlHCaWV+RC 6sN9e2/MIzIZFprcTm/MGYaSqKQJYnhEk2Imc58ZIXS85u08a9rZ2ICEqadK4zuCmA+iQ2 s5FsCttc46/wlZnNc/E4z6svCCRjJJLS0CfosU4U3hm++PkKrT05dSDeNGNsBQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1606772483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NgAh9VYwDOpjvKBpD2kOK9tCCluKx8G046lvyTTuLAM=; b=1fSliX71lIiev+tFc4Vm9I65X+STSs/VhekX/6qU2C94l/LibCpwQml9cMFLGz5A8OkzIe 8lcnZgcqy03lmJBA== To: Alexey Kardashevskiy , linux-kernel@vger.kernel.org Cc: =?utf-8?Q?C=C3=A9dric?= Le Goater , Frederic Barrat , Michal =?utf-8?Q?Such=C3=A1nek?= , Oliver O'Halloran , Marc Zyngier , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, Alexey Kardashevskiy Subject: Re: [PATCH kernel v4 2/8] genirq/irqdomain: Clean legacy IRQ allocation In-Reply-To: <20201124061720.86766-3-aik@ozlabs.ru> References: <20201124061720.86766-1-aik@ozlabs.ru> <20201124061720.86766-3-aik@ozlabs.ru> Date: Mon, 30 Nov 2020 22:41:22 +0100 Message-ID: <87blfeiku5.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Alexey, On Tue, Nov 24 2020 at 17:17, Alexey Kardashevskiy wrote: > There are 10 users of __irq_domain_alloc_irqs() and only one - IOAPIC - > passes realloc==true. There is no obvious reason for handling this > specific case in the generic code. There is also no obvious reason for _NOT_ handling it at the core code. > This splits out __irq_domain_alloc_irqs_data() to make it clear what > IOAPIC does and makes __irq_domain_alloc_irqs() cleaner. That's your interpretation of cleaner. You need to expose __irq_domain_alloc_irqs_data() for that which is a core only functionality, so it's not cleaner. It's exposing internals which are not to be exposed. The right thing to do is to get rid of the legacy allocation of x86 during early_irq_init() which is possible with the recent restructuring of the interrupt initialization code in x86. That's a cleanup which will actually remove code and not expose internals just because. > This should cause no behavioral change. Should not cause is a pretty weak statement. You're missing a nasty detail here. Contrary to the normal irqdomain rules virq 0 _IS_ valid on x86 for historical reasons and that's not trivial to change. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A7BFC64E8A for ; Mon, 30 Nov 2020 21:43:16 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56F8A20857 for ; Mon, 30 Nov 2020 21:43:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="flvGJ0pX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1fSliX71" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56F8A20857 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4ClJcw5d65zDqL8 for ; Tue, 1 Dec 2020 08:43:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linutronix.de (client-ip=193.142.43.55; helo=galois.linutronix.de; envelope-from=tglx@linutronix.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=flvGJ0pX; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=1fSliX71; dkim-atps=neutral Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4ClJZx65g6zDqcj for ; Tue, 1 Dec 2020 08:41:29 +1100 (AEDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1606772483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NgAh9VYwDOpjvKBpD2kOK9tCCluKx8G046lvyTTuLAM=; b=flvGJ0pXm8+KoywzWh7TI7hPa+f4S8bNnctn1hTerxfblVkBvWtRmRzFNNnl1uYEtTMDWo BuDjZHkzhZgd8BRQ0Bga1Iskh5D+8Lmp/HSqtifCMCC9/Qi0mCjBhcqbV9zhiFZ0liDp3x BWh1TiP8AZgth915d7oNFSy0NLQabOvU2wVh8ZGg6i7tAccHC7PJiumKbQB6nlHCaWV+RC 6sN9e2/MIzIZFprcTm/MGYaSqKQJYnhEk2Imc58ZIXS85u08a9rZ2ICEqadK4zuCmA+iQ2 s5FsCttc46/wlZnNc/E4z6svCCRjJJLS0CfosU4U3hm++PkKrT05dSDeNGNsBQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1606772483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NgAh9VYwDOpjvKBpD2kOK9tCCluKx8G046lvyTTuLAM=; b=1fSliX71lIiev+tFc4Vm9I65X+STSs/VhekX/6qU2C94l/LibCpwQml9cMFLGz5A8OkzIe 8lcnZgcqy03lmJBA== To: Alexey Kardashevskiy , linux-kernel@vger.kernel.org Subject: Re: [PATCH kernel v4 2/8] genirq/irqdomain: Clean legacy IRQ allocation In-Reply-To: <20201124061720.86766-3-aik@ozlabs.ru> References: <20201124061720.86766-1-aik@ozlabs.ru> <20201124061720.86766-3-aik@ozlabs.ru> Date: Mon, 30 Nov 2020 22:41:22 +0100 Message-ID: <87blfeiku5.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , Marc Zyngier , x86@kernel.org, linux-gpio@vger.kernel.org, Oliver O'Halloran , =?utf-8?Q?C=C3=A9dric?= Le Goater , Frederic Barrat , Michal =?utf-8?Q?Such=C3=A1nek?= , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Alexey, On Tue, Nov 24 2020 at 17:17, Alexey Kardashevskiy wrote: > There are 10 users of __irq_domain_alloc_irqs() and only one - IOAPIC - > passes realloc==true. There is no obvious reason for handling this > specific case in the generic code. There is also no obvious reason for _NOT_ handling it at the core code. > This splits out __irq_domain_alloc_irqs_data() to make it clear what > IOAPIC does and makes __irq_domain_alloc_irqs() cleaner. That's your interpretation of cleaner. You need to expose __irq_domain_alloc_irqs_data() for that which is a core only functionality, so it's not cleaner. It's exposing internals which are not to be exposed. The right thing to do is to get rid of the legacy allocation of x86 during early_irq_init() which is possible with the recent restructuring of the interrupt initialization code in x86. That's a cleanup which will actually remove code and not expose internals just because. > This should cause no behavioral change. Should not cause is a pretty weak statement. You're missing a nasty detail here. Contrary to the normal irqdomain rules virq 0 _IS_ valid on x86 for historical reasons and that's not trivial to change. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6772C64E7B for ; Mon, 30 Nov 2020 21:42:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F39D420857 for ; Mon, 30 Nov 2020 21:42:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CCEh8EiN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="flvGJ0pX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1fSliX71" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F39D420857 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=M4Q+Y4a7iLUGOdpihHDWaFadKN5g8adFYwPKhfDCU14=; b=CCEh8EiNi3aT5ZJi049W/UMm3 RS8a9Ix4plE28hyhXwWFZTJsHAPADYbF38OXVIDflgADNKkI+LveMiceeM1HRJo1s3XRRwy3c1Q15 QAugCThoa6oNtH+DPFFewCFFB2LPdyADWvnxk0PxVz9nNbGhi2GmB+fZNGO5CdhF/rkfxyM7J3Ir+ bPIvE3HkHrCAsFWR9nRpDwz3gU4Rm38VdgVT5sQh4E2c7wITf0+VoxYaFbWeBx7C3hH8E1ez2q//r 02w7tqACQW+YvBFWXOCt/LLg/XaCCdwK1O4vVAnZFcYtY/H3nnYpbugy+qQctZf4hCYVednS4qRIw 81bgel3Og==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjqvH-0008SM-A9; Mon, 30 Nov 2020 21:41:27 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjqvF-0008Ri-0p for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 21:41:25 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1606772483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NgAh9VYwDOpjvKBpD2kOK9tCCluKx8G046lvyTTuLAM=; b=flvGJ0pXm8+KoywzWh7TI7hPa+f4S8bNnctn1hTerxfblVkBvWtRmRzFNNnl1uYEtTMDWo BuDjZHkzhZgd8BRQ0Bga1Iskh5D+8Lmp/HSqtifCMCC9/Qi0mCjBhcqbV9zhiFZ0liDp3x BWh1TiP8AZgth915d7oNFSy0NLQabOvU2wVh8ZGg6i7tAccHC7PJiumKbQB6nlHCaWV+RC 6sN9e2/MIzIZFprcTm/MGYaSqKQJYnhEk2Imc58ZIXS85u08a9rZ2ICEqadK4zuCmA+iQ2 s5FsCttc46/wlZnNc/E4z6svCCRjJJLS0CfosU4U3hm++PkKrT05dSDeNGNsBQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1606772483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NgAh9VYwDOpjvKBpD2kOK9tCCluKx8G046lvyTTuLAM=; b=1fSliX71lIiev+tFc4Vm9I65X+STSs/VhekX/6qU2C94l/LibCpwQml9cMFLGz5A8OkzIe 8lcnZgcqy03lmJBA== To: Alexey Kardashevskiy , linux-kernel@vger.kernel.org Subject: Re: [PATCH kernel v4 2/8] genirq/irqdomain: Clean legacy IRQ allocation In-Reply-To: <20201124061720.86766-3-aik@ozlabs.ru> References: <20201124061720.86766-1-aik@ozlabs.ru> <20201124061720.86766-3-aik@ozlabs.ru> Date: Mon, 30 Nov 2020 22:41:22 +0100 Message-ID: <87blfeiku5.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_164125_217153_912A1E2F X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , Marc Zyngier , x86@kernel.org, linux-gpio@vger.kernel.org, Oliver O'Halloran , =?utf-8?Q?C=C3=A9dric?= Le Goater , Frederic Barrat , Michal =?utf-8?Q?Such=C3=A1nek?= , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Alexey, On Tue, Nov 24 2020 at 17:17, Alexey Kardashevskiy wrote: > There are 10 users of __irq_domain_alloc_irqs() and only one - IOAPIC - > passes realloc==true. There is no obvious reason for handling this > specific case in the generic code. There is also no obvious reason for _NOT_ handling it at the core code. > This splits out __irq_domain_alloc_irqs_data() to make it clear what > IOAPIC does and makes __irq_domain_alloc_irqs() cleaner. That's your interpretation of cleaner. You need to expose __irq_domain_alloc_irqs_data() for that which is a core only functionality, so it's not cleaner. It's exposing internals which are not to be exposed. The right thing to do is to get rid of the legacy allocation of x86 during early_irq_init() which is possible with the recent restructuring of the interrupt initialization code in x86. That's a cleanup which will actually remove code and not expose internals just because. > This should cause no behavioral change. Should not cause is a pretty weak statement. You're missing a nasty detail here. Contrary to the normal irqdomain rules virq 0 _IS_ valid on x86 for historical reasons and that's not trivial to change. Thanks, tglx _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel