lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 30 Jul 2007 00:05:31 +0100
From:	Adrian McMenamin <adrian@...golddream.dyndns.info>
To:	Paul Mundt <lethal@...ux-sh.org>
Cc:	Adrian McMenamin <lkmladrian@...il.com>,
	linux-kernel@...r.kernel.org, linuxsh-dev@...ts.sourceforge.net
Subject: Re: Fwd: [PATCH] Reboot Dreamcast under software control

On Mon, 2007-07-30 at 07:50 +0900, Paul Mundt wrote:
> On Sun, Jul 29, 2007 at 07:25:21PM +0100, Adrian McMenamin wrote:
> > diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
> > index 6334a4c..6f5e9e4 100644
> > --- a/arch/sh/kernel/process.c
> > +++ b/arch/sh/kernel/process.c
> > @@ -97,6 +97,11 @@ void cpu_idle(void)
> > 
> >  void machine_restart(char * __unused)
> >  {
> > +
> > +#ifdef CONFIG_SH_DREAMCAST
> > +       /*reboot the Dreamcast under software control*/
> > +       writel(0x00007611, 0xA05F6890);
> > +#endif
> >         /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */
> >         asm volatile("ldc %0, sr\n\t"
> >                      "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001));
> 
> No, if you want to do this, at least use a function pointer and leave
> this as the default implementation. The dreamcast presumably only needs
> this magic write anyways, rather than the SR.BL trick.
> 

Well, when I tested it, it did have a "return" in after the call and it
worked - but I took that out as it looked like code bloat to me :)

Explain what you mean by using a function pointer and I'll do that.

Adrian
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