linux: some PKGBUILD fixes and re-add the syscalls.h revert

This commit is contained in:
Thomas Bächler 2014-03-31 23:22:46 +00:00
parent 60fcf046d8
commit ff6004ab78
5 changed files with 33 additions and 56 deletions

View File

@ -1,7 +1,7 @@
From 5d77ba2d26110c678b40fd723866a17d4036de12 Mon Sep 17 00:00:00 2001 From 5d77ba2d26110c678b40fd723866a17d4036de12 Mon Sep 17 00:00:00 2001
From: Lucas De Marchi <lucas.demarchi@intel.com> From: Lucas De Marchi <lucas.demarchi@intel.com>
Date: Tue, 18 Feb 2014 02:19:26 -0300 Date: Tue, 18 Feb 2014 02:19:26 -0300
Subject: [PATCH 1/3] Bluetooth: allocate static minor for vhci Subject: [PATCH 1/4] Bluetooth: allocate static minor for vhci
Commit bfacbb9 (Bluetooth: Use devname:vhci module alias for virtual HCI Commit bfacbb9 (Bluetooth: Use devname:vhci module alias for virtual HCI
driver) added the module alias to hci_vhci module so it's possible to driver) added the module alias to hci_vhci module so it's possible to

View File

@ -1,7 +1,7 @@
From 9bc5b710f5957763d6944f38143b627d127c15ff Mon Sep 17 00:00:00 2001 From 9bc5b710f5957763d6944f38143b627d127c15ff Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no> From: Tom Gundersen <teg@jklm.no>
Date: Mon, 3 Feb 2014 11:14:13 +1030 Date: Mon, 3 Feb 2014 11:14:13 +1030
Subject: [PATCH 2/3] module: allow multiple calls to MODULE_DEVICE_TABLE() per Subject: [PATCH 2/4] module: allow multiple calls to MODULE_DEVICE_TABLE() per
module module
Commit 78551277e4df5: "Input: i8042 - add PNP modaliases" had a bug, where the Commit 78551277e4df5: "Input: i8042 - add PNP modaliases" had a bug, where the

View File

@ -1,7 +1,7 @@
From 06d2e746733a83469944481cb7f4fb1c7134a8ce Mon Sep 17 00:00:00 2001 From 06d2e746733a83469944481cb7f4fb1c7134a8ce Mon Sep 17 00:00:00 2001
From: Rusty Russell <rusty@rustcorp.com.au> From: Rusty Russell <rusty@rustcorp.com.au>
Date: Mon, 3 Feb 2014 11:15:13 +1030 Date: Mon, 3 Feb 2014 11:15:13 +1030
Subject: [PATCH 3/3] module: remove MODULE_GENERIC_TABLE Subject: [PATCH 3/4] module: remove MODULE_GENERIC_TABLE
MODULE_DEVICE_TABLE() calles MODULE_GENERIC_TABLE(); make it do the MODULE_DEVICE_TABLE() calles MODULE_GENERIC_TABLE(); make it do the
work directly. This also removes a wart introduced in the last patch, work directly. This also removes a wart introduced in the last patch,

View File

@ -1,68 +1,60 @@
From 83460ec8dcac14142e7860a01fa59c267ac4657c Mon Sep 17 00:00:00 2001 From 268984331a319f47179d6f0b62aa0e312fe4497d Mon Sep 17 00:00:00 2001
From: Andi Kleen <ak@linux.intel.com> From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
Date: Tue, 12 Nov 2013 15:08:36 -0800 Date: Tue, 1 Apr 2014 01:15:34 +0200
Subject: [PATCH] syscalls.h: use gcc alias instead of assembler aliases for Subject: [PATCH 4/4] Revert "syscalls.h: use gcc alias instead of assembler
syscalls aliases for syscalls"
Use standard gcc __attribute__((alias(foo))) to define the syscall aliases This reverts commit 83460ec8dcac14142e7860a01fa59c267ac4657c.
instead of custom assembler macros.
This is far cleaner, and also fixes my LTO kernel build. For details, see https://lkml.org/lkml/2014/1/26/22.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
--- ---
include/linux/compat.h | 4 ++-- include/linux/compat.h | 4 ++--
include/linux/syscalls.h | 4 ++-- include/linux/syscalls.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-) 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/compat.h b/include/linux/compat.h diff --git a/include/linux/compat.h b/include/linux/compat.h
index 345da00..ada34c9 100644 index 3f448c6..90c199f 100644
--- a/include/linux/compat.h --- a/include/linux/compat.h
+++ b/include/linux/compat.h +++ b/include/linux/compat.h
@@ -41,14 +41,14 @@ @@ -41,14 +41,14 @@
COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
- asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ - asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
+ asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\ - __attribute__((alias(__stringify(compat_SyS##name)))); \
+ __attribute__((alias(__stringify(compat_SyS##name)))); \ + asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\ asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\
asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\ asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
{ \ { \
return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \ return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \
} \ } \
- SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \ + SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \
static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
#ifndef compat_user_stack_pointer #ifndef compat_user_stack_pointer
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 7fac04e..c27f846 100644 index a747a77..9e7cb9d 100644
--- a/include/linux/syscalls.h --- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h +++ b/include/linux/syscalls.h
@@ -184,7 +184,8 @@ extern struct trace_event_functions exit_syscall_print_funcs; @@ -185,8 +185,7 @@ extern struct trace_event_functions exit_syscall_print_funcs;
#define __PROTECT(...) asmlinkage_protect(__VA_ARGS__) #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__)
#define __SYSCALL_DEFINEx(x, name, ...) \ #define __SYSCALL_DEFINEx(x, name, ...) \
- asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ - asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
+ asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ - __attribute__((alias(__stringify(SyS##name)))); \
+ __attribute__((alias(__stringify(SyS##name)))); \ + asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
@@ -194,7 +195,6 @@ extern struct trace_event_functions exit_syscall_print_funcs; @@ -196,6 +195,7 @@ extern struct trace_event_functions exit_syscall_print_funcs;
__PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
return ret; \ return ret; \
} \ } \
- SYSCALL_ALIAS(sys##name, SyS##name); \ + SYSCALL_ALIAS(sys##name, SyS##name); \
static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
asmlinkage long sys_time(time_t __user *tloc); asmlinkage long sys_time(time_t __user *tloc);
-- --
1.8.5.3 1.9.1

View File

@ -21,15 +21,17 @@ source=("https://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
'0001-Bluetooth-allocate-static-minor-for-vhci.patch' '0001-Bluetooth-allocate-static-minor-for-vhci.patch'
'0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch' '0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch'
'0003-module-remove-MODULE_GENERIC_TABLE.patch' '0003-module-remove-MODULE_GENERIC_TABLE.patch'
'0004-Revert-syscalls.h-use-gcc-alias-instead-of-assembler.patch'
) )
sha256sums=('61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa' sha256sums=('61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa'
'059325a759c92a0bbc07b5618b3d59eccd72a7647d066c509c9eceb0aecc799e' '059325a759c92a0bbc07b5618b3d59eccd72a7647d066c509c9eceb0aecc799e'
'd2c8ddda8e56884596ce76fd53f1513a27ed4f9a092513813d0d6164f423cc28' 'd2c8ddda8e56884596ce76fd53f1513a27ed4f9a092513813d0d6164f423cc28'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182' 'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182'
'17984c2dafbc3099cafe01dbf03039844099c3cc7719d9bc8633b1ca6a6ab17b' '29a958c37e1fb04c49b1cc3be4f38b53ffdeef61ab049865209f6b77817302d0'
'03522828e5a2af5b5ccfdedb21ec429797e4391549091781df899e7aacb9818a' 'd8db3b235d871d2b27986d3cb73a57b1d33fed52196a4b608152498a57e93838'
'fa447576b7f86b495ff922f6b217e5c5864484d23428dd62e46f8fb7778cec7c') 'eb9a773b7b978bc508e8459ef835ff2cb8a41bb235caff1c18c5b718d7ce902c'
'4edd92642d710d8a351dd2acce36d412eccbf60380f9d0368ec315acb49ad704')
_kernelname=${pkgbase#linux} _kernelname=${pkgbase#linux}
@ -48,9 +50,6 @@ prepare() {
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -p1 -i "${srcdir}/change-default-console-loglevel.patch" patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"
# Fix symbols: Revert http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=83460ec8dcac14142e7860a01fa59c267ac4657c
#patch -Rp1 -i "${srcdir}/0001-syscalls.h-use-gcc-alias-instead-of-assembler-aliase.patch"
# Fix vhci warning in kmod (to restore every kernel maintainer's sanity) # Fix vhci warning in kmod (to restore every kernel maintainer's sanity)
patch -p1 -i "${srcdir}/0001-Bluetooth-allocate-static-minor-for-vhci.patch" patch -p1 -i "${srcdir}/0001-Bluetooth-allocate-static-minor-for-vhci.patch"
@ -58,6 +57,10 @@ prepare() {
patch -p1 -i "${srcdir}/0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch" patch -p1 -i "${srcdir}/0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch"
patch -p1 -i "${srcdir}/0003-module-remove-MODULE_GENERIC_TABLE.patch" patch -p1 -i "${srcdir}/0003-module-remove-MODULE_GENERIC_TABLE.patch"
# Fix symbols: Revert http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=83460ec8dcac14142e7860a01fa59c267ac4657c
# For details, see https://lkml.org/lkml/2014/1/26/22
patch -p1 -i "${srcdir}/0004-Revert-syscalls.h-use-gcc-alias-instead-of-assembler.patch"
if [ "${CARCH}" = "x86_64" ]; then if [ "${CARCH}" = "x86_64" ]; then
cat "${srcdir}/config.x86_64" > ./.config cat "${srcdir}/config.x86_64" > ./.config
else else
@ -205,25 +208,6 @@ _package-headers() {
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/" cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
# add headers for lirc package
# pci
for i in bt8xx cx88 saa7134; do
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/pci/${i}"
cp -a drivers/media/pci/${i}/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/pci/${i}"
done
# usb
for i in cpia2 em28xx pwc sn9c102; do
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/${i}"
cp -a drivers/media/usb/${i}/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/${i}"
done
# i2c
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c"
cp drivers/media/i2c/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
for i in cx25840; do
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/${i}"
cp -a drivers/media/i2c/${i}/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/${i}"
done
# add docbook makefile # add docbook makefile
install -D -m644 Documentation/DocBook/Makefile \ install -D -m644 Documentation/DocBook/Makefile \
"${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile" "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
@ -255,6 +239,7 @@ _package-headers() {
# http://bugs.archlinux.org/task/13146 # http://bugs.archlinux.org/task/13146
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/" mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/" cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/" cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
# add dvb headers # add dvb headers