]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wilink8-wlan/compat.git/log
wilink8-wlan/compat.git
10 years agobackport netdev_notifier_info_to_dev() ol_r8.a8.02
Eliad Peller [Sun, 29 Sep 2013 09:35:31 +0000 (12:35 +0300)]
backport netdev_notifier_info_to_dev()

this is a bit tricky - newer kernels pass netdev_notifier_info
to the notifier, while older kernels pass the net_device itself.

instead of adding patching the callers, add a dummy function
to return the dev itself.

don't use LINUX_BACKPORT, so the build will break if this
struct/function is already defined.

Signed-off-by: Eliad Peller <eliad@wizery.com>
10 years agoadd missing define dt_310 ol_r8.a7.01 ol_r8.a7.02 ol_r8.a8.01
Eliad Peller [Mon, 22 Jul 2013 10:35:10 +0000 (13:35 +0300)]
add missing define

11 years agocompat: add HDMI library support dt ol_r8.a6.06_38 r8.a6.06_38
Luis R. Rodriguez [Tue, 2 Apr 2013 02:09:37 +0000 (19:09 -0700)]
compat: add HDMI library support

HDMI was being carried over through compat but that
was a mistake as all its doing is providing helper
routines. It was also defining it as a module which
was tainting the kernel! This fixes that.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains \
f142d3bd556c5e82e9bb3d33d07d6708702ea4ce
v3.9-rc1~83^2~1^2~4

commit f142d3bd556c5e82e9bb3d33d07d6708702ea4ce
Author: Thierry Reding <thierry.reding@avionic-design.de>
Date:   Wed Nov 21 15:29:29 2012 +0100

    video: Add generic HDMI infoframe helpers

    Add generic helpers to pack HDMI infoframes into binary buffers.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport kernel dma-buf implementation
Luis R. Rodriguez [Sun, 31 Mar 2013 01:16:03 +0000 (18:16 -0700)]
compat: backport kernel dma-buf implementation

dma-buf was added via commit d15bd7ee on v3.3 but completed
in a more sound fassion in later kernels, you should preferably
be at v3.5 a least, so we take the latest dma-buf implementation
and port it for usage on kernels [3.0-3.4]. We take the
implementation as of next-20130328.

This is implemented as a non modular solution upstream but
we can carry the implementation into our compat module.

Note that although commit f23513e8d was added on v2.6.23
that allowed the kernel to call get_unused_fd_flags(flags)
for O_CLOEXEC setting, this routine was not exported until
v3.7. dma-buf makes use of it, and since our backported
dma-buf implementation is modular it means we have to work
around the lack of get_unused_fd_flags() exported symbol
on older kernels. Due to the security concerns noted by
Ulrich on f23513e8 we need to ensure the operatin is
atomic so we fix this on our port of dma-buf for older
kernels by adding our own dma_buf_fd_set_flag() to be called
when dma_buf_fd() is used. This implementation is available
for usage on kernels >= 3.0. We disable it for v3.5 as
we're happy with that implementation.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains \
d15bd7ee445d0702ad801fdaece348fdb79e6581
v3.3-rc1~161^2~2

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains \
f23513e8d96cf5e6cf8d2ff0cb5dd6bbc33995e4
v2.6.23-rc1~894

mcgrof@frijol ~/linux-stable (git::linux-3.2.y)$ git describe --contains \
1a7bd226
v3.7-rc1~134^2~69

Carried over the implementation from linux-next next-20130328

commit d15bd7ee445d0702ad801fdaece348fdb79e6581
Author: Sumit Semwal <sumit.semwal@ti.com>
Date:   Mon Dec 26 14:53:15 2011 +0530

    dma-buf: Introduce dma buffer sharing mechanism

    This is the first step in defining a dma buffer sharing mechanism.

    A new buffer object dma_buf is added, with operations and API to allow easy
    sharing of this buffer object across devices.

    The framework allows:
    - creation of a buffer object, its association with a file pointer, and
       associated allocator-defined operations on that buffer. This operation is
       called the 'export' operation.
    - different devices to 'attach' themselves to this exported buffer object, to
      facilitate backing storage negotiation, using dma_buf_attach() API.
    - the exported buffer object to be shared with the other entity by asking for
       its 'file-descriptor (fd)', and sharing the fd across.
    - a received fd to get the buffer object back, where it can be accessed using
       the associated exporter-defined operations.
    - the exporter and user to share the scatterlist associated with this buffer
       object using map_dma_buf and unmap_dma_buf operations.

    Atleast one 'attach()' call is required to be made prior to calling the
    map_dma_buf() operation.

    Couple of building blocks in map_dma_buf() are added to ease introduction
    of sync'ing across exporter and users, and late allocation by the exporter.

    For this first version, this framework will work with certain conditions:
    - *ONLY* exporter will be allowed to mmap to userspace (outside of this
       framework - mmap is not a buffer object operation),
    - currently, *ONLY* users that do not need CPU access to the buffer are
       allowed.

    More details are there in the documentation patch.

    This is based on design suggestions from many people at the mini-summits[1],
    most notably from Arnd Bergmann <arnd@arndb.de>, Rob Clark <rob@ti.com> and
    Daniel Vetter <daniel@ffwll.ch>.

    The implementation is inspired from proof-of-concept patch-set from
    Tomasz Stanislawski <t.stanislaws@samsung.com>, who demonstrated buffer sharing
    between two v4l2 devices. [2]

    [1]: https://wiki.linaro.org/OfficeofCTO/MemoryManagement
    [2]: http://lwn.net/Articles/454389

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-and-Tested-by: Rob Clark <rob.clark@linaro.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Cc: daniel.vetter@ffwll.ch
Cc: airlied@redhat.com
Cc: sumit.semwal@linaro.org
Cc: rob.clark@linaro.org
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport poll_requested_events() and poll_does_not_wait()
Luis R. Rodriguez [Sun, 31 Mar 2013 00:26:04 +0000 (17:26 -0700)]
compat: backport poll_requested_events() and poll_does_not_wait()

The main thing for the backport was the poll_table key and qproc
fields renames. We only enable this for kernels > 2.6.31 given that
these old fields only exist as of that kernel and this is currently
only used by video drivers which are only supported as of v3.2.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 626cf236
v3.4-rc1~109^2~52

commit 626cf236608505d376e4799adb4f7eb00a8594af
Author: Hans Verkuil <hans.verkuil@cisco.com>
Date:   Fri Mar 23 15:02:27 2012 -0700

    poll: add poll_requested_events() and poll_does_not_wait() functions

    In some cases the poll() implementation in a driver has to do different
    things depending on the events the caller wants to poll for.  An example
    is when a driver needs to start a DMA engine if the caller polls for
    POLLIN, but doesn't want to do that if POLLIN is not requested but instead
    only POLLOUT or POLLPRI is requested.  This is something that can happen
    in the video4linux subsystem among others.

    Unfortunately, the current epoll/poll/select implementation doesn't
    provide that information reliably.  The poll_table_struct does have it: it
    has a key field with the event mask.  But once a poll() call matches one
    or more bits of that mask any following poll() calls are passed a NULL
    poll_table pointer.

    Also, the eventpoll implementation always left the key field at ~0 instead
    of using the requested events mask.

    This was changed in eventpoll.c so the key field now contains the actual
    events that should be polled for as set by the caller.

    The solution to the NULL poll_table pointer is to set the qproc field to
    NULL in poll_table once poll() matches the events, not the poll_table
    pointer itself.  That way drivers can obtain the mask through a new
    poll_requested_events inline.

    The poll_table_struct can still be NULL since some kernel code calls it
    internally (netfs_state_poll() in ./drivers/staging/pohmelfs/netfs.h).  In
    that case poll_requested_events() returns ~0 (i.e.  all events).

    Very rarely drivers might want to know whether poll_wait will actually
    wait.  If another earlier file descriptor in the set already matched the
    events the caller wanted to wait for, then the kernel will return from the
    select() call without waiting.  This might be useful information in order
    to avoid doing expensive work.

    A new helper function poll_does_not_wait() is added that drivers can use
    to detect this situation.  This is now used in sock_poll_wait() in
    include/net/sock.h.  This was the only place in the kernel that needed
    this information.

    Drivers should no longer access any of the poll_table internals, but use
    the poll_requested_events() and poll_does_not_wait() access functions
    instead.  In order to enforce that the poll_table fields are now prepended
    with an underscore and a comment was added warning against using them
    directly.

    This required a change in unix_dgram_poll() in unix/af_unix.c which used
    the key field to get the requested events.  It's been replaced by a call
    to poll_requested_events().

    For qproc it was especially important to change its name since the
    behavior of that field changes with this patch since this function pointer
    can now be NULL when that wasn't possible in the past.

    Any driver accessing the qproc or key fields directly will now fail to compile.

    Some notes regarding the correctness of this patch: the driver's poll()
    function is called with a 'struct poll_table_struct *wait' argument.  This
    pointer may or may not be NULL, drivers can never rely on it being one or
    the other as that depends on whether or not an earlier file descriptor in
    the select()'s fdset matched the requested events.

    There are only three things a driver can do with the wait argument:

    1) obtain the key field:

        events = wait ? wait->key : ~0;

       This will still work although it should be replaced with the new
       poll_requested_events() function (which does exactly the same).
       This will now even work better, since wait is no longer set to NULL
       unnecessarily.

    2) use the qproc callback. This could be deadly since qproc can now be
       NULL. Renaming qproc should prevent this from happening. There are no
       kernel drivers that actually access this callback directly, BTW.

    3) test whether wait == NULL to determine whether poll would return without
       waiting. This is no longer sufficient as the correct test is now
       wait == NULL || wait->_qproc == NULL.

       However, the worst that can happen here is a slight performance hit in
       the case where wait != NULL and wait->_qproc == NULL. In that case the
       driver will assume that poll_wait() will actually add the fd to the set
       of waiting file descriptors. Of course, poll_wait() will not do that
       since it tests for wait->_qproc. This will not break anything, though.

       There is only one place in the whole kernel where this happens
       (sock_poll_wait() in include/net/sock.h) and that code will be replaced
       by a call to poll_does_not_wait() in the next patch.

       Note that even if wait->_qproc != NULL drivers cannot rely on poll_wait()
       actually waiting. The next file descriptor from the set might match the
       event mask and thus any possible waits will never happen.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Jonathan Corbet <corbet@lwn.net>
Reviewed-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport memweight()
Luis R. Rodriguez [Fri, 29 Mar 2013 23:13:17 +0000 (16:13 -0700)]
compat: backport memweight()

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 639b9e34
v3.6-rc1~41^2~73

commit 639b9e34f15e4b2c30068a4e4485586af0cdf709
Author: Akinobu Mita <akinobu.mita@gmail.com>
Date:   Mon Jul 30 14:40:55 2012 -0700

    string: introduce memweight()

    memweight() is the function that counts the total number of bits set in
    memory area.  Unlike bitmap_weight(), memweight() takes pointer and size
    in bytes to specify a memory area which does not need to be aligned to
    long-word boundary.

    [akpm@linux-foundation.org: rename `w' to `ret']
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Anders Larsen <al@alarsen.net>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Tony Luck <tony.luck@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix firmware_class compilation for older kernels
Luis R. Rodriguez [Mon, 1 Apr 2013 01:05:27 +0000 (18:05 -0700)]
compat: fix firmware_class compilation for older kernels

For some reason request_firmware_nowait() is not being
mapped to backport_request_firmware_nowait() when building
compat as a standalone module for older kernels. Fix this
by manually forcing the code with the backport_ prefix.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: build kstrtox for kernel < 2.6.25
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:27 +0000 (20:18 +0100)]
compat: build kstrtox for kernel < 2.6.25

strict_strtol with one l is defined in compat-2.6.25.h code now and
this deactivates this check, use strict_strtoll instead.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: firmware class, remove the compat prefix
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:26 +0000 (20:18 +0100)]
compat: firmware class, remove the compat prefix

This depended on some define changing firmware_* to compat_firmware_*
and this should now be used to generate backport_firmware_*. This makes
it export the expected symbols with the backport prefix.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: do not undef flush_scheduled_work
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:25 +0000 (20:18 +0100)]
compat: do not undef flush_scheduled_work

This caused flush_scheduled_work instead of
backport_flush_scheduled_work being exported.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix export of __sg_page_iter*
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:24 +0000 (20:18 +0100)]
compat: fix export of __sg_page_iter*

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add module_pcmcia_driver
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:23 +0000 (20:18 +0100)]
compat: add module_pcmcia_driver

This is a backport of:
commit 6ed7ffddcf61f668114edb676417e5fb33773b59
Author: H Hartley Sweeten <hsweeten@visionengravers.com>
Date:   Wed Mar 6 11:24:44 2013 -0700

    pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport fb_info->skip_vt_switch using a static inline
