Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180385
b: refs/heads/master
c: 9eb07c2
h: refs/heads/master
i:
  180383: 748641e
v: v3
  • Loading branch information
NeilBrown committed Feb 9, 2010
1 parent a167942 commit 821b26e
Show file tree
Hide file tree
Showing 50 changed files with 217 additions and 469 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: 3af9cf11b6efb82aa7a1a24e2382b75d43631c4e
refs/heads/master: 9eb07c259207d048e3ee8be2a77b2a4680b1edd4
4 changes: 2 additions & 2 deletions trunk/Documentation/cpu-freq/governors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ show_sampling_rate_max: THIS INTERFACE IS DEPRECATED, DON'T USE IT.
up_threshold: defines what the average CPU usage between the samplings
of 'sampling_rate' needs to be for the kernel to make a decision on
whether it should increase the frequency. For example when it is set
to its default value of '95' it means that between the checking
intervals the CPU needs to be on average more than 95% in use to then
to its default value of '80' it means that between the checking
intervals the CPU needs to be on average more than 80% in use to then
decide that the CPU frequency needs to be increased.

ignore_nice_load: this parameter takes a value of '0' or '1'. When
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/microblaze/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ void __init setup_arch(char **cmdline_p)

microblaze_cache_init();

invalidate_dcache();
enable_dcache();

invalidate_icache();
Expand Down
14 changes: 2 additions & 12 deletions trunk/arch/powerpc/platforms/pseries/xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,13 +784,9 @@ static void xics_set_cpu_priority(unsigned char cppr)
{
struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr);

/*
* we only really want to set the priority when there's
* just one cppr value on the stack
*/
WARN_ON(os_cppr->index != 0);
BUG_ON(os_cppr->index != 0);

os_cppr->stack[0] = cppr;
os_cppr->stack[os_cppr->index] = cppr;

if (firmware_has_feature(FW_FEATURE_LPAR))
lpar_cppr_info(cppr);
Expand Down Expand Up @@ -825,14 +821,8 @@ void xics_setup_cpu(void)

void xics_teardown_cpu(void)
{
struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr);
int cpu = smp_processor_id();

/*
* we have to reset the cppr index to 0 because we're
* not going to return from the IPI
*/
os_cppr->index = 0;
xics_set_cpu_priority(0);

/* Clear any pending IPI request */
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/sh/kernel/cpu/sh3/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ ENTRY(tlb_protection_violation_store)
mov #1, r5

call_handle_tlbmiss:
setup_frame_reg
mov.l 1f, r0
mov r5, r8
mov.l @r0, r6
Expand Down Expand Up @@ -364,8 +365,6 @@ handle_exception:
mov.l @k2, k2 ! read out vector and keep in k2

handle_exception_special:
setup_frame_reg

! Setup return address and jump to exception handler
mov.l 7f, r9 ! fetch return address
stc r2_bank, r0 ! k2 (vector)
Expand Down
20 changes: 0 additions & 20 deletions trunk/arch/sh/kernel/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,6 @@ void dwarf_free_frame(struct dwarf_frame *frame)
mempool_free(frame, dwarf_frame_pool);
}

extern void ret_from_irq(void);

/**
* dwarf_unwind_stack - unwind the stack
*
Expand Down Expand Up @@ -680,24 +678,6 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc,
addr = frame->cfa + reg->addr;
frame->return_addr = __raw_readl(addr);

/*
* Ah, the joys of unwinding through interrupts.
*
* Interrupts are tricky - the DWARF info needs to be _really_
* accurate and unfortunately I'm seeing a lot of bogus DWARF
* info. For example, I've seen interrupts occur in epilogues
* just after the frame pointer (r14) had been restored. The
* problem was that the DWARF info claimed that the CFA could be
* reached by using the value of the frame pointer before it was
* restored.
*
* So until the compiler can be trusted to produce reliable
* DWARF info when it really matters, let's stop unwinding once
* we've calculated the function that was interrupted.
*/
if (prev && prev->pc == (unsigned long)ret_from_irq)
frame->return_addr = 0;

return frame;

bail:
Expand Down
8 changes: 1 addition & 7 deletions trunk/arch/sh/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,8 @@ ret_from_exception:
CFI_STARTPROC simple
CFI_DEF_CFA r14, 0
CFI_REL_OFFSET 17, 64
CFI_REL_OFFSET 15, 60
CFI_REL_OFFSET 15, 0
CFI_REL_OFFSET 14, 56
CFI_REL_OFFSET 13, 52
CFI_REL_OFFSET 12, 48
CFI_REL_OFFSET 11, 44
CFI_REL_OFFSET 10, 40
CFI_REL_OFFSET 9, 36
CFI_REL_OFFSET 8, 32
preempt_stop()
ENTRY(ret_from_irq)
!
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,6 @@ static int __devexit powernowk8_cpu_exit(struct cpufreq_policy *pol)

