public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: johan.adolfsson@axis.com
To: "Oliver Xymoron" <oxymoron@waste.org>, <johan.adolfsson@axis.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Improved add_timer_randomness for __CRIS__ (instead of rdtsc())
Date: Tue, 20 Aug 2002 19:34:02 +0200	[thread overview]
Message-ID: <050b01c2486f$c6701880$b9b270d5@homeip.net> (raw)
In-Reply-To: 20020820170601.GD19225@waste.org

> > Put an inline function or macro in asm/timex.h (?) together with an
> > ARCH_HAS_RANDOM_TIMESTAMP define?
> 
> I don't think we want to make it specific to random. I think we just
> want to call it hires. 
> 
> > E.g. like this for i386:
> > #define ARCH_HAS_RANDOM_TIMESTAMP
> > #define RANDOM_TIMESTAMP(time, num) do{\
..  
> > And then in random.c:
> > ifdef ARCH_HAS_RANDOM_TIMESTAMP
> >   RANDOM_TIMESTAMP(time, num);
> > #else
> >   time = jiffies;
> > #endif
> 
> Again, too random-specific. And we need a way to get the timescale.
> Perhaps something like:
> 
> speed=get_timestamp_khz;
> lowbits=get_hires_timestamp();

But isn't the "num ^= high;" a way to improve the randomness
and the high value doesn't really need to be linear to the time?
Thus it would be random-specific and not just a timestamp.

/Johan



  reply	other threads:[~2002-08-20 17:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-20  9:31 [RFC] Improved add_timer_randomness for __CRIS__ (instead of rdtsc()) johan.adolfsson
2002-08-20 14:03 ` Oliver Xymoron
2002-08-20 16:32   ` johan.adolfsson
2002-08-20 17:06     ` Oliver Xymoron
2002-08-20 17:34       ` johan.adolfsson [this message]
2002-08-20 18:02         ` Oliver Xymoron
2002-08-20 19:20           ` johan.adolfsson
2002-08-20 19:34             ` Oliver Xymoron
2002-08-20 22:17               ` johan.adolfsson
2002-08-20 23:00                 ` Oliver Xymoron
2002-08-21  9:11                   ` johan.adolfsson

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='050b01c2486f$c6701880$b9b270d5@homeip.net' \
    --to=johan.adolfsson@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oxymoron@waste.org \
    /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