compat-rdma/compat.git
8 years agocompat: Add __skb_frag_unref
Vladimir Sokolovsky [Sun, 5 Aug 2012 18:18:12 +0000 (21:18 +0300)]
compat: Add __skb_frag_unref

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: Fix cxgb3/cxgb4 missing symbol error on load
Vipul Pandya [Tue, 31 Jul 2012 09:06:19 +0000 (14:36 +0530)]
compat: Fix cxgb3/cxgb4 missing symbol error on load

Commit id 182630e0f686a569aaf9b34781b08f27dc0ab1bb was causing missing symbol
error on load time for cxgb3/cxgb4 module. This commit adds additional check to
avoid the issue.

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
8 years agocompat: Add netdev_tx_sent_queue and netdev_tx_completed_queue
Vladimir Sokolovsky [Thu, 12 Jul 2012 20:26:36 +0000 (23:26 +0300)]
compat: Add netdev_tx_sent_queue and netdev_tx_completed_queue

[linux-2.6] (master)$ git describe --contains \
c5d67bd78c5dc540e3461c36fb3d389fbe0de4c3
v3.3-rc1~182^2~426

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: Remove duplicated symbols for RHEL6.3
Vladimir Sokolovsky [Tue, 10 Jul 2012 21:01:50 +0000 (00:01 +0300)]
compat: Remove duplicated symbols for RHEL6.3

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: Export ip_tos2prio symbol
Vladimir Sokolovsky [Wed, 11 Jul 2012 07:36:25 +0000 (10:36 +0300)]
compat: Export ip_tos2prio symbol

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: Add register_net_sysctl
Vladimir Sokolovsky [Tue, 10 Jul 2012 16:00:58 +0000 (19:00 +0300)]
compat: Add register_net_sysctl

[linux-2.6] (master)$ git describe --contains ab41a2ca
v3.5-rc1~109^2~369

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agoBackport compat to RHEL6.3
Vladimir Sokolovsky [Tue, 10 Jul 2012 12:47:14 +0000 (15:47 +0300)]
Backport compat to RHEL6.3

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agoRemove include/compat_autoconf.h
Vladimir Sokolovsky [Mon, 2 Jul 2012 12:29:37 +0000 (15:29 +0300)]
Remove include/compat_autoconf.h

This file is not yet generated for compat-rdma

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agoMerge branch 'master' into ofed compat-2012-07-02
Vladimir Sokolovsky [Wed, 27 Jun 2012 20:40:30 +0000 (23:40 +0300)]
Merge branch 'master' into ofed

8 years agocompat: improve ckmake to add short report
Luis R. Rodriguez [Thu, 14 Jun 2012 22:28:54 +0000 (15:28 -0700)]
compat: improve ckmake to add short report

A short report is added now at the end of the cmake.log
and also a new file ckmake-report.log if you want only
the short summary. Tabs are now broken on the report
but I prefer this over not having this short report.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: Backport fault_in_multipages_{writeable,readable}
Ozan Çağlayan [Thu, 14 Jun 2012 17:52:46 +0000 (20:52 +0300)]
compat: Backport fault_in_multipages_{writeable,readable}

This backports:

commit f56f821feb7b36223f309e0ec05986bb137ce418
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sun Mar 25 19:47:41 2012 +0200

    mm: extend prefault helpers to fault in more than PAGE_SIZE

The new functions are used by drm/i915 driver.

Trying kernel                     3.4.0-030400-generic [OK]
Trying kernel                     3.3.7-030307-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: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: Fix cosmetic typo in compat-3.4.c
Ozan Çağlayan [Thu, 14 Jun 2012 17:52:45 +0000 (20:52 +0300)]
compat: Fix cosmetic typo in compat-3.4.c

compat-3.4.c is for kernel version 3.4 not 3.5.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: Backport vga_switcheroo_client_ops
Ozan Çağlayan [Thu, 14 Jun 2012 17:52:44 +0000 (20:52 +0300)]
compat: Backport vga_switcheroo_client_ops

