[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR0402MB3485A342A184BEBB004E74F998F70@VI1PR0402MB3485.eurprd04.prod.outlook.com>
Date: Thu, 25 Oct 2018 14:05:32 +0000
From: Horia Geanta <horia.geanta@....com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Roy Pledge <roy.pledge@....com>
CC: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Aymen Sghaier <aymen.sghaier@....com>,
Leo Li <leoyang.li@....com>,
Madalin-cristian Bucur <madalin.bucur@....com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: caam/qi - simplify CGR allocation, freeing
On 10/9/2018 8:11 PM, Sebastian Andrzej Siewior wrote:
> On 2018-10-08 14:09:37 [+0300], Horia Geantă wrote:
>> CGRs (Congestion Groups) have to be freed by the same CPU that
>> initialized them.
>> This is why currently the driver takes special measures; however, using
>> set_cpus_allowed_ptr() is incorrect - as reported by Sebastian.
>>
>> Instead of the generic solution of replacing set_cpus_allowed_ptr() with
>> work_on_cpu_safe(), we use the qman_delete_cgr_safe() QBMan API instead
>> of qman_delete_cgr() - which internally takes care of proper CGR
>> deletion.
>>
>> Link: https://lkml.kernel.org/r/20181005125443.dfhd2asqktm22ney@linutronix.de
>> Reported-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
>> Signed-off-by: Horia Geantă <horia.geanta@....com>
>
> Oh. No more usage of set_cpus_allowed_ptr(). Wonderful. Thank you.
> Acked-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> for that.
>
> Now that you shifted my attention to qman_delete_cgr_safe().
> Could you please use work_on_cpu_safe() here instead
> smp_call_function_single() with preempt_disable() around it?
>
> Now, what is the problem with the CPU limitation? Is this a HW
> limitation that you can access the registers from a certain CPU?
>
Roy confirmed the CPU limitation should actually be removed, there is nothing in
HW requiring it.
A clean-up patch will follow.
Thanks,
Horia
Powered by blists - more mailing lists