[LinuxBIOS] [PATCH] v3 - spinlock cleanup

Stefan Reinauer stepan at coresystems.de
Mon Jul 2 00:50:04 CEST 2007

* Uwe Hermann <uwe at hermann-uwe.de> [070701 02:14]:
> OK, I totally misread what the code is supposed to do.
> I'm not sure the spin_define() is such a good idea then. It has a nice
> name and all, but it might be obfuscating things more than necessary.
> Maybe a simple variable declaration (i.e., drop the #define) would be better?

I don't see why it would be better, there are no obvious advantages, but
some obvious disadvantages.
Here our principles start clashing. We can't do this for several

* The declaration is static, so it has to be surrounded by #if
  defined(CONFIG_SMP) would waste all the places in the code. This is 
  controverse to our goal to make changes as local as possible.
  If we don't, we end up with warnings in the code for almost every

* Since some of us started hating typedefs, we don't have anything to
  declare anymore. You simply can not rely that a spinlock is
  represented by struct spinlock on all possible systems.
  So to get this done right, we would have to go back to spinlock_t,
  in which case I would vote to also go back to device_t and all the
  others, so we stay consistent.


coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/

More information about the coreboot mailing list