From: Mark Hounschell <markh@compro.net>
To: Kaz Kylheku <kkylheku@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: GPL question: using large contiguous memory in proprietary driver.
Date: Wed, 15 Oct 2008 09:54:28 -0400 [thread overview]
Message-ID: <48F5F614.3080008@compro.net> (raw)
In-Reply-To: <3f43f78b0810141456r159d71e7h9763e50e7dbc0c51@mail.gmail.com>
Kaz Kylheku wrote:
> Hi all,
>
> I have the following question. Suppose that some proprietary driver
> (otherwise completely clean, based only on non-GPL symbols)
> requires a large buffer of physically contiguous memory.
>
> A GPL-ed driver could get this memory by having some boot-time
> code compiled into the kernel which calls bootmem_alloc during
> kernel initialization. This function would stash the address of the
> memory into some global variable which is exported for the
> module to use.
>
> How do you solve this problem in a proprietary driver? It seems
> like the above solution taints the kernel, because the kernel
> provides a symbol which exists only for the sake of supporting
> a proprietary driver.
>
> Would it be okay to have a mechanism like this:
> Suppose that on the kernel command line, you could
> request a boot-time memory allocation and give it a name.
> For instance, the parameter:
>
> boot_alloc=foo,8192K
>
> would create an 8192 kilobyte allocation, and associate it
> with the string "foo". A non-GPL function would be provided to
> find the address of this memory, using the string "foo"
> as the key. The proprietary driver would document the
> requirement that it needs a memory region of at least
> 8192K, under the name "foo".
>
> Help! :)
Hardware with scatter/gatcher capabilites would be best. But short
of that, you could just use the bigphysarea patch. GOOGLE for it and you'll
find a version suitable for most kernel versions. I've been using it for years with
a GPL driver but even if the driver wasn't GPL I would still be using it.
I sure wish it could be included in the kernel??
There really aren't many good reasons not to GPL your driver BTW.
Mark
prev parent reply other threads:[~2008-10-15 14:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-14 21:56 GPL question: using large contiguous memory in proprietary driver Kaz Kylheku
2008-10-14 22:05 ` Peter Zijlstra
2008-10-14 22:10 ` Alexey Dobriyan
2008-10-14 23:18 ` Kaz Kylheku
2008-10-14 22:12 ` Chris Friesen
2008-10-14 23:23 ` Kaz Kylheku
2008-10-15 2:21 ` Chris Friesen
2008-10-15 5:23 ` David Newall
2008-10-15 5:30 ` Adrian Bunk
2008-10-15 9:05 ` Alan Cox
2008-10-15 13:21 ` John Stoffel
2008-10-14 23:39 ` Kaz Kylheku
2008-10-15 11:26 ` Nick Piggin
2008-10-15 13:54 ` Mark Hounschell [this message]
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=48F5F614.3080008@compro.net \
--to=markh@compro.net \
--cc=kkylheku@gmail.com \
--cc=linux-kernel@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