From patchwork Wed May 9 13:55:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10389619 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B308260318 for ; Wed, 9 May 2018 13:56:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4AEE28FB3 for ; Wed, 9 May 2018 13:56:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9980528FBC; Wed, 9 May 2018 13:56:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21D3A28FB3 for ; Wed, 9 May 2018 13:56:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934955AbeEIN4I (ORCPT ); Wed, 9 May 2018 09:56:08 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58916 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934889AbeEIN4G (ORCPT ); Wed, 9 May 2018 09:56:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PCtodYrO1QsmE/qCdsO77WvoQtYxNDosv2hmD3hz00Y=; b=iBSdsNhRwHzUy4ZrtB31H6Dbb Clkjtd8V8pZV7G0zyUjvul9ujySYI+8bqRBXNuX+AZn6ZeBQLVtHswvUohD0m25rflJS5gVTBVLO8 eqhoz1yLmJZFM1+Ke4JyqciXH0nXIZLxPh+12wcurQDMuPgCDdpNwBfDUe9ZNUEQGh4UzlQ6ZS0Ln R65FdA2Y3mz9GXMN7amB0Ic5sLqlS3wZivA+59N7mKwaS7iqkD03/AP5qqp/ieyfB8drNrzejfmBd oIqhE/ZCbj0RZutQTgy4r8jyGBrXeChzoIWxp/D+gQ0Cy1uL41+AeaT8mBlJVjCpnHtzPPPLpYdC/ IA2P0E4bg==; 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 1fGPZe-0001tW-1Z for linux-mmc@vger.kernel.org; Wed, 09 May 2018 13:56:06 +0000 From: Christoph Hellwig To: linux-mmc@vger.kernel.org Subject: [PATCH 7/7] mmc: stop using block layer bounce buffers Date: Wed, 9 May 2018 15:55:25 +0200 Message-Id: <20180509135525.19885-8-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509135525.19885-1-hch@lst.de> References: <20180509135525.19885-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If a driver uses the dma API (as indicated by a device with a dma mask) we can rely on the dma mapping API to do any required bounce buffering, and all drivers using bounce buffering or pio now either use the proper highmem-aware accessors or depend on !HIGHMEM. Signed-off-by: Christoph Hellwig --- drivers/mmc/core/queue.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index 56e9a803db21..a18541930c01 100644 --- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -351,17 +351,12 @@ static const struct blk_mq_ops mmc_mq_ops = { static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card) { struct mmc_host *host = card->host; - u64 limit = BLK_BOUNCE_HIGH; - - if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask) - limit = (u64)dma_max_pfn(mmc_dev(host)) << PAGE_SHIFT; blk_queue_flag_set(QUEUE_FLAG_NONROT, mq->queue); blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, mq->queue); if (mmc_can_erase(card)) mmc_queue_setup_discard(mq->queue, card); - blk_queue_bounce_limit(mq->queue, limit); blk_queue_max_hw_sectors(mq->queue, min(host->max_blk_count, host->max_req_size / 512)); blk_queue_max_segments(mq->queue, host->max_segs);