Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180387
b: refs/heads/master
c: ac73fdd
h: refs/heads/master
i:
  180385: 821b26e
  180383: 748641e
v: v3
  • Loading branch information
Linus Torvalds committed Feb 10, 2010
1 parent 24c11f2 commit 5ea3b78
Show file tree
Hide file tree
Showing 49 changed files with 465 additions and 210 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: ef286f6fa673cd7fb367e1b145069d8dbfcc6081
refs/heads/master: ac73fddfc523bf3c3525d16356b44527c44fae6d
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 '80' it means that between the checking
intervals the CPU needs to be on average more than 80% in use to then
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
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: 1 addition & 0 deletions trunk/arch/microblaze/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ void __init setup_arch(char **cmdline_p)

microblaze_cache_init();

invalidate_dcache();
enable_dcache();

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

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

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

if (firmware_has_feature(FW_FEATURE_LPAR))
lpar_cppr_info(cppr);
Expand Down Expand Up @@ -821,8 +825,14 @@ 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: 2 additions & 1 deletion trunk/arch/sh/kernel/cpu/sh3/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ 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 @@ -365,6 +364,8 @@ 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: 20 additions & 0 deletions trunk/arch/sh/kernel/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,8 @@ 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 @@ -678,6 +680,24 @@ 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: 7 additions & 1 deletion trunk/arch/sh/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ ret_from_exception:
CFI_STARTPROC simple
CFI_DEF_CFA r14, 0
CFI_REL_OFFSET 17, 64
CFI_REL_OFFSET 15, 0
CFI_REL_OFFSET 15, 60
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: 2 additions & 1 deletion trunk/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,7 @@ 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 @@ -1375,7 +1376,7 @@ static unsigned int powernowk8_get(unsigned int cpu)
int err;

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

smp_call_function_single(cpu, query_values_on_cpu, &err, true);
if (err)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ 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
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,7 +761,6 @@ 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 @@ -887,6 +886,7 @@ 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: 9 additions & 11 deletions trunk/drivers/media/dvb/dvb-core/dvb_demux.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,7 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
};
};

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;
}

if (demux->cnt_storage) {
/* check pkt counter */
if (pid < MAX_PID) {
if (buf[1] & 0x80)
Expand All @@ -454,7 +445,6 @@ 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 @@ -1246,6 +1236,7 @@ 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 @@ -1257,6 +1248,13 @@ 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: 29 additions & 12 deletions trunk/drivers/usb/host/r8a66597-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
#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 @@ -820,6 +822,26 @@ 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 @@ -838,15 +860,9 @@ static void force_dequeue(struct r8a66597 *r8a66597, u16 pipenum, u16 address)
list_del(&td->queue);
kfree(td);

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

spin_unlock(&r8a66597->lock);
usb_hcd_giveback_urb(r8a66597_to_hcd(r8a66597), urb,
-ENODEV);
spin_lock(&r8a66597->lock);
}
break;
}
}
Expand Down Expand Up @@ -1006,6 +1022,8 @@ 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 @@ -1023,7 +1041,9 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port,
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 @@ -1283,10 +1303,7 @@ __releases(r8a66597->lock) __acquires(r8a66597->lock)
if (usb_pipeisoc(urb->pipe))
urb->start_frame = r8a66597_get_frame(hcd);

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);
r8a66597_urb_done(r8a66597, urb, status);
}

if (restart) {
Expand Down
33 changes: 21 additions & 12 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;
char *options, *tmp_options;
substring_t args[MAX_OPT_ARGS];
char *p;
int option = 0;
Expand All @@ -102,9 +102,12 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
if (!opts)
return 0;

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

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

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

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

v9ses->flags &= ~V9FS_ACCESS_MASK;
if (strcmp(s, "user") == 0)
Expand All @@ -194,13 +205,11 @@ 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:
P9_DPRINTK(P9_DEBUG_ERROR,
"failed to allocate copy of option argument\n");
return -ENOMEM;
return ret;
}

/**
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/9p/v9fs_vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ void v9fs_dentry_release(struct dentry *);
int v9fs_uflags2omode(int uflags, int extended);

ssize_t v9fs_file_readn(struct file *, char *, char __user *, u32, u64);
void v9fs_blank_wstat(struct p9_wstat *wstat);
Loading

0 comments on commit 5ea3b78

Please sign in to comment.