Re: [PATCH] perf auxtrace: Fix potential null pointer dereference

2021-04-20 Thread Adrian Hunter
gt; callback pointer "itr->parse_snapshot_options" is dereferenced without > performing NULL check. > > Add a NULL check for the pointer "itr->parse_snapshot_options" before > invoke the callback. > > Fixes: d20031bb63dd ("perf tools: Add AUX area tracing Snapshot Mode&

Re: [PATCH v4 1/2] mmc: block: Issue flush only if allowed

2021-04-20 Thread Adrian Hunter
way, verify that The cache function is > turned ON before doing so. > > fixes: 1e8e55b67030 (mmc: block: Add CQE support) > > Reported-by: Brendan Peter > Tested-by: Brendan Peter > Signed-off-by: Avri Altman Acked-by: Adrian Hunter > --- > drivers/mmc/core/bloc

Re: [PATCH v3 2/2] mmc: block: Update ext_csd.cache_ctrl if it was written

2021-04-20 Thread Adrian Hunter
ctrl on ext-csd write. > > Signed-off-by: Avri Altman Acked-by: Adrian Hunter > --- > drivers/mmc/core/block.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c > index 5b6501fc9fb7..8b07ed5e08de 10

Re: [PATCH v3 1/2] mmc: block: Issue flush only if allowed

2021-04-20 Thread Adrian Hunter
On 20/04/21 8:53 am, Avri Altman wrote: > The cache may be flushed to the nonvolatile storage by writing to > FLUSH_CACHE byte (EXT_CSD byte [32]). When in command queueing mode, the > cache may be flushed by issuing a CMDQ_TASK_ DEV_MGMT (CMD48) with a > FLUSH_CACHE op-code. Either way, verify

Re: [PATCH v20 1/2] scsi: ufs: Enable power management for wlun

2021-04-20 Thread Adrian Hunter
On 20/04/21 7:15 am, Adrian Hunter wrote: > On 20/04/21 12:53 am, Asutosh Das (asd) wrote: >> On 4/19/2021 11:37 AM, Adrian Hunter wrote: >>> On 16/04/21 10:49 pm, Asutosh Das wrote: >>>> >>>> Co-developed-by: Can Guo >>>> S

Re: [PATCH v20 1/2] scsi: ufs: Enable power management for wlun

2021-04-19 Thread Adrian Hunter
On 20/04/21 12:53 am, Asutosh Das (asd) wrote: > On 4/19/2021 11:37 AM, Adrian Hunter wrote: >> On 16/04/21 10:49 pm, Asutosh Das wrote: >>> >>> Co-developed-by: Can Guo >>> Signed-off-by: Can Guo >>> Signed-off-by: Asutosh Das >>> --- >

Re: [PATCH v20 1/2] scsi: ufs: Enable power management for wlun

2021-04-19 Thread Adrian Hunter
On 16/04/21 10:49 pm, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if

Re: [PATCH] scsi: ufs: Check for bkops in runtime suspend

2021-04-18 Thread Adrian Hunter
On 18/04/21 10:21 am, Avri Altman wrote: > The UFS driver allowed BKOPS and WB Flush operations to be completed on > Runtime suspend. Adding the DeepSleep support, this is no longer true: > the driver will ignore BKOPS and WB Flush states, and force a link state > transition to UIC_LINK_OFF_STATE.

Re: [PATCH v19 1/2] scsi: ufs: Enable power management for wlun

2021-04-16 Thread Adrian Hunter
On 16/04/21 12:22 pm, Adrian Hunter wrote: > On 16/04/21 2:36 am, Asutosh Das wrote: >> During runtime-suspend of ufs host, the scsi devices are >> already suspended and so are the queues associated with them. >> But the ufs host sends SSU (START_STOP_UNIT) to wlun >>

Re: [PATCH v19 1/2] scsi: ufs: Enable power management for wlun

2021-04-16 Thread Adrian Hunter
On 16/04/21 2:36 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if the

Re: [PATCH v18 1/2] scsi: ufs: Enable power management for wlun

2021-04-15 Thread Adrian Hunter
On 14/04/21 9:58 pm, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if the

Re: [PATCH v18 2/2] ufs: sysfs: Resume the proper scsi device

2021-04-15 Thread Adrian Hunter
On 14/04/21 9:58 pm, Asutosh Das wrote: > Resumes the actual scsi device the unit descriptor of which > is being accessed instead of the hba alone. > > Reviewed-by: Can Guo > Signed-off-by: Asutosh Das Reviewed-by: Adrian Hunter > --- > drivers/scsi

Re: [PATCH 2/2] perf intel-pt: Use aux_watermark

2021-04-14 Thread Adrian Hunter
On 8/04/21 6:31 pm, Alexander Shishkin wrote: > Turns out, the default setting of attr.aux_watermark to half of the total > buffer size is not very useful, especially with smaller buffers. The > problem is that, after half of the buffer is filled up, the kernel updates > ->aux_head and sets up the

Re: [PATCH v17 1/2] scsi: ufs: Enable power management for wlun

2021-04-11 Thread Adrian Hunter
On 8/04/21 5:49 pm, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if the

Re: [PATCH v17 2/2] ufs: sysfs: Resume the proper scsi device

2021-04-10 Thread Adrian Hunter
On 8/04/21 5:49 pm, Asutosh Das wrote: > Resumes the actual scsi device the unit descriptor of which > is being accessed instead of the hba alone. > > Reviewed-by: Can Guo > Signed-off-by: Asutosh Das > --- > drivers/scsi/ufs/ufs-sysfs.c | 30 +- > 1 file changed,

Re: [PATCH] perf session: Dump PERF_RECORD_TIME_CONV event

2021-04-10 Thread Adrian Hunter
On 10/04/21 6:19 am, Leo Yan wrote: > Now perf tool uses the common stub function process_event_op2_stub() for > dumping TIME_CONV event, thus it doesn't output the clock parameters > contained in the event. > > This patch adds the callback function for dumping the hardware clock > parameters in

Re: [PATCH v17 1/2] scsi: ufs: Enable power management for wlun

2021-04-09 Thread Adrian Hunter
On 9/04/21 8:15 pm, Asutosh Das (asd) wrote: > On 4/9/2021 3:07 AM, Adrian Hunter wrote: >> On 9/04/21 5:27 am, Daejun Park wrote: >>> Hi Asutosh Das, >>> >>>> During runtime-suspend of ufs host, the scsi devices are >>>> already s

Re: [PATCH v17 1/2] scsi: ufs: Enable power management for wlun

2021-04-09 Thread Adrian Hunter
On 9/04/21 5:27 am, Daejun Park wrote: > Hi Asutosh Das, > >> During runtime-suspend of ufs host, the scsi devices are >> already suspended and so are the queues associated with them. >> But the ufs host sends SSU (START_STOP_UNIT) to wlun >> during its runtime-suspend. >> During the process

Re: [PATCH v16 1/2] scsi: ufs: Enable power management for wlun

2021-04-08 Thread Adrian Hunter
On 7/04/21 9:08 pm, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if the

Re: [PATCH v2 0/7] perf arm-spe: Enable timestamp

2021-04-07 Thread Adrian Hunter
On 7/04/21 4:15 pm, Leo Yan wrote: > Hi Al, > > On Tue, Apr 06, 2021 at 09:38:32AM +, Al Grant wrote: > > [...] > >>> This patch set is to enable timestamp for Arm SPE trace. It reads out TSC >>> parameters from mmap page and stores into auxtrace info structure; >> >> Why not synthesize a

Re: [PATCH v15 1/2] scsi: ufs: Enable power management for wlun

2021-04-07 Thread Adrian Hunter
On 6/04/21 8:52 pm, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if the

[PATCH] perf inject: Fix repipe usage

2021-04-01 Thread Adrian Hunter
repipe' to true only if the output is a pipe. Fixes: e558a5bd8b74 ("perf inject: Work with files") Signed-off-by: Adrian Hunter --- tools/perf/builtin-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 6fe

Re: [PATCH v14 1/2] scsi: ufs: Enable power management for wlun

2021-04-01 Thread Adrian Hunter
On 1/04/21 4:40 am, Asutosh Das (asd) wrote: > On 3/31/2021 11:19 AM, Adrian Hunter wrote: >> On 31/03/21 1:31 am, Asutosh Das wrote: >>> During runtime-suspend of ufs host, the scsi devices are >>> already suspended and so are the queues associated with them. >

Re: [PATCH v14 1/2] scsi: ufs: Enable power management for wlun

2021-03-31 Thread Adrian Hunter
On 31/03/21 1:31 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if the

Re: [PATCH v13 1/2] scsi: ufs: Enable power management for wlun

2021-03-30 Thread Adrian Hunter
On 25/03/21 3:39 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU (START_STOP_UNIT) to wlun > during its runtime-suspend. > During the process blk_queue_enter checks if the

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-25 Thread Adrian Hunter
On 25/03/21 4:14 am, Asutosh Das (asd) wrote: > On 3/23/2021 12:19 PM, Adrian Hunter wrote: >> On 23/03/21 5:13 pm, Asutosh Das (asd) wrote: >>> On 3/22/2021 11:12 PM, Adrian Hunter wrote: >>>> On 22/03/21 9:53 pm, Asutosh Das (asd) wrote: >>>>&g

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-23 Thread Adrian Hunter
On 23/03/21 5:13 pm, Asutosh Das (asd) wrote: > On 3/22/2021 11:12 PM, Adrian Hunter wrote: >> On 22/03/21 9:53 pm, Asutosh Das (asd) wrote: >>> On 3/19/2021 10:47 AM, Adrian Hunter wrote: >>>> On 19/03/21 2:35 am, Asutosh Das wrote: >>>>> During

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-23 Thread Adrian Hunter
On 22/03/21 9:53 pm, Asutosh Das (asd) wrote: > On 3/19/2021 10:47 AM, Adrian Hunter wrote: >> On 19/03/21 2:35 am, Asutosh Das wrote: >>> During runtime-suspend of ufs host, the scsi devices are >>> already suspended and so are the queues associated with them. >

Re: [PATCH 2/2] mmc: block: Update ext_csd.cache_ctrl if it was written

2021-03-22 Thread Adrian Hunter
On 22/03/21 3:36 pm, Avri Altman wrote: > The cache function can be turned ON and OFF by writing to the CACHE_CTRL > byte (EXT_CSD byte [33]). However, card->ext_csd.cache_ctrl is only > set on init if cache size > 0. > > Fix that by explicitly setting ext_csd.cache_ctrl on ext-csd write. > >

Re: [PATCH 1/2] mmc: block: Issue flush only if allowed

2021-03-22 Thread Adrian Hunter
On 22/03/21 3:36 pm, Avri Altman wrote: > The cache may be flushed to the nonvolatile storage by writing to > FLUSH_CACHE byte (EXT_CSD byte [32]). When in command queueing mode, the > cache may be flushed by issuing a CMDQ_TASK_ DEV_MGMT (CMD48) with a > FLUSH_CACHE op-code. Either way, verify

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-19 Thread Adrian Hunter
On 19/03/21 2:35 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in >

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-18 Thread Adrian Hunter
On 18/03/21 7:58 pm, Asutosh Das (asd) wrote: > On 3/18/2021 10:54 AM, Rafael J. Wysocki wrote: >> On Thu, Mar 18, 2021 at 6:33 PM Asutosh Das (asd) >> wrote: >>> >>> On 3/18/2021 7:00 AM, Rafael J. Wysocki wrote: >>>> On Wed, Mar 17, 2021 at 7:37 AM

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-17 Thread Adrian Hunter
On 16/03/21 10:35 pm, Asutosh Das (asd) wrote: > On 3/16/2021 12:48 AM, Adrian Hunter wrote: >> On 16/03/21 12:22 am, Asutosh Das (asd) wrote: >>> On 3/14/2021 1:11 AM, Adrian Hunter wrote: >>>> On 10/03/21 5:04 am, Asutosh Das (asd) wrote: >>>>>

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-16 Thread Adrian Hunter
On 16/03/21 12:22 am, Asutosh Das (asd) wrote: > On 3/14/2021 1:11 AM, Adrian Hunter wrote: >> On 10/03/21 5:04 am, Asutosh Das (asd) wrote: >>> On 3/9/2021 7:56 AM, Asutosh Das (asd) wrote: >>>> On 3/8/2021 9:17 AM, Rafael J. Wysocki wrote: >>>>> On

Re: [PATCH v1 1/1] mmc: sdhci-acpi: Add support for NVIDIA BlueField-3 SoC

2021-03-15 Thread Adrian Hunter
is generally preferred I think. > >> -Original Message- >> From: Adrian Hunter >> Sent: Monday, March 15, 2021 4:34 AM >> To: Liming Sun ; Ulf Hansson ; >> Khalil Blaiech >> Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org >> Subject: R

Re: [PATCH v11 1/2] scsi: ufs: Enable power management for wlun

2021-03-15 Thread Adrian Hunter
On 12/03/21 12:19 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in >

Re: [PATCH v1 1/1] mmc: sdhci-acpi: Add support for NVIDIA BlueField-3 SoC

2021-03-15 Thread Adrian Hunter
On 12/03/21 3:48 pm, Liming Sun wrote: > This commit adds ACPI support for the BlueField-3 SoC which uses > the DWC_mshc eMMC controller. The boundary check logic in static > function dwcmshc_adma_write_desc() comes from sdhci-of-dwcmshc.c. Did you consider adding ACPI support to

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-14 Thread Adrian Hunter
On 10/03/21 5:04 am, Asutosh Das (asd) wrote: > On 3/9/2021 7:56 AM, Asutosh Das (asd) wrote: >> On 3/8/2021 9:17 AM, Rafael J. Wysocki wrote: >>> On Mon, Mar 8, 2021 at 5:21 PM Rafael J. Wysocki wrote: On Sat, Mar 6, 2021 at 5:17 PM Alan Stern wrote: > > On Fri, Mar 05,

[PATCH] scsi: ufs-pci: Add support for Intel LKF

2021-03-12 Thread Adrian Hunter
Add PCI ID and callbacks to support Intel LKF. This includes the ability to use an ACPI device-specific method (DSM) to perform a UFS device reset. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufshcd-pci.c | 169 ++ 1 file changed, 169 insertions(+) diff

Re: [PATCH] mmc: sdhci-pci: Avoid comma separated statements

2021-03-11 Thread Adrian Hunter
On 11/03/21 12:14 pm, Jisheng Zhang wrote: > Use semicolons. > > Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci-pci-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-pci-core

Re: [PATCH] mmc: sdhci: Use "mmc" directly rather than "host->mmc"

2021-03-11 Thread Adrian Hunter
11000463add w3, w3, #0x1 > 908: 94000000bl 0 > ... > > We saved one ldr instruction: "ldr x0, [x0, #1160]" > > Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci.c | 33 ++

[PATCH] perf auxtrace: Fix auxtrace queue conflict

2021-03-08 Thread Adrian Hunter
sample mode to trace multiple threads. Consequently, fix that case by removing the check. Reported-by: Andi Kleen Fixes: e502789302a6 ("perf auxtrace: Add helpers for queuing AUX area tracing data") Signed-off-by: Adrian Hunter --- tools/perf/util/auxtrace.c | 4 1 file

Re: [PATCH v10 1/2] scsi: ufs: Enable power management for wlun

2021-03-04 Thread Adrian Hunter
On 3/03/21 12:52 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in >

Re: [PATCH v10 2/2] ufs: sysfs: Resume the proper scsi device

2021-03-03 Thread Adrian Hunter
On 3/03/21 12:52 am, Asutosh Das wrote: > Resumes the actual scsi device the unit descriptor of which > is being accessed instead of the hba alone. Since "scsi: ufs: ufs-debugfs: Add user-defined exception_event_mask" is now in linux-next, a similar change is needed for ufs-debugfs.c. Probably

Re: [PATCH v2 1/1] mmc: cqhci: fix random crash when remove mmc module

2021-03-03 Thread Adrian Hunter
(2) pass check here > cq_host->enable = false; > > task_desc= > get_desc(cq_host,tag); > ^^^^ crash here > (3) acces

Re: [PATCH V1] mmc: sdhci: Check for reset prior to DMA address unmap

2021-03-03 Thread Adrian Hunter
completed. So we don't run into this > scenario. > > Swap the reset, un-map steps sequence in sdhci_request_done(). > > Suggested-by: Veerabhadrarao Badiganti > Signed-off-by: Pradeep P V K Seems like a good change to make. A couple of cosmetic tweaks below, but: Acked-by: Adri

Re: [PATCH 1/1] mmc: cqhci: fix random crash when remove mmc module

2021-03-02 Thread Adrian Hunter
On 2/03/21 5:12 pm, Zhi Li wrote: > > > On Tue, Mar 2, 2021 at 1:03 AM Adrian Hunter <mailto:adrian.hun...@intel.com>> wrote: > > On 1/03/21 7:21 pm, Frank Li wrote: > > [ 6684.493350] Unable to handle kernel paging request at virtual > address 8

Re: [PATCH v9 1/2] scsi: ufs: Enable power management for wlun

2021-03-02 Thread Adrian Hunter
On 2/03/21 5:21 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in >

Re: [PATCH] scsi: ufs: Fix incorrect ufshcd_state after ufshcd_reset_and_restore()

2021-03-02 Thread Adrian Hunter
_RESET in the start of each >> loop in ufshcd_reset_and_restore(). If there is an error, >> ufshcd_reset_and_restore() will change the state to UFSHCD_STATE_ERROR, >> otherwise ufshcd_probe_hba() will have set the state appropriately. >> >> Fixes: 4db7a2360597 ("scsi: ufs: Fi

Re: [PATCH 1/1] mmc: cqhci: fix random crash when remove mmc module

2021-03-02 Thread Adrian Hunter
On 1/03/21 7:21 pm, Frank Li wrote: > [ 6684.493350] Unable to handle kernel paging request at virtual address > 800011c5b0f0 > [ 6684.498531] mmc0: card 0001 removed > [ 6684.501556] Mem abort info: > [ 6684.509681] ESR = 0x9647 > [ 6684.512786] EC = 0x25: DABT (current EL), IL = 32

[PATCH] scsi: ufs: Fix incorrect ufshcd_state after ufshcd_reset_and_restore()

2021-03-01 Thread Adrian Hunter
to UFSHCD_STATE_ERROR, otherwise ufshcd_probe_hba() will have set the state appropriately. Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths") Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufshcd.c | 2 ++ 1 file changed, 2 insertions(+)

Re: [PATCH v8 1/2] scsi: ufs: Enable power management for wlun

2021-03-01 Thread Adrian Hunter
On 1/03/21 8:10 pm, Asutosh Das wrote: > On Mon, Mar 01 2021 at 05:23 -0800, Adrian Hunter wrote: >> On 26/02/21 1:37 am, Asutosh Das wrote: >>> @@ -8901,43 +9125,14 @@ static int ufshcd_resume(struct ufs_hba *hba, enum >>> ufs_pm_op pm_op) >>&

Re: [PATCH v8 1/2] scsi: ufs: Enable power management for wlun

2021-03-01 Thread Adrian Hunter
Hi A couple of minor things, but also a potential issue with when link state transitions are done. Please see comments below. On 26/02/21 1:37 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But

Re: [PATCH] mmc: Try power cycling card if command request times out

2021-03-01 Thread Adrian Hunter
On 1/03/21 10:50 am, Ulf Hansson wrote: > + Adrian > > On Tue, 16 Feb 2021 at 23:43, Mårten Lindahl wrote: >> >> Sometimes SD cards that has been run for a long time enters a state >> where it cannot by itself be recovered, but needs a power cycle to be >> operational again. Card status analysis

Re: [PATCH v7 1/2] scsi: ufs: Enable power management for wlun

2021-02-25 Thread Adrian Hunter
On 25/02/21 5:00 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in >

Re: [PATCH v5 1/2] scsi: ufs: Enable power management for wlun

2021-02-24 Thread Adrian Hunter
On 24/02/21 7:13 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in >

Re: [PATCH v4 1/2] scsi: ufs: Enable power management for wlun

2021-02-23 Thread Adrian Hunter
On 23/02/21 1:04 am, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in >

Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun

2021-02-19 Thread Adrian Hunter
On 11/02/21 9:18 pm, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in >

[PATCH 02/11] perf intel_pt: Add vmlaunch and vmresume as branches

2021-02-18 Thread Adrian Hunter
In preparation to support Intel PT decoding of virtual machine traces, add vmlaunch and vmresume as branch instructions. Note, sample flags will show "VMentry" even if the VM-Entry fails. Signed-off-by: Adrian Hunter --- tools/perf/arch/x86/tests/insn-x86.c | 1 + .../

[PATCH 00/11] perf intel-pt: Add limited support for tracing guest kernels

2021-02-18 Thread Adrian Hunter
an example in the documentation of patch "perf intel-pt: Add documentation for tracing virtual machines" The patches are on top of the "Add PSB events" series. Adrian Hunter (11): perf script: Add branch types for VM-Entry and VM-Exit perf intel_pt: Add vmlaunch and vmresume a

[PATCH 01/11] perf script: Add branch types for VM-Entry and VM-Exit

2021-02-18 Thread Adrian Hunter
In preparation to support Intel PT decoding of virtual machine traces, add branch types for VM-Entry and VM-Exit. Note they are both treated as "calls" because the VM-Exit transfers control to a different address. Signed-off-by: Adrian Hunter --- tools/perf/builtin-script.c | 2 ++

[PATCH 09/11] perf intel-pt: Adjust sample flags for VM-Exit

2021-02-18 Thread Adrian Hunter
Use the change of NR to detect whether an asynchronous branch is a VM-Exit. Note VM-Entry is determined from the vmlaunch or vmresume instruction, in which case, sample flags will show "VMentry" even if the VM-Entry fails. Signed-off-by: Adrian Hunter --- tools/perf/util/intel

[PATCH 08/11] perf intel-pt: Allow for a guest kernel address filter

2021-02-18 Thread Adrian Hunter
Handling TIP.PGD for an address filter for a guest kernel is the same as a host kernel, but user space decoding, and hence address filters, are not supported. Signed-off-by: Adrian Hunter --- tools/perf/util/intel-pt.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH 11/11] perf intel-pt: Add documentation for tracing virtual machines

2021-02-18 Thread Adrian Hunter
Add documentation to the perf-intel-pt man page for tracing virtual machines. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-intel-pt.txt | 82 ++ 1 file changed, 82 insertions(+) diff --git a/tools/perf/Documentation/perf-intel-pt.txt b/tools/perf

[PATCH 10/11] perf intel-pt: Split VM-Entry and VM-Exit branches

2021-02-18 Thread Adrian Hunter
guest ip Signed-off-by: Adrian Hunter --- tools/perf/util/intel-pt.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index cafb3943d5f6..f6e28ac231b7 100644 --- a/tools/perf/util/intel-pt.c +++ b/t

[PATCH 07/11] perf intel-pt: Support decoding of guest kernel

2021-02-18 Thread Adrian Hunter
. Synthesized samples just need the cpumode set for the guest. Signed-off-by: Adrian Hunter --- tools/perf/util/intel-pt.c | 81 -- 1 file changed, 69 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index ddb8e6c3ffb0

[PATCH 06/11] perf machine: Factor out machine__idle_thread()

2021-02-18 Thread Adrian Hunter
Factor out machine__idle_thread() so it can be re-used for guest machines. A thread is needed to find executable code, even for the guest kernel. To avoid possible future pid number conflicts, the idle thread can be used. Signed-off-by: Adrian Hunter --- tools/perf/util/machine.c | 18

[PATCH 04/11] perf intel-pt: Amend decoder to track the NR flag

2021-02-18 Thread Adrian Hunter
ide the host from a guest using Intel PT. Signed-off-by: Adrian Hunter --- .../util/intel-pt-decoder/intel-pt-decoder.c | 59 --- .../util/intel-pt-decoder/intel-pt-decoder.h | 3 +- 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/tools/perf/util/intel-pt-decoder/intel

[PATCH 03/11] perf intel-pt: Retain the last PIP packet payload as is

2021-02-18 Thread Adrian Hunter
Retain the PIP packet payload as is, instead of just the CR3, because it contains also the VMX NR flag which is needed to track VM-Entry. Signed-off-by: Adrian Hunter --- .../arch/x86/tests/intel-pt-pkt-decoder-test.c | 4 ++-- .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 14

[PATCH 05/11] perf machine: Factor out machines__find_guest()

2021-02-18 Thread Adrian Hunter
Factor out machines__find_guest() so it can be re-used. Signed-off-by: Adrian Hunter --- tools/perf/util/machine.c | 9 + tools/perf/util/machine.h | 1 + tools/perf/util/session.c | 7 +-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/machine.c b

Re: [PATCH 2/2] mmc: core: Add no single read retries

2021-02-16 Thread Adrian Hunter
On 17/02/21 7:46 am, Adrian Hunter wrote: > On 17/02/21 7:22 am, DooHyun Hwang wrote: >> This makes to handle read errors faster by not retrying >> multiple block read(CMD18) errors with single block reads(CMD17). >> >> On some bad SD Cards that have p

Re: [PATCH 2/2] mmc: core: Add no single read retries

2021-02-16 Thread Adrian Hunter
On 17/02/21 7:22 am, DooHyun Hwang wrote: > This makes to handle read errors faster by not retrying > multiple block read(CMD18) errors with single block reads(CMD17). > > On some bad SD Cards that have problem with read operations, > it is not helpful to retry multiple block read errors with >

Re: [PATCH 2/2] mmc: core: Drop reference counting of the bus_ops

2021-02-16 Thread Adrian Hunter
e point have become superfluous. As this is an old mechanism > of the mmc core, it a bit difficult to digest the history of when that > could have happened. However, let's drop the reference counting to avoid > unnecessary code-paths and lockings. > > Cc: Pierre Oss

Re: [PATCH 1/2] mmc: core: Drop superfluous validations in mmc_hw|sw_reset()

2021-02-16 Thread Adrian Hunter
g as the struct mmc_host has a valid pointer to a > struct mmc_card, the corresponding host->bus_ops pointer stays valid and > assigned. > > For these reasons, let's drop the superfluous reference counting and the > redundant validations in mmc_hw|sw_reset(). > > Signed-of

Re: [PATCH] perf test: Fix unaligned access in sample parsing test

2021-02-14 Thread Adrian Hunter
7ab6fbbc in __libc_start_main (/lib64/libc.so.6+0x38bbc) > #12 0x561532596828 in _start ... > > SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use > util/synthetic-events.c:1539:4 in > > Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") > Cc: Adr

[PATCH V2 3/4] scsi: ufs-debugfs: Add user-defined exception_event_mask

2021-02-08 Thread Adrian Hunter
to the device. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufs-debugfs.c | 46 ++ drivers/scsi/ufs/ufshcd.c | 86 +- drivers/scsi/ufs/ufshcd.h | 22 - 3 files changed, 120 insertions(+), 34 deletions(-) diff --git a/drivers/scsi

[PATCH V2 4/4] scsi: ufs-debugfs: Add user-defined exception event rate limiting

2021-02-08 Thread Adrian Hunter
, and then after a period of time (default 20ms) the exception event is enabled again. Note that if the driver also has that exception event enabled, it will not be disabled. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufs-debugfs.c | 44 ++ drivers/scsi/ufs

[PATCH V2 1/4] scsi: ufs: Add exception event tracepoint

2021-02-08 Thread Adrian Hunter
00:12.5: status 0x4 kworker/2:2-173 [002] 732.609312: ufshcd_exception_event: :00:12.5: status 0x4 Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufshcd.c | 2 ++ include/trace/events/ufs.h | 21 + 2 files changed, 23 insertions(+) diff --git a/d

[PATCH V2 2/4] scsi: ufs: Add exception event definitions

2021-02-08 Thread Adrian Hunter
For readability and completeness, add exception event definitions. Signed-off-by: Adrian Hunter Reviewed-by: Bean Huo --- drivers/scsi/ufs/ufs.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index bf1897a72532

[PATCH V2 0/4] scsi: ufs-debugfs: Add UFS Exception Event reporting

2021-02-08 Thread Adrian Hunter
event status" to "status" scsi: ufs: Add exception event definitions Add Reviewed-by: Bean Huo Adrian Hunter (4): scsi: ufs: Add exception event tracepoint scsi: ufs: Add exception event definitions scsi: ufs-debugfs: Add user-defined exception_event_

[PATCH 4/4] perf intel-pt: Add PSB events

2021-02-05 Thread Adrian Hunter
-2.31.so) uname 17981 [006] 25617.511158907: psb: psb offs: 0xa150 0 [unknown] ([unknown]) Signed-off-by: Adrian Hunter --- tools/perf/Documentation/itrace.txt | 2 +- tools/perf/Documentation/perf-intel-pt.txt

