openwrt/staging/blogic.git
11 years agocompat: fix cordic backport header
Luis R. Rodriguez [Tue, 26 Mar 2013 22:12:58 +0000 (15:12 -0700)]
compat: fix cordic backport header

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

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

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

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

== ckmake-report.log ==

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

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

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

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

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

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

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

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

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

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

This backports sg_alloc_table_from_pages() added via commit efc42bc9

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

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

    scatterlist: add sg_alloc_table_from_pages function

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

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

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

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

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

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

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

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

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

    lib/scatterlist: add simple page iterator

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    commit 33ee3b2e2eb9b4b6c64dcf9ed66e2ac3124e748c upstream.

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

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

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

    Include runtime testsuite (somewhat incomplete) as well.

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

    Use kstrto*() in code today!

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    dynamic_debug: dynamic hex dump

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

    Also, make print_hex_dump_bytes() dynamically controlled

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

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

    dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions

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

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

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

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

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

    compat: backport drop of node parameter from iterators

    This patch backports the following commit in mainline linux kernel:

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

          hlist: drop the node parameter from iterators

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

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

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

    random32: rename random32 to prandom

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

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

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

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

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

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

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

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

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

This adds a backport for file_inode().

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

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

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

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

This is a backport of:

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

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

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

This is a backport of:

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

    workqueue: relax lockdep annotation on flush_work()

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

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

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

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

This is a backport of:

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

    platform: Add support for automatic device IDs

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

This is a backport of:

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

    PCI: Add PCIe Link Capability link speed and width names

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

These backports are also needed for kernel 3.7 and 3.8.

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

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

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

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

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

This patch backports the following commit in mainline linux kernel:

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

      hlist: drop the node parameter from iterators

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

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

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

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

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

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

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

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

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

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

    TTY: switch tty_flip_buffer_push

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

    TTY: switch tty_insert_flip_string

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

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

I intend to use these in nl80211.

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

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

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

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

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

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

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

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

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

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

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

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

== ckmake-report.log ==

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

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

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

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

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

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

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

ckmake results:

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

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

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

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

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

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

In older kernel version this was hard coded to 32

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

    tg3: Add some VPD preprocessor constants

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

This was copied from fs/libfs.c

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

This fixes the following warning:

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

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

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

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

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

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

This fixes the following warning:

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

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

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

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

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

This for example fails:

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

This improves perfomance by about 1 minute.

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

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

ionice -c 3 nice -n 20 ckmake

Can we do better without networking the solution ?

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

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

Before:

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

After:

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

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

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

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

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

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

Useful for cronjobs.

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

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

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

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

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

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport platform_device_register_data()
Luis R. Rodriguez [Wed, 12 Dec 2012 19:45:05 +0000 (11:45 -0800)]
compat: backport platform_device_register_data()

Add the helper.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains d8bf254
v2.6.28-rc1~284^2~9

commit d8bf254089a6c31d7d01a4d1d2f1861662900855
Author: Dmitry Baryshkov <dbaryshkov@gmail.com>
Date:   Mon Sep 22 14:41:40 2008 -0700

    platform: add new device registration helper

    Add a helper that registers simple platform_device w/o resources but with
    parent and device data.

    This is usefull to cleanup platform code from code that registers such
    simple devices as leds-gpio, generic-bl, etc.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mcgrof@drvbp1 ~/compat (git::master)$ time ckmake
Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-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-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-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    1m58.798s
user    3m59.967s
sys     1m25.585s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix compilation on hid_ignore()
Luis R. Rodriguez [Thu, 13 Dec 2012 04:38:14 +0000 (20:38 -0800)]
compat: fix compilation on hid_ignore()

This fixes compilation on the addition of hid_ignore()
for kernels older than 2.6.28.

mcgrof@drvbp1 ~/compat (git::master)$ time ckmake
Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-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-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-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    1m58.798s
user    3m59.967s
sys     1m25.585s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport struct hid_device_id
Luis R. Rodriguez [Thu, 13 Dec 2012 04:18:00 +0000 (20:18 -0800)]
compat: backport struct hid_device_id

