[PATCH] block: Fix secure erase

2016-08-15 Thread Adrian Hunter
Commit 288dab8a35a0 ("block: add a separate operation type for secure erase") split REQ_OP_SECURE_ERASE from REQ_OP_DISCARD without considering all the places REQ_OP_DISCARD was being used to mean either. Fix those. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> Fix

[PATCH V2] block: Fix secure erase

2016-08-16 Thread Adrian Hunter
Commit 288dab8a35a0 ("block: add a separate operation type for secure erase") split REQ_OP_SECURE_ERASE from REQ_OP_DISCARD without considering all the places REQ_OP_DISCARD was being used to mean either. Fix those. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> Fix

Re: [PATCH] block: Fix secure erase

2016-08-16 Thread Adrian Hunter
On 15/08/16 21:14, Christoph Hellwig wrote: > On Mon, Aug 15, 2016 at 11:43:12AM -0500, Shaun Tancheff wrote: >> Hmm ... Since REQ_SECURE implied REQ_DISCARD doesn't this >> mean that we should include REQ_OP_SECURE_ERASE checking >> wherever REQ_OP_DISCARD is being checked now in

Re: [PATCH 06/16] mmc: core: replace waitqueue with worker

2017-02-22 Thread Adrian Hunter
On 09/02/17 17:33, Linus Walleij wrote: > The waitqueue in the host context is there to signal back from > mmc_request_done() through mmc_wait_data_done() that the hardware > is done with a command, and when the wait is over, the core > will typically submit the next asynchronous request that is

Re: Some throughput tests with MQ and BFQ on MMC/SD

2017-02-20 Thread Adrian Hunter
On 20/02/17 13:04, Ziji Hu wrote: > Hi Adrian, > > On 2017/2/20 16:03, Adrian Hunter wrote: >> On 17/02/17 15:22, Linus Walleij wrote: >>> On Fri, Feb 17, 2017 at 12:53 PM, Ziji Hu <huz...@marvell.com> wrote: > >>> Ulf describes it: we want to switch

Re: Some throughput tests with MQ and BFQ on MMC/SD

2017-02-20 Thread Adrian Hunter
On 20/02/17 15:46, Linus Walleij wrote: > On Mon, Feb 20, 2017 at 9:03 AM, Adrian Hunter <adrian.hun...@intel.com> > wrote: > >> MQ is not better - it is just different. > > Well it is better in the sense that it has active maintainers and is > not scheduled >

Re: Some throughput tests with MQ and BFQ on MMC/SD

2017-02-20 Thread Adrian Hunter
On 17/02/17 15:22, Linus Walleij wrote: > On Fri, Feb 17, 2017 at 12:53 PM, Ziji Hu wrote: > >> I would like to suggest that you should try the multiple thread >> test mode of iozone, since you are testing *Multi* Queue. > > Good point. This target has only 2

Re: [PATCH v2] RFD: switch MMC/SD to use blk-mq multiqueueing

2017-01-02 Thread Adrian Hunter
On 28/12/16 10:55, Christoph Hellwig wrote: > On Tue, Dec 27, 2016 at 01:21:28PM +0100, Linus Walleij wrote: >>> Could you please confirm on this- does even the HW/SW CMDQ in emmc would use >>> only 1 hardware queue with (say ~31) as queue depth, of that HW queue? Is >>> this understanding

Re: [PATCH 4/4] mtd: nand: nandsim: convert to memalloc_noreclaim_*()

2017-04-06 Thread Adrian Hunter
On 05/04/17 14:39, Vlastimil Babka wrote: > On 04/05/2017 01:36 PM, Richard Weinberger wrote: >> Michal, >> >> Am 05.04.2017 um 13:31 schrieb Michal Hocko: >>> On Wed 05-04-17 09:47:00, Vlastimil Babka wrote: Nandsim has own functions set_memalloc() and clear_memalloc() for robust

Re: [PATCH RFC 22/39] mmc: block: Prepare CQE data

2017-03-10 Thread Adrian Hunter
On 10/03/17 00:39, Linus Walleij wrote: > On Fri, Mar 3, 2017 at 1:22 PM, Adrian Hunter <adrian.hun...@intel.com> wrote: >> On 15/02/17 15:49, Linus Walleij wrote: >>> On Fri, Feb 10, 2017 at 1:55 PM, Adrian Hunter <adrian.hun...@intel.com> >>> wr