[PATCH 3/4] perf intel-pt: Fix IPC with CYC threshold

2021-02-05 Thread Adrian Hunter
The code assumed every CYC-eligible packet has a CYC packet, which is not the case when CYC thresholds are used. Fix by checking if a CYC packet is actually present in that case. Fixes: 5b1dc0fd1da06 ("perf intel-pt: Add support for samples to contain IPC ratio") Signed-off-by: Adr

[PATCH 2/4] perf intel-pt: Fix premature IPC

2021-02-05 Thread Adrian Hunter
intel-pt: Add support for samples to contain IPC ratio") Signed-off-by: Adrian Hunter --- .../util/intel-pt-decoder/intel-pt-decoder.c | 11 ++- .../util/intel-pt-decoder/intel-pt-decoder.h | 1 + tools/perf/util/intel-pt.c | 16 ++-- 3 fil

[PATCH 4/0] perf intel-pt: Add PSB events

2021-02-05 Thread Adrian Hunter
Hi Here are 3 fixes and 1 minor new feature, for Intel PT. Adrian Hunter (4): perf intel-pt: Fix missing CYC processing in PSB perf intel-pt: Fix premature IPC perf intel-pt: Fix IPC with CYC threshold perf intel-pt: Add PSB events tools/perf/Documentation/itrace.txt