Luis R. Rodriguez [Thu, 28 Mar 2013 09:53:23 +0000 (02:53 -0700)]
compat: backport fb_info->skip_vt_switch using a static inline

Commit 3cf2667 as of next-20130301 extended the struct fb_info
with a skip_vt_switch to allow drivers to skip the VT switch
at suspend/resume time. For older kernels we can skip this
as all this switch does is call pm_vt_switch_required() with true
or false depending on this new flag and later
pm_vt_switch_unregister() would not have been made.

compat-drivers was backporting this using #ifdef's but by
integrating a static inline we'd reduce the number of lines
to backport to just 1 line replacement. This would be something
like:

  -       info->skip_vt_switch = true;
  +       fb_enable_skip_vt_switch(info);

For kernels >= 3.10 we'd set the attribute as we do upstream,
for older kernels this would be a no-op.

If this static inline would have been added upstream it would
have meant this collateral evolution would require just adding
a no-op static inline to backport, and no changes as the above
example hunk for every driver that requires the change.

If this static inline ends up upstream *now* it means we do *not*
require the type of hunk above for every driver that requires
the change.

All the code would be left intact !

This is a linux-next 'data structure element collateral evolution'.

Cc: cocci@systeme.lip6.fr
Cc: backports@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport sg_page_iter_page() and sg_page_iter_dma_address()
Luis R. Rodriguez [Thu, 28 Mar 2013 08:42:42 +0000 (01:42 -0700)]
compat: backport sg_page_iter_page() and sg_page_iter_dma_address()

This should be going into the next kernel release, assuming
this will be called 3.10 we stuff into the 3.10 header.
Although this commit does modify the struct sg_page_iter
data structure that was just done to remove something no
longer needed due to the change. This should not impact
older kernels so just keep the original implementation.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 2db76d7c
next-20130328~64^2~6

commit 2db76d7c3c6db93058f983c8240f7c7c25e87ee6
Author: Imre Deak <imre.deak@intel.com>
Date:   Tue Mar 26 15:14:18 2013 +0200

    lib/scatterlist: sg_page_iter: support sg lists w/o backing pages

    The i915 driver uses sg lists for memory without backing 'struct page'
    pages, similarly to other IO memory regions, setting only the DMA
    address for these. It does this, so that it can program the HW MMU
    tables in a uniform way both for sg lists with and without backing pages.

    Without a valid page pointer we can't call nth_page to get the current
    page in __sg_page_iter_next, so add a helper that relevant users can
    call separately. Also add a helper to get the DMA address of the current
    page (idea from Daniel).

    Convert all places in i915, to use the new API.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport ktime_get_monotonic_offset()
Luis R. Rodriguez [Thu, 28 Mar 2013 02:16:56 +0000 (19:16 -0700)]
compat: backport ktime_get_monotonic_offset()

The commit a80b83b7 exported ktime_get_monotonic_offset()
but note that this was already in place on the header
files declared as extern, it was just never exported.
To work around the double possible declaration issue
with older kernels fortunately the LINUX_BACKPORT()
macro comes to the rescue by encofring our version
to be declared and used in backport code. Note that
this was added due to commit c61eef72 added as of
v3.8 for DRM drivers that need access to timestamps that
do no do not jump, unfortunately for older kernels we
can't port that since it requires access to a static
variable on the kernel, so just use the timestamps that
jump.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains a80b83b7
v3.5-rc6~10^2~15^2~30

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains c61eef72
v3.8-rc1~42^2~170

commit a80b83b7b8456e9b475346c2e01d7e210883208c
Author: John Stultz <john.stultz@linaro.org>
Date:   Fri Feb 3 00:19:07 2012 -0800

    Input: add infrastructure for selecting clockid for event time stamps

    As noted by Arve and others, since wall time can jump backwards, it is
    difficult to use for input because one cannot determine if one event
    occurred before another or for how long a key was pressed.

    However, the timestamp field is part of the kernel ABI, and cannot be
    changed without possibly breaking existing users.

    This patch adds a new IOCTL that allows a clockid to be set in the
    evdev_client struct that will specify which time base to use for event
    timestamps (ie: CLOCK_MONOTONIC instead of CLOCK_REALTIME).

    For now we only support CLOCK_MONOTONIC and CLOCK_REALTIME, but
    in the future we could support other clockids if appropriate.

    The default remains CLOCK_REALTIME, so we don't change the ABI.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Daniel Kurtz <djkurtz@google.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
commit c61eef726a78ae77b6ce223d01ea2130f465fe5c
Author: Imre Deak <imre.deak@intel.com>
Date:   Tue Oct 23 18:53:26 2012 +0000

    drm: add support for monotonic vblank timestamps

    Jumps in the vblank and page flip event timestamps cause trouble for
    clients, so we should avoid them. The timestamp we get currently with
    gettimeofday can jump, so use instead monotonic timestamps.

    For backward compatibility use a module flag to revert back to using
    gettimeofday timestamps. Add also a DRM_CAP_TIMESTAMP_MONOTONIC flag
    that is simply a read only version of the module flag, so that clients
    can query this without depending on sysfs.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: declare eth_hw_addr_random() under LINUX_BACKPORT()
Luis R. Rodriguez [Thu, 28 Mar 2013 02:23:27 +0000 (19:23 -0700)]
compat: declare eth_hw_addr_random() under LINUX_BACKPORT()

Debian kernels cherry picked the commit that added this,
so LINUX_BACKPORT() comes to the rescue.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: declare kmalloc_array() through LINUX_BACKPORT()
Luis R. Rodriguez [Thu, 28 Mar 2013 02:20:32 +0000 (19:20 -0700)]
compat: declare kmalloc_array() through LINUX_BACKPORT()

This fixes compilation with Debian 3.2 kernels that
cherry picked the commit that added that call (a8203725).

commit a8203725dfded5c1f79dca3368a4a273e24b59bb
Author: Xi Wang <xi.wang@gmail.com>
Date:   Mon Mar 5 15:14:41 2012 -0800

    slab: introduce kmalloc_array()

    Introduce a kmalloc_array() wrapper that performs integer overflow
    checking without zeroing the memory.

Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Suggested-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix cordic backport header
Luis R. Rodriguez [Tue, 26 Mar 2013 22:12:58 +0000 (15:12 -0700)]
compat: fix cordic backport header

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains \
10f8113ecb76eea72f96c7cfb72d7fed7c282565
v3.1-rc1~24^2~10^2^2~515

The cordic backport added the cordic library
and the cordic header. It correctly only compiled
cordic for kernels < 3.1 but the header however was
left intact. This is non-issue until cordic itself
gets updated with some new features or changes but
also an issue was created when we switched the
backort namespace. The issue is that the header
declares backport_cordic_calc_iq() exists while
it actually is not compiled on newer kernels.

Fix this by doing the kernel revision check on the
backported header, otherwise use #include_next to
get the next header, the proper kernel header.

This does not have to be added to the older releases
given that the header is the same for older kernels,
and we are not exporting the symbol twice given that
the proper check was already in place for cordic.c.

== ckmake-report.log ==

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

real    0m32.956s
user    12m14.398s
sys     2m12.304s

Reported-by: Camaleón <noelamac@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport lib/scatterlist.c from 0db9299f
Luis R. Rodriguez [Fri, 22 Mar 2013 19:33:38 +0000 (19:33 +0000)]
compat: backport lib/scatterlist.c from 0db9299f

Backport the lib/scatterlist.c addition, this required
just removing the kmemleak stuff as that is not available
on older kernels.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 0db9299f
v2.6.25-rc1~1173^2~2

commit 0db9299f48ebd4a860d6ad4e1d36ac50671d48e7
Author: Jens Axboe <jens.axboe@oracle.com>
Date:   Fri Nov 30 09:16:50 2007 +0100

    SG: Move functions to lib/scatterlist.c and add sg chaining allocator helpers

    Manually doing chained sg lists is not trivial, so add some helpers
    to make sure that drivers get it right.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport sg_alloc_table_from_pages() from efc42bc9
Luis R. Rodriguez [Thu, 21 Mar 2013 23:29:23 +0000 (23:29 +0000)]
compat: backport sg_alloc_table_from_pages() from efc42bc9

This backports sg_alloc_table_from_pages() added via commit efc42bc9

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains efc42bc9
v3.6-rc1~57^2~11

commit efc42bc98058a36d761b16a114823db1a902ed05
Author: Tomasz Stanislawski <t.stanislaws@samsung.com>
Date:   Mon Jun 18 09:25:01 2012 +0200

    scatterlist: add sg_alloc_table_from_pages function

    This patch adds a new constructor for an sg table. The table is constructed
    from an array of struct pages. All contiguous chunks of the pages are merged
    into a single sg nodes. A user may provide an offset and a size of a buffer if
    the buffer is not page-aligned.

    The function is dedicated for DMABUF exporters which often perform conversion
    from an page array to a scatterlist. Moreover the scatterlist should be
    squashed in order to save memory and to speed-up the process of DMA mapping
    using dma_map_sg.

    The code is based on the patch 'v4l: vb2-dma-contig: add support for
    scatterlist in userptr mode' and hints from Laurent Pinchart.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix backport_ prefix change on compat module
Luis R. Rodriguez [Thu, 21 Mar 2013 23:17:59 +0000 (23:17 +0000)]
compat: fix backport_ prefix change on compat module

The commit a05e783c addressed the main compat module
routine name changes but failed to fix two calls. Fix
this.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport sg page iterator a321e91b
Luis R. Rodriguez [Thu, 21 Mar 2013 21:16:42 +0000 (21:16 +0000)]
compat: backport sg page iterator a321e91b

This backports commit a321e91b which adds the
scatterlist simple page iterator.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains a321e91b
v3.9-rc1~46^2~149

commit a321e91b6d73ed011ffceed384c40d2785cf723b
Author: Imre Deak <imre.deak@intel.com>
Date:   Wed Feb 27 17:02:56 2013 -0800

    lib/scatterlist: add simple page iterator

    Add an iterator to walk through a scatter list a page at a time starting
    at a specific page offset.  As opposed to the mapping iterator this is
    meant to be small, performing well even in simple loops like collecting
    all pages on the scatterlist into an array or setting up an iommu table
    based on the pages' DMA address.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: use backport_ prefix for main compat module calls
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: use backport_ prefix for main compat module calls

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for uidgid
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for uidgid

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for pm_qos_params
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for pm_qos_params

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for kfifo
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for kfifo

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for crc8
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for crc8

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for cordic
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for cordic

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v3.8
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v3.8

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v3.7
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v3.7

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v3.4
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v3.4

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v3.3
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v3.3

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v3.2
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v3.2

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v3.1
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v3.1

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v3.0
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v3.0

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.39
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.39

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.38
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:14 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.38

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.37
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.37

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.36
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.36

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.35
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.35

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.34
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.34

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.33
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.33

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.32
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.32

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.31
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.31

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.29
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.29

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.28
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.28

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.27
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.27

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.26
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.26

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.25
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.25

There is one change needed here to get compilation
working on v2.6.24, strict_strtoull is now being
redefined and because of a change that went into
v2.6.38.4 kstrtoul() was added there and the old
strict_strtoul was made a define from it. To help
aid the older kernels such as 2.6.24 that need
the old strict_strtoul we simply check if strict_strtoull
is defined, then we know you're on >= 2.6.38.4 and
don't need kstrtoul() and friends.

If strict_strtoull ever needs to be backported for
older kernels we'll have to revisit this check.

It is worth documenting here why this change went into
v2.6.38.4 and not the orignal v2.6.38 release, so
the commit is provided.

commit 280a1c38c907ab1e2617bdcef66de6bc70897253
Author: Alexey Dobriyan <adobriyan@gmail.com>

    kstrto*: converting strings to integers done (hopefully) right

    commit 33ee3b2e2eb9b4b6c64dcf9ed66e2ac3124e748c upstream.

    1. simple_strto*() do not contain overflow checks and crufty,
       libc way to indicate failure.
    2. strict_strto*() also do not have overflow checks but the name and
       comments pretend they do.
    3. Both families have only "long long" and "long" variants,
       but users want strtou8()
    4. Both "simple" and "strict" prefixes are wrong:
       Simple doesn't exactly say what's so simple, strict should not exist
       because conversion should be strict by default.

    The solution is to use "k" prefix and add convertors for more types.
    Enter
        kstrtoull()
        kstrtoll()
        kstrtoul()
        kstrtol()
        kstrtouint()
        kstrtoint()

        kstrtou64()
        kstrtos64()
        kstrtou32()
        kstrtos32()
        kstrtou16()
        kstrtos16()
        kstrtou8()
        kstrtos8()

    Include runtime testsuite (somewhat incomplete) as well.

    strict_strto*() become deprecated, stubbed to kstrto*() and
    eventually will be removed altogether.

    Use kstrto*() in code today!

    Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if
          they'll be unused at runtime. This is temporarily solution,
          because I don't want to hardcode list of archs where these
          functions aren't needed. Current solution with sizeof() and
          __alignof__ at least always works.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tested with ckmake:

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.24
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.24

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: embrace LINUX_BACKPORT() for v2.6.23
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: embrace LINUX_BACKPORT() for v2.6.23

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add LINUX_BACKPORT() for prefixing symbols
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: add LINUX_BACKPORT() for prefixing symbols

Ben Hutchings <ben@decadent.org.uk> notes that "compat"
is already taken as a prefix for symbols and while this
is only slightly true in practice its best we avoid any
future issues.

Others in the past have noted issues with symbols exported
by backporting effort to conflict with other symbols that
might be preferred by the running kernel. In the worst
case scenerio we'd have the same subsystems with two eras
with two sets of drivers using a subystem from an era each.
This patch doesn't address that but tries to address the
namespace conflict by compat itself. The best alternative I
was hoping for was to use core module symbol namespaces but
after reviewing that effort introduced in 2007
by Andi Kleen [0] I see in the end Rusty Russell nack'd
these patches [1] so we're left with dealing with symbol
renaming.

Define LINUX_BACKPORT() to be used to allow us to rename
symbols with a backport_ prefix. The the cleanest, but
its a start.

[0] http://thread.gmane.org/gmane.linux.network/78674
[1] http://article.gmane.org/gmane.linux.kernel/606885

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: use EXPORT_SYMBOL_GPL()
Luis R. Rodriguez [Wed, 20 Mar 2013 00:57:13 +0000 (17:57 -0700)]
compat: use EXPORT_SYMBOL_GPL()

This was the intent all along, however some symbols have
slipped. The goal is always clear: if you are using any
of this code at run time this is making your code derivative
works of the Linux kernel and therefore GPLv2.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix ckmake to skip same base kernels
Luis R. Rodriguez [Fri, 15 Mar 2013 02:05:47 +0000 (19:05 -0700)]
compat: fix ckmake to skip same base kernels

The ckmake script was allowing testing of compilation
of kernels even if the base kernels were the same. This
fixes it to skip them, trimming down test kernel compilation
down and not caring what old kernels you keep on your
system. This also now prints the RC release correctly.

The get_rel_spec() routine is based on the rel-html
get_rel_spec() routine and rel-html is AGPL but since
I wrote it I relicense a modified version of that
routine here to GPLv2.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport print_hex_dump_debug()
Luis R. Rodriguez [Thu, 14 Mar 2013 22:08:01 +0000 (15:08 -0700)]
compat: backport print_hex_dump_debug()

This backports print_hex_dump_debug() from commit
7a555613, which itself required a definition from
commit 07613b0b.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 7a555613
v3.9-rc1~128^2~135

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 07613b0b
v3.2-rc1~184^2~6

commit 7a555613eb77c69eb6e48b61bc5f72dd42fa1780
Author: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Date:   Wed Dec 5 16:48:27 2012 -0500

    dynamic_debug: dynamic hex dump

    Introduce print_hex_dump_debug() that can be dynamically controlled, similar to
    pr_debug.

    Also, make print_hex_dump_bytes() dynamically controlled

    Implement only 'p' flag (_DPRINTK_FLAGS_PRINT) to keep it simple since hex dump prints
    multiple lines and long prefix would impact readability.
    To provide line/file etc. information, use pr_debug or similar
    before/after print_hex_dump_debug()

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 07613b0b5ef8570033aa806d1731dce599862223
Author: Jason Baron <jbaron@redhat.com>
Date:   Tue Oct 4 14:13:15 2011 -0700

    dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions

    Replace the repetitive struct _ddebug descriptor definitions with a new
    DECLARE_DYNAMIC_DEBUG_META_DATA(name, fmt) macro.

    [akpm@linux-foundation.org: s/DECLARE/DEFINE/]
Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix compilation on 2.6.24 based on next-20130312
Luis R. Rodriguez [Thu, 14 Mar 2013 18:58:10 +0000 (11:58 -0700)]
compat: fix compilation on 2.6.24 based on next-20130312

drivers/net/wireless/iwlwifi/mvm/mac80211.c ends up
including include/net/inet_hashtables.h which in 2.6.24
has a routine called __inet_lookup_established() that
uses the sk_for_each(1, 2, 3). The patch below by Hauke
backported the change that went into the kernel that
made sk_for_each(1, 3) use two arguments. It turns out
that upstream we realized that the second argument was
useless. The header however uses it though so the trick
didn't work for 2.6.24 if code used it there.

We fix it using a nasty hack by ensuring that when the
header file is included we redefine that routine to
something else, then we udef it, and then define our
new version that only uses the 2 argument form of
sk_for_each(). This is a nasty way to solve it but
not sure if there is anything cleaner.

commit dbc390647a841061954f67ea226221fc7f4b3836
Author: Hauke Mehrtens <hauke@hauke-m.de>
Date:   Sun Feb 10 20:10:10 2013 +0100

    compat: backport drop of node parameter from iterators

    This patch backports the following commit in mainline linux kernel:

      commit 0bbacca7c3911451cea923b0ad6389d58e3d9ce9
      Author: Sasha Levin <sasha.levin@oracle.com>
      Date:   Thu Feb 7 12:32:18 2013 +1100

          hlist: drop the node parameter from iterators

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport rename of random32 to prandom
Luis R. Rodriguez [Wed, 13 Mar 2013 09:51:15 +0000 (02:51 -0700)]
compat: backport rename of random32 to prandom

mcgrof@frijol ~/linux-next (git::master)$ git describe \
--contains  496f2f93b1cc286f5a4f4f9acdc1e5314978683f
v3.8-rc1~74^2~22

commit 496f2f93b1cc286f5a4f4f9acdc1e5314978683f
Author: Akinobu Mita <akinobu.mita@gmail.com>
Date:   Mon Dec 17 16:04:23 2012 -0800

    random32: rename random32 to prandom

    This renames all random32 functions to have 'prandom_' prefix as follows:

      void prandom_seed(u32 seed);      /* rename from srandom32() */
      u32 prandom_u32(void);            /* rename from random32() */
      void prandom_seed_state(struct rnd_state *state, u64 seed);
                                /* rename from prandom32_seed() */
      u32 prandom_u32_state(struct rnd_state *state);
                                /* rename from prandom32() */

    The purpose of this renaming is to prevent some kernel developers from
    assuming that prandom32() and random32() might imply that only
    prandom32() was the one using a pseudo-random number generator by
    prandom32's "p", and the result may be a very embarassing security
    exposure.  This concern was expressed by Theodore Ts'o.

    And furthermore, I'm going to introduce new functions for getting the
    requested number of pseudo-random bytes.  If I continue to use both
    prandom32 and random32 prefixes for these functions, the confusion
    is getting worse.

    As a result of this renaming, "prandom_" is the common prefix for
    pseudo-random number library.

    Currently, srandom32() and random32() are preserved because it is
    difficult to rename too many users at once.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Robert Love <robert.w.love@intel.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: David Laight <david.laight@aculab.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add 3.9-rc1 vanilla kernel to list of kernels to test
Luis R. Rodriguez [Thu, 7 Mar 2013 20:58:29 +0000 (12:58 -0800)]
compat: add 3.9-rc1 vanilla kernel to list of kernels to test

This adds the vanilla 3.9-rc1 kernel to the list set list of
test kernels we'll test.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add file_inode()
Hauke Mehrtens [Wed, 27 Feb 2013 23:54:58 +0000 (00:54 +0100)]
compat: add file_inode()

This adds a backport for file_inode().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: update kernel versions in bin/get-compat-kernels
Hauke Mehrtens [Tue, 19 Feb 2013 22:26:31 +0000 (23:26 +0100)]
compat: update kernel versions in bin/get-compat-kernels

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: deactivate netdev_set_default_ethtool_ops() for some 3.7 kernels
Hauke Mehrtens [Mon, 18 Feb 2013 21:37:36 +0000 (22:37 +0100)]
compat: deactivate netdev_set_default_ethtool_ops() for some 3.7 kernels

netdev_set_default_ethtool_ops() was backported in 3.7.8 and compat
should not ship it on any more recent versions any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: backport of lock_map_acquire() and lock_map_release()
Hauke Mehrtens [Wed, 13 Feb 2013 19:51:00 +0000 (20:51 +0100)]
compat: backport of lock_map_acquire() and lock_map_release()

This is a backport of:

commit 3295f0ef9ff048a4619ede597ad9ec9cab725654
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Aug 11 10:30:30 2008 +0200

    lockdep: rename map_[acquire|release]() => lock_map_[acquire|release]()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: backport of lock_map_acquire_read()
Hauke Mehrtens [Wed, 13 Feb 2013 19:50:02 +0000 (20:50 +0100)]
compat: backport of lock_map_acquire_read()

This is a backport of:

commit e159489baa717dbae70f9903770a6a4990865887
Author: Tejun Heo <tj@kernel.org>
Date:   Sun Jan 9 23:32:15 2011 +0100

    workqueue: relax lockdep annotation on flush_work()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: add empty struct watchdog_device
Hauke Mehrtens [Wed, 13 Feb 2013 19:33:51 +0000 (20:33 +0100)]
compat: add empty struct watchdog_device

This is needed in some header file but so driver accesses this struct.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: add missing platform devid constants
Hauke Mehrtens [Wed, 13 Feb 2013 18:23:13 +0000 (19:23 +0100)]
compat: add missing platform devid constants

They are both set to none and will result in no id being added to the
device.

This is a backport of:

commit 689ae231afbac8979f96100b372a5a73458baaa9
Author: Jean Delvare <khali@linux-fr.org>
Date:   Fri Jul 27 22:14:59 2012 +0200

    platform: Add support for automatic device IDs

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: add PCI_EXP_LNKCAP_SLS_2_5GB and PCI_EXP_LNKCAP_SLS_5_0GB
Hauke Mehrtens [Wed, 13 Feb 2013 18:23:00 +0000 (19:23 +0100)]
compat: add PCI_EXP_LNKCAP_SLS_2_5GB and PCI_EXP_LNKCAP_SLS_5_0GB

This is a backport of:

commit 130f1b8f35f14d27c43da755f3c9226318c17f57
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Wed Dec 26 10:39:23 2012 -0700

    PCI: Add PCIe Link Capability link speed and width names

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: move tty_flip_buffer_push() and tty_insert_flip_string()
Hauke Mehrtens [Sun, 10 Feb 2013 21:49:06 +0000 (22:49 +0100)]
compat: move tty_flip_buffer_push() and tty_insert_flip_string()

These backports are also needed for kernel 3.7 and 3.8.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: add kernel 3.8-rc7 and update others
Hauke Mehrtens [Sun, 10 Feb 2013 19:51:22 +0000 (20:51 +0100)]
compat: add kernel 3.8-rc7 and update others

This adds 3.8-rc7 to the get.compat-kernels fetch script and updates
some kernel versions to the last minor version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: check if efi_enabled() was already backported
Hauke Mehrtens [Sun, 10 Feb 2013 20:50:15 +0000 (21:50 +0100)]
compat: check if efi_enabled() was already backported

efi_enabled() gets backported to older kernel versions and if this is
the case compat should not try to do the same.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: backport drop of node parameter from iterators
Hauke Mehrtens [Sun, 10 Feb 2013 19:10:10 +0000 (20:10 +0100)]
compat: backport drop of node parameter from iterators

This patch backports the following commit in mainline linux kernel:

  commit 0bbacca7c3911451cea923b0ad6389d58e3d9ce9
  Author: Sasha Levin <sasha.levin@oracle.com>
  Date:   Thu Feb 7 12:32:18 2013 +1100

      hlist: drop the node parameter from iterators

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: backport idr_alloc() usage
Hauke Mehrtens [Sun, 10 Feb 2013 18:45:10 +0000 (19:45 +0100)]
compat: backport idr_alloc() usage

This backports a patch series send by Tejun Heo:
https://lkml.org/lkml/2013/2/2/159

11 years agocompat: netdev_set_default_ethtool_ops() is not in kernel 3.7.5
Hauke Mehrtens [Sun, 3 Feb 2013 17:25:07 +0000 (18:25 +0100)]
compat: netdev_set_default_ethtool_ops() is not in kernel 3.7.5

netdev_set_default_ethtool_ops() should be added to compat for every
3.7.X series kernel as it is also not in 3.7.5.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: backport BUILD_BUG_ON from recent kernel
Hauke Mehrtens [Sun, 3 Feb 2013 16:20:56 +0000 (17:20 +0100)]
compat: backport BUILD_BUG_ON from recent kernel

