diff options
Diffstat (limited to 'include/asm-ia64')
39 files changed, 1291 insertions, 257 deletions
diff --git a/include/asm-ia64/break.h b/include/asm-ia64/break.h index 97c7b2d79600..8167828edc4b 100644 --- a/include/asm-ia64/break.h +++ b/include/asm-ia64/break.h | |||
@@ -12,6 +12,8 @@ | |||
12 | * OS-specific debug break numbers: | 12 | * OS-specific debug break numbers: |
13 | */ | 13 | */ |
14 | #define __IA64_BREAK_KDB 0x80100 | 14 | #define __IA64_BREAK_KDB 0x80100 |
15 | #define __IA64_BREAK_KPROBE 0x80200 | ||
16 | #define __IA64_BREAK_JPROBE 0x80300 | ||
15 | 17 | ||
16 | /* | 18 | /* |
17 | * OS-specific break numbers: | 19 | * OS-specific break numbers: |
diff --git a/include/asm-ia64/compat.h b/include/asm-ia64/compat.h index cc0ff0a4bdd0..0c05e5bad8a0 100644 --- a/include/asm-ia64/compat.h +++ b/include/asm-ia64/compat.h | |||
@@ -27,6 +27,7 @@ typedef u16 compat_ipc_pid_t; | |||
27 | typedef s32 compat_daddr_t; | 27 | typedef s32 compat_daddr_t; |
28 | typedef u32 compat_caddr_t; | 28 | typedef u32 compat_caddr_t; |
29 | typedef __kernel_fsid_t compat_fsid_t; | 29 | typedef __kernel_fsid_t compat_fsid_t; |
30 | typedef s32 compat_timer_t; | ||
30 | 31 | ||
31 | typedef s32 compat_int_t; | 32 | typedef s32 compat_int_t; |
32 | typedef s32 compat_long_t; | 33 | typedef s32 compat_long_t; |
diff --git a/include/asm-ia64/emergency-restart.h b/include/asm-ia64/emergency-restart.h new file mode 100644 index 000000000000..108d8c48e42e --- /dev/null +++ b/include/asm-ia64/emergency-restart.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/include/asm-ia64/fcntl.h b/include/asm-ia64/fcntl.h index d193981bb1d8..c9f8d835d0cc 100644 --- a/include/asm-ia64/fcntl.h +++ b/include/asm-ia64/fcntl.h | |||
@@ -81,4 +81,6 @@ struct flock { | |||
81 | 81 | ||
82 | #define F_LINUX_SPECIFIC_BASE 1024 | 82 | #define F_LINUX_SPECIFIC_BASE 1024 |
83 | 83 | ||
84 | #define force_o_largefile() ( ! (current->personality & PER_LINUX32) ) | ||
85 | |||
84 | #endif /* _ASM_IA64_FCNTL_H */ | 86 | #endif /* _ASM_IA64_FCNTL_H */ |
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h index cd4e06b74ab6..041ab8c51a64 100644 --- a/include/asm-ia64/hw_irq.h +++ b/include/asm-ia64/hw_irq.h | |||
@@ -81,7 +81,6 @@ extern __u8 isa_irq_to_vector_map[16]; | |||
81 | 81 | ||
82 | extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal interrupt controller */ | 82 | extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal interrupt controller */ |
83 | 83 | ||
84 | extern int assign_irq_vector_nopanic (int irq); /* allocate a free vector without panic */ | ||
85 | extern int assign_irq_vector (int irq); /* allocate a free vector */ | 84 | extern int assign_irq_vector (int irq); /* allocate a free vector */ |
86 | extern void free_irq_vector (int vector); | 85 | extern void free_irq_vector (int vector); |
87 | extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); | 86 | extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); |
diff --git a/include/asm-ia64/iosapic.h b/include/asm-ia64/iosapic.h index 38a7a72791cc..1093f35b3b90 100644 --- a/include/asm-ia64/iosapic.h +++ b/include/asm-ia64/iosapic.h | |||
@@ -71,8 +71,11 @@ static inline void iosapic_eoi(char __iomem *iosapic, u32 vector) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | extern void __init iosapic_system_init (int pcat_compat); | 73 | extern void __init iosapic_system_init (int pcat_compat); |
74 | extern void __init iosapic_init (unsigned long address, | 74 | extern int __devinit iosapic_init (unsigned long address, |
75 | unsigned int gsi_base); | 75 | unsigned int gsi_base); |
76 | #ifdef CONFIG_HOTPLUG | ||
77 | extern int iosapic_remove (unsigned int gsi_base); | ||
78 | #endif /* CONFIG_HOTPLUG */ | ||
76 | extern int gsi_to_vector (unsigned int gsi); | 79 | extern int gsi_to_vector (unsigned int gsi); |
77 | extern int gsi_to_irq (unsigned int gsi); | 80 | extern int gsi_to_irq (unsigned int gsi); |
78 | extern void iosapic_enable_intr (unsigned int vector); | 81 | extern void iosapic_enable_intr (unsigned int vector); |
@@ -94,11 +97,14 @@ extern unsigned int iosapic_version (char __iomem *addr); | |||
94 | 97 | ||
95 | extern void iosapic_pci_fixup (int); | 98 | extern void iosapic_pci_fixup (int); |
96 | #ifdef CONFIG_NUMA | 99 | #ifdef CONFIG_NUMA |
97 | extern void __init map_iosapic_to_node (unsigned int, int); | 100 | extern void __devinit map_iosapic_to_node (unsigned int, int); |
98 | #endif | 101 | #endif |
99 | #else | 102 | #else |
100 | #define iosapic_system_init(pcat_compat) do { } while (0) | 103 | #define iosapic_system_init(pcat_compat) do { } while (0) |
101 | #define iosapic_init(address,gsi_base) do { } while (0) | 104 | #define iosapic_init(address,gsi_base) (-EINVAL) |
105 | #ifdef CONFIG_HOTPLUG | ||
106 | #define iosapic_remove(gsi_base) (-ENODEV) | ||
107 | #endif /* CONFIG_HOTPLUG */ | ||
102 | #define iosapic_register_intr(gsi,polarity,trigger) (gsi) | 108 | #define iosapic_register_intr(gsi,polarity,trigger) (gsi) |
103 | #define iosapic_unregister_intr(irq) do { } while (0) | 109 | #define iosapic_unregister_intr(irq) do { } while (0) |
104 | #define iosapic_override_isa_irq(isa_irq,gsi,polarity,trigger) do { } while (0) | 110 | #define iosapic_override_isa_irq(isa_irq,gsi,polarity,trigger) do { } while (0) |
diff --git a/include/asm-ia64/kdebug.h b/include/asm-ia64/kdebug.h new file mode 100644 index 000000000000..4d376e1663f7 --- /dev/null +++ b/include/asm-ia64/kdebug.h | |||
@@ -0,0 +1,61 @@ | |||
1 | #ifndef _IA64_KDEBUG_H | ||
2 | #define _IA64_KDEBUG_H 1 | ||
3 | /* | ||
4 | * include/asm-ia64/kdebug.h | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | * | ||
20 | * Copyright (C) Intel Corporation, 2005 | ||
21 | * | ||
22 | * 2005-Apr Rusty Lynch <rusty.lynch@intel.com> and Anil S Keshavamurthy | ||
23 | * <anil.s.keshavamurthy@intel.com> adopted from | ||
24 | * include/asm-x86_64/kdebug.h | ||
25 | */ | ||
26 | #include <linux/notifier.h> | ||
27 | |||
28 | struct pt_regs; | ||
29 | |||
30 | struct die_args { | ||
31 | struct pt_regs *regs; | ||
32 | const char *str; | ||
33 | long err; | ||
34 | int trapnr; | ||
35 | int signr; | ||
36 | }; | ||
37 | |||
38 | int register_die_notifier(struct notifier_block *nb); | ||
39 | extern struct notifier_block *ia64die_chain; | ||
40 | |||
41 | enum die_val { | ||
42 | DIE_BREAK = 1, | ||
43 | DIE_SS, | ||
44 | DIE_PAGE_FAULT, | ||
45 | }; | ||
46 | |||
47 | static inline int notify_die(enum die_val val, char *str, struct pt_regs *regs, | ||
48 | long err, int trap, int sig) | ||
49 | { | ||
50 | struct die_args args = { | ||
51 | .regs = regs, | ||
52 | .str = str, | ||
53 | .err = err, | ||
54 | .trapnr = trap, | ||
55 | .signr = sig | ||
56 | }; | ||
57 | |||
58 | return notifier_call_chain(&ia64die_chain, val, &args); | ||
59 | } | ||
60 | |||
61 | #endif | ||
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h new file mode 100644 index 000000000000..bf36a32e37e4 --- /dev/null +++ b/include/asm-ia64/kprobes.h | |||
@@ -0,0 +1,120 @@ | |||
1 | #ifndef _ASM_KPROBES_H | ||
2 | #define _ASM_KPROBES_H | ||
3 | /* | ||
4 | * Kernel Probes (KProbes) | ||
5 | * include/asm-ia64/kprobes.h | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
20 | * | ||
21 | * Copyright (C) IBM Corporation, 2002, 2004 | ||
22 | * Copyright (C) Intel Corporation, 2005 | ||
23 | * | ||
24 | * 2005-Apr Rusty Lynch <rusty.lynch@intel.com> and Anil S Keshavamurthy | ||
25 | * <anil.s.keshavamurthy@intel.com> adapted from i386 | ||
26 | */ | ||
27 | #include <linux/types.h> | ||
28 | #include <linux/ptrace.h> | ||
29 | #include <asm/break.h> | ||
30 | |||
31 | #define MAX_INSN_SIZE 16 | ||
32 | #define BREAK_INST (long)(__IA64_BREAK_KPROBE << 6) | ||
33 | |||
34 | typedef union cmp_inst { | ||
35 | struct { | ||
36 | unsigned long long qp : 6; | ||
37 | unsigned long long p1 : 6; | ||
38 | unsigned long long c : 1; | ||
39 | unsigned long long r2 : 7; | ||
40 | unsigned long long r3 : 7; | ||
41 | unsigned long long p2 : 6; | ||
42 | unsigned long long ta : 1; | ||
43 | unsigned long long x2 : 2; | ||
44 | unsigned long long tb : 1; | ||
45 | unsigned long long opcode : 4; | ||
46 | unsigned long long reserved : 23; | ||
47 | }f; | ||
48 | unsigned long long l; | ||
49 | } cmp_inst_t; | ||
50 | |||
51 | struct kprobe; | ||
52 | |||
53 | typedef struct _bundle { | ||
54 | struct { | ||
55 | unsigned long long template : 5; | ||
56 | unsigned long long slot0 : 41; | ||
57 | unsigned long long slot1_p0 : 64-46; | ||
58 | } quad0; | ||
59 | struct { | ||
60 | unsigned long long slot1_p1 : 41 - (64-46); | ||
61 | unsigned long long slot2 : 41; | ||
62 | } quad1; | ||
63 | } __attribute__((__aligned__(16))) bundle_t; | ||
64 | |||
65 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
66 | |||
67 | #define ARCH_SUPPORTS_KRETPROBES | ||
68 | |||
69 | #define SLOT0_OPCODE_SHIFT (37) | ||
70 | #define SLOT1_p1_OPCODE_SHIFT (37 - (64-46)) | ||
71 | #define SLOT2_OPCODE_SHIFT (37) | ||
72 | |||
73 | #define INDIRECT_CALL_OPCODE (1) | ||
74 | #define IP_RELATIVE_CALL_OPCODE (5) | ||
75 | #define IP_RELATIVE_BRANCH_OPCODE (4) | ||
76 | #define IP_RELATIVE_PREDICT_OPCODE (7) | ||
77 | #define LONG_BRANCH_OPCODE (0xC) | ||
78 | #define LONG_CALL_OPCODE (0xD) | ||
79 | |||
80 | typedef struct kprobe_opcode { | ||
81 | bundle_t bundle; | ||
82 | } kprobe_opcode_t; | ||
83 | |||
84 | struct fnptr { | ||
85 | unsigned long ip; | ||
86 | unsigned long gp; | ||
87 | }; | ||
88 | |||
89 | /* Architecture specific copy of original instruction*/ | ||
90 | struct arch_specific_insn { | ||
91 | /* copy of the instruction to be emulated */ | ||
92 | kprobe_opcode_t insn; | ||
93 | #define INST_FLAG_FIX_RELATIVE_IP_ADDR 1 | ||
94 | #define INST_FLAG_FIX_BRANCH_REG 2 | ||
95 | unsigned long inst_flag; | ||
96 | unsigned short target_br_reg; | ||
97 | }; | ||
98 | |||
99 | /* ia64 does not need this */ | ||
100 | static inline void arch_copy_kprobe(struct kprobe *p) | ||
101 | { | ||
102 | } | ||
103 | |||
104 | #ifdef CONFIG_KPROBES | ||
105 | extern int kprobe_exceptions_notify(struct notifier_block *self, | ||
106 | unsigned long val, void *data); | ||
107 | |||
108 | /* ia64 does not need this */ | ||
109 | static inline void jprobe_return(void) | ||
110 | { | ||
111 | } | ||
112 | |||
113 | #else /* !CONFIG_KPROBES */ | ||
114 | static inline int kprobe_exceptions_notify(struct notifier_block *self, | ||
115 | unsigned long val, void *data) | ||
116 | { | ||
117 | return 0; | ||
118 | } | ||
119 | #endif | ||
120 | #endif /* _ASM_KPROBES_H */ | ||
diff --git a/include/asm-ia64/mmu_context.h b/include/asm-ia64/mmu_context.h index 0096e7e05012..e3e5fededb04 100644 --- a/include/asm-ia64/mmu_context.h +++ b/include/asm-ia64/mmu_context.h | |||
@@ -132,6 +132,9 @@ reload_context (mm_context_t context) | |||
132 | ia64_srlz_i(); /* srlz.i implies srlz.d */ | 132 | ia64_srlz_i(); /* srlz.i implies srlz.d */ |
133 | } | 133 | } |
134 | 134 | ||
135 | /* | ||
136 | * Must be called with preemption off | ||
137 | */ | ||
135 | static inline void | 138 | static inline void |
136 | activate_context (struct mm_struct *mm) | 139 | activate_context (struct mm_struct *mm) |
137 | { | 140 | { |
diff --git a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h index 9491dacc89cf..d32f51e3d6c2 100644 --- a/include/asm-ia64/mmzone.h +++ b/include/asm-ia64/mmzone.h | |||
@@ -17,6 +17,20 @@ | |||
17 | 17 | ||
18 | #ifdef CONFIG_DISCONTIGMEM | 18 | #ifdef CONFIG_DISCONTIGMEM |
19 | 19 | ||
20 | static inline int pfn_to_nid(unsigned long pfn) | ||
21 | { | ||
22 | #ifdef CONFIG_NUMA | ||
23 | extern int paddr_to_nid(unsigned long); | ||
24 | int nid = paddr_to_nid(pfn << PAGE_SHIFT); | ||
25 | if (nid < 0) | ||
26 | return 0; | ||
27 | else | ||
28 | return nid; | ||
29 | #else | ||
30 | return 0; | ||
31 | #endif | ||
32 | } | ||
33 | |||
20 | #ifdef CONFIG_IA64_DIG /* DIG systems are small */ | 34 | #ifdef CONFIG_IA64_DIG /* DIG systems are small */ |
21 | # define MAX_PHYSNODE_ID 8 | 35 | # define MAX_PHYSNODE_ID 8 |
22 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 8) | 36 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 8) |
diff --git a/include/asm-ia64/param.h b/include/asm-ia64/param.h index 6c6b679b7a9e..5e1e0d2d7baf 100644 --- a/include/asm-ia64/param.h +++ b/include/asm-ia64/param.h | |||
@@ -27,7 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | # define HZ 32 | 28 | # define HZ 32 |
29 | # else | 29 | # else |
30 | # define HZ 1024 | 30 | # define HZ CONFIG_HZ |
31 | # endif | 31 | # endif |
32 | # define USER_HZ HZ | 32 | # define USER_HZ HZ |
33 | # define CLOCKS_PER_SEC HZ /* frequency at which times() counts */ | 33 | # define CLOCKS_PER_SEC HZ /* frequency at which times() counts */ |
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h index 1cbd10b96b3a..dba9f220be71 100644 --- a/include/asm-ia64/pci.h +++ b/include/asm-ia64/pci.h | |||
@@ -82,6 +82,25 @@ extern int pcibios_prep_mwi (struct pci_dev *); | |||
82 | #define sg_dma_len(sg) ((sg)->dma_length) | 82 | #define sg_dma_len(sg) ((sg)->dma_length) |
83 | #define sg_dma_address(sg) ((sg)->dma_address) | 83 | #define sg_dma_address(sg) ((sg)->dma_address) |
84 | 84 | ||
85 | #ifdef CONFIG_PCI | ||
86 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | ||
87 | enum pci_dma_burst_strategy *strat, | ||
88 | unsigned long *strategy_parameter) | ||
89 | { | ||
90 | unsigned long cacheline_size; | ||
91 | u8 byte; | ||
92 | |||
93 | pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte); | ||
94 | if (byte == 0) | ||
95 | cacheline_size = 1024; | ||
96 | else | ||
97 | cacheline_size = (int) byte * 4; | ||
98 | |||
99 | *strat = PCI_DMA_BURST_MULTIPLE; | ||
100 | *strategy_parameter = cacheline_size; | ||
101 | } | ||
102 | #endif | ||
103 | |||
85 | #define HAVE_PCI_MMAP | 104 | #define HAVE_PCI_MMAP |
86 | extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, | 105 | extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, |
87 | enum pci_mmap_state mmap_state, int write_combine); | 106 | enum pci_mmap_state mmap_state, int write_combine); |
@@ -109,6 +128,7 @@ struct pci_controller { | |||
109 | void *acpi_handle; | 128 | void *acpi_handle; |
110 | void *iommu; | 129 | void *iommu; |
111 | int segment; | 130 | int segment; |
131 | int node; /* nearest node with memory or -1 for global allocation */ | ||
112 | 132 | ||
113 | unsigned int windows; | 133 | unsigned int windows; |
114 | struct pci_window *window; | 134 | struct pci_window *window; |
diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h index 1e87f19dad56..2b14dee29ce7 100644 --- a/include/asm-ia64/percpu.h +++ b/include/asm-ia64/percpu.h | |||
@@ -50,7 +50,7 @@ extern void *per_cpu_init(void); | |||
50 | 50 | ||
51 | #else /* ! SMP */ | 51 | #else /* ! SMP */ |
52 | 52 | ||
53 | #define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) | 53 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) |
54 | #define __get_cpu_var(var) per_cpu__##var | 54 | #define __get_cpu_var(var) per_cpu__##var |
55 | #define per_cpu_init() (__phys_per_cpu_start) | 55 | #define per_cpu_init() (__phys_per_cpu_start) |
56 | 56 | ||
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index fcc9c3344ab4..48586e08f432 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -283,6 +283,7 @@ ia64_phys_addr_valid (unsigned long addr) | |||
283 | #define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_A)) | 283 | #define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_A)) |
284 | #define pte_mkclean(pte) (__pte(pte_val(pte) & ~_PAGE_D)) | 284 | #define pte_mkclean(pte) (__pte(pte_val(pte) & ~_PAGE_D)) |
285 | #define pte_mkdirty(pte) (__pte(pte_val(pte) | _PAGE_D)) | 285 | #define pte_mkdirty(pte) (__pte(pte_val(pte) | _PAGE_D)) |
286 | #define pte_mkhuge(pte) (__pte(pte_val(pte) | _PAGE_P)) | ||
286 | 287 | ||
287 | /* | 288 | /* |
288 | * Macro to a page protection value as "uncacheable". Note that "protection" is really a | 289 | * Macro to a page protection value as "uncacheable". Note that "protection" is really a |
diff --git a/include/asm-ia64/sections.h b/include/asm-ia64/sections.h index 8e3dbde1b429..e9eb7f62d32b 100644 --- a/include/asm-ia64/sections.h +++ b/include/asm-ia64/sections.h | |||
@@ -17,6 +17,7 @@ extern char __start_gate_vtop_patchlist[], __end_gate_vtop_patchlist[]; | |||
17 | extern char __start_gate_fsyscall_patchlist[], __end_gate_fsyscall_patchlist[]; | 17 | extern char __start_gate_fsyscall_patchlist[], __end_gate_fsyscall_patchlist[]; |
18 | extern char __start_gate_brl_fsys_bubble_down_patchlist[], __end_gate_brl_fsys_bubble_down_patchlist[]; | 18 | extern char __start_gate_brl_fsys_bubble_down_patchlist[], __end_gate_brl_fsys_bubble_down_patchlist[]; |
19 | extern char __start_unwind[], __end_unwind[]; | 19 | extern char __start_unwind[], __end_unwind[]; |
20 | extern char __start_ivt_text[], __end_ivt_text[]; | ||
20 | 21 | ||
21 | #endif /* _ASM_IA64_SECTIONS_H */ | 22 | #endif /* _ASM_IA64_SECTIONS_H */ |
22 | 23 | ||
diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h index 3ba1a061e4ae..a3914352c995 100644 --- a/include/asm-ia64/smp.h +++ b/include/asm-ia64/smp.h | |||
@@ -46,7 +46,7 @@ ia64_get_lid (void) | |||
46 | #define SMP_IRQ_REDIRECTION (1 << 0) | 46 | #define SMP_IRQ_REDIRECTION (1 << 0) |
47 | #define SMP_IPI_REDIRECTION (1 << 1) | 47 | #define SMP_IPI_REDIRECTION (1 << 1) |
48 | 48 | ||
49 | #define smp_processor_id() (current_thread_info()->cpu) | 49 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
50 | 50 | ||
51 | extern struct smp_boot_data { | 51 | extern struct smp_boot_data { |
52 | int cpu_count; | 52 | int cpu_count; |
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h index 1bfdfb4d7b01..103d745dc5f2 100644 --- a/include/asm-ia64/sn/addrs.h +++ b/include/asm-ia64/sn/addrs.h | |||
@@ -216,6 +216,10 @@ | |||
216 | #define TIO_SWIN_WIDGETNUM(x) (((x) >> TIO_SWIN_SIZE_BITS) & TIO_SWIN_WIDGET_MASK) | 216 | #define TIO_SWIN_WIDGETNUM(x) (((x) >> TIO_SWIN_SIZE_BITS) & TIO_SWIN_WIDGET_MASK) |
217 | 217 | ||
218 | 218 | ||
219 | #define TIO_IOSPACE_ADDR(n,x) \ | ||
220 | /* Move in the Chiplet ID for TIO Local Block MMR */ \ | ||
221 | (REMOTE_ADDR(n,x) | 1UL << (NASID_SHIFT - 2)) | ||
222 | |||
219 | /* | 223 | /* |
220 | * The following macros produce the correct base virtual address for | 224 | * The following macros produce the correct base virtual address for |
221 | * the hub registers. The REMOTE_HUB_* macro produce | 225 | * the hub registers. The REMOTE_HUB_* macro produce |
@@ -233,13 +237,16 @@ | |||
233 | #define REMOTE_HUB_ADDR(n,x) \ | 237 | #define REMOTE_HUB_ADDR(n,x) \ |
234 | ((n & 1) ? \ | 238 | ((n & 1) ? \ |
235 | /* TIO: */ \ | 239 | /* TIO: */ \ |
236 | ((volatile u64 *)(GLOBAL_MMR_ADDR(n,x))) \ | 240 | (is_shub2() ? \ |
237 | : /* SHUB: */ \ | 241 | /* TIO on Shub2 */ \ |
238 | (((x) & BWIN_TOP) ? ((volatile u64 *)(GLOBAL_MMR_ADDR(n,x)))\ | 242 | (volatile u64 *)(TIO_IOSPACE_ADDR(n,x)) \ |
243 | : /* TIO on shub1 */ \ | ||
244 | (volatile u64 *)(GLOBAL_MMR_ADDR(n,x))) \ | ||
245 | \ | ||
246 | : /* SHUB1 and SHUB2 MMRs: */ \ | ||
247 | (((x) & BWIN_TOP) ? ((volatile u64 *)(GLOBAL_MMR_ADDR(n,x))) \ | ||
239 | : ((volatile u64 *)(NODE_SWIN_BASE(n,1) + 0x800000 + (x))))) | 248 | : ((volatile u64 *)(NODE_SWIN_BASE(n,1) + 0x800000 + (x))))) |
240 | 249 | ||
241 | |||
242 | |||
243 | #define HUB_L(x) (*((volatile typeof(*x) *)x)) | 250 | #define HUB_L(x) (*((volatile typeof(*x) *)x)) |
244 | #define HUB_S(x,d) (*((volatile typeof(*x) *)x) = (d)) | 251 | #define HUB_S(x,d) (*((volatile typeof(*x) *)x) = (d)) |
245 | 252 | ||
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h index 635fdce854a8..ab827d298569 100644 --- a/include/asm-ia64/sn/arch.h +++ b/include/asm-ia64/sn/arch.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef _ASM_IA64_SN_ARCH_H | 11 | #ifndef _ASM_IA64_SN_ARCH_H |
12 | #define _ASM_IA64_SN_ARCH_H | 12 | #define _ASM_IA64_SN_ARCH_H |
13 | 13 | ||
14 | #include <linux/numa.h> | ||
14 | #include <asm/types.h> | 15 | #include <asm/types.h> |
15 | #include <asm/percpu.h> | 16 | #include <asm/percpu.h> |
16 | #include <asm/sn/types.h> | 17 | #include <asm/sn/types.h> |
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index e51471fb0867..e190dd4213d5 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _ASM_IA64_SN_INTR_H | 9 | #ifndef _ASM_IA64_SN_INTR_H |
10 | #define _ASM_IA64_SN_INTR_H | 10 | #define _ASM_IA64_SN_INTR_H |
11 | 11 | ||
12 | #include <linux/rcupdate.h> | ||
13 | |||
12 | #define SGI_UART_VECTOR (0xe9) | 14 | #define SGI_UART_VECTOR (0xe9) |
13 | #define SGI_PCIBR_ERROR (0x33) | 15 | #define SGI_PCIBR_ERROR (0x33) |
14 | 16 | ||
@@ -33,7 +35,7 @@ | |||
33 | 35 | ||
34 | // The SN PROM irq struct | 36 | // The SN PROM irq struct |
35 | struct sn_irq_info { | 37 | struct sn_irq_info { |
36 | struct sn_irq_info *irq_next; /* sharing irq list */ | 38 | struct sn_irq_info *irq_next; /* deprecated DO NOT USE */ |
37 | short irq_nasid; /* Nasid IRQ is assigned to */ | 39 | short irq_nasid; /* Nasid IRQ is assigned to */ |
38 | int irq_slice; /* slice IRQ is assigned to */ | 40 | int irq_slice; /* slice IRQ is assigned to */ |
39 | int irq_cpuid; /* kernel logical cpuid */ | 41 | int irq_cpuid; /* kernel logical cpuid */ |
@@ -47,6 +49,8 @@ struct sn_irq_info { | |||
47 | int irq_cookie; /* unique cookie */ | 49 | int irq_cookie; /* unique cookie */ |
48 | int irq_flags; /* flags */ | 50 | int irq_flags; /* flags */ |
49 | int irq_share_cnt; /* num devices sharing IRQ */ | 51 | int irq_share_cnt; /* num devices sharing IRQ */ |
52 | struct list_head list; /* list of sn_irq_info structs */ | ||
53 | struct rcu_head rcu; /* rcu callback list */ | ||
50 | }; | 54 | }; |
51 | 55 | ||
52 | extern void sn_send_IPI_phys(int, long, int, int); | 56 | extern void sn_send_IPI_phys(int, long, int, int); |
diff --git a/include/asm-ia64/sn/l1.h b/include/asm-ia64/sn/l1.h index 08050d37b662..2e5f0aa38889 100644 --- a/include/asm-ia64/sn/l1.h +++ b/include/asm-ia64/sn/l1.h | |||
@@ -33,5 +33,6 @@ | |||
33 | #define L1_BRICKTYPE_PA 0x6a /* j */ | 33 | #define L1_BRICKTYPE_PA 0x6a /* j */ |
34 | #define L1_BRICKTYPE_IA 0x6b /* k */ | 34 | #define L1_BRICKTYPE_IA 0x6b /* k */ |
35 | #define L1_BRICKTYPE_ATHENA 0x2b /* + */ | 35 | #define L1_BRICKTYPE_ATHENA 0x2b /* + */ |
36 | #define L1_BRICKTYPE_DAYTONA 0x7a /* z */ | ||
36 | 37 | ||
37 | #endif /* _ASM_IA64_SN_L1_H */ | 38 | #endif /* _ASM_IA64_SN_L1_H */ |
diff --git a/include/asm-ia64/sn/mspec.h b/include/asm-ia64/sn/mspec.h new file mode 100644 index 000000000000..dbe13c6121a8 --- /dev/null +++ b/include/asm-ia64/sn/mspec.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * | ||
3 | * This file is subject to the terms and conditions of the GNU General Public | ||
4 | * License. See the file "COPYING" in the main directory of this archive | ||
5 | * for more details. | ||
6 | * | ||
7 | * Copyright (c) 2001-2004 Silicon Graphics, Inc. All rights reserved. | ||
8 | */ | ||
9 | |||
10 | #ifndef _ASM_IA64_SN_MSPEC_H | ||
11 | #define _ASM_IA64_SN_MSPEC_H | ||
12 | |||
13 | #define FETCHOP_VAR_SIZE 64 /* 64 byte per fetchop variable */ | ||
14 | |||
15 | #define FETCHOP_LOAD 0 | ||
16 | #define FETCHOP_INCREMENT 8 | ||
17 | #define FETCHOP_DECREMENT 16 | ||
18 | #define FETCHOP_CLEAR 24 | ||
19 | |||
20 | #define FETCHOP_STORE 0 | ||
21 | #define FETCHOP_AND 24 | ||
22 | #define FETCHOP_OR 32 | ||
23 | |||
24 | #define FETCHOP_CLEAR_CACHE 56 | ||
25 | |||
26 | #define FETCHOP_LOAD_OP(addr, op) ( \ | ||
27 | *(volatile long *)((char*) (addr) + (op))) | ||
28 | |||
29 | #define FETCHOP_STORE_OP(addr, op, x) ( \ | ||
30 | *(volatile long *)((char*) (addr) + (op)) = (long) (x)) | ||
31 | |||
32 | #ifdef __KERNEL__ | ||
33 | |||
34 | /* | ||
35 | * Each Atomic Memory Operation (AMO formerly known as fetchop) | ||
36 | * variable is 64 bytes long. The first 8 bytes are used. The | ||
37 | * remaining 56 bytes are unaddressable due to the operation taking | ||
38 | * that portion of the address. | ||
39 | * | ||
40 | * NOTE: The AMO_t _MUST_ be placed in either the first or second half | ||
41 | * of the cache line. The cache line _MUST NOT_ be used for anything | ||
42 | * other than additional AMO_t entries. This is because there are two | ||
43 | * addresses which reference the same physical cache line. One will | ||
44 | * be a cached entry with the memory type bits all set. This address | ||
45 | * may be loaded into processor cache. The AMO_t will be referenced | ||
46 | * uncached via the memory special memory type. If any portion of the | ||
47 | * cached cache-line is modified, when that line is flushed, it will | ||
48 | * overwrite the uncached value in physical memory and lead to | ||
49 | * inconsistency. | ||
50 | */ | ||
51 | typedef struct { | ||
52 | u64 variable; | ||
53 | u64 unused[7]; | ||
54 | } AMO_t; | ||
55 | |||
56 | |||
57 | #endif /* __KERNEL__ */ | ||
58 | |||
59 | #endif /* _ASM_IA64_SN_MSPEC_H */ | ||
diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h new file mode 100644 index 000000000000..2b42d9ece26b --- /dev/null +++ b/include/asm-ia64/sn/pcibr_provider.h | |||
@@ -0,0 +1,159 @@ | |||
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) 1992-1997,2000-2004 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | ||
9 | #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | ||
10 | |||
11 | #include <asm/sn/intr.h> | ||
12 | #include <asm/sn/pcibus_provider_defs.h> | ||
13 | |||
14 | /* Workarounds */ | ||
15 | #define PV907516 (1 << 1) /* TIOCP: Don't write the write buffer flush reg */ | ||
16 | |||
17 | #define BUSTYPE_MASK 0x1 | ||
18 | |||
19 | /* Macros given a pcibus structure */ | ||
20 | #define IS_PCIX(ps) ((ps)->pbi_bridge_mode & BUSTYPE_MASK) | ||
21 | #define IS_PCI_BRIDGE_ASIC(asic) (asic == PCIIO_ASIC_TYPE_PIC || \ | ||
22 | asic == PCIIO_ASIC_TYPE_TIOCP) | ||
23 | #define IS_PIC_SOFT(ps) (ps->pbi_bridge_type == PCIBR_BRIDGETYPE_PIC) | ||
24 | |||
25 | |||
26 | /* | ||
27 | * The different PCI Bridge types supported on the SGI Altix platforms | ||
28 | */ | ||
29 | #define PCIBR_BRIDGETYPE_UNKNOWN -1 | ||
30 | #define PCIBR_BRIDGETYPE_PIC 2 | ||
31 | #define PCIBR_BRIDGETYPE_TIOCP 3 | ||
32 | |||
33 | /* | ||
34 | * Bridge 64bit Direct Map Attributes | ||
35 | */ | ||
36 | #define PCI64_ATTR_PREF (1ull << 59) | ||
37 | #define PCI64_ATTR_PREC (1ull << 58) | ||
38 | #define PCI64_ATTR_VIRTUAL (1ull << 57) | ||
39 | #define PCI64_ATTR_BAR (1ull << 56) | ||
40 | #define PCI64_ATTR_SWAP (1ull << 55) | ||
41 | #define PCI64_ATTR_VIRTUAL1 (1ull << 54) | ||
42 | |||
43 | #define PCI32_LOCAL_BASE 0 | ||
44 | #define PCI32_MAPPED_BASE 0x40000000 | ||
45 | #define PCI32_DIRECT_BASE 0x80000000 | ||
46 | |||
47 | #define IS_PCI32_MAPPED(x) ((uint64_t)(x) < PCI32_DIRECT_BASE && \ | ||
48 | (uint64_t)(x) >= PCI32_MAPPED_BASE) | ||
49 | #define IS_PCI32_DIRECT(x) ((uint64_t)(x) >= PCI32_MAPPED_BASE) | ||
50 | |||
51 | |||
52 | /* | ||
53 | * Bridge PMU Address Transaltion Entry Attibutes | ||
54 | */ | ||
55 | #define PCI32_ATE_V (0x1 << 0) | ||
56 | #define PCI32_ATE_CO (0x1 << 1) | ||
57 | #define PCI32_ATE_PREC (0x1 << 2) | ||
58 | #define PCI32_ATE_PREF (0x1 << 3) | ||
59 | #define PCI32_ATE_BAR (0x1 << 4) | ||
60 | #define PCI32_ATE_ADDR_SHFT 12 | ||
61 | |||
62 | #define MINIMAL_ATES_REQUIRED(addr, size) \ | ||
63 | (IOPG(IOPGOFF(addr) + (size) - 1) == IOPG((size) - 1)) | ||
64 | |||
65 | #define MINIMAL_ATE_FLAG(addr, size) \ | ||
66 | (MINIMAL_ATES_REQUIRED((uint64_t)addr, size) ? 1 : 0) | ||
67 | |||
68 | /* bit 29 of the pci address is the SWAP bit */ | ||
69 | #define ATE_SWAPSHIFT 29 | ||
70 | #define ATE_SWAP_ON(x) ((x) |= (1 << ATE_SWAPSHIFT)) | ||
71 | #define ATE_SWAP_OFF(x) ((x) &= ~(1 << ATE_SWAPSHIFT)) | ||
72 | |||
73 | /* | ||
74 | * I/O page size | ||
75 | */ | ||
76 | #if PAGE_SIZE < 16384 | ||
77 | #define IOPFNSHIFT 12 /* 4K per mapped page */ | ||
78 | #else | ||
79 | #define IOPFNSHIFT 14 /* 16K per mapped page */ | ||
80 | #endif | ||
81 | |||
82 | #define IOPGSIZE (1 << IOPFNSHIFT) | ||
83 | #define IOPG(x) ((x) >> IOPFNSHIFT) | ||
84 | #define IOPGOFF(x) ((x) & (IOPGSIZE-1)) | ||
85 | |||
86 | #define PCIBR_DEV_SWAP_DIR (1ull << 19) | ||
87 | #define PCIBR_CTRL_PAGE_SIZE (0x1 << 21) | ||
88 | |||
89 | /* | ||
90 | * PMU resources. | ||
91 | */ | ||
92 | struct ate_resource{ | ||
93 | uint64_t *ate; | ||
94 | uint64_t num_ate; | ||
95 | uint64_t lowest_free_index; | ||
96 | }; | ||
97 | |||
98 | struct pcibus_info { | ||
99 | struct pcibus_bussoft pbi_buscommon; /* common header */ | ||
100 | uint32_t pbi_moduleid; | ||
101 | short pbi_bridge_type; | ||
102 | short pbi_bridge_mode; | ||
103 | |||
104 | struct ate_resource pbi_int_ate_resource; | ||
105 | uint64_t pbi_int_ate_size; | ||
106 | |||
107 | uint64_t pbi_dir_xbase; | ||
108 | char pbi_hub_xid; | ||
109 | |||
110 | uint64_t pbi_devreg[8]; | ||
111 | |||
112 | uint32_t pbi_valid_devices; | ||
113 | uint32_t pbi_enabled_devices; | ||
114 | |||
115 | spinlock_t pbi_lock; | ||
116 | }; | ||
117 | |||
118 | /* | ||
119 | * pcibus_info structure locking macros | ||
120 | */ | ||
121 | inline static unsigned long | ||
122 | pcibr_lock(struct pcibus_info *pcibus_info) | ||
123 | { | ||
124 | unsigned long flag; | ||
125 | spin_lock_irqsave(&pcibus_info->pbi_lock, flag); | ||
126 | return(flag); | ||
127 | } | ||
128 | #define pcibr_unlock(pcibus_info, flag) spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag) | ||
129 | |||
130 | extern int pcibr_init_provider(void); | ||
131 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); | ||
132 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); | ||
133 | extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t); | ||
134 | extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int); | ||
135 | |||
136 | /* | ||
137 | * prototypes for the bridge asic register access routines in pcibr_reg.c | ||
138 | */ | ||
139 | extern void pcireg_control_bit_clr(struct pcibus_info *, uint64_t); | ||
140 | extern void pcireg_control_bit_set(struct pcibus_info *, uint64_t); | ||
141 | extern uint64_t pcireg_tflush_get(struct pcibus_info *); | ||
142 | extern uint64_t pcireg_intr_status_get(struct pcibus_info *); | ||
143 | extern void pcireg_intr_enable_bit_clr(struct pcibus_info *, uint64_t); | ||
144 | extern void pcireg_intr_enable_bit_set(struct pcibus_info *, uint64_t); | ||
145 | extern void pcireg_intr_addr_addr_set(struct pcibus_info *, int, uint64_t); | ||
146 | extern void pcireg_force_intr_set(struct pcibus_info *, int); | ||
147 | extern uint64_t pcireg_wrb_flush_get(struct pcibus_info *, int); | ||
148 | extern void pcireg_int_ate_set(struct pcibus_info *, int, uint64_t); | ||
149 | extern uint64_t * pcireg_int_ate_addr(struct pcibus_info *, int); | ||
150 | extern void pcibr_force_interrupt(struct sn_irq_info *sn_irq_info); | ||
151 | extern void pcibr_change_devices_irq(struct sn_irq_info *sn_irq_info); | ||
152 | extern int pcibr_ate_alloc(struct pcibus_info *, int); | ||
153 | extern void pcibr_ate_free(struct pcibus_info *, int); | ||
154 | extern void ate_write(struct pcibus_info *, int, int, uint64_t); | ||
155 | extern int sal_pcibr_slot_enable(struct pcibus_info *soft, int device, | ||
156 | void *resp); | ||
157 | extern int sal_pcibr_slot_disable(struct pcibus_info *soft, int device, | ||
158 | int action, void *resp); | ||
159 | #endif | ||
diff --git a/include/asm-ia64/sn/pcibus_provider_defs.h b/include/asm-ia64/sn/pcibus_provider_defs.h index 04e27d5b3820..976f5eff0539 100644 --- a/include/asm-ia64/sn/pcibus_provider_defs.h +++ b/include/asm-ia64/sn/pcibus_provider_defs.h | |||
@@ -37,6 +37,7 @@ struct pcibus_bussoft { | |||
37 | struct xwidget_info *bs_xwidget_info; | 37 | struct xwidget_info *bs_xwidget_info; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | struct pci_controller; | ||
40 | /* | 41 | /* |
41 | * SN pci bus indirection | 42 | * SN pci bus indirection |
42 | */ | 43 | */ |
@@ -45,7 +46,7 @@ struct sn_pcibus_provider { | |||
45 | dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t); | 46 | dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t); |
46 | dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t); | 47 | dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t); |
47 | void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); | 48 | void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); |
48 | void * (*bus_fixup)(struct pcibus_bussoft *); | 49 | void * (*bus_fixup)(struct pcibus_bussoft *, struct pci_controller *); |
49 | }; | 50 | }; |
50 | 51 | ||
51 | extern struct sn_pcibus_provider *sn_pci_provider[]; | 52 | extern struct sn_pcibus_provider *sn_pci_provider[]; |
diff --git a/include/asm-ia64/sn/pcidev.h b/include/asm-ia64/sn/pcidev.h index ed4031d80811..49711d00ad04 100644 --- a/include/asm-ia64/sn/pcidev.h +++ b/include/asm-ia64/sn/pcidev.h | |||
@@ -10,11 +10,11 @@ | |||
10 | 10 | ||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | 12 | ||
13 | extern struct sn_irq_info **sn_irq; | ||
14 | |||
15 | #define SN_PCIDEV_INFO(pci_dev) \ | 13 | #define SN_PCIDEV_INFO(pci_dev) \ |
16 | ((struct pcidev_info *)(pci_dev)->sysdata) | 14 | ((struct pcidev_info *)(pci_dev)->sysdata) |
17 | 15 | ||
16 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ | ||
17 | (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | ||
18 | /* | 18 | /* |
19 | * Given a pci_bus, return the sn pcibus_bussoft struct. Note that | 19 | * Given a pci_bus, return the sn pcibus_bussoft struct. Note that |
20 | * this only works for root busses, not for busses represented by PPB's. | 20 | * this only works for root busses, not for busses represented by PPB's. |
@@ -23,6 +23,8 @@ extern struct sn_irq_info **sn_irq; | |||
23 | #define SN_PCIBUS_BUSSOFT(pci_bus) \ | 23 | #define SN_PCIBUS_BUSSOFT(pci_bus) \ |
24 | ((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | 24 | ((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) |
25 | 25 | ||
26 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ | ||
27 | (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | ||
26 | /* | 28 | /* |
27 | * Given a struct pci_dev, return the sn pcibus_bussoft struct. Note | 29 | * Given a struct pci_dev, return the sn pcibus_bussoft struct. Note |
28 | * that this is not equivalent to SN_PCIBUS_BUSSOFT(pci_dev->bus) due | 30 | * that this is not equivalent to SN_PCIBUS_BUSSOFT(pci_dev->bus) due |
@@ -50,9 +52,17 @@ struct pcidev_info { | |||
50 | 52 | ||
51 | struct sn_irq_info *pdi_sn_irq_info; | 53 | struct sn_irq_info *pdi_sn_irq_info; |
52 | struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ | 54 | struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ |
55 | struct pci_dev *host_pci_dev; /* host bus link */ | ||
53 | }; | 56 | }; |
54 | 57 | ||
55 | extern void sn_irq_fixup(struct pci_dev *pci_dev, | 58 | extern void sn_irq_fixup(struct pci_dev *pci_dev, |
56 | struct sn_irq_info *sn_irq_info); | 59 | struct sn_irq_info *sn_irq_info); |
57 | 60 | extern void sn_irq_unfixup(struct pci_dev *pci_dev); | |
61 | extern void sn_pci_controller_fixup(int segment, int busnum, | ||
62 | struct pci_bus *bus); | ||
63 | extern void sn_bus_store_sysdata(struct pci_dev *dev); | ||
64 | extern void sn_bus_free_sysdata(void); | ||
65 | extern void sn_pci_fixup_slot(struct pci_dev *dev); | ||
66 | extern void sn_pci_unfixup_slot(struct pci_dev *dev); | ||
67 | extern void sn_irq_lh_init(void); | ||
58 | #endif /* _ASM_IA64_SN_PCI_PCIDEV_H */ | 68 | #endif /* _ASM_IA64_SN_PCI_PCIDEV_H */ |
diff --git a/include/asm-ia64/sn/pic.h b/include/asm-ia64/sn/pic.h new file mode 100644 index 000000000000..0de82e6b0893 --- /dev/null +++ b/include/asm-ia64/sn/pic.h | |||
@@ -0,0 +1,261 @@ | |||
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) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | #ifndef _ASM_IA64_SN_PCI_PIC_H | ||
9 | #define _ASM_IA64_SN_PCI_PIC_H | ||
10 | |||
11 | /* | ||
12 | * PIC AS DEVICE ZERO | ||
13 | * ------------------ | ||
14 | * | ||
15 | * PIC handles PCI/X busses. PCI/X requires that the 'bridge' (i.e. PIC) | ||
16 | * be designated as 'device 0'. That is a departure from earlier SGI | ||
17 | * PCI bridges. Because of that we use config space 1 to access the | ||
18 | * config space of the first actual PCI device on the bus. | ||
19 | * Here's what the PIC manual says: | ||
20 | * | ||
21 | * The current PCI-X bus specification now defines that the parent | ||
22 | * hosts bus bridge (PIC for example) must be device 0 on bus 0. PIC | ||
23 | * reduced the total number of devices from 8 to 4 and removed the | ||
24 | * device registers and windows, now only supporting devices 0,1,2, and | ||
25 | * 3. PIC did leave all 8 configuration space windows. The reason was | ||
26 | * there was nothing to gain by removing them. Here in lies the problem. | ||
27 | * The device numbering we do using 0 through 3 is unrelated to the device | ||
28 | * numbering which PCI-X requires in configuration space. In the past we | ||
29 | * correlated Configs pace and our device space 0 <-> 0, 1 <-> 1, etc. | ||
30 | * PCI-X requires we start a 1, not 0 and currently the PX brick | ||
31 | * does associate our: | ||
32 | * | ||
33 | * device 0 with configuration space window 1, | ||
34 | * device 1 with configuration space window 2, | ||
35 | * device 2 with configuration space window 3, | ||
36 | * device 3 with configuration space window 4. | ||
37 | * | ||
38 | * The net effect is that all config space access are off-by-one with | ||
39 | * relation to other per-slot accesses on the PIC. | ||
40 | * Here is a table that shows some of that: | ||
41 | * | ||
42 | * Internal Slot# | ||
43 | * | | ||
44 | * | 0 1 2 3 | ||
45 | * ----------|--------------------------------------- | ||
46 | * config | 0x21000 0x22000 0x23000 0x24000 | ||
47 | * | | ||
48 | * even rrb | 0[0] n/a 1[0] n/a [] == implied even/odd | ||
49 | * | | ||
50 | * odd rrb | n/a 0[1] n/a 1[1] | ||
51 | * | | ||
52 | * int dev | 00 01 10 11 | ||
53 | * | | ||
54 | * ext slot# | 1 2 3 4 | ||
55 | * ----------|--------------------------------------- | ||
56 | */ | ||
57 | |||
58 | #define PIC_ATE_TARGETID_SHFT 8 | ||
59 | #define PIC_HOST_INTR_ADDR 0x0000FFFFFFFFFFFFUL | ||
60 | #define PIC_PCI64_ATTR_TARG_SHFT 60 | ||
61 | |||
62 | |||
63 | /***************************************************************************** | ||
64 | *********************** PIC MMR structure mapping *************************** | ||
65 | *****************************************************************************/ | ||
66 | |||
67 | /* NOTE: PIC WAR. PV#854697. PIC does not allow writes just to [31:0] | ||
68 | * of a 64-bit register. When writing PIC registers, always write the | ||
69 | * entire 64 bits. | ||
70 | */ | ||
71 | |||
72 | struct pic { | ||
73 | |||
74 | /* 0x000000-0x00FFFF -- Local Registers */ | ||
75 | |||
76 | /* 0x000000-0x000057 -- Standard Widget Configuration */ | ||
77 | uint64_t p_wid_id; /* 0x000000 */ | ||
78 | uint64_t p_wid_stat; /* 0x000008 */ | ||
79 | uint64_t p_wid_err_upper; /* 0x000010 */ | ||
80 | uint64_t p_wid_err_lower; /* 0x000018 */ | ||
81 | #define p_wid_err p_wid_err_lower | ||
82 | uint64_t p_wid_control; /* 0x000020 */ | ||
83 | uint64_t p_wid_req_timeout; /* 0x000028 */ | ||
84 | uint64_t p_wid_int_upper; /* 0x000030 */ | ||
85 | uint64_t p_wid_int_lower; /* 0x000038 */ | ||
86 | #define p_wid_int p_wid_int_lower | ||
87 | uint64_t p_wid_err_cmdword; /* 0x000040 */ | ||
88 | uint64_t p_wid_llp; /* 0x000048 */ | ||
89 | uint64_t p_wid_tflush; /* 0x000050 */ | ||
90 | |||
91 | /* 0x000058-0x00007F -- Bridge-specific Widget Configuration */ | ||
92 | uint64_t p_wid_aux_err; /* 0x000058 */ | ||
93 | uint64_t p_wid_resp_upper; /* 0x000060 */ | ||
94 | uint64_t p_wid_resp_lower; /* 0x000068 */ | ||
95 | #define p_wid_resp p_wid_resp_lower | ||
96 | uint64_t p_wid_tst_pin_ctrl; /* 0x000070 */ | ||
97 | uint64_t p_wid_addr_lkerr; /* 0x000078 */ | ||
98 | |||
99 | /* 0x000080-0x00008F -- PMU & MAP */ | ||
100 | uint64_t p_dir_map; /* 0x000080 */ | ||
101 | uint64_t _pad_000088; /* 0x000088 */ | ||
102 | |||
103 | /* 0x000090-0x00009F -- SSRAM */ | ||
104 | uint64_t p_map_fault; /* 0x000090 */ | ||
105 | uint64_t _pad_000098; /* 0x000098 */ | ||
106 | |||
107 | /* 0x0000A0-0x0000AF -- Arbitration */ | ||
108 | uint64_t p_arb; /* 0x0000A0 */ | ||
109 | uint64_t _pad_0000A8; /* 0x0000A8 */ | ||
110 | |||
111 | /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */ | ||
112 | uint64_t p_ate_parity_err; /* 0x0000B0 */ | ||
113 | uint64_t _pad_0000B8; /* 0x0000B8 */ | ||
114 | |||
115 | /* 0x0000C0-0x0000FF -- PCI/GIO */ | ||
116 | uint64_t p_bus_timeout; /* 0x0000C0 */ | ||
117 | uint64_t p_pci_cfg; /* 0x0000C8 */ | ||
118 | uint64_t p_pci_err_upper; /* 0x0000D0 */ | ||
119 | uint64_t p_pci_err_lower; /* 0x0000D8 */ | ||
120 | #define p_pci_err p_pci_err_lower | ||
121 | uint64_t _pad_0000E0[4]; /* 0x0000{E0..F8} */ | ||
122 | |||
123 | /* 0x000100-0x0001FF -- Interrupt */ | ||
124 | uint64_t p_int_status; /* 0x000100 */ | ||
125 | uint64_t p_int_enable; /* 0x000108 */ | ||
126 | uint64_t p_int_rst_stat; /* 0x000110 */ | ||
127 | uint64_t p_int_mode; /* 0x000118 */ | ||
128 | uint64_t p_int_device; /* 0x000120 */ | ||
129 | uint64_t p_int_host_err; /* 0x000128 */ | ||
130 | uint64_t p_int_addr[8]; /* 0x0001{30,,,68} */ | ||
131 | uint64_t p_err_int_view; /* 0x000170 */ | ||
132 | uint64_t p_mult_int; /* 0x000178 */ | ||
133 | uint64_t p_force_always[8]; /* 0x0001{80,,,B8} */ | ||
134 | uint64_t p_force_pin[8]; /* 0x0001{C0,,,F8} */ | ||
135 | |||
136 | /* 0x000200-0x000298 -- Device */ | ||
137 | uint64_t p_device[4]; /* 0x0002{00,,,18} */ | ||
138 | uint64_t _pad_000220[4]; /* 0x0002{20,,,38} */ | ||
139 | uint64_t p_wr_req_buf[4]; /* 0x0002{40,,,58} */ | ||
140 | uint64_t _pad_000260[4]; /* 0x0002{60,,,78} */ | ||
141 | uint64_t p_rrb_map[2]; /* 0x0002{80,,,88} */ | ||
142 | #define p_even_resp p_rrb_map[0] /* 0x000280 */ | ||
143 | #define p_odd_resp p_rrb_map[1] /* 0x000288 */ | ||
144 | uint64_t p_resp_status; /* 0x000290 */ | ||
145 | uint64_t p_resp_clear; /* 0x000298 */ | ||
146 | |||
147 | uint64_t _pad_0002A0[12]; /* 0x0002{A0..F8} */ | ||
148 | |||
149 | /* 0x000300-0x0003F8 -- Buffer Address Match Registers */ | ||
150 | struct { | ||
151 | uint64_t upper; /* 0x0003{00,,,F0} */ | ||
152 | uint64_t lower; /* 0x0003{08,,,F8} */ | ||
153 | } p_buf_addr_match[16]; | ||
154 | |||
155 | /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */ | ||
156 | struct { | ||
157 | uint64_t flush_w_touch; /* 0x000{400,,,5C0} */ | ||
158 | uint64_t flush_wo_touch; /* 0x000{408,,,5C8} */ | ||
159 | uint64_t inflight; /* 0x000{410,,,5D0} */ | ||
160 | uint64_t prefetch; /* 0x000{418,,,5D8} */ | ||
161 | uint64_t total_pci_retry; /* 0x000{420,,,5E0} */ | ||
162 | uint64_t max_pci_retry; /* 0x000{428,,,5E8} */ | ||
163 | uint64_t max_latency; /* 0x000{430,,,5F0} */ | ||
164 | uint64_t clear_all; /* 0x000{438,,,5F8} */ | ||
165 | } p_buf_count[8]; | ||
166 | |||
167 | |||
168 | /* 0x000600-0x0009FF -- PCI/X registers */ | ||
169 | uint64_t p_pcix_bus_err_addr; /* 0x000600 */ | ||
170 | uint64_t p_pcix_bus_err_attr; /* 0x000608 */ | ||
171 | uint64_t p_pcix_bus_err_data; /* 0x000610 */ | ||
172 | uint64_t p_pcix_pio_split_addr; /* 0x000618 */ | ||
173 | uint64_t p_pcix_pio_split_attr; /* 0x000620 */ | ||
174 | uint64_t p_pcix_dma_req_err_attr; /* 0x000628 */ | ||
175 | uint64_t p_pcix_dma_req_err_addr; /* 0x000630 */ | ||
176 | uint64_t p_pcix_timeout; /* 0x000638 */ | ||
177 | |||
178 | uint64_t _pad_000640[120]; /* 0x000{640,,,9F8} */ | ||
179 | |||
180 | /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */ | ||
181 | struct { | ||
182 | uint64_t p_buf_addr; /* 0x000{A00,,,AF0} */ | ||
183 | uint64_t p_buf_attr; /* 0X000{A08,,,AF8} */ | ||
184 | } p_pcix_read_buf_64[16]; | ||
185 | |||
186 | struct { | ||
187 | uint64_t p_buf_addr; /* 0x000{B00,,,BE0} */ | ||
188 | uint64_t p_buf_attr; /* 0x000{B08,,,BE8} */ | ||
189 | uint64_t p_buf_valid; /* 0x000{B10,,,BF0} */ | ||
190 | uint64_t __pad1; /* 0x000{B18,,,BF8} */ | ||
191 | } p_pcix_write_buf_64[8]; | ||
192 | |||
193 | /* End of Local Registers -- Start of Address Map space */ | ||
194 | |||
195 | char _pad_000c00[0x010000 - 0x000c00]; | ||
196 | |||
197 | /* 0x010000-0x011fff -- Internal ATE RAM (Auto Parity Generation) */ | ||
198 | uint64_t p_int_ate_ram[1024]; /* 0x010000-0x011fff */ | ||
199 | |||
200 | /* 0x012000-0x013fff -- Internal ATE RAM (Manual Parity Generation) */ | ||
201 | uint64_t p_int_ate_ram_mp[1024]; /* 0x012000-0x013fff */ | ||
202 | |||
203 | char _pad_014000[0x18000 - 0x014000]; | ||
204 | |||
205 | /* 0x18000-0x197F8 -- PIC Write Request Ram */ | ||
206 | uint64_t p_wr_req_lower[256]; /* 0x18000 - 0x187F8 */ | ||
207 | uint64_t p_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */ | ||
208 | uint64_t p_wr_req_parity[256]; /* 0x19000 - 0x197F8 */ | ||
209 | |||
210 | char _pad_019800[0x20000 - 0x019800]; | ||
211 | |||
212 | /* 0x020000-0x027FFF -- PCI Device Configuration Spaces */ | ||
213 | union { | ||
214 | uint8_t c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */ | ||
215 | uint16_t s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */ | ||
216 | uint32_t l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */ | ||
217 | uint64_t d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */ | ||
218 | union { | ||
219 | uint8_t c[0x100 / 1]; | ||
220 | uint16_t s[0x100 / 2]; | ||
221 | uint32_t l[0x100 / 4]; | ||
222 | uint64_t d[0x100 / 8]; | ||
223 | } f[8]; | ||
224 | } p_type0_cfg_dev[8]; /* 0x02{0000,,,7FFF} */ | ||
225 | |||
226 | /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */ | ||
227 | union { | ||
228 | uint8_t c[0x1000 / 1]; /* 0x028000-0x029000 */ | ||
229 | uint16_t s[0x1000 / 2]; /* 0x028000-0x029000 */ | ||
230 | uint32_t l[0x1000 / 4]; /* 0x028000-0x029000 */ | ||
231 | uint64_t d[0x1000 / 8]; /* 0x028000-0x029000 */ | ||
232 | union { | ||
233 | uint8_t c[0x100 / 1]; | ||
234 | uint16_t s[0x100 / 2]; | ||
235 | uint32_t l[0x100 / 4]; | ||
236 | uint64_t d[0x100 / 8]; | ||
237 | } f[8]; | ||
238 | } p_type1_cfg; /* 0x028000-0x029000 */ | ||
239 | |||
240 | char _pad_029000[0x030000-0x029000]; | ||
241 | |||
242 | /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */ | ||
243 | union { | ||
244 | uint8_t c[8 / 1]; | ||
245 | uint16_t s[8 / 2]; | ||
246 | uint32_t l[8 / 4]; | ||
247 | uint64_t d[8 / 8]; | ||
248 | } p_pci_iack; /* 0x030000-0x030007 */ | ||
249 | |||
250 | char _pad_030007[0x040000-0x030008]; | ||
251 | |||
252 | /* 0x040000-0x030007 -- PCIX Special Cycle */ | ||
253 | union { | ||
254 | uint8_t c[8 / 1]; | ||
255 | uint16_t s[8 / 2]; | ||
256 | uint32_t l[8 / 4]; | ||
257 | uint64_t d[8 / 8]; | ||
258 | } p_pcix_cycle; /* 0x040000-0x040007 */ | ||
259 | }; | ||
260 | |||
261 | #endif /* _ASM_IA64_SN_PCI_PIC_H */ | ||
diff --git a/include/asm-ia64/sn/shub_mmr.h b/include/asm-ia64/sn/shub_mmr.h index 323fa0cd8d83..7de1d1d4b71a 100644 --- a/include/asm-ia64/sn/shub_mmr.h +++ b/include/asm-ia64/sn/shub_mmr.h | |||
@@ -14,96 +14,98 @@ | |||
14 | /* Register "SH_IPI_INT" */ | 14 | /* Register "SH_IPI_INT" */ |
15 | /* SHub Inter-Processor Interrupt Registers */ | 15 | /* SHub Inter-Processor Interrupt Registers */ |
16 | /* ==================================================================== */ | 16 | /* ==================================================================== */ |
17 | #define SH1_IPI_INT 0x0000000110000380 | 17 | #define SH1_IPI_INT __IA64_UL_CONST(0x0000000110000380) |
18 | #define SH2_IPI_INT 0x0000000010000380 | 18 | #define SH2_IPI_INT __IA64_UL_CONST(0x0000000010000380) |
19 | 19 | ||
20 | /* SH_IPI_INT_TYPE */ | 20 | /* SH_IPI_INT_TYPE */ |
21 | /* Description: Type of Interrupt: 0=INT, 2=PMI, 4=NMI, 5=INIT */ | 21 | /* Description: Type of Interrupt: 0=INT, 2=PMI, 4=NMI, 5=INIT */ |
22 | #define SH_IPI_INT_TYPE_SHFT 0 | 22 | #define SH_IPI_INT_TYPE_SHFT 0 |
23 | #define SH_IPI_INT_TYPE_MASK 0x0000000000000007 | 23 | #define SH_IPI_INT_TYPE_MASK __IA64_UL_CONST(0x0000000000000007) |
24 | 24 | ||
25 | /* SH_IPI_INT_AGT */ | 25 | /* SH_IPI_INT_AGT */ |
26 | /* Description: Agent, must be 0 for SHub */ | 26 | /* Description: Agent, must be 0 for SHub */ |
27 | #define SH_IPI_INT_AGT_SHFT 3 | 27 | #define SH_IPI_INT_AGT_SHFT 3 |
28 | #define SH_IPI_INT_AGT_MASK 0x0000000000000008 | 28 | #define SH_IPI_INT_AGT_MASK __IA64_UL_CONST(0x0000000000000008) |
29 | 29 | ||
30 | /* SH_IPI_INT_PID */ | 30 | /* SH_IPI_INT_PID */ |
31 | /* Description: Processor ID, same setting as on targeted McKinley */ | 31 | /* Description: Processor ID, same setting as on targeted McKinley */ |
32 | #define SH_IPI_INT_PID_SHFT 4 | 32 | #define SH_IPI_INT_PID_SHFT 4 |
33 | #define SH_IPI_INT_PID_MASK 0x00000000000ffff0 | 33 | #define SH_IPI_INT_PID_MASK __IA64_UL_CONST(0x00000000000ffff0) |
34 | 34 | ||
35 | /* SH_IPI_INT_BASE */ | 35 | /* SH_IPI_INT_BASE */ |
36 | /* Description: Optional interrupt vector area, 2MB aligned */ | 36 | /* Description: Optional interrupt vector area, 2MB aligned */ |
37 | #define SH_IPI_INT_BASE_SHFT 21 | 37 | #define SH_IPI_INT_BASE_SHFT 21 |
38 | #define SH_IPI_INT_BASE_MASK 0x0003ffffffe00000 | 38 | #define SH_IPI_INT_BASE_MASK __IA64_UL_CONST(0x0003ffffffe00000) |
39 | 39 | ||
40 | /* SH_IPI_INT_IDX */ | 40 | /* SH_IPI_INT_IDX */ |
41 | /* Description: Targeted McKinley interrupt vector */ | 41 | /* Description: Targeted McKinley interrupt vector */ |
42 | #define SH_IPI_INT_IDX_SHFT 52 | 42 | #define SH_IPI_INT_IDX_SHFT 52 |
43 | #define SH_IPI_INT_IDX_MASK 0x0ff0000000000000 | 43 | #define SH_IPI_INT_IDX_MASK __IA64_UL_CONST(0x0ff0000000000000) |
44 | 44 | ||
45 | /* SH_IPI_INT_SEND */ | 45 | /* SH_IPI_INT_SEND */ |
46 | /* Description: Send Interrupt Message to PI, This generates a puls */ | 46 | /* Description: Send Interrupt Message to PI, This generates a puls */ |
47 | #define SH_IPI_INT_SEND_SHFT 63 | 47 | #define SH_IPI_INT_SEND_SHFT 63 |
48 | #define SH_IPI_INT_SEND_MASK 0x8000000000000000 | 48 | #define SH_IPI_INT_SEND_MASK __IA64_UL_CONST(0x8000000000000000) |
49 | 49 | ||
50 | /* ==================================================================== */ | 50 | /* ==================================================================== */ |
51 | /* Register "SH_EVENT_OCCURRED" */ | 51 | /* Register "SH_EVENT_OCCURRED" */ |
52 | /* SHub Interrupt Event Occurred */ | 52 | /* SHub Interrupt Event Occurred */ |
53 | /* ==================================================================== */ | 53 | /* ==================================================================== */ |
54 | #define SH1_EVENT_OCCURRED 0x0000000110010000 | 54 | #define SH1_EVENT_OCCURRED __IA64_UL_CONST(0x0000000110010000) |
55 | #define SH1_EVENT_OCCURRED_ALIAS 0x0000000110010008 | 55 | #define SH1_EVENT_OCCURRED_ALIAS __IA64_UL_CONST(0x0000000110010008) |
56 | #define SH2_EVENT_OCCURRED 0x0000000010010000 | 56 | #define SH2_EVENT_OCCURRED __IA64_UL_CONST(0x0000000010010000) |
57 | #define SH2_EVENT_OCCURRED_ALIAS 0x0000000010010008 | 57 | #define SH2_EVENT_OCCURRED_ALIAS __IA64_UL_CONST(0x0000000010010008) |
58 | 58 | ||
59 | /* ==================================================================== */ | 59 | /* ==================================================================== */ |
60 | /* Register "SH_PI_CAM_CONTROL" */ | 60 | /* Register "SH_PI_CAM_CONTROL" */ |
61 | /* CRB CAM MMR Access Control */ | 61 | /* CRB CAM MMR Access Control */ |
62 | /* ==================================================================== */ | 62 | /* ==================================================================== */ |
63 | #define SH1_PI_CAM_CONTROL 0x0000000120050300 | 63 | #define SH1_PI_CAM_CONTROL __IA64_UL_CONST(0x0000000120050300) |
64 | 64 | ||
65 | /* ==================================================================== */ | 65 | /* ==================================================================== */ |
66 | /* Register "SH_SHUB_ID" */ | 66 | /* Register "SH_SHUB_ID" */ |
67 | /* SHub ID Number */ | 67 | /* SHub ID Number */ |
68 | /* ==================================================================== */ | 68 | /* ==================================================================== */ |
69 | #define SH1_SHUB_ID 0x0000000110060580 | 69 | #define SH1_SHUB_ID __IA64_UL_CONST(0x0000000110060580) |
70 | #define SH1_SHUB_ID_REVISION_SHFT 28 | 70 | #define SH1_SHUB_ID_REVISION_SHFT 28 |
71 | #define SH1_SHUB_ID_REVISION_MASK 0x00000000f0000000 | 71 | #define SH1_SHUB_ID_REVISION_MASK __IA64_UL_CONST(0x00000000f0000000) |
72 | 72 | ||
73 | /* ==================================================================== */ | 73 | /* ==================================================================== */ |
74 | /* Register "SH_RTC" */ | 74 | /* Register "SH_RTC" */ |
75 | /* Real-time Clock */ | 75 | /* Real-time Clock */ |
76 | /* ==================================================================== */ | 76 | /* ==================================================================== */ |
77 | #define SH1_RTC 0x00000001101c0000 | 77 | #define SH1_RTC __IA64_UL_CONST(0x00000001101c0000) |
78 | #define SH2_RTC 0x00000002101c0000 | 78 | #define SH2_RTC __IA64_UL_CONST(0x00000002101c0000) |
79 | #define SH_RTC_MASK 0x007fffffffffffff | 79 | #define SH_RTC_MASK __IA64_UL_CONST(0x007fffffffffffff) |
80 | 80 | ||
81 | /* ==================================================================== */ | 81 | /* ==================================================================== */ |
82 | /* Register "SH_PIO_WRITE_STATUS_0|1" */ | 82 | /* Register "SH_PIO_WRITE_STATUS_0|1" */ |
83 | /* PIO Write Status for CPU 0 & 1 */ | 83 | /* PIO Write Status for CPU 0 & 1 */ |
84 | /* ==================================================================== */ | 84 | /* ==================================================================== */ |
85 | #define SH1_PIO_WRITE_STATUS_0 0x0000000120070200 | 85 | #define SH1_PIO_WRITE_STATUS_0 __IA64_UL_CONST(0x0000000120070200) |
86 | #define SH1_PIO_WRITE_STATUS_1 0x0000000120070280 | 86 | #define SH1_PIO_WRITE_STATUS_1 __IA64_UL_CONST(0x0000000120070280) |
87 | #define SH2_PIO_WRITE_STATUS_0 0x0000000020070200 | 87 | #define SH2_PIO_WRITE_STATUS_0 __IA64_UL_CONST(0x0000000020070200) |
88 | #define SH2_PIO_WRITE_STATUS_1 0x0000000020070280 | 88 | #define SH2_PIO_WRITE_STATUS_1 __IA64_UL_CONST(0x0000000020070280) |
89 | #define SH2_PIO_WRITE_STATUS_2 0x0000000020070300 | 89 | #define SH2_PIO_WRITE_STATUS_2 __IA64_UL_CONST(0x0000000020070300) |
90 | #define SH2_PIO_WRITE_STATUS_3 0x0000000020070380 | 90 | #define SH2_PIO_WRITE_STATUS_3 __IA64_UL_CONST(0x0000000020070380) |
91 | 91 | ||
92 | /* SH_PIO_WRITE_STATUS_0_WRITE_DEADLOCK */ | 92 | /* SH_PIO_WRITE_STATUS_0_WRITE_DEADLOCK */ |
93 | /* Description: Deadlock response detected */ | 93 | /* Description: Deadlock response detected */ |
94 | #define SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_SHFT 1 | 94 | #define SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_SHFT 1 |
95 | #define SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_MASK 0x0000000000000002 | 95 | #define SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_MASK \ |
96 | __IA64_UL_CONST(0x0000000000000002) | ||
96 | 97 | ||
97 | /* SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT */ | 98 | /* SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT */ |
98 | /* Description: Count of currently pending PIO writes */ | 99 | /* Description: Count of currently pending PIO writes */ |
99 | #define SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_SHFT 56 | 100 | #define SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_SHFT 56 |
100 | #define SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK 0x3f00000000000000 | 101 | #define SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK \ |
102 | __IA64_UL_CONST(0x3f00000000000000) | ||
101 | 103 | ||
102 | /* ==================================================================== */ | 104 | /* ==================================================================== */ |
103 | /* Register "SH_PIO_WRITE_STATUS_0_ALIAS" */ | 105 | /* Register "SH_PIO_WRITE_STATUS_0_ALIAS" */ |
104 | /* ==================================================================== */ | 106 | /* ==================================================================== */ |
105 | #define SH1_PIO_WRITE_STATUS_0_ALIAS 0x0000000120070208 | 107 | #define SH1_PIO_WRITE_STATUS_0_ALIAS __IA64_UL_CONST(0x0000000120070208) |
106 | #define SH2_PIO_WRITE_STATUS_0_ALIAS 0x0000000020070208 | 108 | #define SH2_PIO_WRITE_STATUS_0_ALIAS __IA64_UL_CONST(0x0000000020070208) |
107 | 109 | ||
108 | /* ==================================================================== */ | 110 | /* ==================================================================== */ |
109 | /* Register "SH_EVENT_OCCURRED" */ | 111 | /* Register "SH_EVENT_OCCURRED" */ |
@@ -111,33 +113,33 @@ | |||
111 | /* ==================================================================== */ | 113 | /* ==================================================================== */ |
112 | /* SH_EVENT_OCCURRED_UART_INT */ | 114 | /* SH_EVENT_OCCURRED_UART_INT */ |
113 | /* Description: Pending Junk Bus UART Interrupt */ | 115 | /* Description: Pending Junk Bus UART Interrupt */ |
114 | #define SH_EVENT_OCCURRED_UART_INT_SHFT 20 | 116 | #define SH_EVENT_OCCURRED_UART_INT_SHFT 20 |
115 | #define SH_EVENT_OCCURRED_UART_INT_MASK 0x0000000000100000 | 117 | #define SH_EVENT_OCCURRED_UART_INT_MASK __IA64_UL_CONST(0x0000000000100000) |
116 | 118 | ||
117 | /* SH_EVENT_OCCURRED_IPI_INT */ | 119 | /* SH_EVENT_OCCURRED_IPI_INT */ |
118 | /* Description: Pending IPI Interrupt */ | 120 | /* Description: Pending IPI Interrupt */ |
119 | #define SH_EVENT_OCCURRED_IPI_INT_SHFT 28 | 121 | #define SH_EVENT_OCCURRED_IPI_INT_SHFT 28 |
120 | #define SH_EVENT_OCCURRED_IPI_INT_MASK 0x0000000010000000 | 122 | #define SH_EVENT_OCCURRED_IPI_INT_MASK __IA64_UL_CONST(0x0000000010000000) |
121 | 123 | ||
122 | /* SH_EVENT_OCCURRED_II_INT0 */ | 124 | /* SH_EVENT_OCCURRED_II_INT0 */ |
123 | /* Description: Pending II 0 Interrupt */ | 125 | /* Description: Pending II 0 Interrupt */ |
124 | #define SH_EVENT_OCCURRED_II_INT0_SHFT 29 | 126 | #define SH_EVENT_OCCURRED_II_INT0_SHFT 29 |
125 | #define SH_EVENT_OCCURRED_II_INT0_MASK 0x0000000020000000 | 127 | #define SH_EVENT_OCCURRED_II_INT0_MASK __IA64_UL_CONST(0x0000000020000000) |
126 | 128 | ||
127 | /* SH_EVENT_OCCURRED_II_INT1 */ | 129 | /* SH_EVENT_OCCURRED_II_INT1 */ |
128 | /* Description: Pending II 1 Interrupt */ | 130 | /* Description: Pending II 1 Interrupt */ |
129 | #define SH_EVENT_OCCURRED_II_INT1_SHFT 30 | 131 | #define SH_EVENT_OCCURRED_II_INT1_SHFT 30 |
130 | #define SH_EVENT_OCCURRED_II_INT1_MASK 0x0000000040000000 | 132 | #define SH_EVENT_OCCURRED_II_INT1_MASK __IA64_UL_CONST(0x0000000040000000) |
131 | 133 | ||
132 | /* SH2_EVENT_OCCURRED_EXTIO_INT2 */ | 134 | /* SH2_EVENT_OCCURRED_EXTIO_INT2 */ |
133 | /* Description: Pending SHUB 2 EXT IO INT2 */ | 135 | /* Description: Pending SHUB 2 EXT IO INT2 */ |
134 | #define SH2_EVENT_OCCURRED_EXTIO_INT2_SHFT 33 | 136 | #define SH2_EVENT_OCCURRED_EXTIO_INT2_SHFT 33 |
135 | #define SH2_EVENT_OCCURRED_EXTIO_INT2_MASK 0x0000000200000000 | 137 | #define SH2_EVENT_OCCURRED_EXTIO_INT2_MASK __IA64_UL_CONST(0x0000000200000000) |
136 | 138 | ||
137 | /* SH2_EVENT_OCCURRED_EXTIO_INT3 */ | 139 | /* SH2_EVENT_OCCURRED_EXTIO_INT3 */ |
138 | /* Description: Pending SHUB 2 EXT IO INT3 */ | 140 | /* Description: Pending SHUB 2 EXT IO INT3 */ |
139 | #define SH2_EVENT_OCCURRED_EXTIO_INT3_SHFT 34 | 141 | #define SH2_EVENT_OCCURRED_EXTIO_INT3_SHFT 34 |
140 | #define SH2_EVENT_OCCURRED_EXTIO_INT3_MASK 0x0000000400000000 | 142 | #define SH2_EVENT_OCCURRED_EXTIO_INT3_MASK __IA64_UL_CONST(0x0000000400000000) |
141 | 143 | ||
142 | #define SH_ALL_INT_MASK \ | 144 | #define SH_ALL_INT_MASK \ |
143 | (SH_EVENT_OCCURRED_UART_INT_MASK | SH_EVENT_OCCURRED_IPI_INT_MASK | \ | 145 | (SH_EVENT_OCCURRED_UART_INT_MASK | SH_EVENT_OCCURRED_IPI_INT_MASK | \ |
@@ -149,310 +151,310 @@ | |||
149 | /* ==================================================================== */ | 151 | /* ==================================================================== */ |
150 | /* LEDS */ | 152 | /* LEDS */ |
151 | /* ==================================================================== */ | 153 | /* ==================================================================== */ |
152 | #define SH1_REAL_JUNK_BUS_LED0 0x7fed00000UL | 154 | #define SH1_REAL_JUNK_BUS_LED0 0x7fed00000UL |
153 | #define SH1_REAL_JUNK_BUS_LED1 0x7fed10000UL | 155 | #define SH1_REAL_JUNK_BUS_LED1 0x7fed10000UL |
154 | #define SH1_REAL_JUNK_BUS_LED2 0x7fed20000UL | 156 | #define SH1_REAL_JUNK_BUS_LED2 0x7fed20000UL |
155 | #define SH1_REAL_JUNK_BUS_LED3 0x7fed30000UL | 157 | #define SH1_REAL_JUNK_BUS_LED3 0x7fed30000UL |
156 | 158 | ||
157 | #define SH2_REAL_JUNK_BUS_LED0 0xf0000000UL | 159 | #define SH2_REAL_JUNK_BUS_LED0 0xf0000000UL |
158 | #define SH2_REAL_JUNK_BUS_LED1 0xf0010000UL | 160 | #define SH2_REAL_JUNK_BUS_LED1 0xf0010000UL |
159 | #define SH2_REAL_JUNK_BUS_LED2 0xf0020000UL | 161 | #define SH2_REAL_JUNK_BUS_LED2 0xf0020000UL |
160 | #define SH2_REAL_JUNK_BUS_LED3 0xf0030000UL | 162 | #define SH2_REAL_JUNK_BUS_LED3 0xf0030000UL |
161 | 163 | ||
162 | /* ==================================================================== */ | 164 | /* ==================================================================== */ |
163 | /* Register "SH1_PTC_0" */ | 165 | /* Register "SH1_PTC_0" */ |
164 | /* Puge Translation Cache Message Configuration Information */ | 166 | /* Puge Translation Cache Message Configuration Information */ |
165 | /* ==================================================================== */ | 167 | /* ==================================================================== */ |
166 | #define SH1_PTC_0 0x00000001101a0000 | 168 | #define SH1_PTC_0 __IA64_UL_CONST(0x00000001101a0000) |
167 | 169 | ||
168 | /* SH1_PTC_0_A */ | 170 | /* SH1_PTC_0_A */ |
169 | /* Description: Type */ | 171 | /* Description: Type */ |
170 | #define SH1_PTC_0_A_SHFT 0 | 172 | #define SH1_PTC_0_A_SHFT 0 |
171 | 173 | ||
172 | /* SH1_PTC_0_PS */ | 174 | /* SH1_PTC_0_PS */ |
173 | /* Description: Page Size */ | 175 | /* Description: Page Size */ |
174 | #define SH1_PTC_0_PS_SHFT 2 | 176 | #define SH1_PTC_0_PS_SHFT 2 |
175 | 177 | ||
176 | /* SH1_PTC_0_RID */ | 178 | /* SH1_PTC_0_RID */ |
177 | /* Description: Region ID */ | 179 | /* Description: Region ID */ |
178 | #define SH1_PTC_0_RID_SHFT 8 | 180 | #define SH1_PTC_0_RID_SHFT 8 |
179 | 181 | ||
180 | /* SH1_PTC_0_START */ | 182 | /* SH1_PTC_0_START */ |
181 | /* Description: Start */ | 183 | /* Description: Start */ |
182 | #define SH1_PTC_0_START_SHFT 63 | 184 | #define SH1_PTC_0_START_SHFT 63 |
183 | 185 | ||
184 | /* ==================================================================== */ | 186 | /* ==================================================================== */ |
185 | /* Register "SH1_PTC_1" */ | 187 | /* Register "SH1_PTC_1" */ |
186 | /* Puge Translation Cache Message Configuration Information */ | 188 | /* Puge Translation Cache Message Configuration Information */ |
187 | /* ==================================================================== */ | 189 | /* ==================================================================== */ |
188 | #define SH1_PTC_1 0x00000001101a0080 | 190 | #define SH1_PTC_1 __IA64_UL_CONST(0x00000001101a0080) |
189 | 191 | ||
190 | /* SH1_PTC_1_START */ | 192 | /* SH1_PTC_1_START */ |
191 | /* Description: PTC_1 Start */ | 193 | /* Description: PTC_1 Start */ |
192 | #define SH1_PTC_1_START_SHFT 63 | 194 | #define SH1_PTC_1_START_SHFT 63 |
193 | |||
194 | 195 | ||
195 | /* ==================================================================== */ | 196 | /* ==================================================================== */ |
196 | /* Register "SH2_PTC" */ | 197 | /* Register "SH2_PTC" */ |
197 | /* Puge Translation Cache Message Configuration Information */ | 198 | /* Puge Translation Cache Message Configuration Information */ |
198 | /* ==================================================================== */ | 199 | /* ==================================================================== */ |
199 | #define SH2_PTC 0x0000000170000000 | 200 | #define SH2_PTC __IA64_UL_CONST(0x0000000170000000) |
200 | 201 | ||
201 | /* SH2_PTC_A */ | 202 | /* SH2_PTC_A */ |
202 | /* Description: Type */ | 203 | /* Description: Type */ |
203 | #define SH2_PTC_A_SHFT 0 | 204 | #define SH2_PTC_A_SHFT 0 |
204 | 205 | ||
205 | /* SH2_PTC_PS */ | 206 | /* SH2_PTC_PS */ |
206 | /* Description: Page Size */ | 207 | /* Description: Page Size */ |
207 | #define SH2_PTC_PS_SHFT 2 | 208 | #define SH2_PTC_PS_SHFT 2 |
208 | 209 | ||
209 | /* SH2_PTC_RID */ | 210 | /* SH2_PTC_RID */ |
210 | /* Description: Region ID */ | 211 | /* Description: Region ID */ |
211 | #define SH2_PTC_RID_SHFT 4 | 212 | #define SH2_PTC_RID_SHFT 4 |
212 | 213 | ||
213 | /* SH2_PTC_START */ | 214 | /* SH2_PTC_START */ |
214 | /* Description: Start */ | 215 | /* Description: Start */ |
215 | #define SH2_PTC_START_SHFT 63 | 216 | #define SH2_PTC_START_SHFT 63 |
216 | 217 | ||
217 | /* SH2_PTC_ADDR_RID */ | 218 | /* SH2_PTC_ADDR_RID */ |
218 | /* Description: Region ID */ | 219 | /* Description: Region ID */ |
219 | #define SH2_PTC_ADDR_SHFT 4 | 220 | #define SH2_PTC_ADDR_SHFT 4 |
220 | #define SH2_PTC_ADDR_MASK 0x1ffffffffffff000 | 221 | #define SH2_PTC_ADDR_MASK __IA64_UL_CONST(0x1ffffffffffff000) |
221 | 222 | ||
222 | /* ==================================================================== */ | 223 | /* ==================================================================== */ |
223 | /* Register "SH_RTC1_INT_CONFIG" */ | 224 | /* Register "SH_RTC1_INT_CONFIG" */ |
224 | /* SHub RTC 1 Interrupt Config Registers */ | 225 | /* SHub RTC 1 Interrupt Config Registers */ |
225 | /* ==================================================================== */ | 226 | /* ==================================================================== */ |
226 | 227 | ||
227 | #define SH1_RTC1_INT_CONFIG 0x0000000110001480 | 228 | #define SH1_RTC1_INT_CONFIG __IA64_UL_CONST(0x0000000110001480) |
228 | #define SH2_RTC1_INT_CONFIG 0x0000000010001480 | 229 | #define SH2_RTC1_INT_CONFIG __IA64_UL_CONST(0x0000000010001480) |
229 | #define SH_RTC1_INT_CONFIG_MASK 0x0ff3ffffffefffff | 230 | #define SH_RTC1_INT_CONFIG_MASK __IA64_UL_CONST(0x0ff3ffffffefffff) |
230 | #define SH_RTC1_INT_CONFIG_INIT 0x0000000000000000 | 231 | #define SH_RTC1_INT_CONFIG_INIT __IA64_UL_CONST(0x0000000000000000) |
231 | 232 | ||
232 | /* SH_RTC1_INT_CONFIG_TYPE */ | 233 | /* SH_RTC1_INT_CONFIG_TYPE */ |
233 | /* Description: Type of Interrupt: 0=INT, 2=PMI, 4=NMI, 5=INIT */ | 234 | /* Description: Type of Interrupt: 0=INT, 2=PMI, 4=NMI, 5=INIT */ |
234 | #define SH_RTC1_INT_CONFIG_TYPE_SHFT 0 | 235 | #define SH_RTC1_INT_CONFIG_TYPE_SHFT 0 |
235 | #define SH_RTC1_INT_CONFIG_TYPE_MASK 0x0000000000000007 | 236 | #define SH_RTC1_INT_CONFIG_TYPE_MASK __IA64_UL_CONST(0x0000000000000007) |
236 | 237 | ||
237 | /* SH_RTC1_INT_CONFIG_AGT */ | 238 | /* SH_RTC1_INT_CONFIG_AGT */ |
238 | /* Description: Agent, must be 0 for SHub */ | 239 | /* Description: Agent, must be 0 for SHub */ |
239 | #define SH_RTC1_INT_CONFIG_AGT_SHFT 3 | 240 | #define SH_RTC1_INT_CONFIG_AGT_SHFT 3 |
240 | #define SH_RTC1_INT_CONFIG_AGT_MASK 0x0000000000000008 | 241 | #define SH_RTC1_INT_CONFIG_AGT_MASK __IA64_UL_CONST(0x0000000000000008) |
241 | 242 | ||
242 | /* SH_RTC1_INT_CONFIG_PID */ | 243 | /* SH_RTC1_INT_CONFIG_PID */ |
243 | /* Description: Processor ID, same setting as on targeted McKinley */ | 244 | /* Description: Processor ID, same setting as on targeted McKinley */ |
244 | #define SH_RTC1_INT_CONFIG_PID_SHFT 4 | 245 | #define SH_RTC1_INT_CONFIG_PID_SHFT 4 |
245 | #define SH_RTC1_INT_CONFIG_PID_MASK 0x00000000000ffff0 | 246 | #define SH_RTC1_INT_CONFIG_PID_MASK __IA64_UL_CONST(0x00000000000ffff0) |
246 | 247 | ||
247 | /* SH_RTC1_INT_CONFIG_BASE */ | 248 | /* SH_RTC1_INT_CONFIG_BASE */ |
248 | /* Description: Optional interrupt vector area, 2MB aligned */ | 249 | /* Description: Optional interrupt vector area, 2MB aligned */ |
249 | #define SH_RTC1_INT_CONFIG_BASE_SHFT 21 | 250 | #define SH_RTC1_INT_CONFIG_BASE_SHFT 21 |
250 | #define SH_RTC1_INT_CONFIG_BASE_MASK 0x0003ffffffe00000 | 251 | #define SH_RTC1_INT_CONFIG_BASE_MASK __IA64_UL_CONST(0x0003ffffffe00000) |
251 | 252 | ||
252 | /* SH_RTC1_INT_CONFIG_IDX */ | 253 | /* SH_RTC1_INT_CONFIG_IDX */ |
253 | /* Description: Targeted McKinley interrupt vector */ | 254 | /* Description: Targeted McKinley interrupt vector */ |
254 | #define SH_RTC1_INT_CONFIG_IDX_SHFT 52 | 255 | #define SH_RTC1_INT_CONFIG_IDX_SHFT 52 |
255 | #define SH_RTC1_INT_CONFIG_IDX_MASK 0x0ff0000000000000 | 256 | #define SH_RTC1_INT_CONFIG_IDX_MASK __IA64_UL_CONST(0x0ff0000000000000) |
256 | 257 | ||
257 | /* ==================================================================== */ | 258 | /* ==================================================================== */ |
258 | /* Register "SH_RTC1_INT_ENABLE" */ | 259 | /* Register "SH_RTC1_INT_ENABLE" */ |
259 | /* SHub RTC 1 Interrupt Enable Registers */ | 260 | /* SHub RTC 1 Interrupt Enable Registers */ |
260 | /* ==================================================================== */ | 261 | /* ==================================================================== */ |
261 | 262 | ||
262 | #define SH1_RTC1_INT_ENABLE 0x0000000110001500 | 263 | #define SH1_RTC1_INT_ENABLE __IA64_UL_CONST(0x0000000110001500) |
263 | #define SH2_RTC1_INT_ENABLE 0x0000000010001500 | 264 | #define SH2_RTC1_INT_ENABLE __IA64_UL_CONST(0x0000000010001500) |
264 | #define SH_RTC1_INT_ENABLE_MASK 0x0000000000000001 | 265 | #define SH_RTC1_INT_ENABLE_MASK __IA64_UL_CONST(0x0000000000000001) |
265 | #define SH_RTC1_INT_ENABLE_INIT 0x0000000000000000 | 266 | #define SH_RTC1_INT_ENABLE_INIT __IA64_UL_CONST(0x0000000000000000) |
266 | 267 | ||
267 | /* SH_RTC1_INT_ENABLE_RTC1_ENABLE */ | 268 | /* SH_RTC1_INT_ENABLE_RTC1_ENABLE */ |
268 | /* Description: Enable RTC 1 Interrupt */ | 269 | /* Description: Enable RTC 1 Interrupt */ |
269 | #define SH_RTC1_INT_ENABLE_RTC1_ENABLE_SHFT 0 | 270 | #define SH_RTC1_INT_ENABLE_RTC1_ENABLE_SHFT 0 |
270 | #define SH_RTC1_INT_ENABLE_RTC1_ENABLE_MASK 0x0000000000000001 | 271 | #define SH_RTC1_INT_ENABLE_RTC1_ENABLE_MASK \ |
272 | __IA64_UL_CONST(0x0000000000000001) | ||
271 | 273 | ||
272 | /* ==================================================================== */ | 274 | /* ==================================================================== */ |
273 | /* Register "SH_RTC2_INT_CONFIG" */ | 275 | /* Register "SH_RTC2_INT_CONFIG" */ |
274 | /* SHub RTC 2 Interrupt Config Registers */ | 276 | /* SHub RTC 2 Interrupt Config Registers */ |
275 | /* ==================================================================== */ | 277 | /* ==================================================================== */ |
276 | 278 | ||
277 | #define SH1_RTC2_INT_CONFIG 0x0000000110001580 | 279 | #define SH1_RTC2_INT_CONFIG __IA64_UL_CONST(0x0000000110001580) |
278 | #define SH2_RTC2_INT_CONFIG 0x0000000010001580 | 280 | #define SH2_RTC2_INT_CONFIG __IA64_UL_CONST(0x0000000010001580) |
279 | #define SH_RTC2_INT_CONFIG_MASK 0x0ff3ffffffefffff | 281 | #define SH_RTC2_INT_CONFIG_MASK __IA64_UL_CONST(0x0ff3ffffffefffff) |
280 | #define SH_RTC2_INT_CONFIG_INIT 0x0000000000000000 | 282 | #define SH_RTC2_INT_CONFIG_INIT __IA64_UL_CONST(0x0000000000000000) |
281 | 283 | ||
282 | /* SH_RTC2_INT_CONFIG_TYPE */ | 284 | /* SH_RTC2_INT_CONFIG_TYPE */ |
283 | /* Description: Type of Interrupt: 0=INT, 2=PMI, 4=NMI, 5=INIT */ | 285 | /* Description: Type of Interrupt: 0=INT, 2=PMI, 4=NMI, 5=INIT */ |
284 | #define SH_RTC2_INT_CONFIG_TYPE_SHFT 0 | 286 | #define SH_RTC2_INT_CONFIG_TYPE_SHFT 0 |
285 | #define SH_RTC2_INT_CONFIG_TYPE_MASK 0x0000000000000007 | 287 | #define SH_RTC2_INT_CONFIG_TYPE_MASK __IA64_UL_CONST(0x0000000000000007) |
286 | 288 | ||
287 | /* SH_RTC2_INT_CONFIG_AGT */ | 289 | /* SH_RTC2_INT_CONFIG_AGT */ |
288 | /* Description: Agent, must be 0 for SHub */ | 290 | /* Description: Agent, must be 0 for SHub */ |
289 | #define SH_RTC2_INT_CONFIG_AGT_SHFT 3 | 291 | #define SH_RTC2_INT_CONFIG_AGT_SHFT 3 |
290 | #define SH_RTC2_INT_CONFIG_AGT_MASK 0x0000000000000008 | 292 | #define SH_RTC2_INT_CONFIG_AGT_MASK __IA64_UL_CONST(0x0000000000000008) |
291 | 293 | ||
292 | /* SH_RTC2_INT_CONFIG_PID */ | 294 | /* SH_RTC2_INT_CONFIG_PID */ |
293 | /* Description: Processor ID, same setting as on targeted McKinley */ | 295 | /* Description: Processor ID, same setting as on targeted McKinley */ |
294 | #define SH_RTC2_INT_CONFIG_PID_SHFT 4 | 296 | #define SH_RTC2_INT_CONFIG_PID_SHFT 4 |
295 | #define SH_RTC2_INT_CONFIG_PID_MASK 0x00000000000ffff0 | 297 | #define SH_RTC2_INT_CONFIG_PID_MASK __IA64_UL_CONST(0x00000000000ffff0) |
296 | 298 | ||
297 | /* SH_RTC2_INT_CONFIG_BASE */ | 299 | /* SH_RTC2_INT_CONFIG_BASE */ |
298 | /* Description: Optional interrupt vector area, 2MB aligned */ | 300 | /* Description: Optional interrupt vector area, 2MB aligned */ |
299 | #define SH_RTC2_INT_CONFIG_BASE_SHFT 21 | 301 | #define SH_RTC2_INT_CONFIG_BASE_SHFT 21 |
300 | #define SH_RTC2_INT_CONFIG_BASE_MASK 0x0003ffffffe00000 | 302 | #define SH_RTC2_INT_CONFIG_BASE_MASK __IA64_UL_CONST(0x0003ffffffe00000) |
301 | 303 | ||
302 | /* SH_RTC2_INT_CONFIG_IDX */ | 304 | /* SH_RTC2_INT_CONFIG_IDX */ |
303 | /* Description: Targeted McKinley interrupt vector */ | 305 | /* Description: Targeted McKinley interrupt vector */ |
304 | #define SH_RTC2_INT_CONFIG_IDX_SHFT 52 | 306 | #define SH_RTC2_INT_CONFIG_IDX_SHFT 52 |
305 | #define SH_RTC2_INT_CONFIG_IDX_MASK 0x0ff0000000000000 | 307 | #define SH_RTC2_INT_CONFIG_IDX_MASK __IA64_UL_CONST(0x0ff0000000000000) |
306 | 308 | ||
307 | /* ==================================================================== */ | 309 | /* ==================================================================== */ |
308 | /* Register "SH_RTC2_INT_ENABLE" */ | 310 | /* Register "SH_RTC2_INT_ENABLE" */ |
309 | /* SHub RTC 2 Interrupt Enable Registers */ | 311 | /* SHub RTC 2 Interrupt Enable Registers */ |
310 | /* ==================================================================== */ | 312 | /* ==================================================================== */ |
311 | 313 | ||
312 | #define SH1_RTC2_INT_ENABLE 0x0000000110001600 | 314 | #define SH1_RTC2_INT_ENABLE __IA64_UL_CONST(0x0000000110001600) |
313 | #define SH2_RTC2_INT_ENABLE 0x0000000010001600 | 315 | #define SH2_RTC2_INT_ENABLE __IA64_UL_CONST(0x0000000010001600) |
314 | #define SH_RTC2_INT_ENABLE_MASK 0x0000000000000001 | 316 | #define SH_RTC2_INT_ENABLE_MASK __IA64_UL_CONST(0x0000000000000001) |
315 | #define SH_RTC2_INT_ENABLE_INIT 0x0000000000000000 | 317 | #define SH_RTC2_INT_ENABLE_INIT __IA64_UL_CONST(0x0000000000000000) |
316 | 318 | ||
317 | /* SH_RTC2_INT_ENABLE_RTC2_ENABLE */ | 319 | /* SH_RTC2_INT_ENABLE_RTC2_ENABLE */ |
318 | /* Description: Enable RTC 2 Interrupt */ | 320 | /* Description: Enable RTC 2 Interrupt */ |
319 | #define SH_RTC2_INT_ENABLE_RTC2_ENABLE_SHFT 0 | 321 | #define SH_RTC2_INT_ENABLE_RTC2_ENABLE_SHFT 0 |
320 | #define SH_RTC2_INT_ENABLE_RTC2_ENABLE_MASK 0x0000000000000001 | 322 | #define SH_RTC2_INT_ENABLE_RTC2_ENABLE_MASK \ |
323 | __IA64_UL_CONST(0x0000000000000001) | ||
321 | 324 | ||
322 | /* ==================================================================== */ | 325 | /* ==================================================================== */ |
323 | /* Register "SH_RTC3_INT_CONFIG" */ | 326 | /* Register "SH_RTC3_INT_CONFIG" */ |
324 | /* SHub RTC 3 Interrupt Config Registers */ | 327 | /* SHub RTC 3 Interrupt Config Registers */ |
325 | /* ==================================================================== */ | 328 | /* ==================================================================== */ |
326 | 329 | ||
327 | #define SH1_RTC3_INT_CONFIG 0x0000000110001680 | 330 | #define SH1_RTC3_INT_CONFIG __IA64_UL_CONST(0x0000000110001680) |
328 | #define SH2_RTC3_INT_CONFIG 0x0000000010001680 | 331 | #define SH2_RTC3_INT_CONFIG __IA64_UL_CONST(0x0000000010001680) |
329 | #define SH_RTC3_INT_CONFIG_MASK 0x0ff3ffffffefffff | 332 | #define SH_RTC3_INT_CONFIG_MASK __IA64_UL_CONST(0x0ff3ffffffefffff) |
330 | #define SH_RTC3_INT_CONFIG_INIT 0x0000000000000000 | 333 | #define SH_RTC3_INT_CONFIG_INIT __IA64_UL_CONST(0x0000000000000000) |
331 | 334 | ||
332 | /* SH_RTC3_INT_CONFIG_TYPE */ | 335 | /* SH_RTC3_INT_CONFIG_TYPE */ |
333 | /* Description: Type of Interrupt: 0=INT, 2=PMI, 4=NMI, 5=INIT */ | 336 | /* Description: Type of Interrupt: 0=INT, 2=PMI, 4=NMI, 5=INIT */ |
334 | #define SH_RTC3_INT_CONFIG_TYPE_SHFT 0 | 337 | #define SH_RTC3_INT_CONFIG_TYPE_SHFT 0 |
335 | #define SH_RTC3_INT_CONFIG_TYPE_MASK 0x0000000000000007 | 338 | #define SH_RTC3_INT_CONFIG_TYPE_MASK __IA64_UL_CONST(0x0000000000000007) |
336 | 339 | ||
337 | /* SH_RTC3_INT_CONFIG_AGT */ | 340 | /* SH_RTC3_INT_CONFIG_AGT */ |
338 | /* Description: Agent, must be 0 for SHub */ | 341 | /* Description: Agent, must be 0 for SHub */ |
339 | #define SH_RTC3_INT_CONFIG_AGT_SHFT 3 | 342 | #define SH_RTC3_INT_CONFIG_AGT_SHFT 3 |
340 | #define SH_RTC3_INT_CONFIG_AGT_MASK 0x0000000000000008 | 343 | #define SH_RTC3_INT_CONFIG_AGT_MASK __IA64_UL_CONST(0x0000000000000008) |
341 | 344 | ||
342 | /* SH_RTC3_INT_CONFIG_PID */ | 345 | /* SH_RTC3_INT_CONFIG_PID */ |
343 | /* Description: Processor ID, same setting as on targeted McKinley */ | 346 | /* Description: Processor ID, same setting as on targeted McKinley */ |
344 | #define SH_RTC3_INT_CONFIG_PID_SHFT 4 | 347 | #define SH_RTC3_INT_CONFIG_PID_SHFT 4 |
345 | #define SH_RTC3_INT_CONFIG_PID_MASK 0x00000000000ffff0 | 348 | #define SH_RTC3_INT_CONFIG_PID_MASK __IA64_UL_CONST(0x00000000000ffff0) |
346 | 349 | ||
347 | /* SH_RTC3_INT_CONFIG_BASE */ | 350 | /* SH_RTC3_INT_CONFIG_BASE */ |
348 | /* Description: Optional interrupt vector area, 2MB aligned */ | 351 | /* Description: Optional interrupt vector area, 2MB aligned */ |
349 | #define SH_RTC3_INT_CONFIG_BASE_SHFT 21 | 352 | #define SH_RTC3_INT_CONFIG_BASE_SHFT 21 |
350 | #define SH_RTC3_INT_CONFIG_BASE_MASK 0x0003ffffffe00000 | 353 | #define SH_RTC3_INT_CONFIG_BASE_MASK __IA64_UL_CONST(0x0003ffffffe00000) |
351 | 354 | ||
352 | /* SH_RTC3_INT_CONFIG_IDX */ | 355 | /* SH_RTC3_INT_CONFIG_IDX */ |
353 | /* Description: Targeted McKinley interrupt vector */ | 356 | /* Description: Targeted McKinley interrupt vector */ |
354 | #define SH_RTC3_INT_CONFIG_IDX_SHFT 52 | 357 | #define SH_RTC3_INT_CONFIG_IDX_SHFT 52 |
355 | #define SH_RTC3_INT_CONFIG_IDX_MASK 0x0ff0000000000000 | 358 | #define SH_RTC3_INT_CONFIG_IDX_MASK __IA64_UL_CONST(0x0ff0000000000000) |
356 | 359 | ||
357 | /* ==================================================================== */ | 360 | /* ==================================================================== */ |
358 | /* Register "SH_RTC3_INT_ENABLE" */ | 361 | /* Register "SH_RTC3_INT_ENABLE" */ |
359 | /* SHub RTC 3 Interrupt Enable Registers */ | 362 | /* SHub RTC 3 Interrupt Enable Registers */ |
360 | /* ==================================================================== */ | 363 | /* ==================================================================== */ |
361 | 364 | ||
362 | #define SH1_RTC3_INT_ENABLE 0x0000000110001700 | 365 | #define SH1_RTC3_INT_ENABLE __IA64_UL_CONST(0x0000000110001700) |
363 | #define SH2_RTC3_INT_ENABLE 0x0000000010001700 | 366 | #define SH2_RTC3_INT_ENABLE __IA64_UL_CONST(0x0000000010001700) |
364 | #define SH_RTC3_INT_ENABLE_MASK 0x0000000000000001 | 367 | #define SH_RTC3_INT_ENABLE_MASK __IA64_UL_CONST(0x0000000000000001) |
365 | #define SH_RTC3_INT_ENABLE_INIT 0x0000000000000000 | 368 | #define SH_RTC3_INT_ENABLE_INIT __IA64_UL_CONST(0x0000000000000000) |
366 | 369 | ||
367 | /* SH_RTC3_INT_ENABLE_RTC3_ENABLE */ | 370 | /* SH_RTC3_INT_ENABLE_RTC3_ENABLE */ |
368 | /* Description: Enable RTC 3 Interrupt */ | 371 | /* Description: Enable RTC 3 Interrupt */ |
369 | #define SH_RTC3_INT_ENABLE_RTC3_ENABLE_SHFT 0 | 372 | #define SH_RTC3_INT_ENABLE_RTC3_ENABLE_SHFT 0 |
370 | #define SH_RTC3_INT_ENABLE_RTC3_ENABLE_MASK 0x0000000000000001 | 373 | #define SH_RTC3_INT_ENABLE_RTC3_ENABLE_MASK \ |
374 | __IA64_UL_CONST(0x0000000000000001) | ||
371 | 375 | ||
372 | /* SH_EVENT_OCCURRED_RTC1_INT */ | 376 | /* SH_EVENT_OCCURRED_RTC1_INT */ |
373 | /* Description: Pending RTC 1 Interrupt */ | 377 | /* Description: Pending RTC 1 Interrupt */ |
374 | #define SH_EVENT_OCCURRED_RTC1_INT_SHFT 24 | 378 | #define SH_EVENT_OCCURRED_RTC1_INT_SHFT 24 |
375 | #define SH_EVENT_OCCURRED_RTC1_INT_MASK 0x0000000001000000 | 379 | #define SH_EVENT_OCCURRED_RTC1_INT_MASK __IA64_UL_CONST(0x0000000001000000) |
376 | 380 | ||
377 | /* SH_EVENT_OCCURRED_RTC2_INT */ | 381 | /* SH_EVENT_OCCURRED_RTC2_INT */ |
378 | /* Description: Pending RTC 2 Interrupt */ | 382 | /* Description: Pending RTC 2 Interrupt */ |
379 | #define SH_EVENT_OCCURRED_RTC2_INT_SHFT 25 | 383 | #define SH_EVENT_OCCURRED_RTC2_INT_SHFT 25 |
380 | #define SH_EVENT_OCCURRED_RTC2_INT_MASK 0x0000000002000000 | 384 | #define SH_EVENT_OCCURRED_RTC2_INT_MASK __IA64_UL_CONST(0x0000000002000000) |
381 | 385 | ||
382 | /* SH_EVENT_OCCURRED_RTC3_INT */ | 386 | /* SH_EVENT_OCCURRED_RTC3_INT */ |
383 | /* Description: Pending RTC 3 Interrupt */ | 387 | /* Description: Pending RTC 3 Interrupt */ |
384 | #define SH_EVENT_OCCURRED_RTC3_INT_SHFT 26 | 388 | #define SH_EVENT_OCCURRED_RTC3_INT_SHFT 26 |
385 | #define SH_EVENT_OCCURRED_RTC3_INT_MASK 0x0000000004000000 | 389 | #define SH_EVENT_OCCURRED_RTC3_INT_MASK __IA64_UL_CONST(0x0000000004000000) |
386 | 390 | ||
387 | /* ==================================================================== */ | 391 | /* ==================================================================== */ |
388 | /* Register "SH_IPI_ACCESS" */ | 392 | /* Register "SH_IPI_ACCESS" */ |
389 | /* CPU interrupt Access Permission Bits */ | 393 | /* CPU interrupt Access Permission Bits */ |
390 | /* ==================================================================== */ | 394 | /* ==================================================================== */ |
391 | 395 | ||
392 | #define SH1_IPI_ACCESS 0x0000000110060480 | 396 | #define SH1_IPI_ACCESS __IA64_UL_CONST(0x0000000110060480) |
393 | #define SH2_IPI_ACCESS0 0x0000000010060c00 | 397 | #define SH2_IPI_ACCESS0 __IA64_UL_CONST(0x0000000010060c00) |
394 | #define SH2_IPI_ACCESS1 0x0000000010060c80 | 398 | #define SH2_IPI_ACCESS1 __IA64_UL_CONST(0x0000000010060c80) |
395 | #define SH2_IPI_ACCESS2 0x0000000010060d00 | 399 | #define SH2_IPI_ACCESS2 __IA64_UL_CONST(0x0000000010060d00) |
396 | #define SH2_IPI_ACCESS3 0x0000000010060d80 | 400 | #define SH2_IPI_ACCESS3 __IA64_UL_CONST(0x0000000010060d80) |
397 | 401 | ||
398 | /* ==================================================================== */ | 402 | /* ==================================================================== */ |
399 | /* Register "SH_INT_CMPB" */ | 403 | /* Register "SH_INT_CMPB" */ |
400 | /* RTC Compare Value for Processor B */ | 404 | /* RTC Compare Value for Processor B */ |
401 | /* ==================================================================== */ | 405 | /* ==================================================================== */ |
402 | 406 | ||
403 | #define SH1_INT_CMPB 0x00000001101b0080 | 407 | #define SH1_INT_CMPB __IA64_UL_CONST(0x00000001101b0080) |
404 | #define SH2_INT_CMPB 0x00000000101b0080 | 408 | #define SH2_INT_CMPB __IA64_UL_CONST(0x00000000101b0080) |
405 | #define SH_INT_CMPB_MASK 0x007fffffffffffff | 409 | #define SH_INT_CMPB_MASK __IA64_UL_CONST(0x007fffffffffffff) |
406 | #define SH_INT_CMPB_INIT 0x0000000000000000 | 410 | #define SH_INT_CMPB_INIT __IA64_UL_CONST(0x0000000000000000) |
407 | 411 | ||
408 | /* SH_INT_CMPB_REAL_TIME_CMPB */ | 412 | /* SH_INT_CMPB_REAL_TIME_CMPB */ |
409 | /* Description: Real Time Clock Compare */ | 413 | /* Description: Real Time Clock Compare */ |
410 | #define SH_INT_CMPB_REAL_TIME_CMPB_SHFT 0 | 414 | #define SH_INT_CMPB_REAL_TIME_CMPB_SHFT 0 |
411 | #define SH_INT_CMPB_REAL_TIME_CMPB_MASK 0x007fffffffffffff | 415 | #define SH_INT_CMPB_REAL_TIME_CMPB_MASK __IA64_UL_CONST(0x007fffffffffffff) |
412 | 416 | ||
413 | /* ==================================================================== */ | 417 | /* ==================================================================== */ |
414 | /* Register "SH_INT_CMPC" */ | 418 | /* Register "SH_INT_CMPC" */ |
415 | /* RTC Compare Value for Processor C */ | 419 | /* RTC Compare Value for Processor C */ |
416 | /* ==================================================================== */ | 420 | /* ==================================================================== */ |
417 | 421 | ||
418 | #define SH1_INT_CMPC 0x00000001101b0100 | 422 | #define SH1_INT_CMPC __IA64_UL_CONST(0x00000001101b0100) |
419 | #define SH2_INT_CMPC 0x00000000101b0100 | 423 | #define SH2_INT_CMPC __IA64_UL_CONST(0x00000000101b0100) |
420 | #define SH_INT_CMPC_MASK 0x007fffffffffffff | 424 | #define SH_INT_CMPC_MASK __IA64_UL_CONST(0x007fffffffffffff) |
421 | #define SH_INT_CMPC_INIT 0x0000000000000000 | 425 | #define SH_INT_CMPC_INIT __IA64_UL_CONST(0x0000000000000000) |
422 | 426 | ||
423 | /* SH_INT_CMPC_REAL_TIME_CMPC */ | 427 | /* SH_INT_CMPC_REAL_TIME_CMPC */ |
424 | /* Description: Real Time Clock Compare */ | 428 | /* Description: Real Time Clock Compare */ |
425 | #define SH_INT_CMPC_REAL_TIME_CMPC_SHFT 0 | 429 | #define SH_INT_CMPC_REAL_TIME_CMPC_SHFT 0 |
426 | #define SH_INT_CMPC_REAL_TIME_CMPC_MASK 0x007fffffffffffff | 430 | #define SH_INT_CMPC_REAL_TIME_CMPC_MASK __IA64_UL_CONST(0x007fffffffffffff) |
427 | 431 | ||
428 | /* ==================================================================== */ | 432 | /* ==================================================================== */ |
429 | /* Register "SH_INT_CMPD" */ | 433 | /* Register "SH_INT_CMPD" */ |
430 | /* RTC Compare Value for Processor D */ | 434 | /* RTC Compare Value for Processor D */ |
431 | /* ==================================================================== */ | 435 | /* ==================================================================== */ |
432 | 436 | ||
433 | #define SH1_INT_CMPD 0x00000001101b0180 | 437 | #define SH1_INT_CMPD __IA64_UL_CONST(0x00000001101b0180) |
434 | #define SH2_INT_CMPD 0x00000000101b0180 | 438 | #define SH2_INT_CMPD __IA64_UL_CONST(0x00000000101b0180) |
435 | #define SH_INT_CMPD_MASK 0x007fffffffffffff | 439 | #define SH_INT_CMPD_MASK __IA64_UL_CONST(0x007fffffffffffff) |
436 | #define SH_INT_CMPD_INIT 0x0000000000000000 | 440 | #define SH_INT_CMPD_INIT __IA64_UL_CONST(0x0000000000000000) |
437 | 441 | ||
438 | /* SH_INT_CMPD_REAL_TIME_CMPD */ | 442 | /* SH_INT_CMPD_REAL_TIME_CMPD */ |
439 | /* Description: Real Time Clock Compare */ | 443 | /* Description: Real Time Clock Compare */ |
440 | #define SH_INT_CMPD_REAL_TIME_CMPD_SHFT 0 | 444 | #define SH_INT_CMPD_REAL_TIME_CMPD_SHFT 0 |
441 | #define SH_INT_CMPD_REAL_TIME_CMPD_MASK 0x007fffffffffffff | 445 | #define SH_INT_CMPD_REAL_TIME_CMPD_MASK __IA64_UL_CONST(0x007fffffffffffff) |
442 | 446 | ||
443 | /* ==================================================================== */ | 447 | /* ==================================================================== */ |
444 | /* Register "SH_MD_DQLP_MMR_DIR_PRIVEC0" */ | 448 | /* Register "SH_MD_DQLP_MMR_DIR_PRIVEC0" */ |
445 | /* privilege vector for acc=0 */ | 449 | /* privilege vector for acc=0 */ |
446 | /* ==================================================================== */ | 450 | /* ==================================================================== */ |
447 | 451 | #define SH1_MD_DQLP_MMR_DIR_PRIVEC0 __IA64_UL_CONST(0x0000000100030300) | |
448 | #define SH1_MD_DQLP_MMR_DIR_PRIVEC0 0x0000000100030300 | ||
449 | 452 | ||
450 | /* ==================================================================== */ | 453 | /* ==================================================================== */ |
451 | /* Register "SH_MD_DQRP_MMR_DIR_PRIVEC0" */ | 454 | /* Register "SH_MD_DQRP_MMR_DIR_PRIVEC0" */ |
452 | /* privilege vector for acc=0 */ | 455 | /* privilege vector for acc=0 */ |
453 | /* ==================================================================== */ | 456 | /* ==================================================================== */ |
454 | 457 | #define SH1_MD_DQRP_MMR_DIR_PRIVEC0 __IA64_UL_CONST(0x0000000100050300) | |
455 | #define SH1_MD_DQRP_MMR_DIR_PRIVEC0 0x0000000100050300 | ||
456 | 458 | ||
457 | /* ==================================================================== */ | 459 | /* ==================================================================== */ |
458 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ | 460 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ |
@@ -484,17 +486,17 @@ | |||
484 | /* Engine 0 Control and Status Register */ | 486 | /* Engine 0 Control and Status Register */ |
485 | /* ========================================================================== */ | 487 | /* ========================================================================== */ |
486 | 488 | ||
487 | #define SH2_BT_ENG_CSR_0 0x0000000030040000 | 489 | #define SH2_BT_ENG_CSR_0 __IA64_UL_CONST(0x0000000030040000) |
488 | #define SH2_BT_ENG_SRC_ADDR_0 0x0000000030040080 | 490 | #define SH2_BT_ENG_SRC_ADDR_0 __IA64_UL_CONST(0x0000000030040080) |
489 | #define SH2_BT_ENG_DEST_ADDR_0 0x0000000030040100 | 491 | #define SH2_BT_ENG_DEST_ADDR_0 __IA64_UL_CONST(0x0000000030040100) |
490 | #define SH2_BT_ENG_NOTIF_ADDR_0 0x0000000030040180 | 492 | #define SH2_BT_ENG_NOTIF_ADDR_0 __IA64_UL_CONST(0x0000000030040180) |
491 | 493 | ||
492 | /* ========================================================================== */ | 494 | /* ========================================================================== */ |
493 | /* BTE interfaces 1-3 */ | 495 | /* BTE interfaces 1-3 */ |
494 | /* ========================================================================== */ | 496 | /* ========================================================================== */ |
495 | 497 | ||
496 | #define SH2_BT_ENG_CSR_1 0x0000000030050000 | 498 | #define SH2_BT_ENG_CSR_1 __IA64_UL_CONST(0x0000000030050000) |
497 | #define SH2_BT_ENG_CSR_2 0x0000000030060000 | 499 | #define SH2_BT_ENG_CSR_2 __IA64_UL_CONST(0x0000000030060000) |
498 | #define SH2_BT_ENG_CSR_3 0x0000000030070000 | 500 | #define SH2_BT_ENG_CSR_3 __IA64_UL_CONST(0x0000000030070000) |
499 | 501 | ||
500 | #endif /* _ASM_IA64_SN_SHUB_MMR_H */ | 502 | #endif /* _ASM_IA64_SN_SHUB_MMR_H */ |
diff --git a/include/asm-ia64/sn/simulator.h b/include/asm-ia64/sn/simulator.h index 78eb4f869c8b..16a48b5a039c 100644 --- a/include/asm-ia64/sn/simulator.h +++ b/include/asm-ia64/sn/simulator.h | |||
@@ -10,18 +10,12 @@ | |||
10 | 10 | ||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
12 | 12 | ||
13 | #ifdef CONFIG_IA64_SGI_SN_SIM | ||
14 | |||
15 | #define SNMAGIC 0xaeeeeeee8badbeefL | 13 | #define SNMAGIC 0xaeeeeeee8badbeefL |
16 | #define IS_RUNNING_ON_SIMULATOR() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) | 14 | #define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) |
17 | |||
18 | #define SIMULATOR_SLEEP() asm("nop.i 0x8beef") | ||
19 | |||
20 | #else | ||
21 | |||
22 | #define IS_RUNNING_ON_SIMULATOR() (0) | ||
23 | #define SIMULATOR_SLEEP() | ||
24 | 15 | ||
25 | #endif | 16 | #define SIMULATOR_SLEEP() asm("nop.i 0x8beef") |
17 | #define IS_RUNNING_ON_SIMULATOR() (sn_prom_type) | ||
18 | #define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2) | ||
19 | extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ | ||
26 | 20 | ||
27 | #endif /* _ASM_IA64_SN_SIMULATOR_H */ | 21 | #endif /* _ASM_IA64_SN_SIMULATOR_H */ |
diff --git a/include/asm-ia64/sn/sn2/sn_hwperf.h b/include/asm-ia64/sn/sn2/sn_hwperf.h index b0c4d6dd77ba..df75f4c4aec3 100644 --- a/include/asm-ia64/sn/sn2/sn_hwperf.h +++ b/include/asm-ia64/sn/sn2/sn_hwperf.h | |||
@@ -223,4 +223,6 @@ struct sn_hwperf_ioctl_args { | |||
223 | #define SN_HWPERF_OP_RECONFIGURE 253 | 223 | #define SN_HWPERF_OP_RECONFIGURE 253 |
224 | #define SN_HWPERF_OP_INVAL 254 | 224 | #define SN_HWPERF_OP_INVAL 254 |
225 | 225 | ||
226 | int sn_topology_open(struct inode *inode, struct file *file); | ||
227 | int sn_topology_release(struct inode *inode, struct file *file); | ||
226 | #endif /* SN_HWPERF_H */ | 228 | #endif /* SN_HWPERF_H */ |
diff --git a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h index 20b300187669..d2c1d34dcce4 100644 --- a/include/asm-ia64/sn/sn_cpuid.h +++ b/include/asm-ia64/sn/sn_cpuid.h | |||
@@ -81,11 +81,6 @@ | |||
81 | * | 81 | * |
82 | */ | 82 | */ |
83 | 83 | ||
84 | #ifndef CONFIG_SMP | ||
85 | #define cpu_physical_id(cpuid) ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff) | ||
86 | #endif | ||
87 | |||
88 | |||
89 | #define get_node_number(addr) NASID_GET(addr) | 84 | #define get_node_number(addr) NASID_GET(addr) |
90 | 85 | ||
91 | /* | 86 | /* |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index eb0395ad0d6a..27976d223186 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -132,43 +132,30 @@ | |||
132 | #define SALRET_INVALID_ARG (-2) | 132 | #define SALRET_INVALID_ARG (-2) |
133 | #define SALRET_ERROR (-3) | 133 | #define SALRET_ERROR (-3) |
134 | 134 | ||
135 | #define SN_SAL_FAKE_PROM 0x02009999 | ||
135 | 136 | ||
136 | /** | 137 | /** |
137 | * sn_sal_rev_major - get the major SGI SAL revision number | 138 | * sn_sal_revision - get the SGI SAL revision number |
138 | * | 139 | * |
139 | * The SGI PROM stores its version in sal_[ab]_rev_(major|minor). | 140 | * The SGI PROM stores its version in the sal_[ab]_rev_(major|minor). |
140 | * This routine simply extracts the major value from the | 141 | * This routine simply extracts the major and minor values and |
141 | * @ia64_sal_systab structure constructed by ia64_sal_init(). | 142 | * presents them in a u32 format. |
142 | */ | 143 | * |
143 | static inline int | 144 | * For example, version 4.05 would be represented at 0x0405. |
144 | sn_sal_rev_major(void) | 145 | */ |
146 | static inline u32 | ||
147 | sn_sal_rev(void) | ||
145 | { | 148 | { |
146 | struct ia64_sal_systab *systab = efi.sal_systab; | 149 | struct ia64_sal_systab *systab = efi.sal_systab; |
147 | 150 | ||
148 | return (int)systab->sal_b_rev_major; | 151 | return (u32)(systab->sal_b_rev_major << 8 | systab->sal_b_rev_minor); |
149 | } | ||
150 | |||
151 | /** | ||
152 | * sn_sal_rev_minor - get the minor SGI SAL revision number | ||
153 | * | ||
154 | * The SGI PROM stores its version in sal_[ab]_rev_(major|minor). | ||
155 | * This routine simply extracts the minor value from the | ||
156 | * @ia64_sal_systab structure constructed by ia64_sal_init(). | ||
157 | */ | ||
158 | static inline int | ||
159 | sn_sal_rev_minor(void) | ||
160 | { | ||
161 | struct ia64_sal_systab *systab = efi.sal_systab; | ||
162 | |||
163 | return (int)systab->sal_b_rev_minor; | ||
164 | } | 152 | } |
165 | 153 | ||
166 | /* | 154 | /* |
167 | * Specify the minimum PROM revsion required for this kernel. | 155 | * Specify the minimum PROM revsion required for this kernel. |
168 | * Note that they're stored in hex format... | 156 | * Note that they're stored in hex format... |
169 | */ | 157 | */ |
170 | #define SN_SAL_MIN_MAJOR 0x4 /* SN2 kernels need at least PROM 4.0 */ | 158 | #define SN_SAL_MIN_VERSION 0x0404 |
171 | #define SN_SAL_MIN_MINOR 0x0 | ||
172 | 159 | ||
173 | /* | 160 | /* |
174 | * Returns the master console nasid, if the call fails, return an illegal | 161 | * Returns the master console nasid, if the call fails, return an illegal |
@@ -1105,4 +1092,12 @@ ia64_sn_bte_recovery(nasid_t nasid) | |||
1105 | return (int) rv.status; | 1092 | return (int) rv.status; |
1106 | } | 1093 | } |
1107 | 1094 | ||
1095 | static inline int | ||
1096 | ia64_sn_is_fake_prom(void) | ||
1097 | { | ||
1098 | struct ia64_sal_retval rv; | ||
1099 | SAL_CALL_NOLOCK(rv, SN_SAL_FAKE_PROM, 0, 0, 0, 0, 0, 0, 0); | ||
1100 | return (rv.status == 0); | ||
1101 | } | ||
1102 | |||
1108 | #endif /* _ASM_IA64_SN_SN_SAL_H */ | 1103 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |
diff --git a/include/asm-ia64/sn/tioca_provider.h b/include/asm-ia64/sn/tioca_provider.h index b6acc22ab239..5ccec608d325 100644 --- a/include/asm-ia64/sn/tioca_provider.h +++ b/include/asm-ia64/sn/tioca_provider.h | |||
@@ -201,6 +201,7 @@ tioca_tlbflush(struct tioca_kernel *tioca_kernel) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | extern uint32_t tioca_gart_found; | 203 | extern uint32_t tioca_gart_found; |
204 | extern struct list_head tioca_list; | ||
204 | extern int tioca_init_provider(void); | 205 | extern int tioca_init_provider(void); |
205 | extern void tioca_fastwrite_enable(struct tioca_kernel *tioca_kern); | 206 | extern void tioca_fastwrite_enable(struct tioca_kernel *tioca_kern); |
206 | #endif /* _ASM_IA64_SN_TIO_CA_AGP_PROVIDER_H */ | 207 | #endif /* _ASM_IA64_SN_TIO_CA_AGP_PROVIDER_H */ |
diff --git a/include/asm-ia64/sn/tiocp.h b/include/asm-ia64/sn/tiocp.h new file mode 100644 index 000000000000..5f2489c9d2dd --- /dev/null +++ b/include/asm-ia64/sn/tiocp.h | |||
@@ -0,0 +1,256 @@ | |||
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) 2003-2004 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | #ifndef _ASM_IA64_SN_PCI_TIOCP_H | ||
9 | #define _ASM_IA64_SN_PCI_TIOCP_H | ||
10 | |||
11 | #define TIOCP_HOST_INTR_ADDR 0x003FFFFFFFFFFFFFUL | ||
12 | #define TIOCP_PCI64_CMDTYPE_MEM (0x1ull << 60) | ||
13 | |||
14 | |||
15 | /***************************************************************************** | ||
16 | *********************** TIOCP MMR structure mapping *************************** | ||
17 | *****************************************************************************/ | ||
18 | |||
19 | struct tiocp{ | ||
20 | |||
21 | /* 0x000000-0x00FFFF -- Local Registers */ | ||
22 | |||
23 | /* 0x000000-0x000057 -- (Legacy Widget Space) Configuration */ | ||
24 | uint64_t cp_id; /* 0x000000 */ | ||
25 | uint64_t cp_stat; /* 0x000008 */ | ||
26 | uint64_t cp_err_upper; /* 0x000010 */ | ||
27 | uint64_t cp_err_lower; /* 0x000018 */ | ||
28 | #define cp_err cp_err_lower | ||
29 | uint64_t cp_control; /* 0x000020 */ | ||
30 | uint64_t cp_req_timeout; /* 0x000028 */ | ||
31 | uint64_t cp_intr_upper; /* 0x000030 */ | ||
32 | uint64_t cp_intr_lower; /* 0x000038 */ | ||
33 | #define cp_intr cp_intr_lower | ||
34 | uint64_t cp_err_cmdword; /* 0x000040 */ | ||
35 | uint64_t _pad_000048; /* 0x000048 */ | ||
36 | uint64_t cp_tflush; /* 0x000050 */ | ||
37 | |||
38 | /* 0x000058-0x00007F -- Bridge-specific Configuration */ | ||
39 | uint64_t cp_aux_err; /* 0x000058 */ | ||
40 | uint64_t cp_resp_upper; /* 0x000060 */ | ||
41 | uint64_t cp_resp_lower; /* 0x000068 */ | ||
42 | #define cp_resp cp_resp_lower | ||
43 | uint64_t cp_tst_pin_ctrl; /* 0x000070 */ | ||
44 | uint64_t cp_addr_lkerr; /* 0x000078 */ | ||
45 | |||
46 | /* 0x000080-0x00008F -- PMU & MAP */ | ||
47 | uint64_t cp_dir_map; /* 0x000080 */ | ||
48 | uint64_t _pad_000088; /* 0x000088 */ | ||
49 | |||
50 | /* 0x000090-0x00009F -- SSRAM */ | ||
51 | uint64_t cp_map_fault; /* 0x000090 */ | ||
52 | uint64_t _pad_000098; /* 0x000098 */ | ||
53 | |||
54 | /* 0x0000A0-0x0000AF -- Arbitration */ | ||
55 | uint64_t cp_arb; /* 0x0000A0 */ | ||
56 | uint64_t _pad_0000A8; /* 0x0000A8 */ | ||
57 | |||
58 | /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */ | ||
59 | uint64_t cp_ate_parity_err; /* 0x0000B0 */ | ||
60 | uint64_t _pad_0000B8; /* 0x0000B8 */ | ||
61 | |||
62 | /* 0x0000C0-0x0000FF -- PCI/GIO */ | ||
63 | uint64_t cp_bus_timeout; /* 0x0000C0 */ | ||
64 | uint64_t cp_pci_cfg; /* 0x0000C8 */ | ||
65 | uint64_t cp_pci_err_upper; /* 0x0000D0 */ | ||
66 | uint64_t cp_pci_err_lower; /* 0x0000D8 */ | ||
67 | #define cp_pci_err cp_pci_err_lower | ||
68 | uint64_t _pad_0000E0[4]; /* 0x0000{E0..F8} */ | ||
69 | |||
70 | /* 0x000100-0x0001FF -- Interrupt */ | ||
71 | uint64_t cp_int_status; /* 0x000100 */ | ||
72 | uint64_t cp_int_enable; /* 0x000108 */ | ||
73 | uint64_t cp_int_rst_stat; /* 0x000110 */ | ||
74 | uint64_t cp_int_mode; /* 0x000118 */ | ||
75 | uint64_t cp_int_device; /* 0x000120 */ | ||
76 | uint64_t cp_int_host_err; /* 0x000128 */ | ||
77 | uint64_t cp_int_addr[8]; /* 0x0001{30,,,68} */ | ||
78 | uint64_t cp_err_int_view; /* 0x000170 */ | ||
79 | uint64_t cp_mult_int; /* 0x000178 */ | ||
80 | uint64_t cp_force_always[8]; /* 0x0001{80,,,B8} */ | ||
81 | uint64_t cp_force_pin[8]; /* 0x0001{C0,,,F8} */ | ||
82 | |||
83 | /* 0x000200-0x000298 -- Device */ | ||
84 | uint64_t cp_device[4]; /* 0x0002{00,,,18} */ | ||
85 | uint64_t _pad_000220[4]; /* 0x0002{20,,,38} */ | ||
86 | uint64_t cp_wr_req_buf[4]; /* 0x0002{40,,,58} */ | ||
87 | uint64_t _pad_000260[4]; /* 0x0002{60,,,78} */ | ||
88 | uint64_t cp_rrb_map[2]; /* 0x0002{80,,,88} */ | ||
89 | #define cp_even_resp cp_rrb_map[0] /* 0x000280 */ | ||
90 | #define cp_odd_resp cp_rrb_map[1] /* 0x000288 */ | ||
91 | uint64_t cp_resp_status; /* 0x000290 */ | ||
92 | uint64_t cp_resp_clear; /* 0x000298 */ | ||
93 | |||
94 | uint64_t _pad_0002A0[12]; /* 0x0002{A0..F8} */ | ||
95 | |||
96 | /* 0x000300-0x0003F8 -- Buffer Address Match Registers */ | ||
97 | struct { | ||
98 | uint64_t upper; /* 0x0003{00,,,F0} */ | ||
99 | uint64_t lower; /* 0x0003{08,,,F8} */ | ||
100 | } cp_buf_addr_match[16]; | ||
101 | |||
102 | /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */ | ||
103 | struct { | ||
104 | uint64_t flush_w_touch; /* 0x000{400,,,5C0} */ | ||
105 | uint64_t flush_wo_touch; /* 0x000{408,,,5C8} */ | ||
106 | uint64_t inflight; /* 0x000{410,,,5D0} */ | ||
107 | uint64_t prefetch; /* 0x000{418,,,5D8} */ | ||
108 | uint64_t total_pci_retry; /* 0x000{420,,,5E0} */ | ||
109 | uint64_t max_pci_retry; /* 0x000{428,,,5E8} */ | ||
110 | uint64_t max_latency; /* 0x000{430,,,5F0} */ | ||
111 | uint64_t clear_all; /* 0x000{438,,,5F8} */ | ||
112 | } cp_buf_count[8]; | ||
113 | |||
114 | |||
115 | /* 0x000600-0x0009FF -- PCI/X registers */ | ||
116 | uint64_t cp_pcix_bus_err_addr; /* 0x000600 */ | ||
117 | uint64_t cp_pcix_bus_err_attr; /* 0x000608 */ | ||
118 | uint64_t cp_pcix_bus_err_data; /* 0x000610 */ | ||
119 | uint64_t cp_pcix_pio_split_addr; /* 0x000618 */ | ||
120 | uint64_t cp_pcix_pio_split_attr; /* 0x000620 */ | ||
121 | uint64_t cp_pcix_dma_req_err_attr; /* 0x000628 */ | ||
122 | uint64_t cp_pcix_dma_req_err_addr; /* 0x000630 */ | ||
123 | uint64_t cp_pcix_timeout; /* 0x000638 */ | ||
124 | |||
125 | uint64_t _pad_000640[24]; /* 0x000{640,,,6F8} */ | ||
126 | |||
127 | /* 0x000700-0x000737 -- Debug Registers */ | ||
128 | uint64_t cp_ct_debug_ctl; /* 0x000700 */ | ||
129 | uint64_t cp_br_debug_ctl; /* 0x000708 */ | ||
130 | uint64_t cp_mux3_debug_ctl; /* 0x000710 */ | ||
131 | uint64_t cp_mux4_debug_ctl; /* 0x000718 */ | ||
132 | uint64_t cp_mux5_debug_ctl; /* 0x000720 */ | ||
133 | uint64_t cp_mux6_debug_ctl; /* 0x000728 */ | ||
134 | uint64_t cp_mux7_debug_ctl; /* 0x000730 */ | ||
135 | |||
136 | uint64_t _pad_000738[89]; /* 0x000{738,,,9F8} */ | ||
137 | |||
138 | /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */ | ||
139 | struct { | ||
140 | uint64_t cp_buf_addr; /* 0x000{A00,,,AF0} */ | ||
141 | uint64_t cp_buf_attr; /* 0X000{A08,,,AF8} */ | ||
142 | } cp_pcix_read_buf_64[16]; | ||
143 | |||
144 | struct { | ||
145 | uint64_t cp_buf_addr; /* 0x000{B00,,,BE0} */ | ||
146 | uint64_t cp_buf_attr; /* 0x000{B08,,,BE8} */ | ||
147 | uint64_t cp_buf_valid; /* 0x000{B10,,,BF0} */ | ||
148 | uint64_t __pad1; /* 0x000{B18,,,BF8} */ | ||
149 | } cp_pcix_write_buf_64[8]; | ||
150 | |||
151 | /* End of Local Registers -- Start of Address Map space */ | ||
152 | |||
153 | char _pad_000c00[0x010000 - 0x000c00]; | ||
154 | |||
155 | /* 0x010000-0x011FF8 -- Internal ATE RAM (Auto Parity Generation) */ | ||
156 | uint64_t cp_int_ate_ram[1024]; /* 0x010000-0x011FF8 */ | ||
157 | |||
158 | char _pad_012000[0x14000 - 0x012000]; | ||
159 | |||
160 | /* 0x014000-0x015FF8 -- Internal ATE RAM (Manual Parity Generation) */ | ||
161 | uint64_t cp_int_ate_ram_mp[1024]; /* 0x014000-0x015FF8 */ | ||
162 | |||
163 | char _pad_016000[0x18000 - 0x016000]; | ||
164 | |||
165 | /* 0x18000-0x197F8 -- TIOCP Write Request Ram */ | ||
166 | uint64_t cp_wr_req_lower[256]; /* 0x18000 - 0x187F8 */ | ||
167 | uint64_t cp_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */ | ||
168 | uint64_t cp_wr_req_parity[256]; /* 0x19000 - 0x197F8 */ | ||
169 | |||
170 | char _pad_019800[0x1C000 - 0x019800]; | ||
171 | |||
172 | /* 0x1C000-0x1EFF8 -- TIOCP Read Response Ram */ | ||
173 | uint64_t cp_rd_resp_lower[512]; /* 0x1C000 - 0x1CFF8 */ | ||
174 | uint64_t cp_rd_resp_upper[512]; /* 0x1D000 - 0x1DFF8 */ | ||
175 | uint64_t cp_rd_resp_parity[512]; /* 0x1E000 - 0x1EFF8 */ | ||
176 | |||
177 | char _pad_01F000[0x20000 - 0x01F000]; | ||
178 | |||
179 | /* 0x020000-0x021FFF -- Host Device (CP) Configuration Space (not used) */ | ||
180 | char _pad_020000[0x021000 - 0x20000]; | ||
181 | |||
182 | /* 0x021000-0x027FFF -- PCI Device Configuration Spaces */ | ||
183 | union { | ||
184 | uint8_t c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */ | ||
185 | uint16_t s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */ | ||
186 | uint32_t l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */ | ||
187 | uint64_t d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */ | ||
188 | union { | ||
189 | uint8_t c[0x100 / 1]; | ||
190 | uint16_t s[0x100 / 2]; | ||
191 | uint32_t l[0x100 / 4]; | ||
192 | uint64_t d[0x100 / 8]; | ||
193 | } f[8]; | ||
194 | } cp_type0_cfg_dev[7]; /* 0x02{1000,,,7FFF} */ | ||
195 | |||
196 | /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */ | ||
197 | union { | ||
198 | uint8_t c[0x1000 / 1]; /* 0x028000-0x029000 */ | ||
199 | uint16_t s[0x1000 / 2]; /* 0x028000-0x029000 */ | ||
200 | uint32_t l[0x1000 / 4]; /* 0x028000-0x029000 */ | ||
201 | uint64_t d[0x1000 / 8]; /* 0x028000-0x029000 */ | ||
202 | union { | ||
203 | uint8_t c[0x100 / 1]; | ||
204 | uint16_t s[0x100 / 2]; | ||
205 | uint32_t l[0x100 / 4]; | ||
206 | uint64_t d[0x100 / 8]; | ||
207 | } f[8]; | ||
208 | } cp_type1_cfg; /* 0x028000-0x029000 */ | ||
209 | |||
210 | char _pad_029000[0x030000-0x029000]; | ||
211 | |||
212 | /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */ | ||
213 | union { | ||
214 | uint8_t c[8 / 1]; | ||
215 | uint16_t s[8 / 2]; | ||
216 | uint32_t l[8 / 4]; | ||
217 | uint64_t d[8 / 8]; | ||
218 | } cp_pci_iack; /* 0x030000-0x030007 */ | ||
219 | |||
220 | char _pad_030007[0x040000-0x030008]; | ||
221 | |||
222 | /* 0x040000-0x040007 -- PCIX Special Cycle */ | ||
223 | union { | ||
224 | uint8_t c[8 / 1]; | ||
225 | uint16_t s[8 / 2]; | ||
226 | uint32_t l[8 / 4]; | ||
227 | uint64_t d[8 / 8]; | ||
228 | } cp_pcix_cycle; /* 0x040000-0x040007 */ | ||
229 | |||
230 | char _pad_040007[0x200000-0x040008]; | ||
231 | |||
232 | /* 0x200000-0x7FFFFF -- PCI/GIO Device Spaces */ | ||
233 | union { | ||
234 | uint8_t c[0x100000 / 1]; | ||
235 | uint16_t s[0x100000 / 2]; | ||
236 | uint32_t l[0x100000 / 4]; | ||
237 | uint64_t d[0x100000 / 8]; | ||
238 | } cp_devio_raw[6]; /* 0x200000-0x7FFFFF */ | ||
239 | |||
240 | #define cp_devio(n) cp_devio_raw[((n)<2)?(n*2):(n+2)] | ||
241 | |||
242 | char _pad_800000[0xA00000-0x800000]; | ||
243 | |||
244 | /* 0xA00000-0xBFFFFF -- PCI/GIO Device Spaces w/flush */ | ||
245 | union { | ||
246 | uint8_t c[0x100000 / 1]; | ||
247 | uint16_t s[0x100000 / 2]; | ||
248 | uint32_t l[0x100000 / 4]; | ||
249 | uint64_t d[0x100000 / 8]; | ||
250 | } cp_devio_raw_flush[6]; /* 0xA00000-0xBFFFFF */ | ||
251 | |||
252 | #define cp_devio_flush(n) cp_devio_raw_flush[((n)<2)?(n*2):(n+2)] | ||
253 | |||
254 | }; | ||
255 | |||
256 | #endif /* _ASM_IA64_SN_PCI_TIOCP_H */ | ||
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h index 9902185c0288..1df1c9f61a65 100644 --- a/include/asm-ia64/sn/xp.h +++ b/include/asm-ia64/sn/xp.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #define _ASM_IA64_SN_XP_H | 16 | #define _ASM_IA64_SN_XP_H |
17 | 17 | ||
18 | 18 | ||
19 | #include <linux/version.h> | ||
20 | #include <linux/cache.h> | 19 | #include <linux/cache.h> |
21 | #include <linux/hardirq.h> | 20 | #include <linux/hardirq.h> |
22 | #include <asm/sn/types.h> | 21 | #include <asm/sn/types.h> |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 6f516e76d1f0..cd2cf76b2db1 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -183,8 +183,6 @@ do { \ | |||
183 | 183 | ||
184 | #ifdef __KERNEL__ | 184 | #ifdef __KERNEL__ |
185 | 185 | ||
186 | #define prepare_to_switch() do { } while(0) | ||
187 | |||
188 | #ifdef CONFIG_IA32_SUPPORT | 186 | #ifdef CONFIG_IA32_SUPPORT |
189 | # define IS_IA32_PROCESS(regs) (ia64_psr(regs)->is != 0) | 187 | # define IS_IA32_PROCESS(regs) (ia64_psr(regs)->is != 0) |
190 | #else | 188 | #else |
@@ -274,13 +272,7 @@ extern void ia64_load_extra (struct task_struct *task); | |||
274 | * of that CPU which will not be released, because there we wait for the | 272 | * of that CPU which will not be released, because there we wait for the |
275 | * tasklist_lock to become available. | 273 | * tasklist_lock to become available. |
276 | */ | 274 | */ |
277 | #define prepare_arch_switch(rq, next) \ | 275 | #define __ARCH_WANT_UNLOCKED_CTXSW |
278 | do { \ | ||
279 | spin_lock(&(next)->switch_lock); \ | ||
280 | spin_unlock(&(rq)->lock); \ | ||
281 | } while (0) | ||
282 | #define finish_arch_switch(rq, prev) spin_unlock_irq(&(prev)->switch_lock) | ||
283 | #define task_running(rq, p) ((rq)->curr == (p) || spin_is_locked(&(p)->switch_lock)) | ||
284 | 276 | ||
285 | #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) | 277 | #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) |
286 | 278 | ||
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index 8d5b7e77028c..7dc8951708a3 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -25,7 +25,7 @@ struct thread_info { | |||
25 | __u32 flags; /* thread_info flags (see TIF_*) */ | 25 | __u32 flags; /* thread_info flags (see TIF_*) */ |
26 | __u32 cpu; /* current CPU */ | 26 | __u32 cpu; /* current CPU */ |
27 | mm_segment_t addr_limit; /* user-level address space limit */ | 27 | mm_segment_t addr_limit; /* user-level address space limit */ |
28 | __s32 preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ | 28 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ |
29 | struct restart_block restart_block; | 29 | struct restart_block restart_block; |
30 | struct { | 30 | struct { |
31 | int signo; | 31 | int signo; |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 21cf351fd05c..399bc29729fd 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -40,27 +40,61 @@ | |||
40 | */ | 40 | */ |
41 | #define node_to_first_cpu(node) (__ffs(node_to_cpumask(node))) | 41 | #define node_to_first_cpu(node) (__ffs(node_to_cpumask(node))) |
42 | 42 | ||
43 | /* | ||
44 | * Determines the node for a given pci bus | ||
45 | */ | ||
46 | #define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node | ||
47 | |||
43 | void build_cpu_to_node_map(void); | 48 | void build_cpu_to_node_map(void); |
44 | 49 | ||
50 | #define SD_CPU_INIT (struct sched_domain) { \ | ||
51 | .span = CPU_MASK_NONE, \ | ||
52 | .parent = NULL, \ | ||
53 | .groups = NULL, \ | ||
54 | .min_interval = 1, \ | ||
55 | .max_interval = 4, \ | ||
56 | .busy_factor = 64, \ | ||
57 | .imbalance_pct = 125, \ | ||
58 | .cache_hot_time = (10*1000000), \ | ||
59 | .per_cpu_gain = 100, \ | ||
60 | .cache_nice_tries = 2, \ | ||
61 | .busy_idx = 2, \ | ||
62 | .idle_idx = 1, \ | ||
63 | .newidle_idx = 2, \ | ||
64 | .wake_idx = 1, \ | ||
65 | .forkexec_idx = 1, \ | ||
66 | .flags = SD_LOAD_BALANCE \ | ||
67 | | SD_BALANCE_NEWIDLE \ | ||
68 | | SD_BALANCE_EXEC \ | ||
69 | | SD_WAKE_AFFINE, \ | ||
70 | .last_balance = jiffies, \ | ||
71 | .balance_interval = 1, \ | ||
72 | .nr_balance_failed = 0, \ | ||
73 | } | ||
74 | |||
45 | /* sched_domains SD_NODE_INIT for IA64 NUMA machines */ | 75 | /* sched_domains SD_NODE_INIT for IA64 NUMA machines */ |
46 | #define SD_NODE_INIT (struct sched_domain) { \ | 76 | #define SD_NODE_INIT (struct sched_domain) { \ |
47 | .span = CPU_MASK_NONE, \ | 77 | .span = CPU_MASK_NONE, \ |
48 | .parent = NULL, \ | 78 | .parent = NULL, \ |
49 | .groups = NULL, \ | 79 | .groups = NULL, \ |
50 | .min_interval = 80, \ | 80 | .min_interval = 8, \ |
51 | .max_interval = 320, \ | 81 | .max_interval = 8*(min(num_online_cpus(), 32)), \ |
52 | .busy_factor = 320, \ | 82 | .busy_factor = 64, \ |
53 | .imbalance_pct = 125, \ | 83 | .imbalance_pct = 125, \ |
54 | .cache_hot_time = (10*1000000), \ | 84 | .cache_hot_time = (10*1000000), \ |
55 | .cache_nice_tries = 1, \ | 85 | .cache_nice_tries = 2, \ |
86 | .busy_idx = 3, \ | ||
87 | .idle_idx = 2, \ | ||
88 | .newidle_idx = 0, /* unused */ \ | ||
89 | .wake_idx = 1, \ | ||
90 | .forkexec_idx = 1, \ | ||
56 | .per_cpu_gain = 100, \ | 91 | .per_cpu_gain = 100, \ |
57 | .flags = SD_LOAD_BALANCE \ | 92 | .flags = SD_LOAD_BALANCE \ |
58 | | SD_BALANCE_EXEC \ | 93 | | SD_BALANCE_EXEC \ |
59 | | SD_BALANCE_NEWIDLE \ | 94 | | SD_BALANCE_FORK \ |
60 | | SD_WAKE_IDLE \ | ||
61 | | SD_WAKE_BALANCE, \ | 95 | | SD_WAKE_BALANCE, \ |
62 | .last_balance = jiffies, \ | 96 | .last_balance = jiffies, \ |
63 | .balance_interval = 1, \ | 97 | .balance_interval = 64, \ |
64 | .nr_balance_failed = 0, \ | 98 | .nr_balance_failed = 0, \ |
65 | } | 99 | } |
66 | 100 | ||
@@ -69,17 +103,21 @@ void build_cpu_to_node_map(void); | |||
69 | .span = CPU_MASK_NONE, \ | 103 | .span = CPU_MASK_NONE, \ |
70 | .parent = NULL, \ | 104 | .parent = NULL, \ |
71 | .groups = NULL, \ | 105 | .groups = NULL, \ |
72 | .min_interval = 80, \ | 106 | .min_interval = 64, \ |
73 | .max_interval = 320, \ | 107 | .max_interval = 64*num_online_cpus(), \ |
74 | .busy_factor = 320, \ | 108 | .busy_factor = 128, \ |
75 | .imbalance_pct = 125, \ | 109 | .imbalance_pct = 133, \ |
76 | .cache_hot_time = (10*1000000), \ | 110 | .cache_hot_time = (10*1000000), \ |
77 | .cache_nice_tries = 1, \ | 111 | .cache_nice_tries = 1, \ |
112 | .busy_idx = 3, \ | ||
113 | .idle_idx = 3, \ | ||
114 | .newidle_idx = 0, /* unused */ \ | ||
115 | .wake_idx = 0, /* unused */ \ | ||
116 | .forkexec_idx = 0, /* unused */ \ | ||
78 | .per_cpu_gain = 100, \ | 117 | .per_cpu_gain = 100, \ |
79 | .flags = SD_LOAD_BALANCE \ | 118 | .flags = SD_LOAD_BALANCE, \ |
80 | | SD_BALANCE_EXEC, \ | ||
81 | .last_balance = jiffies, \ | 119 | .last_balance = jiffies, \ |
82 | .balance_interval = 100*(63+num_online_cpus())/64, \ | 120 | .balance_interval = 64, \ |
83 | .nr_balance_failed = 0, \ | 121 | .nr_balance_failed = 0, \ |
84 | } | 122 | } |
85 | 123 | ||
diff --git a/include/asm-ia64/uncached.h b/include/asm-ia64/uncached.h new file mode 100644 index 000000000000..b82d923b73c1 --- /dev/null +++ b/include/asm-ia64/uncached.h | |||
@@ -0,0 +1,12 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001-2005 Silicon Graphics, Inc. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of version 2 of the GNU General Public License | ||
6 | * as published by the Free Software Foundation. | ||
7 | * | ||
8 | * Prototypes for the uncached page allocator | ||
9 | */ | ||
10 | |||
11 | extern unsigned long uncached_alloc_page(int nid); | ||
12 | extern void uncached_free_page(unsigned long); | ||
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 33e26c557c5c..3a0c69524656 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -263,6 +263,12 @@ | |||
263 | #define __NR_add_key 1271 | 263 | #define __NR_add_key 1271 |
264 | #define __NR_request_key 1272 | 264 | #define __NR_request_key 1272 |
265 | #define __NR_keyctl 1273 | 265 | #define __NR_keyctl 1273 |
266 | #define __NR_ioprio_set 1274 | ||
267 | #define __NR_ioprio_get 1275 | ||
268 | #define __NR_set_zone_reclaim 1276 | ||
269 | #define __NR_inotify_init 1277 | ||
270 | #define __NR_inotify_add_watch 1278 | ||
271 | #define __NR_inotify_rm_watch 1279 | ||
266 | 272 | ||
267 | #ifdef __KERNEL__ | 273 | #ifdef __KERNEL__ |
268 | 274 | ||
diff --git a/include/asm-ia64/vga.h b/include/asm-ia64/vga.h index 1f446d6841f6..bc3349ffc505 100644 --- a/include/asm-ia64/vga.h +++ b/include/asm-ia64/vga.h | |||
@@ -14,7 +14,10 @@ | |||
14 | * videoram directly without any black magic. | 14 | * videoram directly without any black magic. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define VGA_MAP_MEM(x) ((unsigned long) ioremap((x), 0)) | 17 | extern unsigned long vga_console_iobase; |
18 | extern unsigned long vga_console_membase; | ||
19 | |||
20 | #define VGA_MAP_MEM(x) ((unsigned long) ioremap(vga_console_membase + (x), 0)) | ||
18 | 21 | ||
19 | #define vga_readb(x) (*(x)) | 22 | #define vga_readb(x) (*(x)) |
20 | #define vga_writeb(x,y) (*(y) = (x)) | 23 | #define vga_writeb(x,y) (*(y) = (x)) |