Commit eab53a50 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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

into kroah.com:/home/greg/linux/BK/i2c-2.5
parents 7e23bc16 8f44c5c2
......@@ -30,6 +30,7 @@ ifneq ($(IS_EGCS),y)
CFLAGS := $(CFLAGS) -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
else
CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
AFLAGS := $(AFLAGS) -m32
endif
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
......
This diff is collapsed.
......@@ -127,6 +127,7 @@ EXPORT_SYMBOL(__down_trylock);
EXPORT_SYMBOL(__down_interruptible);
EXPORT_SYMBOL(sparc_valid_addr_bitmap);
EXPORT_SYMBOL(phys_base);
/* Atomic operations. */
EXPORT_SYMBOL_PRIVATE(_atomic_add);
......
......@@ -113,7 +113,7 @@ asmlinkage int sparc_pipe(struct pt_regs *regs)
* This is really horribly ugly.
*/
asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user *ptr, long fifth)
{
int version, err;
......@@ -123,7 +123,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
if (call <= SEMCTL)
switch (call) {
case SEMOP:
err = sys_semop (first, (struct sembuf *)ptr, second);
err = sys_semop (first, (struct sembuf __user *)ptr, second);
goto out;
case SEMGET:
err = sys_semget (first, second, third);
......@@ -134,7 +134,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
if (!ptr)
goto out;
err = -EFAULT;
if(get_user(fourth.__pad, (void **)ptr))
if(get_user(fourth.__pad, (void __user **)ptr))
goto out;
err = sys_semctl (first, second, third, fourth);
goto out;
......@@ -146,7 +146,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
if (call <= MSGCTL)
switch (call) {
case MSGSND:
err = sys_msgsnd (first, (struct msgbuf *) ptr,
err = sys_msgsnd (first, (struct msgbuf __user *) ptr,
second, third);
goto out;
case MSGRCV:
......@@ -157,7 +157,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
if (!ptr)
goto out;
err = -EFAULT;
if(copy_from_user(&tmp,(struct ipc_kludge *) ptr, sizeof (tmp)))
if (copy_from_user(&tmp, (struct ipc_kludge __user *) ptr, sizeof (tmp)))
goto out;
err = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, third);
goto out;
......@@ -170,7 +170,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
err = sys_msgget ((key_t) first, second);
goto out;
case MSGCTL:
err = sys_msgctl (first, second, (struct msqid_ds *) ptr);
err = sys_msgctl (first, second, (struct msqid_ds __user *) ptr);
goto out;
default:
err = -ENOSYS;
......@@ -182,27 +182,27 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
switch (version) {
case 0: default: {
ulong raddr;
err = sys_shmat (first, (char *) ptr, second, &raddr);
err = sys_shmat (first, (char __user *) ptr, second, &raddr);
if (err)
goto out;
err = -EFAULT;
if(put_user (raddr, (ulong *) third))
if (put_user (raddr, (ulong __user *) third))
goto out;
err = 0;
goto out;
}
case 1: /* iBCS2 emulator entry point */
err = sys_shmat (first, (char *) ptr, second, (ulong *) third);
err = sys_shmat (first, (char __user *) ptr, second, (ulong __user *) third);
goto out;
}
case SHMDT:
err = sys_shmdt ((char *)ptr);
err = sys_shmdt ((char __user *)ptr);
goto out;
case SHMGET:
err = sys_shmget (first, second, third);
goto out;
case SHMCTL:
err = sys_shmctl (first, second, (struct shmid_ds *) ptr);
err = sys_shmctl (first, second, (struct shmid_ds __user *) ptr);
goto out;
default:
err = -ENOSYS;
......@@ -344,9 +344,11 @@ asmlinkage unsigned long
c_sys_nis_syscall (struct pt_regs *regs)
{
static int count = 0;
if (count++ > 5) return -ENOSYS;
printk ("%s[%d]: Unimplemented SPARC system call %d\n", current->comm, current->pid, (int)regs->u_regs[1]);
if (count++ > 5)
return -ENOSYS;
printk ("%s[%d]: Unimplemented SPARC system call %d\n",
current->comm, current->pid, (int)regs->u_regs[1]);
#ifdef DEBUG_UNIMP_SYSCALL
show_regs (regs);
#endif
......@@ -378,8 +380,8 @@ sparc_breakpoint (struct pt_regs *regs)
}
asmlinkage int
sparc_sigaction (int sig, const struct old_sigaction *act,
struct old_sigaction *oact)
sparc_sigaction (int sig, const struct old_sigaction __user *act,
struct old_sigaction __user *oact)
{
struct k_sigaction new_ka, old_ka;
int ret;
......@@ -422,8 +424,11 @@ sparc_sigaction (int sig, const struct old_sigaction *act,
}
asmlinkage int
sys_rt_sigaction(int sig, const struct sigaction *act, struct sigaction *oact,
void *restorer, size_t sigsetsize)
sys_rt_sigaction(int sig,
const struct sigaction __user *act,
struct sigaction __user *oact,
void __user *restorer,
size_t sigsetsize)
{
struct k_sigaction new_ka, old_ka;
int ret;
......@@ -453,7 +458,7 @@ sys_rt_sigaction(int sig, const struct sigaction *act, struct sigaction *oact,
return ret;
}
asmlinkage int sys_getdomainname(char *name, int len)
asmlinkage int sys_getdomainname(char __user *name, int len)
{
int nlen;
int err = -EFAULT;
......@@ -464,9 +469,9 @@ asmlinkage int sys_getdomainname(char *name, int len)
if (nlen < len)
len = nlen;
if(len > __NEW_UTS_LEN)
if (len > __NEW_UTS_LEN)
goto done;
if(copy_to_user(name, system_utsname.domainname, len))
if (copy_to_user(name, system_utsname.domainname, len))
goto done;
err = 0;
done:
......
This diff is collapsed.
......@@ -473,7 +473,7 @@ static unsigned long clone_stackframe(unsigned long csp, unsigned long psp)
distance = fp - psp;
rval = (csp - distance);
if (copy_in_user(rval, psp, distance))
if (copy_in_user((void __user *) rval, (void __user *) psp, distance))
rval = 0;
else if (test_thread_flag(TIF_32BIT)) {
if (put_user(((u32)csp), &(((struct reg_window32 *)rval)->ins[6])))
......
......@@ -42,8 +42,8 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs,
/* {set, get}context() needed for 64-bit SparcLinux userland. */
asmlinkage void sparc64_set_context(struct pt_regs *regs)
{
struct ucontext *ucp = (struct ucontext *) regs->u_regs[UREG_I0];
mc_gregset_t *grp;
struct ucontext *ucp = (struct ucontext __user *) regs->u_regs[UREG_I0];
mc_gregset_t __user *grp;
unsigned long pc, npc, tstate;
unsigned long fp, i7;
unsigned char fenab;
......@@ -104,9 +104,9 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs)
err |= __get_user(fp, &(ucp->uc_mcontext.mc_fp));
err |= __get_user(i7, &(ucp->uc_mcontext.mc_i7));
err |= __put_user(fp,
(&(((struct reg_window *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[6])));
(&(((struct reg_window __user *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[6])));
err |= __put_user(i7,
(&(((struct reg_window *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[7])));
(&(((struct reg_window __user *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[7])));
err |= __get_user(fenab, &(ucp->uc_mcontext.mc_fpregs.mcfpu_enab));
if (fenab) {
......@@ -121,7 +121,7 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs)
(sizeof(unsigned int) * 32));
if (fprs & FPRS_DU)
err |= copy_from_user(fpregs+16,
((unsigned long *)&(ucp->uc_mcontext.mc_fpregs.mcfpu_fregs))+16,
((unsigned long __user *)&(ucp->uc_mcontext.mc_fpregs.mcfpu_fregs))+16,
(sizeof(unsigned int) * 32));
err |= __get_user(current_thread_info()->xfsr[0],
&(ucp->uc_mcontext.mc_fpregs.mcfpu_fsr));
......@@ -139,9 +139,9 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs)
asmlinkage void sparc64_get_context(struct pt_regs *regs)
{
struct ucontext *ucp = (struct ucontext *) regs->u_regs[UREG_I0];
mc_gregset_t *grp;
mcontext_t *mcp;
struct ucontext *ucp = (struct ucontext __user *) regs->u_regs[UREG_I0];
mc_gregset_t __user *grp;
mcontext_t __user *mcp;
unsigned long fp, i7;
unsigned char fenab;
int err;
......@@ -170,7 +170,7 @@ asmlinkage void sparc64_get_context(struct pt_regs *regs)
err = 0;
if (_NSIG_WORDS == 1)
err |= __put_user(current->blocked.sig[0],
(unsigned long *)&ucp->uc_sigmask);
(unsigned long __user *)&ucp->uc_sigmask);
else
err |= __copy_to_user(&ucp->uc_sigmask, &current->blocked,
sizeof(sigset_t));
......@@ -196,9 +196,9 @@ asmlinkage void sparc64_get_context(struct pt_regs *regs)
err |= __put_user(regs->u_regs[UREG_I7], &((*grp)[MC_O7]));
err |= __get_user(fp,
(&(((struct reg_window *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[6])));
(&(((struct reg_window __user *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[6])));
err |= __get_user(i7,
(&(((struct reg_window *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[7])));
(&(((struct reg_window __user *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[7])));
err |= __put_user(fp, &(mcp->mc_fp));
err |= __put_user(i7, &(mcp->mc_i7));
......@@ -213,7 +213,7 @@ asmlinkage void sparc64_get_context(struct pt_regs *regs)
(sizeof(unsigned int) * 32));
if (fprs & FPRS_DU)
err |= copy_to_user(
((unsigned long *)&(mcp->mc_fpregs.mcfpu_fregs))+16, fpregs+16,
((unsigned long __user *)&(mcp->mc_fpregs.mcfpu_fregs))+16, fpregs+16,
(sizeof(unsigned int) * 32));
err |= __put_user(current_thread_info()->xfsr[0], &(mcp->mc_fpregs.mcfpu_fsr));
err |= __put_user(current_thread_info()->gsr[0], &(mcp->mc_fpregs.mcfpu_gsr));
......@@ -231,7 +231,7 @@ struct rt_signal_frame {
struct sparc_stackf ss;
siginfo_t info;
struct pt_regs regs;
__siginfo_fpu_t * fpu_save;
__siginfo_fpu_t __user *fpu_save;
stack_t stack;
sigset_t mask;
__siginfo_fpu_t fpu_state;
......@@ -300,7 +300,7 @@ asmlinkage void do_sigsuspend(struct pt_regs *regs)
_sigpause_common(regs->u_regs[UREG_I0], regs);
}
asmlinkage void do_rt_sigsuspend(sigset_t *uset, size_t sigsetsize, struct pt_regs *regs)
asmlinkage void do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize, struct pt_regs *regs)
{
sigset_t oldset, set;
......@@ -351,7 +351,7 @@ asmlinkage void do_rt_sigsuspend(sigset_t *uset, size_t sigsetsize, struct pt_re
}
static inline int
restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t *fpu)
restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
{
unsigned long *fpregs = current_thread_info()->fpregs;
unsigned long fprs;
......@@ -374,16 +374,16 @@ restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t *fpu)
void do_rt_sigreturn(struct pt_regs *regs)
{
struct rt_signal_frame *sf;
struct rt_signal_frame __user *sf;
unsigned long tpc, tnpc, tstate;
__siginfo_fpu_t *fpu_save;
__siginfo_fpu_t __user *fpu_save;
mm_segment_t old_fs;
sigset_t set;
stack_t st;
int err;
synchronize_user_stack ();
sf = (struct rt_signal_frame *)
sf = (struct rt_signal_frame __user *)
(regs->u_regs [UREG_FP] + STACK_BIAS);
/* 1. Make sure we are not getting garbage from the user */
......@@ -438,7 +438,7 @@ void do_rt_sigreturn(struct pt_regs *regs)
}
/* Checks if the fp is valid */
static int invalid_frame_pointer(void *fp, int fplen)
static int invalid_frame_pointer(void __user *fp, int fplen)
{
if (((unsigned long) fp) & 7)
return 1;
......@@ -446,7 +446,7 @@ static int invalid_frame_pointer(void *fp, int fplen)
}
static inline int
save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t *fpu)
save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
{
unsigned long *fpregs = (unsigned long *)(regs+1);
unsigned long fprs;
......@@ -466,7 +466,7 @@ save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t *fpu)
return err;
}
static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, unsigned long framesize)
static inline void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, unsigned long framesize)
{
unsigned long sp;
......@@ -478,14 +478,14 @@ static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, u
!((current->sas_ss_sp + current->sas_ss_size) & 7))
sp = current->sas_ss_sp + current->sas_ss_size;
}
return (void *)(sp - framesize);
return (void __user *)(sp - framesize);
}
static inline void
setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
int signo, sigset_t *oldset, siginfo_t *info)
{
struct rt_signal_frame *sf;
struct rt_signal_frame __user *sf;
int sigframe_size, err;
/* 1. Make sure everything is clean */
......@@ -496,7 +496,8 @@ setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
if (!(current_thread_info()->fpsaved[0] & FPRS_FEF))
sigframe_size -= sizeof(__siginfo_fpu_t);
sf = (struct rt_signal_frame *)get_sigframe(ka, regs, sigframe_size);
sf = (struct rt_signal_frame __user *)
get_sigframe(ka, regs, sigframe_size);
if (invalid_frame_pointer (sf, sigframe_size))
goto sigill;
......@@ -521,8 +522,8 @@ setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
err |= copy_to_user(&sf->mask, oldset, sizeof(sigset_t));
err |= copy_in_user((u64 *)sf,
(u64 *)(regs->u_regs[UREG_FP]+STACK_BIAS),
err |= copy_in_user((u64 __user *)sf,
(u64 __user *)(regs->u_regs[UREG_FP]+STACK_BIAS),
sizeof(struct reg_window));
if (info)
......@@ -560,7 +561,8 @@ static inline void handle_signal(unsigned long signr, struct k_sigaction *ka,
siginfo_t *info,
sigset_t *oldset, struct pt_regs *regs)
{
setup_rt_frame(ka, regs, signr, oldset, (ka->sa.sa_flags & SA_SIGINFO) ? info : NULL);
setup_rt_frame(ka, regs, signr, oldset,
(ka->sa.sa_flags & SA_SIGINFO) ? info : NULL);
if (ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NOMASK)) {
......
This diff is collapsed.
......@@ -245,9 +245,9 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
return err;
}
extern asmlinkage int sys_newuname(struct new_utsname * name);
extern asmlinkage int sys_newuname(struct new_utsname __user *name);
asmlinkage int sparc64_newuname(struct new_utsname * name)
asmlinkage int sparc64_newuname(struct new_utsname __user *name)
{
int ret = sys_newuname(name);
......@@ -421,7 +421,7 @@ sparc_breakpoint (struct pt_regs *regs)
extern void check_pending(int signum);
asmlinkage int sys_getdomainname(char *name, int len)
asmlinkage int sys_getdomainname(char __user *name, int len)
{
int nlen;
int err = -EFAULT;
......@@ -432,9 +432,9 @@ asmlinkage int sys_getdomainname(char *name, int len)
if (nlen < len)
len = nlen;
if(len > __NEW_UTS_LEN)
if (len > __NEW_UTS_LEN)
goto done;
if(copy_to_user(name, system_utsname.domainname, len))
if (copy_to_user(name, system_utsname.domainname, len))
goto done;
err = 0;
done:
......@@ -458,7 +458,7 @@ asmlinkage int solaris_syscall(struct pt_regs *regs)
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
if(++count <= 5) {
if (++count <= 5) {
printk ("For Solaris binary emulation you need solaris module loaded\n");
show_regs (regs);
}
......@@ -478,7 +478,7 @@ asmlinkage int sunos_syscall(struct pt_regs *regs)
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
if(++count <= 20)
if (++count <= 20)
printk ("SunOS binary emulation not compiled in\n");
force_sig(SIGSEGV, current);
......@@ -486,9 +486,11 @@ asmlinkage int sunos_syscall(struct pt_regs *regs)
}
#endif
asmlinkage int sys_utrap_install(utrap_entry_t type, utrap_handler_t new_p,
asmlinkage int sys_utrap_install(utrap_entry_t type,
utrap_handler_t new_p,
utrap_handler_t new_d,
utrap_handler_t *old_p, utrap_handler_t *old_d)
utrap_handler_t __user *old_p,
utrap_handler_t __user *old_d)
{
if (type < UT_INSTRUCTION_EXCEPTION || type > UT_TRAP_INSTRUCTION_31)
return -EINVAL;
......@@ -511,9 +513,11 @@ asmlinkage int sys_utrap_install(utrap_entry_t type, utrap_handler_t new_p,
if (!current_thread_info()->utraps) {
current_thread_info()->utraps =
kmalloc((UT_TRAP_INSTRUCTION_31+1)*sizeof(long), GFP_KERNEL);
if (!current_thread_info()->utraps) return -ENOMEM;
if (!current_thread_info()->utraps)
return -ENOMEM;
current_thread_info()->utraps[0] = 1;
memset(current_thread_info()->utraps+1, 0, UT_TRAP_INSTRUCTION_31*sizeof(long));
memset(current_thread_info()->utraps+1, 0,
UT_TRAP_INSTRUCTION_31*sizeof(long));
} else {
if ((utrap_handler_t)current_thread_info()->utraps[type] != new_p &&
current_thread_info()->utraps[0] > 1) {
......
......@@ -29,17 +29,13 @@ config AGP_GART
bool "/dev/agpgart (AGP Support)"
depends on GART_IOMMU
config AGP3
bool "AGP 3.0 compliance (EXPERIMENTAL)"
depends on AGP
config AGP_INTEL
tristate "Intel 440LX/BX/GX and I815/I820/830M/I830MP/I840/I845/845G/I850/852GM/855GM/I860/865G support"
depends on AGP
tristate "Intel 440LX/BX/GX, I8xx and E7x05 support"
depends on AGP && !X86_64
help
This option gives you AGP support for the GLX component of the
XFree86 4.x on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850
and 860 chipsets and full support for the 810, 815, 830M, 845G,
XFree86 4.x on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850, 860
E7205 and E7505 chipsets and full support for the 810, 815, 830M, 845G,
852GM, 855GM and 865G integrated graphics chipsets.
You should say Y here if you use XFree86 3.3.6 or 4.x and want to
......@@ -48,7 +44,7 @@ config AGP_INTEL
#config AGP_I810
# tristate "Intel I810/I815/I830M (on-board) support"
# depends on AGP
# depends on AGP && !X86_64
# help
# This option gives you AGP support for the Xserver on the Intel 810
# 815 and 830m chipset boards for their on-board integrated graphics. This
......@@ -56,7 +52,7 @@ config AGP_INTEL
config AGP_VIA
tristate "VIA chipset support"
depends on AGP
depends on AGP && !X86_64
help
This option gives you AGP support for the GLX component of the
XFree86 4.x on VIA MPV3/Apollo Pro chipsets.
......@@ -66,7 +62,7 @@ config AGP_VIA
config AGP_AMD
tristate "AMD Irongate, 761, and 762 support"
depends on AGP
depends on AGP && !X86_64
help
This option gives you AGP support for the GLX component of the
XFree86 4.x on AMD Irongate, 761, and 762 chipsets.
......@@ -76,7 +72,7 @@ config AGP_AMD
config AGP_SIS
tristate "Generic SiS support"
depends on AGP
depends on AGP && !X86_64
help
This option gives you AGP support for the GLX component of the "soon
to be released" XFree86 4.x on Silicon Integrated Systems [SiS]
......@@ -89,7 +85,7 @@ config AGP_SIS
config AGP_ALI
tristate "ALI chipset support"
depends on AGP
depends on AGP && !X86_64
---help---
This option gives you AGP support for the GLX component of the
XFree86 4.x on the following ALi chipsets. The supported chipsets
......@@ -107,7 +103,7 @@ config AGP_ALI
config AGP_SWORKS
tristate "Serverworks LE/HE support"
depends on AGP
depends on AGP && !X86_64
help
Say Y here to support the Serverworks AGP card. See
<http://www.serverworks.com/> for product descriptions and images.
......@@ -139,15 +135,3 @@ config AGP_ALPHA_CORE
depends on AGP && (ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL)
default AGP
# Put AGP 3.0 entries below here.
config AGP_I7505
tristate "Intel 7205/7505 support (AGP 3.0)"
depends on AGP3
help
This option gives you AGP support for the GLX component of the
XFree86 4.x on Intel I7505 chipsets.
You should say Y here if you use XFree86 3.3.6 or 4.x and want to
use GLX or DRI. If unsure, say N
......@@ -3,8 +3,7 @@
# space ioctl interface to use agp memory. It also adds a kernel interface
# that other drivers could use to manipulate agp memory.
agpgart-y := backend.o frontend.o generic.o
agpgart-$(CONFIG_AGP3) += generic-3.0.o
agpgart-y := backend.o frontend.o generic.o generic-3.0.o
agpgart-objs := $(agpgart-y)
obj-$(CONFIG_AGP) += agpgart.o
......@@ -19,5 +18,4 @@ obj-$(CONFIG_AGP_HP_ZX1) += hp-agp.o
obj-$(CONFIG_AGP_AMD_8151) += amd-k8-agp.o
obj-$(CONFIG_AGP_ALPHA_CORE) += alpha-agp.o
obj-$(CONFIG_AGP_I7x05) += i7x05-agp.o
/*
* AGPGART
* Copyright (C) 2002 Dave Jones
* Copyright (C) 2002-2003 Dave Jones
* Copyright (C) 1999 Jeff Hartmann
* Copyright (C) 1999 Precision Insight, Inc.
* Copyright (C) 1999 Xi Graphics, Inc.
......@@ -46,7 +46,7 @@ static void __attribute__((unused)) global_cache_flush(void)
panic(PFX "timed out waiting for the other CPUs!\n");
}
#else
static inline void global_cache_flush(void)
static void global_cache_flush(void)
{
flush_agp_cache();
}
......@@ -281,6 +281,7 @@ struct agp_bridge_data {
#define INTEL_I7505_ATTBASE 0x78
#define INTEL_I7505_ERRSTS 0x42
#define INTEL_I7505_AGPCTRL 0x70
#define INTEL_I7505_MCHCFG 0x50
/* VIA register */
#define VIA_APBASE 0x10
......@@ -380,8 +381,7 @@ struct agp_driver {
/* Generic routines. */
void agp_generic_agp_enable(u32 mode);
void agp_generic_agp_3_0_enable(u32 mode);
void agp_generic_enable(u32 mode);
int agp_generic_create_gatt_table(void);
int agp_generic_free_gatt_table(void);
agp_memory *agp_create_memory(int scratch_pages);
......@@ -399,5 +399,6 @@ int agp_register_driver (struct agp_driver *drv);
int agp_unregister_driver(struct agp_driver *drv);
u32 agp_collect_device_status(u32 mode, u32 command);
void agp_device_command(u32 command, int agp_v3);
int agp_3_0_node_enable(u32 mode, u32 minor);
#endif /* _AGP_BACKEND_PRIV_H */
......@@ -208,7 +208,7 @@ static int __init ali_generic_setup (struct pci_dev *pdev)
agp_bridge->cleanup = ali_cleanup;
agp_bridge->tlb_flush = ali_tlbflush;
agp_bridge->mask_memory = ali_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = ali_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......
......@@ -368,7 +368,7 @@ static int __init amd_irongate_setup (struct pci_dev *pdev)
agp_bridge->cleanup = amd_irongate_cleanup;
agp_bridge->tlb_flush = amd_irongate_tlbflush;
agp_bridge->mask_memory = amd_irongate_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = amd_create_gatt_table;
agp_bridge->free_gatt_table = amd_free_gatt_table;
......
/*
* Copyright 2001,2002 SuSE Labs
* Copyright 2001-2003 SuSE Labs.
* Distributed under the GNU public license, v2.
*
* This is a GART driver for the AMD K8 northbridge and the AMD 8151
* AGP bridge. The main work is done in the northbridge. The configuration
* is only mirrored in the 8151 for compatibility (could be likely
* removed now).
*/
* This is a GART driver for the AMD Opteron/Athlon64 on-CPU northbridge.
* It also includes support for the AMD 8151 AGP bridge,
* although it doesn't actually do much, as all the real
* work is done in the northbridge(s).
*/
/*
* On x86-64 the AGP driver needs to be initialized early by the IOMMU
......@@ -224,7 +224,7 @@ static unsigned long amd_8151_mask_memory(unsigned long addr, int type)
static struct gatt_mask amd_8151_masks[] =
{
{0x00000001, 0}
{.mask = 0x00000001, .type = 0}
};
......@@ -265,7 +265,7 @@ static void agp_x86_64_agp_enable(u32 mode)
/* If not enough, go to AGP v2 setup */
if (v3_devs<2) {
printk (KERN_INFO "AGP: Only %d devices found, not enough, trying AGPv2\n", v3_devs);
return agp_generic_agp_enable(mode);
return agp_generic_enable(mode);
} else {
printk (KERN_INFO "AGP: Enough AGPv3 devices found, setting up...\n");
}
......@@ -340,6 +340,8 @@ static int __init agp_amdk8_probe (struct pci_dev *dev, const struct pci_device_
if (cap_ptr == 0)
return -ENODEV;
printk (KERN_INFO PFX "Detected Opteron/Athlon64 on-CPU GART\n");
agp_bridge->dev = dev;
agp_bridge->capndx = cap_ptr;
......
/*
* AGPGART driver backend routines.
* Copyright (C) 2002 Dave Jones.
* Copyright (C) 2002-2003 Dave Jones.
* Copyright (C) 1999 Jeff Hartmann.
* Copyright (C) 1999 Precision Insight, Inc.
* Copyright (C) 1999 Xi Graphics, Inc.
......
/*
* AGPGART driver frontend
* Copyright (C) 2002 Dave Jones
* Copyright (C) 2002-2003 Dave Jones
* Copyright (C) 1999 Jeff Hartmann
* Copyright (C) 1999 Precision Insight, Inc.
* Copyright (C) 1999 Xi Graphics, Inc.
......
......@@ -319,10 +319,10 @@ static int agp_3_0_nonisochronous_node_enable(struct agp_3_0_dev *dev_list, unsi
* Fully configure and enable an AGP 3.0 host bridge and all the devices
* lying behind it.
*/
static int agp_3_0_node_enable(u32 mode, u32 minor)
int agp_3_0_node_enable(u32 mode, u32 minor)
{
struct pci_dev *td = agp_bridge->dev, *dev;
u8 bus_num, mcapndx;
u8 mcapndx;
u32 isoch, arqsz, cal_cycle, tmp, rate;
u32 tstatus, tcmd, mcmd, mstatus, ncapid;
u32 mmajor, mminor;
......@@ -343,23 +343,30 @@ static int agp_3_0_node_enable(u32 mode, u32 minor)
head = &dev_list->list;
INIT_LIST_HEAD(head);
/*
* Find all the devices on this bridge's secondary bus and add them
* to dev_list.
*/
pci_read_config_byte(td, PCI_SECONDARY_BUS, &bus_num);
pci_for_each_dev(dev) {
if(dev->bus->number == bus_num) {
if((cur = kmalloc(sizeof(*cur), GFP_KERNEL)) == NULL) {
ret = -ENOMEM;
goto free_and_exit;
}
cur->dev = dev;
pos = &cur->list;
list_add(pos, head);
ndevs++;
/* Find all AGP devices, and add them to dev_list. */
pci_for_each_dev(dev) {
switch ((dev->class >>8) & 0xff00) {
case 0x0001: /* Unclassified device */
case 0x0300: /* Display controller */
case 0x0400: /* Multimedia controller */
case 0x0600: /* Bridge */
mcapndx = pci_find_capability(dev, PCI_CAP_ID_AGP);
if (mcapndx == 0)
continue;
if((cur = kmalloc(sizeof(*cur), GFP_KERNEL)) == NULL) {
ret = -ENOMEM;
goto free_and_exit;
}
cur->dev = dev;
pos = &cur->list;
list_add(pos, head);
ndevs++;
continue;
default:
continue;
}
}
......@@ -518,33 +525,5 @@ static int agp_3_0_node_enable(u32 mode, u32 minor)
return ret;
}
/*
* Entry point to AGP 3.0 host bridge init. Check to see if we
* have an AGP 3.0 device operating in 3.0 mode. Call
* agp_3_0_node_enable or agp_generic_agp_enable if we don't
* (AGP 3.0 devices are required to operate as AGP 2.0 devices
* when not using 3.0 electricals.
*/
void agp_generic_agp_3_0_enable(u32 mode)
{
u32 ncapid, major, minor, agp_3_0;
pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx, &ncapid);
major = (ncapid >> 20) & 0xf;
minor = (ncapid >> 16) & 0xf;
printk(KERN_INFO PFX "Found an AGP %d.%d compliant device.\n",major, minor);
if(major >= 3) {
pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + 0x4, &agp_3_0);
/*
* Check to see if we are operating in 3.0 mode
*/
if((agp_3_0 >> 3) & 0x1)
agp_3_0_node_enable(mode, minor);
}
}
EXPORT_SYMBOL(agp_generic_agp_3_0_enable);
EXPORT_SYMBOL_GPL(agp_3_0_node_enable);
......@@ -34,6 +34,7 @@
#include <linux/miscdevice.h>
#include <linux/pm.h>
#include <linux/agp_backend.h>
#include <linux/vmalloc.h>
#include "agp.h"
__u32 *agp_gatt_table;
......@@ -392,21 +393,37 @@ void agp_device_command(u32 command, int agp_v3)
}
}
void agp_generic_agp_enable(u32 mode)
void agp_generic_enable(u32 mode)
{
u32 command;
u32 command, ncapid, major, minor;
pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx, &ncapid);
major = (ncapid >> 20) & 0xf;
minor = (ncapid >> 16) & 0xf;
printk(KERN_INFO PFX "Found an AGP %d.%d compliant device.\n",major, minor);
if(major >= 3) {
u32 agp_3_0;
pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + 0x4, &agp_3_0);
/* Check to see if we are operating in 3.0 mode */
if((agp_3_0 >> 3) & 0x1) {
agp_3_0_node_enable(mode, minor);
return;
} else {
printk (KERN_INFO PFX "not in AGP 3.0 mode, falling back to 2.x\n");
}
}
/* AGP v<3 */
pci_read_config_dword(agp_bridge->dev,
agp_bridge->capndx + PCI_AGP_STATUS,
&command);
agp_bridge->capndx + PCI_AGP_STATUS, &command);
command = agp_collect_device_status(mode, command);
command |= 0x100;
pci_write_config_dword(agp_bridge->dev,
agp_bridge->capndx + PCI_AGP_COMMAND,
command);
agp_bridge->capndx + PCI_AGP_COMMAND, command);
agp_device_command(command, 0);
}
......@@ -745,7 +762,7 @@ EXPORT_SYMBOL(agp_generic_alloc_page);
EXPORT_SYMBOL(agp_generic_destroy_page);
EXPORT_SYMBOL(agp_generic_suspend);
EXPORT_SYMBOL(agp_generic_resume);
EXPORT_SYMBOL(agp_generic_agp_enable);
EXPORT_SYMBOL(agp_generic_enable);
EXPORT_SYMBOL(agp_generic_create_gatt_table);
EXPORT_SYMBOL(agp_generic_free_gatt_table);
EXPORT_SYMBOL(agp_generic_insert_memory);
......
......@@ -339,7 +339,7 @@ static int __init hp_zx1_setup (struct pci_dev *pdev __attribute__((unused)))
agp_bridge->cleanup = hp_zx1_cleanup;
agp_bridge->tlb_flush = hp_zx1_tlbflush;
agp_bridge->mask_memory = hp_zx1_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = hp_zx1_create_gatt_table;
agp_bridge->free_gatt_table = hp_zx1_free_gatt_table;
......@@ -369,7 +369,7 @@ static int __init agp_find_supported_device(struct pci_dev *dev)
}
static struct agp_driver hp_agp_driver = {
.owner = THIS_MODULE;
.owner = THIS_MODULE,
};
static int __init agp_hp_probe (struct pci_dev *dev, const struct pci_device_id *ent)
......@@ -394,7 +394,7 @@ static struct pci_device_id agp_hp_pci_table[] __initdata = {
{ }
};
MODULE_DEVICE_TABLE(pci, agp_pci_table);
MODULE_DEVICE_TABLE(pci, agp_hp_pci_table);
static struct __initdata pci_driver agp_hp_pci_driver = {
.name = "agpgart-hp",
......
......@@ -536,7 +536,7 @@ static int __init intel_i460_setup (struct pci_dev *pdev __attribute__((unused))
agp_bridge->cleanup = i460_cleanup;
agp_bridge->tlb_flush = i460_tlb_flush;
agp_bridge->mask_memory = i460_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = i460_create_gatt_table;
agp_bridge->free_gatt_table = i460_free_gatt_table;
......@@ -560,7 +560,7 @@ static int __init intel_i460_setup (struct pci_dev *pdev __attribute__((unused))
}
static struct agp_driver i460_agp_driver = {
.owner = THIS_MODULE;
.owner = THIS_MODULE,
};
static int __init agp_intel_i460_probe (struct pci_dev *dev, const struct pci_device_id *ent)
......
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/agp_backend.h>
#include "agp.h"
static int intel_7505_fetch_size(void)
{
int i;
u16 tmp;
aper_size_info_16 *values;
/*
* For AGP 3.0 APSIZE is now 16 bits
*/
pci_read_config_word (agp_bridge->dev, INTEL_I7505_APSIZE, &tmp);
tmp = (tmp & 0xfff);
values = A_SIZE_16(agp_bridge->aperture_sizes);
for (i=0; i < agp_bridge->num_aperture_sizes; i++) {
if (tmp == values[i].size_value) {
agp_bridge->previous_size = agp_bridge->current_size =
(void *)(values + i);
agp_bridge->aperture_size_idx = i;
return values[i].size;
}
}
return 0;
}
static void intel_7505_tlbflush(agp_memory *mem)
{
u32 temp;
pci_read_config_dword(agp_bridge->dev, INTEL_I7505_AGPCTRL, &temp);
pci_write_config_dword(agp_bridge->dev, INTEL_I7505_AGPCTRL, temp & ~(1 << 7));
pci_read_config_dword(agp_bridge->dev, INTEL_I7505_AGPCTRL, &temp);
pci_write_config_dword(agp_bridge->dev, INTEL_I7505_AGPCTRL, temp | (1 << 7));
}
static void intel_7505_cleanup(void)
{
aper_size_info_16 *previous_size;
previous_size = A_SIZE_16(agp_bridge->previous_size);
pci_write_config_byte(agp_bridge->dev, INTEL_I7505_APSIZE,
previous_size->size_value);
}
static int intel_7505_configure(void)
{
u32 temp;
aper_size_info_16 *current_size;
current_size = A_SIZE_16(agp_bridge->current_size);
/* aperture size */
pci_write_config_word(agp_bridge->dev, INTEL_I7505_APSIZE,
current_size->size_value);
/* address to map to */
pci_read_config_dword(agp_bridge->dev, INTEL_I7505_NAPBASELO, &temp);
agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
/* attbase */
pci_write_config_dword(agp_bridge->dev, INTEL_I7505_ATTBASE,
agp_bridge->gatt_bus_addr);
/* agpctrl */
pci_write_config_dword(agp_bridge->dev, INTEL_I7505_AGPCTRL, 0x0000);
/* clear error registers */
pci_write_config_byte(agp_bridge->dev, INTEL_I7505_ERRSTS, 0xff);
return 0;
}
static aper_size_info_16 intel_7505_sizes[7] =
{
{256, 65536, 6, 0xf00},
{128, 32768, 5, 0xf20},
{64, 16384, 4, 0xf30},
{32, 8192, 3, 0xf38},
{16, 4096, 2, 0xf3c},
{8, 2048, 1, 0xf3e},
{4, 1024, 0, 0xf3f}
};
static void i7505_setup (u32 mode)
{
if ((agp_generic_agp_3_0_enable)==FALSE)
agp_generic_agp_enable(mode);
}
static int __init intel_7505_setup (struct pci_dev *pdev)
{
agp_bridge->masks = intel_generic_masks;
agp_bridge->aperture_sizes = (void *) intel_7505_sizes;
agp_bridge->size_type = U16_APER_SIZE;
agp_bridge->num_aperture_sizes = 7;
agp_bridge->dev_private_data = NULL;
agp_bridge->needs_scratch_page = FALSE;
agp_bridge->configure = intel_7505_configure;
agp_bridge->fetch_size = intel_7505_fetch_size;
agp_bridge->cleanup = intel_7505_cleanup;
agp_bridge->tlb_flush = intel_7505_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = i7505_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
agp_bridge->insert_memory = agp_generic_insert_memory;
agp_bridge->remove_memory = agp_generic_remove_memory;
agp_bridge->alloc_by_type = agp_generic_alloc_by_type;
agp_bridge->free_by_type = agp_generic_free_by_type;
agp_bridge->agp_alloc_page = agp_generic_alloc_page;
agp_bridge->agp_destroy_page = agp_generic_destroy_page;
agp_bridge->suspend = agp_generic_suspend;
agp_bridge->resume = agp_generic_resume;
agp_bridge->cant_use_aperture = 0;
return 0;
}
struct agp_device_ids i7x05_agp_device_ids[] __initdata =
{
{
.device_id = PCI_DEVICE_ID_INTEL_7505_0,
.chipset = INTEL_I7505,
.chipset_name = "i7505",
},
{
.device_id = PCI_DEVICE_ID_INTEL_7205_0,
.chipset = INTEL_I7505,
.chipset_name = "i7205",
},
{ }, /* dummy final entry, always present */
};
/* scan table above for supported devices */
static int __init agp_lookup_host_bridge (struct pci_dev *pdev)
{
int j=0;
struct agp_device_ids *devs;
devs = i7x05_agp_device_ids;
while (devs[j].chipset_name != NULL) {
if (pdev->device == devs[j].device_id) {
printk (KERN_INFO PFX "Detected Intel %s chipset\n",
devs[j].chipset_name);
agp_bridge->type = devs[j].chipset;
if (devs[j].chipset_setup != NULL)
return devs[j].chipset_setup(pdev);
else
return intel_7505_setup(pdev);
}
j++;
}
printk(KERN_ERR PFX "Unsupported Intel chipset (device id: %04x),",
pdev->device);
return -ENODEV;
}
static struct agp_driver i7x05_agp_driver = {
.owner = THIS_MODULE;
};
static int __init agp_i7x05_probe (struct pci_dev *dev, const struct pci_device_id *ent)
{
u8 cap_ptr = 0;
cap_ptr = pci_find_capability(dev, PCI_CAP_ID_AGP);
if (cap_ptr == 0)
return -ENODEV;
if (agp_lookup_host_bridge(dev) != -ENODEV) {
agp_bridge->dev = dev;
agp_bridge->capndx = cap_ptr;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx+PCI_AGP_STATUS, &agp_bridge->mode)
i7x05_agp_driver.dev = dev;
agp_register_driver(&i7x05_agp_driver);
return 0;
}
return -ENODEV;
}
static struct pci_device_id agp_i7x05_pci_table[] __initdata = {
{
.class = (PCI_CLASS_BRIDGE_HOST << 8),
.class_mask = ~0,
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_ANY_ID,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},
{ }
};
MODULE_DEVICE_TABLE(pci, agp_i7x05_pci_table);
static struct __initdata pci_driver agp_i7x05_pci_driver = {
.name = "agpgart-i7x05",
.id_table = agp_i7x05_pci_table,
.probe = agp_i7x05_probe,
};
int __init agp_i7x05_init(void)
{
int ret_val;
ret_val = pci_module_init(&agp_i7x05_pci_driver);
if (ret_val)
agp_bridge->type = NOT_SUPPORTED;
return ret_val;
}
static void __exit agp_i7x05_cleanup(void)
{
agp_unregister_driver(&i7x05_agp_driver);
pci_unregister_driver(&agp_i7x05_pci_driver);
}
module_init(agp_i7x05_init);
module_exit(agp_i7x05_cleanup);
MODULE_AUTHOR("Matthew E Tolentino <matthew.e.tolentino@intel.com>");
MODULE_LICENSE("GPL and additional rights");
......@@ -960,6 +960,34 @@ static int intel_830mp_configure(void)
return 0;
}
static int intel_7505_configure(void)
{
u32 temp;
u16 temp2;
struct aper_size_info_8 *current_size;
current_size = A_SIZE_8(agp_bridge->current_size);
/* aperture size */
pci_write_config_byte(agp_bridge->dev, INTEL_APSIZE, current_size->size_value);
/* address to map to */
pci_read_config_dword(agp_bridge->dev, INTEL_APBASE, &temp);
agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
/* attbase - aperture base */
pci_write_config_dword(agp_bridge->dev, INTEL_ATTBASE, agp_bridge->gatt_bus_addr);
/* agpctrl */
pci_write_config_dword(agp_bridge->dev, INTEL_AGPCTRL, 0x0000);
/* mchcfg */
pci_read_config_word(agp_bridge->dev, INTEL_I7505_MCHCFG, &temp2);
pci_write_config_word(agp_bridge->dev, INTEL_I7505_MCHCFG, temp2 | (1 << 9));
return 0;
}
static unsigned long intel_mask_memory(unsigned long addr, int type)
{
/* Memory type is ignored */
......@@ -1026,7 +1054,7 @@ static int __init intel_generic_setup (struct pci_dev *pdev)
agp_bridge->cleanup = intel_cleanup;
agp_bridge->tlb_flush = intel_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -1055,7 +1083,7 @@ static int __init intel_815_setup (struct pci_dev *pdev)
agp_bridge->cleanup = intel_8xx_cleanup;
agp_bridge->tlb_flush = intel_8xx_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -1085,7 +1113,7 @@ static int __init intel_820_setup (struct pci_dev *pdev)
agp_bridge->cleanup = intel_820_cleanup;
agp_bridge->tlb_flush = intel_820_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -1114,7 +1142,7 @@ static int __init intel_830mp_setup (struct pci_dev *pdev)
agp_bridge->cleanup = intel_8xx_cleanup;
agp_bridge->tlb_flush = intel_8xx_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -1143,7 +1171,7 @@ static int __init intel_840_setup (struct pci_dev *pdev)
agp_bridge->cleanup = intel_8xx_cleanup;
agp_bridge->tlb_flush = intel_8xx_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -1172,7 +1200,7 @@ static int __init intel_845_setup (struct pci_dev *pdev)
agp_bridge->cleanup = intel_8xx_cleanup;
agp_bridge->tlb_flush = intel_8xx_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -1201,7 +1229,7 @@ static int __init intel_850_setup (struct pci_dev *pdev)
agp_bridge->cleanup = intel_8xx_cleanup;
agp_bridge->tlb_flush = intel_8xx_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -1230,7 +1258,7 @@ static int __init intel_860_setup (struct pci_dev *pdev)
agp_bridge->cleanup = intel_8xx_cleanup;
agp_bridge->tlb_flush = intel_8xx_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -1246,6 +1274,34 @@ static int __init intel_860_setup (struct pci_dev *pdev)
return 0;
}
static int __init intel_7505_setup (struct pci_dev *pdev)
{
agp_bridge->masks = intel_generic_masks;
agp_bridge->aperture_sizes = (void *) intel_8xx_sizes;
agp_bridge->size_type = U8_APER_SIZE;
agp_bridge->num_aperture_sizes = 7;
agp_bridge->dev_private_data = NULL;
agp_bridge->needs_scratch_page = FALSE;
agp_bridge->configure = intel_7505_configure;
agp_bridge->fetch_size = intel_8xx_fetch_size;
agp_bridge->cleanup = intel_8xx_cleanup;
agp_bridge->tlb_flush = intel_8xx_tlbflush;
agp_bridge->mask_memory = intel_mask_memory;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
agp_bridge->insert_memory = agp_generic_insert_memory;
agp_bridge->remove_memory = agp_generic_remove_memory;
agp_bridge->alloc_by_type = agp_generic_alloc_by_type;
agp_bridge->free_by_type = agp_generic_free_by_type;
agp_bridge->agp_alloc_page = agp_generic_alloc_page;
agp_bridge->agp_destroy_page = agp_generic_destroy_page;
agp_bridge->suspend = agp_generic_suspend;
agp_bridge->resume = agp_generic_resume;
agp_bridge->cant_use_aperture = 0;
return 0;
}
struct agp_device_ids intel_agp_device_ids[] __initdata =
{
{
......@@ -1329,6 +1385,18 @@ struct agp_device_ids intel_agp_device_ids[] __initdata =
.chipset_name = "865G",
.chipset_setup = intel_845_setup
},
{
.device_id = PCI_DEVICE_ID_INTEL_7505_0,
.chipset = INTEL_E7505,
.chipset_name = "E7505",
.chipset_setup = intel_7505_setup
},
{
.device_id = PCI_DEVICE_ID_INTEL_7205_0,
.chipset = INTEL_E7505,
.chipset_name = "E7205",
.chipset_setup = intel_7505_setup
},
{ }, /* dummy final entry, always present */
};
......
......@@ -99,7 +99,7 @@ static int __init sis_generic_setup (struct pci_dev *pdev)
agp_bridge->cleanup = sis_cleanup;
agp_bridge->tlb_flush = sis_tlbflush;
agp_bridge->mask_memory = sis_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......
......@@ -101,7 +101,6 @@ static struct gatt_mask via_generic_masks[] =
};
#ifdef CONFIG_AGP3
static int via_fetch_size_agp3(void)
{
int i;
......@@ -186,7 +185,7 @@ static int __init via_generic_agp3_setup (struct pci_dev *pdev)
agp_bridge->num_aperture_sizes = 10;
agp_bridge->dev_private_data = NULL;
agp_bridge->needs_scratch_page = FALSE;
agp_bridge->agp_enable = agp_generic_agp_3_0_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->configure = via_configure_agp3;
agp_bridge->fetch_size = via_fetch_size_agp3;
agp_bridge->cleanup = via_cleanup_agp3;
......@@ -206,18 +205,10 @@ static int __init via_generic_agp3_setup (struct pci_dev *pdev)
agp_bridge->cant_use_aperture = 0;
return 0;
}
#else
static int __init via_generic_agp3_setup (struct pci_dev *pdev)
{
printk (KERN_INFO PFX "Bridge in AGP3 mode, but CONFIG_AGP3=n\n");
return -ENODEV;
}
#endif /* CONFIG_AGP3 */
static int __init via_generic_setup (struct pci_dev *pdev)
{
#ifdef CONFIG_AGP3
/* Garg, there are KT400s with KT266 IDs. */
if (pdev->device == PCI_DEVICE_ID_VIA_8367_0) {
......@@ -235,7 +226,6 @@ static int __init via_generic_setup (struct pci_dev *pdev)
/* Its in 2.0 mode, drop through. */
}
}
#endif
agp_bridge->masks = via_generic_masks;
agp_bridge->aperture_sizes = (void *) via_generic_sizes;
......@@ -248,7 +238,7 @@ static int __init via_generic_setup (struct pci_dev *pdev)
agp_bridge->cleanup = via_cleanup;
agp_bridge->tlb_flush = via_tlbflush;
agp_bridge->mask_memory = via_mask_memory;
agp_bridge->agp_enable = agp_generic_agp_enable;
agp_bridge->agp_enable = agp_generic_enable;
agp_bridge->cache_flush = global_cache_flush;
agp_bridge->create_gatt_table = agp_generic_create_gatt_table;
agp_bridge->free_gatt_table = agp_generic_free_gatt_table;
......@@ -319,10 +309,10 @@ static struct agp_device_ids via_agp_device_ids[] __initdata =
},
/* VT8361 */
/* {
{
.device_id = PCI_DEVICE_ID_VIA_8361, // 0x3112
.chipset_name = "Apollo KLE133",
}, */
},
/* VT8365 / VT8362 */
{
......@@ -331,10 +321,10 @@ static struct agp_device_ids via_agp_device_ids[] __initdata =
},
/* VT8753A */
/* {
.device_id = PCI_DEVICE_ID_VIA_8753_0, // 0x3128
{
.device_id = PCI_DEVICE_ID_VIA_8753_0,
.chipset_name = "P4X266",
}, */
},
/* VT8366 */
{
......@@ -349,16 +339,16 @@ static struct agp_device_ids via_agp_device_ids[] __initdata =
},
/* KM266 / PM266 */
/* {
.device_id = PCI_DEVICE_ID_VIA_KM266, // 0x3116
{
.device_id = PCI_DEVICE_ID_VIA_KM266,
.chipset_name = "KM266/PM266",
}, */
},
/* CLE266 */
/* {
.device_id = PCI_DEVICE_ID_VIA_CLE266, // 0x3123
{
.device_id = PCI_DEVICE_ID_VIA_CLE266,
.chipset_name = "CLE266",
}, */
},
{
.device_id = PCI_DEVICE_ID_VIA_8377_0,
......@@ -374,16 +364,16 @@ static struct agp_device_ids via_agp_device_ids[] __initdata =
},
/* VT8752*/
/* {
.device_id = PCI_DEVICE_ID_VIA_8752, // 0x3148
{
.device_id = PCI_DEVICE_ID_VIA_8752,
.chipset_name = "ProSavage DDR P4M266",
}, */
},
/* KN266/PN266 */
/* {
.device_id = PCI_DEVICE_ID_KN266, // 0x3156
{
.device_id = PCI_DEVICE_ID_VIA_KN266,
.chipset_name = "KN266/PN266",
}, */
},
/* VT8754 */
{
......@@ -392,28 +382,28 @@ static struct agp_device_ids via_agp_device_ids[] __initdata =
},
/* P4N333 */
/* {
.device_id = PCI_DEVICE_ID_VIA_P4N333, // 0x3178
{
.device_id = PCI_DEVICE_ID_VIA_P4N333,
.chipset_name = "P4N333",
}, */
},
/* P4X600 */
/* {
.device_id = PCI_DEVICE_ID_VIA_P4X600, // 0x0198
{
.device_id = PCI_DEVICE_ID_VIA_P4X600,
.chipset_name = "P4X600",
}, */
},
/* KM400 */
/* {
.device_id = PCI_DEVICE_ID_VIA_KM400, // 0x3205
{
.device_id = PCI_DEVICE_ID_VIA_KM400,
.chipset_name = "KM400",
}, */
},
/* P4M400 */
/* {
.device_id = PCI_DEVICE_ID_VIA_P4M400, // 0x3209
{
.device_id = PCI_DEVICE_ID_VIA_P4M400,
.chipset_name = "PM400",
}, */
},
{ }, /* dummy final entry, always present */
};
......
......@@ -242,17 +242,17 @@ static inline struct page * vmalloc_to_page(void * vmalloc_addr)
DRM(ioremapfree)( (map)->handle, (map)->size ); \
} while (0)
#define DRM_FIND_MAP(_map, _o) \
do { \
struct list_head *_list; \
list_for_each( _list, &dev->maplist->head ) { \
drm_map_list_t *_entry = (drm_map_list_t *)_list; \
if ( _entry->map && \
_entry->map->offset == (_o) ) { \
(_map) = _entry->map; \
break; \
} \
} \
#define DRM_FIND_MAP(_map, _o) \
do { \
struct list_head *_list; \
list_for_each( _list, &dev->maplist->head ) { \
drm_map_list_t *_entry = list_entry( _list, drm_map_list_t, head ); \
if ( _entry->map && \
_entry->map->offset == (_o) ) { \
(_map) = _entry->map; \
break; \
} \
} \
} while(0)
#define DRM_DROP_MAP(_map)
......
......@@ -266,12 +266,6 @@ drm_agp_head_t *DRM(agp_init)(void)
head->cant_use_aperture = head->agp_info.cant_use_aperture;
head->page_mask = head->agp_info.page_mask;
#endif
DRM_INFO("AGP %d.%d aperture @ 0x%08lx %ZuMB\n",
head->agp_info.version.major,
head->agp_info.version.minor,
head->agp_info.aper_base,
head->agp_info.aper_size);
}
return head;
}
......
......@@ -106,7 +106,7 @@ int DRM(addmap)( struct inode *inode, struct file *filp,
switch ( map->type ) {
case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER:
#if !defined(__sparc__) && !defined(__alpha__)
#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__)
if ( map->offset + map->size < map->offset ||
map->offset < virt_to_phys(high_memory) ) {
DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
......@@ -210,7 +210,7 @@ int DRM(rmmap)(struct inode *inode, struct file *filp,
down(&dev->struct_sem);
list = &dev->maplist->head;
list_for_each(list, &dev->maplist->head) {
r_list = (drm_map_list_t *) list;
r_list = list_entry(list, drm_map_list_t, head);
if(r_list->map &&
r_list->map->handle == request.handle &&
......
......@@ -194,7 +194,7 @@ int DRM(setsareactx)(struct inode *inode, struct file *filp,
down(&dev->struct_sem);
list_for_each(list, &dev->maplist->head) {
r_list = (drm_map_list_t *)list;
r_list = list_entry(list, drm_map_list_t, head);
if(r_list->map &&
r_list->map->handle == request.handle)
goto found;
......
......@@ -444,7 +444,7 @@ static int DRM(dma_get_buffers_of_order)(struct file *filp, drm_dma_t *d,
d->flags & _DRM_DMA_WAIT);
if (!buf) break;
if (buf->pending || buf->waiting) {
DRM_ERROR("Free buffer %d in use by %x (w%d, p%d)\n",
DRM_ERROR("Free buffer %d in use: filp %p (w%d, p%d)\n",
buf->idx,
buf->filp,
buf->waiting,
......@@ -651,7 +651,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
* for the same vblank sequence number; nothing to be done in
* that case
*/
list_for_each( ( (struct list_head *) vbl_sig ), &dev->vbl_sigs.head ) {
list_for_each_entry( vbl_sig, &dev->vbl_sigs.head, head ) {
if (vbl_sig->sequence == vblwait.request.sequence
&& vbl_sig->info.si_signo == vblwait.request.signal
&& vbl_sig->task == current)
......@@ -702,19 +702,20 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
void DRM(vbl_send_signals)( drm_device_t *dev )
{
struct list_head *tmp;
struct list_head *list, *tmp;
drm_vbl_sig_t *vbl_sig;
unsigned int vbl_seq = atomic_read( &dev->vbl_received );
unsigned long flags;
spin_lock_irqsave( &dev->vbl_lock, flags );
list_for_each_safe( ( (struct list_head *) vbl_sig ), tmp, &dev->vbl_sigs.head ) {
list_for_each_safe( list, tmp, &dev->vbl_sigs.head ) {
vbl_sig = list_entry( list, drm_vbl_sig_t, head );
if ( ( vbl_seq - vbl_sig->sequence ) <= (1<<23) ) {
vbl_sig->info.si_code = vbl_seq;
send_sig_info( vbl_sig->info.si_signo, &vbl_sig->info, vbl_sig->task );
list_del( (struct list_head *) vbl_sig );
list_del( list );
DRM_FREE( vbl_sig, sizeof(*vbl_sig) );
......
......@@ -204,7 +204,7 @@ int DRM(getmap)( struct inode *inode, struct file *filp,
i = 0;
list_for_each(list, &dev->maplist->head) {
if(i == idx) {
r_list = (drm_map_list_t *)list;
r_list = list_entry(list, drm_map_list_t, head);
break;
}
i++;
......
......@@ -46,9 +46,8 @@
#define DRM_GETSAREA() \
do { \
struct list_head *list; \
list_for_each( list, &dev->maplist->head ) { \
drm_map_list_t *entry = (drm_map_list_t *)list; \
drm_map_list_t *entry; \
list_for_each_entry( entry, &dev->maplist->head, head ) { \
if ( entry->map && \
entry->map->type == _DRM_SHM && \
(entry->map->flags & _DRM_CONTAINS_LOCK) ) { \
......@@ -60,28 +59,28 @@ do { \
#define DRM_HZ HZ
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
do { \
DECLARE_WAITQUEUE(entry, current); \
unsigned long end = jiffies + (timeout); \
add_wait_queue(&(queue), &entry); \
\
for (;;) { \
current->state = TASK_INTERRUPTIBLE; \
if (condition) \
break; \
if((signed)(end - jiffies) <= 0) { \
ret = -EBUSY; \
break; \
} \
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
do { \
DECLARE_WAITQUEUE(entry, current); \
unsigned long end = jiffies + (timeout); \
add_wait_queue(&(queue), &entry); \
\
for (;;) { \
current->state = TASK_INTERRUPTIBLE; \
if (condition) \
break; \
if (time_after_eq(jiffies, end)) { \
ret = -EBUSY; \
break; \
} \
schedule_timeout((HZ/100 > 1) ? HZ/100 : 1); \
if (signal_pending(current)) { \
ret = -EINTR; \
break; \
} \
} \
current->state = TASK_RUNNING; \
remove_wait_queue(&(queue), &entry); \
if (signal_pending(current)) { \
ret = -EINTR; \
break; \
} \
} \
current->state = TASK_RUNNING; \
remove_wait_queue(&(queue), &entry); \
} while (0)
......
......@@ -168,9 +168,9 @@ static int DRM(_vm_info)(char *buf, char **start, off_t offset, int request,
struct list_head *list;
/* Hardcoded from _DRM_FRAME_BUFFER,
_DRM_REGISTERS, _DRM_SHM, and
_DRM_AGP. */
const char *types[] = { "FB", "REG", "SHM", "AGP" };
_DRM_REGISTERS, _DRM_SHM, _DRM_AGP, and
_DRM_SCATTER_GATHER. */
const char *types[] = { "FB", "REG", "SHM", "AGP", "SG" };
const char *type;
int i;
......@@ -186,10 +186,10 @@ static int DRM(_vm_info)(char *buf, char **start, off_t offset, int request,
"address mtrr\n\n");
i = 0;
if (dev->maplist != NULL) list_for_each(list, &dev->maplist->head) {
r_list = (drm_map_list_t *)list;
r_list = list_entry(list, drm_map_list_t, head);
map = r_list->map;
if(!map) continue;
if (map->type < 0 || map->type > 3) type = "??";
if (map->type < 0 || map->type > 4) type = "??";
else type = types[map->type];
DRM_PROC_PRINT("%4d 0x%08lx 0x%08lx %4.4s 0x%02x 0x%08lx ",
i,
......
......@@ -73,7 +73,7 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
if(!dev->agp || !dev->agp->cant_use_aperture) goto vm_nopage_error;
list_for_each(list, &dev->maplist->head) {
r_list = (drm_map_list_t *)list;
r_list = list_entry(list, drm_map_list_t, head);
map = r_list->map;
if (!map) continue;
if (map->offset == VM_OFFSET(vma)) break;
......@@ -189,7 +189,7 @@ void DRM(vm_shm_close)(struct vm_area_struct *vma)
found_maps = 0;
list = &dev->maplist->head;
list_for_each(list, &dev->maplist->head) {
r_list = (drm_map_list_t *) list;
r_list = list_entry(list, drm_map_list_t, head);
if (r_list->map == map) found_maps++;
}
......@@ -392,7 +392,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
list_for_each(list, &dev->maplist->head) {
unsigned long off;
r_list = (drm_map_list_t *)list;
r_list = list_entry(list, drm_map_list_t, head);
map = r_list->map;
if (!map) continue;
off = DRIVER_GET_MAP_OFS();
......
......@@ -605,7 +605,7 @@ static int gamma_do_init_dma( drm_device_t *dev, drm_gamma_init_t *init )
memset( dev_priv, 0, sizeof(drm_gamma_private_t) );
list_for_each(list, &dev->maplist->head) {
drm_map_list_t *r_list = (drm_map_list_t *)list;
drm_map_list_t *r_list = list_entry(list, drm_map_list_t, head);
if( r_list->map &&
r_list->map->type == _DRM_SHM &&
r_list->map->flags & _DRM_CONTAINS_LOCK ) {
......@@ -809,7 +809,7 @@ int gamma_setsareactx(struct inode *inode, struct file *filp,
down(&dev->struct_sem);
r_list = NULL;
list_for_each(list, &dev->maplist->head) {
r_list = (drm_map_list_t *)list;
r_list = list_entry(list, drm_map_list_t, head);
if(r_list->map &&
r_list->map->handle == request.handle) break;
}
......
......@@ -340,7 +340,7 @@ static int i810_dma_initialize(drm_device_t *dev,
memset(dev_priv, 0, sizeof(drm_i810_private_t));
list_for_each(list, &dev->maplist->head) {
drm_map_list_t *r_list = (drm_map_list_t *)list;
drm_map_list_t *r_list = list_entry(list, drm_map_list_t, head);
if( r_list->map &&
r_list->map->type == _DRM_SHM &&
r_list->map->flags & _DRM_CONTAINS_LOCK ) {
......
......@@ -363,7 +363,7 @@ static int i830_dma_initialize(drm_device_t *dev,
memset(dev_priv, 0, sizeof(drm_i830_private_t));
list_for_each(list, &dev->maplist->head) {
drm_map_list_t *r_list = (drm_map_list_t *)list;
drm_map_list_t *r_list = list_entry(list, drm_map_list_t, head);
if( r_list->map &&
r_list->map->type == _DRM_SHM &&
r_list->map->flags & _DRM_CONTAINS_LOCK ) {
......
......@@ -106,8 +106,6 @@ static int isapnp_detected;
/* some prototypes */
extern struct pnp_protocol isapnp_protocol;
static inline void write_data(unsigned char x)
{
outb(x, _PNPWRP);
......
......@@ -869,7 +869,7 @@ static int pnpbios_disable_resources(struct pnp_dev *dev)
/* PnP Layer support */
static struct pnp_protocol pnpbios_protocol = {
struct pnp_protocol pnpbios_protocol = {
.name = "Plug and Play BIOS",
.get = pnpbios_get_resources,
.set = pnpbios_set_resources,
......
......@@ -736,9 +736,10 @@ int nfs_cached_lookup(struct inode *dir, struct dentry *dentry,
res = -EIO;
if (PageUptodate(page)) {
desc.ptr = kmap_atomic(page, KM_USER0);
void * kaddr = kmap_atomic(page, KM_USER0);
desc.ptr = kaddr;
res = find_dirent_name(&desc, page, dentry);
kunmap_atomic(desc.ptr, KM_USER0);
kunmap_atomic(kaddr, KM_USER0);
}
page_cache_release(page);
......
......@@ -135,7 +135,7 @@ asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
#if !defined(__alpha__)
asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
unsigned long offset_low, loff_t * result,
unsigned long offset_low, loff_t __user * result,
unsigned int origin)
{
int retval;
......@@ -167,7 +167,7 @@ asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
}
#endif
ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos)
ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos)
{
struct kiocb kiocb;
ssize_t ret;
......@@ -181,7 +181,7 @@ ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos)
return ret;
}
ssize_t vfs_read(struct file *file, char *buf, size_t count, loff_t *pos)
ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
{
struct inode *inode = file->f_dentry->d_inode;
ssize_t ret;
......@@ -207,7 +207,7 @@ ssize_t vfs_read(struct file *file, char *buf, size_t count, loff_t *pos)
return ret;
}
ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos)
ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
{
struct kiocb kiocb;
ssize_t ret;
......@@ -221,7 +221,7 @@ ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *pp
return ret;
}
ssize_t vfs_write(struct file *file, const char *buf, size_t count, loff_t *pos)
ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)
{
struct inode *inode = file->f_dentry->d_inode;
ssize_t ret;
......@@ -247,7 +247,7 @@ ssize_t vfs_write(struct file *file, const char *buf, size_t count, loff_t *pos)
return ret;
}
asmlinkage ssize_t sys_read(unsigned int fd, char * buf, size_t count)
asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
{
struct file *file;
ssize_t ret = -EBADF;
......@@ -261,7 +261,7 @@ asmlinkage ssize_t sys_read(unsigned int fd, char * buf, size_t count)
return ret;
}
asmlinkage ssize_t sys_write(unsigned int fd, const char * buf, size_t count)
asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count)
{
struct file *file;
ssize_t ret = -EBADF;
......@@ -275,7 +275,7 @@ asmlinkage ssize_t sys_write(unsigned int fd, const char * buf, size_t count)
return ret;
}
asmlinkage ssize_t sys_pread64(unsigned int fd, char *buf,
asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf,
size_t count, loff_t pos)
{
struct file *file;
......@@ -293,7 +293,7 @@ asmlinkage ssize_t sys_pread64(unsigned int fd, char *buf,
return ret;
}
asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char *buf,
asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf,
size_t count, loff_t pos)
{
struct file *file;
......@@ -332,7 +332,7 @@ unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to)
}
static ssize_t do_readv_writev(int type, struct file *file,
const struct iovec * vector,
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 *);
......@@ -340,7 +340,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
size_t tot_len;
struct iovec iovstack[UIO_FASTIOV];
struct iovec *iov=iovstack;
struct iovec *iov=iovstack, *vector;
ssize_t ret;
int seg;
io_fn_t fn;
......@@ -372,7 +372,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
goto out;
}
ret = -EFAULT;
if (copy_from_user(iov, vector, nr_segs*sizeof(*vector)))
if (copy_from_user(iov, uvector, nr_segs*sizeof(*uvector)))
goto out;
/*
......@@ -451,7 +451,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
return ret;
}
ssize_t vfs_readv(struct file *file, const struct iovec *vec,
ssize_t vfs_readv(struct file *file, const struct iovec __user *vec,
unsigned long vlen, loff_t *pos)
{
if (!(file->f_mode & FMODE_READ))
......@@ -462,7 +462,7 @@ ssize_t vfs_readv(struct file *file, const struct iovec *vec,
return do_readv_writev(READ, file, vec, vlen, pos);
}
ssize_t vfs_writev(struct file *file, const struct iovec *vec,
ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
unsigned long vlen, loff_t *pos)
{
if (!(file->f_mode & FMODE_WRITE))
......@@ -475,7 +475,7 @@ ssize_t vfs_writev(struct file *file, const struct iovec *vec,
asmlinkage ssize_t
sys_readv(unsigned long fd, const struct iovec *vec, unsigned long vlen)
sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
{
struct file *file;
ssize_t ret = -EBADF;
......@@ -490,7 +490,7 @@ sys_readv(unsigned long fd, const struct iovec *vec, unsigned long vlen)
}
asmlinkage ssize_t
sys_writev(unsigned long fd, const struct iovec *vec, unsigned long vlen)
sys_writev(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
{
struct file *file;
ssize_t ret = -EBADF;
......@@ -586,7 +586,7 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
return retval;
}
asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t *offset, size_t count)
asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t __user *offset, size_t count)
{
loff_t pos;
off_t off;
......@@ -605,7 +605,7 @@ asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t *offset, size_t cou
return do_sendfile(out_fd, in_fd, NULL, count, MAX_NON_LFS);
}
asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t *offset, size_t count)
asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t __user *offset, size_t count)
{
loff_t pos;
ssize_t ret;
......
......@@ -58,7 +58,7 @@ struct old_linux_dirent {
};
struct readdir_callback {
struct old_linux_dirent * dirent;
struct old_linux_dirent __user * dirent;
int count;
};
......@@ -66,7 +66,7 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset
ino_t ino, unsigned int d_type)
{
struct readdir_callback * buf = (struct readdir_callback *) __buf;
struct old_linux_dirent * dirent;
struct old_linux_dirent __user * dirent;
if (buf->count)
return -EINVAL;
......@@ -85,7 +85,7 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset
return 0;
}
asmlinkage long old_readdir(unsigned int fd, void * dirent, unsigned int count)
asmlinkage long old_readdir(unsigned int fd, struct old_linux_dirent __user * dirent, unsigned int count)
{
int error;
struct file * file;
......@@ -122,8 +122,8 @@ struct linux_dirent {
};
struct getdents_callback {
struct linux_dirent * current_dir;
struct linux_dirent * previous;
struct linux_dirent __user * current_dir;
struct linux_dirent __user * previous;
int count;
int error;
};
......@@ -131,7 +131,7 @@ struct getdents_callback {
static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
ino_t ino, unsigned int d_type)
{
struct linux_dirent * dirent;
struct linux_dirent __user * dirent;
struct getdents_callback * buf = (struct getdents_callback *) __buf;
int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
......@@ -161,10 +161,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
return -EFAULT;
}
asmlinkage long sys_getdents(unsigned int fd, void * dirent, unsigned int count)
asmlinkage long sys_getdents(unsigned int fd, struct linux_dirent __user * dirent, unsigned int count)
{
struct file * file;
struct linux_dirent * lastdirent;
struct linux_dirent __user * lastdirent;
struct getdents_callback buf;
int error;
......@@ -177,7 +177,7 @@ asmlinkage long sys_getdents(unsigned int fd, void * dirent, unsigned int count)
if (!file)
goto out;
buf.current_dir = (struct linux_dirent *) dirent;
buf.current_dir = dirent;
buf.previous = NULL;
buf.count = count;
buf.error = 0;
......@@ -203,8 +203,8 @@ asmlinkage long sys_getdents(unsigned int fd, void * dirent, unsigned int count)
#define ROUND_UP64(x) (((x)+sizeof(u64)-1) & ~(sizeof(u64)-1))
struct getdents_callback64 {
struct linux_dirent64 * current_dir;
struct linux_dirent64 * previous;
struct linux_dirent64 __user * current_dir;
struct linux_dirent64 __user * previous;
int count;
int error;
};
......@@ -212,7 +212,7 @@ struct getdents_callback64 {
static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
ino_t ino, unsigned int d_type)
{
struct linux_dirent64 *dirent;
struct linux_dirent64 __user *dirent;
struct getdents_callback64 * buf = (struct getdents_callback64 *) __buf;
int reclen = ROUND_UP64(NAME_OFFSET(dirent) + namlen + 1);
......@@ -246,10 +246,10 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
return -EFAULT;
}
asmlinkage long sys_getdents64(unsigned int fd, void * dirent, unsigned int count)
asmlinkage long sys_getdents64(unsigned int fd, struct linux_dirent64 __user * dirent, unsigned int count)
{
struct file * file;
struct linux_dirent64 * lastdirent;
struct linux_dirent64 __user * lastdirent;
struct getdents_callback64 buf;
int error;
......@@ -262,7 +262,7 @@ asmlinkage long sys_getdents64(unsigned int fd, void * dirent, unsigned int coun
if (!file)
goto out;
buf.current_dir = (struct linux_dirent64 *) dirent;
buf.current_dir = dirent;
buf.previous = NULL;
buf.count = count;
buf.error = 0;
......@@ -273,9 +273,8 @@ asmlinkage long sys_getdents64(unsigned int fd, void * dirent, unsigned int coun
error = buf.error;
lastdirent = buf.previous;
if (lastdirent) {
struct linux_dirent64 d;
d.d_off = file->f_pos;
__put_user(d.d_off, &lastdirent->d_off);
typeof(lastdirent->d_off) d_off = file->f_pos;
__put_user(d_off, &lastdirent->d_off);
error = count - buf.count;
}
......
......@@ -268,7 +268,7 @@ static void select_bits_free(void *bits, int size)
((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
asmlinkage long
sys_select(int n, fd_set *inp, fd_set *outp, fd_set *exp, struct timeval *tvp)
sys_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, struct timeval __user *tvp)
{
fd_set_bits fds;
char *bits;
......@@ -429,7 +429,7 @@ static int do_poll(unsigned int nfds, struct poll_list *list,
return count;
}
asmlinkage long sys_poll(struct pollfd * ufds, unsigned int nfds, long timeout)
asmlinkage long sys_poll(struct pollfd __user * ufds, unsigned int nfds, long timeout)
{
struct poll_wqueues table;
int fdcount, err;
......
......@@ -43,7 +43,7 @@ int seq_open(struct file *file, struct seq_operations *op)
*
* Ready-made ->f_op->read()
*/
ssize_t seq_read(struct file *file, char *buf, size_t size, loff_t *ppos)
ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
{
struct seq_file *m = (struct seq_file *)file->private_data;
size_t copied = 0;
......
......@@ -56,7 +56,7 @@ int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
return 0;
}
int vfs_stat(char *name, struct kstat *stat)
int vfs_stat(char __user *name, struct kstat *stat)
{
struct nameidata nd;
int error;
......@@ -69,7 +69,7 @@ int vfs_stat(char *name, struct kstat *stat)
return error;
}
int vfs_lstat(char *name, struct kstat *stat)
int vfs_lstat(char __user *name, struct kstat *stat)
{
struct nameidata nd;
int error;
......@@ -102,7 +102,7 @@ int vfs_fstat(unsigned int fd, struct kstat *stat)
* For backward compatibility? Maybe this should be moved
* into arch/i386 instead?
*/
static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat * statbuf)
static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * statbuf)
{
static int warncount = 5;
struct __old_kernel_stat tmp;
......@@ -134,7 +134,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat * statbuf)
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
asmlinkage long sys_stat(char * filename, struct __old_kernel_stat * statbuf)
asmlinkage long sys_stat(char __user * filename, struct __old_kernel_stat __user * statbuf)
{
struct kstat stat;
int error = vfs_stat(filename, &stat);
......@@ -144,7 +144,7 @@ asmlinkage long sys_stat(char * filename, struct __old_kernel_stat * statbuf)
return error;
}
asmlinkage long sys_lstat(char * filename, struct __old_kernel_stat * statbuf)
asmlinkage long sys_lstat(char __user * filename, struct __old_kernel_stat __user * statbuf)
{
struct kstat stat;
int error = vfs_lstat(filename, &stat);
......@@ -154,7 +154,7 @@ asmlinkage long sys_lstat(char * filename, struct __old_kernel_stat * statbuf)
return error;
}
asmlinkage long sys_fstat(unsigned int fd, struct __old_kernel_stat * statbuf)
asmlinkage long sys_fstat(unsigned int fd, struct __old_kernel_stat __user * statbuf)
{
struct kstat stat;
int error = vfs_fstat(fd, &stat);
......@@ -167,7 +167,7 @@ asmlinkage long sys_fstat(unsigned int fd, struct __old_kernel_stat * statbuf)
#endif
static int cp_new_stat(struct kstat *stat, struct stat *statbuf)
static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf)
{
struct stat tmp;
......@@ -197,7 +197,7 @@ static int cp_new_stat(struct kstat *stat, struct stat *statbuf)
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
asmlinkage long sys_newstat(char * filename, struct stat * statbuf)
asmlinkage long sys_newstat(char __user * filename, struct stat __user * statbuf)
{
struct kstat stat;
int error = vfs_stat(filename, &stat);
......@@ -207,7 +207,7 @@ asmlinkage long sys_newstat(char * filename, struct stat * statbuf)
return error;
}
asmlinkage long sys_newlstat(char * filename, struct stat * statbuf)
asmlinkage long sys_newlstat(char __user * filename, struct stat __user * statbuf)
{
struct kstat stat;
int error = vfs_lstat(filename, &stat);
......@@ -217,7 +217,7 @@ asmlinkage long sys_newlstat(char * filename, struct stat * statbuf)
return error;
}
asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf)
asmlinkage long sys_newfstat(unsigned int fd, struct stat __user * statbuf)
{
struct kstat stat;
int error = vfs_fstat(fd, &stat);
......@@ -228,7 +228,7 @@ asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf)
return error;
}
asmlinkage long sys_readlink(const char * path, char * buf, int bufsiz)
asmlinkage long sys_readlink(const char __user * path, char __user * buf, int bufsiz)
{
struct nameidata nd;
int error;
......@@ -257,7 +257,7 @@ asmlinkage long sys_readlink(const char * path, char * buf, int bufsiz)
/* ---------- LFS-64 ----------- */
#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips64) && !defined(__x86_64__) && !defined(CONFIG_ARCH_S390X)
static long cp_new_stat64(struct kstat *stat, struct stat64 *statbuf)
static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf)
{
struct stat64 tmp;
......@@ -284,7 +284,7 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 *statbuf)
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
asmlinkage long sys_stat64(char * filename, struct stat64 * statbuf, long flags)
asmlinkage long sys_stat64(char __user * filename, struct stat64 __user * statbuf, long flags)
{
struct kstat stat;
int error = vfs_stat(filename, &stat);
......@@ -294,7 +294,7 @@ asmlinkage long sys_stat64(char * filename, struct stat64 * statbuf, long flags)
return error;
}
asmlinkage long sys_lstat64(char * filename, struct stat64 * statbuf, long flags)
asmlinkage long sys_lstat64(char __user * filename, struct stat64 __user * statbuf, long flags)
{
struct kstat stat;
int error = vfs_lstat(filename, &stat);
......@@ -304,7 +304,7 @@ asmlinkage long sys_lstat64(char * filename, struct stat64 * statbuf, long flags
return error;
}
asmlinkage long sys_fstat64(unsigned long fd, struct stat64 * statbuf, long flags)
asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user * statbuf, long flags)
{
struct kstat stat;
int error = vfs_fstat(fd, &stat);
......
......@@ -407,7 +407,7 @@ struct super_block * user_get_super(dev_t dev)
return NULL;
}
asmlinkage long sys_ustat(dev_t dev, struct ustat * ubuf)
asmlinkage long sys_ustat(dev_t dev, struct ustat __user * ubuf)
{
struct super_block *s;
struct ustat tmp;
......
#ifndef _ASM_GENERIC_SIGINFO_H
#define _ASM_GENERIC_SIGINFO_H
#include <linux/compiler.h>
#include <linux/types.h>
typedef union sigval {
......
......@@ -118,10 +118,10 @@ struct sigstack {
};
/* Sigvec flags */
#define SV_SSTACK 1 /* This signal handler should use sig-stack */
#define SV_INTR 2 /* Sig return should not restart system call */
#define SV_RESET 4 /* Set handler to SIG_DFL upon taken signal */
#define SV_IGNCHILD 8 /* Do not send SIGCHLD */
#define SV_SSTACK 1u /* This signal handler should use sig-stack */
#define SV_INTR 2u /* Sig return should not restart system call */
#define SV_RESET 4u /* Set handler to SIG_DFL upon taken signal */
#define SV_IGNCHILD 8u /* Do not send SIGCHLD */
/*
* sa_flags values: SA_STACK is not currently supported, but will allow the
......@@ -137,11 +137,11 @@ struct sigstack {
#define SA_ONSTACK SV_SSTACK
#define SA_RESTART SV_INTR
#define SA_ONESHOT SV_RESET
#define SA_INTERRUPT 0x10
#define SA_NOMASK 0x20
#define SA_SHIRQ 0x40
#define SA_NOCLDWAIT 0x100
#define SA_SIGINFO 0x200
#define SA_INTERRUPT 0x10u
#define SA_NOMASK 0x20u
#define SA_SHIRQ 0x40u
#define SA_NOCLDWAIT 0x100u
#define SA_SIGINFO 0x200u
#define SIG_BLOCK 0x01 /* for blocking signals */
#define SIG_UNBLOCK 0x02 /* for unblocking signals */
......
......@@ -8,6 +8,7 @@
#define _ASM_UACCESS_H
#ifdef __KERNEL__
#include <linux/compiler.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/errno.h>
......@@ -45,7 +46,7 @@
#define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size)))
#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
extern inline int verify_area(int type, const void * addr, unsigned long size)
static inline int verify_area(int type, const void __user * addr, unsigned long size)
{
return access_ok(type,addr,size)?0:-EFAULT;
}
......@@ -291,87 +292,87 @@ __asm__ __volatile__( \
extern int __get_user_bad(void);
extern __kernel_size_t __copy_user(void *to, void *from, __kernel_size_t size);
#define copy_to_user(to,from,n) ({ \
void *__copy_to = (void *) (to); \
__kernel_size_t __copy_size = (__kernel_size_t) (n); \
__kernel_size_t __copy_res; \
if(__copy_size && __access_ok((unsigned long)__copy_to, __copy_size)) { \
__copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \
} else __copy_res = __copy_size; \
__copy_res; })
#define __copy_to_user(to,from,n) \
__copy_user((void *)(to), \
(void *)(from), n)
#define copy_from_user(to,from,n) ({ \
void *__copy_to = (void *) (to); \
void *__copy_from = (void *) (from); \
__kernel_size_t __copy_size = (__kernel_size_t) (n); \
__kernel_size_t __copy_res; \
if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \
__copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \
} else __copy_res = __copy_size; \
__copy_res; })
#define __copy_from_user(to,from,n) \
__copy_user((void *)(to), \
(void *)(from), n)
extern __inline__ __kernel_size_t __clear_user(void *addr, __kernel_size_t size)
extern unsigned long __copy_user(void *to, const void *from, unsigned long size);
static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
{
__kernel_size_t ret;
__asm__ __volatile__ (
".section __ex_table,#alloc\n\t"
".align 4\n\t"
".word 1f,3\n\t"
".previous\n\t"
"mov %2, %%o1\n"
"1:\n\t"
"call __bzero\n\t"
" mov %1, %%o0\n\t"
"mov %%o0, %0\n"
: "=r" (ret) : "r" (addr), "r" (size) :
"o0", "o1", "o2", "o3", "o4", "o5", "o7",
"g1", "g2", "g3", "g4", "g5", "g7", "cc");
return ret;
if (n && __access_ok((unsigned long) to, n))
return __copy_user((void *) to, from, n);
else
return n;
}
#define clear_user(addr,n) ({ \
void *__clear_addr = (void *) (addr); \
__kernel_size_t __clear_size = (__kernel_size_t) (n); \
__kernel_size_t __clear_res; \
if(__clear_size && __access_ok((unsigned long)__clear_addr, __clear_size)) { \
__clear_res = __clear_user(__clear_addr, __clear_size); \
} else __clear_res = __clear_size; \
__clear_res; })
extern int __strncpy_from_user(unsigned long dest, unsigned long src, int count);
#define strncpy_from_user(dest,src,count) ({ \
unsigned long __sfu_src = (unsigned long) (src); \
int __sfu_count = (int) (count); \
long __sfu_res = -EFAULT; \
if(__access_ok(__sfu_src, __sfu_count)) { \
__sfu_res = __strncpy_from_user((unsigned long) (dest), __sfu_src, __sfu_count); \
} __sfu_res; })
extern int __strlen_user(const char *);
extern int __strnlen_user(const char *, long len);
extern __inline__ int strlen_user(const char *str)
static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n)
{
return __copy_user((void *)to, from, n);
}
static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
{
if (n && __access_ok((unsigned long) from, n))
return __copy_user(to, (void *) from, n);
else
return n;
}
static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n)
{
return __copy_user(to, (void *)from, n);
}
static inline unsigned long __clear_user(void __user *addr, unsigned long size)
{
unsigned long ret;
__asm__ __volatile__ (
".section __ex_table,#alloc\n\t"
".align 4\n\t"
".word 1f,3\n\t"
".previous\n\t"
"mov %2, %%o1\n"
"1:\n\t"
"call __bzero\n\t"
" mov %1, %%o0\n\t"
"mov %%o0, %0\n"
: "=r" (ret) : "r" (addr), "r" (size) :
"o0", "o1", "o2", "o3", "o4", "o5", "o7",
"g1", "g2", "g3", "g4", "g5", "g7", "cc");
return ret;
}
static inline unsigned long clear_user(void __user *addr, unsigned long n)
{
if (n && __access_ok((unsigned long) addr, n))
return __clear_user(addr, n);
else
return n;
}
extern long __strncpy_from_user(char *dest, const char __user *src, long count);
static inline long strncpy_from_user(char *dest, const char __user *src, long count)
{
if (__access_ok((unsigned long) src, count))
return __strncpy_from_user(dest, src, count);
else
return -EFAULT;
}
extern long __strlen_user(const char __user *);
extern long __strnlen_user(const char __user *, long len);
static inline long strlen_user(const char __user *str)
{
if(!access_ok(VERIFY_READ, str, 0))
if (!access_ok(VERIFY_READ, str, 0))
return 0;
else
return __strlen_user(str);
}
extern __inline__ int strnlen_user(const char *str, long len)
static inline long strnlen_user(const char __user *str, long len)
{
if(!access_ok(VERIFY_READ, str, 0))
if (!access_ok(VERIFY_READ, str, 0))
return 0;
else
return __strnlen_user(str, len);
......
This diff is collapsed.
This diff is collapsed.
......@@ -53,7 +53,7 @@ enum chipset_type {
INTEL_I850,
INTEL_I860,
INTEL_460GX,
INTEL_I7505,
INTEL_E7505,
VIA_GENERIC,
SIS_GENERIC,
AMD_GENERIC,
......
This diff is collapsed.
......@@ -101,7 +101,7 @@ struct __fdb_entry
struct net_bridge;
struct net_bridge_port;
extern int (*br_ioctl_hook)(unsigned long arg);
extern void brioctl_set(int (*ioctl_hook)(unsigned long));
extern int (*br_handle_frame_hook)(struct sk_buff *skb);
extern int (*br_should_route_hook)(struct sk_buff **pskb);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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