From patchwork Sun Feb 10 05:58:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 2121441 X-Patchwork-Delegate: lenb@kernel.org Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 22B9DDF23E for ; Sun, 10 Feb 2013 05:59:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753365Ab3BJF7K (ORCPT ); Sun, 10 Feb 2013 00:59:10 -0500 Received: from mail-ve0-f178.google.com ([209.85.128.178]:55927 "EHLO mail-ve0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752825Ab3BJF6x (ORCPT ); Sun, 10 Feb 2013 00:58:53 -0500 Received: by mail-ve0-f178.google.com with SMTP id db10so4406376veb.9 for ; Sat, 09 Feb 2013 21:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:reply-to:organization; bh=S5yz3SpA3SiWzOJl5tYzR2ExyKIhMkzawbaeZ6FUPvQ=; b=ZIcSIeFuynWZXA6h7dwXdpC8WxhIdxkAnMUAWaP2+VAMYgqFVOHzryQSWSuChyA5+8 WVKC9Pf3cFLi8ST+uevXUPtczWgBlmfgpUPJSqI7CgCl0VEIkhk8qaLfCSQVQtMiIXOt 3S+o2CLdpMwkgo4l5ewZciah4rZMkzXynw8ytpa7nNEMsCXomufx+FyO+jyyQCGkZTUk jHiZ0WNPLWV5qsshmfVFMqIuUYMsEt1TnBKkBZ6F4S1F6mk/eRNaajO3xGwF9pxoVkug /zLKGVO73WgySXZXZT5ZzVxa/5wUvYAyZQbSQQydS7tvOVF854S6GIjMCycp6wP8B4GG CElA== X-Received: by 10.52.95.243 with SMTP id dn19mr11773609vdb.110.1360475932861; Sat, 09 Feb 2013 21:58:52 -0800 (PST) Received: from x980.localdomain6 (pool-108-7-58-246.bstnma.fios.verizon.net. [108.7.58.246]) by mx.google.com with ESMTPS id p7sm42173052vdt.2.2013.02.09.21.58.51 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 09 Feb 2013 21:58:52 -0800 (PST) From: Len Brown To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Len Brown , xen-devel@lists.xensource.com Subject: [PATCH 16/16] xen idle: make xen-specific macro xen-specific Date: Sun, 10 Feb 2013 00:58:23 -0500 Message-Id: X-Mailer: git-send-email 1.8.1.3.535.ga923c31 In-Reply-To: <1360475903-30007-1-git-send-email-lenb@kernel.org> References: <1360475903-30007-1-git-send-email-lenb@kernel.org> In-Reply-To: <2b219d07e0f287c2c713f5465fc8646158fa986e.1360475150.git.len.brown@intel.com> References: <2b219d07e0f287c2c713f5465fc8646158fa986e.1360475150.git.len.brown@intel.com> Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Len Brown This macro is only invoked by Xen, so make its definition specific to Xen. > set_pm_idle_to_default() < xen_set_default_idle() Signed-off-by: Len Brown Cc: xen-devel@lists.xensource.com --- arch/x86/include/asm/processor.h | 6 +++++- arch/x86/kernel/process.c | 4 +++- arch/x86/xen/setup.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 888184b..c2f7f47 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -998,7 +998,11 @@ extern unsigned long arch_align_stack(unsigned long sp); extern void free_init_pages(char *what, unsigned long begin, unsigned long end); void default_idle(void); -bool set_pm_idle_to_default(void); +#ifdef CONFIG_XEN +bool xen_set_default_idle(void); +#else +#define xen_set_default_idle 0 +#endif void stop_this_cpu(void *dummy); diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index ceb05db..b86de21 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -390,7 +390,8 @@ void default_idle(void) EXPORT_SYMBOL(default_idle); #endif -bool set_pm_idle_to_default(void) +#ifdef CONFIG_XEN +bool xen_set_default_idle(void) { bool ret = !!x86_idle; @@ -398,6 +399,7 @@ bool set_pm_idle_to_default(void) return ret; } +#endif void stop_this_cpu(void *dummy) { local_irq_disable(); diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 8971a26..2b73b5c 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -561,7 +561,7 @@ void __init xen_arch_setup(void) #endif disable_cpuidle(); disable_cpufreq(); - WARN_ON(set_pm_idle_to_default()); + WARN_ON(xen_set_default_idle()); fiddle_vdso(); #ifdef CONFIG_NUMA numa_off = 1;