RE: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: Re: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT
> engine
> 
> On Fri, Aug 07, 2020 at 07:39:19PM +0530, Srujana Challa wrote:
> >
> > +#if defined(CONFIG_ARM64)
> > +static inline long otx2_lmt_flush(void *ioreg)
> > +{
> > +	long result = 0;
> > +
> > +	__asm__ volatile(".cpu  generic+lse\n"
> > +			 "ldeor xzr, %0, [%1]\n"
> > +			 : "=r" (result)
> > +			 : "r" (ioreg) : "memory");
> > +
> > +	return result;
> > +}
> > +
> > +#else
> > +#define otx2_lmt_flush(addr)     ({ 0; })
> > +#endif
> 
> This is not acceptable.  Please work out a way with the ARM folks
> to fix this without adding assembly code in a driver.
> 
This block of code is used for LMT store operations. The LMT store operation
is specific to our platform, and this uses the "ldeor" instruction(which is
actually an LSE atomic instruction available on v8.1 CPUs) targeting the
IO address.
We add it in the driver since we want LMT store to work even if LSE_ATOMICS
is disabled.

Thanks,
Srujana

> Thanks,
> --
> Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Home Page: https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__gondor.apana.org.au_-
> 7Eherbert_&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD5hcKFpANhTW
> dwQzjT1Jpf7veC5263T47JVpnc&m=Xm4oQ3dI4peur80298SnMa5gz-
> 1rdAxVE1rwHkmHvc0&s=7S5Z2Mpq-
> th_W_KeJSQIOSo274CMg5UI0Tc9mkUkypg&e=
> PGP Key: https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__gondor.apana.org.au_-
> 7Eherbert_pubkey.txt&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD5hcK
> FpANhTWdwQzjT1Jpf7veC5263T47JVpnc&m=Xm4oQ3dI4peur80298SnMa5gz-
> 1rdAxVE1rwHkmHvc0&s=yf6R1d7GDuz4Wmq_7Z7GoPuIkewZfs0x8h6xXvf3b2o&e
> =




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux