Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp616660imm; Sat, 7 Jul 2018 04:53:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcbNn4D7GFbDSmh9VsI+VP7LwE4g9DIGER1VPu4sgWx4GW+lqYIATqpzvKMKl6Fp0ecq9EH X-Received: by 2002:a17:902:1566:: with SMTP id b35-v6mr13761881plh.107.1530964382043; Sat, 07 Jul 2018 04:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530964382; cv=none; d=google.com; s=arc-20160816; b=a0nZhfFLwffoKfp8fRCeF/GGM/ui+cTHAp6OCMngRGH9lx3UkYe3v5t/naswgr5f32 5GlLXtQZJLusVMCn413mGO7xIe122sIkvpV1PvvbAB+xoiY7F042rPfJoi6tXbuY7SAO 2ELJHPibaYFDEwDK0Te5f7JTjQc5uY7ZHOeRmuHT1vGhsfhMSzHNKJ23ckEoWz/326ez EZtlgOEMMIbyNjPyRfydaYRu6b3TEA8PGNZlw6tU/H5thVlGzoUOnKTa2aqJBI8LXY32 wep46/3GRal4XVlzd6m2lkLjrGsdYOdwAZoLFaHoXt11OFUIjPXYdEsMN9w3worJD1ap 2RZg== 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:arc-authentication-results; bh=mWKCYBD7Q9VfE0yxYMyQ3J7swsS12FKTG/01h08UFCE=; b=JbDy3DeFyIQXT/2rBO6SHwQ1xApsrVUVSi1EolcgQIZNYS5rEpIYVhHyCW9FZcx6vj YlHQgrsx6KfSkobTanryhBbZixhx7Itq0o2dxDlBGqG6JzWUD9Z8vV8SnbWH7FVw6Cpq zByWa2sFRxRw9D8mQ71J5uk8FVviJQyOE7hJlldtpFbSqTa8Lgtv2Kdr7Keo90qwZxXe /1KUvsznwoXmW5n71dGIHkwnQZuIR7H5PKBxFyxTqUJ4h9XJgtpvYmLubVMxxZNwnppj yEtIcdy1pT5tytI3t2XG/lb0hvueApDtgeGR3D0L1Y5ObmeB2wKEP/IHJ1F18rGSG2e9 1ckg== 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 e85-v6si10918458pfl.132.2018.07.07.04.52.47; Sat, 07 Jul 2018 04:53:02 -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 S932681AbeGGLvY (ORCPT + 99 others); Sat, 7 Jul 2018 07:51:24 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:58780 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753687AbeGGLvX (ORCPT ); Sat, 7 Jul 2018 07:51:23 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1518017|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01e04486;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=13;RT=13;SR=0;TI=SMTPD_---.CNS-hP._1530964269; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.CNS-hP._1530964269) by smtp.aliyun-inc.com(10.147.41.158); Sat, 07 Jul 2018 19:51:09 +0800 Date: Sat, 7 Jul 2018 19:51:09 +0800 From: Guo Ren To: Peter Zijlstra Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, daniel.lezcano@linaro.org, jason@lakedaemon.net, arnd@arndb.de, c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, thomas.petazzoni@bootlin.com, wbx@uclibc-ng.org, green.hu@gmail.com, Will Deacon Subject: Re: [PATCH V2 06/19] csky: Cache and TLB routines Message-ID: <20180707115108.GA3861@guoren-Inspiron-7460> References: <20180705174025.GD2530@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180705174025.GD2530@hirez.programming.kicks-ass.net> 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 Thu, Jul 05, 2018 at 07:40:25PM +0200, Peter Zijlstra wrote: > > +#ifdef CONFIG_SMP > > +#define mb() asm volatile ("sync.is":::"memory") > > +#else > > +#define mb() asm volatile ("sync":::"memory") > > +#endif > > This is very suspect, please elaborate. > > What I would've expected is: > > #define mb() asm volatile ("sync" ::: "memory") > > #ifdef CONFIG_SMP > #define __smp_mb() asm volatile ("sync.is" ::: "memory") > #endif > > Is that in fact what you meant? > > Do you have a reference to your architecture manual and memory model > description somewhere? I'll fixup it in next version patch.