From: Pavel Machek <pavel@suse.cz>
To: Andrew Morton <akpm@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: cpu_init is called during resume
Date: Thu, 31 Aug 2006 15:55:45 +0200 [thread overview]
Message-ID: <20060831135545.GM3923@elf.ucw.cz> (raw)
cpu_init() is called during resume, at time when GFP_KERNEL is not
available. This silences warning, and adds few small cleanups.
Signed-off-by: Pavel Machek <pavel@suse.cz>
---
commit 0c23b1939d38a6bbdf1fd22078bd4fd3ec932c68
tree 66e19bcca9940e3cab2df78aaef010e51260cb9f
parent de9ee8a9c1e2cf18adee5d1569daa19deedc7c87
author <pavel@amd.ucw.cz> Thu, 31 Aug 2006 15:55:00 +0200
committer <pavel@amd.ucw.cz> Thu, 31 Aug 2006 15:55:00 +0200
arch/i386/kernel/cpu/common.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 70c87de..d0565d3 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -591,10 +591,10 @@ void __init early_cpu_init(void)
void __cpuinit cpu_init(void)
{
int cpu = smp_processor_id();
- struct tss_struct * t = &per_cpu(init_tss, cpu);
+ struct tss_struct *t = &per_cpu(init_tss, cpu);
struct thread_struct *thread = ¤t->thread;
struct desc_struct *gdt;
- __u32 stk16_off = (__u32)&per_cpu(cpu_16bit_stack, cpu);
+ u32 stk16_off = (u32)&per_cpu(cpu_16bit_stack, cpu);
struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu);
if (cpu_test_and_set(cpu, cpu_initialized)) {
@@ -629,7 +629,7 @@ void __cpuinit cpu_init(void)
/* alloc_bootmem_pages panics on failure, so no check */
memset(gdt, 0, PAGE_SIZE);
} else {
- gdt = (struct desc_struct *)get_zeroed_page(GFP_KERNEL);
+ gdt = (struct desc_struct *)get_zeroed_page(GFP_ATOMIC);
if (unlikely(!gdt)) {
printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu);
for (;;)
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next reply other threads:[~2006-08-31 13:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 13:55 Pavel Machek [this message]
2006-08-31 16:11 ` Jeremy Fitzhardinge
2006-08-31 22:31 ` Pavel Machek
2006-08-31 23:52 ` Jeremy Fitzhardinge
2006-09-02 11:21 ` Pavel Machek
2006-09-03 0:00 ` Jeremy Fitzhardinge
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=20060831135545.GM3923@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome