summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2003-09-23 18:26:41 -0700
committerPatrick Mochel <mochel@osdl.org>2003-09-23 18:26:41 -0700
commit53f2011513be7d4cf8316fe0c00a75d54558b5f2 (patch)
treed12717420417d4984e947773f461ab0493fcb062 /include
parent1f0f8c8801efee44db583ab1e3dfc4070abc1393 (diff)
parent350667d77a71138f1c6bbd5076d2036f648ad520 (diff)
Merge osdl.org:/home/mochel/src/kernel/linux-2.5-virgin
into osdl.org:/home/mochel/src/kernel/linux-2.5-power
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/posix_types.h1
-rw-r--r--include/asm-arm/posix_types.h1
-rw-r--r--include/asm-arm26/hardirq.h1
-rw-r--r--include/asm-arm26/posix_types.h1
-rw-r--r--include/asm-arm26/softirq.h20
-rw-r--r--include/asm-arm26/stat.h6
-rw-r--r--include/asm-cris/posix_types.h1
-rw-r--r--include/asm-h8300/posix_types.h1
-rw-r--r--include/asm-h8300/stat.h6
-rw-r--r--include/asm-i386/posix_types.h1
-rw-r--r--include/asm-ia64/posix_types.h1
-rw-r--r--include/asm-m68k/posix_types.h1
-rw-r--r--include/asm-mips/posix_types.h1
-rw-r--r--include/asm-mips/softirq.h20
-rw-r--r--include/asm-mips/stat.h8
-rw-r--r--include/asm-parisc/posix_types.h1
-rw-r--r--include/asm-parisc/stat.h16
-rw-r--r--include/asm-ppc/a.out.h2
-rw-r--r--include/asm-ppc/agp.h6
-rw-r--r--include/asm-ppc/atomic.h2
-rw-r--r--include/asm-ppc/backlight.h4
-rw-r--r--include/asm-ppc/bootx.h18
-rw-r--r--include/asm-ppc/checksum.h4
-rw-r--r--include/asm-ppc/commproc.h4
-rw-r--r--include/asm-ppc/gt64260.h4
-rw-r--r--include/asm-ppc/gt64260_defs.h2
-rw-r--r--include/asm-ppc/hardirq.h6
-rw-r--r--include/asm-ppc/highmem.h2
-rw-r--r--include/asm-ppc/ibm44x.h16
-rw-r--r--include/asm-ppc/ipc.h2
-rw-r--r--include/asm-ppc/irq.h4
-rw-r--r--include/asm-ppc/m48t35.h20
-rw-r--r--include/asm-ppc/macio.h4
-rw-r--r--include/asm-ppc/md.h4
-rw-r--r--include/asm-ppc/mmu.h10
-rw-r--r--include/asm-ppc/mpc10x.h2
-rw-r--r--include/asm-ppc/mpc8xx.h2
-rw-r--r--include/asm-ppc/msgbuf.h2
-rw-r--r--include/asm-ppc/ocp_ids.h24
-rw-r--r--include/asm-ppc/of_device.h4
-rw-r--r--include/asm-ppc/ohare.h2
-rw-r--r--include/asm-ppc/open_pic.h8
-rw-r--r--include/asm-ppc/page.h12
-rw-r--r--include/asm-ppc/pci-bridge.h6
-rw-r--r--include/asm-ppc/pci.h6
-rw-r--r--include/asm-ppc/pgtable.h8
-rw-r--r--include/asm-ppc/pmac_feature.h28
-rw-r--r--include/asm-ppc/posix_types.h3
-rw-r--r--include/asm-ppc/ppc405_dma.h112
-rw-r--r--include/asm-ppc/ppc_asm.h14
-rw-r--r--include/asm-ppc/pplus.h2
-rw-r--r--include/asm-ppc/processor.h4
-rw-r--r--include/asm-ppc/prom.h2
-rw-r--r--include/asm-ppc/rtc.h2
-rw-r--r--include/asm-ppc/sembuf.h2
-rw-r--r--include/asm-ppc/shmbuf.h2
-rw-r--r--include/asm-ppc/signal.h2
-rw-r--r--include/asm-ppc/stat.h4
-rw-r--r--include/asm-ppc/termios.h2
-rw-r--r--include/asm-ppc/unaligned.h2
-rw-r--r--include/asm-ppc/uninorth.h26
-rw-r--r--include/asm-ppc64/posix_types.h1
-rw-r--r--include/asm-ppc64/stat.h4
-rw-r--r--include/asm-s390/posix_types.h2
-rw-r--r--include/asm-sh/posix_types.h1
-rw-r--r--include/asm-sparc/atomic.h4
-rw-r--r--include/asm-sparc/posix_types.h1
-rw-r--r--include/asm-sparc64/posix_types.h1
-rw-r--r--include/asm-sparc64/stat.h4
-rw-r--r--include/asm-v850/posix_types.h1
-rw-r--r--include/asm-x86_64/desc.h4
-rw-r--r--include/asm-x86_64/dwarf2.h50
-rw-r--r--include/asm-x86_64/kdebug.h8
-rw-r--r--include/asm-x86_64/posix_types.h1
-rw-r--r--include/asm-x86_64/siginfo.h2
-rw-r--r--include/asm-x86_64/uaccess.h18
-rw-r--r--include/linux/dm-ioctl-v1.h4
-rw-r--r--include/linux/fs.h3
-rw-r--r--include/linux/hugetlb.h2
-rw-r--r--include/linux/kdev_t.h74
-rw-r--r--include/linux/major.h30
-rw-r--r--include/linux/nfsd/export.h2
-rw-r--r--include/linux/nfsd/nfsd.h12
-rw-r--r--include/linux/nfsd/nfsfh.h26
-rw-r--r--include/linux/raid/md_k.h6
-rw-r--r--include/linux/reiserfs_fs.h19
-rw-r--r--include/linux/reiserfs_fs_sb.h2
-rw-r--r--include/linux/rtnetlink.h32
-rw-r--r--include/linux/tty.h22
-rw-r--r--include/linux/types.h2
-rw-r--r--include/net/atmclip.h8
91 files changed, 425 insertions, 405 deletions
diff --git a/include/asm-alpha/posix_types.h b/include/asm-alpha/posix_types.h
index 9c613d79189d..c78c04a94f4e 100644
--- a/include/asm-alpha/posix_types.h
+++ b/include/asm-alpha/posix_types.h
@@ -7,7 +7,6 @@
* assume GCC is being used.
*/
-typedef unsigned int __kernel_dev_t;
typedef unsigned int __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef unsigned int __kernel_nlink_t;
diff --git a/include/asm-arm/posix_types.h b/include/asm-arm/posix_types.h
index 23ad09424723..cdf4b69149f0 100644
--- a/include/asm-arm/posix_types.h
+++ b/include/asm-arm/posix_types.h
@@ -19,7 +19,6 @@
* assume GCC is being used.
*/
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
diff --git a/include/asm-arm26/hardirq.h b/include/asm-arm26/hardirq.h
index 25a805d0b4c6..623b5f8fbb31 100644
--- a/include/asm-arm26/hardirq.h
+++ b/include/asm-arm26/hardirq.h
@@ -5,7 +5,6 @@
#include <linux/cache.h>
#include <linux/threads.h>
-/* softirq.h is sensitive to the offsets of these fields */
typedef struct {
unsigned int __softirq_pending;
unsigned int __local_irq_count;
diff --git a/include/asm-arm26/posix_types.h b/include/asm-arm26/posix_types.h
index 9aeff7c2cb98..94ef6edce3e2 100644
--- a/include/asm-arm26/posix_types.h
+++ b/include/asm-arm26/posix_types.h
@@ -19,7 +19,6 @@
* assume GCC is being used.
*/
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
diff --git a/include/asm-arm26/softirq.h b/include/asm-arm26/softirq.h
deleted file mode 100644
index 3dfcdb13ecaf..000000000000
--- a/include/asm-arm26/softirq.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
- do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
- do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable() \
-do { \
- __local_bh_enable(); \
- if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
- __asm__("bl%? __do_softirq": : : "lr");/* out of line */\
- preempt_check_resched(); \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-arm26/stat.h b/include/asm-arm26/stat.h
index 16d1bf897e56..e4abc4fa0850 100644
--- a/include/asm-arm26/stat.h
+++ b/include/asm-arm26/stat.h
@@ -42,8 +42,7 @@ struct stat {
* insane amounts of padding around dev_t's.
*/
struct stat64 {
- unsigned short st_dev;
- unsigned char __pad0b[6];
+ unsigned long long st_dev;
unsigned char __pad0[4];
#define STAT64_HAS_BROKEN_ST_INO 1
@@ -54,8 +53,7 @@ struct stat64 {
unsigned long st_uid;
unsigned long st_gid;
- unsigned short st_rdev;
- unsigned char __pad3b[6];
+ unsigned long long st_rdev;
unsigned char __pad3[4];
long long st_size;
diff --git a/include/asm-cris/posix_types.h b/include/asm-cris/posix_types.h
index d1c87c652619..6d26fee4a614 100644
--- a/include/asm-cris/posix_types.h
+++ b/include/asm-cris/posix_types.h
@@ -14,7 +14,6 @@
* assume GCC is being used.
*/
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
diff --git a/include/asm-h8300/posix_types.h b/include/asm-h8300/posix_types.h
index 77c22770a5ba..7de94b1fd0e5 100644
--- a/include/asm-h8300/posix_types.h
+++ b/include/asm-h8300/posix_types.h
@@ -7,7 +7,6 @@
* assume GCC is being used.
*/
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
diff --git a/include/asm-h8300/stat.h b/include/asm-h8300/stat.h
index 7c71b3231d93..62c3cc24dfe6 100644
--- a/include/asm-h8300/stat.h
+++ b/include/asm-h8300/stat.h
@@ -42,8 +42,7 @@ struct stat {
* insane amounts of padding around dev_t's.
*/
struct stat64 {
- unsigned char __pad0[6];
- unsigned short st_dev;
+ unsigned long long st_dev;
unsigned char __pad1[2];
#define STAT64_HAS_BROKEN_ST_INO 1
@@ -55,8 +54,7 @@ struct stat64 {
unsigned long st_uid;
unsigned long st_gid;
- unsigned char __pad2[6];
- unsigned short st_rdev;
+ unsigned long long st_rdev;
unsigned char __pad3[2];
long long st_size;
diff --git a/include/asm-i386/posix_types.h b/include/asm-i386/posix_types.h
index d391865fd502..4e47ed059ad6 100644
--- a/include/asm-i386/posix_types.h
+++ b/include/asm-i386/posix_types.h
@@ -7,7 +7,6 @@
* assume GCC is being used.
*/
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
diff --git a/include/asm-ia64/posix_types.h b/include/asm-ia64/posix_types.h
index 50db61f18469..59a50b0e4e38 100644
--- a/include/asm-ia64/posix_types.h
+++ b/include/asm-ia64/posix_types.h
@@ -10,7 +10,6 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
-typedef unsigned int __kernel_dev_t;
typedef unsigned int __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef unsigned int __kernel_nlink_t;
diff --git a/include/asm-m68k/posix_types.h b/include/asm-m68k/posix_types.h
index d10b7bb9cb9e..fa166ee30286 100644
--- a/include/asm-m68k/posix_types.h
+++ b/include/asm-m68k/posix_types.h
@@ -7,7 +7,6 @@
* assume GCC is being used.
*/
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
diff --git a/include/asm-mips/posix_types.h b/include/asm-mips/posix_types.h
index 8fce1f864ce4..9ec09821c5fd 100644
--- a/include/asm-mips/posix_types.h
+++ b/include/asm-mips/posix_types.h
@@ -17,7 +17,6 @@
* assume GCC is being used.
*/
-typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
#if (_MIPS_SZLONG == 32)
diff --git a/include/asm-mips/softirq.h b/include/asm-mips/softirq.h
deleted file mode 100644
index d944be956a25..000000000000
--- a/include/asm-mips/softirq.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SOFTIRQ_H
-#define __ASM_SOFTIRQ_H
-
-#include <linux/preempt.h>
-#include <asm/hardirq.h>
-
-#define local_bh_disable() \
- do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
-#define __local_bh_enable() \
- do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
-
-#define local_bh_enable() \
-do { \
- __local_bh_enable(); \
- if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
- do_softirq(); \
- preempt_check_resched(); \
-} while (0)
-
-#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-mips/stat.h b/include/asm-mips/stat.h
index 53ce689129a0..6e00f751ab6d 100644
--- a/include/asm-mips/stat.h
+++ b/include/asm-mips/stat.h
@@ -16,14 +16,14 @@
#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
struct stat {
- dev_t st_dev;
+ unsigned st_dev;
long st_pad1[3]; /* Reserved for network id */
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
uid_t st_uid;
gid_t st_gid;
- dev_t st_rdev;
+ unsigned st_rdev;
long st_pad2[2];
off_t st_size;
long st_pad3;
@@ -90,7 +90,7 @@ struct stat64 {
/* The memory layout is the same as of struct stat64 of the 32-bit kernel. */
struct stat {
- dev_t st_dev;
+ unsigned int st_dev;
unsigned int st_pad0[3]; /* Reserved for st_dev expansion */
unsigned long st_ino;
@@ -101,7 +101,7 @@ struct stat {
uid_t st_uid;
gid_t st_gid;
- dev_t st_rdev;
+ unsigned int st_rdev;
unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */
off_t st_size;
diff --git a/include/asm-parisc/posix_types.h b/include/asm-parisc/posix_types.h
index 6d241ab7ed19..dc91ca54b78f 100644
--- a/include/asm-parisc/posix_types.h
+++ b/include/asm-parisc/posix_types.h
@@ -6,7 +6,6 @@
* be a little careful about namespace pollution etc. Also, we cannot
* assume GCC is being used.
*/
-typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
diff --git a/include/asm-parisc/stat.h b/include/asm-parisc/stat.h
index bfb286a02f3c..9d5fbbc5c31f 100644
--- a/include/asm-parisc/stat.h
+++ b/include/asm-parisc/stat.h
@@ -4,13 +4,13 @@
#include <linux/types.h>
struct stat {
- dev_t st_dev; /* dev_t is 32 bits on parisc */
+ unsigned int st_dev; /* dev_t is 32 bits on parisc */
ino_t st_ino; /* 32 bits */
mode_t st_mode; /* 16 bits */
nlink_t st_nlink; /* 16 bits */
unsigned short st_reserved1; /* old st_uid */
unsigned short st_reserved2; /* old st_gid */
- dev_t st_rdev;
+ unsigned int st_rdev;
off_t st_size;
time_t st_atime;
unsigned int st_atime_nsec;
@@ -21,12 +21,12 @@ struct stat {
int st_blksize;
int st_blocks;
unsigned int __unused1; /* ACL stuff */
- dev_t __unused2; /* network */
+ unsigned int __unused2; /* network */
ino_t __unused3; /* network */
unsigned int __unused4; /* cnodes */
unsigned short __unused5; /* netsite */
short st_fstype;
- dev_t st_realdev;
+ unsigned int st_realdev;
unsigned short st_basemode;
unsigned short st_spareshort;
uid_t st_uid;
@@ -39,13 +39,13 @@ struct stat {
typedef __kernel_off64_t off64_t;
struct hpux_stat64 {
- dev_t st_dev; /* dev_t is 32 bits on parisc */
+ unsigned int st_dev; /* dev_t is 32 bits on parisc */
ino_t st_ino; /* 32 bits */
mode_t st_mode; /* 16 bits */
nlink_t st_nlink; /* 16 bits */
unsigned short st_reserved1; /* old st_uid */
unsigned short st_reserved2; /* old st_gid */
- dev_t st_rdev;
+ unsigned int st_rdev;
off64_t st_size;
time_t st_atime;
unsigned int st_spare1;
@@ -56,12 +56,12 @@ struct hpux_stat64 {
int st_blksize;
__u64 st_blocks;
unsigned int __unused1; /* ACL stuff */
- dev_t __unused2; /* network */
+ unsigned int __unused2; /* network */
ino_t __unused3; /* network */
unsigned int __unused4; /* cnodes */
unsigned short __unused5; /* netsite */
short st_fstype;
- dev_t st_realdev;
+ unsigned int st_realdev;
unsigned short st_basemode;
unsigned short st_spareshort;
uid_t st_uid;
diff --git a/include/asm-ppc/a.out.h b/include/asm-ppc/a.out.h
index eef6a92dda0b..8979a94c4a81 100644
--- a/include/asm-ppc/a.out.h
+++ b/include/asm-ppc/a.out.h
@@ -1,7 +1,7 @@
#ifndef __PPC_A_OUT_H__
#define __PPC_A_OUT_H__
-/* grabbed from the intel stuff */
+/* grabbed from the intel stuff */
#define STACK_TOP TASK_SIZE
diff --git a/include/asm-ppc/agp.h b/include/asm-ppc/agp.h
index a2c4e4ba66f9..be27cfa8c5b0 100644
--- a/include/asm-ppc/agp.h
+++ b/include/asm-ppc/agp.h
@@ -5,9 +5,9 @@
/* nothing much needed here */
-#define map_page_into_agp(page)
-#define unmap_page_from_agp(page)
-#define flush_agp_mappings()
+#define map_page_into_agp(page)
+#define unmap_page_from_agp(page)
+#define flush_agp_mappings()
#define flush_agp_cache() mb()
#endif
diff --git a/include/asm-ppc/atomic.h b/include/asm-ppc/atomic.h
index e9c091d591bf..6cd515b5772e 100644
--- a/include/asm-ppc/atomic.h
+++ b/include/asm-ppc/atomic.h
@@ -2,7 +2,7 @@
* PowerPC atomic operations
*/
-#ifndef _ASM_PPC_ATOMIC_H_
+#ifndef _ASM_PPC_ATOMIC_H_
#define _ASM_PPC_ATOMIC_H_
typedef struct { volatile int counter; } atomic_t;
diff --git a/include/asm-ppc/backlight.h b/include/asm-ppc/backlight.h
index 2f070ef6f3f2..3a1c3dede2a0 100644
--- a/include/asm-ppc/backlight.h
+++ b/include/asm-ppc/backlight.h
@@ -1,8 +1,8 @@
/*
* Routines for handling backlight control on PowerBooks
- *
+ *
* For now, implementation resides in arch/ppc/kernel/pmac_support.c
- *
+ *
*/
#ifdef __KERNEL__
#ifndef __ASM_PPC_BACKLIGHT_H
diff --git a/include/asm-ppc/bootx.h b/include/asm-ppc/bootx.h
index 90c79cdb795e..b0c51b45d7a2 100644
--- a/include/asm-ppc/bootx.h
+++ b/include/asm-ppc/bootx.h
@@ -66,7 +66,7 @@ typedef struct boot_infos
__u32 version;
/* backward compatible down to version: */
__u32 compatible_version;
-
+
/* NEW (vers. 2) this holds the current _logical_ base addr of
the frame buffer (for use by early boot message) */
__u8* logicalDisplayBase;
@@ -76,7 +76,7 @@ typedef struct boot_infos
/* NEW (vers. 4) Detected hw architecture */
__u32 architecture;
-
+
/* The device tree (internal addresses relative to the beginning of the tree,
* device tree offset relative to the beginning of this structure).
* On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this
@@ -84,7 +84,7 @@ typedef struct boot_infos
*/
__u32 deviceTreeOffset; /* Device tree offset */
__u32 deviceTreeSize; /* Size of the device tree */
-
+
/* Some infos about the current MacOS display */
__u32 dispDeviceRect[4]; /* left,top,right,bottom */
__u32 dispDeviceDepth; /* (8, 16 or 32) */
@@ -98,23 +98,23 @@ typedef struct boot_infos
/* Optional pointer to boot ramdisk (offset from this structure) */
__u32 ramDisk;
__u32 ramDiskSize; /* size of ramdisk image */
-
+
/* Kernel command line arguments (offset from this structure) */
__u32 kernelParamsOffset;
-
+
/* ALL BELOW NEW (vers. 4) */
-
+
/* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag
(non-PCI) only. On PCI, memory is contiguous and it's size is in the
device-tree. */
boot_info_map_entry_t
physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */
__u32 physMemoryMapSize; /* How many entries in map */
-
-
+
+
/* The framebuffer size (optional, currently 0) */
__u32 frameBufferSize; /* Represents a max size, can be 0. */
-
+
/* NEW (vers. 5) */
/* Total params size (args + colormap + device tree + ramdisk) */
diff --git a/include/asm-ppc/checksum.h b/include/asm-ppc/checksum.h
index 1516be990218..231cb2b643c7 100644
--- a/include/asm-ppc/checksum.h
+++ b/include/asm-ppc/checksum.h
@@ -37,7 +37,7 @@ extern unsigned int csum_partial_copy_generic(const char *src, char *dst,
/* FIXME: this needs to be written to really do no check -- Cort */
#define csum_partial_copy_nocheck(src, dst, len, sum) \
- csum_partial_copy_generic((src), (dst), (len), (sum), 0, 0)
+ csum_partial_copy_generic((src), (dst), (len), (sum), 0, 0)
/*
* turns a 32-bit partial checksum (e.g. from csum_partial) into a
@@ -73,7 +73,7 @@ static inline unsigned long csum_tcpudp_nofold(unsigned long saddr,
unsigned long daddr,
unsigned short len,
unsigned short proto,
- unsigned int sum)
+ unsigned int sum)
{
__asm__("\n\
addc %0,%0,%1 \n\
diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h
index 759e523cbddf..170095a88439 100644
--- a/include/asm-ppc/commproc.h
+++ b/include/asm-ppc/commproc.h
@@ -552,7 +552,7 @@ typedef struct iic {
} iic_t;
#define BD_IIC_START ((ushort)0x0400)
-
+
/* SPI parameter RAM.
*/
typedef struct spi {
@@ -673,7 +673,7 @@ typedef struct risc_timer_pram {
#define CICR_IEN ((uint)0x00000080) /* Int. enable */
#define CICR_SPS ((uint)0x00000001) /* SCC Spread */
-extern void cpm_install_handler(int vec,
+extern void cpm_install_handler(int vec,
void (*handler)(void *, struct pt_regs *regs), void *dev_id);
extern void cpm_free_handler(int vec);
diff --git a/include/asm-ppc/gt64260.h b/include/asm-ppc/gt64260.h
index cf975d1beff3..cd0ef644943d 100644
--- a/include/asm-ppc/gt64260.h
+++ b/include/asm-ppc/gt64260.h
@@ -1,6 +1,6 @@
/*
* include/asm-ppc/gt64260.h
- *
+ *
* Prototypes, etc. for the Marvell/Galileo GT64260 host bridge routines.
*
* Author: Mark A. Greer <mgreer@mvista.com>
@@ -206,7 +206,7 @@ extern inline void gt_modify(uint32_t offs, uint32_t data, uint32_t mask)
gt_write(offs, reg);
}
#endif
-#define gt_set_bits(offs, bits) gt_modify(offs, ~0, bits)
+#define gt_set_bits(offs, bits) gt_modify(offs, ~0, bits)
#define gt_clr_bits(offs, bits) gt_modify(offs, 0, bits)
diff --git a/include/asm-ppc/gt64260_defs.h b/include/asm-ppc/gt64260_defs.h
index 8ffe378683da..6ffd01a5373e 100644
--- a/include/asm-ppc/gt64260_defs.h
+++ b/include/asm-ppc/gt64260_defs.h
@@ -1,6 +1,6 @@
/*
* include/asm-ppc/gt64260_defs.h
- *
+ *
* Register definitions for the Marvell/Galileo GT64260 host bridge.
*
* Author: Mark A. Greer <mgreer@mvista.com>
diff --git a/include/asm-ppc/hardirq.h b/include/asm-ppc/hardirq.h
index 9c3664279608..8f4f12a46f74 100644
--- a/include/asm-ppc/hardirq.h
+++ b/include/asm-ppc/hardirq.h
@@ -7,9 +7,9 @@
#include <linux/smp_lock.h>
#include <asm/irq.h>
-/* The __last_jiffy_stamp field is needed to ensure that no decrementer
- * interrupt is lost on SMP machines. Since on most CPUs it is in the same
- * cache line as local_irq_count, it is cheap to access and is also used on UP
+/* The __last_jiffy_stamp field is needed to ensure that no decrementer
+ * interrupt is lost on SMP machines. Since on most CPUs it is in the same
+ * cache line as local_irq_count, it is cheap to access and is also used on UP
* for uniformity.
*/
typedef struct {
diff --git a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h
index eb7c3fef6417..bac02b7d293e 100644
--- a/include/asm-ppc/highmem.h
+++ b/include/asm-ppc/highmem.h
@@ -10,7 +10,7 @@
* Gerhard.Wichert@pdb.siemens.de
*
*
- * Redesigned the x86 32-bit VM architecture to deal with
+ * Redesigned the x86 32-bit VM architecture to deal with
* up to 16 Terrabyte physical memory. With current x86 CPUs
* we now support up to 64 Gigabytes physical RAM.
*
diff --git a/include/asm-ppc/ibm44x.h b/include/asm-ppc/ibm44x.h
index ff6b72df2c10..e5d2df3d765b 100644
--- a/include/asm-ppc/ibm44x.h
+++ b/include/asm-ppc/ibm44x.h
@@ -84,11 +84,11 @@ typedef struct board_info {
/*
* DCRN definitions
- */
+ */
#ifdef CONFIG_440GX
/* SDRs */
-#define DCRN_SDR_CONFIG_ADDR 0xe
+#define DCRN_SDR_CONFIG_ADDR 0xe
#define DCRN_SDR_CONFIG_DATA 0xf
#define DCRN_SDR_PFC0 0x4100
#define DCRN_SDR_PFC1 0x4101
@@ -107,7 +107,7 @@ typedef struct board_info {
#define DCRN_SDR_MFR_E0RXFH 0x00001000
#define DCRN_SDR_MFR_E1TXFL 0x00000800
#define DCRN_SDR_MFR_E1TXFH 0x00000400
-#define DCRN_SDR_MFR_E1RXFL 0x00000200
+#define DCRN_SDR_MFR_E1RXFL 0x00000200
#define DCRN_SDR_MFR_E1RXFH 0x00000100
#define DCRN_SDR_MFR_E2TXFL 0x00000080
#define DCRN_SDR_MFR_E2TXFH 0x00000040
@@ -166,14 +166,14 @@ typedef struct board_info {
#define DCRN_MALRXCARR(base) (base + 0x11) /* Rx Channel Active Reset */
#define DCRN_MALRXEOBISR(base) (base + 0x12) /* Rx End of Buffer Interrupt Status */
#define DCRN_MALRXDEIR(base) (base + 0x13) /* Rx Descriptor Error Interrupt */
-#define DCRN_MALTXCTP0R(base) (base + 0x20) /* Channel Tx 0 Channel Table Pointer */
+#define DCRN_MALTXCTP0R(base) (base + 0x20) /* Channel Tx 0 Channel Table Pointer */
#define DCRN_MALTXCTP1R(base) (base + 0x21) /* Channel Tx 1 Channel Table Pointer */
#define DCRN_MALTXCTP2R(base) (base + 0x22) /* Channel Tx 2 Channel Table Pointer */
#define DCRN_MALTXCTP3R(base) (base + 0x23) /* Channel Tx 3 Channel Table Pointer */
-#define DCRN_MALRXCTP0R(base) (base + 0x40) /* Channel Rx 0 Channel Table Pointer */
-#define DCRN_MALRXCTP1R(base) (base + 0x41) /* Channel Rx 1 Channel Table Pointer */
-#define DCRN_MALRCBS0(base) (base + 0x60) /* Channel Rx 0 Channel Buffer Size */
-#define DCRN_MALRCBS1(base) (base + 0x61) /* Channel Rx 1 Channel Buffer Size */
+#define DCRN_MALRXCTP0R(base) (base + 0x40) /* Channel Rx 0 Channel Table Pointer */
+#define DCRN_MALRXCTP1R(base) (base + 0x41) /* Channel Rx 1 Channel Table Pointer */
+#define DCRN_MALRCBS0(base) (base + 0x60) /* Channel Rx 0 Channel Buffer Size */
+#define DCRN_MALRCBS1(base) (base + 0x61) /* Channel Rx 1 Channel Buffer Size */
/* Compatibility DCRN's */
#define DCRN_MALRXCTP2R(base) ((base) + 0x42) /* Channel Rx 2 Channel Table Pointer */
diff --git a/include/asm-ppc/ipc.h b/include/asm-ppc/ipc.h
index a65012e9e4bf..512dfe962d8b 100644
--- a/include/asm-ppc/ipc.h
+++ b/include/asm-ppc/ipc.h
@@ -1,7 +1,7 @@
#ifndef __PPC_IPC_H__
#define __PPC_IPC_H__
-/*
+/*
* These are used to wrap system calls on PowerPC.
*
* See arch/ppc/kernel/syscalls.c for ugly details..
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h
index 02b993f6c3c7..bfa3de404d27 100644
--- a/include/asm-ppc/irq.h
+++ b/include/asm-ppc/irq.h
@@ -48,7 +48,7 @@ extern void enable_irq(unsigned int);
*
*/
-#define NR_AIC_IRQS 32
+#define NR_AIC_IRQS 32
#define NR_IRQS (NR_AIC_IRQS + NR_BOARD_IRQS)
#elif !defined (CONFIG_403)
@@ -89,7 +89,7 @@ irq_canonicalize(int irq)
* possible level sensitive interrupts assigned and generated internally
* from such devices as CPM, PCMCIA, RTC, PIT, TimeBase and Decrementer.
* There are eight external interrupts (IRQs) that can be configured
- * as either level or edge sensitive.
+ * as either level or edge sensitive.
*
* On some implementations, there is also the possibility of an 8259
* through the PCI and PCI-ISA bridges.
diff --git a/include/asm-ppc/m48t35.h b/include/asm-ppc/m48t35.h
index 97d2129f8d53..f3c5e5dfa986 100644
--- a/include/asm-ppc/m48t35.h
+++ b/include/asm-ppc/m48t35.h
@@ -10,15 +10,15 @@
#define __PPC_M48T35_H
/* RTC offsets */
-#define M48T35_RTC_FLAGS (-8) /* the negative regs are really T37 only */
+#define M48T35_RTC_FLAGS (-8) /* the negative regs are really T37 only */
#define M48T35_RTC_CENTURY (-7)
-#define M48T35_RTC_AL_SEC (-6)
-#define M48T35_RTC_AL_MIN (-5)
-#define M48T35_RTC_AL_HRS (-4)
-#define M48T35_RTC_AL_DOM (-3)
+#define M48T35_RTC_AL_SEC (-6)
+#define M48T35_RTC_AL_MIN (-5)
+#define M48T35_RTC_AL_HRS (-4)
+#define M48T35_RTC_AL_DOM (-3)
#define M48T35_RTC_INTERRUPT (-2)
#define M48T35_RTC_WATCHDOG (-1)
-#define M48T35_RTC_CONTROL 0 /* T35 starts here */
+#define M48T35_RTC_CONTROL 0 /* T35 starts here */
#define M48T35_RTC_SECONDS 1
#define M48T35_RTC_MINUTES 2
#define M48T35_RTC_HOURS 3
@@ -27,7 +27,7 @@
#define M48T35_RTC_MONTH 6
#define M48T35_RTC_YEAR 7
-/* this way help us know which bits go with which regs */
+/* this way help us know which bits go with which regs */
#define M48T35_RTC_FLAGS_BL 0x10
#define M48T35_RTC_FLAGS_AF 0x40
#define M48T35_RTC_FLAGS_WDF 0x80
@@ -43,18 +43,18 @@
#define M48T35_RTC_CONTROL_WRITE 0x80
#define M48T35_RTC_CONTROL_READ 0x40
-#define M48T35_RTC_CONTROL_CAL_SIGN 0x20
+#define M48T35_RTC_CONTROL_CAL_SIGN 0x20
#define M48T35_RTC_CONTROL_CAL_VALUE 0x1f
#define M48T35_RTC_CONTROL_LOCKED (M48T35_RTC_WRITE|M48T35_RTC_READ)
#define M48T35_RTC_CONTROL_CALIBRATION (M48T35_RTC_CONTROL_CAL_SIGN|M48T35_RTC_CONTROL_CAL_VALUE)
#define M48T35_RTC_SECONDS_SEC_1 0x0f
-#define M48T35_RTC_SECONDS_SEC_10 0x70
+#define M48T35_RTC_SECONDS_SEC_10 0x70
#define M48T35_RTC_SECONDS_ST 0x80
#define M48T35_RTC_SECONDS_SEC_ALL (M48T35_RTC_SECONDS_SEC_1|M48T35_RTC_SECONDS_SEC_10)
#define M48T35_RTC_MINUTES_MIN_1 0x0f
-#define M48T35_RTC_MINUTES_MIN_10 0x70
+#define M48T35_RTC_MINUTES_MIN_10 0x70
#define M48T35_RTC_MINUTES_MIN_ALL (M48T35_RTC_MINUTES_MIN_1|M48T35_RTC_MINUTES_MIN_10)
#define M48T35_RTC_HOURS_HRS_1 0x0f
diff --git a/include/asm-ppc/macio.h b/include/asm-ppc/macio.h
index 75b194e5ef19..25381dc34fcd 100644
--- a/include/asm-ppc/macio.h
+++ b/include/asm-ppc/macio.h
@@ -17,7 +17,7 @@ struct macio_chip;
* within a MacIO ASIC. It's typically provided by a macio_pci_asic
* PCI device, but could be provided differently as well (nubus
* machines using a fake OF tree).
- *
+ *
* The pdev field can be NULL on non-PCI machines
*/
struct macio_bus
@@ -26,7 +26,7 @@ struct macio_bus
int index; /* macio chip index in system */
#ifdef CONFIG_PCI
struct pci_dev *pdev; /* PCI device hosting this bus */
-#endif
+#endif
};
/*
diff --git a/include/asm-ppc/md.h b/include/asm-ppc/md.h
index 0ac10b67b8a4..9a9b6b42b4b4 100644
--- a/include/asm-ppc/md.h
+++ b/include/asm-ppc/md.h
@@ -1,8 +1,8 @@
/*
- * md.h: High speed xor_block operation for RAID4/5
+ * md.h: High speed xor_block operation for RAID4/5
*
*/
-
+
#ifdef __KERNEL__
#ifndef __ASM_MD_H
#define __ASM_MD_H
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
index b75b24e4c056..0b231e3c0fb1 100644
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -50,7 +50,7 @@ typedef struct _PTE {
unsigned long g:1; /* Guarded */
unsigned long :1; /* Unused */
unsigned long pp:2; /* Page protection */
-} PTE;
+} PTE;
/* Values for PP (assumes Ks=0, Kp=1) */
#define PP_RWXX 0 /* Supervisor read/write, User none */
@@ -90,7 +90,7 @@ typedef struct _BATU { /* Upper part of BAT (all except 601) */
unsigned long bl:11; /* Block size mask */
unsigned long vs:1; /* Supervisor valid */
unsigned long vp:1; /* User valid */
-} BATU;
+} BATU;
typedef struct _P601_BATL { /* Lower part of BAT for 601 processor */
unsigned long brpn:15; /* Real page index (physical address) */
@@ -299,7 +299,7 @@ typedef struct _P601_BAT {
#define TLB_LO 1
#define TLB_HI 0
-
+
#define TLB_DATA TLB_LO
#define TLB_TAG TLB_HI
@@ -319,7 +319,7 @@ typedef struct _P601_BAT {
#define TLB_VALID 0x00000040 /* Entry is valid */
/* Data portion */
-
+
#define TLB_RPN_MASK 0xFFFFFC00 /* Real Page Number */
#define TLB_PERM_MASK 0x00000300
#define TLB_EX 0x00000200 /* Instruction execution allowed */
@@ -335,7 +335,7 @@ typedef struct _P601_BAT {
/*
* PPC440 support
*/
-#define PPC44x_MMUCR_TID 0x000000ff
+#define PPC44x_MMUCR_TID 0x000000ff
#define PPC44x_MMUCR_STS 0x00010000
#define PPC44x_TLB_PAGEID 0
diff --git a/include/asm-ppc/mpc10x.h b/include/asm-ppc/mpc10x.h
index 78b8a0539865..2538648ad7bc 100644
--- a/include/asm-ppc/mpc10x.h
+++ b/include/asm-ppc/mpc10x.h
@@ -1,6 +1,6 @@
/*
* arch/ppc/kernel/mpc10x.h
- *
+ *
* Common routines for the Motorola SPS MPC106/8240/107 Host bridge/Mem
* ctlr/EPIC/etc.
*
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h
index bf7e155027db..4aa8b1571d6b 100644
--- a/include/asm-ppc/mpc8xx.h
+++ b/include/asm-ppc/mpc8xx.h
@@ -98,7 +98,7 @@ extern unsigned char __res[];
struct pt_regs;
extern int request_8xxirq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *),
- unsigned long flags,
+ unsigned long flags,
const char *device,
void *dev_id);
#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-ppc/msgbuf.h b/include/asm-ppc/msgbuf.h
index 3432b9b3692e..1053452a9376 100644
--- a/include/asm-ppc/msgbuf.h
+++ b/include/asm-ppc/msgbuf.h
@@ -1,7 +1,7 @@
#ifndef _PPC_MSGBUF_H
#define _PPC_MSGBUF_H
-/*
+/*
* The msqid64_ds structure for the PPC architecture.
*/
diff --git a/include/asm-ppc/ocp_ids.h b/include/asm-ppc/ocp_ids.h
index fc322ba7a1c5..bae1d67a247c 100644
--- a/include/asm-ppc/ocp_ids.h
+++ b/include/asm-ppc/ocp_ids.h
@@ -1,7 +1,7 @@
/*
* FILE NAME: ocp_ids.h
*
- * BRIEF MODULE DESCRIPTION:
+ * BRIEF MODULE DESCRIPTION:
* OCP device ids based on the ideas from PCI
*
* Maintained by: Armin <akuster@mvista.com>
@@ -60,40 +60,40 @@
#define OCP_FUNC_RTC 0x0021
/* Serial 0x0030 - 0x006F*/
-#define OCP_FUNC_16550 0x0031
+#define OCP_FUNC_16550 0x0031
#define OCP_FUNC_SSP 0x0032 /* sync serial port */
#define OCP_FUNC_SCP 0x0033 /* serial controller port */
#define OCP_FUNC_SCC 0x0034 /* serial contoller */
#define OCP_FUNC_SCI 0x0035 /* Smart card */
-#define OCP_FUNC_IIC 0x0040
-#define OCP_FUNC_USB 0x0050
-#define OCP_FUNC_IR 0x0060
+#define OCP_FUNC_IIC 0x0040
+#define OCP_FUNC_USB 0x0050
+#define OCP_FUNC_IR 0x0060
/* Memory devices 0x0090 - 0x009F */
#define OCP_FUNC_SDRAM 0x0091
#define OCP_FUNC_DMA 0x0092
/* Display 0x00A0 - 0x00AF */
-#define OCP_FUNC_VIDEO 0x00A0
+#define OCP_FUNC_VIDEO 0x00A0
#define OCP_FUNC_LED 0x00A1
#define OCP_FUNC_LCD 0x00A2
/* Sound 0x00B0 - 0x00BF */
-#define OCP_FUNC_AUDIO 0x00B0
+#define OCP_FUNC_AUDIO 0x00B0
/* Mass Storage 0x00C0 - 0xxCF */
-#define OCP_FUNC_IDE 0x00C0
+#define OCP_FUNC_IDE 0x00C0
/* Misc 0x00D0 - 0x00DF*/
-#define OCP_FUNC_GPIO 0x00D0
+#define OCP_FUNC_GPIO 0x00D0
#define OCP_FUNC_ZMII 0x00D1
/* Network 0x0200 - 0x02FF */
-#define OCP_FUNC_EMAC 0x0200
+#define OCP_FUNC_EMAC 0x0200
/* Bridge devices 0xE00 - 0xEFF */
-#define OCP_FUNC_HOST 0x0E00
-#define OCP_FUNC_DCR 0x0E01
+#define OCP_FUNC_HOST 0x0E00
+#define OCP_FUNC_DCR 0x0E01
#define OCP_FUNC_OPB 0x0E02
#define OCP_FUNC_PHY 0x0E03
#define OCP_FUNC_EXT 0x0E04
diff --git a/include/asm-ppc/of_device.h b/include/asm-ppc/of_device.h
index 13161c2fe493..14441c629010 100644
--- a/include/asm-ppc/of_device.h
+++ b/include/asm-ppc/of_device.h
@@ -4,14 +4,14 @@
#include <linux/device.h>
#include <asm/prom.h>
-/*
+/*
* The of_platform_bus_type is a bus type used by drivers that do not
* attach to a macio or similar bus but still use OF probing
* mecanism
*/
extern struct bus_type of_platform_bus_type;
-/*
+/*
* The of_device is a kind of "base class" that is a superset of
* struct device for use by devices attached to an OF node and
* probed using OF properties
diff --git a/include/asm-ppc/ohare.h b/include/asm-ppc/ohare.h
index a26e350944c5..023b59772231 100644
--- a/include/asm-ppc/ohare.h
+++ b/include/asm-ppc/ohare.h
@@ -2,7 +2,7 @@
* ohare.h: definitions for using the "O'Hare" I/O controller chip.
*
* Copyright (C) 1997 Paul Mackerras.
- *
+ *
* BenH: Changed to match those of heathrow (but not all of them). Please
* check if I didn't break anything (especially the media bay).
*/
diff --git a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h
index 67171c67b488..1986cddd13e4 100644
--- a/include/asm-ppc/open_pic.h
+++ b/include/asm-ppc/open_pic.h
@@ -6,7 +6,7 @@
* 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 _PPC_KERNEL_OPEN_PIC_H
@@ -54,9 +54,9 @@ extern void smp_openpic_message_pass(int target, int msg, unsigned long data,
extern inline int openpic_to_irq(int irq)
{
- /* IRQ 0 usually means 'disabled'.. don't mess with it
- * exceptions to this (sandpoint maybe?)
- * shouldn't use openpic_to_irq
+ /* IRQ 0 usually means 'disabled'.. don't mess with it
+ * exceptions to this (sandpoint maybe?)
+ * shouldn't use openpic_to_irq
*/
if (irq != 0){
return irq += NUM_8259_INTERRUPTS;
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 6d2a8a40368f..e47e77327ee5 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -106,27 +106,27 @@ extern unsigned long ppc_memoffset;
#if defined(CONFIG_APUS) && !defined(MODULE)
/* map phys->virtual and virtual->phys for RAM pages */
static inline unsigned long ___pa(unsigned long v)
-{
+{
unsigned long p;
- asm volatile ("1: addis %0, %1, %2;"
+ asm volatile ("1: addis %0, %1, %2;"
".section \".vtop_fixup\",\"aw\";"
".align 1;"
".long 1b;"
".previous;"
- : "=r" (p)
+ : "=r" (p)
: "b" (v), "K" (((-PAGE_OFFSET) >> 16) & 0xffff));
return p;
}
static inline void* ___va(unsigned long p)
-{
+{
unsigned long v;
- asm volatile ("1: addis %0, %1, %2;"
+ asm volatile ("1: addis %0, %1, %2;"
".section \".ptov_fixup\",\"aw\";"
".align 1;"
".long 1b;"
".previous;"
- : "=r" (v)
+ : "=r" (v)
: "b" (p), "K" (((PAGE_OFFSET) >> 16) & 0xffff));
return (void*) v;
diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h
index df71494dc025..acd9cb4d0aa0 100644
--- a/include/asm-ppc/pci-bridge.h
+++ b/include/asm-ppc/pci-bridge.h
@@ -47,10 +47,10 @@ struct pci_controller {
int first_busno;
int last_busno;
int bus_offset;
-
+
void *io_base_virt;
unsigned long io_base_phys;
-
+
/* Some machines (PReP) have a non 1:1 mapping of
* the PCI memory space in the CPU bus space
*/
@@ -107,7 +107,7 @@ extern unsigned char common_swizzle(struct pci_dev *, unsigned char *);
* break this piece out separately.
*/
static inline unsigned char bridge_swizzle(unsigned char pin,
- unsigned char idsel)
+ unsigned char idsel)
{
return (((pin-1) + idsel) % 4) + 1;
}
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
index b3757965e3e8..763765257bfc 100644
--- a/include/asm-ppc/pci.h
+++ b/include/asm-ppc/pci.h
@@ -46,13 +46,13 @@ extern unsigned long pci_resource_to_bus(struct pci_dev *pdev, struct resource *
* The PCI bus bridge can translate addresses issued by the processor(s)
* into a different address on the PCI bus. On 32-bit cpus, we assume
* this mapping is 1-1, but on 64-bit systems it often isn't.
- *
+ *
* Obsolete ! Drivers should now use pci_resource_to_bus
*/
extern unsigned long phys_to_bus(unsigned long pa);
extern unsigned long pci_phys_to_bus(unsigned long pa, int busnr);
extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr);
-
+
/*
* Dynamic DMA Mapping stuff
* Originally stolen from i386 by ajoshi and updated by paulus
@@ -64,7 +64,7 @@ extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr);
* this boolean for bounce buffer decisions.
*/
#define PCI_DMA_BUS_IS_PHYS (1)
-
+
/* Allocate and map kernel buffer using consistent mode DMA for a device.
* hwdev should be valid struct pci_dev pointer for PCI devices,
* NULL for PCI-like buses (ISA, EISA).
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index 0399c8cfbcab..2823193a9c9e 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -484,7 +484,7 @@ static inline unsigned long pte_update(pte_t *p, unsigned long clr,
unsigned long set)
{
unsigned long old, tmp;
-
+
__asm__ __volatile__("\
1: lwarx %0,0,%3\n\
andc %1,%0,%4\n\
@@ -562,7 +562,7 @@ static inline void ptep_mkdirty(pte_t *ptep)
#define pmd_page(pmd) \
(mem_map + (__pa(pmd_val(pmd)) >> PAGE_SHIFT))
#endif
-
+
/* to find an entry in a kernel page-table-directory */
#define pgd_offset_k(address) pgd_offset(&init_mm, address)
@@ -644,7 +644,7 @@ extern unsigned long kernel_map(unsigned long paddr, unsigned long size,
int nocacheflag, unsigned long *memavailp );
/*
- * Set cache mode of (kernel space) address range.
+ * Set cache mode of (kernel space) address range.
*/
extern void kernel_set_cachemode (unsigned long address, unsigned long size,
unsigned int cmode);
@@ -652,7 +652,7 @@ extern void kernel_set_cachemode (unsigned long address, unsigned long size,
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
#define kern_addr_valid(addr) (1)
-#define io_remap_page_range remap_page_range
+#define io_remap_page_range remap_page_range
/*
* No page table caches to initialise
diff --git a/include/asm-ppc/pmac_feature.h b/include/asm-ppc/pmac_feature.h
index 44eaa7543384..1c97c90068e9 100644
--- a/include/asm-ppc/pmac_feature.h
+++ b/include/asm-ppc/pmac_feature.h
@@ -1,27 +1,27 @@
/*
* Definition of platform feature hooks for PowerMacs
- *
+ *
* 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.
*
* Copyright (C) 1998 Paul Mackerras &
* Ben. Herrenschmidt.
- *
- *
+ *
+ *
* Note: I removed media-bay details from the feature stuff, I beleive it's
* not worth it, the media-bay driver can directly use the mac-io
* ASIC registers.
- *
+ *
* Implementation note: Currently, none of these functions will block.
* However, they may internally protect themselves with a spinlock
* for way too long. Be prepared for at least some of these to block
* in the future.
- *
+ *
* Unless specifically defined, the result code is assumed to be an
* error when negative, 0 is the default success result. Some functions
* may return additional positive result values.
- *
+ *
* To keep implementation simple, all feature calls are assumed to have
* the prototype parameters (struct device_node* node, int value).
* When either is not used, pass 0.
@@ -35,9 +35,9 @@
/*
* Known Mac motherboard models
- *
+ *
* Please, report any error here to benh@kernel.crashing.org, thanks !
- *
+ *
* Note that I don't fully maintain this list for Core99 & MacRISC2
* and I'm considering removing all NewWorld entries from it and
* entirely rely on the model string.
@@ -76,7 +76,7 @@
#define PMAC_TYPE_UNKNOWN_PADDINGTON 0x4f /* Unknown but paddington based */
/* Core99 machines based on UniNorth 1.0 and 1.5
- *
+ *
* Note: A single entry here may cover several actual models according
* to the device-tree. (Sawtooth is most tower G4s, FW_IMAC is most
* FireWire based iMacs, etc...). Those machines are too similar to be
@@ -99,7 +99,7 @@
/* MacRisc2 with UniNorth 2.0 */
#define PMAC_TYPE_RACKMAC 0x80 /* XServe */
-#define PMAC_TYPE_WINDTUNNEL 0x81
+#define PMAC_TYPE_WINDTUNNEL 0x81
/* MacRISC2 machines based on the Pangea chipset
*/
@@ -123,7 +123,7 @@
/*
* Feature calls supported on pmac
- *
+ *
*/
/*
@@ -203,7 +203,7 @@ static inline int pmac_call_feature(int selector, struct device_node* node,
#define PMAC_FTR_SOUND_CHIP_ENABLE PMAC_FTR_DEF(9)
/* -- add various tweaks related to sound routing -- */
-
+
/* PMAC_FTR_AIRPORT_ENABLE (struct device_node* node, 0, int value)
* enable/disable the airport card
*/
@@ -238,7 +238,7 @@ static inline int pmac_call_feature(int selector, struct device_node* node,
#define PMAC_FTR_SLEEP_STATE PMAC_FTR_DEF(15)
/* PMAC_FTR_GET_MB_INFO (NULL, selector, 0)
- *
+ *
* returns some motherboard infos.
* selector: 0 - model id
* 1 - model flags (capabilities)
@@ -275,7 +275,7 @@ extern void pmac_feature_init(void);
* on the data structures or constants below in a normal driver
*
*/
-
+
#define MAX_MACIO_CHIPS 2
enum {
diff --git a/include/asm-ppc/posix_types.h b/include/asm-ppc/posix_types.h
index 12acadb61cb9..a14a82abe8d2 100644
--- a/include/asm-ppc/posix_types.h
+++ b/include/asm-ppc/posix_types.h
@@ -7,7 +7,6 @@
* assume GCC is being used.
*/
-typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
@@ -75,7 +74,7 @@ static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
#undef __FD_ISSET
static __inline__ int __FD_ISSET(unsigned long fd, __kernel_fd_set *p)
-{
+{
unsigned long _tmp = fd / __NFDBITS;
unsigned long _rem = fd % __NFDBITS;
return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0;
diff --git a/include/asm-ppc/ppc405_dma.h b/include/asm-ppc/ppc405_dma.h
index 8571360b3f56..489eec55be3d 100644
--- a/include/asm-ppc/ppc405_dma.h
+++ b/include/asm-ppc/ppc405_dma.h
@@ -36,7 +36,7 @@ extern unsigned long ISA_DMA_THRESHOLD;
#define dma_inb inb
-/*
+/*
* Function return status codes
* These values are used to indicate whether or not the function
* call was successful, or a bad/invalid parameter was passed.
@@ -79,7 +79,7 @@ extern unsigned long ISA_DMA_THRESHOLD;
#define DMA_MODE_MM_DEVATDST (SET_DMA_TM(TM_D_MM))
-/*
+/*
* DMA Polarity Configuration Register
*/
#define DMAReq0_ActiveLow (1<<31)
@@ -113,14 +113,14 @@ extern unsigned long ISA_DMA_THRESHOLD;
#define DMA_CS3 (1<<28)
#define DMA_TS0 (1<<27) /* End of Transfer has been requested */
-#define DMA_TS1 (1<<26)
-#define DMA_TS2 (1<<25)
-#define DMA_TS3 (1<<24)
+#define DMA_TS1 (1<<26)
+#define DMA_TS2 (1<<25)
+#define DMA_TS3 (1<<24)
#define DMA_CH0_ERR (1<<23) /* DMA Chanel 0 Error */
-#define DMA_CH1_ERR (1<<22)
-#define DMA_CH2_ERR (1<<21)
-#define DMA_CH3_ERR (1<<20)
+#define DMA_CH1_ERR (1<<22)
+#define DMA_CH2_ERR (1<<21)
+#define DMA_CH3_ERR (1<<20)
#define DMA_IN_DMA_REQ0 (1<<19) /* Internal DMA Request is pending */
#define DMA_IN_DMA_REQ1 (1<<18)
@@ -133,14 +133,14 @@ extern unsigned long ISA_DMA_THRESHOLD;
#define DMA_EXT_DMA_REQ3 (1<<12)
#define DMA_CH0_BUSY (1<<11) /* DMA Channel 0 Busy */
-#define DMA_CH1_BUSY (1<<10)
-#define DMA_CH2_BUSY (1<<9)
-#define DMA_CH3_BUSY (1<<8)
+#define DMA_CH1_BUSY (1<<10)
+#define DMA_CH2_BUSY (1<<9)
+#define DMA_CH3_BUSY (1<<8)
#define DMA_SG0 (1<<7) /* DMA Channel 0 Scatter/Gather in progress */
-#define DMA_SG1 (1<<6)
-#define DMA_SG2 (1<<5)
-#define DMA_SG3 (1<<4)
+#define DMA_SG1 (1<<6)
+#define DMA_SG2 (1<<5)
+#define DMA_SG3 (1<<4)
@@ -155,7 +155,7 @@ extern unsigned long ISA_DMA_THRESHOLD;
#define SET_DMA_CIE_ENABLE(x) (((x)&0x1)<<30)
#define GET_DMA_CIE_ENABLE(x) (((x)&DMA_CIE_ENABLE)>>30)
-#define DMA_TD (1<<29)
+#define DMA_TD (1<<29)
#define SET_DMA_TD(x) (((x)&0x1)<<29)
#define GET_DMA_TD(x) (((x)&DMA_TD)>>29)
@@ -212,7 +212,7 @@ extern unsigned long ISA_DMA_THRESHOLD;
#define SET_DMA_PRIORITY(x) (((x)&0x3)<<6) /* DMA Channel Priority */
#define DMA_PRIORITY_MASK SET_DMA_PRIORITY(3)
-#define PRIORITY_LOW 0
+#define PRIORITY_LOW 0
#define PRIORITY_MID_LOW 1
#define PRIORITY_MID_HIGH 2
#define PRIORITY_HIGH 3
@@ -241,13 +241,13 @@ extern unsigned long ISA_DMA_THRESHOLD;
#define SSG2_ENABLE (1<<29)
#define SSG3_ENABLE (1<<28)
#define SSG0_MASK_ENABLE (1<<15) /* Enable writing to SSG0 bit */
-#define SSG1_MASK_ENABLE (1<<14)
-#define SSG2_MASK_ENABLE (1<<13)
-#define SSG3_MASK_ENABLE (1<<12)
+#define SSG1_MASK_ENABLE (1<<14)
+#define SSG2_MASK_ENABLE (1<<13)
+#define SSG3_MASK_ENABLE (1<<12)
/*
- * DMA Scatter/Gather Descriptor Bit fields
+ * DMA Scatter/Gather Descriptor Bit fields
*/
#define SG_LINK (1<<31) /* Link */
#define SG_TCI_ENABLE (1<<29) /* Enable Terminal Count Interrupt */
@@ -262,7 +262,7 @@ typedef uint32_t sgl_handle_t;
typedef struct {
- /*
+ /*
* Valid polarity settings:
* DMAReq0_ActiveLow
* DMAAck0_ActiveLow
@@ -271,18 +271,18 @@ typedef struct {
* DMAReq1_ActiveLow
* DMAAck1_ActiveLow
* EOT1_ActiveLow
- *
+ *
* DMAReq2_ActiveLow
* DMAAck2_ActiveLow
* EOT2_ActiveLow
*
- * DMAReq3_ActiveLow
+ * DMAReq3_ActiveLow
* DMAAck3_ActiveLow
* EOT3_ActiveLow
*/
unsigned int polarity;
- char buffer_enable; /* Boolean: buffer enable */
+ char buffer_enable; /* Boolean: buffer enable */
char tce_enable; /* Boolean: terminal count enable */
char etd_output; /* Boolean: eot pin is a tc output */
char pce; /* Boolean: parity check enable */
@@ -423,7 +423,7 @@ static __inline__ int enable_405gp_dma(unsigned int dmanr)
case 0:
if (p_dma_ch->mode == DMA_MODE_READ) {
/* peripheral to memory */
- mtdcr(DCRN_DMASA0, NULL);
+ mtdcr(DCRN_DMASA0, NULL);
mtdcr(DCRN_DMADA0, p_dma_ch->addr);
}
else if (p_dma_ch->mode == DMA_MODE_WRITE) {
@@ -438,8 +438,8 @@ static __inline__ int enable_405gp_dma(unsigned int dmanr)
mtdcr(DCRN_DMACR0, control);
break;
case 1:
- if (p_dma_ch->mode == DMA_MODE_READ) {
- mtdcr(DCRN_DMASA1, NULL);
+ if (p_dma_ch->mode == DMA_MODE_READ) {
+ mtdcr(DCRN_DMASA1, NULL);
mtdcr(DCRN_DMADA1, p_dma_ch->addr);
} else if (p_dma_ch->mode == DMA_MODE_WRITE) {
mtdcr(DCRN_DMASA1, p_dma_ch->addr);
@@ -451,10 +451,10 @@ static __inline__ int enable_405gp_dma(unsigned int dmanr)
mtdcr(DCRN_DMACR1, control);
break;
case 2:
- if (p_dma_ch->mode == DMA_MODE_READ) {
- mtdcr(DCRN_DMASA2, NULL);
+ if (p_dma_ch->mode == DMA_MODE_READ) {
+ mtdcr(DCRN_DMASA2, NULL);
mtdcr(DCRN_DMADA2, p_dma_ch->addr);
- } else if (p_dma_ch->mode == DMA_MODE_WRITE) {
+ } else if (p_dma_ch->mode == DMA_MODE_WRITE) {
mtdcr(DCRN_DMASA2, p_dma_ch->addr);
mtdcr(DCRN_DMADA2, NULL);
}
@@ -464,8 +464,8 @@ static __inline__ int enable_405gp_dma(unsigned int dmanr)
mtdcr(DCRN_DMACR2, control);
break;
case 3:
- if (p_dma_ch->mode == DMA_MODE_READ) {
- mtdcr(DCRN_DMASA3, NULL);
+ if (p_dma_ch->mode == DMA_MODE_READ) {
+ mtdcr(DCRN_DMASA3, NULL);
mtdcr(DCRN_DMADA3, p_dma_ch->addr);
} else if (p_dma_ch->mode == DMA_MODE_WRITE) {
mtdcr(DCRN_DMASA3, p_dma_ch->addr);
@@ -529,7 +529,7 @@ static __inline__ void disable_405gp_dma(unsigned int dmanr)
*
* Valid mode values are:
*
- * DMA_MODE_READ peripheral to memory
+ * DMA_MODE_READ peripheral to memory
* DMA_MODE_WRITE memory to peripheral
* DMA_MODE_MM memory to memory
* DMA_MODE_MM_DEVATSRC device-paced memory to memory, device at src
@@ -569,8 +569,8 @@ static __inline__ int set_405gp_dma_mode(unsigned int dmanr, unsigned int mode)
* where each transfer is equal to the bus width. Thus, count
* MUST be a multiple of the bus width.
*/
-static __inline__ void
-set_405gp_dma_count(unsigned int dmanr, unsigned int count)
+static __inline__ void
+set_405gp_dma_count(unsigned int dmanr, unsigned int count)
{
ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];
@@ -697,21 +697,21 @@ static __inline__ void set_405gp_dma_addr(unsigned int dmanr, dma_addr_t addr)
printk("Warning: set_dma_addr addr 0x%x bus width %d\n",
addr, p_dma_ch->pwidth);
}
-#endif
+#endif
/* save dma address and program it later after we know the xfer mode */
- p_dma_ch->addr = addr;
+ p_dma_ch->addr = addr;
}
/*
- * Sets both DMA addresses for a memory to memory transfer.
+ * Sets both DMA addresses for a memory to memory transfer.
* For memory to peripheral or peripheral to memory transfers
* the function set_dma_addr() should be used instead.
*/
-static __inline__ void
+static __inline__ void
set_405gp_dma_addr2(unsigned int dmanr, dma_addr_t src_dma_addr,
dma_addr_t dst_dma_addr)
{
@@ -746,7 +746,7 @@ set_405gp_dma_addr2(unsigned int dmanr, dma_addr_t src_dma_addr,
return;
}
if (error)
- printk("Warning: set_dma_addr2 src 0x%x dst 0x%x bus width %d\n",
+ printk("Warning: set_dma_addr2 src 0x%x dst 0x%x bus width %d\n",
src_dma_addr, dst_dma_addr, p_dma_ch->pwidth);
}
#endif
@@ -780,12 +780,12 @@ set_405gp_dma_addr2(unsigned int dmanr, dma_addr_t src_dma_addr,
/*
* Enables the channel interrupt.
*
- * If performing a scatter/gatter transfer, this function
+ * If performing a scatter/gatter transfer, this function
* MUST be called before calling alloc_dma_handle() and building
- * the sgl list. Otherwise, interrupts will not be enabled, if
+ * the sgl list. Otherwise, interrupts will not be enabled, if
* they were previously disabled.
*/
-static __inline__ int
+static __inline__ int
enable_405gp_dma_interrupt(unsigned int dmanr)
{
unsigned int control;
@@ -827,12 +827,12 @@ enable_405gp_dma_interrupt(unsigned int dmanr)
/*
* Disables the channel interrupt.
*
- * If performing a scatter/gatter transfer, this function
+ * If performing a scatter/gatter transfer, this function
* MUST be called before calling alloc_dma_handle() and building
- * the sgl list. Otherwise, interrupts will not be disabled, if
+ * the sgl list. Otherwise, interrupts will not be disabled, if
* they were previously enabled.
*/
-static __inline__ int
+static __inline__ int
disable_405gp_dma_interrupt(unsigned int dmanr)
{
unsigned int control;
@@ -873,8 +873,8 @@ disable_405gp_dma_interrupt(unsigned int dmanr)
#ifdef DCRNCAP_DMA_SG
/*
- * Add a new sgl descriptor to the end of a scatter/gather list
- * which was created by alloc_dma_handle().
+ * Add a new sgl descriptor to the end of a scatter/gather list
+ * which was created by alloc_dma_handle().
*
* For a memory to memory transfer, both dma addresses must be
* valid. For a peripheral to memory transfer, one of the addresses
@@ -882,13 +882,13 @@ disable_405gp_dma_interrupt(unsigned int dmanr)
* memory to peripheral: set dst_addr to NULL,
* peripheral to memory: set src_addr to NULL.
*/
-static __inline__ int
+static __inline__ int
add_405gp_dma_sgl(sgl_handle_t handle, dma_addr_t src_addr, dma_addr_t dst_addr,
unsigned int count)
{
sgl_list_info_t *psgl = (sgl_list_info_t *)handle;
ppc_dma_ch_t *p_dma_ch;
-
+
if (!handle) {
#ifdef DEBUG_405DMA
printk("add_dma_sgl: null handle\n");
@@ -930,7 +930,7 @@ add_405gp_dma_sgl(sgl_handle_t handle, dma_addr_t src_addr, dma_addr_t dst_addr,
return DMA_STATUS_GENERAL_ERROR;
}
if (error)
- printk("Alignment warning: add_dma_sgl src 0x%x dst 0x%x count 0x%x bus width var %d\n",
+ printk("Alignment warning: add_dma_sgl src 0x%x dst 0x%x count 0x%x bus width var %d\n",
src_addr, dst_addr, count, p_dma_ch->pwidth);
}
@@ -1023,7 +1023,7 @@ static __inline__ void enable_405gp_dma_sgl(sgl_handle_t handle)
pnext = psgl->phead;
while (pnext) {
- printk("dma descriptor at 0x%x, dma addr 0x%x\n",
+ printk("dma descriptor at 0x%x, dma addr 0x%x\n",
(unsigned)pnext, (unsigned)virt_to_bus(pnext));
printk("control 0x%x src 0x%x dst 0x%x c_count 0x%x, next 0x%x\n",
(unsigned)pnext->control, (unsigned)pnext->src_addr,
@@ -1099,7 +1099,7 @@ static __inline__ void disable_405gp_dma_sgl(sgl_handle_t handle)
*
* An sgl transfer must NOT be active when this function is called.
*/
-static __inline__ int
+static __inline__ int
get_405gp_dma_sgl_residue(sgl_handle_t handle, dma_addr_t *src_addr,
dma_addr_t *dst_addr)
{
@@ -1170,7 +1170,7 @@ get_405gp_dma_sgl_residue(sgl_handle_t handle, dma_addr_t *src_addr,
*/
pnext++;
- while ((pnext != psgl->ptail) &&
+ while ((pnext != psgl->ptail) &&
((unsigned)pnext < ((unsigned)psgl + SGL_LIST_SIZE))
) {
count_left += pnext->control_count & SG_COUNT_MASK;
@@ -1188,7 +1188,7 @@ get_405gp_dma_sgl_residue(sgl_handle_t handle, dma_addr_t *src_addr,
/* success */
p_dma_ch = &dma_channels[psgl->dmanr];
return (count_left << p_dma_ch->shift); /* count in bytes */
-
+
} else {
/* this shouldn't happen */
#ifdef DEBUG_405DMA
@@ -1215,7 +1215,7 @@ error:
*
* This function should only be called when the DMA is not active.
*/
-static __inline__ int
+static __inline__ int
delete_405gp_dma_sgl_element(sgl_handle_t handle, dma_addr_t *src_dma_addr,
dma_addr_t *dst_dma_addr)
{
diff --git a/include/asm-ppc/ppc_asm.h b/include/asm-ppc/ppc_asm.h
index afd99032491c..7a62917a999e 100644
--- a/include/asm-ppc/ppc_asm.h
+++ b/include/asm-ppc/ppc_asm.h
@@ -47,16 +47,16 @@
#define REST_32FPRS(n, base) REST_16FPRS(n, base); REST_16FPRS(n+16, base)
#define SAVE_VR(n,b,base) li b,THREAD_VR0+(16*(n)); stvx n,b,base
-#define SAVE_2VR(n,b,base) SAVE_VR(n,b,base); SAVE_VR(n+1,b,base)
-#define SAVE_4VR(n,b,base) SAVE_2VR(n,b,base); SAVE_2VR(n+2,b,base)
-#define SAVE_8VR(n,b,base) SAVE_4VR(n,b,base); SAVE_4VR(n+4,b,base)
+#define SAVE_2VR(n,b,base) SAVE_VR(n,b,base); SAVE_VR(n+1,b,base)
+#define SAVE_4VR(n,b,base) SAVE_2VR(n,b,base); SAVE_2VR(n+2,b,base)
+#define SAVE_8VR(n,b,base) SAVE_4VR(n,b,base); SAVE_4VR(n+4,b,base)
#define SAVE_16VR(n,b,base) SAVE_8VR(n,b,base); SAVE_8VR(n+8,b,base)
#define SAVE_32VR(n,b,base) SAVE_16VR(n,b,base); SAVE_16VR(n+16,b,base)
#define REST_VR(n,b,base) li b,THREAD_VR0+(16*(n)); lvx n,b,base
-#define REST_2VR(n,b,base) REST_VR(n,b,base); REST_VR(n+1,b,base)
-#define REST_4VR(n,b,base) REST_2VR(n,b,base); REST_2VR(n+2,b,base)
-#define REST_8VR(n,b,base) REST_4VR(n,b,base); REST_4VR(n+4,b,base)
-#define REST_16VR(n,b,base) REST_8VR(n,b,base); REST_8VR(n+8,b,base)
+#define REST_2VR(n,b,base) REST_VR(n,b,base); REST_VR(n+1,b,base)
+#define REST_4VR(n,b,base) REST_2VR(n,b,base); REST_2VR(n+2,b,base)
+#define REST_8VR(n,b,base) REST_4VR(n,b,base); REST_4VR(n+4,b,base)
+#define REST_16VR(n,b,base) REST_8VR(n,b,base); REST_8VR(n+8,b,base)
#define REST_32VR(n,b,base) REST_16VR(n,b,base); REST_16VR(n+16,b,base)
#ifdef CONFIG_PPC601_SYNC_FIX
diff --git a/include/asm-ppc/pplus.h b/include/asm-ppc/pplus.h
index 3e9fa3682254..0a3f11e40de8 100644
--- a/include/asm-ppc/pplus.h
+++ b/include/asm-ppc/pplus.h
@@ -1,6 +1,6 @@
/*
* include/asm-ppc/pplus.h
- *
+ *
* Definitions for Motorola MCG Falcon/Raven & HAWK North Bridge & Memory ctlr.
*
* Author: Mark A. Greer
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index 2a5437042ad8..ce969cc23076 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -190,8 +190,8 @@
#define DBCR0_IA34T 0x00004000 /* Instr Addr 3-4 range Toggle */
#define DBCR0_FT 0x00000001 /* Freeze Timers on debug event */
#ifndef CONFIG_BOOKE
-#define SPRN_DBCR1 0x3BD /* Debug Control Register 1 */
-#define SPRN_DBSR 0x3F0 /* Debug Status Register */
+#define SPRN_DBCR1 0x3BD /* Debug Control Register 1 */
+#define SPRN_DBSR 0x3F0 /* Debug Status Register */
#define DBSR_IC 0x80000000 /* Instruction Completion */
#define DBSR_BT 0x40000000 /* Branch taken */
#define DBSR_TIE 0x10000000 /* Trap Instruction debug Event */
diff --git a/include/asm-ppc/prom.h b/include/asm-ppc/prom.h
index a77a0e193c73..785dbbacba27 100644
--- a/include/asm-ppc/prom.h
+++ b/include/asm-ppc/prom.h
@@ -109,7 +109,7 @@ extern int call_rtas(const char *service, int nargs, int nret,
unsigned long *outputs, ...);
/*
- * PCI <-> OF matching functions
+ * PCI <-> OF matching functions
*/
struct pci_bus;
struct pci_dev;
diff --git a/include/asm-ppc/rtc.h b/include/asm-ppc/rtc.h
index 3b995c2ead76..05fbf912ab4d 100644
--- a/include/asm-ppc/rtc.h
+++ b/include/asm-ppc/rtc.h
@@ -1,4 +1,4 @@
-/*
+/*
* inclue/asm-ppc/rtc.h
*
* Author: Tom Rini <trini@mvista.com>
diff --git a/include/asm-ppc/sembuf.h b/include/asm-ppc/sembuf.h
index d0ab55833134..883f682f85b8 100644
--- a/include/asm-ppc/sembuf.h
+++ b/include/asm-ppc/sembuf.h
@@ -1,7 +1,7 @@
#ifndef _PPC_SEMBUF_H
#define _PPC_SEMBUF_H
-/*
+/*
* The semid64_ds structure for PPC architecture.
*/
diff --git a/include/asm-ppc/shmbuf.h b/include/asm-ppc/shmbuf.h
index ec614e8c6750..7ac0bd38cbd8 100644
--- a/include/asm-ppc/shmbuf.h
+++ b/include/asm-ppc/shmbuf.h
@@ -1,7 +1,7 @@
#ifndef _PPC_SHMBUF_H
#define _PPC_SHMBUF_H
-/*
+/*
* The shmid64_ds structure for PPC architecture.
*/
diff --git a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h
index b0528fcbe985..108bec27db9b 100644
--- a/include/asm-ppc/signal.h
+++ b/include/asm-ppc/signal.h
@@ -91,7 +91,7 @@ typedef struct {
#define SA_RESTORER 0x04000000
-/*
+/*
* sigaltstack controls
*/
#define SS_ONSTACK 1
diff --git a/include/asm-ppc/stat.h b/include/asm-ppc/stat.h
index 12b48c8cb880..cadb34298496 100644
--- a/include/asm-ppc/stat.h
+++ b/include/asm-ppc/stat.h
@@ -22,13 +22,13 @@ struct __old_kernel_stat {
#define STAT_HAVE_NSEC 1
struct stat {
- dev_t st_dev;
+ unsigned st_dev;
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
uid_t st_uid;
gid_t st_gid;
- dev_t st_rdev;
+ unsigned st_rdev;
off_t st_size;
unsigned long st_blksize;
unsigned long st_blocks;
diff --git a/include/asm-ppc/termios.h b/include/asm-ppc/termios.h
index f40419842fb9..97c6287a6cba 100644
--- a/include/asm-ppc/termios.h
+++ b/include/asm-ppc/termios.h
@@ -151,7 +151,7 @@ struct termio {
#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"
+#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
#endif /* __KERNEL__ */
/* modem lines */
diff --git a/include/asm-ppc/unaligned.h b/include/asm-ppc/unaligned.h
index 797ffd6e4e1b..45520d9b85d1 100644
--- a/include/asm-ppc/unaligned.h
+++ b/include/asm-ppc/unaligned.h
@@ -3,7 +3,7 @@
#define __PPC_UNALIGNED_H
/*
- * The PowerPC can do unaligned accesses itself in big endian mode.
+ * The PowerPC can do unaligned accesses itself in big endian mode.
*
* The strange macros are there to make sure these can't
* be misused in a way that makes them not work on other
diff --git a/include/asm-ppc/uninorth.h b/include/asm-ppc/uninorth.h
index 1d18c7983cd3..f203be83ec4f 100644
--- a/include/asm-ppc/uninorth.h
+++ b/include/asm-ppc/uninorth.h
@@ -9,7 +9,7 @@
/*
* Uni-N config space reg. definitions
- *
+ *
* (Little endian)
*/
@@ -32,13 +32,13 @@
/* My understanding of UniNorth AGP as of UniNorth rev 1.0x,
* revision 1.5 (x4 AGP) may need further changes.
- *
+ *
* AGP_BASE register contains the base address of the AGP aperture on
* the AGP bus. It doesn't seem to be visible to the CPU as of UniNorth 1.x,
* even if decoding of this address range is enabled in the address select
* register. Apparently, the only supported bases are 256Mb multiples
* (high 4 bits of that register).
- *
+ *
* GART_BASE register appear to contain the physical address of the GART
* in system memory in the high address bits (page aligned), and the
* GART size in the low order bits (number of GART pages)
@@ -47,39 +47,39 @@
* This word contains, in little-endian format (!!!), the physical address
* of the page in the high bits, and what appears to be an "enable" bit
* in the LSB bit (0) that must be set to 1 when the entry is valid.
- *
+ *
* Obviously, the GART is not cache coherent and so any change to it
* must be flushed to memory (or maybe just make the GART space non
* cachable). AGP memory itself doens't seem to be cache coherent neither.
- *
+ *
* In order to invalidate the GART (which is probably necessary to inval
* the bridge internal TLBs), the following sequence has to be written,
* in order, to the GART_CTRL register:
- *
+ *
* UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_INVAL
* UNI_N_CFG_GART_ENABLE
* UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_2xRESET
* UNI_N_CFG_GART_ENABLE
- *
+ *
* As far as AGP "features" are concerned, it looks like fast write may
* not be supported but this has to be confirmed.
- *
+ *
* Turning on AGP seem to require a double invalidate operation, one before
* setting the AGP command register, on after.
- *
+ *
* Turning off AGP seems to require the following sequence: first wait
* for the AGP to be idle by reading the internal status register, then
* write in that order to the GART_CTRL register:
- *
+ *
* UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_INVAL
* 0
* UNI_N_CFG_GART_2xRESET
* 0
*/
-/*
+/*
* Uni-N memory mapped reg. definitions
- *
+ *
* Those registers are Big-Endian !!
*
* Their meaning come from either Darwin and/or from experiments I made with
@@ -89,7 +89,7 @@
/* Version of the UniNorth chip */
#define UNI_N_VERSION 0x0000 /* Known versions: 3,7 and 8 */
-
+
/* This register is used to enable/disable various clocks */
#define UNI_N_CLOCK_CNTL 0x0020
#define UNI_N_CLOCK_CNTL_PCI 0x00000001 /* PCI2 clock control */
diff --git a/include/asm-ppc64/posix_types.h b/include/asm-ppc64/posix_types.h
index c3cff412a3eb..ff8ba3a73050 100644
--- a/include/asm-ppc64/posix_types.h
+++ b/include/asm-ppc64/posix_types.h
@@ -12,7 +12,6 @@
* 2 of the License, or (at your option) any later version.
*/
-typedef unsigned long __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned long __kernel_nlink_t;
typedef unsigned int __kernel_mode_t;
diff --git a/include/asm-ppc64/stat.h b/include/asm-ppc64/stat.h
index 51625e24830c..973a5f97951d 100644
--- a/include/asm-ppc64/stat.h
+++ b/include/asm-ppc64/stat.h
@@ -11,13 +11,13 @@
#include <linux/types.h>
struct stat {
- dev_t st_dev;
+ unsigned long st_dev;
ino_t st_ino;
nlink_t st_nlink;
mode_t st_mode;
uid_t st_uid;
gid_t st_gid;
- dev_t st_rdev;
+ unsigned long st_rdev;
off_t st_size;
unsigned long st_blksize;
unsigned long st_blocks;
diff --git a/include/asm-s390/posix_types.h b/include/asm-s390/posix_types.h
index 0d97ef9ee846..a6ac95dc9576 100644
--- a/include/asm-s390/posix_types.h
+++ b/include/asm-s390/posix_types.h
@@ -34,7 +34,6 @@ typedef long long __kernel_loff_t;
#ifndef __s390x__
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
@@ -51,7 +50,6 @@ typedef unsigned short __kernel_old_dev_t;
#else /* __s390x__ */
-typedef unsigned int __kernel_dev_t;
typedef unsigned int __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef unsigned int __kernel_nlink_t;
diff --git a/include/asm-sh/posix_types.h b/include/asm-sh/posix_types.h
index 7d0cd1b36d67..0a3d2f54ab27 100644
--- a/include/asm-sh/posix_types.h
+++ b/include/asm-sh/posix_types.h
@@ -7,7 +7,6 @@
* assume GCC is being used.
*/
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h
index dcc5cd732e1c..aa298155a8d3 100644
--- a/include/asm-sparc/atomic.h
+++ b/include/asm-sparc/atomic.h
@@ -33,9 +33,9 @@ typedef struct { volatile int counter; } atomic_t;
* 31 8 7 0
*/
-#define ATOMIC_INIT(i) { (i << 8) }
+#define ATOMIC_INIT(i) { ((i) << 8) }
-static __inline__ int atomic_read(atomic_t *v)
+static __inline__ int atomic_read(const atomic_t *v)
{
int ret = v->counter;
diff --git a/include/asm-sparc/posix_types.h b/include/asm-sparc/posix_types.h
index b4731a3c12a4..9ef1b3db4cbf 100644
--- a/include/asm-sparc/posix_types.h
+++ b/include/asm-sparc/posix_types.h
@@ -17,7 +17,6 @@ typedef int __kernel_pid_t;
typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;
-typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_umode_t;
diff --git a/include/asm-sparc64/posix_types.h b/include/asm-sparc64/posix_types.h
index 9341bb220fd8..133444385364 100644
--- a/include/asm-sparc64/posix_types.h
+++ b/include/asm-sparc64/posix_types.h
@@ -16,7 +16,6 @@ typedef int __kernel_pid_t;
typedef int __kernel_ipc_pid_t;
typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;
-typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef unsigned short __kernel_umode_t;
diff --git a/include/asm-sparc64/stat.h b/include/asm-sparc64/stat.h
index fedc7885aa8f..48e06618a5a4 100644
--- a/include/asm-sparc64/stat.h
+++ b/include/asm-sparc64/stat.h
@@ -5,13 +5,13 @@
#include <linux/types.h>
struct stat {
- dev_t st_dev;
+ unsigned st_dev;
ino_t st_ino;
mode_t st_mode;
short st_nlink;
uid_t st_uid;
gid_t st_gid;
- dev_t st_rdev;
+ unsigned st_rdev;
off_t st_size;
time_t st_atime;
time_t st_mtime;
diff --git a/include/asm-v850/posix_types.h b/include/asm-v850/posix_types.h
index 4f2f0d8eefea..865c87cadc2b 100644
--- a/include/asm-v850/posix_types.h
+++ b/include/asm-v850/posix_types.h
@@ -14,7 +14,6 @@
#ifndef __V850_POSIX_TYPES_H__
#define __V850_POSIX_TYPES_H__
-typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned long long __kernel_ino64_t;
typedef unsigned int __kernel_mode_t;
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h
index 03e35a04aed2..f9d7d6a1a131 100644
--- a/include/asm-x86_64/desc.h
+++ b/include/asm-x86_64/desc.h
@@ -149,6 +149,8 @@ static inline void set_seg_base(unsigned cpu, int entry, void *base)
#define LDT_entry_a(info) \
((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))
+/* Don't allow setting of the lm bit. It is useless anyways because
+ 64bit system calls require __USER_CS. */
#define LDT_entry_b(info) \
(((info)->base_addr & 0xff000000) | \
(((info)->base_addr & 0x00ff0000) >> 16) | \
@@ -159,7 +161,7 @@ static inline void set_seg_base(unsigned cpu, int entry, void *base)
((info)->seg_32bit << 22) | \
((info)->limit_in_pages << 23) | \
((info)->useable << 20) | \
- ((info)->lm << 21) | \
+ /* ((info)->lm << 21) | */ \
0x7000)
#define LDT_empty(info) (\
diff --git a/include/asm-x86_64/dwarf2.h b/include/asm-x86_64/dwarf2.h
new file mode 100644
index 000000000000..72775b3e249b
--- /dev/null
+++ b/include/asm-x86_64/dwarf2.h
@@ -0,0 +1,50 @@
+#ifndef _DWARF2_H
+#define _DWARF2_H 1
+
+#include <linux/config.h>
+
+#ifndef __ASSEMBLY__
+#warning "asm/dwarf2.h should be only included in pure assembly files"
+#endif
+
+/*
+ Macros for dwarf2 CFI unwind table entries.
+ See "as.info" for details on these pseudo ops. Unfortunately
+ they are only supported in very new binutils, so define them
+ away for older version.
+ */
+
+#ifdef CONFIG_CFI_BINUTILS
+
+#define CFI_STARTPROC .cfi_startproc
+#define CFI_ENDPROC .cfi_endproc
+#define CFI_DEF_CFA .cfi_def_cfa
+#define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register
+#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset
+#define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset
+#define CFI_OFFSET .cfi_offset
+#define CFI_REL_OFFSET .cfi_rel_offset
+
+#else
+
+#ifdef __ASSEMBLY__
+ .macro nothing
+ .endm
+ .macro nothing1 a
+ .endm
+ .macro nothing2 a,b
+ .endm
+#endif
+
+#define CFI_STARTPROC nothing
+#define CFI_ENDPROC nothing
+#define CFI_DEF_CFA nothing2
+#define CFI_DEF_CFA_REGISTER nothing1
+#define CFI_DEF_CFA_OFFSET nothing1
+#define CFI_ADJUST_CFA_OFFSET nothing1
+#define CFI_OFFSET nothing2
+#define CFI_REL_OFFSET nothing2
+
+#endif
+
+#endif
diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h
index 316d01ac6eef..6895fc99bb81 100644
--- a/include/asm-x86_64/kdebug.h
+++ b/include/asm-x86_64/kdebug.h
@@ -39,6 +39,12 @@ static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,lon
return notifier_call_chain(&die_chain, val, &args);
}
-int printk_address(unsigned long address);
+extern int printk_address(unsigned long address);
+extern void die(const char *,struct pt_regs *,long);
+extern void __die(const char *,struct pt_regs *,long);
+extern void show_registers(struct pt_regs *regs);
+extern void dump_pagetable(unsigned long);
+extern void oops_begin(void);
+extern void oops_end(void);
#endif
diff --git a/include/asm-x86_64/posix_types.h b/include/asm-x86_64/posix_types.h
index 33a1dccf45da..b28ed4955fa3 100644
--- a/include/asm-x86_64/posix_types.h
+++ b/include/asm-x86_64/posix_types.h
@@ -7,7 +7,6 @@
* assume GCC is being used.
*/
-typedef unsigned long __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef unsigned long __kernel_nlink_t;
diff --git a/include/asm-x86_64/siginfo.h b/include/asm-x86_64/siginfo.h
index 00167a4cb25b..74fcd6437c88 100644
--- a/include/asm-x86_64/siginfo.h
+++ b/include/asm-x86_64/siginfo.h
@@ -5,6 +5,8 @@
#define __ARCH_SI_BAND_T long
+#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
+
#include <asm-generic/siginfo.h>
#endif
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h
index a1de5b94baf5..1aea880c9fa9 100644
--- a/include/asm-x86_64/uaccess.h
+++ b/include/asm-x86_64/uaccess.h
@@ -147,7 +147,7 @@ extern void __put_user_bad(void);
({ \
int __pu_err = -EFAULT; \
__typeof__(*(ptr)) *__pu_addr = (ptr); \
- if (access_ok(VERIFY_WRITE,__pu_addr,size)) \
+ if (likely(access_ok(VERIFY_WRITE,__pu_addr,size))) \
__put_user_size((x),__pu_addr,(size),__pu_err); \
__pu_err; \
})
@@ -255,12 +255,12 @@ static inline int __copy_from_user(void *dst, const void *src, unsigned size)
return ret;
case 10:
__get_user_asm(*(u64*)dst,(u64*)src,ret,"q","","=r",16);
- if (ret) return ret;
+ if (unlikely(ret)) return ret;
__get_user_asm(*(u16*)(8+(char*)dst),(u16*)(8+(char*)src),ret,"w","w","=r",2);
return ret;
case 16:
__get_user_asm(*(u64*)dst,(u64*)src,ret,"q","","=r",16);
- if (ret) return ret;
+ if (unlikely(ret)) return ret;
__get_user_asm(*(u64*)(8+(char*)dst),(u64*)(8+(char*)src),ret,"q","","=r",8);
return ret;
default:
@@ -284,13 +284,13 @@ static inline int __copy_to_user(void *dst, const void *src, unsigned size)
return ret;
case 10:
__put_user_asm(*(u64*)src,(u64*)dst,ret,"q","","ir",10);
- if (ret) return ret;
+ if (unlikely(ret)) return ret;
asm("":::"memory");
__put_user_asm(4[(u16*)src],4+(u16*)dst,ret,"w","w","ir",2);
return ret;
case 16:
__put_user_asm(*(u64*)src,(u64*)dst,ret,"q","","ir",16);
- if (ret) return ret;
+ if (unlikely(ret)) return ret;
asm("":::"memory");
__put_user_asm(1[(u64*)src],1+(u64*)dst,ret,"q","","ir",8);
return ret;
@@ -309,14 +309,14 @@ static inline int __copy_in_user(void *dst, const void *src, unsigned size)
case 1: {
u8 tmp;
__get_user_asm(tmp,(u8 *)src,ret,"b","b","=q",1);
- if (!ret)
+ if (likely(!ret))
__put_user_asm(tmp,(u8 *)dst,ret,"b","b","iq",1);
return ret;
}
case 2: {
u16 tmp;
__get_user_asm(tmp,(u16 *)src,ret,"w","w","=r",2);
- if (!ret)
+ if (likely(!ret))
__put_user_asm(tmp,(u16 *)dst,ret,"w","w","ir",2);
return ret;
}
@@ -324,14 +324,14 @@ static inline int __copy_in_user(void *dst, const void *src, unsigned size)
case 4: {
u32 tmp;
__get_user_asm(tmp,(u32 *)src,ret,"l","k","=r",4);
- if (!ret)
+ if (likely(!ret))
__put_user_asm(tmp,(u32 *)dst,ret,"l","k","ir",4);
return ret;
}
case 8: {
u64 tmp;
__get_user_asm(tmp,(u64 *)src,ret,"q","","=r",8);
- if (!ret)
+ if (likely(!ret))
__put_user_asm(tmp,(u64 *)dst,ret,"q","","ir",8);
return ret;
}
diff --git a/include/linux/dm-ioctl-v1.h b/include/linux/dm-ioctl-v1.h
index 21bef9ec14b0..8a20b91c0e45 100644
--- a/include/linux/dm-ioctl-v1.h
+++ b/include/linux/dm-ioctl-v1.h
@@ -50,7 +50,7 @@ struct dm_ioctl {
uint32_t open_count; /* out */
uint32_t flags; /* in/out */
- __kernel_dev_t dev; /* in/out */
+ __kernel_old_dev_t dev; /* in/out */
char name[DM_NAME_LEN]; /* device name */
char uuid[DM_UUID_LEN]; /* unique identifier for
@@ -87,7 +87,7 @@ struct dm_target_spec {
struct dm_target_deps {
uint32_t count;
- __kernel_dev_t dev[0]; /* out */
+ __kernel_old_dev_t dev[0]; /* out */
};
/*
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 20a7b18b0841..b3a714c094d2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1392,9 +1392,6 @@ struct tree_descr { char *name; struct file_operations *ops; int mode; };
extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count);
extern void simple_release_fs(struct vfsmount **mount, int *count);
-extern int old_valid_dev(dev_t);
-extern u16 old_encode_dev(dev_t);
-extern dev_t old_decode_dev(u16);
extern int inode_change_ok(struct inode *, struct iattr *);
extern int inode_setattr(struct inode *, struct iattr *);
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index edc512ee628f..b3dd00de8dc3 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -98,6 +98,8 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
extern struct file_operations hugetlbfs_file_operations;
extern struct vm_operations_struct hugetlb_vm_ops;
struct file *hugetlb_zero_setup(size_t);
+int hugetlb_get_quota(struct address_space *mapping);
+void hugetlb_put_quota(struct address_space *mapping);
static inline int is_file_hugepages(struct file *file)
{
diff --git a/include/linux/kdev_t.h b/include/linux/kdev_t.h
index f60508da024d..bceea527dd37 100644
--- a/include/linux/kdev_t.h
+++ b/include/linux/kdev_t.h
@@ -1,8 +1,7 @@
#ifndef _LINUX_KDEV_T_H
#define _LINUX_KDEV_T_H
#ifdef __KERNEL__
-/* These are for user-level "dev_t" */
-#define MINORBITS 8
+#define MINORBITS 20
#define MINORMASK ((1U << MINORBITS) - 1)
#define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS))
@@ -18,6 +17,77 @@
buffer; \
})
+/* acceptable for old filesystems */
+static inline int old_valid_dev(dev_t dev)
+{
+ return MAJOR(dev) < 256 && MINOR(dev) < 256;
+}
+
+static inline u16 old_encode_dev(dev_t dev)
+{
+ return (MAJOR(dev) << 8) | MINOR(dev);
+}
+
+static inline dev_t old_decode_dev(u16 val)
+{
+ return MKDEV((val >> 8) & 255, val & 255);
+}
+
+static inline int new_valid_dev(dev_t dev)
+{
+ return 1;
+}
+
+static inline u32 new_encode_dev(dev_t dev)
+{
+ unsigned major = MAJOR(dev);
+ unsigned minor = MINOR(dev);
+ return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
+}
+
+static inline dev_t new_decode_dev(u32 dev)
+{
+ unsigned major = (dev & 0xfff00) >> 8;
+ unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00);
+ return MKDEV(major, minor);
+}
+
+static inline int huge_valid_dev(dev_t dev)
+{
+ return 1;
+}
+
+static inline u64 huge_encode_dev(dev_t dev)
+{
+ return new_encode_dev(dev);
+}
+
+static inline dev_t huge_decode_dev(u64 dev)
+{
+ return new_decode_dev(dev);
+}
+
+static inline int sysv_valid_dev(dev_t dev)
+{
+ return MAJOR(dev) < (1<<14) && MINOR(dev) < (1<<18);
+}
+
+static inline u32 sysv_encode_dev(dev_t dev)
+{
+ return MINOR(dev) | (MAJOR(dev) << 18);
+}
+
+static inline unsigned sysv_major(u32 dev)
+{
+ return (dev >> 18) & 0x3fff;
+}
+
+static inline unsigned sysv_minor(u32 dev)
+{
+ return dev & 0x3ffff;
+}
+
+
#else /* __KERNEL__ */
/*
diff --git a/include/linux/major.h b/include/linux/major.h
index 0e2d112c89e5..39a77a2c7035 100644
--- a/include/linux/major.h
+++ b/include/linux/major.h
@@ -160,34 +160,4 @@
#define IBM_TTY3270_MAJOR 227
#define IBM_FS3270_MAJOR 228
-/*
- * Tests for SCSI devices.
- */
-
-#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \
- ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR) || \
- ((M) >= SCSI_DISK8_MAJOR && (M) <= SCSI_DISK15_MAJOR))
-
-#define SCSI_BLK_MAJOR(M) \
- (SCSI_DISK_MAJOR(M) \
- || (M) == SCSI_CDROM_MAJOR)
-
-static __inline__ int scsi_blk_major(int m) {
- return SCSI_BLK_MAJOR(m);
-}
-
-/*
- * Tests for IDE devices
- */
-#define IDE_DISK_MAJOR(M) ((M) == IDE0_MAJOR || (M) == IDE1_MAJOR || \
- (M) == IDE2_MAJOR || (M) == IDE3_MAJOR || \
- (M) == IDE4_MAJOR || (M) == IDE5_MAJOR || \
- (M) == IDE6_MAJOR || (M) == IDE7_MAJOR || \
- (M) == IDE8_MAJOR || (M) == IDE9_MAJOR)
-
-static __inline__ int ide_blk_major(int m)
-{
- return IDE_DISK_MAJOR(m);
-}
-
#endif
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 74272d6a562e..204294616cf1 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -65,7 +65,7 @@ struct svc_expkey {
struct auth_domain * ek_client;
int ek_fsidtype;
- u32 ek_fsid[2];
+ u32 ek_fsid[3];
struct svc_export * ek_export;
};
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index 8c4fb5cfff21..97a57608a6e6 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -15,6 +15,7 @@
#include <linux/unistd.h>
#include <linux/dirent.h>
#include <linux/fs.h>
+#include <linux/mount.h>
#include <linux/nfsd/debug.h>
#include <linux/nfsd/nfsfh.h>
@@ -209,6 +210,17 @@ void nfsd_lockd_shutdown(void);
*/
extern struct timeval nfssvc_boot;
+static inline int is_fsid(struct svc_fh *fh, struct knfsd_fh *reffh)
+{
+ if (fh->fh_export->ex_flags & NFSEXP_FSID) {
+ struct vfsmount *mnt = fh->fh_export->ex_mnt;
+ if (!old_valid_dev(mnt->mnt_sb->s_dev) ||
+ (reffh->fh_version == 1 && reffh->fh_fsid_type == 1))
+ return 1;
+ }
+ return 0;
+}
+
#ifdef CONFIG_NFSD_V4
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index d4d63cc8e5fa..555793d69ddc 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -117,26 +117,6 @@ struct knfsd_fh {
#ifdef __KERNEL__
-/*
- * Conversion macros for the filehandle fields.
- *
- * Keep the device numbers in "backwards compatible
- * format", ie the low 16 bits contain the low 8 bits
- * of the 20-bit minor and the 12-bit major number.
- *
- * The high 16 bits contain the rest (4 bits major
- * and 12 bits minor),
- */
-
-static inline dev_t u32_to_dev_t(__u32 udev)
-{
- unsigned int minor, major;
-
- minor = (udev & 0xff) | ((udev >> 8) & 0xfff00);
- major = ((udev >> 8) & 0xff) | ((udev >> 20) & 0xf00);
- return MKDEV(major, minor);
-}
-
static inline __u32 ino_t_to_u32(ino_t ino)
{
return (__u32) ino;
@@ -196,6 +176,12 @@ static inline void mk_fsid_v1(u32 *fsidv, u32 fsid)
fsidv[0] = fsid;
}
+static inline void mk_fsid_v2(u32 *fsidv, dev_t dev, ino_t ino)
+{
+ fsidv[0] = htonl(MAJOR(dev));
+ fsidv[1] = htonl(MINOR(dev));
+ fsidv[2] = ino_t_to_u32(ino);
+}
/*
* Shorthand for dprintk()'s
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 70c5d117da8d..c9466321a2b2 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -64,11 +64,7 @@ static inline int level_to_pers (int level)
typedef struct mddev_s mddev_t;
typedef struct mdk_rdev_s mdk_rdev_t;
-#if (MINORBITS != 8)
-#error MD does not handle bigger kdev yet
-#endif
-
-#define MAX_MD_DEVS (1<<MINORBITS) /* Max number of md dev */
+#define MAX_MD_DEVS 256 /* Max number of md dev */
/*
* options passed in raidrun:
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 0d8f3ad21fdd..a34e79044978 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1931,32 +1931,13 @@ struct dentry *reiserfs_get_parent(struct dentry *) ;
int reiserfs_proc_info_init( struct super_block *sb );
int reiserfs_proc_info_done( struct super_block *sb );
-struct proc_dir_entry *reiserfs_proc_register( struct super_block *sb,
- char *name, read_proc_t *func );
-void reiserfs_proc_unregister( struct super_block *sb, const char *name );
struct proc_dir_entry *reiserfs_proc_register_global( char *name,
read_proc_t *func );
void reiserfs_proc_unregister_global( const char *name );
int reiserfs_proc_info_global_init( void );
int reiserfs_proc_info_global_done( void );
-int reiserfs_proc_tail( int len, char *buffer, char **start,
- off_t offset, int count, int *eof );
int reiserfs_global_version_in_proc( char *buffer, char **start, off_t offset,
int count, int *eof, void *data );
-int reiserfs_version_in_proc( char *buffer, char **start, off_t offset,
- int count, int *eof, void *data );
-int reiserfs_super_in_proc( char *buffer, char **start, off_t offset,
- int count, int *eof, void *data );
-int reiserfs_per_level_in_proc( char *buffer, char **start, off_t offset,
- int count, int *eof, void *data );
-int reiserfs_bitmap_in_proc( char *buffer, char **start, off_t offset,
- int count, int *eof, void *data );
-int reiserfs_on_disk_super_in_proc( char *buffer, char **start, off_t offset,
- int count, int *eof, void *data );
-int reiserfs_oidmap_in_proc( char *buffer, char **start, off_t offset,
- int count, int *eof, void *data );
-int reiserfs_journal_in_proc( char *buffer, char **start, off_t offset,
- int count, int *eof, void *data );
#if defined( REISERFS_PROC_INFO )
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index 956b0d22d500..4c675f30a8ae 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -468,7 +468,7 @@ struct reiserfs_sb_info
void reiserfs_file_buffer (struct buffer_head * bh, int list);
-int is_reiserfs_super(struct super_block *s) ;
+extern struct file_system_type reiserfs_fs_type;
int journal_mark_dirty(struct reiserfs_transaction_handle *, struct super_block *, struct buffer_head *bh) ;
int flush_old_commits(struct super_block *s, int) ;
int show_reiserfs_locks(void) ;
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 502a1389f689..1141ec3c5321 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -618,7 +618,7 @@ enum
#include <linux/config.h>
-static __inline__ int rtattr_strcmp(struct rtattr *rta, char *str)
+static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str)
{
int len = strlen(str) + 1;
return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len);
@@ -642,8 +642,9 @@ extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data);
#define RTA_PUT(skb, attrtype, attrlen, data) \
-({ if (skb_tailroom(skb) < (int)RTA_SPACE(attrlen)) goto rtattr_failure; \
- __rta_fill(skb, attrtype, attrlen, data); })
+({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
+ goto rtattr_failure; \
+ __rta_fill(skb, attrtype, attrlen, data); })
static inline struct rtattr *
__rta_reserve(struct sk_buff *skb, int attrtype, int attrlen)
@@ -658,8 +659,9 @@ __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen)
}
#define __RTA_PUT(skb, attrtype, attrlen) \
-({ if (skb_tailroom(skb) < (int)RTA_SPACE(attrlen)) goto rtattr_failure; \
- __rta_reserve(skb, attrtype, attrlen); })
+({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
+ goto rtattr_failure; \
+ __rta_reserve(skb, attrtype, attrlen); })
extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change);
@@ -681,11 +683,21 @@ extern void rtnl_lock(void);
extern void rtnl_unlock(void);
extern void rtnetlink_init(void);
-#define ASSERT_RTNL() do { if (down_trylock(&rtnl_sem) == 0) { up(&rtnl_sem); \
-printk("RTNL: assertion failed at " __FILE__ "(%d)\n", __LINE__); } \
- } while(0)
-#define BUG_TRAP(x) if (!(x)) { printk("KERNEL: assertion (" #x ") failed at " __FILE__ "(%d)\n", __LINE__); }
-
+#define ASSERT_RTNL() do { \
+ if (unlikely(down_trylock(&rtnl_sem) == 0)) { \
+ up(&rtnl_sem); \
+ printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \
+ __FILE__, __LINE__); \
+ dump_stack(); \
+ } \
+} while(0)
+
+#define BUG_TRAP(x) do { \
+ if (unlikely(!(x))) { \
+ printk(KERN_ERR "KERNEL: assertion (%s) failed at %s (%d)\n", \
+ #x, __FILE__ , __LINE__); \
+ } \
+} while(0)
#endif /* __KERNEL__ */
diff --git a/include/linux/tty.h b/include/linux/tty.h
index c575197f00b3..0626d1b321aa 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -264,7 +264,6 @@ struct tty_struct {
char name[64];
int pgrp;
int session;
- dev_t device;
unsigned long flags;
int count;
struct winsize winsize;
@@ -348,23 +347,7 @@ extern int fg_console, last_console, want_console;
extern int kmsg_redirect;
extern void console_init(void);
-
-extern int lp_init(void);
-extern int pty_init(void);
-extern int mxser_init(void);
-extern int moxa_init(void);
-extern int ip2_init(void);
-extern int pcxe_init(void);
-extern int pc_init(void);
extern int vcs_init(void);
-extern int rp_init(void);
-extern int cy_init(void);
-extern int stl_init(void);
-extern int stli_init(void);
-extern int specialix_init(void);
-extern int espserial_init(void);
-extern int macserial_init(void);
-extern int a2232board_init(void);
extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
const char *routine);
@@ -419,5 +402,10 @@ extern void console_print(const char *);
extern int vt_ioctl(struct tty_struct *tty, struct file * file,
unsigned int cmd, unsigned long arg);
+static inline dev_t tty_devnum(struct tty_struct *tty)
+{
+ return MKDEV(tty->driver->major, tty->driver->minor_start) + tty->index;
+}
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/types.h b/include/linux/types.h
index 87a71f8f2416..3b407b06b48f 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -17,6 +17,8 @@
#ifndef __KERNEL_STRICT_NAMES
+typedef __u32 __kernel_dev_t;
+
typedef __kernel_fd_set fd_set;
typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t;
diff --git a/include/net/atmclip.h b/include/net/atmclip.h
index fdbbb71cdb0e..a9ec5e4fed66 100644
--- a/include/net/atmclip.h
+++ b/include/net/atmclip.h
@@ -67,7 +67,15 @@ struct atm_clip_ops {
};
void atm_clip_ops_set(struct atm_clip_ops *);
+#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
int try_atm_clip_ops(void);
+#else
+static inline int try_atm_clip_ops(void)
+{
+ return 0;
+}
+#endif
+
extern struct neigh_table *clip_tbl_hook;
extern struct atm_clip_ops *atm_clip_ops;