Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88275
b: refs/heads/master
c: 852fb2a
h: refs/heads/master
i:
  88273: 63a1a41
  88271: a76dac1
v: v3
  • Loading branch information
Paul Mundt authored and Jean Delvare committed Apr 11, 2008
1 parent a40d727 commit 06a842b
Show file tree
Hide file tree
Showing 106 changed files with 298 additions and 617 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90768c09bca4f306c00a0cdbcb2f82601231e93e
refs/heads/master: 852fb2ac76241868454d07818ea0d87fcd9e5301
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
const struct user_regset_view *view;
int ret;

view = task_user_regset_view(current);
view = task_user_regset_view(child);

switch(request) {
case PTRACE_GETREGS: {
Expand Down
148 changes: 51 additions & 97 deletions trunk/arch/sparc64/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,85 +114,6 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
preempt_enable();
}

static int get_from_target(struct task_struct *target, unsigned long uaddr,
void *kbuf, int len)
{
if (target == current) {
if (copy_from_user(kbuf, (void __user *) uaddr, len))
return -EFAULT;
} else {
int len2 = access_process_vm(target, uaddr, kbuf, len, 0);
if (len2 != len)
return -EFAULT;
}
return 0;
}

static int set_to_target(struct task_struct *target, unsigned long uaddr,
void *kbuf, int len)
{
if (target == current) {
if (copy_to_user((void __user *) uaddr, kbuf, len))
return -EFAULT;
} else {
int len2 = access_process_vm(target, uaddr, kbuf, len, 1);
if (len2 != len)
return -EFAULT;
}
return 0;
}

static int regwindow64_get(struct task_struct *target,
const struct pt_regs *regs,
struct reg_window *wbuf)
{
unsigned long rw_addr = regs->u_regs[UREG_I6];

if (test_tsk_thread_flag(current, TIF_32BIT)) {
struct reg_window32 win32;
int i;

if (get_from_target(target, rw_addr, &win32, sizeof(win32)))
return -EFAULT;
for (i = 0; i < 8; i++)
wbuf->locals[i] = win32.locals[i];
for (i = 0; i < 8; i++)
wbuf->ins[i] = win32.ins[i];
} else {
rw_addr += STACK_BIAS;
if (get_from_target(target, rw_addr, wbuf, sizeof(*wbuf)))
return -EFAULT;
}

return 0;
}

static int regwindow64_set(struct task_struct *target,
const struct pt_regs *regs,
struct reg_window *wbuf)
{
unsigned long rw_addr = regs->u_regs[UREG_I6];

if (test_tsk_thread_flag(current, TIF_32BIT)) {
struct reg_window32 win32;
int i;

for (i = 0; i < 8; i++)
win32.locals[i] = wbuf->locals[i];
for (i = 0; i < 8; i++)
win32.ins[i] = wbuf->ins[i];

if (set_to_target(target, rw_addr, &win32, sizeof(win32)))
return -EFAULT;
} else {
rw_addr += STACK_BIAS;
if (set_to_target(target, rw_addr, wbuf, sizeof(*wbuf)))
return -EFAULT;
}

return 0;
}

enum sparc_regset {
REGSET_GENERAL,
REGSET_FP,
Expand All @@ -212,13 +133,25 @@ static int genregs64_get(struct task_struct *target,
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
regs->u_regs,
0, 16 * sizeof(u64));
if (!ret && count && pos < (32 * sizeof(u64))) {
struct reg_window window;
if (!ret) {
unsigned long __user *reg_window = (unsigned long __user *)
(regs->u_regs[UREG_I6] + STACK_BIAS);
unsigned long window[16];

if (target == current) {
if (copy_from_user(window, reg_window, sizeof(window)))
return -EFAULT;
} else {
if (access_process_vm(target,
(unsigned long) reg_window,
window,
sizeof(window), 0) !=
sizeof(window))
return -EFAULT;
}

if (regwindow64_get(target, regs, &window))
return -EFAULT;
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
&window,
window,
16 * sizeof(u64),
32 * sizeof(u64));
}
Expand All @@ -240,11 +173,10 @@ static int genregs64_get(struct task_struct *target,
36 * sizeof(u64));
}

if (!ret) {
if (!ret)
ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
36 * sizeof(u64), -1);

}
return ret;
}