This backports:

  From 26ec685ff9d9c16525d8ec4c97e52fcdb187b302 Mon Sep 17 00:00:00

  From: Takashi Iwai <tiwai@suse.de>
  Date: Fri, 11 May 2012 07:51:17 +0200
  Subject: [PATCH] vga_switcheroo: Introduce struct vga_switcheroo_client_ops

  only for kernels >= 2.6.34 in which vga_switcheroo is available.

  Trying kernel                     3.4.0-030400-generic    [OK]
  Trying kernel                     3.3.7-030307-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: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: add SDIO_CCCR_REV_3_00 and SDIO_SDIO_REV_3_00
Luis R. Rodriguez [Wed, 13 Jun 2012 02:23:38 +0000 (19:23 -0700)]
compat: add SDIO_CCCR_REV_3_00 and SDIO_SDIO_REV_3_00

This backports:

commit b4625dab2c618eb87e177761dda3182b4cfaa604
Author: Bing Zhao <bzhao@marvell.com>
Date:   Thu Oct 20 19:16:32 2011 -0700

    mmc: recognise SDIO cards with SDIO_CCCR_REV 3.00

    Table 6-2: CCCR bit Definitions, address 00h.  Part E1 SDIO Simplified
    Specification Version 3.00, Feb. 25, 2011.

    This patch has been tested with Marvell WLAN device SD8797.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: Add SIZE_MAX
Ozan Çağlayan [Tue, 12 Jun 2012 23:00:16 +0000 (02:00 +0300)]
compat: Add SIZE_MAX

This backports:

  From a3860c1c5dd1137db23d7786d284939c5761d517 Mon Sep 17 00:00:00
  From: Xi Wang <xi.wang@gmail.com>
  Date: Thu, 31 May 2012 16:26:04 -0700
  Subject: [PATCH] introduce SIZE_MAX

This is needed by include/drm/drm_mem_util.h

Trying kernel                     3.4.0-030400-generic  [OK]
Trying kernel                     3.3.7-030307-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: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: bin/ckmake: Drop Ubuntu check
Ozan Çağlayan [Mon, 11 Jun 2012 21:46:19 +0000 (00:46 +0300)]
compat: bin/ckmake: Drop Ubuntu check

Don't check for distribution as it is now possible to use ckmake
on every distribution.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: bin/get-compat-kernels: Do not depend on Ubuntu
Ozan Çağlayan [Mon, 11 Jun 2012 21:45:35 +0000 (00:45 +0300)]
compat: bin/get-compat-kernels: Do not depend on Ubuntu

Use Ubuntu PPA vanilla kernels on other distributions too.
The .deb files are extracted using 'ar' and 'tar'.

Also check if the target directory exists before downloading
the deb files.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: bin/get-compat-kernels: Update 3.3 and add 3.4 kernels
Ozan Çağlayan [Mon, 11 Jun 2012 21:31:55 +0000 (00:31 +0300)]
compat: bin/get-compat-kernels: Update 3.3 and add 3.4 kernels

Ubdate 3.3 kernel to the latest one and add 3.4 kernel.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agoMerge branch 'master' into ofed
Vladimir Sokolovsky [Sun, 10 Jun 2012 07:30:03 +0000 (10:30 +0300)]
Merge branch 'master' into ofed

Conflicts:
compat/Makefile
compat/compat-3.2.c
include/linux/compat-2.6.35.h
include/linux/compat-3.1.h

8 years agoFix SLES11 SP2 support
Vladimir Sokolovsky [Mon, 4 Jun 2012 20:17:55 +0000 (23:17 +0300)]
Fix SLES11 SP2 support

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: llist_add_batch was added in 3.2
Vladimir Sokolovsky [Sun, 3 Jun 2012 10:05:27 +0000 (13:05 +0300)]
compat: llist_add_batch was added in 3.2

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: Addition to compat-2.6.39.h
Tatyana Nikolova [Wed, 30 May 2012 19:40:06 +0000 (14:40 -0500)]
compat: Addition to compat-2.6.39.h

backport netif_is_bond_slave() < 2.6.39

Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
8 years agocompat: add ida_simple_{get,remove}
Hauke Mehrtens [Tue, 29 May 2012 22:41:48 +0000 (00:41 +0200)]
compat: add ida_simple_{get,remove}

This is needed by net/bluetooth/hci_core.c

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.4.0-030400rc1-generic [OK]
Trying kernel                     3.3.7-030307-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: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: remove hci_mon.h
Hauke Mehrtens [Tue, 29 May 2012 22:41:47 +0000 (00:41 +0200)]
compat: remove hci_mon.h

compat-wireless should copy this file from the kernel

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocomapt: add skb_queue_walk_from
Hauke Mehrtens [Tue, 29 May 2012 22:41:46 +0000 (00:41 +0200)]
comapt: add skb_queue_walk_from

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: do not include qdisc_cb_private_validate with every kernel
Hauke Mehrtens [Tue, 29 May 2012 22:41:45 +0000 (00:41 +0200)]
compat: do not include qdisc_cb_private_validate with every kernel

This method got backported into kernel 3.2.9 and 3.0.23. Compat should
not provide it for these kernel versions as it will cause some compile
errors.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: backport FQ CoDel support down to 2.6.25
Luis R. Rodriguez [Fri, 25 May 2012 02:53:15 +0000 (19:53 -0700)]
compat: backport FQ CoDel support down to 2.6.25

FQ CoDel is available as a module, sch_fq_codel.

This backports:

commit 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe
Author: Eric Dumazet <edumazet@google.com>
Date:   Fri May 11 09:30:50 2012 +0000

    fq_codel: Fair Queue Codel AQM

    Fair Queue Codel packet scheduler

    Principles :

    - Packets are classified (internal classifier or external) on flows.
    - This is a Stochastic model (as we use a hash, several flows might
                                  be hashed on same slot)
    - Each flow has a CoDel managed queue.
    - Flows are linked onto two (Round Robin) lists,
      so that new flows have priority on old ones.

    - For a given flow, packets are not reordered (CoDel uses a FIFO)
    - head drops only.
    - ECN capability is on by default.
    - Very low memory footprint (64 bytes per flow)

I should note that this is different than CoDel. This code is GPL,
CoDel is Dual BSD/GPL licensed. This goes only compile tested against
all the below kernels, run time test results would be appreciated.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.4.0-030400rc1-generic  [OK]
Trying kernel                     3.3.7-030307-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>
8 years agocompat: add FQ CoDel code from upstream
Luis R. Rodriguez [Fri, 25 May 2012 00:57:17 +0000 (17:57 -0700)]
compat: add FQ CoDel code from upstream

This is taken from next-20120524. This does not yet
add any backport code to it, not have we integrated
it into the build system. The backport work will be
done next to make the changes more easily visible to
reviewers.

This also adds flow_dissector.c from net/core/ as well,
but we'll backport any changes required next.

Just to be sure, here's the ckmake log:

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.4.0-030400rc1-generic  [OK]
Trying kernel                     3.3.7-030307-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>
8 years agocompat: backport CoDel support down to 2.6.25
Luis R. Rodriguez [Fri, 25 May 2012 00:33:39 +0000 (17:33 -0700)]
compat: backport CoDel support down to 2.6.25

This is available as a module called sch_codel.
For details on CoDel see:

http://lwn.net/Articles/496509/

This goes only compile tested against all the below kernels,
run time test results would be appreciated.

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.4.0-030400rc1-generic  [OK]
Trying kernel                     3.3.7-030307-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>
8 years agocompat: add CoDel upstream code
Luis R. Rodriguez [Fri, 25 May 2012 00:31:17 +0000 (17:31 -0700)]
compat: add CoDel upstream code

This just drags in the code and dumps it in place, without
adding it to the build system. We'll add backport support next
to make the changes required more easily visible to reviewers.

Just to be sure, here's the ckmake log result:

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.4.0-030400rc1-generic  [OK]
Trying kernel                     3.3.7-030307-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>
8 years agocompat: rename compat-3.5.c to compat-3.4.c
Felix Fietkau [Thu, 24 May 2012 13:29:28 +0000 (15:29 +0200)]
compat: rename compat-3.5.c to compat-3.4.c

It only contains simple_open, which is already available on Linux 3.4.
Fixes duplicate symbol issues on 3.4

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.4.0-030400rc1-generic  [OK]
Trying kernel                     3.3.7-030307-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: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: backport task_cpus_allowed() <= 2.6.32
Mike Marciniszyn [Mon, 21 May 2012 13:01:14 +0000 (09:01 -0400)]
compat: backport task_cpus_allowed() <= 2.6.32

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
8 years agocompat: kernels <= 3.0 handle netlink_dump_start API change
Mike Marciniszyn [Mon, 21 May 2012 12:58:32 +0000 (08:58 -0400)]
compat: kernels <= 3.0 handle netlink_dump_start API change

