linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: "Ивайло Димитров" <freemangordon@abv.bg>
Cc: tony@atomide.com, juha.yrjola@solidboot.com,
	linux@arm.linux.org.uk, mpm@selenic.com,
	herbert@gondor.hengli.com.au, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] OMAP3 ROM Random Number Generator support
Date: Sun, 31 Mar 2013 14:43:11 +0200	[thread overview]
Message-ID: <201303311443.12125@pali> (raw)
In-Reply-To: <2059303614.30062.1364731542427.JavaMail.apache@mail83.abv.bg>

[-- Attachment #1: Type: Text/Plain, Size: 1157 bytes --]

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 *) &ap;
> +	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@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-03-31 12:43 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 [this message]
2013-04-01 16:59 ` Tony Lindgren
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=201303311443.12125@pali \
    --to=pali.rohar@gmail.com \
    --cc=freemangordon@abv.bg \
    --cc=herbert@gondor.hengli.com.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=tony@atomide.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).