Commit ce0025eb authored by Steve French's avatar Steve French

Merge bk://linux.bkbits.net/linux-2.5

into hostme.bitkeeper.com:/repos/c/cifs/linux-2.5cifs
parents d8c2ddb6 369a5360
......@@ -390,8 +390,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
}
/* Fixup atomic count: it exited inside IRQ handler. */
((struct task_struct *)paca[lcpu].xCurrent)->thread_info->preempt_count
= 0;
paca[lcpu].xCurrent->thread_info->preempt_count = 0;
/* Fixup SLB round-robin so next segment (kernel) goes in segment 0 */
paca[lcpu].xStab_data.next_round_robin = 0;
......@@ -817,7 +816,7 @@ static void __init smp_create_idle(unsigned int cpu)
init_idle(p, cpu);
unhash_process(p);
paca[cpu].xCurrent = (u64)p;
paca[cpu].xCurrent = p;
current_set[cpu] = p->thread_info;
}
......@@ -869,7 +868,7 @@ void __devinit smp_prepare_boot_cpu(void)
/* cpu_possible is set up in prom.c */
cpu_set(boot_cpuid, cpu_online_map);
paca[boot_cpuid].xCurrent = (u64)current;
paca[boot_cpuid].xCurrent = current;
current_set[boot_cpuid] = current->thread_info;
}
......
......@@ -466,6 +466,18 @@ SingleStepException(struct pt_regs *regs)
_exception(SIGTRAP, &info, regs);
}
/*
* After we have successfully emulated an instruction, we have to
* check if the instruction was being single-stepped, and if so,
* pretend we got a single-step exception. This was pointed out
* by Kumar Gala. -- paulus
*/
static inline void emulate_single_step(struct pt_regs *regs)
{
if (regs->msr & MSR_SE)
SingleStepException(regs);
}
static void dummy_perf(struct pt_regs *regs)
{
}
......@@ -487,10 +499,8 @@ AlignmentException(struct pt_regs *regs)
fixed = fix_alignment(regs);
if (fixed == 1) {
if (!user_mode(regs))
PPCDBG(PPCDBG_ALIGNFIXUP, "fix alignment at %lx\n",
regs->nip);
regs->nip += 4; /* skip over emulated instruction */
emulate_single_step(regs);
return;
}
......
......@@ -719,7 +719,7 @@ static int proc_connectinfo(struct dev_state *ps, void __user *arg)
static int proc_resetdevice(struct dev_state *ps)
{
return usb_reset_device(ps->dev);
return __usb_reset_device(ps->dev);
}
......
......@@ -108,7 +108,7 @@ config USB_OV511
config USB_PWC
tristate "USB Philips Cameras"
depends on USB && VIDEO_DEV && BROKEN
depends on USB && VIDEO_DEV
---help---
Say Y or M here if you want to use one of these Philips & OEM
webcams:
......
......@@ -129,7 +129,6 @@ static struct {
static int pwc_video_open(struct inode *inode, struct file *file);
static int pwc_video_close(struct inode *inode, struct file *file);
static int pwc_video_release(struct video_device *);
static ssize_t pwc_video_read(struct file *file, char *buf,
size_t count, loff_t *ppos);
static unsigned int pwc_video_poll(struct file *file, poll_table *wait);
......@@ -1121,12 +1120,6 @@ static int pwc_video_close(struct inode *inode, struct file *file)
return 0;
}
static int pwc_video_release(struct video_device *vfd)
{
Trace(TRACE_OPEN, "pwc_video_release() called. Now what?\n");
}
/*
* FIXME: what about two parallel reads ????
* ANSWER: Not supported. You can't open the device more than once,
......@@ -1855,7 +1848,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
}
}
pdev->vdev.release = pwc_video_release;
pdev->vdev.release = video_device_release;
i = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, video_nr);
if (i < 0) {
Err("Failed to register as video device (%d).\n", i);
......
......@@ -109,7 +109,7 @@ struct cyberjack_private {
short rdtodo; /* Bytes still to read */
unsigned char wrbuf[5*64]; /* Buffer for collecting data to write */
short wrfilled; /* Overall data size we already got */
short wrsent; /* Data akready sent */
short wrsent; /* Data already sent */
};
/* do some startup allocations not currently performed by usb_serial_probe() */
......@@ -159,8 +159,6 @@ static int cyberjack_open (struct usb_serial_port *port, struct file *filp)
dbg("%s - usb_clear_halt", __FUNCTION__ );
usb_clear_halt(port->serial->dev, port->write_urb->pipe);
usb_clear_halt(port->serial->dev, port->read_urb->pipe);
usb_clear_halt(port->serial->dev, port->interrupt_in_urb->pipe);
/* force low_latency on so that our tty_push actually forces
* the data through, otherwise it is scheduled, and with high
......@@ -212,7 +210,6 @@ static int cyberjack_write (struct usb_serial_port *port, int from_user, const u
unsigned long flags;
int result;
int wrexpected;
unsigned char localbuf[CYBERJACK_LOCAL_BUF_SIZE]; /* Buffer for collecting data to write */
dbg("%s - port %d", __FUNCTION__, port->number);
dbg("%s - from_user %d", __FUNCTION__, from_user);
......@@ -229,29 +226,23 @@ static int cyberjack_write (struct usb_serial_port *port, int from_user, const u
spin_lock_irqsave(&priv->lock, flags);
if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ||
(count>sizeof(localbuf)) ) {
if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
/* To much data for buffer. Reset buffer. */
priv->wrfilled=0;
spin_unlock_irqrestore(&priv->lock, flags);
return (0);
}
spin_unlock_irqrestore(&priv->lock, flags);
/* Copy data */
if (from_user) {
if (copy_from_user(localbuf, buf, count)) {
if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count)) {
spin_unlock_irqrestore(&priv->lock, flags);
return -EFAULT;
}
} else {
memcpy (localbuf, buf, count);
memcpy (priv->wrbuf+priv->wrfilled, buf, count);
}
spin_lock_irqsave(&priv->lock, flags);
memcpy (priv->wrbuf+priv->wrfilled, localbuf, count);
usb_serial_debug_data (__FILE__, __FUNCTION__, count,
priv->wrbuf+priv->wrfilled);
priv->wrfilled += count;
......
......@@ -8,13 +8,11 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Use r13 for current since the ppc64 ABI reserves it - Anton
*/
#include <asm/thread_info.h>
#define get_current() ((struct task_struct *)(get_paca()->xCurrent))
#define get_current() (get_paca()->xCurrent)
#define current get_current()
#endif /* !(_PPC64_CURRENT_H) */
......@@ -37,6 +37,8 @@ extern struct paca_struct paca[];
register struct paca_struct *local_paca asm("r13");
#define get_paca() local_paca
struct task_struct;
/*============================================================================
* Name_______: paca
*
......@@ -59,7 +61,7 @@ struct paca_struct {
*/
struct ItLpPaca *xLpPacaPtr; /* Pointer to LpPaca for PLIC 0x00 */
struct ItLpRegSave *xLpRegSavePtr; /* Pointer to LpRegSave for PLIC 0x08 */
u64 xCurrent; /* Pointer to current 0x10 */
struct task_struct *xCurrent; /* Pointer to current 0x10 */
/* Note: the spinlock functions in arch/ppc64/lib/locks.c load lock_token and
xPacaIndex with a single lwz instruction, using the constant offset 24.
If you move either field, fix the spinlocks and rwlocks. */
......
......@@ -17,5 +17,4 @@
#define NF_ARP_FORWARD 2
#define NF_ARP_NUMHOOKS 3
static DECLARE_MUTEX(arpt_mutex);
#endif /* __LINUX_ARP_NETFILTER_H */
......@@ -183,6 +183,9 @@ struct tcp_info
__u32 tcpi_snd_cwnd;
__u32 tcpi_advmss;
__u32 tcpi_reordering;
__u32 tcpi_rcv_rtt;
__u32 tcpi_rcv_space;
};
#ifdef __KERNEL__
......@@ -351,11 +354,11 @@ struct tcp_opt {
__u8 urg_mode; /* In urgent mode */
__u32 snd_up; /* Urgent pointer */
/* The syn_wait_lock is necessary only to avoid tcp_get_info having
/* The syn_wait_lock is necessary only to avoid proc interface having
* to grab the main lock sock while browsing the listening hash
* (otherwise it's deadlock prone).
* This lock is acquired in read mode only from tcp_get_info() and
* it's acquired in write mode _only_ from code that is actively
* This lock is acquired in read mode only from listening_get_next()
* and it's acquired in write mode _only_ from code that is actively
* changing the syn_wait_queue. All readers that are holding
* the master sock lock don't need to grab this lock in read mode
* too as the syn_wait_queue writes are always protected from
......
......@@ -334,6 +334,7 @@ extern void usb_put_dev(struct usb_device *dev);
/* mostly for devices emulating SCSI over USB */
extern int usb_reset_device(struct usb_device *dev);
extern int __usb_reset_device(struct usb_device *dev);
extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
......
......@@ -62,6 +62,8 @@ do { \
#include <linux/netfilter_ipv4/lockhelp.h>
#include <linux/netfilter_ipv4/listhelp.h>
static DECLARE_MUTEX(arpt_mutex);
struct arpt_table_info {
unsigned int size;
unsigned int number;
......
......@@ -91,6 +91,9 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
info->tcpi_snd_cwnd = tp->snd_cwnd;
info->tcpi_advmss = tp->advmss;
info->tcpi_reordering = tp->reordering;
info->tcpi_rcv_rtt = ((1000000*tp->rcv_rtt_est.rtt)/HZ)>>3;
info->tcpi_rcv_space = tp->rcvq_space.space;
}
static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
......
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