[PATCH 1/4] perf intel-pt: Fix missing CYC processing in PSB

2021-02-05 Thread Adrian Hunter
Add missing CYC packet processing when walking through PSB+. This improves the accuracy of timestamps that follow PSB+, until the next MTC. Fixes: 3d49807870f08 ("perf tools: Add new Intel PT packet definitions") Signed-off-by: Adrian Hunter --- tools/perf/util/intel-pt-decode

Re: [PATCH 2/2] mmc: mmc_test: use erase_arg for mmc_erase command

2021-02-04 Thread Adrian Hunter
ff77676 ("mmc: core: Calculate the discard arg only once") > Did you experience an issue because of this? You could add that to the commit message. There does not seem to be a need for secure erase, so: Acked-by: Adrian Hunter > Signed-off-by: Yann Gautier > --- > dri

Re: [PATCH 3/4] scsi: ufs-debugfs: Add user-defined exception_event_mask

2021-02-04 Thread Adrian Hunter
On 4/02/21 4:58 pm, Bean Huo wrote: > On Wed, 2021-02-03 at 11:56 +0200, Adrian Hunter wrote: >>> >>> Hallo Adrian >> >> Hi Bean >> >> Thanks for the review >> >>> >>> Would you like sharing the advantage of this debugfs nod

