Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3206126rdb; Wed, 13 Sep 2023 05:35:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeAUYi5/LX3iY4P1eAri880eW0kYEpYZzohWJF4+hnzJJoWCA2fdTYaP7v3JJchbrT54i1 X-Received: by 2002:a05:6a00:852:b0:68a:5197:619f with SMTP id q18-20020a056a00085200b0068a5197619fmr2988757pfk.31.1694608552932; Wed, 13 Sep 2023 05:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694608552; cv=none; d=google.com; s=arc-20160816; b=flA7t+LbGRyBWbEFtjqHhU+Xttg0HQpCg4Jhcg+2T988Sgdhfbdi7kAXd6WQbqlo1b G9nOrZ+gnLxLL6SwISyF9y7T/NUgYzLxlF7PxQQEjj/DQbbwlwEPIt0LKRSYPHwMm/AS X0qKrGdxEfXdedtlC4pgTE3TRCA/5E2HkhGXHX+KJnRDsPLb1KWjgilj5m55BYTWs+Z7 ZVPLomxN2E9LNjHJnrCHio6AY1AHudCIB1sV3ES/ySUD3DmkaIiBoQ/1fSL1pKp3Z8hG KTgVKw+plFr+M6YuUgHiuIdDO2+hmlcSRroCUSjm+qDw2jAx9JaNlFzD8xesEgm5vJuP a/QA== 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=0TLKGm/1HMWlP+mS/AVyWeS+Vq/mrtgDcSLKTaaazCU=; fh=e7nhOokFhPaV6nS8RNIWlIyNclnA+QAr0SO3J0mYw0w=; b=l67Kk3XZ3T4ktOr1t2qTESVkuO9GEMKlAQG8OllLEDgbGQSx61/c5TGwRdjtueay0P ytW6fTqV9ppQz2yJpsDvN7rri0vL7mdr/Gsn4pTgbeajfnkxIM9s5ERXjDYEYm0nWzqw KTMxyD/wVXDbcWtRMphW4bjvaFft/Jbp8b7V6YFz2CrK+YGgK6uNVbh0NwmxvablEcRV 2Mu9xrCSxRIPWyB7NqVcoFwJ6bqxpKyXfTlX48JCu62ean37qfJIWxYjbKubn3TZGpCp m7QcIRgUOR+NBT1RJUMIrXVGCzYadZcKwc/areFyOUIeNFBtBlxfDwHtm0a7x8oYpKAo ZNlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q13-20020a65624d000000b0055c8d58cee9si9546529pgv.714.2023.09.13.05.35.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 05:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E0F0D81E3E35; Wed, 13 Sep 2023 05:33:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240550AbjIMMc4 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 13 Sep 2023 08:32:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240502AbjIMMcz (ORCPT ); Wed, 13 Sep 2023 08:32:55 -0400 Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D2D119B4; Wed, 13 Sep 2023 05:32:51 -0700 (PDT) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-58d9ba95c78so68170267b3.1; Wed, 13 Sep 2023 05:32:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694608370; x=1695213170; 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=niAJ2PizX/sYOBYMEFf6M6THGMgT7grLXGG+lDou3LM=; b=tEE1/+SQ2YlF2rTLACLoTdeeCC947cXHxwP5s93NirDl1u+LzYnL3tuKv3p008E/tg LqbrV35gokGmO/N70aTMl/qUgoKvQB0bBZGw9NrNhITjYLHFH2Rz/3zX4NIo5X5EWObq Uayn6hSoUUOueQuOTMWaHC8Ro+gabe70jFRcjZPfjQBi88y7kmbUhN0opz1Ubdh6qtWM Zgpp3xn+nSDXUMWesS5FyT7449qSRt/4YmMpug3+CRhtMlHgXrRVMPoS6KjI+sTXeaSq ZJiepxrs6RgLD8W94in9FTsdhFUGO77joAKfXB8xGVUSJYbEMvjCOSwR43qr6rjYOAhI k9Qg== X-Gm-Message-State: AOJu0Yx3/uV92a8aV8Bj5/yP9ivX+KAJljDFeaPJZBFOs7xuuZfyWuoY YyI9aX08VvHYZGDRcvR7NNQ0icX+05FwjQ== X-Received: by 2002:a81:5e54:0:b0:570:63d3:9685 with SMTP id s81-20020a815e54000000b0057063d39685mr2460721ywb.25.1694608370624; Wed, 13 Sep 2023 05:32:50 -0700 (PDT) Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com. [209.85.128.174]) by smtp.gmail.com with ESMTPSA id p63-20020a815b42000000b005837633d9cbsm3077942ywb.64.2023.09.13.05.32.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Sep 2023 05:32:50 -0700 (PDT) Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-579de633419so68063517b3.3; Wed, 13 Sep 2023 05:32:49 -0700 (PDT) X-Received: by 2002:a25:d303:0:b0:d7a:def7:b96a with SMTP id e3-20020a25d303000000b00d7adef7b96amr2179608ybf.53.1694608369635; Wed, 13 Sep 2023 05:32:49 -0700 (PDT) MIME-Version: 1.0 References: <20230802184849.1019466-1-arnd@kernel.org> <20230802184849.1019466-4-arnd@kernel.org> In-Reply-To: <20230802184849.1019466-4-arnd@kernel.org> From: Geert Uytterhoeven Date: Wed, 13 Sep 2023 14:32:38 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] sh: machvec: remove custom ioport_{un,}map() To: Arnd Bergmann Cc: John Paul Adrian Glaubitz , linux-sh@vger.kernel.org, Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Sep 2023 05:33:05 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Hi Arnd, On Wed, Aug 2, 2023 at 8:49 PM 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 Thanks for your patch! > --- 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; \ Note that this adds unconditional users of sh_io_port_base, while sh_io_port_base is provided by arch/sh/kernel/ioport.c, which is currently only built if CONFIG_GENERIC_IOMAP=n. This is not a problem yet, as the final part to enable GENERIC_IOMAP on SH never made it upstream. However, Sato-san's series enables GENERIC_IOMAP for SH_DEVICE_TREE=y builds, leading to a link failure. A quick fix would be to always build the relevant parts: --- a/arch/sh/kernel/Makefile +++ b/arch/sh/kernel/Makefile @@ -23,8 +23,8 @@ obj-y := head_32.o debugtraps.o dumpstack.o \ ifndef CONFIG_GENERIC_IOMAP obj-y += iomap.o -obj-$(CONFIG_HAS_IOPORT_MAP) += ioport.o endif +obj-$(CONFIG_HAS_IOPORT_MAP) += ioport.o obj-y += sys_sh32.o obj-y += cpu/ --- a/arch/sh/kernel/ioport.c +++ b/arch/sh/kernel/ioport.c @@ -12,6 +12,7 @@ unsigned long sh_io_port_base __read_mostly = -1; EXPORT_SYMBOL(sh_io_port_base); +#ifndef CONFIG_GENERIC_IOMAP void __iomem *ioport_map(unsigned long port, unsigned int nr) { void __iomem *ret; @@ -28,3 +29,4 @@ void ioport_unmap(void __iomem *addr) { } EXPORT_SYMBOL(ioport_unmap); +#endif /* !CONFIG_GENERIC_IOMAP */ 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