Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp74185rwo; Tue, 1 Aug 2023 13:09:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlGzh3j2HwMNcntFZkd6z4mVWDLPZJ8hlRTouSyDBPGZAeJxaOAqnZ1zFvyJfjtjOrsGdl4p X-Received: by 2002:ac2:5f64:0:b0:4f8:77db:1d9e with SMTP id c4-20020ac25f64000000b004f877db1d9emr2785654lfc.12.1690920580921; Tue, 01 Aug 2023 13:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690920580; cv=none; d=google.com; s=arc-20160816; b=oaWjTG0RiodNvY6mEvRjmJVHHNUlunhIx+97iqoUN0qymKW0DRUcUHSbBNvus2wmki EJYk6St/M9n3rqc324lRVTRx1ghEx7yumR3ARPeD3BTFUxu1jyNOdKU6hKGCeo4r0iCX qNBKfZZ5NofX1/2rQHVURVL/cQ0a5PW+buBMIJMyEbpNOvLNfrH/1tQCjiREnEuae0KF 9Of5eHnJ/qu2lc5znwiUnCqhcYoIzpdujrCzshJ8xeW+xvE8Rlb/IPfYOBSi/PdVhkIF HkkIbGbwqG9y6c7V4HIXeAXEQAizY+MFmHZm4wROMA9YKSUlva7P0S/LAMOwDqlYlOMq dzAg== 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=dYfKnTwsu3Rv+jmF3LuBe7CVL09Dom45NKHSaV6/Pi8=; fh=LDvp9JSi/duLMJ89RFeua5uoJajZyyD9vAzuSfnxCcE=; b=lehJUhhPguUenwHHUAhrD2RnS/J69sv3P1cidsVG7Sok3dC2ZlcdjHrYL054RvZbny YPlqBVXBGmSaOt3lflypsll/5O88aIaiWE4kjH4S/yj0E9ToVeebFPArLqIZJ1hMUuJE SCVgJoUSA0EShPaklGAGAuF9cIrltEYycVuJvODNBGqm/WsQ90wU7DgXldgSzBZP7i7/ 98RuSdoW+Xqpm+8ObFyLvlTXHoI2F3wHK1KP5KP1PP7d37CK2Lf90U9QyOsn/b96KySO UMg0WU2HE2bFQNWbSqWE9jPy1HMBeydtsQP1WVMb1gh2hsP1L8JuVkcOyfQmDnsmmf/o HX0A== 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 c22-20020a056402121600b0052239083be7si9395236edw.636.2023.08.01.13.09.05; Tue, 01 Aug 2023 13:09:40 -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 S231696AbjHATWE convert rfc822-to-8bit (ORCPT + 99 others); Tue, 1 Aug 2023 15:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbjHATWD (ORCPT ); Tue, 1 Aug 2023 15:22:03 -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 B158C1BF1; Tue, 1 Aug 2023 12:21:58 -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 1qQuwF-001bwY-Bp; Tue, 01 Aug 2023 21:21:47 +0200 Received: from p57ae5424.dip0.t-ipconnect.de ([87.174.84.36] helo=suse-laptop.fritz.box) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qQuwF-001Voi-33; Tue, 01 Aug 2023 21:21:47 +0200 Message-ID: Subject: Re: [PATCH v8 11/19] sh: add including From: John Paul Adrian Glaubitz To: Arnd Bergmann , Geert Uytterhoeven , Baoquan He Cc: linux-kernel@vger.kernel.org, Andrew Morton , linux-mm@kvack.org, Christoph Hellwig , Christophe Leroy , Mike Rapoport , Matthew Wilcox , Alexander Gordeev , Kefeng Wang , Niklas Schnelle , Stafford Horne , David Laight , Helge Deller , Nathan Chancellor , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, Guenter Roeck Date: Tue, 01 Aug 2023 21:21:45 +0200 In-Reply-To: <09094baf-dadf-4bce-9f63-f2a1f255f9a8@app.fastmail.com> References: <20230706154520.11257-1-bhe@redhat.com> <20230706154520.11257-12-bhe@redhat.com> <0f771b11539d5a3871691af901315ee2034b577c.camel@physik.fu-berlin.de> <09094baf-dadf-4bce-9f63-f2a1f255f9a8@app.fastmail.com> 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: 87.174.84.36 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,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 Hi Arnd! On Mon, 2023-07-10 at 12:47 +0200, Arnd Bergmann wrote: > It looks like only the "noioport" variant got some of the > extra macro definitions, but the version for PCI still needs the > same six macros, plus the ones of inb/outb etc, something like > this: > > diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h > index 24c560c065ec7..2135e32145c54 100644 > --- a/arch/sh/include/asm/io.h > +++ b/arch/sh/include/asm/io.h > @@ -241,6 +241,26 @@ __BUILD_IOPORT_STRING(q, u64) > > #endif > > +#define inb(addr) inb(addr) > +#define inw(addr) inw(addr) > +#define inl(addr) inl(addr) > +#define outb(x, addr) outb((x), (addr)) > +#define outw(x, addr) outw((x), (addr)) > +#define outl(x, addr) outl((x), (addr)) > + > +#define inb_p(addr) inb(addr) > +#define inw_p(addr) inw(addr) > +#define inl_p(addr) inl(addr) > +#define outb_p(x, addr) outb((x), (addr)) > +#define outw_p(x, addr) outw((x), (addr)) > +#define outl_p(x, addr) outl((x), (addr)) > + > +#define insb insb > +#define insw insw > +#define insl insl > +#define outsb outsb > +#define outsw outsw > +#define outsl outsl > > #define IO_SPACE_LIMIT 0xffffffff > > diff --git a/arch/sh/include/asm/io_noioport.h b/arch/sh/include/asm/io_noioport.h > index 5ba4116b4265c..12dad91f41c1e 100644 > --- a/arch/sh/include/asm/io_noioport.h > +++ b/arch/sh/include/asm/io_noioport.h > @@ -46,20 +46,6 @@ static inline void ioport_unmap(void __iomem *addr) > BUG(); > } > > -#define inb_p(addr) inb(addr) > -#define inw_p(addr) inw(addr) > -#define inl_p(addr) inl(addr) > -#define outb_p(x, addr) outb((x), (addr)) > -#define outw_p(x, addr) outw((x), (addr)) > -#define outl_p(x, addr) outl((x), (addr)) > - > -#define insb insb > -#define insw insw > -#define insl insl > -#define outsb outsb > -#define outsw outsw > -#define outsl outsl > - > static inline void insb(unsigned long port, void *dst, unsigned long count) > { > BUG(); I am fine with this fix. Acked-by: John Paul Adrian Glaubitz > I think ideally all the I/O port stuff in arch/sh/ could just be > removed after the conversion to asm-generic/io.h, but the > microdev_ioport_map() function oddity gets in the way of that, > unless someone wants to clean up that platform. As far as I > can tell, the ethernet, display, USB and PCI devices on it already > broke at some point (afbb9d8d5266b, 46bc85872040a), so it might > be easier to remove it entirely. I don't have this particular hardware, so I cannot comment on this. > > I'm not happy though that this patch is in linux-next without being Acked by me > > or being reviewed by anyone. We should always make sure first that the code > > actually builds and has been tested on real hardware. > > I think that if the series has been posted eight times, you had > your chance to do a review, especially since I pointed out that > merging this one would have avoid the unxlate_dev_mem_ptr() bug > as well. I have only been the maintainer of arch/sh for a few weeks, so it's natural that I am not doing a perfect job and might miss something. Also, I am not getting paid for this work, I am doing this in my free time. > Having the series go into linux-next sounds appropriate like this, > the entire purpose of that is to find such bugs and Andrew can jus > fold the fixup into the broken patch. > > Let me know if you prefer the simple version with the extra > #defines or if we should just use the generic inb/outb implementation > immediately and drop microdev in a separate patch. Please go ahead with the simple version. Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913