summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/bug.h3
-rw-r--r--include/asm-alpha/errno.h4
-rw-r--r--include/asm-alpha/siginfo.h2
-rw-r--r--include/asm-alpha/signal.h14
-rw-r--r--include/asm-arm/arch-integrator/cm.h6
-rw-r--r--include/asm-arm/arch-ixp2000/platform.h1
-rw-r--r--include/asm-arm/bug.h3
-rw-r--r--include/asm-arm/io.h28
-rw-r--r--include/asm-arm/rtc.h4
-rw-r--r--include/asm-arm/signal.h11
-rw-r--r--include/asm-arm/unistd.h3
-rw-r--r--include/asm-arm26/bug.h3
-rw-r--r--include/asm-arm26/signal.h11
-rw-r--r--include/asm-cris/page.h4
-rw-r--r--include/asm-cris/signal.h14
-rw-r--r--include/asm-frv/bug.h2
-rw-r--r--include/asm-frv/pgtable.h4
-rw-r--r--include/asm-frv/signal.h14
-rw-r--r--include/asm-generic/bug.h22
-rw-r--r--include/asm-generic/errno.h4
-rw-r--r--include/asm-generic/resource.h7
-rw-r--r--include/asm-generic/siginfo.h13
-rw-r--r--include/asm-h8300/signal.h13
-rw-r--r--include/asm-i386/apic.h1
-rw-r--r--include/asm-i386/bug.h5
-rw-r--r--include/asm-i386/checksum.h2
-rw-r--r--include/asm-i386/cpufeature.h4
-rw-r--r--include/asm-i386/e820.h2
-rw-r--r--include/asm-i386/hpet.h1
-rw-r--r--include/asm-i386/pgtable.h4
-rw-r--r--include/asm-i386/setup.h2
-rw-r--r--include/asm-i386/signal.h14
-rw-r--r--include/asm-i386/string.h89
-rw-r--r--include/asm-i386/system.h6
-rw-r--r--include/asm-ia64/bug.h5
-rw-r--r--include/asm-ia64/siginfo.h4
-rw-r--r--include/asm-ia64/signal.h10
-rw-r--r--include/asm-m32r/signal.h14
-rw-r--r--include/asm-m68k/bug.h3
-rw-r--r--include/asm-m68k/signal.h13
-rw-r--r--include/asm-m68knommu/MC68328.h2
-rw-r--r--include/asm-m68knommu/MC68EZ328.h2
-rw-r--r--include/asm-m68knommu/MC68VZ328.h2
-rw-r--r--include/asm-m68knommu/signal.h13
-rw-r--r--include/asm-mips/bug.h4
-rw-r--r--include/asm-mips/errno.h4
-rw-r--r--include/asm-mips/siginfo.h2
-rw-r--r--include/asm-mips/signal.h15
-rw-r--r--include/asm-parisc/bug.h2
-rw-r--r--include/asm-parisc/errno.h4
-rw-r--r--include/asm-parisc/signal.h11
-rw-r--r--include/asm-parisc/uaccess.h2
-rw-r--r--include/asm-ppc/bug.h3
-rw-r--r--include/asm-ppc/pmac_feature.h3
-rw-r--r--include/asm-ppc/reg_booke.h1
-rw-r--r--include/asm-ppc/signal.h13
-rw-r--r--include/asm-ppc64/a.out.h2
-rw-r--r--include/asm-ppc64/bug.h7
-rw-r--r--include/asm-ppc64/elf.h8
-rw-r--r--include/asm-ppc64/page.h15
-rw-r--r--include/asm-ppc64/pgalloc.h2
-rw-r--r--include/asm-ppc64/pgtable.h41
-rw-r--r--include/asm-ppc64/signal.h13
-rw-r--r--include/asm-ppc64/spinlock.h8
-rw-r--r--include/asm-s390/bug.h3
-rw-r--r--include/asm-s390/cmb.h2
-rw-r--r--include/asm-s390/debug.h2
-rw-r--r--include/asm-s390/page.h2
-rw-r--r--include/asm-s390/processor.h2
-rw-r--r--include/asm-s390/ptrace.h16
-rw-r--r--include/asm-s390/siginfo.h6
-rw-r--r--include/asm-s390/signal.h14
-rw-r--r--include/asm-sh/bug.h3
-rw-r--r--include/asm-sh/checksum.h2
-rw-r--r--include/asm-sh/signal.h14
-rw-r--r--include/asm-sh64/bug.h4
-rw-r--r--include/asm-sh64/checksum.h2
-rw-r--r--include/asm-sh64/signal.h14
-rw-r--r--include/asm-sparc/bug.h3
-rw-r--r--include/asm-sparc/errno.h4
-rw-r--r--include/asm-sparc/signal.h8
-rw-r--r--include/asm-sparc/uaccess.h2
-rw-r--r--include/asm-sparc64/bug.h3
-rw-r--r--include/asm-sparc64/errno.h4
-rw-r--r--include/asm-sparc64/siginfo.h2
-rw-r--r--include/asm-sparc64/signal.h8
-rw-r--r--include/asm-um/common.lds.S9
-rw-r--r--include/asm-um/elf.h2
-rw-r--r--include/asm-um/page.h2
-rw-r--r--include/asm-um/pgtable-3level.h2
-rw-r--r--include/asm-um/processor-generic.h10
-rw-r--r--include/asm-v850/bug.h3
-rw-r--r--include/asm-v850/signal.h15
-rw-r--r--include/asm-x86_64/apic.h1
-rw-r--r--include/asm-x86_64/bootsetup.h3
-rw-r--r--include/asm-x86_64/bug.h4
-rw-r--r--include/asm-x86_64/cpufeature.h14
-rw-r--r--include/asm-x86_64/e820.h2
-rw-r--r--include/asm-x86_64/siginfo.h2
-rw-r--r--include/asm-x86_64/signal.h14
-rw-r--r--include/asm-x86_64/unistd.h2
-rw-r--r--include/linux/auto_fs4.h2
-rw-r--r--include/linux/compiler-gcc2.h5
-rw-r--r--include/linux/compiler.h6
-rw-r--r--include/linux/cpufreq.h5
-rw-r--r--include/linux/edd.h2
-rw-r--r--include/linux/fb.h3
-rw-r--r--include/linux/fs.h112
-rw-r--r--include/linux/gfp.h6
-rw-r--r--include/linux/input.h5
-rw-r--r--include/linux/kernel.h9
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/net.h38
-rw-r--r--include/linux/page-flags.h1
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/rcupdate.h23
-rw-r--r--include/linux/reboot_fixups.h10
-rw-r--r--include/linux/reiserfs_acl.h12
-rw-r--r--include/linux/reiserfs_fs.h249
-rw-r--r--include/linux/reiserfs_xattr.h4
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/signal.h17
-rw-r--r--include/linux/skbuff.h7
-rw-r--r--include/linux/slab.h23
-rw-r--r--include/linux/syscalls.h3
-rw-r--r--include/net/sock.h135
-rw-r--r--include/video/edid.h9
-rw-r--r--include/video/tdfx.h2
128 files changed, 684 insertions, 762 deletions
diff --git a/include/asm-alpha/bug.h b/include/asm-alpha/bug.h
index ae1e0a5..39a3e2a 100644
--- a/include/asm-alpha/bug.h
+++ b/include/asm-alpha/bug.h
@@ -1,6 +1,7 @@
#ifndef _ALPHA_BUG_H
#define _ALPHA_BUG_H
+#ifdef CONFIG_BUG
#include <asm/pal.h>
/* ??? Would be nice to use .gprel32 here, but we can't be sure that the
@@ -10,6 +11,8 @@
: : "i" (PAL_bugchk), "i"(__LINE__), "i"(__FILE__))
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-alpha/errno.h b/include/asm-alpha/errno.h
index c85ab6b..69e2655 100644
--- a/include/asm-alpha/errno.h
+++ b/include/asm-alpha/errno.h
@@ -116,4 +116,8 @@
#define EKEYREVOKED 134 /* Key has been revoked */
#define EKEYREJECTED 135 /* Key was rejected by service */
+/* for robust mutexes */
+#define EOWNERDEAD 136 /* Owner died */
+#define ENOTRECOVERABLE 137 /* State not recoverable */
+
#endif
diff --git a/include/asm-alpha/siginfo.h b/include/asm-alpha/siginfo.h
index 86bcab5..9822362 100644
--- a/include/asm-alpha/siginfo.h
+++ b/include/asm-alpha/siginfo.h
@@ -4,8 +4,6 @@
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#define __ARCH_SI_TRAPNO
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
-
#include <asm-generic/siginfo.h>
#endif
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h
index 25f98bc..4e0842b 100644
--- a/include/asm-alpha/signal.h
+++ b/include/asm-alpha/signal.h
@@ -109,20 +109,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 4096
#define SIGSTKSZ 16384
-
-#ifdef __KERNEL__
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x40000000
-#endif
-
#define SIG_BLOCK 1 /* for blocking signals */
#define SIG_UNBLOCK 2 /* for unblocking signals */
#define SIG_SETMASK 3 /* for setting the signal mask */
diff --git a/include/asm-arm/arch-integrator/cm.h b/include/asm-arm/arch-integrator/cm.h
index d31c1a71..1ab353e 100644
--- a/include/asm-arm/arch-integrator/cm.h
+++ b/include/asm-arm/arch-integrator/cm.h
@@ -24,9 +24,9 @@ void cm_control(u32, u32);
#define CM_CTRL_LCDBIASDN (1 << 10)
#define CM_CTRL_LCDMUXSEL_MASK (7 << 11)
#define CM_CTRL_LCDMUXSEL_GENLCD (1 << 11)
-#define CM_CTRL_LCDMUXSEL_SHARPLCD1 (3 << 11)
-#define CM_CTRL_LCDMUXSEL_SHARPLCD2 (4 << 11)
-#define CM_CTRL_LCDMUXSEL_VGA (7 << 11)
+#define CM_CTRL_LCDMUXSEL_VGA_16BPP (2 << 11)
+#define CM_CTRL_LCDMUXSEL_SHARPLCD (3 << 11)
+#define CM_CTRL_LCDMUXSEL_VGA_8421BPP (4 << 11)
#define CM_CTRL_LCDEN0 (1 << 14)
#define CM_CTRL_LCDEN1 (1 << 15)
#define CM_CTRL_STATIC1 (1 << 16)
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h
index 509e44d..901bba6 100644
--- a/include/asm-arm/arch-ixp2000/platform.h
+++ b/include/asm-arm/arch-ixp2000/platform.h
@@ -121,6 +121,7 @@ unsigned long ixp2000_gettimeoffset(void);
struct pci_sys_data;
+u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where);
void ixp2000_pci_preinit(void);
int ixp2000_pci_setup(int, struct pci_sys_data*);
struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*);
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h
index 5e91b90..24d1167 100644
--- a/include/asm-arm/bug.h
+++ b/include/asm-arm/bug.h
@@ -3,6 +3,7 @@
#include <linux/config.h>
+#ifdef CONFIG_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
extern volatile void __bug(const char *file, int line, void *data);
@@ -17,6 +18,8 @@ extern volatile void __bug(const char *file, int line, void *data);
#endif
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 69bc7a3..658ffa3 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -99,12 +99,16 @@ extern void __readwrite_bug(const char *fn);
*/
#ifdef __io
#define outb(v,p) __raw_writeb(v,__io(p))
-#define outw(v,p) __raw_writew(cpu_to_le16(v),__io(p))
-#define outl(v,p) __raw_writel(cpu_to_le32(v),__io(p))
+#define outw(v,p) __raw_writew((__force __u16) \
+ cpu_to_le16(v),__io(p))
+#define outl(v,p) __raw_writel((__force __u32) \
+ cpu_to_le32(v),__io(p))
-#define inb(p) ({ unsigned int __v = __raw_readb(__io(p)); __v; })
-#define inw(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(__io(p))); __v; })
-#define inl(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(__io(p))); __v; })
+#define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __v; })
+#define inw(p) ({ __u16 __v = le16_to_cpu((__force __le16) \
+ __raw_readw(__io(p))); __v; })
+#define inl(p) ({ __u32 __v = le32_to_cpu((__force __le32) \
+ __raw_readl(__io(p))); __v; })
#define outsb(p,d,l) __raw_writesb(__io(p),d,l)
#define outsw(p,d,l) __raw_writesw(__io(p),d,l)
@@ -149,9 +153,11 @@ extern void _memset_io(void __iomem *, int, size_t);
* IO port primitives for more information.
*/
#ifdef __mem_pci
-#define readb(c) ({ unsigned int __v = __raw_readb(__mem_pci(c)); __v; })
-#define readw(c) ({ unsigned int __v = le16_to_cpu(__raw_readw(__mem_pci(c))); __v; })
-#define readl(c) ({ unsigned int __v = le32_to_cpu(__raw_readl(__mem_pci(c))); __v; })
+#define readb(c) ({ __u8 __v = __raw_readb(__mem_pci(c)); __v; })
+#define readw(c) ({ __u16 __v = le16_to_cpu((__force __le16) \
+ __raw_readw(__mem_pci(c))); __v; })
+#define readl(c) ({ __u32 __v = le32_to_cpu((__force __le32) \
+ __raw_readl(__mem_pci(c))); __v; })
#define readb_relaxed(addr) readb(addr)
#define readw_relaxed(addr) readw(addr)
#define readl_relaxed(addr) readl(addr)
@@ -161,8 +167,10 @@ extern void _memset_io(void __iomem *, int, size_t);
#define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l)
#define writeb(v,c) __raw_writeb(v,__mem_pci(c))
-#define writew(v,c) __raw_writew(cpu_to_le16(v),__mem_pci(c))
-#define writel(v,c) __raw_writel(cpu_to_le32(v),__mem_pci(c))
+#define writew(v,c) __raw_writew((__force __u16) \
+ cpu_to_le16(v),__mem_pci(c))
+#define writel(v,c) __raw_writel((__force __u32) \
+ cpu_to_le32(v),__mem_pci(c))
#define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l)
#define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l)
diff --git a/include/asm-arm/rtc.h b/include/asm-arm/rtc.h
index aa7e16b..370dfe7 100644
--- a/include/asm-arm/rtc.h
+++ b/include/asm-arm/rtc.h
@@ -18,9 +18,9 @@ struct rtc_ops {
void (*release)(void);
int (*ioctl)(unsigned int, unsigned long);
- void (*read_time)(struct rtc_time *);
+ int (*read_time)(struct rtc_time *);
int (*set_time)(struct rtc_time *);
- void (*read_alarm)(struct rtc_wkalrm *);
+ int (*read_alarm)(struct rtc_wkalrm *);
int (*set_alarm)(struct rtc_wkalrm *);
int (*proc)(char *buf);
};
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h
index b033e5f..b860dc3 100644
--- a/include/asm-arm/signal.h
+++ b/include/asm-arm/signal.h
@@ -114,18 +114,7 @@ typedef unsigned long sigset_t;
#define SIGSTKSZ 8192
#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE 0x80000000
-#define SA_SAMPLE_RANDOM 0x10000000
#define SA_IRQNOMASK 0x08000000
-#define SA_SHIRQ 0x04000000
#endif
#define SIG_BLOCK 0 /* for blocking signals */
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index a19ec09..ace2748 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -359,8 +359,7 @@
#define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
#define __ARM_NR_usr26 (__ARM_NR_BASE+3)
#define __ARM_NR_usr32 (__ARM_NR_BASE+4)
-
-#define __ARM_NR_set_tls (__ARM_NR_BASE+0x800)
+#define __ARM_NR_set_tls (__ARM_NR_BASE+5)
#define __sys2(x) #x
#define __sys1(x) __sys2(x)
diff --git a/include/asm-arm26/bug.h b/include/asm-arm26/bug.h
index 920b705..7177c73 100644
--- a/include/asm-arm26/bug.h
+++ b/include/asm-arm26/bug.h
@@ -3,6 +3,7 @@
#include <linux/config.h>
+#ifdef CONFIG_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
extern volatile void __bug(const char *file, int line, void *data);
/* give file/line information */
@@ -12,6 +13,8 @@ extern volatile void __bug(const char *file, int line, void *data);
#endif
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h
index 6f62e51..a1aacef 100644
--- a/include/asm-arm26/signal.h
+++ b/include/asm-arm26/signal.h
@@ -114,18 +114,7 @@ typedef unsigned long sigset_t;
#define SIGSTKSZ 8192
#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE 0x80000000
-#define SA_SAMPLE_RANDOM 0x10000000
#define SA_IRQNOMASK 0x08000000
-#define SA_SHIRQ 0x04000000
#endif
#define SIG_BLOCK 0 /* for blocking signals */
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h
index ddd8915..c767da1 100644
--- a/include/asm-cris/page.h
+++ b/include/asm-cris/page.h
@@ -77,10 +77,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
} while (0)
-#define PAGE_BUG(page) do { \
- BUG(); \
-} while (0)
-
/* Pure 2^n version of get_order */
static inline int get_order(unsigned long size)
{
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h
index 3f187ec..2330769 100644
--- a/include/asm-cris/signal.h
+++ b/include/asm-cris/signal.h
@@ -108,20 +108,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-frv/bug.h b/include/asm-frv/bug.h
index 011860b..074c0d5 100644
--- a/include/asm-frv/bug.h
+++ b/include/asm-frv/bug.h
@@ -13,6 +13,7 @@
#include <linux/config.h>
+#ifdef CONFIG_BUG
/*
* Tell the user there is some problem.
*/
@@ -45,6 +46,7 @@ do { \
#define HAVE_ARCH_KGDB_BAD_PAGE
#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
#endif
+#endif
#include <asm-generic/bug.h>
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h
index 3c6d42a..d0a9c2f 100644
--- a/include/asm-frv/pgtable.h
+++ b/include/asm-frv/pgtable.h
@@ -349,9 +349,9 @@ static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address)
/*
* Define this to warn about kernel memory accesses that are
- * done without a 'verify_area(VERIFY_WRITE,..)'
+ * done without a 'access_ok(VERIFY_WRITE,..)'
*/
-#undef TEST_VERIFY_AREA
+#undef TEST_ACCESS_OK
#define pte_present(x) (pte_val(x) & _PAGE_PRESENT)
#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h
index f18952f..c930bb1 100644
--- a/include/asm-frv/signal.h
+++ b/include/asm-frv/signal.h
@@ -107,20 +107,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index e5913c3..400c2b4 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -4,6 +4,7 @@
#include <linux/compiler.h>
#include <linux/config.h>
+#ifdef CONFIG_BUG
#ifndef HAVE_ARCH_BUG
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
@@ -11,13 +12,6 @@
} while (0)
#endif
-#ifndef HAVE_ARCH_PAGE_BUG
-#define PAGE_BUG(page) do { \
- printk("page BUG for page at %p\n", page); \
- BUG(); \
-} while (0)
-#endif
-
#ifndef HAVE_ARCH_BUG_ON
#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
#endif
@@ -31,4 +25,18 @@
} while (0)
#endif
+#else /* !CONFIG_BUG */
+#ifndef HAVE_ARCH_BUG
+#define BUG()
+#endif
+
+#ifndef HAVE_ARCH_BUG_ON
+#define BUG_ON(condition) do { if (condition) ; } while(0)
+#endif
+
+#ifndef HAVE_ARCH_WARN_ON
+#define WARN_ON(condition) do { if (condition) ; } while(0)
+#endif
+#endif
+
#endif
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h
index 4dd2384..e8852c0 100644
--- a/include/asm-generic/errno.h
+++ b/include/asm-generic/errno.h
@@ -102,4 +102,8 @@
#define EKEYREVOKED 128 /* Key has been revoked */
#define EKEYREJECTED 129 /* Key was rejected by service */
+/* for robust mutexes */
+#define EOWNERDEAD 130 /* Owner died */
+#define ENOTRECOVERABLE 131 /* State not recoverable */
+
#endif
diff --git a/include/asm-generic/resource.h b/include/asm-generic/resource.h
index b1fcda9..cfe3692 100644
--- a/include/asm-generic/resource.h
+++ b/include/asm-generic/resource.h
@@ -41,8 +41,11 @@
#define RLIMIT_LOCKS 10 /* maximum file locks held */
#define RLIMIT_SIGPENDING 11 /* max number of pending signals */
#define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */
+#define RLIMIT_NICE 13 /* max nice prio allowed to raise to
+ 0-39 for nice level 19 .. -20 */
+#define RLIMIT_RTPRIO 14 /* maximum realtime priority */
-#define RLIM_NLIMITS 13
+#define RLIM_NLIMITS 15
/*
* SuS says limits have to be unsigned.
@@ -81,6 +84,8 @@
[RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, \
[RLIMIT_SIGPENDING] = { 0, 0 }, \
[RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \
+ [RLIMIT_NICE] = { 0, 0 }, \
+ [RLIMIT_RTPRIO] = { 0, 0 }, \
}
#endif /* __KERNEL__ */
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
index 9cac8e8..8786e01 100644
--- a/include/asm-generic/siginfo.h
+++ b/include/asm-generic/siginfo.h
@@ -236,11 +236,18 @@ typedef struct siginfo {
#define SIGEV_THREAD 2 /* deliver via thread creation */
#define SIGEV_THREAD_ID 4 /* deliver to thread */
-#define SIGEV_MAX_SIZE 64
-#ifndef SIGEV_PAD_SIZE
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
+/*
+ * This works because the alignment is ok on all current architectures
+ * but we leave open this being overridden in the future
+ */
+#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
+#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
#endif
+#define SIGEV_MAX_SIZE 64
+#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \
+ / sizeof(int))
+
typedef struct sigevent {
sigval_t sigev_value;
int sigev_signo;
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h
index 3a08544..ac3e01bd 100644
--- a/include/asm-h8300/signal.h
+++ b/include/asm-h8300/signal.h
@@ -107,19 +107,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h
index e1de674..a5810cf 100644
--- a/include/asm-i386/apic.h
+++ b/include/asm-i386/apic.h
@@ -109,7 +109,6 @@ extern int APIC_init_uniprocessor (void);
extern void disable_APIC_timer(void);
extern void enable_APIC_timer(void);
-extern int check_nmi_watchdog (void);
extern void enable_NMI_through_LVT0 (void * dummy);
extern unsigned int nmi_watchdog;
diff --git a/include/asm-i386/bug.h b/include/asm-i386/bug.h
index 706eb51..8f79de1 100644
--- a/include/asm-i386/bug.h
+++ b/include/asm-i386/bug.h
@@ -9,6 +9,8 @@
* undefined" opcode for parsing in the trap handler.
*/
+#ifdef CONFIG_BUG
+#define HAVE_ARCH_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
#define BUG() \
__asm__ __volatile__( "ud2\n" \
@@ -18,8 +20,7 @@
#else
#define BUG() __asm__ __volatile__("ud2\n")
#endif
+#endif
-#define HAVE_ARCH_BUG
#include <asm-generic/bug.h>
-
#endif
diff --git a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h
index d76a5f0..6413420 100644
--- a/include/asm-i386/checksum.h
+++ b/include/asm-i386/checksum.h
@@ -33,7 +33,7 @@ asmlinkage unsigned int csum_partial_copy_generic(const unsigned char *src, unsi
* passed in an incorrect kernel address to one of these functions.
*
* If you use these functions directly please don't forget the
- * verify_area().
+ * access_ok().
*/
static __inline__
unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst,
diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h
index e147cab..ff1187e 100644
--- a/include/asm-i386/cpufeature.h
+++ b/include/asm-i386/cpufeature.h
@@ -87,8 +87,8 @@
#define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */
/* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */
-#define X86_FEATURE_LAHF_LM (5*32+ 0) /* LAHF/SAHF in long mode */
-#define X86_FEATURE_CMP_LEGACY (5*32+ 1) /* If yes HyperThreading not valid */
+#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */
+#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */
#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability)
diff --git a/include/asm-i386/e820.h b/include/asm-i386/e820.h
index 5c285ae..edf65be 100644
--- a/include/asm-i386/e820.h
+++ b/include/asm-i386/e820.h
@@ -13,7 +13,7 @@
#define __E820_HEADER
#define E820MAP 0x2d0 /* our map */
-#define E820MAX 32 /* number of entries in E820MAP */
+#define E820MAX 128 /* number of entries in E820MAP */
#define E820NR 0x1e8 /* # entries in E820MAP */
#define E820_RAM 1
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h
index 6e20b07..16ef9f9 100644
--- a/include/asm-i386/hpet.h
+++ b/include/asm-i386/hpet.h
@@ -92,6 +92,7 @@
extern unsigned long hpet_tick; /* hpet clks count per tick */
extern unsigned long hpet_address; /* hpet memory map physical address */
+extern int hpet_use_timer;
extern int hpet_rtc_timer_init(void);
extern int hpet_enable(void);
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 5c72542..8d60c2b 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -193,9 +193,9 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
/*
* Define this if things work differently on an i386 and an i486:
* it will (on an i486) warn about kernel memory accesses that are
- * done without a 'verify_area(VERIFY_WRITE,..)'
+ * done without a 'access_ok(VERIFY_WRITE,..)'
*/
-#undef TEST_VERIFY_AREA
+#undef TEST_ACCESS_OK
/* The boot page tables (all created as a single array) */
extern unsigned long pg0[];
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h
index 8814b54..7a32184 100644
--- a/include/asm-i386/setup.h
+++ b/include/asm-i386/setup.h
@@ -16,7 +16,7 @@
#define MAXMEM_PFN PFN_DOWN(MAXMEM)
#define MAX_NONPAE_PFN (1 << 20)
-#define PARAM_SIZE 2048
+#define PARAM_SIZE 4096
#define COMMAND_LINE_SIZE 256
#define OLD_CL_MAGIC_ADDR 0x90020
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h
index 7ef343b..0f082bd 100644
--- a/include/asm-i386/signal.h
+++ b/include/asm-i386/signal.h
@@ -110,20 +110,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h
index 1679983..6a78ac5 100644
--- a/include/asm-i386/string.h
+++ b/include/asm-i386/string.h
@@ -198,47 +198,80 @@ static inline void * __memcpy(void * to, const void * from, size_t n)
int d0, d1, d2;
__asm__ __volatile__(
"rep ; movsl\n\t"
- "testb $2,%b4\n\t"
- "je 1f\n\t"
- "movsw\n"
- "1:\ttestb $1,%b4\n\t"
- "je 2f\n\t"
- "movsb\n"
- "2:"
+ "movl %4,%%ecx\n\t"
+ "andl $3,%%ecx\n\t"
+#if 1 /* want to pay 2 byte penalty for a chance to skip microcoded rep? */
+ "jz 1f\n\t"
+#endif
+ "rep ; movsb\n\t"
+ "1:"
: "=&c" (d0), "=&D" (d1), "=&S" (d2)
- :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from)
+ : "0" (n/4), "g" (n), "1" ((long) to), "2" ((long) from)
: "memory");
return (to);
}
/*
- * This looks horribly ugly, but the compiler can optimize it totally,
+ * This looks ugly, but the compiler can optimize it totally,
* as the count is constant.
*/
static inline void * __constant_memcpy(void * to, const void * from, size_t n)
{
- if (n <= 128)
- return __builtin_memcpy(to, from, n);
-
-#define COMMON(x) \
-__asm__ __volatile__( \
- "rep ; movsl" \
- x \
- : "=&c" (d0), "=&D" (d1), "=&S" (d2) \
- : "0" (n/4),"1" ((long) to),"2" ((long) from) \
- : "memory");
-{
- int d0, d1, d2;
+ long esi, edi;
+ if (!n) return to;
+#if 1 /* want to do small copies with non-string ops? */
+ switch (n) {
+ case 1: *(char*)to = *(char*)from; return to;
+ case 2: *(short*)to = *(short*)from; return to;
+ case 4: *(int*)to = *(int*)from; return to;
+#if 1 /* including those doable with two moves? */
+ case 3: *(short*)to = *(short*)from;
+ *((char*)to+2) = *((char*)from+2); return to;
+ case 5: *(int*)to = *(int*)from;
+ *((char*)to+4) = *((char*)from+4); return to;
+ case 6: *(int*)to = *(int*)from;
+ *((short*)to+2) = *((short*)from+2); return to;
+ case 8: *(int*)to = *(int*)from;
+ *((int*)to+1) = *((int*)from+1); return to;
+#endif
+ }
+#endif
+ esi = (long) from;
+ edi = (long) to;
+ if (n >= 5*4) {
+ /* large block: use rep prefix */
+ int ecx;
+ __asm__ __volatile__(
+ "rep ; movsl"
+ : "=&c" (ecx), "=&D" (edi), "=&S" (esi)
+ : "0" (n/4), "1" (edi),"2" (esi)
+ : "memory"
+ );
+ } else {
+ /* small block: don't clobber ecx + smaller code */
+ if (n >= 4*4) __asm__ __volatile__("movsl"
+ :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
+ if (n >= 3*4) __asm__ __volatile__("movsl"
+ :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
+ if (n >= 2*4) __asm__ __volatile__("movsl"
+ :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
+ if (n >= 1*4) __asm__ __volatile__("movsl"
+ :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
+ }
switch (n % 4) {
- case 0: COMMON(""); return to;
- case 1: COMMON("\n\tmovsb"); return to;
- case 2: COMMON("\n\tmovsw"); return to;
- default: COMMON("\n\tmovsw\n\tmovsb"); return to;
+ /* tail */
+ case 0: return to;
+ case 1: __asm__ __volatile__("movsb"
+ :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
+ return to;
+ case 2: __asm__ __volatile__("movsw"
+ :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
+ return to;
+ default: __asm__ __volatile__("movsw\n\tmovsb"
+ :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
+ return to;
}
}
-
-#undef COMMON
-}
#define __HAVE_ARCH_MEMCPY
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h
index 6f74d4c..3db717a 100644
--- a/include/asm-i386/system.h
+++ b/include/asm-i386/system.h
@@ -81,7 +81,7 @@ static inline unsigned long _get_base(char * addr)
#define loadsegment(seg,value) \
asm volatile("\n" \
"1:\t" \
- "movl %0,%%" #seg "\n" \
+ "mov %0,%%" #seg "\n" \
"2:\n" \
".section .fixup,\"ax\"\n" \
"3:\t" \
@@ -93,13 +93,13 @@ static inline unsigned long _get_base(char * addr)
".align 4\n\t" \
".long 1b,3b\n" \
".previous" \
- : :"m" (*(unsigned int *)&(value)))
+ : :"m" (value))
/*
* Save a segment register away
*/
#define savesegment(seg, value) \
- asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
+ asm volatile("mov %%" #seg ",%0":"=m" (value))
/*
* Clear and set 'TS' bit respectively
diff --git a/include/asm-ia64/bug.h b/include/asm-ia64/bug.h
index 2c0cd51..3aa0a0a 100644
--- a/include/asm-ia64/bug.h
+++ b/include/asm-ia64/bug.h
@@ -1,6 +1,7 @@
#ifndef _ASM_IA64_BUG_H
#define _ASM_IA64_BUG_H
+#ifdef CONFIG_BUG
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define ia64_abort() __builtin_trap()
#else
@@ -8,8 +9,10 @@
#endif
#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0)
-/* should this BUG should be made generic? */
+/* should this BUG be made generic? */
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-ia64/siginfo.h b/include/asm-ia64/siginfo.h
index d55f139..9294e4b 100644
--- a/include/asm-ia64/siginfo.h
+++ b/include/asm-ia64/siginfo.h
@@ -8,9 +8,7 @@
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
*/
-#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 4)
-
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
+#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_COPY_SIGINFO
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h
index 660a759..85a577a 100644
--- a/include/asm-ia64/signal.h
+++ b/include/asm-ia64/signal.h
@@ -114,16 +114,6 @@
#define _NSIG_BPW 64
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
#define SA_PERCPU_IRQ 0x02000000
#endif /* __KERNEL__ */
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h
index ce46eae..6e55fd4 100644
--- a/include/asm-m32r/signal.h
+++ b/include/asm-m32r/signal.h
@@ -114,20 +114,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-m68k/bug.h b/include/asm-m68k/bug.h
index 3e1d226..072ce27 100644
--- a/include/asm-m68k/bug.h
+++ b/include/asm-m68k/bug.h
@@ -3,6 +3,7 @@
#include <linux/config.h>
+#ifdef CONFIG_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
#ifndef CONFIG_SUN3
#define BUG() do { \
@@ -22,6 +23,8 @@
#endif
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h
index 6681bb6..1d016e9 100644
--- a/include/asm-m68k/signal.h
+++ b/include/asm-m68k/signal.h
@@ -105,19 +105,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-m68knommu/MC68328.h b/include/asm-m68knommu/MC68328.h
index 4f5a9845..a337e56 100644
--- a/include/asm-m68knommu/MC68328.h
+++ b/include/asm-m68knommu/MC68328.h
@@ -993,7 +993,7 @@ typedef volatile struct {
volatile unsigned short int pad1;
volatile unsigned short int pad2;
volatile unsigned short int pad3;
-} m68328_uart __attribute__((packed));
+} __attribute__((packed)) m68328_uart;
/**********
diff --git a/include/asm-m68knommu/MC68EZ328.h b/include/asm-m68knommu/MC68EZ328.h
index 801933d..69b7f91 100644
--- a/include/asm-m68knommu/MC68EZ328.h
+++ b/include/asm-m68knommu/MC68EZ328.h
@@ -815,7 +815,7 @@ typedef volatile struct {
volatile unsigned short int nipr;
volatile unsigned short int pad1;
volatile unsigned short int pad2;
-} m68328_uart __attribute__((packed));
+} __attribute__((packed)) m68328_uart;
/**********
diff --git a/include/asm-m68knommu/MC68VZ328.h b/include/asm-m68knommu/MC68VZ328.h
index df74322..2b9bf62 100644
--- a/include/asm-m68knommu/MC68VZ328.h
+++ b/include/asm-m68knommu/MC68VZ328.h
@@ -909,7 +909,7 @@ typedef struct {
volatile unsigned short int nipr;
volatile unsigned short int hmark;
volatile unsigned short int unused;
-} m68328_uart __attribute__((packed));
+} __attribute__((packed)) m68328_uart;
diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h
index 486cbb0..37c9c8a 100644
--- a/include/asm-m68knommu/signal.h
+++ b/include/asm-m68knommu/signal.h
@@ -105,19 +105,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-mips/bug.h b/include/asm-mips/bug.h
index eb94bb9..3f594b4 100644
--- a/include/asm-mips/bug.h
+++ b/include/asm-mips/bug.h
@@ -3,12 +3,14 @@
#include <asm/break.h>
+#ifdef CONFIG_BUG
+#define HAVE_ARCH_BUG
#define BUG() \
do { \
__asm__ __volatile__("break %0" : : "i" (BRK_BUG)); \
} while (0)
+#endif
-#define HAVE_ARCH_BUG
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-mips/errno.h b/include/asm-mips/errno.h
index 2b458f9..3c0d840 100644
--- a/include/asm-mips/errno.h
+++ b/include/asm-mips/errno.h
@@ -115,6 +115,10 @@
#define EKEYREVOKED 163 /* Key has been revoked */
#define EKEYREJECTED 164 /* Key was rejected by service */
+/* for robust mutexes */
+#define EOWNERDEAD 165 /* Owner died */
+#define ENOTRECOVERABLE 166 /* State not recoverable */
+
#define EDQUOT 1133 /* Quota exceeded */
#ifdef __KERNEL__
diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h
index 8ddd3c9..a0e26e6 100644
--- a/include/asm-mips/siginfo.h
+++ b/include/asm-mips/siginfo.h
@@ -11,8 +11,6 @@
#include <linux/config.h>
-#define SIGEV_HEAD_SIZE (sizeof(long) + 2*sizeof(int))
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE-SIGEV_HEAD_SIZE) / sizeof(int))
#undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */
#define HAVE_ARCH_SIGINFO_T
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h
index 994987d..d813567 100644
--- a/include/asm-mips/signal.h
+++ b/include/asm-mips/signal.h
@@ -98,21 +98,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x02000000
-
-#endif /* __KERNEL__ */
-
#define SIG_BLOCK 1 /* for blocking signals */
#define SIG_UNBLOCK 2 /* for unblocking signals */
#define SIG_SETMASK 3 /* for setting the signal mask */
diff --git a/include/asm-parisc/bug.h b/include/asm-parisc/bug.h
index e72f6e2..695588d 100644
--- a/include/asm-parisc/bug.h
+++ b/include/asm-parisc/bug.h
@@ -1,12 +1,14 @@
#ifndef _PARISC_BUG_H
#define _PARISC_BUG_H
+#ifdef CONFIG_BUG
#define HAVE_ARCH_BUG
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
dump_stack(); \
panic("BUG!"); \
} while (0)
+#endif
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-parisc/errno.h b/include/asm-parisc/errno.h
index a10f109..08464c4 100644
--- a/include/asm-parisc/errno.h
+++ b/include/asm-parisc/errno.h
@@ -115,5 +115,9 @@
#define ENOTSUP 252 /* Function not implemented (POSIX.4 / HPUX) */
#define ECANCELLED 253 /* aio request was canceled before complete (POSIX.4 / HPUX) */
+/* for robust mutexes */
+#define EOWNERDEAD 254 /* Owner died */
+#define ENOTRECOVERABLE 255 /* State not recoverable */
+
#endif
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h
index 358f577..25cb23e 100644
--- a/include/asm-parisc/signal.h
+++ b/include/asm-parisc/signal.h
@@ -89,17 +89,6 @@
#define _NSIG_BPW BITS_PER_LONG
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-
#endif /* __KERNEL__ */
#define SIG_BLOCK 0 /* for blocking signals */
diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h
index 8a08423..c1b5bde 100644
--- a/include/asm-parisc/uaccess.h
+++ b/include/asm-parisc/uaccess.h
@@ -24,7 +24,7 @@
/*
* Note that since kernel addresses are in a separate address space on
- * parisc, we don't need to do anything for access_ok() or verify_area().
+ * parisc, we don't need to do anything for access_ok().
* We just let the page fault handler do the right thing. This also means
* that put_user is the same as __put_user, etc.
*/
diff --git a/include/asm-ppc/bug.h b/include/asm-ppc/bug.h
index e99c6cb..8b34fd6 100644
--- a/include/asm-ppc/bug.h
+++ b/include/asm-ppc/bug.h
@@ -14,6 +14,7 @@ struct bug_entry {
*/
#define BUG_WARNING_TRAP 0x1000000
+#ifdef CONFIG_BUG
#define BUG() do { \
__asm__ __volatile__( \
"1: twi 31,0,0\n" \
@@ -50,6 +51,8 @@ struct bug_entry {
#define HAVE_ARCH_BUG
#define HAVE_ARCH_BUG_ON
#define HAVE_ARCH_WARN_ON
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-ppc/pmac_feature.h b/include/asm-ppc/pmac_feature.h
index 639b690..8beb162 100644
--- a/include/asm-ppc/pmac_feature.h
+++ b/include/asm-ppc/pmac_feature.h
@@ -316,6 +316,9 @@ extern void pmac_register_agp_pm(struct pci_dev *bridge,
extern void pmac_suspend_agp_for_card(struct pci_dev *dev);
extern void pmac_resume_agp_for_card(struct pci_dev *dev);
+/* Used by the via-pmu driver for suspend/resume
+ */
+extern void pmac_tweak_clock_spreading(int enable);
/*
* The part below is for use by macio_asic.c only, do not rely
diff --git a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h
index e70c25f..45c5e6f 100644
--- a/include/asm-ppc/reg_booke.h
+++ b/include/asm-ppc/reg_booke.h
@@ -305,6 +305,7 @@ do { \
#define ESR_PIL 0x08000000 /* Program Exception - Illegal */
#define ESR_PPR 0x04000000 /* Program Exception - Priveleged */
#define ESR_PTR 0x02000000 /* Program Exception - Trap */
+#define ESR_FP 0x01000000 /* Floating Point Operation */
#define ESR_DST 0x00800000 /* Storage Exception - Data miss */
#define ESR_DIZ 0x00400000 /* Storage Exception - Zone fault */
#define ESR_ST 0x00800000 /* Store Operation */
diff --git a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h
index 8cc8b88..d890dab 100644
--- a/include/asm-ppc/signal.h
+++ b/include/asm-ppc/signal.h
@@ -99,19 +99,6 @@ typedef struct {
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif /* __KERNEL__ */
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
diff --git a/include/asm-ppc64/a.out.h b/include/asm-ppc64/a.out.h
index 802338e..3871e25 100644
--- a/include/asm-ppc64/a.out.h
+++ b/include/asm-ppc64/a.out.h
@@ -1,8 +1,6 @@
#ifndef __PPC64_A_OUT_H__
#define __PPC64_A_OUT_H__
-#include <asm/ppcdebug.h>
-
/*
* c 2001 PPC 64 Team, IBM Corp
*
diff --git a/include/asm-ppc64/bug.h b/include/asm-ppc64/bug.h
index db31dd2..169868f 100644
--- a/include/asm-ppc64/bug.h
+++ b/include/asm-ppc64/bug.h
@@ -26,6 +26,8 @@ struct bug_entry *find_bug(unsigned long bugaddr);
*/
#define BUG_WARNING_TRAP 0x1000000
+#ifdef CONFIG_BUG
+
#define BUG() do { \
__asm__ __volatile__( \
"1: twi 31,0,0\n" \
@@ -55,11 +57,12 @@ struct bug_entry *find_bug(unsigned long bugaddr);
"i" (__FILE__), "i" (__FUNCTION__)); \
} while (0)
-#endif
-
#define HAVE_ARCH_BUG
#define HAVE_ARCH_BUG_ON
#define HAVE_ARCH_WARN_ON
+#endif
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h
index 8457d90..6c42d61 100644
--- a/include/asm-ppc64/elf.h
+++ b/include/asm-ppc64/elf.h
@@ -229,9 +229,13 @@ do { \
/*
* An executable for which elf_read_implies_exec() returns TRUE will
- * have the READ_IMPLIES_EXEC personality flag set automatically.
+ * have the READ_IMPLIES_EXEC personality flag set automatically. This
+ * is only required to work around bugs in old 32bit toolchains. Since
+ * the 64bit ABI has never had these issues dont enable the workaround
+ * even if we have an executable stack.
*/
-#define elf_read_implies_exec(ex, exec_stk) (exec_stk != EXSTACK_DISABLE_X)
+#define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \
+ (exec_stk != EXSTACK_DISABLE_X) : 0)
#endif
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h
index 20e0f19..8621957 100644
--- a/include/asm-ppc64/page.h
+++ b/include/asm-ppc64/page.h
@@ -252,10 +252,19 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */
/*
* This is the default if a program doesn't have a PT_GNU_STACK
- * program header entry.
+ * program header entry. The PPC64 ELF ABI has a non executable stack
+ * stack by default, so in the absense of a PT_GNU_STACK program header
+ * we turn execute permission off.
*/
-#define VM_STACK_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+#define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
+ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+#define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
+ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+#define VM_STACK_DEFAULT_FLAGS \
+ (test_thread_flag(TIF_32BIT) ? \
+ VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
#endif /* __KERNEL__ */
#endif /* _PPC64_PAGE_H */
diff --git a/include/asm-ppc64/pgalloc.h b/include/asm-ppc64/pgalloc.h
index 16232d7..4fc4b73 100644
--- a/include/asm-ppc64/pgalloc.h
+++ b/include/asm-ppc64/pgalloc.h
@@ -27,7 +27,7 @@ pgd_free(pgd_t *pgd)
kmem_cache_free(zero_cache, pgd);
}
-#define pgd_populate(MM, PGD, PMD) pgd_set(PGD, PMD)
+#define pud_populate(MM, PUD, PMD) pud_set(PUD, PMD)
static inline pmd_t *
pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h
index a261205..b984e27 100644
--- a/include/asm-ppc64/pgtable.h
+++ b/include/asm-ppc64/pgtable.h
@@ -1,8 +1,6 @@
#ifndef _PPC64_PGTABLE_H
#define _PPC64_PGTABLE_H
-#include <asm-generic/4level-fixup.h>
-
/*
* This file contains the functions and defines necessary to modify and use
* the ppc64 hashed page table.
@@ -17,6 +15,8 @@
#include <asm/tlbflush.h>
#endif /* __ASSEMBLY__ */
+#include <asm-generic/pgtable-nopud.h>
+
/* PMD_SHIFT determines what a second-level page table entry can map */
#define PMD_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3)
#define PMD_SIZE (1UL << PMD_SHIFT)
@@ -228,12 +228,13 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm);
#define pmd_page_kernel(pmd) \
(__bpn_to_ba(pmd_val(pmd) >> PMD_TO_PTEPAGE_SHIFT))
#define pmd_page(pmd) virt_to_page(pmd_page_kernel(pmd))
-#define pgd_set(pgdp, pmdp) (pgd_val(*(pgdp)) = (__ba_to_bpn(pmdp)))
-#define pgd_none(pgd) (!pgd_val(pgd))
-#define pgd_bad(pgd) ((pgd_val(pgd)) == 0)
-#define pgd_present(pgd) (pgd_val(pgd) != 0UL)
-#define pgd_clear(pgdp) (pgd_val(*(pgdp)) = 0UL)
-#define pgd_page(pgd) (__bpn_to_ba(pgd_val(pgd)))
+
+#define pud_set(pudp, pmdp) (pud_val(*(pudp)) = (__ba_to_bpn(pmdp)))
+#define pud_none(pud) (!pud_val(pud))
+#define pud_bad(pud) ((pud_val(pud)) == 0UL)
+#define pud_present(pud) (pud_val(pud) != 0UL)
+#define pud_clear(pudp) (pud_val(*(pudp)) = 0UL)
+#define pud_page(pud) (__bpn_to_ba(pud_val(pud)))
/*
* Find an entry in a page-table-directory. We combine the address region
@@ -245,12 +246,13 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm);
#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
/* Find an entry in the second-level page table.. */
-#define pmd_offset(dir,addr) \
- ((pmd_t *) pgd_page(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
+#define pmd_offset(pudp,addr) \
+ ((pmd_t *) pud_page(*(pudp)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
/* Find an entry in the third-level page table.. */
#define pte_offset_kernel(dir,addr) \
- ((pte_t *) pmd_page_kernel(*(dir)) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
+ ((pte_t *) pmd_page_kernel(*(dir)) \
+ + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
#define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr))
#define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir), (addr))
@@ -582,19 +584,22 @@ extern long native_hpte_insert(unsigned long hpte_group, unsigned long va,
static inline pte_t *find_linux_pte(pgd_t *pgdir, unsigned long ea)
{
pgd_t *pg;
+ pud_t *pu;
pmd_t *pm;
pte_t *pt = NULL;
pte_t pte;
pg = pgdir + pgd_index(ea);
if (!pgd_none(*pg)) {
-
- pm = pmd_offset(pg, ea);
- if (pmd_present(*pm)) {
- pt = pte_offset_kernel(pm, ea);
- pte = *pt;
- if (!pte_present(pte))
- pt = NULL;
+ pu = pud_offset(pg, ea);
+ if (!pud_none(*pu)) {
+ pm = pmd_offset(pu, ea);
+ if (pmd_present(*pm)) {
+ pt = pte_offset_kernel(pm, ea);
+ pte = *pt;
+ if (!pte_present(pte))
+ pt = NULL;
+ }
}
}
diff --git a/include/asm-ppc64/signal.h b/include/asm-ppc64/signal.h
index fe5401a..a2d7bbb 100644
--- a/include/asm-ppc64/signal.h
+++ b/include/asm-ppc64/signal.h
@@ -96,19 +96,6 @@ typedef struct {
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
diff --git a/include/asm-ppc64/spinlock.h b/include/asm-ppc64/spinlock.h
index a9b2a11..acd1156 100644
--- a/include/asm-ppc64/spinlock.h
+++ b/include/asm-ppc64/spinlock.h
@@ -110,7 +110,7 @@ static void __inline__ _raw_spin_lock(spinlock_t *lock)
HMT_low();
if (SHARED_PROCESSOR)
__spin_yield(lock);
- } while (likely(lock->lock != 0));
+ } while (unlikely(lock->lock != 0));
HMT_medium();
}
}
@@ -128,7 +128,7 @@ static void __inline__ _raw_spin_lock_flags(spinlock_t *lock, unsigned long flag
HMT_low();
if (SHARED_PROCESSOR)
__spin_yield(lock);
- } while (likely(lock->lock != 0));
+ } while (unlikely(lock->lock != 0));
HMT_medium();
local_irq_restore(flags_dis);
}
@@ -194,7 +194,7 @@ static void __inline__ _raw_read_lock(rwlock_t *rw)
HMT_low();
if (SHARED_PROCESSOR)
__rw_yield(rw);
- } while (likely(rw->lock < 0));
+ } while (unlikely(rw->lock < 0));
HMT_medium();
}
}
@@ -251,7 +251,7 @@ static void __inline__ _raw_write_lock(rwlock_t *rw)
HMT_low();
if (SHARED_PROCESSOR)
__rw_yield(rw);
- } while (likely(rw->lock != 0));
+ } while (unlikely(rw->lock != 0));
HMT_medium();
}
}
diff --git a/include/asm-s390/bug.h b/include/asm-s390/bug.h
index 2b8d6d4..a2e7430 100644
--- a/include/asm-s390/bug.h
+++ b/include/asm-s390/bug.h
@@ -3,12 +3,15 @@
#include <linux/kernel.h>
+#ifdef CONFIG_BUG
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
__asm__ __volatile__(".long 0"); \
} while (0)
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h
index 1bfe2bd..dae1dd4 100644
--- a/include/asm-s390/cmb.h
+++ b/include/asm-s390/cmb.h
@@ -52,7 +52,7 @@ struct cmbdata {
#define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata)
#ifdef __KERNEL__
-
+struct ccw_device;
/**
* enable_cmf() - switch on the channel measurement for a specific device
* @cdev: The ccw device to be enabled
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h
index 28ef235..6bbcdea 100644
--- a/include/asm-s390/debug.h
+++ b/include/asm-s390/debug.h
@@ -43,7 +43,7 @@ struct __debug_entry{
#define DEBUG_OFF_LEVEL -1 /* level where debug is switched off */
#define DEBUG_FLUSH_ALL -1 /* parameter to flush all areas */
#define DEBUG_MAX_VIEWS 10 /* max number of views in proc fs */
-#define DEBUG_MAX_PROCF_LEN 16 /* max length for a proc file name */
+#define DEBUG_MAX_PROCF_LEN 64 /* max length for a proc file name */
#define DEBUG_DEFAULT_LEVEL 3 /* initial debug level */
#define DEBUG_DIR_ROOT "s390dbf" /* name of debug root directory in proc fs */
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h
index 614e2a9..2be287b 100644
--- a/include/asm-s390/page.h
+++ b/include/asm-s390/page.h
@@ -16,6 +16,8 @@
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
+#define PAGE_DEFAULT_ACC 0
+#define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4)
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h
index 88c272c..fb46e90 100644
--- a/include/asm-s390/processor.h
+++ b/include/asm-s390/processor.h
@@ -245,7 +245,7 @@ static inline void enabled_wait(void)
psw_t wait_psw;
wait_psw.mask = PSW_BASE_BITS | PSW_MASK_IO | PSW_MASK_EXT |
- PSW_MASK_MCHECK | PSW_MASK_WAIT;
+ PSW_MASK_MCHECK | PSW_MASK_WAIT | PSW_DEFAULT_KEY;
#ifndef __s390x__
asm volatile (
" basr %0,0\n"
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h
index 1dc8066..4eff8f2 100644
--- a/include/asm-s390/ptrace.h
+++ b/include/asm-s390/ptrace.h
@@ -185,6 +185,7 @@
#include <linux/stddef.h>
#include <linux/types.h>
#include <asm/setup.h>
+#include <asm/page.h>
typedef union
{
@@ -235,6 +236,7 @@ typedef struct
#define PSW_ADDR_INSN 0x7FFFFFFFUL
#define PSW_BASE_BITS 0x00080000UL
+#define PSW_DEFAULT_KEY (((unsigned long) PAGE_DEFAULT_ACC) << 20)
#define PSW_ASC_PRIMARY 0x00000000UL
#define PSW_ASC_ACCREG 0x00004000UL
@@ -260,6 +262,7 @@ typedef struct
#define PSW_BASE_BITS 0x0000000180000000UL
#define PSW_BASE32_BITS 0x0000000080000000UL
+#define PSW_DEFAULT_KEY (((unsigned long) PAGE_DEFAULT_ACC) << 52)
#define PSW_ASC_PRIMARY 0x0000000000000000UL
#define PSW_ASC_ACCREG 0x0000400000000000UL
@@ -268,14 +271,15 @@ typedef struct
#define PSW_USER32_BITS (PSW_BASE32_BITS | PSW_MASK_DAT | PSW_ASC_HOME | \
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK | \
- PSW_MASK_PSTATE)
+ PSW_MASK_PSTATE | PSW_DEFAULT_KEY)
#endif /* __s390x__ */
-#define PSW_KERNEL_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY)
+#define PSW_KERNEL_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY | \
+ PSW_DEFAULT_KEY)
#define PSW_USER_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_HOME | \
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK | \
- PSW_MASK_PSTATE)
+ PSW_MASK_PSTATE | PSW_DEFAULT_KEY)
/* This macro merges a NEW PSW mask specified by the user into
the currently active PSW mask CURRENT, modifying only those
@@ -470,6 +474,12 @@ struct user_regs_struct
extern void show_regs(struct pt_regs * regs);
#endif
+static inline void
+psw_set_key(unsigned int key)
+{
+ asm volatile ( "spka 0(%0)" : : "d" (key) );
+}
+
#endif /* __ASSEMBLY__ */
#endif /* _S390_PTRACE_H */
diff --git a/include/asm-s390/siginfo.h b/include/asm-s390/siginfo.h
index 7230353..e0ff1ab 100644
--- a/include/asm-s390/siginfo.h
+++ b/include/asm-s390/siginfo.h
@@ -13,12 +13,6 @@
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#endif
-#ifdef CONFIG_ARCH_S390X
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
-#else
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
-#endif
-
#include <asm-generic/siginfo.h>
#endif
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h
index f273cdc..bfed83a 100644
--- a/include/asm-s390/signal.h
+++ b/include/asm-s390/signal.h
@@ -117,20 +117,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-sh/bug.h b/include/asm-sh/bug.h
index 7017221..70508a3 100644
--- a/include/asm-sh/bug.h
+++ b/include/asm-sh/bug.h
@@ -3,6 +3,7 @@
#include <linux/config.h>
+#ifdef CONFIG_BUG
/*
* Tell the user there is some problem.
*/
@@ -12,6 +13,8 @@
} while (0)
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-sh/checksum.h b/include/asm-sh/checksum.h
index 5113c7f..5ebd0f2 100644
--- a/include/asm-sh/checksum.h
+++ b/include/asm-sh/checksum.h
@@ -42,7 +42,7 @@ asmlinkage unsigned int csum_partial_copy_generic(const unsigned char *src, unsi
* passed in an incorrect kernel address to one of these functions.
*
* If you use these functions directly please don't forget the
- * verify_area().
+ * access_ok().
*/
static __inline__
unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst,
diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h
index 0a7ff71..29f1ac1 100644
--- a/include/asm-sh/signal.h
+++ b/include/asm-sh/signal.h
@@ -108,20 +108,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h
index 3acd54d..5d659ec 100644
--- a/include/asm-sh64/bug.h
+++ b/include/asm-sh64/bug.h
@@ -17,10 +17,6 @@
BUG(); \
} while(0)
-#define PAGE_BUG(page) do { \
- BUG(); \
-} while (0)
-
#define WARN_ON(condition) do { \
if (unlikely((condition)!=0)) { \
printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
diff --git a/include/asm-sh64/checksum.h b/include/asm-sh64/checksum.h
index aa3911a..fd034e9 100644
--- a/include/asm-sh64/checksum.h
+++ b/include/asm-sh64/checksum.h
@@ -34,7 +34,7 @@ asmlinkage unsigned int csum_partial(const unsigned char *buff, int len,
* passed in an incorrect kernel address to one of these functions.
*
* If you use these functions directly please don't forget the
- * verify_area().
+ * access_ok().
*/
diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h
index 77957e9..864c94e 100644
--- a/include/asm-sh64/signal.h
+++ b/include/asm-sh64/signal.h
@@ -107,20 +107,6 @@ typedef struct {
#define MINSIGSTKSZ 2048
#define SIGSTKSZ THREAD_SIZE
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h
index 0d30a67..0415120 100644
--- a/include/asm-sparc/bug.h
+++ b/include/asm-sparc/bug.h
@@ -1,6 +1,7 @@
#ifndef _SPARC_BUG_H
#define _SPARC_BUG_H
+#ifdef CONFIG_BUG
/* Only use the inline asm until a gcc release that can handle __builtin_trap
* -rob 2003-06-25
*
@@ -26,6 +27,8 @@ extern void do_BUG(const char *file, int line);
#endif
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-sparc/errno.h b/include/asm-sparc/errno.h
index 8c01c5f3..ed41c8b 100644
--- a/include/asm-sparc/errno.h
+++ b/include/asm-sparc/errno.h
@@ -107,4 +107,8 @@
#define EKEYREVOKED 130 /* Key has been revoked */
#define EKEYREJECTED 131 /* Key was rejected by service */
+/* for robust mutexes */
+#define EOWNERDEAD 132 /* Owner died */
+#define ENOTRECOVERABLE 133 /* State not recoverable */
+
#endif
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h
index d8211cb..f792e10 100644
--- a/include/asm-sparc/signal.h
+++ b/include/asm-sparc/signal.h
@@ -143,7 +143,6 @@ struct sigstack {
#define SA_ONESHOT _SV_RESET
#define SA_INTERRUPT 0x10u
#define SA_NOMASK 0x20u
-#define SA_SHIRQ 0x40u
#define SA_NOCLDWAIT 0x100u
#define SA_SIGINFO 0x200u
@@ -162,11 +161,6 @@ struct sigstack {
#ifdef __KERNEL__
/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- *
* DJHR
* SA_STATIC_ALLOC is used for the SPARC system to indicate that this
* interrupt handler's irq structure should be statically allocated
@@ -177,8 +171,6 @@ struct sigstack {
* statically allocated data.. which is NOT GOOD.
*
*/
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
#define SA_STATIC_ALLOC 0x80
#endif
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h
index 3f47889..f461144 100644
--- a/include/asm-sparc/uaccess.h
+++ b/include/asm-sparc/uaccess.h
@@ -18,7 +18,7 @@
#ifndef __ASSEMBLY__
-/* Sparc is not segmented, however we need to be able to fool verify_area()
+/* Sparc is not segmented, however we need to be able to fool access_ok()
* when doing system calls from kernel mode legitimately.
*
* "For historical reasons, these macros are grossly misnamed." -Linus
diff --git a/include/asm-sparc64/bug.h b/include/asm-sparc64/bug.h
index 25c5b1d..516bb27 100644
--- a/include/asm-sparc64/bug.h
+++ b/include/asm-sparc64/bug.h
@@ -1,6 +1,7 @@
#ifndef _SPARC64_BUG_H
#define _SPARC64_BUG_H
+#ifdef CONFIG_BUG
#include <linux/compiler.h>
#ifdef CONFIG_DEBUG_BUGVERBOSE
@@ -14,6 +15,8 @@ extern void do_BUG(const char *file, int line);
#endif
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-sparc64/errno.h b/include/asm-sparc64/errno.h
index cc98a73..ea3509e 100644
--- a/include/asm-sparc64/errno.h
+++ b/include/asm-sparc64/errno.h
@@ -107,4 +107,8 @@
#define EKEYREVOKED 130 /* Key has been revoked */
#define EKEYREJECTED 131 /* Key was rejected by service */
+/* for robust mutexes */
+#define EOWNERDEAD 132 /* Owner died */
+#define ENOTRECOVERABLE 133 /* State not recoverable */
+
#endif /* !(_SPARC64_ERRNO_H) */
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
index 7160449..df17e47 100644
--- a/include/asm-sparc64/siginfo.h
+++ b/include/asm-sparc64/siginfo.h
@@ -3,8 +3,6 @@
#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
-
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#define __ARCH_SI_TRAPNO
#define __ARCH_SI_BAND_T int
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index 6428e36..466d021 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -145,7 +145,6 @@ struct sigstack {
#define SA_ONESHOT _SV_RESET
#define SA_INTERRUPT 0x10u
#define SA_NOMASK 0x20u
-#define SA_SHIRQ 0x40u
#define SA_NOCLDWAIT 0x100u
#define SA_SIGINFO 0x200u
@@ -165,11 +164,6 @@ struct sigstack {
#ifdef __KERNEL__
/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- *
* DJHR
* SA_STATIC_ALLOC is used for the SPARC system to indicate that this
* interrupt handler's irq structure should be statically allocated
@@ -180,8 +174,6 @@ struct sigstack {
* statically allocated data.. which is NOT GOOD.
*
*/
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
#define SA_STATIC_ALLOC 0x80
#endif
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S
index a3d6aab..1010153 100644
--- a/include/asm-um/common.lds.S
+++ b/include/asm-um/common.lds.S
@@ -8,11 +8,6 @@
_sdata = .;
PROVIDE (sdata = .);
- . = ALIGN(16); /* Exception table */
- __start___ex_table = .;
- __ex_table : { *(__ex_table) }
- __stop___ex_table = .;
-
RODATA
.unprotected : { *(.unprotected) }
@@ -20,6 +15,10 @@
PROVIDE (_unprotected_end = .);
. = ALIGN(4096);
+ __start___ex_table = .;
+ __ex_table : { *(__ex_table) }
+ __stop___ex_table = .;
+
__uml_setup_start = .;
.uml.setup.init : { *(.uml.setup.init) }
__uml_setup_end = .;
diff --git a/include/asm-um/elf.h b/include/asm-um/elf.h
index b3a7258..7908f8f 100644
--- a/include/asm-um/elf.h
+++ b/include/asm-um/elf.h
@@ -13,7 +13,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/page.h b/include/asm-um/page.h
index 3620a08..102eb3d 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -27,7 +27,7 @@ struct page;
#define clear_user_page(page, vaddr, pg) clear_page(page)
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
-#if defined(CONFIG_3_LEVEL_PGTABLES) && !defined(CONFIG_64_BIT)
+#if defined(CONFIG_3_LEVEL_PGTABLES) && !defined(CONFIG_64BIT)
typedef struct { unsigned long pte_low, pte_high; } pte_t;
typedef struct { unsigned long long pmd; } pmd_t;
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h
index bdbc3f9..d309f3a 100644
--- a/include/asm-um/pgtable-3level.h
+++ b/include/asm-um/pgtable-3level.h
@@ -145,7 +145,7 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot)
*/
#define PTE_FILE_MAX_BITS 32
-#ifdef CONFIG_64_BIT
+#ifdef CONFIG_64BIT
#define pte_to_pgoff(p) ((p).pte >> 32)
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h
index 038ba6f..b953b1a 100644
--- a/include/asm-um/processor-generic.h
+++ b/include/asm-um/processor-generic.h
@@ -17,6 +17,10 @@ struct task_struct;
struct mm_struct;
struct thread_struct {
+ /* This flag is set to 1 before calling do_fork (and analyzed in
+ * copy_thread) to mark that we are begin called from userspace (fork /
+ * vfork / clone), and reset to 0 after. It is left to 0 when called
+ * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */
int forking;
int nsyscalls;
struct pt_regs regs;
@@ -89,7 +93,11 @@ extern struct task_struct *alloc_task_struct(void);
extern void release_thread(struct task_struct *);
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
extern void dump_thread(struct pt_regs *regs, struct user *u);
-extern void prepare_to_copy(struct task_struct *tsk);
+
+static inline void prepare_to_copy(struct task_struct *tsk)
+{
+}
+
extern unsigned long thread_saved_pc(struct task_struct *t);
diff --git a/include/asm-v850/bug.h b/include/asm-v850/bug.h
index c778916..b0ed2d3 100644
--- a/include/asm-v850/bug.h
+++ b/include/asm-v850/bug.h
@@ -14,9 +14,12 @@
#ifndef __V850_BUG_H__
#define __V850_BUG_H__
+#ifdef CONFIG_BUG
extern void __bug (void) __attribute__ ((noreturn));
#define BUG() __bug()
#define HAVE_ARCH_BUG
+#endif
+
#include <asm-generic/bug.h>
#endif /* __V850_BUG_H__ */
diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h
index 407db87..ec3566c 100644
--- a/include/asm-v850/signal.h
+++ b/include/asm-v850/signal.h
@@ -110,21 +110,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-
-#ifdef __KERNEL__
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif /* __KERNEL__ */
-
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h
index c025cc3..e4b1017 100644
--- a/include/asm-x86_64/apic.h
+++ b/include/asm-x86_64/apic.h
@@ -99,7 +99,6 @@ extern void disable_APIC_timer(void);
extern void enable_APIC_timer(void);
extern void clustered_apic_check(void);
-extern int check_nmi_watchdog(void);
extern void nmi_watchdog_default(void);
extern int setup_nmi_watchdog(char *);
diff --git a/include/asm-x86_64/bootsetup.h b/include/asm-x86_64/bootsetup.h
index b570a48..b829f7b 100644
--- a/include/asm-x86_64/bootsetup.h
+++ b/include/asm-x86_64/bootsetup.h
@@ -2,7 +2,8 @@
#ifndef _X86_64_BOOTSETUP_H
#define _X86_64_BOOTSETUP_H 1
-extern char x86_boot_params[2048];
+#define BOOT_PARAM_SIZE 4096
+extern char x86_boot_params[BOOT_PARAM_SIZE];
/*
* This is set up by the setup-routine at boot-time
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h
index 19aed6e..bdbf66e 100644
--- a/include/asm-x86_64/bug.h
+++ b/include/asm-x86_64/bug.h
@@ -15,11 +15,13 @@ struct bug_frame {
unsigned short line;
} __attribute__((packed));
+#ifdef CONFIG_BUG
#define HAVE_ARCH_BUG
#define BUG() \
asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \
"i"(__LINE__), "i" (__stringify(__FILE__)))
void out_of_line_bug(void);
-#include <asm-generic/bug.h>
+#endif
+#include <asm-generic/bug.h>
#endif
diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h
index e68ad97..aea308c 100644
--- a/include/asm-x86_64/cpufeature.h
+++ b/include/asm-x86_64/cpufeature.h
@@ -7,7 +7,7 @@
#ifndef __ASM_X8664_CPUFEATURE_H
#define __ASM_X8664_CPUFEATURE_H
-#define NCAPINTS 6
+#define NCAPINTS 7 /* N 32-bit words worth of info */
/* Intel-defined CPU features, CPUID level 0x00000001, word 0 */
#define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */
@@ -74,9 +74,15 @@
#define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */
#define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */
-/* More extended AMD flags: CPUID level 0x80000001, ecx, word 5 */
-#define X86_FEATURE_LAHF_LM (5*32+ 0) /* LAHF/SAHF in long mode */
-#define X86_FEATURE_CMP_LEGACY (5*32+ 1) /* If yes HyperThreading not valid */
+/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
+#define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */
+#define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */
+#define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */
+#define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */
+
+/* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */
+#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */
+#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */
#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability)
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h
index 08f83a4..8e94edf 100644
--- a/include/asm-x86_64/e820.h
+++ b/include/asm-x86_64/e820.h
@@ -14,7 +14,7 @@
#include <linux/mmzone.h>
#define E820MAP 0x2d0 /* our map */
-#define E820MAX 32 /* number of entries in E820MAP */
+#define E820MAX 128 /* number of entries in E820MAP */
#define E820NR 0x1e8 /* # entries in E820MAP */
#define E820_RAM 1
diff --git a/include/asm-x86_64/siginfo.h b/include/asm-x86_64/siginfo.h
index 7bc1598..d09a1e6 100644
--- a/include/asm-x86_64/siginfo.h
+++ b/include/asm-x86_64/siginfo.h
@@ -3,8 +3,6 @@
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
-
#include <asm-generic/siginfo.h>
#endif
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h
index 643a20d..4987ad8 100644
--- a/include/asm-x86_64/signal.h
+++ b/include/asm-x86_64/signal.h
@@ -116,20 +116,6 @@ typedef unsigned long sigset_t;
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-#ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
-#define SA_SHIRQ 0x04000000
-#endif
-
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index 3d65d24..3c9af6f 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -76,7 +76,7 @@ __SYSCALL(__NR_madvise, sys_madvise)
#define __NR_shmget 29
__SYSCALL(__NR_shmget, sys_shmget)
#define __NR_shmat 30
-__SYSCALL(__NR_shmat, wrap_sys_shmat)
+__SYSCALL(__NR_shmat, sys_shmat)
#define __NR_shmctl 31
__SYSCALL(__NR_shmctl, sys_shmctl)
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h
index d1c7b0e..a1657fb 100644
--- a/include/linux/auto_fs4.h
+++ b/include/linux/auto_fs4.h
@@ -23,7 +23,7 @@
#define AUTOFS_MIN_PROTO_VERSION 3
#define AUTOFS_MAX_PROTO_VERSION 4
-#define AUTOFS_PROTO_SUBVERSION 5
+#define AUTOFS_PROTO_SUBVERSION 6
/* Mask for expire behaviour */
#define AUTOFS_EXP_IMMEDIATE 1
diff --git a/include/linux/compiler-gcc2.h b/include/linux/compiler-gcc2.h
index 5a35915..ebed1766 100644
--- a/include/linux/compiler-gcc2.h
+++ b/include/linux/compiler-gcc2.h
@@ -22,3 +22,8 @@
# define __attribute_pure__ __attribute__((pure))
# define __attribute_const__ __attribute__((__const__))
#endif
+
+/* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's
+ * define both va_copy and __va_copy, but the latter may go away, so limit this
+ * to this header */
+#define va_copy __va_copy
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 487725c..d737821 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -90,6 +90,12 @@ extern void __chk_io_ptr(void __iomem *);
# define __deprecated /* unimplemented */
#endif
+#ifdef MODULE
+#define __deprecated_for_modules __deprecated
+#else
+#define __deprecated_for_modules
+#endif
+
#ifndef __must_check
#define __must_check
#endif
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 910eca3..f21af06 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -103,6 +103,7 @@ struct cpufreq_policy {
#define CPUFREQ_PRECHANGE (0)
#define CPUFREQ_POSTCHANGE (1)
#define CPUFREQ_RESUMECHANGE (8)
+#define CPUFREQ_SUSPENDCHANGE (9)
struct cpufreq_freqs {
unsigned int cpu; /* cpu nr */
@@ -200,6 +201,7 @@ struct cpufreq_driver {
/* optional */
int (*exit) (struct cpufreq_policy *policy);
+ int (*suspend) (struct cpufreq_policy *policy, u32 state);
int (*resume) (struct cpufreq_policy *policy);
struct freq_attr **attr;
};
@@ -211,7 +213,8 @@ struct cpufreq_driver {
#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel
* "constants" aren't affected by
* frequency transitions */
-
+#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
+ * mismatches */
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
diff --git a/include/linux/edd.h b/include/linux/edd.h
index c6e6747..162512b 100644
--- a/include/linux/edd.h
+++ b/include/linux/edd.h
@@ -32,7 +32,7 @@
#define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF
in boot_params - treat this as 1 byte */
-#define EDDBUF 0x600 /* addr of edd_info structs in boot_params */
+#define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */
#define EDDMAXNR 6 /* number of edd_info structs starting at EDDBUF */
#define EDDEXTSIZE 8 /* change these if you muck with the structures */
#define EDDPARMSIZE 74
diff --git a/include/linux/fb.h b/include/linux/fb.h
index b45d3e2..b468bf4 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -563,6 +563,9 @@ struct fb_ops {
int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp, struct fb_info *info);
+ /* set color registers in batch */
+ int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
+
/* blank display */
int (*fb_blank)(int blank, struct fb_info *info);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 5df687d..4edba06 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1053,83 +1053,87 @@ static inline void file_accessed(struct file *file)
int sync_inode(struct inode *inode, struct writeback_control *wbc);
/**
- * &export_operations - for nfsd to communicate with file systems
- * decode_fh: decode a file handle fragment and return a &struct dentry
- * encode_fh: encode a file handle fragment from a dentry
- * get_name: find the name for a given inode in a given directory
- * get_parent: find the parent of a given directory
- * get_dentry: find a dentry for the inode given a file handle sub-fragment
+ * struct export_operations - for nfsd to communicate with file systems
+ * @decode_fh: decode a file handle fragment and return a &struct dentry
+ * @encode_fh: encode a file handle fragment from a dentry
+ * @get_name: find the name for a given inode in a given directory
+ * @get_parent: find the parent of a given directory
+ * @get_dentry: find a dentry for the inode given a file handle sub-fragment
*
* Description:
* The export_operations structure provides a means for nfsd to communicate
* with a particular exported file system - particularly enabling nfsd and
* the filesystem to co-operate when dealing with file handles.
*
- * export_operations contains two basic operation for dealing with file handles,
- * decode_fh() and encode_fh(), and allows for some other operations to be defined
- * which standard helper routines use to get specific information from the
- * filesystem.
+ * export_operations contains two basic operation for dealing with file
+ * handles, decode_fh() and encode_fh(), and allows for some other
+ * operations to be defined which standard helper routines use to get
+ * specific information from the filesystem.
*
* nfsd encodes information use to determine which filesystem a filehandle
- * applies to in the initial part of the file handle. The remainder, termed a
- * file handle fragment, is controlled completely by the filesystem.
- * The standard helper routines assume that this fragment will contain one or two
- * sub-fragments, one which identifies the file, and one which may be used to
- * identify the (a) directory containing the file.
+ * applies to in the initial part of the file handle. The remainder, termed
+ * a file handle fragment, is controlled completely by the filesystem. The
+ * standard helper routines assume that this fragment will contain one or
+ * two sub-fragments, one which identifies the file, and one which may be
+ * used to identify the (a) directory containing the file.
*
* In some situations, nfsd needs to get a dentry which is connected into a
- * specific part of the file tree. To allow for this, it passes the function
- * acceptable() together with a @context which can be used to see if the dentry
- * is acceptable. As there can be multiple dentrys for a given file, the filesystem
- * should check each one for acceptability before looking for the next. As soon
- * as an acceptable one is found, it should be returned.
+ * specific part of the file tree. To allow for this, it passes the
+ * function acceptable() together with a @context which can be used to see
+ * if the dentry is acceptable. As there can be multiple dentrys for a
+ * given file, the filesystem should check each one for acceptability before
+ * looking for the next. As soon as an acceptable one is found, it should
+ * be returned.
*
* decode_fh:
- * @decode_fh is given a &struct super_block (@sb), a file handle fragment (@fh, @fh_len)
- * and an acceptability testing function (@acceptable, @context). It should return
- * a &struct dentry which refers to the same file that the file handle fragment refers
- * to, and which passes the acceptability test. If it cannot, it should return
- * a %NULL pointer if the file was found but no acceptable &dentries were available, or
- * a %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or %ENOMEM).
+ * @decode_fh is given a &struct super_block (@sb), a file handle fragment
+ * (@fh, @fh_len) and an acceptability testing function (@acceptable,
+ * @context). It should return a &struct dentry which refers to the same
+ * file that the file handle fragment refers to, and which passes the
+ * acceptability test. If it cannot, it should return a %NULL pointer if
+ * the file was found but no acceptable &dentries were available, or a
+ * %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or
+ * %ENOMEM).
*
* encode_fh:
- * @encode_fh should store in the file handle fragment @fh (using at most @max_len bytes)
- * information that can be used by @decode_fh to recover the file refered to by the
- * &struct dentry @de. If the @connectable flag is set, the encode_fh() should store
- * sufficient information so that a good attempt can be made to find not only
- * the file but also it's place in the filesystem. This typically means storing
- * a reference to de->d_parent in the filehandle fragment.
- * encode_fh() should return the number of bytes stored or a negative error code
- * such as %-ENOSPC
+ * @encode_fh should store in the file handle fragment @fh (using at most
+ * @max_len bytes) information that can be used by @decode_fh to recover the
+ * file refered to by the &struct dentry @de. If the @connectable flag is
+ * set, the encode_fh() should store sufficient information so that a good
+ * attempt can be made to find not only the file but also it's place in the
+ * filesystem. This typically means storing a reference to de->d_parent in
+ * the filehandle fragment. encode_fh() should return the number of bytes
+ * stored or a negative error code such as %-ENOSPC
*
* get_name:
- * @get_name should find a name for the given @child in the given @parent directory.
- * The name should be stored in the @name (with the understanding that it is already
- * pointing to a a %NAME_MAX+1 sized buffer. get_name() should return %0 on success,
- * a negative error code or error.
- * @get_name will be called without @parent->i_sem held.
+ * @get_name should find a name for the given @child in the given @parent
+ * directory. The name should be stored in the @name (with the
+ * understanding that it is already pointing to a a %NAME_MAX+1 sized
+ * buffer. get_name() should return %0 on success, a negative error code
+ * or error. @get_name will be called without @parent->i_sem held.
*
* get_parent:
- * @get_parent should find the parent directory for the given @child which is also
- * a directory. In the event that it cannot be found, or storage space cannot be
- * allocated, a %ERR_PTR should be returned.
+ * @get_parent should find the parent directory for the given @child which
+ * is also a directory. In the event that it cannot be found, or storage
+ * space cannot be allocated, a %ERR_PTR should be returned.
*
* get_dentry:
- * Given a &super_block (@sb) and a pointer to a file-system specific inode identifier,
- * possibly an inode number, (@inump) get_dentry() should find the identified inode and
- * return a dentry for that inode.
- * Any suitable dentry can be returned including, if necessary, a new dentry created
- * with d_alloc_root. The caller can then find any other extant dentrys by following the
- * d_alias links. If a new dentry was created using d_alloc_root, DCACHE_NFSD_DISCONNECTED
- * should be set, and the dentry should be d_rehash()ed.
+ * Given a &super_block (@sb) and a pointer to a file-system specific inode
+ * identifier, possibly an inode number, (@inump) get_dentry() should find
+ * the identified inode and return a dentry for that inode. Any suitable
+ * dentry can be returned including, if necessary, a new dentry created with
+ * d_alloc_root. The caller can then find any other extant dentrys by
+ * following the d_alias links. If a new dentry was created using
+ * d_alloc_root, DCACHE_NFSD_DISCONNECTED should be set, and the dentry
+ * should be d_rehash()ed.
*
- * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code can be returned.
- * The @inump will be whatever was passed to nfsd_find_fh_dentry() in either the
- * @obj or @parent parameters.
+ * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code
+ * can be returned. The @inump will be whatever was passed to
+ * nfsd_find_fh_dentry() in either the @obj or @parent parameters.
*
* Locking rules:
- * get_parent is called with child->d_inode->i_sem down
- * get_name is not (which is possibly inconsistent)
+ * get_parent is called with child->d_inode->i_sem down
+ * get_name is not (which is possibly inconsistent)
*/
struct export_operations {
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 848a1ba..af7407e 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -38,14 +38,16 @@ struct vm_area_struct;
#define __GFP_NO_GROW 0x2000u /* Slab internal usage */
#define __GFP_COMP 0x4000u /* Add compound page metadata */
#define __GFP_ZERO 0x8000u /* Return zeroed page on success */
+#define __GFP_NOMEMALLOC 0x10000u /* Don't use emergency reserves */
-#define __GFP_BITS_SHIFT 16 /* Room for 16 __GFP_FOO bits */
+#define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */
#define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1)
/* if you forget to add the bitmask here kernel will crash, period */
#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
- __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP)
+ __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
+ __GFP_NOMEMALLOC)
#define GFP_ATOMIC (__GFP_HIGH)
#define GFP_NOIO (__GFP_WAIT)
diff --git a/include/linux/input.h b/include/linux/input.h
index b70df8f..72731d7 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -328,6 +328,11 @@ struct input_absinfo {
#define KEY_BRIGHTNESSUP 225
#define KEY_MEDIA 226
+#define KEY_SWITCHVIDEOMODE 227
+#define KEY_KBDILLUMTOGGLE 228
+#define KEY_KBDILLUMDOWN 229
+#define KEY_KBDILLUMUP 230
+
#define KEY_UNKNOWN 240
#define BTN_MISC 0x100
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 7c1cba4..e25b970 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -115,10 +115,19 @@ extern int __kernel_text_address(unsigned long addr);
extern int kernel_text_address(unsigned long addr);
extern int session_of_pgrp(int pgrp);
+#ifdef CONFIG_PRINTK
asmlinkage int vprintk(const char *fmt, va_list args)
__attribute__ ((format (printf, 1, 0)));
asmlinkage int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2)));
+#else
+static inline int vprintk(const char *s, va_list args)
+ __attribute__ ((format (printf, 1, 0)));
+static inline int vprintk(const char *s, va_list args) { return 0; }
+static inline int printk(const char *s, ...)
+ __attribute__ ((format (printf, 1, 2)));
+static inline int printk(const char *s, ...) { return 0; }
+#endif
unsigned long int_sqrt(unsigned long);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c74a74c..8b007ad 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -726,6 +726,7 @@ extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
unsigned long addr, unsigned long len, pgoff_t pgoff);
extern void exit_mmap(struct mm_struct *);
+extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
diff --git a/include/linux/net.h b/include/linux/net.h
index 7823b34..e5914c1 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -64,19 +64,19 @@ typedef enum {
#define SOCK_PASSCRED 3
#ifndef ARCH_HAS_SOCKET_TYPES
-/** sock_type - Socket types
- *
+/**
+ * enum sock_type - Socket types
+ * @SOCK_STREAM: stream (connection) socket
+ * @SOCK_DGRAM: datagram (conn.less) socket
+ * @SOCK_RAW: raw socket
+ * @SOCK_RDM: reliably-delivered message
+ * @SOCK_SEQPACKET: sequential packet socket
+ * @SOCK_PACKET: linux specific way of getting packets at the dev level.
+ * For writing rarp and other similar things on the user level.
+ *
* When adding some new socket type please
* grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS
* overrides this enum for binary compat reasons.
- *
- * @SOCK_STREAM - stream (connection) socket
- * @SOCK_DGRAM - datagram (conn.less) socket
- * @SOCK_RAW - raw socket
- * @SOCK_RDM - reliably-delivered message
- * @SOCK_SEQPACKET - sequential packet socket
- * @SOCK_PACKET - linux specific way of getting packets at the dev level.
- * For writing rarp and other similar things on the user level.
*/
enum sock_type {
SOCK_STREAM = 1,
@@ -93,15 +93,15 @@ enum sock_type {
/**
* struct socket - general BSD socket
- * @state - socket state (%SS_CONNECTED, etc)
- * @flags - socket flags (%SOCK_ASYNC_NOSPACE, etc)
- * @ops - protocol specific socket operations
- * @fasync_list - Asynchronous wake up list
- * @file - File back pointer for gc
- * @sk - internal networking protocol agnostic socket representation
- * @wait - wait queue for several uses
- * @type - socket type (%SOCK_STREAM, etc)
- * @passcred - credentials (used only in Unix Sockets (aka PF_LOCAL))
+ * @state: socket state (%SS_CONNECTED, etc)
+ * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc)
+ * @ops: protocol specific socket operations
+ * @fasync_list: Asynchronous wake up list
+ * @file: File back pointer for gc
+ * @sk: internal networking protocol agnostic socket representation
+ * @wait: wait queue for several uses
+ * @type: socket type (%SOCK_STREAM, etc)
+ * @passcred: credentials (used only in Unix Sockets (aka PF_LOCAL))
*/
struct socket {
socket_state state;
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6b74fcf..39ab8c6 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -131,6 +131,7 @@ struct page_state {
unsigned long allocstall; /* direct reclaim calls */
unsigned long pgrotated; /* pages rotated to tail of the LRU */
+ unsigned long nr_bounce; /* pages for bounce buffers */
};
extern void get_page_state(struct page_state *ret);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 6a18974..5d5820a 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2415,6 +2415,8 @@
#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
#define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0
#define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1
+#define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0
+#define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd
#define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4
#define PCI_DEVICE_ID_INTEL_ICH7_6 0x27c5
#define PCI_DEVICE_ID_INTEL_ICH7_7 0x27c8
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 4d74743..fd276ad 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -157,9 +157,9 @@ static inline int rcu_pending(int cpu)
/**
* rcu_read_lock - mark the beginning of an RCU read-side critical section.
*
- * When synchronize_kernel() is invoked on one CPU while other CPUs
+ * When synchronize_rcu() is invoked on one CPU while other CPUs
* are within RCU read-side critical sections, then the
- * synchronize_kernel() is guaranteed to block until after all the other
+ * synchronize_rcu() is guaranteed to block until after all the other
* CPUs exit their critical sections. Similarly, if call_rcu() is invoked
* on one CPU while other CPUs are within RCU read-side critical
* sections, invocation of the corresponding RCU callback is deferred
@@ -256,6 +256,21 @@ static inline int rcu_pending(int cpu)
(p) = (v); \
})
+/**
+ * synchronize_sched - block until all CPUs have exited any non-preemptive
+ * kernel code sequences.
+ *
+ * This means that all preempt_disable code sequences, including NMI and
+ * hardware-interrupt handlers, in progress on entry will have completed
+ * before this primitive returns. However, this does not guarantee that
+ * softirq handlers will have completed, since in some kernels
+ *
+ * This primitive provides the guarantees made by the (deprecated)
+ * synchronize_kernel() API. In contrast, synchronize_rcu() only
+ * guarantees that rcu_read_lock() sections will have completed.
+ */
+#define synchronize_sched() synchronize_rcu()
+
extern void rcu_init(void);
extern void rcu_check_callbacks(int cpu, int user);
extern void rcu_restart_cpu(int cpu);
@@ -265,7 +280,9 @@ extern void FASTCALL(call_rcu(struct rcu_head *head,
void (*func)(struct rcu_head *head)));
extern void FASTCALL(call_rcu_bh(struct rcu_head *head,
void (*func)(struct rcu_head *head)));
-extern void synchronize_kernel(void);
+extern __deprecated_for_modules void synchronize_kernel(void);
+extern void synchronize_rcu(void);
+void synchronize_idle(void);
#endif /* __KERNEL__ */
#endif /* __LINUX_RCUPDATE_H */
diff --git a/include/linux/reboot_fixups.h b/include/linux/reboot_fixups.h
new file mode 100644
index 0000000..480ea2d
--- /dev/null
+++ b/include/linux/reboot_fixups.h
@@ -0,0 +1,10 @@
+#ifndef _LINUX_REBOOT_FIXUPS_H
+#define _LINUX_REBOOT_FIXUPS_H
+
+#ifdef CONFIG_X86_REBOOTFIXUPS
+extern void mach_reboot_fixups(void);
+#else
+#define mach_reboot_fixups() ((void)(0))
+#endif
+
+#endif /* _LINUX_REBOOT_FIXUPS_H */
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h
index a57e973..2aef9c3 100644
--- a/include/linux/reiserfs_acl.h
+++ b/include/linux/reiserfs_acl.h
@@ -5,18 +5,18 @@
#define REISERFS_ACL_VERSION 0x0001
typedef struct {
- __u16 e_tag;
- __u16 e_perm;
- __u32 e_id;
+ __le16 e_tag;
+ __le16 e_perm;
+ __le32 e_id;
} reiserfs_acl_entry;
typedef struct {
- __u16 e_tag;
- __u16 e_perm;
+ __le16 e_tag;
+ __le16 e_perm;
} reiserfs_acl_entry_short;
typedef struct {
- __u32 a_version;
+ __le32 a_version;
} reiserfs_acl_header;
static inline size_t reiserfs_acl_size(int count)
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index bccff8b..3214862 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -114,47 +114,47 @@ if( !( cond ) ) \
struct journal_params {
- __u32 jp_journal_1st_block; /* where does journal start from on its
+ __le32 jp_journal_1st_block; /* where does journal start from on its
* device */
- __u32 jp_journal_dev; /* journal device st_rdev */
- __u32 jp_journal_size; /* size of the journal */
- __u32 jp_journal_trans_max; /* max number of blocks in a transaction. */
- __u32 jp_journal_magic; /* random value made on fs creation (this
+ __le32 jp_journal_dev; /* journal device st_rdev */
+ __le32 jp_journal_size; /* size of the journal */
+ __le32 jp_journal_trans_max; /* max number of blocks in a transaction. */
+ __le32 jp_journal_magic; /* random value made on fs creation (this
* was sb_journal_block_count) */
- __u32 jp_journal_max_batch; /* max number of blocks to batch into a
+ __le32 jp_journal_max_batch; /* max number of blocks to batch into a
* trans */
- __u32 jp_journal_max_commit_age; /* in seconds, how old can an async
+ __le32 jp_journal_max_commit_age; /* in seconds, how old can an async
* commit be */
- __u32 jp_journal_max_trans_age; /* in seconds, how old can a transaction
+ __le32 jp_journal_max_trans_age; /* in seconds, how old can a transaction
* be */
};
/* this is the super from 3.5.X, where X >= 10 */
struct reiserfs_super_block_v1
{
- __u32 s_block_count; /* blocks count */
- __u32 s_free_blocks; /* free blocks count */
- __u32 s_root_block; /* root block number */
+ __le32 s_block_count; /* blocks count */
+ __le32 s_free_blocks; /* free blocks count */
+ __le32 s_root_block; /* root block number */
struct journal_params s_journal;
- __u16 s_blocksize; /* block size */
- __u16 s_oid_maxsize; /* max size of object id array, see
+ __le16 s_blocksize; /* block size */
+ __le16 s_oid_maxsize; /* max size of object id array, see
* get_objectid() commentary */
- __u16 s_oid_cursize; /* current size of object id array */
- __u16 s_umount_state; /* this is set to 1 when filesystem was
+ __le16 s_oid_cursize; /* current size of object id array */
+ __le16 s_umount_state; /* this is set to 1 when filesystem was
* umounted, to 2 - when not */
char s_magic[10]; /* reiserfs magic string indicates that
* file system is reiserfs:
* "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */
- __u16 s_fs_state; /* it is set to used by fsck to mark which
+ __le16 s_fs_state; /* it is set to used by fsck to mark which
* phase of rebuilding is done */
- __u32 s_hash_function_code; /* indicate, what hash function is being use
+ __le32 s_hash_function_code; /* indicate, what hash function is being use
* to sort names in a directory*/
- __u16 s_tree_height; /* height of disk tree */
- __u16 s_bmap_nr; /* amount of bitmap blocks needed to address
+ __le16 s_tree_height; /* height of disk tree */
+ __le16 s_bmap_nr; /* amount of bitmap blocks needed to address
* each block of file system */
- __u16 s_version; /* this field is only reliable on filesystem
+ __le16 s_version; /* this field is only reliable on filesystem
* with non-standard journal */
- __u16 s_reserved_for_journal; /* size in blocks of journal area on main
+ __le16 s_reserved_for_journal; /* size in blocks of journal area on main
* device, we need to keep after
* making fs with non-standard journal */
} __attribute__ ((__packed__));
@@ -165,8 +165,8 @@ struct reiserfs_super_block_v1
struct reiserfs_super_block
{
struct reiserfs_super_block_v1 s_v1;
- __u32 s_inode_generation;
- __u32 s_flags; /* Right now used only by inode-attributes, if enabled */
+ __le32 s_inode_generation;
+ __le32 s_flags; /* Right now used only by inode-attributes, if enabled */
unsigned char s_uuid[16]; /* filesystem unique identifier */
unsigned char s_label[16]; /* filesystem volume label */
char s_unused[88] ; /* zero filled by mkreiserfs and
@@ -225,7 +225,7 @@ struct reiserfs_super_block
#define SB_ONDISK_JOURNAL_DEVICE(s) \
le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
#define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
- le32_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
+ le16_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
#define is_block_in_log_or_reserved_area(s, block) \
block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
@@ -269,7 +269,7 @@ int is_reiserfs_jr (struct reiserfs_super_block * rs);
#define QUOTA_EXCEEDED -6
typedef __u32 b_blocknr_t;
-typedef __u32 unp_t;
+typedef __le32 unp_t;
struct unfm_nodeinfo {
unp_t unfm_nodenum;
@@ -376,78 +376,57 @@ static inline struct reiserfs_sb_info *REISERFS_SB(const struct super_block *sb)
// directories use this key as well as old files
//
struct offset_v1 {
- __u32 k_offset;
- __u32 k_uniqueness;
+ __le32 k_offset;
+ __le32 k_uniqueness;
} __attribute__ ((__packed__));
struct offset_v2 {
-#ifdef __LITTLE_ENDIAN
- /* little endian version */
- __u64 k_offset:60;
- __u64 k_type: 4;
-#else
- /* big endian version */
- __u64 k_type: 4;
- __u64 k_offset:60;
-#endif
+ __le64 v;
} __attribute__ ((__packed__));
-#ifndef __LITTLE_ENDIAN
-typedef union {
- struct offset_v2 offset_v2;
- __u64 linear;
-} __attribute__ ((__packed__)) offset_v2_esafe_overlay;
-
static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 )
{
- offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2;
- tmp.linear = le64_to_cpu( tmp.linear );
- return (tmp.offset_v2.k_type <= TYPE_MAXTYPE)?tmp.offset_v2.k_type:TYPE_ANY;
+ __u8 type = le64_to_cpu(v2->v) >> 60;
+ return (type <= TYPE_MAXTYPE)?type:TYPE_ANY;
}
static inline void set_offset_v2_k_type( struct offset_v2 *v2, int type )
{
- offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2;
- tmp->linear = le64_to_cpu(tmp->linear);
- tmp->offset_v2.k_type = type;
- tmp->linear = cpu_to_le64(tmp->linear);
+ v2->v = (v2->v & cpu_to_le64(~0ULL>>4)) | cpu_to_le64((__u64)type<<60);
}
static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 )
{
- offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2;
- tmp.linear = le64_to_cpu( tmp.linear );
- return tmp.offset_v2.k_offset;
+ return le64_to_cpu(v2->v) & (~0ULL>>4);
}
static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset ){
- offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2;
- tmp->linear = le64_to_cpu(tmp->linear);
- tmp->offset_v2.k_offset = offset;
- tmp->linear = cpu_to_le64(tmp->linear);
+ offset &= (~0ULL>>4);
+ v2->v = (v2->v & cpu_to_le64(15ULL<<60)) | cpu_to_le64(offset);
}
-#else
-# define offset_v2_k_type(v2) ((v2)->k_type)
-# define set_offset_v2_k_type(v2,val) (offset_v2_k_type(v2) = (val))
-# define offset_v2_k_offset(v2) ((v2)->k_offset)
-# define set_offset_v2_k_offset(v2,val) (offset_v2_k_offset(v2) = (val))
-#endif
/* Key of an item determines its location in the S+tree, and
is composed of 4 components */
struct reiserfs_key {
- __u32 k_dir_id; /* packing locality: by default parent
+ __le32 k_dir_id; /* packing locality: by default parent
directory object id */
- __u32 k_objectid; /* object identifier */
+ __le32 k_objectid; /* object identifier */
union {
struct offset_v1 k_offset_v1;
struct offset_v2 k_offset_v2;
} __attribute__ ((__packed__)) u;
} __attribute__ ((__packed__));
+struct in_core_key {
+ __u32 k_dir_id; /* packing locality: by default parent
+ directory object id */
+ __u32 k_objectid; /* object identifier */
+ __u64 k_offset;
+ __u8 k_type;
+};
struct cpu_key {
- struct reiserfs_key on_disk_key;
+ struct in_core_key on_disk_key;
int version;
int key_length; /* 3 in all cases but direct2indirect and
indirect2direct conversion */
@@ -508,15 +487,15 @@ struct item_head
item. Note that the key, not this field, is used to
determine the item type, and thus which field this
union contains. */
- __u16 ih_free_space_reserved;
+ __le16 ih_free_space_reserved;
/* Iff this is a directory item, this field equals the
number of directory entries in the directory item. */
- __u16 ih_entry_count;
+ __le16 ih_entry_count;
} __attribute__ ((__packed__)) u;
- __u16 ih_item_len; /* total size of the item body */
- __u16 ih_item_location; /* an offset to the item body
+ __le16 ih_item_len; /* total size of the item body */
+ __le16 ih_item_location; /* an offset to the item body
* within the block */
- __u16 ih_version; /* 0 for all old items, 2 for new
+ __le16 ih_version; /* 0 for all old items, 2 for new
ones. Highest bit is set by fsck
temporary, cleaned after all
done */
@@ -670,43 +649,29 @@ static inline void set_le_ih_k_type (struct item_head * ih, int type)
//
static inline loff_t cpu_key_k_offset (const struct cpu_key * key)
{
- return (key->version == KEY_FORMAT_3_5) ?
- key->on_disk_key.u.k_offset_v1.k_offset :
- key->on_disk_key.u.k_offset_v2.k_offset;
+ return key->on_disk_key.k_offset;
}
static inline loff_t cpu_key_k_type (const struct cpu_key * key)
{
- return (key->version == KEY_FORMAT_3_5) ?
- uniqueness2type (key->on_disk_key.u.k_offset_v1.k_uniqueness) :
- key->on_disk_key.u.k_offset_v2.k_type;
+ return key->on_disk_key.k_type;
}
static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset)
{
- (key->version == KEY_FORMAT_3_5) ?
- (key->on_disk_key.u.k_offset_v1.k_offset = offset) :
- (key->on_disk_key.u.k_offset_v2.k_offset = offset);
+ key->on_disk_key.k_offset = offset;
}
-
static inline void set_cpu_key_k_type (struct cpu_key * key, int type)
{
- (key->version == KEY_FORMAT_3_5) ?
- (key->on_disk_key.u.k_offset_v1.k_uniqueness = type2uniqueness (type)):
- (key->on_disk_key.u.k_offset_v2.k_type = type);
+ key->on_disk_key.k_type = type;
}
-
static inline void cpu_key_k_offset_dec (struct cpu_key * key)
{
- if (key->version == KEY_FORMAT_3_5)
- key->on_disk_key.u.k_offset_v1.k_offset --;
- else
- key->on_disk_key.u.k_offset_v2.k_offset --;
+ key->on_disk_key.k_offset --;
}
-
#define is_direntry_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRENTRY)
#define is_direct_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRECT)
#define is_indirect_cpu_key(key) (cpu_key_k_type (key) == TYPE_INDIRECT)
@@ -752,10 +717,10 @@ extern struct reiserfs_key root_key;
/* Header of a disk block. More precisely, header of a formatted leaf
or internal node, and not the header of an unformatted node. */
struct block_head {
- __u16 blk_level; /* Level of a block in the tree. */
- __u16 blk_nr_item; /* Number of keys/items in a block. */
- __u16 blk_free_space; /* Block free space in bytes. */
- __u16 blk_reserved;
+ __le16 blk_level; /* Level of a block in the tree. */
+ __le16 blk_nr_item; /* Number of keys/items in a block. */
+ __le16 blk_free_space; /* Block free space in bytes. */
+ __le16 blk_reserved;
/* dump this in v4/planA */
struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */
};
@@ -819,19 +784,19 @@ struct block_head {
//
struct stat_data_v1
{
- __u16 sd_mode; /* file type, permissions */
- __u16 sd_nlink; /* number of hard links */
- __u16 sd_uid; /* owner */
- __u16 sd_gid; /* group */
- __u32 sd_size; /* file size */
- __u32 sd_atime; /* time of last access */
- __u32 sd_mtime; /* time file was last modified */
- __u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
+ __le16 sd_mode; /* file type, permissions */
+ __le16 sd_nlink; /* number of hard links */
+ __le16 sd_uid; /* owner */
+ __le16 sd_gid; /* group */
+ __le32 sd_size; /* file size */
+ __le32 sd_atime; /* time of last access */
+ __le32 sd_mtime; /* time file was last modified */
+ __le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
union {
- __u32 sd_rdev;
- __u32 sd_blocks; /* number of blocks file uses */
+ __le32 sd_rdev;
+ __le32 sd_blocks; /* number of blocks file uses */
} __attribute__ ((__packed__)) u;
- __u32 sd_first_direct_byte; /* first byte of file which is stored
+ __le32 sd_first_direct_byte; /* first byte of file which is stored
in a direct item: except that if it
equals 1 it is a symlink and if it
equals ~(__u32)0 there is no
@@ -897,20 +862,20 @@ struct stat_data_v1
/* Stat Data on disk (reiserfs version of UFS disk inode minus the
address blocks) */
struct stat_data {
- __u16 sd_mode; /* file type, permissions */
- __u16 sd_attrs; /* persistent inode flags */
- __u32 sd_nlink; /* number of hard links */
- __u64 sd_size; /* file size */
- __u32 sd_uid; /* owner */
- __u32 sd_gid; /* group */
- __u32 sd_atime; /* time of last access */
- __u32 sd_mtime; /* time file was last modified */
- __u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
- __u32 sd_blocks;
+ __le16 sd_mode; /* file type, permissions */
+ __le16 sd_attrs; /* persistent inode flags */
+ __le32 sd_nlink; /* number of hard links */
+ __le64 sd_size; /* file size */
+ __le32 sd_uid; /* owner */
+ __le32 sd_gid; /* group */
+ __le32 sd_atime; /* time of last access */
+ __le32 sd_mtime; /* time file was last modified */
+ __le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
+ __le32 sd_blocks;
union {
- __u32 sd_rdev;
- __u32 sd_generation;
- //__u32 sd_first_direct_byte;
+ __le32 sd_rdev;
+ __le32 sd_generation;
+ //__le32 sd_first_direct_byte;
/* first byte of file which is stored in a
direct item: except that if it equals 1
it is a symlink and if it equals
@@ -993,12 +958,12 @@ struct stat_data {
struct reiserfs_de_head
{
- __u32 deh_offset; /* third component of the directory entry key */
- __u32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced
+ __le32 deh_offset; /* third component of the directory entry key */
+ __le32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced
by directory entry */
- __u32 deh_objectid; /* objectid of the object, that is referenced by directory entry */
- __u16 deh_location; /* offset of name in the whole item */
- __u16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether
+ __le32 deh_objectid; /* objectid of the object, that is referenced by directory entry */
+ __le16 deh_location; /* offset of name in the whole item */
+ __le16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether
entry is hidden (unlinked) */
} __attribute__ ((__packed__));
#define DEH_SIZE sizeof(struct reiserfs_de_head)
@@ -1058,10 +1023,10 @@ struct reiserfs_de_head
#define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
#define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
-extern void make_empty_dir_item_v1 (char * body, __u32 dirid, __u32 objid,
- __u32 par_dirid, __u32 par_objid);
-extern void make_empty_dir_item (char * body, __u32 dirid, __u32 objid,
- __u32 par_dirid, __u32 par_objid);
+extern void make_empty_dir_item_v1 (char * body, __le32 dirid, __le32 objid,
+ __le32 par_dirid, __le32 par_objid);
+extern void make_empty_dir_item (char * body, __le32 dirid, __le32 objid,
+ __le32 par_dirid, __le32 par_objid);
/* array of the entry headers */
/* get item body */
@@ -1160,9 +1125,9 @@ struct reiserfs_dir_entry
/* Disk child pointer: The pointer from an internal node of the tree
to a node that is on disk. */
struct disk_child {
- __u32 dc_block_number; /* Disk child's block number. */
- __u16 dc_size; /* Disk child's used space. */
- __u16 dc_reserved;
+ __le32 dc_block_number; /* Disk child's block number. */
+ __le16 dc_size; /* Disk child's used space. */
+ __le16 dc_reserved;
};
#define DC_SIZE (sizeof(struct disk_child))
@@ -1476,7 +1441,7 @@ struct tree_balance
int fs_gen; /* saved value of `reiserfs_generation' counter
see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */
#ifdef DISPLACE_NEW_PACKING_LOCALITIES
- struct reiserfs_key key; /* key pointer, to pass to block allocator or
+ struct in_core_key key; /* key pointer, to pass to block allocator or
another low-level subsystem */
#endif
} ;
@@ -1630,10 +1595,10 @@ struct reiserfs_iget_args {
/* first block written in a commit. */
struct reiserfs_journal_desc {
- __u32 j_trans_id ; /* id of commit */
- __u32 j_len ; /* length of commit. len +1 is the commit block */
- __u32 j_mount_id ; /* mount id of this trans*/
- __u32 j_realblock[1] ; /* real locations for each block */
+ __le32 j_trans_id ; /* id of commit */
+ __le32 j_len ; /* length of commit. len +1 is the commit block */
+ __le32 j_mount_id ; /* mount id of this trans*/
+ __le32 j_realblock[1] ; /* real locations for each block */
} ;
#define get_desc_trans_id(d) le32_to_cpu((d)->j_trans_id)
@@ -1646,9 +1611,9 @@ struct reiserfs_journal_desc {
/* last block written in a commit */
struct reiserfs_journal_commit {
- __u32 j_trans_id ; /* must match j_trans_id from the desc block */
- __u32 j_len ; /* ditto */
- __u32 j_realblock[1] ; /* real locations for each block */
+ __le32 j_trans_id ; /* must match j_trans_id from the desc block */
+ __le32 j_len ; /* ditto */
+ __le32 j_realblock[1] ; /* real locations for each block */
} ;
#define get_commit_trans_id(c) le32_to_cpu((c)->j_trans_id)
@@ -1663,9 +1628,9 @@ struct reiserfs_journal_commit {
** and this transaction does not need to be replayed.
*/
struct reiserfs_journal_header {
- __u32 j_last_flush_trans_id ; /* id of last fully flushed transaction */
- __u32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */
- __u32 j_mount_id ;
+ __le32 j_last_flush_trans_id ; /* id of last fully flushed transaction */
+ __le32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */
+ __le32 j_mount_id ;
/* 12 */ struct journal_params jh_journal;
} ;
@@ -2117,7 +2082,7 @@ struct buffer_head * get_FEB (struct tree_balance *);
struct __reiserfs_blocknr_hint {
struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */
long block; /* file offset, in blocks */
- struct reiserfs_key key;
+ struct in_core_key key;
struct path * path; /* search path, used by allocator to deternine search_start by
* various ways */
struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and
@@ -2144,7 +2109,7 @@ void reiserfs_init_alloc_options (struct super_block *s);
* to use for a new object underneat it. The locality is returned
* in disk byte order (le).
*/
-u32 reiserfs_choose_packing(struct inode *dir);
+__le32 reiserfs_choose_packing(struct inode *dir);
int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value);
void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted);
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index 1eaa48e..9244c57 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -10,8 +10,8 @@
#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */
struct reiserfs_xattr_header {
- __u32 h_magic; /* magic number for identification */
- __u32 h_hash; /* hash of the value */
+ __le32 h_magic; /* magic number for identification */
+ __le32 h_hash; /* hash of the value */
};
#ifdef __KERNEL__
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1cced97..5f868a5 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -845,6 +845,7 @@ extern void sched_idle_next(void);
extern void set_user_nice(task_t *p, long nice);
extern int task_prio(const task_t *p);
extern int task_nice(const task_t *p);
+extern int can_nice(const task_t *p, const int nice);
extern int task_curr(const task_t *p);
extern int idle_cpu(int cpu);
extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
@@ -1011,7 +1012,6 @@ extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct
extern void flush_thread(void);
extern void exit_thread(void);
-extern void exit_mm(struct task_struct *);
extern void exit_files(struct task_struct *);
extern void exit_signal(struct task_struct *);
extern void __exit_signal(struct task_struct *);
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 99c97ad..0a98f5e 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -9,6 +9,17 @@
#ifdef __KERNEL__
/*
+ * These values of sa_flags are used only by the kernel as part of the
+ * irq handling routines.
+ *
+ * SA_INTERRUPT is also used by the irq handling routines.
+ * SA_SHIRQ is for shared interrupt support on PCI and EISA.
+ */
+#define SA_PROBE SA_ONESHOT
+#define SA_SAMPLE_RANDOM SA_RESTART
+#define SA_SHIRQ 0x04000000
+
+/*
* Real Time signals may be queued.
*/
@@ -209,6 +220,12 @@ static inline void init_sigpending(struct sigpending *sig)
INIT_LIST_HEAD(&sig->list);
}
+/* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */
+static inline int valid_signal(unsigned long sig)
+{
+ return sig <= _NSIG ? 1 : 0;
+}
+
extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
extern long do_sigpending(void __user *, unsigned long);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 22b7018..cc04f5c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -167,13 +167,14 @@ struct skb_shared_info {
* @h: Transport layer header
* @nh: Network layer header
* @mac: Link layer header
- * @dst: FIXME: Describe this field
+ * @dst: destination entry
+ * @sp: the security path, used for xfrm
* @cb: Control buffer. Free for use by every layer. Put private vars here
* @len: Length of actual data
* @data_len: Data length
* @mac_len: Length of link layer header
* @csum: Checksum
- * @__unused: Dead field, may be reused
+ * @local_df: allow local fragmentation
* @cloned: Head may be cloned (check refcnt to be sure)
* @nohdr: Payload reference only, must not modify header
* @pkt_type: Packet class
@@ -968,6 +969,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
kfree_skb(skb);
}
+#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB
/**
* __dev_alloc_skb - allocate an skbuff for sending
* @length: length to allocate
@@ -980,7 +982,6 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
*
* %NULL is returned in there is no free memory.
*/
-#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB
static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
int gfp_mask)
{
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 3e3c3ab..7d66385 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -62,16 +62,9 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo
extern int kmem_cache_destroy(kmem_cache_t *);
extern int kmem_cache_shrink(kmem_cache_t *);
extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
-#ifdef CONFIG_NUMA
-extern void *kmem_cache_alloc_node(kmem_cache_t *, int);
-#else
-static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node)
-{
- return kmem_cache_alloc(cachep, GFP_KERNEL);
-}
-#endif
extern void kmem_cache_free(kmem_cache_t *, void *);
extern unsigned int kmem_cache_size(kmem_cache_t *);
+extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags);
/* Size description struct for general caches. */
struct cache_sizes {
@@ -109,6 +102,20 @@ extern void *kcalloc(size_t, size_t, unsigned int __nocast);
extern void kfree(const void *);
extern unsigned int ksize(const void *);
+#ifdef CONFIG_NUMA
+extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node);
+extern void *kmalloc_node(size_t size, int flags, int node);
+#else
+static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
+{
+ return kmem_cache_alloc(cachep, flags);
+}
+static inline void *kmalloc_node(size_t size, int flags, int node)
+{
+ return kmalloc(size, flags);
+}
+#endif
+
extern int FASTCALL(kmem_cache_reap(int));
extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 757cd9b..c39f6f7 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -456,8 +456,7 @@ asmlinkage long sys_semctl(int semid, int semnum, int cmd, union semun arg);
asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops,
unsigned nsops,
const struct timespec __user *timeout);
-asmlinkage long sys_shmat(int shmid, char __user *shmaddr,
- int shmflg, unsigned long __user *addr);
+asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
asmlinkage long sys_shmget(key_t key, size_t size, int flag);
asmlinkage long sys_shmdt(char __user *shmaddr);
asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
diff --git a/include/net/sock.h b/include/net/sock.h
index be81cab..cc4c919 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -90,17 +90,17 @@ do { spin_lock_init(&((__sk)->sk_lock.slock)); \
struct sock;
/**
- * struct sock_common - minimal network layer representation of sockets
- * @skc_family - network address family
- * @skc_state - Connection state
- * @skc_reuse - %SO_REUSEADDR setting
- * @skc_bound_dev_if - bound device index if != 0
- * @skc_node - main hash linkage for various protocol lookup tables
- * @skc_bind_node - bind hash linkage for various protocol lookup tables
- * @skc_refcnt - reference count
- *
- * This is the minimal network layer representation of sockets, the header
- * for struct sock and struct tcp_tw_bucket.
+ * struct sock_common - minimal network layer representation of sockets
+ * @skc_family: network address family
+ * @skc_state: Connection state
+ * @skc_reuse: %SO_REUSEADDR setting
+ * @skc_bound_dev_if: bound device index if != 0
+ * @skc_node: main hash linkage for various protocol lookup tables
+ * @skc_bind_node: bind hash linkage for various protocol lookup tables
+ * @skc_refcnt: reference count
+ *
+ * This is the minimal network layer representation of sockets, the header
+ * for struct sock and struct tcp_tw_bucket.
*/
struct sock_common {
unsigned short skc_family;
@@ -114,60 +114,61 @@ struct sock_common {
/**
* struct sock - network layer representation of sockets
- * @__sk_common - shared layout with tcp_tw_bucket
- * @sk_shutdown - mask of %SEND_SHUTDOWN and/or %RCV_SHUTDOWN
- * @sk_userlocks - %SO_SNDBUF and %SO_RCVBUF settings
- * @sk_lock - synchronizer
- * @sk_rcvbuf - size of receive buffer in bytes
- * @sk_sleep - sock wait queue
- * @sk_dst_cache - destination cache
- * @sk_dst_lock - destination cache lock
- * @sk_policy - flow policy
- * @sk_rmem_alloc - receive queue bytes committed
- * @sk_receive_queue - incoming packets
- * @sk_wmem_alloc - transmit queue bytes committed
- * @sk_write_queue - Packet sending queue
- * @sk_omem_alloc - "o" is "option" or "other"
- * @sk_wmem_queued - persistent queue size
- * @sk_forward_alloc - space allocated forward
- * @sk_allocation - allocation mode
- * @sk_sndbuf - size of send buffer in bytes
- * @sk_flags - %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings
- * @sk_no_check - %SO_NO_CHECK setting, wether or not checkup packets
- * @sk_route_caps - route capabilities (e.g. %NETIF_F_TSO)
- * @sk_lingertime - %SO_LINGER l_linger setting
- * @sk_hashent - hash entry in several tables (e.g. tcp_ehash)
- * @sk_backlog - always used with the per-socket spinlock held
- * @sk_callback_lock - used with the callbacks in the end of this struct
- * @sk_error_queue - rarely used
- * @sk_prot - protocol handlers inside a network family
- * @sk_err - last error
- * @sk_err_soft - errors that don't cause failure but are the cause of a persistent failure not just 'timed out'
- * @sk_ack_backlog - current listen backlog
- * @sk_max_ack_backlog - listen backlog set in listen()
- * @sk_priority - %SO_PRIORITY setting
- * @sk_type - socket type (%SOCK_STREAM, etc)
- * @sk_protocol - which protocol this socket belongs in this network family
- * @sk_peercred - %SO_PEERCRED setting
- * @sk_rcvlowat - %SO_RCVLOWAT setting
- * @sk_rcvtimeo - %SO_RCVTIMEO setting
- * @sk_sndtimeo - %SO_SNDTIMEO setting
- * @sk_filter - socket filtering instructions
- * @sk_protinfo - private area, net family specific, when not using slab
- * @sk_timer - sock cleanup timer
- * @sk_stamp - time stamp of last packet received
- * @sk_socket - Identd and reporting IO signals
- * @sk_user_data - RPC layer private data
- * @sk_sndmsg_page - cached page for sendmsg
- * @sk_sndmsg_off - cached offset for sendmsg
- * @sk_send_head - front of stuff to transmit
- * @sk_write_pending - a write to stream socket waits to start
- * @sk_state_change - callback to indicate change in the state of the sock
- * @sk_data_ready - callback to indicate there is data to be processed
- * @sk_write_space - callback to indicate there is bf sending space available
- * @sk_error_report - callback to indicate errors (e.g. %MSG_ERRQUEUE)
- * @sk_backlog_rcv - callback to process the backlog
- * @sk_destruct - called at sock freeing time, i.e. when all refcnt == 0
+ * @__sk_common: shared layout with tcp_tw_bucket
+ * @sk_shutdown: mask of %SEND_SHUTDOWN and/or %RCV_SHUTDOWN
+ * @sk_userlocks: %SO_SNDBUF and %SO_RCVBUF settings
+ * @sk_lock: synchronizer
+ * @sk_rcvbuf: size of receive buffer in bytes
+ * @sk_sleep: sock wait queue
+ * @sk_dst_cache: destination cache
+ * @sk_dst_lock: destination cache lock
+ * @sk_policy: flow policy
+ * @sk_rmem_alloc: receive queue bytes committed
+ * @sk_receive_queue: incoming packets
+ * @sk_wmem_alloc: transmit queue bytes committed
+ * @sk_write_queue: Packet sending queue
+ * @sk_omem_alloc: "o" is "option" or "other"
+ * @sk_wmem_queued: persistent queue size
+ * @sk_forward_alloc: space allocated forward
+ * @sk_allocation: allocation mode
+ * @sk_sndbuf: size of send buffer in bytes
+ * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings
+ * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets
+ * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO)
+ * @sk_lingertime: %SO_LINGER l_linger setting
+ * @sk_hashent: hash entry in several tables (e.g. tcp_ehash)
+ * @sk_backlog: always used with the per-socket spinlock held
+ * @sk_callback_lock: used with the callbacks in the end of this struct
+ * @sk_error_queue: rarely used
+ * @sk_prot: protocol handlers inside a network family
+ * @sk_err: last error
+ * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out'
+ * @sk_ack_backlog: current listen backlog
+ * @sk_max_ack_backlog: listen backlog set in listen()
+ * @sk_priority: %SO_PRIORITY setting
+ * @sk_type: socket type (%SOCK_STREAM, etc)
+ * @sk_protocol: which protocol this socket belongs in this network family
+ * @sk_peercred: %SO_PEERCRED setting
+ * @sk_rcvlowat: %SO_RCVLOWAT setting
+ * @sk_rcvtimeo: %SO_RCVTIMEO setting
+ * @sk_sndtimeo: %SO_SNDTIMEO setting
+ * @sk_filter: socket filtering instructions
+ * @sk_protinfo: private area, net family specific, when not using slab
+ * @sk_timer: sock cleanup timer
+ * @sk_stamp: time stamp of last packet received
+ * @sk_socket: Identd and reporting IO signals
+ * @sk_user_data: RPC layer private data
+ * @sk_sndmsg_page: cached page for sendmsg
+ * @sk_sndmsg_off: cached offset for sendmsg
+ * @sk_send_head: front of stuff to transmit
+ * @sk_security: used by security modules
+ * @sk_write_pending: a write to stream socket waits to start
+ * @sk_state_change: callback to indicate change in the state of the sock
+ * @sk_data_ready: callback to indicate there is data to be processed
+ * @sk_write_space: callback to indicate there is bf sending space available
+ * @sk_error_report: callback to indicate errors (e.g. %MSG_ERRQUEUE)
+ * @sk_backlog_rcv: callback to process the backlog
+ * @sk_destruct: called at sock freeing time, i.e. when all refcnt == 0
*/
struct sock {
/*
@@ -1223,8 +1224,8 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
/**
* sk_eat_skb - Release a skb if it is no longer needed
- * @sk - socket to eat this skb from
- * @skb - socket buffer to eat
+ * @sk: socket to eat this skb from
+ * @skb: socket buffer to eat
*
* This routine must be called with interrupts disabled or with the socket
* locked so that the sk_buff queue operation is ok.
diff --git a/include/video/edid.h b/include/video/edid.h
index abc1b48..b913f19 100644
--- a/include/video/edid.h
+++ b/include/video/edid.h
@@ -4,9 +4,6 @@
#ifdef __KERNEL__
#include <linux/config.h>
-#ifdef CONFIG_PPC_OF
-#include <linux/pci.h>
-#endif
#ifdef CONFIG_X86
struct edid_info {
@@ -14,14 +11,8 @@ struct edid_info {
};
extern struct edid_info edid_info;
-extern char *get_EDID_from_BIOS(void *);
-
#endif /* CONFIG_X86 */
-#ifdef CONFIG_PPC_OF
-extern char *get_EDID_from_OF(struct pci_dev *pdev);
-#endif
-
#endif /* __KERNEL__ */
#endif /* __linux_video_edid_h__ */
diff --git a/include/video/tdfx.h b/include/video/tdfx.h
index a896e44..0423767 100644
--- a/include/video/tdfx.h
+++ b/include/video/tdfx.h
@@ -99,6 +99,8 @@
#define MISCINIT1_2DBLOCK_DIS BIT(15)
#define DRAMINIT0_SGRAM_NUM BIT(26)
#define DRAMINIT0_SGRAM_TYPE BIT(27)
+#define DRAMINIT0_SGRAM_TYPE_MASK (BIT(27)|BIT(28)|BIT(29))
+#define DRAMINIT0_SGRAM_TYPE_SHIFT 27
#define DRAMINIT1_MEM_SDRAM BIT(30)
#define VGAINIT0_VGA_DISABLE BIT(0)
#define VGAINIT0_EXT_TIMING BIT(1)
OpenPOWER on IntegriCloud