|
20 | 20 | */
|
21 | 21 | struct mem_vector immovable_mem[MAX_NUMNODES*2];
|
22 | 22 |
|
23 |
| -/* |
24 |
| - * Max length of 64-bit hex address string is 19, prefix "0x" + 16 hex |
25 |
| - * digits, and '\0' for termination. |
26 |
| - */ |
27 |
| -#define MAX_ADDR_LEN 19 |
28 |
| - |
29 |
| -static acpi_physical_address get_cmdline_acpi_rsdp(void) |
30 |
| -{ |
31 |
| - acpi_physical_address addr = 0; |
32 |
| - |
33 |
| -#ifdef CONFIG_KEXEC |
34 |
| - char val[MAX_ADDR_LEN] = { }; |
35 |
| - int ret; |
36 |
| - |
37 |
| - ret = cmdline_find_option("acpi_rsdp", val, MAX_ADDR_LEN); |
38 |
| - if (ret < 0) |
39 |
| - return 0; |
40 |
| - |
41 |
| - if (kstrtoull(val, 16, &addr)) |
42 |
| - return 0; |
43 |
| -#endif |
44 |
| - return addr; |
45 |
| -} |
46 |
| - |
47 | 23 | /*
|
48 | 24 | * Search EFI system tables for RSDP. If both ACPI_20_TABLE_GUID and
|
49 | 25 | * ACPI_TABLE_GUID are found, take the former, which has more features.
|
@@ -298,6 +274,30 @@ acpi_physical_address get_rsdp_addr(void)
|
298 | 274 | }
|
299 | 275 |
|
300 | 276 | #if defined(CONFIG_RANDOMIZE_BASE) && defined(CONFIG_MEMORY_HOTREMOVE)
|
| 277 | +/* |
| 278 | + * Max length of 64-bit hex address string is 19, prefix "0x" + 16 hex |
| 279 | + * digits, and '\0' for termination. |
| 280 | + */ |
| 281 | +#define MAX_ADDR_LEN 19 |
| 282 | + |
| 283 | +static acpi_physical_address get_cmdline_acpi_rsdp(void) |
| 284 | +{ |
| 285 | + acpi_physical_address addr = 0; |
| 286 | + |
| 287 | +#ifdef CONFIG_KEXEC |
| 288 | + char val[MAX_ADDR_LEN] = { }; |
| 289 | + int ret; |
| 290 | + |
| 291 | + ret = cmdline_find_option("acpi_rsdp", val, MAX_ADDR_LEN); |
| 292 | + if (ret < 0) |
| 293 | + return 0; |
| 294 | + |
| 295 | + if (kstrtoull(val, 16, &addr)) |
| 296 | + return 0; |
| 297 | +#endif |
| 298 | + return addr; |
| 299 | +} |
| 300 | + |
301 | 301 | /* Compute SRAT address from RSDP. */
|
302 | 302 | static unsigned long get_acpi_srat_table(void)
|
303 | 303 | {
|
|
0 commit comments