All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@suse.de>
To: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: xen-devel@lists.xensource.com, Ky Srinivasan <ksrinivasan@novell.com>
Subject: Re: PV drivers for HVM guests
Date: Wed, 04 Oct 2006 13:02:59 +0200	[thread overview]
Message-ID: <452394E3.6030000@suse.de> (raw)
In-Reply-To: <20061004081551.GC6274@rhun.haifa.ibm.com>

Muli Ben-Yehuda wrote:
>> A shim layer (i.e., a set of compat macros) that avoids ifdef'ing
>> the core driver code is definitely the way to go.
> 
> FWIW, neither option has a chance of being accepted upstream.

Exactly thats why a shim layer is the way to go (if possible, doesn't
work for all changes but for most).  Did that that quite some time while
maintaining the v4l subsystem.  Making driver source code use the
2.6.latest conventions and have some compat.h header file full of stuff
like this ...

  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,xx)
  # define foo gryyz
  #endif

or (better if possible as it catches distro backports, which does happen
now and then for compiling recent drivers on old distro kernels).

  #ifndef bar
  # define bar xyzzy
  #endif

nicely separates out the compat bits.  It makes the code more readable
and also is less work when submitting code upstream.

cheers,

  Gerd

-- 
Gerd Hoffmann <kraxel@suse.de>
http://www.suse.de/~kraxel/julika-dora.jpeg

  parent reply	other threads:[~2006-10-04 11:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-03 20:31 PV drivers for HVM guests Ky Srinivasan
2006-10-03 22:19 ` Andrew D. Ball
2006-10-03 22:31 ` Steve Ofsthun
2006-10-04  7:56 ` Keir Fraser
2006-10-04  8:15   ` Muli Ben-Yehuda
2006-10-04  8:17     ` Keir Fraser
2006-10-04 11:02     ` Gerd Hoffmann [this message]
2006-10-04 15:54       ` Andi Kleen
2006-10-04 10:24 ` Steven Smith
2006-10-05 15:21 ` Ian Campbell
2006-10-05 16:47   ` Ky Srinivasan
2006-10-10  8:00   ` DOI Tsunehisa
2006-10-11 10:46     ` DOI Tsunehisa
2006-10-13  2:00       ` DOI Tsunehisa
2006-10-13  6:55         ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2006-10-04 18:40 Ky Srinivasan
2006-10-04 18:42 Ky Srinivasan
2006-10-05 14:59 ` Andrew D. Ball
2006-10-05 15:13   ` Ky Srinivasan
2006-10-04 18:45 Ky Srinivasan
2006-10-04 18:47 Ky Srinivasan
2006-10-04 18:50 Ky Srinivasan

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=452394E3.6030000@suse.de \
    --to=kraxel@suse.de \
    --cc=ksrinivasan@novell.com \
    --cc=muli@il.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    /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.