Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35217405rwd; Mon, 10 Jul 2023 04:30:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlFo57WIRbp0nGFcoQoWPKTb/lNnonjpJtmdAr3CE6Le4rYGMmn90rrcyB/fXa4hI7WGtoWq X-Received: by 2002:a05:6870:5607:b0:1b0:5105:a62b with SMTP id m7-20020a056870560700b001b05105a62bmr14729954oao.2.1688988604676; Mon, 10 Jul 2023 04:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688988604; cv=none; d=google.com; s=arc-20160816; b=htzeS3NkJCfLHuZWDkbDw6dnhtgAr9LaLM/CazTTyj5Irr0TQHYEE6WSc79JtJkD7P aFA5kcbwt1xrNlUpePULQykh8SJaqBtr218diZN0NY6E52CMSI8a9fS1jUAJsYmgAEpZ AXIlXhP7Fxz95BcHEQBpCLLMW1Io4tB0B17FI3anbhLSC+u82GxwZ5z9igs/sA7Qhf0O oLdRaEENiZcM0mE5i7WiK1J4Us1K6TMYtxVGuvqN/RnLRiBCozYdU+AkBX7ySWaiRBf4 rezrdTfSv8BxDrNkue5MwC6tnkVXs20CG36DBvnPs/JmvrOEcA3Hp1IlMihRXf3IFpsU fTew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=w6ICekzr9KYZl8W9GIefXJYjQf4JFQn5qnNfJewCe0o=; fh=jCooP1r4BCdtNsRfTrsXZSZr5feY28G3fweN2r7lyM8=; b=IDhm+54Nqtm++OSy13D8oqYPezG4piDjc1AFvuBYjsQX0uI2xKxkFLWE/iCzfMO8Qq 2MGKOlQvnL9nPaksCHzNX3KrM36ZxhCTQq1S/MA2aE0vkugRxMv75vojO9IEa0u7TwFc nOyJWfHQ/q9qhskg35UKgAhzlsJs8GszQgJfDFN2v2rdKlLlrN/5cXG6nVVzhUs3uPku F3K/EMXtS1+ggTvHe7GBP/Dc6mA+y9hh9fJMrTTva62XgY0gN3Vkwu5hbPZ5BDshWQqE whl06cnsaccrw5JQDXHqGjIbW6aR2HjVwm+Oc9FuHFoXTGxwD3MEXdl4aO7XmuLlk2qW TvWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=nQ9QPUY7; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ZkHAMHcb; 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 md10-20020a17090b23ca00b00260a7aee610si3475718pjb.152.2023.07.10.04.29.52; Mon, 10 Jul 2023 04:30:04 -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=fm2 header.b=nQ9QPUY7; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ZkHAMHcb; 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 S230215AbjGJKs0 (ORCPT + 99 others); Mon, 10 Jul 2023 06:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjGJKsX (ORCPT ); Mon, 10 Jul 2023 06:48:23 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B316B5; Mon, 10 Jul 2023 03:48:22 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id D224032000E5; Mon, 10 Jul 2023 06:48:16 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute6.internal (MEProxy); Mon, 10 Jul 2023 06:48:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding: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=fm2; t= 1688986096; x=1689072496; bh=w6ICekzr9KYZl8W9GIefXJYjQf4JFQn5qnN fJewCe0o=; b=nQ9QPUY7wS4rGy1GEx42RGy7zp+AksoN/jMq8WNwG0z2osUupCr J9FCFjCMQhZzOeMBdbAPDvJNf6/9vSEk1Xgus5bb0b6s2jl3/78ll4i1pxSDE4Md IyYevHeXLqId94HhwpLfGiCdlhK7u/lUft/J2an/R9HCgZMMnykcm/dksNSgfGW6 CaqSo/8+1GO63j/tAXVF7y8g/HmJr/3vxWuDA8eD9rHYXHdGc7ccNYgCVuoVGWEu WG+zirxyXjMWPuyrIbW32eAIdWRO1fySvx1DAXSXhPRzlxXvW0VCqujirzS2Nsla K8yW1Lsd7hBXvkhVQNAmzQLqwz1zCuero5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm2; t= 1688986096; x=1689072496; bh=w6ICekzr9KYZl8W9GIefXJYjQf4JFQn5qnN fJewCe0o=; b=ZkHAMHcbMSh1Cq9/wENzdf6XnZDO3hN+tF0dL4gCNTP63yq1kI7 ouBrcHvC7ga3zHOd0hwKM9+vlgEpZ3EqXtBKXskKqQEiF+5FPhZ+OyQZdXeLmhUR 2wt99SbCrVFp3hgR4FL02QNladiiOJzCnzctSx/DhxSNu9LHJpa86na5gZw7Zq+S sDebcPreC98DKlvOWyKoHyKD9qd3m6y+HlCseY9wyi51oLx8J/8R4PKygkID2UqQ MiC28xYtLxbENXTQK9fC7+xUSnGmaFpyh8JeB7gfeVFjWhiErmlSdV/QmNO/P+1Q I9ZVwrlrM1z4fjAOQfAfKwvWssXcYWJFN/w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrvdekgddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudektdfg jeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 093AE1700089; Mon, 10 Jul 2023 06:48:15 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-531-gfdfa13a06d-fm-20230703.001-gfdfa13a0 Mime-Version: 1.0 Message-Id: <09094baf-dadf-4bce-9f63-f2a1f255f9a8@app.fastmail.com> In-Reply-To: <0f771b11539d5a3871691af901315ee2034b577c.camel@physik.fu-berlin.de> References: <20230706154520.11257-1-bhe@redhat.com> <20230706154520.11257-12-bhe@redhat.com> <0f771b11539d5a3871691af901315ee2034b577c.camel@physik.fu-berlin.de> Date: Mon, 10 Jul 2023 12:47:52 +0200 From: "Arnd Bergmann" To: "John Paul Adrian Glaubitz" , "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" Subject: Re: [PATCH v8 11/19] sh: add including Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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, Jul 10, 2023, at 10:45, John Paul Adrian Glaubitz wrote: > On Mon, 2023-07-10 at 10:17 +0200, Geert Uytterhoeven wrote: >> Thanks for your patch, which is now commit edad4470b45298ba ("sh: >> add including") in next-20230710. >>=20 >> This break dreamcast_defconfig: >>=20 >> CC arch/sh/kernel/asm-offsets.s >> In file included from ./arch/sh/include/asm/io.h:290, >> ./include/asm-generic/io.h:636:15: error: redefinition of =E2=80=98in= b_p=E2=80=99 >> 636 | #define inb_p inb_p >> | ^~~~~ >> > index f7938fe0f911..5ba4116b4265 100644 >> > --- a/arch/sh/include/asm/io_noioport.h >> > +++ b/arch/sh/include/asm/io_noioport.h >> > @@ -53,6 +53,13 @@ static inline void ioport_unmap(void __iomem *ad= dr) >> > #define outw_p(x, addr) outw((x), (addr)) >> > #define outl_p(x, addr) outl((x), (addr)) >> >=20 >> > +#define insb insb >> > +#define insw insw >> > +#define insl insl >> > +#define outsb outsb >> > +#define outsw outsw >> > +#define outsl outsl 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) =20 #endif =20 +#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 =20 #define IO_SPACE_LIMIT 0xffffffff =20 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(); } =20 -#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 co= unt) { BUG(); 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'm not happy though that this patch is in linux-next without being Ac= ked 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. 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.=20 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. Arnd