Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934530AbYBAEvv (ORCPT ); Thu, 31 Jan 2008 23:51:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1765616AbYBAEms (ORCPT ); Thu, 31 Jan 2008 23:42:48 -0500 Received: from mga05.intel.com ([192.55.52.89]:61249 "EHLO fmsmga101.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1763191AbYBAEmK (ORCPT ); Thu, 31 Jan 2008 23:42:10 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,288,1199692800"; d="scan'208";a="511516599" From: Len Brown To: linux-pm@lists.linux-foundation.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Johannes Berg , Pavel Machek , "Rafael J. Wysocki" , Len Brown Subject: [PATCH 22/37] Hibernation: Clean up Kconfig (V2) Date: Thu, 31 Jan 2008 23:36:53 -0500 Message-Id: <03f5cd73a5b5b30f6f3bcf8d68b3b79afb8cb880.1201840183.git.len.brown@intel.com> X-Mailer: git-send-email 1.5.4.rc5.16.gc0279 In-Reply-To: <1201840628-23136-1-git-send-email-lenb@kernel.org> References: <1201840628-23136-1-git-send-email-lenb@kernel.org> In-Reply-To: References: Organization: Intel Open Source Technology Center Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3014 Lines: 105 From: Johannes Berg This cleans up the hibernation Kconfig and removes the need to declare centrally which architectures support hibernation. All architectures that currently support hibernation are modified accordingly. Signed-off-by: Johannes Berg Acked-by: Paul Mackerras Cc: Pavel Machek Signed-off-by: Rafael J. Wysocki Signed-off-by: Len Brown --- arch/powerpc/Kconfig | 14 ++++++++++++-- arch/x86/Kconfig | 4 ++++ kernel/power/Kconfig | 18 +++--------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 9c44af3..68f0cf7 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -151,9 +151,19 @@ config DEFAULT_UIMAGE config REDBOOT bool -config PPC64_SWSUSP +config HIBERNATE_32 bool - depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL)) + depends on (PPC_PMAC && !SMP) || BROKEN + default y + +config HIBERNATE_64 + bool + depends on BROKEN || (PPC_PMAC64 && EXPERIMENTAL) + default y + +config ARCH_HIBERNATION_POSSIBLE + bool + depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32) default y config PPC_DCR_NATIVE diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 65b4491..9c511dd 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -109,6 +109,10 @@ config ARCH_SUPPORTS_OPROFILE select HAVE_KVM +config ARCH_HIBERNATION_POSSIBLE + def_bool y + depends on !SMP || !X86_VOYAGER + config ZONE_DMA32 bool default X86_64 diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 06a08f7..fd76d54 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -84,7 +84,8 @@ config PM_TRACE_RTC config PM_SLEEP_SMP bool - depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE + depends on SMP + depends on SUSPEND_SMP_POSSIBLE || ARCH_HIBERNATION_POSSIBLE depends on PM_SLEEP select HOTPLUG_CPU default y @@ -118,22 +119,9 @@ config SUSPEND powered and thus its contents are preserved, such as the suspend-to-RAM state (i.e. the ACPI S3 state). -config HIBERNATION_UP_POSSIBLE - bool - depends on X86 || PPC64_SWSUSP || PPC32 - depends on !SMP - default y - -config HIBERNATION_SMP_POSSIBLE - bool - depends on (X86 && !X86_VOYAGER) || PPC64_SWSUSP - depends on SMP - default y - config HIBERNATION bool "Hibernation (aka 'suspend to disk')" - depends on PM && SWAP - depends on HIBERNATION_UP_POSSIBLE || HIBERNATION_SMP_POSSIBLE + depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE ---help--- Enable the suspend to disk (STD) functionality, which is usually called "hibernation" in user interfaces. STD checkpoints the -- 1.5.4.rc5.16.gc0279 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/