Received: by 10.192.165.148 with SMTP id m20csp2467304imm; Sun, 22 Apr 2018 07:39:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/3b/0VScz5O7E72dy1xxYuIjpmvctAXxLTyPk7Q521sBatAFGgFU/LSuP+JWOlfkBs8FFI X-Received: by 2002:a17:902:57d8:: with SMTP id g24-v6mr17811957plj.337.1524407940467; Sun, 22 Apr 2018 07:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524407940; cv=none; d=google.com; s=arc-20160816; b=QoLz2FSijW7UgBh9Bdqfc2Ez+Ym2HhwVFve6NnXs4sW3eqRIBXCY2jMb9Yk+CgWg07 UbnwQNsEDiPffK+7p2SjD3GVdf/RHN0oZU6rYSpAnkGK6mlDHqhOOfKtdNxgWJ7jkPcE yb5+HMf/FIR6wbua2iOZefr+7OSid+JQaPzDPZ2EVKjEDII5Bu2rLCW1I4lgfhHo+TxU FzVBM6Es1k1c5eAtmdjE+24xhp7Avi7ZLKKJwah3qkEaBIdm22n0QxQmc1U9x4wY32hk X+GhzZQq0m7keQhIWlDSmocIE+im5ZjBWv8baVc1bdw3uA6TjWmBk1v1lmU6ZxWSJ4TM YL0w== 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=J9XwCNV0nUgeO4et8QU0JGO0kiD+z107b/OlwIxorbA=; b=NPg/Wt38FhGr+/5atM+3PSNuI9YqXYPdjE9E7ypENT20JrxUij2716pnHCOlFc0ODD aUNnoVqUBFI0/AlHt06tKjNuSGYiX61fQnZgUn6SfHnvDDWkMti1lUdVWRmU1zCVz1Ox xkEGFAU9nNCq2ydsV5kRYDlOig4KMHn3nDAzgvc/jUktWakVwl5dPM7e9tknfdqaW3b1 RSZU77Qsqv5GFUzSBM1fxWmb7JEqMWCz5933+gmdiS6ltCLIIUsQakYoWEkuhvQtTL7L qdKcbv6nZTf3e5m7CaI9eDeXv6dG1/Tiyf2VI7mgPWD62pQDNDGmYJ01cl3mS4SAjvao lS/g== 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 c7si8279854pgn.152.2018.04.22.07.38.45; Sun, 22 Apr 2018 07:39:00 -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 S932468AbeDVOSo (ORCPT + 99 others); Sun, 22 Apr 2018 10:18:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59008 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932293AbeDVOSd (ORCPT ); Sun, 22 Apr 2018 10:18:33 -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 F29A7D0B; Sun, 22 Apr 2018 14:18:32 +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.4 41/97] powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently Date: Sun, 22 Apr 2018 15:53:19 +0200 Message-Id: <20180422135307.618429646@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@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.4-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 @@ -36,7 +36,8 @@ #define smp_store_mb(var, value) do { WRITE_ONCE(var, value); mb(); } while (0) -#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 @@ -5,10 +5,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,