diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | config.x86_64 | 4 | ||||
-rw-r--r-- | fast_cppc.patch | 64 |
4 files changed, 78 insertions, 8 deletions
@@ -1,5 +1,5 @@ pkgbase = linux-slim - pkgver = 6.8.v.7 + pkgver = 6.8.v.8 pkgrel = 2 url = http://www.kernel.org/ arch = x86_64 @@ -13,12 +13,14 @@ pkgbase = linux-slim makedepends = libelf makedepends = lzop options = !strip - source = git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=v6.8.7 + source = git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=v6.8.8 source = config.x86_64 source = https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/20240221.2/more-uarches-for-kernel-6.8-rc4+.patch + source = fast_cppc.patch sha256sums = SKIP - sha256sums = 75c8d065beffd0f9c7ec752f0caed3671677daec5bf8f03ac58f9b1c25a36f73 + sha256sums = 5fc0390575e78f5169df1ed2317ebacc85d406ed0e9f42347d08730148952a35 sha256sums = d69232afd0dd6982ae941cf2d1f577f4be2011e3bb847d1db37952acf416b5d3 + sha256sums = f8a69166a3ee91b797198b4e82b6e397a8f7749feed8aed7f3b323b020798a66 pkgname = linux-slim pkgdesc = Linux kernel slimmed down to only work on AMD hardware. Zero compatibility. @@ -2,10 +2,10 @@ pkgbase=linux-slim _srcname=linux -gitver=v6.8.7 +gitver=v6.8.8 patchver=20240221.2 patchname=more-uarches-for-kernel-6.8-rc4+.patch -pkgver=6.8.v.7 +pkgver=6.8.v.8 pkgrel=2 arch=('x86_64') url="http://www.kernel.org/" @@ -20,12 +20,16 @@ source=( 'config.x86_64' # patch from our graysky archlinux colleague "https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/$patchver/$patchname" + # fast cppc patch + 'fast_cppc.patch' ) sha256sums=('SKIP' #config.x86_64 - '75c8d065beffd0f9c7ec752f0caed3671677daec5bf8f03ac58f9b1c25a36f73' + '5fc0390575e78f5169df1ed2317ebacc85d406ed0e9f42347d08730148952a35' #grayskypatch 'd69232afd0dd6982ae941cf2d1f577f4be2011e3bb847d1db37952acf416b5d3' + # fast cppc patch + 'f8a69166a3ee91b797198b4e82b6e397a8f7749feed8aed7f3b323b020798a66' ) _kernelname=${pkgbase#linux} diff --git a/config.x86_64 b/config.x86_64 index 24921115a174..f5dfae02fe7f 100644 --- a/config.x86_64 +++ b/config.x86_64 @@ -1,8 +1,8 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 6.8.7 Kernel Configuration +# Linux/x86 6.8.8 Kernel Configuration # -CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20230801" +CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20240417" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=130201 CONFIG_CLANG_VERSION=0 diff --git a/fast_cppc.patch b/fast_cppc.patch new file mode 100644 index 000000000000..ff8fc5c14b03 --- /dev/null +++ b/fast_cppc.patch @@ -0,0 +1,64 @@ +From 2416f3b172dd3ac0d1c7a6371f6a14da8d5f5ed6 Mon Sep 17 00:00:00 2001 +From: Eggz <egnappah@gmail.com> +Date: Mon, 29 Apr 2024 10:36:29 +0200 +Subject: [PATCH 1/1] Enable Fast CPPC + +Signed-off-by: Eggz <egnappah@gmail.com> +--- + arch/x86/include/asm/cpufeatures.h | 1 + + arch/x86/kernel/cpu/scattered.c | 1 + + drivers/cpufreq/amd-pstate.c | 7 ++++++- + 3 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h +index 76b3b00ff102..653d13b06ea3 100644 +--- a/arch/x86/include/asm/cpufeatures.h ++++ b/arch/x86/include/asm/cpufeatures.h +@@ -466,6 +466,7 @@ + #define X86_FEATURE_BHI_CTRL (21*32+ 2) /* "" BHI_DIS_S HW control available */ + #define X86_FEATURE_CLEAR_BHB_HW (21*32+ 3) /* "" BHI_DIS_S HW control enabled */ + #define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4) /* "" Clear branch history at vmexit using SW loop */ ++#define X86_FEATURE_FAST_CPPC (21*32 + 5) /* "" AMD Fast CPPC */ + + /* + * BUG word(s) +diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c +index 0ebca40dfd74..cc66cca52b17 100644 +--- a/arch/x86/kernel/cpu/scattered.c ++++ b/arch/x86/kernel/cpu/scattered.c +@@ -50,6 +50,7 @@ static const struct cpuid_bit cpuid_bits[] = { + { X86_FEATURE_BMEC, CPUID_EBX, 3, 0x80000020, 0 }, + { X86_FEATURE_PERFMON_V2, CPUID_EAX, 0, 0x80000022, 0 }, + { X86_FEATURE_AMD_LBR_V2, CPUID_EAX, 1, 0x80000022, 0 }, ++ { X86_FEATURE_FAST_CPPC, CPUID_EDX, 15, 0x80000007, 0 }, + { 0, 0, 0, 0, 0 } + }; + +diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c +index 07f341995439..01897e81e3dc 100644 +--- a/drivers/cpufreq/amd-pstate.c ++++ b/drivers/cpufreq/amd-pstate.c +@@ -49,6 +49,7 @@ + + #define AMD_PSTATE_TRANSITION_LATENCY 20000 + #define AMD_PSTATE_TRANSITION_DELAY 1000 ++#define AMD_PSTATE_FAST_CPPC_TRANSITION_DELAY 600 + + /* + * TODO: We need more time to fine tune processors with shared memory solution +@@ -744,7 +745,11 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy) + } + + policy->cpuinfo.transition_latency = AMD_PSTATE_TRANSITION_LATENCY; +- policy->transition_delay_us = AMD_PSTATE_TRANSITION_DELAY; ++ ++ if (cpu_feature_enabled(X86_FEATURE_FAST_CPPC)) ++ policy->transition_delay_us = AMD_PSTATE_FAST_CPPC_TRANSITION_DELAY; ++ else ++ policy->transition_delay_us = AMD_PSTATE_TRANSITION_DELAY; + + policy->min = min_freq; + policy->max = max_freq; +-- +2.44.0 + |