cpu_init is called during resume




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@xxxxxxx>

---
commit 0c23b1939d38a6bbdf1fd22078bd4fd3ec932c68
tree 66e19bcca9940e3cab2df78aaef010e51260cb9f
parent de9ee8a9c1e2cf18adee5d1569daa19deedc7c87
author <pavel@xxxxxxxxxx> Thu, 31 Aug 2006 15:55:00 +0200
committer <pavel@xxxxxxxxxx> 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 = &current->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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [git pull] jfs update
    ... commit c5111f504d2a9b0d258d7c4752b4093523315989 ... tree 6a52864aff79691689aea21cb0cb928327d5de5b ... parent 69eb66d7da7dba2696281981347698e1693c2340 ... JFS: Take logsync lock before testing mp->lsn ...
    (Linux-Kernel)
  • [git patches] IDE update
    ... tree 4105ba774c775cdf53fb5fd3e07158b15218cb27 ... parent 21e2c01dc3e38d466eda5871645878d2c3a33261 ... commit 21e2c01dc3e38d466eda5871645878d2c3a33261 ... Splitted up from the Debian kernel patch. ...
    (Linux-Kernel)
  • [git pull] jfs update
    ... commit be0bf7da19135a7a0f8c275f20c819940be218d9 ... tree c8ba72b711730ce11f52fc20cd7c0e9c4bee7bc0 ... parent 5b3030e39049212c975665cdb3eeabcfaf7c94ca ... JFS: Take logsync lock before testing mp->lsn ...
    (Linux-Kernel)
  • [2.6-GIT] NTFS: Release 2.1.23.
    ... This is a big NTFS update. ... commit ba6d2377c85c9b8a793f455d8c9b6cf31985d70f ... tree 21e65c76db693869c84864af02e91c4b997a6ba5 ... parent af859a42d798f047fbfe198ed315a942662c39d2 ...
    (Linux-Kernel)
  • (no subject)
    ... everything up in one tree, so that there's absolutely no record of the ... That is, you may want to merge multiple parents in _one_ commit, ... each parent you have merged. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)