diff --git a/[refs] b/[refs] index 3263e80f24bb..69fdb834ac0a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 328c2a8a39e1ba43a6e54e43fc752f7035779561 +refs/heads/master: 01840f9c9d7ae366311302077ace6bc39169399b diff --git a/trunk/arch/alpha/kernel/smp.c b/trunk/arch/alpha/kernel/smp.c index 02c2db08114a..4b873527ce1c 100644 --- a/trunk/arch/alpha/kernel/smp.c +++ b/trunk/arch/alpha/kernel/smp.c @@ -73,6 +73,9 @@ cpumask_t cpu_online_map; EXPORT_SYMBOL(cpu_online_map); +/* cpus reported in the hwrpb */ +static unsigned long hwrpb_cpu_present_mask __initdata = 0; + int smp_num_probed; /* Internal processor count */ int smp_num_cpus = 1; /* Number that came online. */ @@ -439,7 +442,7 @@ setup_smp(void) if ((cpu->flags & 0x1cc) == 0x1cc) { smp_num_probed++; /* Assume here that "whami" == index */ - cpu_set(i, cpu_possible_map); + hwrpb_cpu_present_mask |= (1UL << i); cpu->pal_revision = boot_cpu_palrev; } @@ -450,12 +453,12 @@ setup_smp(void) } } else { smp_num_probed = 1; - cpu_set(boot_cpuid, cpu_possible_map); + hwrpb_cpu_present_mask = (1UL << boot_cpuid); } cpu_present_mask = cpumask_of_cpu(boot_cpuid); printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", - smp_num_probed, cpu_possible_map.bits[0]); + smp_num_probed, hwrpb_cpu_present_mask); } /* @@ -464,6 +467,8 @@ setup_smp(void) void __init smp_prepare_cpus(unsigned int max_cpus) { + int cpu_count, i; + /* Take care of some initial bookkeeping. */ memset(ipi_data, 0, sizeof(ipi_data)); @@ -481,7 +486,19 @@ smp_prepare_cpus(unsigned int max_cpus) printk(KERN_INFO "SMP starting up secondaries.\n"); - smp_num_cpus = smp_num_probed; + cpu_count = 1; + for (i = 0; (i < NR_CPUS) && (cpu_count < max_cpus); i++) { + if (i == boot_cpuid) + continue; + + if (((hwrpb_cpu_present_mask >> i) & 1) == 0) + continue; + + cpu_set(i, cpu_possible_map); + cpu_count++; + } + + smp_num_cpus = cpu_count; } void __devinit diff --git a/trunk/block/elevator.c b/trunk/block/elevator.c index 24b702d649a9..2fc269f69726 100644 --- a/trunk/block/elevator.c +++ b/trunk/block/elevator.c @@ -293,7 +293,7 @@ void elv_requeue_request(request_queue_t *q, struct request *rq) rq->flags &= ~REQ_STARTED; - elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE); + __elv_add_request(q, rq, ELEVATOR_INSERT_REQUEUE, 0); } static void elv_drain_elevator(request_queue_t *q) @@ -310,11 +310,41 @@ static void elv_drain_elevator(request_queue_t *q) } } -void elv_insert(request_queue_t *q, struct request *rq, int where) +void __elv_add_request(request_queue_t *q, struct request *rq, int where, + int plug) { struct list_head *pos; unsigned ordseq; + if (q->ordcolor) + rq->flags |= REQ_ORDERED_COLOR; + + if (rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)) { + /* + * toggle ordered color + */ + if (blk_barrier_rq(rq)) + q->ordcolor ^= 1; + + /* + * barriers implicitly indicate back insertion + */ + if (where == ELEVATOR_INSERT_SORT) + where = ELEVATOR_INSERT_BACK; + + /* + * this request is scheduling boundary, update end_sector + */ + if (blk_fs_request(rq)) { + q->end_sector = rq_end_sector(rq); + q->boundary_rq = rq; + } + } else if (!(rq->flags & REQ_ELVPRIV) && where == ELEVATOR_INSERT_SORT) + where = ELEVATOR_INSERT_BACK; + + if (plug) + blk_plug_device(q); + rq->q = q; switch (where) { @@ -395,42 +425,6 @@ void elv_insert(request_queue_t *q, struct request *rq, int where) } } -void __elv_add_request(request_queue_t *q, struct request *rq, int where, - int plug) -{ - if (q->ordcolor) - rq->flags |= REQ_ORDERED_COLOR; - - if (rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)) { - /* - * toggle ordered color - */ - if (blk_barrier_rq(rq)) - q->ordcolor ^= 1; - - /* - * barriers implicitly indicate back insertion - */ - if (where == ELEVATOR_INSERT_SORT) - where = ELEVATOR_INSERT_BACK; - - /* - * this request is scheduling boundary, update - * end_sector - */ - if (blk_fs_request(rq)) { - q->end_sector = rq_end_sector(rq); - q->boundary_rq = rq; - } - } else if (!(rq->flags & REQ_ELVPRIV) && where == ELEVATOR_INSERT_SORT) - where = ELEVATOR_INSERT_BACK; - - if (plug) - blk_plug_device(q); - - elv_insert(q, rq, where); -} - void elv_add_request(request_queue_t *q, struct request *rq, int where, int plug) { diff --git a/trunk/block/ll_rw_blk.c b/trunk/block/ll_rw_blk.c index 03d9c82b0fe7..ee5ed98db4cd 100644 --- a/trunk/block/ll_rw_blk.c +++ b/trunk/block/ll_rw_blk.c @@ -454,7 +454,7 @@ static void queue_flush(request_queue_t *q, unsigned which) rq->end_io = end_io; q->prepare_flush_fn(q, rq); - elv_insert(q, rq, ELEVATOR_INSERT_FRONT); + __elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0); } static inline struct request *start_ordered(request_queue_t *q, @@ -490,7 +490,7 @@ static inline struct request *start_ordered(request_queue_t *q, else q->ordseq |= QUEUE_ORDSEQ_POSTFLUSH; - elv_insert(q, rq, ELEVATOR_INSERT_FRONT); + __elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0); if (q->ordered & QUEUE_ORDERED_PREFLUSH) { queue_flush(q, QUEUE_ORDERED_PREFLUSH); diff --git a/trunk/block/scsi_ioctl.c b/trunk/block/scsi_ioctl.c index cc72210687eb..24f7af9d0abc 100644 --- a/trunk/block/scsi_ioctl.c +++ b/trunk/block/scsi_ioctl.c @@ -310,6 +310,8 @@ static int sg_io(struct file *file, request_queue_t *q, if (!rq->timeout) rq->timeout = BLK_DEFAULT_TIMEOUT; + rq->retries = 0; + start_time = jiffies; /* ignore return value. All information is passed back to caller @@ -427,6 +429,7 @@ static int sg_scsi_ioctl(struct file *file, request_queue_t *q, rq->data = buffer; rq->data_len = bytes; rq->flags |= REQ_BLOCK_PC; + rq->retries = 0; blk_execute_rq(q, bd_disk, rq, 0); err = rq->errors & 0xff; /* only 8 bit SCSI status */ diff --git a/trunk/drivers/macintosh/Kconfig b/trunk/drivers/macintosh/Kconfig index 12ad462737ba..b11cd31d8d27 100644 --- a/trunk/drivers/macintosh/Kconfig +++ b/trunk/drivers/macintosh/Kconfig @@ -190,7 +190,7 @@ config WINDFARM_PM91 config WINDFARM_PM112 tristate "Support for thermal management on PowerMac11,2" depends on WINDFARM && I2C && PMAC_SMU - select I2C_POWERMAC + select I2C_PMAC_SMU help This driver provides thermal control for the PowerMac11,2 which are the recent dual and quad G5 machines using the diff --git a/trunk/include/linux/elevator.h b/trunk/include/linux/elevator.h index 18cf1f3e1184..23fe746a1d51 100644 --- a/trunk/include/linux/elevator.h +++ b/trunk/include/linux/elevator.h @@ -82,7 +82,6 @@ struct elevator_queue extern void elv_dispatch_sort(request_queue_t *, struct request *); extern void elv_add_request(request_queue_t *, struct request *, int, int); extern void __elv_add_request(request_queue_t *, struct request *, int, int); -extern void elv_insert(request_queue_t *, struct request *, int); extern int elv_merge(request_queue_t *, struct request **, struct bio *); extern void elv_merge_requests(request_queue_t *, struct request *, struct request *); diff --git a/trunk/mm/slob.c b/trunk/mm/slob.c index a1f42bdc0245..1c240c4b71d9 100644 --- a/trunk/mm/slob.c +++ b/trunk/mm/slob.c @@ -336,7 +336,7 @@ EXPORT_SYMBOL(slab_reclaim_pages); #ifdef CONFIG_SMP -void *__alloc_percpu(size_t size) +void *__alloc_percpu(size_t size, size_t align) { int i; struct percpu_data *pdata = kmalloc(sizeof (*pdata), GFP_KERNEL);