Expand All @@ -262,20 +194,42 @@ static int genregs64_set(struct task_struct *target,
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
regs->u_regs,
0, 16 * sizeof(u64));
if (!ret && count && pos < (32 * sizeof(u64))) {
struct reg_window window;
if (!ret && count > 0) {
unsigned long __user *reg_window = (unsigned long __user *)
(regs->u_regs[UREG_I6] + STACK_BIAS);
unsigned long window[16];

if (regwindow64_get(target, regs, &window))
return -EFAULT;
if (target == current) {
if (copy_from_user(window, reg_window, sizeof(window)))
return -EFAULT;
} else {
if (access_process_vm(target,
(unsigned long) reg_window,
window,
sizeof(window), 0) !=
sizeof(window))
return -EFAULT;
}

ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
&window,
window,
16 * sizeof(u64),
32 * sizeof(u64));

if (!ret &&
regwindow64_set(target, regs, &window))
return -EFAULT;
if (!ret) {
if (target == current) {
if (copy_to_user(reg_window, window,
sizeof(window)))
return -EFAULT;
} else {
if (access_process_vm(target,
(unsigned long)
reg_window,
window,
sizeof(window), 1) !=
sizeof(window))
return -EFAULT;
}
}
}

if (!ret && count > 0) {
Expand Down Expand Up @@ -851,7 +805,7 @@ struct compat_fps {
long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
compat_ulong_t caddr, compat_ulong_t cdata)
{
const struct user_regset_view *view = task_user_regset_view(current);
const struct user_regset_view *view = task_user_regset_view(child);
compat_ulong_t caddr2 = task_pt_regs(current)->u_regs[UREG_I4];
struct pt_regs32 __user *pregs;
struct compat_fps __user *fps;
Expand Down Expand Up @@ -959,7 +913,7 @@ struct fps {

long arch_ptrace(struct task_struct *child, long request, long addr, long data)
{
const struct user_regset_view *view = task_user_regset_view(current);
const struct user_regset_view *view = task_user_regset_view(child);
unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4];
struct pt_regs __user *pregs;
struct fps __user *fps;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <scsi/sg.h>
#include <scsi/scsi_ioctl.h>
#include <linux/cdrom.h>
#include <linux/scatterlist.h>

#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
#define DRIVER_NAME "HP CISS Driver (v 3.6.14)"
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/i2c/busses/i2c-ibm_iic.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ MODULE_PARM_DESC(iic_force_poll, "Force polling mode");

static int iic_force_fast;
module_param(iic_force_fast, bool, 0);
MODULE_PARM_DESC(iic_fast_poll, "Force fast mode (400 kHz)");
MODULE_PARM_DESC(iic_force_fast, "Force fast mode (400 kHz)");

#define DBG_LEVEL 0

Expand Down
51 changes: 22 additions & 29 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -2348,15 +2348,25 @@ static void handle_issuing_new_write_requests6(raid5_conf_t *conf,
static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
struct stripe_head_state *s, int disks)
{
int canceled_check = 0;

set_bit(STRIPE_HANDLE, &sh->state);
/* Take one of the following actions:
* 1/ start a check parity operation if (uptodate == disks)
* 2/ finish a check parity operation and act on the result
* 3/ skip to the writeback section if we previously
* initiated a recovery operation
*/
if (s->failed == 0 &&
!test_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending)) {
if (!test_and_set_bit(STRIPE_OP_CHECK, &sh->ops.pending)) {
BUG_ON(s->uptodate != disks);
clear_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags);
sh->ops.count++;
s->uptodate--;
} else if (
test_and_clear_bit(STRIPE_OP_CHECK, &sh->ops.complete)) {
clear_bit(STRIPE_OP_CHECK, &sh->ops.ack);
clear_bit(STRIPE_OP_CHECK, &sh->ops.pending);

/* complete a check operation */
if (test_and_clear_bit(STRIPE_OP_CHECK, &sh->ops.complete)) {
clear_bit(STRIPE_OP_CHECK, &sh->ops.ack);
clear_bit(STRIPE_OP_CHECK, &sh->ops.pending);
if (s->failed == 0) {
if (sh->ops.zero_sum_result == 0)
/* parity is correct (on disc,
* not in buffer any more)
Expand All @@ -2381,8 +2391,7 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
s->uptodate++;
}
}
} else
canceled_check = 1; /* STRIPE_INSYNC is not set */
}
}

/* check if we can clear a parity disk reconstruct */
Expand All @@ -2395,28 +2404,12 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending);
}

/* start a new check operation if there are no failures, the stripe is
* not insync, and a repair is not in flight
*/
if (s->failed == 0 &&
!test_bit(STRIPE_INSYNC, &sh->state) &&
!test_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending)) {
if (!test_and_set_bit(STRIPE_OP_CHECK, &sh->ops.pending)) {
BUG_ON(s->uptodate != disks);
clear_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags);
sh->ops.count++;
s->uptodate--;
}
}

