Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp968009lqs; Fri, 14 Jun 2024 10:34:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4z39SKYUt8uFwe1UROP0pR7SuVbVl9CkS7LroB0w+DouLDrpJOls6xYhWQnvTTkSJ2467bMzD2I4HR6NvqAABRgMN9o+KNGdeqEqwRQ== X-Google-Smtp-Source: AGHT+IH4ivm8nEV55IXxQ6eN2ADqSLodP7G4mf9fvuUpgoQpnw2EqedMSRR+en8vvURGFjF0aJfK X-Received: by 2002:a0c:c20d:0:b0:6b0:914d:4a56 with SMTP id 6a1803df08f44-6b2afd81274mr36265816d6.40.1718386472137; Fri, 14 Jun 2024 10:34:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718386472; cv=pass; d=google.com; s=arc-20160816; b=WVIDfsTtoVt1ozRMdM+NPBJcrCJ7hzClxUgc6kebxK8FqGIej21sOUH8oYUTefhJJ2 KkhxWwz/2F1VxAIPHcU9+d0OrIMyxLmPlpS+Fyc5Q51tP/gd0CDdtT6YYwZcAqVnkHa2 FidG+uOkbAD4qmaT08dmu3k0b1pr6n0bGfS+gnAH5W3hmhvGcMXjGe1TzzQqA1PNWx0w X9VPNHStAD55mvOcjLYtYTHrll82Qoa/zFQBuKSke4clyYDnYdOOvPbGqSCWse1liZFh x6a1s+f9HnMso6UsDH1bpC+KGDjn3Est3xF/93B/nS59zM4hDDN2ICv6F9COzj1X4Zu6 bHxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=67iEUNjiy7HOBuGoqBAJEp5jlBOCrSiBVzovVrhf8kQ=; fh=bujJSrd+k1h/0aZbC1LeFD2/cY2NpcCgJFppOaBslqM=; b=wvBuKTOu5+/35520lqBBZNMLb1wADuaskcWNNgY+Kd9mpDVqp+fzOxyrXUSkHq+jxy fzvf+3e4zcQ4PtS1ULIY5naMnXF6AjKEHD2mMSvCa64lUt+TAqsGTUrchSG60YvBy2qM LChJmIZTF2nMJmsU62s74JF1CrJ8m/J5LzaOo/cNFO6G1Td7XnSkEN8v+KMSDEKKgz5x ZPmAxm6Pu3TzWAmyQ5tnZA0kYeP3Gf6KW08J7CB9K3yTaSJ6mrBGG3fFX9rAEJZEJZLE OgiqjLJxz14gCjuo2bNpe+/y6wWkBAN6YUqpwVkSnlhNuXZsWW/agc1zyoDgXBdohSrA rP3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YL+iy83j; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-215361-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215361-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5b37f21si43049526d6.403.2024.06.14.10.34.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 10:34:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215361-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YL+iy83j; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-215361-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215361-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 896FB1C260C8 for ; Fri, 14 Jun 2024 17:33:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A834419EED1; Fri, 14 Jun 2024 17:32:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="YL+iy83j" Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 966C31465A5; Fri, 14 Jun 2024 17:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718386374; cv=none; b=CfQdhp80KVJVfoPVQp7+2iV5R6lO94Ipla0LSxwHiPJTmy5KCe4hpWml6LgBFAnkJ4j+K1ktSZyXFtykJJthslWYAGQu0je0JRsIc57b3UP7AdF8zKmhbq1Bh99iVLEFXqqmxS6p7/55c9kaVdtcya7kNKai/3sUlnHHBjBUDTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718386374; c=relaxed/simple; bh=o4UQjypgo9QMgDD5aBAMGyoqUTlXc8SIqGQXNDouQeY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UqmlSZW15X+XDbi//8SqMcDFwyQT01cOdHw2/uT25aX/DATBN4McUZt5uK2Fr3AujJ9BiqHHoK3zHdr4664p6DNyaDOTnSZs0N59blxxLkr3PQlmFum4O6meFErczJU4qgF97WNhvPVg39BjVkSyWXw9OAXJozzLdslNRMV4gm0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=YL+iy83j; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPA id 6CE52FF805; Fri, 14 Jun 2024 17:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718386365; 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: content-transfer-encoding:content-transfer-encoding; bh=67iEUNjiy7HOBuGoqBAJEp5jlBOCrSiBVzovVrhf8kQ=; b=YL+iy83jqq9bl02hakJXSOJ8KfKOOy8vAED2NEWLHenMZYkURWV2Ti2k1eK1UpGEgUB56k eUwzeRyIWpqAsfRuuYnkGXcMzkqByjT7TGLPBeMqm9tDIKbEDFQW3fffkzZxxUzeCEm45S Go4DxkW+5egokQSkV6e29gOj54hKh80CIopS5TDttW5TsaXgGl5mlskYN5HDqM/xapM4kz Ziy7Y4EJo4GJVn3VZdFPL5b3Qicvbfe18QZSY/B87DvHQk5kpXUKqkaj+1BxOAipVqb7Fh 28V2ITL5/G64cE5dY7IDu4JuSnKx6wCwSu/NdS6of2guL6k/bLE1nVEeLcoHiQ== From: Herve Codina To: Matti Vaittinen , Herve Codina , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Weinberger , Anton Ivanov , Johannes Berg , Marc Zyngier Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-um@lists.infradead.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Thomas Petazzoni Subject: [PATCH 00/23] Introduce irq_domain_instanciate() Date: Fri, 14 Jun 2024 19:32:01 +0200 Message-ID: <20240614173232.1184015-1-herve.codina@bootlin.com> X-Mailer: git-send-email 2.45.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com Hi, Previously, I sent a series related the support for the LAN966x PCI device [1] and in particular several patches related irq domain modifications and the introduction of the Microchip LAN966x OIC driver. During the review, it was asked to rework the irq domain modification in order to avoid more wrappers and a new irq_domain_instanciate() function was proposed [2]. Also a patch [3] sent by Maitti Vaittinen can benefit of this new irq_domain_instanciate() function. Even if Maitti's use case is not handle yet in this series, it should not be a big deal add support for it on top of this current series. So, this current series introduces this new irq_domain_instanciate() function and migrate existing wrappers and functions to this new function (patches 1 to 20). It then introduces the first driver that uses directly this new function with the init()/exit() hooks set: the Microchip LAN966x OIC driver (patches 21 to 23). Existing irqchip drivers are not converted yet to use this new API function in the same way as the LAN966x OIC driver does. I prefer to have this series accepted first to avoid doing and re-doing several times the same modifications on existing drivers depending on changes requested on this current series review. [1] https://lore.kernel.org/lkml/20240527161450.326615-1-herve.codina@bootlin.com/ [2] https://lore.kernel.org/lkml/8734pr5yq1.ffs@tglx/ [3] https://lore.kernel.org/lkml/bbd219c95f4fe88752aee5f21232480fe9b949fb.1717486682.git.mazziesaccount@gmail.com/ Best regards, Hervé Herve Codina (23): irqdomain: Introduce irq_domain_free() irqdomain: Introduce irq_domain_instantiate() irqdomain: Fixed unbalanced fwnode get and put irqdomain: Constify parameter in is_fwnode_irqchip() irqdomain: Use a dedicated function to set the domain name irqdomain: Convert __irq_domain_create() to use struct irq_domain_info irqdomain: Handle additional domain flags in irq_domain_instantiate() irqdomain: Handle domain hierarchy parent in irq_domain_instantiate() irqdomain: Use irq_domain_instantiate() for hierarchy domain creation irqdomain: Make __irq_domain_create() return an error code irqdomain: Handle domain bus token in irq_domain_create() irqdomain: Introduce init() and exit() hooks genirq/generic_chip: Introduce irq_domain_{alloc,remove}_generic_chips() genirq/generic_chip: Introduce init() and exit() hooks irqdomain: Add support for generic irq chips creation before publishing a domain irqdomain: Add a resource managed version of irq_domain_instantiate() irqdomain: Convert __irq_domain_add() wrappers to irq_domain_instantiate() irqdomain: Convert domain creation functions to irq_domain_instantiate() um: virt-pci: Use irq_domain_instantiate() irqdomain: Remove __irq_domain_add() dt-bindings: interrupt-controller: Add support for Microchip LAN966x OIC irqchip: Add support for LAN966x OIC MAINTAINERS: Add the Microchip LAN966x OIC driver entry .../microchip,lan966x-oic.yaml | 55 ++++ MAINTAINERS | 6 + arch/um/drivers/virt-pci.c | 16 +- drivers/irqchip/Kconfig | 12 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-lan966x-oic.c | 278 ++++++++++++++++++ include/linux/irq.h | 33 +++ include/linux/irqdomain.h | 116 +++++++- kernel/irq/devres.c | 41 +++ kernel/irq/generic-chip.c | 111 +++++-- kernel/irq/irqdomain.c | 243 +++++++++------ 11 files changed, 782 insertions(+), 130 deletions(-) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/microchip,lan966x-oic.yaml create mode 100644 drivers/irqchip/irq-lan966x-oic.c -- 2.45.0