Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jul 1999 16:51:43 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        sprice@hiwaay.net (Steve Price)
Cc:        freebsd-alpha@FreeBSD.ORG, freebsd-current@FreeBSD.ORG
Subject:   Re: alpha kernel build failure (w/patch)
Message-ID:  <199907052351.QAA27061@bubba.whistle.com>
In-Reply-To: <Pine.OSF.4.10.9907050031040.19262-100000@fly.HiWAAY.net> from Steve Price at "Jul 5, 99 00:33:57 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Steve Price writes:
>  	}
> +#ifdef __i386__
>  	sc->wb_btag = I386_BUS_SPACE_IO;
> +#endif
> +#ifdef __alpha__
> +	sc->wb_btag = ALPHA_BUS_SPACE_IO;
> +#endif
>  #else
>  	if (!(command & PCIM_CMD_MEMEN)) {

Just a minor comment.. anytime you have something like this, it's
always nice to do it this way instead:

  #if defined(__i386__)
	  sc->wb_btag = I386_BUS_SPACE_IO;
  #elif defined(__alpha__)
	  sc->wb_btag = ALPHA_BUS_SPACE_IO;
  #else
  #error Machine architecture unsupported
  #endif

That way when somebody wants to add M68K support or whatever they
are alerted that they need to implement the new flag at compile
time instead of at panic time :-)

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907052351.QAA27061>