[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201303311443.12125@pali>
Date: Sun, 31 Mar 2013 14:43:11 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: Ивайло Димитров
<freemangordon@....bg>
Cc: tony@...mide.com, juha.yrjola@...idboot.com,
linux@....linux.org.uk, mpm@...enic.com,
herbert@...dor.apana.org.au, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] OMAP3 ROM Random Number Generator support
On Sunday 31 March 2013 14:05:42 Ивайло Димитров wrote:
> Hi Pali,
>
> Yep, the code looks almost identical, I guess with some tweaks
> all SMC code from that patch could be removed and instead
> used the one from SMC PPA API.
>
> What I don't get, is why one needs to disable/enable
> fiqs/irqs:
>
> +static int call_sec_rom(u32 appl_id, u32 proc_id, u32 flag,
> ...) +{
> + va_list ap;
> + u32 ret;
> + u32 val;
> +
> + va_start(ap, flag);
> + val = *(u32 *) ≈
> + local_irq_disable();
> + local_fiq_disable();
> + ret = omap3_rom_rng_call(appl_id, proc_id, flag,
> + (u32) virt_to_phys((void *) val));
> + local_fiq_enable();
> + local_irq_enable();
> + va_end(ap);
> +
> + return ret;
> +}
>
> Do you have any idea why is that needed? Any other code I've
> ever seen to call SM, does not disable fiqs/irqs, is RNG SMC
> somehow special? I know this is Nokia's code, but still, if
> we can get some understanding...
>
> Regards,
> Ivo
This driver is written by Juha Yrjola and is part of maemo 2.6.28 kernel.
Juha Yrjola, are you still around?
--
Pali Rohár
pali.rohar@...il.com
Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists