From patchwork Tue May 17 21:41:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 792372 Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4HLgSAR029493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 May 2011 21:42:49 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p4HLgRJV002109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 17 May 2011 16:42:27 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4HLgR2k016174 for ; Tue, 17 May 2011 16:42:27 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id AAAA880627 for ; Tue, 17 May 2011 16:42:26 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 5F41880626 for ; Tue, 17 May 2011 16:42:12 -0500 (CDT) Received: from medina.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4HLgBNQ026987 for ; Tue, 17 May 2011 16:42:11 -0500 (CDT) Received: from psmtp.com (na3sys009amx206.postini.com [74.125.149.46]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id p4HLgA7i022347 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 17 May 2011 16:42:10 -0500 Received: from na3sys009aog103.obsmtp.com ([209.85.218.53]) (using TLSv1) by na3sys009amx206.postini.com ([74.125.148.10]) with SMTP; Tue, 17 May 2011 21:42:11 GMT Received: from mail-yi0-f53.google.com ([209.85.218.53]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKTdLrsgyJ4VbC9w26dImte6xlf7u1lt0o@postini.com; Tue, 17 May 2011 14:42:10 PDT Received: by yia25 with SMTP id 25so383690yia.12 for ; Tue, 17 May 2011 14:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=Xn4m1YejoUetrhQL0VhMRl1Pkun0yCYBV65WaUUMg9M=; b=V1I+32VBv3jqC1yH2GYmD0F+bpYz0k2sMN164TcOAfwLATEJwE4WFKuk1Ow0KyU4yg tvnkuPjRBP/v7rxPpTkEFCsOQ2moAiQ7EyWQl1mNjp5tZaKWiIUujX27H/iHee+XWc6N FneoM9IeB54RDYnC+4yvuX+7m5C6O4qSj5y54= DomainKey-Signature: a=rsa-sha1; c=nofws; d=nanometrics.ca; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=K0HJTrxPPg7gG2HqGMwFLbZ6cCQ/4WiLXY+tvrnncya7gProbN9rPvbFDetw6etAzW jcwZmCbGbnVoz57XCFWTXzT6DAHhZCky8i27xQ5FbypaxkWuWNYEopDhfi7tfGBt6ZW0 waxxfnXPSDCFq3MUCM3YAEqFQHwzangQJm7OM= Received: by 10.151.28.15 with SMTP id f15mr845838ybj.295.1305668529471; Tue, 17 May 2011 14:42:09 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id s18sm459367ybg.10.2011.05.17.14.42.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 May 2011 14:42:08 -0700 (PDT) From: Ben Gardiner To: Sekhar Nori , davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 1/9] davinci: pm: fix compiler errors and kernel panics from sram consolidation Date: Tue, 17 May 2011 17:41:57 -0400 Message-Id: <467c7cc853555213b2560ebe1f188c09440284c1.1305668470.git.bengardiner@nanometrics.ca> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.0750) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: Subhasish Ghosh , Russell King - ARM Linux , 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: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 17 May 2011 21:42:49 +0000 (UTC) From: Nori, Sekhar 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 --- arch/arm/mach-davinci/pm.c | 2 +- arch/arm/mach-davinci/sleep.S | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c index c2f9767..5255223 100644 --- a/arch/arm/mach-davinci/pm.c +++ b/arch/arm/mach-davinci/pm.c @@ -125,7 +125,7 @@ static int __init davinci_pm_probe(struct platform_device *pdev) return -ENOMEM; } davinci_sram_suspend = fncpy(davinci_sram_suspend_mem, - davinci_cpu_suspend, davinci_cpu_suspend_sz); + &davinci_cpu_suspend, davinci_cpu_suspend_sz); suspend_set_ops(&davinci_pm_ops); 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 *