kfree(data->powernow_table);
kfree(data);
per_cpu(powernow_data, pol->cpu) = NULL;

return 0;
}
Expand All @@ -1376,7 +1375,7 @@ static unsigned int powernowk8_get(unsigned int cpu)
int err;

if (!data)
return 0;
return -EINVAL;

smp_call_function_single(cpu, query_values_on_cpu, &err, true);
if (err)
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,6 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
(dbs_tuners_ins.up_threshold -
dbs_tuners_ins.down_differential);

if (freq_next < policy->min)
freq_next = policy->min;

if (!dbs_tuners_ins.powersave_bias) {
__cpufreq_driver_target(policy, freq_next,
CPUFREQ_RELATION_L);
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -5464,11 +5464,11 @@ static int raid5_start_reshape(mddev_t *mddev)
!test_bit(Faulty, &rdev->flags)) {
if (raid5_add_disk(mddev, rdev) == 0) {
char nm[20];
if (rdev->raid_disk >= conf->previous_raid_disks)
if (rdev->raid_disk >= conf->previous_raid_disks) {
set_bit(In_sync, &rdev->flags);
else
added_devices++;
} else
rdev->recovery_offset = 0;
added_devices++;
sprintf(nm, "rd%d", rdev->raid_disk);
if (sysfs_create_link(&mddev->kobj,
&rdev->kobj, nm))
Expand All @@ -5480,9 +5480,12 @@ static int raid5_start_reshape(mddev_t *mddev)
break;
}

/* When a reshape changes the number of devices, ->degraded
* is measured against the large of the pre and post number of
* devices.*/
if (mddev->delta_disks > 0) {
spin_lock_irqsave(&conf->device_lock, flags);
mddev->degraded = (conf->raid_disks - conf->previous_raid_disks)
mddev->degraded += (conf->raid_disks - conf->previous_raid_disks)
- added_devices;
spin_unlock_irqrestore(&conf->device_lock, flags);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/dvb-core/dmxdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ static int dvb_demux_open(struct inode *inode, struct file *file)
dvb_ringbuffer_init(&dmxdevfilter->buffer, NULL, 8192);
dmxdevfilter->type = DMXDEV_TYPE_NONE;
dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_ALLOCATED);
INIT_LIST_HEAD(&dmxdevfilter->feed.ts);
init_timer(&dmxdevfilter->timer);

dvbdev->users++;
Expand Down Expand Up @@ -886,7 +887,6 @@ static int dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev,
dmxdevfilter->type = DMXDEV_TYPE_PES;
memcpy(&dmxdevfilter->params, params,
sizeof(struct dmx_pes_filter_params));
INIT_LIST_HEAD(&dmxdevfilter->feed.ts);

dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_SET);

Expand Down
20 changes: 11 additions & 9 deletions trunk/drivers/media/dvb/dvb-core/dvb_demux.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,16 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
};
};

if (demux->cnt_storage) {
if (dvb_demux_tscheck) {
if (!demux->cnt_storage)
demux->cnt_storage = vmalloc(MAX_PID + 1);

if (!demux->cnt_storage) {
printk(KERN_WARNING "Couldn't allocate memory for TS/TEI check. Disabling it\n");
dvb_demux_tscheck = 0;
goto no_dvb_demux_tscheck;
}

/* check pkt counter */
if (pid < MAX_PID) {
if (buf[1] & 0x80)
Expand All @@ -445,6 +454,7 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
};
/* end check */
};
no_dvb_demux_tscheck:

list_for_each_entry(feed, &demux->feed_list, list_head) {
if ((feed->pid != pid) && (feed->pid != 0x2000))
Expand Down Expand Up @@ -1236,7 +1246,6 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux)
dvbdemux->feed = vmalloc(dvbdemux->feednum * sizeof(struct dvb_demux_feed));
if (!dvbdemux->feed) {
vfree(dvbdemux->filter);
dvbdemux->filter = NULL;
return -ENOMEM;
}
for (i = 0; i < dvbdemux->filternum; i++) {
Expand All @@ -1248,13 +1257,6 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux)
dvbdemux->feed[i].index = i;
}

if (dvb_demux_tscheck) {
dvbdemux->cnt_storage = vmalloc(MAX_PID + 1);

if (!dvbdemux->cnt_storage)
printk(KERN_WARNING "Couldn't allocate memory for TS/TEI check. Disabling it\n");
}

INIT_LIST_HEAD(&dvbdemux->frontend_list);