Older kernels don't have the last min_dump_alloc_arg to
netlink_dump_start().

The arg removal can be disarmed with the
NEED_MIN_DUMP_ALLOC_ARG to support compilation on
SLES11SP2, which has the arg.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
8 years agocompat: move <= 3.0 neighbour routines to compat-3.1.h
Mike Marciniszyn [Mon, 21 May 2012 12:55:15 +0000 (08:55 -0400)]
compat: move <= 3.0 neighbour routines to compat-3.1.h

This patch removes the include/net/dst.h in favor of
moving the routines into compat-3.1.h.

This fixes a compilation issue with the 3.2.0 kernel with
the linux-3.2 repo.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
8 years agocompat: backport net_ratelimited_function()
Luis R. Rodriguez [Thu, 17 May 2012 04:03:59 +0000 (21:03 -0700)]
compat: backport net_ratelimited_function()

This backports this patch:

From 3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c Mon Sep 17 00:00:00 2001
From: Joe Perches <joe@perches.com>
Date: Sun, 13 May 2012 21:56:25 +0000
Subject: [PATCH] net: Add net_ratelimited_function and
 net_<level>_ratelimited macros

__ratelimit() can be considered an inverted bool test because
it returns true when not ratelimited.  Several tests in the
kernel tree use this __ratelimit() function incorrectly.

No net_ratelimit uses are incorrect currently though.

Most uses of net_ratelimit are to log something via printk or
pr_<level>.

In order to minimize the uses of net_ratelimit, and to start
standardizing the code style used for __ratelimit() and net_ratelimit(),
add a net_ratelimited_function() macro and net_<level>_ratelimited()
logging macros similar to pr_<level>_ratelimited that use the global
net_ratelimit instead of a static per call site "struct ratelimit_state".

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: remove obvious comment upon loading compat
Luis R. Rodriguez [Thu, 17 May 2012 02:34:58 +0000 (19:34 -0700)]
compat: remove obvious comment upon loading compat

The comment was there to make it clear that upon init
a few routines would be no-ops. This should be obvious
by now.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: add COMPAT_BASE tag
Luis R. Rodriguez [Thu, 17 May 2012 02:29:24 +0000 (19:29 -0700)]
compat: add COMPAT_BASE tag

I'm going to start adding tags to compat.git. This tag will
also be printed upon loading of the compat module. This is
useful to annotating what release of compat.git was used
exactly.

Moving forward the goal will be to try to add a tag only
once a full version of linux-next.git with a respective
date tag from that release has been addressed for backporting.

Right now the only consumer of compat.git that I am aware of
is compat-wireless (soon to be renamed to compat-drivers) so
what this means in practice is I will only add a tag to
compat.git once ckmake is used to verify compilation against
all supported kernels. This means there are two tasks when
backporting:

  * compat.git work
  * compat-wireless.git work

The compat.git work will likely be finished first than the
compat-wireless.git work. Older compat.git versions should
work with newer versions of tags from compat-wireless.git,
however, I may still add tags to compat.git to annotate
that that release (even if no changes were made) has also
been used and tested.

Every single release of compat.git and compat-wireless.git
that has a tag means that that tag has been tested with
ckmake to cross compile against all supported kernels.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: backport IS_ENABLED macro
Eliad Peller [Wed, 16 May 2012 15:28:00 +0000 (18:28 +0300)]
compat: backport IS_ENABLED macro

IS_ENABLED(option) was backported as defined(option), but
because of the indirection, option was evaluated too early,
resulting in #if defined(1) for defined options, which failed
the compilation with the following error:

error: operator "defined" requires an identifier

Backport IS_ENABLED from the current kernel instead.

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]

Tested-by: Luis R. Rodriguez <mcgrof@frijolero.org>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: backport ether_addr_equal
Ozan Çağlayan [Wed, 16 May 2012 09:55:48 +0000 (12:55 +0300)]
compat: backport ether_addr_equal

