From: Bruno Vidal <bruno_vidal@hpfrcu03.france.hp.com>
Cc: "parisc-linux@lists.parisc-linux.org"
<parisc-linux@lists.parisc-linux.org>
Subject: Re: [parisc-linux] mem_pdc_call: how using it exactly.
Date: Fri, 05 Jul 2002 14:03:45 +0200 [thread overview]
Message-ID: <3D258B21.EC28E2AF@admin.france.hp.com> (raw)
In-Reply-To: 20020705124538.Z27706@parcelfarce.linux.theplanet.co.uk
[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]
About the iodc_data_size, in the documentation it is describe as: "count bytes in length".
For example in drivers/scsi/zalon7xx.c:
status = pdc_iodc_read(&pdc_result, hpa, 0, &iodc_data, 32 );
-> it is 32.
So If I want the 32 first bytes, it should be 32.
Now why doing it myself, because I don't want to use spinlock while dumping, and pdc_iodc_read
use spinlock. Perhaps, it is not a good solution, what do you think about using spinlock while
dumping ?
Matthew Wilcox wrote:
>
> On Fri, Jul 05, 2002 at 12:53:31PM +0200, Bruno Vidal wrote:
> > static unsigned long pdc_result[32] __attribute__ ((aligned (8)));
> > static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
> >
> > /* Get spa for this module */
> > hpa=dump_parms->hpa;
> > index=0;
> > iodc_data_size=32;
> >
> > ret = mem_pdc_call(PDC_IODC, PDC_IODC_READ, __pa(pdc_result), hpa, index, __pa(pdc_result2), iodc_data_size);
> > convert_to_wide(pdc_result);
> > bytecnt = pdc_result[0];
> > memcpy(dump_iodc_data, pdc_result2, iodc_data_size);
> >
> > The result is always "ret = -3" -> cannot complete call without error.
> > Do I forget anything (probably). Do I have to prevent interruption ? Do I have to modify PSW ?
>
> more prosaically, i think iodc_data_size should be 32 * sizeof(long),
> ie size in bytes, not number of longs.
>
> but why code this up yourself rather than use pdc_iodc_read?
>
> --
> Revolutions do not require corporate support.
--
Vidal Bruno, (770-4271)
SSD-HA Team, HP-UX & LINUX Support
bruno_vidal@admin.france.hp.com
[-- Attachment #2: Card for Bruno Vidal --]
[-- Type: text/x-vcard, Size: 386 bytes --]
begin:vcard
n:Bruno;VIDAL
tel;fax:01-69-82-60-14
tel;work:01-69-29-42-71
x-mozilla-html:TRUE
url:www.france.hp.com
org:Solution Center
version:2.1
email;internet:bruno_vidal@hp.com
title:Expert Logiciel Environnement Haute Disponibilité
adr;quoted-printable:;;HP France=0D=0A;Z.A de Courtaboeuf;1 Av. du Canada;91947 Les Ulis cedex;France
x-mozilla-cpt:;26208
fn:VIDAL Bruno
end:vcard
next prev parent reply other threads:[~2002-07-05 12:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-05 10:53 [parisc-linux] mem_pdc_call: how using it exactly Bruno Vidal
2002-07-05 11:45 ` Matthew Wilcox
2002-07-05 12:03 ` Bruno Vidal [this message]
2002-07-05 15:32 ` Bruno Vidal
2002-07-05 17:17 ` Grant Grundler
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=3D258B21.EC28E2AF@admin.france.hp.com \
--to=bruno_vidal@hpfrcu03.france.hp.com \
--cc=parisc-linux@lists.parisc-linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.