Re: [PATCH 3/4] scsi: ufs-debugfs: Add user-defined exception_event_mask

2021-02-03 Thread Adrian Hunter
On 3/02/21 11:45 am, Bean Huo wrote: > On Tue, 2021-01-19 at 16:15 +0200, Adrian Hunter wrote: >> Allow users to enable specific exception events via debugfs. >> >> The bits enabled by the driver ee_drv_ctrl are separated from the >> bits >> enabled by the u

Re: [PATCH 0/4] scsi: ufs-debugfs: Add UFS Exception Event reporting

2021-02-02 Thread Adrian Hunter
On 19/01/21 4:15 pm, Adrian Hunter wrote: > Hi > > Here are patches to add a tracepoint for UFS Exception Events and to allow > users to enable specific exception events without affecting the driver's > use of exception events. > > > Adrian Hunter (4): > scs

Re: [PATCH] mmc: queue: Remove unused define

2021-02-02 Thread Adrian Hunter
On 3/02/21 9:20 am, Chanwoo Lee wrote: > From: ChanWoo Lee > > MMC_CQE_QUEUE_FULL is not set and is only cleared. > Therefore, define is unnecessary. > > Signed-off-by: ChanWoo Lee Looks like a pre blk-mq remanent. Acked-by: Adrian Hunter > --- > drivers/mmc/core/q

Re: [PATCH] scsi: ufs: Add total count for each error history

2021-02-02 Thread Adrian Hunter
d8d17e04a01982f Author: Adrian Hunter Date: Thu Jan 7 09:2

[PATCH] perf auxtrace: Automatically group aux-output events

2021-01-21 Thread Adrian Hunter
, automatically create a group since that is the requirement anyway. Example: (requires Intel Tremont) perf record -c 500 -e 'intel_pt//u' --filter 'filter main @ /bin/ls' -e 'cycles/aux-output/pp' ls Signed-off-by: Adrian Hunter --- tools/perf/builtin-record.c | 2 ++ tools/perf/util/auxtrace.c

Re: [PATCH] perf evlist: Fix id index for heterogeneous systems

2021-01-21 Thread Adrian Hunter
On 21/01/21 3:19 pm, Arnaldo Carvalho de Melo wrote: > Em Thu, Jan 21, 2021 at 02:54:46PM +0200, Adrian Hunter escreveu: >> perf_evlist__set_sid_idx() updates perf_sample_id with the evlist map >> index, cpu number and tid. It is passed indexes to the evsel's cpu and >> thread

[PATCH] perf evlist: Fix id index for heterogeneous systems

2021-01-21 Thread Adrian Hunter
index (PERF_RECORD_ID_INDEX) is used by AUX area tracing when in sampling mode. Having an incorrect cpu number causes the trace data to be attributed to the wrong cpu, and can result in decoder errors because the trace data is then associated with the wrong process. Signed-off-by: Adrian Hunter

