Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / compile-fixes-2.6.9-rhel4-22.patch
1 --- linux-2.6.9/arch/i386/kernel/apic.c.orig    2005-08-04 08:11:13.000000000 -0400
2 +++ linux-2.6.9/arch/i386/kernel/apic.c 2005-08-04 08:27:04.000000000 -0400
3 @@ -1125,8 +1125,10 @@ asmlinkage void smp_local_timer_interrup
4  
5  void smp_apic_timer_interrupt(struct pt_regs regs)
6  {
7 +#ifdef CONFIG_4KSTACKS
8         union irq_ctx   *curctx;
9         union irq_ctx   *irqctx;
10 +#endif
11         int             cpu;
12         u32             *isp;
13  
14 @@ -1147,11 +1149,11 @@ void smp_apic_timer_interrupt(struct pt_
15          * interrupt lock, which is the WrongThing (tm) to do.
16          */
17         irq_enter();
18 +
19 +#ifdef CONFIG_4KSTACKS
20         curctx = (union irq_ctx *) current_thread_info();
21         irqctx = hardirq_ctx[cpu];
22 -       if (curctx == irqctx) {
23 -               smp_local_timer_interrupt(&regs);
24 -       } else {
25 +       if (curctx != irqctx) {
26                 /* build the stack frame on the IRQ stack */
27                 isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
28                 irqctx->tinfo.task = curctx->tinfo.task;
29 @@ -1167,7 +1169,10 @@ void smp_apic_timer_interrupt(struct pt_
30                         : : "b"(isp)
31                         : "memory", "cc", "edx", "ecx"
32                 );
33 -       }
34 +       } else
35 +#endif
36 +               smp_local_timer_interrupt(&regs);
37 +
38         irq_exit();
39  }
40  
41 --- linux-2.6.9/include/asm-i386/crashdump.h.orig       2005-08-04 08:11:22.000000000 -0400
42 +++ linux-2.6.9/include/asm-i386/crashdump.h    2005-08-04 08:27:04.000000000 -0400
43 @@ -48,12 +48,14 @@ extern unsigned long next_ram_page (unsi
44  
45  static inline void platform_init_stack(void **stackptr)
46  {
47 +#ifdef CONFIG_4KSTACKS
48         *stackptr = (void *)kmalloc(sizeof(union irq_ctx), GFP_KERNEL);
49         if (*stackptr)
50                 memset(*stackptr, 0, sizeof(union irq_ctx));
51         else
52                 printk(KERN_WARNING
53                        "crashdump: unable to allocate separate stack\n");
54 +#endif
55  }
56  
57  typedef asmlinkage void (*crashdump_func_t)(struct pt_regs *, void *);
58 @@ -62,6 +64,7 @@ static inline void platform_start_crashd
59                                            crashdump_func_t dumpfunc,
60                                            struct pt_regs *regs)
61  {
62 +#ifdef CONFIG_4KSTACKS
63         u32 *dsp;
64         union irq_ctx * curctx;
65         union irq_ctx * dumpctx;
66 @@ -90,6 +93,10 @@ static inline void platform_start_crashd
67                         : "memory", "cc", "edx", "ecx"
68                 );
69         }
70 +#else
71 +       dumpfunc(regs, NULL);
72 +#endif
73 +
74  }
75  
76  #define platform_cleanup_stack(stackptr)       \