Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41144
b: refs/heads/master
c: af768c6
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 29, 2006
1 parent 3210fa4 commit 9cdb2b0
Show file tree
Hide file tree
Showing 51 changed files with 251 additions and 208 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: aed6fad8beca30a71a6950b6f650822254efa8c6
refs/heads/master: af768c6711de615abf9c679732a2f8245a4c286c
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extra-y := head.o init_task.o vmlinux.lds

obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
time.o traps.o unaligned.o
time.o topology.o traps.o unaligned.o

binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \
irix5sys.o sysirix.o
Expand Down
23 changes: 0 additions & 23 deletions trunk/arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,28 +463,5 @@ void flush_tlb_one(unsigned long vaddr)
smp_on_each_tlb(flush_tlb_one_ipi, (void *) vaddr);
}

static DEFINE_PER_CPU(struct cpu, cpu_devices);

static int __init topology_init(void)
{
int i, ret;

#ifdef CONFIG_NUMA
for_each_online_node(i)
register_one_node(i);
#endif /* CONFIG_NUMA */

for_each_present_cpu(i) {
ret = register_cpu(&per_cpu(cpu_devices, i), i);
if (ret)
printk(KERN_WARNING "topology_init: register_cpu %d "
"failed (%d)\n", i, ret);
}

return 0;
}

subsys_initcall(topology_init);

EXPORT_SYMBOL(flush_tlb_page);
EXPORT_SYMBOL(flush_tlb_one);
29 changes: 29 additions & 0 deletions trunk/arch/mips/kernel/topology.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <linux/cpu.h>
#include <linux/cpumask.h>
#include <linux/init.h>
#include <linux/node.h>
#include <linux/nodemask.h>
#include <linux/percpu.h>

static DEFINE_PER_CPU(struct cpu, cpu_devices);

static int __init topology_init(void)
{
int i, ret;

#ifdef CONFIG_NUMA
for_each_online_node(i)
register_one_node(i);
#endif /* CONFIG_NUMA */

for_each_present_cpu(i) {
ret = register_cpu(&per_cpu(cpu_devices, i), i);
if (ret)
printk(KERN_WARNING "topology_init: register_cpu %d "
"failed (%d)\n", i, ret);
}

return 0;
}

subsys_initcall(topology_init);
2 changes: 1 addition & 1 deletion trunk/arch/mips/mips-boards/malta/malta_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void __init plat_mem_setup(void)
BONITO_PCIMEMBASECFG |=
(BONITO_PCIMEMBASECFG_MEMBASE0_CACHED |
BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
printk("Disabled Bonito IOBC coherency\n");
printk("Enabled Bonito IOBC coherency\n");
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86_64/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static int __init setup_early_printk(char *buf)
return 0;
early_console_initialized = 1;

if (!strcmp(buf,"keep"))
if (strstr(buf, "keep"))
keep_early = 1;

if (!strncmp(buf, "serial", 6)) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86_64/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,10 +754,8 @@ void __setup_vector_irq(int cpu)
{
/* Initialize vector_irq on a new cpu */
/* This function must be called with vector_lock held */
unsigned long flags;
int irq, vector;


/* Mark the inuse vectors */
for (irq = 0; irq < NR_IRQ_VECTORS; ++irq) {
if (!cpu_isset(cpu, irq_domain[irq]))
Expand Down
10 changes: 9 additions & 1 deletion trunk/arch/x86_64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,19 @@ static int dump_trace_unwind(struct unwind_frame_info *info, void *context)
* severe exception (double fault, nmi, stack fault, debug, mce) hardware stack
*/

static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
{
void *t = (void *)tinfo;
return p > t && p < t + THREAD_SIZE - 3;
}

void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack,
struct stacktrace_ops *ops, void *data)
{
const unsigned cpu = smp_processor_id();
unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr;
unsigned used = 0;
struct thread_info *tinfo;

if (!tsk)
tsk = current;
Expand Down Expand Up @@ -370,7 +377,8 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s
/*
* This handles the process stack:
*/
HANDLE_STACK (((long) stack & (THREAD_SIZE-1)) != 0);
tinfo = current_thread_info();
HANDLE_STACK (valid_stack_ptr(tinfo, stack));
#undef HANDLE_STACK
}
EXPORT_SYMBOL(dump_trace);
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,17 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x2824), board_ahci }, /* ICH8 */
{ PCI_VDEVICE(INTEL, 0x2829), board_ahci }, /* ICH8M */
{ PCI_VDEVICE(INTEL, 0x282a), board_ahci }, /* ICH8M */
{ PCI_VDEVICE(INTEL, 0x2922), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x2923), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x2924), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x2925), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x2927), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x2929), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292a), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292b), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292f), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x294d), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x294e), board_ahci }, /* ICH9M */

