Commit b446946d authored by Jeff Garzik's avatar Jeff Garzik

Merge mandrakesoft.com:/home/jgarzik/vanilla/linus-2.5

into mandrakesoft.com:/home/jgarzik/repo/net-drivers-2.5
parents feeb46df fa44005c
......@@ -146,3 +146,9 @@ support for this helper, particularly get_parent.
It is planned that this will be required for exporting once the code
settles down a bit.
[mandatory]
s_export_op is now required for exporting a filesystem.
isofs, ext2, ext3, resierfs, fat
can be used as examples of very different filesystems.
......@@ -3,6 +3,7 @@
OUTPUT_FORMAT("elf64-alpha")
ENTRY(__start)
PHDRS { kernel PT_LOAD ; }
jiffies = jiffies_64;
SECTIONS
{
#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
......
......@@ -4,6 +4,7 @@
*/
OUTPUT_ARCH(arm)
ENTRY(stext)
jiffies = jiffies_64 + 4;
SECTIONS
{
. = TEXTADDR;
......
......@@ -4,6 +4,7 @@
*/
OUTPUT_ARCH(arm)
ENTRY(stext)
jiffies = jiffies_64 + 4;
SECTIONS
{
. = TEXTADDR;
......
......@@ -8,6 +8,7 @@
* the kernel has booted.
*/
jiffies = jiffies_64;
SECTIONS
{
. = @CONFIG_ETRAX_DRAM_VIRTUAL_BASE@;
......
......@@ -24,6 +24,4 @@ endif # CONFIG_MULTIQUAD
obj-y += irq.o common.o
endif # CONFIG_VISWS
export-objs += $(obj-y)
include $(TOPDIR)/Rules.make
......@@ -4,6 +4,7 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
jiffies = jiffies_64;
SECTIONS
{
. = 0xC0000000 + 0x100000;
......
......@@ -7,6 +7,7 @@
OUTPUT_FORMAT("elf64-ia64-little")
OUTPUT_ARCH(ia64)
ENTRY(phys_start)
jiffies = jiffies_64;
SECTIONS
{
/* Sections to be discarded */
......
......@@ -2,6 +2,7 @@
OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
OUTPUT_ARCH(m68k)
ENTRY(_start)
jiffies = jiffies_64 + 4;
SECTIONS
{
. = 0xE004000;
......
......@@ -2,6 +2,7 @@
OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
OUTPUT_ARCH(m68k)
ENTRY(_start)
jiffies = jiffies_64 + 4;
SECTIONS
{
. = 0x1000;
......
OUTPUT_ARCH(mips)
ENTRY(kernel_entry)
jiffies = jiffies_64;
SECTIONS
{
/* Read-only sections, merged into text segment: */
......
......@@ -2,6 +2,7 @@
OUTPUT_FORMAT("elf32-hppa")
OUTPUT_ARCH(hppa)
ENTRY(_stext)
jiffies = jiffies_64 + 4;
SECTIONS
{
......
......@@ -2,6 +2,7 @@ OUTPUT_ARCH(powerpc)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; */
jiffies = jiffies_64 + 4;
SECTIONS
{
/* Read-only sections, merged into text segment: */
......
......@@ -2,6 +2,7 @@ OUTPUT_ARCH(powerpc)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; */
jiffies = jiffies_64;
SECTIONS
{
/* Read-only sections, merged into text segment: */
......
......@@ -4,6 +4,7 @@
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
OUTPUT_ARCH(s390)
ENTRY(_start)
jiffies = jiffies_64 + 4;
SECTIONS
{
. = 0x00000000;
......
......@@ -4,6 +4,7 @@
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
OUTPUT_ARCH(s390)
ENTRY(_start)
jiffies = jiffies_64 + 4;
SECTIONS
{
. = 0x00000000;
......
......@@ -4,6 +4,7 @@
OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
OUTPUT_ARCH(s390)
ENTRY(_start)
jiffies = jiffies_64;
SECTIONS
{
. = 0x00000000;
......
......@@ -4,6 +4,7 @@
OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
OUTPUT_ARCH(s390)
ENTRY(_start)
jiffies = jiffies_64;
SECTIONS
{
. = 0x00000000;
......
......@@ -5,8 +5,10 @@
#include <linux/config.h>
#ifdef CONFIG_CPU_LITTLE_ENDIAN
OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
jiffies = jiffies_64;
#else
OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
jiffies = jiffies_64 + 4;
#endif
OUTPUT_ARCH(sh)
ENTRY(_start)
......
......@@ -234,29 +234,13 @@ static inline void write_sunos_user(struct pt_regs *regs, unsigned long offset,
#ifdef DEBUG_PTRACE
char *pt_rq [] = {
"TRACEME",
"PEEKTEXT",
"PEEKDATA",
"PEEKUSR",
"POKETEXT",
"POKEDATA",
"POKEUSR",
"CONT",
"KILL",
"SINGLESTEP",
"SUNATTACH",
"SUNDETACH",
"GETREGS",
"SETREGS",
"GETFPREGS",
"SETFPREGS",
"READDATA",
"WRITEDATA",
"READTEXT",
"WRITETEXT",
"GETFPAREGS",
"SETFPAREGS",
""
/* 0 */ "TRACEME", "PEEKTEXT", "PEEKDATA", "PEEKUSR",
/* 4 */ "POKETEXT", "POKEDATA", "POKEUSR", "CONT",
/* 8 */ "KILL", "SINGLESTEP", "SUNATTACH", "SUNDETACH",
/* 12 */ "GETREGS", "SETREGS", "GETFPREGS", "SETFPREGS",
/* 16 */ "READDATA", "WRITEDATA", "READTEXT", "WRITETEXT",
/* 20 */ "GETFPAREGS", "SETFPAREGS", "unknown", "unknown",
/* 24 */ "SYSCALL", ""
};
#endif
......@@ -285,7 +269,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
{
char *s;
if ((request > 0) && (request < 21))
if ((request >= 0) && (request <= 24))
s = pt_rq [request];
else
s = "unknown";
......
......@@ -1048,8 +1048,8 @@ static inline int check_nonblock(int ret, int fd)
return ret;
}
extern asmlinkage int sys_read(unsigned int fd,char *buf,int count);
extern asmlinkage int sys_write(unsigned int fd,char *buf,int count);
extern asmlinkage ssize_t sys_read(unsigned int fd,char *buf,int count);
extern asmlinkage ssize_t sys_write(unsigned int fd,char *buf,int count);
extern asmlinkage int sys_recv(int fd, void * ubuf, int size, unsigned flags);
extern asmlinkage int sys_send(int fd, void * buff, int len, unsigned flags);
extern asmlinkage int sys_accept(int fd, struct sockaddr *sa, int *addrlen);
......
......@@ -2,6 +2,7 @@
OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc")
OUTPUT_ARCH(sparc)
ENTRY(_start)
jiffies = jiffies_64 + 4;
SECTIONS
{
. = 0x10000 + SIZEOF_HEADERS;
......
......@@ -181,11 +181,11 @@ extern void rs_init(void);
extern void clock_probe(void);
extern void power_init(void);
static void __init pcibios_init(void)
static int __init pcibios_init(void)
{
pci_controller_probe();
if (pci_controller_root == NULL)
return;
return 0;
pci_scan_each_controller_bus();
......@@ -197,6 +197,8 @@ static void __init pcibios_init(void)
rs_init();
clock_probe();
power_init();
return 0;
}
subsys_initcall(pcibios_init);
......
......@@ -586,13 +586,6 @@ void fault_in_user_windows(void)
* under SunOS are nothing short of bletcherous:
* Parent --> %o0 == childs pid, %o1 == 0
* Child --> %o0 == parents pid, %o1 == 1
*
* NOTE: We have a separate fork kpsr/kwim because
* the parent could change these values between
* sys_fork invocation and when we reach here
* if the parent should sleep while trying to
* allocate the task_struct and kernel stack in
* do_fork().
*/
int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
unsigned long unused,
......
......@@ -78,29 +78,13 @@ pt_os_succ_return (struct pt_regs *regs, unsigned long val, long *addr)
#ifdef DEBUG_PTRACE
char *pt_rq [] = {
"TRACEME",
"PEEKTEXT",
"PEEKDATA",
"PEEKUSR",
"POKETEXT",
"POKEDATA",
"POKEUSR",
"CONT",
"KILL",
"SINGLESTEP",
"SUNATTACH",
"SUNDETACH",
"GETREGS",
"SETREGS",
"GETFPREGS",
"SETFPREGS",
"READDATA",
"WRITEDATA",
"READTEXT",
"WRITETEXT",
"GETFPAREGS",
"SETFPAREGS",
""
/* 0 */ "TRACEME", "PEEKTEXT", "PEEKDATA", "PEEKUSR",
/* 4 */ "POKETEXT", "POKEDATA", "POKEUSR", "CONT",
/* 8 */ "KILL", "SINGLESTEP", "SUNATTACH", "SUNDETACH",
/* 12 */ "GETREGS", "SETREGS", "GETFPREGS", "SETFPREGS",
/* 16 */ "READDATA", "WRITEDATA", "READTEXT", "WRITETEXT",
/* 20 */ "GETFPAREGS", "SETFPAREGS", "unknown", "unknown",
/* 24 */ "SYSCALL", ""
};
#endif
......@@ -134,7 +118,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
{
char *s;
if ((request > 0) && (request < 21))
if ((request >= 0) && (request <= 24))
s = pt_rq [request];
else
s = "unknown";
......
......@@ -372,6 +372,10 @@ void VISenter(void);
/* RAID code needs this */
EXPORT_SYMBOL_NOVERS(VISenter);
extern void batten_down_hatches(void);
/* for input/keybdev */
EXPORT_SYMBOL(batten_down_hatches);
#ifdef CONFIG_DEBUG_BUGVERBOSE
EXPORT_SYMBOL(do_BUG);
#endif
......@@ -1198,8 +1198,8 @@ static inline int check_nonblock(int ret, int fd)
return ret;
}
extern asmlinkage int sys_read(unsigned int fd, char *buf, unsigned long count);
extern asmlinkage int sys_write(unsigned int fd, char *buf, unsigned long count);
extern asmlinkage ssize_t sys_read(unsigned int fd, char *buf, unsigned long count);
extern asmlinkage ssize_t sys_write(unsigned int fd, char *buf, unsigned long count);
extern asmlinkage int sys_recv(int fd, void *ubuf, size_t size, unsigned flags);
extern asmlinkage int sys_send(int fd, void *buff, size_t len, unsigned flags);
extern asmlinkage int sys_accept(int fd, struct sockaddr *sa, int *addrlen);
......
......@@ -3,6 +3,7 @@ OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc")
OUTPUT_ARCH(sparc:v9a)
ENTRY(_start)
jiffies = jiffies_64;
SECTIONS
{
swapper_pmd_dir = 0x0000000000402000;
......
......@@ -3,6 +3,7 @@
*/
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
jiffies = jiffies_64;
ENTRY(_start)
SECTIONS
{
......
......@@ -2,6 +2,6 @@ O_TARGET := base.o
obj-y := core.o sys.o interface.o fs.o power.o
export-objs := $(obj-y)
export-objs := core.o fs.o power.o sys.o
include $(TOPDIR)/Rules.make
......@@ -11,6 +11,8 @@
O_TARGET := driver.o
export-objs := access.o hotplug.o pci-driver.o pci.o pool.o probe.o proc.o search.o
obj-y += access.o probe.o pci.o pool.o quirks.o \
compat.o names.o pci-driver.o search.o
obj-$(CONFIG_PM) += power.o
......@@ -37,8 +39,6 @@ ifndef CONFIG_X86
obj-y += syscall.o
endif
export-objs := $(obj-y)
include $(TOPDIR)/Rules.make
names.o: names.c devlist.h classlist.h
......
......@@ -5,6 +5,7 @@
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/sched.h>
#include <asm/io.h>
......
......@@ -131,6 +131,21 @@ static struct super_operations isofs_sops = {
statfs: isofs_statfs,
};
/* the export_operations structure for describing
* how to export (e.g. via kNFSd) is deliberately
* empty.
* This means that the filesystem want to use iget
* to map an inode number into an inode.
* The lack of a get_parent operation means that
* if something isn't in the cache, then you cannot
* access it.
* It should be possible to write a get_parent,
* but it would be a bit hairy...
*/
static struct export_operations isofs_export_ops = {
};
static struct dentry_operations isofs_dentry_ops[] = {
{
d_hash: isofs_hash,
......@@ -786,6 +801,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
}
#endif
s->s_op = &isofs_sops;
s->s_export_op = &isofs_export_ops;
sbi->s_mapping = opt.map;
sbi->s_rock = (opt.rock == 'y' ? 2 : 0);
sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/
......
......@@ -1155,19 +1155,30 @@ int txCommit(tid_t tid, /* transaction identifier */
jfs_ip = JFS_IP(ip);
/*
* BUGBUG - Should we call filemap_fdatawrite here instead
* of fsync_inode_data?
* If we do, we have a deadlock condition since we may end
* up recursively calling jfs_get_block with the IWRITELOCK
* held. We may be able to do away with IWRITELOCK while
* committing transactions and use i_sem instead.
* BUGBUG - This code has temporarily been removed. The
* intent is to ensure that any file data is written before
* the metadata is committed to the journal. This prevents
* uninitialized data from appearing in a file after the
* journal has been replayed. (The uninitialized data
* could be sensitive data removed by another user.)
*
* The problem now is that we are holding the IWRITELOCK
* on the inode, and calling filemap_fdatawrite on an
* unmapped page will cause a deadlock in jfs_get_block.
*
* The long term solution is to pare down the use of
* IWRITELOCK. We are currently holding it too long.
* We could also be smarter about which data pages need
* to be written before the transaction is committed and
* when we don't need to worry about it at all.
*
* if ((!S_ISDIR(ip->i_mode))
* && (tblk->flag & COMMIT_DELETE) == 0) {
* filemap_fdatawait(ip->i_mapping);
* filemap_fdatawrite(ip->i_mapping);
* filemap_fdatawait(ip->i_mapping);
* }
*/
if ((!S_ISDIR(ip->i_mode))
&& (tblk->flag & COMMIT_DELETE) == 0) {
filemap_fdatawait(ip->i_mapping);
filemap_fdatawrite(ip->i_mapping);
filemap_fdatawait(ip->i_mapping);
}
/*
* Mark inode as not dirty. It will still be on the dirty
......
......@@ -313,15 +313,12 @@ exp_export(struct nfsctl_export *nxp)
* either a device number (so FS_REQUIRES_DEV needed)
* or an FSID number (so NFSEXP_FSID needed).
* 2: We must be able to find an inode from a filehandle.
* either using fh_to_dentry (prefered)
* or using read_inode (the hack).
* This means that s_export_op must be set.
*/
if (((inode->i_sb->s_type->fs_flags & FS_REQUIRES_DEV)
|| (nxp->ex_flags & NFSEXP_FSID))
|| (nxp->ex_flags & NFSEXP_FSID))
&&
(inode->i_sb->s_op->read_inode
|| inode->i_sb->s_export_op
|| inode->i_sb->s_op->fh_to_dentry))
inode->i_sb->s_export_op)
/* Ok, we can export it */;
else {
dprintk("exp_export: export of invalid fs type.\n");
......
This diff is collapsed.
......@@ -2,6 +2,9 @@
# Makefile for native language support
#
O_TARGET = nls.o
export-objs := nls_base.o
obj-y := nls_base.o
obj-m :=
obj-n :=
......@@ -53,8 +56,4 @@ obj-$(CONFIG_NLS_KOI8_U) += nls_koi8-u.o nls_koi8-ru.o
obj-$(CONFIG_NLS_ABC) += nls_abc.o
obj-$(CONFIG_NLS_UTF8) += nls_utf8.o
export-objs = $(obj-y)
O_TARGET = nls.o
include $(TOPDIR)/Rules.make
......@@ -1441,14 +1441,7 @@ struct super_operations ntfs_sops = {
clear_inode: ntfs_clear_big_inode, /* VFS: Called when an inode is
removed from memory. */
umount_begin: NULL, /* Forced umount. */
/*
* These are NFSd support functions but NTFS is a standard fs so
* shouldn't need to implement these manually. At least we can try
* without and if it doesn't work in some way we can always implement
* something here.
*/
fh_to_dentry: NULL, /* Get dentry for given file handle. */
dentry_to_fh: NULL, /* Get file handle for given dentry. */
show_options: ntfs_show_options, /* Show mount options in proc. */
};
......
......@@ -58,7 +58,6 @@ static struct super_block *alloc_super(void)
s->s_count = S_BIAS;
atomic_set(&s->s_active, 1);
sema_init(&s->s_vfs_rename_sem,1);
sema_init(&s->s_nfsd_free_path_sem,1);
sema_init(&s->s_dquot.dqio_sem, 1);
sema_init(&s->s_dquot.dqoff_sem, 1);
s->s_maxbytes = MAX_NON_LFS;
......
......@@ -10,9 +10,9 @@
#include <linux/compiler.h>
#include <asm/byteorder.h>
extern long ___test_and_set_bit(unsigned long nr, volatile void *addr);
extern long ___test_and_clear_bit(unsigned long nr, volatile void *addr);
extern long ___test_and_change_bit(unsigned long nr, volatile void *addr);
extern long ___test_and_set_bit(unsigned long nr, volatile unsigned long *addr);
extern long ___test_and_clear_bit(unsigned long nr, volatile unsigned long *addr);
extern long ___test_and_change_bit(unsigned long nr, volatile unsigned long *addr);
#define test_and_set_bit(nr,addr) ({___test_and_set_bit(nr,addr)!=0;})
#define test_and_clear_bit(nr,addr) ({___test_and_clear_bit(nr,addr)!=0;})
......@@ -22,52 +22,64 @@ extern long ___test_and_change_bit(unsigned long nr, volatile void *addr);
#define change_bit(nr,addr) ((void)___test_and_change_bit(nr,addr))
/* "non-atomic" versions... */
#define __set_bit(X,Y) \
do { unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
*__m |= (1UL << (__nr & 63)); \
} while (0)
#define __clear_bit(X,Y) \
do { unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
*__m &= ~(1UL << (__nr & 63)); \
} while (0)
#define __change_bit(X,Y) \
do { unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
*__m ^= (1UL << (__nr & 63)); \
} while (0)
#define __test_and_set_bit(X,Y) \
({ unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
long __old = *__m; \
long __mask = (1UL << (__nr & 63)); \
*__m = (__old | __mask); \
((__old & __mask) != 0); \
})
#define __test_and_clear_bit(X,Y) \
({ unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
long __old = *__m; \
long __mask = (1UL << (__nr & 63)); \
*__m = (__old & ~__mask); \
((__old & __mask) != 0); \
})
#define __test_and_change_bit(X,Y) \
({ unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
long __old = *__m; \
long __mask = (1UL << (__nr & 63)); \
*__m = (__old ^ __mask); \
((__old & __mask) != 0); \
})
static __inline__ void __set_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
*m |= (1UL << (nr & 63));
}
static __inline__ void __clear_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
*m &= ~(1UL << (nr & 63));
}
static __inline__ void __change_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
*m ^= (1UL << (nr & 63));
}
static __inline__ int __test_and_set_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
long old = *m;
long mask = (1UL << (nr & 63));
*m = (old | mask);
return ((old & mask) != 0);
}
static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
long old = *m;
long mask = (1UL << (nr & 63));
*m = (old & ~mask);
return ((old & mask) != 0);
}
static __inline__ int __test_and_change_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
long old = *m;
long mask = (1UL << (nr & 63));
*m = (old ^ mask);
return ((old & mask) != 0);
}
#define smp_mb__before_clear_bit() do { } while(0)
#define smp_mb__after_clear_bit() do { } while(0)
static __inline__ int test_bit(int nr, __const__ void *addr)
static __inline__ int test_bit(int nr, __const__ volatile unsigned long *addr)
{
return (1UL & (((__const__ long *) addr)[nr >> 6] >> (nr & 63))) != 0UL;
return (1UL & ((addr)[nr >> 6] >> (nr & 63))) != 0UL;
}
/* The easy/cheese version for now. */
......@@ -177,9 +189,9 @@ static __inline__ unsigned int hweight8(unsigned int w)
* @offset: The bitnumber to start searching at
* @size: The maximum size to search
*/
static __inline__ unsigned long find_next_bit(void *addr, unsigned long size, unsigned long offset)
static __inline__ unsigned long find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset)
{
unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
unsigned long *p = addr + (offset >> 6);
unsigned long result = offset & ~63UL;
unsigned long tmp;
......@@ -231,9 +243,9 @@ static __inline__ unsigned long find_next_bit(void *addr, unsigned long size, un
* on Linus's ALPHA routines, which are pretty portable BTW.
*/
static __inline__ unsigned long find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
static __inline__ unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size, unsigned long offset)
{
unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
unsigned long *p = addr + (offset >> 6);
unsigned long result = offset & ~63UL;
unsigned long tmp;
......@@ -272,15 +284,15 @@ static __inline__ unsigned long find_next_zero_bit(void *addr, unsigned long siz
#define find_first_zero_bit(addr, size) \
find_next_zero_bit((addr), (size), 0)
extern long ___test_and_set_le_bit(int nr, volatile void *addr);
extern long ___test_and_clear_le_bit(int nr, volatile void *addr);
extern long ___test_and_set_le_bit(int nr, volatile unsigned long *addr);
extern long ___test_and_clear_le_bit(int nr, volatile unsigned long *addr);
#define test_and_set_le_bit(nr,addr) ({___test_and_set_le_bit(nr,addr)!=0;})
#define test_and_clear_le_bit(nr,addr) ({___test_and_clear_le_bit(nr,addr)!=0;})
#define set_le_bit(nr,addr) ((void)___test_and_set_le_bit(nr,addr))
#define clear_le_bit(nr,addr) ((void)___test_and_clear_le_bit(nr,addr))
static __inline__ int test_le_bit(int nr, __const__ void * addr)
static __inline__ int test_le_bit(int nr, __const__ unsigned long * addr)
{
int mask;
__const__ unsigned char *ADDR = (__const__ unsigned char *) addr;
......@@ -293,9 +305,9 @@ static __inline__ int test_le_bit(int nr, __const__ void * addr)
#define find_first_zero_le_bit(addr, size) \
find_next_zero_le_bit((addr), (size), 0)
static __inline__ unsigned long find_next_zero_le_bit(void *addr, unsigned long size, unsigned long offset)
static __inline__ unsigned long find_next_zero_le_bit(unsigned long *addr, unsigned long size, unsigned long offset)
{
unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
unsigned long *p = addr + (offset >> 6);
unsigned long result = offset & ~63UL;
unsigned long tmp;
......@@ -332,18 +344,22 @@ static __inline__ unsigned long find_next_zero_le_bit(void *addr, unsigned long
#ifdef __KERNEL__
#define ext2_set_bit test_and_set_le_bit
#define ext2_clear_bit test_and_clear_le_bit
#define ext2_test_bit test_le_bit
#define ext2_find_first_zero_bit find_first_zero_le_bit
#define ext2_find_next_zero_bit find_next_zero_le_bit
#define ext2_set_bit(nr,addr) test_and_set_le_bit((nr),(unsigned long *)(addr))
#define ext2_clear_bit(nr,addr) test_and_clear_le_bit((nr),(unsigned long *)(addr))
#define ext2_test_bit(nr,addr) test_le_bit((nr),(unsigned long *)(addr))
#define ext2_find_first_zero_bit(addr, size) \
find_first_zero_le_bit((unsigned long *)(addr), (size))
#define ext2_find_next_zero_bit(addr, size, off) \
find_next_zero_le_bit((unsigned long *)(addr), (size), (off))
/* Bitmap functions for the minix filesystem. */
#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
#define minix_set_bit(nr,addr) set_bit(nr,addr)
#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
#define minix_test_and_set_bit(nr,addr) test_and_set_bit((nr),(unsigned long *)(addr))
#define minix_set_bit(nr,addr) set_bit((nr),(unsigned long *)(addr))
#define minix_test_and_clear_bit(nr,addr) \
test_and_clear_bit((nr),(unsigned long *)(addr))
#define minix_test_bit(nr,addr) test_bit((nr),(unsigned long *)(addr))
#define minix_find_first_zero_bit(addr,size) \
find_first_zero_bit((unsigned long *)(addr),(size))
#endif /* __KERNEL__ */
......
......@@ -10,8 +10,6 @@
#include <asm/pstate.h>
#include <asm/ptrace.h>
#define AOFF_task_fpregs (((ASIZ_task) + (64 - 1)) & ~(64 - 1))
/* Clobbers %o5, %g1, %g2, %g3, %g7, %icc, %xcc */
#define VISEntry \
......
......@@ -660,15 +660,6 @@ struct super_block {
* even looking at it. You had been warned.
*/
struct semaphore s_vfs_rename_sem; /* Kludge */
/* The next field is used by knfsd when converting a (inode number based)
* file handle into a dentry. As it builds a path in the dcache tree from
* the bottom up, there may for a time be a subpath of dentrys which is not
* connected to the main tree. This semaphore ensure that there is only ever
* one such free path per filesystem. Note that unconnected files (or other
* non-directories) are allowed, but not unconnected diretories.
*/
struct semaphore s_nfsd_free_path_sem;
};
/*
......@@ -798,30 +789,6 @@ struct super_operations {
void (*clear_inode) (struct inode *);
void (*umount_begin) (struct super_block *);
/* Following are for knfsd to interact with "interesting" filesystems
* Currently just reiserfs, but possibly FAT and others later
*
* fh_to_dentry is given a filehandle fragement with length, and a type flag
* and must return a dentry for the referenced object or, if "parent" is
* set, a dentry for the parent of the object.
* If a dentry cannot be found, a "root" dentry should be created and
* flaged as DCACHE_DISCONNECTED. nfsd_iget is an example implementation.
*
* dentry_to_fh is given a dentry and must generate the filesys specific
* part of the file handle. Available length is passed in *lenp and used
* length should be returned therein.
* If need_parent is set, then dentry_to_fh should encode sufficient information
* to find the (current) parent.
* dentry_to_fh should return a 1byte "type" which will be passed back in
* the fhtype arguement to fh_to_dentry. Type of 0 is reserved.
* If filesystem was exportable before the introduction of fh_to_dentry,
* types 1 and 2 should be used is that same way as the generic code.
* Type 255 means error.
*
* Lengths are in units of 4bytes, not bytes.
*/
struct dentry * (*fh_to_dentry)(struct super_block *sb, __u32 *fh, int len, int fhtype, int parent);
int (*dentry_to_fh)(struct dentry *, __u32 *fh, int *lenp, int need_parent);
int (*show_options)(struct seq_file *, struct vfsmount *);
};
......
......@@ -459,6 +459,11 @@ extern void free_uid(struct user_struct *);
#include <asm/current.h>
/*
* The 64-bit value is not volatile - you MUST NOT read it
* without holding read_lock_irq(&xtime_lock)
*/
extern u64 jiffies_64;
extern unsigned long volatile jiffies;
extern unsigned long itimer_ticks;
extern unsigned long itimer_next;
......
......@@ -765,23 +765,25 @@ do { \
do { \
if (r) \
{ \
unsigned rtype ur_; \
X##_c = FP_CLS_NORMAL; \
\
if ((X##_s = (r < 0))) \
r = -r; \
\
ur_ = (unsigned rtype) r; \
if (rsize <= _FP_W_TYPE_SIZE) \
__FP_CLZ(X##_e, r); \
__FP_CLZ(X##_e, ur_); \
else \
__FP_CLZ_2(X##_e, (_FP_W_TYPE)(r >> _FP_W_TYPE_SIZE), \
(_FP_W_TYPE)r); \
__FP_CLZ_2(X##_e, (_FP_W_TYPE)(ur_ >> _FP_W_TYPE_SIZE), \
(_FP_W_TYPE)ur_); \
if (rsize < _FP_W_TYPE_SIZE) \
X##_e -= (_FP_W_TYPE_SIZE - rsize); \
X##_e = rsize - X##_e - 1; \
\
if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs < X##_e) \
__FP_FRAC_SRS_1(r, (X##_e - _FP_WFRACBITS_##fs + 1), rsize); \
_FP_FRAC_DISASSEMBLE_##wc(X, ((unsigned rtype)r), rsize); \
__FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\
_FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \
if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \
_FP_FRAC_SLL_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 1)); \
} \
......
......@@ -471,6 +471,7 @@ EXPORT_SYMBOL_GPL(idle_cpu);
EXPORT_SYMBOL_GPL(set_cpus_allowed);
#endif
EXPORT_SYMBOL(jiffies);
EXPORT_SYMBOL(jiffies_64);
EXPORT_SYMBOL(xtime);
EXPORT_SYMBOL(do_gettimeofday);
EXPORT_SYMBOL(do_settimeofday);
......
......@@ -67,7 +67,12 @@ unsigned long event;
extern int do_setitimer(int, struct itimerval *, struct itimerval *);
unsigned long volatile jiffies;
/*
* The 64-bit value is not volatile - you MUST NOT read it
* without holding read_lock_irq(&xtime_lock).
* jiffies is defined in the linker script...
*/
u64 jiffies_64;
unsigned int * prof_buffer;
unsigned long prof_len;
......@@ -664,7 +669,7 @@ void timer_bh(void)
void do_timer(struct pt_regs *regs)
{
(*(unsigned long *)&jiffies)++;
jiffies_64++;
#ifndef CONFIG_SMP
/* SMP process accounting uses the local APIC timer */
......
......@@ -14,8 +14,6 @@
* Missing: IPv6 support.
*/
#include <linux/config.h>
#if defined(CONFIG_SYN_COOKIES)
#include <linux/tcp.h>
#include <linux/slab.h>
#include <linux/random.h>
......@@ -194,4 +192,3 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
ret = get_cookie_sock(sk, skb, req, &rt->u.dst);
out: return ret;
}
#endif
......@@ -1518,7 +1518,6 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
NETDEBUG(if (net_ratelimit()) \
printk(KERN_DEBUG "TCP: drop open request from %u.%u.%u.%u/%u\n", \
NIPQUAD(saddr), ntohs(skb->h.th->source)));
TCP_INC_STATS_BH(TcpAttemptFails);
dst_release(dst);
goto drop_and_free;
}
......
......@@ -146,8 +146,8 @@ static int ingress_enqueue(struct sk_buff *skb,struct Qdisc *sch)
* Unlike normal "enqueue" functions, ingress_enqueue returns a
* firewall FW_* code.
*/
switch (result) {
#ifdef CONFIG_NET_CLS_POLICE
switch (result) {
case TC_POLICE_SHOT:
result = NF_DROP;
sch->stats.drops++;
......@@ -160,7 +160,7 @@ static int ingress_enqueue(struct sk_buff *skb,struct Qdisc *sch)
sch->stats.bytes += skb->len;
result = NF_ACCEPT;
break;
}
};
#else
sch->stats.packets++;
sch->stats.bytes += skb->len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment