From patchwork Wed May 9 13:59:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 910883 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IQNsSMhQ"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40gylN5lC1z9s0W for ; Thu, 10 May 2018 00:04:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=M1l3UNcbv4DDCBmCGqwbf2LHuCVXtQOHe67RsbnjfsE=; b=IQNsSMhQ59EYrumwc8twONuzJw yM1Ml9zYhe34o0vdpakOIFe37pYY0Qn2WMhJwPfQB6s4+3ZO2BWEb8xjY6pcANZm+p4BI17LImTZJ Wz5fFcVXHbImOgK3KTsfQqznj9Gebf9A+wA8df4zEv1V3TUMLKcCSIg9gF6qXW3T96TbxjAQTPiJe U/qdgVukDu43G6i+LVaw1ybmjzs0oihEIUwm+NLUJA0x1PsUsrOD81oqmVG52F8HcOcbF1320w8Cm rz/7/cz+PFiye53wH3UBPEdJ3lF8BUeItyp/PqrcSr2QJ7IIEr6w8EhdicFVaW3y0lSDdw8R7L3Z9 gJWjWWqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGPhR-00068G-IE; Wed, 09 May 2018 14:04:09 +0000 Received: from 213-225-15-246.nat.highway.a1.net ([213.225.15.246] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGPdg-0003OB-IL; Wed, 09 May 2018 14:00:17 +0000 From: Christoph Hellwig To: Jens Axboe Subject: [PATCH 6/7] jsflash: handle highmem pages Date: Wed, 9 May 2018 15:59:47 +0200 Message-Id: <20180509135948.20329-7-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509135948.20329-1-hch@lst.de> References: <20180509135948.20329-1-hch@lst.de> X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Levitsky , Geoff Levand , "Ed L. Cashin" , linux-block@vger.kernel.org, linux-mtd@lists.infradead.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Just kmap the bio single page payload before processing it. (and yes, now highmem on sparc32 anyway, but kmap_(un)map atomic are nops, so this gives the right example) Signed-off-by: Christoph Hellwig --- drivers/sbus/char/jsflash.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index 14f377ac1280..8520587b8d09 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c @@ -215,6 +215,7 @@ static void jsfd_request(void) unsigned long offset = blk_rq_pos(req) << 9; size_t len = blk_rq_cur_bytes(req); blk_status_t err = BLK_STS_IOERR; + void *p; if ((offset + len) > jdp->dsize) goto end; @@ -229,7 +230,9 @@ static void jsfd_request(void) goto end; } - jsfd_read(bio_data(req->bio), jdp->dbase + offset, len); + p = kmap_atomic(bio_page(bio)) + bio_offset(bio); + jsfd_read(p, jdp->dbase + offset, len); + kunmap_atomic(p); err = BLK_STS_OK; end: if (!__blk_end_request_cur(req, err)) @@ -592,7 +595,6 @@ static int jsfd_init(void) put_disk(disk); goto out; } - blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH); jsfd_disk[i] = disk; }