aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 18:39:22 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 18:39:22 -0500
commit6ee7e78e7c78d871409ad4df30551c9355be7d0e (patch)
tree84deeea72d7234d0b5652483b11760f394ae1131 /include/asm-ia64
parent7f3af60e5a444b287d740a84998a8f480645dadf (diff)
parent52fd91088bcbaea5ab441d09d39c21eb684e54ea (diff)
Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] replace kmalloc+memset with kzalloc [IA64] resolve name clash by renaming is_available_memory() [IA64] Need export for csum_ipv6_magic [IA64] Fix DISCONTIGMEM without VIRTUAL_MEM_MAP [PATCH] Add support for type argument in PAL_GET_PSTATE [IA64] tidy up return value of ip_fast_csum [IA64] implement csum_ipv6_magic for ia64. [IA64] More Itanium PAL spec updates [IA64] Update processor_info features [IA64] Add se bit to Processor State Parameter structure [IA64] Add dp bit to cache and bus check structs [IA64] SN: Correctly update smp_affinty mask [IA64] sparse cleanups [IA64] IA64 Kexec/kdump
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/checksum.h6
-rw-r--r--include/asm-ia64/kexec.h47
-rw-r--r--include/asm-ia64/machvec.h5
-rw-r--r--include/asm-ia64/machvec_sn2.h2
-rw-r--r--include/asm-ia64/meminit.h3
-rw-r--r--include/asm-ia64/page.h11
-rw-r--r--include/asm-ia64/pal.h64
-rw-r--r--include/asm-ia64/sn/sn_sal.h9
8 files changed, 132 insertions, 15 deletions
diff --git a/include/asm-ia64/checksum.h b/include/asm-ia64/checksum.h
index bd40f4756ce1..2b78582cbd61 100644
--- a/include/asm-ia64/checksum.h
+++ b/include/asm-ia64/checksum.h
@@ -70,4 +70,10 @@ static inline __sum16 csum_fold(__wsum csum)
70 return (__force __sum16)~sum; 70 return (__force __sum16)~sum;
71} 71}
72 72
73#define _HAVE_ARCH_IPV6_CSUM 1
74struct in6_addr;
75extern unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
76 struct in6_addr *daddr, __u32 len, unsigned short proto,
77 unsigned int csum);
78
73#endif /* _ASM_IA64_CHECKSUM_H */ 79#endif /* _ASM_IA64_CHECKSUM_H */
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
24extern struct kimage *ia64_kimage;
25DECLARE_PER_CPU(u64, ia64_mca_pal_base);
26const extern unsigned int relocate_new_kernel_size;
27extern void relocate_new_kernel(unsigned long, unsigned long,
28 struct ia64_boot_param *, unsigned long);
29static inline void
30crash_setup_regs(struct pt_regs *newregs, struct pt_regs *oldregs)
31{
32}
33extern struct resource efi_memmap_res;
34extern struct resource boot_param_res;
35extern void kdump_smp_send_stop(void);
36extern void kdump_smp_send_init(void);
37extern void kexec_disable_iosapic(void);
38extern void crash_save_this_cpu(void);
39struct rsvd_region;
40extern unsigned long kdump_find_rsvd_region(unsigned long size,
41 struct rsvd_region *rsvd_regions, int n);
42extern void kdump_cpu_freeze(struct unw_frame_info *info, void *arg);
43extern int kdump_status[];
44extern atomic_t kdump_cpu_freezed;
45extern 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);
38typedef void ia64_mv_migrate_t(struct task_struct * task); 38typedef void ia64_mv_migrate_t(struct task_struct * task);
39typedef void ia64_mv_pci_fixup_bus_t (struct pci_bus *); 39typedef void ia64_mv_pci_fixup_bus_t (struct pci_bus *);
40typedef void ia64_mv_kernel_launch_event_t(void);
40 41
41/* DMA-mapping interface: */ 42/* DMA-mapping interface: */
42typedef void ia64_mv_dma_init (void); 43typedef 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;
67extern ia64_mv_dma_mapping_error sn_dma_mapping_error; 67extern ia64_mv_dma_mapping_error sn_dma_mapping_error;
68extern ia64_mv_dma_supported sn_dma_supported; 68extern ia64_mv_dma_supported sn_dma_supported;
69extern ia64_mv_migrate_t sn_migrate; 69extern ia64_mv_migrate_t sn_migrate;
70extern ia64_mv_kernel_launch_event_t sn_kernel_launch_event;
70extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq; 71extern ia64_mv_setup_msi_irq_t sn_setup_msi_irq;
71extern ia64_mv_teardown_msi_irq_t sn_teardown_msi_irq; 72extern ia64_mv_teardown_msi_irq_t sn_teardown_msi_irq;
72extern ia64_mv_pci_fixup_bus_t sn_pci_fixup_bus; 73extern 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
24struct rsvd_region { 25struct 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/page.h b/include/asm-ia64/page.h
index 947cb72b520e..485759ba9e36 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -101,7 +101,7 @@ do { \
101 101
102#ifdef CONFIG_VIRTUAL_MEM_MAP 102#ifdef CONFIG_VIRTUAL_MEM_MAP
103extern int ia64_pfn_valid (unsigned long pfn); 103extern int ia64_pfn_valid (unsigned long pfn);
104#elif defined(CONFIG_FLATMEM) 104#else
105# define ia64_pfn_valid(pfn) 1 105# define ia64_pfn_valid(pfn) 1
106#endif 106#endif
107 107
@@ -110,12 +110,11 @@ extern struct page *vmem_map;
110#ifdef CONFIG_DISCONTIGMEM 110#ifdef CONFIG_DISCONTIGMEM
111# define page_to_pfn(page) ((unsigned long) (page - vmem_map)) 111# define page_to_pfn(page) ((unsigned long) (page - vmem_map))
112# define pfn_to_page(pfn) (vmem_map + (pfn)) 112# define pfn_to_page(pfn) (vmem_map + (pfn))
113#else
114# include <asm-generic/memory_model.h>
113#endif 115#endif
114#endif 116#else
115 117# include <asm-generic/memory_model.h>
116#if defined(CONFIG_FLATMEM) || defined(CONFIG_SPARSEMEM)
117/* FLATMEM always configures mem_map (mem_map = vmem_map if necessary) */
118#include <asm-generic/memory_model.h>
119#endif 118#endif
120 119
121#ifdef CONFIG_FLATMEM 120#ifdef CONFIG_FLATMEM
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h
index 4283ddcc25fb..bc768153f3c9 100644
--- a/include/asm-ia64/pal.h
+++ b/include/asm-ia64/pal.h
@@ -20,6 +20,8 @@
20 * 00/05/24 eranian Updated to latest PAL spec, fix structures bugs, added 20 * 00/05/24 eranian Updated to latest PAL spec, fix structures bugs, added
21 * 00/05/25 eranian Support for stack calls, and static physical calls 21 * 00/05/25 eranian Support for stack calls, and static physical calls
22 * 00/06/18 eranian Support for stacked physical calls 22 * 00/06/18 eranian Support for stacked physical calls
23 * 06/10/26 rja Support for Intel Itanium Architecture Software Developer's
24 * Manual Rev 2.2 (Jan 2006)
23 */ 25 */
24 26
25/* 27/*
@@ -69,6 +71,8 @@
69#define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */ 71#define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */
70#define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */ 72#define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */
71#define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */ 73#define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */
74#define PAL_GET_HW_POLICY 48 /* Get current hardware resource sharing policy */
75#define PAL_SET_HW_POLICY 49 /* Set current hardware resource sharing policy */
72 76
73#define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ 77#define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */
74#define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ 78#define PAL_HALT_INFO 257 /* return the low power capabilities of processor */
@@ -80,6 +84,11 @@
80#define PAL_SET_PSTATE 263 /* set the P-state */ 84#define PAL_SET_PSTATE 263 /* set the P-state */
81#define PAL_BRAND_INFO 274 /* Processor branding information */ 85#define PAL_BRAND_INFO 274 /* Processor branding information */
82 86
87#define PAL_GET_PSTATE_TYPE_LASTSET 0
88#define PAL_GET_PSTATE_TYPE_AVGANDRESET 1
89#define PAL_GET_PSTATE_TYPE_AVGNORESET 2
90#define PAL_GET_PSTATE_TYPE_INSTANT 3
91
83#ifndef __ASSEMBLY__ 92#ifndef __ASSEMBLY__
84 93
85#include <linux/types.h> 94#include <linux/types.h>
@@ -102,6 +111,7 @@ typedef s64 pal_status_t;
102 * cache without sideeffects 111 * cache without sideeffects
103 * and "restrict" was 1 112 * and "restrict" was 1
104 */ 113 */
114#define PAL_STATUS_REQUIRES_MEMORY (-9) /* Call requires PAL memory buffer */
105 115
106/* Processor cache level in the heirarchy */ 116/* Processor cache level in the heirarchy */
107typedef u64 pal_cache_level_t; 117typedef u64 pal_cache_level_t;
@@ -456,7 +466,9 @@ typedef struct pal_process_state_info_s {
456 * by the processor 466 * by the processor
457 */ 467 */
458 468
459 reserved2 : 11, 469 se : 1, /* Shared error. MCA in a
470 shared structure */
471 reserved2 : 10,
460 cc : 1, /* Cache check */ 472 cc : 1, /* Cache check */
461 tc : 1, /* TLB check */ 473 tc : 1, /* TLB check */
462 bc : 1, /* Bus check */ 474 bc : 1, /* Bus check */
@@ -487,10 +499,12 @@ typedef struct pal_cache_check_info_s {
487 * error occurred 499 * error occurred
488 */ 500 */
489 wiv : 1, /* Way field valid */ 501 wiv : 1, /* Way field valid */
490 reserved2 : 10, 502 reserved2 : 1,
503 dp : 1, /* Data poisoned on MBE */
504 reserved3 : 8,
491 505
492 index : 20, /* Cache line index */ 506 index : 20, /* Cache line index */
493 reserved3 : 2, 507 reserved4 : 2,
494 508
495 is : 1, /* instruction set (1 == ia32) */ 509 is : 1, /* instruction set (1 == ia32) */
496 iv : 1, /* instruction set field valid */ 510 iv : 1, /* instruction set field valid */
@@ -557,7 +571,7 @@ typedef struct pal_bus_check_info_s {
557 type : 8, /* Bus xaction type*/ 571 type : 8, /* Bus xaction type*/
558 sev : 5, /* Bus error severity*/ 572 sev : 5, /* Bus error severity*/
559 hier : 2, /* Bus hierarchy level */ 573 hier : 2, /* Bus hierarchy level */
560 reserved1 : 1, 574 dp : 1, /* Data poisoned on MBE */
561 bsi : 8, /* Bus error status 575 bsi : 8, /* Bus error status
562 * info 576 * info
563 */ 577 */
@@ -834,7 +848,9 @@ typedef union pal_bus_features_u {
834 u64 pbf_req_bus_parking : 1; 848 u64 pbf_req_bus_parking : 1;
835 u64 pbf_bus_lock_mask : 1; 849 u64 pbf_bus_lock_mask : 1;
836 u64 pbf_enable_half_xfer_rate : 1; 850 u64 pbf_enable_half_xfer_rate : 1;
837 u64 pbf_reserved2 : 22; 851 u64 pbf_reserved2 : 20;
852 u64 pbf_enable_shared_line_replace : 1;
853 u64 pbf_enable_exclusive_line_replace : 1;
838 u64 pbf_disable_xaction_queueing : 1; 854 u64 pbf_disable_xaction_queueing : 1;
839 u64 pbf_disable_resp_err_check : 1; 855 u64 pbf_disable_resp_err_check : 1;
840 u64 pbf_disable_berr_check : 1; 856 u64 pbf_disable_berr_check : 1;
@@ -1077,6 +1093,24 @@ ia64_pal_freq_ratios (struct pal_freq_ratio *proc_ratio, struct pal_freq_ratio *
1077 return iprv.status; 1093 return iprv.status;
1078} 1094}
1079 1095
1096/*
1097 * Get the current hardware resource sharing policy of the processor
1098 */
1099static inline s64
1100ia64_pal_get_hw_policy (u64 proc_num, u64 *cur_policy, u64 *num_impacted,
1101 u64 *la)
1102{
1103 struct ia64_pal_retval iprv;
1104 PAL_CALL(iprv, PAL_GET_HW_POLICY, proc_num, 0, 0);
1105 if (cur_policy)
1106 *cur_policy = iprv.v0;
1107 if (num_impacted)
1108 *num_impacted = iprv.v1;
1109 if (la)
1110 *la = iprv.v2;
1111 return iprv.status;
1112}
1113
1080/* Make the processor enter HALT or one of the implementation dependent low 1114/* Make the processor enter HALT or one of the implementation dependent low
1081 * power states where prefetching and execution are suspended and cache and 1115 * power states where prefetching and execution are suspended and cache and
1082 * TLB coherency is not maintained. 1116 * TLB coherency is not maintained.
@@ -1112,10 +1146,10 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf)
1112 1146
1113/* Get the current P-state information */ 1147/* Get the current P-state information */
1114static inline s64 1148static inline s64
1115ia64_pal_get_pstate (u64 *pstate_index) 1149ia64_pal_get_pstate (u64 *pstate_index, unsigned long type)
1116{ 1150{
1117 struct ia64_pal_retval iprv; 1151 struct ia64_pal_retval iprv;
1118 PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0); 1152 PAL_CALL_STK(iprv, PAL_GET_PSTATE, type, 0, 0);
1119 *pstate_index = iprv.v0; 1153 *pstate_index = iprv.v0;
1120 return iprv.status; 1154 return iprv.status;
1121} 1155}
@@ -1401,6 +1435,17 @@ ia64_pal_rse_info (u64 *num_phys_stacked, pal_hints_u_t *hints)
1401 return iprv.status; 1435 return iprv.status;
1402} 1436}
1403 1437
1438/*
1439 * Set the current hardware resource sharing policy of the processor
1440 */
1441static inline s64
1442ia64_pal_set_hw_policy (u64 policy)
1443{
1444 struct ia64_pal_retval iprv;
1445 PAL_CALL(iprv, PAL_SET_HW_POLICY, policy, 0, 0);
1446 return iprv.status;
1447}
1448
1404/* Cause the processor to enter SHUTDOWN state, where prefetching and execution are 1449/* Cause the processor to enter SHUTDOWN state, where prefetching and execution are
1405 * suspended, but cause cache and TLB coherency to be maintained. 1450 * suspended, but cause cache and TLB coherency to be maintained.
1406 * This is usually called in IA-32 mode. 1451 * This is usually called in IA-32 mode.
@@ -1524,12 +1569,15 @@ typedef union pal_vm_info_1_u {
1524 } pal_vm_info_1_s; 1569 } pal_vm_info_1_s;
1525} pal_vm_info_1_u_t; 1570} pal_vm_info_1_u_t;
1526 1571
1572#define PAL_MAX_PURGES 0xFFFF /* all ones is means unlimited */
1573
1527typedef union pal_vm_info_2_u { 1574typedef union pal_vm_info_2_u {
1528 u64 pvi2_val; 1575 u64 pvi2_val;
1529 struct { 1576 struct {
1530 u64 impl_va_msb : 8, 1577 u64 impl_va_msb : 8,
1531 rid_size : 8, 1578 rid_size : 8,
1532 reserved : 48; 1579 max_purges : 16,
1580 reserved : 32;
1533 } pal_vm_info_2_s; 1581 } pal_vm_info_2_s;
1534} pal_vm_info_2_u_t; 1582} pal_vm_info_2_u_t;
1535 1583
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}
1160static inline int
1161ia64_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 */