Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4255521pxf; Tue, 6 Apr 2021 11:35:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMqc18/U5/E6THbxpwnfWJFr5F6AMkSyXs6B/IRyDfxM+7Lw4LIzV1zoEahtebM+ZqfHHW X-Received: by 2002:a05:6602:2287:: with SMTP id d7mr24806369iod.42.1617734150667; Tue, 06 Apr 2021 11:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617734150; cv=none; d=google.com; s=arc-20160816; b=kni27mD5s3aa5qaZ/Qei2e57MNdgLdQDslUJCCGkP4BqUrS12N5VrD5iVgg5GTDbYx xxM3YOUn4Vgnm61yVKAIpnFTOfcQQCkFzBMpXvFvu2w2dvpFKb+fzuUvjOtTRIZuliMB omKGY4XyWXDgzod8w4ncgIWZRkZKSFiodaGpGMKiT7yX9xLDzfTypSteBHKzCVxviqO8 k8/DWY45CLXM6YUvxUVidI2bygrLILQLZhduN88WNj7Z+SqVCOLHxHaUeU2yoe3f1F9M Eth0ABEbKNTL7xg9x2hDs34eERz8oa0x1J7GIc6i1/lY1b0ma78XfltB5hf8elfurTb+ XfyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=pPhK3JkoQvkodcK7bPa/Zb8jMvMihLslk0gv2o5QxzE=; b=pMjfwwdYs8koc6aRCQqLDdF3A+oqqtJdH0yYFnPfDuZ74luAR3+biPLL0VYLlfq4YF 6RMQPGIFDxsbVsNO3IlsUmDRCcaE5T+GY78naomgUP9rZ8Dfo7KQUElSdom+11opTJoH AL8UEIbJX+2/AAhwgPRjwzVk3jAonQ6CNMX4s111RnsgoM+f7nmWk2Po821dJgO8xYe6 9l336NxSnYQ6KrMiRNjaMvPaRYFtrRKFm0CloeveywUQhWu9qayHj3J85k8XcuK2/bXn o2NtD5bV/62CUXvDz16p7NQaKFJ21ZjuEzfZfwA9vTbiUQFOBoqTCMNgENqzeRePDIzA viRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r28si17860811jao.125.2021.04.06.11.35.36; Tue, 06 Apr 2021 11:35:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244931AbhDFJhK (ORCPT + 99 others); Tue, 6 Apr 2021 05:37:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:54972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241239AbhDFJgc (ORCPT ); Tue, 6 Apr 2021 05:36:32 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 58EED6135D; Tue, 6 Apr 2021 09:36:24 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lTi8E-005owA-4b; Tue, 06 Apr 2021 10:36:22 +0100 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org Cc: Daniel Mack , Robert Jarzmik , Haojian Zhuang , Yoshinori Sato , Rich Felker , Thomas Bogendoerfer , Michael Ellerman , Thomas Gleixner Subject: [PATCH 0/9] Cleaning up some of the irqdomain features Date: Tue, 6 Apr 2021 10:35:48 +0100 Message-Id: <20210406093557.1073423-1-maz@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, daniel@zonque.org, robert.jarzmik@free.fr, haojian.zhuang@gmail.com, ysato@users.sourceforge.jp, dalias@libc.org, tsbogend@alpha.franken.de, mpe@ellerman.id.au, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The irqdomain subsystem has grown quite a lot over the years, and some of its features are either oddly used or just pretty useless. Some other helpers expose internals that are likely to change soon. Here are the bits that I'm trying to get rid of: - irq_linear_revmap exposes the internals of the domains, and only works for linear domains. The supposed speed improvement really isn't an argument, as it gets in the way of more significant optimisations. Reimplemented in terms of irq_find_mapping, which always works, and will eventually go at some point. - irq_create_strict_mappings is just a way to constraint the allocation of irqdescs into a given range, which is better served by creating a legacy irqdomain, and shows that the platform really needs to catch up with the 21st century. - irq_create_identity mapping is just a variation on the above, with irq==hwirq, although the way it is used is a gross hack in the SH code that needs to go. - irq_domain_add_legacy_isa is, as the names shows, a variation on irq_domain_add_legacy with a reservation of 16 interrupts. This is only used in the PPC code. The patches address all of the above, touching some of the ARM, PPC, and SH code that is affected. Another couple of patches address a MIPS platform that could use the generic code, and clean some of the comments in the irqdomain code. Unless anyone shouts, I'd like to take this into 5.13, as it is the basis of some further (and deeper) changes in the way irqdomains work. M. Marc Zyngier (9): irqdomain: Reimplement irq_linear_revmap() with irq_find_mapping() ARM: PXA: Kill use of irq_create_strict_mappings() irqchip/jcore-aic: Kill use of irq_create_strict_mappings() sh: intc: Drop the use of irq_create_identity_mapping() irqdomain: Kill irq_create_strict_mappings()/irq_create_identity_mapping() mips: netlogic: Use irq_domain_simple_ops for XLP PIC irqdomain: Drop references to recusive irqdomain setup powerpc: Convert irq_domain_add_legacy_isa use to irq_domain_add_legacy irqdomain: Kill irq_domain_add_legacy_isa Documentation/core-api/irq/irq-domain.rst | 1 - arch/arm/mach-pxa/pxa_cplds_irqs.c | 24 +++++------ arch/mips/netlogic/common/irq.c | 6 +-- arch/powerpc/include/asm/irq.h | 4 +- arch/powerpc/platforms/ps3/interrupt.c | 4 +- arch/powerpc/sysdev/i8259.c | 3 +- arch/powerpc/sysdev/mpic.c | 2 +- arch/powerpc/sysdev/tsi108_pci.c | 3 +- arch/powerpc/sysdev/xics/xics-common.c | 2 +- drivers/irqchip/irq-jcore-aic.c | 4 +- drivers/sh/intc/core.c | 50 ++++++++++------------- include/linux/irqdomain.h | 42 ++++--------------- kernel/irq/irqdomain.c | 49 +++------------------- 13 files changed, 59 insertions(+), 135 deletions(-) -- 2.29.2