From patchwork Mon May 6 13:32:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13655452 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8350AC10F16 for ; Mon, 6 May 2024 13:34:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=l4J5aYSWujtf36pXkWeF0HwQn3UC3lyBeav1oM5Djw4=; b=jler7GnGJKrj4V ptGsgM/uzTcLoAqj3hfK708B9Kz8r1LShXGKD0F/1OJ7zeLJYW/LcxUK4dlES+bZaqmsqHP8ehok+ RVbRZfhSDvGimDj4hZ0y0lu8e9+EY+fdRzxTTBg0C9QA2c18AinAuE6GYhOb1twcQcL+dCv79awMI ogT/0NCgbOTSuhujoHgdz8QLxE39ntUmbfDMQuDBDSbr1/zBQnq+i4OnNqvmsUsRidIXhta4AUZz7 UHa9PAbRq12DPL73JGpsZ/E+NaSRlKgtPuG3/WNeWg299wQBSZWPHzb7YdRLnaZDUAEKGPjiJv711 UDGaiWXYdEvwOBhJuX/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3yU5-00000007SQY-2YU2; Mon, 06 May 2024 13:34:25 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3yTx-00000007SMg-0GYX for linux-arm-kernel@lists.infradead.org; Mon, 06 May 2024 13:34:20 +0000 Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 446CRWH9030757; Mon, 6 May 2024 15:33:47 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=selector1; bh=D+XLcTH c8uVuTOX4CdOp7NlzrTvpnKAR5oH6n07VwUE=; b=ZHZDAfwRi8GrWIlOhyMVNZw FOtew/DOxQxtW3riarKA9QSlhAO3C3In6fga+eZudDQm/dgi5s3tZQEnbGG2oj4B vh//3eCz+ZPnNGpQw6zKKxWybiqpSJ1ya4m54F1vH19dqFYZLIABDg4dq3qcltuE 0AgmYfKNzBGs1XW/dOVR8bZ4p5LzRhP1UNMRSWBqMaPVEpiBowNBWjdMZde6DE8/ QraCUnXO+lISo08XVciqgvVHpEaySjVHE3G+R0UUg5EYlvbbqqeqPIW6HwUShzvS FvodCVB0ZuP/H+xNUzEHTcCyn2jXRdLYpiUb+5AJnqjmJtdekBeI2TjhcbS9pKA= = Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3xwyyk5cb5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 15:33:47 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 9C62640050; Mon, 6 May 2024 15:33:41 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id ED14C21ADBC; Mon, 6 May 2024 15:33:06 +0200 (CEST) Received: from localhost (10.48.87.171) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 6 May 2024 15:33:06 +0200 From: Antonio Borneo To: Russell King , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon , Thomas Gleixner CC: Antonio Borneo , , , Subject: [PATCH 0/8] irqchip/stm32-exti: split MCU and MPU code, allow module build Date: Mon, 6 May 2024 15:32:48 +0200 Message-ID: <20240506133256.948712-1-antonio.borneo@foss.st.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.48.87.171] X-ClientProxiedBy: SAFCAS1NODE1.st.com (10.75.90.11) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_08,2024-05-06_02,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_063417_493866_119016E6 X-CRM114-Status: GOOD ( 14.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The file 'irq-stm32-exti.c' contains two drivers: - EXTI for ARMv7m STM32 MCUs; - EXTI for ARMv7a & ARMv8a STM32MPxxx MPUs. The current arrangement causes some issue: - the growing code for MPUs uses precious space on memory constraint MCUs devices; - the driver for MPU cannot be built as module; - there are risks to break one of the two drivers while working on the other. Since there are only 4 minor functions shared among the two drivers: - stm32_exti_set_type(); - stm32_chip_resume(); - stm32_chip_suspend(); - stm32_exti_chip_init(); this series splits the file in two independent files, each containing a single driver. To guarantee bisect-ability, the series first introduces some hook in Kconfig, then splits the file and at the end enables module build on MPU while cleaning-up Kconfig. The symbols in the MPU file are renamed to better match the new name of the driver. The patches are created with 'git format-patch -C' to correctly show the deleted parts and the tiny modifications between the original monolithic file and the two extracted ones. The series is rebased on irq/core branch of tip as it depends on a previous series already queued for v6.10 merge window. Antonio Borneo (8): irqchip/stm32-exti: add CONFIG_STM32MP_EXTI ARM: stm32: use different EXTI driver on ARMv7m and ARMv7a arm64: Kconfig: select STM32MP_EXTI on STM32 platforms irqchip/stm32-exti: split MCU and MPU code irqchip/stm32mp-exti: rename internal symbols irqchip/stm32mp-exti: allow build as module ARM: stm32: allow build irq-stm32mp-exti driver as module arm64: Kconfig: allow build irq-stm32mp-exti driver as module arch/arm/mach-stm32/Kconfig | 2 +- arch/arm64/Kconfig.platforms | 1 - drivers/irqchip/Kconfig | 9 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-stm32-exti.c | 670 +------------------------- drivers/irqchip/irq-stm32mp-exti.c | 737 +++++++++++++++++++++++++++++ 6 files changed, 752 insertions(+), 668 deletions(-) create mode 100644 drivers/irqchip/irq-stm32mp-exti.c base-commit: 382d2ffe86efb1e2fa803d2cf17e5bfc34e574f3