Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20092
b: refs/heads/master
c: b7ed1de
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Feb 8, 2006
1 parent 2b723ec commit b51f164
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 58 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: 01840f9c9d7ae366311302077ace6bc39169399b
refs/heads/master: b7ed1de0ae4edb3fd2c53fa3dd7e6f104beb6d00
25 changes: 4 additions & 21 deletions trunk/arch/alpha/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ 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. */

Expand Down Expand Up @@ -442,7 +439,7 @@ setup_smp(void)
if ((cpu->flags & 0x1cc) == 0x1cc) {
smp_num_probed++;
/* Assume here that "whami" == index */
hwrpb_cpu_present_mask |= (1UL << i);
cpu_set(i, cpu_possible_map);
cpu->pal_revision = boot_cpu_palrev;
}

Expand All @@ -453,12 +450,12 @@ setup_smp(void)
}
} else {
smp_num_probed = 1;
hwrpb_cpu_present_mask = (1UL << boot_cpuid);
cpu_set(boot_cpuid, cpu_possible_map);
}
cpu_present_mask = cpumask_of_cpu(boot_cpuid);

printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
smp_num_probed, hwrpb_cpu_present_mask);
smp_num_probed, cpu_possible_map.bits[0]);
}

/*
Expand All @@ -467,8 +464,6 @@ 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));

Expand All @@ -486,19 +481,7 @@ smp_prepare_cpus(unsigned int max_cpus)

printk(KERN_INFO "SMP starting up secondaries.\n");

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;
smp_num_cpus = smp_num_probed;
}

void __devinit
Expand Down
70 changes: 38 additions & 32 deletions trunk/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ void elv_requeue_request(request_queue_t *q, struct request *rq)

rq->flags &= ~REQ_STARTED;

__elv_add_request(q, rq, ELEVATOR_INSERT_REQUEUE, 0);
elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE);
}

static void elv_drain_elevator(request_queue_t *q)
Expand All @@ -310,41 +310,11 @@ static void elv_drain_elevator(request_queue_t *q)
}
}

void __elv_add_request(request_queue_t *q, struct request *rq, int where,
int plug)
void elv_insert(request_queue_t *q, struct request *rq, int where)
{
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) {
Expand Down Expand Up @@ -425,6 +395,42 @@ void __elv_add_request(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)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0);
elv_insert(q, rq, ELEVATOR_INSERT_FRONT);
}

static inline struct request *start_ordered(request_queue_t *q,
Expand Down Expand Up @@ -490,7 +490,7 @@ static inline struct request *start_ordered(request_queue_t *q,
else
q->ordseq |= QUEUE_ORDSEQ_POSTFLUSH;

__elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0);
elv_insert(q, rq, ELEVATOR_INSERT_FRONT);

if (q->ordered & QUEUE_ORDERED_PREFLUSH) {
queue_flush(q, QUEUE_ORDERED_PREFLUSH);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/macintosh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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_PMAC_SMU
select I2C_POWERMAC
help
This driver provides thermal control for the PowerMac11,2
which are the recent dual and quad G5 machines using the
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/elevator.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ 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 *);
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/slob.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ EXPORT_SYMBOL(slab_reclaim_pages);

#ifdef CONFIG_SMP

void *__alloc_percpu(size_t size, size_t align)
void *__alloc_percpu(size_t size)
{
int i;
struct percpu_data *pdata = kmalloc(sizeof (*pdata), GFP_KERNEL);
Expand Down

0 comments on commit b51f164

Please sign in to comment.