Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180633
b: refs/heads/master
c: fa64429
h: refs/heads/master
i:
  180631: ed333f5
v: v3
  • Loading branch information
Anton Vorontsov authored and Kumar Gala committed Feb 13, 2010
1 parent 07a4efc commit 3aa0f7e
Show file tree
Hide file tree
Showing 74 changed files with 198 additions and 364 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: b0483e78e5c4c9871fc5541875b3bc006846d46b
refs/heads/master: fa644298eb24ab05b32acf6cc0f2265b833280e1
4 changes: 1 addition & 3 deletions trunk/arch/ia64/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst);
relevant until we have real hardware to play with... */
#define ELF_PLATFORM NULL

#define SET_PERSONALITY(ex) \
set_personality((current->personality & ~PER_MASK) | PER_LINUX)

#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
#define elf_read_implies_exec(ex, executable_stack) \
((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0)

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ static void __init mpc85xx_mds_pic_init(void)
}

mpic = mpic_alloc(np, r.start,
MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN |
MPIC_BROKEN_FRR_NIRQS,
0, 256, " OpenPIC ");
BUG_ON(mpic == NULL);
of_node_put(np);
Expand Down
11 changes: 2 additions & 9 deletions trunk/arch/sh/kernel/ptrace_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,13 @@ void user_enable_single_step(struct task_struct *child)
struct pt_regs *regs = child->thread.uregs;

regs->sr |= SR_SSTEP; /* auto-resetting upon exception */

set_tsk_thread_flag(child, TIF_SINGLESTEP);
}

void user_disable_single_step(struct task_struct *child)
{
struct pt_regs *regs = child->thread.uregs;

regs->sr &= ~SR_SSTEP;

clear_tsk_thread_flag(child, TIF_SINGLESTEP);
}

static int genregs_get(struct task_struct *target,
Expand Down Expand Up @@ -458,18 +454,15 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)

asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
{
int step;

if (unlikely(current->audit_context))
audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]),
regs->regs[9]);

if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_exit(regs, regs->regs[9]);

step = test_thread_flag(TIF_SINGLESTEP);
if (step || test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, step);
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, 0);
}

/* Called with interrupts disabled */
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/sh/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ static int do_signal(struct pt_regs *regs, sigset_t *oldset)
* clear the TS_RESTORE_SIGMASK flag.
*/
current_thread_info()->status &= ~TS_RESTORE_SIGMASK;

tracehook_signal_handler(signr, &info, &ka, regs,
test_thread_flag(TIF_SINGLESTEP));
tracehook_signal_handler(signr, &info, &ka, regs, 0);
return 1;
}
}
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/x86/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ static inline void elf_common_init(struct thread_struct *t,
}

#define ELF_PLAT_INIT(_r, load_addr) \
elf_common_init(&current->thread, _r, 0)
do { \
elf_common_init(&current->thread, _r, 0); \
clear_thread_flag(TIF_IA32); \
} while (0)

#define COMPAT_ELF_PLAT_INIT(regs, load_addr) \
elf_common_init(&current->thread, regs, __USER_DS)
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ void set_personality_ia32(void)

/* Make sure to be in 32bit mode */
set_thread_flag(TIF_IA32);
current->personality |= force_personality32;

/* Prepare the first "return" to user space */
current_thread_info()->status |= TS_COMPAT;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ static void class_release(struct kobject *kobj)
else
pr_debug("class '%s' does not have a release() function, "
"be careful\n", class->name);

kfree(cp);
}

