Subject: Re: Minor x68k build fix
To: Havard Eidnes <he@NetBSD.org>
From: NISHIMURA Takeshi <nsmrtks@chime.ocn.ne.jp>
List: port-x68k
Date: 10/28/2006 21:20:43
Hi,
There should be no problems.
At Fri, 27 Oct 2006 00:06:12 +0200 (CEST),
Havard Eidnes wrote:
>
> Hi,
>
> this fix appears necessary to restore the x68k port to building
> properly. This is caused by gcc now propagating volatile-ness and
> const-ness from structs to individual struct members. I initially
> tried to make sramtop volatile, but that just gave more errors when it
> was used as an argument to memcpy().
>
> I suspect this variable doesn't really change over the course of the
> execution of this function, so removing the volatile-ness with
> __UNVOLATILE() appears to my untrained eye to be the appropriate thing
> to do.
>
> Comments?
>
> Index: sram.c
> ===================================================================
> RCS file: /u/nb/src/sys/arch/x68k/dev/sram.c,v
> retrieving revision 1.12
> diff -u -r1.12 sram.c
> --- sram.c 11 Dec 2005 12:19:37 -0000 1.12
> +++ sram.c 26 Oct 2006 21:58:28 -0000
> @@ -134,7 +134,7 @@
> {
> int error = 0;
> struct sram_io *sram_io;
> - char *sramtop = IODEVbase->io_sram;
> + char *sramtop = __UNVOLATILE(IODEVbase->io_sram);
> struct sram_softc *su = &sram_softc;
>
> #ifdef DEBUG
--
nsmrtks