Received: by 10.192.165.148 with SMTP id m20csp2461613imm; Sun, 22 Apr 2018 07:31:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx49yiM395mECmY65S/dlXcjcmRT312dkftFJ07Eer+hKEdMwLbh9XlfUd8bPGoz9fPi3UwWg X-Received: by 2002:a17:902:b786:: with SMTP id e6-v6mr18140931pls.246.1524407517045; Sun, 22 Apr 2018 07:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524407517; cv=none; d=google.com; s=arc-20160816; b=US1Y5vQXaULOklwNmxrQ3uYhgsEs8+zJmu4HCdBTddRNGKOHeibVj5VaSYcMaY4rSh mfiLZO96u6SacYRzMlaPmj7+xg+MQ9bB9ApR7o0HOuxyQw0yOIuekynZ2edQODlVYdzr c5ptINTlkZoSEpKi0OEy4D68OsNlMNesvheO4Anoh3EmNRK++9DnxmBwXknxbY2Mgje5 Aof7Zm41YLneCSrjGrRGksqNP1Ylg39DrgUREIOAgUO3fkxPt1pLGEZcFfsLjWJ6AhYO PQogT9HAPao42ngnU253BGBAM2xtzYllRmUvv47pBIyBX7NBCsBsUD4K3Y0zkOEE/VuC dV/w== 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=yrGaBNdCqMvhhnQY11f2fuOM85E56wZkGXrW/v1/pno=; b=G141pVEB/8tu9x65wPwVJ2dCmZIzkqZQuTMtJ4LLSFldjUJhLPpmCot2joBfFdWOwk mJ3LU2hSHgguoCLz6f3X7Q4YJyAQ1ld28dphT16lDTxRIZFbeZ3gK9bxfQF0D1ne4LcU 3trLSA2k2O9ipy4OJo5jg2BFNMheolkW4msAJQgNOQv3XutCn9ET4q0THFmVi93Qi6SV Jgw++CUxg0ZvX2zHywnqrfzn6G6wMq/HMliKxasNV30gwXTwFLwkID5q4p8Rbpoe1jmq Ql6m8DB4he2C2nJ2wZLrYH7OamQxZL2x5B7gHeZVIigCZjrBqcB1KPMS/0wvt5A72Tou 5LtA== 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 v12-v6si10268917plo.29.2018.04.22.07.31.19; Sun, 22 Apr 2018 07:31:57 -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 S932660AbeDVO3m (ORCPT + 99 others); Sun, 22 Apr 2018 10:29:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60716 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757476AbeDVOUv (ORCPT ); Sun, 22 Apr 2018 10:20:51 -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 5644ECB8; Sun, 22 Apr 2018 14:20:50 +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 3.18 20/52] powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently Date: Sun, 22 Apr 2018 15:53:53 +0200 Message-Id: <20180422135316.202528017@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135315.254787616@linuxfoundation.org> References: <20180422135315.254787616@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 3.18-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 @@ -39,7 +39,8 @@ #ifdef CONFIG_SMP -#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,