diff -aur a/config b/config --- a/config 2015-09-12 17:06:26.826047838 -0500 +++ b/config 2015-09-12 23:49:57.322033642 -0500 @@ -392,6 +392,13 @@ # CONFIG_MK6 is not set # CONFIG_MK7 is not set # CONFIG_MK8 is not set +# CONFIG_MK8SSE3 is not set +# CONFIG_MK10 is not set +# CONFIG_MBARCELONA is not set +# CONFIG_MBOBCAT is not set +# CONFIG_MBULLDOZER is not set +# CONFIG_MPILEDRIVER is not set +# CONFIG_MJAGUAR is not set # CONFIG_MCRUSOE is not set # CONFIG_MEFFICEON is not set # CONFIG_MWINCHIPC6 is not set @@ -402,8 +409,16 @@ # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set # CONFIG_MVIAC7 is not set -# CONFIG_MCORE2 is not set # CONFIG_MATOM is not set +# CONFIG_MCORE2 is not set +# CONFIG_MNEHALEM is not set +# CONFIG_MWESTMERE is not set +# CONFIG_MSILVERMONT is not set +# CONFIG_MSANDYBRIDGE is not set +# CONFIG_MIVYBRIDGE is not set +# CONFIG_MHASWELL is not set +# CONFIG_MBROADWELL is not set +# CONFIG_MNATIVE is not set CONFIG_X86_GENERIC=y CONFIG_X86_INTERNODE_CACHE_SHIFT=6 CONFIG_X86_L1_CACHE_SHIFT=6 diff -aur linux/config.x86_64 linux-new/config.x86_64 --- a/config.x86_64 2015-09-12 17:06:26.832714354 -0500 +++ b/config.x86_64 2015-09-12 23:47:13.706278823 -0500 @@ -400,10 +400,25 @@ CONFIG_PARAVIRT_CLOCK=y CONFIG_NO_BOOTMEM=y # CONFIG_MK8 is not set +# CONFIG_MK8SSE3 is not set +# CONFIG_MK10 is not set +# CONFIG_MBARCELONA is not set +# CONFIG_MBOBCAT is not set +# CONFIG_MBULLDOZER is not set +# CONFIG_MPILEDRIVER is not set +# CONFIG_MJAGUAR is not set # CONFIG_MPSC is not set -# CONFIG_MCORE2 is not set # CONFIG_MATOM is not set +# CONFIG_MCORE2 is not set +# CONFIG_MNEHALEM is not set +# CONFIG_MWESTMERE is not set +# CONFIG_MSILVERMONT is not set +# CONFIG_MSANDYBRIDGE is not set +# CONFIG_MIVYBRIDGE is not set +# CONFIG_MHASWELL is not set +# CONFIG_MBROADWELL is not set CONFIG_GENERIC_CPU=y +# CONFIG_MNATIVE is not set CONFIG_X86_INTERNODE_CACHE_SHIFT=6 CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_X86_TSC=y diff -aur linux/PKGBUILD linux-new/PKGBUILD --- a/PKGBUILD 2015-09-12 17:06:26.839380870 -0500 +++ b/PKGBUILD 2015-09-12 23:50:00.447808838 -0500 @@ -5,6 +5,8 @@ pkgbase=linux # Build stock -ARCH kernel #pkgbase=linux-custom # Build kernel with a different name _srcname=linux-4.2 +_gcc_patch="enable_additional_cpu_optimizations_for_gcc_v4.9+_kernel_v3.15+.patch" +_cpu_type= # see https://github.com/graysky2/kernel_gcc_patch pkgver=4.2 pkgrel=4 arch=('i686' 'x86_64') @@ -24,17 +26,19 @@ '0001-make_flush_workqueue_non_gpl.patch' '0001-e1000e-Fix-tight-loop-implementation-of-systime-read.patch' '0001-netfilter-conntrack-use-nf_ct_tmpl_free-in-CT-synpro.patch' - '0001-fix-bridge-regression.patch') + '0001-fix-bridge-regression.patch' + "http://repo-ck.com/source/gcc_patch/${_gcc_patch}.gz") sha256sums=('cf20e044f17588d2a42c8f2a450b0fd84dfdbd579b489d93e9ab7d0e8b45dbeb' 'SKIP' - 'e6f6f804f98ad321ce3e4395924993b51decb89699fde369391ccbb4bae928b2' - 'a071aaa327d2b3577fa4709b47ed5fe81c7914d168607f3db905fdbf226247e7' + 'f8039a58f91dd6a62eccd21c22365970947cf149bb92262b08d7e72aaa6d4b9c' + '4491217e1d417ae46dbcac51735debd7258da7505e93097e125f574faeee5141' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' '4e776734e2c2185910a6fbb6f333d967b04f4a72b3196310af286c6a779bd97d' '0b1e41ba59ae45f5929963aa22fdc53bc8ffb4534e976cec046269d1a462197b' '6ed9e31ae5614c289c4884620e45698e764c03670ebc45bab9319d741238cbd3' - '0a8fe4434e930d393c7983e335842f6cb77ee263af5592a0ca7e14bae7296183') + '0a8fe4434e930d393c7983e335842f6cb77ee263af5592a0ca7e14bae7296183' + '819961379909c028e321f37e27a8b1b08f1f1e3dd58680e07b541921282da532') validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman @@ -68,6 +72,10 @@ # https://bugzilla.kernel.org/show_bug.cgi?id=104161 patch -Np1 -i "${srcdir}/0001-fix-bridge-regression.patch" + # Patch source to enable more gcc CPU optimizations via the make nconfig + msg "Patching source with gcc patch to enable more cpu types" + patch -Np1 -i "${srcdir}/${_gcc_patch}" + # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param) # remove this when a Kconfig knob is made available by upstream # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) @@ -79,6 +87,11 @@ cat "${srcdir}/config" > ./.config fi + if [ -n "$_cpu_type" ]; then + msg "Setting CONFIG_$_cpu_type..." + sed -i "s|CONFIG_GENERIC_CPU=y|# CONFIG_GENERIC_CPU is not set\nCONFIG_$_cpu_type=y|" ./.config + fi + if [ "${_kernelname}" != "" ]; then sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config