This backports:

    commit a599b0f54d233d0f63d6be9a2ff0049d24751669
    Author: Joe Perches <joe@perches.com>
    Date:   Tue May 8 18:56:45 2012 +0000

        etherdevice.h: Add ether_addr_equal

        Add a boolean function to check if 2 ethernet addresses
        are the same.

        This is to avoid any confusion about compare_ether_addr
        returning an unsigned, and not being able to use the
        compare_ether_addr function for sorting ala memcmp.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[root@ozzyfedora compat]# bin/ckmake
Trying kernel                      3.3.4-5.fc17.x86_64  [OK]

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]

Tested-by: Luis R. Rodriguez <mcgrof@frijolero.org>
Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: backport ethtool_phys_id_state
Vipul Pandya [Thu, 10 May 2012 12:39:55 +0000 (18:09 +0530)]
compat: backport ethtool_phys_id_state

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
8 years agocompat: backport netdev_queue_numa_node_read
Vipul Pandya [Thu, 10 May 2012 12:38:33 +0000 (18:08 +0530)]
compat: backport netdev_queue_numa_node_read

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
8 years agocompat: backport ethtool_flags
Vipul Pandya [Thu, 10 May 2012 12:36:49 +0000 (18:06 +0530)]
compat: backport ethtool_flags

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
8 years agocompat: backport IPV4_FLOW and IPV6_FLOW
Vipul Pandya [Thu, 10 May 2012 12:28:33 +0000 (17:58 +0530)]
compat: backport IPV4_FLOW and IPV6_FLOW

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
8 years agocompat: Fix cxgb3/cxgb4 build failure
Vipul Pandya [Wed, 9 May 2012 13:36:11 +0000 (19:06 +0530)]
compat: Fix cxgb3/cxgb4 build failure

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
8 years agocompat: Add build support for cxgb3 driver
Vipul Pandya [Mon, 7 May 2012 07:27:52 +0000 (12:57 +0530)]
compat: Add build support for cxgb3 driver

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
8 years agocompat: add tty_lock()
Luis R. Rodriguez [Tue, 8 May 2012 07:26:43 +0000 (00:26 -0700)]
compat: add tty_lock()

For the lock, I had only backported the tty_unlock..

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: backport localizing the tty lock
Luis R. Rodriguez [Tue, 8 May 2012 07:12:55 +0000 (00:12 -0700)]
compat: backport localizing the tty lock

Just undo make the lock generic for older kernels.
This backports:

commit d29f3ef39be4eec0362b985305fc526d9be318cf
Author: Alan Cox <alan@linux.intel.com>
Date:   Thu May 3 22:24:08 2012 +0100

    tty_lock: Localise the lock

    In each remaining case the tty_lock is associated with a specific tty. This
    means we can now lock on a per tty basis. We do need tty_lock_pair() for
    the pty case. Uglier but still a step in the right direction.

    [fixed up calls in 3 missing drivers - gregkh]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: add compat/compat-2.6.34.c
Luis R. Rodriguez [Tue, 8 May 2012 01:47:37 +0000 (18:47 -0700)]
compat: add compat/compat-2.6.34.c

Forgot to add this file from my previous commit.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: backport sdio power management API
Luis R. Rodriguez [Mon, 7 May 2012 19:54:04 +0000 (12:54 -0700)]
compat: backport sdio power management API

This backports the patch below by simply ignoring support for it
for older kernels.

commit da68c4eb258cd9f3f0b8aeb7e46b8118bb6358b6
Author: Nicolas Pitre <nico@fluxnic.net>
Date:   Fri Mar 5 13:43:31 2010 -0800

    sdio: introduce API for special power management features

    This patch series provides the core changes needed to allow SDIO cards to
    remain powered and active while the host system is suspended, and let them
    wake up the host system when needed.  This is used to implement
    wake-on-lan with SDIO wireless cards at the moment.  Patches to add that
    support to the libertas driver will be posted separately.

    This patch:

    Some SDIO cards have the ability to keep on running autonomously when the
    host system is suspended, and wake it up when needed.  This however
    requires that the host controller preserve power to the card, and
    configure itself appropriately for wake-up.

    There is however 4 layers of abstractions involved: the host controller
    driver, the MMC core code, the SDIO card management code, and the actual
    SDIO function driver.  To make things simple and manageable, host drivers
    must advertise their PM capabilities with a feature bitmask, then function
    drivers can query and set those features from their suspend method.  Then
    each layer in the suspend call chain is expected to act upon those bits
    accordingly.

    [akpm@linux-foundation.org: fix typo in comment]
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: use -s instead of -q
Luis R. Rodriguez [Sat, 5 May 2012 01:00:33 +0000 (18:00 -0700)]
compat: use -s instead of -q

