aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/agp.h10
-rw-r--r--include/asm-ia64/break.h2
-rw-r--r--include/asm-ia64/compat.h1
-rw-r--r--include/asm-ia64/fcntl.h2
-rw-r--r--include/asm-ia64/kdebug.h61
-rw-r--r--include/asm-ia64/kprobes.h116
-rw-r--r--include/asm-ia64/mmzone.h14
-rw-r--r--include/asm-ia64/param.h2
-rw-r--r--include/asm-ia64/percpu.h2
-rw-r--r--include/asm-ia64/perfmon.h8
-rw-r--r--include/asm-ia64/pgtable.h9
-rw-r--r--include/asm-ia64/processor.h10
-rw-r--r--include/asm-ia64/smp.h2
-rw-r--r--include/asm-ia64/sn/mspec.h59
-rw-r--r--include/asm-ia64/sn/sn_sal.h28
-rw-r--r--include/asm-ia64/system.h10
-rw-r--r--include/asm-ia64/thread_info.h2
-rw-r--r--include/asm-ia64/topology.h61
-rw-r--r--include/asm-ia64/uncached.h12
-rw-r--r--include/asm-ia64/unistd.h1
20 files changed, 380 insertions, 32 deletions
diff --git a/include/asm-ia64/agp.h b/include/asm-ia64/agp.h
index d1316f1e6ee1..4e517f0e6afa 100644
--- a/include/asm-ia64/agp.h
+++ b/include/asm-ia64/agp.h
@@ -18,4 +18,14 @@
18#define flush_agp_mappings() /* nothing */ 18#define flush_agp_mappings() /* nothing */
19#define flush_agp_cache() mb() 19#define flush_agp_cache() mb()
20 20
21/* Convert a physical address to an address suitable for the GART. */
22#define phys_to_gart(x) (x)
23#define gart_to_phys(x) (x)
24
25/* GATT allocation. Returns/accepts GATT kernel virtual address. */
26#define alloc_gatt_pages(order) \
27 ((char *)__get_free_pages(GFP_KERNEL, (order)))
28#define free_gatt_pages(table, order) \
29 free_pages((unsigned long)(table), (order))
30
21#endif /* _ASM_IA64_AGP_H */ 31#endif /* _ASM_IA64_AGP_H */
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;
27typedef s32 compat_daddr_t; 27typedef s32 compat_daddr_t;
28typedef u32 compat_caddr_t; 28typedef u32 compat_caddr_t;
29typedef __kernel_fsid_t compat_fsid_t; 29typedef __kernel_fsid_t compat_fsid_t;
30typedef s32 compat_timer_t;
30 31
31typedef s32 compat_int_t; 32typedef s32 compat_int_t;
32typedef s32 compat_long_t; 33typedef s32 compat_long_t;
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/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
28struct pt_regs;
29
30struct die_args {
31 struct pt_regs *regs;
32 const char *str;
33 long err;
34 int trapnr;
35 int signr;
36};
37
38int register_die_notifier(struct notifier_block *nb);
39extern struct notifier_block *ia64die_chain;
40
41enum die_val {
42 DIE_BREAK = 1,
43 DIE_SS,
44 DIE_PAGE_FAULT,
45};
46
47static 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..7b700035e36d
--- /dev/null
+++ b/include/asm-ia64/kprobes.h
@@ -0,0 +1,116 @@
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 BREAK_INST (long)(__IA64_BREAK_KPROBE << 6)
32
33typedef union cmp_inst {
34 struct {
35 unsigned long long qp : 6;
36 unsigned long long p1 : 6;
37 unsigned long long c : 1;
38 unsigned long long r2 : 7;
39 unsigned long long r3 : 7;
40 unsigned long long p2 : 6;
41 unsigned long long ta : 1;
42 unsigned long long x2 : 2;
43 unsigned long long tb : 1;
44 unsigned long long opcode : 4;
45 unsigned long long reserved : 23;
46 }f;
47 unsigned long long l;
48} cmp_inst_t;
49
50struct kprobe;
51
52typedef struct _bundle {
53 struct {
54 unsigned long long template : 5;
55 unsigned long long slot0 : 41;
56 unsigned long long slot1_p0 : 64-46;
57 } quad0;
58 struct {
59 unsigned long long slot1_p1 : 41 - (64-46);
60 unsigned long long slot2 : 41;
61 } quad1;
62} __attribute__((__aligned__(16))) bundle_t;
63
64#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
65
66#define SLOT0_OPCODE_SHIFT (37)
67#define SLOT1_p1_OPCODE_SHIFT (37 - (64-46))
68#define SLOT2_OPCODE_SHIFT (37)
69
70#define INDIRECT_CALL_OPCODE (1)
71#define IP_RELATIVE_CALL_OPCODE (5)
72#define IP_RELATIVE_BRANCH_OPCODE (4)
73#define IP_RELATIVE_PREDICT_OPCODE (7)
74#define LONG_BRANCH_OPCODE (0xC)
75#define LONG_CALL_OPCODE (0xD)
76
77typedef struct kprobe_opcode {
78 bundle_t bundle;
79} kprobe_opcode_t;
80
81struct fnptr {
82 unsigned long ip;
83 unsigned long gp;
84};
85
86/* Architecture specific copy of original instruction*/
87struct arch_specific_insn {
88 /* copy of the instruction to be emulated */
89 kprobe_opcode_t insn;
90 #define INST_FLAG_FIX_RELATIVE_IP_ADDR 1
91 #define INST_FLAG_FIX_BRANCH_REG 2
92 unsigned long inst_flag;
93 unsigned short target_br_reg;
94};
95
96/* ia64 does not need this */
97static inline void jprobe_return(void)
98{
99}
100
101/* ia64 does not need this */
102static inline void arch_copy_kprobe(struct kprobe *p)
103{
104}
105
106#ifdef CONFIG_KPROBES
107extern int kprobe_exceptions_notify(struct notifier_block *self,
108 unsigned long val, void *data);
109#else /* !CONFIG_KPROBES */
110static inline int kprobe_exceptions_notify(struct notifier_block *self,
111 unsigned long val, void *data)
112{
113 return 0;
114}
115#endif
116#endif /* _ASM_KPROBES_H */
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
20static 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/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/perfmon.h b/include/asm-ia64/perfmon.h
index ed5416c5b1ac..7f3333dd00e4 100644
--- a/include/asm-ia64/perfmon.h
+++ b/include/asm-ia64/perfmon.h
@@ -177,6 +177,10 @@ typedef union {
177 177
178extern long perfmonctl(int fd, int cmd, void *arg, int narg); 178extern long perfmonctl(int fd, int cmd, void *arg, int narg);
179 179
180typedef struct {
181 void (*handler)(int irq, void *arg, struct pt_regs *regs);
182} pfm_intr_handler_desc_t;
183
180extern void pfm_save_regs (struct task_struct *); 184extern void pfm_save_regs (struct task_struct *);
181extern void pfm_load_regs (struct task_struct *); 185extern void pfm_load_regs (struct task_struct *);
182 186
@@ -187,6 +191,10 @@ extern void pfm_syst_wide_update_task(struct task_struct *, unsigned long info,
187extern void pfm_inherit(struct task_struct *task, struct pt_regs *regs); 191extern void pfm_inherit(struct task_struct *task, struct pt_regs *regs);
188extern void pfm_init_percpu(void); 192extern void pfm_init_percpu(void);
189extern void pfm_handle_work(void); 193extern void pfm_handle_work(void);
194extern int pfm_install_alt_pmu_interrupt(pfm_intr_handler_desc_t *h);
195extern int pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *h);
196
197
190 198
191/* 199/*
192 * Reset PMD register flags 200 * Reset PMD register flags
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index ea121a002309..48586e08f432 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -8,7 +8,7 @@
8 * This hopefully works with any (fixed) IA-64 page-size, as defined 8 * This hopefully works with any (fixed) IA-64 page-size, as defined
9 * in <asm/page.h>. 9 * in <asm/page.h>.
10 * 10 *
11 * Copyright (C) 1998-2004 Hewlett-Packard Co 11 * Copyright (C) 1998-2005 Hewlett-Packard Co
12 * David Mosberger-Tang <davidm@hpl.hp.com> 12 * David Mosberger-Tang <davidm@hpl.hp.com>
13 */ 13 */
14 14
@@ -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
@@ -551,7 +552,11 @@ do { \
551 552
552/* These tell get_user_pages() that the first gate page is accessible from user-level. */ 553/* These tell get_user_pages() that the first gate page is accessible from user-level. */
553#define FIXADDR_USER_START GATE_ADDR 554#define FIXADDR_USER_START GATE_ADDR
554#define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE) 555#ifdef HAVE_BUGGY_SEGREL
556# define FIXADDR_USER_END (GATE_ADDR + 2*PAGE_SIZE)
557#else
558# define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE)
559#endif
555 560
556#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG 561#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
557#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY 562#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index 9e1ba8b7fb68..91bbd1f22461 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -403,7 +403,10 @@ extern void ia64_setreg_unknown_kr (void);
403 * task_struct at this point. 403 * task_struct at this point.
404 */ 404 */
405 405
406/* Return TRUE if task T owns the fph partition of the CPU we're running on. */ 406/*
407 * Return TRUE if task T owns the fph partition of the CPU we're running on.
408 * Must be called from code that has preemption disabled.
409 */
407#define ia64_is_local_fpu_owner(t) \ 410#define ia64_is_local_fpu_owner(t) \
408({ \ 411({ \
409 struct task_struct *__ia64_islfo_task = (t); \ 412 struct task_struct *__ia64_islfo_task = (t); \
@@ -411,7 +414,10 @@ extern void ia64_setreg_unknown_kr (void);
411 && __ia64_islfo_task == (struct task_struct *) ia64_get_kr(IA64_KR_FPU_OWNER)); \ 414 && __ia64_islfo_task == (struct task_struct *) ia64_get_kr(IA64_KR_FPU_OWNER)); \
412}) 415})
413 416
414/* Mark task T as owning the fph partition of the CPU we're running on. */ 417/*
418 * Mark task T as owning the fph partition of the CPU we're running on.
419 * Must be called from code that has preemption disabled.
420 */
415#define ia64_set_local_fpu_owner(t) do { \ 421#define ia64_set_local_fpu_owner(t) do { \
416 struct task_struct *__ia64_slfo_task = (t); \ 422 struct task_struct *__ia64_slfo_task = (t); \
417 __ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \ 423 __ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \
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
51extern struct smp_boot_data { 51extern struct smp_boot_data {
52 int cpu_count; 52 int cpu_count;
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 */
51typedef 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/sn_sal.h b/include/asm-ia64/sn/sn_sal.h
index 56d74ca76b5d..eb0395ad0d6a 100644
--- a/include/asm-ia64/sn/sn_sal.h
+++ b/include/asm-ia64/sn/sn_sal.h
@@ -115,6 +115,13 @@
115#define SAL_IROUTER_INTR_XMIT SAL_CONSOLE_INTR_XMIT 115#define SAL_IROUTER_INTR_XMIT SAL_CONSOLE_INTR_XMIT
116#define SAL_IROUTER_INTR_RECV SAL_CONSOLE_INTR_RECV 116#define SAL_IROUTER_INTR_RECV SAL_CONSOLE_INTR_RECV
117 117
118/*
119 * Error Handling Features
120 */
121#define SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV 0x1
122#define SAL_ERR_FEAT_LOG_SBES 0x2
123#define SAL_ERR_FEAT_MFR_OVERRIDE 0x4
124#define SAL_ERR_FEAT_SBE_THRESHOLD 0xffff0000
118 125
119/* 126/*
120 * SAL Error Codes 127 * SAL Error Codes
@@ -342,6 +349,25 @@ ia64_sn_plat_cpei_handler(void)
342} 349}
343 350
344/* 351/*
352 * Set Error Handling Features
353 */
354static inline u64
355ia64_sn_plat_set_error_handling_features(void)
356{
357 struct ia64_sal_retval ret_stuff;
358
359 ret_stuff.status = 0;
360 ret_stuff.v0 = 0;
361 ret_stuff.v1 = 0;
362 ret_stuff.v2 = 0;
363 SAL_CALL_REENTRANT(ret_stuff, SN_SAL_SET_ERROR_HANDLING_FEATURES,
364 (SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV | SAL_ERR_FEAT_LOG_SBES),
365 0, 0, 0, 0, 0, 0);
366
367 return ret_stuff.status;
368}
369
370/*
345 * Checks for console input. 371 * Checks for console input.
346 */ 372 */
347static inline u64 373static inline u64
@@ -472,7 +498,7 @@ static inline u64
472ia64_sn_pod_mode(void) 498ia64_sn_pod_mode(void)
473{ 499{
474 struct ia64_sal_retval isrv; 500 struct ia64_sal_retval isrv;
475 SAL_CALL(isrv, SN_SAL_POD_MODE, 0, 0, 0, 0, 0, 0, 0); 501 SAL_CALL_REENTRANT(isrv, SN_SAL_POD_MODE, 0, 0, 0, 0, 0, 0, 0);
476 if (isrv.status) 502 if (isrv.status)
477 return 0; 503 return 0;
478 return isrv.v0; 504 return isrv.v0;
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
278do { \
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..4e64c2a6b369 100644
--- a/include/asm-ia64/topology.h
+++ b/include/asm-ia64/topology.h
@@ -42,25 +42,54 @@
42 42
43void build_cpu_to_node_map(void); 43void build_cpu_to_node_map(void);
44 44
45#define SD_CPU_INIT (struct sched_domain) { \
46 .span = CPU_MASK_NONE, \
47 .parent = NULL, \
48 .groups = NULL, \
49 .min_interval = 1, \
50 .max_interval = 4, \
51 .busy_factor = 64, \
52 .imbalance_pct = 125, \
53 .cache_hot_time = (10*1000000), \
54 .per_cpu_gain = 100, \
55 .cache_nice_tries = 2, \
56 .busy_idx = 2, \
57 .idle_idx = 1, \
58 .newidle_idx = 2, \
59 .wake_idx = 1, \
60 .forkexec_idx = 1, \
61 .flags = SD_LOAD_BALANCE \
62 | SD_BALANCE_NEWIDLE \
63 | SD_BALANCE_EXEC \
64 | SD_WAKE_AFFINE, \
65 .last_balance = jiffies, \
66 .balance_interval = 1, \
67 .nr_balance_failed = 0, \
68}
69
45/* sched_domains SD_NODE_INIT for IA64 NUMA machines */ 70/* sched_domains SD_NODE_INIT for IA64 NUMA machines */
46#define SD_NODE_INIT (struct sched_domain) { \ 71#define SD_NODE_INIT (struct sched_domain) { \
47 .span = CPU_MASK_NONE, \ 72 .span = CPU_MASK_NONE, \
48 .parent = NULL, \ 73 .parent = NULL, \
49 .groups = NULL, \ 74 .groups = NULL, \
50 .min_interval = 80, \ 75 .min_interval = 8, \
51 .max_interval = 320, \ 76 .max_interval = 8*(min(num_online_cpus(), 32)), \
52 .busy_factor = 320, \ 77 .busy_factor = 64, \
53 .imbalance_pct = 125, \ 78 .imbalance_pct = 125, \
54 .cache_hot_time = (10*1000000), \ 79 .cache_hot_time = (10*1000000), \
55 .cache_nice_tries = 1, \ 80 .cache_nice_tries = 2, \
81 .busy_idx = 3, \
82 .idle_idx = 2, \
83 .newidle_idx = 0, /* unused */ \
84 .wake_idx = 1, \
85 .forkexec_idx = 1, \
56 .per_cpu_gain = 100, \ 86 .per_cpu_gain = 100, \
57 .flags = SD_LOAD_BALANCE \ 87 .flags = SD_LOAD_BALANCE \
58 | SD_BALANCE_EXEC \ 88 | SD_BALANCE_EXEC \
59 | SD_BALANCE_NEWIDLE \ 89 | SD_BALANCE_FORK \
60 | SD_WAKE_IDLE \
61 | SD_WAKE_BALANCE, \ 90 | SD_WAKE_BALANCE, \
62 .last_balance = jiffies, \ 91 .last_balance = jiffies, \
63 .balance_interval = 1, \ 92 .balance_interval = 64, \
64 .nr_balance_failed = 0, \ 93 .nr_balance_failed = 0, \
65} 94}
66 95
@@ -69,17 +98,21 @@ void build_cpu_to_node_map(void);
69 .span = CPU_MASK_NONE, \ 98 .span = CPU_MASK_NONE, \
70 .parent = NULL, \ 99 .parent = NULL, \
71 .groups = NULL, \ 100 .groups = NULL, \
72 .min_interval = 80, \ 101 .min_interval = 64, \
73 .max_interval = 320, \ 102 .max_interval = 64*num_online_cpus(), \
74 .busy_factor = 320, \ 103 .busy_factor = 128, \
75 .imbalance_pct = 125, \ 104 .imbalance_pct = 133, \
76 .cache_hot_time = (10*1000000), \ 105 .cache_hot_time = (10*1000000), \
77 .cache_nice_tries = 1, \ 106 .cache_nice_tries = 1, \
107 .busy_idx = 3, \
108 .idle_idx = 3, \
109 .newidle_idx = 0, /* unused */ \
110 .wake_idx = 0, /* unused */ \
111 .forkexec_idx = 0, /* unused */ \
78 .per_cpu_gain = 100, \ 112 .per_cpu_gain = 100, \
79 .flags = SD_LOAD_BALANCE \ 113 .flags = SD_LOAD_BALANCE, \
80 | SD_BALANCE_EXEC, \
81 .last_balance = jiffies, \ 114 .last_balance = jiffies, \
82 .balance_interval = 100*(63+num_online_cpus())/64, \ 115 .balance_interval = 64, \
83 .nr_balance_failed = 0, \ 116 .nr_balance_failed = 0, \
84} 117}
85 118
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
11extern unsigned long uncached_alloc_page(int nid);
12extern void uncached_free_page(unsigned long);
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index 33e26c557c5c..f7f43ec2483a 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -263,6 +263,7 @@
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_set_zone_reclaim 1276
266 267
267#ifdef __KERNEL__ 268#ifdef __KERNEL__
268 269