From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [git pull] x86 updates
Date: Mon, 14 Jan 2008 20:02:36 +0100 [thread overview]
Message-ID: <20080114190236.GA31546@elte.hu> (raw)
[ resent with lkml Cc:-ed too. ]
Linus, please pull the latest x86 git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
Thanks!
Ingo
------------------>
Bernhard Walle (1):
x86: fix RTC_AIE with CONFIG_HPET_EMULATE_RTC
Mike Frysinger (1):
x86: asm-x86/msr.h: pull in linux/types.h
Rafael J. Wysocki (1):
x86: hibernation: document __save_processor_state() on x86
arch/x86/kernel/hpet.c | 2 +-
arch/x86/kernel/suspend_64.c | 20 ++++++++++++++++++++
include/asm-x86/msr.h | 4 ++++
include/asm-x86/suspend_64.h | 9 ++++++++-
4 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 4a86ffd..2f99ee2 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -657,7 +657,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
hpet_pie_count = 0;
}
- if (hpet_rtc_flags & RTC_PIE &&
+ if (hpet_rtc_flags & RTC_AIE &&
(curr_time.tm_sec == hpet_alarm_time.tm_sec) &&
(curr_time.tm_min == hpet_alarm_time.tm_min) &&
(curr_time.tm_hour == hpet_alarm_time.tm_hour))
diff --git a/arch/x86/kernel/suspend_64.c b/arch/x86/kernel/suspend_64.c
index 2e5efaa..569f1b5 100644
--- a/arch/x86/kernel/suspend_64.c
+++ b/arch/x86/kernel/suspend_64.c
@@ -19,6 +19,21 @@ extern const void __nosave_begin, __nosave_end;
struct saved_context saved_context;
+/**
+ * __save_processor_state - save CPU registers before creating a
+ * hibernation image and before restoring the memory state from it
+ * @ctxt - structure to store the registers contents in
+ *
+ * NOTE: If there is a CPU register the modification of which by the
+ * boot kernel (ie. the kernel used for loading the hibernation image)
+ * might affect the operations of the restored target kernel (ie. the one
+ * saved in the hibernation image), then its contents must be saved by this
+ * function. In other words, if kernel A is hibernated and different
+ * kernel B is used for loading the hibernation image into memory, the
+ * kernel A's __save_processor_state() function must save all registers
+ * needed by kernel A, so that it can operate correctly after the resume
+ * regardless of what kernel B does in the meantime.
+ */
void __save_processor_state(struct saved_context *ctxt)
{
kernel_fpu_begin();
@@ -69,6 +84,11 @@ static void do_fpu_end(void)
kernel_fpu_end();
}
+/**
+ * __restore_processor_state - restore the contents of CPU registers saved
+ * by __save_processor_state()
+ * @ctxt - structure to load the registers contents from
+ */
void __restore_processor_state(struct saved_context *ctxt)
{
/*
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index 664a2fa..80b0270 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -3,6 +3,10 @@
#include <asm/msr-index.h>
+#ifndef __ASSEMBLY__
+# include <linux/types.h>
+#endif
+
#ifdef __i386__
#ifdef __KERNEL__
diff --git a/include/asm-x86/suspend_64.h b/include/asm-x86/suspend_64.h
index c505a76..4404668 100644
--- a/include/asm-x86/suspend_64.h
+++ b/include/asm-x86/suspend_64.h
@@ -15,7 +15,14 @@ arch_prepare_suspend(void)
return 0;
}
-/* Image of the saved processor state. If you touch this, fix acpi/wakeup.S. */
+/*
+ * Image of the saved processor state, used by the low level ACPI suspend to
+ * RAM code and by the low level hibernation code.
+ *
+ * If you modify it, fix arch/x86/kernel/acpi/wakeup_64.S and make sure that
+ * __save/__restore_processor_state(), defined in arch/x86/kernel/suspend_64.c,
+ * still work as required.
+ */
struct saved_context {
struct pt_regs regs;
u16 ds, es, fs, gs, ss;
next reply other threads:[~2008-01-14 19:02 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 19:02 Ingo Molnar [this message]
2008-01-15 16:05 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2009-06-20 16:49 [GIT PULL] " Ingo Molnar
2009-01-07 18:15 [git pull] " Ingo Molnar
2008-07-15 21:01 [GIT " Thomas Gleixner
2008-07-15 21:20 ` Linus Torvalds
2008-07-15 21:25 ` Ingo Molnar
2008-07-15 21:43 ` Thomas Gleixner
2008-07-15 22:00 ` Linus Torvalds
2008-07-15 22:05 ` Ingo Molnar
2008-07-15 22:14 ` Thomas Gleixner
2008-07-15 23:29 ` Linus Torvalds
2008-04-29 16:00 [git " Ingo Molnar
2008-04-26 14:21 Ingo Molnar
2008-02-29 18:08 Ingo Molnar
2008-02-25 16:27 Ingo Molnar
2008-02-19 23:13 [GIT " Thomas Gleixner
2008-02-19 23:56 ` Randy Dunlap
2008-02-20 0:06 ` Thomas Gleixner
2008-02-20 8:32 ` Ingo Molnar
2008-02-18 20:21 [GIT Pull] " Thomas Gleixner
2008-02-13 15:57 [git pull] " Ingo Molnar
2008-02-13 16:19 ` Balbir Singh
2008-02-14 16:25 ` Ingo Molnar
2008-02-14 17:42 ` Avi Kivity
2008-02-15 3:30 ` Balbir Singh
2008-02-15 8:04 ` Ingo Molnar
2008-02-14 10:25 ` Andi Kleen
2008-02-14 15:19 ` Ingo Molnar
2008-02-14 17:10 ` Andi Kleen
2008-02-09 23:24 Thomas Gleixner
2008-02-10 1:25 ` Randy Dunlap
2008-02-10 8:03 ` Linus Torvalds
2008-02-10 9:14 ` Thomas Gleixner
2008-02-10 23:09 ` Ingo Molnar
2008-02-06 14:47 Ingo Molnar
2008-02-04 16:12 Ingo Molnar
2008-02-05 18:47 ` Linus Torvalds
2008-02-05 19:22 ` Sam Ravnborg
2008-02-05 21:05 ` Ingo Molnar
2008-02-05 21:09 ` H. Peter Anvin
2008-02-05 21:18 ` Sam Ravnborg
2008-02-05 21:23 ` H. Peter Anvin
2008-02-05 21:32 ` Linus Torvalds
2008-02-05 21:42 ` H. Peter Anvin
2008-02-05 21:17 ` Sam Ravnborg
2008-02-05 21:54 ` Ingo Molnar
2008-02-05 22:03 ` H. Peter Anvin
2008-02-05 20:12 ` H. Peter Anvin
2008-02-05 21:36 ` Ingo Molnar
2008-02-01 17:00 Ingo Molnar
2007-11-10 3:52 [GIT " Thomas Gleixner
2007-10-23 21:02 [Git " Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080114190236.GA31546@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®