static struct sysfs_ops class_sysfs_ops = {
Expand Down
53 changes: 14 additions & 39 deletions trunk/drivers/firewire/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,32 +893,21 @@ static void fwnet_receive_broadcast(struct fw_iso_context *context,

static struct kmem_cache *fwnet_packet_task_cache;

static void fwnet_free_ptask(struct fwnet_packet_task *ptask)
{
dev_kfree_skb_any(ptask->skb);
kmem_cache_free(fwnet_packet_task_cache, ptask);
}

static int fwnet_send_packet(struct fwnet_packet_task *ptask);

static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
{
struct fwnet_device *dev = ptask->dev;
struct fwnet_device *dev;
unsigned long flags;
bool free;

spin_lock_irqsave(&dev->lock, flags);

ptask->outstanding_pkts--;

/* Check whether we or the networking TX soft-IRQ is last user. */
free = (ptask->outstanding_pkts == 0 && !list_empty(&ptask->pt_link));

if (ptask->outstanding_pkts == 0)
list_del(&ptask->pt_link);
dev = ptask->dev;

spin_lock_irqsave(&dev->lock, flags);
list_del(&ptask->pt_link);
spin_unlock_irqrestore(&dev->lock, flags);

ptask->outstanding_pkts--; /* FIXME access inside lock */

if (ptask->outstanding_pkts > 0) {
u16 dg_size;
u16 fg_off;
Expand Down Expand Up @@ -962,10 +951,10 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
ptask->max_payload = skb->len + RFC2374_FRAG_HDR_SIZE;
}
fwnet_send_packet(ptask);
} else {
dev_kfree_skb_any(ptask->skb);
kmem_cache_free(fwnet_packet_task_cache, ptask);
}

if (free)
fwnet_free_ptask(ptask);
}

static void fwnet_write_complete(struct fw_card *card, int rcode,
Expand All @@ -988,7 +977,6 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)
unsigned tx_len;
struct rfc2734_header *bufhdr;
unsigned long flags;
bool free;

dev = ptask->dev;
tx_len = ptask->max_payload;
Expand Down Expand Up @@ -1034,36 +1022,25 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)
generation, SCODE_100, 0ULL, ptask->skb->data,
tx_len + 8, fwnet_write_complete, ptask);

/* FIXME race? */
spin_lock_irqsave(&dev->lock, flags);

/* If the AT tasklet already ran, we may be last user. */
free = (ptask->outstanding_pkts == 0 && list_empty(&ptask->pt_link));
if (!free)
list_add_tail(&ptask->pt_link, &dev->broadcasted_list);

list_add_tail(&ptask->pt_link, &dev->broadcasted_list);
spin_unlock_irqrestore(&dev->lock, flags);

goto out;
return 0;
}

fw_send_request(dev->card, &ptask->transaction,
TCODE_WRITE_BLOCK_REQUEST, ptask->dest_node,
ptask->generation, ptask->speed, ptask->fifo_addr,
ptask->skb->data, tx_len, fwnet_write_complete, ptask);

/* FIXME race? */
spin_lock_irqsave(&dev->lock, flags);

/* If the AT tasklet already ran, we may be last user. */
free = (ptask->outstanding_pkts == 0 && list_empty(&ptask->pt_link));
if (!free)
list_add_tail(&ptask->pt_link, &dev->sent_list);

list_add_tail(&ptask->pt_link, &dev->sent_list);
spin_unlock_irqrestore(&dev->lock, flags);

dev->netdev->trans_start = jiffies;
out:
if (free)
fwnet_free_ptask(ptask);

return 0;
}
Expand Down Expand Up @@ -1321,8 +1298,6 @@ static netdev_tx_t fwnet_tx(struct sk_buff *skb, struct net_device *net)
spin_unlock_irqrestore(&dev->lock, flags);

ptask->max_payload = max_payload;
INIT_LIST_HEAD(&ptask->pt_link);

fwnet_send_packet(ptask);

return NETDEV_TX_OK;
Expand Down
13 changes: 5 additions & 8 deletions trunk/drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2101,6 +2101,11 @@ static int ohci_queue_iso_transmit(struct fw_iso_context *base,
u32 payload_index, payload_end_index, next_page_index;
int page, end_page, i, length, offset;

/*
* FIXME: Cycle lost behavior should be configurable: lose
* packet, retransmit or terminate..
*/

p = packet;
payload_index = payload;

Expand Down Expand Up @@ -2130,14 +2135,6 @@ static int ohci_queue_iso_transmit(struct fw_iso_context *base,
if (!p->skip) {
d[0].control = cpu_to_le16(DESCRIPTOR_KEY_IMMEDIATE);
d[0].req_count = cpu_to_le16(8);
/*
* Link the skip address to this descriptor itself. This causes
* a context to skip a cycle whenever lost cycles or FIFO
* overruns occur, without dropping the data. The application
* should then decide whether this is an error condition or not.
* FIXME: Make the context's cycle-lost behaviour configurable?
*/
d[0].branch_address = cpu_to_le32(d_bus | z);

header = (__le32 *) &d[1];
header[0] = cpu_to_le32(IT_HEADER_SY(p->sy) |
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/gpu/drm/drm_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,7 @@ struct drm_mm_node *drm_mm_search_free_in_range(const struct drm_mm *mm,
wasted += alignment - tmp;
}

if (entry->size >= size + wasted &&
(entry->start + wasted + size) <= end) {
if (entry->size >= size + wasted) {
if (!best_match)
return entry;
if (entry->size < best_size) {
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/gpu/drm/radeon/atom.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include <linux/module.h>
#include <linux/sched.h>
#include <asm/unaligned.h>

#define ATOM_DEBUG

Expand Down Expand Up @@ -213,9 +212,7 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
case ATOM_ARG_PS:
idx = U8(*ptr);
(*ptr)++;
/* get_unaligned_le32 avoids unaligned accesses from atombios
* tables, noticed on a DEC Alpha. */
val = get_unaligned_le32((u32 *)&ctx->ps[idx]);
val = le32_to_cpu(ctx->ps[idx]);
if (print)
DEBUG("PS[0x%02X,0x%04X]", idx, val);
break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/radeon/atombios_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, u8 *req_bytes,
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);

if (args.ucReplyStatus && !args.ucDataOutLen) {
if (args.ucReplyStatus == 0x20 && retry_count++ < 10)
if (args.ucReplyStatus == 0x20 && retry_count < 10)
goto retry;
DRM_DEBUG("failed to get auxch %02x%02x %02x %02x 0x%02x %02x after %d retries\n",
req_bytes[1], req_bytes[0], req_bytes[2], req_bytes[3],
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/gpu/drm/ttm/ttm_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,12 +1020,6 @@ static int ttm_bo_mem_compat(struct ttm_placement *placement,
struct ttm_mem_reg *mem)
{
int i;
struct drm_mm_node *node = mem->mm_node;

if (node && placement->lpfn != 0 &&
(node->start < placement->fpfn ||
node->start + node->size > placement->lpfn))
return -1;

for (i = 0; i < placement->num_placement; i++) {
if ((placement->placement[i] & mem->placement &
Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/md/dm-log-userspace-transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,11 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
{
int r = 0;
size_t dummy = 0;
int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg);
int overhead_size =
sizeof(struct dm_ulog_request *) + sizeof(struct cn_msg);
struct dm_ulog_request *tfr = prealloced_ulog_tfr;
struct receiving_pkg pkg;

/*
* Given the space needed to hold the 'struct cn_msg' and
* 'struct dm_ulog_request' - do we have enough payload
* space remaining?
*/
if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) {
DMINFO("Size of tfr exceeds preallocated size");
return -EINVAL;
Expand All @@ -195,7 +191,7 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
*/
mutex_lock(&dm_ulog_lock);

memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - sizeof(struct cn_msg));
memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - overhead_size);
memcpy(tfr->uuid, uuid, DM_UUID_LEN);
tfr->luid = luid;
tfr->seq = dm_ulog_seq++;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)
/*
* Dispatch io.
*/
if (unlikely(ms->log_failure) && errors_handled(ms)) {
if (unlikely(ms->log_failure)) {
spin_lock_irq(&ms->lock);
bio_list_merge(&ms->failures, &sync);
spin_unlock_irq(&ms->lock);
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/md/dm-region-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,10 @@ void dm_rh_recovery_end(struct dm_region *reg, int success)
spin_lock_irq(&rh->region_lock);
if (success)
list_add(&reg->list, &reg->rh->recovered_regions);
else
else {
reg->state = DM_RH_NOSYNC;
list_add(&reg->list, &reg->rh->failed_recovered_regions);

}
spin_unlock_irq(&rh->region_lock);

rh->wakeup_workers(rh->context);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-snap-persistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw,
* Issue the synchronous I/O from a different thread
* to avoid generic_make_request recursion.
*/
INIT_WORK_ON_STACK(&req.work, do_metadata);
INIT_WORK(&req.work, do_metadata);
queue_work(ps->metadata_wq, &req.work);
flush_workqueue(ps->metadata_wq);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-stripe.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}

stripes = simple_strtoul(argv[0], &end, 10);
if (!stripes || *end) {
if (*end) {
ti->error = "Invalid stripe count";
return -EINVAL;
}
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/md/dm-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,21 @@ static struct sysfs_ops dm_sysfs_ops = {
.show = dm_attr_show,
};

/*
* The sysfs structure is embedded in md struct, nothing to do here
*/
static void dm_sysfs_release(struct kobject *kobj)
{
}

/*
* dm kobject is embedded in mapped_device structure
* no need to define release function here
*/
static struct kobj_type dm_ktype = {
.sysfs_ops = &dm_sysfs_ops,
.default_attrs = dm_attrs,
.release = dm_sysfs_release
};

/*
Expand Down
Loading

0 comments on commit 3aa0f7e

Please sign in to comment.