This version of BUILD_BUG_ON does not have the following error on an
old kernel version (2.6.32 - 2.6.37):

drivers/net/wireless/iwlwifi/mvm/quota.c:145:24: error: bit-field
'<anonymous>' width not an integer constant

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: adapt signature change of tty_flip_buffer_push() and tty_insert_flip_string()
Hauke Mehrtens [Sun, 3 Feb 2013 14:08:46 +0000 (15:08 +0100)]
compat: adapt signature change of tty_flip_buffer_push() and tty_insert_flip_string()

The method signature of tty_flip_buffer_push() and
tty_insert_flip_string() was changed in these commits and this converts
it to the old behavior.

commit 2e124b4a390ca85325fae75764bef92f0547fa25
Author: Jiri Slaby <jslaby@suse.cz>
Date:   Thu Jan 3 15:53:06 2013 +0100

    TTY: switch tty_flip_buffer_push

commit 05c7cd39907184328f48d3e7899f9cdd653ad336
Author: Jiri Slaby <jslaby@suse.cz>
Date:   Thu Jan 3 15:53:04 2013 +0100

    TTY: switch tty_insert_flip_string

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: add efi_enabled()
Hauke Mehrtens [Sun, 3 Feb 2013 13:01:39 +0000 (14:01 +0100)]
compat: add efi_enabled()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: backport nla_put_be{16,32,64}()
Johannes Berg [Thu, 24 Jan 2013 10:44:56 +0000 (11:44 +0100)]
compat: backport nla_put_be{16,32,64}()

I intend to use these in nl80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: ckmake: do not start all build at the same time
Hauke Mehrtens [Thu, 24 Jan 2013 23:44:09 +0000 (00:44 +0100)]
compat: ckmake: do not start all build at the same time

When all builds are started at the same time this causes problems like,
because all threads want to access the same file.

In the compat-drivers build this resulted in this error for some threads:
./scripts/gen-compat-autoconf.sh: /usr/bin/env: bad interpreter: Text file busy

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: ckmake: remove lots of warning spam for the log
Hauke Mehrtens [Thu, 24 Jan 2013 21:15:21 +0000 (22:15 +0100)]
compat: ckmake: remove lots of warning spam for the log

Set the environment variable KCFLAGS = "-Wno-unused-but-set-variable"
to remove lots of spam from the log.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: ckmake: make return code 2 is error
Hauke Mehrtens [Thu, 24 Jan 2013 20:37:34 +0000 (21:37 +0100)]
compat: ckmake: make return code 2 is error

If make returns 2 it should be treat as an error and not as ok.
The documentation says 2 is returned if make encountered an error:
https://www.gnu.org/software/make/manual/html_node/Running.html

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: update kernel versions in bin/get-compat-kernels
Hauke Mehrtens [Wed, 23 Jan 2013 23:41:41 +0000 (00:41 +0100)]
compat: update kernel versions in bin/get-compat-kernels

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: do not access default_ethtool_ops
Hauke Mehrtens [Wed, 23 Jan 2013 22:54:45 +0000 (23:54 +0100)]
compat: do not access default_ethtool_ops

&default_ethtool_ops is not exported in kernel 3.7.4 and earlier and it
should be be accessed from compat.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: fix compile errors when assembly is built into modules
Felix Fietkau [Wed, 23 Jan 2013 21:22:44 +0000 (13:22 -0800)]
compat: fix compile errors when assembly is built into modules

On powerpc, modules can be compiled and linked with an assembly file, adding
missing symbols that the compiler references when using -Os.

== ckmake-report.log ==

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.50              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.33              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.17              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.5               [  OK  ]
24  3.7.0               [  OK  ]

real    0m33.803s
user    11m24.519s
sys     3m39.690s

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 years agocompat: remove trailing erroneous semicolon from compat-3.8.c
Luis R. Rodriguez [Tue, 22 Jan 2013 00:00:49 +0000 (16:00 -0800)]
compat: remove trailing erroneous semicolon from compat-3.8.c

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport netdev_set_default_ethtool_ops()
Luis R. Rodriguez [Mon, 21 Jan 2013 21:31:01 +0000 (13:31 -0800)]
compat: backport netdev_set_default_ethtool_ops()

Stanislaw found that due to commit 2c60db03 by Eric Dumazet
the wireless core was not assigning driver specific ethtool_ops.
This was fixed by Stanislaw's commit d07d7507 which added
netdev_set_default_ethtool_ops(). Since Eric's commit 2c60db03
is on v3.7-rc1 Stanislaw's fix is required down to v3.7 as well.
The d07d7507 commit is currently present on v3.8-rc4 and is on
its way to what we think may be v3.7.5. Because of this kernels
older than v3.7.5 will require the full implementation while
older kernels than v3.7.0 will require just assigning the ops
passed only if netdev has no ops already set just as we used
to have it implemented on cfg80211.

mcgrof@frijol ~/linux-stable (git::linux-3.8.y)$ git describe --contains 2c60db
v3.7-rc1~145^2~142

mcgrof@frijol ~/linux-stable (git::linux-3.8.y)$ git describe --contains d07d75
v3.8-rc4~29^2~4

ckmake results:

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.50              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.33              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.17              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.5               [  OK  ]
24  3.7.0               [  OK  ]

real    0m34.791s
user    11m38.572s
sys     3m56.927s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix warning in usb_autopm_get_interface_no_{resume,suspend}
Hauke Mehrtens [Wed, 9 Jan 2013 16:34:23 +0000 (17:34 +0100)]
compat: fix warning in usb_autopm_get_interface_no_{resume,suspend}

This fixes the following warning on kernel version <= 2.6.31.

/compat/compat-2.6.33.c: In function ‘usb_autopm_get_interface_no_resume’:
/compat/compat-2.6.33.c:32:2: warning: passing argument 1 of ‘atomic_inc’ from incompatible pointer type [enabled by default]
/arch/x86/include/asm/atomic_64.h:85:20: note: expected ‘struct atomic_t *’ but argument is of type ‘int *’
/compat/compat-2.6.33.c: In function ‘usb_autopm_put_interface_no_suspend’:
/compat/compat-2.6.33.c:51:2: warning: passing argument 1 of ‘atomic_dec’ from incompatible pointer type [enabled by default]
/arch/x86/include/asm/atomic_64.h:98:20: note: expected ‘struct atomic_t *’ but argument is of type ‘int *’

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add ETHTOOL_FWVERS_LEN
Hauke Mehrtens [Wed, 9 Jan 2013 16:34:22 +0000 (17:34 +0100)]
compat: add ETHTOOL_FWVERS_LEN

