lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 21 Jul 2022 23:16:26 +0100
From:   Ben Dooks <ben.dooks@...ive.com>
To:     Vinod Koul <vkoul@...nel.org>
Cc:     dmaengine@...r.kernel.org, Eugeniy.Paltsev@...opsys.com,
        linux-kernel@...r.kernel.org,
        Sudip Mukherjee <sudip.mukherjee@...ive.com>,
        Jude Onyenegecha <jude.onyenegecha@...ive.com>
Subject: Re: [PATCH 1/3] dmaengine: dw-axi-dmac: dump channel registers on
 error

On 21/07/2022 13:30, Vinod Koul wrote:
> On 08-07-22, 18:01, Ben Dooks wrote:
>> On channel error, dump the channel register state before
>> the channel's LLI entries to see what the controller was
>> actually doing when the error happend.
>>
>> Signed-off-by: Ben Dooks <ben.dooks@...ive.com>
>> ---
>>   .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 28 +++++++++++++++++++
>>   1 file changed, 28 insertions(+)
>>
>> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
>> index e9c9bcb1f5c2..75c537153e92 100644
>> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
>> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
>> @@ -79,6 +79,20 @@ axi_chan_iowrite64(struct axi_dma_chan *chan, u32 reg, u64 val)
>>   	iowrite32(upper_32_bits(val), chan->chan_regs + reg + 4);
>>   }
>>   
>> +static inline u64
>> +axi_chan_ioread64(struct axi_dma_chan *chan, u32 reg)
>> +{
>> +	u32 high, low;
>> +	u64 result;
>> +
>> +	low = ioread32(chan->chan_regs + reg);
>> +	high = ioread32(chan->chan_regs + reg + 4);
>> +
>> +	result = low;
>> +	result |= (u64)high << 32;
>> +	return result;
>> +}
> 
> Better to use helpers like lo_hi_readq()?

Will go check on those, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