From: Tony Lindgren <tony@atomide.com>
To: "Ивайло Димитров" <freemangordon@abv.bg>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
juha.yrjola@solidboot.com, linux@arm.linux.org.uk,
mpm@selenic.com, herbert@gondor.apana.org.au,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] OMAP3 ROM Random Number Generator support
Date: Mon, 1 Apr 2013 09:59:50 -0700 [thread overview]
Message-ID: <20130401165949.GI10155@atomide.com> (raw)
In-Reply-To: <2059303614.30062.1364731542427.JavaMail.apache@mail83.abv.bg>
* Ивайло Димитров <freemangordon@abv.bg> [130331 05:10]:
>
> 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...
Sounds like the fiq handling can be dropped based on what
the TI guys posted recently about FIQs only be available in
the secure mode starting with omap2.
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-04-01 17:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-31 12:05 [PATCH] OMAP3 ROM Random Number Generator support Ивайло Димитров
2013-03-31 12:43 ` Pali Rohár
2013-04-01 16:59 ` Tony Lindgren [this message]
2013-04-01 22:09 ` Aaro Koskinen
-- strict thread matches above, loose matches on Subject: below --
2013-04-01 20:37 Ивайло Димитров
2013-04-02 16:17 ` Tony Lindgren
2013-02-28 18:05 Pali Rohár
2013-03-24 14:15 ` Pali Rohár
2013-03-27 21:09 ` Tony Lindgren
2013-03-27 22:03 ` Pali Rohár
2013-03-27 22:25 ` Tony Lindgren
2013-03-28 17:54 ` Pali Rohár
2013-03-28 21:44 ` Tony Lindgren
2013-03-31 9:28 ` Pali Rohár
2013-04-01 16:25 ` Tony Lindgren
2013-03-28 9:52 ` Russell King - ARM Linux
2013-03-28 17:24 ` Pali Rohár
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130401165949.GI10155@atomide.com \
--to=tony@atomide.com \
--cc=freemangordon@abv.bg \
--cc=herbert@gondor.apana.org.au \
--cc=juha.yrjola@solidboot.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mpm@selenic.com \
--cc=pali.rohar@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).