Skip to content

Commit

Permalink
cachyos: add new cpu flags (#301)
Browse files Browse the repository at this point in the history
* cachyos: add new cpu flags

Signed-off-by: Piotr Gorski <[email protected]>

* cachyos: fix new cpu flags

Signed-off-by: Piotr Gorski <[email protected]>

* cachyos: update v3/v4 script

Signed-off-by: Piotr Gorski <[email protected]>

---------

Signed-off-by: Piotr Gorski <[email protected]>
  • Loading branch information
sirlucjan authored Sep 30, 2024
1 parent fcd8e63 commit 593a4ec
Show file tree
Hide file tree
Showing 23 changed files with 123 additions and 134 deletions.
16 changes: 8 additions & 8 deletions linux-cachyos-bmq/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,16 @@ prepare() {
### Select CPU optimization
if [ -n "$_processor_opt" ]; then
MARCH="${_processor_opt^^}"
MARCH2=${MARCH}

if [[ ! "$MARCH" =~ GENERIC* ]]; then
MARCH2="M${MARCH}"
else
MARCH2="${MARCH/V/CPU}"
if [ "$MARCH" != "GENERIC" ]; then
if [[ "$MARCH" =~ GENERIC_V[1-4] ]]; then
X86_64_LEVEL="${MARCH//GENERIC_V}"
scripts/config --set-val X86_64_VERSION "${X86_64_LEVEL}"
else
scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_M${MARCH}"
fi
fi

scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_${MARCH2}"
fi

### Use autooptimization
Expand Down
7 changes: 3 additions & 4 deletions linux-cachyos-bmq/config
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MZEN4 is not set
# CONFIG_MZEN5 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
Expand All @@ -457,11 +457,10 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MMETEORLAKE is not set
# CONFIG_MEMERALDRAPIDS is not set
CONFIG_GENERIC_CPU=y
# CONFIG_GENERIC_CPU2 is not set
# CONFIG_GENERIC_CPU3 is not set
# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_SUPPORT_MARCH_CODEVERS=y
CONFIG_X86_64_VERSION=1
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_USE_PPRO_CHECKSUM=y
Expand Down
16 changes: 8 additions & 8 deletions linux-cachyos-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,16 @@ prepare() {
### Select CPU optimization
if [ -n "$_processor_opt" ]; then
MARCH="${_processor_opt^^}"
MARCH2=${MARCH}

if [[ ! "$MARCH" =~ GENERIC* ]]; then
MARCH2="M${MARCH}"
else
MARCH2="${MARCH/V/CPU}"
if [ "$MARCH" != "GENERIC" ]; then
if [[ "$MARCH" =~ GENERIC_V[1-4] ]]; then
X86_64_LEVEL="${MARCH//GENERIC_V}"
scripts/config --set-val X86_64_VERSION "${X86_64_LEVEL}"
else
scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_M${MARCH}"
fi
fi

scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_${MARCH2}"
fi

### Use autooptimization
Expand Down
7 changes: 3 additions & 4 deletions linux-cachyos-bore/config
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MZEN4 is not set
# CONFIG_MZEN5 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
Expand All @@ -457,11 +457,10 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MMETEORLAKE is not set
# CONFIG_MEMERALDRAPIDS is not set
CONFIG_GENERIC_CPU=y
# CONFIG_GENERIC_CPU2 is not set
# CONFIG_GENERIC_CPU3 is not set
# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_SUPPORT_MARCH_CODEVERS=y
CONFIG_X86_64_VERSION=1
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_USE_PPRO_CHECKSUM=y
Expand Down
16 changes: 8 additions & 8 deletions linux-cachyos-deckify/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,16 @@ prepare() {
### Select CPU optimization
if [ -n "$_processor_opt" ]; then
MARCH="${_processor_opt^^}"
MARCH2=${MARCH}

if [[ ! "$MARCH" =~ GENERIC* ]]; then
MARCH2="M${MARCH}"
else
MARCH2="${MARCH/V/CPU}"
if [ "$MARCH" != "GENERIC" ]; then
if [[ "$MARCH" =~ GENERIC_V[1-4] ]]; then
X86_64_LEVEL="${MARCH//GENERIC_V}"
scripts/config --set-val X86_64_VERSION "${X86_64_LEVEL}"
else
scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_M${MARCH}"
fi
fi

scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_${MARCH2}"
fi

### Use autooptimization
Expand Down
7 changes: 3 additions & 4 deletions linux-cachyos-deckify/config
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MZEN4 is not set
# CONFIG_MZEN5 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
Expand All @@ -454,11 +454,10 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MMETEORLAKE is not set
# CONFIG_MEMERALDRAPIDS is not set
CONFIG_GENERIC_CPU=y
# CONFIG_GENERIC_CPU2 is not set
# CONFIG_GENERIC_CPU3 is not set
# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_SUPPORT_MARCH_CODEVERS=y
CONFIG_X86_64_VERSION=1
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_USE_PPRO_CHECKSUM=y
Expand Down
16 changes: 8 additions & 8 deletions linux-cachyos-eevdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,16 @@ prepare() {
### Select CPU optimization
if [ -n "$_processor_opt" ]; then
MARCH="${_processor_opt^^}"
MARCH2=${MARCH}

if [[ ! "$MARCH" =~ GENERIC* ]]; then
MARCH2="M${MARCH}"
else
MARCH2="${MARCH/V/CPU}"
if [ "$MARCH" != "GENERIC" ]; then
if [[ "$MARCH" =~ GENERIC_V[1-4] ]]; then
X86_64_LEVEL="${MARCH//GENERIC_V}"
scripts/config --set-val X86_64_VERSION "${X86_64_LEVEL}"
else
scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_M${MARCH}"
fi
fi

scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_${MARCH2}"
fi

### Use autooptimization
Expand Down
7 changes: 3 additions & 4 deletions linux-cachyos-eevdf/config
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MZEN4 is not set
# CONFIG_MZEN5 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
Expand All @@ -457,11 +457,10 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MMETEORLAKE is not set
# CONFIG_MEMERALDRAPIDS is not set
CONFIG_GENERIC_CPU=y
# CONFIG_GENERIC_CPU2 is not set
# CONFIG_GENERIC_CPU3 is not set
# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_SUPPORT_MARCH_CODEVERS=y
CONFIG_X86_64_VERSION=1
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_USE_PPRO_CHECKSUM=y
Expand Down
16 changes: 8 additions & 8 deletions linux-cachyos-hardened/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,16 @@ prepare() {
### Select CPU optimization
if [ -n "$_processor_opt" ]; then
MARCH="${_processor_opt^^}"
MARCH2=${MARCH}

if [[ ! "$MARCH" =~ GENERIC* ]]; then
MARCH2="M${MARCH}"
else
MARCH2="${MARCH/V/CPU}"
if [ "$MARCH" != "GENERIC" ]; then
if [[ "$MARCH" =~ GENERIC_V[1-4] ]]; then
X86_64_LEVEL="${MARCH//GENERIC_V}"
scripts/config --set-val X86_64_VERSION "${X86_64_LEVEL}"
else
scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_M${MARCH}"
fi
fi

scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_${MARCH2}"
fi

### Use autooptimization
Expand Down
7 changes: 3 additions & 4 deletions linux-cachyos-hardened/config
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MZEN4 is not set
# CONFIG_MZEN5 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
Expand All @@ -440,11 +440,10 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MMETEORLAKE is not set
# CONFIG_MEMERALDRAPIDS is not set
CONFIG_GENERIC_CPU=y
# CONFIG_GENERIC_CPU2 is not set
# CONFIG_GENERIC_CPU3 is not set
# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_SUPPORT_MARCH_CODEVERS=y
CONFIG_X86_64_VERSION=1
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_TSC=y
Expand Down
16 changes: 8 additions & 8 deletions linux-cachyos-lts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -311,16 +311,16 @@ prepare() {
### Select CPU optimization
if [ -n "$_processor_opt" ]; then
MARCH="${_processor_opt^^}"
MARCH2=${MARCH}

if [[ ! "$MARCH" =~ GENERIC* ]]; then
MARCH2="M${MARCH}"
else
MARCH2="${MARCH/V/CPU}"
if [ "$MARCH" != "GENERIC" ]; then
if [[ "$MARCH" =~ GENERIC_V[1-4] ]]; then
X86_64_LEVEL="${MARCH//GENERIC_V}"
scripts/config --set-val X86_64_VERSION "${X86_64_LEVEL}"
else
scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_M${MARCH}"
fi
fi

scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_${MARCH2}"
fi

### Use autooptimization
Expand Down
7 changes: 3 additions & 4 deletions linux-cachyos-lts/config
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MZEN4 is not set
# CONFIG_MZEN5 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
Expand All @@ -451,11 +451,10 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MMETEORLAKE is not set
# CONFIG_MEMERALDRAPIDS is not set
CONFIG_GENERIC_CPU=y
# CONFIG_GENERIC_CPU2 is not set
# CONFIG_GENERIC_CPU3 is not set
# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_SUPPORT_MARCH_CODEVERS=y
CONFIG_X86_64_VERSION=1
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_USE_PPRO_CHECKSUM=y
Expand Down
16 changes: 8 additions & 8 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,16 @@ prepare() {
### Select CPU optimization
if [ -n "$_processor_opt" ]; then
MARCH="${_processor_opt^^}"
MARCH2=${MARCH}

if [[ ! "$MARCH" =~ GENERIC* ]]; then
MARCH2="M${MARCH}"
else
MARCH2="${MARCH/V/CPU}"
if [ "$MARCH" != "GENERIC" ]; then
if [[ "$MARCH" =~ GENERIC_V[1-4] ]]; then
X86_64_LEVEL="${MARCH//GENERIC_V}"
scripts/config --set-val X86_64_VERSION "${X86_64_LEVEL}"
else
scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_M${MARCH}"
fi
fi

scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_${MARCH2}"
fi

### Use autooptimization
Expand Down
7 changes: 3 additions & 4 deletions linux-cachyos-rc/config
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MZEN4 is not set
# CONFIG_MZEN5 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
Expand All @@ -457,11 +457,10 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MMETEORLAKE is not set
# CONFIG_MEMERALDRAPIDS is not set
CONFIG_GENERIC_CPU=y
# CONFIG_GENERIC_CPU2 is not set
# CONFIG_GENERIC_CPU3 is not set
# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_SUPPORT_MARCH_CODEVERS=y
CONFIG_X86_64_VERSION=1
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_USE_PPRO_CHECKSUM=y
Expand Down
16 changes: 8 additions & 8 deletions linux-cachyos-rt-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,16 @@ prepare() {
### Select CPU optimization
if [ -n "$_processor_opt" ]; then
MARCH="${_processor_opt^^}"
MARCH2=${MARCH}

if [[ ! "$MARCH" =~ GENERIC* ]]; then
MARCH2="M${MARCH}"
else
MARCH2="${MARCH/V/CPU}"
if [ "$MARCH" != "GENERIC" ]; then
if [[ "$MARCH" =~ GENERIC_V[1-4] ]]; then
X86_64_LEVEL="${MARCH//GENERIC_V}"
scripts/config --set-val X86_64_VERSION "${X86_64_LEVEL}"
else
scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_M${MARCH}"
fi
fi

scripts/config -k -d CONFIG_GENERIC_CPU
scripts/config -k -e "CONFIG_${MARCH2}"
fi

### Use autooptimization
Expand Down
7 changes: 3 additions & 4 deletions linux-cachyos-rt-bore/config
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MZEN4 is not set
# CONFIG_MZEN5 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
Expand All @@ -457,11 +457,10 @@ CONFIG_INTEL_TDX_GUEST=y
# CONFIG_MMETEORLAKE is not set
# CONFIG_MEMERALDRAPIDS is not set
CONFIG_GENERIC_CPU=y
# CONFIG_GENERIC_CPU2 is not set
# CONFIG_GENERIC_CPU3 is not set
# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_SUPPORT_MARCH_CODEVERS=y
CONFIG_X86_64_VERSION=1
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_USE_PPRO_CHECKSUM=y
Expand Down
Loading

0 comments on commit 593a4ec

Please sign in to comment.