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