From patchwork Tue Jun 26 09:42:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 10488541 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27D6E601A0 for ; Tue, 26 Jun 2018 09:50:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B9F428787 for ; Tue, 26 Jun 2018 09:50:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0048628856; Tue, 26 Jun 2018 09:50:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 86CA128787 for ; Tue, 26 Jun 2018 09:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=q3xma1CBBu7OcNkMo+f0Scf6LZ9wDCvnPesNcPejGPc=; b=sXZ NtPMYCWmn7fBnLU2JcvbU/iyB/K4nSiHe4iYdzkQNqaPQ9Gc+b6PdzjIOhV/0YTenk1qxG/MOnHVp 0eaq5gGfqGkHFY2paIclBqKSDOfuIcvQLuOk90L9uIIm+gWPJqHf68pzrpm30wHZJgkJQ6ndZIoio 42ED2cMrJy+W2dBDDUcgrq5TJ4HKQLhQJXeIYizXFhZ/D59LcI6JtGoxjlfx9UfWBTw62PMsFn2oT k1nW2H8rw+WnA8JJuopyzpycKo0Z1M7n1NCbQsplx3RV1s9gg1eBJYG1I261EU1+sNwDK4TtmiepF KZmJ9K/tt7+kjgauvsrt9GdD6GmeugQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXkcN-0003Z5-IZ; Tue, 26 Jun 2018 09:50:35 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXkcL-0002bZ-8E for linux-arm-kernel@bombadil.infradead.org; Tue, 26 Jun 2018 09:50:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5fpGGglY7rDk9W6N/H0XzSeQ4CWwyYLzqJRoi0J9JoE=; b=ljPHnCwL0Hg5CKj5SsIVGS/AV 4obPbEdCOxWGFiiX/qQIP3plhcqaQU5fgQTzkzD5jvlwAssG856YEXIsAjhR7Tw9+Xw3I7KElhqjx Mgkx4y2anLw4Da+iHBIoGLgM09BCq6GzgsTJ/5jf17Cg50DPGhaNlKN21i0pBgoQR+uGlppcsghFE zpvg3aV/RAfyOEHaFGplsvCWLIh3N+C5PV6oaT+a0nO6e6zRi4DDjom3NlrVvL1t9o2GzQeXomata YcHkwsIafYR5mc9vFcDMelkcBwlNBGEZTlz0A9eBSvOKFTJpP7mqXKbxE1vbs3eQ7smJlht4ctBC8 2v7qlPJxw==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXkTo-0004Qd-Jl for linux-arm-kernel@lists.infradead.org; Tue, 26 Jun 2018 09:41:48 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BCC437A9; Tue, 26 Jun 2018 02:41:33 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8E2E93F5C0; Tue, 26 Jun 2018 02:41:33 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 230F61AE2E48; Tue, 26 Jun 2018 10:42:11 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] arm: Hook up SYNC_CORE functionality for sys_membarrier() Date: Tue, 26 Jun 2018 10:42:10 +0100 Message-Id: <1530006130-18048-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180626_104144_779828_9DFE0001 X-CRM114-Status: UNSURE ( 9.78 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Desnoyers , Orion Hodson , Will Deacon MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Exception return implies context synchronization, so we can hook up the SYNC_CORE option to sys_membarrier() simply by selecting the Kconfig option, just like we've done for arm64 already. Cc: Mathieu Desnoyers Cc: Orion Hodson Signed-off-by: Will Deacon Acked-by: Mathieu Desnoyers --- v1 -> v2: Update arch-support.txt .../features/sched/membarrier-sync-core/arch-support.txt | 8 ++++---- arch/arm/Kconfig | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/features/sched/membarrier-sync-core/arch-support.txt b/Documentation/features/sched/membarrier-sync-core/arch-support.txt index dbdf62907703..c7858dd1ea8f 100644 --- a/Documentation/features/sched/membarrier-sync-core/arch-support.txt +++ b/Documentation/features/sched/membarrier-sync-core/arch-support.txt @@ -5,10 +5,10 @@ # # Architecture requirements # -# * arm64 +# * arm/arm64 # -# Rely on eret context synchronization when returning from IPI handler, and -# when returning to user-space. +# Rely on implicit context synchronization as a result of exception return +# when returning from IPI handler, and when returning to user-space. # # * x86 # @@ -31,7 +31,7 @@ ----------------------- | alpha: | TODO | | arc: | TODO | - | arm: | TODO | + | arm: | ok | | arm64: | ok | | c6x: | TODO | | h8300: | TODO | diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 54eeb8d00bc6..b0ac18547370 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -9,6 +9,7 @@ config ARM select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_KCOV + select ARCH_HAS_MEMBARRIER_SYNC_CORE select ARCH_HAS_PTE_SPECIAL if ARM_LPAE select ARCH_HAS_PHYS_TO_DMA select ARCH_HAS_SET_MEMORY