for (i = 0; i < DMX_TS_PES_OTHER; i++) {
Expand Down
41 changes: 12 additions & 29 deletions trunk/drivers/usb/host/r8a66597-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
#include <linux/usb.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/mm.h>
#include <linux/irq.h>
#include <asm/cacheflush.h>

#include "../core/hcd.h"
#include "r8a66597.h"
Expand Down Expand Up @@ -822,26 +820,6 @@ static void enable_r8a66597_pipe(struct r8a66597 *r8a66597, struct urb *urb,
enable_r8a66597_pipe_dma(r8a66597, dev, pipe, urb);
}

static void r8a66597_urb_done(struct r8a66597 *r8a66597, struct urb *urb,
int status)
__releases(r8a66597->lock)
__acquires(r8a66597->lock)
{
if (usb_pipein(urb->pipe) && usb_pipetype(urb->pipe) != PIPE_CONTROL) {
void *ptr;

for (ptr = urb->transfer_buffer;
ptr < urb->transfer_buffer + urb->transfer_buffer_length;
ptr += PAGE_SIZE)
flush_dcache_page(virt_to_page(ptr));
}

usb_hcd_unlink_urb_from_ep(r8a66597_to_hcd(r8a66597), urb);
spin_unlock(&r8a66597->lock);
usb_hcd_giveback_urb(r8a66597_to_hcd(r8a66597), urb, status);
spin_lock(&r8a66597->lock);
}

/* this function must be called with interrupt disabled */
static void force_dequeue(struct r8a66597 *r8a66597, u16 pipenum, u16 address)
{
Expand All @@ -860,9 +838,15 @@ static void force_dequeue(struct r8a66597 *r8a66597, u16 pipenum, u16 address)
list_del(&td->queue);
kfree(td);

if (urb)
r8a66597_urb_done(r8a66597, urb, -ENODEV);
if (urb) {
usb_hcd_unlink_urb_from_ep(r8a66597_to_hcd(r8a66597),
urb);

spin_unlock(&r8a66597->lock);
usb_hcd_giveback_urb(r8a66597_to_hcd(r8a66597), urb,
-ENODEV);
spin_lock(&r8a66597->lock);
}
break;
}
}
Expand Down Expand Up @@ -1022,8 +1006,6 @@ static void start_root_hub_sampling(struct r8a66597 *r8a66597, int port,
/* this function must be called with interrupt disabled */
static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port,
u16 syssts)
__releases(r8a66597->lock)
__acquires(r8a66597->lock)
{
if (syssts == SE0) {
r8a66597_write(r8a66597, ~ATTCH, get_intsts_reg(port));
Expand All @@ -1041,9 +1023,7 @@ __acquires(r8a66597->lock)
usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597));
}

spin_unlock(&r8a66597->lock);
usb_hcd_poll_rh_status(r8a66597_to_hcd(r8a66597));
spin_lock(&r8a66597->lock);
}

/* this function must be called with interrupt disabled */
Expand Down Expand Up @@ -1303,7 +1283,10 @@ __releases(r8a66597->lock) __acquires(r8a66597->lock)
if (usb_pipeisoc(urb->pipe))
urb->start_frame = r8a66597_get_frame(hcd);

r8a66597_urb_done(r8a66597, urb, status);
usb_hcd_unlink_urb_from_ep(r8a66597_to_hcd(r8a66597), urb);
spin_unlock(&r8a66597->lock);
usb_hcd_giveback_urb(hcd, urb, status);
spin_lock(&r8a66597->lock);
}

if (restart) {
Expand Down
33 changes: 12 additions & 21 deletions trunk/fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static const match_table_t tokens = {

static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
{
char *options, *tmp_options;
char *options;
substring_t args[MAX_OPT_ARGS];
char *p;
int option = 0;
Expand All @@ -102,12 +102,9 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
if (!opts)
return 0;

tmp_options = kstrdup(opts, GFP_KERNEL);
if (!tmp_options) {
ret = -ENOMEM;
options = kstrdup(opts, GFP_KERNEL);
if (!options)
goto fail_option_alloc;
}
options = tmp_options;

while ((p = strsep(&options, ",")) != NULL) {
int token;
Expand Down Expand Up @@ -162,12 +159,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
break;
case Opt_cache:
s = match_strdup(&args[0]);
if (!s) {
ret = -ENOMEM;
P9_DPRINTK(P9_DEBUG_ERROR,
"problem allocating copy of cache arg\n");
goto free_and_return;
}
if (!s)
goto fail_option_alloc;

if (strcmp(s, "loose") == 0)
v9ses->cache = CACHE_LOOSE;
Expand All @@ -180,12 +173,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)

case Opt_access:
s = match_strdup(&args[0]);
if (!s) {
ret = -ENOMEM;
P9_DPRINTK(P9_DEBUG_ERROR,
"problem allocating copy of access arg\n");
goto free_and_return;
}
if (!s)
goto fail_option_alloc;

v9ses->flags &= ~V9FS_ACCESS_MASK;
if (strcmp(s, "user") == 0)
Expand All @@ -205,11 +194,13 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
continue;
}
}
kfree(options);
return ret;

free_and_return:
kfree(tmp_options);
fail_option_alloc:
return ret;
P9_DPRINTK(P9_DEBUG_ERROR,
"failed to allocate copy of option argument\n");
return -ENOMEM;
}

/**
Expand Down
Loading

0 comments on commit 821b26e

Please sign in to comment.