/* JMicron */
{ PCI_VDEVICE(JMICRON, 0x2360), board_ahci }, /* JMicron JMB360 */
Expand Down
21 changes: 13 additions & 8 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,7 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, const u8 *scsicm

static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
struct scsi_cmnd *cmd = qc->scsicmd;
u8 *cdb = cmd->cmnd;
int need_sense = (qc->err_mask != 0);
Expand All @@ -1459,11 +1460,12 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
* schedule EH_REVALIDATE operation to update the IDENTIFY DEVICE
* cache
*/
if (!need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) &&
if (ap->ops->error_handler &&
!need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) &&
((qc->tf.feature == SETFEATURES_WC_ON) ||
(qc->tf.feature == SETFEATURES_WC_OFF))) {
qc->ap->eh_info.action |= ATA_EH_REVALIDATE;
ata_port_schedule_eh(qc->ap);
ap->eh_info.action |= ATA_EH_REVALIDATE;
ata_port_schedule_eh(ap);
}

/* For ATA pass thru (SAT) commands, generate a sense block if
Expand All @@ -1490,8 +1492,8 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
}
}

if (need_sense && !qc->ap->ops->error_handler)
ata_dump_status(qc->ap->id, &qc->result_tf);
if (need_sense && !ap->ops->error_handler)
ata_dump_status(ap->id, &qc->result_tf);

qc->scsidone(cmd);

Expand Down Expand Up @@ -3345,20 +3347,23 @@ EXPORT_SYMBOL_GPL(ata_sas_slave_configure);
* @ap: ATA port to which the command is being sent
*
* RETURNS:
* Zero.
* Return value from __ata_scsi_queuecmd() if @cmd can be queued,
* 0 otherwise.
*/

int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *),
struct ata_port *ap)
{
int rc = 0;

ata_scsi_dump_cdb(ap, cmd);

if (likely(ata_scsi_dev_enabled(ap->device)))
__ata_scsi_queuecmd(cmd, done, ap->device);
rc = __ata_scsi_queuecmd(cmd, done, ap->device);
else {
cmd->result = (DID_BAD_TARGET << 16);
done(cmd);
}
return 0;
return rc;
}
EXPORT_SYMBOL_GPL(ata_sas_queuecmd);
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra

