summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFigue2017-11-26 00:45:58 +0100
committerFigue2017-11-26 00:45:58 +0100
commit6193bf142193e3931a7fc14ad62f53b6817a264e (patch)
treec3921454a602532e96ab23b6b3c65f3b77034fd8
parent9f0023439f83f549a3a7029eeaee450336b6b577 (diff)
downloadaur-6193bf142193e3931a7fc14ad62f53b6817a264e.tar.gz
4.14.2-6-xanmod4. Added GCC optimization script
-rw-r--r--.SRCINFO12
-rw-r--r--0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch39
-rw-r--r--PKGBUILD18
-rwxr-xr-xchoose-gcc-optimization.sh68
4 files changed, 83 insertions, 54 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 11ef57a70723..66b20eca09d0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-xanmod
- pkgver = 4.14.1
- pkgrel = 4
+ pkgver = 4.14.2
+ pkgrel = 6
url = http://www.xanmod.org/
arch = x86_64
license = GPL2
@@ -10,18 +10,18 @@ pkgbase = linux-xanmod
makedepends = bc
makedepends = libelf
options = !strip
- source = https://github.com/xanmod/linux/archive/4.14.1-xanmod3.tar.gz
+ source = https://github.com/xanmod/linux/archive/4.14.2-xanmod4.tar.gz
source = 60-linux.hook
source = 90-linux.hook
source = linux-xanmod.preset
+ source = choose-gcc-optimization.sh
source = 0001-platform-x86-hp-wmi-Fix-tablet-mode-detection-for-co.patch
- source = 0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch
- sha256sums = 99ac106bc0970bfabab3400801fa85cf012f7ee85e18f24d5414d7bd82d10398
+ sha256sums = 89ac37d90627a4df46c81647878a4d95d731a66a74f09f135761e1cb37c03cac
sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21
sha256sums = 75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919
sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
+ sha256sums = 9fd3abfb3e5e6afd5b8476e30af4d7ded762f3da2a724133cb3f26ad21c31e54
sha256sums = 6f1d9b6a119bfab150a0bc1f550609dd9290328df709b67c984f0a6b0abe8afd
- sha256sums = 92b8755030d405fa4a9cd31cbe2998fd71584164431e5edc28c2be04fab24d1e
source_x86_64 = config::https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=8aee2fcbaf3fe676199bde199f9074e90f736681
sha256sums_x86_64 = a68e94064f040d60e8e4c3380efeee085b54d252d527e960dd17ac688505d5b6
diff --git a/0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch b/0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch
deleted file mode 100644
index c9f4a3a3a347..000000000000
--- a/0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 62530ed8b1d07a45dec94d46e521c0c6c2d476e6 Mon Sep 17 00:00:00 2001
-Message-Id: <62530ed8b1d07a45dec94d46e521c0c6c2d476e6.1511339979.git.jan.steffens@gmail.com>
-From: Michael Lyle <mlyle@lyle.org>
-Date: Thu, 16 Nov 2017 23:47:25 -0800
-Subject: [PATCH] bio: ensure __bio_clone_fast copies bi_partno
-
-A new field was introduced in 74d46992e0d9, bi_partno, instead of using
-bdev->bd_contains and encoding the partition information in the bi_bdev
-field. __bio_clone_fast was changed to copy the disk information, but
-not the partition information. At minimum, this regressed bcache and
-caused data corruption.
-
-Signed-off-by: Michael Lyle <mlyle@lyle.org>
-Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index")
-Reported-by: Pavel Goran <via-bcache@pvgoran.name>
-Reported-by: Campbell Steven <casteven@gmail.com>
-Reviewed-by: Coly Li <colyli@suse.de>
-Reviewed-by: Ming Lei <ming.lei@redhat.com>
-Cc: <stable@vger.kernel.org> # 4.14
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
----
- block/bio.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/block/bio.c b/block/bio.c
-index b94a802f8ba34189..459cc857f3d91647 100644
---- a/block/bio.c
-+++ b/block/bio.c
-@@ -597,6 +597,7 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
- * so we don't set nor calculate new physical/hw segment counts here
- */
- bio->bi_disk = bio_src->bi_disk;
-+ bio->bi_partno = bio_src->bi_partno;
- bio_set_flag(bio, BIO_CLONED);
- bio->bi_opf = bio_src->bi_opf;
- bio->bi_write_hint = bio_src->bi_write_hint;
---
-2.15.0
-
diff --git a/PKGBUILD b/PKGBUILD
index 3deccfd1a902..d29659181000 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,9 +6,9 @@
pkgbase=linux-xanmod
_srcname=linux
-pkgver=4.14.1
-xanmod=3
-pkgrel=4
+pkgver=4.14.2
+xanmod=4
+pkgrel=6
arch=('x86_64')
url="http://www.xanmod.org/"
license=('GPL2')
@@ -22,17 +22,17 @@ source=(https://github.com/xanmod/linux/archive/${pkgver}-xanmod${xanmod}.tar.gz
'60-linux.hook' # pacman hook for depmod
'90-linux.hook' # pacman hook for initramfs regeneration
"$pkgbase.preset" # standard config files for mkinitcpio ramdisk
+ 'choose-gcc-optimization.sh'
'0001-platform-x86-hp-wmi-Fix-tablet-mode-detection-for-co.patch'
- '0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch'
)
source_x86_64=("config::https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=${arch_config_trunk}")
-sha256sums=('99ac106bc0970bfabab3400801fa85cf012f7ee85e18f24d5414d7bd82d10398'
+sha256sums=('89ac37d90627a4df46c81647878a4d95d731a66a74f09f135761e1cb37c03cac'
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
- '6f1d9b6a119bfab150a0bc1f550609dd9290328df709b67c984f0a6b0abe8afd'
- '92b8755030d405fa4a9cd31cbe2998fd71584164431e5edc28c2be04fab24d1e')
+ '9fd3abfb3e5e6afd5b8476e30af4d7ded762f3da2a724133cb3f26ad21c31e54'
+ '6f1d9b6a119bfab150a0bc1f550609dd9290328df709b67c984f0a6b0abe8afd')
sha256sums_x86_64=('a68e94064f040d60e8e4c3380efeee085b54d252d527e960dd17ac688505d5b6')
_kernelname=${pkgbase#linux}
@@ -60,8 +60,8 @@ prepare() {
# https://bugs.archlinux.org/task/56207
patch -Np1 -i ../0001-platform-x86-hp-wmi-Fix-tablet-mode-detection-for-co.patch
- # https://bugs.archlinux.org/task/56404
- patch -Np1 -i ../0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch
+ # EXPERIMENTAL: let's user choose microarchitecture optimization in GCC
+ ${srcdir}/choose-gcc-optimization.sh
# set extraversion to pkgrel
sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
diff --git a/choose-gcc-optimization.sh b/choose-gcc-optimization.sh
new file mode 100755
index 000000000000..83869b51d0e7
--- /dev/null
+++ b/choose-gcc-optimization.sh
@@ -0,0 +1,68 @@
+#!/usr/bin/env bash
+
+Detect_CPU=$(gcc -c -Q -march=native --help=target | grep march | awk '{print $2}')
+
+echo -e " ** Detected CPU architecture: $Detect_CPU **\n"
+
+cat << EOF
+
+ Available CPU microarchitectures:
+
+ 1) AMD old K8-family
+ 2) AMD Improved K8-family (SSE3)
+ 3) AMD K10-family
+ 4) AMD Family 10h (Barcelona)
+ 5) AMD Family 14h (Bobcat)
+ 6) AMD Family 16h (Jaguar)
+ 7) AMD Family 15h (Bulldozer)
+ 8) AMD Family 15h (Piledriver)
+ 9) AMD Family 15h (Steamroller)
+ 10) AMD Family 15h (Excavator)
+ 11) AMD Family 17h (Zen)
+
+ 12) Intel P4 / older Netburst based Xeon (Core2)
+ 13) Intel Bonnell family of low-power Atom processors (Bonnell)
+ 14) Intel Silvermont family of low-power Atom processors (Silvermont)
+ 15) Intel 1st Gen Core i3/i5/i7-family (Nehalem)
+ 16) Intel 1.5 Gen Core i3/i5/i7-family (Westmere)
+ 17) Intel 2nd Gen Core i3/i5/i7-family (Sandybridge)
+ 18) Intel 3rd Gen Core i3/i5/i7-family (Ivybridge)
+ 19) Intel 4th Gen Core i3/i5/i7-family (Haswell)
+ 20) Intel 5th Gen Core i3/i5/i7-family (Broadwell)
+ 21) Intel 6th Gen Core i3/i5/i7-family (Skylake)
+
+ 22) Native optimizations autodetected by GCC
+
+ 0) Generic (default)
+
+EOF
+
+read -p " Which config you want? " answer
+case $answer in
+ 1) Microarchitecture=CONFIG_MK8 ;;
+ 2) Microarchitecture=CONFIG_MK8SSE3 ;;
+ 3) Microarchitecture=CONFIG_MK10 ;;
+ 4) Microarchitecture=CONFIG_MBARCELONA ;;
+ 5) Microarchitecture=CONFIG_MBOBCAT ;;
+ 6) Microarchitecture=CONFIG_MJAGUAR ;;
+ 7) Microarchitecture=CONFIG_MBULLDOZER ;;
+ 8) Microarchitecture=CONFIG_MPILEDRIVER ;;
+ 9|10|11) Microarchitecture=CONFIG_MNATIVE ;; # Xanmod doesn't include those architectures!! Switch to native instead
+ 12) Microarchitecture=CONFIG_MPSC ;;
+ 13) Microarchitecture=CONFIG_MATOM ;;
+ 14) Microarchitecture=CONFIG_MSILVERMONT ;;
+ 15) Microarchitecture=CONFIG_MNEHALEM ;;
+ 16) Microarchitecture=CONFIG_MWESTMERE ;;
+ 17) Microarchitecture=CONFIG_MSANDYBRIDGE ;;
+ 18) Microarchitecture=CONFIG_MIVYBRIDGE ;;
+ 19) Microarchitecture=CONFIG_MHASWELL ;;
+ 20) Microarchitecture=CONFIG_MBROADWELL ;;
+ 21) Microarchitecture=CONFIG_MNATIVE ;; # Xanmod doesn't include this architecture!! Switch to native instead
+ 22) Microarchitecture=CONFIG_MNATIVE ;;
+ *) true ;;
+esac
+
+sed -e 's|^CONFIG_GENERIC_CPU=y|# CONFIG_GENERIC_CPU is not set|g' -i .config
+sed -e "s|^# $Microarchitecture is not set|$Microarchitecture=y|g" -i .config
+
+echo