From patchwork Fri Jan 17 02:03:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 3501591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5F06E9F169 for ; Fri, 17 Jan 2014 02:06:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 854F12017D for ; Fri, 17 Jan 2014 02:06:24 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7415020172 for ; Fri, 17 Jan 2014 02:06:23 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3yox-0004Ut-6a; Fri, 17 Jan 2014 02:06:07 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3yop-0004vi-W3; Fri, 17 Jan 2014 02:06:00 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3yon-0004uj-Kt for linux-arm-kernel@lists.infradead.org; Fri, 17 Jan 2014 02:05:58 +0000 Received: by mail-pb0-f46.google.com with SMTP id ma3so3417699pbc.5 for ; Thu, 16 Jan 2014 18:05:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BFwbXN8q1b4cyGBcuTAMOZ6SWADN66CULYlZ6EA2JGI=; b=jeKiiByJRNWMOkxIxwHtm3y43E6n/h8XjxrxY7K3qLT2PVewkMRlDNSyI+SXLNXXOB NzRSEgAWwrtqbF7ZnPcI6qlRO2veEO5Z75nW2SYQKob5XaxuoXgsqyGkoy3jQiMSppCK +qww07DklOQVhaXIQU2knfqNliOIQUqnKAAty6kBWSYot7uCob1mKr00LxUBEl2J53K6 4gd0EftCB9qLLdDgx6fsCSCBxHieXQff5OCkQx0lOZ6XQD9Qj1SDNK5kC4iTm5Mru+pb QeRDojYbcusvq1VVVX6Z5+n/K77NqWwiR+6lUelMTfWWGe6hCG4cbs3qVW4Q1AvSEOBK otDw== X-Gm-Message-State: ALoCoQmNSoFG+AWFBgaSSzqr/fCfbXxLRamRgEtJdtumk1uJOmDEM1W8sxTTY/ANuqutckcgL5j9 X-Received: by 10.68.204.161 with SMTP id kz1mr13845193pbc.156.1389924336127; Thu, 16 Jan 2014 18:05:36 -0800 (PST) Received: from localhost ([218.17.215.175]) by mx.google.com with ESMTPSA id yd4sm18393309pbc.13.2014.01.16.18.05.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 16 Jan 2014 18:05:35 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Russell King - ARM Linux , Daniel Lezcano Subject: [PATCH 1/3] ACPI / idle: Move idle_boot_override out of the arch directory Date: Fri, 17 Jan 2014 10:03:25 +0800 Message-Id: <1389924207-7360-2-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1389924207-7360-1-git-send-email-hanjun.guo@linaro.org> References: <1389924207-7360-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140116_210557_770769_C09127F6 X-CRM114-Status: GOOD ( 13.50 ) X-Spam-Score: -1.8 (-) Cc: Mark Rutland , Matthew Garrett , linaro-kernel@lists.linaro.org, patches@linaro.org, Linus Walleij , Olof Johansson , linux-kernel@vger.kernel.org, Rob Herring , linaro-acpi@lists.linaro.org, linux-acpi@vger.kernel.org, Jon Masters , Grant Likely , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Hanjun Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move idle_boot_override out of the arch directory to be a single enum including both platforms values, this will make it rather easier to avoid ifdefs around which definitions are for which processor in generally used ACPI code. IDLE_FORCE_MWAIT for IA64 is not used anywhere, so romove it. No functional change in this patch. Suggested-by: Alan Signed-off-by: Hanjun Guo --- arch/ia64/include/asm/processor.h | 3 --- arch/powerpc/include/asm/processor.h | 1 - arch/x86/include/asm/processor.h | 3 --- arch/x86/kernel/process.c | 1 + include/linux/cpu.h | 8 ++++++++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h index 5a84b3a..ccd63a0 100644 --- a/arch/ia64/include/asm/processor.h +++ b/arch/ia64/include/asm/processor.h @@ -698,9 +698,6 @@ prefetchw (const void *x) extern unsigned long boot_option_idle_override; -enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_FORCE_MWAIT, - IDLE_NOMWAIT, IDLE_POLL}; - void default_idle(void); #define ia64_platform_is(x) (strcmp(x, ia64_platform_name) == 0) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index fc14a38..06689c0 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -440,7 +440,6 @@ static inline unsigned long get_clean_sp(unsigned long sp, int is_32) #endif extern unsigned long cpuidle_disable; -enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF}; extern int powersave_nap; /* set if nap mode can be used in idle loop */ extern void power7_nap(void); diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 7b034a4..4bee51a 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -729,9 +729,6 @@ extern void init_amd_e400_c1e_mask(void); extern unsigned long boot_option_idle_override; extern bool amd_e400_c1e_detected; -enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_NOMWAIT, - IDLE_POLL}; - extern void enable_sep_cpu(void); extern int sysenter_setup(void); diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 3fb8d95..62764ff 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 03e235ad..e324561 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -220,6 +220,14 @@ void cpu_idle(void); void cpu_idle_poll_ctrl(bool enable); +enum idle_boot_override { + IDLE_NO_OVERRIDE = 0, + IDLE_HALT, + IDLE_NOMWAIT, + IDLE_POLL, + IDLE_POWERSAVE_OFF +}; + void arch_cpu_idle(void); void arch_cpu_idle_prepare(void); void arch_cpu_idle_enter(void);