Commit 8fc45044 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: don't set bounce limit in blk_init_queue

Instead move it to the callers.  Those that either don't use bio_data() or
page_address() or are specific to architectures that do not support highmem
are skipped.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0bf6595e
...@@ -960,11 +960,6 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id) ...@@ -960,11 +960,6 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
return NULL; return NULL;
} }
/*
* by default assume old behaviour and bounce for any highmem page
*/
blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
return q; return q;
} }
EXPORT_SYMBOL(blk_init_queue_node); EXPORT_SYMBOL(blk_init_queue_node);
......
...@@ -388,6 +388,7 @@ aoeblk_gdalloc(void *vp) ...@@ -388,6 +388,7 @@ aoeblk_gdalloc(void *vp)
d->aoemajor, d->aoeminor); d->aoemajor, d->aoeminor);
goto err_mempool; goto err_mempool;
} }
blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
spin_lock_irqsave(&d->lock, flags); spin_lock_irqsave(&d->lock, flags);
WARN_ON(!(d->flags & DEVFL_GD_NOW)); WARN_ON(!(d->flags & DEVFL_GD_NOW));
......
...@@ -4203,6 +4203,7 @@ static int __init do_floppy_init(void) ...@@ -4203,6 +4203,7 @@ static int __init do_floppy_init(void)
goto out_put_disk; goto out_put_disk;
} }
blk_queue_bounce_limit(disks[drive]->queue, BLK_BOUNCE_HIGH);
blk_queue_max_hw_sectors(disks[drive]->queue, 64); blk_queue_max_hw_sectors(disks[drive]->queue, 64);
disks[drive]->major = FLOPPY_MAJOR; disks[drive]->major = FLOPPY_MAJOR;
disks[drive]->first_minor = TOMINOR(drive); disks[drive]->first_minor = TOMINOR(drive);
......
...@@ -305,6 +305,7 @@ static void pcd_init_units(void) ...@@ -305,6 +305,7 @@ static void pcd_init_units(void)
put_disk(disk); put_disk(disk);
continue; continue;
} }
blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
cd->disk = disk; cd->disk = disk;
cd->pi = &cd->pia; cd->pi = &cd->pia;
cd->present = 0; cd->present = 0;
......
...@@ -863,6 +863,7 @@ static void pd_probe_drive(struct pd_unit *disk) ...@@ -863,6 +863,7 @@ static void pd_probe_drive(struct pd_unit *disk)
return; return;
} }
blk_queue_max_hw_sectors(p->queue, cluster); blk_queue_max_hw_sectors(p->queue, cluster);
blk_queue_bounce_limit(p->queue, BLK_BOUNCE_HIGH);
if (disk->drive == -1) { if (disk->drive == -1) {
for (disk->drive = 0; disk->drive <= 1; disk->drive++) for (disk->drive = 0; disk->drive <= 1; disk->drive++)
......
...@@ -293,6 +293,7 @@ static void __init pf_init_units(void) ...@@ -293,6 +293,7 @@ static void __init pf_init_units(void)
return; return;
} }
blk_queue_max_segments(disk->queue, cluster); blk_queue_max_segments(disk->queue, cluster);
blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
pf->disk = disk; pf->disk = disk;
pf->pi = &pf->pia; pf->pi = &pf->pia;
pf->media_status = PF_NM; pf->media_status = PF_NM;
......
...@@ -4273,6 +4273,7 @@ static int skd_cons_disk(struct skd_device *skdev) ...@@ -4273,6 +4273,7 @@ static int skd_cons_disk(struct skd_device *skdev)
rc = -ENOMEM; rc = -ENOMEM;
goto err_out; goto err_out;
} }
blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
skdev->queue = q; skdev->queue = q;
disk->queue = q; disk->queue = q;
......
...@@ -864,6 +864,8 @@ static int swim_floppy_init(struct swim_priv *swd) ...@@ -864,6 +864,8 @@ static int swim_floppy_init(struct swim_priv *swd)
put_disk(swd->unit[drive].disk); put_disk(swd->unit[drive].disk);
goto exit_put_disks; goto exit_put_disks;
} }
blk_queue_bounce_limit(swd->unit[drive].disk->queue,
BLK_BOUNCE_HIGH);
swd->unit[drive].disk->queue->queuedata = swd; swd->unit[drive].disk->queue->queuedata = swd;
swd->unit[drive].swd = swd; swd->unit[drive].swd = swd;
} }
......
...@@ -1223,6 +1223,7 @@ static int swim3_attach(struct macio_dev *mdev, ...@@ -1223,6 +1223,7 @@ static int swim3_attach(struct macio_dev *mdev,
put_disk(disk); put_disk(disk);
return -ENOMEM; return -ENOMEM;
} }
blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
disk->queue->queuedata = &floppy_states[index]; disk->queue->queuedata = &floppy_states[index];
if (index == 0) { if (index == 0) {
......
...@@ -993,6 +993,7 @@ static int ace_setup(struct ace_device *ace) ...@@ -993,6 +993,7 @@ static int ace_setup(struct ace_device *ace)
if (ace->queue == NULL) if (ace->queue == NULL)
goto err_blk_initq; goto err_blk_initq;
blk_queue_logical_block_size(ace->queue, 512); blk_queue_logical_block_size(ace->queue, 512);
blk_queue_bounce_limit(ace->queue, BLK_BOUNCE_HIGH);
/* /*
* Allocate and initialize GD structure * Allocate and initialize GD structure
......
...@@ -813,6 +813,7 @@ static int probe_gdrom(struct platform_device *devptr) ...@@ -813,6 +813,7 @@ static int probe_gdrom(struct platform_device *devptr)
err = -ENOMEM; err = -ENOMEM;
goto probe_fail_requestq; goto probe_fail_requestq;
} }
blk_queue_bounce_limit(gd.gdrom_rq, BLK_BOUNCE_HIGH);
err = probe_gdrom_setupqueue(); err = probe_gdrom_setupqueue();
if (err) if (err)
......
...@@ -417,6 +417,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) ...@@ -417,6 +417,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
new->rq->queuedata = new; new->rq->queuedata = new;
blk_queue_logical_block_size(new->rq, tr->blksize); blk_queue_logical_block_size(new->rq, tr->blksize);
blk_queue_bounce_limit(new->rq, BLK_BOUNCE_HIGH);
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, new->rq); queue_flag_set_unlocked(QUEUE_FLAG_NONROT, new->rq);
queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, new->rq); queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, new->rq);
......
...@@ -592,6 +592,7 @@ static int jsfd_init(void) ...@@ -592,6 +592,7 @@ static int jsfd_init(void)
put_disk(disk); put_disk(disk);
goto out; goto out;
} }
blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
jsfd_disk[i] = disk; jsfd_disk[i] = disk;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment