kernel/merge.py
Jan Stancek d7bba455e6 kernel-6.12.0-201.1.el10nv
* Mon Feb 16 2026 Jan Stancek <jstancek@redhat.com> [6.12.0-201.1.el10nv]
- redhat: update build targets for aie-nv (Jan Stancek)
- iommu/arm-smmu-v3: Perform per-domain invalidations using arm_smmu_invs (Nicolin Chen) [VOYAGER-1]
- iommu/arm-smmu-v3: Add arm_smmu_invs based arm_smmu_domain_inv_range() (Nicolin Chen) [VOYAGER-1]
- iommu/arm-smmu-v3: Populate smmu_domain->invs when attaching masters (Nicolin Chen) [VOYAGER-1]
- iommu/arm-smmu-v3: Pre-allocate a per-master invalidation array (Nicolin Chen) [VOYAGER-1]
- iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array (Jason Gunthorpe) [VOYAGER-1]
- iommu/arm-smmu-v3: Add an inline arm_smmu_domain_free() (Nicolin Chen) [VOYAGER-1]
- iommu/arm-smmu-v3: Explicitly set smmu_domain->stage for SVA (Nicolin Chen) [VOYAGER-1]
- iommu/arm-smmu-v3: Add a missing dma_wmb() for hitless STE update (Nicolin Chen) [VOYAGER-1]
- lib/sort.c: add _nonatomic() variants with cond_resched() (Kent Overstreet) [VOYAGER-1]
- lib/sort: clarify comparison function requirements in sort_r() (Kuan-Wei Chiu) [VOYAGER-1]
- sort.h: hoist cmp_int() into generic header file (Fedor Pchelkin) [VOYAGER-1]
- iommu/tegra241-cmdqv: Reset VCMDQ in tegra241_vcmdq_hw_init_user() (Nicolin Chen) [VOYAGER-44]
- mm: add stubs for PFNMAP memory failure registration functions (Aristeu Rozanski) [VOYAGER-9]
- vfio/nvgrace-gpu: register device memory for poison handling (Aristeu Rozanski) [VOYAGER-9]
- mm: fixup pfnmap memory failure handling to use pgoff (Aristeu Rozanski) [VOYAGER-9]
- mm: handle poisoning of pfn without struct pages (Aristeu Rozanski) [VOYAGER-9]
- mm: change ghes code to allow poison of non-struct pfn (Aristeu Rozanski) [VOYAGER-9]
- .gitlab-ci.yml: rename c10s_rhel10_compat_merge_request pipeline v2 (Jan Stancek)
- .gitlab-ci.yml: rename c10s_rhel10_compat_merge_request pipeline (Jan Stancek)
- .gitlab-ci.yml: customize pipeline (Jan Stancek)
- redhat: make genlog consider only VOYAGER project issues (Jan Stancek)
- redhat: build only for aarch64 64k and x86_64 variants (Jan Stancek)
- redhat: update self-test-data (Jan Stancek)
- redhat: set up initial Makefile.variables (Jan Stancek)
Resolves: VOYAGER-1, VOYAGER-44, VOYAGER-9

Signed-off-by: Jan Stancek <jstancek@redhat.com>
2026-02-17 08:39:21 +01:00

89 lines
2.7 KiB
Python
Executable File

#!/usr/bin/python3
# SPDX-License-Identifier: GPL-2.0
# Author: Clark Williams <williams@redhat.com>
# Copyright (C) 2022 Red Hat, Inc.
#
# merge.py - a direct replacement for merge.pl in the redhat/configs directory
#
# invocation: python merge.py overrides baseconfig [arch]
#
# This script merges two kernel configuration files, an override file and a
# base config file and writes the results to stdout.
#
# The script reads the overrides into a dictionary, then reads the baseconfig
# file, looking for overrides and replacing any found, then printing the result
# to stdout. Finally any remaining (new) configs in the override are appended to the
# end of the output
import sys
import re
import os.path
def usage(msg):
'''print a usage message and exit'''
sys.stderr.write(msg + "\n")
sys.stderr.write("usage: merge.py overrides baseconfig [arch]\n")
sys.exit(1)
isset = re.compile(r'^(CONFIG_\w+)=')
notset = re.compile(r'^#\s+(CONFIG_\w+)\s+is not set')
# search an input line for a config (set or notset) pattern
# if we get a match return the config that is being changed
def find_config(line):
'''find a configuration line in the input and return the config name'''
m = isset.match(line)
if (m is not None):
return m.group(1)
m = notset.match(line)
if (m is not None):
return m.group(1)
return None
#########################################################
if len(sys.argv) < 3:
usage("must have two input files")
override_file = sys.argv[1]
baseconfig_file = sys.argv[2]
if not os.path.exists(override_file):
usage(f"overrides config file {override_file:s} does not exist!")
if not os.path.exists(baseconfig_file):
usage(f"base configs file {baseconfig_file:s} does not exist")
if len(sys.argv) == 4:
print(f"# {sys.argv[3]:s}")
# read each line of the override file and store any configuration values
# in the overrides dictionary, keyed by the configuration name.
overrides = {}
with open(override_file, "rt", encoding="utf-8") as f:
for line in [l.strip() for l in f.readlines()]:
c = find_config(line)
if c and c not in overrides:
overrides[c] = line
# now read and print the base config, checking each line
# that defines a config value and printing the override if
# it exists
with open(baseconfig_file, "rt", encoding="utf-8") as f:
for line in [ l.strip() for l in f.readlines() ]:
c = find_config(line)
if c and c in overrides:
print(overrides[c])
del overrides[c]
else:
print(line)
# print out the remaining configs (new values)
# from the overrides file
for v in overrides.values():
print (v)
sys.exit(0)