Kernels older than 2.6.28 did not have this
defined. Add it.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains e8c84f9a
v2.6.28-rc1~571^2~54

commit e8c84f9a5f06912c94c38961096c994da3890a2e
Author: Jiri Slaby <jirislaby@gmail.com>
Date:   Mon May 19 15:50:01 2008 +0200

    modpost: add support for hid

    Generate aliases for hid device modules to support autoloading.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport HID_USB_DEVICE() and HID_BLUETOOTH_DEVICE()
Luis R. Rodriguez [Wed, 12 Dec 2012 19:54:49 +0000 (11:54 -0800)]
compat: backport HID_USB_DEVICE() and HID_BLUETOOTH_DEVICE()

commit 070748ed0b52399858a5967026a452bbb903a64c
Author: Henrik Rydberg <rydberg@euromail.se>
Date:   Mon Apr 23 12:07:05 2012 +0200

    HID: Create a generic device group

    Devices that do not have a special driver are handled by the generic
    driver. This patch does the same thing using device groups; Instead of
    forcing a particular driver, the appropriate driver is picked up by
    udev. As a consequence, one can now move a device from generic to
    specific handling by a simple rebind. By adding a new device id to the
    generic driver, the same thing can be done in reverse.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add HID_QUIRK_IGNORE
Luis R. Rodriguez [Wed, 12 Dec 2012 17:47:09 +0000 (09:47 -0800)]
compat: add HID_QUIRK_IGNORE

Just add the define.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 6f4303fb
v2.6.30-rc1~219^2~9

commit 6f4303fb2ec68055e793b84887a7ae0f9ea7cc2d
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Thu Jan 29 00:15:51 2009 +0100

    HID: bring back possibility to specify vid/pid ignore on module load

    When hid quirks were converted to specialized driver, the HID_QUIRK_IGNORE
    has been moved completely, as the hid_ignore_list[] has been moved into the
    generic code.

    However userspace already got used to the possibility that modprobing
    usbhid with

        'quirks=vid:pid:0x4'

    makes the device ignored by usbhid driver. So keep this quirk flag in place
    for backwards compatibility.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add HID_QUIRK_HIDDEV_FORCE and HID_QUIRK_NO_IGNORE
Luis R. Rodriguez [Wed, 12 Dec 2012 15:49:18 +0000 (07:49 -0800)]
compat: add HID_QUIRK_HIDDEV_FORCE and HID_QUIRK_NO_IGNORE

We just need the definitions.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains b5e5a37e
v2.6.35-rc1~454^2~5^2~14

commit b5e5a37e36cd4d355b875665312d7aaae4e5833c
Author: Bastien Nocera <hadess@hadess.net>
Date:   Fri Apr 16 17:19:50 2010 +0100

    HID: add HID_QUIRK_HIDDEV_FORCE and HID_QUIRK_NO_IGNORE

    Add two quirks to make it possible for usbhid module options to
    override whether a device is ignored (HID_QUIRK_NO_IGNORE) and
    whether to connect a hiddev device (HID_QUIRK_HIDDEV_FORCE).

    Passing HID_QUIRK_NO_IGNORE for your device means that it will
    not be ignored by the HID layer, even if present in a blacklist.

    HID_QUIRK_HIDDEV_FORCE will force the creation of a hiddev for that
    device, making it accessible from user-space.

    Tested with an Apple IR Receiver, switching it from using appleir
    to using lirc's macmini driver.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport definition of HID_TYPE_USBNONE
Luis R. Rodriguez [Wed, 12 Dec 2012 02:47:44 +0000 (18:47 -0800)]
compat: backport definition of HID_TYPE_USBNONE

This is declared within the enum:

enum hid_type {
       HID_TYPE_OTHER = 0,
       HID_TYPE_USBMOUSE,
       HID_TYPE_USBNONE
};

But we just declare it as a define for 2.

