From patchwork Wed Mar 19 20:47:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Capella X-Patchwork-Id: 26610 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3434120534 for ; Wed, 19 Mar 2014 20:47:46 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 19sf49960269ykq.0 for ; Wed, 19 Mar 2014 13:47:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=vq+9xh36luJLw1fCHD2MZNxytVzRbIZZnPlAMV3Ok8I=; b=cvT0uPbK+n2UxEItRFxehAimTUW92BqTi7nRkCh6G3av8MjtoluMI13G/E7Go/9jb6 K+0cFhy8rBCEsSDB2udeIsU2ZIpmTHyjaR3Vjo2Azn3UhFZxhFhzbgs58GB7XnLt4UOx eI1p10C/YB2iPBTHKq4N5QqIWUw/lF8zvqoHx6CgoofVcM1xkwo8pvQ5rWUSpz1GFMww Hw1FSG03p9us83eoagCmN4pgKSNaXp0j1Yuk0yiSNCcd7yo+W+PeLI1if3pRQPgQjUlA qVHC5xY2A+agk9+lc7qY1ZGFkrDlJ9dWUdVdjMrtjKFTqRNqMpFgVLhSsSIcTl+vDEaO Enxw== X-Gm-Message-State: ALoCoQmIGz/VUB00NKRVJbtBaDiRxMJGCDLgicIXgC63GVsuN5W4dnls1kta2NqGnNex/Iqzu79F X-Received: by 10.58.178.137 with SMTP id cy9mr6483477vec.34.1395262065722; Wed, 19 Mar 2014 13:47:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.73 with SMTP id 67ls901379qga.18.gmail; Wed, 19 Mar 2014 13:47:45 -0700 (PDT) X-Received: by 10.58.96.36 with SMTP id dp4mr11146045veb.21.1395262065530; Wed, 19 Mar 2014 13:47:45 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id tz5si3818188vdc.115.2014.03.19.13.47.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Mar 2014 13:47:45 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ld13so9835000vcb.33 for ; Wed, 19 Mar 2014 13:47:45 -0700 (PDT) X-Received: by 10.52.119.197 with SMTP id kw5mr26829421vdb.5.1395262065416; Wed, 19 Mar 2014 13:47:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp333722vck; Wed, 19 Mar 2014 13:47:44 -0700 (PDT) X-Received: by 10.69.25.69 with SMTP id io5mr42846282pbd.22.1395262062039; Wed, 19 Mar 2014 13:47:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hj8si15786578pac.326.2014.03.19.13.47.41; Wed, 19 Mar 2014 13:47:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754151AbaCSUrk (ORCPT + 11 others); Wed, 19 Mar 2014 16:47:40 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:33310 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753121AbaCSUrj (ORCPT ); Wed, 19 Mar 2014 16:47:39 -0400 Received: by mail-wi0-f169.google.com with SMTP id hm4so5346317wib.0 for ; Wed, 19 Mar 2014 13:47:38 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.175.202 with SMTP id cc10mr4410891wjc.48.1395262058384; Wed, 19 Mar 2014 13:47:38 -0700 (PDT) Received: by 10.227.241.146 with HTTP; Wed, 19 Mar 2014 13:47:38 -0700 (PDT) In-Reply-To: <20140319154434.GA3488@arch.cereza> References: <1394016605-24120-1-git-send-email-sebastian.capella@linaro.org> <1394016605-24120-3-git-send-email-sebastian.capella@linaro.org> <20140316070917.GA3094@arch.cereza> <20140317204410.GA1118@arch.cereza> <20140319154434.GA3488@arch.cereza> Date: Wed, 19 Mar 2014 13:47:38 -0700 Message-ID: Subject: Re: [PATCH v7 2/2] ARM hibernation / suspend-to-disk From: Sebastian Capella To: Ezequiel Garcia Cc: Stefano Stabellini , Len Brown , "linaro-kernel@lists.linaro.org" , Russell King , Jonathan Austin , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Victor Kamensky , Will Deacon , Linux Kernel , Sricharan R , Santosh Shilimkar , Ben Dooks , Russ Dill , Nicolas Pitre , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Laura Abbott , Catalin Marinas , Stephen Boyd , "linux-arm-kernel@lists.infradead.org" , Jiang Liu Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sebastian.capella@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 19 March 2014 08:44, Ezequiel Garcia wrote: > Tested-by: Ezequiel Garcia Thanks! > On the other side, this board has no pm_power_off() support, which means > kernel_halt() is called after kernel_power_off(). > > I'm not sure if a NULL pm_power_off() is supported, but this makes my kernel > crash in a reboot notifier that's called twice (first in kernel_power_off > and then in kernel_halt): The omap board I'm using has a null pm_power_off. I added code to bypass kernel_power_off in the event pm_power_off is null like this: This follows the behavior in the reboot syscall which does it this way also. I'm testing this now, and it seems work fine. If this looks good, I can add it as an additional patch. Thanks, Sebastian --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index a5f702a..d96b910 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -594,7 +594,8 @@ static void power_down(void) case HIBERNATION_PLATFORM: hibernation_platform_enter(); case HIBERNATION_SHUTDOWN: - kernel_power_off(); + if (pm_power_off) + kernel_power_off(); break; #ifdef CONFIG_SUSPEND case HIBERNATION_SUSPEND: