mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Mukker, Atul" <Atul.Mukker@lsi.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	Julian Calaby <julian.calaby@gmail.com>,
	adam radford <aradford@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Austria, Winston" <Winston.Austria@lsi.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: RE: [RFQ] New driver architecture questions
Date: Fri, 15 May 2009 12:04:04 -0400	[thread overview]
Message-ID: <1242403444.14252.3.camel@mulgrave.int.hansenpartnership.com> (raw)
In-Reply-To: <6C678488C5CEE74F813A4D1948FD2DC7A96C7789@cosmail02.lsi.com>

On Fri, 2009-05-15 at 08:56 -0600, Mukker, Atul wrote: 
> >>
> > >> Perhaps this is a bad example?  It seems like the "common layer"
> > >> sections that are "cross-OS" shouldn't contain any Linux specific code
> > at all.
> > >
> > > I think the implication is that the cross-OS parts are coded, as it
> > > happens, in the linux coding style, using linux functions, but then a
> > > Windows layer maps these to Windows specific functions.
> > 
> > Correct.
> > 
> > 	Jeff
> > 
> > 
> > 
> [Atul] I think we are close, for example, memcpy API in the stack is
> osi_memcpy(), which translates to memcpy() on Linux and
> ScsiPortMoveMemory() on windows.

So what we really don't want to see in Linux drivers is the particular
name you've chosen for your glue layer API (like osi_mempy).  The way
you get around this is to run a macro substituter over the HIM before
you put it in the kernel, so the API logic all appears to be linux
specific, even though it's translated from your generic HIM.   This adds
a bit of a burden sometimes in patching because you have to translate
back to the HIM to apply the patch, but this can be largely automated.

James



  reply	other threads:[~2009-05-15 16:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14  1:57 Mukker, Atul
2009-05-14  2:44 ` Jeff Garzik
2009-05-14  3:07   ` Mukker, Atul
2009-05-14  4:16     ` Jeff Garzik
2009-05-14  8:51       ` Boaz Harrosh
2009-05-15  0:58       ` adam radford
2009-05-15  1:01         ` Julian Calaby
2009-05-15  3:01           ` Jeff Garzik
2009-05-15 14:56             ` Mukker, Atul
2009-05-15 16:04               ` James Bottomley [this message]
2009-05-15 16:36               ` Matthew Wilcox
2009-05-15 18:03                 ` Mukker, Atul
2009-05-15 18:16                   ` Matthew Wilcox
2009-05-15 18:38                     ` Mukker, Atul

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=1242403444.14252.3.camel@mulgrave.int.hansenpartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=Atul.Mukker@lsi.com \
    --cc=Winston.Austria@lsi.com \
    --cc=aradford@gmail.com \
    --cc=jeff@garzik.org \
    --cc=julian.calaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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

all inboxes | Powered by JetHome®