[lkml]   [2008]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: GPL question: using large contiguous memory in proprietary driver.
    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.


     \ /
      Last update: 2008-10-15 16:21    [W:0.060 / U:12.532 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site