summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/mman.h1
-rw-r--r--include/asm-alpha/percpu.h14
-rw-r--r--include/asm-alpha/termios.h18
-rw-r--r--include/asm-arm/spinlock.h1
-rw-r--r--include/asm-arm/termios.h18
-rw-r--r--include/asm-arm/uaccess.h4
-rw-r--r--include/asm-arm26/termios.h18
-rw-r--r--include/asm-arm26/uaccess-asm.h4
-rw-r--r--include/asm-avr32/termios.h18
-rw-r--r--include/asm-cris/semaphore-helper.h9
-rw-r--r--include/asm-cris/system.h3
-rw-r--r--include/asm-cris/termios.h18
-rw-r--r--include/asm-frv/termios.h18
-rw-r--r--include/asm-generic/memory_model.h2
-rw-r--r--include/asm-generic/mman.h1
-rw-r--r--include/asm-h8300/termios.h18
-rw-r--r--include/asm-i386/atomic.h4
-rw-r--r--include/asm-i386/bitops.h4
-rw-r--r--include/asm-i386/termios.h18
-rw-r--r--include/asm-i386/uaccess.h4
-rw-r--r--include/asm-ia64/termios.h18
-rw-r--r--include/asm-m32r/a.out.h2
-rw-r--r--include/asm-m32r/addrspace.h1
-rw-r--r--include/asm-m32r/bugs.h2
-rw-r--r--include/asm-m32r/byteorder.h2
-rw-r--r--include/asm-m32r/cache.h2
-rw-r--r--include/asm-m32r/cacheflush.h1
-rw-r--r--include/asm-m32r/current.h3
-rw-r--r--include/asm-m32r/delay.h2
-rw-r--r--include/asm-m32r/dma.h2
-rw-r--r--include/asm-m32r/errno.h3
-rw-r--r--include/asm-m32r/ide.h6
-rw-r--r--include/asm-m32r/ioctls.h5
-rw-r--r--include/asm-m32r/ipcbuf.h4
-rw-r--r--include/asm-m32r/kmap_types.h4
-rw-r--r--include/asm-m32r/m32104ut/m32104ut_pld.h11
-rw-r--r--include/asm-m32r/m32700ut/m32700ut_lan.h13
-rw-r--r--include/asm-m32r/m32700ut/m32700ut_lcd.h13
-rw-r--r--include/asm-m32r/m32700ut/m32700ut_pld.h13
-rw-r--r--include/asm-m32r/mappi2/mappi2_pld.h13
-rw-r--r--include/asm-m32r/mappi3/mappi3_pld.h11
-rw-r--r--include/asm-m32r/mc146818rtc.h3
-rw-r--r--include/asm-m32r/mman.h2
-rw-r--r--include/asm-m32r/mmu.h10
-rw-r--r--include/asm-m32r/mmu_context.h9
-rw-r--r--include/asm-m32r/module.h3
-rw-r--r--include/asm-m32r/msgbuf.h4
-rw-r--r--include/asm-m32r/namei.h4
-rw-r--r--include/asm-m32r/opsput/opsput_lan.h13
-rw-r--r--include/asm-m32r/opsput/opsput_lcd.h13
-rw-r--r--include/asm-m32r/opsput/opsput_pld.h13
-rw-r--r--include/asm-m32r/page.h5
-rw-r--r--include/asm-m32r/param.h4
-rw-r--r--include/asm-m32r/pci.h2
-rw-r--r--include/asm-m32r/pgalloc.h3
-rw-r--r--include/asm-m32r/pgtable-2level.h3
-rw-r--r--include/asm-m32r/posix_types.h4
-rw-r--r--include/asm-m32r/rtc.h4
-rw-r--r--include/asm-m32r/scatterlist.h2
-rw-r--r--include/asm-m32r/sections.h1
-rw-r--r--include/asm-m32r/segment.h4
-rw-r--r--include/asm-m32r/sembuf.h4
-rw-r--r--include/asm-m32r/setup.h4
-rw-r--r--include/asm-m32r/shmbuf.h4
-rw-r--r--include/asm-m32r/shmparam.h2
-rw-r--r--include/asm-m32r/sigcontext.h3
-rw-r--r--include/asm-m32r/siginfo.h2
-rw-r--r--include/asm-m32r/signal.h4
-rw-r--r--include/asm-m32r/smp.h3
-rw-r--r--include/asm-m32r/sockios.h2
-rw-r--r--include/asm-m32r/spinlock_types.h2
-rw-r--r--include/asm-m32r/stat.h4
-rw-r--r--include/asm-m32r/string.h2
-rw-r--r--include/asm-m32r/syscall.h3
-rw-r--r--include/asm-m32r/system.h2
-rw-r--r--include/asm-m32r/termbits.h4
-rw-r--r--include/asm-m32r/termios.h20
-rw-r--r--include/asm-m32r/timex.h3
-rw-r--r--include/asm-m32r/tlbflush.h1
-rw-r--r--include/asm-m32r/types.h6
-rw-r--r--include/asm-m32r/uaccess.h4
-rw-r--r--include/asm-m32r/ucontext.h2
-rw-r--r--include/asm-m32r/unaligned.h8
-rw-r--r--include/asm-m32r/unistd.h2
-rw-r--r--include/asm-m32r/user.h6
-rw-r--r--include/asm-m32r/vga.h4
-rw-r--r--include/asm-m32r/xor.h2
-rw-r--r--include/asm-m68k/math-emu.h15
-rw-r--r--include/asm-m68k/termios.h18
-rw-r--r--include/asm-m68k/user.h2
-rw-r--r--include/asm-mips/mips_mt.h3
-rw-r--r--include/asm-mips/mman.h1
-rw-r--r--include/asm-mips/sigcontext.h4
-rw-r--r--include/asm-mips/termios.h18
-rw-r--r--include/asm-mips/uaccess.h5
-rw-r--r--include/asm-parisc/mman.h1
-rw-r--r--include/asm-parisc/termios.h18
-rw-r--r--include/asm-powerpc/termios.h18
-rw-r--r--include/asm-s390/io.h65
-rw-r--r--include/asm-s390/termios.h18
-rw-r--r--include/asm-sh/termios.h18
-rw-r--r--include/asm-sh64/termios.h18
-rw-r--r--include/asm-sparc/io.h29
-rw-r--r--include/asm-sparc/termios.h18
-rw-r--r--include/asm-sparc64/irq.h4
-rw-r--r--include/asm-sparc64/pbm.h28
-rw-r--r--include/asm-sparc64/termios.h18
-rw-r--r--include/asm-um/elf-ppc.h2
-rw-r--r--include/asm-um/processor-x86_64.h6
-rw-r--r--include/asm-um/ptrace-x86_64.h9
-rw-r--r--include/asm-v850/termios.h18
-rw-r--r--include/asm-x86_64/termios.h18
-rw-r--r--include/asm-x86_64/uaccess.h4
-rw-r--r--include/asm-xtensa/mman.h1
-rw-r--r--include/asm-xtensa/termios.h19
-rw-r--r--include/linux/Kbuild2
-rw-r--r--include/linux/byteorder/Kbuild2
-rw-r--r--include/linux/byteorder/pdp_endian.h88
-rw-r--r--include/linux/byteorder/swabb.h13
-rw-r--r--include/linux/cfag12864b.h77
-rw-r--r--include/linux/compiler-gcc.h7
-rw-r--r--include/linux/console.h4
-rw-r--r--include/linux/console_struct.h3
-rw-r--r--include/linux/dn.h2
-rw-r--r--include/linux/fs.h11
-rw-r--r--include/linux/genhd.h10
-rw-r--r--include/linux/gfp.h2
-rw-r--r--include/linux/init.h2
-rw-r--r--include/linux/io.h6
-rw-r--r--include/linux/kernel.h5
-rw-r--r--include/linux/kfifo.h6
-rw-r--r--include/linux/ks0108.h46
-rw-r--r--include/linux/ktime.h6
-rw-r--r--include/linux/list.h67
-rw-r--r--include/linux/lockdep.h1
-rw-r--r--include/linux/mc146818rtc.h10
-rw-r--r--include/linux/mm.h12
-rw-r--r--include/linux/mm_inline.h13
-rw-r--r--include/linux/mmzone.h42
-rw-r--r--include/linux/mount.h10
-rw-r--r--include/linux/pci.h5
-rw-r--r--include/linux/pci_ids.h10
-rw-r--r--include/linux/pnp.h2
-rw-r--r--include/linux/reiserfs_xattr.h24
-rw-r--r--include/linux/relay.h9
-rw-r--r--include/linux/rio.h1
-rw-r--r--include/linux/sched.h40
-rw-r--r--include/linux/security.h2
-rw-r--r--include/linux/slab_def.h30
-rw-r--r--include/linux/socket.h2
-rw-r--r--include/linux/spinlock.h33
-rw-r--r--include/linux/stat.h2
-rw-r--r--include/linux/swap.h6
-rw-r--r--include/linux/time.h4
-rw-r--r--include/linux/timex.h4
-rw-r--r--include/linux/tty.h23
-rw-r--r--include/linux/vmstat.h72
-rw-r--r--include/linux/xattr.h8
-rw-r--r--include/net/dn_route.h5
-rw-r--r--include/net/dst.h15
-rw-r--r--include/net/ip6_fib.h1
-rw-r--r--include/net/route.h7
-rw-r--r--include/scsi/libsas.h3
163 files changed, 727 insertions, 959 deletions
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h
index 5f24c75..90d7c35 100644
--- a/include/asm-alpha/mman.h
+++ b/include/asm-alpha/mman.h
@@ -49,7 +49,6 @@
#define MADV_DOFORK 11 /* do inherit across fork */
/* compatibility flags */
-#define MAP_ANON MAP_ANONYMOUS
#define MAP_FILE 0
#endif /* __ALPHA_MMAN_H__ */
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h
index 48348fe..651ebb1 100644
--- a/include/asm-alpha/percpu.h
+++ b/include/asm-alpha/percpu.h
@@ -1,6 +1,20 @@
#ifndef __ALPHA_PERCPU_H
#define __ALPHA_PERCPU_H
+/*
+ * Increase the per cpu area for Alpha so that
+ * modules using percpu area can load.
+ */
+#ifdef CONFIG_MODULES
+# define PERCPU_MODULE_RESERVE 8192
+#else
+# define PERCPU_MODULE_RESERVE 0
+#endif
+
+#define PERCPU_ENOUGH_ROOM \
+ (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
+ PERCPU_MODULE_RESERVE)
+
#include <asm-generic/percpu.h>
#endif /* __ALPHA_PERCPU_H */
diff --git a/include/asm-alpha/termios.h b/include/asm-alpha/termios.h
index 1cfd27f..39e492c 100644
--- a/include/asm-alpha/termios.h
+++ b/include/asm-alpha/termios.h
@@ -66,24 +66,6 @@ struct termio {
#define _VEOL2 6
#define _VSWTC 7
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* eof=^D eol=\0 eol2=\0 erase=del
werase=^W kill=^U reprint=^R sxtc=\0
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index 861092f..800ba52 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -85,7 +85,6 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
* Write locks are easy - we just set bit 31. When unlocking, we can
* just write zero since the lock is exclusively held.
*/
-#define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0)
static inline void __raw_write_lock(raw_rwlock_t *rw)
{
diff --git a/include/asm-arm/termios.h b/include/asm-arm/termios.h
index 7b8f5e8..329c324 100644
--- a/include/asm-arm/termios.h
+++ b/include/asm-arm/termios.h
@@ -49,24 +49,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/*
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h
index 5f420a0..c92df95 100644
--- a/include/asm-arm/uaccess.h
+++ b/include/asm-arm/uaccess.h
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs)
/* We use 33-bit arithmetic here... */
#define __range_ok(addr,size) ({ \
- unsigned long flag, sum; \
+ unsigned long flag, roksum; \
__chk_user_ptr(addr); \
__asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
- : "=&r" (flag), "=&r" (sum) \
+ : "=&r" (flag), "=&r" (roksum) \
: "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
: "cc"); \
flag; })
diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h
index 7b8f5e8..329c324 100644
--- a/include/asm-arm26/termios.h
+++ b/include/asm-arm26/termios.h
@@ -49,24 +49,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/*
diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h
index 19f798e..ade76ec 100644
--- a/include/asm-arm26/uaccess-asm.h
+++ b/include/asm-arm26/uaccess-asm.h
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs)
}
#define __range_ok(addr,size) ({ \
- unsigned long flag, sum; \
+ unsigned long flag, roksum; \
__asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \
- : "=&r" (flag), "=&r" (sum) \
+ : "=&r" (flag), "=&r" (roksum) \
: "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
: "cc"); \
flag; })
diff --git a/include/asm-avr32/termios.h b/include/asm-avr32/termios.h
index 615bc06..0152aba 100644
--- a/include/asm-avr32/termios.h
+++ b/include/asm-avr32/termios.h
@@ -46,24 +46,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
eof=^D vtime=\0 vmin=\1 sxtc=\0
diff --git a/include/asm-cris/semaphore-helper.h b/include/asm-cris/semaphore-helper.h
index a8e1e6c..27bfeca1 100644
--- a/include/asm-cris/semaphore-helper.h
+++ b/include/asm-cris/semaphore-helper.h
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem)
unsigned long flags;
int ret = 0;
- local_save_flags(flags);
- local_irq_disable();
+ local_irq_save(flags);
if (read(&sem->waking) > 0) {
dec(&sem->waking);
ret = 1;
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem,
int ret = 0;
unsigned long flags;
- local_save_flags(flags);
- local_irq_disable();
+ local_irq_save(flags);
if (read(&sem->waking) > 0) {
dec(&sem->waking);
ret = 1;
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem)
int ret = 1;
unsigned long flags;
- local_save_flags(flags);
- local_irq_disable();
+ local_irq_save(flags);
if (read(&sem->waking) <= 0)
inc(&sem->count);
else {
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h
index b869f61..fea0e8d 100644
--- a/include/asm-cris/system.h
+++ b/include/asm-cris/system.h
@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
/* since Etrax doesn't have any atomic xchg instructions, we need to disable
irq's (if enabled) and do it with move.d's */
unsigned long flags,temp;
- local_save_flags(flags); /* save flags, including irq enable bit */
- local_irq_disable(); /* shut off irq's */
+ local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */
switch (size) {
case 1:
*((unsigned char *)&temp) = x;
diff --git a/include/asm-cris/termios.h b/include/asm-cris/termios.h
index 5ce1023..c9dbd4d 100644
--- a/include/asm-cris/termios.h
+++ b/include/asm-cris/termios.h
@@ -40,24 +40,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_BT 15 /* bluetooth */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h
index 8840cf9..a62fb58 100644
--- a/include/asm-frv/termios.h
+++ b/include/asm-frv/termios.h
@@ -51,24 +51,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
#include <asm-generic/termios.h>
#endif
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h
index 8078cbd..30d8d33 100644
--- a/include/asm-generic/memory_model.h
+++ b/include/asm-generic/memory_model.h
@@ -54,7 +54,7 @@
#define __page_to_pfn(pg) \
({ struct page *__pg = (pg); \
int __sec = page_to_section(__pg); \
- __pg - __section_mem_map_addr(__nr_to_section(__sec)); \
+ (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \
})
#define __pfn_to_page(pfn) \
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h
index 3b41d2b..5e3dde2 100644
--- a/include/asm-generic/mman.h
+++ b/include/asm-generic/mman.h
@@ -36,7 +36,6 @@
#define MADV_DOFORK 11 /* do inherit across fork */
/* compatibility flags */
-#define MAP_ANON MAP_ANONYMOUS
#define MAP_FILE 0
#endif
diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h
index e2319f9..fb2925d 100644
--- a/include/asm-h8300/termios.h
+++ b/include/asm-h8300/termios.h
@@ -49,24 +49,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/*
diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h
index c57441b..4dd2723 100644
--- a/include/asm-i386/atomic.h
+++ b/include/asm-i386/atomic.h
@@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
/**
- * atomic_add_unless - add unless the number is a given value
+ * atomic_add_unless - add unless the number is already a given value
* @v: pointer of type atomic_t
* @a: the amount to add to v...
* @u: ...unless v is equal to u.
*
- * Atomically adds @a to @v, so long as it was not @u.
+ * Atomically adds @a to @v, so long as @v was not already @u.
* Returns non-zero if @v was not @u, and zero otherwise.
*/
#define atomic_add_unless(v, a, u) \
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
index 1c780fa..273b506 100644
--- a/include/asm-i386/bitops.h
+++ b/include/asm-i386/bitops.h
@@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word)
*
* This is defined the same way as
* the libc and compiler builtin ffs routines, therefore
- * differs in spirit from the above ffz (man ffs).
+ * differs in spirit from the above ffz() (man ffs).
*/
static inline int ffs(int x)
{
@@ -388,7 +388,7 @@ static inline int ffs(int x)
* fls - find last bit set
* @x: the word to search
*
- * This is defined the same way as ffs.
+ * This is defined the same way as ffs().
*/
static inline int fls(int x)
{
diff --git a/include/asm-i386/termios.h b/include/asm-i386/termios.h
index 03f5485..7c99678 100644
--- a/include/asm-i386/termios.h
+++ b/include/asm-i386/termios.h
@@ -39,24 +39,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
#include <linux/module.h>
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
index eef5133..70829ae 100644
--- a/include/asm-i386/uaccess.h
+++ b/include/asm-i386/uaccess.h
@@ -54,10 +54,10 @@ extern struct movsl_mask {
* This needs 33-bit arithmetic. We have a carry...
*/
#define __range_ok(addr,size) ({ \
- unsigned long flag,sum; \
+ unsigned long flag,roksum; \
__chk_user_ptr(addr); \
asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
- :"=&r" (flag), "=r" (sum) \
+ :"=&r" (flag), "=r" (roksum) \
:"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \
flag; })
diff --git a/include/asm-ia64/termios.h b/include/asm-ia64/termios.h
index 42c9569..08750c2 100644
--- a/include/asm-ia64/termios.h
+++ b/include/asm-ia64/termios.h
@@ -46,24 +46,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS msgs */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
# ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h
index 4619ba5..9a4a5d2 100644
--- a/include/asm-m32r/a.out.h
+++ b/include/asm-m32r/a.out.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_A_OUT_H
#define _ASM_M32R_A_OUT_H
-/* orig : i386 2.4.18 */
-
struct exec
{
unsigned long a_info; /* Use macros N_MAGIC, etc for access */
diff --git a/include/asm-m32r/addrspace.h b/include/asm-m32r/addrspace.h
index 06a83dc..81782c1 100644
--- a/include/asm-m32r/addrspace.h
+++ b/include/asm-m32r/addrspace.h
@@ -1,4 +1,3 @@
-/* $Id$ */
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
diff --git a/include/asm-m32r/bugs.h b/include/asm-m32r/bugs.h
index 9a56f66..f77214e 100644
--- a/include/asm-m32r/bugs.h
+++ b/include/asm-m32r/bugs.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_BUGS_H
#define _ASM_M32R_BUGS_H
-/* $Id$ */
-
/*
* This is included by init/main.c to check for architecture-dependent bugs.
*
diff --git a/include/asm-m32r/byteorder.h b/include/asm-m32r/byteorder.h
index 3c0b9a2..10b2c1d 100644
--- a/include/asm-m32r/byteorder.h
+++ b/include/asm-m32r/byteorder.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_BYTEORDER_H
#define _ASM_M32R_BYTEORDER_H
-/* $Id$ */
-
#include <asm/types.h>
#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
diff --git a/include/asm-m32r/cache.h b/include/asm-m32r/cache.h
index 9c2b2d9..40b3ee98 100644
--- a/include/asm-m32r/cache.h
+++ b/include/asm-m32r/cache.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_CACHE_H
#define _ASM_M32R_CACHE_H
-/* $Id$ */
-
/* L1 cache line size */
#define L1_CACHE_SHIFT 4
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
diff --git a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h
index 56961a9..78587c9 100644
--- a/include/asm-m32r/cacheflush.h
+++ b/include/asm-m32r/cacheflush.h
@@ -67,4 +67,3 @@ do { \
memcpy(dst, src, len)
#endif /* _ASM_M32R_CACHEFLUSH_H */
-
diff --git a/include/asm-m32r/current.h b/include/asm-m32r/current.h
index c19d927f..7859d86 100644
--- a/include/asm-m32r/current.h
+++ b/include/asm-m32r/current.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_CURRENT_H
#define _ASM_M32R_CURRENT_H
-/* $Id$ */
-
#include <linux/thread_info.h>
struct task_struct;
@@ -15,4 +13,3 @@ static __inline__ struct task_struct *get_current(void)
#define current (get_current())
#endif /* _ASM_M32R_CURRENT_H */
-
diff --git a/include/asm-m32r/delay.h b/include/asm-m32r/delay.h
index f285eae..164448d 100644
--- a/include/asm-m32r/delay.h
+++ b/include/asm-m32r/delay.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_DELAY_H
#define _ASM_M32R_DELAY_H
-/* $Id$ */
-
/*
* Copyright (C) 1993 Linus Torvalds
*
diff --git a/include/asm-m32r/dma.h b/include/asm-m32r/dma.h
index 7263b01..52f6a22 100644
--- a/include/asm-m32r/dma.h
+++ b/include/asm-m32r/dma.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_DMA_H
#define _ASM_M32R_DMA_H
-/* $Id$ */
-
#include <asm/io.h>
/*
diff --git a/include/asm-m32r/errno.h b/include/asm-m32r/errno.h
index 7a98520..7771492 100644
--- a/include/asm-m32r/errno.h
+++ b/include/asm-m32r/errno.h
@@ -1,9 +1,6 @@
#ifndef _ASM_M32R_ERRNO_H
#define _ASM_M32R_ERRNO_H
-/* $Id$ */
-
#include <asm-generic/errno.h>
#endif /* _ASM_M32R_ERRNO_H */
-
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h
index c82ebe8..4672a49 100644
--- a/include/asm-m32r/ide.h
+++ b/include/asm-m32r/ide.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_IDE_H
#define _ASM_M32R_IDE_H
-/* $Id$ */
-
/*
* linux/include/asm-m32r/ide.h
*
@@ -15,6 +13,7 @@
#ifdef __KERNEL__
+#include <asm/m32r.h>
#ifndef MAX_HWIFS
# ifdef CONFIG_BLK_DEV_IDEPCI
@@ -24,9 +23,6 @@
# endif
#endif
-#include <asm/m32r.h>
-
-
#define IDE_ARCH_OBSOLETE_DEFAULTS
static __inline__ int ide_default_irq(unsigned long base)
diff --git a/include/asm-m32r/ioctls.h b/include/asm-m32r/ioctls.h
index b350829..d23cfc4 100644
--- a/include/asm-m32r/ioctls.h
+++ b/include/asm-m32r/ioctls.h
@@ -1,10 +1,6 @@
#ifndef __ARCH_M32R_IOCTLS_H__
#define __ARCH_M32R_IOCTLS_H__
-/* $Id$ */
-
-/* orig : i386 2.5.67 */
-
#include <asm/ioctl.h>
/* 0x54 is just a magic number to make these relatively unique ('T') */
@@ -85,4 +81,3 @@
#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
#endif /* __ARCH_M32R_IOCTLS_H__ */
-
diff --git a/include/asm-m32r/ipcbuf.h b/include/asm-m32r/ipcbuf.h
index 7c77fb0..8d2d7c8 100644
--- a/include/asm-m32r/ipcbuf.h
+++ b/include/asm-m32r/ipcbuf.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_IPCBUF_H
#define _ASM_M32R_IPCBUF_H
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
/*
* The ipc64_perm structure for m32r architecture.
* Note extra padding because this structure is passed back and forth
diff --git a/include/asm-m32r/kmap_types.h b/include/asm-m32r/kmap_types.h
index 0524d89..fa94dc6 100644
--- a/include/asm-m32r/kmap_types.h
+++ b/include/asm-m32r/kmap_types.h
@@ -1,9 +1,6 @@
#ifndef __M32R_KMAP_TYPES_H
#define __M32R_KMAP_TYPES_H
-/* Dummy header just to define km_type. */
-
-
#ifdef CONFIG_DEBUG_HIGHMEM
# define D(n) __KM_FENCE_##n ,
#else
@@ -30,4 +27,3 @@ D(13) KM_TYPE_NR
#undef D
#endif /* __M32R_KMAP_TYPES_H */
-
diff --git a/include/asm-m32r/m32104ut/m32104ut_pld.h b/include/asm-m32r/m32104ut/m32104ut_pld.h
index cbdbc58..2dc89d6 100644
--- a/include/asm-m32r/m32104ut/m32104ut_pld.h
+++ b/include/asm-m32r/m32104ut/m32104ut_pld.h
@@ -1,3 +1,6 @@
+#ifndef _M32104UT_M32104UT_PLD_H
+#define _M32104UT_M32104UT_PLD_H
+
/*
* include/asm-m32r/m32104ut/m32104ut_pld.h
*
@@ -12,10 +15,6 @@
* this archive for more details.
*/
-#ifndef _M32104UT_M32104UT_PLD_H
-#define _M32104UT_M32104UT_PLD_H
-
-
#if defined(CONFIG_PLAT_M32104UT)
#define PLD_PLAT_BASE 0x02c00000
#else
@@ -35,7 +34,7 @@
#define __reg8
#define __reg16
#define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/* CFC */
#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -159,4 +158,4 @@
#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c)
#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e)
-#endif /* _M32104UT_M32104UT_PLD_H */
+#endif /* _M32104UT_M32104UT_PLD_H */
diff --git a/include/asm-m32r/m32700ut/m32700ut_lan.h b/include/asm-m32r/m32700ut/m32700ut_lan.h
index f1e47ae..aae810a 100644
--- a/include/asm-m32r/m32700ut/m32700ut_lan.h
+++ b/include/asm-m32r/m32700ut/m32700ut_lan.h
@@ -1,3 +1,6 @@
+#ifndef _M32700UT_M32700UT_LAN_H
+#define _M32700UT_M32700UT_LAN_H
+
/*
* include/asm-m32r/m32700ut/m32700ut_lan.h
*
@@ -8,14 +11,8 @@
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of
* this archive for more details.
- *
- * $Id$
*/
-#ifndef _M32700UT_M32700UT_LAN_H
-#define _M32700UT_M32700UT_LAN_H
-
-
#ifndef __ASSEMBLY__
/*
* C functions use non-cache address.
@@ -23,7 +20,7 @@
#define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */)
#else
#define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/* ICU
* ICUISTS: status register
@@ -103,4 +100,4 @@
#define PLDI2CSTS_BB 0x00000010
#define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */
-#endif /* _M32700UT_M32700UT_LAN_H */
+#endif /* _M32700UT_M32700UT_LAN_H */
diff --git a/include/asm-m32r/m32700ut/m32700ut_lcd.h b/include/asm-m32r/m32700ut/m32700ut_lcd.h
index e41c4aa..4c24890 100644
--- a/include/asm-m32r/m32700ut/m32700ut_lcd.h
+++ b/include/asm-m32r/m32700ut/m32700ut_lcd.h
@@ -1,3 +1,6 @@
+#ifndef _M32700UT_M32700UT_LCD_H
+#define _M32700UT_M32700UT_LCD_H
+
/*
* include/asm-m32r/m32700ut/m32700ut_lcd.h
*
@@ -8,14 +11,8 @@
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of
* this archive for more details.
- *
- * $Id$
*/
-#ifndef _M32700UT_M32700UT_LCD_H
-#define _M32700UT_M32700UT_LCD_H
-
-
#ifndef __ASSEMBLY__
/*
* C functions use non-cache address.
@@ -23,7 +20,7 @@
#define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */)
#else
#define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/*
* ICU
@@ -55,4 +52,4 @@
#define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036)
#define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a)
-#endif /* _M32700UT_M32700UT_LCD_H */
+#endif /* _M32700UT_M32700UT_LCD_H */
diff --git a/include/asm-m32r/m32700ut/m32700ut_pld.h b/include/asm-m32r/m32700ut/m32700ut_pld.h
index a48c22c..d391212 100644
--- a/include/asm-m32r/m32700ut/m32700ut_pld.h
+++ b/include/asm-m32r/m32700ut/m32700ut_pld.h
@@ -1,3 +1,6 @@
+#ifndef _M32700UT_M32700UT_PLD_H
+#define _M32700UT_M32700UT_PLD_H
+
/*
* include/asm-m32r/m32700ut/m32700ut_pld.h
*
@@ -8,14 +11,8 @@
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of
* this archive for more details.
- *
- * $Id$
*/
-#ifndef _M32700UT_M32700UT_PLD_H
-#define _M32700UT_M32700UT_PLD_H
-
-
#if defined(CONFIG_PLAT_M32700UT_Alpha)
#define PLD_PLAT_BASE 0x08c00000
#elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV)
@@ -37,7 +34,7 @@
#define __reg8
#define __reg16
#define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/* CFC */
#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -261,4 +258,4 @@
#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c)
#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e)
-#endif /* _M32700UT_M32700UT_PLD.H */
+#endif /* _M32700UT_M32700UT_PLD.H */
diff --git a/include/asm-m32r/mappi2/mappi2_pld.h b/include/asm-m32r/mappi2/mappi2_pld.h
index 56a2b12..2624c9d 100644
--- a/include/asm-m32r/mappi2/mappi2_pld.h
+++ b/include/asm-m32r/mappi2/mappi2_pld.h
@@ -1,18 +1,17 @@
+#ifndef _MAPPI2_PLD_H
+#define _MAPPI2_PLD_H
+
/*
* include/asm-m32r/mappi2/mappi2_pld.h
*
* Definitions for Extended IO Logic on MAPPI2 board.
- * based on m32700ut_pld.h by
+ * based on m32700ut_pld.h
*
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of
* this archive for more details.
- *
*/
-#ifndef _MAPPI2_PLD_H
-#define _MAPPI2_PLD_H
-
#ifndef __ASSEMBLY__
/* FIXME:
* Some C functions use non-cache address, so can't define non-cache address.
@@ -26,7 +25,7 @@
#define __reg8
#define __reg16
#define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/* CFC */
#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -148,4 +147,4 @@
#endif
-#endif /* _MAPPI2_PLD.H */
+#endif /* _MAPPI2_PLD.H */
diff --git a/include/asm-m32r/mappi3/mappi3_pld.h b/include/asm-m32r/mappi3/mappi3_pld.h
index 92f10de..451c40e 100644
--- a/include/asm-m32r/mappi3/mappi3_pld.h
+++ b/include/asm-m32r/mappi3/mappi3_pld.h
@@ -1,3 +1,6 @@
+#ifndef _MAPPI3_PLD_H
+#define _MAPPI3_PLD_H
+
/*
* include/asm-m32r/mappi3/mappi3_pld.h
*
@@ -7,12 +10,8 @@
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of
* this archive for more details.
- *
*/
-#ifndef _MAPPI3_PLD_H
-#define _MAPPI3_PLD_H
-
#ifndef __ASSEMBLY__
/* FIXME:
* Some C functions use non-cache address, so can't define non-cache address.
@@ -26,7 +25,7 @@
#define __reg8
#define __reg16
#define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/* CFC */
#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -140,4 +139,4 @@
/* Reset Control */
#define PLD_REBOOT __reg16(PLD_BASE + 0x38000)
-#endif /* _MAPPI3_PLD.H */
+#endif /* _MAPPI3_PLD.H */
diff --git a/include/asm-m32r/mc146818rtc.h b/include/asm-m32r/mc146818rtc.h
index 755601d..aa1b7bf 100644
--- a/include/asm-m32r/mc146818rtc.h
+++ b/include/asm-m32r/mc146818rtc.h
@@ -7,7 +7,6 @@
#include <asm/io.h>
#ifndef RTC_PORT
-// #define RTC_PORT(x) (0x70 + (x))
#define RTC_PORT(x) ((x))
#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
#endif
@@ -26,7 +25,5 @@ outb_p((val),RTC_PORT(1)); \
})
#define RTC_IRQ 8
-#if 0
-#endif
#endif /* _ASM_MC146818RTC_H */
diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h
index 695a860..516a897 100644
--- a/include/asm-m32r/mman.h
+++ b/include/asm-m32r/mman.h
@@ -3,8 +3,6 @@
#include <asm-generic/mman.h>
-/* orig : i386 2.6.0-test6 */
-
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
diff --git a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h
index cf3f6d7..d9bd724 100644
--- a/include/asm-m32r/mmu.h
+++ b/include/asm-m32r/mmu.h
@@ -1,13 +1,14 @@
#ifndef _ASM_M32R_MMU_H
#define _ASM_M32R_MMU_H
-
#if !defined(CONFIG_MMU)
+
typedef struct {
struct vm_list_struct *vmlist;
unsigned long end_brk;
} mm_context_t;
-#else
+
+#else /* CONFIG_MMU */
/* Default "unsigned long" context */
#ifndef CONFIG_SMP
@@ -16,5 +17,6 @@ typedef unsigned long mm_context_t;
typedef unsigned long mm_context_t[NR_CPUS];
#endif
-#endif /* CONFIG_MMU */
-#endif /* _ASM_M32R_MMU_H */
+#endif /* CONFIG_MMU */
+
+#endif /* _ASM_M32R_MMU_H */
diff --git a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h
index 542302e..1f40d4a 100644
--- a/include/asm-m32r/mmu_context.h
+++ b/include/asm-m32r/mmu_context.h
@@ -1,9 +1,7 @@
#ifndef _ASM_M32R_MMU_CONTEXT_H
#define _ASM_M32R_MMU_CONTEXT_H
-
#ifdef __KERNEL__
-
#include <asm/m32r.h>
#define MMU_CONTEXT_ASID_MASK (0x000000FF)
@@ -11,7 +9,6 @@
#define MMU_CONTEXT_FIRST_VERSION (0x00000100)
#define NO_CONTEXT (0x00000000)
-
#ifndef __ASSEMBLY__
#include <asm/atomic.h>
@@ -147,7 +144,7 @@ static inline void switch_mm(struct mm_struct *prev,
#define activate_mm(prev, next) \
switch_mm((prev), (next), NULL)
-#else
+#else /* not CONFIG_MMU */
#define get_mmu_context(mm) do { } while (0)
#define init_new_context(tsk,mm) (0)
#define destroy_context(mm) do { } while (0)
@@ -158,11 +155,9 @@ static inline void switch_mm(struct mm_struct *prev,
#define deactivate_mm(mm,tsk) do { } while (0)
#define activate_mm(prev,next) do { } while (0)
#define enter_lazy_tlb(mm,tsk) do { } while (0)
-#endif /* CONFIG_MMU */
-
+#endif /* not CONFIG_MMU */
#endif /* not __ASSEMBLY__ */
#endif /* __KERNEL__ */
-
#endif /* _ASM_M32R_MMU_CONTEXT_H */
diff --git a/include/asm-m32r/module.h b/include/asm-m32r/module.h
index 3f2541c..eb73ee0 100644
--- a/include/asm-m32r/module.h
+++ b/include/asm-m32r/module.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_MODULE_H
#define _ASM_M32R_MODULE_H
-/* $Id$ */
-
struct mod_arch_specific { };
#define Elf_Shdr Elf32_Shdr
@@ -10,4 +8,3 @@ struct mod_arch_specific { };
#define Elf_Ehdr Elf32_Ehdr
#endif /* _ASM_M32R_MODULE_H */
-
diff --git a/include/asm-m32r/msgbuf.h b/include/asm-m32r/msgbuf.h
index 852ff52..0d5a877 100644
--- a/include/asm-m32r/msgbuf.h
+++ b/include/asm-m32r/msgbuf.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_MSGBUF_H
#define _ASM_M32R_MSGBUF_H
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
/*
* The msqid64_ds structure for m32r architecture.
* Note extra padding because this structure is passed back and forth
diff --git a/include/asm-m32r/namei.h b/include/asm-m32r/namei.h
index 7172d3d..210f805 100644
--- a/include/asm-m32r/namei.h
+++ b/include/asm-m32r/namei.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_NAMEI_H
#define _ASM_M32R_NAMEI_H
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
/*
* linux/include/asm-m32r/namei.h
*
diff --git a/include/asm-m32r/opsput/opsput_lan.h b/include/asm-m32r/opsput/opsput_lan.h
index f53e101..a5f18dd 100644
--- a/include/asm-m32r/opsput/opsput_lan.h
+++ b/include/asm-m32r/opsput/opsput_lan.h
@@ -1,3 +1,6 @@
+#ifndef _OPSPUT_OPSPUT_LAN_H
+#define _OPSPUT_OPSPUT_LAN_H
+
/*
* include/asm-m32r/opsput/opsput_lan.h
*
@@ -8,14 +11,8 @@
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of
* this archive for more details.
- *
- * $Id: opsput_lan.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
*/
-#ifndef _OPSPUT_OPSPUT_LAN_H
-#define _OPSPUT_OPSPUT_LAN_H
-
-
#ifndef __ASSEMBLY__
/*
* C functions use non-cache address.
@@ -23,7 +20,7 @@
#define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */)
#else
#define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/* ICU
* ICUISTS: status register
@@ -52,4 +49,4 @@
#define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010)
#define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014)
-#endif /* _OPSPUT_OPSPUT_LAN_H */
+#endif /* _OPSPUT_OPSPUT_LAN_H */
diff --git a/include/asm-m32r/opsput/opsput_lcd.h b/include/asm-m32r/opsput/opsput_lcd.h
index 99f296e..369c9f0 100644
--- a/include/asm-m32r/opsput/opsput_lcd.h
+++ b/include/asm-m32r/opsput/opsput_lcd.h
@@ -1,3 +1,6 @@
+#ifndef _OPSPUT_OPSPUT_LCD_H
+#define _OPSPUT_OPSPUT_LCD_H
+
/*
* include/asm-m32r/opsput/opsput_lcd.h
*
@@ -8,14 +11,8 @@
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of
* this archive for more details.
- *
- * $Id: opsput_lcd.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
*/
-#ifndef _OPSPUT_OPSPUT_LCD_H
-#define _OPSPUT_OPSPUT_LCD_H
-
-
#ifndef __ASSEMBLY__
/*
* C functions use non-cache address.
@@ -23,7 +20,7 @@
#define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */)
#else
#define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/*
* ICU
@@ -55,4 +52,4 @@
#define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036)
#define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a)
-#endif /* _OPSPUT_OPSPUT_LCD_H */
+#endif /* _OPSPUT_OPSPUT_LCD_H */
diff --git a/include/asm-m32r/opsput/opsput_pld.h b/include/asm-m32r/opsput/opsput_pld.h
index a8d6452..3f11ea1 100644
--- a/include/asm-m32r/opsput/opsput_pld.h
+++ b/include/asm-m32r/opsput/opsput_pld.h
@@ -1,3 +1,6 @@
+#ifndef _OPSPUT_OPSPUT_PLD_H
+#define _OPSPUT_OPSPUT_PLD_H
+
/*
* include/asm-m32r/opsput/opsput_pld.h
*
@@ -8,14 +11,8 @@
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of
* this archive for more details.
- *
- * $Id: opsput_pld.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
*/
-#ifndef _OPSPUT_OPSPUT_PLD_H
-#define _OPSPUT_OPSPUT_PLD_H
-
-
#define PLD_PLAT_BASE 0x1cc00000
#ifndef __ASSEMBLY__
@@ -31,7 +28,7 @@
#define __reg8
#define __reg16
#define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
/* CFC */
#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -255,4 +252,4 @@
#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c)
#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e)
-#endif /* _OPSPUT_OPSPUT_PLD.H */
+#endif /* _OPSPUT_OPSPUT_PLD.H */
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h
index 404a4c2..6f6ecf7 100644
--- a/include/asm-m32r/page.h
+++ b/include/asm-m32r/page.h
@@ -1,7 +1,6 @@
#ifndef _ASM_M32R_PAGE_H
#define _ASM_M32R_PAGE_H
-
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
@@ -57,9 +56,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
* and CONFIG_HIGHMEM64G options in the kernel configuration.
*/
-
-/* This handles the memory map.. */
-
#define __MEMORY_START CONFIG_MEMORY_START
#define __MEMORY_SIZE CONFIG_MEMORY_SIZE
@@ -92,4 +88,3 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#endif /* __KERNEL__ */
#endif /* _ASM_M32R_PAGE_H */
-
diff --git a/include/asm-m32r/param.h b/include/asm-m32r/param.h
index 750b938..3e14026 100644
--- a/include/asm-m32r/param.h
+++ b/include/asm-m32r/param.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_PARAM_H
#define _ASM_M32R_PARAM_H
-/* $Id$ */
-
-/* orig : i386 2.5.67 */
-
#ifdef __KERNEL__
# define HZ 100 /* Internal kernel timer frequency */
# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
diff --git a/include/asm-m32r/pci.h b/include/asm-m32r/pci.h
index 00d7b6f..fe785d1 100644
--- a/include/asm-m32r/pci.h
+++ b/include/asm-m32r/pci.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_PCI_H
#define _ASM_M32R_PCI_H
-/* $Id$ */
-
#include <asm-generic/pci.h>
#define PCI_DMA_BUS_IS_PHYS (1)
diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h
index e09a86c..943ba63 100644
--- a/include/asm-m32r/pgalloc.h
+++ b/include/asm-m32r/pgalloc.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_PGALLOC_H
#define _ASM_M32R_PGALLOC_H
-/* $Id$ */
-
#include <linux/mm.h>
#include <asm/io.h>
@@ -74,4 +72,3 @@ static __inline__ void pte_free(struct page *pte)
#define check_pgt_cache() do { } while (0)
#endif /* _ASM_M32R_PGALLOC_H */
-
diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h
index 8415276..7509257 100644
--- a/include/asm-m32r/pgtable-2level.h
+++ b/include/asm-m32r/pgtable-2level.h
@@ -1,9 +1,7 @@
#ifndef _ASM_M32R_PGTABLE_2LEVEL_H
#define _ASM_M32R_PGTABLE_2LEVEL_H
-
#ifdef __KERNEL__
-
/*
* traditional M32R two-level paging structure:
*/
@@ -77,5 +75,4 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
#define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE })
#endif /* __KERNEL__ */
-
#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */
diff --git a/include/asm-m32r/posix_types.h b/include/asm-m32r/posix_types.h
index 47e7e85..1caac65 100644
--- a/include/asm-m32r/posix_types.h
+++ b/include/asm-m32r/posix_types.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_POSIX_TYPES_H
#define _ASM_M32R_POSIX_TYPES_H
-/* $Id$ */
-
-/* orig : i386, sh 2.4.18 */
-
/*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
diff --git a/include/asm-m32r/rtc.h b/include/asm-m32r/rtc.h
index 6b2b837..0340633 100644
--- a/include/asm-m32r/rtc.h
+++ b/include/asm-m32r/rtc.h
@@ -1,10 +1,6 @@
-/* $Id: rtc.h,v 1.1.1.1 2004/03/25 04:29:22 hitoshiy Exp $ */
-
#ifndef __RTC_H__
#define __RTC_H__
-
-
/* Dallas DS1302 clock/calendar register numbers. */
# define RTC_SECONDS 0
# define RTC_MINUTES 1
diff --git a/include/asm-m32r/scatterlist.h b/include/asm-m32r/scatterlist.h
index 09a10e4..c2de96c 100644
--- a/include/asm-m32r/scatterlist.h
+++ b/include/asm-m32r/scatterlist.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_SCATTERLIST_H
#define _ASM_M32R_SCATTERLIST_H
-/* $Id$ */
-
struct scatterlist {
char * address; /* Location data is to be transferred to, NULL for
* highmem page */
diff --git a/include/asm-m32r/sections.h b/include/asm-m32r/sections.h
index 6b969e53..5e5d21c 100644
--- a/include/asm-m32r/sections.h
+++ b/include/asm-m32r/sections.h
@@ -5,4 +5,3 @@
#include <asm-generic/sections.h>
#endif /* _M32R_SECTIONS_H */
-
diff --git a/include/asm-m32r/segment.h b/include/asm-m32r/segment.h
index e45db68..42b11ae 100644
--- a/include/asm-m32r/segment.h
+++ b/include/asm-m32r/segment.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_SEGMENT_H
#define _ASM_M32R_SEGMENT_H
-/* $Id$ */
-
-/* orig : i386 (2.4.18) */
-
#define __KERNEL_CS 0x10
#define __KERNEL_DS 0x18
diff --git a/include/asm-m32r/sembuf.h b/include/asm-m32r/sembuf.h
index e69018e..c9873d6 100644
--- a/include/asm-m32r/sembuf.h
+++ b/include/asm-m32r/sembuf.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_SEMBUF_H
#define _ASM_M32R_SEMBUF_H
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
/*
* The semid64_ds structure for m32r architecture.
* Note extra padding because this structure is passed back and forth
diff --git a/include/asm-m32r/setup.h b/include/asm-m32r/setup.h
index 6a0b322..c637ab9 100644
--- a/include/asm-m32r/setup.h
+++ b/include/asm-m32r/setup.h
@@ -1,3 +1,6 @@
+#ifndef _ASM_M32R_SETUP_H
+#define _ASM_M32R_SETUP_H
+
/*
* This is set up by the setup-routine at boot-time
*/
@@ -32,3 +35,4 @@ extern unsigned long memory_end;
#endif /* __KERNEL__ */
+#endif /* _ASM_M32R_SETUP_H */
diff --git a/include/asm-m32r/shmbuf.h b/include/asm-m32r/shmbuf.h
index b84e897..b0cdf0a 100644
--- a/include/asm-m32r/shmbuf.h
+++ b/include/asm-m32r/shmbuf.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_SHMBUF_H
#define _ASM_M32R_SHMBUF_H
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
/*
* The shmid64_ds structure for M32R architecture.
* Note extra padding because this structure is passed back and forth
diff --git a/include/asm-m32r/shmparam.h b/include/asm-m32r/shmparam.h
index db0019b..35986d8 100644
--- a/include/asm-m32r/shmparam.h
+++ b/include/asm-m32r/shmparam.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_SHMPARAM_H
#define _ASM_M32R_SHMPARAM_H
-/* $Id$ */
-
#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* _ASM_M32R_SHMPARAM_H */
diff --git a/include/asm-m32r/sigcontext.h b/include/asm-m32r/sigcontext.h
index 62537dc..da4a9c3 100644
--- a/include/asm-m32r/sigcontext.h
+++ b/include/asm-m32r/sigcontext.h
@@ -1,9 +1,6 @@
#ifndef _ASM_M32R_SIGCONTEXT_H
#define _ASM_M32R_SIGCONTEXT_H
-/* $Id$ */
-
-
struct sigcontext {
/* CPU registers */
/* Saved main processor registers. */
diff --git a/include/asm-m32r/siginfo.h b/include/asm-m32r/siginfo.h
index 482202f..7d9cd9e 100644
--- a/include/asm-m32r/siginfo.h
+++ b/include/asm-m32r/siginfo.h
@@ -1,8 +1,6 @@
#ifndef _M32R_SIGINFO_H
#define _M32R_SIGINFO_H
-/* $Id$ */
-
#include <asm-generic/siginfo.h>
#endif /* _M32R_SIGINFO_H */
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h
index 65423be..9372586 100644
--- a/include/asm-m32r/signal.h
+++ b/include/asm-m32r/signal.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_SIGNAL_H
#define _ASM_M32R_SIGNAL_H
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
#include <linux/types.h>
#include <linux/time.h>
#include <linux/compiler.h>
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h
index 650d255..abd937a 100644
--- a/include/asm-m32r/smp.h
+++ b/include/asm-m32r/smp.h
@@ -1,9 +1,6 @@
#ifndef _ASM_M32R_SMP_H
#define _ASM_M32R_SMP_H
-/* $Id$ */
-
-
#ifdef CONFIG_SMP
#ifndef __ASSEMBLY__
diff --git a/include/asm-m32r/sockios.h b/include/asm-m32r/sockios.h
index 147a118..f89962e 100644
--- a/include/asm-m32r/sockios.h
+++ b/include/asm-m32r/sockios.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_SOCKIOS_H
#define _ASM_M32R_SOCKIOS_H
-/* $Id$ */
-
/* Socket-level I/O control calls. */
#define FIOSETOWN 0x8901
#define SIOCSPGRP 0x8902
diff --git a/include/asm-m32r/spinlock_types.h b/include/asm-m32r/spinlock_types.h
index 7e9941c..83f5210 100644
--- a/include/asm-m32r/spinlock_types.h
+++ b/include/asm-m32r/spinlock_types.h
@@ -20,4 +20,4 @@ typedef struct {
#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
-#endif
+#endif /* _ASM_M32R_SPINLOCK_TYPES_H */
diff --git a/include/asm-m32r/stat.h b/include/asm-m32r/stat.h
index 05748fe..da4518f 100644
--- a/include/asm-m32r/stat.h
+++ b/include/asm-m32r/stat.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_STAT_H
#define _ASM_M32R_STAT_H
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
#include <asm/byteorder.h>
struct __old_kernel_stat {
diff --git a/include/asm-m32r/string.h b/include/asm-m32r/string.h
index cb54bcc..e61e2b0 100644
--- a/include/asm-m32r/string.h
+++ b/include/asm-m32r/string.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_STRING_H
#define _ASM_M32R_STRING_H
-/* $Id$ */
-
#define __HAVE_ARCH_STRLEN
extern size_t strlen(const char * s);
diff --git a/include/asm-m32r/syscall.h b/include/asm-m32r/syscall.h
index d8d4b2c..25f316f 100644
--- a/include/asm-m32r/syscall.h
+++ b/include/asm-m32r/syscall.h
@@ -1,11 +1,8 @@
#ifndef _ASM_M32R_SYSCALL_H
#define _ASM_M32R_SYSCALL_H
-/* $Id$ */
-
/* Definitions for the system call vector. */
#define SYSCALL_VECTOR "2"
#define SYSCALL_VECTOR_ADDRESS "0xa0"
#endif /* _ASM_M32R_SYSCALL_H */
-
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index 4ce0619..99ee098 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -339,4 +339,4 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
#define arch_align_stack(x) (x)
-#endif /* _ASM_M32R_SYSTEM_H */
+#endif /* _ASM_M32R_SYSTEM_H */
diff --git a/include/asm-m32r/termbits.h b/include/asm-m32r/termbits.h
index faf2bd0..e402641df 100644
--- a/include/asm-m32r/termbits.h
+++ b/include/asm-m32r/termbits.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_TERMBITS_H
#define _ASM_M32R_TERMBITS_H
-/* $Id$ */
-
#include <linux/posix_types.h>
typedef unsigned char cc_t;
@@ -184,4 +182,4 @@ struct ktermios {
#define TCSADRAIN 1
#define TCSAFLUSH 2
-#endif /* _ASM_M32R_TERMBITS_H */
+#endif /* _ASM_M32R_TERMBITS_H */
diff --git a/include/asm-m32r/termios.h b/include/asm-m32r/termios.h
index fc99d2e..4943dd8 100644
--- a/include/asm-m32r/termios.h
+++ b/include/asm-m32r/termios.h
@@ -1,8 +1,6 @@
#ifndef _M32R_TERMIOS_H
#define _M32R_TERMIOS_H
-/* orig : i386 2.6.0-test5 */
-
#include <asm/termbits.h>
#include <asm/ioctls.h>
@@ -41,24 +39,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
#include <linux/module.h>
diff --git a/include/asm-m32r/timex.h b/include/asm-m32r/timex.h
index 019441c..bb9fe4f 100644
--- a/include/asm-m32r/timex.h
+++ b/include/asm-m32r/timex.h
@@ -1,15 +1,12 @@
#ifndef _ASM_M32R_TIMEX_H
#define _ASM_M32R_TIMEX_H
-/* $Id$ */
-
/*
* linux/include/asm-m32r/timex.h
*
* m32r architecture timex specifications
*/
-
#define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE)
#define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */
diff --git a/include/asm-m32r/tlbflush.h b/include/asm-m32r/tlbflush.h
index ae44949..3d37ac0 100644
--- a/include/asm-m32r/tlbflush.h
+++ b/include/asm-m32r/tlbflush.h
@@ -98,4 +98,3 @@ static __inline__ void __flush_tlb_all(void)
extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
#endif /* _ASM_M32R_TLBFLUSH_H */
-
diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h
index fcf24c6..27d3eb5 100644
--- a/include/asm-m32r/types.h
+++ b/include/asm-m32r/types.h
@@ -3,10 +3,6 @@
#ifndef __ASSEMBLY__
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
typedef unsigned short umode_t;
/*
@@ -59,4 +55,4 @@ typedef u64 dma64_addr_t;
#endif /* __KERNEL__ */
-#endif /* _ASM_M32R_TYPES_H */
+#endif /* _ASM_M32R_TYPES_H */
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h
index 26e978c..bd8c837 100644
--- a/include/asm-m32r/uaccess.h
+++ b/include/asm-m32r/uaccess.h
@@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s)
* This needs 33-bit arithmetic. We have a carry...
*/
#define __range_ok(addr,size) ({ \
- unsigned long flag, sum; \
+ unsigned long flag, roksum; \
__chk_user_ptr(addr); \
asm ( \
" cmpu %1, %1 ; clear cbit\n" \
@@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s)
" subx %0, %0\n" \
" cmpu %4, %1\n" \
" subx %0, %5\n" \
- : "=&r" (flag), "=r" (sum) \
+ : "=&r" (flag), "=r" (roksum) \
: "1" (addr), "r" ((int)(size)), \
"r" (current_thread_info()->addr_limit.seg), "r" (0) \
: "cbit" ); \
diff --git a/include/asm-m32r/ucontext.h b/include/asm-m32r/ucontext.h
index 2de709a..0932474 100644
--- a/include/asm-m32r/ucontext.h
+++ b/include/asm-m32r/ucontext.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_UCONTEXT_H
#define _ASM_M32R_UCONTEXT_H
-/* orig : i386 2.4.18 */
-
struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
diff --git a/include/asm-m32r/unaligned.h b/include/asm-m32r/unaligned.h
index 3aef9ac..fccc180 100644
--- a/include/asm-m32r/unaligned.h
+++ b/include/asm-m32r/unaligned.h
@@ -1,10 +1,6 @@
#ifndef _ASM_M32R_UNALIGNED_H
#define _ASM_M32R_UNALIGNED_H
-/* $Id$ */
-
-/* orig : generic 2.4.18 */
-
/*
* For the benefit of those who are trying to port Linux to another
* architecture, here are some C-language equivalents.
@@ -12,7 +8,6 @@
#include <asm/string.h>
-
#define get_unaligned(ptr) \
({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
@@ -21,5 +16,4 @@
memmove((ptr), &__tmp, sizeof(*(ptr))); \
(void)0; })
-
-#endif /* _ASM_M32R_UNALIGNED_H */
+#endif /* _ASM_M32R_UNALIGNED_H */
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h
index 5b66bd3..cbbd537 100644
--- a/include/asm-m32r/unistd.h
+++ b/include/asm-m32r/unistd.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_UNISTD_H
#define _ASM_M32R_UNISTD_H
-/* $Id$ */
-
/*
* This file contains the system call numbers.
*/
diff --git a/include/asm-m32r/user.h b/include/asm-m32r/user.h
index 1ad4ded..035258d 100644
--- a/include/asm-m32r/user.h
+++ b/include/asm-m32r/user.h
@@ -1,12 +1,6 @@
#ifndef _ASM_M32R_USER_H
#define _ASM_M32R_USER_H
-/* $Id$ */
-
-/* orig : sh 2.4.18
- * mod : remove fpu registers
- */
-
#include <linux/types.h>
#include <asm/ptrace.h>
#include <asm/page.h>
diff --git a/include/asm-m32r/vga.h b/include/asm-m32r/vga.h
index 5331634..a1b6306 100644
--- a/include/asm-m32r/vga.h
+++ b/include/asm-m32r/vga.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_VGA_H
#define _ASM_M32R_VGA_H
-/* $Id$ */
-
/*
* Access to VGA videoram
*
@@ -19,4 +17,4 @@
#define vga_readb(x) (*(x))
#define vga_writeb(x,y) (*(y) = (x))
-#endif /* _ASM_M32R_VGA_H */
+#endif /* _ASM_M32R_VGA_H */
diff --git a/include/asm-m32r/xor.h b/include/asm-m32r/xor.h
index fd960dc..6d52525 100644
--- a/include/asm-m32r/xor.h
+++ b/include/asm-m32r/xor.h
@@ -1,8 +1,6 @@
#ifndef _ASM_M32R_XOR_H
#define _ASM_M32R_XOR_H
-/* $Id$ */
-
#include <asm-generic/xor.h>
#endif /* _ASM_M32R_XOR_H */
diff --git a/include/asm-m68k/math-emu.h b/include/asm-m68k/math-emu.h
index 7ac6259..ddfab96 100644
--- a/include/asm-m68k/math-emu.h
+++ b/include/asm-m68k/math-emu.h
@@ -226,6 +226,21 @@ extern unsigned int fp_debugprint;
.previous
.endm
+/* work around binutils idiocy */
+old_gas=-1
+.irp gas_ident.x .x
+old_gas=old_gas+1
+.endr
+.if !old_gas
+.irp m b,w,l
+.macro getuser.\m src,dest,label,addr
+ getuser .\m,\src,\dest,\label,\addr
+.endm
+.macro putuser.\m src,dest,label,addr
+ putuser .\m,\src,\dest,\label,\addr
+.endm
+.endr
+.endif
.macro movestack nr,arg1,arg2,arg3,arg4,arg5
.if \nr
diff --git a/include/asm-m68k/termios.h b/include/asm-m68k/termios.h
index 857f0c9..00edabd 100644
--- a/include/asm-m68k/termios.h
+++ b/include/asm-m68k/termios.h
@@ -49,24 +49,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/*
diff --git a/include/asm-m68k/user.h b/include/asm-m68k/user.h
index d7c0b10..8c56cca 100644
--- a/include/asm-m68k/user.h
+++ b/include/asm-m68k/user.h
@@ -1,8 +1,6 @@
#ifndef _M68K_USER_H
#define _M68K_USER_H
-#include <asm/page.h>
-
/* Core file format: The core file is written in such a way that gdb
can understand it and provide useful information to the user (under
linux we use the 'trad-core' bfd). There are quite a number of
diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h
index c31a312..fdfff0b 100644
--- a/include/asm-mips/mips_mt.h
+++ b/include/asm-mips/mips_mt.h
@@ -12,4 +12,7 @@ extern unsigned long mt_fpemul_threshold;
extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value);
extern void mips_mt_set_cpuoptions(void);
+struct class;
+extern struct class *mt_class;
+
#endif /* __ASM_MIPS_MT_H */
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h
index 046cf68..e4d6f1f 100644
--- a/include/asm-mips/mman.h
+++ b/include/asm-mips/mman.h
@@ -72,7 +72,6 @@
#define MADV_DOFORK 11 /* do inherit across fork */
/* compatibility flags */
-#define MAP_ANON MAP_ANONYMOUS
#define MAP_FILE 0
#endif /* _ASM_MMAN_H */
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h
index cefa657..3c175a7 100644
--- a/include/asm-mips/sigcontext.h
+++ b/include/asm-mips/sigcontext.h
@@ -19,7 +19,7 @@
*/
struct sigcontext {
unsigned int sc_regmask; /* Unused */
- unsigned int sc_status;
+ unsigned int sc_status; /* Unused */
unsigned long long sc_pc;
unsigned long long sc_regs[32];
unsigned long long sc_fpregs[32];
@@ -76,7 +76,7 @@ struct sigcontext {
struct sigcontext32 {
__u32 sc_regmask; /* Unused */
- __u32 sc_status;
+ __u32 sc_status; /* Unused */
__u64 sc_pc;
__u64 sc_regs[32];
__u64 sc_fpregs[32];
diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h
index 4906204..2ce07f4 100644
--- a/include/asm-mips/termios.h
+++ b/include/asm-mips/termios.h
@@ -87,24 +87,6 @@ struct termio {
#define TIOCM_OUT2 0x4000
#define TIOCM_LOOP 0x8000
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved fo Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
#include <linux/string.h>
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h
index c12ebc5..825fcbd 100644
--- a/include/asm-mips/uaccess.h
+++ b/include/asm-mips/uaccess.h
@@ -265,8 +265,6 @@ do { \
*/
#define __get_user_asm_ll32(val, addr) \
{ \
- unsigned long long __gu_tmp; \
- \
__asm__ __volatile__( \
"1: lw %1, (%3) \n" \
"2: lw %D1, 4(%3) \n" \
@@ -281,9 +279,8 @@ do { \
" " __UA_ADDR " 1b, 4b \n" \
" " __UA_ADDR " 2b, 4b \n" \
" .previous \n" \
- : "=r" (__gu_err), "=&r" (__gu_tmp) \
+ : "=r" (__gu_err), "=&r" (val) \
: "0" (0), "r" (addr), "i" (-EFAULT)); \
- (val) = (__typeof__(*(addr))) __gu_tmp; \
}
/*
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h
index 0ef15ee..defe752 100644
--- a/include/asm-parisc/mman.h
+++ b/include/asm-parisc/mman.h
@@ -55,7 +55,6 @@
#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */
/* compatibility flags */
-#define MAP_ANON MAP_ANONYMOUS
#define MAP_FILE 0
#define MAP_VARIABLE 0
diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h
index 6965e8f..5345b34 100644
--- a/include/asm-parisc/termios.h
+++ b/include/asm-parisc/termios.h
@@ -39,24 +39,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-powerpc/termios.h b/include/asm-powerpc/termios.h
index 7f80a01..2c14fea 100644
--- a/include/asm-powerpc/termios.h
+++ b/include/asm-powerpc/termios.h
@@ -71,24 +71,6 @@ struct termio {
#define _VEOL2 8
#define _VSWTC 9
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */
#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h
index a4c2d55..dca6a6c 100644
--- a/include/asm-s390/io.h
+++ b/include/asm-s390/io.h
@@ -13,7 +13,6 @@
#ifdef __KERNEL__
-#include <linux/vmalloc.h>
#include <asm/page.h>
#define IO_SPACE_LIMIT 0xffffffff
@@ -41,70 +40,6 @@ static inline void * phys_to_virt(unsigned long address)
return __io_virt(address);
}
-extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
-
-static inline void * ioremap (unsigned long offset, unsigned long size)
-{
- return __ioremap(offset, size, 0);
-}
-
-/*
- * This one maps high address device memory and turns off caching for that area.
- * it's useful if some control registers are in such an area and write combining
- * or read caching is not desirable:
- */
-static inline void * ioremap_nocache (unsigned long offset, unsigned long size)
-{
- return __ioremap(offset, size, 0);
-}
-
-extern void iounmap(void *addr);
-
-/*
- * IO bus memory addresses are also 1:1 with the physical address
- */
-#define virt_to_bus virt_to_phys
-#define bus_to_virt phys_to_virt
-
-/*
- * readX/writeX() are used to access memory mapped devices. On some
- * architectures the memory mapped IO stuff needs to be accessed
- * differently.
- */
-
-#define readb(addr) (*(volatile unsigned char *) __io_virt(addr))
-#define readw(addr) (*(volatile unsigned short *) __io_virt(addr))
-#define readl(addr) (*(volatile unsigned int *) __io_virt(addr))
-#define readq(addr) (*(volatile unsigned long long *) __io_virt(addr))
-
-#define readb_relaxed(addr) readb(addr)
-#define readw_relaxed(addr) readw(addr)
-#define readl_relaxed(addr) readl(addr)
-#define readq_relaxed(addr) readq(addr)
-#define __raw_readb readb
-#define __raw_readw readw
-#define __raw_readl readl
-#define __raw_readq readq
-
-#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b))
-#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b))
-#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b))
-#define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b))
-#define __raw_writeb writeb
-#define __raw_writew writew
-#define __raw_writel writel
-#define __raw_writeq writeq
-
-#define memset_io(a,b,c) memset(__io_virt(a),(b),(c))
-#define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c))
-#define memcpy_toio(a,b,c) memcpy(__io_virt(a),(b),(c))
-
-#define inb_p(addr) readb(addr)
-#define inb(addr) readb(addr)
-
-#define outb(x,addr) ((void) writeb(x,addr))
-#define outb_p(x,addr) outb(x,addr)
-
#define mmiowb() do { } while (0)
/*
diff --git a/include/asm-s390/termios.h b/include/asm-s390/termios.h
index 62b23ca..a3480e2 100644
--- a/include/asm-s390/termios.h
+++ b/include/asm-s390/termios.h
@@ -47,24 +47,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h
index 44edfd4..e7c8f86 100644
--- a/include/asm-sh/termios.h
+++ b/include/asm-sh/termios.h
@@ -39,24 +39,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-sh64/termios.h b/include/asm-sh64/termios.h
index 4a9c7fb..dc44e6e 100644
--- a/include/asm-sh64/termios.h
+++ b/include/asm-sh64/termios.h
@@ -50,24 +50,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h
index cab0b85..c23e74a 100644
--- a/include/asm-sparc/io.h
+++ b/include/asm-sparc/io.h
@@ -256,6 +256,35 @@ extern void iounmap(volatile void __iomem *addr);
#define iowrite16(val,X) writew(val,X)
#define iowrite32(val,X) writel(val,X)
+static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count)
+{
+ insb((unsigned long __force)port, buf, count);
+}
+static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count)
+{
+ insw((unsigned long __force)port, buf, count);
+}
+
+static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count)
+{
+ insl((unsigned long __force)port, buf, count);
+}
+
+static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count)
+{
+ outsb((unsigned long __force)port, buf, count);
+}
+
+static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count)
+{
+ outsw((unsigned long __force)port, buf, count);
+}
+
+static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count)
+{
+ outsl((unsigned long __force)port, buf, count);
+}
+
/* Create a virtual mapping cookie for an IO port range */
extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
extern void ioport_unmap(void __iomem *);
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h
index d05f83c..d767f20 100644
--- a/include/asm-sparc/termios.h
+++ b/include/asm-sparc/termios.h
@@ -45,24 +45,6 @@ struct winsize {
unsigned short ws_ypixel;
};
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
#include <linux/module.h>
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h
index 905e59b..5d233b4 100644
--- a/include/asm-sparc64/irq.h
+++ b/include/asm-sparc64/irq.h
@@ -46,6 +46,10 @@ extern void irq_install_pre_handler(int virt_irq,
#define irq_canonicalize(irq) (irq)
extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap);
extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino);
+extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
+ unsigned int msi_devino_start,
+ unsigned int msi_devino_end);
+extern void sun4v_destroy_msi(unsigned int virt_irq);
extern unsigned int sbus_build_irq(void *sbus, unsigned int ino);
static __inline__ void set_softint(unsigned long bits)
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h
index dcfa762..7a246d8 100644
--- a/include/asm-sparc64/pbm.h
+++ b/include/asm-sparc64/pbm.h
@@ -11,6 +11,7 @@
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/spinlock.h>
+#include <linux/msi.h>
#include <asm/io.h>
#include <asm/page.h>
@@ -177,6 +178,24 @@ struct pci_pbm_info {
int is_66mhz_capable;
int all_devs_66mhz;
+#ifdef CONFIG_PCI_MSI
+ /* MSI info. */
+ u32 msiq_num;
+ u32 msiq_ent_count;
+ u32 msiq_first;
+ u32 msiq_first_devino;
+ u32 msi_num;
+ u32 msi_first;
+ u32 msi_data_mask;
+ u32 msix_data_width;
+ u64 msi32_start;
+ u64 msi64_start;
+ u32 msi32_len;
+ u32 msi64_len;
+ void *msi_queues;
+ unsigned long *msi_bitmap;
+#endif /* !(CONFIG_PCI_MSI) */
+
/* This PBM's streaming buffer. */
struct pci_strbuf stc;
@@ -213,6 +232,12 @@ struct pci_controller_info {
void (*base_address_update)(struct pci_dev *, int);
void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *);
+#ifdef CONFIG_PCI_MSI
+ int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev,
+ struct msi_desc *entry);
+ void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev);
+#endif
+
/* Now things for the actual PCI bus probes. */
struct pci_ops *pci_ops;
unsigned int pci_first_busno;
@@ -231,6 +256,9 @@ struct pcidev_cookie {
int num_prom_regs;
struct linux_prom_pci_registers prom_assignments[PROMREG_MAX];
int num_prom_assignments;
+#ifdef CONFIG_PCI_MSI
+ unsigned int msi_num;
+#endif
};
/* Currently these are the same across all PCI controllers
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h
index ee26a07..f05d390 100644
--- a/include/asm-sparc64/termios.h
+++ b/include/asm-sparc64/termios.h
@@ -45,24 +45,6 @@ struct winsize {
unsigned short ws_ypixel;
};
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
#include <linux/module.h>
diff --git a/include/asm-um/elf-ppc.h b/include/asm-um/elf-ppc.h
index 9971113..d3b90b7 100644
--- a/include/asm-um/elf-ppc.h
+++ b/include/asm-um/elf-ppc.h
@@ -11,7 +11,7 @@ extern long elf_aux_hwcap;
#define elf_check_arch(x) (1)
-#ifdef CONFIG_64_BIT
+#ifdef CONFIG_64BIT
#define ELF_CLASS ELFCLASS64
#else
#define ELF_CLASS ELFCLASS32
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h
index 10609af..31c2d4d 100644
--- a/include/asm-um/processor-x86_64.h
+++ b/include/asm-um/processor-x86_64.h
@@ -13,6 +13,7 @@
struct arch_thread {
unsigned long debugregs[8];
int debugregs_seq;
+ unsigned long fs;
struct faultinfo faultinfo;
};
@@ -25,8 +26,9 @@ extern inline void rep_nop(void)
#define cpu_relax() rep_nop()
#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
- .debugregs_seq = 0, \
- .faultinfo = { 0, 0, 0 } }
+ .debugregs_seq = 0, \
+ .fs = 0, \
+ .faultinfo = { 0, 0, 0 } }
static inline void arch_flush_thread(struct arch_thread *thread)
{
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h
index 03b4af4..bf61d17 100644
--- a/include/asm-um/ptrace-x86_64.h
+++ b/include/asm-um/ptrace-x86_64.h
@@ -81,9 +81,10 @@ static inline void arch_switch_to_tt(struct task_struct *from,
{
}
-static inline void arch_switch_to_skas(struct task_struct *from,
- struct task_struct *to)
-{
-}
+extern void arch_switch_to_skas(struct task_struct *from,
+ struct task_struct *to);
+
+extern long arch_prctl_skas(struct task_struct *task, int code,
+ unsigned long __user *addr);
#endif
diff --git a/include/asm-v850/termios.h b/include/asm-v850/termios.h
index 79e97b5..c2c2b1d 100644
--- a/include/asm-v850/termios.h
+++ b/include/asm-v850/termios.h
@@ -39,24 +39,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-x86_64/termios.h b/include/asm-x86_64/termios.h
index 443b225..35ee59b 100644
--- a/include/asm-x86_64/termios.h
+++ b/include/asm-x86_64/termios.h
@@ -39,24 +39,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14 /* synchronous PPP */
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h
index c0eac51..8079e29 100644
--- a/include/asm-x86_64/uaccess.h
+++ b/include/asm-x86_64/uaccess.h
@@ -37,11 +37,11 @@
* Uhhuh, this needs 65-bit arithmetic. We have a carry..
*/
#define __range_not_ok(addr,size) ({ \
- unsigned long flag,sum; \
+ unsigned long flag,roksum; \
__chk_user_ptr(addr); \
asm("# range_ok\n\r" \
"addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \
- :"=&r" (flag), "=r" (sum) \
+ :"=&r" (flag), "=r" (roksum) \
:"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \
flag; })
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h
index ba394cb..9b92620 100644
--- a/include/asm-xtensa/mman.h
+++ b/include/asm-xtensa/mman.h
@@ -79,7 +79,6 @@
#define MADV_DOFORK 11 /* do inherit across fork */
/* compatibility flags */
-#define MAP_ANON MAP_ANONYMOUS
#define MAP_FILE 0
#endif /* _XTENSA_MMAN_H */
diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h
index 83c6aed..f14b42c 100644
--- a/include/asm-xtensa/termios.h
+++ b/include/asm-xtensa/termios.h
@@ -52,25 +52,6 @@ struct termio {
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-/* Line disciplines */
-
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 683513e..bb881c3 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -156,7 +156,6 @@ header-y += video_encoder.h
header-y += videotext.h
header-y += vt.h
header-y += wireless.h
-header-y += xattr.h
header-y += x25.h
unifdef-y += acct.h
@@ -336,6 +335,7 @@ unifdef-y += wait.h
unifdef-y += wanrouter.h
unifdef-y += watchdog.h
unifdef-y += wireless.h
+unifdef-y += xattr.h
unifdef-y += xfrm.h
objhdr-y += version.h
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild
index 56499ab..79beddd 100644
--- a/include/linux/byteorder/Kbuild
+++ b/include/linux/byteorder/Kbuild
@@ -1,7 +1,5 @@
header-y += big_endian.h
header-y += little_endian.h
-header-y += pdp_endian.h
unifdef-y += generic.h
-unifdef-y += swabb.h
unifdef-y += swab.h
diff --git a/include/linux/byteorder/pdp_endian.h b/include/linux/byteorder/pdp_endian.h
deleted file mode 100644
index 618631c..0000000
--- a/include/linux/byteorder/pdp_endian.h
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H
-#define _LINUX_BYTEORDER_PDP_ENDIAN_H
-
-/*
- * Could have been named NUXI-endian, but we use the same name as in glibc.
- * hopefully only the PDP and its evolutions (old VAXen in compatibility mode)
- * should ever use this braindead byteorder.
- * This file *should* work, but has not been tested.
- *
- * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412
- *
- * I thought vaxen were NUXI-endian, but was told they were correct-endian
- * (little-endian), though indeed there existed NUXI-endian machines
- * (DEC PDP-11 and old VAXen in compatibility mode).
- * This makes this file a bit useless, but as a proof-of-concept.
- *
- * But what does a __u64 look like: is it 34127856 or 78563412 ???
- * I don't dare imagine! Hence, no 64-bit byteorder support yet.
- * Hopefully, there 64-bit pdp-endian support shouldn't ever be required.
- *
- */
-
-#ifndef __PDP_ENDIAN
-#define __PDP_ENDIAN 3412
-#endif
-#ifndef __PDP_ENDIAN_BITFIELD
-#define __PDP_ENDIAN_BITFIELD
-#endif
-
-#include <linux/byteorder/swab.h>
-#include <linux/byteorder/swabb.h>
-
-#define __constant_htonl(x) ___constant_swahb32((x))
-#define __constant_ntohl(x) ___constant_swahb32((x))
-#define __constant_htons(x) ___constant_swab16((x))
-#define __constant_ntohs(x) ___constant_swab16((x))
-#define __constant_cpu_to_le64(x) I DON'T KNOW
-#define __constant_le64_to_cpu(x) I DON'T KNOW
-#define __constant_cpu_to_le32(x) ___constant_swahw32((x))
-#define __constant_le32_to_cpu(x) ___constant_swahw32((x))
-#define __constant_cpu_to_le16(x) ((__u16)(x)
-#define __constant_le16_to_cpu(x) ((__u16)(x)
-#define __constant_cpu_to_be64(x) I DON'T KNOW
-#define __constant_be64_to_cpu(x) I DON'T KNOW
-#define __constant_cpu_to_be32(x) ___constant_swahb32((x))
-#define __constant_be32_to_cpu(x) ___constant_swahb32((x))
-#define __constant_cpu_to_be16(x) ___constant_swab16((x))
-#define __constant_be16_to_cpu(x) ___constant_swab16((x))
-#define __cpu_to_le64(x) I DON'T KNOW
-#define __le64_to_cpu(x) I DON'T KNOW
-#define __cpu_to_le32(x) ___swahw32((x))
-#define __le32_to_cpu(x) ___swahw32((x))
-#define __cpu_to_le16(x) ((__u16)(x)
-#define __le16_to_cpu(x) ((__u16)(x)
-#define __cpu_to_be64(x) I DON'T KNOW
-#define __be64_to_cpu(x) I DON'T KNOW
-#define __cpu_to_be32(x) __swahb32((x))
-#define __be32_to_cpu(x) __swahb32((x))
-#define __cpu_to_be16(x) __swab16((x))
-#define __be16_to_cpu(x) __swab16((x))
-#define __cpu_to_le64p(x) I DON'T KNOW
-#define __le64_to_cpup(x) I DON'T KNOW
-#define __cpu_to_le32p(x) ___swahw32p((x))
-#define __le32_to_cpup(x) ___swahw32p((x))
-#define __cpu_to_le16p(x) (*(__u16*)(x))
-#define __le16_to_cpup(x) (*(__u16*)(x))
-#define __cpu_to_be64p(x) I DON'T KNOW
-#define __be64_to_cpup(x) I DON'T KNOW
-#define __cpu_to_be32p(x) __swahb32p((x))
-#define __be32_to_cpup(x) __swahb32p((x))
-#define __cpu_to_be16p(x) __swab16p((x))
-#define __be16_to_cpup(x) __swab16p((x))
-#define __cpu_to_le64s(x) I DON'T KNOW
-#define __le64_to_cpus(x) I DON'T KNOW
-#define __cpu_to_le32s(x) ___swahw32s((x))
-#define __le32_to_cpus(x) ___swahw32s((x))
-#define __cpu_to_le16s(x) do {} while (0)
-#define __le16_to_cpus(x) do {} while (0)
-#define __cpu_to_be64s(x) I DON'T KNOW
-#define __be64_to_cpus(x) I DON'T KNOW
-#define __cpu_to_be32s(x) __swahb32s((x))
-#define __be32_to_cpus(x) __swahb32s((x))
-#define __cpu_to_be16s(x) __swab16s((x))
-#define __be16_to_cpus(x) __swab16s((x))
-
-#include <linux/byteorder/generic.h>
-
-#endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h
index ae5e5f9..8c780c7 100644
--- a/include/linux/byteorder/swabb.h
+++ b/include/linux/byteorder/swabb.h
@@ -25,6 +25,8 @@
*
*/
+#include <linux/types.h>
+
#define ___swahw32(x) \
({ \
__u32 __x = (x); \
@@ -77,19 +79,14 @@
/*
* Allow constant folding
*/
-#if defined(__GNUC__) && defined(__OPTIMIZE__)
-# define __swahw32(x) \
+#define __swahw32(x) \
(__builtin_constant_p((__u32)(x)) ? \
___swahw32((x)) : \
__fswahw32((x)))
-# define __swahb32(x) \
+#define __swahb32(x) \
(__builtin_constant_p((__u32)(x)) ? \
___swahb32((x)) : \
__fswahb32((x)))
-#else
-# define __swahw32(x) __fswahw32(x)
-# define __swahb32(x) __fswahb32(x)
-#endif /* OPTIMIZE */
static inline __u32 __fswahw32(__u32 x)
@@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr)
*/
#endif /* __BYTEORDER_HAS_U64__ */
-#if defined(__KERNEL__)
#define swahw32 __swahw32
#define swahb32 __swahb32
#define swahw32p __swahw32p
#define swahb32p __swahb32p
#define swahw32s __swahw32s
#define swahb32s __swahb32s
-#endif
#endif /* _LINUX_BYTEORDER_SWABB_H */
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h
new file mode 100644
index 0000000..0bc45e6
--- /dev/null
+++ b/include/linux/cfag12864b.h
@@ -0,0 +1,77 @@
+/*
+ * Filename: cfag12864b.h
+ * Version: 0.1.0
+ * Description: cfag12864b LCD driver header
+ * License: GPLv2
+ *
+ * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ * Date: 2006-10-12
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef _CFAG12864B_H_
+#define _CFAG12864B_H_
+
+#define CFAG12864B_WIDTH (128)
+#define CFAG12864B_HEIGHT (64)
+#define CFAG12864B_CONTROLLERS (2)
+#define CFAG12864B_PAGES (8)
+#define CFAG12864B_ADDRESSES (64)
+#define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \
+ (CFAG12864B_PAGES) * \
+ (CFAG12864B_ADDRESSES))
+
+/*
+ * The driver will blit this buffer to the LCD
+ *
+ * Its size is CFAG12864B_SIZE.
+ */
+extern unsigned char * cfag12864b_buffer;
+
+/*
+ * Get the refresh rate of the LCD
+ *
+ * Returns the refresh rate (hertzs).
+ */
+extern unsigned int cfag12864b_getrate(void);
+
+/*
+ * Enable refreshing
+ *
+ * Returns 0 if successful (anyone was using it),
+ * or != 0 if failed (someone is using it).
+ */
+extern unsigned char cfag12864b_enable(void);
+
+/*
+ * Disable refreshing
+ *
+ * You should call this only when you finish using the LCD.
+ */
+extern void cfag12864b_disable(void);
+
+/*
+ * Is enabled refreshing? (is anyone using the module?)
+ *
+ * Returns 0 if refreshing is not enabled (anyone is using it),
+ * or != 0 if refreshing is enabled (someone is using it).
+ *
+ * Useful for buffer read-only modules.
+ */
+extern unsigned char cfag12864b_isenabled(void);
+
+#endif /* _CFAG12864B_H_ */
+
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 6e1c44a..9008eab 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -27,6 +27,13 @@
#define __inline__ __inline__ __attribute__((always_inline))
#define __inline __inline __attribute__((always_inline))
#define __deprecated __attribute__((deprecated))
+#define __packed __attribute__((packed))
+#define __weak __attribute__((weak))
+#define __naked __attribute__((naked))
+#define __noreturn __attribute__((noreturn))
+#define __pure __attribute__((pure))
+#define __aligned(x) __attribute__((aligned(x)))
+#define __printf(a,b) __attribute__((format(printf,a,b)))
#define noinline __attribute__((noinline))
#define __attribute_pure__ __attribute__((pure))
#define __attribute_const__ __attribute__((__const__))
diff --git a/include/linux/console.h b/include/linux/console.h
index 7d04202..de25ee3 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -21,6 +21,7 @@ struct vc_data;
struct console_font_op;
struct console_font;
struct module;
+struct tty_struct;
/*
* this is what the terminal answers to a ESC-Z or csi0c query.
@@ -132,6 +133,9 @@ static inline void resume_console(void) {}
int mda_console_init(void);
void prom_con_init(void);
+void vcs_make_sysfs(struct tty_struct *tty);
+void vcs_remove_sysfs(struct tty_struct *tty);
+
/* Some debug stub to catch some of the obvious races in the VT code */
#if 1
#define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress)
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index ed6c0fe..a86162b 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -11,6 +11,7 @@
#include <linux/wait.h>
#include <linux/vt.h>
+#include <linux/workqueue.h>
struct vt_struct;
@@ -103,6 +104,7 @@ struct vc_data {
struct vc {
struct vc_data *d;
+ struct work_struct SAK_work;
/* might add scrmem, vt_struct, kbd at some time,
to have everything in one place - the disadvantage
@@ -110,6 +112,7 @@ struct vc {
};
extern struct vc vc_cons [MAX_NR_CONSOLES];
+extern void vc_SAK(struct work_struct *work);
#define CUR_DEF 0
#define CUR_NONE 1
diff --git a/include/linux/dn.h b/include/linux/dn.h
index 10b6a6f..02bba04 100644
--- a/include/linux/dn.h
+++ b/include/linux/dn.h
@@ -113,7 +113,7 @@ struct accessdata_dn
* DECnet logical link information structure
*/
struct linkinfo_dn {
- __le16 idn_segsize; /* Segment size for link */
+ __u16 idn_segsize; /* Segment size for link */
__u8 idn_linkstate; /* Logical link state */
};
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 1410e53..20fd161 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -169,6 +169,7 @@ extern int dir_notify_enable;
#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \
((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
+#define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
@@ -1572,12 +1573,18 @@ extern int invalidate_partition(struct gendisk *, int);
extern int invalidate_inodes(struct super_block *);
unsigned long invalidate_mapping_pages(struct address_space *mapping,
pgoff_t start, pgoff_t end);
-unsigned long invalidate_inode_pages(struct address_space *mapping);
+
+static inline unsigned long __deprecated
+invalidate_inode_pages(struct address_space *mapping)
+{
+ return invalidate_mapping_pages(mapping, 0, ~0UL);
+}
+
static inline void invalidate_remote_inode(struct inode *inode)
{
if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
S_ISLNK(inode->i_mode))
- invalidate_inode_pages(inode->i_mapping);
+ invalidate_mapping_pages(inode->i_mapping, 0, -1);
}
extern int invalidate_inode_pages2(struct address_space *mapping);
extern int invalidate_inode_pages2_range(struct address_space *mapping,
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 0a022b2..2c65da7 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -20,7 +20,11 @@ enum {
LINUX_EXTENDED_PARTITION = 0x85,
WIN98_EXTENDED_PARTITION = 0x0f,
+ SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION,
+
LINUX_SWAP_PARTITION = 0x82,
+ LINUX_DATA_PARTITION = 0x83,
+ LINUX_LVM_PARTITION = 0x8e,
LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */
SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
@@ -400,10 +404,14 @@ struct unixware_disklabel {
#ifdef __KERNEL__
+#define ADDPART_FLAG_NONE 0
+#define ADDPART_FLAG_RAID 1
+#define ADDPART_FLAG_WHOLEDISK 2
+
char *disk_name (struct gendisk *hd, int part, char *buf);
extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
-extern void add_partition(struct gendisk *, int, sector_t, sector_t);
+extern void add_partition(struct gendisk *, int, sector_t, sector_t, int);
extern void delete_partition(struct gendisk *, int);
extern struct gendisk *alloc_disk_node(int minors, int node_id);
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 063799e..2a7d15b 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -85,8 +85,10 @@ struct vm_area_struct;
static inline enum zone_type gfp_zone(gfp_t flags)
{
+#ifdef CONFIG_ZONE_DMA
if (flags & __GFP_DMA)
return ZONE_DMA;
+#endif
#ifdef CONFIG_ZONE_DMA32
if (flags & __GFP_DMA32)
return ZONE_DMA32;
diff --git a/include/linux/init.h b/include/linux/init.h
index 5a593a1..c65f510 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -172,7 +172,7 @@ void __init parse_early_param(void);
* module_init() - driver initialization entry point
* @x: function to be run at kernel boot time or module insertion
*
- * module_init() will either be called during do_initcalls (if
+ * module_init() will either be called during do_initcalls() (if
* builtin) or at module insertion time (if a module). There can only
* be one per module.
*/
diff --git a/include/linux/io.h b/include/linux/io.h
index 9e419eb..c244a0c 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -43,12 +43,6 @@ void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset,
unsigned long size);
void devm_iounmap(struct device *dev, void __iomem *addr);
-void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
-void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
-void __iomem * const * pcim_iomap_table(struct pci_dev *pdev);
-
-int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
-
/**
* check_signature - find BIOS signatures
* @io_addr: mmio address to check
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 63fb18dc..e91dce7 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -176,6 +176,7 @@ static inline void console_verbose(void)
}
extern void bust_spinlocks(int yes);
+extern void wake_up_klogd(void);
extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */
extern int panic_timeout;
extern int panic_on_oops;
@@ -200,6 +201,7 @@ extern enum system_states {
#define TAINT_FORCED_RMMOD (1<<3)
#define TAINT_MACHINE_CHECK (1<<4)
#define TAINT_BAD_PAGE (1<<5)
+#define TAINT_USER (1<<6)
extern void dump_stack(void);
@@ -312,6 +314,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char *
(void)__tmp; \
})
+struct sysinfo;
+extern int do_sysinfo(struct sysinfo *info);
+
#endif /* __KERNEL__ */
#define SI_LOAD_SHIFT 16
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 48eccd8..404f446 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo)
* @buffer: the data to be added.
* @len: the length of the data to be added.
*
- * This function copies at most 'len' bytes from the 'buffer' into
+ * This function copies at most @len bytes from the @buffer into
* the FIFO depending on the free space, and returns the number of
* bytes copied.
*/
@@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo,
* @buffer: where the data must be copied.
* @len: the size of the destination buffer.
*
- * This function copies at most 'len' bytes from the FIFO into the
- * 'buffer' and returns the number of copied bytes.
+ * This function copies at most @len bytes from the FIFO into the
+ * @buffer and returns the number of copied bytes.
*/
static inline unsigned int kfifo_get(struct kfifo *fifo,
unsigned char *buffer, unsigned int len)
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h
new file mode 100644
index 0000000..8047d4b
--- /dev/null
+++ b/include/linux/ks0108.h
@@ -0,0 +1,46 @@
+/*
+ * Filename: ks0108.h
+ * Version: 0.1.0
+ * Description: ks0108 LCD Controller driver header
+ * License: GPLv2
+ *
+ * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ * Date: 2006-10-31
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef _KS0108_H_
+#define _KS0108_H_
+
+/* Write a byte to the data port */
+extern void ks0108_writedata(unsigned char byte);
+
+/* Write a byte to the control port */
+extern void ks0108_writecontrol(unsigned char byte);
+
+/* Set the controller's current display state (0..1) */
+extern void ks0108_displaystate(unsigned char state);
+
+/* Set the controller's current startline (0..63) */
+extern void ks0108_startline(unsigned char startline);
+
+/* Set the controller's current address (0..63) */
+extern void ks0108_address(unsigned char address);
+
+/* Set the controller's current page (0..7) */
+extern void ks0108_page(unsigned char page);
+
+#endif /* _KS0108_H_ */
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 611f17f..7444a63 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
* @add1: addend1
* @add2: addend2
*
- * Returns the sum of addend1 and addend2
+ * Returns the sum of @add1 and @add2.
*/
static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
{
@@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
* @kt: addend
* @nsec: the scalar nsec value to add
*
- * Returns the sum of kt and nsec in ktime_t format
+ * Returns the sum of @kt and @nsec in ktime_t format
*/
extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
@@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
* ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
* @kt: the ktime_t variable to convert
*
- * Returns the scalar nanoseconds representation of kt
+ * Returns the scalar nanoseconds representation of @kt
*/
static inline s64 ktime_to_ns(const ktime_t kt)
{
diff --git a/include/linux/list.h b/include/linux/list.h
index 611059d..f9d71ea 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next)
/**
* list_del - deletes entry from list.
* @entry: the element to delete from the list.
- * Note: list_empty on entry does not return true after this, the entry is
+ * Note: list_empty() on entry does not return true after this, the entry is
* in an undefined state.
*/
#ifndef CONFIG_DEBUG_LIST
@@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry);
* list_del_rcu - deletes entry from list without re-initialization
* @entry: the element to delete from the list.
*
- * Note: list_empty on entry does not return true after this,
+ * Note: list_empty() on entry does not return true after this,
* the entry is in an undefined state. It is useful for RCU based
* lockfree traversal.
*
@@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry)
* list_replace - replace old entry by new one
* @old : the element to be replaced
* @new : the new element to insert
- * Note: if 'old' was empty, it will be overwritten.
+ *
+ * If @old was empty, it will be overwritten.
*/
static inline void list_replace(struct list_head *old,
struct list_head *new)
@@ -360,6 +361,62 @@ static inline void list_splice_init(struct list_head *list,
}
/**
+ * list_splice_init_rcu - splice an RCU-protected list into an existing list.
+ * @list: the RCU-protected list to splice
+ * @head: the place in the list to splice the first list into
+ * @sync: function to sync: synchronize_rcu(), synchronize_sched(), ...
+ *
+ * @head can be RCU-read traversed concurrently with this function.
+ *
+ * Note that this function blocks.
+ *
+ * Important note: the caller must take whatever action is necessary to
+ * prevent any other updates to @head. In principle, it is possible
+ * to modify the list as soon as sync() begins execution.
+ * If this sort of thing becomes necessary, an alternative version
+ * based on call_rcu() could be created. But only if -really-
+ * needed -- there is no shortage of RCU API members.
+ */
+static inline void list_splice_init_rcu(struct list_head *list,
+ struct list_head *head,
+ void (*sync)(void))
+{
+ struct list_head *first = list->next;
+ struct list_head *last = list->prev;
+ struct list_head *at = head->next;
+
+ if (list_empty(head))
+ return;
+
+ /* "first" and "last" tracking list, so initialize it. */
+
+ INIT_LIST_HEAD(list);
+
+ /*
+ * At this point, the list body still points to the source list.
+ * Wait for any readers to finish using the list before splicing
+ * the list body into the new list. Any new readers will see
+ * an empty list.
+ */
+
+ sync();
+
+ /*
+ * Readers are finished with the source list, so perform splice.
+ * The order is important if the new list is global and accessible
+ * to concurrent RCU readers. Note that RCU readers are not
+ * permitted to traverse the prev pointers without excluding
+ * this function.
+ */
+
+ last->next = at;
+ smp_wmb();
+ head->next = first;
+ first->prev = head;
+ at->prev = last;
+}
+
+/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
* @type: the type of the struct this is embedded in.
@@ -432,12 +489,12 @@ static inline void list_splice_init(struct list_head *list,
pos = list_entry(pos->member.prev, typeof(*pos), member))
/**
- * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue
+ * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
* @pos: the type * to use as a start point
* @head: the head of the list
* @member: the name of the list_struct within the struct.
*
- * Prepares a pos entry for use as a start point in list_for_each_entry_continue.
+ * Prepares a pos entry for use as a start point in list_for_each_entry_continue().
*/
#define list_prepare_entry(pos, head, member) \
((pos) ? : list_entry(head, typeof(*pos), member))
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index ea097dd..7e1160d 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -132,6 +132,7 @@ struct lock_list {
struct list_head entry;
struct lock_class *class;
struct stack_trace trace;
+ int distance;
};
/*
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h
index 432b2fa..bdc0112 100644
--- a/include/linux/mc146818rtc.h
+++ b/include/linux/mc146818rtc.h
@@ -18,6 +18,16 @@
#ifdef __KERNEL__
#include <linux/spinlock.h> /* spinlock_t */
extern spinlock_t rtc_lock; /* serialize CMOS RAM access */
+
+/* Some RTCs extend the mc146818 register set to support alarms of more
+ * than 24 hours in the future; or dates that include a century code.
+ * This platform_data structure can pass this information to the driver.
+ */
+struct cmos_rtc_board_info {
+ u8 rtc_day_alarm; /* zero, or register index */
+ u8 rtc_mon_alarm; /* zero, or register index */
+ u8 rtc_century; /* zero, or register index */
+};
#endif
/**********************************************************************
diff --git a/include/linux/mm.h b/include/linux/mm.h
index bb793a4..77a7610 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
/* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */
#ifdef NODE_NOT_IN_PAGEFLAGS
#define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT)
+#define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \
+ SECTIONS_PGOFF : ZONES_PGOFF)
#else
#define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT)
+#define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \
+ NODES_PGOFF : ZONES_PGOFF)
#endif
-#if ZONES_WIDTH > 0
-#define ZONEID_PGSHIFT ZONES_PGSHIFT
-#else
-#define ZONEID_PGSHIFT NODES_PGOFF
-#endif
+#define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
@@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page)
*/
static inline int page_zone_id(struct page *page)
{
- BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK);
return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK;
}
@@ -786,6 +785,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
extern void do_invalidatepage(struct page *page, unsigned long offset);
int __set_page_dirty_nobuffers(struct page *page);
+int __set_page_dirty_no_writeback(struct page *page);
int redirty_page_for_writepage(struct writeback_control *wbc,
struct page *page);
int FASTCALL(set_page_dirty(struct page *page));
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 3b6723d..895bc4e 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -1,30 +1,29 @@
-
static inline void
add_page_to_active_list(struct zone *zone, struct page *page)
{
list_add(&page->lru, &zone->active_list);
- zone->nr_active++;
+ __inc_zone_state(zone, NR_ACTIVE);
}
static inline void
add_page_to_inactive_list(struct zone *zone, struct page *page)
{
list_add(&page->lru, &zone->inactive_list);
- zone->nr_inactive++;
+ __inc_zone_state(zone, NR_INACTIVE);
}
static inline void
del_page_from_active_list(struct zone *zone, struct page *page)
{
list_del(&page->lru);
- zone->nr_active--;
+ __dec_zone_state(zone, NR_ACTIVE);
}
static inline void
del_page_from_inactive_list(struct zone *zone, struct page *page)
{
list_del(&page->lru);
- zone->nr_inactive--;
+ __dec_zone_state(zone, NR_INACTIVE);
}
static inline void
@@ -33,9 +32,9 @@ del_page_from_lru(struct zone *zone, struct page *page)
list_del(&page->lru);
if (PageActive(page)) {
__ClearPageActive(page);
- zone->nr_active--;
+ __dec_zone_state(zone, NR_ACTIVE);
} else {
- zone->nr_inactive--;
+ __dec_zone_state(zone, NR_INACTIVE);
}
}
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index b262f47..ee9e314 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -47,15 +47,20 @@ struct zone_padding {
#endif
enum zone_stat_item {
+ /* First 128 byte cacheline (assuming 64 bit words) */
+ NR_FREE_PAGES,
+ NR_INACTIVE,
+ NR_ACTIVE,
NR_ANON_PAGES, /* Mapped anonymous pages */
NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
only modified from process context */
NR_FILE_PAGES,
- NR_SLAB_RECLAIMABLE,
- NR_SLAB_UNRECLAIMABLE,
- NR_PAGETABLE, /* used for pagetables */
NR_FILE_DIRTY,
NR_WRITEBACK,
+ /* Second 128 byte cacheline */
+ NR_SLAB_RECLAIMABLE,
+ NR_SLAB_UNRECLAIMABLE,
+ NR_PAGETABLE, /* used for pagetables */
NR_UNSTABLE_NFS, /* NFS unstable pages */
NR_BOUNCE,
NR_VMSCAN_WRITE,
@@ -91,6 +96,7 @@ struct per_cpu_pageset {
#endif
enum zone_type {
+#ifdef CONFIG_ZONE_DMA
/*
* ZONE_DMA is used when there are devices that are not able
* to do DMA to all of addressable memory (ZONE_NORMAL). Then we
@@ -111,6 +117,7 @@ enum zone_type {
* <16M.
*/
ZONE_DMA,
+#endif
#ifdef CONFIG_ZONE_DMA32
/*
* x86_64 needs two ZONE_DMAs because it supports devices that are
@@ -147,15 +154,30 @@ enum zone_type {
* match the requested limits. See gfp_zone() in include/linux/gfp.h
*/
-#if !defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_HIGHMEM)
+/*
+ * Count the active zones. Note that the use of defined(X) outside
+ * #if and family is not necessarily defined so ensure we cannot use
+ * it later. Use __ZONE_COUNT to work out how many shift bits we need.
+ */
+#define __ZONE_COUNT ( \
+ defined(CONFIG_ZONE_DMA) \
+ + defined(CONFIG_ZONE_DMA32) \
+ + 1 \
+ + defined(CONFIG_HIGHMEM) \
+)
+#if __ZONE_COUNT < 2
+#define ZONES_SHIFT 0
+#elif __ZONE_COUNT <= 2
#define ZONES_SHIFT 1
-#else
+#elif __ZONE_COUNT <= 4
#define ZONES_SHIFT 2
+#else
+#error ZONES_SHIFT -- too many zones configured adjust calculation
#endif
+#undef __ZONE_COUNT
struct zone {
/* Fields commonly accessed by the page allocator */
- unsigned long free_pages;
unsigned long pages_min, pages_low, pages_high;
/*
* We don't know if the memory that we're going to allocate will be freeable
@@ -197,8 +219,6 @@ struct zone {
struct list_head inactive_list;
unsigned long nr_scan_active;
unsigned long nr_scan_inactive;
- unsigned long nr_active;
- unsigned long nr_inactive;
unsigned long pages_scanned; /* since last reclaim */
int all_unreclaimable; /* All pages pinned */
@@ -442,8 +462,6 @@ typedef struct pglist_data {
#include <linux/memory_hotplug.h>
-void __get_zone_counts(unsigned long *active, unsigned long *inactive,
- unsigned long *free, struct pglist_data *pgdat);
void get_zone_counts(unsigned long *active, unsigned long *inactive,
unsigned long *free);
void build_all_zonelists(void);
@@ -523,7 +541,11 @@ static inline int is_dma32(struct zone *zone)
static inline int is_dma(struct zone *zone)
{
+#ifdef CONFIG_ZONE_DMA
return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
+#else
+ return 0;
+#endif
}
/* These two functions are used to setup the per zone pages min values */
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 1b7e178..dab69af 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -43,9 +43,8 @@ struct vfsmount {
struct super_block *mnt_sb; /* pointer to superblock */
struct list_head mnt_mounts; /* list of children, anchored here */
struct list_head mnt_child; /* and going through their mnt_child */
- atomic_t mnt_count;
int mnt_flags;
- int mnt_expiry_mark; /* true if marked for expiry */
+ /* 4 bytes hole on 64bits arches */
char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
struct list_head mnt_list;
struct list_head mnt_expire; /* link in fs-specific expiry list */
@@ -54,6 +53,13 @@ struct vfsmount {
struct list_head mnt_slave; /* slave list entry */
struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */
struct mnt_namespace *mnt_ns; /* containing namespace */
+ /*
+ * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount
+ * to let these frequently modified fields in a separate cache line
+ * (so that reads of mnt_flags wont ping-pong on SMP machines)
+ */
+ atomic_t mnt_count;
+ int mnt_expiry_mark; /* true if marked for expiry */
int mnt_pinned;
};
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9e3042e..98c8765 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -840,6 +840,11 @@ enum pci_fixup_pass {
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
+void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
+void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
+void __iomem * const * pcim_iomap_table(struct pci_dev *pdev);
+int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
+
extern int pci_pci_problems;
#define PCIPCI_FAIL 1 /* No PCI PCI DMA */
#define PCIPCI_TRITON 2
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index e67b68c..8fb9c3e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -959,6 +959,7 @@
#define PCI_DEVICE_ID_PLX_R753 0x1152
#define PCI_DEVICE_ID_PLX_OLITEC 0x1187
#define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196
+#define PCI_DEVICE_ID_PLX_9030 0x9030
#define PCI_DEVICE_ID_PLX_9050 0x9050
#define PCI_DEVICE_ID_PLX_9080 0x9080
#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001
@@ -1696,6 +1697,8 @@
#define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8
#define PCI_DEVICE_ID_LML_33R10 0x8a02
+#define PCI_VENDOR_ID_ESDGMBH 0x12fe
+#define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111
#define PCI_VENDOR_ID_SIIG 0x131f
#define PCI_SUBVENDOR_ID_SIIG 0x131f
@@ -1811,6 +1814,9 @@
#define PCI_DEVICE_ID_MOXA_C168 0x1680
#define PCI_DEVICE_ID_MOXA_CP168U 0x1681
#define PCI_DEVICE_ID_MOXA_CP168EL 0x1682
+#define PCI_DEVICE_ID_MOXA_CP204J 0x2040
+#define PCI_DEVICE_ID_MOXA_C218 0x2180
+#define PCI_DEVICE_ID_MOXA_C320 0x3200
#define PCI_VENDOR_ID_CCD 0x1397
#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0
@@ -1991,6 +1997,10 @@
#define PCI_VENDOR_ID_CHELSIO 0x1425
+#define PCI_SUBVENDOR_ID_PERLE 0x155f
+#define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001
+#define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010
+
#define PCI_VENDOR_ID_SYBA 0x1592
#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index ab8a8dd..9a5226f 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -352,6 +352,8 @@ struct pnp_protocol {
(dev) = protocol_to_pnp_dev((dev)->protocol_list.next))
+extern struct bus_type pnp_bus_type;
+
#if defined(CONFIG_PNP)
/* device management */
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index 966c358..66a9681 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -2,7 +2,10 @@
File: linux/reiserfs_xattr.h
*/
-#include <linux/xattr.h>
+#ifndef _LINUX_REISERFS_XATTR_H
+#define _LINUX_REISERFS_XATTR_H
+
+#include <linux/types.h>
/* Magic value in header */
#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */
@@ -13,7 +16,18 @@ struct reiserfs_xattr_header {
};
#ifdef __KERNEL__
+
#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/rwsem.h>
+#include <linux/reiserfs_fs_i.h>
+#include <linux/reiserfs_fs.h>
+
+struct inode;
+struct dentry;
+struct iattr;
+struct super_block;
+struct nameidata;
struct reiserfs_xattr_handler {
char *prefix;
@@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int);
extern struct reiserfs_xattr_handler user_handler;
extern struct reiserfs_xattr_handler trusted_handler;
-#ifdef CONFIG_REISERFS_FS_SECURITY
extern struct reiserfs_xattr_handler security_handler;
-#endif
int reiserfs_xattr_register_handlers(void) __init;
void reiserfs_xattr_unregister_handlers(void);
@@ -137,6 +149,8 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
{
}
-#endif
+#endif /* CONFIG_REISERFS_FS_XATTR */
+
+#endif /* __KERNEL__ */
-#endif /* __KERNEL__ */
+#endif /* _LINUX_REISERFS_XATTR_H */
diff --git a/include/linux/relay.h b/include/linux/relay.h
index c6a48bf..759a0f9 100644
--- a/include/linux/relay.h
+++ b/include/linux/relay.h
@@ -24,7 +24,7 @@
/*
* Tracks changes to rchan/rchan_buf structs
*/
-#define RELAYFS_CHANNEL_VERSION 6
+#define RELAYFS_CHANNEL_VERSION 7
/*
* Per-cpu relay channel buffer
@@ -64,6 +64,10 @@ struct rchan
void *private_data; /* for user-defined data */
size_t last_toobig; /* tried to log event > subbuf size */
struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */
+ int is_global; /* One global buffer ? */
+ struct list_head list; /* for channel list */
+ struct dentry *parent; /* parent dentry passed to open */
+ char base_filename[NAME_MAX]; /* saved base filename */
};
/*
@@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename,
struct dentry *parent,
size_t subbuf_size,
size_t n_subbufs,
- struct rchan_callbacks *cb);
+ struct rchan_callbacks *cb,
+ void *private_data);
extern void relay_close(struct rchan *chan);
extern void relay_flush(struct rchan *chan);
extern void relay_subbufs_consumed(struct rchan *chan,
diff --git a/include/linux/rio.h b/include/linux/rio.h
index d938570..68e3f68 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -25,6 +25,7 @@
#define RIO_ANY_DESTID 0xff
#define RIO_NO_HOPCOUNT -1
+#define RIO_INVALID_DESTID 0xffff
#define RIO_MAX_MPORT_RESOURCES 16
#define RIO_MAX_DEV_RESOURCES 16
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4463735..76c8e2d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1013,8 +1013,10 @@ struct task_struct {
* to a stack based synchronous wait) if its doing sync IO.
*/
wait_queue_t *io_wait;
+#ifdef CONFIG_TASK_XACCT
/* i/o counters(bytes read/written, #syscalls */
u64 rchar, wchar, syscr, syscw;
+#endif
struct task_io_accounting ioac;
#if defined(CONFIG_TASK_XACCT)
u64 acct_rss_mem1; /* accumulated rss usage */
@@ -1649,6 +1651,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
extern void normalize_rt_tasks(void);
+#ifdef CONFIG_TASK_XACCT
+static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
+{
+ tsk->rchar += amt;
+}
+
+static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
+{
+ tsk->wchar += amt;
+}
+
+static inline void inc_syscr(struct task_struct *tsk)
+{
+ tsk->syscr++;
+}
+
+static inline void inc_syscw(struct task_struct *tsk)
+{
+ tsk->syscw++;
+}
+#else
+static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
+{
+}
+
+static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
+{
+}
+
+static inline void inc_syscr(struct task_struct *tsk)
+{
+}
+
+static inline void inc_syscw(struct task_struct *tsk)
+{
+}
+#endif
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/security.h b/include/linux/security.h
index 83cdefa..c554f60 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -492,7 +492,7 @@ struct request_sock;
* Note that the fown_struct, @fown, is never outside the context of a
* struct file, so the file structure (and associated security information)
* can always be obtained:
- * (struct file *)((long)fown - offsetof(struct file,f_owner));
+ * container_of(fown, struct file, f_owner)
* @tsk contains the structure of task receiving signal.
* @fown contains the file owner information.
* @sig is the signal that will be sent. When 0, kernel sends SIGIO.
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index 4b463e6..5e43646 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -19,7 +19,9 @@
struct cache_sizes {
size_t cs_size;
struct kmem_cache *cs_cachep;
+#ifdef CONFIG_ZONE_DMA
struct kmem_cache *cs_dmacachep;
+#endif
};
extern struct cache_sizes malloc_sizes[];
@@ -39,9 +41,12 @@ static inline void *kmalloc(size_t size, gfp_t flags)
__you_cannot_kmalloc_that_much();
}
found:
- return kmem_cache_alloc((flags & GFP_DMA) ?
- malloc_sizes[i].cs_dmacachep :
- malloc_sizes[i].cs_cachep, flags);
+#ifdef CONFIG_ZONE_DMA
+ if (flags & GFP_DMA)
+ return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep,
+ flags);
+#endif
+ return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags);
}
return __kmalloc(size, flags);
}
@@ -62,9 +67,12 @@ static inline void *kzalloc(size_t size, gfp_t flags)
__you_cannot_kzalloc_that_much();
}
found:
- return kmem_cache_zalloc((flags & GFP_DMA) ?
- malloc_sizes[i].cs_dmacachep :
- malloc_sizes[i].cs_cachep, flags);
+#ifdef CONFIG_ZONE_DMA
+ if (flags & GFP_DMA)
+ return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep,
+ flags);
+#endif
+ return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags);
}
return __kzalloc(size, flags);
}
@@ -88,9 +96,13 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
__you_cannot_kmalloc_that_much();
}
found:
- return kmem_cache_alloc_node((flags & GFP_DMA) ?
- malloc_sizes[i].cs_dmacachep :
- malloc_sizes[i].cs_cachep, flags, node);
+#ifdef CONFIG_ZONE_DMA
+ if (flags & GFP_DMA)
+ return kmem_cache_alloc_node(malloc_sizes[i].cs_dmacachep,
+ flags, node);
+#endif
+ return kmem_cache_alloc_node(malloc_sizes[i].cs_cachep,
+ flags, node);
}
return __kmalloc_node(size, flags, node);
}
diff --git a/include/linux/socket.h b/include/linux/socket.h
index fcd35a2..28157a3 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage {
/* _SS_MAXSIZE value minus size of ss_family */
} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#ifdef __KERNEL__
#include <asm/socket.h> /* arch-dependent defines */
#include <linux/sockios.h> /* the SIOCxxx I/O controls */
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 94b767d..61fef37 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -228,15 +228,30 @@ do { \
# define read_unlock_irq(lock) _read_unlock_irq(lock)
# define write_unlock_irq(lock) _write_unlock_irq(lock)
#else
-# define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock)
-# define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock)
-# define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock)
-# define spin_unlock_irq(lock) \
- do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
-# define read_unlock_irq(lock) \
- do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
-# define write_unlock_irq(lock) \
- do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
+# define spin_unlock(lock) \
+ do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0)
+# define read_unlock(lock) \
+ do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0)
+# define write_unlock(lock) \
+ do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0)
+# define spin_unlock_irq(lock) \
+do { \
+ __raw_spin_unlock(&(lock)->raw_lock); \
+ __release(lock); \
+ local_irq_enable(); \
+} while (0)
+# define read_unlock_irq(lock) \
+do { \
+ __raw_read_unlock(&(lock)->raw_lock); \
+ __release(lock); \
+ local_irq_enable(); \
+} while (0)
+# define write_unlock_irq(lock) \
+do { \
+ __raw_write_unlock(&(lock)->raw_lock); \
+ __release(lock); \
+ local_irq_enable(); \
+} while (0)
#endif
#define spin_unlock_irqrestore(lock, flags) \
diff --git a/include/linux/stat.h b/include/linux/stat.h
index 679ef0d..4f8539c 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -7,7 +7,7 @@
#endif
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#ifdef __KERNEL__
#define S_IFMT 00170000
#define S_IFSOCK 0140000
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 5423559..00686888 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -170,11 +170,13 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *
extern unsigned long totalram_pages;
extern unsigned long totalreserve_pages;
extern long nr_swap_pages;
-extern unsigned int nr_free_pages(void);
-extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat);
extern unsigned int nr_free_buffer_pages(void);
extern unsigned int nr_free_pagecache_pages(void);
+/* Definition of global_page_state not available yet */
+#define nr_free_pages() global_page_state(NR_FREE_PAGES)
+
+
/* linux/mm/swap.c */
extern void FASTCALL(lru_cache_add(struct page *));
extern void FASTCALL(lru_cache_add_active(struct page *));
diff --git a/include/linux/time.h b/include/linux/time.h
index a5b7399..55cee17 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -46,7 +46,7 @@ static inline int timespec_equal(struct timespec *a, struct timespec *b)
* lhs == rhs: return 0
* lhs > rhs: return >0
*/
-static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs)
+static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs)
{
if (lhs->tv_sec < rhs->tv_sec)
return -1;
@@ -55,7 +55,7 @@ static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs)
return lhs->tv_nsec - rhs->tv_nsec;
}
-static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs)
+static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs)
{
if (lhs->tv_sec < rhs->tv_sec)
return -1;
diff --git a/include/linux/timex.h b/include/linux/timex.h
index db501dc..9a24e50 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -255,10 +255,10 @@ struct time_interpolator {
u8 jitter; /* if set compensate for fluctuations */
u32 nsec_per_cyc; /* set by register_time_interpolator() */
void *addr; /* address of counter or function */
- u64 mask; /* mask the valid bits of the counter */
+ cycles_t mask; /* mask the valid bits of the counter */
unsigned long offset; /* nsec offset at last update of interpolator */
u64 last_counter; /* counter value in units of the counter at last update */
- u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */
+ cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */
u64 frequency; /* frequency in counts/second */
long drift; /* drift in parts-per-million (or -1) */
unsigned long skips; /* skips forward */
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 65cbcf2..8427c9e 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -24,7 +24,27 @@
#define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */
#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
-#define NR_LDISCS 16
+#define NR_LDISCS 17
+
+/* line disciplines */
+#define N_TTY 0
+#define N_SLIP 1
+#define N_MOUSE 2
+#define N_PPP 3
+#define N_STRIP 4
+#define N_AX25 5
+#define N_X25 6 /* X.25 async */
+#define N_6PACK 7
+#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
+#define N_R3964 9 /* Reserved for Simatic R3964 module */
+#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
+#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
+#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */
+ /* cards about SMS messages */
+#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14 /* synchronous PPP */
+#define N_HCI 15 /* Bluetooth HCI UART */
+#define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */
/*
* This character is the same as _POSIX_VDISABLE: it cannot be used as
@@ -291,6 +311,7 @@ extern void tty_vhangup(struct tty_struct * tty);
extern void tty_unhangup(struct file *filp);
extern int tty_hung_up_p(struct file * filp);
extern void do_SAK(struct tty_struct *tty);
+extern void __do_SAK(struct tty_struct *tty);
extern void disassociate_ctty(int priv);
extern void tty_flip_buffer_push(struct tty_struct *tty);
extern speed_t tty_get_baud_rate(struct tty_struct *tty);
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 5e9803e..acb1f10 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -3,20 +3,15 @@
#include <linux/types.h>
#include <linux/percpu.h>
+#include <linux/mm.h>
#include <linux/mmzone.h>
#include <asm/atomic.h>
-#ifdef CONFIG_VM_EVENT_COUNTERS
-/*
- * Light weight per cpu counter implementation.
- *
- * Counters should only be incremented. You need to set EMBEDDED
- * to disable VM_EVENT_COUNTERS. Things like procps (vmstat,
- * top, etc) use /proc/vmstat and depend on these counters.
- *
- * Counters are handled completely inline. On many platforms the code
- * generated will simply be the increment of a global address.
- */
+#ifdef CONFIG_ZONE_DMA
+#define DMA_ZONE(xx) xx##_DMA,
+#else
+#define DMA_ZONE(xx)
+#endif
#ifdef CONFIG_ZONE_DMA32
#define DMA32_ZONE(xx) xx##_DMA32,
@@ -30,7 +25,7 @@
#define HIGHMEM_ZONE(xx)
#endif
-#define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx)
+#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx)
enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
FOR_ALL_ZONES(PGALLOC),
@@ -45,6 +40,17 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
NR_VM_EVENT_ITEMS
};
+#ifdef CONFIG_VM_EVENT_COUNTERS
+/*
+ * Light weight per cpu counter implementation.
+ *
+ * Counters should only be incremented and no critical kernel component
+ * should rely on the counter values.
+ *
+ * Counters are handled completely inline. On many platforms the code
+ * generated will simply be the increment of a global address.
+ */
+
struct vm_event_state {
unsigned long event[NR_VM_EVENT_ITEMS];
};
@@ -85,17 +91,30 @@ static inline void vm_events_fold_cpu(int cpu)
#else
/* Disable counters */
-#define get_cpu_vm_events(e) 0L
-#define count_vm_event(e) do { } while (0)
-#define count_vm_events(e,d) do { } while (0)
-#define __count_vm_event(e) do { } while (0)
-#define __count_vm_events(e,d) do { } while (0)
-#define vm_events_fold_cpu(x) do { } while (0)
+static inline void count_vm_event(enum vm_event_item item)
+{
+}
+static inline void count_vm_events(enum vm_event_item item, long delta)
+{
+}
+static inline void __count_vm_event(enum vm_event_item item)
+{
+}
+static inline void __count_vm_events(enum vm_event_item item, long delta)
+{
+}
+static inline void all_vm_events(unsigned long *ret)
+{
+}
+static inline void vm_events_fold_cpu(int cpu)
+{
+}
#endif /* CONFIG_VM_EVENT_COUNTERS */
#define __count_zone_vm_events(item, zone, delta) \
- __count_vm_events(item##_DMA + zone_idx(zone), delta)
+ __count_vm_events(item##_NORMAL - ZONE_NORMAL + \
+ zone_idx(zone), delta)
/*
* Zone based page accounting with per cpu differentials.
@@ -142,14 +161,16 @@ static inline unsigned long node_page_state(int node,
struct zone *zones = NODE_DATA(node)->node_zones;
return
+#ifdef CONFIG_ZONE_DMA
+ zone_page_state(&zones[ZONE_DMA], item) +
+#endif
#ifdef CONFIG_ZONE_DMA32
zone_page_state(&zones[ZONE_DMA32], item) +
#endif
- zone_page_state(&zones[ZONE_NORMAL], item) +
#ifdef CONFIG_HIGHMEM
zone_page_state(&zones[ZONE_HIGHMEM], item) +
#endif
- zone_page_state(&zones[ZONE_DMA], item);
+ zone_page_state(&zones[ZONE_NORMAL], item);
}
extern void zone_statistics(struct zonelist *, struct zone *);
@@ -186,6 +207,9 @@ void inc_zone_page_state(struct page *, enum zone_stat_item);
void dec_zone_page_state(struct page *, enum zone_stat_item);
extern void inc_zone_state(struct zone *, enum zone_stat_item);
+extern void __inc_zone_state(struct zone *, enum zone_stat_item);
+extern void dec_zone_state(struct zone *, enum zone_stat_item);
+extern void __dec_zone_state(struct zone *, enum zone_stat_item);
void refresh_cpu_vm_stats(int);
void refresh_vm_stats(void);
@@ -214,6 +238,12 @@ static inline void __inc_zone_page_state(struct page *page,
__inc_zone_state(page_zone(page), item);
}
+static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
+{
+ atomic_long_dec(&zone->vm_stat[item]);
+ atomic_long_dec(&vm_stat[item]);
+}
+
static inline void __dec_zone_page_state(struct page *page,
enum zone_stat_item item)
{
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
index 0e7f1e2..def131a 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
@@ -13,6 +13,10 @@
#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
+#ifdef __KERNEL__
+
+#include <linux/types.h>
+
/* Namespaces */
#define XATTR_OS2_PREFIX "os2."
#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
@@ -29,6 +33,8 @@
#define XATTR_USER_PREFIX "user."
#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
+struct inode;
+struct dentry;
struct xattr_handler {
char *prefix;
@@ -50,4 +56,6 @@ ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_siz
int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags);
int generic_removexattr(struct dentry *dentry, const char *name);
+#endif /* __KERNEL__ */
+
#endif /* _LINUX_XATTR_H */
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index 76f957e..a566944 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -68,9 +68,10 @@ extern void dn_rt_cache_flush(int delay);
struct dn_route {
union {
struct dst_entry dst;
- struct dn_route *rt_next;
} u;
+ struct flowi fl;
+
__le16 rt_saddr;
__le16 rt_daddr;
__le16 rt_gateway;
@@ -80,8 +81,6 @@ struct dn_route {
unsigned rt_flags;
unsigned rt_type;
-
- struct flowi fl;
};
extern void dn_route_init(void);
diff --git a/include/net/dst.h b/include/net/dst.h
index 62b7e75..e12a8ce 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -37,9 +37,7 @@ struct sk_buff;
struct dst_entry
{
- struct dst_entry *next;
- atomic_t __refcnt; /* client references */
- int __use;
+ struct rcu_head rcu_head;
struct dst_entry *child;
struct net_device *dev;
short error;
@@ -50,7 +48,6 @@ struct dst_entry
#define DST_NOPOLICY 4
#define DST_NOHASH 8
#define DST_BALANCED 0x10
- unsigned long lastuse;
unsigned long expires;
unsigned short header_len; /* more space at head required */
@@ -75,8 +72,16 @@ struct dst_entry
#endif
struct dst_ops *ops;
- struct rcu_head rcu_head;
+ unsigned long lastuse;
+ atomic_t __refcnt; /* client references */
+ int __use;
+ union {
+ struct dst_entry *next;
+ struct rtable *rt_next;
+ struct rt6_info *rt6_next;
+ struct dn_route *dn_next;
+ };
char info[0];
};
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 7be4f4e..9eda572 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -83,7 +83,6 @@ struct rt6_info
{
union {
struct dst_entry dst;
- struct rt6_info *next;
} u;
struct inet6_dev *rt6i_idev;
diff --git a/include/net/route.h b/include/net/route.h
index 1440bdb..749e4df 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -53,9 +53,11 @@ struct rtable
union
{
struct dst_entry dst;
- struct rtable *rt_next;
} u;
+ /* Cache lookup keys */
+ struct flowi fl;
+
struct in_device *idev;
unsigned rt_flags;
@@ -69,9 +71,6 @@ struct rtable
/* Info on neighbour */
__be32 rt_gateway;
- /* Cache lookup keys */
- struct flowi fl;
-
/* Miscellaneous cached information */
__be32 rt_spec_dst; /* RFC1122 specific destination */
struct inet_peer *peer; /* long-living peer info */
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 8516ba6..ad0182e 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -567,10 +567,9 @@ struct sas_task {
static inline struct sas_task *sas_alloc_task(gfp_t flags)
{
extern struct kmem_cache *sas_task_cache;
- struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags);
+ struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags);
if (task) {
- memset(task, 0, sizeof(*task));
INIT_LIST_HEAD(&task->list);
spin_lock_init(&task->task_state_lock);
task->task_state_flags = SAS_TASK_STATE_PENDING;
OpenPOWER on IntegriCloud