Skip to content

Commit

Permalink
gdrom: support highmem
Browse files Browse the repository at this point in the history
The gdrom driver only has a single reference to the virtual address of
the bio data, and uses that only to get the physical address.  Switch
to deriving the physical address from the page directly and thus avoid
bounce buffering highmem data.

Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Apr 6, 2021
1 parent a425711 commit 1d2c820
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/cdrom/gdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@ static blk_status_t gdrom_readdisk_dma(struct request *req)
read_command->cmd[1] = 0x20;
block = blk_rq_pos(req)/GD_TO_BLK + GD_SESSION_OFFSET;
block_cnt = blk_rq_sectors(req)/GD_TO_BLK;
__raw_writel(virt_to_phys(bio_data(req->bio)), GDROM_DMA_STARTADDR_REG);
__raw_writel(page_to_phys(bio_page(req->bio)) + bio_offset(rq->bio),
GDROM_DMA_STARTADDR_REG);
__raw_writel(block_cnt * GDROM_HARD_SECTOR, GDROM_DMA_LENGTH_REG);
__raw_writel(1, GDROM_DMA_DIRECTION_REG);
__raw_writel(1, GDROM_DMA_ENABLE_REG);
Expand Down Expand Up @@ -789,8 +790,6 @@ static int probe_gdrom(struct platform_device *devptr)
goto probe_fail_requestq;
}

blk_queue_bounce_limit(gd.gdrom_rq, BLK_BOUNCE_HIGH);

err = probe_gdrom_setupqueue();
if (err)
goto probe_fail_toc;
Expand Down

0 comments on commit 1d2c820

Please sign in to comment.