In older kernel version this was hard coded to 32

This was added in this commit:
commit 141518c95870228da4e050fbe31a8f0c9df82c72
Author: Matt Carlson <mcarlson@broadcom.com>
Date:   Thu Dec 3 08:36:22 2009 +0000

    tg3: Add some VPD preprocessor constants

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add simple_write_to_buffer
Hauke Mehrtens [Wed, 9 Jan 2013 16:34:21 +0000 (17:34 +0100)]
compat: add simple_write_to_buffer

This was copied from fs/libfs.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add missing return value to netif_set_real_num_tx_queues
Hauke Mehrtens [Wed, 9 Jan 2013 16:34:20 +0000 (17:34 +0100)]
compat: add missing return value to netif_set_real_num_tx_queues

This fixes the following warning:

compat/compat-2.6.35.o
compat/compat-2.6.35.c: In function ‘netif_set_real_num_tx_queues’:
compat/compat-2.6.35.c:45:1: warning: control reaches end of non-void function [-Wreturn-type]

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix warning of missing struct netdev_queue
Hauke Mehrtens [Wed, 9 Jan 2013 16:34:19 +0000 (17:34 +0100)]
compat: fix warning of missing struct netdev_queue

Fix a warning on kernel version <= 2.6.26:
include/linux/compat-3.3.h:44:49: warning: ‘struct netdev_queue’ declared inside parameter list [enabled by default]

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: export platform_device_register_data()
Hauke Mehrtens [Thu, 27 Dec 2012 17:19:41 +0000 (18:19 +0100)]
compat: export platform_device_register_data()

platform_device_register_data has to be exported for kernel
version < 2.6.33. Some of these kernel have this method but do not
export it and only kernel version < 2.6.28 does not have this function.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix compiler warning in nla_get_s64()
Hauke Mehrtens [Thu, 27 Dec 2012 17:19:40 +0000 (18:19 +0100)]
compat: fix compiler warning in nla_get_s64()

This fixes the following warning:

compat/include/linux/compat-3.7.h: In function ‘nla_get_s64’:
compat/include/linux/compat-3.7.h:191:2: warning: passing argument 2 of ‘nla_memcpy’ discards ‘const’ qualifier from pointer target type [enabled by default]
In file included from include/net/genetlink.h:5:0,
                 from compat/include/linux/compat-2.6.32.h:12,
                 from compat/include/linux/compat-2.6.29.h:13,
                 from compat/include/linux/compat-2.6.h:50,
                 from <command-line>:0:

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: move HID_USB_DEVICE and HID_BLUETOOTH_DEVICE
Luis R. Rodriguez [Thu, 20 Dec 2012 02:17:56 +0000 (18:17 -0800)]
compat: move HID_USB_DEVICE and HID_BLUETOOTH_DEVICE

These were actually introduced in 2.6.28.h and as such
we were getting a lot of redefinition warnings which
can cause delays in compilation. Lets clear this up ;)

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add ionice to ckmake again
Luis R. Rodriguez [Thu, 20 Dec 2012 00:36:38 +0000 (16:36 -0800)]
compat: add ionice to ckmake again

This adds back the ionice settings on the make
call. The copying of content on the thread is not
yet reniced and although Python has utilities to
modify niceness and ionice there are privileged
requirements on the levels we want and I'm not too
sure yet how to resolve this in a reasonable way.

This for example fails:

p = psutil.Process(os.getpid())
delta = -20 - os.nice(0)
p.set_nice(delta)
p.set_ionice(psutil.IOPRIO_CLASS_RT)

This improves perfomance by about 1 minute.

real    17m53.079s
user    446m12.733s
sys     66m13.372s

Since ckmake is multithreaded now though it meant that
we had to copy the content of the code that we want to
compile for each kernel on a new directory. This work
is not reprioritized as it is nice so the best thing
I can think of is we renice the ckmake process our
ourselves and therefore children would properly inherit
the priority.

ionice -c 3 nice -n 20 ckmake

Can we do better without networking the solution ?

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: rewrite ckmake in Python
Luis R. Rodriguez [Wed, 19 Dec 2012 04:06:39 +0000 (20:06 -0800)]
compat: rewrite ckmake in Python

This rewrites ckmake in Python. I suspected that we can still
improve compilation down by making ckmake multithreaded.
I was right, and in order to make this multithreaded I picked
python and ncurses to display results. This shaves down 6
minutes for compilation of compat-drivers on 24 kernels from
25 minutes down to 19 minutes. This can likely be improved
further.

Before:

real    25m28.705s
user    506m26.003s
sys     69m45.990s

After:

real    19m4.757s
user    486m26.236s
sys     70m5.579s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add 3.2 and 3.3 kernels to rebuild headers
Luis R. Rodriguez [Sat, 15 Dec 2012 00:59:59 +0000 (16:59 -0800)]
compat: add 3.2 and 3.3 kernels to rebuild headers

The 3.2 and 3.3 kernels also require rebuilding
kernel headers for glibc dependencies.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix get-compat-kernels for rebuilding kernel headers
Luis R. Rodriguez [Sat, 15 Dec 2012 00:54:01 +0000 (16:54 -0800)]
compat: fix get-compat-kernels for rebuilding kernel headers

We need to rebuild headers for kernels >= 3.4, and while at
it account for 4.0 and x.y kernels here x > 3.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add support for forcing get-compat-kernels
Luis R. Rodriguez [Sat, 15 Dec 2012 00:32:21 +0000 (16:32 -0800)]
compat: add support for forcing get-compat-kernels

Useful for cronjobs.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add v3.7 to get-compat-kernels
Luis R. Rodriguez [Sat, 15 Dec 2012 00:26:14 +0000 (16:26 -0800)]
compat: add v3.7 to get-compat-kernels

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: adjust get-compat-kernels for root users
Luis R. Rodriguez [Sat, 15 Dec 2012 00:22:35 +0000 (16:22 -0800)]
compat: adjust get-compat-kernels for root users

Prefix the download / target directory with compat-ksrc/
if root is used.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: adjust get-compat-kernels for root usage
Luis R. Rodriguez [Sat, 15 Dec 2012 00:20:34 +0000 (16:20 -0800)]
compat: adjust get-compat-kernels for root usage

If the user id is root then don't assume we want it
under / but instead use the current directory.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>