Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753785AbbF3QXw (ORCPT ); Tue, 30 Jun 2015 12:23:52 -0400 Received: from mga03.intel.com ([134.134.136.65]:8201 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753627AbbF3QXZ (ORCPT ); Tue, 30 Jun 2015 12:23:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,378,1432623600"; d="scan'208";a="737799865" From: "Williams, Dan J" To: "dan.carpenter@oracle.com" CC: "toshi.kani@hp.com" , "mingo@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@ml01.01.org" , "tglx@linutronix.de" , "hch@lst.de" , "axboe@kernel.dk" , "hpa@zytor.com" , "mingo@redhat.com" , "linux-fsdevel@vger.kernel.org" , "ross.zwisler@linux.intel.com" , "boaz@plexistor.com" , "linux-acpi@vger.kernel.org" Subject: Re: [PATCH v2 17/17] arch, x86: pmem api for ensuring durability of persistent memory updates Thread-Topic: [PATCH v2 17/17] arch, x86: pmem api for ensuring durability of persistent memory updates Thread-Index: AQHQryts59pI3JoeHkWdUuuGpsNBDp3FVBmAgABlDIA= Date: Tue, 30 Jun 2015 16:23:21 +0000 Message-ID: <1435681397.18090.66.camel@intel.com> References: <20150625090554.40066.69562.stgit@dwillia2-desk3.jf.intel.com> <20150625093749.40066.25475.stgit@dwillia2-desk3.jf.intel.com> <20150630102137.GC12986@mwanda> In-Reply-To: <20150630102137.GC12986@mwanda> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="utf-8" Content-ID: <7DB1C2FDAF222E40BCD89185893F24D6@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t5UGNuXP012973 Content-Length: 2383 Lines: 60 On Tue, 2015-06-30 at 13:21 +0300, Dan Carpenter wrote: > On Thu, Jun 25, 2015 at 05:37:49AM -0400, Dan Williams wrote: > > diff --git a/include/linux/compiler.h b/include/linux/compiler.h > > index 867722591be2..9a528d945498 100644 > > --- a/include/linux/compiler.h > > +++ b/include/linux/compiler.h > > @@ -21,6 +21,7 @@ > > # define __rcu __attribute__((noderef, address_space(4))) > > On this side of the #ifdef CONFIG_SPARSE_RCU_POINTER statement then > __pmem isn't defined so it leads to a build error running a CHECKER on > today's linux-next. > > I would define __pmem away, but I don't understand why __pmem and > CONFIG_SPARSE_RCU_POINTER are related at all. Maybe it should be > outside the if statement? > Yes it should be outside the if... 8<---- Subject: sparse: fix misplaced __pmem definition From: Dan Williams Move the definition of __pmem outside of CONFIG_SPARSE_RCU_POINTER to fix: drivers/nvdimm/pmem.c:198:17: sparse: too many arguments for function __builtin_expect drivers/nvdimm/pmem.c:36:33: sparse: expected ; at end of declaration drivers/nvdimm/pmem.c:48:21: sparse: void declaration ...due to __pmem failing to be defined in some configurations when CONFIG_SPARSE_RCU_POINTER=y. Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Dan Williams --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 26fc8bc77f85..d8fbd500330e 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -17,11 +17,11 @@ # define __release(x) __context__(x,-1) # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) # define __percpu __attribute__((noderef, address_space(3))) +# define __pmem __attribute__((noderef, address_space(5))) #ifdef CONFIG_SPARSE_RCU_POINTER # define __rcu __attribute__((noderef, address_space(4))) #else # define __rcu -# define __pmem __attribute__((noderef, address_space(5))) #endif extern void __chk_user_ptr(const volatile void __user *); extern void __chk_io_ptr(const volatile void __iomem *); ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?