diff options
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/Kbuild | 1 | ||||
-rw-r--r-- | include/asm-ia64/checksum.h | 37 | ||||
-rw-r--r-- | include/asm-ia64/device.h | 15 | ||||
-rw-r--r-- | include/asm-ia64/dma-mapping.h | 5 | ||||
-rw-r--r-- | include/asm-ia64/futex.h | 4 | ||||
-rw-r--r-- | include/asm-ia64/io.h | 6 | ||||
-rw-r--r-- | include/asm-ia64/kexec.h | 47 | ||||
-rw-r--r-- | include/asm-ia64/machvec.h | 17 | ||||
-rw-r--r-- | include/asm-ia64/machvec_sn2.h | 4 | ||||
-rw-r--r-- | include/asm-ia64/meminit.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/page.h | 11 | ||||
-rw-r--r-- | include/asm-ia64/pal.h | 75 | ||||
-rw-r--r-- | include/asm-ia64/pci.h | 21 | ||||
-rw-r--r-- | include/asm-ia64/pgalloc.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/sal.h | 1 | ||||
-rw-r--r-- | include/asm-ia64/sn/acpi.h | 16 | ||||
-rw-r--r-- | include/asm-ia64/sn/addrs.h | 6 | ||||
-rw-r--r-- | include/asm-ia64/sn/pcidev.h | 22 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_feature_sets.h | 6 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_sal.h | 10 | ||||
-rw-r--r-- | include/asm-ia64/termbits.h | 11 | ||||
-rw-r--r-- | include/asm-ia64/topology.h | 1 | ||||
-rw-r--r-- | include/asm-ia64/uaccess.h | 2 |
23 files changed, 247 insertions, 76 deletions
diff --git a/include/asm-ia64/Kbuild b/include/asm-ia64/Kbuild index 15818a18bc52..4a1e48b9f403 100644 --- a/include/asm-ia64/Kbuild +++ b/include/asm-ia64/Kbuild | |||
@@ -10,7 +10,6 @@ header-y += intrinsics.h | |||
10 | header-y += perfmon_default_smpl.h | 10 | header-y += perfmon_default_smpl.h |
11 | header-y += ptrace_offsets.h | 11 | header-y += ptrace_offsets.h |
12 | header-y += rse.h | 12 | header-y += rse.h |
13 | header-y += setup.h | ||
14 | header-y += ucontext.h | 13 | header-y += ucontext.h |
15 | 14 | ||
16 | unifdef-y += perfmon.h | 15 | unifdef-y += perfmon.h |
diff --git a/include/asm-ia64/checksum.h b/include/asm-ia64/checksum.h index 1f230ff8ea81..2b78582cbd61 100644 --- a/include/asm-ia64/checksum.h +++ b/include/asm-ia64/checksum.h | |||
@@ -10,23 +10,21 @@ | |||
10 | * This is a version of ip_compute_csum() optimized for IP headers, | 10 | * This is a version of ip_compute_csum() optimized for IP headers, |
11 | * which always checksum on 4 octet boundaries. | 11 | * which always checksum on 4 octet boundaries. |
12 | */ | 12 | */ |
13 | extern unsigned short ip_fast_csum (unsigned char * iph, unsigned int ihl); | 13 | extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl); |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Computes the checksum of the TCP/UDP pseudo-header returns a 16-bit | 16 | * Computes the checksum of the TCP/UDP pseudo-header returns a 16-bit |
17 | * checksum, already complemented | 17 | * checksum, already complemented |
18 | */ | 18 | */ |
19 | extern unsigned short int csum_tcpudp_magic (unsigned long saddr, | 19 | extern __sum16 csum_tcpudp_magic (__be32 saddr, __be32 daddr, |
20 | unsigned long daddr, | ||
21 | unsigned short len, | 20 | unsigned short len, |
22 | unsigned short proto, | 21 | unsigned short proto, |
23 | unsigned int sum); | 22 | __wsum sum); |
24 | 23 | ||
25 | extern unsigned int csum_tcpudp_nofold (unsigned long saddr, | 24 | extern __wsum csum_tcpudp_nofold (__be32 saddr, __be32 daddr, |
26 | unsigned long daddr, | ||
27 | unsigned short len, | 25 | unsigned short len, |
28 | unsigned short proto, | 26 | unsigned short proto, |
29 | unsigned int sum); | 27 | __wsum sum); |
30 | 28 | ||
31 | /* | 29 | /* |
32 | * Computes the checksum of a memory block at buff, length len, | 30 | * Computes the checksum of a memory block at buff, length len, |
@@ -40,8 +38,7 @@ extern unsigned int csum_tcpudp_nofold (unsigned long saddr, | |||
40 | * | 38 | * |
41 | * it's best to have buff aligned on a 32-bit boundary | 39 | * it's best to have buff aligned on a 32-bit boundary |
42 | */ | 40 | */ |
43 | extern unsigned int csum_partial (const unsigned char * buff, int len, | 41 | extern __wsum csum_partial(const void *buff, int len, __wsum sum); |
44 | unsigned int sum); | ||
45 | 42 | ||
46 | /* | 43 | /* |
47 | * Same as csum_partial, but copies from src while it checksums. | 44 | * Same as csum_partial, but copies from src while it checksums. |
@@ -49,28 +46,34 @@ extern unsigned int csum_partial (const unsigned char * buff, int len, | |||
49 | * Here it is even more important to align src and dst on a 32-bit (or | 46 | * Here it is even more important to align src and dst on a 32-bit (or |
50 | * even better 64-bit) boundary. | 47 | * even better 64-bit) boundary. |
51 | */ | 48 | */ |
52 | extern unsigned int csum_partial_copy_from_user (const char *src, char *dst, | 49 | extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, |
53 | int len, unsigned int sum, | 50 | int len, __wsum sum, |
54 | int *errp); | 51 | int *errp); |
55 | 52 | ||
56 | extern unsigned int csum_partial_copy_nocheck (const char *src, char *dst, | 53 | extern __wsum csum_partial_copy_nocheck(const void *src, void *dst, |
57 | int len, unsigned int sum); | 54 | int len, __wsum sum); |
58 | 55 | ||
59 | /* | 56 | /* |
60 | * This routine is used for miscellaneous IP-like checksums, mainly in | 57 | * This routine is used for miscellaneous IP-like checksums, mainly in |
61 | * icmp.c | 58 | * icmp.c |
62 | */ | 59 | */ |
63 | extern unsigned short ip_compute_csum (unsigned char *buff, int len); | 60 | extern __sum16 ip_compute_csum(const void *buff, int len); |
64 | 61 | ||
65 | /* | 62 | /* |
66 | * Fold a partial checksum without adding pseudo headers. | 63 | * Fold a partial checksum without adding pseudo headers. |
67 | */ | 64 | */ |
68 | static inline unsigned short | 65 | static inline __sum16 csum_fold(__wsum csum) |
69 | csum_fold (unsigned int sum) | ||
70 | { | 66 | { |
67 | u32 sum = (__force u32)csum; | ||
71 | sum = (sum & 0xffff) + (sum >> 16); | 68 | sum = (sum & 0xffff) + (sum >> 16); |
72 | sum = (sum & 0xffff) + (sum >> 16); | 69 | sum = (sum & 0xffff) + (sum >> 16); |
73 | return ~sum; | 70 | return (__force __sum16)~sum; |
74 | } | 71 | } |
75 | 72 | ||
73 | #define _HAVE_ARCH_IPV6_CSUM 1 | ||
74 | struct in6_addr; | ||
75 | extern 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 | |||
76 | #endif /* _ASM_IA64_CHECKSUM_H */ | 79 | #endif /* _ASM_IA64_CHECKSUM_H */ |
diff --git a/include/asm-ia64/device.h b/include/asm-ia64/device.h new file mode 100644 index 000000000000..3db6daf7f251 --- /dev/null +++ b/include/asm-ia64/device.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #ifndef _ASM_IA64_DEVICE_H | ||
7 | #define _ASM_IA64_DEVICE_H | ||
8 | |||
9 | struct dev_archdata { | ||
10 | #ifdef CONFIG_ACPI | ||
11 | void *acpi_handle; | ||
12 | #endif | ||
13 | }; | ||
14 | |||
15 | #endif /* _ASM_IA64_DEVICE_H */ | ||
diff --git a/include/asm-ia64/dma-mapping.h b/include/asm-ia64/dma-mapping.h index 99a8f8e1218c..ebd5887f4b1a 100644 --- a/include/asm-ia64/dma-mapping.h +++ b/include/asm-ia64/dma-mapping.h | |||
@@ -50,7 +50,8 @@ dma_set_mask (struct device *dev, u64 mask) | |||
50 | extern int dma_get_cache_alignment(void); | 50 | extern int dma_get_cache_alignment(void); |
51 | 51 | ||
52 | static inline void | 52 | static inline void |
53 | dma_cache_sync (void *vaddr, size_t size, enum dma_data_direction dir) | 53 | dma_cache_sync (struct device *dev, void *vaddr, size_t size, |
54 | enum dma_data_direction dir) | ||
54 | { | 55 | { |
55 | /* | 56 | /* |
56 | * IA-64 is cache-coherent, so this is mostly a no-op. However, we do need to | 57 | * IA-64 is cache-coherent, so this is mostly a no-op. However, we do need to |
@@ -59,6 +60,6 @@ dma_cache_sync (void *vaddr, size_t size, enum dma_data_direction dir) | |||
59 | mb(); | 60 | mb(); |
60 | } | 61 | } |
61 | 62 | ||
62 | #define dma_is_consistent(dma_handle) (1) /* all we do is coherent memory... */ | 63 | #define dma_is_consistent(d, h) (1) /* all we do is coherent memory... */ |
63 | 64 | ||
64 | #endif /* _ASM_IA64_DMA_MAPPING_H */ | 65 | #endif /* _ASM_IA64_DMA_MAPPING_H */ |
diff --git a/include/asm-ia64/futex.h b/include/asm-ia64/futex.h index 07d77f3a8cbe..8a98a2654139 100644 --- a/include/asm-ia64/futex.h +++ b/include/asm-ia64/futex.h | |||
@@ -59,7 +59,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
59 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | 59 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) |
60 | return -EFAULT; | 60 | return -EFAULT; |
61 | 61 | ||
62 | inc_preempt_count(); | 62 | pagefault_disable(); |
63 | 63 | ||
64 | switch (op) { | 64 | switch (op) { |
65 | case FUTEX_OP_SET: | 65 | case FUTEX_OP_SET: |
@@ -83,7 +83,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
83 | ret = -ENOSYS; | 83 | ret = -ENOSYS; |
84 | } | 84 | } |
85 | 85 | ||
86 | dec_preempt_count(); | 86 | pagefault_enable(); |
87 | 87 | ||
88 | if (!ret) { | 88 | if (!ret) { |
89 | switch (cmp) { | 89 | switch (cmp) { |
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index 43bfff6c6b87..6311e168cd34 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -32,7 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #define IO_SPACE_LIMIT 0xffffffffffffffffUL | 33 | #define IO_SPACE_LIMIT 0xffffffffffffffffUL |
34 | 34 | ||
35 | #define MAX_IO_SPACES_BITS 4 | 35 | #define MAX_IO_SPACES_BITS 8 |
36 | #define MAX_IO_SPACES (1UL << MAX_IO_SPACES_BITS) | 36 | #define MAX_IO_SPACES (1UL << MAX_IO_SPACES_BITS) |
37 | #define IO_SPACE_BITS 24 | 37 | #define IO_SPACE_BITS 24 |
38 | #define IO_SPACE_SIZE (1UL << IO_SPACE_BITS) | 38 | #define IO_SPACE_SIZE (1UL << IO_SPACE_BITS) |
@@ -417,6 +417,8 @@ __writeq (unsigned long val, volatile void __iomem *addr) | |||
417 | # define outl_p outl | 417 | # define outl_p outl |
418 | #endif | 418 | #endif |
419 | 419 | ||
420 | # ifdef __KERNEL__ | ||
421 | |||
420 | extern void __iomem * ioremap(unsigned long offset, unsigned long size); | 422 | extern void __iomem * ioremap(unsigned long offset, unsigned long size); |
421 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); | 423 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); |
422 | 424 | ||
@@ -430,8 +432,6 @@ iounmap (volatile void __iomem *addr) | |||
430 | #define dmi_iounmap(x,l) iounmap(x) | 432 | #define dmi_iounmap(x,l) iounmap(x) |
431 | #define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) | 433 | #define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) |
432 | 434 | ||
433 | # ifdef __KERNEL__ | ||
434 | |||
435 | /* | 435 | /* |
436 | * String version of IO memory access ops: | 436 | * String version of IO memory access ops: |
437 | */ | 437 | */ |
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 7ffbddf5306f..a3891eb3f217 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -36,6 +36,8 @@ typedef int ia64_mv_pci_legacy_read_t (struct pci_bus *, u16 port, u32 *val, | |||
36 | typedef int ia64_mv_pci_legacy_write_t (struct pci_bus *, u16 port, u32 val, | 36 | 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 *); | ||
40 | typedef void ia64_mv_kernel_launch_event_t(void); | ||
39 | 41 | ||
40 | /* DMA-mapping interface: */ | 42 | /* DMA-mapping interface: */ |
41 | typedef void ia64_mv_dma_init (void); | 43 | typedef void ia64_mv_dma_init (void); |
@@ -95,6 +97,11 @@ machvec_noop_task (struct task_struct *task) | |||
95 | { | 97 | { |
96 | } | 98 | } |
97 | 99 | ||
100 | static inline void | ||
101 | machvec_noop_bus (struct pci_bus *bus) | ||
102 | { | ||
103 | } | ||
104 | |||
98 | extern void machvec_setup (char **); | 105 | extern void machvec_setup (char **); |
99 | extern void machvec_timer_interrupt (int, void *); | 106 | extern void machvec_timer_interrupt (int, void *); |
100 | extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int); | 107 | extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int); |
@@ -159,6 +166,7 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); | |||
159 | # define platform_migrate ia64_mv.migrate | 166 | # define platform_migrate ia64_mv.migrate |
160 | # define platform_setup_msi_irq ia64_mv.setup_msi_irq | 167 | # define platform_setup_msi_irq ia64_mv.setup_msi_irq |
161 | # define platform_teardown_msi_irq ia64_mv.teardown_msi_irq | 168 | # define platform_teardown_msi_irq ia64_mv.teardown_msi_irq |
169 | # define platform_pci_fixup_bus ia64_mv.pci_fixup_bus | ||
162 | # endif | 170 | # endif |
163 | 171 | ||
164 | /* __attribute__((__aligned__(16))) is required to make size of the | 172 | /* __attribute__((__aligned__(16))) is required to make size of the |
@@ -210,6 +218,8 @@ struct ia64_machine_vector { | |||
210 | ia64_mv_migrate_t *migrate; | 218 | ia64_mv_migrate_t *migrate; |
211 | ia64_mv_setup_msi_irq_t *setup_msi_irq; | 219 | ia64_mv_setup_msi_irq_t *setup_msi_irq; |
212 | ia64_mv_teardown_msi_irq_t *teardown_msi_irq; | 220 | ia64_mv_teardown_msi_irq_t *teardown_msi_irq; |
221 | ia64_mv_pci_fixup_bus_t *pci_fixup_bus; | ||
222 | ia64_mv_kernel_launch_event_t *kernel_launch_event; | ||
213 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ | 223 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ |
214 | 224 | ||
215 | #define MACHVEC_INIT(name) \ | 225 | #define MACHVEC_INIT(name) \ |
@@ -257,6 +267,7 @@ struct ia64_machine_vector { | |||
257 | platform_migrate, \ | 267 | platform_migrate, \ |
258 | platform_setup_msi_irq, \ | 268 | platform_setup_msi_irq, \ |
259 | platform_teardown_msi_irq, \ | 269 | platform_teardown_msi_irq, \ |
270 | platform_pci_fixup_bus, \ | ||
260 | } | 271 | } |
261 | 272 | ||
262 | extern struct ia64_machine_vector ia64_mv; | 273 | extern struct ia64_machine_vector ia64_mv; |
@@ -309,6 +320,9 @@ extern ia64_mv_dma_supported swiotlb_dma_supported; | |||
309 | #ifndef platform_tlb_migrate_finish | 320 | #ifndef platform_tlb_migrate_finish |
310 | # define platform_tlb_migrate_finish machvec_noop_mm | 321 | # define platform_tlb_migrate_finish machvec_noop_mm |
311 | #endif | 322 | #endif |
323 | #ifndef platform_kernel_launch_event | ||
324 | # define platform_kernel_launch_event machvec_noop | ||
325 | #endif | ||
312 | #ifndef platform_dma_init | 326 | #ifndef platform_dma_init |
313 | # define platform_dma_init swiotlb_init | 327 | # define platform_dma_init swiotlb_init |
314 | #endif | 328 | #endif |
@@ -416,5 +430,8 @@ extern int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size | |||
416 | #ifndef platform_teardown_msi_irq | 430 | #ifndef platform_teardown_msi_irq |
417 | # define platform_teardown_msi_irq ((ia64_mv_teardown_msi_irq_t*)NULL) | 431 | # define platform_teardown_msi_irq ((ia64_mv_teardown_msi_irq_t*)NULL) |
418 | #endif | 432 | #endif |
433 | #ifndef platform_pci_fixup_bus | ||
434 | # define platform_pci_fixup_bus machvec_noop_bus | ||
435 | #endif | ||
419 | 436 | ||
420 | #endif /* _ASM_IA64_MACHVEC_H */ | 437 | #endif /* _ASM_IA64_MACHVEC_H */ |
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h index c54b165b1c17..eaa2fce0fecd 100644 --- a/include/asm-ia64/machvec_sn2.h +++ b/include/asm-ia64/machvec_sn2.h | |||
@@ -67,8 +67,10 @@ 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; |
73 | extern ia64_mv_pci_fixup_bus_t sn_pci_fixup_bus; | ||
72 | 74 | ||
73 | 75 | ||
74 | /* | 76 | /* |
@@ -120,6 +122,7 @@ extern ia64_mv_teardown_msi_irq_t sn_teardown_msi_irq; | |||
120 | #define platform_dma_mapping_error sn_dma_mapping_error | 122 | #define platform_dma_mapping_error sn_dma_mapping_error |
121 | #define platform_dma_supported sn_dma_supported | 123 | #define platform_dma_supported sn_dma_supported |
122 | #define platform_migrate sn_migrate | 124 | #define platform_migrate sn_migrate |
125 | #define platform_kernel_launch_event sn_kernel_launch_event | ||
123 | #ifdef CONFIG_PCI_MSI | 126 | #ifdef CONFIG_PCI_MSI |
124 | #define platform_setup_msi_irq sn_setup_msi_irq | 127 | #define platform_setup_msi_irq sn_setup_msi_irq |
125 | #define platform_teardown_msi_irq sn_teardown_msi_irq | 128 | #define platform_teardown_msi_irq sn_teardown_msi_irq |
@@ -127,6 +130,7 @@ extern ia64_mv_teardown_msi_irq_t sn_teardown_msi_irq; | |||
127 | #define platform_setup_msi_irq ((ia64_mv_setup_msi_irq_t*)NULL) | 130 | #define platform_setup_msi_irq ((ia64_mv_setup_msi_irq_t*)NULL) |
128 | #define platform_teardown_msi_irq ((ia64_mv_teardown_msi_irq_t*)NULL) | 131 | #define platform_teardown_msi_irq ((ia64_mv_teardown_msi_irq_t*)NULL) |
129 | #endif | 132 | #endif |
133 | #define platform_pci_fixup_bus sn_pci_fixup_bus | ||
130 | 134 | ||
131 | #include <asm/sn/io.h> | 135 | #include <asm/sn/io.h> |
132 | 136 | ||
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/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 |
103 | extern int ia64_pfn_valid (unsigned long pfn); | 103 | extern 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 2c8fd92d0ece..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 */ |
107 | typedef u64 pal_cache_level_t; | 117 | typedef 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 | */ |
@@ -764,7 +778,7 @@ struct ia64_pal_retval { | |||
764 | * (generally 0) MUST be passed. Reserved parameters are not optional | 778 | * (generally 0) MUST be passed. Reserved parameters are not optional |
765 | * parameters. | 779 | * parameters. |
766 | */ | 780 | */ |
767 | extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64, u64); | 781 | extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64); |
768 | extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64); | 782 | extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64); |
769 | extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64); | 783 | extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64); |
770 | extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64); | 784 | extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64); |
@@ -774,14 +788,7 @@ extern void ia64_load_scratch_fpregs (struct ia64_fpreg *); | |||
774 | #define PAL_CALL(iprv,a0,a1,a2,a3) do { \ | 788 | #define PAL_CALL(iprv,a0,a1,a2,a3) do { \ |
775 | struct ia64_fpreg fr[6]; \ | 789 | struct ia64_fpreg fr[6]; \ |
776 | ia64_save_scratch_fpregs(fr); \ | 790 | ia64_save_scratch_fpregs(fr); \ |
777 | iprv = ia64_pal_call_static(a0, a1, a2, a3, 0); \ | 791 | iprv = ia64_pal_call_static(a0, a1, a2, a3); \ |
778 | ia64_load_scratch_fpregs(fr); \ | ||
779 | } while (0) | ||
780 | |||
781 | #define PAL_CALL_IC_OFF(iprv,a0,a1,a2,a3) do { \ | ||
782 | struct ia64_fpreg fr[6]; \ | ||
783 | ia64_save_scratch_fpregs(fr); \ | ||
784 | iprv = ia64_pal_call_static(a0, a1, a2, a3, 1); \ | ||
785 | ia64_load_scratch_fpregs(fr); \ | 792 | ia64_load_scratch_fpregs(fr); \ |
786 | } while (0) | 793 | } while (0) |
787 | 794 | ||
@@ -841,7 +848,9 @@ typedef union pal_bus_features_u { | |||
841 | u64 pbf_req_bus_parking : 1; | 848 | u64 pbf_req_bus_parking : 1; |
842 | u64 pbf_bus_lock_mask : 1; | 849 | u64 pbf_bus_lock_mask : 1; |
843 | u64 pbf_enable_half_xfer_rate : 1; | 850 | u64 pbf_enable_half_xfer_rate : 1; |
844 | 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; | ||
845 | u64 pbf_disable_xaction_queueing : 1; | 854 | u64 pbf_disable_xaction_queueing : 1; |
846 | u64 pbf_disable_resp_err_check : 1; | 855 | u64 pbf_disable_resp_err_check : 1; |
847 | u64 pbf_disable_berr_check : 1; | 856 | u64 pbf_disable_berr_check : 1; |
@@ -1084,6 +1093,24 @@ ia64_pal_freq_ratios (struct pal_freq_ratio *proc_ratio, struct pal_freq_ratio * | |||
1084 | return iprv.status; | 1093 | return iprv.status; |
1085 | } | 1094 | } |
1086 | 1095 | ||
1096 | /* | ||
1097 | * Get the current hardware resource sharing policy of the processor | ||
1098 | */ | ||
1099 | static inline s64 | ||
1100 | ia64_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 | |||
1087 | /* 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 |
1088 | * power states where prefetching and execution are suspended and cache and | 1115 | * power states where prefetching and execution are suspended and cache and |
1089 | * TLB coherency is not maintained. | 1116 | * TLB coherency is not maintained. |
@@ -1119,10 +1146,10 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf) | |||
1119 | 1146 | ||
1120 | /* Get the current P-state information */ | 1147 | /* Get the current P-state information */ |
1121 | static inline s64 | 1148 | static inline s64 |
1122 | ia64_pal_get_pstate (u64 *pstate_index) | 1149 | ia64_pal_get_pstate (u64 *pstate_index, unsigned long type) |
1123 | { | 1150 | { |
1124 | struct ia64_pal_retval iprv; | 1151 | struct ia64_pal_retval iprv; |
1125 | PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0); | 1152 | PAL_CALL_STK(iprv, PAL_GET_PSTATE, type, 0, 0); |
1126 | *pstate_index = iprv.v0; | 1153 | *pstate_index = iprv.v0; |
1127 | return iprv.status; | 1154 | return iprv.status; |
1128 | } | 1155 | } |
@@ -1408,6 +1435,17 @@ ia64_pal_rse_info (u64 *num_phys_stacked, pal_hints_u_t *hints) | |||
1408 | return iprv.status; | 1435 | return iprv.status; |
1409 | } | 1436 | } |
1410 | 1437 | ||
1438 | /* | ||
1439 | * Set the current hardware resource sharing policy of the processor | ||
1440 | */ | ||
1441 | static inline s64 | ||
1442 | ia64_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 | |||
1411 | /* 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 |
1412 | * suspended, but cause cache and TLB coherency to be maintained. | 1450 | * suspended, but cause cache and TLB coherency to be maintained. |
1413 | * This is usually called in IA-32 mode. | 1451 | * This is usually called in IA-32 mode. |
@@ -1531,12 +1569,15 @@ typedef union pal_vm_info_1_u { | |||
1531 | } pal_vm_info_1_s; | 1569 | } pal_vm_info_1_s; |
1532 | } pal_vm_info_1_u_t; | 1570 | } pal_vm_info_1_u_t; |
1533 | 1571 | ||
1572 | #define PAL_MAX_PURGES 0xFFFF /* all ones is means unlimited */ | ||
1573 | |||
1534 | typedef union pal_vm_info_2_u { | 1574 | typedef union pal_vm_info_2_u { |
1535 | u64 pvi2_val; | 1575 | u64 pvi2_val; |
1536 | struct { | 1576 | struct { |
1537 | u64 impl_va_msb : 8, | 1577 | u64 impl_va_msb : 8, |
1538 | rid_size : 8, | 1578 | rid_size : 8, |
1539 | reserved : 48; | 1579 | max_purges : 16, |
1580 | reserved : 32; | ||
1540 | } pal_vm_info_2_s; | 1581 | } pal_vm_info_2_s; |
1541 | } pal_vm_info_2_u_t; | 1582 | } pal_vm_info_2_u_t; |
1542 | 1583 | ||
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h index ef616fd4cb1b..825eb7d882e6 100644 --- a/include/asm-ia64/pci.h +++ b/include/asm-ia64/pci.h | |||
@@ -26,16 +26,18 @@ void pcibios_config_init(void); | |||
26 | struct pci_dev; | 26 | struct pci_dev; |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * PCI_DMA_BUS_IS_PHYS should be set to 1 if there is _necessarily_ a direct correspondence | 29 | * PCI_DMA_BUS_IS_PHYS should be set to 1 if there is _necessarily_ a direct |
30 | * between device bus addresses and CPU physical addresses. Platforms with a hardware I/O | 30 | * correspondence between device bus addresses and CPU physical addresses. |
31 | * MMU _must_ turn this off to suppress the bounce buffer handling code in the block and | 31 | * Platforms with a hardware I/O MMU _must_ turn this off to suppress the |
32 | * network device layers. Platforms with separate bus address spaces _must_ turn this off | 32 | * bounce buffer handling code in the block and network device layers. |
33 | * and provide a device DMA mapping implementation that takes care of the necessary | 33 | * Platforms with separate bus address spaces _must_ turn this off and provide |
34 | * a device DMA mapping implementation that takes care of the necessary | ||
34 | * address translation. | 35 | * address translation. |
35 | * | 36 | * |
36 | * For now, the ia64 platforms which may have separate/multiple bus address spaces all | 37 | * For now, the ia64 platforms which may have separate/multiple bus address |
37 | * have I/O MMUs which support the merging of physically discontiguous buffers, so we can | 38 | * spaces all have I/O MMUs which support the merging of physically |
38 | * use that as the sole factor to determine the setting of PCI_DMA_BUS_IS_PHYS. | 39 | * discontiguous buffers, so we can use that as the sole factor to determine |
40 | * the setting of PCI_DMA_BUS_IS_PHYS. | ||
39 | */ | 41 | */ |
40 | extern unsigned long ia64_max_iommu_merge_mask; | 42 | extern unsigned long ia64_max_iommu_merge_mask; |
41 | #define PCI_DMA_BUS_IS_PHYS (ia64_max_iommu_merge_mask == ~0UL) | 43 | #define PCI_DMA_BUS_IS_PHYS (ia64_max_iommu_merge_mask == ~0UL) |
@@ -52,9 +54,6 @@ pcibios_penalize_isa_irq (int irq, int active) | |||
52 | /* We don't do dynamic PCI IRQ allocation */ | 54 | /* We don't do dynamic PCI IRQ allocation */ |
53 | } | 55 | } |
54 | 56 | ||
55 | #define HAVE_ARCH_PCI_MWI 1 | ||
56 | extern int pcibios_prep_mwi (struct pci_dev *); | ||
57 | |||
58 | #include <asm-generic/pci-dma-compat.h> | 57 | #include <asm-generic/pci-dma-compat.h> |
59 | 58 | ||
60 | /* pci_unmap_{single,page} is not a nop, thus... */ | 59 | /* pci_unmap_{single,page} is not a nop, thus... */ |
diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h index 9cb68e9b377e..393e04c42a2c 100644 --- a/include/asm-ia64/pgalloc.h +++ b/include/asm-ia64/pgalloc.h | |||
@@ -60,7 +60,7 @@ static inline void *pgtable_quicklist_alloc(void) | |||
60 | static inline void pgtable_quicklist_free(void *pgtable_entry) | 60 | static inline void pgtable_quicklist_free(void *pgtable_entry) |
61 | { | 61 | { |
62 | #ifdef CONFIG_NUMA | 62 | #ifdef CONFIG_NUMA |
63 | unsigned long nid = page_to_nid(virt_to_page(pgtable_entry)); | 63 | int nid = page_to_nid(virt_to_page(pgtable_entry)); |
64 | 64 | ||
65 | if (unlikely(nid != numa_node_id())) { | 65 | if (unlikely(nid != numa_node_id())) { |
66 | free_page((unsigned long)pgtable_entry); | 66 | free_page((unsigned long)pgtable_entry); |
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h index 0b210abbe003..d000689d9142 100644 --- a/include/asm-ia64/sal.h +++ b/include/asm-ia64/sal.h | |||
@@ -659,6 +659,7 @@ ia64_sal_freq_base (unsigned long which, unsigned long *ticks_per_second, | |||
659 | } | 659 | } |
660 | 660 | ||
661 | extern s64 ia64_sal_cache_flush (u64 cache_type); | 661 | extern s64 ia64_sal_cache_flush (u64 cache_type); |
662 | extern void __init check_sal_cache_flush (void); | ||
662 | 663 | ||
663 | /* Initialize all the processor and platform level instruction and data caches */ | 664 | /* Initialize all the processor and platform level instruction and data caches */ |
664 | static inline s64 | 665 | static inline s64 |
diff --git a/include/asm-ia64/sn/acpi.h b/include/asm-ia64/sn/acpi.h new file mode 100644 index 000000000000..2850a7ef5e71 --- /dev/null +++ b/include/asm-ia64/sn/acpi.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_IA64_SN_ACPI_H | ||
10 | #define _ASM_IA64_SN_ACPI_H | ||
11 | |||
12 | #include "acpi/acglobal.h" | ||
13 | |||
14 | #define SN_ACPI_BASE_SUPPORT() (acpi_gbl_DSDT->oem_revision >= 0x20101) | ||
15 | |||
16 | #endif /* _ASM_IA64_SN_ACPI_H */ | ||
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h index 1d9efe541662..e715c794b186 100644 --- a/include/asm-ia64/sn/addrs.h +++ b/include/asm-ia64/sn/addrs.h | |||
@@ -136,9 +136,13 @@ | |||
136 | */ | 136 | */ |
137 | #define TO_PHYS(x) (TO_PHYS_MASK & (x)) | 137 | #define TO_PHYS(x) (TO_PHYS_MASK & (x)) |
138 | #define TO_CAC(x) (CAC_BASE | TO_PHYS(x)) | 138 | #define TO_CAC(x) (CAC_BASE | TO_PHYS(x)) |
139 | #ifdef CONFIG_SGI_SN | ||
139 | #define TO_AMO(x) (AMO_BASE | TO_PHYS(x)) | 140 | #define TO_AMO(x) (AMO_BASE | TO_PHYS(x)) |
140 | #define TO_GET(x) (GET_BASE | TO_PHYS(x)) | 141 | #define TO_GET(x) (GET_BASE | TO_PHYS(x)) |
141 | 142 | #else | |
143 | #define TO_AMO(x) ({ BUG(); x; }) | ||
144 | #define TO_GET(x) ({ BUG(); x; }) | ||
145 | #endif | ||
142 | 146 | ||
143 | /* | 147 | /* |
144 | * Covert from processor physical address to II/TIO physical address: | 148 | * Covert from processor physical address to II/TIO physical address: |
diff --git a/include/asm-ia64/sn/pcidev.h b/include/asm-ia64/sn/pcidev.h index eac3561574be..9fe89a93d880 100644 --- a/include/asm-ia64/sn/pcidev.h +++ b/include/asm-ia64/sn/pcidev.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992 - 1997, 2000-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SN_PCI_PCIDEV_H | 8 | #ifndef _ASM_IA64_SN_PCI_PCIDEV_H |
9 | #define _ASM_IA64_SN_PCI_PCIDEV_H | 9 | #define _ASM_IA64_SN_PCI_PCIDEV_H |
@@ -12,31 +12,29 @@ | |||
12 | 12 | ||
13 | /* | 13 | /* |
14 | * In ia64, pci_dev->sysdata must be a *pci_controller. To provide access to | 14 | * In ia64, pci_dev->sysdata must be a *pci_controller. To provide access to |
15 | * the pcidev_info structs for all devices under a controller, we extend the | 15 | * the pcidev_info structs for all devices under a controller, we keep a |
16 | * definition of pci_controller, via sn_pci_controller, to include a list | 16 | * list of pcidev_info under pci_controller->platform_data. |
17 | * of pcidev_info. | ||
18 | */ | 17 | */ |
19 | struct sn_pci_controller { | 18 | struct sn_platform_data { |
20 | struct pci_controller pci_controller; | 19 | void *provider_soft; |
21 | struct list_head pcidev_info; | 20 | struct list_head pcidev_info; |
22 | }; | 21 | }; |
23 | 22 | ||
24 | #define SN_PCI_CONTROLLER(dev) ((struct sn_pci_controller *) dev->sysdata) | 23 | #define SN_PLATFORM_DATA(busdev) \ |
24 | ((struct sn_platform_data *)(PCI_CONTROLLER(busdev)->platform_data)) | ||
25 | 25 | ||
26 | #define SN_PCIDEV_INFO(dev) sn_pcidev_info_get(dev) | 26 | #define SN_PCIDEV_INFO(dev) sn_pcidev_info_get(dev) |
27 | 27 | ||
28 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ | ||
29 | (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | ||
30 | /* | 28 | /* |
31 | * Given a pci_bus, return the sn pcibus_bussoft struct. Note that | 29 | * Given a pci_bus, return the sn pcibus_bussoft struct. Note that |
32 | * this only works for root busses, not for busses represented by PPB's. | 30 | * this only works for root busses, not for busses represented by PPB's. |
33 | */ | 31 | */ |
34 | 32 | ||
35 | #define SN_PCIBUS_BUSSOFT(pci_bus) \ | 33 | #define SN_PCIBUS_BUSSOFT(pci_bus) \ |
36 | ((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | 34 | ((struct pcibus_bussoft *)(SN_PLATFORM_DATA(pci_bus)->provider_soft)) |
37 | 35 | ||
38 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ | 36 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ |
39 | (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | 37 | ((struct pcibus_info *)(SN_PLATFORM_DATA(pci_bus)->provider_soft)) |
40 | /* | 38 | /* |
41 | * Given a struct pci_dev, return the sn pcibus_bussoft struct. Note | 39 | * Given a struct pci_dev, return the sn pcibus_bussoft struct. Note |
42 | * that this is not equivalent to SN_PCIBUS_BUSSOFT(pci_dev->bus) due | 40 | * that this is not equivalent to SN_PCIBUS_BUSSOFT(pci_dev->bus) due |
@@ -72,8 +70,6 @@ extern void sn_irq_fixup(struct pci_dev *pci_dev, | |||
72 | struct sn_irq_info *sn_irq_info); | 70 | struct sn_irq_info *sn_irq_info); |
73 | extern void sn_irq_unfixup(struct pci_dev *pci_dev); | 71 | extern void sn_irq_unfixup(struct pci_dev *pci_dev); |
74 | extern struct pcidev_info * sn_pcidev_info_get(struct pci_dev *); | 72 | extern struct pcidev_info * sn_pcidev_info_get(struct pci_dev *); |
75 | extern void sn_pci_controller_fixup(int segment, int busnum, | ||
76 | struct pci_bus *bus); | ||
77 | extern void sn_bus_store_sysdata(struct pci_dev *dev); | 73 | extern void sn_bus_store_sysdata(struct pci_dev *dev); |
78 | extern void sn_bus_free_sysdata(void); | 74 | extern void sn_bus_free_sysdata(void); |
79 | extern void sn_generate_path(struct pci_bus *pci_bus, char *address); | 75 | extern void sn_generate_path(struct pci_bus *pci_bus, char *address); |
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h index 30dcfa442e53..bfdc36273ed4 100644 --- a/include/asm-ia64/sn/sn_feature_sets.h +++ b/include/asm-ia64/sn/sn_feature_sets.h | |||
@@ -44,8 +44,14 @@ extern int sn_prom_feature_available(int id); | |||
44 | * Once enabled, a feature cannot be disabled. | 44 | * Once enabled, a feature cannot be disabled. |
45 | * | 45 | * |
46 | * By default, features are disabled unless explicitly enabled. | 46 | * By default, features are disabled unless explicitly enabled. |
47 | * | ||
48 | * These defines must be kept in sync with the corresponding | ||
49 | * PROM definitions in feature_sets.h. | ||
47 | */ | 50 | */ |
48 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 | 51 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 |
49 | #define OSF_FEAT_LOG_SBES 1 | 52 | #define OSF_FEAT_LOG_SBES 1 |
53 | #define OSF_ACPI_ENABLE 2 | ||
54 | #define OSF_PCISEGMENT_ENABLE 3 | ||
55 | |||
50 | 56 | ||
51 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ | 57 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index ba826b3f75bb..2c4004eb5a68 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -77,6 +77,7 @@ | |||
77 | #define SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST 0x02000058 // deprecated | 77 | #define SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST 0x02000058 // deprecated |
78 | #define SN_SAL_IOIF_GET_DEVICE_DMAFLUSH_LIST 0x0200005a | 78 | #define SN_SAL_IOIF_GET_DEVICE_DMAFLUSH_LIST 0x0200005a |
79 | 79 | ||
80 | #define SN_SAL_IOIF_INIT 0x0200005f | ||
80 | #define SN_SAL_HUB_ERROR_INTERRUPT 0x02000060 | 81 | #define SN_SAL_HUB_ERROR_INTERRUPT 0x02000060 |
81 | #define SN_SAL_BTE_RECOVER 0x02000061 | 82 | #define SN_SAL_BTE_RECOVER 0x02000061 |
82 | #define SN_SAL_RESERVED_DO_NOT_USE 0x02000062 | 83 | #define SN_SAL_RESERVED_DO_NOT_USE 0x02000062 |
@@ -87,6 +88,8 @@ | |||
87 | #define SN_SAL_INJECT_ERROR 0x02000067 | 88 | #define SN_SAL_INJECT_ERROR 0x02000067 |
88 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 | 89 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 |
89 | 90 | ||
91 | #define SN_SAL_KERNEL_LAUNCH_EVENT 0x02000069 | ||
92 | |||
90 | /* | 93 | /* |
91 | * Service-specific constants | 94 | * Service-specific constants |
92 | */ | 95 | */ |
@@ -1154,4 +1157,11 @@ ia64_sn_set_cpu_number(int cpu) | |||
1154 | 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); |
1155 | return rv.status; | 1158 | return rv.status; |
1156 | } | 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 | } | ||
1157 | #endif /* _ASM_IA64_SN_SN_SAL_H */ | 1167 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |
diff --git a/include/asm-ia64/termbits.h b/include/asm-ia64/termbits.h index b9e843f7dc42..4531a511bde5 100644 --- a/include/asm-ia64/termbits.h +++ b/include/asm-ia64/termbits.h | |||
@@ -26,6 +26,17 @@ struct termios { | |||
26 | cc_t c_cc[NCCS]; /* control characters */ | 26 | cc_t c_cc[NCCS]; /* control characters */ |
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct ktermios { | ||
30 | tcflag_t c_iflag; /* input mode flags */ | ||
31 | tcflag_t c_oflag; /* output mode flags */ | ||
32 | tcflag_t c_cflag; /* control mode flags */ | ||
33 | tcflag_t c_lflag; /* local mode flags */ | ||
34 | cc_t c_line; /* line discipline */ | ||
35 | cc_t c_cc[NCCS]; /* control characters */ | ||
36 | speed_t c_ispeed; /* input speed */ | ||
37 | speed_t c_ospeed; /* output speed */ | ||
38 | }; | ||
39 | |||
29 | /* c_cc characters */ | 40 | /* c_cc characters */ |
30 | #define VINTR 0 | 41 | #define VINTR 0 |
31 | #define VQUIT 1 | 42 | #define VQUIT 1 |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index a6e38565ab4c..22ed6749557e 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -101,6 +101,7 @@ void build_cpu_to_node_map(void); | |||
101 | .flags = SD_LOAD_BALANCE \ | 101 | .flags = SD_LOAD_BALANCE \ |
102 | | SD_BALANCE_EXEC \ | 102 | | SD_BALANCE_EXEC \ |
103 | | SD_BALANCE_FORK \ | 103 | | SD_BALANCE_FORK \ |
104 | | SD_SERIALIZE \ | ||
104 | | SD_WAKE_BALANCE, \ | 105 | | SD_WAKE_BALANCE, \ |
105 | .last_balance = jiffies, \ | 106 | .last_balance = jiffies, \ |
106 | .balance_interval = 64, \ | 107 | .balance_interval = 64, \ |
diff --git a/include/asm-ia64/uaccess.h b/include/asm-ia64/uaccess.h index 9adb51211c22..449c8c0fa2bd 100644 --- a/include/asm-ia64/uaccess.h +++ b/include/asm-ia64/uaccess.h | |||
@@ -389,7 +389,7 @@ xlate_dev_kmem_ptr (char * p) | |||
389 | struct page *page; | 389 | struct page *page; |
390 | char * ptr; | 390 | char * ptr; |
391 | 391 | ||
392 | page = virt_to_page((unsigned long)p >> PAGE_SHIFT); | 392 | page = virt_to_page((unsigned long)p); |
393 | if (PageUncached(page)) | 393 | if (PageUncached(page)) |
394 | ptr = (char *)__pa(p) + __IA64_UNCACHED_OFFSET; | 394 | ptr = (char *)__pa(p) + __IA64_UNCACHED_OFFSET; |
395 | else | 395 | else |