Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5367987rwr; Mon, 8 May 2023 23:54:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72UleVKPDoNzUIOfHZUYTuD+N039ImrfJ00vSGK/tqnZOYHCFiAixYQNevk5FUiJNtc3yq X-Received: by 2002:a17:902:b195:b0:1a0:76e8:a4d with SMTP id s21-20020a170902b19500b001a076e80a4dmr16364383plr.14.1683615239649; Mon, 08 May 2023 23:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683615239; cv=none; d=google.com; s=arc-20160816; b=G5d1huwuYCG4EXVraffcnyu4+xmMJ9nP9GgzuplkvP6aobgNykYNl5BKBWWl1ZD2vp 7H8udkeYsXBCf2Wo4dX8BAbo0Ie8n7pnC5vhVYFAwy8EX3Jck/zBj7YpC8FbFhHKuSbL b/yKXabMPMc6VlqbkJ0PeKdUxTJxwmqFktu2lIbX5hnCpkH5z79rozvwpcaPMFwm2jKS Y9XpMWkhbKQn8qE5Bn6PKxJMuhjvS0J0CcfLOz1AhveYD1F3qbJ8cliUpIvHGkW0zcr3 heTKfALVIFAsaqUILxzzmohlnMyD0aP8prxO7mmyWLL7gZo9HOD4kF8yBdxkKlPROanu QCtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=EGrta1oRXTj9N9nxgAewqrTabbUQs7qNkwhdXFN2SHg=; b=HBR3/fG1dbiVBV+0Yf5gShApfjKukcxW2x/phnnB3lvv2isoNrdfEWCXTjs2fKFq3r BRrGKSD31C246nM+/w+K5eAfuwceMtPjIDU085WCYa7+A8YRuTWspEK5mhihEAv3aPAX /Hj26piyn+PPx1Bu08JY5Ug784oNtyK2GhaA/UlAa/v0A89dZyeQPzWkjIF6r2nvBWpt zzraQDBPJr4yabJjkXVwG+yxUalZu6EMZmYb9s6rwng7DSz7J5MXJXMvoGr5aI6R6ztr Oq9jMrGWigs0dHURluYpplG0lp9Np6NACtBWwAGvyBWIgDwx6BOas+cuwzg/FVRWZQem Hgpg== ARC-Authentication-Results: i=1; mx.google.com; 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 19-20020a170902c15300b001aadf9e2d15si849419plj.491.2023.05.08.23.53.47; Mon, 08 May 2023 23:53:59 -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; 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 S234950AbjEIGjN convert rfc822-to-8bit (ORCPT + 99 others); Tue, 9 May 2023 02:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234929AbjEIGjF (ORCPT ); Tue, 9 May 2023 02:39:05 -0400 Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 453E2AD19; Mon, 8 May 2023 23:39:00 -0700 (PDT) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-b9a6f17f2b6so28813169276.1; Mon, 08 May 2023 23:39:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683614339; x=1686206339; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xOcwavl5tEhjFo+qvl4oybTvYsklKUcQFW6RYMWOTw0=; b=XN/nxjv8ybmedDeeokUrHmWGX7ALZ14UXYy3ffHqQ9lGkzlb68u0cgJBfRfxvXL9qG G7Xu/UgvtaMic3ZIW0O1sKEPRtryQqXpLBbEG9AxxFrigccVYa3aiuA8dbl85T6oNBHw QpqFs1GE/725xsP2lb0JhFm0XXL048WjAR4nfkiaIu8aIa7vvvAjdDBqQVGfI3Tv9S8i LLb3nl/D/CjBZEGS1ocHdlIxrb+Q3iZcH4KnvkaWcJgAK8W1bCuEjTQSfdXCp2jUaQLz AU92c0for24Fvt8nxW1zxLCM/F4gSkNVA7C1yr3Bj6SeLWLToU00XPVTEGHjzWGr5KTN KTTw== X-Gm-Message-State: AC+VfDxZ4t/2KTMzOfAGgRbYpCKH5pCxWJZq16GacyahIiZYm3MtV0tT rY5qjdc3u6eH6y3NbXiAlaFMRZkqSSmsNA== X-Received: by 2002:a81:a4c:0:b0:55d:9c2d:20d with SMTP id 73-20020a810a4c000000b0055d9c2d020dmr13442966ywk.6.1683614339091; Mon, 08 May 2023 23:38:59 -0700 (PDT) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id q66-20020a0dce45000000b0054f03d75882sm3087071ywd.71.2023.05.08.23.38.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 May 2023 23:38:57 -0700 (PDT) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-b9a6eec8611so28900065276.0; Mon, 08 May 2023 23:38:56 -0700 (PDT) X-Received: by 2002:a25:51c7:0:b0:b9a:867b:462a with SMTP id f190-20020a2551c7000000b00b9a867b462amr15472830ybb.7.1683614336436; Mon, 08 May 2023 23:38:56 -0700 (PDT) MIME-Version: 1.0 References: <20230314121216.413434-1-schnelle@linux.ibm.com> <20230314121216.413434-29-schnelle@linux.ibm.com> <202303141252027ef5511a@mail.local> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 9 May 2023 08:38:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 28/38] rtc: add HAS_IOPORT dependencies To: Arnd Bergmann Cc: Niklas Schnelle , Alexandre Belloni , Alessandro Zummo , Greg Kroah-Hartman , Bjorn Helgaas , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Mauro Carvalho Chehab , Alan Stern , "Rafael J . Wysocki" , 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, linux-m68k Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Arnd, On Mon, May 8, 2023 at 10:01 PM Arnd Bergmann wrote: > On Mon, May 8, 2023, at 17:36, Niklas Schnelle wrote: > > On Tue, 2023-03-14 at 13:52 +0100, Alexandre Belloni wrote: > >> 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. Atari does not use RTC_DRV_CMOS, but still relies on generic RTC instead. Last time (in 2013?) I tried converting to RTC_DRV_CMOS by registering an "rtc_cmos" platform device, I couldn't get it to work. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds