diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-06-02 09:43:20 +0530 | 
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-06-02 09:43:20 +0530 | 
| commit | 4050ba0a89a3a97b29d4f281b7570495cf5596d9 (patch) | |
| tree | f0473e4a555db3b2ea1f8fa8b474c196fd3b72db /dist/disable-pat-check.patch | |
| parent | 74c3f173fb766190c6cef3cb93ebc88f596249fc (diff) | |
update
Diffstat (limited to 'dist/disable-pat-check.patch')
| -rw-r--r-- | dist/disable-pat-check.patch | 51 | 
1 files changed, 51 insertions, 0 deletions
| diff --git a/dist/disable-pat-check.patch b/dist/disable-pat-check.patch new file mode 100644 index 0000000..f3d3877 --- /dev/null +++ b/dist/disable-pat-check.patch @@ -0,0 +1,51 @@ +--- a/arch/x86/mm/pat/memtype_interval.c ++++ b/arch/x86/mm/pat/memtype_interval.c +@@ -33,6 +33,16 @@ +  * memtype_lock protects the rbtree. +  */ +  ++int skip_pat_enable = 0; ++ ++static int __init skip_pat_check(char *str) ++{ ++	skip_pat_enable = 1; ++	pr_info("Disabled PAT check type (experimental)\n"); ++	return 0; ++} ++early_param("skippatcheck", skip_pat_check); ++ + static inline u64 interval_start(struct memtype *entry) + { + 	return entry->start; +@@ -86,19 +96,22 @@ + 	if (entry_match == NULL) + 		goto success; +  +-	if (entry_match->type != found_type && newtype == NULL) +-		goto failure; +- +-	dprintk("Overlap at 0x%Lx-0x%Lx\n", entry_match->start, entry_match->end); +-	found_type = entry_match->type; +- +-	entry_match = interval_iter_next(entry_match, start, end-1); +-	while (entry_match) { +-		if (entry_match->type != found_type) ++	if (!skip_pat_enable) { ++		if (entry_match->type != found_type && newtype == NULL) + 			goto failure; +  ++		dprintk("Overlap at 0x%Lx-0x%Lx\n", entry_match->start, entry_match->end); ++		found_type = entry_match->type; ++ + 		entry_match = interval_iter_next(entry_match, start, end-1); ++		while (entry_match) { ++			if (entry_match->type != found_type) ++				goto failure; ++ ++			entry_match = interval_iter_next(entry_match, start, end-1); ++		} + 	} ++ + success: + 	if (newtype) + 		*newtype = found_type; | 
