summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-04-21 20:23:54 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-04-21 20:23:54 +0000
commit3de0b35306fb42b6925e19b5c0b8a17f1469faba (patch)
treeb1256a65ed859ec59b7b3b166ba96c83770cb737 /sys-fs/vhba
parentmarked x86 per bug 412985 (diff)
downloadhistorical-3de0b35306fb42b6925e19b5c0b8a17f1469faba.tar.gz
historical-3de0b35306fb42b6925e19b5c0b8a17f1469faba.tar.bz2
historical-3de0b35306fb42b6925e19b5c0b8a17f1469faba.zip
Fix build failure with kernels 3.4-rc1 and higher with CONFIG_ENABLE_WARN_DEPRECATED (bug #411459, thanks to darkbasic for reporting).
Package-Manager: portage-2.2.0_alpha100/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/vhba')
-rw-r--r--sys-fs/vhba/ChangeLog8
-rw-r--r--sys-fs/vhba/Manifest17
-rw-r--r--sys-fs/vhba/files/vhba-20110915-3.4-kmap_atomic.patch100
-rw-r--r--sys-fs/vhba/vhba-20110915.ebuild4
4 files changed, 121 insertions, 8 deletions
diff --git a/sys-fs/vhba/ChangeLog b/sys-fs/vhba/ChangeLog
index 02158036a33a..7b980e078813 100644
--- a/sys-fs/vhba/ChangeLog
+++ b/sys-fs/vhba/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-fs/vhba
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/vhba/ChangeLog,v 1.31 2012/04/09 12:08:48 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/vhba/ChangeLog,v 1.32 2012/04/21 20:23:54 tetromino Exp $
+
+ 21 Apr 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ vhba-20110915.ebuild, +files/vhba-20110915-3.4-kmap_atomic.patch:
+ Fix build failure with kernels 3.4-rc1 and higher with
+ CONFIG_ENABLE_WARN_DEPRECATED (bug #411459, thanks to darkbasic for
+ reporting).
09 Apr 2012; Markus Meier <maekke@gentoo.org> vhba-20110915.ebuild:
x86 stable, bug #406941
diff --git a/sys-fs/vhba/Manifest b/sys-fs/vhba/Manifest
index ad033a98949e..450d87dda519 100644
--- a/sys-fs/vhba/Manifest
+++ b/sys-fs/vhba/Manifest
@@ -9,18 +9,23 @@ AUX vhba-1.0.0-scsicmnd.patch 2736 RMD160 503eb663d33fa082eceab87d2521b9d2dab469
AUX vhba-1.2.1-kernel-2.6.33.patch 549 RMD160 bf721cc0713a8b3dc3d53663e6dcfc29c8b8282e SHA1 f3db205d4b653229681c53d48162e9572ff1ca5e SHA256 370f0c77775d5646537aba809f5adfd0d11c7ddb8fdd4f6572dd541aad4b675e
AUX vhba-1.2.1-kernel-2.6.34.patch 517 RMD160 43906e3240da7f85eb6f27fe0672ae7a8a2a3647 SHA1 c89de77d3c6dc86bf8b149968d5865c08d49235a SHA256 379e968a94e8b4736c01ccbe2635dec22371b0885a37cea1a685dc403c5c4989
AUX vhba-20101015-scsi-host-lock-push-down.patch 1972 RMD160 0f4c1900b46d98c8a50f6600a49274cb942ee800 SHA1 a329c5b80ded0f9af2f3bbc24d7939c16e5efa56 SHA256 7d428d5d6f8be7088f98a1edacc8900ebfb2072d28e79cb613012b40552c1235
+AUX vhba-20110915-3.4-kmap_atomic.patch 4360 RMD160 3a2f49b843aeea2f41fc8c04c4dc4b68826a23c5 SHA1 cdf6af67da8cbfec5f41a0c70c2673de2f4d9ee8 SHA256 4c6d87da270f19a1871b5f6456afc43b5e2c7f60f26f17ce6db27642a9c87f55
DIST vhba-module-1.2.1.tar.bz2 6585 RMD160 ecdbbd40f34b68816b0eefe43a64a4c664b31580 SHA1 5226b3dd16d793cd58a712e8ca44f3b45194e248 SHA256 1ab729d029c49e5e6231cdec3b9f88f17c44a292fe77f2bfbab506b62999a3ae
DIST vhba-module-20101015.tar.bz2 16309 RMD160 6994cbffd44037d42b8c74b3786c1bea06e664c6 SHA1 e0bc1a9e5b99bf13e5dea1474254c51484ec217c SHA256 3b115054803cdbc1497591dc7a3a57ebeb2bd39086fb8909016ed418d3667d1a
DIST vhba-module-20110915.tar.gz 17773 RMD160 4a9cd360e81b9b73ee1909a70b92b18b04bb1d94 SHA1 7da02bfce3557e77b7895dfff5e11b4ec4bb4564 SHA256 9597ab6b66c364962a4db48d11cb324f789106e9e69d264e894f829bedb34fbd
EBUILD vhba-1.2.1.ebuild 1577 RMD160 3fdfe9cf731515ff92cd1d9106102e2a57b94181 SHA1 dfd82f4190f6597cf2237d05ce5ac0e805992bbb SHA256 eb3d57de341669eb5290846a72dbfca2efde49f4e7cd5ba9fb04b30de3517403
EBUILD vhba-20101015-r1.ebuild 1567 RMD160 1d0c980d6b732ccc9df711b85a414b7fc183f86a SHA1 d8c9d40dd1ee10e4651fa039691fd332627d3d29 SHA256 ee6a9562ac86955bc28590f39640bc5e49de9104515a7cab26ce7cfb62e307db
-EBUILD vhba-20110915.ebuild 2315 RMD160 5f0b45ae5932dc8eed9814474b4bee646382e86b SHA1 31c7ea3a289ec634e43e4d5de62786a21efc34f1 SHA256 aa7667350910fcf21b038dfa64800eabdaac0ae7ab9b30d77bdbe602cfe1949f
-MISC ChangeLog 5824 RMD160 214a263aa1f2f26a12e43fe2293997ab531dca3a SHA1 653ad5e2885e923d43a6f821bfb54da3715a3579 SHA256 20f1a41e88233898857e42f8beee2d3cf5b3fe0ecd594eb087101105135dc1d2
+EBUILD vhba-20110915.ebuild 2442 RMD160 1b911eba70c59379d0d3d51ea1b8fb6c6967981c SHA1 1740a054a29a45f8c0551066ff0795f7b3ad29a7 SHA256 27e52b29bc7c8a7d92cf736fa408c530ef599c362285ffb64a0d6fb1dd49ee2f
+MISC ChangeLog 6096 RMD160 a0e5b02f512756e1febaa2c2f33f3fedb5fef3f9 SHA1 936b514689a51a5600d110b76c1ccd664035a749 SHA256 b9f0f5ebebc9aee5e9164d3f7f0769ec2b3b207359d27a660ddc727b8f2bf18c
MISC metadata.xml 240 RMD160 0e579a0eee987b510062c61fb213844574fee876 SHA1 0dcf565094dc7c485f71651d488cc41dfbca1132 SHA256 4a0db93c159180b93d98dadc1cb36f054f18a7413357a0dd753c9264a43f7477
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEARECAAYFAk+C0f4ACgkQkKaRLQcq0GJGlwCfSpNOHPlMl9pV2QCL46uMd9XB
-TS0AoJUvA761zoAZyFp0QeGNYYcLNtGT
-=cE0L
+iQEcBAEBAgAGBQJPkxdgAAoJEJ0WA1zPCt1hs40H/0XRKaFeyCVrLHIE8Nn0Bxux
+6fqyWzBqWY/FGuEWLzovhXB8S9rviRS915q96gpSjOjD3GqYjOzNkzvwWm/2DKSX
+XpjCdHesxhh2GrBPLESDB1CM+k+bj0zcjzMScJdS35y///xe6R8G4G+vu43HEEC4
+ewZGuvlgcddlAOojrF8+GrkMQ7fpwC1JiiIHuHDE2mEctoFOD1vvRLX01dsoGSKH
+Dlx/rtRZZPE9j/OVrL1Hry+F3lFL8suo4jWM9yoLaIlLWhWVFnuVYXuz1q9w0TTL
+PHQg+/2gFQCk45wuMeRr3AbBbv/eAOEU98vrR9SkWzemYZopFnKSEM0I46DSqi0=
+=i7GS
-----END PGP SIGNATURE-----
diff --git a/sys-fs/vhba/files/vhba-20110915-3.4-kmap_atomic.patch b/sys-fs/vhba/files/vhba-20110915-3.4-kmap_atomic.patch
new file mode 100644
index 000000000000..43bd58dacfaa
--- /dev/null
+++ b/sys-fs/vhba/files/vhba-20110915-3.4-kmap_atomic.patch
@@ -0,0 +1,100 @@
+From 0e051e8655c1d68d748d4b6976261aee7d2c248a Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sat, 21 Apr 2012 14:16:59 -0400
+Subject: [PATCH] VHBA: 2-argument k[un]map_atomic is deprecated in >=3.4-rc1
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The 1-argument form of k[un]map_atomic was introduced in 2.6.37-rc1, and
+the old 2-argument form is deprecated in 3.4-rc1 and higher. As a
+result, building vhba for a 3.4-rc* kernel that has
+CONFIG_ENABLE_WARN_DEPRECATED fails:
+
+/tmp/cdemu/vhba-module/vhba.c: In function ‘do_request’:
+/tmp/cdemu/vhba-module/vhba.c:487:33: error: ‘kmap_atomic_deprecated’ is
+deprecated (declared at include/linux/highmem.h:125)
+[-Werror=deprecated-declarations]
+/tmp/cdemu/vhba-module/vhba.c:492:1: error: ‘__kunmap_atomic_deprecated’
+is deprecated (declared at include/linux/highmem.h:135)
+[-Werror=deprecated-declarations]
+/tmp/cdemu/vhba-module/vhba.c: In function ‘do_response’:
+/tmp/cdemu/vhba-module/vhba.c:570:33: error: ‘kmap_atomic_deprecated’ is
+deprecated (declared at include/linux/highmem.h:125)
+[-Werror=deprecated-declarations]
+/tmp/cdemu/vhba-module/vhba.c:575:1: error: ‘__kunmap_atomic_deprecated’
+is deprecated (declared at include/linux/highmem.h:135)
+[-Werror=deprecated-declarations]
+cc1: all warnings being treated as errors
+
+To work around this problem, add vhba_k[un]map_atomic wrappers that
+default to the 1-argument form of k[un]map_atomic for 2.6.37 and newer,
+and to the old 2-argument form for older kernels.
+---
+ vhba-module/vhba.c | 23 +++++++++++++++++------
+ 1 files changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/vhba-module/vhba.c b/vhba-module/vhba.c
+index 8937b94..a36fd59 100644
+--- a/vhba-module/vhba.c
++++ b/vhba-module/vhba.c
+@@ -27,6 +27,7 @@
+ #include <linux/miscdevice.h>
+ #include <linux/poll.h>
+ #include <linux/slab.h>
++#include <linux/version.h>
+ #ifdef CONFIG_COMPAT
+ #include <linux/compat.h>
+ #endif
+@@ -64,6 +65,16 @@ MODULE_LICENSE("GPL");
+ #define DATA_TO_DEVICE(dir) ((dir) == DMA_TO_DEVICE || (dir) == DMA_BIDIRECTIONAL)
+ #define DATA_FROM_DEVICE(dir) ((dir) == DMA_FROM_DEVICE || (dir) == DMA_BIDIRECTIONAL)
+
++/* 1-argument form of k[un]map_atomic was introduced in 2.6.37-rc1;
++ 2-argument form was deprecated in 3.4-rc1 */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++#define vhba_kmap_atomic kmap_atomic
++#define vhba_kunmap_atomic kunmap_atomic
++#else
++#define vhba_kmap_atomic(page) kmap_atomic(page, KM_USER0)
++#define vhba_kunmap_atomic(page) kunmap_atomic(page, KM_USER0)
++#endif
++
+ enum vhba_req_state {
+ VHBA_REQ_FREE,
+ VHBA_REQ_PENDING,
+@@ -473,12 +484,12 @@ static ssize_t do_request(struct scsi_cmnd *cmd, char __user *buf, size_t buf_le
+ size_t len = sg[i].length;
+
+ #ifdef KAT_SCATTERLIST_HAS_PAGE_LINK
+- kaddr = kmap_atomic(sg_page(&sg[i]), KM_USER0);
++ kaddr = vhba_kmap_atomic(sg_page(&sg[i]));
+ #else
+- kaddr = kmap_atomic(sg[i].page, KM_USER0);
++ kaddr = vhba_kmap_atomic(sg[i].page);
+ #endif
+ memcpy(kbuf, kaddr + sg[i].offset, len);
+- kunmap_atomic(kaddr, KM_USER0);
++ vhba_kunmap_atomic(kaddr);
+
+ if (copy_to_user(uaddr, kbuf, len)) {
+ if (kbuf != buf_stack)
+@@ -556,12 +567,12 @@ static ssize_t do_response(struct scsi_cmnd *cmd, const char __user *buf, size_t
+ uaddr += len;
+
+ #ifdef KAT_SCATTERLIST_HAS_PAGE_LINK
+- kaddr = kmap_atomic(sg_page(&sg[i]), KM_USER0);
++ kaddr = vhba_kmap_atomic(sg_page(&sg[i]));
+ #else
+- kaddr = kmap_atomic(sg[i].page, KM_USER0);
++ kaddr = vhba_kmap_atomic(sg[i].page);
+ #endif
+ memcpy(kaddr + sg[i].offset, kbuf, len);
+- kunmap_atomic(kaddr, KM_USER0);
++ vhba_kunmap_atomic(kaddr);
+
+ to_read -= len;
+ if (to_read == 0)
+--
+1.7.8.5
+
diff --git a/sys-fs/vhba/vhba-20110915.ebuild b/sys-fs/vhba/vhba-20110915.ebuild
index d99c815646d9..e1c2112b6aee 100644
--- a/sys-fs/vhba/vhba-20110915.ebuild
+++ b/sys-fs/vhba/vhba-20110915.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/vhba/vhba-20110915.ebuild,v 1.5 2012/04/09 12:08:48 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/vhba/vhba-20110915.ebuild,v 1.6 2012/04/21 20:23:54 tetromino Exp $
EAPI="4"
@@ -33,6 +33,8 @@ pkg_setup() {
}
src_prepare() {
+ # Build failure with >=3.4-rc1 and CONFIG_ENABLE_WARN_DEPRECATED, #411459
+ epatch "${FILESDIR}/${P}-3.4-kmap_atomic.patch"
# Avoid "make jobserver unavailable" warning
sed -e 's:\t$(KMAKE):\t+$(KMAKE):g' -i Makefile || die "sed failed"
}