(no commit message)
[linux-2.6.git] / linux-2.6-720-click.patch
1 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/drivers/input/serio/i8042-ppcio.h linux-2.6.27-720/drivers/input/serio/i8042-ppcio.h
2 --- linux-2.6.27-710/drivers/input/serio/i8042-ppcio.h  2008-10-09 18:13:53.000000000 -0400
3 +++ linux-2.6.27-720/drivers/input/serio/i8042-ppcio.h  2009-05-04 12:31:56.000000000 -0400
4 @@ -77,7 +77,7 @@
5         asm volatile("lis     7,0xff88        \n\
6                       lswi    6,7,0x8         \n\
7                       mr      %0,6"
8 -                     : "=r" (kbd_data) :: "6", "7");
9 +                     : "=r" (kbd_data) : : "6", "7");
10  
11         __raw_writel(0x00000000, 0xff50000c);
12         eieio();
13 @@ -99,7 +99,7 @@
14                       ori     7,7,0x8         \n\
15                       lswi    6,7,0x8         \n\
16                       mr      %0,6"
17 -                     : "=r" (kbd_status) :: "6", "7");
18 +                     : "=r" (kbd_status) : : "6", "7");
19  
20         __raw_writel(0x00000000, 0xff50000c);
21         eieio();
22 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/drivers/net/wireless/rayctl.h linux-2.6.27-720/drivers/net/wireless/rayctl.h
23 --- linux-2.6.27-710/drivers/net/wireless/rayctl.h      2008-10-09 18:13:53.000000000 -0400
24 +++ linux-2.6.27-720/drivers/net/wireless/rayctl.h      2009-05-04 12:31:56.000000000 -0400
25 @@ -418,9 +418,7 @@
26  };
27  
28  /****** Host-to-ECF Data Area at Shared RAM offset 0x200 *********************/
29 -struct host_to_ecf_area {
30 -    
31 -};
32 +EMPTY_STRUCT_DECL(host_to_ecf_area);
33  
34  /****** ECF-to-Host Data Area at Shared RAM offset 0x0300 ********************/
35  struct startup_res_518 {
36 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/drivers/video/i810/i810_main.h linux-2.6.27-720/drivers/video/i810/i810_main.h
37 --- linux-2.6.27-710/drivers/video/i810/i810_main.h     2008-10-09 18:13:53.000000000 -0400
38 +++ linux-2.6.27-720/drivers/video/i810/i810_main.h     2009-05-04 12:31:56.000000000 -0400
39 @@ -54,7 +54,7 @@
40  #ifdef CONFIG_X86
41  static inline void flush_cache(void)
42  {
43 -       asm volatile ("wbinvd":::"memory");
44 +       asm volatile ("wbinvd": : :"memory");
45  }
46  #else
47  #define flush_cache() do { } while(0)
48 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/fs/file_table.c linux-2.6.27-720/fs/file_table.c
49 --- linux-2.6.27-710/fs/file_table.c    2009-05-04 12:28:20.000000000 -0400
50 +++ linux-2.6.27-720/fs/file_table.c    2009-05-04 12:31:56.000000000 -0400
51 @@ -34,6 +34,8 @@
52  /* public. Not pretty! */
53  __cacheline_aligned_in_smp DEFINE_SPINLOCK(files_lock);
54  
55 +EXPORT_SYMBOL(files_lock);
56 +
57  static struct percpu_counter nr_files __cacheline_aligned_in_smp;
58  
59  static inline void file_free_rcu(struct rcu_head *head)
60 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/fs/super.c linux-2.6.27-720/fs/super.c
61 --- linux-2.6.27-710/fs/super.c 2009-05-04 12:28:20.000000000 -0400
62 +++ linux-2.6.27-720/fs/super.c 2009-05-04 12:31:56.000000000 -0400
63 @@ -48,6 +48,8 @@
64  LIST_HEAD(super_blocks);
65  DEFINE_SPINLOCK(sb_lock);
66  
67 +EXPORT_SYMBOL(sb_lock);
68 +
69  /**
70   *     alloc_super     -       create new superblock
71   *     @type:  filesystem type superblock should belong to
72 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-cris/arch-v10/io.h linux-2.6.27-720/include/asm-cris/arch-v10/io.h
73 --- linux-2.6.27-710/include/asm-cris/arch-v10/io.h     2008-10-09 18:13:53.000000000 -0400
74 +++ linux-2.6.27-720/include/asm-cris/arch-v10/io.h     2009-05-04 12:31:56.000000000 -0400
75 @@ -190,8 +190,8 @@
76   ({ int _Foofoo; __asm__ volatile ("bmod [%0],%0" : "=r" (_Foofoo) : "0" \
77                                (255)); _Foofoo; })
78  
79 -#define TRACE_OFF() do { __asm__ volatile ("bmod [%0],%0" :: "r" (254)); } while (0)
80 -#define SIM_END() do { __asm__ volatile ("bmod [%0],%0" :: "r" (28)); } while (0)
81 +#define TRACE_OFF() do { __asm__ volatile ("bmod [%0],%0" : : "r" (254)); } while (0)
82 +#define SIM_END() do { __asm__ volatile ("bmod [%0],%0" : : "r" (28)); } while (0)
83  #define CRIS_CYCLES() __extension__ \
84   ({ unsigned long c; asm ("bmod [%1],%0" : "=r" (c) : "r" (27)); c;})
85  #endif /* ! defined CONFIG_SVINTO_SIM */
86 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-cris/module.h linux-2.6.27-720/include/asm-cris/module.h
87 --- linux-2.6.27-710/include/asm-cris/module.h  2008-10-09 18:13:53.000000000 -0400
88 +++ linux-2.6.27-720/include/asm-cris/module.h  2009-05-04 12:31:56.000000000 -0400
89 @@ -1,7 +1,7 @@
90  #ifndef _ASM_CRIS_MODULE_H
91  #define _ASM_CRIS_MODULE_H
92  /* cris is simple */
93 -struct mod_arch_specific { };
94 +EMPTY_STRUCT_DECL(mod_arch_specific);
95  
96  #define Elf_Shdr Elf32_Shdr
97  #define Elf_Sym Elf32_Sym
98 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/bug.h linux-2.6.27-720/include/asm-frv/bug.h
99 --- linux-2.6.27-710/include/asm-frv/bug.h      2008-10-09 18:13:53.000000000 -0400
100 +++ linux-2.6.27-720/include/asm-frv/bug.h      2009-05-04 12:31:56.000000000 -0400
101 @@ -17,7 +17,7 @@
102  /*
103   * Tell the user there is some problem.
104   */
105 -extern asmlinkage void __debug_bug_trap(int signr);
106 +asmlinkage void __debug_bug_trap(int signr);
107  
108  #ifdef CONFIG_NO_KERNEL_MSG
109  #define        _debug_bug_printk()
110 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/fpu.h linux-2.6.27-720/include/asm-frv/fpu.h
111 --- linux-2.6.27-710/include/asm-frv/fpu.h      2008-10-09 18:13:53.000000000 -0400
112 +++ linux-2.6.27-720/include/asm-frv/fpu.h      2009-05-04 12:31:56.000000000 -0400
113 @@ -6,6 +6,6 @@
114   * MAX floating point unit state size (FSAVE/FRESTORE)
115   */
116  
117 -#define kernel_fpu_end() do { asm volatile("bar":::"memory"); preempt_enable(); } while(0)
118 +#define kernel_fpu_end() do { asm volatile("bar": : :"memory"); preempt_enable(); } while(0)
119  
120  #endif /* __ASM_FPU_H */
121 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/gdb-stub.h linux-2.6.27-720/include/asm-frv/gdb-stub.h
122 --- linux-2.6.27-710/include/asm-frv/gdb-stub.h 2008-10-09 18:13:53.000000000 -0400
123 +++ linux-2.6.27-720/include/asm-frv/gdb-stub.h 2009-05-04 12:31:56.000000000 -0400
124 @@ -87,14 +87,14 @@
125  extern void gdbstub_tx_flush(void);
126  extern void gdbstub_do_rx(void);
127  
128 -extern asmlinkage void __debug_stub_init_break(void);
129 -extern asmlinkage void __break_hijack_kernel_event(void);
130 -extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);
131 -extern asmlinkage void start_kernel(void);
132 -
133 -extern asmlinkage void gdbstub_rx_handler(void);
134 -extern asmlinkage void gdbstub_rx_irq(void);
135 -extern asmlinkage void gdbstub_intercept(void);
136 +asmlinkage void __debug_stub_init_break(void);
137 +asmlinkage void __break_hijack_kernel_event(void);
138 +asmlinkage void __break_hijack_kernel_event_breaks_here(void);
139 +asmlinkage void start_kernel(void);
140 +
141 +asmlinkage void gdbstub_rx_handler(void);
142 +asmlinkage void gdbstub_rx_irq(void);
143 +asmlinkage void gdbstub_intercept(void);
144  
145  extern uint32_t __entry_usertrap_table[];
146  extern uint32_t __entry_kerneltrap_table[];
147 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/highmem.h linux-2.6.27-720/include/asm-frv/highmem.h
148 --- linux-2.6.27-710/include/asm-frv/highmem.h  2008-10-09 18:13:53.000000000 -0400
149 +++ linux-2.6.27-720/include/asm-frv/highmem.h  2009-05-04 12:31:56.000000000 -0400
150 @@ -82,11 +82,11 @@
151         dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V;             \
152                                                                                                 \
153         if (type != __KM_CACHE)                                                                 \
154 -               asm volatile("movgs %0,dampr"#ampr :: "r"(dampr) : "memory");                   \
155 +               asm volatile("movgs %0,dampr"#ampr : : "r"(dampr) : "memory");                  \
156         else                                                                                    \
157                 asm volatile("movgs %0,iampr"#ampr"\n"                                          \
158                              "movgs %0,dampr"#ampr"\n"                                          \
159 -                            :: "r"(dampr) : "memory"                                           \
160 +                            : : "r"(dampr) : "memory"                                          \
161                              );                                                                 \
162                                                                                                 \
163         asm("movsg damlr"#ampr",%0" : "=r"(damlr));                                             \
164 @@ -140,9 +140,9 @@
165  
166  #define __kunmap_atomic_primary(type, ampr)                            \
167  do {                                                                   \
168 -       asm volatile("movgs gr0,dampr"#ampr"\n" ::: "memory");          \
169 +       asm volatile("movgs gr0,dampr"#ampr"\n" : : : "memory");        \
170         if (type == __KM_CACHE)                                         \
171 -               asm volatile("movgs gr0,iampr"#ampr"\n" ::: "memory");  \
172 +               asm volatile("movgs gr0,iampr"#ampr"\n" : : : "memory");\
173  } while(0)
174  
175  #define __kunmap_atomic_secondary(slot, vaddr)                         \
176 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/module.h linux-2.6.27-720/include/asm-frv/module.h
177 --- linux-2.6.27-710/include/asm-frv/module.h   2008-10-09 18:13:53.000000000 -0400
178 +++ linux-2.6.27-720/include/asm-frv/module.h   2009-05-04 12:31:56.000000000 -0400
179 @@ -11,9 +11,7 @@
180  #ifndef _ASM_MODULE_H
181  #define _ASM_MODULE_H
182  
183 -struct mod_arch_specific
184 -{
185 -};
186 +EMPTY_STRUCT_DECL(mod_arch_specific);
187  
188  #define Elf_Shdr       Elf32_Shdr
189  #define Elf_Sym                Elf32_Sym
190 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/pgtable.h linux-2.6.27-720/include/asm-frv/pgtable.h
191 --- linux-2.6.27-710/include/asm-frv/pgtable.h  2008-10-09 18:13:53.000000000 -0400
192 +++ linux-2.6.27-720/include/asm-frv/pgtable.h  2009-05-04 12:31:56.000000000 -0400
193 @@ -176,7 +176,7 @@
194  #define set_pte(pteptr, pteval)                                \
195  do {                                                   \
196         *(pteptr) = (pteval);                           \
197 -       asm volatile("dcf %M0" :: "U"(*pteptr));        \
198 +       asm volatile("dcf %M0" : : "U"(*pteptr));       \
199  } while(0)
200  #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
201  
202 @@ -210,7 +210,7 @@
203  #define set_pgd(pgdptr, pgdval)                                \
204  do {                                                   \
205         memcpy((pgdptr), &(pgdval), sizeof(pgd_t));     \
206 -       asm volatile("dcf %M0" :: "U"(*(pgdptr)));      \
207 +       asm volatile("dcf %M0" : : "U"(*(pgdptr)));     \
208  } while(0)
209  
210  static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
211 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/processor.h linux-2.6.27-720/include/asm-frv/processor.h
212 --- linux-2.6.27-710/include/asm-frv/processor.h        2008-10-09 18:13:53.000000000 -0400
213 +++ linux-2.6.27-720/include/asm-frv/processor.h        2009-05-04 12:31:56.000000000 -0400
214 @@ -111,9 +111,9 @@
215  {
216  }
217  
218 -extern asmlinkage int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
219 -extern asmlinkage void save_user_regs(struct user_context *target);
220 -extern asmlinkage void *restore_user_regs(const struct user_context *target, ...);
221 +asmlinkage int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
222 +asmlinkage void save_user_regs(struct user_context *target);
223 +asmlinkage void *restore_user_regs(const struct user_context *target, ...);
224  
225  #define copy_segments(tsk, mm)         do { } while (0)
226  #define release_segments(mm)           do { } while (0)
227 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/spr-regs.h linux-2.6.27-720/include/asm-frv/spr-regs.h
228 --- linux-2.6.27-710/include/asm-frv/spr-regs.h 2008-10-09 18:13:53.000000000 -0400
229 +++ linux-2.6.27-720/include/asm-frv/spr-regs.h 2009-05-04 12:31:56.000000000 -0400
230 @@ -343,7 +343,7 @@
231  
232  #define restore_dampr(R, _dampr)                       \
233  do {                                                   \
234 -       asm volatile("movgs %0,dampr"R :: "r"(_dampr)); \
235 +       asm volatile("movgs %0,dampr"R : : "r"(_dampr));        \
236  } while(0)
237  
238  /*
239 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-frv/system.h linux-2.6.27-720/include/asm-frv/system.h
240 --- linux-2.6.27-710/include/asm-frv/system.h   2008-10-09 18:13:53.000000000 -0400
241 +++ linux-2.6.27-720/include/asm-frv/system.h   2009-05-04 12:31:56.000000000 -0400
242 @@ -23,7 +23,7 @@
243   * `prev' will never be the same as `next'.
244   * The `mb' is to tell GCC not to cache `current' across this call.
245   */
246 -extern asmlinkage
247 +asmlinkage
248  struct task_struct *__switch_to(struct thread_struct *prev_thread,
249                                 struct thread_struct *next_thread,
250                                 struct task_struct *prev);
251 @@ -175,7 +175,7 @@
252  /*
253   * Force strict CPU ordering.
254   */
255 -#define nop()                  asm volatile ("nop"::)
256 +#define nop()                  asm volatile ("nop": :)
257  #define mb()                   asm volatile ("membar" : : :"memory")
258  #define rmb()                  asm volatile ("membar" : : :"memory")
259  #define wmb()                  asm volatile ("membar" : : :"memory")
260 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-m32r/module.h linux-2.6.27-720/include/asm-m32r/module.h
261 --- linux-2.6.27-710/include/asm-m32r/module.h  2008-10-09 18:13:53.000000000 -0400
262 +++ linux-2.6.27-720/include/asm-m32r/module.h  2009-05-04 12:31:56.000000000 -0400
263 @@ -1,7 +1,7 @@
264  #ifndef _ASM_M32R_MODULE_H
265  #define _ASM_M32R_MODULE_H
266  
267 -struct mod_arch_specific { };
268 +EMPTY_STRUCT_DECL(mod_arch_specific);
269  
270  #define Elf_Shdr       Elf32_Shdr
271  #define Elf_Sym                Elf32_Sym
272 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-m68k/system.h linux-2.6.27-720/include/asm-m68k/system.h
273 --- linux-2.6.27-710/include/asm-m68k/system.h  2008-10-09 18:13:53.000000000 -0400
274 +++ linux-2.6.27-720/include/asm-m68k/system.h  2009-05-04 12:31:56.000000000 -0400
275 @@ -167,23 +167,23 @@
276  #define __HAVE_ARCH_CMPXCHG    1
277  
278  static inline unsigned long __cmpxchg(volatile void *p, unsigned long old,
279 -                                     unsigned long new, int size)
280 +                                     unsigned long n, int size)
281  {
282         switch (size) {
283         case 1:
284                 __asm__ __volatile__ ("casb %0,%2,%1"
285                                       : "=d" (old), "=m" (*(char *)p)
286 -                                     : "d" (new), "0" (old), "m" (*(char *)p));
287 +                                     : "d" (n), "0" (old), "m" (*(char *)p));
288                 break;
289         case 2:
290                 __asm__ __volatile__ ("casw %0,%2,%1"
291                                       : "=d" (old), "=m" (*(short *)p)
292 -                                     : "d" (new), "0" (old), "m" (*(short *)p));
293 +                                     : "d" (n), "0" (old), "m" (*(short *)p));
294                 break;
295         case 4:
296                 __asm__ __volatile__ ("casl %0,%2,%1"
297                                       : "=d" (old), "=m" (*(int *)p)
298 -                                     : "d" (new), "0" (old), "m" (*(int *)p));
299 +                                     : "d" (n), "0" (old), "m" (*(int *)p));
300                 break;
301         }
302         return old;
303 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/fpu.h linux-2.6.27-720/include/asm-mips/fpu.h
304 --- linux-2.6.27-710/include/asm-mips/fpu.h     2008-10-09 18:13:53.000000000 -0400
305 +++ linux-2.6.27-720/include/asm-mips/fpu.h     2009-05-04 12:31:56.000000000 -0400
306 @@ -28,11 +28,11 @@
307  struct sigcontext;
308  struct sigcontext32;
309  
310 -extern asmlinkage int (*save_fp_context)(struct sigcontext __user *sc);
311 -extern asmlinkage int (*restore_fp_context)(struct sigcontext __user *sc);
312 +asmlinkage int (*save_fp_context)(struct sigcontext __user *sc);
313 +asmlinkage int (*restore_fp_context)(struct sigcontext __user *sc);
314  
315 -extern asmlinkage int (*save_fp_context32)(struct sigcontext32 __user *sc);
316 -extern asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc);
317 +asmlinkage int (*save_fp_context32)(struct sigcontext32 __user *sc);
318 +asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc);
319  
320  extern void fpu_emulator_init_fpu(void);
321  extern int fpu_emulator_save_context(struct sigcontext __user *sc);
322 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/io.h linux-2.6.27-720/include/asm-mips/io.h
323 --- linux-2.6.27-710/include/asm-mips/io.h      2008-10-09 18:13:53.000000000 -0400
324 +++ linux-2.6.27-720/include/asm-mips/io.h      2009-05-04 12:31:56.000000000 -0400
325 @@ -303,7 +303,7 @@
326         volatile type *__mem;                                           \
327         type __val;                                                     \
328                                                                         \
329 -       __mem = (void *)__swizzle_addr_##bwlq((unsigned long)(mem));    \
330 +       __mem = (type *)__swizzle_addr_##bwlq((unsigned long)(mem));    \
331                                                                         \
332         __val = pfx##ioswab##bwlq(__mem, val);                          \
333                                                                         \
334 @@ -336,7 +336,7 @@
335         volatile type *__mem;                                           \
336         type __val;                                                     \
337                                                                         \
338 -       __mem = (void *)__swizzle_addr_##bwlq((unsigned long)(mem));    \
339 +       __mem = (type *)__swizzle_addr_##bwlq((unsigned long)(mem));    \
340                                                                         \
341         if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \
342                 __val = *__mem;                                         \
343 @@ -370,7 +370,7 @@
344         volatile type *__addr;                                          \
345         type __val;                                                     \
346                                                                         \
347 -       __addr = (void *)__swizzle_addr_##bwlq(mips_io_port_base + port); \
348 +       __addr = (type *)__swizzle_addr_##bwlq(mips_io_port_base + port); \
349                                                                         \
350         __val = pfx##ioswab##bwlq(__addr, val);                         \
351                                                                         \
352 @@ -386,7 +386,7 @@
353         volatile type *__addr;                                          \
354         type __val;                                                     \
355                                                                         \
356 -       __addr = (void *)__swizzle_addr_##bwlq(mips_io_port_base + port); \
357 +       __addr = (type *)__swizzle_addr_##bwlq(mips_io_port_base + port); \
358                                                                         \
359         BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long));             \
360                                                                         \
361 @@ -448,7 +448,7 @@
362  static inline void writes##bwlq(volatile void __iomem *mem,            \
363                                 const void *addr, unsigned int count)   \
364  {                                                                      \
365 -       const volatile type *__addr = addr;                             \
366 +       const volatile type *__addr = (const type *) addr;              \
367                                                                         \
368         while (count--) {                                               \
369                 __mem_write##bwlq(*__addr, mem);                        \
370 @@ -459,7 +459,7 @@
371  static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \
372                                unsigned int count)                      \
373  {                                                                      \
374 -       volatile type *__addr = addr;                                   \
375 +       volatile type *__addr = (type *) addr;                          \
376                                                                         \
377         while (count--) {                                               \
378                 *__addr = __mem_read##bwlq(mem);                        \
379 @@ -472,7 +472,7 @@
380  static inline void outs##bwlq(unsigned long port, const void *addr,    \
381                               unsigned int count)                       \
382  {                                                                      \
383 -       const volatile type *__addr = addr;                             \
384 +       const volatile type *__addr = (const type *) addr;              \
385                                                                         \
386         while (count--) {                                               \
387                 __mem_out##bwlq(*__addr, port);                         \
388 @@ -483,7 +483,7 @@
389  static inline void ins##bwlq(unsigned long port, void *addr,           \
390                              unsigned int count)                        \
391  {                                                                      \
392 -       volatile type *__addr = addr;                                   \
393 +       volatile type *__addr = (type *) addr;                          \
394                                                                         \
395         while (count--) {                                               \
396                 *__addr = __mem_in##bwlq(port);                         \
397 @@ -505,7 +505,7 @@
398  
399  
400  /* Depends on MIPS II instruction set */
401 -#define mmiowb() asm volatile ("sync" ::: "memory")
402 +#define mmiowb() asm volatile ("sync" : : : "memory")
403  
404  static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count)
405  {
406 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/ip32/mace.h linux-2.6.27-720/include/asm-mips/ip32/mace.h
407 --- linux-2.6.27-710/include/asm-mips/ip32/mace.h       2008-10-09 18:13:53.000000000 -0400
408 +++ linux-2.6.27-720/include/asm-mips/ip32/mace.h       2009-05-04 12:31:56.000000000 -0400
409 @@ -308,11 +308,9 @@
410   */
411  
412  /* Parallel port */
413 -struct mace_parallel {
414 -};
415 +EMPTY_STRUCT_DECL(mace_parallel);
416  
417 -struct mace_ecp1284 {  /* later... */
418 -};
419 +EMPTY_STRUCT_DECL(mace_ecp1284);       /* later... */
420  
421  /* Serial port */
422  struct mace_serial {
423 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/mips-boards/sim.h linux-2.6.27-720/include/asm-mips/mips-boards/sim.h
424 --- linux-2.6.27-710/include/asm-mips/mips-boards/sim.h 2008-10-09 18:13:53.000000000 -0400
425 +++ linux-2.6.27-720/include/asm-mips/mips-boards/sim.h 2009-05-04 12:31:56.000000000 -0400
426 @@ -31,7 +31,7 @@
427  ({                                        \
428         __asm__  __volatile__( \
429          "sltiu $0,$0, %0" \
430 -               ::"i"(code)                                     \
431 +               : :"i"(code)                                    \
432                 ); \
433  })
434  
435 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/mipsregs.h linux-2.6.27-720/include/asm-mips/mipsregs.h
436 --- linux-2.6.27-710/include/asm-mips/mipsregs.h        2008-10-09 18:13:53.000000000 -0400
437 +++ linux-2.6.27-720/include/asm-mips/mipsregs.h        2009-05-04 12:31:56.000000000 -0400
438 @@ -1052,15 +1052,15 @@
439  #define mfhi2() ({ long mfhi2; __asm__("mfhi %0, $ac2" : "=r" (mfhi2)); mfhi2;})
440  #define mfhi3() ({ long mfhi3; __asm__("mfhi %0, $ac3" : "=r" (mfhi3)); mfhi3;})
441  
442 -#define mtlo0(x) __asm__("mtlo %0, $ac0" ::"r" (x))
443 -#define mtlo1(x) __asm__("mtlo %0, $ac1" ::"r" (x))
444 -#define mtlo2(x) __asm__("mtlo %0, $ac2" ::"r" (x))
445 -#define mtlo3(x) __asm__("mtlo %0, $ac3" ::"r" (x))
446 -
447 -#define mthi0(x) __asm__("mthi %0, $ac0" ::"r" (x))
448 -#define mthi1(x) __asm__("mthi %0, $ac1" ::"r" (x))
449 -#define mthi2(x) __asm__("mthi %0, $ac2" ::"r" (x))
450 -#define mthi3(x) __asm__("mthi %0, $ac3" ::"r" (x))
451 +#define mtlo0(x) __asm__("mtlo %0, $ac0" : :"r" (x))
452 +#define mtlo1(x) __asm__("mtlo %0, $ac1" : :"r" (x))
453 +#define mtlo2(x) __asm__("mtlo %0, $ac2" : :"r" (x))
454 +#define mtlo3(x) __asm__("mtlo %0, $ac3" : :"r" (x))
455 +
456 +#define mthi0(x) __asm__("mthi %0, $ac0" : :"r" (x))
457 +#define mthi1(x) __asm__("mthi %0, $ac1" : :"r" (x))
458 +#define mthi2(x) __asm__("mthi %0, $ac2" : :"r" (x))
459 +#define mthi3(x) __asm__("mthi %0, $ac3" : :"r" (x))
460  
461  #else
462  
463 @@ -1390,13 +1390,13 @@
464  }                                                              \
465                                                                 \
466  static inline unsigned int                                     \
467 -change_c0_##name(unsigned int change, unsigned int new)                \
468 +change_c0_##name(unsigned int change, unsigned int newval)     \
469  {                                                              \
470         unsigned int res;                                       \
471                                                                 \
472         res = read_c0_##name();                                 \
473         res &= ~change;                                         \
474 -       res |= (new & change);                                  \
475 +       res |= (newval & change);                               \
476         write_c0_##name(res);                                   \
477                                                                 \
478         return res;                                             \
479 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/paccess.h linux-2.6.27-720/include/asm-mips/paccess.h
480 --- linux-2.6.27-710/include/asm-mips/paccess.h 2008-10-09 18:13:53.000000000 -0400
481 +++ linux-2.6.27-720/include/asm-mips/paccess.h 2009-05-04 12:31:56.000000000 -0400
482 @@ -22,8 +22,8 @@
483  #define __PA_ADDR      ".dword"
484  #endif
485  
486 -extern asmlinkage void handle_ibe(void);
487 -extern asmlinkage void handle_dbe(void);
488 +asmlinkage void handle_ibe(void);
489 +asmlinkage void handle_dbe(void);
490  
491  #define put_dbe(x, ptr) __put_dbe((x), (ptr), sizeof(*(ptr)))
492  #define get_dbe(x, ptr) __get_dbe((x), (ptr), sizeof(*(ptr)))
493 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/processor.h linux-2.6.27-720/include/asm-mips/processor.h
494 --- linux-2.6.27-710/include/asm-mips/processor.h       2008-10-09 18:13:53.000000000 -0400
495 +++ linux-2.6.27-720/include/asm-mips/processor.h       2009-05-04 12:31:56.000000000 -0400
496 @@ -242,7 +242,7 @@
497   * overhead of a function call by forcing the compiler to save the return
498   * address register on the stack.
499   */
500 -#define return_address() ({__asm__ __volatile__("":::"$31");__builtin_return_address(0);})
501 +#define return_address() ({__asm__ __volatile__("": : :"$31");__builtin_return_address(0);})
502  
503  #ifdef CONFIG_CPU_HAS_PREFETCH
504  
505 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/ptrace.h linux-2.6.27-720/include/asm-mips/ptrace.h
506 --- linux-2.6.27-710/include/asm-mips/ptrace.h  2008-10-09 18:13:53.000000000 -0400
507 +++ linux-2.6.27-720/include/asm-mips/ptrace.h  2009-05-04 12:31:56.000000000 -0400
508 @@ -84,7 +84,7 @@
509  #define instruction_pointer(regs) ((regs)->cp0_epc)
510  #define profile_pc(regs) instruction_pointer(regs)
511  
512 -extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit);
513 +asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit);
514  
515  extern NORET_TYPE void die(const char *, const struct pt_regs *) ATTRIB_NORET;
516  
517 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/smp.h linux-2.6.27-720/include/asm-mips/smp.h
518 --- linux-2.6.27-710/include/asm-mips/smp.h     2008-10-09 18:13:53.000000000 -0400
519 +++ linux-2.6.27-720/include/asm-mips/smp.h     2009-05-04 12:31:56.000000000 -0400
520 @@ -55,7 +55,7 @@
521         mp_ops->send_ipi_single(cpu, SMP_RESCHEDULE_YOURSELF);
522  }
523  
524 -extern asmlinkage void smp_call_function_interrupt(void);
525 +asmlinkage void smp_call_function_interrupt(void);
526  
527  extern void arch_send_call_function_single_ipi(int cpu);
528  extern void arch_send_call_function_ipi(cpumask_t mask);
529 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-mips/system.h linux-2.6.27-720/include/asm-mips/system.h
530 --- linux-2.6.27-710/include/asm-mips/system.h  2008-10-09 18:13:53.000000000 -0400
531 +++ linux-2.6.27-720/include/asm-mips/system.h  2009-05-04 12:31:56.000000000 -0400
532 @@ -27,7 +27,7 @@
533   * switch_to(n) should switch tasks to task nr n, first
534   * checking that n isn't the current task, in which case it does nothing.
535   */
536 -extern asmlinkage void *resume(void *last, void *next, void *next_ti);
537 +asmlinkage void *resume(void *last, void *next, void *next_ti);
538  
539  struct task_struct;
540  
541 @@ -189,9 +189,9 @@
542  {
543         switch (size) {
544         case 4:
545 -               return __xchg_u32(ptr, x);
546 +               return __xchg_u32((volatile int *) ptr, x);
547         case 8:
548 -               return __xchg_u64(ptr, x);
549 +               return __xchg_u64((volatile __u64 *) ptr, x);
550         }
551         __xchg_called_with_bad_pointer();
552         return x;
553 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-parisc/system.h linux-2.6.27-720/include/asm-parisc/system.h
554 --- linux-2.6.27-710/include/asm-parisc/system.h        2008-10-09 18:13:53.000000000 -0400
555 +++ linux-2.6.27-720/include/asm-parisc/system.h        2009-05-04 12:31:56.000000000 -0400
556 @@ -122,7 +122,7 @@
557  ** The __asm__ op below simple prevents gcc/ld from reordering
558  ** instructions across the mb() "call".
559  */
560 -#define mb()           __asm__ __volatile__("":::"memory")     /* barrier() */
561 +#define mb()           __asm__ __volatile__("": : :"memory")   /* barrier() */
562  #define rmb()          mb()
563  #define wmb()          mb()
564  #define smp_mb()       mb()
565 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-um/module-i386.h linux-2.6.27-720/include/asm-um/module-i386.h
566 --- linux-2.6.27-710/include/asm-um/module-i386.h       2008-10-09 18:13:53.000000000 -0400
567 +++ linux-2.6.27-720/include/asm-um/module-i386.h       2009-05-04 12:31:56.000000000 -0400
568 @@ -2,9 +2,7 @@
569  #define __UM_MODULE_I386_H
570  
571  /* UML is simple */
572 -struct mod_arch_specific
573 -{
574 -};
575 +EMPTY_STRUCT_DECL(mod_arch_specific);
576  
577  #define Elf_Shdr Elf32_Shdr
578  #define Elf_Sym Elf32_Sym
579 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-um/module-x86_64.h linux-2.6.27-720/include/asm-um/module-x86_64.h
580 --- linux-2.6.27-710/include/asm-um/module-x86_64.h     2008-10-09 18:13:53.000000000 -0400
581 +++ linux-2.6.27-720/include/asm-um/module-x86_64.h     2009-05-04 12:31:56.000000000 -0400
582 @@ -8,9 +8,7 @@
583  #define __UM_MODULE_X86_64_H
584  
585  /* UML is simple */
586 -struct mod_arch_specific
587 -{
588 -};
589 +EMPTY_STRUCT_DECL(mod_arch_specific);
590  
591  #define Elf_Shdr Elf64_Shdr
592  #define Elf_Sym Elf64_Sym
593 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/bitops.h linux-2.6.27-720/include/asm-x86/bitops.h
594 --- linux-2.6.27-710/include/asm-x86/bitops.h   2008-10-09 18:13:53.000000000 -0400
595 +++ linux-2.6.27-720/include/asm-x86/bitops.h   2009-05-04 12:31:57.000000000 -0400
596 @@ -35,7 +35,7 @@
597   * a mask operation on a byte.
598   */
599  #define IS_IMMEDIATE(nr)               (__builtin_constant_p(nr))
600 -#define CONST_MASK_ADDR(nr, addr)      BITOP_ADDR((void *)(addr) + ((nr)>>3))
601 +#define CONST_MASK_ADDR(nr, addr)      BITOP_ADDR((char *)(addr) + ((nr)>>3))
602  #define CONST_MASK(nr)                 (1 << ((nr) & 7))
603  
604  /**
605 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/desc.h linux-2.6.27-720/include/asm-x86/desc.h
606 --- linux-2.6.27-710/include/asm-x86/desc.h     2008-10-09 18:13:53.000000000 -0400
607 +++ linux-2.6.27-720/include/asm-x86/desc.h     2009-05-04 12:31:57.000000000 -0400
608 @@ -70,7 +70,7 @@
609  
610  static inline int desc_empty(const void *ptr)
611  {
612 -       const u32 *desc = ptr;
613 +       const u32 *desc = (const u32 *) ptr;
614         return !(desc[0] | desc[1]);
615  }
616  
617 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/hw_irq.h linux-2.6.27-720/include/asm-x86/hw_irq.h
618 --- linux-2.6.27-710/include/asm-x86/hw_irq.h   2008-10-09 18:13:53.000000000 -0400
619 +++ linux-2.6.27-720/include/asm-x86/hw_irq.h   2009-05-04 12:31:57.000000000 -0400
620 @@ -84,6 +84,16 @@
621  extern void eisa_set_level_irq(unsigned int irq);
622  
623  /* Voyager functions */
624 +#ifdef __cplusplus
625 +asmlinkage void vic_cpi_interrupt(void);
626 +asmlinkage void vic_sys_interrupt(void);
627 +asmlinkage void vic_cmn_interrupt(void);
628 +asmlinkage void qic_timer_interrupt(void);
629 +asmlinkage void qic_invalidate_interrupt(void);
630 +asmlinkage void qic_reschedule_interrupt(void);
631 +asmlinkage void qic_enable_irq_interrupt(void);
632 +asmlinkage void qic_call_function_interrupt(void);
633 +#else
634  extern asmlinkage void vic_cpi_interrupt(void);
635  extern asmlinkage void vic_sys_interrupt(void);
636  extern asmlinkage void vic_cmn_interrupt(void);
637 @@ -93,6 +103,8 @@
638  extern asmlinkage void qic_enable_irq_interrupt(void);
639  extern asmlinkage void qic_call_function_interrupt(void);
640  
641 +#endif
642 +
643  #ifdef CONFIG_X86_32
644  extern void (*const interrupt[NR_IRQS])(void);
645  #else
646 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/page.h linux-2.6.27-720/include/asm-x86/page.h
647 --- linux-2.6.27-710/include/asm-x86/page.h     2008-10-09 18:13:53.000000000 -0400
648 +++ linux-2.6.27-720/include/asm-x86/page.h     2009-05-04 12:31:57.000000000 -0400
649 @@ -138,7 +138,7 @@
650  
651  static inline pte_t native_make_pte(pteval_t val)
652  {
653 -       return (pte_t) { .pte = val };
654 +       return (pte_t) ({pte_t duh; duh.pte = val;duh;});
655  }
656  
657  static inline pteval_t native_pte_val(pte_t pte)
658 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/paravirt.h linux-2.6.27-720/include/asm-x86/paravirt.h
659 --- linux-2.6.27-710/include/asm-x86/paravirt.h 2008-10-09 18:13:53.000000000 -0400
660 +++ linux-2.6.27-720/include/asm-x86/paravirt.h 2009-05-04 12:31:57.000000000 -0400
661 @@ -1060,7 +1060,7 @@
662                                  pv_mmu_ops.make_pte,
663                                  val);
664  
665 -       return (pte_t) { .pte = ret };
666 +       return (pte_t) ({pte_t duh; duh.pte = ret;duh;});
667  }
668  
669  static inline pteval_t pte_val(pte_t pte)
670 @@ -1131,7 +1131,7 @@
671         ret = PVOP_CALL3(pteval_t, pv_mmu_ops.ptep_modify_prot_start,
672                          mm, addr, ptep);
673  
674 -       return (pte_t) { .pte = ret };
675 +       return (pte_t) ({pte_t duh; duh.pte = ret;duh;});
676  }
677  
678  static inline void ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
679 @@ -1314,10 +1314,12 @@
680         set_pte_at(mm, addr, ptep, __pte(0));
681  }
682  
683 +/*
684  static inline void pmd_clear(pmd_t *pmdp)
685  {
686         set_pmd(pmdp, __pmd(0));
687  }
688 +*/
689  #endif /* CONFIG_X86_PAE */
690  
691  /* Lazy mode for batching updates / context switch */
692 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/pgtable-2level.h linux-2.6.27-720/include/asm-x86/pgtable-2level.h
693 --- linux-2.6.27-710/include/asm-x86/pgtable-2level.h   2008-10-09 18:13:53.000000000 -0400
694 +++ linux-2.6.27-720/include/asm-x86/pgtable-2level.h   2009-05-04 12:31:57.000000000 -0400
695 @@ -33,10 +33,12 @@
696         native_set_pte(ptep, pte);
697  }
698  
699 +/*
700  static inline void native_pmd_clear(pmd_t *pmdp)
701  {
702         native_set_pmd(pmdp, __pmd(0));
703  }
704 +*/
705  
706  static inline void native_pte_clear(struct mm_struct *mm,
707                                     unsigned long addr, pte_t *xp)
708 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/pgtable.h linux-2.6.27-720/include/asm-x86/pgtable.h
709 --- linux-2.6.27-710/include/asm-x86/pgtable.h  2008-10-09 18:13:53.000000000 -0400
710 +++ linux-2.6.27-720/include/asm-x86/pgtable.h  2009-05-04 12:31:57.000000000 -0400
711 @@ -260,11 +260,13 @@
712                       pgprot_val(pgprot)) & __supported_pte_mask);
713  }
714  
715 +/*
716  static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot)
717  {
718         return __pmd((((phys_addr_t)page_nr << PAGE_SHIFT) |
719                       pgprot_val(pgprot)) & __supported_pte_mask);
720  }
721 +*/
722  
723  static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
724  {
725 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/spinlock_types.h linux-2.6.27-720/include/asm-x86/spinlock_types.h
726 --- linux-2.6.27-710/include/asm-x86/spinlock_types.h   2008-10-09 18:13:53.000000000 -0400
727 +++ linux-2.6.27-720/include/asm-x86/spinlock_types.h   2009-05-04 12:31:57.000000000 -0400
728 @@ -9,12 +9,19 @@
729         unsigned int slock;
730  } raw_spinlock_t;
731  
732 +#ifndef __cplusplus
733  #define __RAW_SPIN_LOCK_UNLOCKED       { 0 }
734 +#else
735 +#define __RAW_SPIN_LOCK_UNLOCKED       ({raw_spinlock_t duh; duh.slock=0;duh;})
736 +#endif
737  
738  typedef struct {
739         unsigned int lock;
740  } raw_rwlock_t;
741  
742 +#ifndef __cplusplus
743  #define __RAW_RW_LOCK_UNLOCKED         { RW_LOCK_BIAS }
744 -
745 +#else
746 +#define __RAW_RW_LOCK_UNLOCKED         ({raw_rwlock_t duh;duh.lock=RW_LOCK_BIAS;duh;})
747 +#endif
748  #endif
749 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-x86/vdso.h linux-2.6.27-720/include/asm-x86/vdso.h
750 --- linux-2.6.27-710/include/asm-x86/vdso.h     2008-10-09 18:13:53.000000000 -0400
751 +++ linux-2.6.27-720/include/asm-x86/vdso.h     2009-05-04 12:31:57.000000000 -0400
752 @@ -33,8 +33,8 @@
753   * These symbols are defined with the addresses in the vsyscall page.
754   * See vsyscall-sigreturn.S.
755   */
756 -extern void __user __kernel_sigreturn;
757 -extern void __user __kernel_rt_sigreturn;
758 +extern void* __user __kernel_sigreturn;
759 +extern void* __user __kernel_rt_sigreturn;
760  
761  /*
762   * These symbols are defined by vdso32.S to mark the bounds
763 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-xtensa/module.h linux-2.6.27-720/include/asm-xtensa/module.h
764 --- linux-2.6.27-710/include/asm-xtensa/module.h        2008-10-09 18:13:53.000000000 -0400
765 +++ linux-2.6.27-720/include/asm-xtensa/module.h        2009-05-04 12:31:57.000000000 -0400
766 @@ -13,10 +13,7 @@
767  #ifndef _XTENSA_MODULE_H
768  #define _XTENSA_MODULE_H
769  
770 -struct mod_arch_specific
771 -{
772 -       /* No special elements, yet. */
773 -};
774 +EMPTY_STRUCT_DECL(mod_arch_specific);
775  
776  #define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " "
777  
778 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-xtensa/processor.h linux-2.6.27-720/include/asm-xtensa/processor.h
779 --- linux-2.6.27-710/include/asm-xtensa/processor.h     2008-10-09 18:13:53.000000000 -0400
780 +++ linux-2.6.27-720/include/asm-xtensa/processor.h     2009-05-04 12:31:57.000000000 -0400
781 @@ -183,7 +183,7 @@
782  
783  /* Special register access. */
784  
785 -#define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v));
786 +#define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) : : "a"(v));
787  #define RSR(v,sr) __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v));
788  
789  #define set_sr(x,sr) ({unsigned int v=(unsigned int)x; WSR(v,sr);})
790 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/asm-xtensa/system.h linux-2.6.27-720/include/asm-xtensa/system.h
791 --- linux-2.6.27-710/include/asm-xtensa/system.h        2008-10-09 18:13:53.000000000 -0400
792 +++ linux-2.6.27-720/include/asm-xtensa/system.h        2009-05-04 12:31:57.000000000 -0400
793 @@ -21,21 +21,21 @@
794         __asm__ __volatile__ ("rsr %0,"__stringify(PS) : "=a" (x));
795  #define local_irq_restore(x)   do {                                    \
796         __asm__ __volatile__ ("wsr %0, "__stringify(PS)" ; rsync"       \
797 -                             :: "a" (x) : "memory"); } while(0);
798 +                             : : "a" (x) : "memory"); } while(0);
799  #define local_irq_save(x)      do {                                    \
800         __asm__ __volatile__ ("rsil %0, "__stringify(LOCKLEVEL)         \
801 -                             : "=a" (x) :: "memory");} while(0);
802 +                             : "=a" (x) : : "memory");} while(0);
803  
804  static inline void local_irq_disable(void)
805  {
806         unsigned long flags;
807         __asm__ __volatile__ ("rsil %0, "__stringify(LOCKLEVEL)
808 -                             : "=a" (flags) :: "memory");
809 +                             : "=a" (flags) : : "memory");
810  }
811  static inline void local_irq_enable(void)
812  {
813         unsigned long flags;
814 -       __asm__ __volatile__ ("rsil %0, 0" : "=a" (flags) :: "memory");
815 +       __asm__ __volatile__ ("rsil %0, 0" : "=a" (flags) : : "memory");
816  
817  }
818  
819 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/backing-dev.h linux-2.6.27-720/include/linux/backing-dev.h
820 --- linux-2.6.27-710/include/linux/backing-dev.h        2008-10-09 18:13:53.000000000 -0400
821 +++ linux-2.6.27-720/include/linux/backing-dev.h        2009-05-04 12:31:57.000000000 -0400
822 @@ -29,7 +29,7 @@
823         BDI_unused,             /* Available bits start here */
824  };
825  
826 -typedef int (congested_fn)(void *, int);
827 +typedef int (congested_fn_t)(void *, int);
828  
829  enum bdi_stat_item {
830         BDI_RECLAIMABLE,
831 @@ -43,7 +43,7 @@
832         unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */
833         unsigned long state;    /* Always use atomic bitops on this */
834         unsigned int capabilities; /* Device capabilities */
835 -       congested_fn *congested_fn; /* Function pointer if device is md/dm */
836 +       congested_fn_t *congested_fn; /* Function pointer if device is md/dm */
837         void *congested_data;   /* Pointer to aux data for congested func */
838         void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
839         void *unplug_io_data;
840 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/compat.h linux-2.6.27-720/include/linux/compat.h
841 --- linux-2.6.27-710/include/linux/compat.h     2009-05-04 12:28:19.000000000 -0400
842 +++ linux-2.6.27-720/include/linux/compat.h     2009-05-04 12:31:57.000000000 -0400
843 @@ -115,7 +115,7 @@
844  
845  struct compat_siginfo;
846  
847 -extern asmlinkage long compat_sys_waitid(int, compat_pid_t,
848 +asmlinkage long compat_sys_waitid(int, compat_pid_t,
849                 struct compat_siginfo __user *, int,
850                 struct compat_rusage __user *);
851  
852 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/dmaengine.h linux-2.6.27-720/include/linux/dmaengine.h
853 --- linux-2.6.27-710/include/linux/dmaengine.h  2008-10-09 18:13:53.000000000 -0400
854 +++ linux-2.6.27-720/include/linux/dmaengine.h  2009-05-04 12:31:57.000000000 -0400
855 @@ -377,7 +377,7 @@
856  
857  static inline void async_tx_ack(struct dma_async_tx_descriptor *tx)
858  {
859 -       tx->flags |= DMA_CTRL_ACK;
860 +       tx->flags = (enum dma_ctrl_flags) (tx->flags | DMA_CTRL_ACK);
861  }
862  
863  static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx)
864 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/dqblk_v1.h linux-2.6.27-720/include/linux/dqblk_v1.h
865 --- linux-2.6.27-710/include/linux/dqblk_v1.h   2008-10-09 18:13:53.000000000 -0400
866 +++ linux-2.6.27-720/include/linux/dqblk_v1.h   2009-05-04 12:31:57.000000000 -0400
867 @@ -18,7 +18,6 @@
868  #define V1_DEL_REWRITE 2
869  
870  /* Special information about quotafile */
871 -struct v1_mem_dqinfo {
872 -};
873 +EMPTY_STRUCT_DECL(v1_mem_dqinfo);
874  
875  #endif /* _LINUX_DQBLK_V1_H */
876 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/fs.h linux-2.6.27-720/include/linux/fs.h
877 --- linux-2.6.27-710/include/linux/fs.h 2009-05-04 12:28:32.000000000 -0400
878 +++ linux-2.6.27-720/include/linux/fs.h 2009-05-04 12:31:57.000000000 -0400
879 @@ -2111,7 +2111,7 @@
880  
881  static inline void simple_transaction_set(struct file *file, size_t n)
882  {
883 -       struct simple_transaction_argresp *ar = file->private_data;
884 +       struct simple_transaction_argresp *ar = (struct simple_transaction_argresp *) file->private_data;
885  
886         BUG_ON(n > SIMPLE_TRANSACTION_LIMIT);
887  
888 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/highmem.h linux-2.6.27-720/include/linux/highmem.h
889 --- linux-2.6.27-710/include/linux/highmem.h    2008-10-09 18:13:53.000000000 -0400
890 +++ linux-2.6.27-720/include/linux/highmem.h    2009-05-04 12:31:57.000000000 -0400
891 @@ -165,8 +165,8 @@
892  {
893         char *vfrom, *vto;
894  
895 -       vfrom = kmap_atomic(from, KM_USER0);
896 -       vto = kmap_atomic(to, KM_USER1);
897 +       vfrom = (char*)kmap_atomic(from, KM_USER0);
898 +       vto = (char*)kmap_atomic(to, KM_USER1);
899         copy_user_page(vto, vfrom, vaddr, to);
900         kunmap_atomic(vfrom, KM_USER0);
901         kunmap_atomic(vto, KM_USER1);
902 @@ -178,8 +178,8 @@
903  {
904         char *vfrom, *vto;
905  
906 -       vfrom = kmap_atomic(from, KM_USER0);
907 -       vto = kmap_atomic(to, KM_USER1);
908 +       vfrom = (char*)kmap_atomic(from, KM_USER0);
909 +       vto = (char*)kmap_atomic(to, KM_USER1);
910         copy_page(vto, vfrom);
911         kunmap_atomic(vfrom, KM_USER0);
912         kunmap_atomic(vto, KM_USER1);
913 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/hrtimer.h linux-2.6.27-720/include/linux/hrtimer.h
914 --- linux-2.6.27-710/include/linux/hrtimer.h    2008-10-09 18:13:53.000000000 -0400
915 +++ linux-2.6.27-720/include/linux/hrtimer.h    2009-05-04 12:31:57.000000000 -0400
916 @@ -384,7 +384,7 @@
917  static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
918  {
919         timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
920 -                                timer->function, timer->start_comm, 0);
921 +                                (void *) timer->function, timer->start_comm, 0);
922  }
923  
924  extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer,
925 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/inetdevice.h linux-2.6.27-720/include/linux/inetdevice.h
926 --- linux-2.6.27-710/include/linux/inetdevice.h 2008-10-09 18:13:53.000000000 -0400
927 +++ linux-2.6.27-720/include/linux/inetdevice.h 2009-05-04 12:31:57.000000000 -0400
928 @@ -166,7 +166,7 @@
929  
930  static inline struct in_device *__in_dev_get_rcu(const struct net_device *dev)
931  {
932 -       struct in_device *in_dev = dev->ip_ptr;
933 +       struct in_device *in_dev = (struct in_device *) dev->ip_ptr;
934         if (in_dev)
935                 in_dev = rcu_dereference(in_dev);
936         return in_dev;
937 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/jhash.h linux-2.6.27-720/include/linux/jhash.h
938 --- linux-2.6.27-710/include/linux/jhash.h      2008-10-09 18:13:53.000000000 -0400
939 +++ linux-2.6.27-720/include/linux/jhash.h      2009-05-04 12:31:57.000000000 -0400
940 @@ -44,7 +44,7 @@
941  static inline u32 jhash(const void *key, u32 length, u32 initval)
942  {
943         u32 a, b, c, len;
944 -       const u8 *k = key;
945 +       const u8 *k = (const u8 *) key;
946  
947         len = length;
948         a = b = JHASH_GOLDEN_RATIO;
949 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/kernel.h linux-2.6.27-720/include/linux/kernel.h
950 --- linux-2.6.27-710/include/linux/kernel.h     2008-10-09 18:13:53.000000000 -0400
951 +++ linux-2.6.27-720/include/linux/kernel.h     2009-05-04 12:31:57.000000000 -0400
952 @@ -213,7 +213,7 @@
953                 { return false; }
954  #endif
955  
956 -extern void asmlinkage __attribute__((format(printf, 1, 2)))
957 +asmlinkage void __attribute__((format(printf, 1, 2)))
958         early_printk(const char *fmt, ...);
959  
960  unsigned long int_sqrt(unsigned long);
961 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/ktime.h linux-2.6.27-720/include/linux/ktime.h
962 --- linux-2.6.27-710/include/linux/ktime.h      2008-10-09 18:13:53.000000000 -0400
963 +++ linux-2.6.27-720/include/linux/ktime.h      2009-05-04 12:31:57.000000000 -0400
964 @@ -71,6 +71,12 @@
965  
966  #if (BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)
967  
968 +#ifdef __cplusplus
969 +# define KTIME_TV64(__s)       ({ ktime_t __kt; __kt.tv64 = (__s); __kt; })
970 +#else
971 +# define KTIME_TV64(__s)       ((ktime_t) { .tv64 = (__s) })
972 +#endif
973 +
974  /**
975   * ktime_set - Set a ktime_t variable from a seconds/nanoseconds value
976   * @secs:      seconds to set
977 @@ -82,32 +88,37 @@
978  {
979  #if (BITS_PER_LONG == 64)
980         if (unlikely(secs >= KTIME_SEC_MAX))
981 -               return (ktime_t){ .tv64 = KTIME_MAX };
982 +               return KTIME_TV64(KTIME_MAX);
983  #endif
984 -       return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs };
985 +       return KTIME_TV64((s64)secs * NSEC_PER_SEC + (s64)nsecs);
986  }
987  
988  /* Subtract two ktime_t variables. rem = lhs -rhs: */
989  #define ktime_sub(lhs, rhs) \
990 -               ({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
991 +               KTIME_TV64((lhs).tv64 - (rhs).tv64)
992  
993  /* Add two ktime_t variables. res = lhs + rhs: */
994  #define ktime_add(lhs, rhs) \
995 -               ({ (ktime_t){ .tv64 = (lhs).tv64 + (rhs).tv64 }; })
996 +               KTIME_TV64((lhs).tv64 + (rhs).tv64)
997  
998  /*
999   * Add a ktime_t variable and a scalar nanosecond value.
1000   * res = kt + nsval:
1001   */
1002  #define ktime_add_ns(kt, nsval) \
1003 -               ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; })
1004 +               KTIME_TV64((kt).tv64 + (nsval))
1005  
1006  /*
1007   * Subtract a scalar nanosecod from a ktime_t variable
1008   * res = kt - nsval:
1009   */
1010 +#ifdef __cplusplus
1011 +#define ktime_sub_ns(kt, nsval) \
1012 +               ({ktime_t duh; duh.tv64 = (kt).tv64 - (nsval); duh; })
1013 +#else
1014  #define ktime_sub_ns(kt, nsval) \
1015                 ({ (ktime_t){ .tv64 = (kt).tv64 - (nsval) }; })
1016 +#endif
1017  
1018  /* convert a timespec to ktime_t format: */
1019  static inline ktime_t timespec_to_ktime(struct timespec ts)
1020 @@ -132,6 +143,18 @@
1021  
1022  #else
1023  
1024 +#ifdef __cplusplus
1025 +# define KTIME_TV64(__s)               ({ ktime_t __kt; __kt.tv64 = (__s); __kt; })
1026 +# define KTIME_SEC_NSEC(__sec, __nsec) ({ ktime_t __kt; __kt.tv.sec = (__sec); __kt.tv.nsec = (__nsec); __kt; })
1027 +# define TIMEVAL_SEC_USEC(__sec, __usec) ({ struct timeval __tv; __tv.tv_sec = (__sec); __tv.tv_usec = (__usec); __tv; })
1028 +# define TIMESPEC_SEC_NSEC(__sec, __nsec) ({ struct timespec __ts; __ts.tv_sec = (__sec); __ts.tv_nsec = (__nsec); __ts; })
1029 +#else
1030 +# define KTIME_TV64(__s)               ((ktime_t) { .tv64 = (__s) })
1031 +# define KTIME_SEC_NSEC(__sec, __nsec) ((ktime_t) { .tv = { .sec = (__sec), .nsec = (__nsec) } })
1032 +# define TIMEVAL_SEC_USEC(__sec, __usec) ((struct timeval) { .tv_sec = (__sec), .tv_usec = (__usec) })
1033 +# define TIMESPEC_SEC_NSEC(__sec, __nsec) ((struct timespec) { .tv_sec = (__sec), .tv_nsec = (__nsec) })
1034 +#endif
1035 +
1036  /*
1037   * Helper macros/inlines to get the ktime_t math right in the timespec
1038   * representation. The macros are sometimes ugly - their actual use is
1039 @@ -150,7 +173,7 @@
1040  /* Set a ktime_t variable to a value in sec/nsec representation: */
1041  static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
1042  {
1043 -       return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } };
1044 +       return KTIME_SEC_NSEC(secs, nsecs);
1045  }
1046  
1047  /**
1048 @@ -223,8 +246,7 @@
1049   */
1050  static inline ktime_t timespec_to_ktime(const struct timespec ts)
1051  {
1052 -       return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec,
1053 -                                  .nsec = (s32)ts.tv_nsec } };
1054 +       return KTIME_SEC_NSEC((s32)ts.tv_sec, (s32)ts.tv_nsec);
1055  }
1056  
1057  /**
1058 @@ -235,8 +257,7 @@
1059   */
1060  static inline ktime_t timeval_to_ktime(const struct timeval tv)
1061  {
1062 -       return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec,
1063 -                                  .nsec = (s32)tv.tv_usec * 1000 } };
1064 +       return KTIME_SEC_NSEC((s32)tv.tv_sec, (s32)tv.tv_usec * 1000);
1065  }
1066  
1067  /**
1068 @@ -247,8 +268,7 @@
1069   */
1070  static inline struct timespec ktime_to_timespec(const ktime_t kt)
1071  {
1072 -       return (struct timespec) { .tv_sec = (time_t) kt.tv.sec,
1073 -                                  .tv_nsec = (long) kt.tv.nsec };
1074 +       return TIMESPEC_SEC_NSEC((time_t) kt.tv.sec, (long) kt.tv.nsec);
1075  }
1076  
1077  /**
1078 @@ -259,9 +279,8 @@
1079   */
1080  static inline struct timeval ktime_to_timeval(const ktime_t kt)
1081  {
1082 -       return (struct timeval) {
1083 -               .tv_sec = (time_t) kt.tv.sec,
1084 -               .tv_usec = (suseconds_t) (kt.tv.nsec / NSEC_PER_USEC) };
1085 +       return TIMEVAL_SEC_USEC((time_t) kt.tv.sec,
1086 +                               (suseconds_t) (kt.tv.nsec / NSEC_PER_USEC));
1087  }
1088  
1089  /**
1090 @@ -329,7 +348,7 @@
1091  
1092  static inline ktime_t ns_to_ktime(u64 ns)
1093  {
1094 -       static const ktime_t ktime_zero = { .tv64 = 0 };
1095 +       static const ktime_t ktime_zero = ({ktime_t duh; duh.tv64 = 0;duh;});
1096         return ktime_add_ns(ktime_zero, ns);
1097  }
1098  
1099 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/linkage.h linux-2.6.27-720/include/linux/linkage.h
1100 --- linux-2.6.27-710/include/linux/linkage.h    2008-10-09 18:13:53.000000000 -0400
1101 +++ linux-2.6.27-720/include/linux/linkage.h    2009-05-04 12:31:57.000000000 -0400
1102 @@ -11,6 +11,13 @@
1103  #else
1104  #define CPP_ASMLINKAGE
1105  #endif
1106 +#ifndef extern_asmlinkage
1107 +# ifdef __cplusplus
1108 +#  define extern_asmlinkage asmlinkage
1109 +# else
1110 +#  define extern_asmlinkage extern asmlinkage
1111 +# endif
1112 +#endif
1113  
1114  #ifndef asmlinkage
1115  #define asmlinkage CPP_ASMLINKAGE
1116 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/list.h linux-2.6.27-720/include/linux/list.h
1117 --- linux-2.6.27-710/include/linux/list.h       2008-10-09 18:13:53.000000000 -0400
1118 +++ linux-2.6.27-720/include/linux/list.h       2009-05-04 12:31:57.000000000 -0400
1119 @@ -20,7 +20,11 @@
1120         struct list_head *next, *prev;
1121  };
1122  
1123 +#ifdef __cplusplus
1124 +#define LIST_HEAD_INIT(name) ({struct list_head duh;duh.next=&(name);duh.prev=&(name);duh;})
1125 +#else
1126  #define LIST_HEAD_INIT(name) { &(name), &(name) }
1127 +#endif
1128  
1129  #define LIST_HEAD(name) \
1130         struct list_head name = LIST_HEAD_INIT(name)
1131 @@ -103,8 +107,8 @@
1132  static inline void list_del(struct list_head *entry)
1133  {
1134         __list_del(entry->prev, entry->next);
1135 -       entry->next = LIST_POISON1;
1136 -       entry->prev = LIST_POISON2;
1137 +       entry->next = (struct list_head*)(LIST_POISON1);
1138 +       entry->prev = (struct list_head*)(LIST_POISON2);
1139  }
1140  #else
1141  extern void list_del(struct list_head *entry);
1142 @@ -576,8 +580,8 @@
1143  static inline void hlist_del(struct hlist_node *n)
1144  {
1145         __hlist_del(n);
1146 -       n->next = LIST_POISON1;
1147 -       n->pprev = LIST_POISON2;
1148 +       n->next = (struct hlist_node*)(LIST_POISON1);
1149 +       n->pprev = (struct hlist_node**)(LIST_POISON2);
1150  }
1151  
1152  static inline void hlist_del_init(struct hlist_node *n)
1153 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/mempolicy.h linux-2.6.27-720/include/linux/mempolicy.h
1154 --- linux-2.6.27-710/include/linux/mempolicy.h  2008-10-09 18:13:53.000000000 -0400
1155 +++ linux-2.6.27-720/include/linux/mempolicy.h  2009-05-04 12:31:57.000000000 -0400
1156 @@ -241,7 +241,7 @@
1157  
1158  #else
1159  
1160 -struct mempolicy {};
1161 +EMPTY_STRUCT_DECL(mempolicy);
1162  
1163  static inline int mpol_equal(struct mempolicy *a, struct mempolicy *b)
1164  {
1165 @@ -271,7 +271,7 @@
1166         return NULL;
1167  }
1168  
1169 -struct shared_policy {};
1170 +EMPTY_STRUCT_DECL(shared_policy);
1171  
1172  static inline int mpol_set_shared_policy(struct shared_policy *info,
1173                                         struct vm_area_struct *vma,
1174 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/mm.h linux-2.6.27-720/include/linux/mm.h
1175 --- linux-2.6.27-710/include/linux/mm.h 2009-05-04 12:28:19.000000000 -0400
1176 +++ linux-2.6.27-720/include/linux/mm.h 2009-05-04 12:31:57.000000000 -0400
1177 @@ -326,7 +326,7 @@
1178  static inline void set_compound_page_dtor(struct page *page,
1179                                                 compound_page_dtor *dtor)
1180  {
1181 -       page[1].lru.next = (void *)dtor;
1182 +       page[1].lru.next = (struct list_head *)dtor;
1183  }
1184  
1185  static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
1186 @@ -343,7 +343,7 @@
1187  
1188  static inline void set_compound_order(struct page *page, unsigned long order)
1189  {
1190 -       page[1].lru.prev = (void *)order;
1191 +       page[1].lru.prev = (struct list_head  *)order;
1192  }
1193  
1194  /*
1195 @@ -493,7 +493,7 @@
1196  
1197  static inline enum zone_type page_zonenum(struct page *page)
1198  {
1199 -       return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK;
1200 +       return (enum zone_type) ((page->flags >> ZONES_PGSHIFT) & ZONES_MASK);
1201  }
1202  
1203  /*
1204 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/netdevice.h linux-2.6.27-720/include/linux/netdevice.h
1205 --- linux-2.6.27-710/include/linux/netdevice.h  2009-05-04 12:28:25.000000000 -0400
1206 +++ linux-2.6.27-720/include/linux/netdevice.h  2009-05-04 12:31:57.000000000 -0400
1207 @@ -735,6 +735,46 @@
1208         /* GARP */
1209         struct garp_port        *garp_port;
1210  
1211 +       /* Click polling support */
1212 +       /*
1213 +        * polling is < 0 if the device does not support polling, == 0 if the
1214 +        * device supports polling but interrupts are on, and > 0 if polling
1215 +        * is on.
1216 +        */
1217 +       int                     polling;
1218 +       int                     (*poll_on)(struct net_device *);
1219 +       int                     (*poll_off)(struct net_device *);
1220 +       /*
1221 +        * rx_poll returns to caller a linked list of sk_buff objects received
1222 +        * by the device. on call, the want argument specifies the number of
1223 +        * packets wanted. on return, the want argument specifies the number
1224 +        * of packets actually returned.
1225 +        */
1226 +       struct sk_buff *        (*rx_poll)(struct net_device*, int *want);
1227 +       /* refill rx dma ring using the given sk_buff list. returns 0 if
1228 +        * successful, or if there are more entries need to be cleaned,
1229 +        * returns the number of dirty entries. the ptr to the sk_buff list is
1230 +        * updated by the driver to point to any unused skbs.
1231 +        */
1232 +       int                     (*rx_refill)(struct net_device*, struct sk_buff**);
1233 +       /*
1234 +        * place sk_buff on the transmit ring. returns 0 if successful, 1
1235 +        * otherwise
1236 +        */
1237 +       int                     (*tx_queue)(struct net_device *, struct sk_buff *);
1238 +       /*
1239 +        * clean tx dma ring. returns the list of skb objects cleaned
1240 +        */
1241 +       struct sk_buff*         (*tx_clean)(struct net_device *);
1242 +       /*
1243 +        * start transmission. returns 0 if successful, 1 otherwise
1244 +        */
1245 +       int                     (*tx_start)(struct net_device *);
1246 +       /*
1247 +        * tell device the end of a batch of packets
1248 +        */
1249 +       int                     (*tx_eob)(struct net_device *);
1250 +
1251         /* class/net/name entry */
1252         struct device           dev;
1253         /* space for optional statistics and wireless sysfs groups */
1254 @@ -919,6 +959,11 @@
1255  extern int             dev_queue_xmit(struct sk_buff *skb);
1256  extern int             register_netdevice(struct net_device *dev);
1257  extern void            unregister_netdevice(struct net_device *dev);
1258 +
1259 +extern int             register_net_in(struct notifier_block *nb); /* Click */
1260 +extern int             unregister_net_in(struct notifier_block *nb); /* Click */
1261 +extern int             ptype_dispatch(struct sk_buff *skb, unsigned short type); /* Click */
1262 +
1263  extern void            free_netdev(struct net_device *dev);
1264  extern void            synchronize_net(void);
1265  extern int             register_netdevice_notifier(struct notifier_block *nb);
1266 @@ -1217,7 +1262,10 @@
1267  extern int             netif_rx(struct sk_buff *skb);
1268  extern int             netif_rx_ni(struct sk_buff *skb);
1269  #define HAVE_NETIF_RECEIVE_SKB 1
1270 -extern int             netif_receive_skb(struct sk_buff *skb);
1271 +//extern int           netif_receive_skb(struct sk_buff *skb);
1272 +#define HAVE___NETIF_RECEIVE_SKB 1
1273 +extern int             __netif_receive_skb(struct sk_buff *skb, unsigned short protocol, int ignore_notifiers);
1274 +
1275  extern void            netif_nit_deliver(struct sk_buff *skb);
1276  extern int             dev_valid_name(const char *name);
1277  extern int             dev_ioctl(struct net *net, unsigned int cmd, void __user *);
1278 @@ -1358,6 +1406,11 @@
1279  
1280  extern void netif_device_attach(struct net_device *dev);
1281  
1282 +static inline int netif_receive_skb(struct sk_buff *skb)
1283 +{
1284 +       return __netif_receive_skb(skb, skb->protocol, 0);
1285 +}
1286 +
1287  /*
1288   * Network interface message level settings
1289   */
1290 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/netlink.h linux-2.6.27-720/include/linux/netlink.h
1291 --- linux-2.6.27-710/include/linux/netlink.h    2008-10-09 18:13:53.000000000 -0400
1292 +++ linux-2.6.27-720/include/linux/netlink.h    2009-05-04 12:31:57.000000000 -0400
1293 @@ -242,7 +242,7 @@
1294         nlh->nlmsg_flags = flags;
1295         nlh->nlmsg_pid = pid;
1296         nlh->nlmsg_seq = seq;
1297 -       memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size);
1298 +       memset((char*) NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size);
1299         return nlh;
1300  }
1301  
1302 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/page-flags.h linux-2.6.27-720/include/linux/page-flags.h
1303 --- linux-2.6.27-710/include/linux/page-flags.h 2008-10-09 18:13:53.000000000 -0400
1304 +++ linux-2.6.27-720/include/linux/page-flags.h 2009-05-04 12:31:57.000000000 -0400
1305 @@ -174,8 +174,10 @@
1306  PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned)    /* Xen */
1307  PAGEFLAG(SavePinned, savepinned);                      /* Xen */
1308  PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
1309 +#ifndef __cplusplus
1310  PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
1311         __SETPAGEFLAG(Private, private)
1312 +#endif
1313  
1314  __PAGEFLAG(SlobPage, slob_page)
1315  __PAGEFLAG(SlobFree, slob_free)
1316 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/prefetch.h linux-2.6.27-720/include/linux/prefetch.h
1317 --- linux-2.6.27-710/include/linux/prefetch.h   2008-10-09 18:13:53.000000000 -0400
1318 +++ linux-2.6.27-720/include/linux/prefetch.h   2009-05-04 12:31:57.000000000 -0400
1319 @@ -54,9 +54,9 @@
1320  {
1321  #ifdef ARCH_HAS_PREFETCH
1322         char *cp;
1323 -       char *end = addr + len;
1324 +       char *end = (char*)(addr) + len;
1325  
1326 -       for (cp = addr; cp < end; cp += PREFETCH_STRIDE)
1327 +       for (cp = (char*)(addr); cp < end; cp += PREFETCH_STRIDE)
1328                 prefetch(cp);
1329  #endif
1330  }
1331 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/proc_fs.h linux-2.6.27-720/include/linux/proc_fs.h
1332 --- linux-2.6.27-710/include/linux/proc_fs.h    2009-05-04 12:28:20.000000000 -0400
1333 +++ linux-2.6.27-720/include/linux/proc_fs.h    2009-05-04 12:31:57.000000000 -0400
1334 @@ -315,7 +315,7 @@
1335  
1336  static inline struct net *PDE_NET(struct proc_dir_entry *pde)
1337  {
1338 -       return pde->parent->data;
1339 +       return (struct net *) pde->parent->data;
1340  }
1341  
1342  struct proc_maps_private {
1343 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/rculist.h linux-2.6.27-720/include/linux/rculist.h
1344 --- linux-2.6.27-710/include/linux/rculist.h    2008-10-09 18:13:53.000000000 -0400
1345 +++ linux-2.6.27-720/include/linux/rculist.h    2009-05-04 12:31:57.000000000 -0400
1346 @@ -94,7 +94,7 @@
1347  static inline void list_del_rcu(struct list_head *entry)
1348  {
1349         __list_del(entry->prev, entry->next);
1350 -       entry->prev = LIST_POISON2;
1351 +       entry->prev = (struct list_head *) LIST_POISON2;
1352  }
1353  
1354  /**
1355 @@ -140,7 +140,7 @@
1356         new->prev = old->prev;
1357         rcu_assign_pointer(new->prev->next, new);
1358         new->next->prev = new;
1359 -       old->prev = LIST_POISON2;
1360 +       old->prev = (struct list_head *) LIST_POISON2;
1361  }
1362  
1363  /**
1364 @@ -271,7 +271,7 @@
1365  static inline void hlist_del_rcu(struct hlist_node *n)
1366  {
1367         __hlist_del(n);
1368 -       n->pprev = LIST_POISON2;
1369 +       n->pprev = (struct hlist_node **) LIST_POISON2;
1370  }
1371  
1372  /**
1373 @@ -291,7 +291,7 @@
1374         rcu_assign_pointer(*new->pprev, new);
1375         if (next)
1376                 new->next->pprev = &new->next;
1377 -       old->pprev = LIST_POISON2;
1378 +       old->pprev = (struct hlist_node **) LIST_POISON2;
1379  }
1380  
1381  /**
1382 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/reiserfs_fs_sb.h linux-2.6.27-720/include/linux/reiserfs_fs_sb.h
1383 --- linux-2.6.27-710/include/linux/reiserfs_fs_sb.h     2009-05-04 12:28:20.000000000 -0400
1384 +++ linux-2.6.27-720/include/linux/reiserfs_fs_sb.h     2009-05-04 12:31:57.000000000 -0400
1385 @@ -337,8 +337,7 @@
1386         } journal;
1387  } reiserfs_proc_info_data_t;
1388  #else
1389 -typedef struct reiserfs_proc_info_data {
1390 -} reiserfs_proc_info_data_t;
1391 +typedef EMPTY_STRUCT_DECL(reiserfs_proc_info_data) reiserfs_proc_info_data_t;
1392  #endif
1393  
1394  /* reiserfs union of in-core super block data */
1395 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/rtnetlink.h linux-2.6.27-720/include/linux/rtnetlink.h
1396 --- linux-2.6.27-710/include/linux/rtnetlink.h  2008-10-09 18:13:53.000000000 -0400
1397 +++ linux-2.6.27-720/include/linux/rtnetlink.h  2009-05-04 12:31:57.000000000 -0400
1398 @@ -727,7 +727,7 @@
1399         rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size));
1400         rta->rta_type = attrtype;
1401         rta->rta_len = size;
1402 -       memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size);
1403 +       memset((char*) RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size);
1404         return rta;
1405  }
1406  
1407 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/scatterlist.h linux-2.6.27-720/include/linux/scatterlist.h
1408 --- linux-2.6.27-710/include/linux/scatterlist.h        2008-10-09 18:13:53.000000000 -0400
1409 +++ linux-2.6.27-720/include/linux/scatterlist.h        2009-05-04 12:31:57.000000000 -0400
1410 @@ -196,7 +196,7 @@
1411   **/
1412  static inline void *sg_virt(struct scatterlist *sg)
1413  {
1414 -       return page_address(sg_page(sg)) + sg->offset;
1415 +       return (char *) page_address(sg_page(sg)) + sg->offset;
1416  }
1417  
1418  struct scatterlist *sg_next(struct scatterlist *);
1419 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/sched.h linux-2.6.27-720/include/linux/sched.h
1420 --- linux-2.6.27-710/include/linux/sched.h      2009-05-04 12:28:20.000000000 -0400
1421 +++ linux-2.6.27-720/include/linux/sched.h      2009-05-04 12:31:57.000000000 -0400
1422 @@ -242,7 +242,12 @@
1423  
1424  extern void sched_init(void);
1425  extern void sched_init_smp(void);
1426 +#ifdef __cplusplus
1427 +asmlinkage void schedule_tail(struct task_struct *prev);
1428 +#else
1429  extern asmlinkage void schedule_tail(struct task_struct *prev);
1430 +#endif
1431 +
1432  extern void init_idle(struct task_struct *idle, int cpu);
1433  extern void init_idle_bootup_task(struct task_struct *idle);
1434  
1435 @@ -1977,7 +1982,7 @@
1436  
1437  static inline unsigned long *end_of_stack(struct task_struct *p)
1438  {
1439 -       return (unsigned long *)(task_thread_info(p) + 1);
1440 +       return (unsigned long *)((char *) task_thread_info(p) + 1);
1441  }
1442  
1443  #endif
1444 @@ -1986,7 +1991,7 @@
1445  {
1446         void *stack = task_stack_page(current);
1447  
1448 -       return (obj >= stack) && (obj < (stack + THREAD_SIZE));
1449 +       return (obj >= stack) && ((char *) obj < ((char *) stack + THREAD_SIZE));
1450  }
1451  
1452  extern void thread_info_cache_init(void);
1453 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/seccomp.h linux-2.6.27-720/include/linux/seccomp.h
1454 --- linux-2.6.27-710/include/linux/seccomp.h    2008-10-09 18:13:53.000000000 -0400
1455 +++ linux-2.6.27-720/include/linux/seccomp.h    2009-05-04 12:31:57.000000000 -0400
1456 @@ -21,7 +21,7 @@
1457  
1458  #else /* CONFIG_SECCOMP */
1459  
1460 -typedef struct { } seccomp_t;
1461 +typedef EMPTY_STRUCT_DECL(/* unnamed */) seccomp_t;
1462  
1463  #define secure_computing(x) do { } while (0)
1464  
1465 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/security.h linux-2.6.27-720/include/linux/security.h
1466 --- linux-2.6.27-710/include/linux/security.h   2008-10-09 18:13:53.000000000 -0400
1467 +++ linux-2.6.27-720/include/linux/security.h   2009-05-04 12:31:57.000000000 -0400
1468 @@ -2427,7 +2427,7 @@
1469  static inline struct dentry *securityfs_create_dir(const char *name,
1470                                         struct dentry *parent)
1471  {
1472 -       return ERR_PTR(-ENODEV);
1473 +       return (struct dentry *) ERR_PTR(-ENODEV);
1474  }
1475  
1476  static inline struct dentry *securityfs_create_file(const char *name,
1477 @@ -2436,7 +2436,7 @@
1478                                                 void *data,
1479                                                 const struct file_operations *fops)
1480  {
1481 -       return ERR_PTR(-ENODEV);
1482 +       return (struct dentry *) ERR_PTR(-ENODEV);
1483  }
1484  
1485  static inline void securityfs_remove(struct dentry *dentry)
1486 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/semaphore.h linux-2.6.27-720/include/linux/semaphore.h
1487 --- linux-2.6.27-710/include/linux/semaphore.h  2008-10-09 18:13:53.000000000 -0400
1488 +++ linux-2.6.27-720/include/linux/semaphore.h  2009-05-04 12:31:57.000000000 -0400
1489 @@ -19,12 +19,21 @@
1490         struct list_head        wait_list;
1491  };
1492  
1493 +#ifdef __cplusplus
1494 +#define __SEMAPHORE_INITIALIZER(name, n)                               \
1495 +({ struct semaphore duh;                                                                       \
1496 +       duh.lock                = __SPIN_LOCK_UNLOCKED((name).lock),            \
1497 +       duh.count               = n,                                            \
1498 +       duh.wait_list   = LIST_HEAD_INIT((name).wait_list),             \
1499 +    duh;})
1500 +#else
1501  #define __SEMAPHORE_INITIALIZER(name, n)                               \
1502  {                                                                      \
1503         .lock           = __SPIN_LOCK_UNLOCKED((name).lock),            \
1504         .count          = n,                                            \
1505         .wait_list      = LIST_HEAD_INIT((name).wait_list),             \
1506  }
1507 +#endif
1508  
1509  #define DECLARE_MUTEX(name)    \
1510         struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
1511 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/skbuff.h linux-2.6.27-720/include/linux/skbuff.h
1512 --- linux-2.6.27-710/include/linux/skbuff.h     2009-05-04 12:28:23.000000000 -0400
1513 +++ linux-2.6.27-720/include/linux/skbuff.h     2009-05-04 12:31:57.000000000 -0400
1514 @@ -194,6 +194,12 @@
1515  typedef unsigned char *sk_buff_data_t;
1516  #endif
1517  
1518 +/* Click: overload sk_buff.pkt_type to contain information about whether
1519 +   a packet is clean. Clean packets have the following fields zero:
1520 +   dst, destructor, pkt_bridged, prev, list, sk, security, priority. */
1521 +#define PACKET_CLEAN           128             /* Is packet clean? */
1522 +#define PACKET_TYPE_MASK       127             /* Actual packet type */
1523 +
1524  /** 
1525   *     struct sk_buff - socket buffer
1526   *     @next: Next buffer in list
1527 @@ -377,6 +383,7 @@
1528                                 gfp_t priority);
1529  extern struct sk_buff *pskb_copy(struct sk_buff *skb,
1530                                  gfp_t gfp_mask);
1531 +extern struct sk_buff *skb_recycle(struct sk_buff *skb);
1532  extern int            pskb_expand_head(struct sk_buff *skb,
1533                                         int nhead, int ntail,
1534                                         gfp_t gfp_mask);
1535 @@ -1326,7 +1333,7 @@
1536  }
1537  
1538  static inline int skb_add_data(struct sk_buff *skb,
1539 -                              char __user *from, int copy)
1540 +                              unsigned char __user *from, int copy)
1541  {
1542         const int off = skb->len;
1543  
1544 @@ -1402,7 +1409,7 @@
1545                                       const void *start, unsigned int len)
1546  {
1547         if (skb->ip_summed == CHECKSUM_COMPLETE)
1548 -               skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
1549 +               skb->csum = csum_sub(skb->csum, csum_partial((const unsigned char *) start, len, 0));
1550  }
1551  
1552  unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
1553 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/spinlock.h linux-2.6.27-720/include/linux/spinlock.h
1554 --- linux-2.6.27-710/include/linux/spinlock.h   2008-10-09 18:13:53.000000000 -0400
1555 +++ linux-2.6.27-720/include/linux/spinlock.h   2009-05-04 12:31:57.000000000 -0400
1556 @@ -54,6 +54,7 @@
1557  #include <linux/kernel.h>
1558  #include <linux/stringify.h>
1559  #include <linux/bottom_half.h>
1560 +#include <linux/types.h>
1561  
1562  #include <asm/system.h>
1563  
1564 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/spinlock_types.h linux-2.6.27-720/include/linux/spinlock_types.h
1565 --- linux-2.6.27-710/include/linux/spinlock_types.h     2008-10-09 18:13:53.000000000 -0400
1566 +++ linux-2.6.27-720/include/linux/spinlock_types.h     2009-05-04 12:31:57.000000000 -0400
1567 @@ -51,37 +51,47 @@
1568  
1569  #define SPINLOCK_OWNER_INIT    ((void *)-1L)
1570  
1571 +#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP)
1572 +# define SPINLOCK_BREAK_LOCK_INIT 0,
1573 +#else
1574 +# define SPINLOCK_BREAK_LOCK_INIT
1575 +#endif
1576 +
1577  #ifdef CONFIG_DEBUG_LOCK_ALLOC
1578 -# define SPIN_DEP_MAP_INIT(lockname)   .dep_map = { .name = #lockname }
1579 +# define SPIN_DEP_MAP_INIT(lockname)   { 0, 0, #lockname }
1580  #else
1581  # define SPIN_DEP_MAP_INIT(lockname)
1582  #endif
1583  
1584  #ifdef CONFIG_DEBUG_LOCK_ALLOC
1585 -# define RW_DEP_MAP_INIT(lockname)     .dep_map = { .name = #lockname }
1586 +# define RW_DEP_MAP_INIT(lockname)     { 0, 0, #lockname }
1587  #else
1588  # define RW_DEP_MAP_INIT(lockname)
1589  #endif
1590  
1591  #ifdef CONFIG_DEBUG_SPINLOCK
1592  # define __SPIN_LOCK_UNLOCKED(lockname)                                        \
1593 -       (spinlock_t)    {       .raw_lock = __RAW_SPIN_LOCK_UNLOCKED,   \
1594 -                               .magic = SPINLOCK_MAGIC,                \
1595 -                               .owner = SPINLOCK_OWNER_INIT,           \
1596 -                               .owner_cpu = -1,                        \
1597 +       (spinlock_t)    { /*raw_lock*/  __RAW_SPIN_LOCK_UNLOCKED,       \
1598 +                         /*break_lock*/ SPINLOCK_BREAK_LOCK_INIT       \
1599 +                         /*magic*/     SPINLOCK_MAGIC,                 \
1600 +                         /*owner_cpu*/ -1,                             \
1601 +                         /*owner*/     SPINLOCK_OWNER_INIT,            \
1602                                 SPIN_DEP_MAP_INIT(lockname) }
1603  #define __RW_LOCK_UNLOCKED(lockname)                                   \
1604 -       (rwlock_t)      {       .raw_lock = __RAW_RW_LOCK_UNLOCKED,     \
1605 -                               .magic = RWLOCK_MAGIC,                  \
1606 -                               .owner = SPINLOCK_OWNER_INIT,           \
1607 -                               .owner_cpu = -1,                        \
1608 +       (rwlock_t)      { /*raw_lock*/  __RAW_RW_LOCK_UNLOCKED,         \
1609 +                         /*break_lock*/ SPINLOCK_BREAK_LOCK_INIT       \
1610 +                         /*magic*/     RWLOCK_MAGIC,                   \
1611 +                         /*owner_cpu*/ -1,                             \
1612 +                         /*owner*/     SPINLOCK_OWNER_INIT,            \
1613                                 RW_DEP_MAP_INIT(lockname) }
1614  #else
1615  # define __SPIN_LOCK_UNLOCKED(lockname) \
1616 -       (spinlock_t)    {       .raw_lock = __RAW_SPIN_LOCK_UNLOCKED,   \
1617 +       (spinlock_t)    { /*raw_lock*/  __RAW_SPIN_LOCK_UNLOCKED,       \
1618 +                         /*break_lock*/ SPINLOCK_BREAK_LOCK_INIT       \
1619                                 SPIN_DEP_MAP_INIT(lockname) }
1620  #define __RW_LOCK_UNLOCKED(lockname) \
1621 -       (rwlock_t)      {       .raw_lock = __RAW_RW_LOCK_UNLOCKED,     \
1622 +       (rwlock_t)      { /*raw_lock*/  __RAW_RW_LOCK_UNLOCKED,         \
1623 +                         /*break_lock*/ SPINLOCK_BREAK_LOCK_INIT       \
1624                                 RW_DEP_MAP_INIT(lockname) }
1625  #endif
1626  
1627 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/stddef.h linux-2.6.27-720/include/linux/stddef.h
1628 --- linux-2.6.27-710/include/linux/stddef.h     2008-10-09 18:13:53.000000000 -0400
1629 +++ linux-2.6.27-720/include/linux/stddef.h     2009-05-04 12:31:57.000000000 -0400
1630 @@ -12,10 +12,12 @@
1631  
1632  #ifdef __KERNEL__
1633  
1634 +#ifndef __cplusplus
1635  enum {
1636         false   = 0,
1637         true    = 1
1638  };
1639 +#endif
1640  
1641  #undef offsetof
1642  #ifdef __compiler_offsetof
1643 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/sysctl.h linux-2.6.27-720/include/linux/sysctl.h
1644 --- linux-2.6.27-710/include/linux/sysctl.h     2009-05-04 12:28:22.000000000 -0400
1645 +++ linux-2.6.27-720/include/linux/sysctl.h     2009-05-04 12:31:57.000000000 -0400
1646 @@ -985,7 +985,7 @@
1647                          void __user *oldval, size_t __user *oldlenp,
1648                          void __user *newval, size_t newlen);
1649  
1650 -typedef int proc_handler (struct ctl_table *ctl, int write, struct file * filp,
1651 +typedef int proc_handler_t (struct ctl_table *ctl, int write, struct file * filp,
1652                           void __user *buffer, size_t *lenp, loff_t *ppos);
1653  
1654  extern int proc_dostring(struct ctl_table *, int, struct file *,
1655 @@ -1066,7 +1066,7 @@
1656         mode_t mode;
1657         struct ctl_table *child;
1658         struct ctl_table *parent;       /* Automatically set */
1659 -       proc_handler *proc_handler;     /* Callback for text formatting */
1660 +       proc_handler_t *proc_handler;   /* Callback for text formatting */
1661         ctl_handler *strategy;          /* Callback function for all r/w */
1662         void *extra1;
1663         void *extra2;
1664 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/textsearch.h linux-2.6.27-720/include/linux/textsearch.h
1665 --- linux-2.6.27-710/include/linux/textsearch.h 2008-10-09 18:13:53.000000000 -0400
1666 +++ linux-2.6.27-720/include/linux/textsearch.h 2009-05-04 12:31:57.000000000 -0400
1667 @@ -162,9 +162,9 @@
1668  {
1669         struct ts_config *conf;
1670  
1671 -       conf = kzalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
1672 +       conf = (struct ts_config *) kzalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
1673         if (conf == NULL)
1674 -               return ERR_PTR(-ENOMEM);
1675 +               return (struct ts_config *) ERR_PTR(-ENOMEM);
1676  
1677         return conf;
1678  }
1679 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/types.h linux-2.6.27-720/include/linux/types.h
1680 --- linux-2.6.27-710/include/linux/types.h      2009-05-04 12:28:20.000000000 -0400
1681 +++ linux-2.6.27-720/include/linux/types.h      2009-05-04 12:31:57.000000000 -0400
1682 @@ -30,7 +30,9 @@
1683  typedef __kernel_mqd_t         mqd_t;
1684  
1685  #ifdef __KERNEL__
1686 +#ifndef __cplusplus
1687  typedef _Bool                  bool;
1688 +#endif
1689  
1690  typedef __kernel_uid32_t       uid_t;
1691  typedef __kernel_gid32_t       gid_t;
1692 @@ -209,4 +211,12 @@
1693  
1694  #endif /* __KERNEL__ */
1695  
1696 +/*
1697 + * Click: Macros for defining empty structures. Needed because GCC's C and C++
1698 + * compilers have different ABIs for empty structures.
1699 + */
1700 +
1701 +#define EMPTY_STRUCT_DECL(s) struct s { int gcc_is_buggy; }
1702 +#define EMPTY_STRUCT_INIT(s) (s) { 0 }
1703 +
1704  #endif /* _LINUX_TYPES_H */
1705 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/unwind.h linux-2.6.27-720/include/linux/unwind.h
1706 --- linux-2.6.27-710/include/linux/unwind.h     2008-10-09 18:13:53.000000000 -0400
1707 +++ linux-2.6.27-720/include/linux/unwind.h     2009-05-04 12:31:57.000000000 -0400
1708 @@ -14,7 +14,7 @@
1709  
1710  struct module;
1711  
1712 -struct unwind_frame_info {};
1713 +EMPTY_STRUCT_DECL(unwind_frame_info);
1714  
1715  static inline void unwind_init(void) {}
1716  static inline void unwind_setup(void) {}
1717 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/linux/wait.h linux-2.6.27-720/include/linux/wait.h
1718 --- linux-2.6.27-710/include/linux/wait.h       2008-10-09 18:13:53.000000000 -0400
1719 +++ linux-2.6.27-720/include/linux/wait.h       2009-05-04 12:31:57.000000000 -0400
1720 @@ -485,7 +485,7 @@
1721  static inline int wait_on_bit(void *word, int bit,
1722                                 int (*action)(void *), unsigned mode)
1723  {
1724 -       if (!test_bit(bit, word))
1725 +       if (!test_bit(bit, (volatile unsigned long *) word))
1726                 return 0;
1727         return out_of_line_wait_on_bit(word, bit, action, mode);
1728  }
1729 @@ -509,7 +509,7 @@
1730  static inline int wait_on_bit_lock(void *word, int bit,
1731                                 int (*action)(void *), unsigned mode)
1732  {
1733 -       if (!test_and_set_bit(bit, word))
1734 +       if (!test_and_set_bit(bit, (volatile unsigned long *) word))
1735                 return 0;
1736         return out_of_line_wait_on_bit_lock(word, bit, action, mode);
1737  }
1738 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/net/compat.h linux-2.6.27-720/include/net/compat.h
1739 --- linux-2.6.27-710/include/net/compat.h       2008-10-09 18:13:53.000000000 -0400
1740 +++ linux-2.6.27-720/include/net/compat.h       2009-05-04 12:31:57.000000000 -0400
1741 @@ -33,9 +33,9 @@
1742  
1743  extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *);
1744  extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int);
1745 -extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned);
1746 -extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned);
1747 -extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *);
1748 +asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned);
1749 +asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned);
1750 +asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *);
1751  extern int put_cmsg_compat(struct msghdr*, int, int, int, void *);
1752  
1753  extern int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *, unsigned char *, int);
1754 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/net/neighbour.h linux-2.6.27-720/include/net/neighbour.h
1755 --- linux-2.6.27-710/include/net/neighbour.h    2008-10-09 18:13:53.000000000 -0400
1756 +++ linux-2.6.27-720/include/net/neighbour.h    2009-05-04 12:31:57.000000000 -0400
1757 @@ -275,7 +275,7 @@
1758                                                       struct neigh_parms *p,
1759                                                       int p_id, int pdev_id,
1760                                                       char *p_name,
1761 -                                                     proc_handler *proc_handler,
1762 +                                                     proc_handler_t *proc_handler,
1763                                                       ctl_handler *strategy);
1764  extern void                    neigh_sysctl_unregister(struct neigh_parms *p);
1765  
1766 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/net/netlink.h linux-2.6.27-720/include/net/netlink.h
1767 --- linux-2.6.27-710/include/net/netlink.h      2008-10-09 18:13:53.000000000 -0400
1768 +++ linux-2.6.27-720/include/net/netlink.h      2009-05-04 12:31:57.000000000 -0400
1769 @@ -315,7 +315,7 @@
1770  static inline struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh,
1771                                             int hdrlen)
1772  {
1773 -       unsigned char *data = nlmsg_data(nlh);
1774 +       unsigned char *data = (unsigned char *)  nlmsg_data(nlh);
1775         return (struct nlattr *) (data + NLMSG_ALIGN(hdrlen));
1776  }
1777  
1778 @@ -732,7 +732,7 @@
1779   */
1780  static inline struct nlattr *nla_find_nested(struct nlattr *nla, int attrtype)
1781  {
1782 -       return nla_find(nla_data(nla), nla_len(nla), attrtype);
1783 +       return nla_find((struct nlattr *) nla_data(nla), nla_len(nla), attrtype);
1784  }
1785  
1786  /**
1787 @@ -748,7 +748,7 @@
1788                                    struct nlattr *nla,
1789                                    const struct nla_policy *policy)
1790  {
1791 -       return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy);
1792 +       return nla_parse(tb, maxtype, (struct nlattr *) nla_data(nla), nla_len(nla), policy);
1793  }
1794  
1795  /**
1796 @@ -775,7 +775,7 @@
1797         if (nested_len < 0)
1798                 return -EINVAL;
1799         if (nested_len >= nla_attr_size(0))
1800 -               return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len),
1801 +               return nla_parse(tb, maxtype, (struct nlattr *) nla_data(nla) + NLA_ALIGN(len),
1802                                  nested_len, policy);
1803         memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));
1804         return 0;
1805 @@ -1069,7 +1069,7 @@
1806   */
1807  static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start)
1808  {
1809 -       struct nlattr *nest = (void *)start + NLMSG_ALIGN(start->nla_len);
1810 +       struct nlattr *nest = (struct nlattr *) (char *)start + NLMSG_ALIGN(start->nla_len);
1811  
1812         start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start;
1813         return nla_nest_end(skb, nest);
1814 @@ -1103,7 +1103,7 @@
1815  static inline int nla_validate_nested(struct nlattr *start, int maxtype,
1816                                       const struct nla_policy *policy)
1817  {
1818 -       return nla_validate(nla_data(start), nla_len(start), maxtype, policy);
1819 +       return nla_validate((struct nlattr *) nla_data(start), nla_len(start), maxtype, policy);
1820  }
1821  
1822  /**
1823 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/net/pkt_cls.h linux-2.6.27-720/include/net/pkt_cls.h
1824 --- linux-2.6.27-710/include/net/pkt_cls.h      2008-10-09 18:13:53.000000000 -0400
1825 +++ linux-2.6.27-720/include/net/pkt_cls.h      2009-05-04 12:31:57.000000000 -0400
1826 @@ -302,9 +302,7 @@
1827  
1828  #else /* CONFIG_NET_EMATCH */
1829  
1830 -struct tcf_ematch_tree
1831 -{
1832 -};
1833 +EMPTY_STRUCT_DECL(tcf_ematch_tree);
1834  
1835  #define tcf_em_tree_validate(tp, tb, t) ((void)(t), 0)
1836  #define tcf_em_tree_destroy(tp, t) do { (void)(t); } while(0)
1837 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/net/request_sock.h linux-2.6.27-720/include/net/request_sock.h
1838 --- linux-2.6.27-710/include/net/request_sock.h 2008-10-09 18:13:53.000000000 -0400
1839 +++ linux-2.6.27-720/include/net/request_sock.h 2009-05-04 12:31:57.000000000 -0400
1840 @@ -60,7 +60,7 @@
1841  
1842  static inline struct request_sock *reqsk_alloc(const struct request_sock_ops *ops)
1843  {
1844 -       struct request_sock *req = kmem_cache_alloc(ops->slab, GFP_ATOMIC);
1845 +       struct request_sock *req = (struct request_sock *) kmem_cache_alloc(ops->slab, GFP_ATOMIC);
1846  
1847         if (req != NULL)
1848                 req->rsk_ops = ops;
1849 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/net/route.h linux-2.6.27-720/include/net/route.h
1850 --- linux-2.6.27-710/include/net/route.h        2009-05-04 12:28:20.000000000 -0400
1851 +++ linux-2.6.27-720/include/net/route.h        2009-05-04 12:31:57.000000000 -0400
1852 @@ -161,6 +161,16 @@
1853                                    __be16 sport, __be16 dport, struct sock *sk,
1854                                    int flags)
1855  {
1856 +#ifdef __cplusplus
1857 +       struct flowi fl;
1858 +       fl.oif = oif;
1859 +       fl.nl_u.ip4_u.daddr = dst;
1860 +       fl.nl_u.ip4_u.saddr = src;
1861 +       fl.nl_u.ip4_u.tos = tos;
1862 +       fl.proto = protocol;
1863 +       fl.uli_u.ports.sport = sport;
1864 +       fl.uli_u.ports.dport = dport;
1865 +#else
1866         struct flowi fl = { .oif = oif,
1867                             .mark = sk->sk_mark,
1868                             .nl_u = { .ip4_u = { .daddr = dst,
1869 @@ -170,6 +180,7 @@
1870                             .uli_u = { .ports =
1871                                        { .sport = sport,
1872                                          .dport = dport } } };
1873 +#endif
1874  
1875         int err;
1876         struct net *net = sock_net(sk);
1877 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/net/sock.h linux-2.6.27-720/include/net/sock.h
1878 --- linux-2.6.27-710/include/net/sock.h 2009-05-04 12:28:20.000000000 -0400
1879 +++ linux-2.6.27-720/include/net/sock.h 2009-05-04 12:31:57.000000000 -0400
1880 @@ -1104,13 +1104,13 @@
1881  {
1882         if (skb->ip_summed == CHECKSUM_NONE) {
1883                 int err = 0;
1884 -               __wsum csum = csum_and_copy_from_user(from,
1885 -                                                    page_address(page) + off,
1886 +               __wsum csum = csum_and_copy_from_user((unsigned char *) from,
1887 +                                                    (unsigned char *) page_address(page) + off,
1888                                                             copy, 0, &err);
1889                 if (err)
1890                         return err;
1891                 skb->csum = csum_block_add(skb->csum, csum, skb->len);
1892 -       } else if (copy_from_user(page_address(page) + off, from, copy))
1893 +       } else if (copy_from_user((char *) page_address(page) + off, from, copy))
1894                 return -EFAULT;
1895  
1896         skb->len             += copy;
1897 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/include/rdma/ib_user_verbs.h linux-2.6.27-720/include/rdma/ib_user_verbs.h
1898 --- linux-2.6.27-710/include/rdma/ib_user_verbs.h       2008-10-09 18:13:53.000000000 -0400
1899 +++ linux-2.6.27-720/include/rdma/ib_user_verbs.h       2009-05-04 12:31:57.000000000 -0400
1900 @@ -504,8 +504,7 @@
1901         __u64 driver_data[0];
1902  };
1903  
1904 -struct ib_uverbs_modify_qp_resp {
1905 -};
1906 +EMPTY_STRUCT_DECL(ib_uverbs_modify_qp_resp);
1907  
1908  struct ib_uverbs_destroy_qp {
1909         __u64 response;
1910 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/kernel/sched.c linux-2.6.27-720/kernel/sched.c
1911 --- linux-2.6.27-710/kernel/sched.c     2009-05-04 12:28:20.000000000 -0400
1912 +++ linux-2.6.27-720/kernel/sched.c     2009-05-04 12:31:57.000000000 -0400
1913 @@ -6298,7 +6298,7 @@
1914  static void
1915  set_table_entry(struct ctl_table *entry,
1916                 const char *procname, void *data, int maxlen,
1917 -               mode_t mode, proc_handler *proc_handler)
1918 +               mode_t mode, proc_handler_t *proc_handler)
1919  {
1920         entry->procname = procname;
1921         entry->data = data;
1922 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/net/core/dev.c linux-2.6.27-720/net/core/dev.c
1923 --- linux-2.6.27-710/net/core/dev.c     2009-05-04 12:28:25.000000000 -0400
1924 +++ linux-2.6.27-720/net/core/dev.c     2009-05-04 12:33:30.000000000 -0400
1925 @@ -252,6 +252,9 @@
1926         write_unlock_bh(&dev_base_lock);
1927  }
1928  
1929 +/* Click: input packet handlers, might steal packets from net_rx_action. */
1930 +static RAW_NOTIFIER_HEAD(net_in_chain);
1931 +
1932  /*
1933   *     Our notifier list
1934   */
1935 @@ -2021,6 +2024,31 @@
1936         return pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
1937  }
1938  
1939 +
1940 +/*
1941 + * Click: Allow Click to ask to intercept input packets.
1942 + */
1943 +int
1944 +register_net_in(struct notifier_block *nb)
1945 +{
1946 +       int err;
1947 +       rtnl_lock();
1948 +       err = raw_notifier_chain_register(&net_in_chain, nb);
1949 +       rtnl_unlock();
1950 +       return err;
1951 +}
1952 +
1953 +int
1954 +unregister_net_in(struct notifier_block *nb)
1955 +{
1956 +       int err;
1957 +       rtnl_lock();
1958 +       err = raw_notifier_chain_unregister(&net_in_chain, nb);
1959 +       rtnl_unlock();
1960 +       return err;
1961 +}
1962 +
1963 +
1964  #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE)
1965  /* These hooks defined here for ATM */
1966  struct net_bridge;
1967 @@ -2191,14 +2219,16 @@
1968   *     NET_RX_SUCCESS: no congestion
1969   *     NET_RX_DROP: packet was dropped
1970   */
1971 -int netif_receive_skb(struct sk_buff *skb)
1972 +
1973 +int __netif_receive_skb(struct sk_buff *skb, unsigned short type, int notifier_data)
1974 +//int netif_receive_skb(struct sk_buff *skb)
1975  {
1976         struct packet_type *ptype, *pt_prev;
1977         struct net_device *orig_dev;
1978         struct net_device *null_or_orig;
1979         int ret = NET_RX_DROP;
1980         int *cur_elevator = &__get_cpu_var(sknid_elevator);
1981 -       __be16 type;
1982 +       //__be16 type;
1983  
1984         *cur_elevator = 0;
1985  
1986 @@ -2227,6 +2257,14 @@
1987         skb_reset_transport_header(skb);
1988         skb->mac_len = skb->network_header - skb->mac_header;
1989  
1990 +       /* Click: may want to steal the packet */
1991 +       if (notifier_data >= 0
1992 +           && raw_notifier_call_chain(&net_in_chain,
1993 +                                  notifier_data,
1994 +                                  skb) & NOTIFY_STOP_MASK) {
1995 +               return ret;
1996 +       }
1997
1998         pt_prev = NULL;
1999  
2000         rcu_read_lock();
2001 @@ -2345,7 +2383,8 @@
2002                 }
2003                 local_irq_enable();
2004  
2005 -               netif_receive_skb(skb);
2006 +               __netif_receive_skb(skb, skb->protocol, skb_queue_len(&queue->input_pkt_queue));
2007 +//XXX          netif_receive_skb(skb);
2008         } while (++work < quota && jiffies == start_time);
2009  
2010         return work;
2011 @@ -4898,6 +4937,7 @@
2012  EXPORT_SYMBOL(dev_get_by_index);
2013  EXPORT_SYMBOL(dev_get_by_name);
2014  EXPORT_SYMBOL(dev_open);
2015 +EXPORT_SYMBOL(dev_ioctl);
2016  EXPORT_SYMBOL(dev_queue_xmit);
2017  EXPORT_SYMBOL(dev_remove_pack);
2018  EXPORT_SYMBOL(dev_set_allmulti);
2019 @@ -4910,10 +4950,16 @@
2020  EXPORT_SYMBOL(netdev_set_master);
2021  EXPORT_SYMBOL(netdev_state_change);
2022  EXPORT_SYMBOL(netif_receive_skb);
2023 +EXPORT_SYMBOL(__netif_receive_skb);
2024  EXPORT_SYMBOL(netif_rx);
2025  EXPORT_SYMBOL(register_gifconf);
2026  EXPORT_SYMBOL(register_netdevice);
2027  EXPORT_SYMBOL(register_netdevice_notifier);
2028 +
2029 +/* Click */
2030 +EXPORT_SYMBOL(register_net_in);
2031 +EXPORT_SYMBOL(unregister_net_in);
2032 +
2033  EXPORT_SYMBOL(skb_checksum_help);
2034  EXPORT_SYMBOL(synchronize_net);
2035  EXPORT_SYMBOL(unregister_netdevice);
2036 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/net/core/dev.c.rej linux-2.6.27-720/net/core/dev.c.rej
2037 --- linux-2.6.27-710/net/core/dev.c.rej 1969-12-31 19:00:00.000000000 -0500
2038 +++ linux-2.6.27-720/net/core/dev.c.rej 2009-05-04 12:31:57.000000000 -0400
2039 @@ -0,0 +1,30 @@
2040 +***************
2041 +*** 2187,2199 ****
2042 +   *   NET_RX_SUCCESS: no congestion
2043 +   *   NET_RX_DROP: packet was dropped
2044 +   */
2045 +- int netif_receive_skb(struct sk_buff *skb)
2046 +  {
2047 +       struct packet_type *ptype, *pt_prev;
2048 +       struct net_device *orig_dev;
2049 +       struct net_device *null_or_orig;
2050 +       int ret = NET_RX_DROP;
2051 +-      __be16 type;
2052 +  
2053 +       /* if we've gotten here through NAPI, check netpoll */
2054 +       if (netpoll_receive_skb(skb))
2055 +--- 2215,2228 ----
2056 +   *   NET_RX_SUCCESS: no congestion
2057 +   *   NET_RX_DROP: packet was dropped
2058 +   */
2059 ++ //int netif_receive_skb(struct sk_buff *skb)
2060 ++ int __netif_receive_skb(struct sk_buff *skb, unsigned short type, int notifier_data)
2061 +  {
2062 +       struct packet_type *ptype, *pt_prev;
2063 +       struct net_device *orig_dev;
2064 +       struct net_device *null_or_orig;
2065 +       int ret = NET_RX_DROP;
2066 ++ //   __be16 type;
2067 +  
2068 +       /* if we've gotten here through NAPI, check netpoll */
2069 +       if (netpoll_receive_skb(skb))
2070 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/net/core/neighbour.c linux-2.6.27-720/net/core/neighbour.c
2071 --- linux-2.6.27-710/net/core/neighbour.c       2008-10-09 18:13:53.000000000 -0400
2072 +++ linux-2.6.27-720/net/core/neighbour.c       2009-05-04 12:31:57.000000000 -0400
2073 @@ -2702,7 +2702,7 @@
2074  
2075  int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
2076                           int p_id, int pdev_id, char *p_name,
2077 -                         proc_handler *handler, ctl_handler *strategy)
2078 +                         proc_handler_t *handler, ctl_handler *strategy)
2079  {
2080         struct neigh_sysctl_table *t;
2081         const char *dev_name_source = NULL;
2082 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/net/core/skbuff.c linux-2.6.27-720/net/core/skbuff.c
2083 --- linux-2.6.27-710/net/core/skbuff.c  2009-05-04 12:28:23.000000000 -0400
2084 +++ linux-2.6.27-720/net/core/skbuff.c  2009-05-04 12:31:57.000000000 -0400
2085 @@ -575,6 +575,112 @@
2086         skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type;
2087  }
2088  
2089 +
2090 +/* Click: clear skb header state */
2091 +static inline void skb_headerinit(void *p, struct kmem_cache *cache,
2092 +                                 unsigned long flags)
2093 +{
2094 +       struct sk_buff *skb = p;
2095 +
2096 +       skb->next = NULL;
2097 +       skb->prev = NULL;
2098 +       skb->sk = NULL;
2099 +       skb->tstamp.tv64 = 0;     /* No idea about time */
2100 +       skb->dev = NULL;
2101 +       skb->iif = 0;
2102 +       skb->dst = NULL;
2103 +       skb->sp = NULL;
2104 +       memset(skb->cb, 0, sizeof(skb->cb));
2105 +       skb->priority = 0;
2106 +       skb->pkt_type = PACKET_HOST;   /* Default type */
2107 +       skb->ip_summed = 0;
2108 +       skb->destructor = NULL;
2109 +
2110 +#ifdef CONFIG_NETFILTER
2111 +       skb->mark = 0;
2112 +       skb->nfct = NULL;
2113 +# if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
2114 +       skb->nfct_reasm = NULL;
2115 +# endif
2116 +# ifdef CONFIG_BRIDGE_NETFILTER
2117 +       skb->nf_bridge = NULL;
2118 +# endif
2119 +#endif
2120 +#ifdef CONFIG_NET_SCHED
2121 +       skb->tc_index = 0;
2122 +# ifdef CONFIG_NET_CLS_ACT
2123 +       skb->tc_verd = 0;
2124 +# endif
2125 +#endif
2126 +}
2127 +
2128 +/* Click: attempts to recycle a sk_buff. if it can be recycled, return it */
2129 +struct sk_buff *skb_recycle(struct sk_buff *skb)
2130 +{
2131 +       if (atomic_dec_and_test(&skb->users)) { 
2132 +               dst_release(skb->dst);
2133 +#ifdef CONFIG_XFRM
2134 +               secpath_put(skb->sp);
2135 +#endif
2136 +               if(skb->destructor) {
2137 +                       WARN_ON(in_irq());
2138 +                       skb->destructor(skb);
2139 +               }
2140 +#ifdef CONFIG_NETFILTER
2141 +               nf_conntrack_put(skb->nfct);
2142 +# if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
2143 +               nf_conntrack_put_reasm(skb->nfct_reasm);
2144 +# endif
2145 +# ifdef CONFIG_BRIDGE_NETFILTER
2146 +               nf_bridge_put(skb->nf_bridge);
2147 +# endif
2148 +#endif
2149 +               skb_headerinit(skb, NULL, 0);
2150 +
2151 +               if (skb->fclone == SKB_FCLONE_UNAVAILABLE
2152 +                   && (!skb->cloned ||
2153 +                       atomic_read(&skb_shinfo(skb)->dataref) == (skb->nohdr ? (1 << SKB_DATAREF_SHIFT) + 1 : 1))) {
2154 +                       /* Don't need to atomic_sub skb_shinfo(skb)->dataref,
2155 +                          as we set that to 1 below. */
2156 +                       
2157 +                       if (skb_shinfo(skb)->nr_frags) {
2158 +                               int i;
2159 +                               for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
2160 +                                       put_page(skb_shinfo(skb)->frags[i].page);
2161 +                               /* Jason Park patch */
2162 +                               skb_shinfo(skb)->nr_frags = 0;
2163 +                       }
2164 +
2165 +                       if (skb_shinfo(skb)->frag_list)
2166 +                               skb_drop_fraglist(skb);
2167 +
2168 +                       /* Load the data pointers. */
2169 +                       skb->data = skb->head;
2170 +                       skb->tail = skb->data;
2171 +                       /* end and truesize should have never changed */
2172 +                       /* skb->end = skb->data + skb->truesize; */
2173 +
2174 +                       /* set up other state */
2175 +                       skb->len = 0;
2176 +                       skb->cloned = 0;
2177 +
2178 +                       atomic_set(&skb->users, 1);
2179 +                       atomic_set(&(skb_shinfo(skb)->dataref), 1);
2180 +                       /* Jason Park patch */
2181 +                       skb_shinfo(skb)->gso_size = 0;
2182 +                       skb_shinfo(skb)->gso_segs = 0;
2183 +                       skb_shinfo(skb)->gso_type = 0;
2184 +                       skb_shinfo(skb)->ip6_frag_id = 0;
2185 +
2186 +                       return skb;
2187 +               }
2188 +
2189 +               kfree_skbmem(skb);
2190 +       }
2191 +
2192 +       return 0;
2193 +}
2194 +
2195  /**
2196   *     skb_copy        -       create private copy of an sk_buff
2197   *     @skb: buffer to copy
2198 @@ -2604,6 +2710,7 @@
2199  EXPORT_SYMBOL(skb_append_datato_frags);
2200  EXPORT_SYMBOL(__skb_warn_lro_forwarding);
2201  
2202 +EXPORT_SYMBOL(skb_recycle);
2203  EXPORT_SYMBOL_GPL(skb_to_sgvec);
2204  EXPORT_SYMBOL_GPL(skb_cow_data);
2205  EXPORT_SYMBOL_GPL(skb_partial_csum_set);
2206 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/net/ipv4/arp.c linux-2.6.27-720/net/ipv4/arp.c
2207 --- linux-2.6.27-710/net/ipv4/arp.c     2008-10-09 18:13:53.000000000 -0400
2208 +++ linux-2.6.27-720/net/ipv4/arp.c     2009-05-04 12:31:57.000000000 -0400
2209 @@ -328,6 +328,7 @@
2210  {
2211         __be32 saddr = 0;
2212         u8  *dst_ha = NULL;
2213 +       u8  dst_ha_buf[MAX_ADDR_LEN+sizeof(unsigned long)];
2214         struct net_device *dev = neigh->dev;
2215         __be32 target = *(__be32*)neigh->primary_key;
2216         int probes = atomic_read(&neigh->probes);
2217 @@ -365,8 +366,8 @@
2218         if ((probes -= neigh->parms->ucast_probes) < 0) {
2219                 if (!(neigh->nud_state&NUD_VALID))
2220                         printk(KERN_DEBUG "trying to ucast probe in NUD_INVALID\n");
2221 -               dst_ha = neigh->ha;
2222 -               read_lock_bh(&neigh->lock);
2223 +               memcpy(dst_ha_buf, neigh->ha, sizeof(neigh->ha));
2224 +               dst_ha = dst_ha_buf;
2225         } else if ((probes -= neigh->parms->app_probes) < 0) {
2226  #ifdef CONFIG_ARPD
2227                 neigh_app_ns(neigh);
2228 @@ -376,8 +377,6 @@
2229  
2230         arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr,
2231                  dst_ha, dev->dev_addr, NULL);
2232 -       if (dst_ha)
2233 -               read_unlock_bh(&neigh->lock);
2234  }
2235  
2236  static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip)
2237 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/net/ipv4/devinet.c linux-2.6.27-720/net/ipv4/devinet.c
2238 --- linux-2.6.27-710/net/ipv4/devinet.c 2009-05-04 12:28:20.000000000 -0400
2239 +++ linux-2.6.27-720/net/ipv4/devinet.c 2009-05-04 12:31:57.000000000 -0400
2240 @@ -1687,3 +1687,4 @@
2241  EXPORT_SYMBOL(inetdev_by_index);
2242  EXPORT_SYMBOL(register_inetaddr_notifier);
2243  EXPORT_SYMBOL(unregister_inetaddr_notifier);
2244 +EXPORT_SYMBOL(devinet_ioctl);
2245 diff -Nurb --exclude='*.a' --exclude='*.dbg' --exclude='*.order' --exclude='*.d' --exclude='*.elf' --exclude='*.o' --exclude='*.mod' --exclude='*.cmd' --exclude='*.orig' --exclude='*.swp' --exclude=tags --exclude='*.patch' --exclude='*.diff' --exclude='*.svn*' linux-2.6.27-710/scr linux-2.6.27-720/scr
2246 --- linux-2.6.27-710/scr        1969-12-31 19:00:00.000000000 -0500
2247 +++ linux-2.6.27-720/scr        2009-05-04 12:31:57.000000000 -0400
2248 @@ -0,0 +1,29 @@
2249 +vi -o ./include/asm-um/elf-x86_64.h ./include/asm-um/elf-x86_64.h.rej
2250 +vi -o ./include/asm-frv/tlbflush.h ./include/asm-frv/tlbflush.h.rej
2251 +vi -o ./include/asm-frv/pgtable.h ./include/asm-frv/pgtable.h.rej
2252 +vi -o ./include/asm-xtensa/pgalloc.h ./include/asm-xtensa/pgalloc.h.rej
2253 +vi -o ./include/asm-xtensa/pgtable.h ./include/asm-xtensa/pgtable.h.rej
2254 +vi -o ./include/asm-xtensa/module.h ./include/asm-xtensa/module.h.rej
2255 +vi -o ./include/asm-xtensa/system.h ./include/asm-xtensa/system.h.rej
2256 +vi -o ./include/asm-xtensa/timex.h ./include/asm-xtensa/timex.h.rej
2257 +vi -o ./include/net/sock.h ./include/net/sock.h.rej
2258 +vi -o ./include/net/compat.h ./include/net/compat.h.rej
2259 +vi -o ./include/asm-mips/fpu.h ./include/asm-mips/fpu.h.rej
2260 +vi -o ./include/asm-mips/time.h ./include/asm-mips/time.h.rej
2261 +vi -o ./include/asm-mips/irq.h ./include/asm-mips/irq.h.rej
2262 +vi -o ./include/asm-mips/system.h ./include/asm-mips/system.h.rej
2263 +vi -o ./include/linux/lockdep.h ./include/linux/lockdep.h.rej
2264 +vi -o ./include/linux/ktime.h ./include/linux/ktime.h.rej
2265 +vi -o ./include/linux/textsearch.h ./include/linux/textsearch.h.rej
2266 +vi -o ./include/linux/backing-dev.h ./include/linux/backing-dev.h.rej
2267 +vi -o ./include/linux/kexec.h ./include/linux/kexec.h.rej
2268 +vi -o ./include/linux/sysctl.h ./include/linux/sysctl.h.rej
2269 +vi -o ./include/linux/netdevice.h ./include/linux/netdevice.h.rej
2270 +vi -o ./include/linux/spinlock_types_up.h ./include/linux/spinlock_types_up.h.rej
2271 +vi -o ./include/linux/list.h ./include/linux/list.h.rej
2272 +vi -o ./include/asm-m68k/module.h ./include/asm-m68k/module.h.rej
2273 +vi -o ./net/core/dev.c ./net/core/dev.c.rej
2274 +vi -o ./net/core/skbuff.c ./net/core/skbuff.c.rej
2275 +vi -o ./net/core/neighbour.c ./net/core/neighbour.c.rej
2276 +vi -o ./drivers/media/dvb/bt8xx/bt878.h ./drivers/media/dvb/bt8xx/bt878.h.rej
2277 +vi -o ./drivers/net/ibmveth.c ./drivers/net/ibmveth.c.rej