Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp959589img; Mon, 18 Mar 2019 19:23:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXiLHie5vgMdCQZsl92+FQm6v2RB0L1t4IqNrnGIJCFNU8s10ueAuGyZBs/ICGcQOEqs6u X-Received: by 2002:aa7:90c1:: with SMTP id k1mr1677pfk.202.1552962180329; Mon, 18 Mar 2019 19:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552962180; cv=none; d=google.com; s=arc-20160816; b=M5Z1gnHYkWjPBKVK3aKcR8XWDc7/AG6XxyVVH8M58tmz+cRfw1n3IcypdV199ytwP9 5ap7n/eZyjLMrGDrSbx8QmKwfobR/+I96fev9/66l1n6eCPk2c6GMUuljkRWpt7H3jb6 pTRFM9gH0fCmzmwoFyoea4jCSZvA7GAwCLWtt612z/wazf3TNMPZylVyUyjVKkARmtez zyNHOxcmDbS23ACfYpq1dOIDaLBijwfWdXRC6Aug7H+nTPhrK5DBlNzrWT0Pu0TaSVTc qKcnIU6pbsp/A0kzNvxT9X5L+5pH+HaJzJ6bvPxn1gyopA/EHqf6S+HIXDvsAfRhWEi+ mx/g== 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=2wST5X8sn+l1CUbzPlEtKDryJVlrD+4XHz828Tny/hc=; b=rzNzg/HOQ+HP25CuRS7yLQcZ8G3S3MH6zLUhwXUdNiW/VvTTcOHs/Fi7PgfwJc2kQt dbnNIpPt0LCKmYdlJgVX0MDxMWdO4nHsR0CMt7CsOwsQSSzltFllFy2uz/nnVS72Xa5G 6qkL/rZckO+JBDb4NgenPlQVp7TBbB8XROpLh1u8KUMdT6K/Zer7lw7fKWd7QnsI4zqu YbWnV/ysfzs1EvnhWqkOW13UOU5mqgIMu9Myirv5Jeg3fbh3Eanix76fSvB10jmI3Nqx 3K2NlkoppRG93STIiAExwcnjCbnukJAZdk2xB+eHEFz7FlHU7XSgxpFFEMFOz7zl36hY DwIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K8yLW0HT; 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 i29si10617073pgi.95.2019.03.18.19.22.45; Mon, 18 Mar 2019 19:23:00 -0700 (PDT) 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=K8yLW0HT; 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 S1727791AbfCSCVT (ORCPT + 99 others); Mon, 18 Mar 2019 22:21:19 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:50545 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727631AbfCSCUj (ORCPT ); Mon, 18 Mar 2019 22:20:39 -0400 Received: by mail-it1-f194.google.com with SMTP id m137so8135193ita.0 for ; Mon, 18 Mar 2019 19:20:38 -0700 (PDT) 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=2wST5X8sn+l1CUbzPlEtKDryJVlrD+4XHz828Tny/hc=; b=K8yLW0HTBvS1VM9VK/1GVZ/hdoijHYAZJ1jHeO/YH6cko0CdI6ujeJIywLXwZ2G6UN dqM7MLvWONzoykipbwN5iGNfCjMv3GMlZtJkH7cJv0kcMBcAGI9KDAeBYH7c0PRvpmYr hpoJk+cuovulTZdu5rkqt/TdFoRB7Ddjc2d55cUnZ3upOynyU2x5QBLdbmmcE0hqeY+w vDdbvPdDKgQzBlb9b7amU7rUgMmlUz2JbXu8Y5kJ+2Q7LuvzfldqB1mt79UxRDp8067v xgtb20IWPMjTh3QuM2cQH101HyL6ZssZyab6Z6A8BMufL+lq0wra80njILp7QbjFaDt9 qgxA== 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=2wST5X8sn+l1CUbzPlEtKDryJVlrD+4XHz828Tny/hc=; b=RFM+UgM3OWDFFKMEna5iSLmR9fl2cvhNlGXQSHqjshe0qJomHvM8aBrPzxNMyVqOAr BeTWJh1uIybi50MVBIYad5HPUSz13/W8qM7E6VHuCPWNSFBZTHG7JjKJUZ9ovx1Ev3B6 cNa1a4K9FuU8/NFcTxSww8VwBm5IlV/lNvnznQhIuVuY9l5/lFONAuzkBfNPKU7n+MNr B3rX/e8de3PHbjwWxGAyLayCWXduX2lNlK3tXh6IJIBs5v1fJX09FOM+nmauKvRGjl++ ue8ARu2JNWldXWpET5lfUwhfICA77L2HuB9BaUGeRtM7L9tuM3hKpP0/gFU+WDpn+jua hEvQ== X-Gm-Message-State: APjAAAWrtGotRd5VDlC4mjCzQHDJlM2CiPlYPdMMX8Np38Bz03rlXAJA nn0tcy1oVSAoFeme2TJQG4I= X-Received: by 2002:a24:6752:: with SMTP id u79mr39139itc.65.1552962038502; Mon, 18 Mar 2019 19:20:38 -0700 (PDT) Received: from localhost.localdomain (c-73-242-244-99.hsd1.nm.comcast.net. [73.242.244.99]) by smtp.gmail.com with ESMTPSA id l8sm673838itl.26.2019.03.18.19.20.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 19:20:38 -0700 (PDT) From: George Hilliard To: Greg Kroah-Hartman Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, George Hilliard Subject: [PATCH v2 05/11] staging: mt7621-mmc: Bill the caller for I/O time Date: Mon, 18 Mar 2019 20:20:06 -0600 Message-Id: <20190319022012.11051-6-thirtythreeforty@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190319022012.11051-1-thirtythreeforty@gmail.com> References: <20190319022012.11051-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 4380b321bc73..89fbc0a1dec7 100644 --- a/drivers/staging/mt7621-mmc/sd.c +++ b/drivers/staging/mt7621-mmc/sd.c @@ -493,7 +493,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); @@ -696,7 +696,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.21.0