Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3185318ybb; Mon, 30 Mar 2020 23:26:02 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtd2I7KI6as/5/rhX0bR3aLj0oJcRSBJvUrBFP6GABp/uFr+yfwIUfEWjZOe7i1q8RgmBDw X-Received: by 2002:aca:f591:: with SMTP id t139mr1017731oih.153.1585635961892; Mon, 30 Mar 2020 23:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585635961; cv=none; d=google.com; s=arc-20160816; b=DEAkOE0ZziwxYNEnEca/EdzKNtUwnqDLZAnH0RE0kVk2aD7LPEUwiWxz20crsbjqos lOQ88PSxUyaEh6Fnx4zVI+H++nJMROE/Jphm61OWx+tb7O8iLQ6eSo90koGI0DvLhrkV QB8/znNweWS/01HFSdFRw00qb/NieE0Nzx6vKSRSdlhdIXWIO0Ow9gapwOyK2Ev3ozO3 amaJygu+Xr4c/z2ewZ0LrZP0NerBmxExCF05X9UqWyJidIBIWXMn6f30Op0C0GAUi/Qe mqQIuanpYmjM8j6+4kpT3c9sYqOirnwO0uhrh+MsZqKQt5mq7IICiGkqAL27noJnpje3 JdiA== 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:dkim-signature; bh=8dgIh7fRtGyYIN9w8nAk5rbhZBf0YZZiQ6G2a+dxRQo=; b=j4kp6mTRVfAAjCqBVMHsl/3qiPvSUWDN7FecDefJfxp9FD2Zw0dakUacm4g82Qbk9d 2/5nHWxanpws0yHNvYS0CL6RivX8HlvTePENcoTPJsgSZbCGK/JvEYQBYzcHPmlYZkgh kiZ2lXgZ/WG/4304b9O2RWUbf9h4/uvr4qKqHuVI9A8Ru2qCx4sZmCs2LC8A4hrAv49r mbjwCSJT1M7ASGZCKxEBDSCTv42zu1JuNYFx1UjG8F6R7MWQxzgn0aiM45p64wB+C7rp eXQCgX5nzLnWL6agYaiAqOhxRQJDA4HdZOUyvp8OPiLTRFtZWGn+SHv9+CfBjBV41AdY 3lLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=fiQyu9Lg; 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 94si7082993otb.114.2020.03.30.23.25.49; Mon, 30 Mar 2020 23:26:01 -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=fiQyu9Lg; 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 S1730047AbgCaGZG (ORCPT + 99 others); Tue, 31 Mar 2020 02:25:06 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:55139 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbgCaGYw (ORCPT ); Tue, 31 Mar 2020 02:24:52 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48rzns0Tdvz9v0KL; Tue, 31 Mar 2020 08:24:49 +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=fiQyu9Lg; 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 f0xEd0TD0Jvh; Tue, 31 Mar 2020 08:24:49 +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 48rznr6T6xz9v0KC; Tue, 31 Mar 2020 08:24:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1585635888; bh=8dgIh7fRtGyYIN9w8nAk5rbhZBf0YZZiQ6G2a+dxRQo=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=fiQyu9LgWVevoYe/KH3HMqAzB7EOAUgtgPgiP2Hl2bwhOso2PanYskhGe77Ngi/Gg H5hwnPGZ+k/gLOV1Ij6hugVSG8dDgFvbqpMqKsfnmC9QwjEGTt7QNFdAy9ADpQs+Ez P5+/88jtyEvD2aGBulgaBqTNph2bZ1J00m1ur6/U= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C1E628B784; Tue, 31 Mar 2020 08:24:49 +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 ec39iXvv1NJY; Tue, 31 Mar 2020 08:24:49 +0200 (CEST) Received: from pc16570vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7A3548B752; Tue, 31 Mar 2020 08:24:49 +0200 (CEST) Received: by pc16570vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 7AC1165673; Tue, 31 Mar 2020 06:24:49 +0000 (UTC) Message-Id: In-Reply-To: <40899eb1b8f10da3706acd06c3d46d2418c8886e.1585635837.git.christophe.leroy@c-s.fr> References: <40899eb1b8f10da3706acd06c3d46d2418c8886e.1585635837.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH 09/10] powerpc/pgtable: Drop PTE_ATOMIC_UPDATES To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 31 Mar 2020 06:24:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 40x was the last user of PTE_ATOMIC_UPDATES. Drop everything related to PTE_ATOMIC_UPDATES. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 30 -------------------- arch/powerpc/include/asm/nohash/64/pgtable.h | 27 ------------------ 2 files changed, 57 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h index 719bf09db1a6..d253ce035f72 100644 --- a/arch/powerpc/include/asm/nohash/32/pgtable.h +++ b/arch/powerpc/include/asm/nohash/32/pgtable.h @@ -224,19 +224,6 @@ static inline unsigned long pte_update(pte_t *p, unsigned long clr, unsigned long set) { -#ifdef PTE_ATOMIC_UPDATES - unsigned long old, tmp; - - __asm__ __volatile__("\ -1: lwarx %0,0,%3\n\ - andc %1,%0,%4\n\ - or %1,%1,%5\n" -" stwcx. %1,0,%3\n\ - bne- 1b" - : "=&r" (old), "=&r" (tmp), "=m" (*p) - : "r" (p), "r" (clr), "r" (set), "m" (*p) - : "cc" ); -#else /* PTE_ATOMIC_UPDATES */ unsigned long old = pte_val(*p); unsigned long new = (old & ~clr) | set; @@ -245,7 +232,6 @@ static inline unsigned long pte_update(pte_t *p, #else *p = __pte(new); #endif -#endif /* !PTE_ATOMIC_UPDATES */ #ifdef CONFIG_44x if ((old & _PAGE_USER) && (old & _PAGE_EXEC)) @@ -258,24 +244,8 @@ static inline unsigned long long pte_update(pte_t *p, unsigned long clr, unsigned long set) { -#ifdef PTE_ATOMIC_UPDATES - unsigned long long old; - unsigned long tmp; - - __asm__ __volatile__("\ -1: lwarx %L0,0,%4\n\ - lwzx %0,0,%3\n\ - andc %1,%L0,%5\n\ - or %1,%1,%6\n" -" stwcx. %1,0,%4\n\ - bne- 1b" - : "=&r" (old), "=&r" (tmp), "=m" (*p) - : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) - : "cc" ); -#else /* PTE_ATOMIC_UPDATES */ unsigned long long old = pte_val(*p); *p = __pte((old & ~(unsigned long long)clr) | set); -#endif /* !PTE_ATOMIC_UPDATES */ #ifdef CONFIG_44x if ((old & _PAGE_USER) && (old & _PAGE_EXEC)) diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h index 9a33b8bd842d..3cacace9bfa0 100644 --- a/arch/powerpc/include/asm/nohash/64/pgtable.h +++ b/arch/powerpc/include/asm/nohash/64/pgtable.h @@ -211,22 +211,8 @@ static inline unsigned long pte_update(struct mm_struct *mm, unsigned long set, int huge) { -#ifdef PTE_ATOMIC_UPDATES - unsigned long old, tmp; - - __asm__ __volatile__( - "1: ldarx %0,0,%3 # pte_update\n\ - andc %1,%0,%4 \n\ - or %1,%1,%6\n\ - stdcx. %1,0,%3 \n\ - bne- 1b" - : "=&r" (old), "=&r" (tmp), "=m" (*ptep) - : "r" (ptep), "r" (clr), "m" (*ptep), "r" (set) - : "cc" ); -#else unsigned long old = pte_val(*ptep); *ptep = __pte((old & ~clr) | set); -#endif /* huge pages use the old page table lock */ if (!huge) assert_pte_locked(mm, addr); @@ -310,21 +296,8 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma, unsigned long bits = pte_val(entry) & (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); -#ifdef PTE_ATOMIC_UPDATES - unsigned long old, tmp; - - __asm__ __volatile__( - "1: ldarx %0,0,%4\n\ - or %0,%3,%0\n\ - stdcx. %0,0,%4\n\ - bne- 1b" - :"=&r" (old), "=&r" (tmp), "=m" (*ptep) - :"r" (bits), "r" (ptep), "m" (*ptep) - :"cc"); -#else unsigned long old = pte_val(*ptep); *ptep = __pte(old | bits); -#endif flush_tlb_page(vma, address); } -- 2.25.0