Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1254217yba; Thu, 9 May 2019 13:20:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGqc0aSOdDRGQKE/2uOT2/DAIONi9efuR06NUcLhH1x5KId9dbYe+lnw7LqtYSN34J3A38 X-Received: by 2002:a62:e303:: with SMTP id g3mr8191940pfh.220.1557433238387; Thu, 09 May 2019 13:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557433238; cv=none; d=google.com; s=arc-20160816; b=j4G571i5N+/AV85Ca+R5t79avJwYf7tyj5xSp+BDbn0lZRrAiSLOM3Ze2jv8Vgl+Ng P4/lDtMXtcTM1fJaHVI9dM1yOtGCMnDHHia1NtgFTR6aWrI+AripGPhbna+Ft6glCLTl 4+YibCTa+wrwRI8pnNYdeyFMp4dIgLZyIM54rC6iYzj6FtdVt5xAGphUyVoO8wZAAeME oYR7rrq8tpmyWZmxTfqxE18SrsjYAPHCN9TOYvflqQ2qm/6qN/qlOCEr2rbNeFSfjjfZ O0MBd02hZgytCd7oXugpnp8NDkNMCJdZRjWqiTCa9Izhb8Fq/KEWZQx0NVKLzpI+KQHG KrtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GJZ5Q6jA4O7aJU9I1R7Mdcv4Tb9to2ZldjQmNYgzvPA=; b=KIyfPSYPX9hvOdruWExeXswqcpol8yxBz35EX/2YNG86GlHDMgz56EVH4OPamDa80Y ZHVf3U7xbvMyhXkYXBQgZTSZBYA7xBoR0B8xtyKgEQ+hLTTkrlZ9ESqt1lVT7RgDeG6r SFQ1RuCbEPYXUUGqMVwCg91oJ9E4v/hc6tg6crGwt/uigEb2lOgQVLMZJz27axQm2mKl QtECtCLM9nt6Rv4nHJUmrnXogZRasp6iKDiLzSi5GuIwqaqm4cSDPjz87obGjRjaWVNh 2JM84c/cRn1s5c71x8oDatAyAN6NxuBOmC4BwCIr35WYfFY+xN/lIIg9hid6a3XJ/z5D arDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IO+KoQF0; 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 d66si4796720pfa.201.2019.05.09.13.20.21; Thu, 09 May 2019 13:20:38 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IO+KoQF0; 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 S1726933AbfEIUT2 (ORCPT + 99 others); Thu, 9 May 2019 16:19:28 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39791 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726806AbfEIUT1 (ORCPT ); Thu, 9 May 2019 16:19:27 -0400 Received: by mail-wm1-f68.google.com with SMTP id n25so4674513wmk.4 for ; Thu, 09 May 2019 13:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GJZ5Q6jA4O7aJU9I1R7Mdcv4Tb9to2ZldjQmNYgzvPA=; b=IO+KoQF0XExQgYMUQurYWk908PrOrvDWgPkKvUFydb54+mGRvonFr1iT+FubWy3OBA QpyEdwU8/OJ4+G9+lxN1J9UzAAXIDbt6s41pTK12AlT2em+Ibb/YaLYfaKzygpMPJPJC P3ICeH3z4JYLoMXM7xdSW1PhUn+yUn4epbKK8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GJZ5Q6jA4O7aJU9I1R7Mdcv4Tb9to2ZldjQmNYgzvPA=; b=bxW7l/JkVMFkxiouRy3Hf8MBUK/8Nf84y9LVyAJecCjo+6qoUZ/zQGajovgShyX2yq I5oUvEh5mlUpoFKBQEt/J1epAbJ/S4Kb6AllN54c9ga88kMxPJPN1KSJt98I4r+XjXFg BhDBaRpXSk1MUYH2h1HykgXQ0V1N+XPmaptgomhgEtUcHn68V3GMKibi+cT1q1cIS8u4 bdWi8RhaJ8oyZ9g55LGRkbhgfdeeJ844dmR105pUV0koQOBhTaG4Y35EZYPffosgnXJg 3neKVIbnGQUnVQWCCqdLgf+a2egd/XdVZ3o932yjQSMPAihB+nL4ZX/8nntnE9CQ7KeS FRzw== X-Gm-Message-State: APjAAAVhLdu12W1vRHR2VDEHJsL6lbLcG+EdZZx+Re+5cvryoXNqXPJz RdYVKZh0SFKEyeHFHuboqazwhYVzi56YmA== X-Received: by 2002:a1c:cb48:: with SMTP id b69mr4393573wmg.109.1557433165640; Thu, 09 May 2019 13:19:25 -0700 (PDT) Received: from andrea ([91.252.228.170]) by smtp.gmail.com with ESMTPSA id z74sm9649240wmc.2.2019.05.09.13.19.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 13:19:24 -0700 (PDT) Date: Thu, 9 May 2019 22:19:15 +0200 From: Andrea Parri To: linux-kernel@vger.kernel.org Cc: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Jordan Crouse , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, "Paul E. McKenney" , Peter Zijlstra Subject: Re: [PATCH 1/5] drm/msm: Fix improper uses of smp_mb__{before,after}_atomic() Message-ID: <20190509201915.GA2931@andrea> References: <1556568902-12464-1-git-send-email-andrea.parri@amarulasolutions.com> <1556568902-12464-2-git-send-email-andrea.parri@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1556568902-12464-2-git-send-email-andrea.parri@amarulasolutions.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 29, 2019 at 10:14:57PM +0200, Andrea Parri wrote: > These barriers only apply to the read-modify-write operations; in > particular, they do not apply to the atomic_set() primitive. > > Replace the barriers with smp_mb()s. > > Fixes: b1fc2839d2f92 ("drm/msm: Implement preemption for A5XX targets") > Cc: stable@vger.kernel.org > Reported-by: "Paul E. McKenney" > Reported-by: Peter Zijlstra > Signed-off-by: Andrea Parri > Cc: Rob Clark > Cc: Sean Paul > Cc: David Airlie > Cc: Daniel Vetter > Cc: Jordan Crouse > Cc: linux-arm-msm@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: freedreno@lists.freedesktop.org Rob, Sean, Jordan: any suggestions to move this patch forward? Thanx, Andrea > --- > drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c > index 3d62310a535fb..ee0820ee0c664 100644 > --- a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c > +++ b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c > @@ -39,10 +39,10 @@ static inline void set_preempt_state(struct a5xx_gpu *gpu, > * preemption or in the interrupt handler so barriers are needed > * before... > */ > - smp_mb__before_atomic(); > + smp_mb(); > atomic_set(&gpu->preempt_state, new); > /* ... and after*/ > - smp_mb__after_atomic(); > + smp_mb(); > } > > /* Write the most recent wptr for the given ring into the hardware */ > -- > 2.7.4 >