And also fix variable propagation when ckmake -t is used.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: add optional target options for ckmake
Luis R. Rodriguez [Sat, 5 May 2012 00:42:57 +0000 (17:42 -0700)]
compat: add optional target options for ckmake

This also adds -q option to suppress build messages
that succeed, this helps reduce the size of ckmake.log
if you care only about errors or warnings.

In theory this should help build time but I haven't seen
this help yet

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat-wireless: propagate errors with ckmake
Luis R. Rodriguez [Mon, 30 Apr 2012 20:45:27 +0000 (13:45 -0700)]
compat-wireless: propagate errors with ckmake

If compilation failed with any kernel then propagate that error.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat-wireless: add -t argument for time statistics
Luis R. Rodriguez [Mon, 30 Apr 2012 20:38:34 +0000 (13:38 -0700)]
compat-wireless: add -t argument for time statistics

Using -t is the equilavent of doing:

time ckmake; time ckmake | egrep "real|user|sys"

This is useful to test compiling accross kernel twice,
once under the assumption that ccache may likely be cleared,
the other with ccache fresh.

This will yield this output:

mcgrof@tux ~/compat (git::master)$ ckmake -t
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]

real 1m19.326s
user 1m18.740s
sys 0m22.360s

real 1m18.411s
user 1m15.330s
sys 0m21.960s

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: backport pci_enable_device_mem()
Luis R. Rodriguez [Tue, 24 Apr 2012 04:33:30 +0000 (21:33 -0700)]
compat: backport pci_enable_device_mem()

To backport b718989d correctly which added pci_enable_device_mem()
the routine pcibios_enable_device() is required but we don't
have access to it on modules as its an architecture specific
routine that is not exported and as such only core kernel code
has access to it. We implement a sloppy work around for
backporting this.

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: Luis R. Rodriguez <mcgrof@frijolero.org>
8 years agocompat: add dummy file kmemleak.h
Hauke Mehrtens [Sun, 22 Apr 2012 21:59:25 +0000 (23:59 +0200)]
compat: add dummy file kmemleak.h

Some drivers are including kmemleak.h directly and this causes a build
problem on old kernel versions as it is not available on all.

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: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agocompat: Add lock-less NULL terminated single list
Vladimir Sokolovsky [Fri, 23 Mar 2012 21:37:15 +0000 (23:37 +0200)]
compat: Add lock-less NULL terminated single list

[linux-2.6] (master)$ \
git describe --contains f49f23abf3dd786ddcac1c1e7db3c2013b07413f
v3.1-rc1~40^2^2~8

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: backport little-endian bitops
Vladimir Sokolovsky [Fri, 23 Mar 2012 21:34:38 +0000 (23:34 +0200)]
compat: backport little-endian bitops

[linux-2.6] (master)$ \
        git describe --contains a56560b3b233238e85205d4e8d7bded904ac2306
v2.6.39-rc1~192

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: backport real_num_rx_queues
Vladimir Sokolovsky [Fri, 23 Mar 2012 21:30:07 +0000 (23:30 +0200)]
compat: backport real_num_rx_queues

[linux-2.6] (master)$ \
    git describe --contains 62fe0b40abb3484413800edaef9b087a20059acf
v2.6.37-rc1~147^2~340

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 years agocompat: backport for_each_netdev_rcu
Vladimir Sokolovsky [Fri, 23 Mar 2012 20:58:03 +0000 (22:58 +0200)]
compat: backport for_each_netdev_rcu

[linux-2.6] (master)$ \
git describe --contains c6d14c84566d6b70ad9dc1618db0dec87cca9300
v2.6.33-rc1~388^2~517

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>