Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2493873ybd; Mon, 24 Jun 2019 07:23:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxK/okNfUIXaPGVaR5cSVuT4RJvzBTff1vncTxBu03cYSlr6o3hi5shNP/a9D2PCmtXA1hE X-Received: by 2002:a17:90a:35e6:: with SMTP id r93mr25440666pjb.20.1561386207704; Mon, 24 Jun 2019 07:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561386207; cv=none; d=google.com; s=arc-20160816; b=hDUOZqxkNsIuLQ5vVY9y2XPyNhqdUXVfSoW6XhNJ35WgySrckef6VYbydN3T+2xChX 1G1DFP8dlgMDgnh4ofy+CsuhGBZhiFiHfk/+GZEggtmhf0lES+2pytNU2xLWdw7slIzu oVK8Rr6Pgwh3FdZj3FTNBcAC+EHhRmYn3lguX/Ky8VRMbzxSNab7X5PFaye4Hb9A8pZ3 8rFuyxlMmkDnSB1WJx0XCZyzHRANE9uwm8glqVIt/ZaU0xpCKb7DmC+b9UXjtxGt+vMF 9vz34L3bM+G3zp2qu5Dh0G0EuJDtocazpZq8a97/odUTxWV1Ftf5MLKZ/AAjNBz6/5tS yuEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lGLKEj0axjOe79h7FB4qYJY8Jc1mr44NsZXcBd2Ulso=; b=ZBUcRmW4yagC4ygNPtIffjrQLUjFETwGfbDGh/sCtubWmfklk/hietD/FUxcTFfVA+ JcaG62v8LQXpZiuQhkI6Zxf5gHfUm9ygAEV6MwGJUzjucf10TR8dv3QKBZTlf5Grrx97 eayZCk++2Ecy4CU9j4/j+ngq+QndOqoc2vVRCkN51mY4fQY5RjH2o2g80R3j6X0QR89c UUout1nAX/tSN4KA8REYWaqDJHSwfa0mq0ltNo67S00BTxRbBWvBn3ts/Z5EGZ44pA9J UHB58RucY5i1jKcTpqFEU2OB/cB6xcUa3QC2L/UwT31fDmmhcJsxKjLLYbsvbyLj5V1k E36g== 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 135si10122123pgb.357.2019.06.24.07.23.11; Mon, 24 Jun 2019 07:23:27 -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 S1731753AbfFXOAZ (ORCPT + 99 others); Mon, 24 Jun 2019 10:00:25 -0400 Received: from foss.arm.com ([217.140.110.172]:51272 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbfFXOAZ (ORCPT ); Mon, 24 Jun 2019 10:00:25 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 051CD344; Mon, 24 Jun 2019 07:00:24 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 70E373F71E; Mon, 24 Jun 2019 07:00:21 -0700 (PDT) Date: Mon, 24 Jun 2019 15:00:19 +0100 From: Catalin Marinas To: Vincenzo Frascino Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-kselftest@vger.kernel.org, Will Deacon , Arnd Bergmann , Russell King , Ralf Baechle , Paul Burton , Daniel Lezcano , Thomas Gleixner , Mark Salyzyn , Peter Collingbourne , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com>, Rasmus Villemoes , Huw Davies , Shijith Thotton , Andre Przywara Subject: Re: [PATCH v7 10/25] arm64: compat: Add vDSO Message-ID: <20190624140018.GD29120@arrakis.emea.arm.com> References: <20190621095252.32307-1-vincenzo.frascino@arm.com> <20190621095252.32307-11-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190621095252.32307-11-vincenzo.frascino@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 10:52:37AM +0100, Vincenzo Frascino wrote: > --- /dev/null > +++ b/arch/arm64/include/asm/vdso/compat_barrier.h > @@ -0,0 +1,51 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (C) 2018 ARM Limited > + */ > +#ifndef __COMPAT_BARRIER_H > +#define __COMPAT_BARRIER_H > + > +#ifndef __ASSEMBLY__ > +/* > + * Warning: This code is meant to be used with > + * ENABLE_COMPAT_VDSO only. > + */ > +#ifndef ENABLE_COMPAT_VDSO > +#error This header is meant to be used with ENABLE_COMPAT_VDSO only > +#endif > + > +#ifdef dmb > +#undef dmb > +#endif > + > +#if __LINUX_ARM_ARCH__ >= 7 > +#define dmb(option) __asm__ __volatile__ ("dmb " #option : : : "memory") > +#elif __LINUX_ARM_ARCH__ == 6 > +#define dmb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ > + : : "r" (0) : "memory") > +#else > +#define dmb(x) __asm__ __volatile__ ("" : : : "memory") > +#endif We don't need pre-ARMv7 barriers (they've been deprecated and the arm64 kernel actually traps and emulates them by default). Also your Makefile changes never define a __LINUX_ARM_ARCH__ lower than 7. Fix-up below: ------8<----------------------- From 5655a0313ce7bb731bfed6a19bcfe6b1100b542a Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 24 Jun 2019 12:16:06 +0100 Subject: [PATCH] arm64: compat: No need for pre-ARMv7 barriers on an ARMv8 system This patch removes the deprecated (pre-ARMv7) compat barriers as they would not be used on an ARMv8 system. Fixes: a7f71a2c8903 ("arm64: compat: Add vDSO") Signed-off-by: Catalin Marinas --- arch/arm64/include/asm/vdso/compat_barrier.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch/arm64/include/asm/vdso/compat_barrier.h b/arch/arm64/include/asm/vdso/compat_barrier.h index ea24ea856b07..fb60a88b5ed4 100644 --- a/arch/arm64/include/asm/vdso/compat_barrier.h +++ b/arch/arm64/include/asm/vdso/compat_barrier.h @@ -18,14 +18,7 @@ #undef dmb #endif -#if __LINUX_ARM_ARCH__ >= 7 #define dmb(option) __asm__ __volatile__ ("dmb " #option : : : "memory") -#elif __LINUX_ARM_ARCH__ == 6 -#define dmb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ - : : "r" (0) : "memory") -#else -#define dmb(x) __asm__ __volatile__ ("" : : : "memory") -#endif #if __LINUX_ARM_ARCH__ >= 8 #define aarch32_smp_mb() dmb(ish)