[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9d326966-a759-5ccf-e488-e66d2119eda7@amd.com>
Date: Tue, 15 Jun 2021 16:48:21 +0530
From: Sanjay R Mehta <sanmehta@....com>
To: Vinod Koul <vkoul@...nel.org>, Sanjay R Mehta <Sanju.Mehta@....com>
Cc: gregkh@...uxfoundation.org, dan.j.williams@...el.com,
Thomas.Lendacky@....com, Shyam-sundar.S-k@....com,
Nehal-bakulchandra.Shah@....com, robh@...nel.org,
mchehab+samsung@...nel.org, davem@...emloft.net,
linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org
Subject: Re: [PATCH v9 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA
On 6/9/2021 7:40 PM, Vinod Koul wrote:
> [CAUTION: External Email]
>
> On 02-06-21, 12:22, Sanjay R Mehta wrote:
>
>> +/* DebugFS helpers */
>> +#define MAX_NAME_LEN 20
>> +#define RI_VERSION_NUM 0x0000003F
>> +
>> +#define RI_NUM_VQM 0x00078000
>> +#define RI_NVQM_SHIFT 15
>> +
>> +static DEFINE_MUTEX(pt_debugfs_lock);
>
> unused?
>
>> +
>> +static int pt_debugfs_info_show(struct seq_file *s, void *p)
>> +{
>> + struct pt_device *pt = s->private;
>> + unsigned int regval;
>> +
>> + if (!pt)
>> + return 0;
>
> better return an error code?
>
>> +
>> + seq_printf(s, "Device name: %s\n", pt->name);
>> + seq_printf(s, " # Queues: %d\n", 1);
>> + seq_printf(s, " # Cmds: %d\n", pt->cmd_count);
>> +
>> + regval = ioread32(pt->io_regs + CMD_PT_VERSION);
>
> how do you ensure your device is not sleeping or you can access iomem
> safely?
>
This device will never go to sleep state as this DMA device is part of AMD server SOC.
Hence PM support is not implemented.
- Sanjay
Powered by blists - more mailing lists