static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
{
fe_status_t s;
fe_status_t s = 0;
struct dvb_frontend_private *fepriv = fe->frontend_priv;

/* if we've got no parameters, just keep idling */
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/media/dvb/frontends/tda10086.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ static int tda10086_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_pa

dprintk ("%s\n", __FUNCTION__);

// check for invalid symbol rate
if (fe_params->u.qpsk.symbol_rate < 500000)
return -EINVAL;

// calculate the updated frequency (note: we convert from Hz->kHz)
tmp64 = tda10086_read_byte(state, 0x52);
tmp64 |= (tda10086_read_byte(state, 0x51) << 8);
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/media/dvb/ttpci/budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
#include "lnbp21.h"
#include "bsru6.h"

static int diseqc_method;
module_param(diseqc_method, int, 0444);
MODULE_PARM_DESC(diseqc_method, "Select DiSEqC method for subsystem id 13c2:1003, 0: default, 1: more reliable (for newer revisions only)");

static void Set22K (struct budget *budget, int state)
{
struct saa7146_dev *dev=budget->dev;
Expand Down Expand Up @@ -382,6 +386,11 @@ static void frontend_init(struct budget *budget)
if (budget->dvb_frontend) {
budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
if (budget->dev->pci->subsystem_device == 0x1003 && diseqc_method == 0) {
budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
budget->dvb_frontend->ops.set_tone = budget_set_tone;
}
break;
}
break;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/et61x251/et61x251_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,8 +1182,6 @@ static void et61x251_release_resources(struct et61x251_device* cam)
video_set_drvdata(cam->v4ldev, NULL);
video_unregister_device(cam->v4ldev);

usb_put_dev(cam->usbdev);

mutex_unlock(&et61x251_sysfs_lock);

kfree(cam->control_buffer);
Expand Down Expand Up @@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode* inode, struct file* filp)

if (cam->state & DEV_DISCONNECTED) {
et61x251_release_resources(cam);
usb_put_dev(cam->usbdev);
mutex_unlock(&cam->dev_mutex);
kfree(cam);
return 0;
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/media/video/saa6588.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ static void read_from_buf(struct saa6588 *s, struct rds_command *a)
if (rd_blocks > s->block_count)
rd_blocks = s->block_count;

if (!rd_blocks)
if (!rd_blocks) {
spin_unlock_irqrestore(&s->lock, flags);
return;
}

for (i = 0; i < rd_blocks; i++) {
if (block_to_user_buf(s, buf_ptr)) {
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/media/video/saa7115.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,8 +1464,6 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind)
client->driver = &i2c_driver_saa711x;
snprintf(client->name, sizeof(client->name) - 1, "saa7115");

v4l_dbg(1, debug, client, "detecting saa7115 client on address 0x%x\n", address << 1);

for (i=0;i<0x0f;i++) {
saa711x_write(client, 0, i);
name[i] = (saa711x_read(client, 0) &0x0f) +'0';
Expand All @@ -1477,6 +1475,13 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind)
saa711x_write(client, 0, 5);
chip_id = saa711x_read(client, 0) & 0x0f;

/* Check whether this chip is part of the saa711x series */
if (memcmp(name, "1f711", 5)) {
v4l_dbg(1, debug, client, "chip found @ 0x%x (ID %s) does not match a known saa711x chip.\n",
address << 1, name);
return 0;
}

snprintf(client->name, sizeof(client->name) - 1, "saa711%d",chip_id);
v4l_info(client, "saa711%d found (%s) @ 0x%x (%s)\n", chip_id, name, address << 1, adapter->name);

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/sn9c102/sn9c102_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(struct sn9c102_device* cam)
video_set_drvdata(cam->v4ldev, NULL);
video_unregister_device(cam->v4ldev);

usb_put_dev(cam->usbdev);

mutex_unlock(&sn9c102_sysfs_lock);

kfree(cam->control_buffer);
Expand Down Expand Up @@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp)

if (cam->state & DEV_DISCONNECTED) {
sn9c102_release_resources(cam);
usb_put_dev(cam->usbdev);
mutex_unlock(&cam->dev_mutex);
kfree(cam);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/chips/cfi_cmdset_0001.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ static int inval_cache_and_wait_for_operation(
}
spin_lock(chip->mutex);

if (chip->state != chip_state) {
while (chip->state != chip_state) {
/* Someone's suspended the operation: sleep */
DECLARE_WAITQUEUE(wait, current);
set_current_state(TASK_UNINTERRUPTIBLE);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/hamradio/6pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ static void decode_prio_command(struct sixpack *sp, unsigned char cmd)
printk(KERN_DEBUG "6pack: protocol violation\n");
else
sp->status = 0;
cmd &= !SIXP_RX_DCD_MASK;
cmd &= ~SIXP_RX_DCD_MASK;
}
sp->status = cmd & SIXP_PRIO_DATA_MASK;
} else { /* output watchdog char if idle */
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,8 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)
crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0,
CRYPTO_ALG_ASYNC);
kfree(full_alg_name);
if (!crypt_stat->tfm) {
if (IS_ERR(crypt_stat->tfm)) {
rc = PTR_ERR(crypt_stat->tfm);
ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): "
"Error initializing cipher [%s]\n",
crypt_stat->cipher);
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/asm-i386/mach-summit/mach_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ static inline void clustered_apic_check(void)

static inline int apicid_to_node(int logical_apicid)
{
#ifdef CONFIG_SMP
return apicid_2_node[hard_smp_processor_id()];
#else
return 0;
#endif
}

/* Mapping from cpu number to logical apicid */
Expand Down
6 changes: 4 additions & 2 deletions trunk/include/asm-parisc/semaphore.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ extern __inline__ int down_interruptible(struct semaphore * sem)
*/
extern __inline__ int down_trylock(struct semaphore * sem)
{
int flags, count;
unsigned long flags;
int count;

spin_lock_irqsave(&sem->sentry, flags);
count = sem->count - 1;
Expand All @@ -131,7 +132,8 @@ extern __inline__ int down_trylock(struct semaphore * sem)
*/
extern __inline__ void up(struct semaphore * sem)
{
int flags;
unsigned long flags;

spin_lock_irqsave(&sem->sentry, flags);
if (sem->count < 0) {
__up(sem);
Expand Down
Loading

0 comments on commit 9cdb2b0

Please sign in to comment.