Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4816914rwr; Mon, 8 May 2023 13:09:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45Vy5+8ZcOjIYeQUg0X/KUP+kveo5pDa7in3xCYXiZZaohm57sH3B5cLOT6a+FRjYfztIu X-Received: by 2002:a17:902:b696:b0:1aa:f203:781c with SMTP id c22-20020a170902b69600b001aaf203781cmr10050610pls.44.1683576545618; Mon, 08 May 2023 13:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683576545; cv=none; d=google.com; s=arc-20160816; b=NgYMzpLkmHuPhyDUUCEc2ZYQ2Tn8Q7NrhIPl0idLFwWC2FOOlz6iiccJ1YtM+jxw6I OcA+NMnzGARblsdwXRC9zBR9kWmskv5r/JmNj3MgX1W/7aeu89lX7nTzOAASj572HsGG RTbpQ7wT4ZSjTEQULC01kDTvOWJ6QZtwjkfl5cU+n18xdFqu8WbZyMKiiJHpUL7yA12S NORTyat55sL/rcabWaKIPELVjQG1BCA/0noJUoiCuVlZpizcSyG8AozeTq+08boo1LSF /yG0vD7q0DGdjMUvG4DSnSK1t4GrbEuJtLAjHsXZhk/t+1MxYmv6i5mXBjuMYp8REtvC 0C4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=QUQkTnENhrfBa9ubk2/q4iUrKmZQKHxJLJOAa5BrEmc=; b=QB5xb9vZshRk+6L/x30Bt4TFE8XyoZWIvpexEHv0G7q0gAFHkOeerHgGEk36k3goxn VxGU1yvksp+RrdCWI58m3eUrlM6XFDoF6nA/Lj1DI7WLfRXVReMOSFat+z6iQeIHdzmd K07APz+ccn8dQn6Ls0jglwTM1TCfHufyTrLlJOzOqT6LoSpSf0aLTB42FGkOiDszQO9B JrDSWXfvD2dcrMQ+pmV3ux+Om05c8KWEDh6Z8u94wox7SPfZkx9B8iULmGnCzF/osIYA v/nMKwRH21Y1wMJWnHikFjTljPiR9cIthjXxfVoueWdN6wYEd6EZl+d+VXMuWrlEUdec rRHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=jcqrNw6Y; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Qbg9VrSZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a170903228700b001a63d07af3csi9164740plh.41.2023.05.08.13.08.53; Mon, 08 May 2023 13:09:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=jcqrNw6Y; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Qbg9VrSZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233385AbjEHUBi (ORCPT + 99 others); Mon, 8 May 2023 16:01:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjEHUBf (ORCPT ); Mon, 8 May 2023 16:01:35 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48635FE; Mon, 8 May 2023 13:01:33 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id B08E832001C6; Mon, 8 May 2023 16:01:29 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Mon, 08 May 2023 16:01:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1683576089; x=1683662489; bh=QU QkTnENhrfBa9ubk2/q4iUrKmZQKHxJLJOAa5BrEmc=; b=jcqrNw6Ykug/YvDA9J MOPuq1dJrHSxqM8bpD900hYQW1OCztQnWttlEzgQY1Pc5noZnQT1WlG1E8TiiwsL RIsarXKGToA+IqE/i2Sx1209g5EUx2msUf0Cj7hxbXVjM7gs4QiUNLoU+3orQFF8 sOfMIbi3aq0T8LtjEObwoC/9otJjEdNJokXaWx8CxyZ46kpBOgWZIEmLIin7Zv0y mvliNdO2Z6qZunVxOfCAYMJvEJEG+IMS63uBLyrmaOgaBAoB16mLTREj9hmeSguC ZGMScbfA4aUGkPt/cnPkatO8yqIZX7+oUDbiBn0iiP3cwYbCOLf3XtFGuhXu401D 2raA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1683576089; x=1683662489; bh=QUQkTnENhrfBa 9ubk2/q4iUrKmZQKHxJLJOAa5BrEmc=; b=Qbg9VrSZXCOFqoCI16TSXZqEePtj7 pWR18NFl9sE/iAYJnQ/uB2IsYhmeYF4mIzG+jKPsHQUThW01kN/zNR/mpwi1X/gC vauLga0YTsQma7LVeMEodEzYnszYhLeZdSnEDCXKTOYjGWc97dl58+vJal5RM7s4 6J0G8lqJf4cc+Cyod2eQmaTVIOXe3dthelyf6DPdN9zGh5KpOSNDxkap9lJC5tnE BwEYJKfu1rX2+yB81lhhvTEmcPq+B+QTYYltglRKSg4BU73p2Ah0426BIMNi9qNF brAuJpyMuTEc8uL5O/uLpKj6f18TIcshG9KTobZBkyz7s9ChWNH87XlmA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefkedgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 77D63B60086; Mon, 8 May 2023 16:01:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-415-gf2b17fe6c3-fm-20230503.001-gf2b17fe6 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20230314121216.413434-1-schnelle@linux.ibm.com> <20230314121216.413434-29-schnelle@linux.ibm.com> <202303141252027ef5511a@mail.local> Date: Mon, 08 May 2023 22:01:08 +0200 From: "Arnd Bergmann" To: "Niklas Schnelle" , "Alexandre Belloni" Cc: "Alessandro Zummo" , "Greg Kroah-Hartman" , "Bjorn Helgaas" , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , "Mauro Carvalho Chehab" , "Alan Stern" , "Rafael J . Wysocki" , "Geert Uytterhoeven" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , linux-kernel@vger.kernel.org, Linux-Arch , linux-pci@vger.kernel.org, "Arnd Bergmann" , linux-rtc@vger.kernel.org Subject: Re: [PATCH v3 28/38] rtc: add HAS_IOPORT dependencies Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 8, 2023, at 17:36, Niklas Schnelle wrote: > On Tue, 2023-03-14 at 13:52 +0100, Alexandre Belloni wrote: >> Hello, >> >> On 14/03/2023 13:12:06+0100, Niklas Schnelle wrote: >> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends >> > not being declared. We thus need to add HAS_IOPORT as dependency for >> > those drivers using them. >> > >> > Co-developed-by: Arnd Bergmann >> > Signed-off-by: Niklas Schnelle >> > --- >> > drivers/rtc/Kconfig | 4 +++- >> > 1 file changed, 3 insertions(+), 1 deletion(-) >> > >> > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig >> > index 5a71579af0a1..20aa77bf0a9f 100644 >> > --- a/drivers/rtc/Kconfig >> > +++ b/drivers/rtc/Kconfig >> > @@ -956,6 +956,7 @@ comment "Platform RTC drivers" >> > config RTC_DRV_CMOS >> > tristate "PC-style 'CMOS'" >> > depends on X86 || ARM || PPC || MIPS || SPARC64 >> > + depends on HAS_IOPORT >> >> Did you check that this will not break platforms that doesn't have RTC_PORT defined? >> > > > From what I can tell the CMOS_READ() macro this driver relies on uses > some form of inb() style I/O port access in all its definitions. So my > understanding is that this device is always accessed via I/O ports even > if the variants differ slightly and would make no sense on a platform > without any way of accessing I/O ports which is what lack of HAS_IOPORT > means. From what I can see even without RTC_PORT being defined the > CMOS_READ is still used. Hope that answers your question? I think the m68k/atari and mips/dec variants don't necessarily qualify as PIO, those are really just pointer dereferences, and they don't use the actual inb/outb functions. On atari, it looks like HAS_IOPORT may be set if ATARI_ROM_ISA is, but on dec it's never enabled. Arnd