Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp824584imm; Thu, 5 Jul 2018 09:29:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdvpqHa1Q5emmkPtSkIEnLUbxePFkOWOkdJC7+JYo2sjCHr6C85p0IcqjExzgosd/pR2A6Z X-Received: by 2002:a62:4cd3:: with SMTP id e80-v6mr1086137pfj.234.1530808155781; Thu, 05 Jul 2018 09:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530808155; cv=none; d=google.com; s=arc-20160816; b=j6U/GjIEIQxSVpJgjR4lIx9KEU2b/iVoxLfbNDwiI5gJa1/to+8j8QdnSImy1RLIrO 2BTX+GfGzAOzUNDFDtbxC7mEmNadlItOPxry44v1ZAfdlMM+LCn4IwGH/PjbzrOpj6NX VjSk/wxjLgR6hB3XKim2vKyHwgaN3IIEdOECIyNyg/EXeiZ174PNbAIu3ytuLaQb/Qka u6joLKJWo7EpmwESJwbk2baWiXtamMuGPo3Hms9/pfriZOscqdecbNOSaTKP3Wa2dDD3 IuJK9GYxgnjpOzh6hQku2V3XjgehdUma0V+YqKQRtZStUzx+SxVD4sjBsyBUkQIzIlQ8 NmBA== 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:references :in-reply-to:message-id:arc-authentication-results; bh=c8Lwf3tmX1qlEz1n9LLZbl5L7h1GzWtowCBd2YjELKE=; b=R/LnOkvnnY66yJab17oWWKrx2b4M1jhJ7foZIed57K3+g3AqZStSudkLH4z/WZs85J bmATJYst+Z8MtJS0prlJQlQ8R859RSqZHDB8SLziyzzwpu508PbqWRc9eVnnkIqc3hCn PG12uL+YYPH8WGnAMf/VLUxCaAu1vVeJOGT8E6v27SMAxs9lRimPXeJlHRB9teuZGbvY gVxnOC3rI0BS9MWwYCC+e07bUGexUZcb9kaeHv3VWYD1miuuzUqx3RnWSnE8pMB7HqID rrhUAmFrsh3LfjSL54AuEhV7j4zraRuiX69R0uzj9NMjV6Tv2wgfV0Iv6M7f/bNx3eWm m8TQ== 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 y89-v6si6540088pfd.47.2018.07.05.09.29.02; Thu, 05 Jul 2018 09:29:15 -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 S1754319AbeGEQ0W (ORCPT + 99 others); Thu, 5 Jul 2018 12:26:22 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:62928 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753992AbeGEQZh (ORCPT ); Thu, 5 Jul 2018 12:25:37 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 41M39f0pNHz9ttrD; Thu, 5 Jul 2018 18:25:10 +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 z_VMHRpwUSUl; Thu, 5 Jul 2018 18:25:10 +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 41M39f0LPmz9ttr5; Thu, 5 Jul 2018 18:25:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D8CA08B8CF; Thu, 5 Jul 2018 18:25:11 +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 lJ2xkJo6RhJM; Thu, 5 Jul 2018 18:25:11 +0200 (CEST) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.4]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BB3A28B8BC; Thu, 5 Jul 2018 18:25:11 +0200 (CEST) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 97076711E2; Thu, 5 Jul 2018 16:25:11 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v3 11/16] powerpc/nohash: fix hash related comments in pgtable.h To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 5 Jul 2018 16:25:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 4 ---- arch/powerpc/include/asm/nohash/64/pgtable.h | 18 ++++-------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h index 79805e0dad27..a507a65b0866 100644 --- a/arch/powerpc/include/asm/nohash/32/pgtable.h +++ b/arch/powerpc/include/asm/nohash/32/pgtable.h @@ -223,10 +223,6 @@ static inline unsigned long long pte_update(pte_t *p, } #endif /* CONFIG_PTE_64BIT */ -/* - * 2.6 calls this without flushing the TLB entry; this is wrong - * for our hash-based implementation, we fix that up here. - */ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG static inline int __ptep_test_and_clear_young(unsigned int context, unsigned long addr, pte_t *ptep) { diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h index fe05b3e03cf1..7cd6809f4d33 100644 --- a/arch/powerpc/include/asm/nohash/64/pgtable.h +++ b/arch/powerpc/include/asm/nohash/64/pgtable.h @@ -3,7 +3,7 @@ #define _ASM_POWERPC_NOHASH_64_PGTABLE_H /* * This file contains the functions and defines necessary to modify and use - * the ppc64 hashed page table. + * the ppc64 non-hashed page table. */ #include @@ -38,7 +38,7 @@ /* * The vmalloc space starts at the beginning of that region, and - * occupies half of it on hash CPUs and a quarter of it on Book3E + * occupies a quarter of it on Book3E * (we keep a quarter for the virtual memmap) */ #define VMALLOC_START KERN_VIRT_START @@ -78,7 +78,7 @@ /* * Defines the address of the vmemap area, in its own region on - * hash table CPUs and after the vmalloc space on Book3E + * after the vmalloc space on Book3E */ #define VMEMMAP_BASE VMALLOC_END #define VMEMMAP_END KERN_IO_START @@ -248,14 +248,6 @@ static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, pte_update(mm, addr, ptep, _PAGE_RW, 0, 1); } -/* - * We currently remove entries from the hashtable regardless of whether - * the entry was young or dirty. The generic routines only flush if the - * entry was young or dirty which is not good enough. - * - * We should be more intelligent about this but for the moment we override - * these functions and force a tlb flush unconditionally - */ #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH #define ptep_clear_flush_young(__vma, __address, __ptep) \ ({ \ @@ -279,9 +271,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, } -/* Set the dirty and/or accessed bits atomically in a linux PTE, this - * function doesn't need to flush the hash entry - */ +/* Set the dirty and/or accessed bits atomically in a linux PTE */ static inline void __ptep_set_access_flags(struct vm_area_struct *vma, pte_t *ptep, pte_t entry, unsigned long address, -- 2.13.3