Commit cf6aeaef authored by Andy Grover's avatar Andy Grover

Merge groveronline.com:/root/bk/linux-2.5

into groveronline.com:/root/bk/linux-acpi
parents 6efc0cac 2622cf1d
......@@ -813,7 +813,8 @@ static void __init do_boot_cpu (int apicid)
/* So we see what's up */
printk("Booting processor %d/%d eip %lx\n", cpu, apicid, start_eip);
stack_start.esp = (void *) (1024 + PAGE_SIZE + (char *)idle->thread_info);
/* Stack for startup_32 can be just as for start_secondary onwards */
stack_start.esp = (void *) idle->thread.esp;
/*
* This grunge runs the startup process for
......@@ -882,7 +883,7 @@ static void __init do_boot_cpu (int apicid)
Dprintk("CPU has booted.\n");
} else {
boot_error= 1;
if (*((volatile unsigned char *)phys_to_virt(8192))
if (*((volatile unsigned char *)trampoline_base)
== 0xA5)
/* trampoline started but...? */
printk("Stuck ??\n");
......@@ -904,7 +905,7 @@ static void __init do_boot_cpu (int apicid)
}
/* mark "stuck" area as not stuck */
*((volatile unsigned long *)phys_to_virt(8192)) = 0;
*((volatile unsigned long *)trampoline_base) = 0;
if(clustered_apic_mode) {
printk("Restoring NMI vector\n");
......
......@@ -3017,38 +3017,6 @@ sys32_ptrace (int request, pid_t pid, unsigned int addr, unsigned int data,
return ret;
}
static inline int
get_flock32(struct flock *kfl, struct flock32 *ufl)
{
int err;
if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)))
return -EFAULT;
err = __get_user(kfl->l_type, &ufl->l_type);
err |= __get_user(kfl->l_whence, &ufl->l_whence);
err |= __get_user(kfl->l_start, &ufl->l_start);
err |= __get_user(kfl->l_len, &ufl->l_len);
err |= __get_user(kfl->l_pid, &ufl->l_pid);
return err;
}
static inline int
put_flock32(struct flock *kfl, struct flock32 *ufl)
{
int err;
if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)))
return -EFAULT;
err = __put_user(kfl->l_type, &ufl->l_type);
err |= __put_user(kfl->l_whence, &ufl->l_whence);
err |= __put_user(kfl->l_start, &ufl->l_start);
err |= __put_user(kfl->l_len, &ufl->l_len);
err |= __put_user(kfl->l_pid, &ufl->l_pid);
return err;
}
extern asmlinkage long sys_fcntl (unsigned int fd, unsigned int cmd, unsigned long arg);
asmlinkage long
......@@ -3062,13 +3030,13 @@ sys32_fcntl (unsigned int fd, unsigned int cmd, unsigned int arg)
case F_GETLK:
case F_SETLK:
case F_SETLKW:
if (get_flock32(&f, (struct flock32 *) A(arg)))
if (get_compat_flock(&f, (struct compat_flock *) A(arg)))
return -EFAULT;
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_fcntl(fd, cmd, (unsigned long) &f);
set_fs(old_fs);
if (cmd == F_GETLK && put_flock32(&f, (struct flock32 *) A(arg)))
if (cmd == F_GETLK && put_compat_flock(&f, (struct compat_flock *) A(arg)))
return -EFAULT;
return ret;
......
......@@ -247,30 +247,6 @@ asmlinkage long sys32_writev(int fd, struct iovec32 *vector, u32 count)
return ret;
}
static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
{
int err;
err = get_user(kfl->l_type, &ufl->l_type);
err |= __get_user(kfl->l_whence, &ufl->l_whence);
err |= __get_user(kfl->l_start, &ufl->l_start);
err |= __get_user(kfl->l_len, &ufl->l_len);
err |= __get_user(kfl->l_pid, &ufl->l_pid);
return err;
}
static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
{
int err;
err = __put_user(kfl->l_type, &ufl->l_type);
err |= __put_user(kfl->l_whence, &ufl->l_whence);
err |= __put_user(kfl->l_start, &ufl->l_start);
err |= __put_user(kfl->l_len, &ufl->l_len);
err |= __put_user(kfl->l_pid, &ufl->l_pid);
return err;
}
extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
{
......@@ -283,12 +259,12 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
mm_segment_t old_fs;
long ret;
if(get_flock(&f, (struct flock32 *)arg))
if(get_compat_flock(&f, (struct compat_flock *)arg))
return -EFAULT;
old_fs = get_fs(); set_fs (KERNEL_DS);
ret = sys_fcntl(fd, cmd, (unsigned long)&f);
set_fs (old_fs);
if(put_flock(&f, (struct flock32 *)arg))
if(put_compat_flock(&f, (struct compat_flock *)arg))
return -EFAULT;
return ret;
}
......
......@@ -833,30 +833,6 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
return err;
}
static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
{
int err;
err = get_user(kfl->l_type, &ufl->l_type);
err |= __get_user(kfl->l_whence, &ufl->l_whence);
err |= __get_user(kfl->l_start, &ufl->l_start);
err |= __get_user(kfl->l_len, &ufl->l_len);
err |= __get_user(kfl->l_pid, &ufl->l_pid);
return err;
}
static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
{
int err;
err = __put_user(kfl->l_type, &ufl->l_type);
err |= __put_user(kfl->l_whence, &ufl->l_whence);
err |= __put_user(kfl->l_start, &ufl->l_start);
err |= __put_user(kfl->l_len, &ufl->l_len);
err |= __put_user(kfl->l_pid, &ufl->l_pid);
return err;
}
extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
......@@ -868,7 +844,7 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
mm_segment_t old_fs;
long ret;
if(get_flock(&f, (struct flock32 *)A(arg)))
if(get_compat_flock(&f, (struct compat_flock *)A(arg)))
return -EFAULT;
old_fs = get_fs(); set_fs (KERNEL_DS);
ret = sys_fcntl(fd, cmd, (unsigned long)&f);
......@@ -877,7 +853,7 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
if (f.l_start >= 0x7fffffffUL ||
f.l_start + f.l_len >= 0x7fffffffUL)
return -EOVERFLOW;
if(put_flock(&f, (struct flock32 *)A(arg)))
if(put_compat_flock(&f, (struct compat_flock *)A(arg)))
return -EFAULT;
return 0;
}
......@@ -888,7 +864,7 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
mm_segment_t old_fs;
long ret;
if(get_flock(&f, (struct flock32 *)A(arg)))
if(get_compat_flock(&f, (struct compat_flock *)A(arg)))
return -EFAULT;
old_fs = get_fs(); set_fs (KERNEL_DS);
ret = sys_fcntl(fd, cmd, (unsigned long)&f);
......
......@@ -25,15 +25,6 @@ struct ipc_kludge_32 {
#define F_SETLK64 13
#define F_SETLKW64 14
struct flock32 {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
short __unused;
};
struct statfs32 {
__s32 f_type;
__s32 f_bsize;
......
......@@ -1066,30 +1066,6 @@ sys32_getrusage(int who, struct rusage32 *ru)
return ret;
}
static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
{
int err;
err = get_user(kfl->l_type, &ufl->l_type);
err |= __get_user(kfl->l_whence, &ufl->l_whence);
err |= __get_user(kfl->l_start, &ufl->l_start);
err |= __get_user(kfl->l_len, &ufl->l_len);
err |= __get_user(kfl->l_pid, &ufl->l_pid);
return err;
}
static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
{
int err;
err = __put_user(kfl->l_type, &ufl->l_type);
err |= __put_user(kfl->l_whence, &ufl->l_whence);
err |= __put_user(kfl->l_start, &ufl->l_start);
err |= __put_user(kfl->l_len, &ufl->l_len);
err |= __put_user(kfl->l_pid, &ufl->l_pid);
return err;
}
extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg);
......@@ -1105,13 +1081,13 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
mm_segment_t old_fs;
long ret;
if (get_flock(&f, (struct flock32 *)arg))
if (get_compat_flock(&f, (struct compat_flock *)arg))
return -EFAULT;
old_fs = get_fs(); set_fs (KERNEL_DS);
ret = sys_fcntl(fd, cmd, (unsigned long)&f);
set_fs (old_fs);
if (ret) return ret;
if (put_flock(&f, (struct flock32 *)arg))
if (put_compat_flock(&f, (struct compat_flock *)arg))
return -EFAULT;
return 0;
}
......
#
# Makefile for the Linux PCMCIA SCSI drivers.
#
obj-y :=
obj-m :=
obj-n :=
obj- :=
vpath %c ..
CFLAGS_aha152x.o = -DPCMCIA -D__NO_VERSION__ -DAHA152X_STAT
CFLAGS_fdomain.o = -DPCMCIA -D__NO_VERSION__
CFLAGS_qlogicfas.o = -DPCMCIA -D__NO_VERSION__
EXTRA_CFLAGS += -Idrivers/scsi
# 16-bit client drivers
obj-$(CONFIG_PCMCIA_QLOGIC) += qlogic_cs.o
......@@ -19,6 +7,6 @@ obj-$(CONFIG_PCMCIA_FDOMAIN) += fdomain_cs.o
obj-$(CONFIG_PCMCIA_AHA152X) += aha152x_cs.o
obj-$(CONFIG_PCMCIA_NINJA_SCSI) += nsp_cs.o
aha152x_cs-objs := aha152x_stub.o aha152x.o
fdomain_cs-objs := fdomain_stub.o fdomain.o
qlogic_cs-objs := qlogic_stub.o qlogicfas.o
aha152x_cs-objs := aha152x_stub.o aha152x_core.o
fdomain_cs-objs := fdomain_stub.o fdomain_core.o
qlogic_cs-objs := qlogic_stub.o qlogic_core.o
#define PCMCIA 1
#define AHA152X_STAT 1
#include "aha152x.c"
......@@ -45,11 +45,10 @@
#include <scsi/scsi.h>
#include <linux/major.h>
#include <linux/blk.h>
#include <../drivers/scsi/scsi.h>
#include <../drivers/scsi/hosts.h>
#include <scsi/scsi_ioctl.h>
#include <../drivers/scsi/aha152x.h>
#include "scsi.h"
#include "hosts.h"
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
......@@ -112,7 +111,8 @@ static int aha152x_event(event_t event, int priority,
static dev_link_t *aha152x_attach(void);
static void aha152x_detach(dev_link_t *);
static Scsi_Host_Template driver_template = AHA152X;
#define driver_template aha152x_driver_template
extern Scsi_Host_Template aha152x_driver_template;
static dev_link_t *dev_list = NULL;
......
#define PCMCIA 1
#include "fdomain.c"
......@@ -42,11 +42,10 @@
#include <scsi/scsi.h>
#include <linux/major.h>
#include <linux/blk.h>
#include <../drivers/scsi/scsi.h>
#include <../drivers/scsi/hosts.h>
#include <scsi/scsi_ioctl.h>
#include <../drivers/scsi/fdomain.h>
#include "scsi.h"
#include "hosts.h"
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
......
......@@ -50,8 +50,8 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <../drivers/scsi/scsi.h>
#include <../drivers/scsi/hosts.h>
#include "scsi.h"
#include "hosts.h"
#include <scsi/scsi.h>
#include <scsi/scsi_ioctl.h>
......
......@@ -15,6 +15,8 @@
#ifndef __nsp_cs__
#define __nsp_cs__
#include <linux/version.h>
/* for debugging */
//#define PCMCIA_DEBUG 9
......
#define PCMCIA 1
#include "qlogicfas.c"
......@@ -43,12 +43,10 @@
#include <scsi/scsi.h>
#include <linux/major.h>
#include <linux/blk.h>
#include <../drivers/scsi/scsi.h>
#include <../drivers/scsi/hosts.h>
#include <scsi/scsi_ioctl.h>
#include <../drivers/scsi/qlogicfas.h>
#include "scsi.h"
#include "hosts.h"
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
......
......@@ -16,6 +16,7 @@
#include <linux/errno.h>
#include <linux/time.h>
#include <linux/fs.h>
#include <linux/fcntl.h>
#include <asm/uaccess.h>
......@@ -70,3 +71,33 @@ asmlinkage long compat_sys_newfstat(unsigned int fd,
error = cp_compat_stat(&stat, statbuf);
return error;
}
int get_compat_flock(struct flock *kfl, struct compat_flock *ufl)
{
int err;
if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)))
return -EFAULT;
err = __get_user(kfl->l_type, &ufl->l_type);
err |= __get_user(kfl->l_whence, &ufl->l_whence);
err |= __get_user(kfl->l_start, &ufl->l_start);
err |= __get_user(kfl->l_len, &ufl->l_len);
err |= __get_user(kfl->l_pid, &ufl->l_pid);
return err;
}
int put_compat_flock(struct flock *kfl, struct compat_flock *ufl)
{
int err;
if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)))
return -EFAULT;
err = __put_user(kfl->l_type, &ufl->l_type);
err |= __put_user(kfl->l_whence, &ufl->l_whence);
err |= __put_user(kfl->l_start, &ufl->l_start);
err |= __put_user(kfl->l_len, &ufl->l_len);
err |= __put_user(kfl->l_pid, &ufl->l_pid);
return err;
}
......@@ -79,6 +79,7 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
*/
static int hugetlbfs_readpage(struct file *file, struct page * page)
{
unlock_page(page);
return -EINVAL;
}
......
......@@ -16,7 +16,8 @@
#define APIC_MISMATCH_DEBUG
#define IO_APIC_BASE(idx) \
((volatile int *)__fix_to_virt(FIX_IO_APIC_BASE_0 + idx))
((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
/*
* The structure of the IO-APIC:
......
......@@ -53,4 +53,12 @@ struct compat_stat {
u32 __unused5;
};
struct compat_flock {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
};
#endif /* _ASM_IA64_COMPAT_H */
......@@ -29,15 +29,6 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
#define IA32_PAGE_ALIGN(addr) (((addr) + IA32_PAGE_SIZE - 1) & IA32_PAGE_MASK)
#define IA32_CLOCKS_PER_SEC 100 /* Cast in stone for IA32 Linux */
/* fcntl.h */
struct flock32 {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
};
#define F_GETLK64 12
#define F_SETLK64 13
#define F_SETLKW64 14
......
......@@ -55,4 +55,13 @@ struct compat_stat {
u32 __unused4[2];
};
struct compat_flock {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
short __unused;
};
#endif /* _ASM_PPC64_COMPAT_H */
......@@ -141,15 +141,6 @@ typedef struct sigaltstack_32 {
compat_size_t ss_size;
} stack_32_t;
struct flock32 {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
short __unused;
};
struct sigcontext32 {
unsigned int _unused[4];
int signal;
......
......@@ -58,4 +58,13 @@ struct compat_stat {
u32 __unused5;
};
struct compat_flock {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
short __unused;
};
#endif /* _ASM_S390X_COMPAT_H */
......@@ -54,4 +54,12 @@ struct compat_stat {
u32 __unused5;
};
struct compat_flock {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
};
#endif /* _ASM_X86_64_COMPAT_H */
......@@ -22,16 +22,6 @@ typedef long __kernel_loff_t32;
typedef __kernel_fsid_t __kernel_fsid_t32;
/* fcntl.h */
struct flock32 {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
};
struct ia32_flock64 {
short l_type;
short l_whence;
......
......@@ -10,6 +10,7 @@
#include <linux/stat.h>
#include <linux/param.h> /* for HZ */
#include <linux/fcntl.h> /* for struct flock */
#include <asm/compat.h>
#define compat_jiffies_to_clock_t(x) \
......@@ -33,6 +34,8 @@ struct compat_tms {
};
extern int cp_compat_stat(struct kstat *, struct compat_stat *);
extern int get_compat_flock(struct flock *, struct compat_flock *);
extern int put_compat_flock(struct flock *, struct compat_flock *);
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */
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