Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp176527ybb; Fri, 3 Apr 2020 00:06:16 -0700 (PDT) X-Google-Smtp-Source: APiQypL8SJvwg6ARs7iIsx2DEENYRmJ6HGXp/+WpCouDuk3OQW4/0pSWeIUpG1z5+HtW0onnHrzc X-Received: by 2002:a4a:d258:: with SMTP id e24mr5644655oos.93.1585897576093; Fri, 03 Apr 2020 00:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585897576; cv=none; d=google.com; s=arc-20160816; b=C6CV0dwSw1NDOPxU4XB/AuRMo6oiqkzV/sGIsXbCa2VKOQbCNOjLhqdimJ6IkrYo4h febo+kCisP0wMBJsNyvsTxiLJbYe4kklYH/LMY6624MHsw5GUksfpS6jL1unqSQoejQy j5tSUTcAetgoDs1bl+dVpipSETUU94d1ozXWt8K35iSkwEMxVqri/QbDaC8mNvvH9KNj xpHuPINJWT00xZ4MiZGTpHwtbcNT4gyTITAYgHVXxncYGv3A926eLSFDyVVf0V2FQhw/ C3E6M9H1ZQ/AKta9GFycXiPNwPkJ8tmgU+8rCrn8sDEVWcWicYb/j8qWbv+4i4XGdfbA Ow7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=f1ljEZxkc/cLkZYV4QENVzqOYupDNQ/8GxzhBvvZzdk=; b=Zb9AjkBFw5QQT7feJ8mcRPWRhsFfIaSOMcNK4DmAtTajcsUGN0StGn5BNiRcV5SJZU rFOMpGaBI7XDwta07IjWMT7FCz3kn/WBmifypwB+fzdJXdF8hNxnkoXZM9iAWFVf6xs0 RH7cVUmrA4IxIUivadYs0HeBMQXSW67AlX4uLlLUl7VdM2JGYvtZdcr6C/GpvnLilrxG hDm8RCkqKZ7ur4gcud98bMaU+xRM1qGVc1X6UgyBwIV2omkdbqYBcWpuXgUVxOBuVI8g i8ki0ze/JNiFPEETICzcF5J61XWkMlwsBJlZhouJhG8VMjB2gdiFNZavmAvFC3f/NhiA 6cUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="fNk/VOOM"; 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 l15si3323731otl.297.2020.04.03.00.06.02; Fri, 03 Apr 2020 00:06:16 -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="fNk/VOOM"; 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 S2388932AbgDCHFn (ORCPT + 99 others); Fri, 3 Apr 2020 03:05:43 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40138 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388472AbgDCHFm (ORCPT ); Fri, 3 Apr 2020 03:05:42 -0400 Received: by mail-pl1-f193.google.com with SMTP id h11so2357197plk.7; Fri, 03 Apr 2020 00:05:42 -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; bh=f1ljEZxkc/cLkZYV4QENVzqOYupDNQ/8GxzhBvvZzdk=; b=fNk/VOOMa14KjRsQbqIlEj7vnuOZORkMnFPW7wQcbRWaqoMMyd+t+Rikwdft7IoxaH /oO3/AlY5u0XrGrLaUtMEUvxvub5aEmsb5ocOG887r07db395e6GMwkUhga2wW7wbsUl DsCHzQJNIjtTFkUicTfJ4qWo1fn4LFriKW3Yueei1muOG7Dx2ltyK5pwZaUIAS/qr1bB SPeCO4QVysjfJZDgNdOOlgME/XIyuU8YTXp2mE66gQNxYZ/t904V9OI1oWLjro2U/kKh Du0DKSnyWj0W3tD+NvW6IsMLADbVvX21SSoMvQ2K2axMMhYyDtI2mdFyLYxzFU2N8vHG CFNA== 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; bh=f1ljEZxkc/cLkZYV4QENVzqOYupDNQ/8GxzhBvvZzdk=; b=RK7cpPt0QaZOCgLkUWELA3KWhl17TuYoWO4aXsx2hqF9sEReeEVjD0DgWCphmzwt2J RiR9DsrPY69JwfSzthpenYp5Rp9R4a4JggSFWmH19Mowee6hP9TiemzTfWShj1KWPTgY Z5P2qEL18ZVEf77JKg+eoZKXfa41+OOfrZxd6Vc4z52LutOo2l7yvat9WEYatpxKKCek 2RlgLpSGg5FHvg9xwrGwQTvdSO8Raw/04rtu1iws5X0dfm661Z72qCwirhxLucbpDM8W qlU7BWivYBSNwThclr+lk/TU2W1tcssGztVnaIg3UVO47RfawEoL+YXP6Qvpe6VOVpCV DYqg== X-Gm-Message-State: AGi0PubX+KpEgWqwBB+MhX9XP/u/CjifxoPHHuDiq86iwHVhEr9kwNsP +5iE1ilRMIFt2ul5FtobtNQ= X-Received: by 2002:a17:90a:1acf:: with SMTP id p73mr7996756pjp.53.1585897541601; Fri, 03 Apr 2020 00:05:41 -0700 (PDT) Received: from sh03840pcu.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id u18sm5138701pfl.40.2020.04.03.00.05.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Apr 2020 00:05:40 -0700 (PDT) From: Baolin Wang To: adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com, baolin.wang7@gmail.com, arnd@arndb.de, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/3] Introduce the request_atomic() for the host Date: Fri, 3 Apr 2020 15:05:25 +0800 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set introduces a new request_atomic() interface for the MMC host controller, which is used to submit a request to host in the atomic context, such as in the irq hard handler, to reduce the request latency. Any comments are welcome. Thanks. Changes from v3: - Move patch 3 of V3 patch set into patch 1. - Add a warning for unexpected return value of request_atomic(). - Remove redundant checking of ops->request(). Changes from v2: - Return busy flag if encountering unusual card busy state instead of polling in interrupt context. - Add a work for HSQ to try again in non-atomic context if the host returns busy flag. Changes from v1: - Re-split the changes to make them more clear suggested by Ulf. - Factor out the auto CMD23 checking into a separate function. Baolin Wang (3): mmc: host: Introduce the request_atomic() for the host mmc: host: sdhci: Implement the request_atomic() API mmc: host: sdhci-sprd: Implement the request_atomic() API drivers/mmc/host/mmc_hsq.c | 29 ++++++++++++++++++- drivers/mmc/host/mmc_hsq.h | 1 + drivers/mmc/host/sdhci-sprd.c | 23 +++++++++++++-- drivers/mmc/host/sdhci.c | 65 ++++++++++++++++++++++++++++++++----------- drivers/mmc/host/sdhci.h | 4 ++- include/linux/mmc/host.h | 3 ++ 6 files changed, 103 insertions(+), 22 deletions(-) -- 1.9.1