Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp182838imp; Tue, 19 Feb 2019 21:19:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IabSnKRoWAG0tiiKeKmd0pBB4W28oG3h8TLdL2EQAPIdBwbRHzVtLIQ+LRRoGcN0E4SSbgX X-Received: by 2002:a17:902:7d89:: with SMTP id a9mr18573096plm.33.1550639977684; Tue, 19 Feb 2019 21:19:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550639977; cv=none; d=google.com; s=arc-20160816; b=A2oy8SeTWhbkSX1ZlTB1sY/nRmtIy24M2phLmwERqi75zaEHMAtmBLWrsWSN6ZkWq0 kU422CRNpegoERC0b9wp1m7kfwyPOolwF7UhlCJS5k6puwZcRbA//6csrN7VCpJILcfU bJxp0DcDnNFH7ueT4f4e2SaLgMIZP7RxGwBAtlZa0aufbplnj5UI8Bf9YefqRcUCQ41k 4sdoBElVsMd3BLX3jfrs1HB7X3W8YitZa80Y55bGBzDrdwCdhSOxmb+WVOU3jtW9i5nu f26McOM1B2Ik90cXGVpVNHtZq3o8plTBCwQJhHk0cT9WpoHejUjcfDtwEiDOCkPbKjjg UcxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8knuUgR1kA6CdUlUKLzOMqBZzMGKE4OzQ+ZM0NplKOI=; b=VP9FCef1zSRzcOF6+puFuf1h/s07Mkn8ak1tGIkC/0T8A3Dqr4TH/bOA8LmdBugGwc JmjL8Pf+dFNATxE2S9WuKjdC3+M8UyRgAIYWN5YNsVpuaGof1Xtj4Rele1LTDFO9C0AZ gdiCmn3Ssd2Ze3ILuMBu8rD2EZwnR/XO+FXf/aPpEKuiX4sXOk0tR8l1zr8G/tiOyHe1 2R3gMf09SwaMAUvLLo5swjMiKm2im3VJi4Pm8LxHCZlK42X58MY220BUgFaMDH8zCwKN Sfki9fGAXqF5nQlsPZg5ZCrmaME/GX29kGviPaLIutbbAT0fbiMt0MX9dcKJKtk9IAj8 6PEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CGesUx1Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si19079454plf.370.2019.02.19.21.19.22; Tue, 19 Feb 2019 21:19:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CGesUx1Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729826AbfBTFSh (ORCPT + 99 others); Wed, 20 Feb 2019 00:18:37 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:38158 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbfBTFSN (ORCPT ); Wed, 20 Feb 2019 00:18:13 -0500 Received: by mail-it1-f195.google.com with SMTP id l66so12642750itg.3 for ; Tue, 19 Feb 2019 21:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8knuUgR1kA6CdUlUKLzOMqBZzMGKE4OzQ+ZM0NplKOI=; b=CGesUx1YRJkJeJX34wnGZ9BPtpWadCV0MfeE8tkoiMaHrjzCc8cJifVa4+Y84amrCh MiC+umlaK7XEndlGVly6qP1Q4Mh6P/p7PW1Gxw1tojILgvxazaHVPZM/eDLyVaFyBObZ cSN2TVnci+A+UOkGEWxY+xf0tpX79eP16dRhHvMigjgUpNUtgnjzko6w2KxYyslOL6lr hoHr4FzvV2WFNXaXkl0vRvJGGCCcc/L+htNhHl5np3e+7YxpOdkNf8xTe/ZVSdW4K54g 7Ap6dVUpD4s5CZct6EU3y/Tzh173CfTYGpxrtJTEC7+jjgnIPpsnuEx0k2i3cmQbUvtB DLJw== 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:mime-version:content-transfer-encoding; bh=8knuUgR1kA6CdUlUKLzOMqBZzMGKE4OzQ+ZM0NplKOI=; b=gvXpzlCZ5cXOhQIiqc+OqXa2T4tFHikgWUG202mAHZy7hJOKkLpzJK11zWJKMhxPRt UsgwXTKXMm1shdzPPkophEJkV7DG5KKHGfDtsMZEijPbyWY3M1ni0KVM6YsSZaq+lgHG rbC0PlRQc92rwN0vMcoBf6d5ilFXNGFvBCfNZ/p0hLbqL+vYff2xCgaYvjiscimr9aUh c9/wiAVl7j+iwIxMy4bdnYanBAvmBo7WQjXhlt70mnM+1t+a2dkupFXNr9sNGk04r0OY JEcYBI5HL+GkCOyCncX6AvxPAWlEas1I1W3dZMGHYVVYrQxTwKPf98uchbs1nrVOQ0zj yQ6A== X-Gm-Message-State: AHQUAuY0CF7VcqNPyjpg9ZFb5yME6Vldwy+04CkmOPPnrZrqBAEw017b qyi+RM4Dbv+gj1rpV5bcUnM= X-Received: by 2002:a02:9f86:: with SMTP id a6mr17338661jam.87.1550639892549; Tue, 19 Feb 2019 21:18:12 -0800 (PST) Received: from localhost.localdomain (c-73-242-244-99.hsd1.nm.comcast.net. [73.242.244.99]) by smtp.gmail.com with ESMTPSA id k64sm2297550itb.7.2019.02.19.21.18.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 21:18:12 -0800 (PST) From: George Hilliard To: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org, Neil Brown , George Hilliard Subject: [PATCH 06/10] staging: mt7621-mmc: Bill the caller for I/O time Date: Tue, 19 Feb 2019 22:17:50 -0700 Message-Id: <20190220051754.12195-7-thirtythreeforty@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190220051754.12195-1-thirtythreeforty@gmail.com> References: <20190220051754.12195-1-thirtythreeforty@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When waiting on completions, use the _io variant so the caller is charged as using I/O. This should have no effect on the module's functionality, only improve CPU accounting. Signed-off-by: George Hilliard --- drivers/staging/mt7621-mmc/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c index 97ed7510e96d..f12f9d6611c9 100644 --- a/drivers/staging/mt7621-mmc/sd.c +++ b/drivers/staging/mt7621-mmc/sd.c @@ -494,7 +494,7 @@ static unsigned int msdc_command_resp(struct msdc_host *host, //sdr_set_bits(host->base + MSDC_INTEN, wints); spin_unlock(&host->lock); - if (!wait_for_completion_timeout(&host->cmd_done, 10 * timeout)) { + if (!wait_for_completion_io_timeout(&host->cmd_done, 10 * timeout)) { dev_err(mmc_dev(host->mmc), "%d -> XXX CMD<%d> wait_for_completion timeout ARG<0x%.8x>\n", host->id, opcode, cmd->arg); @@ -697,7 +697,7 @@ static int msdc_do_request(struct mmc_host *mmc, struct mmc_request *mrq) msdc_dma_start(host); spin_unlock(&host->lock); - if (!wait_for_completion_timeout(&host->xfer_done, DAT_TIMEOUT)) { + if (!wait_for_completion_io_timeout(&host->xfer_done, DAT_TIMEOUT)) { dev_err(mmc_dev(host->mmc), "%d -> XXX CMD<%d> wait xfer_done<%d> timeout!!\n", host->id, cmd->opcode, -- 2.20.1