Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp514334rdb; Fri, 8 Sep 2023 07:42:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMdSaLOA12B1nU+aVvCFiXT4Xnp6hJN9gtAa4sNwcOFTAv9GdpEYItM+886mTc/vKke1gv X-Received: by 2002:a05:6512:4007:b0:4ff:7e1e:b4b4 with SMTP id br7-20020a056512400700b004ff7e1eb4b4mr2385273lfb.39.1694184179605; Fri, 08 Sep 2023 07:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694184179; cv=none; d=google.com; s=arc-20160816; b=KMxo6NRdvbvQWiLwvErTGQL6heJHikuyY8Dree8LP1RDygB9kHPmkFlveFjvgE54fj VGyOXcidnZfzE5b6jp2aXjyZrQ4DYanvmugroqeq1b6SyD0fTRUW1oZhIr9FG1hzB+ve RU8PsWCdiHC7qP8MvCE110KL0jReD1cECRscUh/GLNwskL8r4F6ru8Scbpt8o7DKD9Hx BBf2ZIlvccH4236jKoSjItRd7a58/OHGzoXBkfA/6dOeEJaU/zIsM47maWgnsJspYgoo k2+qD69ZBeyE26Dfel2bCKHOjShK6U8fdtLUpA9PbaUGbHTp3dpkodHUf/NBo5HBM8mv oI7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=awL79spxbcn0+UZpMoDqL5NeqikVSZlFc8AYo5wlBfY=; fh=u1GudbotdQtrrdoponPbygohCWz5bLiWgHE6vr+XNcU=; b=am7cHWd2Pi8dxZMqsJRWWpagceNwng/KZY1gYx/DbF4dneVj3Fxpc9pbiEXVNEQJAd po/nhY9v0KN6Rm1XXiHDyjgTykGVNT8TR3gBWz/OlSUoUpIllIhbh5eYItpQEkrd2R33 SVTZ08DMTOuc082qIagUoD6OqcENs4bluxJo3yjzdP6jhKwS9fXQbZ0K4HY3BxljyUKa Vr+X+uoe38CxZk4qRXC0K4SYUp/1eXdBSWn+7x9UALFepQK6JL1s3OtTMEtF56wElk+g iKN9zLTUPleb+oBgZjeKvoqCY9PZywq3u7fcOgUVInRsilgpFcEk2xU3QBXxuRuxjo5z K42g== 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 n11-20020aa7c68b000000b0052a021db02dsi1515392edq.563.2023.09.08.07.42.23; Fri, 08 Sep 2023 07:42: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 S235851AbjIHKLB convert rfc822-to-8bit (ORCPT + 99 others); Fri, 8 Sep 2023 06:11:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjIHKLA (ORCPT ); Fri, 8 Sep 2023 06:11:00 -0400 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BBAA1BD3; Fri, 8 Sep 2023 03:10:56 -0700 (PDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qeYRy-000jn3-Ay; Fri, 08 Sep 2023 12:10:54 +0200 Received: from p5b13a40a.dip0.t-ipconnect.de ([91.19.164.10] helo=[192.168.178.81]) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qeYRy-001wF1-3O; Fri, 08 Sep 2023 12:10:54 +0200 Message-ID: Subject: Re: [PATCH 4/4] sh: machvec: remove custom ioport_{un,}map() From: John Paul Adrian Glaubitz To: Arnd Bergmann Cc: linux-sh@vger.kernel.org, Rich Felker , Yoshinori Sato , Geert Uytterhoeven , linux-kernel@vger.kernel.org, Arnd Bergmann Date: Fri, 08 Sep 2023 12:10:53 +0200 In-Reply-To: <20230802184849.1019466-4-arnd@kernel.org> References: <20230802184849.1019466-1-arnd@kernel.org> <20230802184849.1019466-4-arnd@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 91.19.164.10 X-ZEDAT-Hint: PO X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS 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 Hi Arnd! On Wed, 2023-08-02 at 20:48 +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > These functions were only used on the microdev > board that is now gone, so remove them to simplify > the ioport handling. > > This could be further simplified to use the generic > I/O port accessors now. > > Signed-off-by: Arnd Bergmann > --- > arch/sh/include/asm/io.h | 4 ++-- > arch/sh/include/asm/machvec.h | 5 ----- > arch/sh/kernel/ioport.c | 13 +------------ > 3 files changed, 3 insertions(+), 19 deletions(-) > > diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h > index f2f38e9d489ac..ac521f287fa59 100644 > --- a/arch/sh/include/asm/io.h > +++ b/arch/sh/include/asm/io.h > @@ -181,7 +181,7 @@ static inline void pfx##out##bwlq##p(type val, unsigned long port) \ > { \ > volatile type *__addr; \ > \ > - __addr = __ioport_map(port, sizeof(type)); \ > + __addr = (void __iomem *)sh_io_port_base + port; \ > *__addr = val; \ > slow; \ > } \ > @@ -191,7 +191,7 @@ static inline type pfx##in##bwlq##p(unsigned long port) \ > volatile type *__addr; \ > type __val; \ > \ > - __addr = __ioport_map(port, sizeof(type)); \ > + __addr = (void __iomem *)sh_io_port_base + port; \ > __val = *__addr; \ > slow; \ > \ > diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h > index 2b4b085e8f219..4e5314b921f19 100644 > --- a/arch/sh/include/asm/machvec.h > +++ b/arch/sh/include/asm/machvec.h > @@ -19,11 +19,6 @@ struct sh_machine_vector { > int (*mv_irq_demux)(int irq); > void (*mv_init_irq)(void); > > -#ifdef CONFIG_HAS_IOPORT_MAP > - void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size); > - void (*mv_ioport_unmap)(void __iomem *); > -#endif > - > int (*mv_clk_init)(void); > int (*mv_mode_pins)(void); > > diff --git a/arch/sh/kernel/ioport.c b/arch/sh/kernel/ioport.c > index f39446a658bdb..c8aff8a20164d 100644 > --- a/arch/sh/kernel/ioport.c > +++ b/arch/sh/kernel/ioport.c > @@ -12,15 +12,6 @@ > unsigned long sh_io_port_base __read_mostly = -1; > EXPORT_SYMBOL(sh_io_port_base); > > -void __iomem *__ioport_map(unsigned long addr, unsigned int size) > -{ > - if (sh_mv.mv_ioport_map) > - return sh_mv.mv_ioport_map(addr, size); > - > - return (void __iomem *)(addr + sh_io_port_base); > -} > -EXPORT_SYMBOL(__ioport_map); > - > void __iomem *ioport_map(unsigned long port, unsigned int nr) > { > void __iomem *ret; > @@ -29,13 +20,11 @@ void __iomem *ioport_map(unsigned long port, unsigned int nr) > if (ret) > return ret; > > - return __ioport_map(port, nr); > + return (void __iomem *)(port + sh_io_port_base); > } > EXPORT_SYMBOL(ioport_map); > > void ioport_unmap(void __iomem *addr) > { > - if (sh_mv.mv_ioport_unmap) > - sh_mv.mv_ioport_unmap(addr); > } > EXPORT_SYMBOL(ioport_unmap); Why aren't you removing the function ioport_unmap(void __iomem *addr) completely and just turn it into stub? Is it still referenced somewhere? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913