From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFCC5C6379F for ; Tue, 21 Feb 2023 11:49:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34A0D6B0075; Tue, 21 Feb 2023 06:49:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F98C6B0078; Tue, 21 Feb 2023 06:49:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C11F6B007B; Tue, 21 Feb 2023 06:49:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 0D61C6B0075 for ; Tue, 21 Feb 2023 06:49:13 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A12F3A02F2 for ; Tue, 21 Feb 2023 11:49:12 +0000 (UTC) X-FDA: 80491128144.09.F4C0A2C Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf14.hostedemail.com (Postfix) with ESMTP id BD156100021 for ; Tue, 21 Feb 2023 11:49:10 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="Dfn4gny/"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676980150; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lQY8us4jogeZT2v9O2ixwk253cOCKZ2II1S+4Vrvqn8=; b=E8Phx3Dwqbd9RExbOgc2whAWcK3QsMTOrHDE0UOdPlsvyJbahD3oDMJUR8JWCOQbPmTCzT qfxUfJyE4DYtOSq70u4uriXaZqmlMuUuw9PF56R+VjcihoILbpDKbVbfbYthle4fhHLTrG e0Ib8llJjVQT6sHlEFHuY1z4UXud81M= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="Dfn4gny/"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676980150; a=rsa-sha256; cv=none; b=R4+gnlr+WbaoYvlJV+eeVi//AXkl3fN56EjYcxw+5r49KmMxIxz/LyZ6jh+qMkNBcWe5LH rjJNvnwKJrPOW8JjwOCDyyEPxg9Ug8+sL8Q3gFk3tCJSSnFF/rECtR5oI/o8cJY+7qHjHq bzUwiIIvtAzLAvcoEbAepWLhryfgXXQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676980150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQY8us4jogeZT2v9O2ixwk253cOCKZ2II1S+4Vrvqn8=; b=Dfn4gny/N1w59v5qCKoh8XmS2p3UaLTGBF/KAMiD0YhAjY0XQuvFnJQAux+IumawwxHPRZ ohyWApMlzAly3/OrmOqBWzAeaq7qjQF2jGBsRuFjg5c1ItgCJADK1Vo5c3TkKLWhTFN/QB UVLi8b3yAhHttwEWBFjWY5bjBOpW+k0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-638-yOHMpki1Ova29bUuoQP46A-1; Tue, 21 Feb 2023 06:49:03 -0500 X-MC-Unique: yOHMpki1Ova29bUuoQP46A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8F1653848C29; Tue, 21 Feb 2023 11:49:02 +0000 (UTC) Received: from localhost (ovpn-13-7.pek2.redhat.com [10.72.13.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C9FF840C1423; Tue, 21 Feb 2023 11:49:01 +0000 (UTC) Date: Tue, 21 Feb 2023 19:48:57 +0800 From: Baoquan He To: Niklas Schnelle Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, christophe.leroy@csgroup.eu, hch@infradead.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, David.Laight@aculab.com, shorne@gmail.com, arnd@arndb.de, Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org Subject: Re: [PATCH v4 09/16] s390: mm: Convert to GENERIC_IOREMAP Message-ID: References: <20230216123419.461016-1-bhe@redhat.com> <20230216123419.461016-10-bhe@redhat.com> <9bb1154b07dc21e5d3dda8cc5238c5385f32c2e0.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9bb1154b07dc21e5d3dda8cc5238c5385f32c2e0.camel@linux.ibm.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: BD156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ADF1jeMlBCRMxgBmUhETAGubbdy0mVRJ5FwpjdTKaHpi3QG1U5F+wRCFEgpKEFzdx7GPmhN2sbRXzW91G6kqWbVTpcEPAl60r0cQJInWealeNWoaRcq1ilx1pHdGQB31HLcmvezJRHv73BBBJz4xscamSpbo0GV5/SBV9uVU/JYTPCVifZR8F+AcRynkcN2EJ6NcReucVcN3K+aKI40msVSU4cLJPFjYAfyLrmM9H+KkjvsPX2Dmo8wDrLTPnDJjlsDdSH0SoNFAap/4MaRpcO6vBqhLD09c0+jfjBF/wq2SbNJefgef0YTTSo93EnOfHk+JyXjsb0guQ5ZRFNjuGWvZmR4godGPAQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 02/16/23 at 05:21pm, Niklas Schnelle wrote: > On Thu, 2023-02-16 at 20:34 +0800, Baoquan He wrote: > > By taking GENERIC_IOREMAP method, the generic generic_ioremap_prot(), > > generic_iounmap(), and their generic wrapper ioremap_prot(), ioremap() > > and iounmap() are all visible and available to arch. Arch needs to > > provide wrapper functions to override the generic versions if there's > > arch specific handling in its ioremap_prot(), ioremap() or iounmap(). > > This change will simplify implementation by removing duplicated codes > > with generic_ioremap_prot() and generic_iounmap(), and has the equivalent > > functioality as before. > > > > Here, add wrapper functions ioremap_prot() and iounmap() for s390's > > special operation when ioremap() and iounmap(). > > > > Signed-off-by: Baoquan He > > Cc: Niklas Schnelle > > Cc: Gerald Schaefer > > Cc: Heiko Carstens > > Cc: Vasily Gorbik > > Cc: Alexander Gordeev > > Cc: Christian Borntraeger > > Cc: Sven Schnelle > > Cc: linux-s390@vger.kernel.org > > --- > > arch/s390/Kconfig | 1 + > > arch/s390/include/asm/io.h | 21 ++++++++------ > > arch/s390/pci/pci.c | 57 +++++++------------------------------- > > 3 files changed, 23 insertions(+), 56 deletions(-) > > Thanks for the patch. This is a very clear improvement for us! I tested > this series with s390 systems with and without the PCI memory-I/O (MIO) > support and everything works as expected. > > One thing I did stumble upon but which is independent from this patch > is that I think memremap(…, MEMREMAP_WB) on system RAM outside the > direct map is broken for us. At least on systems without PCI memory-I/O > support. I think with this series it would be much easier to fix > though. Basically I think we would have to define arch_memremap_wb() to > generic_ioremap_prot(…, PAGE_KERNEL) and then have iounmap() check > is_ioremap_addr() to see if it is an actual mapping or an address > cookie. But again this is independent of this patch which doesn't > change the behavior in this area. OK, I can check this after this patchset done. > > So feel free to add my: > > Reviewed-by: Niklas Schnelle > Tested-by: Niklas Schnelle Thanks a lot, will add these when repost.