aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 18:30:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 18:30:14 -0400
commitc25d5180441e344a3368d100c57f0a481c6944f7 (patch)
tree1aa053650b49f987effcbc91184c9a4208d402b1 /include
parent0ca9caae2d05ee0c4878aa3e2619cd23f4ad4cb4 (diff)
parent9a244b95ddb62a17b62f4b061b6e13ca4d177942 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Pass NULL not 0 for pointer value. [MIPS] IP27: Make declaration of setup_replication_mask a proper prototype. [MIPS] BigSur: More useful defconfig. [MIPS] Cleanup definitions of speed_t and tcflag_t. [MIPS] Fix compilation warnings in arch/mips/sibyte/bcm1480/smp.c [MIPS] Optimize and cleanup get_saved_sp, set_saved_sp [MIPS] <asm/irq.h> does not need pt_regs anymore. [MIPS] Workaround for bug in gcc -EB / -EL options. [MIPS] Fix timer setup for Jazz
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/irq.h2
-rw-r--r--include/asm-mips/stackframe.h64
-rw-r--r--include/asm-mips/termbits.h12
3 files changed, 22 insertions, 56 deletions
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index 1a9804c65369..0ce2a80b689e 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -24,8 +24,6 @@ static inline int irq_canonicalize(int irq)
24#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */ 24#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
25#endif 25#endif
26 26
27struct pt_regs;
28
29extern asmlinkage unsigned int do_IRQ(unsigned int irq); 27extern asmlinkage unsigned int do_IRQ(unsigned int irq);
30 28
31#ifdef CONFIG_MIPS_MT_SMTC 29#ifdef CONFIG_MIPS_MT_SMTC
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h
index 158a4cd12e46..1fae5dc58138 100644
--- a/include/asm-mips/stackframe.h
+++ b/include/asm-mips/stackframe.h
@@ -59,69 +59,43 @@
59 .endm 59 .endm
60 60
61#ifdef CONFIG_SMP 61#ifdef CONFIG_SMP
62 .macro get_saved_sp /* SMP variation */
63#ifdef CONFIG_32BIT
64#ifdef CONFIG_MIPS_MT_SMTC 62#ifdef CONFIG_MIPS_MT_SMTC
65 .set mips32 63#define PTEBASE_SHIFT 19 /* TCBIND */
66 mfc0 k0, CP0_TCBIND;
67 .set mips0
68 lui k1, %hi(kernelsp)
69 srl k0, k0, 19
70 /* No need to shift down and up to clear bits 0-1 */
71#else 64#else
72 mfc0 k0, CP0_CONTEXT 65#define PTEBASE_SHIFT 23 /* CONTEXT */
73 lui k1, %hi(kernelsp)
74 srl k0, k0, 23
75#endif
76 addu k1, k0
77 LONG_L k1, %lo(kernelsp)(k1)
78#endif 66#endif
79#ifdef CONFIG_64BIT 67 .macro get_saved_sp /* SMP variation */
80#ifdef CONFIG_MIPS_MT_SMTC 68#ifdef CONFIG_MIPS_MT_SMTC
81 .set mips64 69 mfc0 k0, CP0_TCBIND
82 mfc0 k0, CP0_TCBIND;
83 .set mips0
84 lui k0, %highest(kernelsp)
85 dsrl k1, 19
86 /* No need to shift down and up to clear bits 0-2 */
87#else 70#else
88 MFC0 k1, CP0_CONTEXT 71 MFC0 k0, CP0_CONTEXT
89 lui k0, %highest(kernelsp) 72#endif
90 dsrl k1, 23 73#if defined(CONFIG_BUILD_ELF64) || (defined(CONFIG_64BIT) && __GNUC__ < 4)
91 daddiu k0, %higher(kernelsp) 74 lui k1, %highest(kernelsp)
92 dsll k0, k0, 16 75 daddiu k1, %higher(kernelsp)
93 daddiu k0, %hi(kernelsp) 76 dsll k1, 16
94 dsll k0, k0, 16 77 daddiu k1, %hi(kernelsp)
95#endif /* CONFIG_MIPS_MT_SMTC */ 78 dsll k1, 16
96 daddu k1, k1, k0 79#else
80 lui k1, %hi(kernelsp)
81#endif
82 LONG_SRL k0, PTEBASE_SHIFT
83 LONG_ADDU k1, k0
97 LONG_L k1, %lo(kernelsp)(k1) 84 LONG_L k1, %lo(kernelsp)(k1)
98#endif /* CONFIG_64BIT */
99 .endm 85 .endm
100 86
101 .macro set_saved_sp stackp temp temp2 87 .macro set_saved_sp stackp temp temp2
102#ifdef CONFIG_32BIT
103#ifdef CONFIG_MIPS_MT_SMTC
104 mfc0 \temp, CP0_TCBIND
105 srl \temp, 19
106#else
107 mfc0 \temp, CP0_CONTEXT
108 srl \temp, 23
109#endif
110#endif
111#ifdef CONFIG_64BIT
112#ifdef CONFIG_MIPS_MT_SMTC 88#ifdef CONFIG_MIPS_MT_SMTC
113 mfc0 \temp, CP0_TCBIND 89 mfc0 \temp, CP0_TCBIND
114 dsrl \temp, 19
115#else 90#else
116 MFC0 \temp, CP0_CONTEXT 91 MFC0 \temp, CP0_CONTEXT
117 dsrl \temp, 23
118#endif
119#endif 92#endif
93 LONG_SRL \temp, PTEBASE_SHIFT
120 LONG_S \stackp, kernelsp(\temp) 94 LONG_S \stackp, kernelsp(\temp)
121 .endm 95 .endm
122#else 96#else
123 .macro get_saved_sp /* Uniprocessor variation */ 97 .macro get_saved_sp /* Uniprocessor variation */
124#ifdef CONFIG_64BIT 98#if defined(CONFIG_BUILD_ELF64) || (defined(CONFIG_64BIT) && __GNUC__ < 4)
125 lui k1, %highest(kernelsp) 99 lui k1, %highest(kernelsp)
126 daddiu k1, %higher(kernelsp) 100 daddiu k1, %higher(kernelsp)
127 dsll k1, k1, 16 101 dsll k1, k1, 16
diff --git a/include/asm-mips/termbits.h b/include/asm-mips/termbits.h
index fa6d04dac56b..b62ec7c521cc 100644
--- a/include/asm-mips/termbits.h
+++ b/include/asm-mips/termbits.h
@@ -3,7 +3,7 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 1995, 1996, 1999, 2001 Ralf Baechle 6 * Copyright (C) 1995, 96, 99, 2001, 06 Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc. 7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc. 8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 */ 9 */
@@ -13,14 +13,8 @@
13#include <linux/posix_types.h> 13#include <linux/posix_types.h>
14 14
15typedef unsigned char cc_t; 15typedef unsigned char cc_t;
16#if (_MIPS_SZLONG == 32) 16typedef unsigned int speed_t;
17typedef unsigned long speed_t; 17typedef unsigned int tcflag_t;
18typedef unsigned long tcflag_t;
19#endif
20#if (_MIPS_SZLONG == 64)
21typedef __u32 speed_t;
22typedef __u32 tcflag_t;
23#endif
24 18
25/* 19/*
26 * The ABI says nothing about NCC but seems to use NCCS as 20 * The ABI says nothing about NCC but seems to use NCCS as