From patchwork Fri Nov 10 10:01:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 118522 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp7722669qgn; Fri, 10 Nov 2017 02:02:12 -0800 (PST) X-Google-Smtp-Source: ABhQp+Qo2U43ivK5C758EFYaCA5YE9rOyVE4UgEdpYMseoORHq1iyciacoa9Lv26SYmzP9Iv0dl9 X-Received: by 10.84.191.228 with SMTP id a91mr3713645pld.176.1510308132658; Fri, 10 Nov 2017 02:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510308132; cv=none; d=google.com; s=arc-20160816; b=NDJfwY2ACSpOoJLWjaR0Dr4WI1yAngmZwCWpFA/Tvw1MQwLraHMGcKul7kfeaLto4J hDWk9xuYTQbinAlRIUhcjNY7MwaZhljGKrDHHkIb4gC7WaSK7fvUoq4YJuLwnZcfgsGa P6TSi4XzGAN3JTqLHbmrCJFW35Ey8IiUa0Yyya+gIJhFuJbIlhZX+20+HCTzvzQZWiX8 Zbb5kAL5fHI47668dt2YIYqIC/D00RF64ns9o764adD04PGMrIFozNLRqIvLcAr/4sHf SopsbH3HOkNIrGw5pMEDVOLTwqjyYgkD9qPXpx1zhNVv88Jmk8nmK8ySI6WycyCIU0p/ Rk/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=QRe02e2LI2/klTwR3LZPpyb88qDaFsIq+jz/mRRWGCc=; b=IgiwzIoyvNsizdlKKKE2L9mBnYLWh4ZU4dWF0SYXDKIPbuenv86pM6sqQ6j3O4cnwv fHBsGeNdJDXm4ZLViP/bEI1t70bel9U7gbztgiTRXORyAINvdar3x8hsQQcPzN4M3nNw QimTnvo/usiUksluunGQyHdB5fSzpl4sw7gJP+fLyfyexwlbqRjqjevPqaRNfvxze6vD jzDFlG+cyE1BYnLaAz2V0DToRnKw44jZjqeGE/RKwxm4570zjohwOTX7IlYnyPiodN9F GqwgRm9TEC4ea3PqE5V0Rbla0grJWP6TqRCuym1tVnn9Jst8en5Pe+T2JE2DQh24FiEQ ojuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gvMkzCTi; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si8801659plh.282.2017.11.10.02.02.12; Fri, 10 Nov 2017 02:02:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gvMkzCTi; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbdKJKCG (ORCPT + 6 others); Fri, 10 Nov 2017 05:02:06 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:53735 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbdKJKCE (ORCPT ); Fri, 10 Nov 2017 05:02:04 -0500 Received: by mail-lf0-f67.google.com with SMTP id l23so10430898lfk.10 for ; Fri, 10 Nov 2017 02:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PxZe9njkvceHICtXr/+7BvTjpqT8rTRXfESKme6cjUU=; b=gvMkzCTiqKj1ZUig+bm14M11ayUYdphoTi8WLVtF2DX4uz5IvMaN+SCRbCDfh3vet+ QKHcF1W+En6vieZAyrOJrY+J44RUrGHyX2oRwkyzCKmFQEeayogT93jiuHXqcDdNeX/B 1PILhIQ8JB9z239OVrz7qYCuhgNdjrq8t+Hdo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PxZe9njkvceHICtXr/+7BvTjpqT8rTRXfESKme6cjUU=; b=owNUXWAQPnBfGc9SmSyUO7RkL3AOyHF6/Par21D2qOW93aGKOx15gWsTcuwEk1kLIr AZgIIv0jbaGBB3bs1ZnENz65leuXAwBIu8/V1uf2eq5qqRmztQgnYNcj0zSktnKuOXzk gU6FJI8aZ7UrH2JUfdyYBMvk0MQX96AH1JkP96REVfZuj+ltV/5wXMHFa5fTuolCuoTm sjFWZTQnDnBCx8x9O0sXMyIOHoRJ9dyky6c2QQFhfeSNXQ3il3DwTjd0t+b7wWk69waR RnwovbbfiJkJyxUrtloZO57Tdo72EfDAJMTt91Y62gMAFJlAl5v2iFAM/WJKVetFfEYI SQAQ== X-Gm-Message-State: AJaThX7rAr2ZQGAZL4SAuzxg+AHbn+Vi36mfLLJWWRNSouitsc3B+lVC lDOT7fDmHGDOBqbQdUtZGG1KOQgWoPg= X-Received: by 10.46.46.12 with SMTP id u12mr1456966lju.65.1510308122383; Fri, 10 Nov 2017 02:02:02 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id n36sm310843lfi.78.2017.11.10.02.02.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Nov 2017 02:02:01 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: linux-block@vger.kernel.org, Jens Axboe , Christoph Hellwig , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Paolo Valente , Avri Altman , Adrian Hunter , Linus Walleij Subject: [PATCH 06/12 v5] mmc: core: kill off the context info Date: Fri, 10 Nov 2017 11:01:37 +0100 Message-Id: <20171110100143.12256-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171110100143.12256-1-linus.walleij@linaro.org> References: <20171110100143.12256-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The last member of the context info: is_waiting_last_req is just assigned values, never checked. Delete that and the whole context info as a result. Signed-off-by: Linus Walleij --- ChangeLog v1->v5: - Rebasing on the "next" branch in the MMC tree. --- drivers/mmc/core/block.c | 2 -- drivers/mmc/core/bus.c | 1 - drivers/mmc/core/core.c | 13 ------------- drivers/mmc/core/core.h | 2 -- drivers/mmc/core/queue.c | 9 +-------- include/linux/mmc/host.h | 9 --------- 6 files changed, 1 insertion(+), 35 deletions(-) -- 2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 5c84175e49be..86ec87c17e71 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2065,13 +2065,11 @@ void mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) default: /* Normal request, just issue it */ mmc_blk_issue_rw_rq(mq, req); - card->host->context_info.is_waiting_last_req = false; break; } } else { /* No request, flushing the pipeline with NULL */ mmc_blk_issue_rw_rq(mq, NULL); - card->host->context_info.is_waiting_last_req = false; } out: diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index a4b49e25fe96..45904a7e87be 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -348,7 +348,6 @@ int mmc_add_card(struct mmc_card *card) #ifdef CONFIG_DEBUG_FS mmc_add_card_debugfs(card); #endif - mmc_init_context_info(card->host); card->dev.of_node = mmc_of_find_child_device(card->host, 0); diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index b1a5059f6cd1..fa86f9a15d29 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2997,19 +2997,6 @@ void mmc_unregister_pm_notifier(struct mmc_host *host) } #endif -/** - * mmc_init_context_info() - init synchronization context - * @host: mmc host - * - * Init struct context_info needed to implement asynchronous - * request mechanism, used by mmc core, host driver and mmc requests - * supplier. - */ -void mmc_init_context_info(struct mmc_host *host) -{ - host->context_info.is_waiting_last_req = false; -} - static int __init mmc_init(void) { int ret; diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index e493d9d73fe2..88b852ac8f74 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -92,8 +92,6 @@ void mmc_remove_host_debugfs(struct mmc_host *host); void mmc_add_card_debugfs(struct mmc_card *card); void mmc_remove_card_debugfs(struct mmc_card *card); -void mmc_init_context_info(struct mmc_host *host); - int mmc_execute_tuning(struct mmc_card *card); int mmc_hs200_to_hs400(struct mmc_card *card); int mmc_hs400_to_hs200(struct mmc_card *card); diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index 4a0752ef6154..2c232ba4e594 100644 --- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -42,7 +42,6 @@ static int mmc_queue_thread(void *d) { struct mmc_queue *mq = d; struct request_queue *q = mq->queue; - struct mmc_context_info *cntx = &mq->card->host->context_info; current->flags |= PF_MEMALLOC; @@ -54,15 +53,12 @@ static int mmc_queue_thread(void *d) set_current_state(TASK_INTERRUPTIBLE); req = blk_fetch_request(q); mq->asleep = false; - cntx->is_waiting_last_req = false; if (!req) { /* * Dispatch queue is empty so set flags for * mmc_request_fn() to wake us up. */ - if (mq->qcnt) - cntx->is_waiting_last_req = true; - else + if (!mq->qcnt) mq->asleep = true; } spin_unlock_irq(q->queue_lock); @@ -96,7 +92,6 @@ static void mmc_request_fn(struct request_queue *q) { struct mmc_queue *mq = q->queuedata; struct request *req; - struct mmc_context_info *cntx; if (!mq) { while ((req = blk_fetch_request(q)) != NULL) { @@ -106,8 +101,6 @@ static void mmc_request_fn(struct request_queue *q) return; } - cntx = &mq->card->host->context_info; - if (mq->asleep) wake_up_process(mq->thread); } diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 36af19990683..4b210e9283f6 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -239,14 +239,6 @@ struct mmc_slot { void *handler_priv; }; -/** - * mmc_context_info - synchronization details for mmc context - * @is_waiting_last_req mmc context waiting for single running request - */ -struct mmc_context_info { - bool is_waiting_last_req; -}; - struct regulator; struct mmc_pwrseq; @@ -423,7 +415,6 @@ struct mmc_host { struct dentry *debugfs_root; struct mmc_async_req *areq; /* active async req */ - struct mmc_context_info context_info; /* async synchronization info */ /* finalization workqueue, handles finalizing requests */ struct workqueue_struct *req_done_wq;