From patchwork Tue May 7 13:10:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13656884 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 05D95C10F1A for ; Tue, 7 May 2024 13:12:09 +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=ZkttJr6dfV5qYL3Bw6fvqCDLnDTwcER/+eWEIgLIXIk=; b=l58pdkRUhTFMJ7 EqdYDX7+VofUdxyIUpK3hGcFZx2w8Ysm7DJbGdFtEYgVvGowm7qgjYudgxkDisDbNgucgmCDdbcIi 1tNHsceadq0unJqxm9+lA7+Wmn596KtPzqyQQuiDXBKLjL0is+zpyyJHwAkg/5PPFfzbmmb0LxXYi eHu52xHc7P2IOAwH0Wn+5eVVoAn+YCwPdiWstb8EahweNLUKGf9RKLqelyM4xRpRIWi4ZA6g09QFQ /8xOyr6WkXIW+x2nG3SPcaklUKOSp2nUwNE7Yt6FrZ0ny7jKWuTK2hT4Wswr+iVmo9zI18PTjfruf 7Ex7IZ1OoQ46+P1CmQdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Kbq-0000000B6vv-45ao; Tue, 07 May 2024 13:11:54 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Kbl-0000000B6rA-1ZzW for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 13:11:52 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 447Bw9t6030034; Tue, 7 May 2024 15:11:33 +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=Xx8BStG SuUuWEWc4uf/Q4C/XeVhtQS6pvbN0QryO6OM=; b=sXugHfw5fEGmrbHRH04y0hA 6ri8Z8xeniYIEEM2I5V5/Zt9Q2sBL2WpurJ0JNnwilTNRVXqTmkfitir7hnyOwsu k2qlqjVwyOBVUD41quMMkgloYwPZYpytqCBRvJAxS6pC/nb8KDTWRTsy+rVohmY6 ozqmx2yI+HGd5KEJmQ8n+Pr/AYSSJhsfALiaRa7h/erKat8qA3jf3wBjFBwkO5bz TWjPJfqvs99XcdiccjjKG0gDIeh5DdncCjYKY85PMBuE+bGoybjfKHMv0806AnRO PoVt2PsJ9GfB4jjf+twqPIm9oaO9GXf5sAOD7Eml26X8i3hP1yKTTwK3I4AC6gQ= = 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 3xwa553xd6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 May 2024 15:11:33 +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 6C76A40047; Tue, 7 May 2024 15:11:29 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4809321B53D; Tue, 7 May 2024 15:10:55 +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; Tue, 7 May 2024 15:10:55 +0200 From: Antonio Borneo To: Russell King , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon , Thomas Gleixner CC: Antonio Borneo , , , Subject: [PATCH v2 0/8] irqchip/stm32-exti: split MCU and MPU code, allow module build Date: Tue, 7 May 2024 15:10:43 +0200 Message-ID: <20240507131051.980313-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.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-07_06,2024-05-06_02,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_061149_733410_81E3D313 X-CRM114-Status: GOOD ( 14.92 ) 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. v1 -> v2 - fix module dependency from IRQ_DOMAIN_HIERARCHY, detected by kernel test robot 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