]> git.openfabrics.org - ~tnikolova/compat/.git/log
~tnikolova/compat/.git
12 years agocompat: add module_pci_driver
Hauke Mehrtens [Sun, 22 Apr 2012 21:59:24 +0000 (23:59 +0200)]
compat: add module_pci_driver

module_pci_driver is needed to register the pci driver to the pci sub system.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: add ndo_do_ioctl()
Luis R. Rodriguez [Wed, 11 Apr 2012 01:45:25 +0000 (18:45 -0700)]
compat: add ndo_do_ioctl()

This helps reduce the delta on backporting calls of the
netdev's ioctl callback. Instead of ifdef'ing on where
the ioctl callback lies in different kernels we take
care of that for all kernels.

This lets us for example change this backport:

@@ -925,8 +954,13 @@ static int wireless_process_ioctl(struct
return private(dev, iwr, cmd, info, handler);
}
/* Old driver API : call driver ioctl handler */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
if (dev->netdev_ops->ndo_do_ioctl)
return dev->netdev_ops->ndo_do_ioctl(dev, ifr, cmd);
+#else
+       if (dev->do_ioctl)
+               return dev->do_ioctl(dev, ifr, cmd);
+#endif
return -EOPNOTSUPP;
 }

To this:

--- a/net/wireless/wext-core.c
+++ b/net/wireless/wext-core.c
@@ -925,9 +925,7 @@ static int wireless_process_ioctl(struct
return private(dev, iwr, cmd, info, handler);
}
/* Old driver API : call driver ioctl handler */
-       if (dev->netdev_ops->ndo_do_ioctl)
-               return dev->netdev_ops->ndo_do_ioctl(dev, ifr, cmd);
-       return -EOPNOTSUPP;
+       return ndo_do_ioctl(dev, ifr, cmd);
 }

 /* If command is `set a parameter', or `get the encoding parameters',

This shows more deletions than additions. This is what we want.

If we add ndo_do_ioctl() upstream then this would require 0 delta!

Trying kernel                  3.4.0-030400rc1-generic [OK]
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport netif_wake_subqueue
Johannes Berg [Fri, 6 Apr 2012 21:00:34 +0000 (23:00 +0200)]
compat: backport netif_wake_subqueue

Kernels 2.6.23 - 2.6.27 had some multiqueue support,
but called netif_wake_subqueue netif_start_subqueue.
So to backport, just add a define.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.4.0-030400rc1-generic [OK]
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: avoid duplicate __ref definition
Luis R. Rodriguez [Fri, 6 Apr 2012 19:00:14 +0000 (12:00 -0700)]
compat: avoid duplicate __ref definition

Cc: stable@orbit-lab.org
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: properly handle tracing
Johannes Berg [Fri, 6 Apr 2012 10:41:07 +0000 (12:41 +0200)]
compat: properly handle tracing

We have to disable tracing on old kernels, but should
disable it only on old kernels. Since 2.6.33 it pretty
much hasn't changed at all, so we can keep it. Prior
to 2.6.33, there are various different reasons for not
supporting tracing, as noted in the tracepoint.h file.

This fixes tracing as the previous attempts here at
backporting it completely disabled it for all kernels,
not just for those where it's not possible.

Tested compilation of compat-wireless with tracing in
mac80211 against 2.6.24 through 3.3, but some versions
didn't compile due to unrelated issues.

Cc: stable@orbit-lab.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: use make -s
Luis R. Rodriguez [Tue, 3 Apr 2012 08:16:02 +0000 (01:16 -0700)]
compat: use make -s

Avoid printing anything other than errors. This
*should* speed up compiling a bit more although
current tests show no improvements yet. The real
benefit is a smaller and cleaner ckmake.log which
will only have warnings and errors.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix compilation warning on compat-3.5.c
Luis R. Rodriguez [Tue, 3 Apr 2012 03:15:36 +0000 (20:15 -0700)]
compat: fix compilation warning on compat-3.5.c

Needs to include module.h

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport __netdev_alloc_skb_ip_align()
Luis R. Rodriguez [Tue, 3 Apr 2012 00:05:38 +0000 (17:05 -0700)]
compat: backport __netdev_alloc_skb_ip_align()

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport truesize arg increase on skb_add_rx_frag()
Luis R. Rodriguez [Mon, 2 Apr 2012 22:55:19 +0000 (15:55 -0700)]
compat: backport truesize arg increase on skb_add_rx_frag()

This backports 50269e19 by just calling the older kernel routine,
and discarding the new argument. We treat kernels older than 2.6.28
a bit differently, given that those kernels lacked this routine
completely.

commit 50269e19ad990e79eeda101fc6df80cffd5d4831
Author: Eric Dumazet <eric.dumazet@gmail.com>
Date:   Fri Mar 23 23:59:33 2012 +0000

    net: add a truesize parameter to skb_add_rx_frag()

    skb_add_rx_frag() API is misleading.

    Network skbs built with this helper can use uncharged kernel memory and
    eventually stress/crash machine in OOM.

    Add a 'truesize' parameter and then fix drivers in followup patches.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
mcgrof@tux ~/linux-stable (git::master)$ git describe --contains 50269e19
v3.4-rc1~84^2~1

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: include compat-3.5
Luis R. Rodriguez [Mon, 2 Apr 2012 22:44:13 +0000 (15:44 -0700)]
compat: include compat-3.5

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport simple_open()
Luis R. Rodriguez [Mon, 2 Apr 2012 22:40:27 +0000 (15:40 -0700)]
compat: backport simple_open()

This is not yet upstream on Linus' tree so my best guess is
it will make it on the 3.5 release.

commit 90c936d19fb5cb3fb6b74dc18bf4bb3314a6a599
Author: Stephen Boyd <sboyd@codeaurora.org>
Date:   Wed Mar 21 10:48:20 2012 +1100

    libfs: add simple_open()

    debugfs and a few other drivers use an open-coded version of simple_open()
    to pass a pointer from the file to the read/write file ops.  Add support
    for this simple case to libfs so that we can remove the many duplicate
    copies of this simple function.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: only use PPA kernels
Luis R. Rodriguez [Mon, 2 Apr 2012 22:04:04 +0000 (15:04 -0700)]
compat: only use PPA kernels

This skips non-PPA kernels for Ubuntu with ckmake.
This lets a machine host as many kernelas it wants but
we stick to only using the PPA mainline vanilla kernels.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport adding of __ref, __refdata, __refconst
Luis R. Rodriguez [Mon, 2 Apr 2012 18:02:56 +0000 (11:02 -0700)]
compat: backport adding of __ref, __refdata, __refconst

This backports:

commit 312b1485fb509c9bc32eda28ad29537896658cb8
Author: Sam Ravnborg <sam@ravnborg.org>
Date:   Mon Jan 28 20:21:15 2008 +0100

    Introduce new section reference annotations tags: __ref, __refdata, __refconst

Fixes compilation on 2.6.24 of drivers who use these.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                        2.6.38-13-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                        2.6.31-22-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport in.h shortcuts added by Joe (2658)
Luis R. Rodriguez [Sun, 1 Apr 2012 04:46:02 +0000 (21:46 -0700)]
compat: backport in.h shortcuts added by Joe (2658)

This should help compilation on 2.6.24.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                        2.6.38-13-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                        2.6.31-22-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport USB asynchronous autosuspend/autoresume support (9ac39f28b)
Luis R. Rodriguez [Sat, 31 Mar 2012 03:05:47 +0000 (20:05 -0700)]
compat: backport USB asynchronous autosuspend/autoresume support (9ac39f28b)

Just disable it.

commit 9ac39f28b5237a629e41ccfc1f73d3a55723045c
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Wed Nov 12 16:19:49 2008 -0500

    USB: add asynchronous autosuspend/autoresume support

    This patch (as1160b) adds support routines for asynchronous autosuspend
    and autoresume, with accompanying documentation updates.  There
    already are several potential users of this interface, and others are
    likely to arise as autosuspend support becomes more widespread.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mcgrof@tux ~/linux-stable (git::master)$ git describe \
--contains 9ac39f28b5237a629e41ccfc1f73d3a55723045c
v2.6.29-rc1~182^2~99

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                        2.6.38-13-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                        2.6.31-22-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: last pm-runtime callbacks
Luis R. Rodriguez [Sat, 31 Mar 2012 01:51:03 +0000 (18:51 -0700)]
compat: last pm-runtime callbacks

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: complete pm runtime backport
Luis R. Rodriguez [Sat, 31 Mar 2012 01:32:32 +0000 (18:32 -0700)]
compat: complete pm runtime backport

A few calls were missing.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                        2.6.38-13-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                        2.6.31-22-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix warning on trace backport for 2.6.29 and older
Luis R. Rodriguez [Fri, 30 Mar 2012 23:44:31 +0000 (16:44 -0700)]
compat: fix warning on trace backport for 2.6.29 and older

The unregister callback returns void but we are returning something,
fix that.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: define PARAMS for tracepoint
Luis R. Rodriguez [Fri, 30 Mar 2012 23:42:37 +0000 (16:42 -0700)]
compat: define PARAMS for tracepoint

Not all kernels have this defined, so define it when
we force disabling tracepoint.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic      [OK]
Trying kernel                     3.2.2-030202-generic      [OK]
Trying kernel                    3.1.10-030110-generic      [OK]
Trying kernel                    3.0.18-030018-generic      [OK]
Trying kernel                  2.6.39-02063904-generic      [OK]
Trying kernel                        2.6.38-13-generic      [OK]
Trying kernel                  2.6.38-02063808-generic      [OK]
Trying kernel                  2.6.37-02063706-generic      [OK]
Trying kernel                  2.6.36-02063604-generic      [OK]
Trying kernel                  2.6.35-02063512-generic      [OK]
Trying kernel                  2.6.34-02063410-generic      [OK]
Trying kernel                  2.6.33-02063305-generic      [OK]
Trying kernel                  2.6.32-02063255-generic      [OK]
Trying kernel                        2.6.31-22-generic      [OK]
Trying kernel                  2.6.31-02063113-generic      [OK]
Trying kernel                  2.6.30-02063010-generic      [OK]
Trying kernel                  2.6.29-02062906-generic      [OK]
Trying kernel                  2.6.28-02062810-generic      [OK]
Trying kernel                    2.6.27-020627-generic      [OK]
Trying kernel                    2.6.26-020626-generic      [OK]
Trying kernel                    2.6.25-020625-generic      [OK]
Trying kernel                    2.6.24-020624-generic      [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport run-time power management (5e928f77)
Luis R. Rodriguez [Fri, 30 Mar 2012 21:59:56 +0000 (14:59 -0700)]
compat: backport run-time power management (5e928f77)

This backports 5e928f77a09a07f9dd595bb8a489965d69a83458

Run-time power management cannot really be backported
given that the implementation added bus specific
callbacks that we won't have on older kernels. If
you really want run-time power management or good
power management upgrade your kernel. We'll just
compile this out as if run-time power management was
disabled just as the kernel disables run-time power
management when CONFIG_PM_RUNTIME is disabled.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                        2.6.38-13-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                        2.6.31-22-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: explicitly export generated variables
Johannes Berg [Fri, 30 Mar 2012 11:11:44 +0000 (13:11 +0200)]
compat: explicitly export generated variables

Doing the blanket "export" statement at the beginning
of the generated file confuses the kernel's Makefiles
and causes extreme build slowdowns.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Cc: stable@orbit-lab.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix compat_firmware_class.c compilation on older kernels
Luis R. Rodriguez [Fri, 30 Mar 2012 21:25:19 +0000 (14:25 -0700)]
compat: fix compat_firmware_class.c compilation on older kernels

CONFIG_COMPAT_FIRMWARE_CLASS is defined explicitly for any kernel >= 2.6.33
but CONFIG_FW_LOADER) || CONFIG_FW_LOADER_MODULE may still be disabled,
and in those cases we should still compile.

Lets clean this up by being explicit about the exported symbols within
compat_firmware_class.c instead of relying on the header file to rename them
for us at compile time. At the same time be consistent and use the
CONFIG_FW_LOADER) || CONFIG_FW_LOADER_MODULE checks on the header
to see which declarations to use.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Cc: stable@orbit-lab.org
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: move PWD definition early
Luis R. Rodriguez [Fri, 30 Mar 2012 21:42:17 +0000 (14:42 -0700)]
compat: move PWD definition early

This prevents bogus calls of our scripts.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Cc: stable@orbit-lab.org
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: avoid inclusin of COMPAT_CONFIG at clean target
Luis R. Rodriguez [Fri, 30 Mar 2012 21:03:18 +0000 (14:03 -0700)]
compat: avoid inclusin of COMPAT_CONFIG at clean target

Technically we can include COMPAT_CONFIG for all targets but
at make clean we won't have it. Avoid that warning.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Cc: stable@orbit-lab.org
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat-3.3: include module.h
Johannes Berg [Fri, 30 Mar 2012 09:52:59 +0000 (11:52 +0200)]
compat-3.3: include module.h

compat/compat-3.3.c:172:1: warning: data definition has no type or storage class [enabled by default]
compat/compat-3.3.c:172:1: warning: type defaults to â€˜int’ in declaration of â€˜EXPORT_SYMBOL_GPL’ [-Wimplicit-int]
compat/compat-3.3.c:172:1: warning: parameter names (without types) in function declaration [enabled by default]

In newer kernels we should include export.h, but
not all kernels have that so use module.h which
always works.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: crc8: undef pr_fmt
Johannes Berg [Fri, 30 Mar 2012 11:13:00 +0000 (13:13 +0200)]
compat: crc8: undef pr_fmt

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Tested-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: complete tracepoint backport
Luis R. Rodriguez [Wed, 28 Mar 2012 09:45:07 +0000 (02:45 -0700)]
compat: complete tracepoint backport

Tested also against compat-wireless against:

* 2.6.33
* 2.6.32

I'm happy with this.

compat ckmake:

Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: add some tracing backport work
Luis R. Rodriguez [Tue, 20 Mar 2012 03:20:50 +0000 (20:20 -0700)]
compat: add some tracing backport work

Its not really easy to backport the tracing stuff, but
lets give it a shot. We should simply review how many
subsystems we want tracing for and for what target kernels
we want that enabled for. It doesn't make sense to
backport tracing if we won't have much users.

For now add some code that at least does not break building.

Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix load time issue with kfifo backport
Luis R. Rodriguez [Tue, 20 Mar 2012 01:25:34 +0000 (18:25 -0700)]
compat: fix load time issue with kfifo backport

The CONFIG_COMPAT_KFIFO config option must be defined
to CONFIG_COMPAT_KFIFO=y instead of CONFIG_COMPAT_KFIFO=m
as the kfifo object is not a module, its simply part of
the compat module. This should fix users of the kfifo
backport on kernels older than 2.6.36.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport work_busy()
Luis R. Rodriguez [Tue, 20 Mar 2012 00:44:01 +0000 (17:44 -0700)]
compat: backport work_busy()

Best we can do is just tell the users of we are WORK_BUSY_PENDING
for older kernels. The ckmake log:

Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport system work queues system_wq and system_long_wq
Luis R. Rodriguez [Mon, 19 Mar 2012 23:14:47 +0000 (16:14 -0700)]
compat: backport system work queues system_wq and system_long_wq

mcgrof@tux ~/linux-stable (git::master)$ git describe --contains d320c038
v2.6.36-rc1~506^2~26

The commit d320c038 added some new system workqueues to allow us
to categorize order of priority on workqueue items. We had already
backported usage of system_nrt_wq but hadn't backported usage of
system_wq or system_long_wq. We address this now in this patch
by also ensuring that flush_workqueue() will flush these as
designed, that is only prioritizing system_wq. Given that older
kernels would be using the older keventd_wq for now we flush
that and then system_wq, allowing users of the system_long_wq
to be delayed as intended for backported kernel code using this
framework.

For newer kernels this is a no-op.

commit d320c03830b17af64e4547075003b1eeb274bc6c
Author: Tejun Heo <tj@kernel.org>
Date:   Tue Jun 29 10:07:14 2010 +0200

    workqueue: s/__create_workqueue()/alloc_workqueue()/, and add system workqueues

    This patch makes changes to make new workqueue features available to
    its users.

    * Now that workqueue is more featureful, there should be a public
      workqueue creation function which takes paramters to control them.
      Rename __create_workqueue() to alloc_workqueue() and make 0
      max_active mean WQ_DFL_ACTIVE.  In the long run, all
      create_workqueue_*() will be converted over to alloc_workqueue().

    * To further unify access interface, rename keventd_wq to system_wq
      and export it.

    * Add system_long_wq and system_nrt_wq.  The former is to host long
      running works separately (so that flush_scheduled_work() dosen't
      take so long) and the latter guarantees any queued work item is
      never executed in parallel by multiple CPUs.  These will be used by
      future patches to update workqueue users.

Signed-off-by: Tejun Heo <tj@kernel.org>
The ckmake [documented on 0] log:

Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

[0] https://github.com/mcgrof/compat/wiki

Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport CPU mask affinity hint
Luis R. Rodriguez [Tue, 13 Mar 2012 00:13:37 +0000 (17:13 -0700)]
compat: backport CPU mask affinity hint

We cannot backport this given that the IRQ data structure
was changed so simply treat this hint as if the system was
uniprocessor. This backports this commit:

commit e7a297b0d7d6049bd4e423ac1e17da31e4c401b8
Author: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Date:   Fri Apr 30 14:44:50 2010 -0700

    genirq: Add CPU mask affinity hint

    This patch adds a cpumask affinity hint to the irq_desc structure,
    along with a registration function and a read-only proc entry for each
    interrupt.

    This affinity_hint handle for each interrupt can be used by underlying
    drivers that need a better mechanism to control interrupt affinity.
    The underlying driver can register a cpumask for the interrupt, which
    will allow the driver to provide the CPU mask for the interrupt to
    anything that requests it.  The intent is to extend the userspace
    daemon, irqbalance, to help hint to it a preferred CPU mask to balance
    the interrupt into.

    [ tglx: Fixed compile warnings, added WARN_ON, made SMP only ]

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Cc: davem@davemloft.net
Cc: arjan@linux.jf.intel.com
Cc: bhutchings@solarflare.com
    LKML-Reference: <20100430214445.3992.41647.stgit@ppwaskie-hc2.jf.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
ckmake log:

Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                        2.6.38-13-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                        2.6.31-22-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport defining COMPAT_USE_64BIT_TIME
Luis R. Rodriguez [Fri, 9 Mar 2012 20:53:29 +0000 (12:53 -0800)]
compat: backport defining COMPAT_USE_64BIT_TIME

Only x86 seems to use this so far.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport __pskb_copy()
Luis R. Rodriguez [Fri, 9 Mar 2012 20:21:36 +0000 (12:21 -0800)]
compat: backport __pskb_copy()

This was _not_ easy. The ckmake log:

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: Fix module_init return type from void to int.
Nicolas Cavallari [Tue, 6 Mar 2012 09:55:28 +0000 (10:55 +0100)]
compat: Fix module_init return type from void to int.

086f3a1 overrode module_init to make it depend on compat, but the
overriding module_init has return type 'void', so strange things would
happen when the module loading code see that init_module() returns
positive values.  This patch makes it return the value returned by
the overriden module_init.

Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: make all modules depend on compat
Johannes Berg [Sun, 4 Mar 2012 05:03:22 +0000 (21:03 -0800)]
compat: make all modules depend on compat

Sometimes, compat based drivers do not depend on
compat.ko because the base kernel is new enough.
This causes compat to not be loaded and makes it
harder to identify that the modules were based
on compat.

Re-define module_init() to make all modules that
were compiled against compat also require to be
linked against compat.ko.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: makes all compat symbols EXPORT_SYMBOL_GPL()
Luis R. Rodriguez [Fri, 2 Mar 2012 23:01:37 +0000 (15:01 -0800)]
compat: makes all compat symbols EXPORT_SYMBOL_GPL()

The Linux kernel is being backported here and a lot of code
is completely derivative works of the the Linux kernel, as such
only GPL-Compatible modules are intended to be used with this
framework, given that users of this framework are considered
completely derivative works of the Linux kernel.

Only upstream Linux kernel modules or kernel modules on their
way upstream are intended to be used by this.
Tested with ckmake:

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic [OK]
Trying kernel                     3.2.2-030202-generic [OK]
Trying kernel                    3.1.10-030110-generic [OK]
Trying kernel                    3.0.18-030018-generic [OK]
Trying kernel                  2.6.39-02063904-generic [OK]
Trying kernel                        2.6.38-13-generic [OK]
Trying kernel                  2.6.38-02063808-generic [OK]
Trying kernel                  2.6.37-02063706-generic [OK]
Trying kernel                  2.6.36-02063604-generic [OK]
Trying kernel                  2.6.35-02063512-generic [OK]
Trying kernel                  2.6.34-02063410-generic [OK]
Trying kernel                  2.6.33-02063305-generic [OK]
Trying kernel                  2.6.32-02063255-generic [OK]
Trying kernel                        2.6.31-22-generic [OK]
Trying kernel                  2.6.31-02063113-generic [OK]
Trying kernel                  2.6.30-02063010-generic [OK]
Trying kernel                  2.6.29-02062906-generic [OK]
Trying kernel                  2.6.28-02062810-generic [OK]
Trying kernel                    2.6.27-020627-generic [OK]
Trying kernel                    2.6.26-020626-generic [OK]
Trying kernel                    2.6.25-020625-generic [OK]
Trying kernel                    2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: avoid color crap on log for good
Luis R. Rodriguez [Tue, 28 Feb 2012 23:32:34 +0000 (15:32 -0800)]
compat: avoid color crap on log for good

This skips color output on the log file for all
output as we go.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport eth_hw_addr_random()
Luis R. Rodriguez [Tue, 28 Feb 2012 22:49:12 +0000 (14:49 -0800)]
compat: backport eth_hw_addr_random()

This backports eth_hw_addr_random(). Tested with
ckmake on v2.6.24..v3.3 :

Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: optimize building by extending .PHONY
Luis R. Rodriguez [Mon, 27 Feb 2012 23:10:30 +0000 (15:10 -0800)]
compat: optimize building by extending .PHONY

I've started reading make -d output to realize that GNU Make
is pretty simple but darn stupid and needs a little help in
direction. Traditionally GNU Make will try to see if it needs
Makefile* generation. I can count 18 variations of Makefile it
looks for:

Makefile
Makefile.c
Makefile.C
Makefile.cc
Makefile.cpp
Makefile.f
Makefile.F
Makefile.l
Makefile.mod
Makefile.o
Makefile.p
Makefile.r
Makefile.s
Makefile.S
Makefile.sh
Makefile.w
Makefile.web
Makefile.y

GNU Make will look for targets in the Makefile for each of these...

GNU Make will also look for these 18 variations of files for each
target that it does not a target rule for. There are two ways to
help GNU Make do the right thing, write a simple empty target rule [0]
or just extend the target into the .PHONY target. Lets just extend
the .PHONY target with the items we see in make -d are not needed.
This simple change forces GNU Make to skip 36 lookups of false
targets.

[0] Makefile : ;

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: avoid unnecessary recursion to include a file
Luis R. Rodriguez [Mon, 27 Feb 2012 22:27:42 +0000 (14:27 -0800)]
compat: avoid unnecessary recursion to include a file

I added recursion call to the same Makefile after noticing that
GNU Make *will* fail if a file that is being included does not
exist. I also added the option that the file *may* not exist by
prepending the inclusion of the file with "-". It turns out that
GNU Make is smart enough to look for targets for header files that
are included and *will not fail* if it can successfully build that
file and include it. I will note that this target file *does not
need* to be a dependency to any of the final targets, GNU Make
will just assume and add it. It is important to highlight that
GNU Make *will* run make against itself again after it builds the
file it needs to include. If GNU Make runs into this situation,
where it can build the target file it needs to include, it will
not fail but you will see something like this pesky warning:

Makefile:16: /home/mcgrof/compat/.config: No such file or directory

Under new found knowledge of how GNU Make works we simplify the
reading and running of the compat Makefile by ensuring that the
file we need to include is defined as a target but for sanity and
reader's sake (although technically not necessary) we also add the
file as a dependency to the modules target building.

Furthermore the pesky warning can confuse developers / users and
as it turns out we only really need it at build time. We take
advantage of the fact that the kernel will use the same Makefile
later upon building the external module and that we can identify
when this happens in the Makefile [0] and only *require* including
the header file upon module building time.

[0] the part where ifeq ($(KERNELRELEASE),) is false

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: split COMPAT_CONFIG and COMPAT_AUTOCONF targets
Luis R. Rodriguez [Mon, 27 Feb 2012 22:16:32 +0000 (14:16 -0800)]
compat: split COMPAT_CONFIG and COMPAT_AUTOCONF targets

Let GNU Make take care of the dependency map.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: remove dubious clean at install target
Luis R. Rodriguez [Mon, 27 Feb 2012 22:09:29 +0000 (14:09 -0800)]
compat: remove dubious clean at install target

Not sure why this was added, this is a big typo.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: explicitly define paths for local configs
Luis R. Rodriguez [Mon, 27 Feb 2012 21:41:57 +0000 (13:41 -0800)]
compat: explicitly define paths for local configs

As noted in the previous commit a Linux kernel module's
Makefile will be read twice, during initial GNU make run,
and later for when the kernel will build the external module.
Variables that require path consideration must address in
which context it needs to be defined and do so by detecting
at which run time case it wants to instantiate variables. In
our case we want to ensure that both COMPAT_CONFIG and
COMPAT_AUTOCONF are defined within the context of the
directory of the external module we are building as otherwise
GNU Make will try to treat it as part of the kernel's build
directory's files.

We already have COMPAT_CONFIG and COMPAT_AUTOCONF defined
under a ifeq ($(KERNELRELEASE),) check, we now just need
to add the directory context and then remove the other
now superfluous uses of the $(PWD).

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: move definition of COMPAT_CONFIG and COMPAT_AUTOCONF
Luis R. Rodriguez [Mon, 27 Feb 2012 21:34:57 +0000 (13:34 -0800)]
compat: move definition of COMPAT_CONFIG and COMPAT_AUTOCONF

The Makefile for external modules are read twice, once during
the initial make command, and then later to build the modules
target *by the kernel*. This ensures that we define the variables
COMPAT_CONFIG and COMPAT_AUTOCONF are only defined once.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix parallel builds
Luis R. Rodriguez [Mon, 27 Feb 2012 20:13:14 +0000 (12:13 -0800)]
compat: fix parallel builds

We broke parallel builds by breaking GNU Make's heuristics.
GNU Make does not whether or not target commands are sub-make
commands or not, these must be explicitly annotated. To tell
GNU Make that target command is going to be a sub-process
we can use the $(MAKE) variable for a command. Another option
is to tell GNU Make that a target command is *not* a sub-make
command instead explicitly by prepending a command with a plus,
"+" prior to the command. This will force GNU Make to avoid
supporting certain flags for those targets but more importantly,
it will also ensure that during execution of commands that are
*not* sub-make commands it will yield the jobserver to ensure
file descriptor / job sanity.

Annotate to GNU Make two commands that we issue are *not* sub-make
commands. This avoids stop the job server for these commands but
also allows GNU Make to figure out the heuristics to run the job
server for further sub-make commands -- in this case the recursive
call to make.

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport HCI monitor channel support
Luis R. Rodriguez [Sat, 25 Feb 2012 05:25:28 +0000 (21:25 -0800)]
compat: backport HCI monitor channel support

Just throw in the header file, compat-wireless takes
care of the rest.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix compat_firmware class for all kernels
Luis R. Rodriguez [Sat, 25 Feb 2012 04:15:18 +0000 (20:15 -0800)]
compat: fix compat_firmware class for all kernels

Instead of ifdef checks on the to_dev() just simply rename it
to avoid clashes. This fixes compiling against all supported
kernels on compat.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                         2.6.38-8-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                        2.6.38-12-generic  [OK]
Trying kernel                        2.6.38-11-generic  [OK]
Trying kernel                        2.6.38-10-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: avoid NOSTDINC_FLAGS during modpost
Luis R. Rodriguez [Sat, 25 Feb 2012 03:40:22 +0000 (19:40 -0800)]
compat: avoid NOSTDINC_FLAGS during modpost

modpost, the second part of module building, does not
use NOSTDINC_FLAGS and friends so all the hackery we did
to use it to prefer our header files and include compat-2.6.h
will not work during modpost for older kernels. We don't really
need all that stuff during modpost even for newer kernels so
just avoid it all together.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: clean ckmake log of color output
Luis R. Rodriguez [Sat, 25 Feb 2012 02:55:11 +0000 (18:55 -0800)]
compat: clean ckmake log of color output

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix compilation warning for compat_firmware_class on 2.6.26
Luis R. Rodriguez [Sat, 25 Feb 2012 02:48:49 +0000 (18:48 -0800)]
compat: fix compilation warning for compat_firmware_class on 2.6.26

This fixes this compilation issue:

  CC [M]  /home/mcgrof/compat/compat/compat_firmware_class.o
/home/mcgrof/compat/compat/compat_firmware_class.c:24:0: warning: "to_dev" redefined
include/linux/input.h:1218:0: note: this is the location of the previous definition
/home/mcgrof/compat/compat/compat_firmware_class.c:24:0: warning: "to_dev" redefined
include/linux/input.h:1218:0: note: this is the location of the previous definition

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix compilation on latest kernels
Luis R. Rodriguez [Sat, 25 Feb 2012 02:38:14 +0000 (18:38 -0800)]
compat: fix compilation on latest kernels

The variables wasn't being set in shell. By defining
the variables in shell and outputing them once onto
a .config we avoid having to do release kernel checks
every single time.

We're back in business with the latest kernels.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                         2.6.38-8-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                        2.6.38-12-generic  [OK]
Trying kernel                        2.6.38-11-generic  [OK]
Trying kernel                        2.6.38-10-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [FAILED]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: add some initial RHEL support
Luis R. Rodriguez [Sat, 25 Feb 2012 01:38:10 +0000 (17:38 -0800)]
compat: add some initial RHEL support

This adds a series of CONFIG_COMPAT_${RHEL_MAJOR}_${i} tags
for each known RHEL version that we supercede. I cannot
verify if this is correct but this is my translation of
this to script:

RHEL_MAJOR := $(shell grep ^RHEL_MAJOR $(KLIB_BUILD)/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
ifneq ($(RHEL_MAJOR),)
RHEL_MINOR := $(shell grep ^RHEL_MINOR $(KLIB_BUILD)/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
COMPAT_RHEL_VERSIONS := $(shell I=$(RHEL_MINOR); while [ "$$I" -ge 0 ]; do echo $$I; I=$$(($$I - 1)); done)
$(foreach ver,$(COMPAT_RHEL_VERSIONS),$(eval CONFIG_COMPAT_RHEL_$(RHEL_MAJOR)_$(ver)=y))

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix few compilations by adding compat_autoconf.h support
Luis R. Rodriguez [Fri, 24 Feb 2012 22:20:31 +0000 (14:20 -0800)]
compat: fix few compilations by adding compat_autoconf.h support

The Makefile was generating the appropriate CONFIG_COMPAT_KERNEL_*
variables for our Makefiles but this was being ignored by C files
as compat had no compat_autoconf.h being generated. This patch
addresses this but also puhes out the CONFIG_COMPAT_KERNEL_* variable
generation to scripts. We have now two scripts:

scripts/gen-compat-config.sh - generates .config for Makefile propagation
scripts/gen-compat-autoconf.sh  - generates compat_autoconf.h for code propagation

This fixes running ckmake on older kernels. This issue was present
only on compat and not compat_wireless as compat_wireless was generating
its own compat_autoconf.h. This fixes compilation against some older
kernels of just the compat module alone. Some work is still required
for some newer and really ancient kernels:

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [FAILED]
Trying kernel                     3.2.2-030202-generic  [FAILED]
Trying kernel                    3.1.10-030110-generic  [FAILED]
Trying kernel                    3.0.18-030018-generic  [FAILED]
Trying kernel                  2.6.39-02063904-generic  [FAILED]
Trying kernel                         2.6.38-8-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                        2.6.38-12-generic  [OK]
Trying kernel                        2.6.38-11-generic  [OK]
Trying kernel                        2.6.38-10-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [FAILED]
Trying kernel                    2.6.24-020624-generic  [FAILED]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: README pointing to new shiny site
Luis R. Rodriguez [Fri, 17 Feb 2012 04:18:47 +0000 (20:18 -0800)]
compat: README pointing to new shiny site

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: add dummy lockdep_rtnl_is_held implementation
John W. Linville [Wed, 15 Feb 2012 21:36:25 +0000 (16:36 -0500)]
compat: add dummy lockdep_rtnl_is_held implementation

Obviously, this is wrong.  But the base kernel will have rtnl_mutex
declared static, with no way to access it.  I think this is the best
we can do...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: extend phys_addr_t backport to 2.6.24
Luis R. Rodriguez [Wed, 8 Feb 2012 04:01:55 +0000 (20:01 -0800)]
compat: extend phys_addr_t backport to 2.6.24

x86 only got phys_addr_t as of 2.6.25. This patch addresses
that. The only arch that had phys_addr_t prior to that is
PPC.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport making atomic_t and atomic64_t universal
Luis R. Rodriguez [Wed, 8 Feb 2012 03:22:02 +0000 (19:22 -0800)]
compat: backport making atomic_t and atomic64_t universal

mcgrof@tux ~/linux-next (git::master)$ \
git describe --contains ea435467500612636f8f4fb639ff6e76b2496e4b
v2.6.29-rc1~390

This commit moved atomic_t and atomic64_t to a generic
place, but some archs already had it defined. Just include
that header for the archs that had it.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport phys_addr_t (CONFIG_PHYS_ADDR_T_64BIT)
Luis R. Rodriguez [Wed, 8 Feb 2012 01:21:43 +0000 (17:21 -0800)]
compat: backport phys_addr_t (CONFIG_PHYS_ADDR_T_64BIT)

mcgrof@tux ~/linux-stable (git::linux-3.2.y)$ \
git describe --contains 600715dcdf567c86f8b2c6173fcfb4b873e25a19
v2.6.28-rc1~271^2^4~6

The CONFIG_PHYS_ADDR_T_64BIT  was added as of v2.6.28-rc1~271^2^4~6,
this is either u32 or u64 dependent on 64BIT || ARCH_PHYS_ADDR_T_64BIT.
The ARCH_PHYS_ADDR_T_64BIT allows architectures to override the
value even if the platform does not have CONFIG_64BIT. We simplify
this check by just checking for all known architecture variables and
also the CONFIG_64BIT -- but we skip adding this if the arch is
x86 or PPC which already had phys_addr_t.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix for new CONFIG_COMPAT_KERNEL_2_6_* name changes
Luis R. Rodriguez [Wed, 8 Feb 2012 00:44:01 +0000 (16:44 -0800)]
compat: fix for new CONFIG_COMPAT_KERNEL_2_6_* name changes

On the CONFIG_COMPAT_KERNEL_2_6* name change earlier we forgot
to update a few checks.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: add x86 support to get-compat-kernels for Ubuntu
Luis R. Rodriguez [Tue, 7 Feb 2012 08:36:04 +0000 (00:36 -0800)]
compat: add x86 support to get-compat-kernels for Ubuntu

Now both x86_64 and x86 are supported.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport __netdev_printk()
Luis R. Rodriguez [Tue, 31 Jan 2012 22:44:41 +0000 (14:44 -0800)]
compat: backport __netdev_printk()

This was added in v3.2, and will be used by the new
shiny alx Ethernet driver which is not yet upstream.
This now has some fixes for 2.6.35.

Tested with ckmake.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: export compat kernel versions info
Luis R. Rodriguez [Sat, 4 Feb 2012 00:56:18 +0000 (16:56 -0800)]
compat: export compat kernel versions info

The reason this worked on compat-wireless was that
config.mk exported every variable. We need to do the
same.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: add compat kernel checker and downloader
Luis R. Rodriguez [Fri, 3 Feb 2012 23:11:07 +0000 (15:11 -0800)]
compat: add compat kernel checker and downloader

This adds get-compat-kernels, a utility that is intended
to be Linux distribution agnostic that downloads and installs
all kernel headers for all supported kernel releases of compat.
You also have the option of specifying you want to also install
the actual kernel image (get-compat-kernels -i).

We start off by adding support for Ubuntu on x86_64 as that
is what a few of us maintaining compat and compat-wireless run.
Just for kernel headers (default run of get-compat-kernels),
you'll need currently 205 M of hard drive space.

Once done with running get-compat-kernels, you can then
start running ckmake to verify your compat kernel changes
won't bust compilation against any known supported kernel.

I'd like to start requiring runs against this script for
patch submissions. Eventually we can try to add the same
runs against compat-wireless so we can verify integrity
against compilation for different kernel versions.

Support for different Linux distributios is welcomed.

Debug log goes out to ckmake.log

Example output:

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                         2.6.38-8-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                        2.6.38-12-generic  [OK]
Trying kernel                        2.6.38-11-generic  [OK]
Trying kernel                        2.6.38-10-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Cc: kernel-team@lists.ubuntu.com
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: add .gitignore
Luis R. Rodriguez [Fri, 3 Feb 2012 23:10:46 +0000 (15:10 -0800)]
compat: add .gitignore

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: fix building for 3.0 kernels
Luis R. Rodriguez [Fri, 3 Feb 2012 21:51:42 +0000 (13:51 -0800)]
compat: fix building for 3.0 kernels

Changes integrated from compat-wireless

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agoRevert "compat: backport __netdev_printk()"
Luis R. Rodriguez [Fri, 3 Feb 2012 18:25:35 +0000 (10:25 -0800)]
Revert "compat: backport __netdev_printk()"

Reverting for now until this is fixed for all kernels
that we support.

This reverts commit fd3a74e12f687509da0a996b4e01c4fa6ca32ff8.

12 years agocompat: use kconfig.h in compat-2.6.h for 3.1 and later kernels
John W. Linville [Thu, 26 Jan 2012 18:00:56 +0000 (13:00 -0500)]
compat: use kconfig.h in compat-2.6.h for 3.1 and later kernels

This file was introduced in commit 2a11c8ea20bf850b3a2c60db8c2e7497d28aba99
and included in 3.1 and later kernels.  It includes <generated/autoconf.h>
itself, as well as some other definitions that are used elsewhere.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: move br_port_exists() to compat-2.6.36.h
Hauke Mehrtens [Thu, 26 Jan 2012 22:51:45 +0000 (23:51 +0100)]
compat: move br_port_exists() to compat-2.6.36.h

br_port_exists() was moved to a new compat-*.h file for every new
kernel release, as it is not in mainline. This patch moves it to compat-
2.6.36.h so it has not to be moved any more for a new kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: backport __netdev_printk()
Luis R. Rodriguez [Tue, 31 Jan 2012 22:44:41 +0000 (14:44 -0800)]
compat: backport __netdev_printk()

This was added in v3.2, and will be used by the new
shiny alx Ethernet driver which is not yet upstream.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agoAdd dma_zalloc_coherent to fix build with kernels older than 3.2
Nikolay Martynov [Mon, 16 Jan 2012 05:07:55 +0000 (00:07 -0500)]
Add dma_zalloc_coherent to fix build with kernels older than 3.2

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
12 years agocompat: add module_usb_driver and module_platform_driver
Hauke Mehrtens [Sat, 3 Dec 2011 14:49:26 +0000 (15:49 +0100)]
compat: add module_usb_driver and module_platform_driver

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: add config var for CORDIC and CRC8
Hauke Mehrtens [Sat, 3 Dec 2011 14:49:25 +0000 (15:49 +0100)]
compat: add config var for CORDIC and CRC8

Sometimes the kernel version compat-wireless is build against has
support for cordic and crc8 in its source, but these modules were not
build when the kernel was build, because no one selected them. The modules are
needed for the bcmsmac driver and they should be build every time when
they were not already build while the kernel was build.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: fix security_sk_clone dummy backport compile
Felix Fietkau [Fri, 2 Dec 2011 11:12:46 +0000 (12:12 +0100)]
compat: fix security_sk_clone dummy backport compile

linux/security.h needs to be included before the dummy function overrides it,
otherwise the macro that redirects it to the compat version will apply to
the kernel function as well, causing multiple conflicting definitions

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agocompat: backport atomic64 support
Felix Fietkau [Fri, 2 Dec 2011 10:28:26 +0000 (11:28 +0100)]
compat: backport atomic64 support

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agocompat: implement dummy security_sk_clone
John W. Linville [Fri, 18 Nov 2011 20:52:44 +0000 (15:52 -0500)]
compat: implement dummy security_sk_clone

This has been defined in include/linux/security.h for some time, but was
only given an EXPORT_SYMBOL for 3.1.  Add a compat_* definition to avoid
breaking the module load with an undefined symbol.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocompat: fix misplaced #ifdef for the workqueue backport
Felix Fietkau [Sun, 20 Nov 2011 09:39:22 +0000 (10:39 +0100)]
compat: fix misplaced #ifdef for the workqueue backport

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agocompat: avoid warning in compat_system_workqueue_create
John W. Linville [Thu, 17 Nov 2011 00:39:33 +0000 (19:39 -0500)]
compat: avoid warning in compat_system_workqueue_create

The check in the WARN_ON is inverted.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocompat: backport netdev_features_t
Hauke Mehrtens [Thu, 17 Nov 2011 21:23:11 +0000 (22:23 +0100)]
compat: backport netdev_features_t

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
12 years agocompat: backport kfree_rcu()
Hauke Mehrtens [Thu, 17 Nov 2011 23:05:45 +0000 (00:05 +0100)]
compat: backport kfree_rcu()

This adds a nested function everywhere kfree_rcu() was called. This
function frees the memory and is given as a function to call_rcu().
The kfree_rcu define was made by Johannes Berg.
The rcu callback could happen every time also after the module was
unloaded and this will cause problems.
A rcu_barrier() was added into every module_exit so that this will not
be called after the module was unloaded.

The define overwriting module_exit is based on the original module_exit
which looks like this:
/* This is only required if you want to be unloadable. */
/#define module_exit(exitfn)                                    \
        static inline exitcall_t __exittest(void)               \
        { return exitfn; }                                      \
        void cleanup_module(void) __attribute__((alias(#exitfn)));

We replaced the call to the actual function exitfn() with a call to our
function which calls the original exitfn() and then rcu_barrier()

As a module will not be unloaded that ofter it should not have a big
performance impact when rcu_barrier() is called on every module exit,
also when no kfree_rcu() backport is used in that module.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
CC: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
12 years agocompat: add support for kernel 3.2
Hauke Mehrtens [Thu, 17 Nov 2011 21:23:09 +0000 (22:23 +0100)]
compat: add support for kernel 3.2

This adds suport for kernel 3.2.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
12 years agocompat: support RHEL6 as a build target
John W. Linville [Thu, 17 Nov 2011 22:20:42 +0000 (17:20 -0500)]
compat: support RHEL6 as a build target

This patch enables compatibility with RHEL6 as a build target, mostly
with simple tricks similar to what was added for compatibility with
Debian Squeeze.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
12 years agocompat: check CONFIG_COMPAT_FIRMWARE_CLASS in compat-2.6.33.h
John W. Linville [Thu, 17 Nov 2011 22:20:41 +0000 (17:20 -0500)]
compat: check CONFIG_COMPAT_FIRMWARE_CLASS in compat-2.6.33.h

If a pre-2.6.33 kernel has backported suitable firmware loader
functionality, then it doesn't need the compat_firmware_class.  In that
case, compat-2.6.33 should not redefine the *_firmware function names.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
12 years agocompat: add CONFIG_COMPAT_FIRMWARE_DATA_RW_NEEDS_FILP
John W. Linville [Thu, 17 Nov 2011 22:20:40 +0000 (17:20 -0500)]
compat: add CONFIG_COMPAT_FIRMWARE_DATA_RW_NEEDS_FILP

Some kernels have versions of (struct bin_attribute)->{read,write}
that require a struct file * as their first argument.  This change
accommodates them in the firmware loader class.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
12 years agocompat: use separate CONFIG_COMPAT_KFIFO option for building kfifo.o
John W. Linville [Thu, 17 Nov 2011 22:20:39 +0000 (17:20 -0500)]
compat: use separate CONFIG_COMPAT_KFIFO option for building kfifo.o

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
12 years agocompat: add skb_complete_wifi_ack & feature flag
Johannes Berg [Mon, 14 Nov 2011 16:58:07 +0000 (17:58 +0100)]
compat: add skb_complete_wifi_ack & feature flag

This just needs to be empty -- older kernels don't
have the necessary infrastructure for this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocompat: add some workarounds for Debian squeeze
Hauke Mehrtens [Tue, 8 Nov 2011 20:46:31 +0000 (21:46 +0100)]
compat: add some workarounds for Debian squeeze

Debian squeeze also backports some stuff and this conflicts with compat
wireless stuff. This is a nice way of making compat work with debian
squeeze without breaking normal kernels.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocomapt: add skb_frag_size() and hex_byte_pack() compat-2011-11-08
Hauke Mehrtens [Sun, 6 Nov 2011 21:25:04 +0000 (22:25 +0100)]
comapt: add skb_frag_size() and hex_byte_pack()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: backport system_nrt_wq
Hauke Mehrtens [Sun, 6 Nov 2011 21:25:03 +0000 (22:25 +0100)]
compat: backport system_nrt_wq

The workqueue system_nrt_wq is not available in kernel version < 2.6.36.
This backport code creates such a queue but this old kernel does not
have WQ_NON_REENTRANT, so we use a single threaded queue instead as it
should meat the same restrictions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agoDepending on the arguments to alloc_netdev_mqs(),
Johannes Berg [Thu, 6 Oct 2011 08:45:26 +0000 (10:45 +0200)]
Depending on the arguments to alloc_netdev_mqs(),
it may give a warning due to the use of max().
Fix the warning with max_t().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocompat: add linux/of.h just when CONFIG_OF is set.
Hauke Mehrtens [Tue, 4 Oct 2011 11:11:47 +0000 (13:11 +0200)]
compat: add linux/of.h just when CONFIG_OF is set.

In kernel < 2.6.34 linux/of.h unconditionally includes asm/prom.h which
is not available on all architectures. In newer kernel versions this is
just included if CONFIG_OF is set. For these old kernel just include
linux/of.h when CONFIG_OF is set. This fixes a compile problem with
ath6kl as it uses linux/of.h only when CONFIG_OF is set.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: add is_unicast_ether_addr
Hauke Mehrtens [Tue, 4 Oct 2011 11:11:46 +0000 (13:11 +0200)]
compat: add is_unicast_ether_addr

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: add ETH_P_TDLS
Hauke Mehrtens [Tue, 4 Oct 2011 11:11:45 +0000 (13:11 +0200)]
compat: add ETH_P_TDLS

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: add skb_tx_timestamp() and skb_defer_rx_timestamp()
Hauke Mehrtens [Sat, 1 Oct 2011 10:32:54 +0000 (12:32 +0200)]
compat: add skb_tx_timestamp() and skb_defer_rx_timestamp()

Just add an empty implementation of these functions to do the same as
when timestamping is deactivated.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: add IS_ERR_OR_NULL() compat-2011-09-28
Hauke Mehrtens [Wed, 28 Sep 2011 18:43:44 +0000 (20:43 +0200)]
compat: add IS_ERR_OR_NULL()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: provide INIT_WORK with 2 arguments for kernels before 2.6.20
Pavel Roskin [Fri, 23 Sep 2011 21:48:05 +0000 (17:48 -0400)]
compat: provide INIT_WORK with 2 arguments for kernels before 2.6.20

Also provide work_func_t.  Originally implemented and tested in
ndiswrapper.

Signed-off-by: Pavel Roskin <proski@gnu.org>
12 years agocompat: add lower_32_bits
Hauke Mehrtens [Wed, 21 Sep 2011 17:04:24 +0000 (19:04 +0200)]
compat: add lower_32_bits

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: add rcu_read_lock_held()
Hauke Mehrtens [Wed, 21 Sep 2011 17:04:23 +0000 (19:04 +0200)]
compat: add rcu_read_lock_held()

just the version without lock debug support is implemented, if you want
to debug the logs use a more recent kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: add kstrtou8_from_user
Hauke Mehrtens [Wed, 31 Aug 2011 22:20:12 +0000 (00:20 +0200)]
compat: add kstrtou8_from_user

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 years agocompat: add skb_frag_dma_map
Hauke Mehrtens [Wed, 31 Aug 2011 22:20:11 +0000 (00:20 +0200)]
compat: add skb_frag_dma_map

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>