From patchwork Tue Oct 12 23:46:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 12554067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B35F6C433EF for ; Tue, 12 Oct 2021 23:48:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8423360E74 for ; Tue, 12 Oct 2021 23:48:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8423360E74 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=9S1/gy6gLc/4sR66X3mQuJZz0scdvnH+xL6cB7BKckE=; b=cyW2/AyTPbPCwtM2W+EQZk56MH dC80+mW6VbsoDavHORcIMAlOaWwUmQKCQ8o9L9EOnHjk2LY1beOWak6D7nWdP7+QV9vuLwsqKFKj6 u4fcpJrrx+K1+Xp9mB6T0j2w0kpjv2y6tH2vsYj+b43ZK5A3qptkizF7j9Ntioa5yv4ItQU9MYFKo fN7MXZ0+5fVmn2pPwTKq84RqMPBmyZFiH+7swfVnHvzWBznkp5BH2W4wgRaBq4HbUlJ7kGmgl3waT jsULcrZ3mtjAOvfgM5yLtBCxYpvv28tE0ki6dhYWBAVYquh96kXDkulXGKELBtkvaJUx3xdIHYHeu JHUChYqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1maRTu-00ECXJ-Tj; Tue, 12 Oct 2021 23:46:51 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1maRTe-00ECT1-GE for linux-arm-kernel@lists.infradead.org; Tue, 12 Oct 2021 23:46:35 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id x16-20020a25b910000000b005b6b7f2f91cso1273906ybj.1 for ; Tue, 12 Oct 2021 16:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=453jnyDh5+St7IVUodDCbgLxZ13MiKlNZ2J3hqUdcvM=; b=GiQnyCyCbpwY9yiy0ekI90qBi524flhldE7LmLeUFKKWm8lctHKu1bsmytldY+TUxY WMA98mLcf0kJRjamikFx99dWxHiXdDQLUsWaBbPirwJP5+eAXKVU6FDo57sKENYlyzdO 31bd6OFulXpLt3bpfK93NK4yL0spwCACKTB+vrKQ7GCPXzLILOSFqFt9AeYBJ3ciZwlv YXwZM2deyztIXu8I1fxaflF94jcNJufrpRf4U9azIBZ2hfFutsdTt1NAvQ48d9Dg3wcF sT+Wl1DFt+Wlq7oF10x8A5XCORu2v+sT0dd7XEmbKggavRr1+GKEW5K5OKOGZYlPpuhb 7kNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=453jnyDh5+St7IVUodDCbgLxZ13MiKlNZ2J3hqUdcvM=; b=MpeHy3JL95uBg9EKteB6SOKU18W5RnYpOqpYoFxdoYgYasBKUyJ9XyOf4bfB+6mWFQ 3EJhOcmMOrw5ksHwu8HNRBUyeW3/G/5ertPUFuSrhKO/6GtNV73RaPOrpFiokclRogsX OZh6lClYylmaFoSAsIFWR3y9Rjtd/RVwntZgSMYBTL+ArufdWyQ9/uoPO3XGXaVs9KW5 D2PccvpHHLvappHWwQquvrZpK1TsiOLwXsti3QKzjQAP/i1mh8zJi1UASQ0jndA9WopQ Pg69k/dOcJ3kGM3qWJg2TD6QJLmTOomVAESw08MMxa89MI9Or7thyOu64USvbGm2jQJ6 iTGA== X-Gm-Message-State: AOAM530eYdMs2rOdJ5RGuHpQaCpUQTQIuFNc7VTY30XBW2P1B17+FjSa kdPp5rThpn3IIKIqmVGQQqyATr+AI9YgRv2KctE= X-Google-Smtp-Source: ABdhPJzDpvjNkv+aSz66oQo+gO0Q3iFyt0KqnBrqcpv1ZIS3EYj2e1x+fBZ2NNF1cqaK6s2XL2w7RMeIIcdjpCl0gRg= X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:9b44:962:5897:17c0]) (user=ndesaulniers job=sendgmr) by 2002:a25:5ed6:: with SMTP id s205mr34338891ybb.31.1634082392753; Tue, 12 Oct 2021 16:46:32 -0700 (PDT) Date: Tue, 12 Oct 2021 16:46:04 -0700 In-Reply-To: <20211012234606.91717-1-ndesaulniers@google.com> Message-Id: <20211012234606.91717-2-ndesaulniers@google.com> Mime-Version: 1.0 References: <20211012234606.91717-1-ndesaulniers@google.com> X-Developer-Key: i=ndesaulniers@google.com; a=ed25519; pk=lvO/pmg+aaCb6dPhyGC1GyOCvPueDrrc8Zeso5CaGKE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1634082366; l=2752; s=20211004; h=from:subject; bh=F9HRxccJOmwhcZZiuHrzsbCihhzYYcSweRituqKRuSc=; b=eZ+y9VuclQWGHxZZCUU0M238NP4YS16hxLmrZFuG4syjxneIbvLJ1p9XCrFVIvsJox33KLDaEcmw cJtLdaZODfd7SymUzuS2rZgM0tbdGiSw/dZCb+obsqKfSgQzt0Es X-Mailer: git-send-email 2.33.0.882.g93a45727a2-goog Subject: [PATCH 1/3] arm64: vdso32: drop the test for dmb ishld From: Nick Desaulniers To: Catalin Marinas , Will Deacon Cc: llvm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vincenzo Frascino , Nick Desaulniers , Christian Biesinger , Simon Marchi X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211012_164634_566159_373579DB X-CRM114-Status: GOOD ( 13.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Binutils added support for this instruction in commit e797f7e0b2bedc9328d4a9a0ebc63ca7a2dbbebc which shipped in 2.34 (just missing the 2.33 release) but was cherry-picked into 2.33 in commit 27a50d6755bae906bc73b4ec1a8b448467f0bea1. Thanks to Christian and Simon for helping me with the patch archaeology. According to Documentation/process/changes.rst, the minimum supported version of binutils is 2.33. Since all supported versions of GAS support this instruction, drop the assembler invocation, preprocessor flags/guards, and the cross assembler macro that's now unused. This also avoids a recursive self reference in a follow up cleanup patch. Cc: Christian Biesinger Cc: Simon Marchi Signed-off-by: Nick Desaulniers --- arch/arm64/include/asm/vdso/compat_barrier.h | 2 +- arch/arm64/kernel/vdso32/Makefile | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm64/include/asm/vdso/compat_barrier.h b/arch/arm64/include/asm/vdso/compat_barrier.h index 3fd8fd6d8fc2..fb60a88b5ed4 100644 --- a/arch/arm64/include/asm/vdso/compat_barrier.h +++ b/arch/arm64/include/asm/vdso/compat_barrier.h @@ -20,7 +20,7 @@ #define dmb(option) __asm__ __volatile__ ("dmb " #option : : : "memory") -#if __LINUX_ARM_ARCH__ >= 8 && defined(CONFIG_AS_DMB_ISHLD) +#if __LINUX_ARM_ARCH__ >= 8 #define aarch32_smp_mb() dmb(ish) #define aarch32_smp_rmb() dmb(ishld) #define aarch32_smp_wmb() dmb(ishst) diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 3dba0c4f8f42..89299a26638b 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -29,8 +29,6 @@ cc32-option = $(call try-run,\ $(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) cc32-disable-warning = $(call try-run,\ $(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) -cc32-as-instr = $(call try-run,\ - printf "%b\n" "$(1)" | $(CC_COMPAT) $(VDSO_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) # We cannot use the global flags to compile the vDSO files, the main reason # being that the 32-bit compiler may be older than the main (64-bit) compiler @@ -113,12 +111,6 @@ endif VDSO_AFLAGS := $(VDSO_CAFLAGS) VDSO_AFLAGS += -D__ASSEMBLY__ -# Check for binutils support for dmb ishld -dmbinstr := $(call cc32-as-instr,dmb ishld,-DCONFIG_AS_DMB_ISHLD=1) - -VDSO_CFLAGS += $(dmbinstr) -VDSO_AFLAGS += $(dmbinstr) - # From arm vDSO Makefile VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1 VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096