From patchwork Wed Sep 14 14:27:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 12976239 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 2FE57C6FA8A for ; Wed, 14 Sep 2022 14:28:57 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=gRin+VMQeRMh8AZ2ppUrb97IFgiDs3q7TCVmyDZAETc=; b=Eqzapi6G88SKZ7 86fWhXTy5fNS3izet8DlI4hyqyuDtnTLJUJjDVvyp543o3NN2NuAbU9+GOM3SD1EtGBuD0xZ1NHCD CePUTQonRGkC5beaXgCtjwacnAP4Ri7RHCHODnjsVNz8h8EnTrrxOJTKrAdp1iJ3d0Ejl4TZiGydP L1tpzYBJszrYgfV2DAXRNWwiNazk3y0YTJ/Cyxv3ieKWRLb2zvPkHRulM1mHCI+zWtgrMqLYOvWfS wSosEODvSZxPJ80fd/a1WfPACoPYV7U12F05+8sMHt8z+BLdMD6qTRrOyrv5Y24kmxO2SaAxk2zqf DKvIy7ujA4B4xNNSgKjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYTMk-002CHa-9b; Wed, 14 Sep 2022 14:27:50 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYTMc-002C3R-2G for linux-arm-kernel@lists.infradead.org; Wed, 14 Sep 2022 14:27:43 +0000 Received: by mail-ej1-x62e.google.com with SMTP id r18so35133811eja.11 for ; Wed, 14 Sep 2022 07:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=aaOGHVVPf/iuUx0WzEqdb+jMiCVuFndRMtaL2hzurm0=; b=N+lXa7ZUVBz8xeKcv4IqaaZqudT/6AVP1hx9d1VIUlwoxQejUD/Jpqsev04Ln6Pay9 YBZp3CL2W5t2ak09nrCmfelPs7spnxdPN8AZVbTM3panIdS8LRF1XKK8Xol/i8pyRxQz cc3bDr8gTn/ykIN76Nz4I/Pwnkpbi2ikR+R/WtzXozcJPAgjYgyIMgp3/GXX/Q/rI9P6 pxpFSRrAwYgjsfUlcN7UrttqTGKKRM/Stp0u0wmtZEy+kEMRuTpwkoSXh3f5DRwClU40 1RqXszQx2EkOeFBhleFCHxbgbOJ5IBRXs1q13kX6SxsswotsI1ClChTm6vZeYCivwV5k WiAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=aaOGHVVPf/iuUx0WzEqdb+jMiCVuFndRMtaL2hzurm0=; b=6hsrpoEOFs3pQY9W4raMGDXGRIoNpWfyyYvyd3uP1fKLQq6/mYyjWQpVA88OPyDt2V PrdNhKnuyoi1eXRkYUEW0sOgFuFovoBBplNjZTgFZu2QTeNPw5IoPGIcckX4Obv7YqFi 15iosDFDpdJ7Mb1K9dtXHKEfRDDJGrG+FFIbXAq/JJgt24Mv+8lHBXbvNtrNatUdZNqY m6FstDGnGRFp9Cdt05Z6MswMjzWli/NDVF9u9BrYSS+dtv00m5/GAt91BTREfP9xnlkX oBg9feAKGJVxEQsa226WwvKJBQoJ3XncY/HNMfPMh5aJ6N10xeYNtxuI30dENtu2dYys YjSA== X-Gm-Message-State: ACgBeo02YxrRsIOfcU7iSJ7fw8zt29ko1PGGT+dyG6fxtss5b8pKowsH 4ZXo8RX3vWvIGd+VFy2jn0Q= X-Google-Smtp-Source: AA6agR4ivdgUPU+lsEK0xIVg75fo6CWuotho5p7bM6OZkVDoz/Rl6Lx8EK5hUgcl9bAkRGBRv8V9MA== X-Received: by 2002:a17:907:74a:b0:77e:9455:b4e3 with SMTP id xc10-20020a170907074a00b0077e9455b4e3mr9492063ejb.471.1663165659025; Wed, 14 Sep 2022 07:27:39 -0700 (PDT) Received: from felia.fritz.box (200116b826cf470059b9799edefde240.dip.versatel-1u1.de. [2001:16b8:26cf:4700:59b9:799e:defd:e240]) by smtp.gmail.com with ESMTPSA id 18-20020a170906329200b007708635be05sm7661502ejw.4.2022.09.14.07.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 07:27:38 -0700 (PDT) From: Lukas Bulwahn To: Linus Walleij , Russell King , Catalin Marinas , Will Deacon , Arnd Bergmann , Damien Le Moal , linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH 1/2] ata: clean up how architectures enable PATA_PLATFORM and PATA_OF_PLATFORM Date: Wed, 14 Sep 2022 16:27:12 +0200 Message-Id: <20220914142713.29351-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_072742_150479_BABC4B53 X-CRM114-Status: GOOD ( 16.96 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There are two options for platform device PATA support: PATA_PLATFORM: Generic platform device PATA support PATA_OF_PLATFORM: OpenFirmware platform device PATA support If an architecture allows the generic platform device PATA support, it shall select HAVE_PATA_PLATFORM. Then, Generic platform device PATA support is available and can be selected. If an architecture has OpenFirmware support, which it indicates by selecting OF, OpenFirmware platform device PATA support is available and can be selected. If OpenFirmware platform device PATA support is selected, then the functionality (code files) from Generic platform device PATA support needs to be integrated in the kernel build for the OpenFirmware platform device PATA support to work. Select PATA_PLATFORM in PATA_OF_PLATFORM to make sure the needed files are added in the build. So, architectures with OpenFirmware support, do not need to additionally select HAVE_PATA_PLATFORM. It is only needed by architecture that want the non-OF pata-platform module. Reflect this way of intended use of config symbols in the ata Kconfig and adjust all architecture definitions. This follows the suggestion from Arnd Bergmann (see Link). Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/all/4b33bffc-2b6d-46b4-9f1d-d18e55975a5a@www.fastmail.com/ Signed-off-by: Lukas Bulwahn Reviewed-by: Arnd Bergmann --- arch/arm/mach-versatile/Kconfig | 1 - arch/arm64/Kconfig | 1 - drivers/ata/Kconfig | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 2ef226194c3a..b1519b4dc03a 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -256,7 +256,6 @@ menuconfig ARCH_VEXPRESS select GPIOLIB select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP - select HAVE_PATA_PLATFORM select CLK_ICST select NO_IOPORT_MAP select PLAT_VERSATILE diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 51f3f07c3efd..036bd67e662e 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -194,7 +194,6 @@ config ARM64 select HAVE_IRQ_TIME_ACCOUNTING select HAVE_KVM select HAVE_NMI - select HAVE_PATA_PLATFORM select HAVE_PERF_EVENTS select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 1c9f4fb2595d..c93d97455744 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -1102,8 +1102,7 @@ config PATA_PCMCIA If unsure, say N. config PATA_PLATFORM - tristate "Generic platform device PATA support" - depends on EXPERT || PPC || HAVE_PATA_PLATFORM + tristate "Generic platform device PATA support" if EXPERT || HAVE_PATA_PLATFORM help This option enables support for generic directly connected ATA devices commonly found on embedded systems. @@ -1112,7 +1111,8 @@ config PATA_PLATFORM config PATA_OF_PLATFORM tristate "OpenFirmware platform device PATA support" - depends on PATA_PLATFORM && OF + depends on OF + select PATA_PLATFORM help This option enables support for generic directly connected ATA devices commonly found on embedded systems with OpenFirmware From patchwork Wed Sep 14 14:27:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 12976240 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 B7734ECAAD3 for ; Wed, 14 Sep 2022 14:29:14 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: 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: List-Owner; bh=PSr8dSLAOHssNIIe78UstsUmuJt8ooDW9h3prjZ41r8=; b=gMZTBKk3llbUXV k3BReDmy5iKtdsjKZLcarZ1iWmuTdKd48VTc8uoWxt2Qzwl3d9XgghphRcNoDpb29+MMjplLPXR0L PLVKvdSZ0Hr9YHXNksjHgfGm3NR3AUWW3Ku2xxkQqD1QFJHI1RrdTi09XCcoU/FJ1e7SBI+y2g8uh ASraNTzqmiG4o6Uh2LCKVGdS/coSvv9Vt1FxPw5CWJOkKHY2lSuTXWqGdKH18QX1fRHUb1afL1rHK Pmy9MkajLc5fx7h1l9q+Sd1WXfgXACb1gblLcj+/+FQVuL4k11/2T8S6R3eBxm72ZHBaM3gEexkLS dkfqq1GUOfmjIjraHHWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYTMu-002CXT-Bw; Wed, 14 Sep 2022 14:28:01 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYTMf-002CBt-Jb for linux-arm-kernel@lists.infradead.org; Wed, 14 Sep 2022 14:27:47 +0000 Received: by mail-ed1-x52d.google.com with SMTP id z21so22526593edi.1 for ; Wed, 14 Sep 2022 07:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date; bh=JP95ma47qrdvlJsJm3fTS/uHsMwIKJEK/YCLI3Ebq8k=; b=IVEuXnuTA8UzHQMeXwKt0RDG2RTegpBNa95gy7LChIIc1a6cuWpxAoDg3zSItZiWj6 TrtGrsJaWog/G7Z9f5WTgDFLHgUD8FKUyvZ6uX3Wqum7masupsarPkgxA5OQ1C3Nd6wl 4nyTGYLQTk199yhVI9YQwjJh91oVNWWssBjyFqNNSf1/xJfdTegvkLKm0FcDC66boYlE 2d/xv9oUvl7Sa3AayW3TAGr6KYBeaY/nTAV9RYCp+dvt+7V0qf0MfYy5NY5cU31DS61d LuB3Q5ZZwEF93ne2HAES0BKJllANLIszmx3CdcF+IQPec5iWHuFKBpFob126Yf2oSYqo IsaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=JP95ma47qrdvlJsJm3fTS/uHsMwIKJEK/YCLI3Ebq8k=; b=rbyojEWRjt6WdBVl4y9GO8jY1mBu0gBxKiMBeukyUw6msL0Y4+YYrNHXeebOvIubDf e6XRTspNrVmc8cCFuoP2o6cOf3riDFfcJxSRqoD3MgxrOmsIikqYukGwXvcW7vEgih2u lGlEjGsYM6zGY67n1tgajFel3SbehbnOJVeo/YrBBmzZUhc2QebPddZQ7y0FfBMyy6ni 9nVFtTc7l1WBQWIog6gEidJGLPli411Tg0Hm9JAEshHXFNZGYv3JDThMbZdRT6JjGzrs RYEr37LZTcG+vvl1ZZSjfvtyX4hM3L0I1P5UCHh2+glN/aA6ZZJRYJjJFEnEbAFc98wt 0qMQ== X-Gm-Message-State: ACgBeo1oySH5g1Pn8oDNckdyyGQ6xp16roc1xHi0ba+SKQLYjgCqhldG 0ANNanTqmoBMQ2293NWhRlo= X-Google-Smtp-Source: AA6agR7jrqjjbW1nGf4SWamFa9Q3aRZ4Nvb6DDs925fLoaNgiZdO+0utdRYQY1YV2FcBxWVywTEAHA== X-Received: by 2002:a05:6402:1655:b0:44e:b208:746d with SMTP id s21-20020a056402165500b0044eb208746dmr31218126edx.229.1663165663670; Wed, 14 Sep 2022 07:27:43 -0700 (PDT) Received: from felia.fritz.box (200116b826cf470059b9799edefde240.dip.versatel-1u1.de. [2001:16b8:26cf:4700:59b9:799e:defd:e240]) by smtp.gmail.com with ESMTPSA id 18-20020a170906329200b007708635be05sm7661502ejw.4.2022.09.14.07.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 07:27:43 -0700 (PDT) From: Lukas Bulwahn To: Linus Walleij , Russell King , Catalin Marinas , Will Deacon , Arnd Bergmann , Damien Le Moal , linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH 2/2] ata: make PATA_PLATFORM selectable only for suitable architectures Date: Wed, 14 Sep 2022 16:27:13 +0200 Message-Id: <20220914142713.29351-2-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220914142713.29351-1-lukas.bulwahn@gmail.com> References: <20220914142713.29351-1-lukas.bulwahn@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_072745_691507_5C594282 X-CRM114-Status: GOOD ( 20.21 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It is currently possible to select "Generic platform device PATA support" in two situations: - architecture allows the generic platform device PATA support and indicates that with "select HAVE_PATA_PLATFORM". - if the user claims to be an EXPERT by setting CONFIG_EXPERT to yes However, there is no use case to have Generic platform device PATA support in a kernel build if the architecture definition, i.e., the selection of configs by an architecture, does not support it. If the architecture definition is wrong, i.e., it just misses a 'select HAVE_PATA_PLATFORM', then even an expert that configures the kernel build should not just fix that by overruling the claimed support by an architecture. If the architecture definition is wrong, the expert should just provide a patch to correct the architecture definition instead---in the end, if the user is an expert, sending a quick one-line patch should not be an issue. In other words, I do not see the deeper why an expert can overrule the architecture definition in this case, as the expert may not overrule the config selections defined by the architecture in the large majority ---or probably all other (modulo some mistakes)---of similar cases. Signed-off-by: Lukas Bulwahn Reviewed-by: Arnd Bergmann --- drivers/ata/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index c93d97455744..fc11d9d30d72 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -1102,7 +1102,7 @@ config PATA_PCMCIA If unsure, say N. config PATA_PLATFORM - tristate "Generic platform device PATA support" if EXPERT || HAVE_PATA_PLATFORM + tristate "Generic platform device PATA support" if HAVE_PATA_PLATFORM help This option enables support for generic directly connected ATA devices commonly found on embedded systems.