Commit 030d0ba0 authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/tmp3
parents 5a2bfcec eb40c469
......@@ -973,7 +973,7 @@ M: scott.feldman@intel.com
S: Supported
INTERMEZZO FILE SYSTEM
P: Chen Yang
P: Cluster File Systems
M: intermezzo-devel@lists.sf.net
W: http://www.inter-mezzo.org/
L: intermezzo-discuss@lists.sourceforge.net
......
......@@ -682,6 +682,21 @@ __initcall(balanced_irq_init);
#else /* !SMP */
static inline void move_irq(int irq) { }
void send_IPI_self(int vector)
{
unsigned int cfg;
/*
* Wait for idle.
*/
apic_wait_icr_idle();
cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | APIC_DEST_LOGICAL;
/*
* Send the IPI. The write to APIC_ICR fires this off.
*/
apic_write_around(APIC_ICR, cfg);
}
#endif /* defined(CONFIG_SMP) */
......
......@@ -357,25 +357,23 @@ int register_busmouse(struct busmouse *ops)
{
unsigned int msedev = MINOR_TO_MOUSE(ops->minor);
struct busmouse_data *mse;
int ret;
int ret = -EINVAL;
if (msedev >= NR_MICE) {
printk(KERN_ERR "busmouse: trying to allocate mouse on minor %d\n",
ops->minor);
return -EINVAL;
goto out;
}
ret = -ENOMEM;
mse = kmalloc(sizeof(*mse), GFP_KERNEL);
if (!mse)
return -ENOMEM;
goto out;
down(&mouse_sem);
ret = -EBUSY;
if (busmouse_data[msedev])
{
up(&mouse_sem);
kfree(mse);
return -EBUSY;
}
goto freemem;
memset(mse, 0, sizeof(*mse));
......@@ -386,14 +384,22 @@ int register_busmouse(struct busmouse *ops)
mse->lock = (spinlock_t)SPIN_LOCK_UNLOCKED;
init_waitqueue_head(&mse->wait);
busmouse_data[msedev] = mse;
ret = misc_register(&mse->miscdev);
if (!ret)
ret = msedev;
if (ret < 0)
goto freemem;
busmouse_data[msedev] = mse;
ret = msedev;
out:
up(&mouse_sem);
return ret;
freemem:
kfree(mse);
goto out;
}
/**
......
This diff is collapsed.
......@@ -161,7 +161,7 @@ static int debug;
* then put the packet into tx_queue, and call sppp_flush_xmit()
* after spinlock is released.
*/
static void sppp_flush_xmit()
static void sppp_flush_xmit(void)
{
struct sk_buff *skb;
while ((skb = skb_dequeue(&tx_queue)) != NULL)
......
This diff is collapsed.
......@@ -69,7 +69,7 @@ obj-$(CONFIG_FB_SA1100) += sa1100fb.o cfbfillrect.o cfbcopyarea.o cfbi
obj-$(CONFIG_FB_VIRTUAL) += vfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_HIT) += hitfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_E1355) += epson1355fb.o
obj-$(CONFIG_FB_PVR2) += pvr2fb.o
obj-$(CONFIG_FB_PVR2) += pvr2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_VOODOO1) += sstfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_FFB) += ffb.o sbuslib.o cfbimgblt.o cfbcopyarea.o
......
This diff is collapsed.
......@@ -536,7 +536,8 @@ static ssize_t read_profile(struct file *file, char *buf,
buf++; p++; count--; read++;
}
pnt = (char *)prof_buffer + p - sizeof(unsigned int);
copy_to_user(buf,(void *)pnt,count);
if (copy_to_user(buf,(void *)pnt,count))
return -EFAULT;
read += count;
*ppos += read;
return read;
......
......@@ -107,7 +107,7 @@ static inline void x86_do_profile(struct pt_regs * regs)
atomic_inc((atomic_t *)&prof_buffer[eip]);
}
#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP)
#if defined(CONFIG_X86_IO_APIC)
static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
{
if (IO_APIC_IRQ(i))
......
......@@ -2,7 +2,7 @@
#define _NAMESPACE_H_
#ifdef __KERNEL__
#include <linux/dcache.h>
#include <linux/mount.h>
#include <linux/sched.h>
struct namespace {
......@@ -19,9 +19,9 @@ static inline void put_namespace(struct namespace *namespace)
{
if (atomic_dec_and_test(&namespace->count)) {
down_write(&namespace->sem);
spin_lock(&dcache_lock);
spin_lock(&vfsmount_lock);
umount_tree(namespace->root);
spin_unlock(&dcache_lock);
spin_unlock(&vfsmount_lock);
up_write(&namespace->sem);
kfree(namespace);
}
......
......@@ -456,10 +456,10 @@ struct pci_bus {
void *sysdata; /* hook for sys-specific extension */
struct proc_dir_entry *procdir; /* directory entry in /proc/bus/pci */
unsigned char number; /* bus number */
unsigned char primary; /* number of primary bridge */
unsigned char secondary; /* number of secondary bridge */
unsigned char subordinate; /* max number of subordinate buses */
unsigned int number; /* bus number */
unsigned int primary; /* number of primary bridge */
unsigned int secondary; /* number of secondary bridge */
unsigned int subordinate; /* max number of subordinate buses */
char name[48];
......
......@@ -605,6 +605,9 @@ EXPORT_SYMBOL(next_thread);
EXPORT_SYMBOL(__per_cpu_offset);
#endif
EXPORT_SYMBOL(set_fs_pwd);
EXPORT_SYMBOL(set_fs_root);
/* debug */
EXPORT_SYMBOL(dump_stack);
EXPORT_SYMBOL(ptrace_notify);
......
......@@ -668,7 +668,7 @@ static int wanrouter_device_stat(struct wan_device *wandev,
static int wanrouter_device_new_if(struct wan_device *wandev,
wanif_conf_t *u_conf)
{
wanif_conf_t conf;
wanif_conf_t *cnf;
struct net_device *dev = NULL;
#ifdef CONFIG_WANPIPE_MULTPPP
struct ppp_device *pppdev=NULL;
......@@ -678,38 +678,47 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL))
return -ENODEV;
if (copy_from_user(&conf, u_conf, sizeof(wanif_conf_t)))
return -EFAULT;
cnf = kmalloc(sizeof(wanif_conf_t), GFP_KERNEL);
if (!cnf)
return -ENOBUFS;
if (conf.magic != ROUTER_MAGIC)
return -EINVAL;
err = -EFAULT;
if (copy_from_user(cnf, u_conf, sizeof(wanif_conf_t)))
goto out;
err = -EINVAL;
if (cnf->magic != ROUTER_MAGIC)
goto out;
if (conf.config_id == WANCONFIG_MPPP) {
if (cnf->config_id == WANCONFIG_MPPP) {
#ifdef CONFIG_WANPIPE_MULTPPP
pppdev = kmalloc(sizeof(struct ppp_device), GFP_KERNEL);
err = -ENOBUFS;
if (pppdev == NULL)
return -ENOBUFS;
goto out;
memset(pppdev, 0, sizeof(struct ppp_device));
pppdev->dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
if (pppdev->dev == NULL) {
kfree(pppdev);
return -ENOBUFS;
err = -ENOBUFS;
goto out;
}
memset(pppdev->dev, 0, sizeof(struct net_device));
err = wandev->new_if(wandev,
(struct net_device *)pppdev, &conf);
err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
dev = pppdev->dev;
#else
printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n",
wandev->name);
return -EPROTONOSUPPORT;
err = -EPROTONOSUPPORT;
goto out;
#endif
} else {
dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
err = -ENOBUFS;
if (dev == NULL)
return -ENOBUFS;
goto out;
memset(dev, 0, sizeof(struct net_device));
err = wandev->new_if(wandev, dev, &conf);
err = wandev->new_if(wandev, dev, cnf);
}
if (!err) {
......@@ -748,7 +757,8 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
++wandev->ndev;
unlock_adapter_irq(&wandev->lock, &smp_flags);
return 0; /* done !!! */
err = 0; /* done !!! */
goto out;
}
}
if (wandev->del_if)
......@@ -761,18 +771,19 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
dev->priv = NULL;
}
#ifdef CONFIG_WANPIPE_MULTPPP
if (conf.config_id == WANCONFIG_MPPP)
if (cnf->config_id == WANCONFIG_MPPP)
kfree(pppdev);
else
kfree(dev);
#else
/* Sync PPP is disabled */
if (conf.config_id != WANCONFIG_MPPP)
if (cnf->config_id != WANCONFIG_MPPP)
kfree(dev);
#endif
out:
kfree(cnf);
return err;
}
......
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