Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3605171ybh; Tue, 17 Mar 2020 03:15:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsPSRGiyzy0JwzcCQAN/O16TsxAa1NyLcbD7vv3o9GHqYHbWnvKqxkCE0PrjFPEHRwRaiCU X-Received: by 2002:aca:4106:: with SMTP id o6mr2869634oia.173.1584440156110; Tue, 17 Mar 2020 03:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584440156; cv=none; d=google.com; s=arc-20160816; b=l57bLRFHe90faWU0trpdCEzNUogaJekLoe0PzP8t7McqHIXZbOSYnplAl1vPvFy2z4 KQ6fpU+wHlJgMVL1qF+Ioelbq6bcASDtL2UhZlmGIp22TtikE4/cbYYVCQSG9lreWJtw /fcr902i9BQlfNmJ5q2ghtxA7YNIcje24ViHhV35NcURG+g3QmwZT/nZy/dfxiqp4/FF eGXvmJHjAu2ge6CMkwiC5im66sEeJqEG3fb35wogp7LuQXj65E6aZYtWGVynQTkPNPxc pcILIzGJS/uVKQGHnfHjuKlpGGgiaUHV45XX/AqnwMr34TQA6TSoPaBTDqwYfueKYKGD Y19w== 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=3msrbtEKUz5qDONy4j/OIQtRcSS3HiRJjn2E802O6AI=; b=dU0Je6+NRPdAEHOxLY/1qx41W9AptxguKFpK71+CcpIBd3n87SjUoe4U7HnWw/KbmX xfEeweRyak/l4edv0mcgljzCMEIBi55pz+YksQTVZXeb9bD9QX81MRG3wy9uGPoCcHKq C8S/0MqLBPuYpS6JEqcJHHoUCt4aHyivUt4a8EqJnVdF9OhIvkq3+2DCtgemOKE6czPQ 9WjW3Vn3qBcNAnTzi8eliUVMr1/Uq2CWj+mU59qrm2t4X8gGH81IaDdvjlphM3Ue3HvR DFJCSPJIIMRfh59ZOS8+itmEvlV/+iBAjVgNQELHQ22JFDU/KH/RSoYcMpxdrmKG0FGK 0Wsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q+amxQSV; 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 u199si1478239oif.110.2020.03.17.03.15.43; Tue, 17 Mar 2020 03:15:56 -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=Q+amxQSV; 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 S1726130AbgCQKOY (ORCPT + 99 others); Tue, 17 Mar 2020 06:14:24 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:51658 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbgCQKOX (ORCPT ); Tue, 17 Mar 2020 06:14:23 -0400 Received: by mail-pj1-f65.google.com with SMTP id hg10so5980717pjb.1; Tue, 17 Mar 2020 03:14:21 -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=3msrbtEKUz5qDONy4j/OIQtRcSS3HiRJjn2E802O6AI=; b=Q+amxQSVMSwiBr3htoM0Dybfb0UKgyhg2+8RhrMrzU0GzDG9+rHbyWRGE3aWRnHxEU jboJHnq6P5KXzldJJwlcdFHryse3ryJltm7+YFiMaYTz//KO6aVBI5tD4ehQa4UGw0py ZZB15WJ4STSa8VBFDuLw3u7+9oLoJY/9yL1B65R/nExiTZOLqFErwka8yKDxlxUpaEAm xu5ZF4x80T6j/yO6SXhifmjStjR0tDRGI2fSZ7tU+kY0/g5M9eWq2QhT8Km2kCZNCGjc Juysk+Nr5F3sMr7KwmcoXL+yLGyAMmbuC03HVcBElPkf5+oDABKLy3AuiOEBnVDuOlPD NSnw== 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=3msrbtEKUz5qDONy4j/OIQtRcSS3HiRJjn2E802O6AI=; b=BMi3BvYmsO91PxIfvBQqBtT6NsEJbvbX6J9O4UWEJGoxWKlvEZgvq58EKyea1cda/m wZaIcftDO7tvtDQMebR2DOQCgtoFCi1GgSGfaikjx9/EQywQYNq1J4U+8lHfB4RfWuhT XdvxoOmnATUoqqyy95TgGptBbBg29jwZO4aWmcuKiFkvoOyausijJ1mhaACHqQ5sm/YE wn4dkmkuwCsqcDoO1lRvoeb8MkpfSVUY2pwNFc5fN0iH4KRNo9GqlMmJR5zFdvu7mnE+ qkZsXOacYiH9iAbksI/YcJ9GGkzLOR5WOHiaNBbGOK2omxleUWzg7Uu+tQaKz/JuBF4F Uedw== X-Gm-Message-State: ANhLgQ39CIVflrLmUxNzGWavRo1xGJw20puCGJfalEWS/ekDyu+hJea8 3u/iDONTHpOmmWrdbJO/2ko= X-Received: by 2002:a17:902:8d93:: with SMTP id v19mr3650093plo.327.1584440061168; Tue, 17 Mar 2020 03:14:21 -0700 (PDT) Received: from sh03840pcu.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id s25sm2195487pgv.70.2020.03.17.03.14.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Mar 2020 03:14:20 -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 v2 0/3] Introduce the request_atomic() for the host Date: Tue, 17 Mar 2020 18:14:08 +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. Note: Adrian pointed out that it is not good if moving the polling of inhibit bits in sdhci_send_command() into the interrupt context, but now I have not found a better way to address Adrian's concern. Moveover this is an unusual abnormal case and the original code has the same problem, so I plan to create another patch set to talk about and fix this issue. 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 | 5 ++++- drivers/mmc/host/sdhci-sprd.c | 23 ++++++++++++++++++++--- drivers/mmc/host/sdhci.c | 27 +++++++++++++++++++-------- drivers/mmc/host/sdhci.h | 1 + include/linux/mmc/host.h | 3 +++ 5 files changed, 47 insertions(+), 12 deletions(-) -- 1.9.1