/* Wait for check parity and compute block operations to complete
* before write-back. If a failure occurred while the check operation
* was in flight we need to cycle this stripe through handle_stripe
* since the parity block may not be uptodate
* before write-back
*/
if (!canceled_check && !test_bit(STRIPE_INSYNC, &sh->state) &&
!test_bit(STRIPE_OP_CHECK, &sh->ops.pending) &&
!test_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending)) {
if (!test_bit(STRIPE_INSYNC, &sh->state) &&
!test_bit(STRIPE_OP_CHECK, &sh->ops.pending) &&
!test_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending)) {
struct r5dev *dev;
/* either failed parity check, or recovery is happening */
if (s->failed == 0)
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/bnx2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
#include "bnx2x.h"
#include "bnx2x_init.h"

#define DRV_MODULE_VERSION "1.42.4"
#define DRV_MODULE_RELDATE "2008/4/9"
#define DRV_MODULE_VERSION "1.42.3"
#define DRV_MODULE_RELDATE "2008/3/9"
#define BNX2X_BC_VER 0x040200

/* Time in jiffies before concluding the transmitter is hung. */
Expand Down Expand Up @@ -6153,7 +6153,7 @@ static int bnx2x_function_init(struct bnx2x *bp, int mode)
func, mode);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET,
0xffffffff);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET,
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET,
0xfffc);
bnx2x_init_block(bp, MISC_COMMON_START, MISC_COMMON_END);

Expand Down
11 changes: 6 additions & 5 deletions trunk/drivers/net/starfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,12 +1472,13 @@ static int __netdev_rx(struct net_device *dev, int *quota)
#ifndef final_version /* Remove after testing. */
/* You will want this info for the initial debug. */
if (debug > 5) {
printk(KERN_DEBUG " Rx data " MAC_FMT " " MAC_FMT
DECLARE_MAC_BUF(mac);
DECLARE_MAC_BUF(mac2);

printk(KERN_DEBUG " Rx data %s %s"
" %2.2x%2.2x.\n",
skb->data[0], skb->data[1], skb->data[2],
skb->data[3], skb->data[4], skb->data[5],
skb->data[6], skb->data[7], skb->data[8],
skb->data[9], skb->data[10], skb->data[11],
print_mac(mac, &skb->data[0]),
print_mac(mac2, &skb->data[6]),
skb->data[12], skb->data[13]);
}
#endif
Expand Down
15 changes: 5 additions & 10 deletions trunk/drivers/net/tokenring/olympic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1438,18 +1438,13 @@ static void olympic_arb_cmd(struct net_device *dev)

if (olympic_priv->olympic_network_monitor) {
struct trh_hdr *mac_hdr;
DECLARE_MAC_BUF(mac);
printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name);
mac_hdr = tr_hdr(mac_frame);
printk(KERN_WARNING "%s: MAC Frame Dest. Addr: "
MAC_FMT " \n", dev->name,
mac_hdr->daddr[0], mac_hdr->daddr[1],
mac_hdr->daddr[2], mac_hdr->daddr[3],
mac_hdr->daddr[4], mac_hdr->daddr[5]);
printk(KERN_WARNING "%s: MAC Frame Srce. Addr: "
MAC_FMT " \n", dev->name,
mac_hdr->saddr[0], mac_hdr->saddr[1],
mac_hdr->saddr[2], mac_hdr->saddr[3],
mac_hdr->saddr[4], mac_hdr->saddr[5]);
printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %s\n",
dev->name, print_mac(mac, mac_hdr->daddr));
printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %s\n",
dev->name, print_mac(mac, mac_hdr->saddr));
}
netif_rx(mac_frame);
dev->last_rx = jiffies;
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,11 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
struct scatterlist sg[1+MAX_SKB_FRAGS];
struct virtio_net_hdr *hdr;
const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest;
DECLARE_MAC_BUF(mac);

sg_init_table(sg, 1+MAX_SKB_FRAGS);

pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb,
dest[0], dest[1], dest[2],
dest[3], dest[4], dest[5]);
pr_debug("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest));

/* Encode metadata header at front. */
hdr = skb_vnet_hdr(skb);
Expand Down
Loading

0 comments on commit 06a842b

Please sign in to comment.