Commit 40b283ee authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge kroah.com:/home/linux/linux/BK/bleed-2.5

into kroah.com:/home/linux/linux/BK/gregkh-2.5
parents 5a8a7173 8e368e79
......@@ -59,6 +59,7 @@ choice
Jensen DECpc 150, DEC 2000 model 300,
DEC 2000 model 500
LX164 AlphaPC164-LX
Lynx AS 2100A
Miata Personal Workstation 433a, 433au, 500a,
500au, 600a, or 600au
Marvel AlphaServer ES47 / ES80 / GS1280
......@@ -169,6 +170,11 @@ config ALPHA_LX164
A technical overview of this board is available at
<http://www.unix-ag.org/Linux-Alpha/Architectures/LX164.html>.
config ALPHA_LYNX
bool "Lynx"
help
AlphaServer 2100A-based systems.
config ALPHA_MARVEL
bool "Marvel"
help
......@@ -263,22 +269,6 @@ config ISA
(MCA) or VESA. ISA is an older system, now being displaced by PCI;
newer boards don't support it. If you have ISA, say Y, otherwise N.
config EISA
bool
default y
---help---
The Extended Industry Standard Architecture (EISA) bus was
developed as an open alternative to the IBM MicroChannel bus.
The EISA bus provided some of the features of the IBM MicroChannel
bus while maintaining backward compatibility with cards made for
the older ISA bus. The EISA bus saw limited use between 1988 and
1995 when it was made obsolete by the PCI bus.
Say Y here if you are building a kernel for an EISA-based machine.
Otherwise, say N.
config SBUS
bool
......@@ -325,8 +315,8 @@ config ALPHA_NONAME
config ALPHA_EV4
bool
depends on ALPHA_JENSEN || ALPHA_SABLE && !ALPHA_GAMMA || ALPHA_NORITAKE && !ALPHA_PRIMO || ALPHA_MIKASA && !ALPHA_PRIMO || ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P_CH || ALPHA_XL || ALPHA_NONAME || ALPHA_EB66 || ALPHA_EB66P || ALPHA_P2K
default y
depends on ALPHA_JENSEN || (ALPHA_SABLE && !ALPHA_GAMMA) || ALPHA_LYNX || ALPHA_NORITAKE && !ALPHA_PRIMO || ALPHA_MIKASA && !ALPHA_PRIMO || ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P_CH || ALPHA_XL || ALPHA_NONAME || ALPHA_EB66 || ALPHA_EB66P || ALPHA_P2K
default y if !ALPHA_LYNX
config ALPHA_LCA
bool
......@@ -351,9 +341,12 @@ config ALPHA_EB64P
Runs from standard PC power supply.
config ALPHA_EV5
bool "EV5 CPU(s) (model 5/xxx)?" if ALPHA_LYNX
default y if ALPHA_RX164 || ALPHA_RAWHIDE || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_RUFFIAN || ALPHA_SABLE && ALPHA_GAMMA || ALPHA_NORITAKE && ALPHA_PRIMO || ALPHA_MIKASA && ALPHA_PRIMO || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR
config ALPHA_EV4
bool
depends on ALPHA_RX164 || ALPHA_RAWHIDE || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_RUFFIAN || ALPHA_SABLE && ALPHA_GAMMA || ALPHA_NORITAKE && ALPHA_PRIMO || ALPHA_MIKASA && ALPHA_PRIMO || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR
default y
default y if ALPHA_LYNX && !ALPHA_EV5
config ALPHA_CIA
bool
......@@ -384,9 +377,14 @@ config ALPHA_GAMMA
help
Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx.
config ALPHA_GAMMA
bool
depends on ALPHA_LYNX
default y
config ALPHA_T2
bool
depends on ALPHA_SABLE
depends on ALPHA_SABLE || ALPHA_LYNX
default y
config ALPHA_PYXIS
......@@ -431,9 +429,23 @@ config ALPHA_IRONGATE
depends on ALPHA_NAUTILUS
default y
config ALPHA_AVANTI
bool
depends on ALPHA_XL || ALPHA_AVANTI_CH
default y
help
Avanti AS 200, AS 205, AS 250, AS 255, AS 300, and AS 400-based
Alphas. Info at
<http://www.unix-ag.org/Linux-Alpha/Architectures/Avanti.html>.
config ALPHA_BROKEN_IRQ_MASK
bool
depends on ALPHA_GENERIC || ALPHA_PC164
default y
config ALPHA_SRM
bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME
default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL
default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL
---help---
There are two different types of booting firmware on Alphas: SRM,
which is command line driven, and ARC, which uses menus and arrow
......@@ -459,28 +471,26 @@ config EARLY_PRINTK
depends on ALPHA_GENERIC || ALPHA_SRM
default y
config ALPHA_EISA
config EISA
bool
depends on ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_RAWHIDE
depends on ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_RAWHIDE
default y
---help---
The Extended Industry Standard Architecture (EISA) bus was
developed as an open alternative to the IBM MicroChannel bus.
config ALPHA_AVANTI
bool
depends on ALPHA_XL || ALPHA_AVANTI_CH
default y
help
Avanti AS 200, AS 205, AS 250, AS 255, AS 300, and AS 400-based
Alphas. Info at
<http://www.unix-ag.org/Linux-Alpha/Architectures/Avanti.html>.
The EISA bus provided some of the features of the IBM MicroChannel
bus while maintaining backward compatibility with cards made for
the older ISA bus. The EISA bus saw limited use between 1988 and
1995 when it was made obsolete by the PCI bus.
config ALPHA_BROKEN_IRQ_MASK
bool
depends on ALPHA_GENERIC || ALPHA_PC164
default y
Say Y here if you are building a kernel for an EISA-based machine.
Otherwise, say N.
config SMP
bool "Symmetric multi-processing support"
depends on ALPHA_SABLE || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL
depends on ALPHA_SABLE || ALPHA_LYNX || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL
---help---
This enables support for systems with more than one CPU. If you have
a system with only one CPU, like most personal computers, say N. If
......
......@@ -83,6 +83,7 @@ obj-$(CONFIG_ALPHA_RAWHIDE) += sys_rawhide.o irq_i8259.o
obj-$(CONFIG_ALPHA_RUFFIAN) += sys_ruffian.o irq_pyxis.o irq_i8259.o
obj-$(CONFIG_ALPHA_RX164) += sys_rx164.o irq_i8259.o
obj-$(CONFIG_ALPHA_SABLE) += sys_sable.o
obj-$(CONFIG_ALPHA_LYNX) += sys_sable.o
obj-$(CONFIG_ALPHA_BOOK1) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o
obj-$(CONFIG_ALPHA_AVANTI) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o
obj-$(CONFIG_ALPHA_NONAME) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o
......
This diff is collapsed.
......@@ -19,6 +19,7 @@
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/bootmem.h>
#include <linux/module.h>
#include <linux/cache.h>
#include <asm/machvec.h>
......
......@@ -76,6 +76,7 @@ extern void polaris_machine_check(u64, u64, struct pt_regs *);
/* core_t2.c */
extern struct pci_ops t2_pci_ops;
extern void t2_init_arch(void);
extern void t2_kill_arch(int);
extern void t2_machine_check(u64, u64, struct pt_regs *);
extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
......
......@@ -162,6 +162,7 @@ WEAK(eb66p_mv);
WEAK(eiger_mv);
WEAK(jensen_mv);
WEAK(lx164_mv);
WEAK(lynx_mv);
WEAK(marvel_ev7_mv);
WEAK(miata_mv);
WEAK(mikasa_mv);
......@@ -268,7 +269,7 @@ move_initrd(unsigned long mem_limit)
unsigned long size;
size = initrd_end - initrd_start;
start = __alloc_bootmem(size, PAGE_SIZE, 0);
start = __alloc_bootmem(PAGE_ALIGN(size), PAGE_SIZE, 0);
if (!start || __pa(start) + size > mem_limit) {
initrd_start = initrd_end = 0;
return NULL;
......@@ -739,7 +740,7 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu)
NULL, /* Turbolaser */
&avanti_mv,
NULL, /* Mustang */
&alcor_mv, /* Alcor, Bret, Maverick. */
NULL, /* Alcor, Bret, Maverick. HWRPB inaccurate? */
NULL, /* Tradewind */
NULL, /* Mikasa -- see below. */
NULL, /* EB64 */
......@@ -748,7 +749,7 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu)
&alphabook1_mv,
&rawhide_mv,
NULL, /* K2 */
NULL, /* Lynx */
&lynx_mv, /* Lynx */
&xl_mv,
NULL, /* EB164 -- see variation. */
NULL, /* Noritake -- see below. */
......@@ -930,6 +931,7 @@ get_sysvec_byname(const char *name)
&eiger_mv,
&jensen_mv,
&lx164_mv,
&lynx_mv,
&miata_mv,
&mikasa_mv,
&mikasa_primo_mv,
......
......@@ -132,11 +132,13 @@ common_init_irq(void (*srm_dev_int)(unsigned long v, struct pt_regs *r))
setup_irq(16+4, &isa_cascade_irqaction);
}
#ifndef CONFIG_ALPHA_PC164
static void __init
cabriolet_init_irq(void)
{
common_init_irq(srm_device_interrupt);
}
#endif
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_PC164)
/* In theory, the PC164 has the same interrupt hardware as the other
......
This diff is collapsed.
......@@ -324,7 +324,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
int idx;
err = -EFAULT;
if (copy_from_user(&info, (void *)childregs->esi, sizeof(info)))
if (copy_from_user(&info, (void __user *)childregs->esi, sizeof(info)))
goto out;
err = -EINVAL;
if (LDT_empty(&info))
......@@ -567,11 +567,14 @@ asmlinkage int sys_execve(struct pt_regs regs)
int error;
char * filename;
filename = getname((char *) regs.ebx);
filename = getname((char __user *) regs.ebx);
error = PTR_ERR(filename);
if (IS_ERR(filename))
goto out;
error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);
error = do_execve(filename,
(char __user * __user *) regs.ecx,
(char __user * __user *) regs.edx,
&regs);
if (error == 0) {
current->ptrace &= ~PT_DTRACE;
/* Make sure we don't return using sysenter.. */
......@@ -633,7 +636,7 @@ static int get_free_idx(void)
/*
* Set a given TLS descriptor:
*/
asmlinkage int sys_set_thread_area(struct user_desc *u_info)
asmlinkage int sys_set_thread_area(struct user_desc __user *u_info)
{
struct thread_struct *t = &current->thread;
struct user_desc info;
......@@ -700,7 +703,7 @@ asmlinkage int sys_set_thread_area(struct user_desc *u_info)
#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
asmlinkage int sys_get_thread_area(struct user_desc *u_info)
asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
{
struct user_desc info;
struct desc_struct *desc;
......
......@@ -12,6 +12,7 @@
#include <linux/sched.h>
#include <linux/gfp.h>
#include <linux/string.h>
#include <linux/elf.h>
#include <asm/cpufeature.h>
#include <asm/msr.h>
......@@ -52,11 +53,47 @@ void enable_sep_cpu(void *info)
static int __init sysenter_setup(void)
{
static const char int80[] = {
static const char __initdata int80[] = {
0xcd, 0x80, /* int $0x80 */
0xc3 /* ret */
};
static const char sysent[] = {
/* Unwind information for the int80 code. Keep track of
where the return address is stored. */
static const char __initdata int80_eh_frame[] = {
/* First the Common Information Entry (CIE): */
0x14, 0x00, 0x00, 0x00, /* Length of the CIE */
0x00, 0x00, 0x00, 0x00, /* CIE Identifier Tag */
0x01, /* CIE Version */
'z', 'R', 0x00, /* CIE Augmentation */
0x01, /* CIE Code Alignment Factor */
0x7c, /* CIE Data Alignment Factor */
0x08, /* CIE RA Column */
0x01, /* Augmentation size */
0x1b, /* FDE Encoding (pcrel sdata4) */
0x0c, /* DW_CFA_def_cfa */
0x04,
0x04,
0x88, /* DW_CFA_offset, column 0x8 */
0x01,
0x00, /* padding */
0x00,
/* Now the FDE which contains the instructions for the frame. */
0x0a, 0x00, 0x00, 0x00, /* FDE Length */
0x1c, 0x00, 0x00, 0x00, /* FDE CIE offset */
/* The PC-relative offset to the beginning of the code this
FDE covers. The computation below assumes that the offset
can be represented in one byte. Change if this is not true
anymore. The offset from the beginning of the .eh_frame
is represented by EH_FRAME_OFFSET. The word with the offset
starts at byte 0x20 of the .eh_frame. */
0x100 - (EH_FRAME_OFFSET + 0x20),
0xff, 0xff, 0xff, /* FDE initial location */
3, /* FDE address range */
0x00 /* Augmentation size */
/* The code does not change the stack pointer. We need not
record any operations. */
};
static const char __initdata sysent[] = {
0x51, /* push %ecx */
0x52, /* push %edx */
0x55, /* push %ebp */
......@@ -76,13 +113,71 @@ static int __init sysenter_setup(void)
0x59, /* pop %ecx */
0xc3 /* ret */
};
static const char sigreturn[] = {
/* Unwind information for the sysenter code. Keep track of
where the return address is stored. */
static const char __initdata sysent_eh_frame[] = {
/* First the Common Information Entry (CIE): */
0x14, 0x00, 0x00, 0x00, /* Length of the CIE */
0x00, 0x00, 0x00, 0x00, /* CIE Identifier Tag */
0x01, /* CIE Version */
'z', 'R', 0x00, /* CIE Augmentation */
0x01, /* CIE Code Alignment Factor */
0x7c, /* CIE Data Alignment Factor */
0x08, /* CIE RA Column */
0x01, /* Augmentation size */
0x1b, /* FDE Encoding (pcrel sdata4) */
0x0c, /* DW_CFA_def_cfa */
0x04,
0x04,
0x88, /* DW_CFA_offset, column 0x8 */
0x01,
0x00, /* padding */
0x00,
/* Now the FDE which contains the instructions for the frame. */
0x22, 0x00, 0x00, 0x00, /* FDE Length */
0x1c, 0x00, 0x00, 0x00, /* FDE CIE offset */
/* The PC-relative offset to the beginning of the code this
FDE covers. The computation below assumes that the offset
can be represented in one byte. Change if this is not true
anymore. The offset from the beginning of the .eh_frame
is represented by EH_FRAME_OFFSET. The word with the offset
starts at byte 0x20 of the .eh_frame. */
0x100 - (EH_FRAME_OFFSET + 0x20),
0xff, 0xff, 0xff, /* FDE initial location */
0x14, 0x00, 0x00, 0x00, /* FDE address range */
0x00, /* Augmentation size */
/* What follows are the instructions for the table generation.
We have to record all changes of the stack pointer and
callee-saved registers. */
0x41, /* DW_CFA_advance_loc+1, push %ecx */
0x0e, /* DW_CFA_def_cfa_offset */
0x08, /* RA at offset 8 now */
0x41, /* DW_CFA_advance_loc+1, push %edx */
0x0e, /* DW_CFA_def_cfa_offset */
0x0c, /* RA at offset 12 now */
0x41, /* DW_CFA_advance_loc+1, push %ebp */
0x0e, /* DW_CFA_def_cfa_offset */
0x10, /* RA at offset 16 now */
0x85, 0x04, /* DW_CFA_offset %ebp -16 */
/* Finally the epilogue. */
0x4e, /* DW_CFA_advance_loc+14, pop %ebx */
0x0e, /* DW_CFA_def_cfa_offset */
0x12, /* RA at offset 12 now */
0xc5, /* DW_CFA_restore %ebp */
0x41, /* DW_CFA_advance_loc+1, pop %edx */
0x0e, /* DW_CFA_def_cfa_offset */
0x08, /* RA at offset 8 now */
0x41, /* DW_CFA_advance_loc+1, pop %ecx */
0x0e, /* DW_CFA_def_cfa_offset */
0x04 /* RA at offset 4 now */
};
static const char __initdata sigreturn[] = {
/* 32: sigreturn point */
0x58, /* popl %eax */
0xb8, __NR_sigreturn, 0, 0, 0, /* movl $__NR_sigreturn, %eax */
0xcd, 0x80, /* int $0x80 */
};
static const char rt_sigreturn[] = {
static const char __initdata rt_sigreturn[] = {
/* 64: rt_sigreturn point */
0xb8, __NR_rt_sigreturn, 0, 0, 0, /* movl $__NR_rt_sigreturn, %eax */
0xcd, 0x80, /* int $0x80 */
......@@ -93,10 +188,14 @@ static int __init sysenter_setup(void)
memcpy((void *) page, int80, sizeof(int80));
memcpy((void *)(page + 32), sigreturn, sizeof(sigreturn));
memcpy((void *)(page + 64), rt_sigreturn, sizeof(rt_sigreturn));
memcpy((void *)(page + EH_FRAME_OFFSET), int80_eh_frame,
sizeof(int80_eh_frame));
if (!boot_cpu_has(X86_FEATURE_SEP))
return 0;
memcpy((void *) page, sysent, sizeof(sysent));
memcpy((void *)(page + EH_FRAME_OFFSET), sysent_eh_frame,
sizeof(sysent_eh_frame));
on_each_cpu(enable_sep_cpu, NULL, 1, 1);
return 0;
}
......
......@@ -439,8 +439,8 @@ ia32_syscall_table:
data8 sys_ni_syscall
data8 sys_ni_syscall
data8 compat_sys_futex /* 240 */
data8 sys_ni_syscall
data8 sys_ni_syscall
data8 compat_sys_setaffinity
data8 compat_sys_getaffinity
data8 sys_ni_syscall
data8 sys_ni_syscall
data8 sys_ni_syscall /* 245 */
......
......@@ -598,8 +598,8 @@ sys_call_table:
ENTRY_SAME(sendfile64)
ENTRY_COMP(futex) /* 210 */
ENTRY_SAME(sched_setaffinity)
ENTRY_SAME(sched_getaffinity)
ENTRY_COMP(sched_setaffinity)
ENTRY_COMP(sched_getaffinity)
ENTRY_SAME(ni_syscall)
ENTRY_SAME(ni_syscall)
ENTRY_SAME(io_setup) /* 215 */
......
......@@ -724,8 +724,8 @@ _GLOBAL(sys_call_table32)
.llong .sys_lremovexattr
.llong .sys_fremovexattr /* 220 */
.llong .compat_sys_futex
.llong .sys32_sched_setaffinity
.llong .sys32_sched_getaffinity
.llong .compat_sys_sched_setaffinity
.llong .compat_sys_sched_getaffinity
.llong .sys_ni_syscall
.llong .sys_ni_syscall /* 225 - reserved for tux */
.llong .sys32_sendfile64
......
......@@ -2780,56 +2780,6 @@ asmlinkage long sys32_time(compat_time_t* tloc)
return secs;
}
extern asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len,
unsigned long *user_mask_ptr);
asmlinkage long sys32_sched_setaffinity(compat_pid_t pid, unsigned int len,
u32 *user_mask_ptr)
{
unsigned long kernel_mask;
mm_segment_t old_fs;
int ret;
if (get_user(kernel_mask, user_mask_ptr))
return -EFAULT;
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_sched_setaffinity(pid,
/* XXX Nice api... */
sizeof(kernel_mask),
&kernel_mask);
set_fs(old_fs);
return ret;
}
extern asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
unsigned long *user_mask_ptr);
asmlinkage long sys32_sched_getaffinity(compat_pid_t pid, unsigned int len,
u32 *user_mask_ptr)
{
unsigned long kernel_mask;
mm_segment_t old_fs;
int ret;
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_sched_getaffinity(pid,
/* XXX Nice api... */
sizeof(kernel_mask),
&kernel_mask);
set_fs(old_fs);
if (ret > 0) {
if (put_user(kernel_mask, user_mask_ptr))
ret = -EFAULT;
}
return ret;
}
int sys32_olduname(struct oldold_utsname * name)
{
int error;
......
......@@ -2831,56 +2831,6 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 *args)
return error;
}
extern asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len,
unsigned long *user_mask_ptr);
asmlinkage long sys32_sched_setaffinity(compat_pid_t pid, unsigned int len,
u32 *user_mask_ptr)
{
unsigned long kernel_mask;
mm_segment_t old_fs;
int ret;
if (get_user(kernel_mask, user_mask_ptr))
return -EFAULT;
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_sched_setaffinity(pid,
/* XXX Nice api... */
sizeof(kernel_mask),
&kernel_mask);
set_fs(old_fs);
return ret;
}
extern asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
unsigned long *user_mask_ptr);
asmlinkage long sys32_sched_getaffinity(compat_pid_t pid, unsigned int len,
u32 *user_mask_ptr)
{
unsigned long kernel_mask;
mm_segment_t old_fs;
int ret;
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_sched_getaffinity(pid,
/* XXX Nice api... */
sizeof(kernel_mask),
&kernel_mask);
set_fs(old_fs);
if (ret > 0) {
if (put_user(kernel_mask, user_mask_ptr))
ret = -EFAULT;
}
return ret;
}
extern long sys_lookup_dcookie(u64 cookie64, char *buf, size_t len);
long sys32_lookup_dcookie(u32 cookie_high, u32 cookie_low, char *buf, size_t len)
......
......@@ -51,7 +51,7 @@ sys_call_table32:
.word sys32_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write
/*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64
.word compat_sys_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount
/*160*/ .word sys32_sched_setaffinity, sys32_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall
/*160*/ .word compat_sys_sched_setaffinity, compat_sys_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall
.word sys_quotactl, sys_set_tid_address, sys32_mount, sys_ustat, sys_setxattr
/*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys32_getdents
.word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr
......
......@@ -445,8 +445,8 @@ ia32_sys_call_table:
.quad sys_tkill /* 238 */
.quad sys_sendfile64
.quad compat_sys_futex /* 240 */
.quad sys32_sched_setaffinity
.quad sys32_sched_getaffinity
.quad compat_sys_sched_setaffinity
.quad compat_sys_sched_getaffinity
.quad sys32_set_thread_area
.quad sys32_get_thread_area
.quad sys32_io_setup
......
......@@ -2038,41 +2038,6 @@ long sys32_module_warning(void)
return -ENOSYS ;
}
long sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr);
long sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr);
/* only works on LE */
long sys32_sched_setaffinity(pid_t pid, unsigned int len,
unsigned int *new_mask_ptr)
{
mm_segment_t oldfs = get_fs();
unsigned long mask;
int err;
if (get_user(mask, new_mask_ptr))
return -EFAULT;
set_fs(KERNEL_DS);
err = sys_sched_setaffinity(pid,sizeof(mask),&mask);
set_fs(oldfs);
return err;
}
/* only works on LE */
long sys32_sched_getaffinity(pid_t pid, unsigned int len,
unsigned int *new_mask_ptr)
{
mm_segment_t oldfs = get_fs();
unsigned long mask;
int err;
mask = 0;
set_fs(KERNEL_DS);
err = sys_sched_getaffinity(pid,sizeof(mask),&mask);
set_fs(oldfs);
if (err > 0)
err = put_user((u32)mask, new_mask_ptr);
return err;
}
extern long sys_io_setup(unsigned nr_reqs, aio_context_t *ctx);
long sys32_io_setup(unsigned nr_reqs, u32 *ctx32p)
......
......@@ -9,7 +9,7 @@ config LCS
or zSeries. This device driver supports Token Ring (IEEE 802.5),
FDDI (IEEE 802.7) and Ethernet.
This option is also available as a module which will be
called lcs.o . If you do not know what it is, it's safe to say "Y".
called lcs.ko. If you do not know what it is, it's safe to say "Y".
config CTC
tristate "CTC device support"
......@@ -20,7 +20,7 @@ config CTC
coupling using ESCON. It also supports virtual CTCs when running
under VM. It will use the channel device configuration if this is
available. This option is also available as a module which will be
called ctc.o. If you do not know what it is, it's safe to say "Y".
called ctc.ko. If you do not know what it is, it's safe to say "Y".
config IUCV
tristate "IUCV device support (VM only)"
......@@ -28,7 +28,7 @@ config IUCV
help
Select this option if you want to use inter-user communication
vehicle networking under VM or VIF. This option is also available
as a module which will be called iucv.o. If unsure, say "Y".
as a module which will be called iucv.ko. If unsure, say "Y".
config CCWGROUP
tristate
......
/*
* $Id: ctcmain.c,v 1.36 2003/02/18 09:15:14 mschwide Exp $
* $Id: ctcmain.c,v 1.40 2003/04/08 16:00:17 mschwide Exp $
*
* CTC / ESCON network driver
*
......@@ -36,13 +36,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.36 $
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.40 $
*
*/
#undef DEBUG
#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
......@@ -273,7 +272,7 @@ static void
print_banner(void)
{
static int printed = 0;
char vbuf[] = "$Revision: 1.36 $";
char vbuf[] = "$Revision: 1.40 $";
char *version = vbuf;
if (printed)
......@@ -1962,11 +1961,7 @@ ctc_irq_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
}
priv = cdev->dev.driver_data;
ch = (struct channel *) intparm;
if ((ch != priv->channel[READ]) && (ch != priv->channel[WRITE]))
ch = NULL;
if (!ch) {
/* Try to extract channel from driver data. */
if (priv->channel[READ]->cdev == cdev)
ch = priv->channel[READ];
......@@ -1978,7 +1973,6 @@ ctc_irq_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
"device %s\n", cdev->dev.bus_id);
return;
}
}
dev = (struct net_device *) (ch->netdev);
if (dev == NULL) {
......@@ -2392,7 +2386,6 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
static int
ctc_open(struct net_device * dev)
{
MOD_INC_USE_COUNT;
fsm_event(((struct ctc_priv *) dev->priv)->fsm, DEV_EVENT_START, dev);
return 0;
}
......@@ -2409,7 +2402,6 @@ static int
ctc_close(struct net_device * dev)
{
fsm_event(((struct ctc_priv *) dev->priv)->fsm, DEV_EVENT_STOP, dev);
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -2761,6 +2753,7 @@ ctc_init_netdevice(struct net_device * dev, int alloc_device,
dev->addr_len = 0;
dev->type = ARPHRD_SLIP;
dev->tx_queue_len = 100;
dev->owner = THIS_MODULE;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
return dev;
}
......
/*
* $Id: ctctty.c,v 1.9 2002/12/02 15:25:13 aberg Exp $
* $Id: ctctty.c,v 1.10 2003/03/21 18:47:31 aberg Exp $
*
* CTC / ESCON network driver, tty interface.
*
......@@ -22,7 +22,6 @@
*
*/
#define __NO_VERSION__
#include <linux/config.h>
#include <linux/module.h>
#include <linux/tty.h>
......
/**
* $Id: fsm.c,v 1.3 2002/10/08 16:53:45 mschwide Exp $
* $Id: fsm.c,v 1.4 2003/03/28 08:54:40 mschwide Exp $
*
* A generic FSM based on fsm used in isdn4linux
*
*/
#include "fsm.h"
#include <linux/version.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/timer.h>
......
/*
* $Id: iucv.c,v 1.9 2002/11/06 13:37:25 cohuck Exp $
* $Id: iucv.c,v 1.10 2003/03/28 08:54:40 mschwide Exp $
*
* IUCV network driver
*
......@@ -29,14 +29,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* RELEASE-TAG: IUCV lowlevel driver $Revision: 1.9 $
* RELEASE-TAG: IUCV lowlevel driver $Revision: 1.10 $
*
*/
#include <linux/module.h>
#include <linux/config.h>
#include <linux/version.h>
#include <linux/spinlock.h>
#include <linux/kernel.h>
#include <linux/slab.h>
......@@ -333,7 +332,7 @@ do { \
static void
iucv_banner(void)
{
char vbuf[] = "$Revision: 1.9 $";
char vbuf[] = "$Revision: 1.10 $";
char *version = vbuf;
if ((version = strchr(version, ':'))) {
......
......@@ -11,7 +11,7 @@
* Frank Pavlic (pavlic@de.ibm.com) and
* Martin Schwidefsky <schwidefsky@de.ibm.com>
*
* $Revision: 1.44 $ $Date: 2003/02/18 19:49:02 $
* $Revision: 1.51 $ $Date: 2003/03/28 08:54:40 $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -28,7 +28,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/version.h>
#include <linux/module.h>
#include <linux/if.h>
#include <linux/netdevice.h>
......@@ -59,7 +58,7 @@
/**
* initialization string for output
*/
#define VERSION_LCS_C "$Revision: 1.44 $"
#define VERSION_LCS_C "$Revision: 1.51 $"
static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")";
......@@ -335,7 +334,9 @@ lcs_setup_card(struct lcs_card *card)
(void *)lcs_start_kernel_thread,card);
card->thread_mask = 0;
spin_lock_init(&card->lock);
#ifdef CONFIG_IP_MULTICAST
INIT_LIST_HEAD(&card->ipm_list);
#endif
INIT_LIST_HEAD(&card->lancmd_waiters);
return 0;
}
......@@ -358,6 +359,7 @@ lcs_cleanup_card(struct lcs_card *card)
kfree(ipm_list);
}
#endif
kfree(card->dev);
/* Cleanup channels. */
lcs_cleanup_channel(&card->write);
lcs_cleanup_channel(&card->read);
......@@ -556,13 +558,12 @@ lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
static int
__lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
{
int index, prevprev, prev, next;
int index, prev, next;
if (buffer->state != BUF_STATE_READY)
BUG();
buffer->state = BUF_STATE_PROCESSED;
index = buffer - channel->iob;
prevprev = (index - 1) & (LCS_NUM_BUFFS - 1);
prev = (index - 1) & (LCS_NUM_BUFFS - 1);
next = (index + 1) & (LCS_NUM_BUFFS - 1);
/* Set the suspend bit and clear the PCI bit of this buffer. */
......@@ -1082,7 +1083,7 @@ lcs_tasklet(unsigned long data)
unsigned long flags;
struct lcs_channel *channel;
struct lcs_buffer *iob;
int buf_idx, io_idx;
int buf_idx;
int rc;
channel = (struct lcs_channel *) data;
......@@ -1092,9 +1093,7 @@ lcs_tasklet(unsigned long data)
/* Check for processed buffers. */
iob = channel->iob;
buf_idx = channel->buf_idx;
io_idx = channel->io_idx;
while (buf_idx != io_idx &&
iob[buf_idx].state == BUF_STATE_PROCESSED) {
while (iob[buf_idx].state == BUF_STATE_PROCESSED) {
/* Do the callback thing. */
if (iob[buf_idx].callback != NULL)
iob[buf_idx].callback(channel, iob + buf_idx);
......@@ -1434,6 +1433,7 @@ static int
lcs_lgw_stoplan_thread(void *data)
{
struct lcs_card *card;
int rc;
card = (struct lcs_card *) data;
daemonize("lgwstop");
......@@ -1446,7 +1446,11 @@ lcs_lgw_stoplan_thread(void *data)
else
PRINT_ERR("Stoplan %s initiated by LGW failed!\n",
card->dev->name);
return 0;
/*Try to reset the card, stop it on failure */
rc = lcs_resetcard(card);
if (rc != 0)
rc = lcs_stopcard(card);
return rc;
}
/**
......@@ -1462,8 +1466,10 @@ lcs_start_kernel_thread(struct lcs_card *card)
kernel_thread(lcs_lgw_startlan_thread, (void *) card, SIGCHLD);
if (test_and_clear_bit(2, &card->thread_mask))
kernel_thread(lcs_lgw_stoplan_thread, (void *) card, SIGCHLD);
#ifdef CONFIG_IP_MULTICAST
if (test_and_clear_bit(3, &card->thread_mask))
kernel_thread(lcs_fix_multicast_list, (void *) card, SIGCHLD);
#endif
}
/**
......@@ -1599,12 +1605,9 @@ lcs_stop_device(struct net_device *dev)
LCS_DBF_TEXT(2, trace, "stopdev");
card = (struct lcs_card *) dev->priv;
netif_stop_queue(dev);
// FIXME: really free the net_device here ?!?
kfree(card->dev);
rc = lcs_stopcard(card);
if (rc)
PRINT_ERR("Try it again!\n ");
MOD_DEC_USE_COUNT;
return rc;
}
......@@ -1626,7 +1629,6 @@ lcs_open_device(struct net_device *dev)
PRINT_ERR("LCS:Error in opening device!\n");
} else {
MOD_INC_USE_COUNT;
netif_wake_queue(dev);
card->state = DEV_STATE_UP;
}
......@@ -1784,6 +1786,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
dev->set_multicast_list = lcs_set_multicast_list;
#endif
dev->get_stats = lcs_getstats;
dev->owner = THIS_MODULE;
netif_stop_queue(dev);
lcs_stopcard(card);
return 0;
......
/*
* $Id: netiucv.c,v 1.16 2003/02/18 09:15:14 mschwide Exp $
* $Id: netiucv.c,v 1.19 2003/04/08 16:00:17 mschwide Exp $
*
* IUCV network driver
*
......@@ -30,7 +30,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* RELEASE-TAG: IUCV network driver $Revision: 1.16 $
* RELEASE-TAG: IUCV network driver $Revision: 1.19 $
*
*/
......@@ -1140,7 +1140,6 @@ netiucv_transmit_skb(struct iucv_connection *conn, struct sk_buff *skb) {
*/
static int
netiucv_open(struct net_device *dev) {
MOD_INC_USE_COUNT;
SET_DEVICE_START(dev, 1);
fsm_event(((struct netiucv_priv *)dev->priv)->fsm, DEV_EVENT_START, dev);
return 0;
......@@ -1158,7 +1157,6 @@ static int
netiucv_close(struct net_device *dev) {
SET_DEVICE_START(dev, 0);
fsm_event(((struct netiucv_priv *)dev->priv)->fsm, DEV_EVENT_STOP, dev);
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -1517,12 +1515,14 @@ netiucv_new_connection(struct net_device *dev, char *username)
conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT;
conn->netdev = dev;
conn->rx_buff = alloc_skb(NETIUCV_BUFSIZE_DEFAULT, GFP_DMA);
conn->rx_buff = alloc_skb(NETIUCV_BUFSIZE_DEFAULT,
GFP_KERNEL | GFP_DMA);
if (!conn->rx_buff) {
kfree(conn);
return NULL;
}
conn->tx_buff = alloc_skb(NETIUCV_BUFSIZE_DEFAULT, GFP_DMA);
conn->tx_buff = alloc_skb(NETIUCV_BUFSIZE_DEFAULT,
GFP_KERNEL | GFP_DMA);
if (!conn->tx_buff) {
kfree_skb(conn->rx_buff);
kfree(conn);
......@@ -1630,6 +1630,7 @@ netiucv_init_netdevice(int ifno, char *username)
dev->addr_len = 0;
dev->type = ARPHRD_SLIP;
dev->tx_queue_len = NETIUCV_QUEUELEN_DEFAULT;
dev->owner = THIS_MODULE;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
return dev;
}
......@@ -1716,7 +1717,7 @@ static struct device_driver netiucv_driver = {
static void
netiucv_banner(void)
{
char vbuf[] = "$Revision: 1.16 $";
char vbuf[] = "$Revision: 1.19 $";
char *version = vbuf;
if ((version = strchr(version, ':'))) {
......
......@@ -371,7 +371,7 @@ static int init_coda_psdev(void)
CODA_PSDEV_MAJOR);
return -EIO;
}
devfs_mk_dir (NULL, "coda", NULL);
devfs_mk_dir ("coda");
for (i = 0; i < MAX_CODADEVS; i++) {
char name[16];
sprintf(name, "coda/%d", i);
......
......@@ -491,7 +491,8 @@ int kernel_read(struct file *file, unsigned long offset,
old_fs = get_fs();
set_fs(get_ds());
result = vfs_read(file, addr, count, &pos);
/* The cast to a user pointer is valid due to the set_fs() */
result = vfs_read(file, (void __user *)addr, count, &pos);
set_fs(old_fs);
return result;
}
......
......@@ -847,6 +847,7 @@ int path_lookup(const char *name, unsigned int flags, struct nameidata *nd)
read_unlock(&current->fs->lock);
if (__emul_lookup_dentry(name,nd))
return 0;
read_lock(&current->fs->lock);
}
nd->mnt = mntget(current->fs->rootmnt);
nd->dentry = dget(current->fs->root);
......
......@@ -367,7 +367,7 @@ static int do_umount(struct vfsmount *mnt, int flags)
* unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
*/
asmlinkage long sys_umount(char * name, int flags)
asmlinkage long sys_umount(char __user * name, int flags)
{
struct nameidata nd;
int retval;
......@@ -396,7 +396,7 @@ asmlinkage long sys_umount(char * name, int flags)
* The 2.0 compatible umount. No flags.
*/
asmlinkage long sys_oldumount(char * name)
asmlinkage long sys_oldumount(char __user * name)
{
return sys_umount(name,0);
}
......@@ -664,7 +664,7 @@ static int do_add_mount(struct nameidata *nd, char *type, int flags,
return err;
}
static int copy_mount_options (const void *data, unsigned long *where)
static int copy_mount_options (const void __user *data, unsigned long *where)
{
int i;
unsigned long page;
......@@ -842,8 +842,9 @@ int copy_namespace(int flags, struct task_struct *tsk)
return -ENOMEM;
}
asmlinkage long sys_mount(char * dev_name, char * dir_name, char * type,
unsigned long flags, void * data)
asmlinkage long sys_mount(char __user * dev_name, char __user * dir_name,
char __user * type, unsigned long flags,
void __user * data)
{
int retval;
unsigned long data_page;
......@@ -963,7 +964,7 @@ static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
* first.
*/
asmlinkage long sys_pivot_root(const char *new_root, const char *put_old)
asmlinkage long sys_pivot_root(const char __user *new_root, const char __user *put_old)
{
struct vfsmount *tmp;
struct nameidata new_nd, old_nd, parent_nd, root_parent, user_nd;
......
......@@ -87,10 +87,10 @@ static struct {
};
long
asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg *arg, void *res)
asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *res)
{
struct file *file;
void *p = &arg->u;
void __user *p = &arg->u;
int version;
int err;
......
......@@ -335,7 +335,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
const struct iovec __user * uvector,
unsigned long nr_segs, loff_t *pos)
{
typedef ssize_t (*io_fn_t)(struct file *, char *, size_t, loff_t *);
typedef ssize_t (*io_fn_t)(struct file *, char __user *, size_t, loff_t *);
typedef ssize_t (*iov_fn_t)(struct file *, const struct iovec *, unsigned long, loff_t *);
size_t tot_len;
......@@ -423,7 +423,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
ret = 0;
vector = iov;
while (nr_segs > 0) {
void * base;
void __user * base;
size_t len;
ssize_t nr;
......
......@@ -3,8 +3,9 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <asm/compiler.h>
#include <asm/system.h>
/*
* T2 is the internal name for the core logic chipset which provides
......@@ -22,6 +23,7 @@
#define T2_MEM_R1_MASK 0x07ffffff /* Mem sparse region 1 mask is 26 bits */
/* GAMMA-SABLE is a SABLE with EV5-based CPUs */
/* All LYNX machines, EV4 or EV5, use the GAMMA bias also */
#define _GAMMA_BIAS 0x8000000000UL
#if defined(CONFIG_ALPHA_GENERIC)
......@@ -57,10 +59,33 @@
#define T2_WMASK2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001c0UL)
#define T2_TBASE2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001e0UL)
#define T2_TLBBR (IDENT_ADDR + GAMMA_BIAS + 0x38e000200UL)
#define T2_IVR (IDENT_ADDR + GAMMA_BIAS + 0x38e000220UL)
#define T2_HAE_3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000240UL)
#define T2_HAE_4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000260UL)
/* The CSRs below are T3/T4 only */
#define T2_WBASE3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000280UL)
#define T2_WMASK3 (IDENT_ADDR + GAMMA_BIAS + 0x38e0002a0UL)
#define T2_TBASE3 (IDENT_ADDR + GAMMA_BIAS + 0x38e0002c0UL)
#define T2_TDR0 (IDENT_ADDR + GAMMA_BIAS + 0x38e000300UL)
#define T2_TDR1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000320UL)
#define T2_TDR2 (IDENT_ADDR + GAMMA_BIAS + 0x38e000340UL)
#define T2_TDR3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000360UL)
#define T2_TDR4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000380UL)
#define T2_TDR5 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003a0UL)
#define T2_TDR6 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003c0UL)
#define T2_TDR7 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003e0UL)
#define T2_WBASE4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000400UL)
#define T2_WMASK4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000420UL)
#define T2_TBASE4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000440UL)
#define T2_AIR (IDENT_ADDR + GAMMA_BIAS + 0x38e000460UL)
#define T2_VAR (IDENT_ADDR + GAMMA_BIAS + 0x38e000480UL)
#define T2_DIR (IDENT_ADDR + GAMMA_BIAS + 0x38e0004a0UL)
#define T2_ICE (IDENT_ADDR + GAMMA_BIAS + 0x38e0004c0UL)
#define T2_HAE_ADDRESS T2_HAE_1
/* T2 CSRs are in the non-cachable primary IO space from 3.8000.0000 to
......@@ -100,6 +125,9 @@
#define T2_CPU1_BASE (IDENT_ADDR + GAMMA_BIAS + 0x381000000L)
#define T2_CPU2_BASE (IDENT_ADDR + GAMMA_BIAS + 0x382000000L)
#define T2_CPU3_BASE (IDENT_ADDR + GAMMA_BIAS + 0x383000000L)
#define T2_CPUn_BASE(n) (T2_CPU0_BASE + (((n)&3) * 0x001000000L))
#define T2_MEM0_BASE (IDENT_ADDR + GAMMA_BIAS + 0x388000000L)
#define T2_MEM1_BASE (IDENT_ADDR + GAMMA_BIAS + 0x389000000L)
#define T2_MEM2_BASE (IDENT_ADDR + GAMMA_BIAS + 0x38a000000L)
......@@ -408,87 +436,120 @@ __EXTERN_INLINE void t2_outl(u32 b, unsigned long addr)
set_hae(msb); \
}
static spinlock_t t2_hae_lock = SPIN_LOCK_UNLOCKED;
__EXTERN_INLINE u8 t2_readb(unsigned long addr)
{
unsigned long result, msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae;
result = *(vip) ((addr << 5) + T2_SPARSE_MEM + 0x00);
spin_unlock_irqrestore(&t2_hae_lock, flags);
return __kernel_extbl(result, addr & 3);
}
__EXTERN_INLINE u16 t2_readw(unsigned long addr)
{
unsigned long result, msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae;
result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08);
spin_unlock_irqrestore(&t2_hae_lock, flags);
return __kernel_extwl(result, addr & 3);
}
/* On SABLE with T2, we must use SPARSE memory even for 32-bit access. */
/*
* On SABLE with T2, we must use SPARSE memory even for 32-bit access,
* because we cannot access all of DENSE without changing its HAE.
*/
__EXTERN_INLINE u32 t2_readl(unsigned long addr)
{
unsigned long msb;
unsigned long result, msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae;
return *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18);
result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18);
spin_unlock_irqrestore(&t2_hae_lock, flags);
return result & 0xffffffffUL;
}
__EXTERN_INLINE u64 t2_readq(unsigned long addr)
{
unsigned long r0, r1, work, msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae;
work = (addr << 5) + T2_SPARSE_MEM + 0x18;
r0 = *(vuip)(work);
r1 = *(vuip)(work + (4 << 5));
spin_unlock_irqrestore(&t2_hae_lock, flags);
return r1 << 32 | r0;
}
__EXTERN_INLINE void t2_writeb(u8 b, unsigned long addr)
{
unsigned long msb, w;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae;
w = __kernel_insbl(b, addr & 3);
*(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x00) = w;
spin_unlock_irqrestore(&t2_hae_lock, flags);
}
__EXTERN_INLINE void t2_writew(u16 b, unsigned long addr)
{
unsigned long msb, w;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae;
w = __kernel_inswl(b, addr & 3);
*(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08) = w;
spin_unlock_irqrestore(&t2_hae_lock, flags);
}
/* On SABLE with T2, we must use SPARSE memory even for 32-bit access. */
/*
* On SABLE with T2, we must use SPARSE memory even for 32-bit access,
* because we cannot access all of DENSE without changing its HAE.
*/
__EXTERN_INLINE void t2_writel(u32 b, unsigned long addr)
{
unsigned long msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae;
*(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18) = b;
spin_unlock_irqrestore(&t2_hae_lock, flags);
}
__EXTERN_INLINE void t2_writeq(u64 b, unsigned long addr)
{
unsigned long msb, work;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae;
work = (addr << 5) + T2_SPARSE_MEM + 0x18;
*(vuip)work = b;
*(vuip)(work + (4 << 5)) = b >> 32;
spin_unlock_irqrestore(&t2_hae_lock, flags);
}
__EXTERN_INLINE unsigned long t2_ioremap(unsigned long addr,
......
......@@ -42,6 +42,7 @@
# define NR_IRQS 40
#elif defined(CONFIG_ALPHA_DP264) || \
defined(CONFIG_ALPHA_LYNX) || \
defined(CONFIG_ALPHA_SHARK) || \
defined(CONFIG_ALPHA_EIGER)
# define NR_IRQS 64
......
......@@ -232,6 +232,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm)
for (i = 0; i < NR_CPUS; i++)
if (cpu_online(i))
mm->context[i] = 0;
if (tsk != current)
tsk->thread_info->pcb.ptbr
= ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
return 0;
......
......@@ -610,8 +610,12 @@ static inline pid_t waitpid(int pid, int * wait_stat, int flags)
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
* but it doesn't work on all toolchains, so we just do it by hand.
*
* Note that we do *not* provide a parameter list to avoid
* conflicting with one of the syscall declarations in some
* of the relevant header files (including this one).
*/
#define cond_syscall(x) asmlinkage long x(void) __attribute__((weak,alias("sys_ni_syscall")));
#define cond_syscall(x) asmlinkage long x() __attribute__((weak,alias("sys_ni_syscall")));
#endif /* _ALPHA_UNISTD_H */
......@@ -101,6 +101,7 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
* for more of them, start the x86-specific ones at 32.
*/
#define AT_SYSINFO 32
#define AT_SYSINFO_EH_FRAME 33
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
......@@ -118,9 +119,15 @@ extern void dump_smp_unlazy_fpu(void);
#define ELF_CORE_SYNC dump_smp_unlazy_fpu
#endif
/* Offset from the beginning of the page where the .eh_frame information
for the code in the vsyscall page starts. */
#define EH_FRAME_OFFSET 96
#define ARCH_DLINFO \
do { \
NEW_AUX_ENT(AT_SYSINFO, 0xffffe000); \
NEW_AUX_ENT(AT_SYSINFO_EH_FRAME, \
0xffffe000 + EH_FRAME_OFFSET); \
} while (0)
#endif
......
......@@ -56,7 +56,7 @@ extern void remove_arg_zero(struct linux_binprm *);
extern int search_binary_handler(struct linux_binprm *,struct pt_regs *);
extern int flush_old_exec(struct linux_binprm * bprm);
extern int setup_arg_pages(struct linux_binprm * bprm);
extern int copy_strings(int argc,char ** argv,struct linux_binprm *bprm);
extern int copy_strings(int argc,char __user * __user * argv,struct linux_binprm *bprm);
extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
extern void compute_creds(struct linux_binprm *binprm);
extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
......
......@@ -752,11 +752,11 @@ struct inode_operations {
struct seq_file;
extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *);
extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *);
extern ssize_t vfs_readv(struct file *, const struct iovec *,
extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
unsigned long, loff_t *);
extern ssize_t vfs_writev(struct file *, const struct iovec *,
extern ssize_t vfs_writev(struct file *, const struct iovec __user *,
unsigned long, loff_t *);
/*
......@@ -1202,16 +1202,16 @@ extern int generic_file_mmap(struct file *, struct vm_area_struct *);
extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
extern ssize_t generic_file_read(struct file *, char __user *, size_t, loff_t *);
int generic_write_checks(struct inode *inode, struct file *file,
loff_t *pos, size_t *count, int isblk);
extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
extern ssize_t generic_file_write(struct file *, const char __user *, size_t, loff_t *);
extern ssize_t generic_file_aio_read(struct kiocb *, char *, size_t, loff_t);
extern ssize_t generic_file_aio_write(struct kiocb *, const char *, size_t, loff_t);
extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *,
unsigned long, loff_t *);
extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos);
extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos);
extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *ppos);
extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
......@@ -1247,9 +1247,9 @@ static inline void do_generic_file_read(struct file * filp, loff_t *ppos,
extern struct file_operations generic_ro_fops;
extern int vfs_readlink(struct dentry *, char *, int, const char *);
extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
extern int vfs_follow_link(struct nameidata *, const char *);
extern int page_readlink(struct dentry *, char *, int);
extern int page_readlink(struct dentry *, char __user *, int);
extern int page_follow_link(struct dentry *, struct nameidata *);
extern int page_symlink(struct inode *inode, const char *symname, int len);
extern struct inode_operations page_symlink_inode_operations;
......
......@@ -39,7 +39,7 @@
#define MAY_LOCK 32
#define MAY_OWNER_OVERRIDE 64
#define MAY_LOCAL_ACCESS 128 /* IRIX doing local access check on device special file*/
#if (MAY_SATTR | MAY_TRUNC | MAY_LOCK | MAX_OWNER_OVERRIDE | MAY_LOCAL_ACCESS) & (MAY_READ | MAY_WRITE | MAY_EXEC | MAY_OWNER_OVERRIDE)
#if (MAY_SATTR | MAY_TRUNC | MAY_LOCK | MAY_OWNER_OVERRIDE | MAY_LOCAL_ACCESS) & (MAY_READ | MAY_WRITE | MAY_EXEC)
# error "please use a different value for MAY_SATTR or MAY_TRUNC or MAY_LOCK or MAY_OWNER_OVERRIDE."
#endif
#define MAY_CREATE (MAY_EXEC|MAY_WRITE)
......
......@@ -116,7 +116,7 @@ union nfsctl_res {
/*
* Kernel syscall implementation.
*/
extern asmlinkage long sys_nfsservctl(int, struct nfsctl_arg *, void *);
extern asmlinkage long sys_nfsservctl(int, struct nfsctl_arg __user *, void __user *);
extern int exp_addclient(struct nfsctl_client *ncp);
extern int exp_delclient(struct nfsctl_client *ncp);
extern int exp_export(struct nfsctl_export *nxp);
......
......@@ -629,7 +629,7 @@ extern void daemonize(const char *, ...);
extern int allow_signal(int);
extern task_t *child_reaper;
extern int do_execve(char *, char **, char **, struct pt_regs *);
extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *);
extern struct task_struct *do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *);
#ifdef CONFIG_SMP
......
#ifndef __LINUX_UIO_H
#define __LINUX_UIO_H
#include <linux/compiler.h>
#include <linux/types.h>
/*
......@@ -18,7 +19,7 @@
struct iovec
{
void *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */
void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */
__kernel_size_t iov_len; /* Must be size_t (1003.1g) */
};
......
......@@ -226,3 +226,54 @@ asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val,
}
return do_futex((unsigned long)uaddr, op, val, timeout);
}
extern asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len,
unsigned long *user_mask_ptr);
asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid,
unsigned int len,
compat_ulong_t *user_mask_ptr)
{
unsigned long kernel_mask;
mm_segment_t old_fs;
int ret;
if (get_user(kernel_mask, user_mask_ptr))
return -EFAULT;
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_sched_setaffinity(pid,
sizeof(kernel_mask),
&kernel_mask);
set_fs(old_fs);
return ret;
}
extern asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
unsigned long *user_mask_ptr);
asmlinkage int compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len,
compat_ulong_t *user_mask_ptr)
{
unsigned long kernel_mask;
mm_segment_t old_fs;
int ret;
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_sched_getaffinity(pid,
sizeof(kernel_mask),
&kernel_mask);
set_fs(old_fs);
if (ret > 0) {
if (put_user(kernel_mask, user_mask_ptr))
ret = -EFAULT;
ret = sizeof(compat_ulong_t);
}
return ret;
}
......@@ -165,7 +165,7 @@ static unsigned long __find_symbol(const char *name,
if (gplok) {
for (i = 0; i < mod->num_gpl_syms; i++) {
if (strcmp(mod->gpl_syms[i].name, name) == 0) {
*crc = symversion(mod->crcs, i);
*crc = symversion(mod->gpl_crcs, i);
return mod->gpl_syms[i].value;
}
}
......
......@@ -87,6 +87,8 @@ static spinlock_t idr_lock = SPIN_LOCK_UNLOCKED;
SIGEV_SIGNAL & \
SIGEV_THREAD & \
SIGEV_THREAD_ID)
#define REQUEUE_PENDING 1
/*
* The timer ID is turned into a timer address by idr_find().
* Verifying a valid ID consists of:
......@@ -245,7 +247,7 @@ static void schedule_next_timer(struct k_itimer *timr)
timr->it_overrun_last = timr->it_overrun;
timr->it_overrun = -1;
timr->it_requeue_pending = 0;
++timr->it_requeue_pending;
add_timer(&timr->it_timer);
}
......@@ -286,16 +288,16 @@ void do_schedule_next_timer(struct siginfo *info)
* without an info block. In this case, we will not get a call back to
* do_schedule_next_timer() so we do it here. This should be rare...
* An interesting problem can occure if, while a signal, and thus a call
* An interesting problem can occur if, while a signal, and thus a call
* back is pending, the timer is rearmed, i.e. stopped and restarted.
* We then need to sort out the call back and do the right thing. What
* we do is to put a counter in the info block and match it with the
* timers copy on the call back. If they don't match, we just ignore
* the call back. Note that we do allow the timer to be deleted while
* a signal is pending. The standard says we can allow that signal to
* be delivered, and we do.
* the call back. The counter is local to the timer and we use odd to
* indicate a call back is pending. Note that we do allow the timer to
* be deleted while a signal is pending. The standard says we can
* allow that signal to be delivered, and we do.
*/
static int pendcount = 1;
static void timer_notify_task(struct k_itimer *timr)
{
......@@ -310,17 +312,12 @@ static void timer_notify_task(struct k_itimer *timr)
info.si_code = SI_TIMER;
info.si_tid = timr->it_id;
info.si_value = timr->it_sigev_value;
if (timr->it_incr){
/*
* Don't allow a call back counter of zero...
* and avoid the test by using 2.
*/
pendcount += 2;
timr->it_requeue_pending = info.si_sys_private = pendcount;
}
if( timr->it_sigev_notify & SIGEV_THREAD_ID & MIPS_SIGEV){
if (timr->it_incr)
info.si_sys_private = ++timr->it_requeue_pending;
if (timr->it_sigev_notify & SIGEV_THREAD_ID & MIPS_SIGEV)
ret = send_sig_info(info.si_signo, &info, timr->it_process);
}else
else
ret = send_group_sig_info(info.si_signo, &info,
timr->it_process);
switch (ret) {
......@@ -617,7 +614,7 @@ do_timer_gettime(struct k_itimer *timr, struct itimerspec *cur_setting)
posix_time_before(&timr->it_timer, &now))
timr->it_timer.expires = expires = 0;
if (expires) {
if (timr->it_requeue_pending ||
if (timr->it_requeue_pending & REQUEUE_PENDING ||
(timr->it_sigev_notify & SIGEV_NONE))
while (posix_time_before(&timr->it_timer, &now))
posix_bump_timer(timr);
......@@ -779,7 +776,8 @@ do_timer_settime(struct k_itimer *timr, int flags,
#else
del_timer(&timr->it_timer);
#endif
timr->it_requeue_pending = 0;
timr->it_requeue_pending = (timr->it_requeue_pending + 2) &
~REQUEUE_PENDING;
timr->it_overrun_last = 0;
timr->it_overrun = -1;
/*
......
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