[PATCH 2/4] scsi: ufs: Add exception event definitions

2021-01-19 Thread Adrian Hunter
For readability and completeness, add exception event definitions. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufs.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index 09c7cc8a678d..5d4a2740a159 100644

[PATCH 1/4] scsi: ufs: Add exception event tracepoint

2021-01-19 Thread Adrian Hunter
on_event: :00:12.5: exception event status 0x4 kworker/2:2-173 [002] 732.609312: ufshcd_exception_event: :00:12.5: exception event status 0x4 Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufshcd.c | 2 ++ include/trace/events/ufs.h | 21 +

[PATCH 0/4] scsi: ufs-debugfs: Add UFS Exception Event reporting

2021-01-19 Thread Adrian Hunter
Hi Here are patches to add a tracepoint for UFS Exception Events and to allow users to enable specific exception events without affecting the driver's use of exception events. Adrian Hunter (4): scsi: ufs: Add exception event tracepoint scsi: ufs: Add exception event definitions

[PATCH 4/4] scsi: ufs-debugfs: Add user-defined exception event rate limiting

2021-01-19 Thread Adrian Hunter
, and then after a period of time (default 20ms) the exception event is enabled again. Note that if the driver also has that exception event enabled, it will not be disabled. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufs-debugfs.c | 44 ++ drivers/scsi/ufs

[PATCH 3/4] scsi: ufs-debugfs: Add user-defined exception_event_mask

2021-01-19 Thread Adrian Hunter
to the device. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufs-debugfs.c | 46 ++ drivers/scsi/ufs/ufshcd.c | 86 +- drivers/scsi/ufs/ufshcd.h | 22 - 3 files changed, 120 insertions(+), 34 deletions(-) diff --git a/drivers/scsi

Re: [PATCH v6 1/6] scsi: ufs: Add "wb_on" sysfs node to control WB on/off

2021-01-19 Thread Adrian Hunter
On 19/01/21 11:33 am, Bean Huo wrote: > On Tue, 2021-01-19 at 09:01 +0200, Adrian Hunter wrote: >> On 18/01/21 10:10 pm, Bean Huo wrote: >>> From: Bean Huo >>> >>> Currently UFS WriteBooster driver uses clock scaling up/down to set >>> WB o

  1   2   3   4   5   6   7   8   9   10   >