mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 06:53:04 +00:00
Compare commits
6 Commits
d2b0d68a92
...
a99b5791dd
Author | SHA1 | Date | |
---|---|---|---|
|
a99b5791dd | ||
|
baeb9a7d8b | ||
|
2638e4e6b1 | ||
|
d8fccd9ca5 | ||
|
d2d6422f8b | ||
|
7344c311f4 |
|
@ -101,6 +101,7 @@ config ARM64
|
||||||
select ARCH_SUPPORTS_NUMA_BALANCING
|
select ARCH_SUPPORTS_NUMA_BALANCING
|
||||||
select ARCH_SUPPORTS_PAGE_TABLE_CHECK
|
select ARCH_SUPPORTS_PAGE_TABLE_CHECK
|
||||||
select ARCH_SUPPORTS_PER_VMA_LOCK
|
select ARCH_SUPPORTS_PER_VMA_LOCK
|
||||||
|
select ARCH_SUPPORTS_RT
|
||||||
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
|
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
|
||||||
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
|
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
|
||||||
select ARCH_WANT_DEFAULT_BPF_JIT
|
select ARCH_WANT_DEFAULT_BPF_JIT
|
||||||
|
|
|
@ -65,6 +65,7 @@ config RISCV
|
||||||
select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 140000
|
select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 140000
|
||||||
select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
|
select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
|
||||||
select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
|
select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
|
||||||
|
select ARCH_SUPPORTS_RT
|
||||||
select ARCH_SUPPORTS_SHADOW_CALL_STACK if HAVE_SHADOW_CALL_STACK
|
select ARCH_SUPPORTS_SHADOW_CALL_STACK if HAVE_SHADOW_CALL_STACK
|
||||||
select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
|
select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
|
||||||
select ARCH_USE_MEMTEST
|
select ARCH_USE_MEMTEST
|
||||||
|
|
|
@ -124,6 +124,7 @@ config X86
|
||||||
select ARCH_USES_CFI_TRAPS if X86_64 && CFI_CLANG
|
select ARCH_USES_CFI_TRAPS if X86_64 && CFI_CLANG
|
||||||
select ARCH_SUPPORTS_LTO_CLANG
|
select ARCH_SUPPORTS_LTO_CLANG
|
||||||
select ARCH_SUPPORTS_LTO_CLANG_THIN
|
select ARCH_SUPPORTS_LTO_CLANG_THIN
|
||||||
|
select ARCH_SUPPORTS_RT
|
||||||
select ARCH_USE_BUILTIN_BSWAP
|
select ARCH_USE_BUILTIN_BSWAP
|
||||||
select ARCH_USE_CMPXCHG_LOCKREF if X86_CMPXCHG64
|
select ARCH_USE_CMPXCHG_LOCKREF if X86_CMPXCHG64
|
||||||
select ARCH_USE_MEMTEST
|
select ARCH_USE_MEMTEST
|
||||||
|
|
|
@ -86,7 +86,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
|
||||||
}
|
}
|
||||||
cur++;
|
cur++;
|
||||||
|
|
||||||
/* if no ':' is here, than we read the end */
|
/* if no ':' is here, then we read the end */
|
||||||
if (*cur != ':') {
|
if (*cur != ':') {
|
||||||
end = memparse(cur, &tmp);
|
end = memparse(cur, &tmp);
|
||||||
if (cur == tmp) {
|
if (cur == tmp) {
|
||||||
|
@ -131,12 +131,13 @@ static int __init parse_crashkernel_mem(char *cmdline,
|
||||||
cur++;
|
cur++;
|
||||||
*crash_base = memparse(cur, &tmp);
|
*crash_base = memparse(cur, &tmp);
|
||||||
if (cur == tmp) {
|
if (cur == tmp) {
|
||||||
pr_warn("crahskernel: Memory value expected after '@'\n");
|
pr_warn("crashkernel: Memory value expected after '@'\n"); // Fixed typo
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
pr_info("crashkernel size resulted in zero bytes\n");
|
pr_info("crashkernel size resulted in zero bytes\n");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -180,7 +181,7 @@ static __initdata char *suffix_tbl[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* That function parses "suffix" crashkernel command lines like
|
* That function parses "suffix" crashkernel command lines like
|
||||||
*
|
*
|
||||||
* crashkernel=size,[high|low]
|
* crashkernel=size,[high|low]
|
||||||
*
|
*
|
||||||
|
@ -332,8 +333,10 @@ int __init parse_crashkernel(char *cmdline,
|
||||||
*high = true;
|
*high = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!*crash_size)
|
if (!*crash_size) {
|
||||||
|
pr_warn("crashkernel: calculated crash size is zero\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -380,6 +383,8 @@ void __init reserve_crashkernel_generic(char *cmdline,
|
||||||
{
|
{
|
||||||
unsigned long long search_end = CRASH_ADDR_LOW_MAX, search_base = 0;
|
unsigned long long search_end = CRASH_ADDR_LOW_MAX, search_base = 0;
|
||||||
bool fixed_base = false;
|
bool fixed_base = false;
|
||||||
|
int retry_count = 0;
|
||||||
|
const int max_retries = 5; // To prevent infinite loops
|
||||||
|
|
||||||
/* User specifies base address explicitly. */
|
/* User specifies base address explicitly. */
|
||||||
if (crash_base) {
|
if (crash_base) {
|
||||||
|
@ -395,6 +400,11 @@ retry:
|
||||||
crash_base = memblock_phys_alloc_range(crash_size, CRASH_ALIGN,
|
crash_base = memblock_phys_alloc_range(crash_size, CRASH_ALIGN,
|
||||||
search_base, search_end);
|
search_base, search_end);
|
||||||
if (!crash_base) {
|
if (!crash_base) {
|
||||||
|
if (retry_count++ >= max_retries) {
|
||||||
|
pr_warn("crashkernel reservation failed after maximum retries.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For crashkernel=size[KMG]@offset[KMG], print out failure
|
* For crashkernel=size[KMG]@offset[KMG], print out failure
|
||||||
* message if can't reserve the specified region.
|
* message if can't reserve the specified region.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user