diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 12:44:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 12:44:55 -0400 |
commit | 4786b4ee22de6304e841b12ee22b849230d7fba3 (patch) | |
tree | 08793b8fbcd63204d5d3355ac755745adcfef170 /include/asm-ia64 | |
parent | 253ba4e79edc695b2925bd2ef34de06ff4d4070c (diff) | |
parent | 71b264f85ff50c14fe945ffff06ae0d5e9a9124e (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: (27 commits)
[IA64] kdump: Add crash_save_vmcoreinfo for INIT
[IA64] Fix NUMA configuration issue
[IA64] Itanium Spec updates
[IA64] Untangle sync_icache_dcache() page size determination
[IA64] arch/ia64/kernel/: use time_* macros
[IA64] remove redundant display of free swap space in show_mem()
[IA64] make IOMMU respect the segment boundary limits
[IA64] kprobes: kprobe-booster for ia64
[IA64] fix getpid and set_tid_address fast system calls for pid namespaces
[IA64] Replace explicit jiffies tests with time_* macros.
[IA64] use goto to jump out do/while_each_thread
[IA64] Fix unlock ordering in smp_callin
[IA64] pgd_offset() constfication.
[IA64] kdump: crash.c coding style fix
[IA64] kdump: add kdump_on_fatal_mca
[IA64] Minimize per_cpu reservations.
[IA64] Correct pernodesize calculation.
[IA64] Kernel parameter for max number of concurrent global TLB purges
[IA64] Multiple outstanding ptc.g instruction support
[IA64] Implement smp_call_function_mask for ia64
...
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/acpi.h | 33 | ||||
-rw-r--r-- | include/asm-ia64/cputime.h | 104 | ||||
-rw-r--r-- | include/asm-ia64/elf.h | 31 | ||||
-rw-r--r-- | include/asm-ia64/kprobes.h | 7 | ||||
-rw-r--r-- | include/asm-ia64/kregs.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/meminit.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/numa.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/pal.h | 72 | ||||
-rw-r--r-- | include/asm-ia64/pgtable.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/sal.h | 21 | ||||
-rw-r--r-- | include/asm-ia64/smp.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/system.h | 12 | ||||
-rw-r--r-- | include/asm-ia64/thread_info.h | 14 | ||||
-rw-r--r-- | include/asm-ia64/tlb.h | 26 | ||||
-rw-r--r-- | include/asm-ia64/tlbflush.h | 1 |
15 files changed, 316 insertions, 18 deletions
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index cd1cc39b5599..fcfad326f4c7 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/numa.h> | 36 | #include <linux/numa.h> |
37 | #include <asm/system.h> | 37 | #include <asm/system.h> |
38 | #include <asm/numa.h> | ||
38 | 39 | ||
39 | #define COMPILER_DEPENDENT_INT64 long | 40 | #define COMPILER_DEPENDENT_INT64 long |
40 | #define COMPILER_DEPENDENT_UINT64 unsigned long | 41 | #define COMPILER_DEPENDENT_UINT64 unsigned long |
@@ -115,7 +116,11 @@ extern unsigned int is_cpu_cpei_target(unsigned int cpu); | |||
115 | extern void set_cpei_target_cpu(unsigned int cpu); | 116 | extern void set_cpei_target_cpu(unsigned int cpu); |
116 | extern unsigned int get_cpei_target_cpu(void); | 117 | extern unsigned int get_cpei_target_cpu(void); |
117 | extern void prefill_possible_map(void); | 118 | extern void prefill_possible_map(void); |
119 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | ||
118 | extern int additional_cpus; | 120 | extern int additional_cpus; |
121 | #else | ||
122 | #define additional_cpus 0 | ||
123 | #endif | ||
119 | 124 | ||
120 | #ifdef CONFIG_ACPI_NUMA | 125 | #ifdef CONFIG_ACPI_NUMA |
121 | #if MAX_NUMNODES > 256 | 126 | #if MAX_NUMNODES > 256 |
@@ -129,6 +134,34 @@ extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; | |||
129 | 134 | ||
130 | #define acpi_unlazy_tlb(x) | 135 | #define acpi_unlazy_tlb(x) |
131 | 136 | ||
137 | #ifdef CONFIG_ACPI_NUMA | ||
138 | extern cpumask_t early_cpu_possible_map; | ||
139 | #define for_each_possible_early_cpu(cpu) \ | ||
140 | for_each_cpu_mask((cpu), early_cpu_possible_map) | ||
141 | |||
142 | static inline void per_cpu_scan_finalize(int min_cpus, int reserve_cpus) | ||
143 | { | ||
144 | int low_cpu, high_cpu; | ||
145 | int cpu; | ||
146 | int next_nid = 0; | ||
147 | |||
148 | low_cpu = cpus_weight(early_cpu_possible_map); | ||
149 | |||
150 | high_cpu = max(low_cpu, min_cpus); | ||
151 | high_cpu = min(high_cpu + reserve_cpus, NR_CPUS); | ||
152 | |||
153 | for (cpu = low_cpu; cpu < high_cpu; cpu++) { | ||
154 | cpu_set(cpu, early_cpu_possible_map); | ||
155 | if (node_cpuid[cpu].nid == NUMA_NO_NODE) { | ||
156 | node_cpuid[cpu].nid = next_nid; | ||
157 | next_nid++; | ||
158 | if (next_nid >= num_online_nodes()) | ||
159 | next_nid = 0; | ||
160 | } | ||
161 | } | ||
162 | } | ||
163 | #endif /* CONFIG_ACPI_NUMA */ | ||
164 | |||
132 | #endif /*__KERNEL__*/ | 165 | #endif /*__KERNEL__*/ |
133 | 166 | ||
134 | #endif /*_ASM_ACPI_H*/ | 167 | #endif /*_ASM_ACPI_H*/ |
diff --git a/include/asm-ia64/cputime.h b/include/asm-ia64/cputime.h index 72400a78002a..f9abdec6577a 100644 --- a/include/asm-ia64/cputime.h +++ b/include/asm-ia64/cputime.h | |||
@@ -1,6 +1,110 @@ | |||
1 | /* | ||
2 | * include/asm-ia64/cputime.h: | ||
3 | * Definitions for measuring cputime on ia64 machines. | ||
4 | * | ||
5 | * Based on <asm-powerpc/cputime.h>. | ||
6 | * | ||
7 | * Copyright (C) 2007 FUJITSU LIMITED | ||
8 | * Copyright (C) 2007 Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | * | ||
15 | * If we have CONFIG_VIRT_CPU_ACCOUNTING, we measure cpu time in nsec. | ||
16 | * Otherwise we measure cpu time in jiffies using the generic definitions. | ||
17 | */ | ||
18 | |||
1 | #ifndef __IA64_CPUTIME_H | 19 | #ifndef __IA64_CPUTIME_H |
2 | #define __IA64_CPUTIME_H | 20 | #define __IA64_CPUTIME_H |
3 | 21 | ||
22 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
4 | #include <asm-generic/cputime.h> | 23 | #include <asm-generic/cputime.h> |
24 | #else | ||
25 | |||
26 | #include <linux/time.h> | ||
27 | #include <linux/jiffies.h> | ||
28 | #include <asm/processor.h> | ||
29 | |||
30 | typedef u64 cputime_t; | ||
31 | typedef u64 cputime64_t; | ||
32 | |||
33 | #define cputime_zero ((cputime_t)0) | ||
34 | #define cputime_max ((~((cputime_t)0) >> 1) - 1) | ||
35 | #define cputime_add(__a, __b) ((__a) + (__b)) | ||
36 | #define cputime_sub(__a, __b) ((__a) - (__b)) | ||
37 | #define cputime_div(__a, __n) ((__a) / (__n)) | ||
38 | #define cputime_halve(__a) ((__a) >> 1) | ||
39 | #define cputime_eq(__a, __b) ((__a) == (__b)) | ||
40 | #define cputime_gt(__a, __b) ((__a) > (__b)) | ||
41 | #define cputime_ge(__a, __b) ((__a) >= (__b)) | ||
42 | #define cputime_lt(__a, __b) ((__a) < (__b)) | ||
43 | #define cputime_le(__a, __b) ((__a) <= (__b)) | ||
44 | |||
45 | #define cputime64_zero ((cputime64_t)0) | ||
46 | #define cputime64_add(__a, __b) ((__a) + (__b)) | ||
47 | #define cputime64_sub(__a, __b) ((__a) - (__b)) | ||
48 | #define cputime_to_cputime64(__ct) (__ct) | ||
49 | |||
50 | /* | ||
51 | * Convert cputime <-> jiffies (HZ) | ||
52 | */ | ||
53 | #define cputime_to_jiffies(__ct) ((__ct) / (NSEC_PER_SEC / HZ)) | ||
54 | #define jiffies_to_cputime(__jif) ((__jif) * (NSEC_PER_SEC / HZ)) | ||
55 | #define cputime64_to_jiffies64(__ct) ((__ct) / (NSEC_PER_SEC / HZ)) | ||
56 | #define jiffies64_to_cputime64(__jif) ((__jif) * (NSEC_PER_SEC / HZ)) | ||
57 | |||
58 | /* | ||
59 | * Convert cputime <-> milliseconds | ||
60 | */ | ||
61 | #define cputime_to_msecs(__ct) ((__ct) / NSEC_PER_MSEC) | ||
62 | #define msecs_to_cputime(__msecs) ((__msecs) * NSEC_PER_MSEC) | ||
63 | |||
64 | /* | ||
65 | * Convert cputime <-> seconds | ||
66 | */ | ||
67 | #define cputime_to_secs(__ct) ((__ct) / NSEC_PER_SEC) | ||
68 | #define secs_to_cputime(__secs) ((__secs) * NSEC_PER_SEC) | ||
69 | |||
70 | /* | ||
71 | * Convert cputime <-> timespec (nsec) | ||
72 | */ | ||
73 | static inline cputime_t timespec_to_cputime(const struct timespec *val) | ||
74 | { | ||
75 | cputime_t ret = val->tv_sec * NSEC_PER_SEC; | ||
76 | return (ret + val->tv_nsec); | ||
77 | } | ||
78 | static inline void cputime_to_timespec(const cputime_t ct, struct timespec *val) | ||
79 | { | ||
80 | val->tv_sec = ct / NSEC_PER_SEC; | ||
81 | val->tv_nsec = ct % NSEC_PER_SEC; | ||
82 | } | ||
83 | |||
84 | /* | ||
85 | * Convert cputime <-> timeval (msec) | ||
86 | */ | ||
87 | static inline cputime_t timeval_to_cputime(struct timeval *val) | ||
88 | { | ||
89 | cputime_t ret = val->tv_sec * NSEC_PER_SEC; | ||
90 | return (ret + val->tv_usec * NSEC_PER_USEC); | ||
91 | } | ||
92 | static inline void cputime_to_timeval(const cputime_t ct, struct timeval *val) | ||
93 | { | ||
94 | val->tv_sec = ct / NSEC_PER_SEC; | ||
95 | val->tv_usec = (ct % NSEC_PER_SEC) / NSEC_PER_USEC; | ||
96 | } | ||
97 | |||
98 | /* | ||
99 | * Convert cputime <-> clock (USER_HZ) | ||
100 | */ | ||
101 | #define cputime_to_clock_t(__ct) ((__ct) / (NSEC_PER_SEC / USER_HZ)) | ||
102 | #define clock_t_to_cputime(__x) ((__x) * (NSEC_PER_SEC / USER_HZ)) | ||
103 | |||
104 | /* | ||
105 | * Convert cputime64 to clock. | ||
106 | */ | ||
107 | #define cputime64_to_clock_t(__ct) cputime_to_clock_t((cputime_t)__ct) | ||
5 | 108 | ||
109 | #endif /* CONFIG_VIRT_CPU_ACCOUNTING */ | ||
6 | #endif /* __IA64_CPUTIME_H */ | 110 | #endif /* __IA64_CPUTIME_H */ |
diff --git a/include/asm-ia64/elf.h b/include/asm-ia64/elf.h index f8e83eca67a2..5e0c1a6bce8d 100644 --- a/include/asm-ia64/elf.h +++ b/include/asm-ia64/elf.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define ELF_ARCH EM_IA_64 | 26 | #define ELF_ARCH EM_IA_64 |
27 | 27 | ||
28 | #define USE_ELF_CORE_DUMP | 28 | #define USE_ELF_CORE_DUMP |
29 | #define CORE_DUMP_USE_REGSET | ||
29 | 30 | ||
30 | /* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are | 31 | /* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are |
31 | interpreted as follows by Linux: */ | 32 | interpreted as follows by Linux: */ |
@@ -154,6 +155,30 @@ extern void ia64_init_addr_space (void); | |||
154 | #define ELF_NGREG 128 /* we really need just 72 but let's leave some headroom... */ | 155 | #define ELF_NGREG 128 /* we really need just 72 but let's leave some headroom... */ |
155 | #define ELF_NFPREG 128 /* f0 and f1 could be omitted, but so what... */ | 156 | #define ELF_NFPREG 128 /* f0 and f1 could be omitted, but so what... */ |
156 | 157 | ||
158 | /* elf_gregset_t register offsets */ | ||
159 | #define ELF_GR_0_OFFSET 0 | ||
160 | #define ELF_NAT_OFFSET (32 * sizeof(elf_greg_t)) | ||
161 | #define ELF_PR_OFFSET (33 * sizeof(elf_greg_t)) | ||
162 | #define ELF_BR_0_OFFSET (34 * sizeof(elf_greg_t)) | ||
163 | #define ELF_CR_IIP_OFFSET (42 * sizeof(elf_greg_t)) | ||
164 | #define ELF_CFM_OFFSET (43 * sizeof(elf_greg_t)) | ||
165 | #define ELF_CR_IPSR_OFFSET (44 * sizeof(elf_greg_t)) | ||
166 | #define ELF_GR_OFFSET(i) (ELF_GR_0_OFFSET + i * sizeof(elf_greg_t)) | ||
167 | #define ELF_BR_OFFSET(i) (ELF_BR_0_OFFSET + i * sizeof(elf_greg_t)) | ||
168 | #define ELF_AR_RSC_OFFSET (45 * sizeof(elf_greg_t)) | ||
169 | #define ELF_AR_BSP_OFFSET (46 * sizeof(elf_greg_t)) | ||
170 | #define ELF_AR_BSPSTORE_OFFSET (47 * sizeof(elf_greg_t)) | ||
171 | #define ELF_AR_RNAT_OFFSET (48 * sizeof(elf_greg_t)) | ||
172 | #define ELF_AR_CCV_OFFSET (49 * sizeof(elf_greg_t)) | ||
173 | #define ELF_AR_UNAT_OFFSET (50 * sizeof(elf_greg_t)) | ||
174 | #define ELF_AR_FPSR_OFFSET (51 * sizeof(elf_greg_t)) | ||
175 | #define ELF_AR_PFS_OFFSET (52 * sizeof(elf_greg_t)) | ||
176 | #define ELF_AR_LC_OFFSET (53 * sizeof(elf_greg_t)) | ||
177 | #define ELF_AR_EC_OFFSET (54 * sizeof(elf_greg_t)) | ||
178 | #define ELF_AR_CSD_OFFSET (55 * sizeof(elf_greg_t)) | ||
179 | #define ELF_AR_SSD_OFFSET (56 * sizeof(elf_greg_t)) | ||
180 | #define ELF_AR_END_OFFSET (57 * sizeof(elf_greg_t)) | ||
181 | |||
157 | typedef unsigned long elf_fpxregset_t; | 182 | typedef unsigned long elf_fpxregset_t; |
158 | 183 | ||
159 | typedef unsigned long elf_greg_t; | 184 | typedef unsigned long elf_greg_t; |
@@ -183,12 +208,6 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); | |||
183 | 208 | ||
184 | struct task_struct; | 209 | struct task_struct; |
185 | 210 | ||
186 | extern int dump_task_regs(struct task_struct *, elf_gregset_t *); | ||
187 | extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); | ||
188 | |||
189 | #define ELF_CORE_COPY_TASK_REGS(tsk, elf_gregs) dump_task_regs(tsk, elf_gregs) | ||
190 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) | ||
191 | |||
192 | #define GATE_EHDR ((const struct elfhdr *) GATE_ADDR) | 211 | #define GATE_EHDR ((const struct elfhdr *) GATE_ADDR) |
193 | 212 | ||
194 | /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ | 213 | /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ |
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index d03bf9ff68e3..ef71b57fc2f4 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h | |||
@@ -30,8 +30,12 @@ | |||
30 | #include <asm/break.h> | 30 | #include <asm/break.h> |
31 | 31 | ||
32 | #define __ARCH_WANT_KPROBES_INSN_SLOT | 32 | #define __ARCH_WANT_KPROBES_INSN_SLOT |
33 | #define MAX_INSN_SIZE 1 | 33 | #define MAX_INSN_SIZE 2 /* last half is for kprobe-booster */ |
34 | #define BREAK_INST (long)(__IA64_BREAK_KPROBE << 6) | 34 | #define BREAK_INST (long)(__IA64_BREAK_KPROBE << 6) |
35 | #define NOP_M_INST (long)(1<<27) | ||
36 | #define BRL_INST(i1, i2) ((long)((0xcL << 37) | /* brl */ \ | ||
37 | (0x1L << 12) | /* many */ \ | ||
38 | (((i1) & 1) << 36) | ((i2) << 13))) /* imm */ | ||
35 | 39 | ||
36 | typedef union cmp_inst { | 40 | typedef union cmp_inst { |
37 | struct { | 41 | struct { |
@@ -112,6 +116,7 @@ struct arch_specific_insn { | |||
112 | #define INST_FLAG_FIX_RELATIVE_IP_ADDR 1 | 116 | #define INST_FLAG_FIX_RELATIVE_IP_ADDR 1 |
113 | #define INST_FLAG_FIX_BRANCH_REG 2 | 117 | #define INST_FLAG_FIX_BRANCH_REG 2 |
114 | #define INST_FLAG_BREAK_INST 4 | 118 | #define INST_FLAG_BREAK_INST 4 |
119 | #define INST_FLAG_BOOSTABLE 8 | ||
115 | unsigned long inst_flag; | 120 | unsigned long inst_flag; |
116 | unsigned short target_br_reg; | 121 | unsigned short target_br_reg; |
117 | unsigned short slot; | 122 | unsigned short slot; |
diff --git a/include/asm-ia64/kregs.h b/include/asm-ia64/kregs.h index 7e55a584975c..aefcdfee7f23 100644 --- a/include/asm-ia64/kregs.h +++ b/include/asm-ia64/kregs.h | |||
@@ -31,6 +31,9 @@ | |||
31 | #define IA64_TR_PALCODE 1 /* itr1: maps PALcode as required by EFI */ | 31 | #define IA64_TR_PALCODE 1 /* itr1: maps PALcode as required by EFI */ |
32 | #define IA64_TR_CURRENT_STACK 1 /* dtr1: maps kernel's memory- & register-stacks */ | 32 | #define IA64_TR_CURRENT_STACK 1 /* dtr1: maps kernel's memory- & register-stacks */ |
33 | 33 | ||
34 | #define IA64_TR_ALLOC_BASE 2 /* itr&dtr: Base of dynamic TR resource*/ | ||
35 | #define IA64_TR_ALLOC_MAX 32 /* Max number for dynamic use*/ | ||
36 | |||
34 | /* Processor status register bits: */ | 37 | /* Processor status register bits: */ |
35 | #define IA64_PSR_BE_BIT 1 | 38 | #define IA64_PSR_BE_BIT 1 |
36 | #define IA64_PSR_UP_BIT 2 | 39 | #define IA64_PSR_UP_BIT 2 |
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index f93308f54b61..7245a5781594 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h | |||
@@ -35,6 +35,7 @@ extern void find_memory (void); | |||
35 | extern void reserve_memory (void); | 35 | extern void reserve_memory (void); |
36 | extern void find_initrd (void); | 36 | extern void find_initrd (void); |
37 | extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); | 37 | extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); |
38 | extern int filter_memory (unsigned long start, unsigned long end, void *arg); | ||
38 | extern unsigned long efi_memmap_init(unsigned long *s, unsigned long *e); | 39 | extern unsigned long efi_memmap_init(unsigned long *s, unsigned long *e); |
39 | extern int find_max_min_low_pfn (unsigned long , unsigned long, void *); | 40 | extern int find_max_min_low_pfn (unsigned long , unsigned long, void *); |
40 | 41 | ||
@@ -56,7 +57,7 @@ extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end); | |||
56 | 57 | ||
57 | #define IGNORE_PFN0 1 /* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */ | 58 | #define IGNORE_PFN0 1 /* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */ |
58 | 59 | ||
59 | extern int register_active_ranges(u64 start, u64 end, void *arg); | 60 | extern int register_active_ranges(u64 start, u64 len, int nid); |
60 | 61 | ||
61 | #ifdef CONFIG_VIRTUAL_MEM_MAP | 62 | #ifdef CONFIG_VIRTUAL_MEM_MAP |
62 | # define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */ | 63 | # define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */ |
diff --git a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h index 6a8a27cfae3e..3499ff57bf42 100644 --- a/include/asm-ia64/numa.h +++ b/include/asm-ia64/numa.h | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include <asm/mmzone.h> | 23 | #include <asm/mmzone.h> |
24 | 24 | ||
25 | #define NUMA_NO_NODE -1 | ||
26 | |||
25 | extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned; | 27 | extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned; |
26 | extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; | 28 | extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; |
27 | extern pg_data_t *pgdat_list[MAX_NUMNODES]; | 29 | extern pg_data_t *pgdat_list[MAX_NUMNODES]; |
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 8a695d3407d2..67b02901ead4 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -13,6 +13,7 @@ | |||
13 | * Copyright (C) 1999 VA Linux Systems | 13 | * Copyright (C) 1999 VA Linux Systems |
14 | * Copyright (C) 1999 Walt Drummond <drummond@valinux.com> | 14 | * Copyright (C) 1999 Walt Drummond <drummond@valinux.com> |
15 | * Copyright (C) 1999 Srinivasa Prasad Thirumalachar <sprasad@sprasad.engr.sgi.com> | 15 | * Copyright (C) 1999 Srinivasa Prasad Thirumalachar <sprasad@sprasad.engr.sgi.com> |
16 | * Copyright (C) 2008 Silicon Graphics, Inc. (SGI) | ||
16 | * | 17 | * |
17 | * 99/10/01 davidm Make sure we pass zero for reserved parameters. | 18 | * 99/10/01 davidm Make sure we pass zero for reserved parameters. |
18 | * 00/03/07 davidm Updated pal_cache_flush() to be in sync with PAL v2.6. | 19 | * 00/03/07 davidm Updated pal_cache_flush() to be in sync with PAL v2.6. |
@@ -73,6 +74,8 @@ | |||
73 | #define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */ | 74 | #define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */ |
74 | #define PAL_GET_HW_POLICY 48 /* Get current hardware resource sharing policy */ | 75 | #define PAL_GET_HW_POLICY 48 /* Get current hardware resource sharing policy */ |
75 | #define PAL_SET_HW_POLICY 49 /* Set current hardware resource sharing policy */ | 76 | #define PAL_SET_HW_POLICY 49 /* Set current hardware resource sharing policy */ |
77 | #define PAL_VP_INFO 50 /* Information about virtual processor features */ | ||
78 | #define PAL_MC_HW_TRACKING 51 /* Hardware tracking status */ | ||
76 | 79 | ||
77 | #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ | 80 | #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ |
78 | #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ | 81 | #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ |
@@ -504,7 +507,8 @@ typedef struct pal_cache_check_info_s { | |||
504 | wiv : 1, /* Way field valid */ | 507 | wiv : 1, /* Way field valid */ |
505 | reserved2 : 1, | 508 | reserved2 : 1, |
506 | dp : 1, /* Data poisoned on MBE */ | 509 | dp : 1, /* Data poisoned on MBE */ |
507 | reserved3 : 8, | 510 | reserved3 : 6, |
511 | hlth : 2, /* Health indicator */ | ||
508 | 512 | ||
509 | index : 20, /* Cache line index */ | 513 | index : 20, /* Cache line index */ |
510 | reserved4 : 2, | 514 | reserved4 : 2, |
@@ -542,7 +546,9 @@ typedef struct pal_tlb_check_info_s { | |||
542 | dtc : 1, /* Fail in data TC */ | 546 | dtc : 1, /* Fail in data TC */ |
543 | itc : 1, /* Fail in inst. TC */ | 547 | itc : 1, /* Fail in inst. TC */ |
544 | op : 4, /* Cache operation */ | 548 | op : 4, /* Cache operation */ |
545 | reserved3 : 30, | 549 | reserved3 : 6, |
550 | hlth : 2, /* Health indicator */ | ||
551 | reserved4 : 22, | ||
546 | 552 | ||
547 | is : 1, /* instruction set (1 == ia32) */ | 553 | is : 1, /* instruction set (1 == ia32) */ |
548 | iv : 1, /* instruction set field valid */ | 554 | iv : 1, /* instruction set field valid */ |
@@ -633,7 +639,8 @@ typedef struct pal_uarch_check_info_s { | |||
633 | way : 6, /* Way of structure */ | 639 | way : 6, /* Way of structure */ |
634 | wv : 1, /* way valid */ | 640 | wv : 1, /* way valid */ |
635 | xv : 1, /* index valid */ | 641 | xv : 1, /* index valid */ |
636 | reserved1 : 8, | 642 | reserved1 : 6, |
643 | hlth : 2, /* Health indicator */ | ||
637 | index : 8, /* Index or set of the uarch | 644 | index : 8, /* Index or set of the uarch |
638 | * structure that failed. | 645 | * structure that failed. |
639 | */ | 646 | */ |
@@ -1213,14 +1220,12 @@ ia64_pal_mc_drain (void) | |||
1213 | 1220 | ||
1214 | /* Return the machine check dynamic processor state */ | 1221 | /* Return the machine check dynamic processor state */ |
1215 | static inline s64 | 1222 | static inline s64 |
1216 | ia64_pal_mc_dynamic_state (u64 offset, u64 *size, u64 *pds) | 1223 | ia64_pal_mc_dynamic_state (u64 info_type, u64 dy_buffer, u64 *size) |
1217 | { | 1224 | { |
1218 | struct ia64_pal_retval iprv; | 1225 | struct ia64_pal_retval iprv; |
1219 | PAL_CALL(iprv, PAL_MC_DYNAMIC_STATE, offset, 0, 0); | 1226 | PAL_CALL(iprv, PAL_MC_DYNAMIC_STATE, info_type, dy_buffer, 0); |
1220 | if (size) | 1227 | if (size) |
1221 | *size = iprv.v0; | 1228 | *size = iprv.v0; |
1222 | if (pds) | ||
1223 | *pds = iprv.v1; | ||
1224 | return iprv.status; | 1229 | return iprv.status; |
1225 | } | 1230 | } |
1226 | 1231 | ||
@@ -1281,15 +1286,41 @@ ia64_pal_mc_expected (u64 expected, u64 *previous) | |||
1281 | return iprv.status; | 1286 | return iprv.status; |
1282 | } | 1287 | } |
1283 | 1288 | ||
1289 | typedef union pal_hw_tracking_u { | ||
1290 | u64 pht_data; | ||
1291 | struct { | ||
1292 | u64 itc :4, /* Instruction cache tracking */ | ||
1293 | dct :4, /* Date cache tracking */ | ||
1294 | itt :4, /* Instruction TLB tracking */ | ||
1295 | ddt :4, /* Data TLB tracking */ | ||
1296 | reserved:48; | ||
1297 | } pal_hw_tracking_s; | ||
1298 | } pal_hw_tracking_u_t; | ||
1299 | |||
1300 | /* | ||
1301 | * Hardware tracking status. | ||
1302 | */ | ||
1303 | static inline s64 | ||
1304 | ia64_pal_mc_hw_tracking (u64 *status) | ||
1305 | { | ||
1306 | struct ia64_pal_retval iprv; | ||
1307 | PAL_CALL(iprv, PAL_MC_HW_TRACKING, 0, 0, 0); | ||
1308 | if (status) | ||
1309 | *status = iprv.v0; | ||
1310 | return iprv.status; | ||
1311 | } | ||
1312 | |||
1284 | /* Register a platform dependent location with PAL to which it can save | 1313 | /* Register a platform dependent location with PAL to which it can save |
1285 | * minimal processor state in the event of a machine check or initialization | 1314 | * minimal processor state in the event of a machine check or initialization |
1286 | * event. | 1315 | * event. |
1287 | */ | 1316 | */ |
1288 | static inline s64 | 1317 | static inline s64 |
1289 | ia64_pal_mc_register_mem (u64 physical_addr) | 1318 | ia64_pal_mc_register_mem (u64 physical_addr, u64 size, u64 *req_size) |
1290 | { | 1319 | { |
1291 | struct ia64_pal_retval iprv; | 1320 | struct ia64_pal_retval iprv; |
1292 | PAL_CALL(iprv, PAL_MC_REGISTER_MEM, physical_addr, 0, 0); | 1321 | PAL_CALL(iprv, PAL_MC_REGISTER_MEM, physical_addr, size, 0); |
1322 | if (req_size) | ||
1323 | *req_size = iprv.v0; | ||
1293 | return iprv.status; | 1324 | return iprv.status; |
1294 | } | 1325 | } |
1295 | 1326 | ||
@@ -1631,6 +1662,29 @@ ia64_pal_vm_summary (pal_vm_info_1_u_t *vm_info_1, pal_vm_info_2_u_t *vm_info_2) | |||
1631 | return iprv.status; | 1662 | return iprv.status; |
1632 | } | 1663 | } |
1633 | 1664 | ||
1665 | typedef union pal_vp_info_u { | ||
1666 | u64 pvi_val; | ||
1667 | struct { | ||
1668 | u64 index: 48, /* virtual feature set info */ | ||
1669 | vmm_id: 16; /* feature set id */ | ||
1670 | } pal_vp_info_s; | ||
1671 | } pal_vp_info_u_t; | ||
1672 | |||
1673 | /* | ||
1674 | * Returns infomation about virtual processor features | ||
1675 | */ | ||
1676 | static inline s64 | ||
1677 | ia64_pal_vp_info (u64 feature_set, u64 vp_buffer, u64 *vp_info, u64 *vmm_id) | ||
1678 | { | ||
1679 | struct ia64_pal_retval iprv; | ||
1680 | PAL_CALL(iprv, PAL_VP_INFO, feature_set, vp_buffer, 0); | ||
1681 | if (vp_info) | ||
1682 | *vp_info = iprv.v0; | ||
1683 | if (vmm_id) | ||
1684 | *vmm_id = iprv.v1; | ||
1685 | return iprv.status; | ||
1686 | } | ||
1687 | |||
1634 | typedef union pal_itr_valid_u { | 1688 | typedef union pal_itr_valid_u { |
1635 | u64 piv_val; | 1689 | u64 piv_val; |
1636 | struct { | 1690 | struct { |
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index e6204f14f614..ed70862ea247 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -371,7 +371,7 @@ pgd_index (unsigned long address) | |||
371 | /* The offset in the 1-level directory is given by the 3 region bits | 371 | /* The offset in the 1-level directory is given by the 3 region bits |
372 | (61..63) and the level-1 bits. */ | 372 | (61..63) and the level-1 bits. */ |
373 | static inline pgd_t* | 373 | static inline pgd_t* |
374 | pgd_offset (struct mm_struct *mm, unsigned long address) | 374 | pgd_offset (const struct mm_struct *mm, unsigned long address) |
375 | { | 375 | { |
376 | return mm->pgd + pgd_index(address); | 376 | return mm->pgd + pgd_index(address); |
377 | } | 377 | } |
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h index f4904db3b057..89594b442f83 100644 --- a/include/asm-ia64/sal.h +++ b/include/asm-ia64/sal.h | |||
@@ -296,6 +296,9 @@ enum { | |||
296 | EFI_GUID(0xe429faf8, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81) | 296 | EFI_GUID(0xe429faf8, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81) |
297 | #define SAL_PLAT_BUS_ERR_SECT_GUID \ | 297 | #define SAL_PLAT_BUS_ERR_SECT_GUID \ |
298 | EFI_GUID(0xe429faf9, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81) | 298 | EFI_GUID(0xe429faf9, 0x3cb7, 0x11d4, 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81) |
299 | #define PROCESSOR_ABSTRACTION_LAYER_OVERWRITE_GUID \ | ||
300 | EFI_GUID(0x6cb0a200, 0x893a, 0x11da, 0x96, 0xd2, 0x0, 0x10, 0x83, 0xff, \ | ||
301 | 0xca, 0x4d) | ||
299 | 302 | ||
300 | #define MAX_CACHE_ERRORS 6 | 303 | #define MAX_CACHE_ERRORS 6 |
301 | #define MAX_TLB_ERRORS 6 | 304 | #define MAX_TLB_ERRORS 6 |
@@ -879,6 +882,24 @@ extern void ia64_jump_to_sal(struct sal_to_os_boot *); | |||
879 | 882 | ||
880 | extern void ia64_sal_handler_init(void *entry_point, void *gpval); | 883 | extern void ia64_sal_handler_init(void *entry_point, void *gpval); |
881 | 884 | ||
885 | #define PALO_MAX_TLB_PURGES 0xFFFF | ||
886 | #define PALO_SIG "PALO" | ||
887 | |||
888 | struct palo_table { | ||
889 | u8 signature[4]; /* Should be "PALO" */ | ||
890 | u32 length; | ||
891 | u8 minor_revision; | ||
892 | u8 major_revision; | ||
893 | u8 checksum; | ||
894 | u8 reserved1[5]; | ||
895 | u16 max_tlb_purges; | ||
896 | u8 reserved2[6]; | ||
897 | }; | ||
898 | |||
899 | #define NPTCG_FROM_PAL 0 | ||
900 | #define NPTCG_FROM_PALO 1 | ||
901 | #define NPTCG_FROM_KERNEL_PARAMETER 2 | ||
902 | |||
882 | #endif /* __ASSEMBLY__ */ | 903 | #endif /* __ASSEMBLY__ */ |
883 | 904 | ||
884 | #endif /* _ASM_IA64_SAL_H */ | 905 | #endif /* _ASM_IA64_SAL_H */ |
diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h index 4fa733dd417a..ec5f355fb7e3 100644 --- a/include/asm-ia64/smp.h +++ b/include/asm-ia64/smp.h | |||
@@ -38,6 +38,9 @@ ia64_get_lid (void) | |||
38 | return lid.f.id << 8 | lid.f.eid; | 38 | return lid.f.id << 8 | lid.f.eid; |
39 | } | 39 | } |
40 | 40 | ||
41 | extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *), | ||
42 | void *info, int wait); | ||
43 | |||
41 | #define hard_smp_processor_id() ia64_get_lid() | 44 | #define hard_smp_processor_id() ia64_get_lid() |
42 | 45 | ||
43 | #ifdef CONFIG_SMP | 46 | #ifdef CONFIG_SMP |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 595112bca3cc..dff8128fa58e 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -210,6 +210,13 @@ struct task_struct; | |||
210 | extern void ia64_save_extra (struct task_struct *task); | 210 | extern void ia64_save_extra (struct task_struct *task); |
211 | extern void ia64_load_extra (struct task_struct *task); | 211 | extern void ia64_load_extra (struct task_struct *task); |
212 | 212 | ||
213 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
214 | extern void ia64_account_on_switch (struct task_struct *prev, struct task_struct *next); | ||
215 | # define IA64_ACCOUNT_ON_SWITCH(p,n) ia64_account_on_switch(p,n) | ||
216 | #else | ||
217 | # define IA64_ACCOUNT_ON_SWITCH(p,n) | ||
218 | #endif | ||
219 | |||
213 | #ifdef CONFIG_PERFMON | 220 | #ifdef CONFIG_PERFMON |
214 | DECLARE_PER_CPU(unsigned long, pfm_syst_info); | 221 | DECLARE_PER_CPU(unsigned long, pfm_syst_info); |
215 | # define PERFMON_IS_SYSWIDE() (__get_cpu_var(pfm_syst_info) & 0x1) | 222 | # define PERFMON_IS_SYSWIDE() (__get_cpu_var(pfm_syst_info) & 0x1) |
@@ -222,6 +229,7 @@ extern void ia64_load_extra (struct task_struct *task); | |||
222 | || IS_IA32_PROCESS(task_pt_regs(t)) || PERFMON_IS_SYSWIDE()) | 229 | || IS_IA32_PROCESS(task_pt_regs(t)) || PERFMON_IS_SYSWIDE()) |
223 | 230 | ||
224 | #define __switch_to(prev,next,last) do { \ | 231 | #define __switch_to(prev,next,last) do { \ |
232 | IA64_ACCOUNT_ON_SWITCH(prev, next); \ | ||
225 | if (IA64_HAS_EXTRA_STATE(prev)) \ | 233 | if (IA64_HAS_EXTRA_STATE(prev)) \ |
226 | ia64_save_extra(prev); \ | 234 | ia64_save_extra(prev); \ |
227 | if (IA64_HAS_EXTRA_STATE(next)) \ | 235 | if (IA64_HAS_EXTRA_STATE(next)) \ |
@@ -266,6 +274,10 @@ void cpu_idle_wait(void); | |||
266 | 274 | ||
267 | void default_idle(void); | 275 | void default_idle(void); |
268 | 276 | ||
277 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
278 | extern void account_system_vtime(struct task_struct *); | ||
279 | #endif | ||
280 | |||
269 | #endif /* __KERNEL__ */ | 281 | #endif /* __KERNEL__ */ |
270 | 282 | ||
271 | #endif /* __ASSEMBLY__ */ | 283 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index 93d83cbe0c8c..6da8069a0f77 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -31,6 +31,12 @@ struct thread_info { | |||
31 | mm_segment_t addr_limit; /* user-level address space limit */ | 31 | mm_segment_t addr_limit; /* user-level address space limit */ |
32 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ | 32 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ |
33 | struct restart_block restart_block; | 33 | struct restart_block restart_block; |
34 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
35 | __u64 ac_stamp; | ||
36 | __u64 ac_leave; | ||
37 | __u64 ac_stime; | ||
38 | __u64 ac_utime; | ||
39 | #endif | ||
34 | }; | 40 | }; |
35 | 41 | ||
36 | #define THREAD_SIZE KERNEL_STACK_SIZE | 42 | #define THREAD_SIZE KERNEL_STACK_SIZE |
@@ -62,9 +68,17 @@ struct thread_info { | |||
62 | #define task_stack_page(tsk) ((void *)(tsk)) | 68 | #define task_stack_page(tsk) ((void *)(tsk)) |
63 | 69 | ||
64 | #define __HAVE_THREAD_FUNCTIONS | 70 | #define __HAVE_THREAD_FUNCTIONS |
71 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
72 | #define setup_thread_stack(p, org) \ | ||
73 | *task_thread_info(p) = *task_thread_info(org); \ | ||
74 | task_thread_info(p)->ac_stime = 0; \ | ||
75 | task_thread_info(p)->ac_utime = 0; \ | ||
76 | task_thread_info(p)->task = (p); | ||
77 | #else | ||
65 | #define setup_thread_stack(p, org) \ | 78 | #define setup_thread_stack(p, org) \ |
66 | *task_thread_info(p) = *task_thread_info(org); \ | 79 | *task_thread_info(p) = *task_thread_info(org); \ |
67 | task_thread_info(p)->task = (p); | 80 | task_thread_info(p)->task = (p); |
81 | #endif | ||
68 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) | 82 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) |
69 | 83 | ||
70 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR | 84 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR |
diff --git a/include/asm-ia64/tlb.h b/include/asm-ia64/tlb.h index 26edcb750f9f..20d8a39680c2 100644 --- a/include/asm-ia64/tlb.h +++ b/include/asm-ia64/tlb.h | |||
@@ -64,6 +64,32 @@ struct mmu_gather { | |||
64 | struct page *pages[FREE_PTE_NR]; | 64 | struct page *pages[FREE_PTE_NR]; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct ia64_tr_entry { | ||
68 | u64 ifa; | ||
69 | u64 itir; | ||
70 | u64 pte; | ||
71 | u64 rr; | ||
72 | }; /*Record for tr entry!*/ | ||
73 | |||
74 | extern int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size); | ||
75 | extern void ia64_ptr_entry(u64 target_mask, int slot); | ||
76 | |||
77 | extern struct ia64_tr_entry __per_cpu_idtrs[NR_CPUS][2][IA64_TR_ALLOC_MAX]; | ||
78 | |||
79 | /* | ||
80 | region register macros | ||
81 | */ | ||
82 | #define RR_TO_VE(val) (((val) >> 0) & 0x0000000000000001) | ||
83 | #define RR_VE(val) (((val) & 0x0000000000000001) << 0) | ||
84 | #define RR_VE_MASK 0x0000000000000001L | ||
85 | #define RR_VE_SHIFT 0 | ||
86 | #define RR_TO_PS(val) (((val) >> 2) & 0x000000000000003f) | ||
87 | #define RR_PS(val) (((val) & 0x000000000000003f) << 2) | ||
88 | #define RR_PS_MASK 0x00000000000000fcL | ||
89 | #define RR_PS_SHIFT 2 | ||
90 | #define RR_RID_MASK 0x00000000ffffff00L | ||
91 | #define RR_TO_RID(val) ((val >> 8) & 0xffffff) | ||
92 | |||
67 | /* Users of the generic TLB shootdown code must declare this storage space. */ | 93 | /* Users of the generic TLB shootdown code must declare this storage space. */ |
68 | DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); | 94 | DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); |
69 | 95 | ||
diff --git a/include/asm-ia64/tlbflush.h b/include/asm-ia64/tlbflush.h index 7774a1cac0cc..3be25dfed164 100644 --- a/include/asm-ia64/tlbflush.h +++ b/include/asm-ia64/tlbflush.h | |||
@@ -17,6 +17,7 @@ | |||
17 | * Now for some TLB flushing routines. This is the kind of stuff that | 17 | * Now for some TLB flushing routines. This is the kind of stuff that |
18 | * can be very expensive, so try to avoid them whenever possible. | 18 | * can be very expensive, so try to avoid them whenever possible. |
19 | */ | 19 | */ |
20 | extern void setup_ptcg_sem(int max_purges, int from_palo); | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * Flush everything (kernel mapping may also have changed due to | 23 | * Flush everything (kernel mapping may also have changed due to |