This backports was added with the below commit:

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 6dc1418e
v3.1-rc1~309^2^2~14

commit 6dc1418e13144162e8bc4858789010d8f0e1e65c
Author: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Date:   Mon May 23 15:45:44 2011 -0700

    HID: yurex: recognize GeneralKeys wireless presenter as generic HID

    Unfortunately, the device seems to have the same Vendor ID and Product ID
    as YUREX leg-shakes sensors, and the commit 6bc235a2e2 ("USB: add driver
    for Meywa-Denki & Kayac YUREX") added the ID to hid_ignore_list.

    I believe that we can distinguish YUREX and the Wireless Presenter by
    device type.  The patch below makes the driver ignore only YUREX
    (bInterfaceProtocol==0), and recognize Wireless Presenter
    (bInterfaceProtocol is keyboard or mouse) as generic HID.  (I don't have
    the Wireless Presenter, so not yet ested.)

    ** YUREX lsusb information:
    Bus 002 Device 007: ID 0c45:1010 Microdia
    Device Descriptor:
       bLength                18
       bDescriptorType         1
       bcdUSB               1.10
       bDeviceClass            0 (Defined at Interface level)
       bDeviceSubClass         0
       bDeviceProtocol         0
       bMaxPacketSize0         8
       idVendor           0x0c45 Microdia
       idProduct          0x1010
       bcdDevice            0.03
       iManufacturer           1 JESS
       iProduct                2 YUREX
       iSerial                 3 10000269
       bNumConfigurations      1
       Configuration Descriptor:
         bLength                 9
         bDescriptorType         2
         wTotalLength           34
         bNumInterfaces          1
         bConfigurationValue     1
         iConfiguration          0
         bmAttributes         0xa0
           (Bus Powered)
           Remote Wakeup
         MaxPower              100mA
         Interface Descriptor:
           bLength                 9
           bDescriptorType         4
           bInterfaceNumber        0
           bAlternateSetting       0
           bNumEndpoints           1
           bInterfaceClass         3 Human Interface Device
           bInterfaceSubClass      1 Boot Interface Subclass
           bInterfaceProtocol      0 None
           iInterface              0
             HID Device Descriptor:
               bLength                 9
               bDescriptorType        33
               bcdHID               1.10
               bCountryCode            0 Not supported
               bNumDescriptors         1
               bDescriptorType        34 Report
               wDescriptorLength      31
              Report Descriptors:
                ** UNAVAILABLE **
           Endpoint Descriptor:
             bLength                 7
             bDescriptorType         5
             bEndpointAddress     0x81  EP 1 IN
             bmAttributes            3
               Transfer Type            Interrupt
               Synch Type               None
               Usage Type               Data
             wMaxPacketSize     0x0008  1x 8 bytes
             bInterval              10
    Device Status:     0x0002
       (Bus Powered)
       Remote Wakeup Enabled

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=26922

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Cc: Greg KH <gregkh@suse.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Maciej Rutecki <maciej.rutecki@gmail.com>
Reported-by: Thomas B?chler <thomas@archlinux.org>
Tested-by: Thomas B?chler <thomas@archlinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport PCI_EXP_LNKCTL_ASPM_L0S and PCI_EXP_LNKCTL_ASPM_L1
Luis R. Rodriguez [Wed, 12 Dec 2012 02:26:45 +0000 (18:26 -0800)]
compat: backport PCI_EXP_LNKCTL_ASPM_L0S and PCI_EXP_LNKCTL_ASPM_L1

This backports the addition of two defines added by the
commit below.

commit 7508320678b7819ac6aeb89580b8622a424ce586
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Wed Dec 5 13:51:19 2012 -0700

    PCI: Add standard PCIe Capability Link ASPM field names

    Add standard #defines for ASPM fields in PCI Express Link Capability and
    Link Control registers.

    Previously we used PCIE_LINK_STATE_L0S and PCIE_LINK_STATE_L1 directly, but
    these are defined for the Linux ASPM interfaces, e.g.,
    pci_disable_link_state(), and only coincidentally match the actual register
    bits.  PCIE_LINK_STATE_CLKPM, also part of that interface, does not match
    the register bit.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport hid_ignore()
Luis R. Rodriguez [Wed, 12 Dec 2012 02:09:10 +0000 (18:09 -0800)]
compat: backport hid_ignore()

We backport hid_ignore() as of next-20121211, that is now
used by other drivers.

mcgrof@drvbp1 ~/compat (git::master)$ time ckmake
Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-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-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-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    2m9.630s
user    8m55.525s
sys     2m2.460s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: generate CONFIG_COMPAT_KERNEL_3_8
Luis R. Rodriguez [Wed, 12 Dec 2012 02:05:49 +0000 (18:05 -0800)]
compat: generate CONFIG_COMPAT_KERNEL_3_8

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport unsigned netlink attribute accessors
Johannes Berg [Fri, 7 Dec 2012 01:05:16 +0000 (17:05 -0800)]
compat: backport unsigned netlink attribute accessors

These were added upstream in commit
4778e0be16c291ba6d9d55eeff3a6764fc84a071.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport napi_gro_receive()
Luis R. Rodriguez [Wed, 5 Dec 2012 00:32:46 +0000 (16:32 -0800)]
compat: backport napi_gro_receive()

Just call netif_receive_skb() for kernels older than
v2.6.29. If Enterprise Linux distributions decided to
backport GRO support onto a kernel older than 2.6.29,
they'll likely want #ifdef this out accordingly.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains d565b0a1
v2.6.29-rc1~581^2~181

commit d565b0a1a9b6ee7dff46e1f68b26b526ac11ae50
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Mon Dec 15 23:38:52 2008 -0800

    net: Add Generic Receive Offload infrastructure

    This patch adds the top-level GRO (Generic Receive Offload) infrastructure.
    This is pretty similar to LRO except that this is protocol-independent.
    Instead of holding packets in an lro_mgr structure, they're now held in
    napi_struct.

    For drivers that intend to use this, they can set the NETIF_F_GRO bit and
    call napi_gro_receive instead of netif_receive_skb or just call netif_rx.
    The latter will call napi_receive_skb automatically.  When napi_gro_receive
    is used, the driver must either call napi_complete/napi_rx_complete, or
    call napi_gro_flush in softirq context if the driver uses the primitives
    __napi_complete/__napi_rx_complete.

    Protocols will set the gro_receive and gro_complete function pointers in
    order to participate in this scheme.

    In addition to the packet, gro_receive will get a list of currently held
    packets.  Each packet in the list has a same_flow field which is non-zero
    if it is a potential match for the new packet.  For each packet that may
    match, they also have a flush field which is non-zero if the held packet
    must not be merged with the new packet.

    Once gro_receive has determined that the new skb matches a held packet,
    the held packet may be processed immediately if the new skb cannot be
    merged with it.  In this case gro_receive should return the pointer to
    the existing skb in gro_list.  Otherwise the new skb should be merged into
    the existing packet and NULL should be returned, unless the new skb makes
    it impossible for any further merges to be made (e.g., FIN packet) where
    the merged skb should be returned.

    Whenever the skb is merged into an existing entry, the gro_receive
    function should set NAPI_GRO_CB(skb)->same_flow.  Note that if an skb
    merely matches an existing entry but can't be merged with it, then
    this shouldn't be set.

    If gro_receive finds it pointless to hold the new skb for future merging,
    it should set NAPI_GRO_CB(skb)->flush.

    Held packets will be flushed by napi_gro_flush which is called by
    napi_complete and napi_rx_complete.

    Currently held packets are stored in a singly liked list just like LRO.
    The list is limited to a maximum of 8 entries.  In future, this may be
    expanded to use a hash table to allow more flows to be held for merging.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backplane mode negotiation ethtool definitions
Luis R. Rodriguez [Tue, 4 Dec 2012 21:46:45 +0000 (21:46 +0000)]
compat: backplane mode negotiation ethtool definitions

This backports the ethtool definitions implemented on
commit 894b19a6.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 894b19a6
v2.6.31-rc1~14^2~577

commit 894b19a6b343ce3589237167a56e6df0fe72ef0d
Author: Ben Hutchings <bhutchings@solarflare.com>
Date:   Wed Apr 29 08:25:57 2009 +0000

    ethtool/mdio: Support backplane mode negotiation

    Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: rename MDIO exported symbols
Luis R. Rodriguez [Tue, 4 Dec 2012 21:12:46 +0000 (21:12 +0000)]
compat: rename MDIO exported symbols

compat-drivers now has support for carrying over the
MDIO module. To help it avoid clashes with already in
place drivers that rely on the older MDIO module we
rename the exported symbols of the shinier module with
a compat_ prefix.

An alternative to this strategy is to have compat-drivers
work under a separate namespace but we have yet to receive
patches for that, although we hear someone did it.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport netif_set_real_num_rx_queues()
Luis R. Rodriguez [Tue, 4 Dec 2012 01:36:15 +0000 (17:36 -0800)]
compat: backport netif_set_real_num_rx_queues()

netif_set_real_num_rx_queues() was added on v2.6.37 but
requires CONFIG_RPS support which was added on v2.6.35.
A few updates were done on the net core though to support
changing the number of RX queues if the device was already
registered. We can't support this on older kernels though
so the best we can do is for kernels >= 2.6.35 simply try
to update the num_rx_queues and if the device is registered
fail.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 62fe0b40
v2.6.37-rc1~147^2~340

commit 62fe0b40abb3484413800edaef9b087a20059acf
Author: Ben Hutchings <bhutchings@solarflare.com>
Date:   Mon Sep 27 08:24:33 2010 +0000

    net: Allow changing number of RX queues after device allocation

    For RPS, we create a kobject for each RX queue based on the number of
    queues passed to alloc_netdev_mq().  However, drivers generally do not
    determine the numbers of hardware queues to use until much later, so
    this usually represents the maximum number the driver may use and not
    the actual number in use.

    For TX queues, drivers can update the actual number using
    netif_set_real_num_tx_queues().  Add a corresponding function for RX
    queues, netif_set_real_num_rx_queues().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
mcgrof@drvbp1 ~/compat (git::master)$ time ckmake
Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-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-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-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    2m5.270s
user    8m51.501s
sys     2m1.576s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport netif_set_real_num_tx_queues()
Luis R. Rodriguez [Mon, 3 Dec 2012 23:40:21 +0000 (15:40 -0800)]
compat: backport netif_set_real_num_tx_queues()

This was added as of v2.6.35. We implement a slightly
modified version given that this was later changed
to return int through commit e6484930. The changes
on e6484930 however were added due to some internal
changes on core networking, we'll leave in place
a simpler implementation for older kernels.

Note that for older kernels than 2.6.27 we use
the netdev egress_subqueue_count to set the TX
queue count. Commit fd2ea0a7 added real_num_tx_queues
to the netdevice when Multiqueue was added.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains f0796d5c73e59786d09a1e617689d1d415f2db44
v2.6.35-rc5~14^2~14

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 3171d026
v2.6.37-rc1~147^2~339

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains fd2ea0a7
v2.6.27-rc1~964^2~78

commit f0796d5c73e59786d09a1e617689d1d415f2db44
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Thu Jul 1 13:21:57 2010 +0000

    net: decreasing real_num_tx_queues needs to flush qdisc

    Reducing real_num_queues needs to flush the qdisc otherwise
    skbs with queue_mappings greater then real_num_tx_queues can
    be sent to the underlying driver.

    The flow for this is,

    dev_queue_xmit()
        dev_pick_tx()
                skb_tx_hash()  => hash using real_num_tx_queues
                skb_set_queue_mapping()
        ...
        qdisc_enqueue_root() => enqueue skb on txq from hash
    ...
    dev->real_num_tx_queues -= n
    ...
    sch_direct_xmit()
        dev_hard_start_xmit()
                ndo_start_xmit(skb,dev) => skb queue set with old hash

    skbs are enqueued on the qdisc with skb->queue_mapping set
    0 < queue_mappings < real_num_tx_queues.  When the driver
    decreases real_num_tx_queues skb's may be dequeued from the
    qdisc with a queue_mapping greater then real_num_tx_queues.

    This fixes a case in ixgbe where this was occurring with DCB
    and FCoE. Because the driver is using queue_mapping to map
    skbs to tx descriptor rings we can potentially map skbs to
    rings that no longer exist.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit e6484930d7c73d324bccda7d43d131088da697b9
Author: Tom Herbert <therbert@google.com>
Date:   Mon Oct 18 18:04:39 2010 +0000

    net: allocate tx queues in register_netdevice

    This patch introduces netif_alloc_netdev_queues which is called from
    register_device instead of alloc_netdev_mq.  This makes TX queue
    allocation symmetric with RX allocation.  Also, queue locks allocation
    is done in netdev_init_one_queue.  Change set_real_num_tx_queues to
    fail if requested number < 1 or greater than number of allocated
    queues.

Signed-off-by: Tom Herbert <therbert@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit fd2ea0a79faad824258af5dcec1927aa24d81c16
Author: David S. Miller <davem@davemloft.net>
Date:   Thu Jul 17 01:56:23 2008 -0700

    net: Use queue aware tests throughout.

    This effectively "flips the switch" by making the core networking
    and multiqueue-aware drivers use the new TX multiqueue structures.

    Non-multiqueue drivers need no changes.  The interfaces they use such
    as netif_stop_queue() degenerate into an operation on TX queue zero.
    So everything "just works" for them.

    Code that really wants to do "X" to all TX queues now invokes a
    routine that does so, such as netif_tx_wake_all_queues(),
    netif_tx_stop_all_queues(), etc.

    pktgen and netpoll required a little bit more surgery than the others.

    In particular the pktgen changes, whilst functional, could be largely
    improved.  The initial check in pktgen_xmit() will sometimes check the
    wrong queue, which is mostly harmless.  The thing to do is probably to
    invoke fill_packet() earlier.

    The bulk of the netpoll changes is to make the code operate solely on
    the TX queue indicated by by the SKB queue mapping.

    Setting of the SKB queue mapping is entirely confined inside of
    net/core/dev.c:dev_pick_tx().  If we end up needing any kind of
    special semantics (drops, for example) it will be implemented here.

    Finally, we now have a "real_num_tx_queues" which is where the driver
    indicates how many TX queues are actually active.

    With IGB changes from Jeff Kirsher.

Signed-off-by: David S. Miller <davem@davemloft.net>
mcgrof@drvbp1 ~/compat (git::master)$ time ckmake
Trying kernel 3.6.5-030605-generic [OK]
Trying kernel 3.5.7-030507-generic [OK]
Trying kernel 3.4.17-030417-generic [OK]
Trying kernel 3.3.8-030308-generic [OK]
Trying kernel 3.2.33-030233-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.50-030050-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-02063513-generic [OK]
Trying kernel 2.6.34-02063413-generic [OK]
Trying kernel 2.6.33-02063320-generic [OK]
Trying kernel 2.6.32-02063260-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    1m51.110s
user    4m58.571s
sys     1m39.282s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport PTR_RET()
Luis R. Rodriguez [Mon, 3 Dec 2012 21:23:12 +0000 (13:23 -0800)]
compat: backport PTR_RET()

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains fa9ee9c4
v2.6.39-rc1~267

commit fa9ee9c4b9885dfdf8eccac19b8b4fc8a7c53288
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date:   Tue Mar 22 16:34:05 2011 -0700

    include/linux/err.h: add a function to cast error-pointers to a return value

    PTR_RET() can be used if you have an error-pointer and are only interested
    in the eventual error value, but not the pointer.  Yields the usual 0 for
    no error, -ESOMETHING otherwise.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>