Received: by 10.192.165.148 with SMTP id m20csp733111imm; Fri, 4 May 2018 05:40:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqms5BkiQPTWalyBOgsaCSCM46Un6r/uOAIgPe8la6NPe9B3qbyjO+kP/mLuUZnrAAnjTGP X-Received: by 10.98.98.194 with SMTP id w185mr20856357pfb.78.1525437640851; Fri, 04 May 2018 05:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525437640; cv=none; d=google.com; s=arc-20160816; b=ftfqVy5Od1TXXUJ9eBoIDt2Y+veirGVKm5f7rxFfFiXYEQT9GGOdW6mecLxMdhJUiY w+LFlyfahSkRmQQYDmlZ9Qg5qcX8+SHwcuE8ETd3vUrAWkITEtoDEahDzapIpcp5hEYY rXrRkPxKy+W0vkfAuFw8544hlRAST/IFArxSrMPjM5D7h7KfLpEvXY1NQNj0+eQR1Hrn A5Axo2T42G6Lqxv7AfzN4moGe3waJLfxOmRzAaJL0hFXUnkC4maCL5hYChe/mXnIR2ib pPmqKIl0XRKedAGTT5h9IidzB2osfBaG7tVeghre6d2p6VKSMm/YCVs02ctuSuSbQXk3 rn+Q== 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 :arc-authentication-results; bh=fQdWDyDXFjcmuJ36+jiWIhDwtRhNxQNYtHYwygOG4uQ=; b=ovatvRNSD0haXoXfHm+5pUGIKd4jrbo1UqX9zEekZUw2p8HbrecHqphg6LXuG3pcQ8 LfXzDQSQYPIP3zEHWFXco9pLTxEiG2NH+GxRHmI19Vpzf2jC/ofdbeuJHwEkpletrS12 LAHK19yXHDnjxIBFDbvT3qjkSXKTQFgbRwfZ0+ks9fDdHv8igcFKG1B1lOcg6MUn1/LI Ou+tQSKmnGfVnmnaRiveGtMUXUfWR4wU5tuHtFXZCNzlu+qi+FFGapRItXQgn+oaKqFr +c9CyAwY9u95jUz3keewExUvKfIX/4Wwh+dgLnyUPlLBrXTqVUOW9aZiu7oSliqqFtb/ ZvHA== ARC-Authentication-Results: i=1; mx.google.com; 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 r74si15943411pfe.168.2018.05.04.05.40.26; Fri, 04 May 2018 05:40:40 -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; 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 S1751403AbeEDMdx (ORCPT + 99 others); Fri, 4 May 2018 08:33:53 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:41870 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbeEDMdw (ORCPT ); Fri, 4 May 2018 08:33:52 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 40crzH1sDlz9ttqs; Fri, 4 May 2018 14:33:47 +0200 (CEST) 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 B9CkH9_HAXo2; Fri, 4 May 2018 14:33:47 +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 40crzH1Gdjz9ttC1; Fri, 4 May 2018 14:33:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 020818B975; Fri, 4 May 2018 14:33:51 +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 8W6LFL9OA119; Fri, 4 May 2018 14:33:50 +0200 (CEST) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CCEB48B972; Fri, 4 May 2018 14:33:50 +0200 (CEST) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 8EE116CF2D; Fri, 4 May 2018 14:33:50 +0200 (CEST) Message-Id: From: Christophe Leroy Subject: [PATCH 00/17] Implement use of HW assistance on TLB table walk on 8xx To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , aneesh.kumar@linux.vnet.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 4 May 2018 14:33:50 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purpose of this serie is to implement hardware assistance for TLB table walk on the 8xx. First part is to make L1 entries and L2 entries independant. For that, we need to alter ioremap functions in order to handle GUARD attribute at the PGD/PMD level. Last part is to try and reuse PTE fragment implemented on PPC64 in order to not waste 16k Pages for page tables as only 4k are used. For the time being, it doesn't work, but I include it in the serie anyway in order to get feedback. Tested successfully on 8xx up to the one before the last. Didn't have time to do compilation test on other configs, I send it anyway before leaving for one week vacation in order to get feedback. Christophe Leroy (17): powerpc/nohash: remove hash related code from nohash headers. powerpc/nohash: remove _PAGE_BUSY powerpc/nohash: use IS_ENABLED() to simplify __set_pte_at() Revert "powerpc/8xx: Use L1 entry APG to handle _PAGE_ACCESSED for CONFIG_SWAP" powerpc: move io mapping functions into ioremap.c powerpc: common ioremap functions. powerpc: make ioremap_bot common to PPC32 and PPC64 powerpc: make __iounmap() common to PPC32 and PPC64 powerpc: make __ioremap_caller() common to PPC32 and PPC64 powerpc: use _ALIGN macro powerpc/nohash32: set GUARDED attribute in the PMD directly powerpc/8xx: Remove PTE_ATOMIC_UPDATES powerpc/mm: Use hardware assistance in TLB handlers on the 8xx powerpc/8xx: reunify TLB handler routines powerpc/8xx: Free up SPRN_SPRG_SCRATCH2 powerpc/mm: Make pte_fragment_alloc() common to PPC32 and PPC64 powerpc/mm: Use pte_fragment_alloc() on 8xx (Not Working yet) arch/powerpc/include/asm/book3s/32/pgtable.h | 16 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 + arch/powerpc/include/asm/hugetlb.h | 4 +- arch/powerpc/include/asm/machdep.h | 2 +- arch/powerpc/include/asm/mmu-8xx.h | 38 +-- arch/powerpc/include/asm/mmu_context.h | 28 +++ arch/powerpc/include/asm/nohash/32/pgalloc.h | 39 ++- arch/powerpc/include/asm/nohash/32/pgtable.h | 88 +++---- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 6 +- arch/powerpc/include/asm/nohash/64/pgtable.h | 26 +- arch/powerpc/include/asm/nohash/pgtable.h | 61 ++--- arch/powerpc/include/asm/nohash/pte-book3e.h | 6 - arch/powerpc/include/asm/pgtable-types.h | 4 + arch/powerpc/kernel/head_8xx.S | 350 ++++++++++----------------- arch/powerpc/mm/8xx_mmu.c | 12 +- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/dma-noncoherent.c | 2 +- arch/powerpc/mm/dump_linuxpagetables.c | 32 ++- arch/powerpc/mm/hugetlbpage.c | 12 + arch/powerpc/mm/init_32.c | 6 +- arch/powerpc/mm/ioremap.c | 250 +++++++++++++++++++ arch/powerpc/mm/mem.c | 16 +- arch/powerpc/mm/mmu_context_book3s64.c | 28 --- arch/powerpc/mm/mmu_context_nohash.c | 4 + arch/powerpc/mm/pgtable.c | 75 ++++++ arch/powerpc/mm/pgtable_32.c | 167 +++---------- arch/powerpc/mm/pgtable_64.c | 244 ------------------- arch/powerpc/platforms/Kconfig.cputype | 9 + 28 files changed, 730 insertions(+), 799 deletions(-) create mode 100644 arch/powerpc/mm/ioremap.c -- 2.13.3