diff options
author | Zou Nan hai <nanhai.zou@intel.com> | 2006-12-07 12:51:35 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-12-07 12:51:35 -0500 |
commit | a79561134f38de12dce14ed72138f38e55ef53fc (patch) | |
tree | abe109dbe85e5b0085ba9b9a7eed7cc623d67eec /include | |
parent | 620034c84d1d939717bdfbe02c51a3fee43541c3 (diff) |
[IA64] IA64 Kexec/kdump
Changes and updates.
1. Remove fake rendz path and related code according to discuss with Khalid Aziz.
2. fc.i offset fix in relocate_kernel.S.
3. iospic shutdown code eoi and mask race fix from Fujitsu.
4. Warm boot hook in machine_kexec to SN SAL code from Jack Steiner.
5. Send slave to SAL slave loop patch from Jay Lan.
6. Kdump on non-recoverable MCA event patch from Jay Lan
7. Use CTL_UNNUMBERED in kdump_on_init sysctl.
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/kexec.h | 47 | ||||
-rw-r--r-- | include/asm-ia64/machvec.h | 5 | ||||
-rw-r--r-- | include/asm-ia64/machvec_sn2.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/meminit.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_sal.h | 9 | ||||
-rw-r--r-- | include/linux/kexec.h | 5 |
6 files changed, 70 insertions, 1 deletions
diff --git a/include/asm-ia64/kexec.h b/include/asm-ia64/kexec.h new file mode 100644 index 000000000000..01c36b004747 --- /dev/null +++ b/include/asm-ia64/kexec.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef _ASM_IA64_KEXEC_H | ||
2 | #define _ASM_IA64_KEXEC_H | ||
3 | |||
4 | |||
5 | /* Maximum physical address we can use pages from */ | ||
6 | #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) | ||
7 | /* Maximum address we can reach in physical address mode */ | ||
8 | #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) | ||
9 | /* Maximum address we can use for the control code buffer */ | ||
10 | #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE | ||
11 | |||
12 | #define KEXEC_CONTROL_CODE_SIZE (8192 + 8192 + 4096) | ||
13 | |||
14 | /* The native architecture */ | ||
15 | #define KEXEC_ARCH KEXEC_ARCH_IA_64 | ||
16 | |||
17 | #define MAX_NOTE_BYTES 1024 | ||
18 | |||
19 | #define kexec_flush_icache_page(page) do { \ | ||
20 | unsigned long page_addr = (unsigned long)page_address(page); \ | ||
21 | flush_icache_range(page_addr, page_addr + PAGE_SIZE); \ | ||
22 | } while(0) | ||
23 | |||
24 | extern struct kimage *ia64_kimage; | ||
25 | DECLARE_PER_CPU(u64, ia64_mca_pal_base); | ||
26 | const extern unsigned int relocate_new_kernel_size; | ||
27 | extern void relocate_new_kernel(unsigned long, unsigned long, | ||
28 | struct ia64_boot_param *, unsigned long); | ||
29 | static inline void | ||
30 | crash_setup_regs(struct pt_regs *newregs, struct pt_regs *oldregs) | ||
31 | { | ||
32 | } | ||
33 | extern struct resource efi_memmap_res; | ||
34 | extern struct resource boot_param_res; | ||
35 | extern void kdump_smp_send_stop(void); | ||
36 | extern void kdump_smp_send_init(void); | ||
37 | extern void kexec_disable_iosapic(void); | ||
38 | extern void crash_save_this_cpu(void); | ||
39 | struct rsvd_region; | ||
40 | extern unsigned long kdump_find_rsvd_region(unsigned long size, | ||
41 | struct rsvd_region *rsvd_regions, int n); | ||
42 | extern void kdump_cpu_freeze(struct unw_frame_info *info, void *arg); | ||
43 | extern int kdump_status[]; | ||
44 | extern atomic_t kdump_cpu_freezed; | ||
45 | extern atomic_t kdump_in_progress; | ||
46 | |||
47 | #endif /* _ASM_IA64_KEXEC_H */ | ||
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index 8f784f8e45b0..a3891eb3f217 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -37,6 +37,7 @@ typedef int ia64_mv_pci_legacy_write_t (struct pci_bus *, u16 port, u32 val, | |||
37 | u8 size); | 37 | u8 size); |
38 | typedef void ia64_mv_migrate_t(struct task_struct * task); | 38 | typedef void ia64_mv_migrate_t(struct task_struct * task); |
39 | typedef void ia64_mv_pci_fixup_bus_t (struct pci_bus *); | 39 | typedef void ia64_mv_pci_fixup_bus_t (struct pci_bus *); |
40 | typedef void ia64_mv_kernel_launch_event_t(void); | ||
40 | 41 | ||
41 | /* DMA-mapping interface: */ | 42 | /* DMA-mapping interface: */ |
42 | typedef void ia64_mv_dma_init (void); | 43 | typedef void ia64_mv_dma_init (void); |
@@ -218,6 +219,7 @@ struct ia64_machine_vector { | |||
218 | ia64_mv_setup_msi_irq_t *setup_msi_irq; | 219 | ia64_mv_setup_msi_irq_t *setup_msi_irq; |
219 | ia64_mv_teardown_msi_irq_t *teardown_msi_irq; | 220 | ia64_mv_teardown_msi_irq_t *teardown_msi_irq; |
220 | ia64_mv_pci_fixup_bus_t *pci_fixup_bus; | 221 | ia64_mv_pci_fixup_bus_t *pci_fixup_bus; |
222 | ia64_mv_kernel_launch_event_t *kernel_launch_event; | ||
221 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ | 223 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ |
222 | 224 | ||
223 | #define MACHVEC_INIT(name) \ | 225 | #define MACHVEC_INIT(name) \ |
@@ -318,6 +320,9 @@ extern ia64_mv_dma_supported swiotlb_dma_supported; | |||
318 | #ifndef platform_tlb_migrate_finish | 320 | #ifndef platform_tlb_migrate_finish |
319 | # define platform_tlb_migrate_finish machvec_noop_mm | 321 | # define platform_tlb_migrate_finish machvec_noop_mm |
320 | #endif | 322 | #endif |
323 | #ifndef platform_kernel_launch_event | ||
324 | # define platform_kernel_launch_event machvec_noop | ||
325 | #endif | ||
321 | #ifndef platform_dma_init | 326 | #ifndef platform_dma_init |
322 | # define platform_dma_init swiotlb_init | 327 | # define platform_dma_init swiotlb_init |
323 | #endif | 328 | #endif |
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h index 83325f6db03e..eaa2fce0fecd 100644 --- a/include/asm-ia64/machvec_sn2.h +++ b/include/asm-ia64/machvec_sn2.h | |||
@@ -67,6 +67,7 @@ extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; | |||
67 | extern ia64_mv_dma_mapping_error sn_dma_mapping_error; | 67 | extern ia64_mv_dma_mapping_error sn_dma_mapping_error; |
68 | extern ia64_mv_dma_supported sn_dma_supported; | 68 | extern ia64_mv_dma_supported sn_dma_supported; |
69 | extern ia64_mv_migrate_t sn_migrate; | 69 | extern ia64_mv_migrate_t sn_migrate; |
70 | extern ia64_mv_kernel_launch_event_t sn_kernel_launch_event; | ||
70 | extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq; | 71 | extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq; |
71 | extern ia64_mv_teardown_msi_irq_t sn_teardown_msi_irq; | 72 | extern ia64_mv_teardown_msi_irq_t sn_teardown_msi_irq; |
72 | extern ia64_mv_pci_fixup_bus_t sn_pci_fixup_bus; | 73 | extern ia64_mv_pci_fixup_bus_t sn_pci_fixup_bus; |
@@ -121,6 +122,7 @@ extern ia64_mv_pci_fixup_bus_t sn_pci_fixup_bus; | |||
121 | #define platform_dma_mapping_error sn_dma_mapping_error | 122 | #define platform_dma_mapping_error sn_dma_mapping_error |
122 | #define platform_dma_supported sn_dma_supported | 123 | #define platform_dma_supported sn_dma_supported |
123 | #define platform_migrate sn_migrate | 124 | #define platform_migrate sn_migrate |
125 | #define platform_kernel_launch_event sn_kernel_launch_event | ||
124 | #ifdef CONFIG_PCI_MSI | 126 | #ifdef CONFIG_PCI_MSI |
125 | #define platform_setup_msi_irq sn_setup_msi_irq | 127 | #define platform_setup_msi_irq sn_setup_msi_irq |
126 | #define platform_teardown_msi_irq sn_teardown_msi_irq | 128 | #define platform_teardown_msi_irq sn_teardown_msi_irq |
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index c3b1f862e6e7..c8df75901083 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h | |||
@@ -15,11 +15,12 @@ | |||
15 | * - initrd (optional) | 15 | * - initrd (optional) |
16 | * - command line string | 16 | * - command line string |
17 | * - kernel code & data | 17 | * - kernel code & data |
18 | * - crash dumping code reserved region | ||
18 | * - Kernel memory map built from EFI memory map | 19 | * - Kernel memory map built from EFI memory map |
19 | * | 20 | * |
20 | * More could be added if necessary | 21 | * More could be added if necessary |
21 | */ | 22 | */ |
22 | #define IA64_MAX_RSVD_REGIONS 6 | 23 | #define IA64_MAX_RSVD_REGIONS 7 |
23 | 24 | ||
24 | struct rsvd_region { | 25 | struct rsvd_region { |
25 | unsigned long start; /* virtual address of beginning of element */ | 26 | unsigned long start; /* virtual address of beginning of element */ |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index be5d83ad7cb1..2c4004eb5a68 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -88,6 +88,8 @@ | |||
88 | #define SN_SAL_INJECT_ERROR 0x02000067 | 88 | #define SN_SAL_INJECT_ERROR 0x02000067 |
89 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 | 89 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 |
90 | 90 | ||
91 | #define SN_SAL_KERNEL_LAUNCH_EVENT 0x02000069 | ||
92 | |||
91 | /* | 93 | /* |
92 | * Service-specific constants | 94 | * Service-specific constants |
93 | */ | 95 | */ |
@@ -1155,4 +1157,11 @@ ia64_sn_set_cpu_number(int cpu) | |||
1155 | SAL_CALL_NOLOCK(rv, SN_SAL_SET_CPU_NUMBER, cpu, 0, 0, 0, 0, 0, 0); | 1157 | SAL_CALL_NOLOCK(rv, SN_SAL_SET_CPU_NUMBER, cpu, 0, 0, 0, 0, 0, 0); |
1156 | return rv.status; | 1158 | return rv.status; |
1157 | } | 1159 | } |
1160 | static inline int | ||
1161 | ia64_sn_kernel_launch_event(void) | ||
1162 | { | ||
1163 | struct ia64_sal_retval rv; | ||
1164 | SAL_CALL_NOLOCK(rv, SN_SAL_KERNEL_LAUNCH_EVENT, 0, 0, 0, 0, 0, 0, 0); | ||
1165 | return rv.status; | ||
1166 | } | ||
1158 | #endif /* _ASM_IA64_SN_SN_SAL_H */ | 1167 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index a4ede62b339d..e14cd388c65b 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -108,6 +108,10 @@ int kexec_should_crash(struct task_struct *); | |||
108 | extern struct kimage *kexec_image; | 108 | extern struct kimage *kexec_image; |
109 | extern struct kimage *kexec_crash_image; | 109 | extern struct kimage *kexec_crash_image; |
110 | 110 | ||
111 | #ifndef kexec_flush_icache_page | ||
112 | #define kexec_flush_icache_page(page) | ||
113 | #endif | ||
114 | |||
111 | #define KEXEC_ON_CRASH 0x00000001 | 115 | #define KEXEC_ON_CRASH 0x00000001 |
112 | #define KEXEC_ARCH_MASK 0xffff0000 | 116 | #define KEXEC_ARCH_MASK 0xffff0000 |
113 | 117 | ||
@@ -133,6 +137,7 @@ extern struct resource crashk_res; | |||
133 | typedef u32 note_buf_t[MAX_NOTE_BYTES/4]; | 137 | typedef u32 note_buf_t[MAX_NOTE_BYTES/4]; |
134 | extern note_buf_t *crash_notes; | 138 | extern note_buf_t *crash_notes; |
135 | 139 | ||
140 | |||
136 | #else /* !CONFIG_KEXEC */ | 141 | #else /* !CONFIG_KEXEC */ |
137 | struct pt_regs; | 142 | struct pt_regs; |
138 | struct task_struct; | 143 | struct task_struct; |