block: don't set bounce limit in blk_init_queue
authorChristoph Hellwig <hch@lst.de>
Mon, 19 Jun 2017 07:26:26 +0000 (09:26 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 27 Jun 2017 18:13:45 +0000 (12:13 -0600)
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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
13 files changed:
block/blk-core.c
drivers/block/aoe/aoeblk.c
drivers/block/floppy.c
drivers/block/paride/pcd.c
drivers/block/paride/pd.c
drivers/block/paride/pf.c
drivers/block/skd_main.c
drivers/block/swim.c
drivers/block/swim3.c
drivers/block/xsysace.c
drivers/cdrom/gdrom.c
drivers/mtd/mtd_blkdevs.c
drivers/sbus/char/jsflash.c

index 33b27541dc17f61f0dc8848c655d54e8b7580447..af393d5a96807c6c59ce45a031c14042b72b5e6a 100644 (file)
@@ -960,11 +960,6 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
                return NULL;
        }
 
-       /*
-        * by default assume old behaviour and bounce for any highmem page
-        */
-       blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
-
        return q;
 }
 EXPORT_SYMBOL(blk_init_queue_node);
index 027b876370bc9a04b5601b78f644fd947e6c87c5..6797e6c23c8a553e86a597277b0e2769e1fc0bcc 100644 (file)
@@ -388,6 +388,7 @@ aoeblk_gdalloc(void *vp)
                        d->aoemajor, d->aoeminor);
                goto err_mempool;
        }
+       blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
 
        spin_lock_irqsave(&d->lock, flags);
        WARN_ON(!(d->flags & DEVFL_GD_NOW));
index 9e3cb32e365d909d6c642f8a2a4548a50b4e2cc4..ce823647a9c449d8a63c80db17e5e8a9529e67e7 100644 (file)
@@ -4203,6 +4203,7 @@ static int __init do_floppy_init(void)
                        goto out_put_disk;
                }
 
+               blk_queue_bounce_limit(disks[drive]->queue, BLK_BOUNCE_HIGH);
                blk_queue_max_hw_sectors(disks[drive]->queue, 64);
                disks[drive]->major = FLOPPY_MAJOR;
                disks[drive]->first_minor = TOMINOR(drive);
index cffe42d80ce9a6a47d564cecef1774c6f5f5e37e..7b8c6368beb7920ddc765737f8540141e6d2f0f0 100644 (file)
@@ -305,6 +305,7 @@ static void pcd_init_units(void)
                        put_disk(disk);
                        continue;
                }
+               blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
                cd->disk = disk;
                cd->pi = &cd->pia;
                cd->present = 0;
index c98983be4f9c088bcd3ebb2e98e1462a7dc6fbda..27a44b97393af0b63bf98c17dc98a6ea213761c1 100644 (file)
@@ -863,6 +863,7 @@ static void pd_probe_drive(struct pd_unit *disk)
                return;
        }
        blk_queue_max_hw_sectors(p->queue, cluster);
+       blk_queue_bounce_limit(p->queue, BLK_BOUNCE_HIGH);
 
        if (disk->drive == -1) {
                for (disk->drive = 0; disk->drive <= 1; disk->drive++)
index 5f46da8d05cd427e1351eb2358d6a712ac470831..eef7a91f667d64e5117b215252f3f6563bdad437 100644 (file)
@@ -293,6 +293,7 @@ static void __init pf_init_units(void)
                        return;
                }
                blk_queue_max_segments(disk->queue, cluster);
+               blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
                pf->disk = disk;
                pf->pi = &pf->pia;
                pf->media_status = PF_NM;
index e6c526861703bb8974aa796a2a13dede6b2a2939..d0368682bd437de8b742cf610cbcd75fb07cd02f 100644 (file)
@@ -4273,6 +4273,7 @@ static int skd_cons_disk(struct skd_device *skdev)
                rc = -ENOMEM;
                goto err_out;
        }
+       blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
 
        skdev->queue = q;
        disk->queue = q;
index 1633aaf240600859302b7cf4902e48aaf0c9e78c..84434d3ea19b8f3a7500972219b952a6b84072a2 100644 (file)
@@ -864,6 +864,8 @@ static int swim_floppy_init(struct swim_priv *swd)
                        put_disk(swd->unit[drive].disk);
                        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].swd = swd;
        }
index e3399a138335b6473baacb996bb83780b6cccee7..9f931f8f6b4ced797175c95bf77fe455469ef463 100644 (file)
@@ -1223,6 +1223,7 @@ static int swim3_attach(struct macio_dev *mdev,
                put_disk(disk);
                return -ENOMEM;
        }
+       blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
        disk->queue->queuedata = &floppy_states[index];
 
        if (index == 0) {
index 977fdf0660175ce4167bf85a4e0614aab6a13e48..14459d66ef0cd8ac223992f2f69ad2b725f8481c 100644 (file)
@@ -993,6 +993,7 @@ static int ace_setup(struct ace_device *ace)
        if (ace->queue == NULL)
                goto err_blk_initq;
        blk_queue_logical_block_size(ace->queue, 512);
+       blk_queue_bounce_limit(ace->queue, BLK_BOUNCE_HIGH);
 
        /*
         * Allocate and initialize GD structure
index 53f8278e66f75c9235f171e4be9bbbaf55f4336c..6495b03f576ca1a5867b000e210cf2d803fa18d4 100644 (file)
@@ -813,6 +813,7 @@ static int probe_gdrom(struct platform_device *devptr)
                err = -ENOMEM;
                goto probe_fail_requestq;
        }
+       blk_queue_bounce_limit(gd.gdrom_rq, BLK_BOUNCE_HIGH);
 
        err = probe_gdrom_setupqueue();
        if (err)
index 91c17fba76598f78b7e8968dc9477a92c6ea5f49..f336a9b855765e5ea236fddf9564f5f084793597 100644 (file)
@@ -417,6 +417,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
        new->rq->queuedata = new;
        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_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, new->rq);
 
index 35a69949f92d484bd06c27a61a79e158f58b4ca8..14f377ac12803bb2bd2eec847faca3ad2bde0fac 100644 (file)
@@ -592,6 +592,7 @@ static int jsfd_init(void)
                        put_disk(disk);
                        goto out;
                }
+               blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
                jsfd_disk[i] = disk;
        }