From patchwork Wed Oct 12 10:09:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 13004929 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 18075C433FE for ; Wed, 12 Oct 2022 10:10:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 925716B0071; Wed, 12 Oct 2022 06:10:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D4CF900002; Wed, 12 Oct 2022 06:10:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 79CEC6B0074; Wed, 12 Oct 2022 06:10:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 68A206B0071 for ; Wed, 12 Oct 2022 06:10:09 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 2A8C4AB929 for ; Wed, 12 Oct 2022 10:10:09 +0000 (UTC) X-FDA: 80011876938.10.76BE8CB Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf13.hostedemail.com (Postfix) with ESMTP id 5C57820022 for ; Wed, 12 Oct 2022 10:10:06 +0000 (UTC) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4MnT0s0w21z9smn; Wed, 12 Oct 2022 12:10:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GbtNKkzFQGBY; Wed, 12 Oct 2022 12:10:05 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4MnT0r72dfz9smC; Wed, 12 Oct 2022 12:10:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DA9368B770; Wed, 12 Oct 2022 12:10:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id lM_RYFeq6Elz; Wed, 12 Oct 2022 12:10:04 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.232.127]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9B03D8B76C; Wed, 12 Oct 2022 12:10:04 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 29CA9oZU1165765 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 12:09:50 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 29CA9mL71165760; Wed, 12 Oct 2022 12:09:48 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Baoquan He Cc: Christophe Leroy , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, akpm@linux-foundation.org, hch@infradead.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, schnelle@linux.ibm.com, David.Laight@ACULAB.COM, shorne@gmail.com Subject: [RFC PATCH 0/8] mm: ioremap: Convert architectures to take GENERIC_IOREMAP way (Alternative) Date: Wed, 12 Oct 2022 12:09:36 +0200 Message-Id: X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1665569381; l=1985; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=qbQ5kiECI3xAGYRd2tHO6GsSKBbKenBkBtxcE+svX30=; b=j91j73TEntd2i4rb6Z5GxHS2S/s4t3KOUF5BfEWDBhSV8rZQmS7XmJGvVQALTIK44dOT9K0XRGDF u59gxZ6KAI6EwAGY8jSZ7DgdUAOBOAv8zgTDp4VNKLQ6RbPZyXab X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf13.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665569407; a=rsa-sha256; cv=none; b=2W9XDELamMezDWoBjJjy7d2lSTX4F6U5Vo4NzIGb1jFSNbHKO9i3jdBz5VA2vokXdkyMlx cK3Cs/oUWbRDFtnKUtLEnH7/XVVUPqpQ389I+KrX6n6/Hlky3kz1vPQNM9u5CcIiq46Vuo wxr429MKPFArjAPPqxMMKmZ8ldMgN9s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665569407; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=uV3de8tfLB5io0Pc4RGCso6wjSea6d3Hjh2RPOWfx7U=; b=OZLsRn9HAmRaqgHy6EpHGu9fA9eN+/aaIuoM5z96FnYzvux9iTN09QtLZL7ynHAJlVjWzm V5oAtsImS2IjKfUPYVSoB3eC4AMmmS6nInVCjgXvrBrvR+gkg3xUPKyFOyxdQtrfpmimjR lX4+imWFg+tyvNLGCEUReBT7JL5Zawg= X-Rspamd-Server: rspam05 X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf13.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu X-Stat-Signature: xjzrfk1dx5fdcfmi94w849zq8gyo5skd X-Rspamd-Queue-Id: 5C57820022 X-HE-Tag: 1665569406-736148 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: From: As proposed in the discussion related to your series, here comes an exemple of how it could be. I have taken it into ARC and IA64 architectures as an exemple. This is untested, even not compiled, it is just to illustrated my meaning in the discussion. I also added a patch for powerpc architecture, that one in tested with both pmac32_defconfig and ppc64_le_defconfig. From my point of view, this different approach provide less churn and less intellectual disturbance than the way you do it. Open for discussion. Baoquan He (5): hexagon: mm: Convert to GENERIC_IOREMAP openrisc: mm: remove unneeded early ioremap code mm: ioremap: allow ARCH to have its own ioremap definition arc: mm: Convert to GENERIC_IOREMAP ia64: mm: Convert to GENERIC_IOREMAP Christophe Leroy (3): mm/ioremap: Define generic_ioremap_prot() and generic_iounmap() mm/ioremap: Consider IOREMAP space in generic ioremap powerpc: mm: Convert to GENERIC_IOREMAP arch/arc/Kconfig | 1 + arch/arc/include/asm/io.h | 7 +++--- arch/arc/mm/ioremap.c | 46 +++-------------------------------- arch/hexagon/Kconfig | 1 + arch/hexagon/include/asm/io.h | 9 +++++-- arch/hexagon/mm/ioremap.c | 44 --------------------------------- arch/ia64/Kconfig | 1 + arch/ia64/include/asm/io.h | 11 ++++++--- arch/ia64/mm/ioremap.c | 45 ++++++---------------------------- arch/openrisc/mm/ioremap.c | 22 ++++------------- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/io.h | 11 ++++++--- arch/powerpc/mm/ioremap.c | 26 +------------------- arch/powerpc/mm/ioremap_32.c | 25 ++++++++----------- arch/powerpc/mm/ioremap_64.c | 22 +++++++---------- include/asm-generic/io.h | 7 ++++++ mm/ioremap.c | 33 +++++++++++++++++++------ 17 files changed, 98 insertions(+), 214 deletions(-) delete mode 100644 arch/hexagon/mm/ioremap.c