From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <553ABCA5.6050905@hp.com> Date: Fri, 24 Apr 2015 17:59:01 -0400 From: Linda Knippers MIME-Version: 1.0 Subject: Re: [Linux-nvdimm] [PATCH 05/21] nfit-test: manufactured NFITs for interface development References: <20150418013256.25237.96403.stgit@dwillia2-desk3.amr.corp.intel.com> <20150418013541.25237.36797.stgit@dwillia2-desk3.amr.corp.intel.com> <553ABA06.90305@hp.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org To: Dan Williams Cc: "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" List-ID: On 4/24/2015 5:50 PM, Dan Williams wrote: > On Fri, Apr 24, 2015 at 2:47 PM, Linda Knippers wrote: >> On 4/17/2015 9:35 PM, Dan Williams wrote: >> : >>> diff --git a/drivers/block/nd/Kconfig b/drivers/block/nd/Kconfig >>> index 5fa74f124b3e..0106b3807202 100644 >>> --- a/drivers/block/nd/Kconfig >>> +++ b/drivers/block/nd/Kconfig >>> @@ -41,4 +41,24 @@ config NFIT_ACPI >>> register the platform-global NFIT blob with the core. Also >>> enables the core to craft ACPI._DSM messages for platform/dimm >>> configuration. >>> + >>> +config NFIT_TEST >>> + tristate "NFIT TEST: Manufactured NFIT for interface testing" >>> + depends on DMA_CMA >>> + depends on ND_CORE=m >>> + depends on m >>> + help >>> + For development purposes register a manufactured >>> + NFIT table to verify the resulting device model topology. >>> + Note, this module arranges for ioremap_cache() to be >>> + overridden locally to allow simulation of system-memory as an >>> + io-memory-resource. >>> + >>> + Note, this test expects to be able to find at least >>> + 256MB of CMA space (CONFIG_CMA_SIZE_MBYTES) or it will fail to >> >> It seems to actually be wanting >= 584MB. > > Ah, true, this Kconfig text is stale. Will fix. Thanks. One more question... > +#ifdef CONFIG_CMA_SIZE_MBYTES > +#define CMA_SIZE_MBYTES CONFIG_CMA_SIZE_MBYTES > +#else > +#define CMA_SIZE_MBYTES 0 > +#endif > + > +static __init int nfit_test_init(void) > +{ > + int rc, i; > + > + if (CMA_SIZE_MBYTES < 584) { > + pr_err("need CONFIG_CMA_SIZE_MBYTES >= 584 to load\n"); > + return -EINVAL; > + } > + Since the kernel takes a cma= boot parameter, it would be nice if this check is against what the kernel is using rather than the config option. Is that possible? -- ljk From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946113AbbDXV7J (ORCPT ); Fri, 24 Apr 2015 17:59:09 -0400 Received: from g9t5008.houston.hp.com ([15.240.92.66]:54215 "EHLO g9t5008.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965837AbbDXV7G (ORCPT ); Fri, 24 Apr 2015 17:59:06 -0400 Message-ID: <553ABCA5.6050905@hp.com> Date: Fri, 24 Apr 2015 17:59:01 -0400 From: Linda Knippers User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Dan Williams CC: "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" Subject: Re: [Linux-nvdimm] [PATCH 05/21] nfit-test: manufactured NFITs for interface development References: <20150418013256.25237.96403.stgit@dwillia2-desk3.amr.corp.intel.com> <20150418013541.25237.36797.stgit@dwillia2-desk3.amr.corp.intel.com> <553ABA06.90305@hp.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/24/2015 5:50 PM, Dan Williams wrote: > On Fri, Apr 24, 2015 at 2:47 PM, Linda Knippers wrote: >> On 4/17/2015 9:35 PM, Dan Williams wrote: >> : >>> diff --git a/drivers/block/nd/Kconfig b/drivers/block/nd/Kconfig >>> index 5fa74f124b3e..0106b3807202 100644 >>> --- a/drivers/block/nd/Kconfig >>> +++ b/drivers/block/nd/Kconfig >>> @@ -41,4 +41,24 @@ config NFIT_ACPI >>> register the platform-global NFIT blob with the core. Also >>> enables the core to craft ACPI._DSM messages for platform/dimm >>> configuration. >>> + >>> +config NFIT_TEST >>> + tristate "NFIT TEST: Manufactured NFIT for interface testing" >>> + depends on DMA_CMA >>> + depends on ND_CORE=m >>> + depends on m >>> + help >>> + For development purposes register a manufactured >>> + NFIT table to verify the resulting device model topology. >>> + Note, this module arranges for ioremap_cache() to be >>> + overridden locally to allow simulation of system-memory as an >>> + io-memory-resource. >>> + >>> + Note, this test expects to be able to find at least >>> + 256MB of CMA space (CONFIG_CMA_SIZE_MBYTES) or it will fail to >> >> It seems to actually be wanting >= 584MB. > > Ah, true, this Kconfig text is stale. Will fix. Thanks. One more question... > +#ifdef CONFIG_CMA_SIZE_MBYTES > +#define CMA_SIZE_MBYTES CONFIG_CMA_SIZE_MBYTES > +#else > +#define CMA_SIZE_MBYTES 0 > +#endif > + > +static __init int nfit_test_init(void) > +{ > + int rc, i; > + > + if (CMA_SIZE_MBYTES < 584) { > + pr_err("need CONFIG_CMA_SIZE_MBYTES >= 584 to load\n"); > + return -EINVAL; > + } > + Since the kernel takes a cma= boot parameter, it would be nice if this check is against what the kernel is using rather than the config option. Is that possible? -- ljk