Re: [PATCH 06/16] mmc: core: replace waitqueue with worker

2017-03-14 Thread Adrian Hunter
On 13/03/17 16:19, Jens Axboe wrote: > On 03/13/2017 03:25 AM, Adrian Hunter wrote: >> On 11/03/17 00:05, Jens Axboe wrote: >>> On 03/10/2017 07:21 AM, Adrian Hunter wrote: >>>>> Essentially I take out that thread and replace it with this one worker >>>

Re: [PATCH 06/16] mmc: core: replace waitqueue with worker

2017-03-13 Thread Adrian Hunter
On 11/03/17 00:05, Jens Axboe wrote: > On 03/10/2017 07:21 AM, Adrian Hunter wrote: >>> Essentially I take out that thread and replace it with this one worker >>> introduced in this very patch. I agree the driver can block in many ways >>> and that is why I need

[PATCH RFC 3/3] mmc: block: Add blk-mq support for CQE

2017-08-23 Thread Adrian Hunter
Implement blk-mq support for eMMC hosts using a Command Queue Engine (CQE). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 88 ++-- drivers/mmc/core/block.h | 2 + drivers/mmc/core/queue.c

[PATCH RFC 0/3] mmc: block: Add blk-mq support for CQE

2017-08-23 Thread Adrian Hunter
small concern is that the block layer workqueue runs with elevated priority (WQ_HIGHPRI). It is not clear to me whether that might be undesirable on the occasion mmc is polling, for example mmc_poll_for_busy() when the host implements host->ops->card_busy() Adrian Hunter (3): mmc

[PATCH RFC 1/3] mmc: core: Add parameter use_blk_mq

2017-08-23 Thread Adrian Hunter
Until mmc has blk-mq support fully implemented and tested, add a parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT is selected. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/Kconfig | 11 +++ drivers/mmc/core/core.c

[PATCH RFC 2/3] mmc: core: Introduce host claiming by context

2017-08-23 Thread Adrian Hunter
(). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 109 --- drivers/mmc/core/core.h | 8 include/linux/mmc/host.h | 7 ++- 3 files changed, 116 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/core/co

Re: [RFC PATCH 1/3] mmc: sdio: Don't use abort-able claim host method from SDIO IRQ thread

2017-05-12 Thread Adrian Hunter
On 11/05/17 15:39, Ulf Hansson wrote: > In a step to simplify the use of the lock, mmc_claim|release_host(), let's > change the SDIO IRQ thread to move away from using the abort-able claim > host method. > > In the SDIO IRQ thread case, we can instead check the numbers of SDIO IRQs > that are

Re: [RFC PATCH 3/3] mmc: core: Allow mmc block device to re-claim the host

2017-05-12 Thread Adrian Hunter
On 11/05/17 15:39, Ulf Hansson wrote: > The current mmc block device implementation is tricky when it comes to > claim and release of the host, while processing I/O requests. In principle > we need to claim the host at the first request entering the queue and then > we need to release the host, as

Re: [PATCH 2/5] mmc: core: Allocate per-request data using the block layer core

2017-05-18 Thread Adrian Hunter
On 18/05/17 11:21, Linus Walleij wrote: > On Tue, May 16, 2017 at 1:54 PM, Adrian Hunter <adrian.hun...@intel.com> > wrote: >> On 10/05/17 11:24, Linus Walleij wrote: >>> The mmc_queue_req is a per-request state container the MMC core uses >>> to carry boun

Re: [PATCH V8 12/14] mmc: block: Add CQE and blk-mq support

2017-09-21 Thread Adrian Hunter
On 21/09/17 12:59, Ulf Hansson wrote: > On 13 September 2017 at 13:40, Adrian Hunter <adrian.hun...@intel.com> wrote: >> Add CQE support to the block driver, including: >> - optionally using DCMD for flush requests >> - "manually" issuing discard r

[PATCH V9 12/15] mmc: core: Export mmc_retune_hold_now() and mmc_retune_release()

2017-09-22 Thread Adrian Hunter
Export mmc_retune_hold_now() and mmc_retune_release() so they can be used by the block driver. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/host.c | 7 +-- drivers/mmc/core/host.h | 7 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH V9 11/15] mmc: core: Export mmc_start_request()

2017-09-22 Thread Adrian Hunter
Export mmc_start_request() so that the block driver can use it. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 3 ++- drivers/mmc/core/core.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mm

[PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-09-22 Thread Adrian Hunter
paration of the next request while the current request is in progress. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 732 ++- drivers/mmc/core/block.h | 8 + drivers/mmc/core/queue.c | 427 ++

[PATCH V9 08/15] mmc: block: Factor out mmc_setup_queue()

2017-09-22 Thread Adrian Hunter
Factor out some common code that will also be used with blk-mq. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/queue.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/core/queue.c b/drive

[PATCH V9 09/15] mmc: core: Add parameter use_blk_mq

2017-09-22 Thread Adrian Hunter
Until mmc has blk-mq support fully implemented and tested, add a parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT is selected. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/Kconfig | 11 +++ drivers/mmc/core/core.c

Re: [PATCH V8 08/14] mmc: core: Add parameter use_blk_mq

2017-09-22 Thread Adrian Hunter
On 21/09/17 12:47, Ulf Hansson wrote: > On 13 September 2017 at 13:40, Adrian Hunter <adrian.hun...@intel.com> wrote: >> Until mmc has blk-mq support fully implemented and tested, add a >> parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT >> is

[PATCH V9 15/15] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-09-22 Thread Adrian Hunter
Add CQHCI initialization and implement CQHCI operations for Intel GLK. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-pci-core.c | 155 +- 2 files changed, 155 insertions

[PATCH V9 00/15] mmc: Add Command Queue support

2017-09-22 Thread Adrian Hunter
al var for mqrq_cur" Added "Introduce queue semantics" Changes since RFC: Re-based on next. Added comment about command queue priority. Added some acks and reviews. Adrian Hunter (14): mmc: core: Remove unnecessary host claim mmc: core: Introduc

[PATCH V9 01/15] mmc: core: Remove unnecessary host claim

2017-09-22 Thread Adrian Hunter
Callers already have the host claimed, so remove the unnecessary calls to mmc_claim_host() and mmc_release_host(). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc_ops.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mm

[PATCH V9 07/15] mmc: block: Prepare CQE data

2017-09-22 Thread Adrian Hunter
, and a comment is added to explain the future possibility of defining a priority. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/b

[PATCH V9 06/15] mmc: block: Use local variables in mmc_blk_data_prep()

2017-09-22 Thread Adrian Hunter
Use local variables in mmc_blk_data_prep() in preparation for adding CQE support which doesn't use the output variables. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-)

[PATCH V9 03/15] mmc: core: Add support for handling CQE requests

2017-09-22 Thread Adrian Hunter
Add core support for handling CQE requests, including starting, completing and recovering. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 163 +-- drivers/mmc/core/core.h | 4 ++ include/linux/mmc/host.h

[PATCH V9 02/15] mmc: core: Introduce host claiming by context

2017-09-22 Thread Adrian Hunter
(). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c| 4 ++-- drivers/mmc/core/core.c | 48 ++--- drivers/mmc/core/core.h | 9 + drivers/mmc/core/mmc.c | 4 ++-- drivers/mmc/core/sd.c

[PATCH V9 04/15] mmc: mmc: Enable Command Queuing

2017-09-22 Thread Adrian Hunter
Enable the Command Queue if the host controller supports a command queue engine. It is not compatible with Packed Commands, so make a note of that in the comment. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 17 + 1 file chang

[PATCH V9 05/15] mmc: mmc: Enable CQE's

2017-09-22 Thread Adrian Hunter
Enable or disable CQE when a card is added or removed respectively. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/bus.c | 7 +++ drivers/mmc/core/mmc.c | 12 2 files changed, 19 insertions(+) diff --git a/drivers/mmc/core/bus.c b/drivers/mm

Re: [PATCH V8 00/14] mmc: Add Command Queue support

2017-09-21 Thread Adrian Hunter
On 21/09/17 12:01, Ulf Hansson wrote: > On 13 September 2017 at 13:40, Adrian Hunter <adrian.hun...@intel.com> wrote: >> Hi >> >> Here is V8 of the hardware command queue patches without the software >> command queue patches, now using blk-mq and now with

[PATCH V10 13/15] mmc: block: Add CQE and blk-mq support

2017-10-05 Thread Adrian Hunter
paration of the next request while the current request is in progress. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- Changes since V9: - reinstate mq support for REQ_OP_DRV_IN/OUT that was removed because it was incorrectly assumed to be handled by

Re: [PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-10-04 Thread Adrian Hunter
On 04/10/17 10:39, Linus Walleij wrote: > On Fri, Sep 22, 2017 at 2:37 PM, Adrian Hunter <adrian.hun...@intel.com> > wrote: > >> Add CQE support to the block driver, including: >> - optionally using DCMD for flush requests >> - "manually" iss

Re: [PATCH V8 00/14] mmc: Add Command Queue support

2017-10-10 Thread Adrian Hunter
On 10/10/17 16:08, Ulf Hansson wrote: > [...] > > > I have also run some test on my ux500 board and enabling the blkmq > path via the new MMC Kconfig option. My idea was to run some iozone > comparisons between the legacy path and the new blkmq path, but I just > couldn't get

Re: [PATCH V8 00/14] mmc: Add Command Queue support

2017-10-10 Thread Adrian Hunter
On 10/10/17 15:12, Ulf Hansson wrote: > On 21 September 2017 at 11:44, Adrian Hunter <adrian.hun...@intel.com> wrote: >> On 21/09/17 12:01, Ulf Hansson wrote: >>> On 13 September 2017 at 13:40, Adrian Hunter <adrian.hun...@intel.com> >>> wrote: >>>&

[PATCH V11 3/4] mmc: cqhci: support for command queue enabled host

2017-10-13 Thread Adrian Hunter
From: Venkat Gopalakrishnan <venk...@codeaurora.org> This patch adds CMDQ support for command-queue compatible hosts. Command queue is added in eMMC-5.1 specification. This enables the controller to process upto 32 requests at a time. Adrian Hunter contributed renaming to cqhci, re

[PATCH V11 4/4] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-10-13 Thread Adrian Hunter
Add CQHCI initialization and implement CQHCI operations for Intel GLK. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-pci-core.c | 155 +- 2 files changed, 155 insertions

[PATCH V11 2/4] mmc: block: Add CQE and blk-mq support

2017-10-13 Thread Adrian Hunter
time i.e. mmc_erase(). Where DCMD is used, is for issuing flushes. For host controllers without CQE support, blk-mq support is extended to asynchonous reads/writes. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 801 +++

[PATCH V11 0/4] mmc: Add Command Queue support

2017-10-13 Thread Adrian Hunter
Changes since RFC: Re-based on next. Added comment about command queue priority. Added some acks and reviews. Adrian Hunter (3): mmc: core: Add parameter use_blk_mq mmc: block: Add CQE and blk-mq support mmc: sdhci-pci: Add CQHCI support for Intel GLK V

[PATCH V11 1/4] mmc: core: Add parameter use_blk_mq

2017-10-13 Thread Adrian Hunter
Until mmc has blk-mq support fully implemented and tested, add a parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT is selected. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/Kconfig | 11 +++ drivers/mmc/core/core.c

Re: [PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-10-06 Thread Adrian Hunter
On 02/10/17 11:32, Ulf Hansson wrote: > On 22 September 2017 at 14:37, Adrian Hunter <adrian.hun...@intel.com> wrote: >> Add CQE support to the block driver, including: >> - optionally using DCMD for flush requests >> - "manually" issuing discard r

Re: [PATCH V8 00/14] mmc: Add Command Queue support

2017-10-13 Thread Adrian Hunter
On 11/10/17 16:58, Ulf Hansson wrote: > On 11 October 2017 at 14:58, Adrian Hunter <adrian.hun...@intel.com> wrote: >> On 11/10/17 15:13, Ulf Hansson wrote: >>> On 10 October 2017 at 15:31, Adrian Hunter <adrian.hun...@intel.com> wrote: >>>

Re: [PATCH V7 00/10] mmc: Add Command Queue support

2017-09-06 Thread Adrian Hunter
On 05/09/17 20:54, Ulf Hansson wrote: > On 5 September 2017 at 10:10, Adrian Hunter <adrian.hun...@intel.com> wrote: >> On 05/09/17 10:24, Ulf Hansson wrote: >>> [...] >>> >>>>>> >>>>>> I can send blk-mq support for legacy

Re: [PATCH V7 00/10] mmc: Add Command Queue support

2017-09-05 Thread Adrian Hunter
On 05/09/17 10:24, Ulf Hansson wrote: > [...] > I can send blk-mq support for legacy requests in a few days if you like, but I want to hear a better explanation of why you are delaying CQE support. >>> >>> That would be very nice, however be aware of that we are in the merge

[PATCH V8 13/14] mmc: cqhci: support for command queue enabled host

2017-09-13 Thread Adrian Hunter
From: Venkat Gopalakrishnan <venk...@codeaurora.org> This patch adds CMDQ support for command-queue compatible hosts. Command queue is added in eMMC-5.1 specification. This enables the controller to process upto 32 requests at a time. Adrian Hunter contributed renaming to cqhci, re

[PATCH V8 12/14] mmc: block: Add CQE and blk-mq support

2017-09-13 Thread Adrian Hunter
paration of the next request while the current request is in progress. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 734 ++- drivers/mmc/core/block.h | 8 + drivers/mmc/core/queue.c | 428 ++

[PATCH V8 14/14] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-09-13 Thread Adrian Hunter
Add CQHCI initialization and implement CQHCI operations for Intel GLK. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-pci-core.c | 154 +- 2 files changed, 154 insertions

[PATCH V8 07/14] mmc: block: Factor out mmc_setup_queue()

2017-09-13 Thread Adrian Hunter
Factor out some common code that will also be used with blk-mq. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/queue.c | 51 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/drivers/mmc/core/que

[PATCH V8 08/14] mmc: core: Add parameter use_blk_mq

2017-09-13 Thread Adrian Hunter
Until mmc has blk-mq support fully implemented and tested, add a parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT is selected. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/Kconfig | 11 +++ drivers/mmc/core/core.c

[PATCH V8 02/14] mmc: core: Add support for handling CQE requests

2017-09-13 Thread Adrian Hunter
Add core support for handling CQE requests, including starting, completing and recovering. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 163 +-- drivers/mmc/core/core.h | 4 ++ include/linux/mmc/host.h

[PATCH V8 00/14] mmc: Add Command Queue support

2017-09-13 Thread Adrian Hunter
Added "Fix cmd error reset failure path" Added "Use local var for mqrq_cur" Added "Introduce queue semantics" Changes since RFC: Re-based on next. Added comment about command queue priority. Added some acks and reviews.

[PATCH V8 11/14] mmc: core: Export mmc_start_request()

2017-09-13 Thread Adrian Hunter
Export mmc_start_request() so that the block driver can use it. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 3 ++- drivers/mmc/core/core.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mm

[PATCH V8 09/14] mmc: core: Remove unnecessary host claim

2017-09-13 Thread Adrian Hunter
Callers already have the host claimed, so remove the unnecessary calls to mmc_claim_host() and mmc_release_host(). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc_ops.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mm

[PATCH V8 04/14] mmc: mmc: Enable CQE's

2017-09-13 Thread Adrian Hunter
Enable or disable CQE when a card is added or removed respectively. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/bus.c | 7 +++ drivers/mmc/core/mmc.c | 12 2 files changed, 19 insertions(+) diff --git a/drivers/mmc/core/bus.c b/drivers/mm

[PATCH V8 03/14] mmc: mmc: Enable Command Queuing

2017-09-13 Thread Adrian Hunter
Enable the Command Queue if the host controller supports a command queue engine. It is not compatible with Packed Commands, so make a note of that in the comment. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 17 + 1 file chang

[PATCH V8 10/14] mmc: core: Export mmc_start_bkops()

2017-09-13 Thread Adrian Hunter
Export mmc_start_bkops() so that the block driver can use it. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index a6b0a232f24a..908e4db03535

[PATCH V8 05/14] mmc: block: Use local variables in mmc_blk_data_prep()

2017-09-13 Thread Adrian Hunter
Use local variables in mmc_blk_data_prep() in preparation for adding CQE support which doesn't use the output variables. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-)

[PATCH V8 06/14] mmc: block: Prepare CQE data

2017-09-13 Thread Adrian Hunter
, and a comment is added to explain the future possibility of defining a priority. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/b

[PATCH V8 01/14] mmc: core: Introduce host claiming by context

2017-09-13 Thread Adrian Hunter
(). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 92 drivers/mmc/core/core.h | 6 include/linux/mmc/host.h | 7 +++- 3 files changed, 97 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/core/co

Re: [PATCH V9 14/15] mmc: cqhci: support for command queue enabled host

2017-09-25 Thread Adrian Hunter
On 25/09/17 05:39, Bough Chen wrote: >> +static void cqhci_set_irqs(struct cqhci_host *cq_host, u32 set) { >> +u32 ier; >> + >> +ier = cqhci_readl(cq_host, CQHCI_ISTE); >> +ier |= set; > > I think operation ' |= ' is not correct, since we will also call > cqhci_set_irqs(cq_host, 0),

[PATCH V10 14/15] mmc: cqhci: support for command queue enabled host

2017-09-25 Thread Adrian Hunter
From: Venkat Gopalakrishnan <venk...@codeaurora.org> This patch adds CMDQ support for command-queue compatible hosts. Command queue is added in eMMC-5.1 specification. This enables the controller to process upto 32 requests at a time. Adrian Hunter contributed renaming to cqhci, re

Re: [PATCH V5 02/13] mmc: core: Add members to mmc_request and mmc_data for CQE's

2017-08-21 Thread Adrian Hunter
On 20/08/17 14:29, Linus Walleij wrote: > On Thu, Aug 10, 2017 at 2:08 PM, Adrian Hunter <adrian.hun...@intel.com> > wrote: > >> Most of the information needed to issue requests to a CQE is already in >> struct mmc_request and struct mmc_data. Add data block address,

Re: [PATCH V5 11/13] mmc: block: Add CQE support

2017-08-21 Thread Adrian Hunter
On 20/08/17 15:13, Linus Walleij wrote: > On Thu, Aug 10, 2017 at 2:08 PM, Adrian Hunter <adrian.hun...@intel.com> > wrote: > >> Add CQE support to the block driver, including: >> - optionally using DCMD for flush requests >> - manually issuin

[PATCH V6 10/12] mmc: block: Add CQE support

2017-08-25 Thread Adrian Hunter
and re-tuning which cannot be performed while CQE is active. Block layer timeouts are useful for CQE. While CQE will detect timeout for a task, the block layer timeouts ensure that the driver will notice if CQE itself gets stuck or somehow does not process a task. Signed-off-by: Adrian Hunter <

[PATCH V6 11/12] mmc: cqhci: support for command queue enabled host

2017-08-25 Thread Adrian Hunter
From: Venkat Gopalakrishnan <venk...@codeaurora.org> This patch adds CMDQ support for command-queue compatible hosts. Command queue is added in eMMC-5.1 specification. This enables the controller to process upto 32 requests at a time. Adrian Hunter contributed renaming to cqhci, re

[PATCH V6 12/12] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-08-25 Thread Adrian Hunter
Add CQHCI initialization and implement CQHCI operations for Intel GLK. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-pci-core.c | 154 +- 2 files changed, 154 insertions

[PATCH V6 00/12] mmc: Add Command Queue support

2017-08-25 Thread Adrian Hunter
rectly" Added "Fix cmd error reset failure path" Added "Use local var for mqrq_cur" Added "Introduce queue semantics" Changes since RFC: Re-based on next. Added comment about command queue priority. Added some acks and re

[PATCH V6 02/12] mmc: block: Fix block status codes

2017-08-25 Thread Adrian Hunter
also use BLK_STS_OK in preference to 0. Fixes: 17ece345a042 ("Merge tag 'mmc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc") Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) dif

[PATCH V6 08/12] mmc: block: Use local variables in mmc_blk_data_prep()

2017-08-25 Thread Adrian Hunter
Use local variables in mmc_blk_data_prep() in preparation for adding CQE support which doesn't use the output variables. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-)

[PATCH V6 07/12] mmc: mmc: Enable CQE's

2017-08-25 Thread Adrian Hunter
Enable or disable CQE when a card is added or removed respectively. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/bus.c | 7 +++ drivers/mmc/core/mmc.c | 12 2 files changed, 19 insertions(+) diff --git a/drivers/mmc/core/bus.c b/drivers/mm

[PATCH V6 01/12] mmc: core: Move mmc_start_areq() declaration

2017-08-25 Thread Adrian Hunter
mmc_start_areq() is an internal mmc core API. Move the declaration accordingly. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.h | 6 ++ include/linux/mmc/core.h | 4 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/mm

[PATCH V6 03/12] mmc: host: Add CQE interface

2017-08-25 Thread Adrian Hunter
Add CQE host operations, capabilities, and host members. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- include/linux/mmc/core.h | 6 ++ include/linux/mmc/host.h | 53 2 files changed, 59 insertions(+) diff --git a/include

[PATCH V6 04/12] mmc: core: Turn off CQE before sending commands

2017-08-25 Thread Adrian Hunter
CQE needs to be off for the host controller to accept non-CQ commands. Turn off the CQE before sending commands, and ensure it is off in any reset or power management paths, or re-tuning. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> Reviewed-by: Linus Walleij <linus.wall...@l

[PATCH V6 06/12] mmc: mmc: Enable Command Queuing

2017-08-25 Thread Adrian Hunter
Enable the Command Queue if the host controller supports a command queue engine. It is not compatible with Packed Commands, so make a note of that in the comment. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 17 + 1 file chang

[PATCH V6 05/12] mmc: core: Add support for handling CQE requests

2017-08-25 Thread Adrian Hunter
Add core support for handling CQE requests, including starting, completing and recovering. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 163 +-- drivers/mmc/core/core.h | 4 ++ include/linux/mmc/host.h

[PATCH V6 09/12] mmc: block: Prepare CQE data

2017-08-25 Thread Adrian Hunter
, and a comment is added to explain the future possibility of defining a priority. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/b

Re: [PATCH V5 11/13] mmc: block: Add CQE support

2017-08-31 Thread Adrian Hunter
On 31/08/17 13:23, Christoph Hellwig wrote: > On Sun, Aug 20, 2017 at 02:13:03PM +0200, Linus Walleij wrote: >> So adding a new (in effect) invasive block driver needs to at least >> be CC:ed to the block maintainers so we don't sneak anything like >> that in under the radar. > > Yes. > >> And

[PATCH V7 10/10] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-08-31 Thread Adrian Hunter
Add CQHCI initialization and implement CQHCI operations for Intel GLK. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-pci-core.c | 154 +- 2 files changed, 154 insertions

[PATCH V7 09/10] mmc: cqhci: support for command queue enabled host

2017-08-31 Thread Adrian Hunter
From: Venkat Gopalakrishnan <venk...@codeaurora.org> This patch adds CMDQ support for command-queue compatible hosts. Command queue is added in eMMC-5.1 specification. This enables the controller to process upto 32 requests at a time. Adrian Hunter contributed renaming to cqhci, re

[PATCH V7 08/10] mmc: block: Add CQE support

2017-08-31 Thread Adrian Hunter
s the 3 commands one at a time i.e. mmc_erase(). Where DCMD is used, is for issuing flushes. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 217 +- drivers/mmc/core/block.h | 7 + driv

[PATCH V7 07/10] mmc: block: Factor out mmc_setup_queue()

2017-08-31 Thread Adrian Hunter
Factor out some common code that will also be used with blk-mq. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/queue.c | 53 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/drivers/mmc/core/que

[PATCH V7 02/10] mmc: core: Add support for handling CQE requests

2017-08-31 Thread Adrian Hunter
Add core support for handling CQE requests, including starting, completing and recovering. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 163 +-- drivers/mmc/core/core.h | 4 ++ include/linux/mmc/host.h

[PATCH V7 00/10] mmc: Add Command Queue support

2017-08-31 Thread Adrian Hunter
Added "Fix is_waiting_last_req set incorrectly" Added "Fix cmd error reset failure path" Added "Use local var for mqrq_cur" Added "Introduce queue semantics" Changes since RFC: Re-based on next. Added comment about command

[PATCH V7 01/10] mmc: core: Introduce host claiming by context

2017-08-31 Thread Adrian Hunter
(). Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/core.c | 109 --- drivers/mmc/core/core.h | 8 include/linux/mmc/host.h | 7 ++- 3 files changed, 116 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/core/co

[PATCH V7 03/10] mmc: mmc: Enable Command Queuing

2017-08-31 Thread Adrian Hunter
Enable the Command Queue if the host controller supports a command queue engine. It is not compatible with Packed Commands, so make a note of that in the comment. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/mmc.c | 17 + 1 file chang

[PATCH V7 06/10] mmc: block: Prepare CQE data

2017-08-31 Thread Adrian Hunter
, and a comment is added to explain the future possibility of defining a priority. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/b

[PATCH V7 05/10] mmc: block: Use local variables in mmc_blk_data_prep()

2017-08-31 Thread Adrian Hunter
Use local variables in mmc_blk_data_prep() in preparation for adding CQE support which doesn't use the output variables. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/block.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-)

[PATCH V7 04/10] mmc: mmc: Enable CQE's

2017-08-31 Thread Adrian Hunter
Enable or disable CQE when a card is added or removed respectively. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> --- drivers/mmc/core/bus.c | 7 +++ drivers/mmc/core/mmc.c | 12 2 files changed, 19 insertions(+) diff --git a/drivers/mmc/core/bus.c b/drivers/mm

Re: [PATCH V7 00/10] mmc: Add Command Queue support

2017-09-01 Thread Adrian Hunter
On 01/09/17 15:58, Ulf Hansson wrote: > + Christoph > > On 1 September 2017 at 13:42, Adrian Hunter <adrian.hun...@intel.com> wrote: >> On 31/08/17 14:56, Adrian Hunter wrote: >>> Here is V7 of the hardware command queue patches without the software >>>

Re: [PATCH V7 00/10] mmc: Add Command Queue support

2017-09-01 Thread Adrian Hunter
On 31/08/17 14:56, Adrian Hunter wrote: > Here is V7 of the hardware command queue patches without the software > command queue patches, now using blk-mq. > > HW CMDQ offers 25% - 50% better random multi-threaded I/O. I see a slight > 2% drop in sequential read speed but no chang

Re: [PATCH V7 00/10] mmc: Add Command Queue support

2017-09-04 Thread Adrian Hunter
On 01/09/17 16:28, Adrian Hunter wrote: > On 01/09/17 15:58, Ulf Hansson wrote: >> + Christoph >> >> On 1 September 2017 at 13:42, Adrian Hunter <adrian.hun...@intel.com> wrote: >>> On 31/08/17 14:56, Adrian Hunter wrote: >>>> Here is V7 of the har

Re: [PATCH V8 00/14] mmc: Add Command Queue support

2017-10-11 Thread Adrian Hunter
On 11/10/17 15:13, Ulf Hansson wrote: > On 10 October 2017 at 15:31, Adrian Hunter <adrian.hun...@intel.com> wrote: >> On 10/10/17 16:08, Ulf Hansson wrote: >>> [...] >>> >>>>>>> >>>>>>> I have also run some test on my ux5

Re: [PATCH 1/2 v6] mmc: block: Convert RPMB to a character device

2017-09-27 Thread Adrian Hunter
BUG when removing, fixed by reverting this patch. [ 346.548512] mmc1: card 0001 removed [ 346.552782] BUG: unable to handle kernel NULL pointer dereference at 0070 [ 346.561539] IP: kernfs_find_ns+0xe/0xc0 [ 346.565822] PGD 179dc5067 P4D 179dc5067 PUD 171106067 PMD 0 [

Re: [PATCH V9 09/15] mmc: core: Add parameter use_blk_mq

2017-09-27 Thread Adrian Hunter
On 27/09/17 02:42, Linus Walleij wrote: > On Fri, Sep 22, 2017 at 2:36 PM, Adrian Hunter <adrian.hun...@intel.com> > wrote: > >> Until mmc has blk-mq support fully implemented and tested, add a >> parameter use_blk_mq, default to false unless config option MM

Re: [PATCH V8 00/14] mmc: Add Command Queue support

2017-10-18 Thread Adrian Hunter
On 11/10/17 16:58, Ulf Hansson wrote: > On 11 October 2017 at 14:58, Adrian Hunter <adrian.hun...@intel.com> wrote: >> On 11/10/17 15:13, Ulf Hansson wrote: >>> On 10 October 2017 at 15:31, Adrian Hunter <adrian.hun...@intel.com> wrote: >>>

  1   2   >