NVIDIA: VR: SAUCE: Introduce full.config and full-64k.config#319
NVIDIA: VR: SAUCE: Introduce full.config and full-64k.config#319jamieNguyenNVIDIA wants to merge 1 commit intoNVIDIA:linux-nvidia-6.18from
Conversation
|
The full configs were generated using the following formula:
|
arighi
left a comment
There was a problem hiding this comment.
LGTM.
To verify this I tried to re-generate the configs using noble:linux-nvidia-6.17 as a baseline + the configs from the latest resolute:linux kernel from Ubuntu for the new options and I produced similar results.
A general comment (not specific to this PR): it would be nice to have a reference (nvbug / LP bug / generic URL) for each NVIDIA option defined in arch/arm64/configs/nvidia.config. Some configs already include an LP bug (which is great), while others only have a brief comment. Sometimes having a proper reference makes much easier to understand the full context and rationale behind enabling (or disabling) a particular option. Maybe something to keep in mind for the future configs.
|
Previously (with just nvidia.confg) we were saying to merge defconfig + nvidia.confg. Because of that, I think we concluded that we did not need to add "CONFIG_NVIDIA_TEGRA410_CMEM_LATENCY_PMU=m" to nvidia.config. However since we'd now be recommending to merge the full*.config + nvidia.config, I think we need to sure that any defconfig items that we want are captured in either full*.config or nvidia.config. i.e. we need to add CONFIG_NVIDIA_TEGRA410_CMEM_LATENCY_PMU=m to nvidia.config. I looked at others but this was the one that stood out. I assume we'd need to potentially refresh full*.config when stable updates are applied? We might want to capture that methodology in the commit message. |
Good points. I'll add And instead of hand-crafting the full.config/full-64k.config, I'll check in a script that can regenerate these files when given the right configs (i.e. |
42d31a4 to
f22a78e
Compare
Introduce full.config and full-64k.config files:
- full.config: Full config (nvidia-6.17 + generic-6.18 new options, env
excluded). Deduplicated so options already in nvidia.config are omitted.
Merge with nvidia.config to build.
- full-64k.config: 64K page size variant of full.config. Same dedup rule.
64K-related options taken from nvidia-6.17-64k reference (page size,
PGTABLE_LEVELS, VA/PA bits, ARCH_MMAP_RND, etc.).
- nvidia.config: Add missing configs:
CONFIG_ARM64_PSEUDO_NMI=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=n
CONFIG_NVIDIA_TEGRA410_CMEM_LATENCY_PMU=m
CONFIG_ARCH_TEGRA_241_SOC=y
CONFIG_ARCH_FORCE_MAX_ORDER=13
CONFIG_PAGE_BLOCK_MAX_ORDER=13
Remove CONFIG_CMA_SIZE_MBYTES and let that be handled in the full
configs, as its value differs according to page size.
- scripts/kconfig/merge_full_configs.py: Merges configs (first is base, later
override/add), optional -d dedup fragment (omit from output any CONFIG_
present in that file). Environment-related configs are excluded. The
full.config and full-64k.config files were generated using this script:
python3 ./scripts/kconfig/merge_full_configs.py \
-d ./arch/arm64/configs/nvidia.config \
config-6.17.0-1008-nvidia config-6.18.0-9-generic \
-o ./arch/arm64/configs//full.config
python3 ./scripts/kconfig/merge_full_configs.py \
-d ./arch/arm64/configs/nvidia.config \
config-6.17.0-1008-nvidia-64k config-6.18.0-9-generic-64k \
-o ./arch/arm64/configs//full-64k.config
Signed-off-by: Jamie Nguyen <jamien@nvidia.com>
f22a78e to
e563f4f
Compare
nvmochs
left a comment
There was a problem hiding this comment.
Thanks Jamie for the script - that will help with future updates!
I confirmed that using the script and example provided in the commit message generates the full configs that are added by this commit.
Acked-by: Matthew R. Ochs <mochs@nvidia.com>
arighi
left a comment
There was a problem hiding this comment.
Left a couple of comments, but overall LGTM.
Acked-by: Andrea Righi arighi@nvidia.com
| if is_env_key(key): | ||
| continue | ||
| merged[key] = line | ||
| # Add keys only in this config (not in base order) |
There was a problem hiding this comment.
Is this block really needed? We just did merged[key] = line so in this block key will be always in merged. I guess we can remove this block entirely.
| if not s.strip(): | ||
| entries.append((None, s)) | ||
| continue | ||
| m = re.match(r'^# CONFIG_([A-Za-z0-9_]+) is not set\s*$', s.strip()) |
There was a problem hiding this comment.
Minor improvement (feel free to ignore): instead of compiling the regex at every line, we could pre-compile them at the beginning as:
RE_NOTSET = re.compile(r'^# CONFIG_([A-Za-z0-9_]+) is not set\s*$')
RE_SET = re.compile(r'^(CONFIG_([A-Za-z0-9_]+)=(.*))$')
And then use RE_NOTSET.match() and RE_SET.match(). But this is just speed, not correctness.
Introduce full.config and full-64k.config files:
full.config: Full config (nvidia-6.17 + generic-6.18 new options, env excluded). Deduplicated so options already in nvidia.config are omitted. Merge with nvidia.config to build.
full-64k.config: 64K page size variant of full.config. Same dedup rule. 64K-related options taken from nvidia-6.17-64k reference (page size, PGTABLE_LEVELS, VA/PA bits, ARCH_MMAP_RND, etc.).