diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 21:08:07 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 21:08:07 -0400 |
| commit | d52bd54db8be8999df6df5a776f38c4f8b5e9cea (patch) | |
| tree | 0d8f436e959bb975c002ddf12ea1bdc9adadd04f /include/linux/kexec.h | |
| parent | 8cbdd85bda499d028b8f128191f392d701e8e41d (diff) | |
| parent | 3bd080e4d8f2351ee3e143f0ec9307cc95ae6639 (diff) | |
Merge branch 'akpm' (patches from Andrew)
Merge yet more updates from Andrew Morton:
- the rest of ocfs2
- various hotfixes, mainly MM
- quite a bit of misc stuff - drivers, fork, exec, signals, etc.
- printk updates
- firmware
- checkpatch
- nilfs2
- more kexec stuff than usual
- rapidio updates
- w1 things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (111 commits)
ipc: delete "nr_ipc_ns"
kcov: allow more fine-grained coverage instrumentation
init/Kconfig: add clarification for out-of-tree modules
config: add android config fragments
init/Kconfig: ban CONFIG_LOCALVERSION_AUTO with allmodconfig
relay: add global mode support for buffer-only channels
init: allow blacklisting of module_init functions
w1:omap_hdq: fix regression
w1: add helper macro module_w1_family
w1: remove need for ida and use PLATFORM_DEVID_AUTO
rapidio/switches: add driver for IDT gen3 switches
powerpc/fsl_rio: apply changes for RIO spec rev 3
rapidio: modify for rev.3 specification changes
rapidio: change inbound window size type to u64
rapidio/idt_gen2: fix locking warning
rapidio: fix error handling in mbox request/release functions
rapidio/tsi721_dma: advance queue processing from transfer submit call
rapidio/tsi721: add messaging mbox selector parameter
rapidio/tsi721: add PCIe MRRS override parameter
rapidio/tsi721_dma: add channel mask and queue size parameters
...
Diffstat (limited to 'include/linux/kexec.h')
| -rw-r--r-- | include/linux/kexec.h | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index e8acb2b43dd9..d7437777baaa 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | 14 | ||
| 15 | #if !defined(__ASSEMBLY__) | 15 | #if !defined(__ASSEMBLY__) |
| 16 | 16 | ||
| 17 | #include <asm/io.h> | ||
| 18 | |||
| 17 | #include <uapi/linux/kexec.h> | 19 | #include <uapi/linux/kexec.h> |
| 18 | 20 | ||
| 19 | #ifdef CONFIG_KEXEC_CORE | 21 | #ifdef CONFIG_KEXEC_CORE |
| @@ -41,7 +43,7 @@ | |||
| 41 | #endif | 43 | #endif |
| 42 | 44 | ||
| 43 | #ifndef KEXEC_CONTROL_MEMORY_GFP | 45 | #ifndef KEXEC_CONTROL_MEMORY_GFP |
| 44 | #define KEXEC_CONTROL_MEMORY_GFP GFP_KERNEL | 46 | #define KEXEC_CONTROL_MEMORY_GFP (GFP_KERNEL | __GFP_NORETRY) |
| 45 | #endif | 47 | #endif |
| 46 | 48 | ||
| 47 | #ifndef KEXEC_CONTROL_PAGE_SIZE | 49 | #ifndef KEXEC_CONTROL_PAGE_SIZE |
| @@ -228,12 +230,13 @@ extern void *kexec_purgatory_get_symbol_addr(struct kimage *image, | |||
| 228 | extern void __crash_kexec(struct pt_regs *); | 230 | extern void __crash_kexec(struct pt_regs *); |
| 229 | extern void crash_kexec(struct pt_regs *); | 231 | extern void crash_kexec(struct pt_regs *); |
| 230 | int kexec_should_crash(struct task_struct *); | 232 | int kexec_should_crash(struct task_struct *); |
| 233 | int kexec_crash_loaded(void); | ||
| 231 | void crash_save_cpu(struct pt_regs *regs, int cpu); | 234 | void crash_save_cpu(struct pt_regs *regs, int cpu); |
| 232 | void crash_save_vmcoreinfo(void); | 235 | void crash_save_vmcoreinfo(void); |
| 233 | void arch_crash_save_vmcoreinfo(void); | 236 | void arch_crash_save_vmcoreinfo(void); |
| 234 | __printf(1, 2) | 237 | __printf(1, 2) |
| 235 | void vmcoreinfo_append_str(const char *fmt, ...); | 238 | void vmcoreinfo_append_str(const char *fmt, ...); |
| 236 | unsigned long paddr_vmcoreinfo_note(void); | 239 | phys_addr_t paddr_vmcoreinfo_note(void); |
| 237 | 240 | ||
| 238 | #define VMCOREINFO_OSRELEASE(value) \ | 241 | #define VMCOREINFO_OSRELEASE(value) \ |
| 239 | vmcoreinfo_append_str("OSRELEASE=%s\n", value) | 242 | vmcoreinfo_append_str("OSRELEASE=%s\n", value) |
| @@ -318,12 +321,51 @@ int __weak arch_kexec_apply_relocations(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, | |||
| 318 | void arch_kexec_protect_crashkres(void); | 321 | void arch_kexec_protect_crashkres(void); |
| 319 | void arch_kexec_unprotect_crashkres(void); | 322 | void arch_kexec_unprotect_crashkres(void); |
| 320 | 323 | ||
| 324 | #ifndef page_to_boot_pfn | ||
| 325 | static inline unsigned long page_to_boot_pfn(struct page *page) | ||
| 326 | { | ||
| 327 | return page_to_pfn(page); | ||
| 328 | } | ||
| 329 | #endif | ||
| 330 | |||
| 331 | #ifndef boot_pfn_to_page | ||
| 332 | static inline struct page *boot_pfn_to_page(unsigned long boot_pfn) | ||
| 333 | { | ||
| 334 | return pfn_to_page(boot_pfn); | ||
| 335 | } | ||
| 336 | #endif | ||
| 337 | |||
| 338 | #ifndef phys_to_boot_phys | ||
| 339 | static inline unsigned long phys_to_boot_phys(phys_addr_t phys) | ||
| 340 | { | ||
| 341 | return phys; | ||
| 342 | } | ||
| 343 | #endif | ||
| 344 | |||
| 345 | #ifndef boot_phys_to_phys | ||
| 346 | static inline phys_addr_t boot_phys_to_phys(unsigned long boot_phys) | ||
| 347 | { | ||
| 348 | return boot_phys; | ||
| 349 | } | ||
| 350 | #endif | ||
| 351 | |||
| 352 | static inline unsigned long virt_to_boot_phys(void *addr) | ||
| 353 | { | ||
| 354 | return phys_to_boot_phys(__pa((unsigned long)addr)); | ||
| 355 | } | ||
| 356 | |||
| 357 | static inline void *boot_phys_to_virt(unsigned long entry) | ||
| 358 | { | ||
| 359 | return phys_to_virt(boot_phys_to_phys(entry)); | ||
| 360 | } | ||
| 361 | |||
| 321 | #else /* !CONFIG_KEXEC_CORE */ | 362 | #else /* !CONFIG_KEXEC_CORE */ |
| 322 | struct pt_regs; | 363 | struct pt_regs; |
| 323 | struct task_struct; | 364 | struct task_struct; |
| 324 | static inline void __crash_kexec(struct pt_regs *regs) { } | 365 | static inline void __crash_kexec(struct pt_regs *regs) { } |
| 325 | static inline void crash_kexec(struct pt_regs *regs) { } | 366 | static inline void crash_kexec(struct pt_regs *regs) { } |
| 326 | static inline int kexec_should_crash(struct task_struct *p) { return 0; } | 367 | static inline int kexec_should_crash(struct task_struct *p) { return 0; } |
| 368 | static inline int kexec_crash_loaded(void) { return 0; } | ||
| 327 | #define kexec_in_progress false | 369 | #define kexec_in_progress false |
| 328 | #endif /* CONFIG_KEXEC_CORE */ | 370 | #endif /* CONFIG_KEXEC_CORE */ |
| 329 | 371 | ||
