[parisc-linux-cvs] [PATCH] palo wide/narrow support

Bjorn Helgaas bjorn_helgaas@hp.com
Fri, 11 May 2001 15:51:47 -0600


--------------Boundary-00=_B2Y65EVLMRVTRJVAURPI
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Attached are some PALO diffs that add support for calling PDC/IODC in wide 
mode (i.e., for Superdome).  Highlights are:

- PALO ipl continues to run in narrow mode on all platforms.  If started in
  wide mode, it immediately switches back to narrow mode (as before).

- PDC/IODC calls are made in the mode ipl was started in.  If wide mode
  calls are required, a wrapper sets up a wide-mode stack and switches
  to wide mode for the PDC/IODC call, then returns to narrow mode.

- All direct PDC/IODC calls are encapsulated in ipl/pdc_misc.c.  The
  biggest reason for this is to encapsulate handling of the R_addr
  return buffers.  This buffer is an array of either 32-bit or 64-bit
  words, and the wrappers hide this difference.

I'd be grateful for any comments or suggestions.

Bjorn
--------------Boundary-00=_B2Y65EVLMRVTRJVAURPI
Content-Type: text/x-c;
  charset="iso-8859-1";
  name="diffs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="diffs"

SW5kZXg6IGlwbC9ib290bG9hZGVyLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2hvbWUvY3ZzL3Bh
cmlzYy9wYWxvL2lwbC9ib290bG9hZGVyLmgsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNQpkaWZm
IC11IC1wIC1yMS41IGJvb3Rsb2FkZXIuaAotLS0gYm9vdGxvYWRlci5oCTIwMDAvMDkvMjEgMTY6
NTU6MDQJMS41CisrKyBib290bG9hZGVyLmgJMjAwMS8wNS8xMSAyMTo0MjozMApAQCAtMjQsNyAr
MjQsMTIgQEAgc3RydWN0IGJvb3RmcyB7CiB9OwogCiAKLXR5cGVkZWYgaW50ICgqZmlybXdhcmVf
Y2FsbCkoKTsKKy8qIHBkY19taXNjLmMgKi8KK3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MyIGJpdFxyXG4iLAogCQkodWludDMy
X3QpKGEgPj4gKDE2ICogMykpICYgbWFzazE2LAogCQkodWludDMyX3QpKGEgPj4gKDE2ICogMikp
ICYgbWFzazE2LAogCQkodWludDMyX3QpKGEgPj4gKDE2ICogMSkpICYgbWFzazE2LApAQCAtNjgs
MTEgKzY4LDExIEBAIGludCBwcmVwYXJlX0VMRjY0X2xvYWRhYmxlKGludCBmZCwgc3RydWMKIAog
ICAgIGlmIChfX2JlMTZfdG9fY3B1KGVoLmVfbWFjaGluZSkgIT0gRU1fUEFSSVNDKQogICAgIHsK
LQlwcmludGYoIkZhdGFsIC0gRUxGLCBidXQgbm90IGZvciBQQVJJU0NcbiIpOworCXByaW50Zigi
RmF0YWwgLSBFTEYsIGJ1dCBub3QgZm9yIFBBUklTQ1xyXG4iKTsKIAlyZXR1cm4gUFJFUEFSRV9G
QVRBTDsKICAgICB9CiAKLSAgICBwcmludGYoIkVMRjY0IGV4ZWN1dGFibGVcbiIpOworICAgIHBy
aW50ZigiRUxGNjQgZXhlY3V0YWJsZVxyXG4iKTsKIAogICAgIC8qIFdlIGxpa2UgdGhpcyBraW5k
IG9mIEVMRi4uLiAqLwogICAgIGVoLmVfcGhudW0gPSBfX2JlMTZfdG9fY3B1KGVoLmVfcGhudW0p
Owo=

--------------Boundary-00=_B2Y65EVLMRVTRJVAURPI--