From patchwork Tue May 17 13:06:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 791552 Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4HD7rnu025276 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 May 2011 13:08:14 GMT Received: from dlep35.itg.ti.com ([157.170.170.118]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p4HD6epP021458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 May 2011 08:06:40 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id p4HD6dfF002287; Tue, 17 May 2011 08:06:39 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 8395580627; Tue, 17 May 2011 08:06:39 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp20.itg.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by linux.omap.com (Postfix) with ESMTP id C60F980626 for ; Tue, 17 May 2011 08:06:36 -0500 (CDT) Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4HD6XSJ007246; Tue, 17 May 2011 18:36:34 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde70.ent.ti.com ([172.24.170.148]) with mapi; Tue, 17 May 2011 18:36:33 +0530 From: "Nori, Sekhar" To: Russell King - ARM Linux , "Hilman, Kevin" , Tony Lindgren Date: Tue, 17 May 2011 18:36:33 +0530 Subject: RE: [RFC PATCH v3] Consolidate SRAM support Thread-Topic: [RFC PATCH v3] Consolidate SRAM support Thread-Index: AcwQzHRWD/EftHr+SOeSsh0CoYWQAwDxVUHA Message-ID: References: <20110415130607.GM1611@n2100.arm.linux.org.uk> <20110512174546.GB8633@n2100.arm.linux.org.uk> In-Reply-To: <20110512174546.GB8633@n2100.arm.linux.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Cc: "davinci-linux-open-source@linux.davincidsp.com" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 17 May 2011 13:08:14 +0000 (UTC) Hi Russell, On Thu, May 12, 2011 at 23:15:46, Russell King - ARM Linux wrote: > diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c > index 1bd73a0..c2f9767 100644 > --- a/arch/arm/mach-davinci/pm.c > +++ b/arch/arm/mach-davinci/pm.c [...] > @@ -123,14 +118,14 @@ static int __init davinci_pm_probe(struct platform_device *pdev) > return -ENOENT; > } > > - davinci_sram_suspend = sram_alloc(davinci_cpu_suspend_sz, NULL); > - if (!davinci_sram_suspend) { > + davinci_sram_suspend_mem = pv_pool_alloc(davinci_pv_pool, > + davinci_cpu_suspend_sz, NULL); > + if (!davinci_sram_suspend_mem) { > dev_err(&pdev->dev, "cannot allocate SRAM memory\n"); > return -ENOMEM; > } > - > - davinci_sram_push(davinci_sram_suspend, davinci_cpu_suspend, > - davinci_cpu_suspend_sz); > + davinci_sram_suspend = fncpy(davinci_sram_suspend_mem, > + davinci_cpu_suspend, davinci_cpu_suspend_sz); This gave these build errors: arch/arm/mach-davinci/pm.c: In function 'davinci_pm_probe': arch/arm/mach-davinci/pm.c:127: error: lvalue required in asm statement arch/arm/mach-davinci/pm.c:127: error: invalid lvalue in asm output 0 make[1]: *** [arch/arm/mach-davinci/pm.o] Error 1 Replacing davinci_cpu_suspend with &davinci_cpu_suspend fixed the issue. With that change done, tested suspend-to-RAM on DA850 platform. Also tested audio driver on DM365 platform with IRAM buffers enabled. Can you also fold the following patch in? Without this the kernel panics when suspend-to-RAM is enabled. Thanks, Sekhar diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S index fb5e72b..2cef533 100644 --- a/arch/arm/mach-davinci/sleep.S +++ b/arch/arm/mach-davinci/sleep.S @@ -37,6 +37,7 @@ #define DEEPSLEEP_SLEEPENABLE_BIT BIT(31) .text + .align 3 /* * Move DaVinci into deep sleep state *