Received: by 10.192.165.148 with SMTP id m20csp2446502imm; Sun, 22 Apr 2018 07:14:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx48oegrPdFVkWkpsgm2kV/hict/kSHDsz+Hs6XiKXGz8Zw8Zoq+eAB0rcs8VaV8hB5y8QHpr X-Received: by 10.98.69.26 with SMTP id s26mr16735706pfa.29.1524406496942; Sun, 22 Apr 2018 07:14:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524406496; cv=none; d=google.com; s=arc-20160816; b=yDpOZ5ta/vTCQQsr00CRmHgCOIe/ojq5vl0JfOTSkWUGUQlf1qZPGK6FhsotuzXxJy eJY2eY7D9M8D7eJwB4QkigrVaBUF/GDpYxem5MuykTUBaDgaS5Wn1P179U6GZYcKVYBL XJ+mApSoIJGC9JUr7FD/hokIC+49r9QFsdSLba48pGkKUKIoVzyWQfsh2N6D04eGvvVw AxPpy5oG4w3TTVAgjFar41KscZYlxBltfi7RS+V7lSy6HgUanS0vOedKE3cW+aUBHxY6 1W74ZngaiBe33iD1/K/Slkqk4eQHJGDd1eUvAHfN9Nwq6g6CVzXs6DZ014+Iklk8/4sU MFZQ== 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=D+4Ifjgw4oxW7jAkaTC9ojofva/Jq0tHleAX7iO0EIA=; b=DfUNI1US2+MiRqJZeTMDqKMV6uXxsLvr5pFTqCAoc6VuBA2MEs7vwLYsjsMO9Rh+GV bggbPFUcvhXcUUw0zYyTOxGkabI1/saTaFxwv50Uuq42DsCa2el/3KA38zSfLNk8b8PG 86Dm3TzyAFKciQQJqtOl9IBsZocrTZ3Nj8BG7syuuAwHcOIIF+3MIsDUlIJo8oK+b2Hv sa/6rm7vGsOFxa/hIRuSZK143y4q8NusfSChY9lRxjS/fEevl1OtPczydrCaFIckNG5p CbcV6REXtfr76e0hzdtrkKuHUWqtpDrkJ2it279QYShyjPmTzasCaesNLfuC/5p9nxQR wv1g== 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 b60-v6si10314975plc.270.2018.04.22.07.14.42; Sun, 22 Apr 2018 07:14:56 -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 S1756881AbeDVONh (ORCPT + 99 others); Sun, 22 Apr 2018 10:13:37 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55786 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756861AbeDVONb (ORCPT ); Sun, 22 Apr 2018 10:13:31 -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 8C535CE9; Sun, 22 Apr 2018 14:13:30 +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.9 26/95] powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently Date: Sun, 22 Apr 2018 15:52:55 +0200 Message-Id: <20180422135211.500937731@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135210.432103639@linuxfoundation.org> References: <20180422135210.432103639@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.9-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 @@ -34,7 +34,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 @@ -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,