Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4107560ybl; Tue, 20 Aug 2019 07:08:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCz+KzTlDZbSULqrGwDr8TqAY2lOPTctUmra2quR+JkSSWYoV855pTUcVTUog052IlCmvp X-Received: by 2002:a17:902:7c10:: with SMTP id x16mr21292445pll.31.1566310105965; Tue, 20 Aug 2019 07:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566310105; cv=none; d=google.com; s=arc-20160816; b=u+yxevBfZTnpH1kGb5cPwgJ4RVx/2xzhcxuzTjclDyechog/5bulD18m0v48KJfS33 G3AGdNf90eKEhMcjxyldPgPVLsUjy81QgfbRGhVefJrrIVs27VmamHBHoEhj82uiWAPd FpKPzaLdozHoNMZ/rKcGu98N6anSD0JQHXiOin9Fy3hNAe/3Hfedy7eURPF5Cozp5lLA 65NaWMsQwo8CDEELQSSqkwrbvkNzOtz0ApD7Wwnjpf0mr/zgSyvz0eO2WVhJ4rcJpEMX bTCg7TRuIQNU3Z9xHgjC/jtdwUT4UbpyPb0pRRoINTs8c812g1Hd82xkSmtDKMbSqZeF xfDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=c4WuXaiy+O/7ygfEz9bDe2ljT2i9s9DO0RcjXIG8wTE=; b=y7sYytuR8irkcTi9RULsIqEm1Pt3dasCWRdzLDwtT950ntOTYK4jTinDImJRoTa0/6 XJDTsqyaAozrXMTX33IvkdkbXZpd99fyivQkncwk+TLdPQGDT0YH4D5GxR/gHva3o7O6 3BIC58kVo1q24msE9Oj/s/mwLTELXYob4tT0x+q/bO3gtiFzeLSm1tCB0682rJwwEWsa 8ZCx1EUJvol/rddhT6V27worzgA/D5GV87CmJ1XZ3WF/oguxSN/6G5O+A4XEqbW7yG5c lJtNS0yLVL00k4pt1bEtf9iASgrnOrKc/XykIVAnPiiNWvVINNVABm+RGAIiogAx/E82 qZ8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=tKdSo6X6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 200si4700675pfu.152.2019.08.20.07.08.02; Tue, 20 Aug 2019 07:08:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=tKdSo6X6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730030AbfHTOHL (ORCPT + 99 others); Tue, 20 Aug 2019 10:07:11 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:39036 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728248AbfHTOHK (ORCPT ); Tue, 20 Aug 2019 10:07:10 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46CXfh3C4sz9v0Gb; Tue, 20 Aug 2019 16:07:08 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=tKdSo6X6; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id e7Fkv2cRjIdr; Tue, 20 Aug 2019 16:07:08 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 46CXfh26N8z9v0GZ; Tue, 20 Aug 2019 16:07:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1566310028; bh=c4WuXaiy+O/7ygfEz9bDe2ljT2i9s9DO0RcjXIG8wTE=; h=From:Subject:To:Cc:Date:From; b=tKdSo6X6yn/V8jh+fv8E374U5J+/MfK3JMFpYVI4DOfpXR4AoMYS78nqWl1sBIN30 zDEHUEkHBLT+U2xNEziKvJy7jEq5boP2VfF7RpDWfRCQHgINMs36OUhXuiGYX19spO Q8Md0Hv56n/t5O2pNhJOQl7MTmfSymJyp9jWKIpM= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A95948B7D0; Tue, 20 Aug 2019 16:07:08 +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 HlwSrXBYzFH5; Tue, 20 Aug 2019 16:07:08 +0200 (CEST) Received: from pc16032vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 671B08B7C9; Tue, 20 Aug 2019 16:07:08 +0200 (CEST) Received: by pc16032vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 277A56B734; Tue, 20 Aug 2019 14:07:08 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH v2 00/12] powerpc/mm: cleanup and refactoring in ioremap To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , npiggin@gmail.com, hch@lst.de Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 20 Aug 2019 14:07:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purpose of this series is to cleanup and refactor ioremap. At the time being, ioremap is duplicated in PPC32 and PPC64. In addition, some additional duplication also appear within PPC64. First part of this series drops as much as unused functions. Then io-workaround is reworked to avoid indirect function call. Then common parts of PPC32 and PPC64 are regrouped into a new file called ioremap.c Then other parts linked to ioremap are respectively moved out of pgtable_32/64.c The last part of the series tries to refactor ioremap_range() and make use of ioremap_page_range() for all, then separates the early path from the regular ioremap. A future follow-up of this series will be to try and eliminate the early ioremap part and use the generic early_ioremap instead. v2: - dropped the change of ioremap_bot growing direction for PPC64 and kept separate __ioremap_caller() and friends. - separating more clearly early_ioremap() from regular ioremap() - addressed received comments. Christophe Leroy (12): powerpc: remove the ppc44x ocm.c file powerpc/ps3: replace __ioremap() by ioremap_prot() powerpc/mm: drop ppc_md.iounmap() and __iounmap() powerpc/mm: drop function __ioremap() powerpc/mm: rework io-workaround invocation. powerpc/mm: move common 32/64 bits ioremap functions into ioremap.c powerpc/mm: move ioremap_prot() into ioremap.c powerpc/mm: make ioremap_bot common to all powerpc/mm: Move ioremap functions out of pgtable_32/64.c powerpc/mm: refactor ioremap_range() and use ioremap_page_range() powerpc/mm: refactor ioremap vm area setup. powerpc/mm: split out early ioremap path. arch/powerpc/configs/ppc40x_defconfig | 1 - arch/powerpc/include/asm/book3s/32/pgtable.h | 6 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +- arch/powerpc/include/asm/book3s/64/radix.h | 3 - arch/powerpc/include/asm/io-workarounds.h | 20 ++ arch/powerpc/include/asm/io.h | 16 +- arch/powerpc/include/asm/machdep.h | 4 - arch/powerpc/include/asm/nohash/32/pgtable.h | 6 +- arch/powerpc/include/asm/nohash/64/pgtable.h | 1 + arch/powerpc/include/asm/pgtable.h | 2 + arch/powerpc/include/asm/ppc4xx_ocm.h | 31 --- arch/powerpc/kernel/io-workarounds.c | 13 +- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/book3s64/pgtable.c | 21 -- arch/powerpc/mm/book3s64/radix_pgtable.c | 20 -- arch/powerpc/mm/ioremap.c | 99 +++++++ arch/powerpc/mm/ioremap_32.c | 92 +++++++ arch/powerpc/mm/ioremap_64.c | 113 ++++++++ arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/mm/nohash/tlb.c | 2 + arch/powerpc/mm/pgtable_32.c | 153 ----------- arch/powerpc/mm/pgtable_64.c | 203 +------------- arch/powerpc/platforms/44x/Kconfig | 8 - arch/powerpc/platforms/4xx/Makefile | 1 - arch/powerpc/platforms/4xx/ocm.c | 390 --------------------------- arch/powerpc/platforms/ps3/spu.c | 10 +- 26 files changed, 353 insertions(+), 867 deletions(-) delete mode 100644 arch/powerpc/include/asm/ppc4xx_ocm.h create mode 100644 arch/powerpc/mm/ioremap.c create mode 100644 arch/powerpc/mm/ioremap_32.c create mode 100644 arch/powerpc/mm/ioremap_64.c delete mode 100644 arch/powerpc/platforms/4xx/ocm.c -- 2.13.3