aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-18 12:34:28 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-18 12:34:28 -0400
commit5bc705e9fe774be9bb87584644c1f6752ee5ea7e (patch)
tree5bcab227cc2008df6cfb17533be0a69ffd21e981 /include
parent605a494e4df0b2dabdebcdfee99536b0f6a22adc (diff)
parent405849610fd96b4f34cd1875c4c033228fea6c0f (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [MATH-EMU]: Fix underflow exception reporting. [SPARC64]: Create a HWCAP_SPARC_N2 and report it to userspace on Niagara-2. [SPARC64]: SMP trampoline needs to avoid %tick_cmpr on sun4v too. [SPARC64]: Do not touch %tick_cmpr on sun4v cpus. [SPARC64]: Niagara-2 optimized copies. [SPARC64]: Allow userspace to get at the machine description. [SPARC32]: Remove superfluous 'kernel_end' alignment on sun4c. [SPARC32]: Fix bogus ramdisk image location check. [SPARC32]: Remove iommu from struct sbus_bus and use archdata like sparc64.
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc/sbus.h1
-rw-r--r--include/asm-sparc/sfp-machine.h6
-rw-r--r--include/asm-sparc64/elf.h10
-rw-r--r--include/asm-sparc64/sfp-machine.h2
-rw-r--r--include/math-emu/op-common.h5
-rw-r--r--include/math-emu/soft-fp.h7
6 files changed, 27 insertions, 4 deletions
diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h
index d036e4419d79..27d076c46964 100644
--- a/include/asm-sparc/sbus.h
+++ b/include/asm-sparc/sbus.h
@@ -68,7 +68,6 @@ struct sbus_dev {
68/* This struct describes the SBus(s) found on this machine. */ 68/* This struct describes the SBus(s) found on this machine. */
69struct sbus_bus { 69struct sbus_bus {
70 struct of_device ofdev; 70 struct of_device ofdev;
71 void *iommu; /* Opaque IOMMU cookie */
72 struct sbus_dev *devices; /* Link to devices on this SBus */ 71 struct sbus_dev *devices; /* Link to devices on this SBus */
73 struct sbus_bus *next; /* next SBus, if more than one SBus */ 72 struct sbus_bus *next; /* next SBus, if more than one SBus */
74 int prom_node; /* PROM device tree node for this SBus */ 73 int prom_node; /* PROM device tree node for this SBus */
diff --git a/include/asm-sparc/sfp-machine.h b/include/asm-sparc/sfp-machine.h
index ecfc86a4a725..266a42b8f99f 100644
--- a/include/asm-sparc/sfp-machine.h
+++ b/include/asm-sparc/sfp-machine.h
@@ -203,4 +203,10 @@ extern struct task_struct *last_task_used_math;
203#define FP_INHIBIT_RESULTS ((last_task_used_math->thread.fsr >> 23) & _fex) 203#define FP_INHIBIT_RESULTS ((last_task_used_math->thread.fsr >> 23) & _fex)
204#endif 204#endif
205 205
206#ifdef CONFIG_SMP
207#define FP_TRAPPING_EXCEPTIONS ((current->thread.fsr >> 23) & 0x1f)
208#else
209#define FP_TRAPPING_EXCEPTIONS ((last_task_used_math->thread.fsr >> 23) & 0x1f)
210#endif
211
206#endif 212#endif
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
index 303d85e2f82e..8653e8665009 100644
--- a/include/asm-sparc64/elf.h
+++ b/include/asm-sparc64/elf.h
@@ -70,6 +70,7 @@
70#define HWCAP_SPARC_V9 16 70#define HWCAP_SPARC_V9 16
71#define HWCAP_SPARC_ULTRA3 32 71#define HWCAP_SPARC_ULTRA3 32
72#define HWCAP_SPARC_BLKINIT 64 72#define HWCAP_SPARC_BLKINIT 64
73#define HWCAP_SPARC_N2 128
73 74
74/* 75/*
75 * These are used to set parameters in the core dumps. 76 * These are used to set parameters in the core dumps.
@@ -155,8 +156,13 @@ static inline unsigned int sparc64_elf_hwcap(void)
155 156
156 if (tlb_type == cheetah || tlb_type == cheetah_plus) 157 if (tlb_type == cheetah || tlb_type == cheetah_plus)
157 cap |= HWCAP_SPARC_ULTRA3; 158 cap |= HWCAP_SPARC_ULTRA3;
158 else if (tlb_type == hypervisor) 159 else if (tlb_type == hypervisor) {
159 cap |= HWCAP_SPARC_BLKINIT; 160 if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 ||
161 sun4v_chip_type == SUN4V_CHIP_NIAGARA2)
162 cap |= HWCAP_SPARC_BLKINIT;
163 if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2)
164 cap |= HWCAP_SPARC_N2;
165 }
160 166
161 return cap; 167 return cap;
162} 168}
diff --git a/include/asm-sparc64/sfp-machine.h b/include/asm-sparc64/sfp-machine.h
index 89d42431efb5..c9331b02d9c8 100644
--- a/include/asm-sparc64/sfp-machine.h
+++ b/include/asm-sparc64/sfp-machine.h
@@ -88,4 +88,6 @@
88 88
89#define FP_INHIBIT_RESULTS ((current_thread_info()->xfsr[0] >> 23) & _fex) 89#define FP_INHIBIT_RESULTS ((current_thread_info()->xfsr[0] >> 23) & _fex)
90 90
91#define FP_TRAPPING_EXCEPTIONS ((current_thread_info()->xfsr[0] >> 23) & 0x1f)
92
91#endif 93#endif
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h
index 93780abd01bc..bb46e7645d53 100644
--- a/include/math-emu/op-common.h
+++ b/include/math-emu/op-common.h
@@ -145,13 +145,16 @@ do { \
145 { \ 145 { \
146 X##_e = 1; \ 146 X##_e = 1; \
147 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ 147 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
148 FP_SET_EXCEPTION(FP_EX_INEXACT); \
148 } \ 149 } \
149 else \ 150 else \
150 { \ 151 { \
151 X##_e = 0; \ 152 X##_e = 0; \
152 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ 153 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
153 FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \
154 } \ 154 } \
155 if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \
156 (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
157 FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \
155 } \ 158 } \
156 else \ 159 else \
157 { \ 160 { \
diff --git a/include/math-emu/soft-fp.h b/include/math-emu/soft-fp.h
index d02eb64a865b..a0721ef5c2f9 100644
--- a/include/math-emu/soft-fp.h
+++ b/include/math-emu/soft-fp.h
@@ -97,12 +97,19 @@
97#define FP_INHIBIT_RESULTS 0 97#define FP_INHIBIT_RESULTS 0
98#endif 98#endif
99 99
100#ifndef FP_TRAPPING_EXCEPTIONS
101#define FP_TRAPPING_EXCPETIONS 0
102#endif
103
100#define FP_SET_EXCEPTION(ex) \ 104#define FP_SET_EXCEPTION(ex) \
101 _fex |= (ex) 105 _fex |= (ex)
102 106
103#define FP_UNSET_EXCEPTION(ex) \ 107#define FP_UNSET_EXCEPTION(ex) \
104 _fex &= ~(ex) 108 _fex &= ~(ex)
105 109
110#define FP_CUR_EXCEPTIONS \
111 (_fex)
112
106#define FP_CLEAR_EXCEPTIONS \ 113#define FP_CLEAR_EXCEPTIONS \
107 _fex = 0 114 _fex = 0
108 115