Re: [PATCH] sal cleanup

David Mosberger
2004-03-02T18:01:28Z

>>>>> On Tue, 2 Mar 2004 17:57:01 +0000, Matthew Wilcox <willy@debian.org> said:

Matthew> Yeah. That's why I moved it into a separate function so we
Matthew> can add other bad version numbers. If we were really keen,
Matthew> we could even add a check for the oem and product IDs
Matthew> matching, or a data table of known-bad BIOSes but let's
Matthew> keep it simple until we have to make it complex.

Well, I can live with either approach, so it's your call. It's just that
a command-line option can come in handy when you're urgently trying to boot
a kernel and you can't rebuild a kernel (like when trying to demo a new
machine... ;-).

Matthew> SAL_VERSION_CODE(49, 29)

>> shouldn't these be in hex?

Matthew> Nope, that's the beauty of it:

Matthew> #define SAL_VERSION_CODE(major, minor) ((BIN2BCD(major) <<
Matthew> 8) | BIN2BCD(minor))

Matthew> BIN2BCD is defined in linux/bcd.h as ((((val)/10)<<4) +
Matthew> (val)%10)

Matthew> So you get to specify things in decimal.

Ah, I missed that. Nice.

--daivd