Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp1083163rwa; Sun, 21 Aug 2022 00:06:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR7tYqIcDIY6ZaDPhYJs/ZQHYnIZY2HV0p2oNz8ZQhyfT2x/CWJR6TN+ScoF/FAJlNt7Sjqh X-Received: by 2002:a05:6402:360d:b0:445:bd16:803b with SMTP id el13-20020a056402360d00b00445bd16803bmr11684644edb.318.1661065613317; Sun, 21 Aug 2022 00:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661065613; cv=none; d=google.com; s=arc-20160816; b=vQZ/AuF/yLcMDzSXby4bYMWjYtrK97UAoJncYhOmJ22ctPjH5IZuQm7ybdrGcCT8RE TuAL9w0cR7rU8hVSyghRowOfFeW+hpc+Q3HvFm9+1o9L8xPphv6k99NITkbpG48D5vCU OBD4dLie7b5orziaIuyYc27adfLh62qsOH7avH9KvOBjAVcaqOb0XmX3d0bbpy2MZyZn QEFc5WYIE30JhBgB1xXCQcTzSsIVsL0uPXvwwrddYPNrDX7OoGbz2NueU0SAxalcPOxa kzL0WCUBJgagFNsHk2Gz9oV8b6H4igwsC48sZSv9xu+wQjy1+qOcGnTdvtqgLAiRFTQo dJcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0a6VDXeUDWqpyW5dOeUR66fpQ0IrNu3SkYDJZLhUFfo=; b=MIdug9OCvMIoBG3oSLnsJ6e5sf74/E5sfeWlTaOcaB+ZCPkVqov1ah4YToaYkllCC0 ds9ZXOoI7N54I7nSSuLCY7glqT5POJ6369rd7/JpbyIKq+kyXIjEe3zO5q5m9XffdzT4 Lh/IFhRpVhX25cwYQPsKgjefN6Oy1+g7unl1KV/xXpxAGzE3pzQcM/6WrcbX5qaG8Nt5 3Wqdm43wZmIszbJREz+Wyp+bHTS6mMSEIj1qYmY9otDHVgAvD0zUdMcVvqtn1Ksml7kw jbrmCJem/ODsos4WEC2kENzh8FX7FlWZY+M0VdvmUlcGn1/wQwgA6aZb34JaZvF6jPLg 7iIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=XRGOGR1t; 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 hr4-20020a1709073f8400b007309621c10fsi7734434ejc.699.2022.08.21.00.06.26; Sun, 21 Aug 2022 00:06:53 -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=@infradead.org header.s=bombadil.20210309 header.b=XRGOGR1t; 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 S229776AbiHUHD6 (ORCPT + 99 others); Sun, 21 Aug 2022 03:03:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230192AbiHUHDj (ORCPT ); Sun, 21 Aug 2022 03:03:39 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8341B140E4 for ; Sun, 21 Aug 2022 00:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0a6VDXeUDWqpyW5dOeUR66fpQ0IrNu3SkYDJZLhUFfo=; b=XRGOGR1tWbxOf4fDsEL+NOAGv1 YjukYmQI6hJ3+/xQ/UEv5zWKUjB9onx+ZXXuobJMOVCAhg1TKxSuxD7X0GLQPqIUVDp2t5bNsZLG0 kA7EdGMiJ3pWzT13YzsWSieLDBa2jyFuSMo5qVs9ZEm+nz7Mac8vJfa3dMg/+xduqLN4OLAMl68ne bsc4Xxio8PO6AE4SWwqg2IYMO0TTgS1RzZeQOrebGail+VtL+xYP482C30r9Jte01uIOix7tY/48i VKleSSJTRjUQZr1ugne+x2bWv2UI2MdqXLShtcUAyvKcv009mQ1Q97rFA5vshUwH8T5T1coO1gVBl DOkTIMYA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPezf-00760D-Cc; Sun, 21 Aug 2022 07:03:35 +0000 Date: Sun, 21 Aug 2022 00:03:35 -0700 From: Christoph Hellwig To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, hch@infradead.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org, Jonas Bonn , Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org Subject: Re: [PATCH v2 07/11] openrisc: mm: Convert to GENERIC_IOREMAP Message-ID: References: <20220820003125.353570-1-bhe@redhat.com> <20220820003125.353570-8-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220820003125.353570-8-bhe@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE,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 > + if (unlikely(!mem_init_done)) { > if ((fixmaps_used + (size >> PAGE_SHIFT)) > FIX_N_IOREMAPS) > + return IOMEM_ERR_PTR(ret); > v = fix_to_virt(FIX_IOREMAP_BEGIN + fixmaps_used); > fixmaps_used += (size >> PAGE_SHIFT); > > + if (ioremap_page_range(v, v + size, p, __pgprot(*prot_val))) { > fixmaps_used -= (size >> PAGE_SHIFT); > + return IOMEM_ERR_PTR(ret); > + } > + > + return (void __iomem *)(offset + (char *)v); > } This code needs to go away, and all very early boot uses of ioremap need to switch to use early_ioremap insted.