public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] sal cleanup
Date: Tue, 02 Mar 2004 17:57:01 +0000	[thread overview]
Message-ID: <20040302175701.GM25779@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20040226213704.GW25779@parcelfarce.linux.theplanet.co.uk>

On Tue, Mar 02, 2004 at 09:42:33AM -0800, David Mosberger wrote:
> >>>>> On Tue, 2 Mar 2004 15:56:01 +0000, Matthew Wilcox <willy@debian.org> said:
> 
>   Matthew> I don't have an objection to doing that, but how about
>   Matthew> making it Just Work for this particular case?  Something
>   Matthew> like ..
> 
> Well, that would be more convenient for me, but I don't know how many
> other "strange" SAL version numbers are out there in the wild.  It's
> can be handy to have an override option when dealing with buggy
> firmware (fortunately, quite rare with production systems, but it's
> all to common with prototypes).

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

> Just a caveat:
> 
>   Matthew> SAL_VERSION_CODE(49, 29)
> 
> shouldn't these be in hex?

Nope, that's the beauty of it:

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

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

So you get to specify things in decimal.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

  parent reply	other threads:[~2004-03-02 17:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-26 21:37 [PATCH] sal cleanup Matthew Wilcox
2004-02-26 21:55 ` David Mosberger
2004-02-26 22:04 ` Matthew Wilcox
2004-02-27 18:52 ` David Mosberger
2004-02-27 19:24 ` Matthew Wilcox
2004-02-27 19:33 ` David Mosberger
2004-02-27 20:25 ` Matthew Wilcox
2004-02-27 21:48 ` Randy.Dunlap
2004-02-27 22:09 ` David Mosberger
2004-02-27 22:42 ` Matthew Wilcox
2004-02-27 23:02 ` David Mosberger
2004-03-01 16:03 ` Matthew Wilcox
2004-03-01 16:05 ` Matthew Wilcox
2004-03-02  1:30 ` David Mosberger
2004-03-02  7:46 ` David Mosberger
2004-03-02 15:56 ` Matthew Wilcox
2004-03-02 16:00 ` Matthew Wilcox
2004-03-02 17:42 ` David Mosberger
2004-03-02 17:57 ` Matthew Wilcox [this message]
2004-03-02 18:01 ` David Mosberger
2004-03-02 19:25 ` Matthew Wilcox
2004-03-03  2:53 ` David Mosberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040302175701.GM25779@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox