Received: by 10.192.165.148 with SMTP id m20csp2538772imm; Sun, 22 Apr 2018 09:07:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx49PhwS+RfXuA4yY242BaM82JDU+AgtsLSkAcfYQlX6s+7cNnGTS9Xj6y41xAZudzIpB5jvp X-Received: by 10.101.99.132 with SMTP id h4mr14629988pgv.153.1524413257894; Sun, 22 Apr 2018 09:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524413257; cv=none; d=google.com; s=arc-20160816; b=FsttqOxnwUq/dRlKCapCwpodxQei91oVt1FD1b0T1yRasOkrCEZyFI6FPbVXVXScIs BHzkSkqU09jifxKa5Xf1TDbJ2//M85avUVSaMbPduYKBMh55YYkWn84rFSYJ06DV7AsG YZ3hzZmZec/fNblfZFXFiCb1GPXSPwR8DcEymcNVSZxnHod/f5vD4UE5KlmKlBR9xJGp 2ZlxmUio40yi6GOtZuq+srpI0/Hde9qNoOxsbAFPR72a+ROmiTPY7PBHWKqQSuHneCmF ep7eRmc7DyApeU2QL2H+M8YzHXI/V0qhLAiU1p5F0u3RRp0BKy2qVLf1A0R6rv+ELETB z7jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=QwyF3ewVRaa+jeW1fDfAXPRRvGtRpQF9o8IBzszL85c=; b=j25PtJ3UgwHRf28xsTGmHAVru/kWi7Gp68maDkJsTDgjGejvaiCj4pNTjIXKmyBet1 0W+dHpRSO2Bwm2ZZcbeMxDtj/kKhSD4LYnZW+Tkq2rCwPqct0/4L+YlfgNRUykPN8m55 6/ZSxfuvvgtetK1CgeftQOqkQcm0+/FqsAWhHiG8pkFhO18yt5TPE9Q/Yd1xQm0gosRt YPORnrgGa3Ic+TV7C9c+qK6oafeQWDcG2aCZdlR2e9ugiUntd3GIo33E3o4jXQaPKX44 yK83RWEe3LvM/kEDXOxM/LM9PZeCMobQI/OksXrWXuYRpjwFzIQPJddp4doo7M9CUTIP 1Ifw== 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 h185si9628827pfe.169.2018.04.22.09.07.20; Sun, 22 Apr 2018 09:07:37 -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 S1754000AbeDVQGW (ORCPT + 99 others); Sun, 22 Apr 2018 12:06:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45598 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbeDVN5M (ORCPT ); Sun, 22 Apr 2018 09:57:12 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D480AC64; Sun, 22 Apr 2018 13:57:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Piggin , Michael Ellerman Subject: [PATCH 4.16 064/196] powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently Date: Sun, 22 Apr 2018 15:51:24 +0200 Message-Id: <20180422135107.564389226@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nicholas Piggin commit 0bfdf598900fd62869659f360d3387ed80eb71cf upstream. asm/barrier.h is not always included after asm/synch.h, which meant it was missing __SUBARCH_HAS_LWSYNC, so in some files smp_wmb() would be eieio when it should be lwsync. kernel/time/hrtimer.c is one case. __SUBARCH_HAS_LWSYNC is only used in one place, so just fold it in to where it's used. Previously with my small simulator config, 377 instances of eieio in the tree. After this patch there are 55. Fixes: 46d075be585e ("powerpc: Optimise smp_wmb") Cc: stable@vger.kernel.org # v2.6.29+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/include/asm/barrier.h | 3 ++- arch/powerpc/include/asm/synch.h | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) --- a/arch/powerpc/include/asm/barrier.h +++ b/arch/powerpc/include/asm/barrier.h @@ -35,7 +35,8 @@ #define rmb() __asm__ __volatile__ ("sync" : : : "memory") #define wmb() __asm__ __volatile__ ("sync" : : : "memory") -#ifdef __SUBARCH_HAS_LWSYNC +/* The sub-arch has lwsync */ +#if defined(__powerpc64__) || defined(CONFIG_PPC_E500MC) # define SMPWMB LWSYNC #else # define SMPWMB eieio --- a/arch/powerpc/include/asm/synch.h +++ b/arch/powerpc/include/asm/synch.h @@ -6,10 +6,6 @@ #include #include -#if defined(__powerpc64__) || defined(CONFIG_PPC_E500MC) -#define __SUBARCH_HAS_LWSYNC -#endif - #ifndef __ASSEMBLY__ extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup; extern void do_lwsync_fixups(unsigned long value, void *fixup_start,