diff options
Diffstat (limited to 'include')
57 files changed, 543 insertions, 209 deletions
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index faff403e1061..7d0298347ee7 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
@@ -23,7 +23,11 @@ | |||
23 | * and page free order so much.. | 23 | * and page free order so much.. |
24 | */ | 24 | */ |
25 | #ifdef CONFIG_SMP | 25 | #ifdef CONFIG_SMP |
26 | #define FREE_PTE_NR 506 | 26 | #ifdef ARCH_FREE_PTR_NR |
27 | #define FREE_PTR_NR ARCH_FREE_PTR_NR | ||
28 | #else | ||
29 | #define FREE_PTE_NR 506 | ||
30 | #endif | ||
27 | #define tlb_fast_mode(tlb) ((tlb)->nr == ~0U) | 31 | #define tlb_fast_mode(tlb) ((tlb)->nr == ~0U) |
28 | #else | 32 | #else |
29 | #define FREE_PTE_NR 1 | 33 | #define FREE_PTE_NR 1 |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 6a1b1882285c..8c454aa58ac6 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -130,6 +130,8 @@ extern unsigned int nmi_watchdog; | |||
130 | #define NMI_LOCAL_APIC 2 | 130 | #define NMI_LOCAL_APIC 2 |
131 | #define NMI_INVALID 3 | 131 | #define NMI_INVALID 3 |
132 | 132 | ||
133 | extern int disable_timer_pin_1; | ||
134 | |||
133 | #else /* !CONFIG_X86_LOCAL_APIC */ | 135 | #else /* !CONFIG_X86_LOCAL_APIC */ |
134 | static inline void lapic_shutdown(void) { } | 136 | static inline void lapic_shutdown(void) { } |
135 | 137 | ||
diff --git a/include/asm-i386/numa.h b/include/asm-i386/numa.h new file mode 100644 index 000000000000..96fcb157db1d --- /dev/null +++ b/include/asm-i386/numa.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | int pxm_to_nid(int pxm); | ||
3 | |||
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index 2461b731781e..0ec27c9e8e45 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -60,7 +60,7 @@ static inline int node_to_first_cpu(int node) | |||
60 | return first_cpu(mask); | 60 | return first_cpu(mask); |
61 | } | 61 | } |
62 | 62 | ||
63 | #define pcibus_to_node(bus) mp_bus_id_to_node[(bus)->number] | 63 | #define pcibus_to_node(bus) ((long) (bus)->sysdata) |
64 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)) | 64 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)) |
65 | 65 | ||
66 | /* sched_domains SD_NODE_INIT for NUMAQ machines */ | 66 | /* sched_domains SD_NODE_INIT for NUMAQ machines */ |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index a7cb377745bf..fbaf90a3968c 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -332,7 +332,7 @@ type name(type1 arg1) \ | |||
332 | long __res; \ | 332 | long __res; \ |
333 | __asm__ volatile ("int $0x80" \ | 333 | __asm__ volatile ("int $0x80" \ |
334 | : "=a" (__res) \ | 334 | : "=a" (__res) \ |
335 | : "0" (__NR_##name),"b" ((long)(arg1))); \ | 335 | : "0" (__NR_##name),"b" ((long)(arg1)) : "memory"); \ |
336 | __syscall_return(type,__res); \ | 336 | __syscall_return(type,__res); \ |
337 | } | 337 | } |
338 | 338 | ||
@@ -342,7 +342,7 @@ type name(type1 arg1,type2 arg2) \ | |||
342 | long __res; \ | 342 | long __res; \ |
343 | __asm__ volatile ("int $0x80" \ | 343 | __asm__ volatile ("int $0x80" \ |
344 | : "=a" (__res) \ | 344 | : "=a" (__res) \ |
345 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \ | 345 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)) : "memory"); \ |
346 | __syscall_return(type,__res); \ | 346 | __syscall_return(type,__res); \ |
347 | } | 347 | } |
348 | 348 | ||
@@ -353,7 +353,7 @@ long __res; \ | |||
353 | __asm__ volatile ("int $0x80" \ | 353 | __asm__ volatile ("int $0x80" \ |
354 | : "=a" (__res) \ | 354 | : "=a" (__res) \ |
355 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ | 355 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ |
356 | "d" ((long)(arg3))); \ | 356 | "d" ((long)(arg3)) : "memory"); \ |
357 | __syscall_return(type,__res); \ | 357 | __syscall_return(type,__res); \ |
358 | } | 358 | } |
359 | 359 | ||
@@ -364,7 +364,7 @@ long __res; \ | |||
364 | __asm__ volatile ("int $0x80" \ | 364 | __asm__ volatile ("int $0x80" \ |
365 | : "=a" (__res) \ | 365 | : "=a" (__res) \ |
366 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ | 366 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ |
367 | "d" ((long)(arg3)),"S" ((long)(arg4))); \ | 367 | "d" ((long)(arg3)),"S" ((long)(arg4)) : "memory"); \ |
368 | __syscall_return(type,__res); \ | 368 | __syscall_return(type,__res); \ |
369 | } | 369 | } |
370 | 370 | ||
@@ -376,7 +376,7 @@ long __res; \ | |||
376 | __asm__ volatile ("int $0x80" \ | 376 | __asm__ volatile ("int $0x80" \ |
377 | : "=a" (__res) \ | 377 | : "=a" (__res) \ |
378 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ | 378 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ |
379 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \ | 379 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)) : "memory"); \ |
380 | __syscall_return(type,__res); \ | 380 | __syscall_return(type,__res); \ |
381 | } | 381 | } |
382 | 382 | ||
@@ -389,7 +389,7 @@ __asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; int $0x80 ; p | |||
389 | : "=a" (__res) \ | 389 | : "=a" (__res) \ |
390 | : "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ | 390 | : "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ |
391 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ | 391 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ |
392 | "0" ((long)(arg6))); \ | 392 | "0" ((long)(arg6)) : "memory"); \ |
393 | __syscall_return(type,__res); \ | 393 | __syscall_return(type,__res); \ |
394 | } | 394 | } |
395 | 395 | ||
diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h index f95e32b40425..c42f88a9b9f9 100644 --- a/include/asm-m68knommu/bitops.h +++ b/include/asm-m68knommu/bitops.h | |||
@@ -259,7 +259,7 @@ static __inline__ int __test_bit(int nr, const volatile unsigned long * addr) | |||
259 | #define find_first_bit(addr, size) \ | 259 | #define find_first_bit(addr, size) \ |
260 | find_next_bit((addr), (size), 0) | 260 | find_next_bit((addr), (size), 0) |
261 | 261 | ||
262 | static __inline__ int find_next_zero_bit (void * addr, int size, int offset) | 262 | static __inline__ int find_next_zero_bit (const void * addr, int size, int offset) |
263 | { | 263 | { |
264 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); | 264 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); |
265 | unsigned long result = offset & ~31UL; | 265 | unsigned long result = offset & ~31UL; |
diff --git a/include/asm-m68knommu/checksum.h b/include/asm-m68knommu/checksum.h index 92cf102c2534..294ec7583ac9 100644 --- a/include/asm-m68knommu/checksum.h +++ b/include/asm-m68knommu/checksum.h | |||
@@ -25,7 +25,8 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) | |||
25 | * better 64-bit) boundary | 25 | * better 64-bit) boundary |
26 | */ | 26 | */ |
27 | 27 | ||
28 | unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum); | 28 | unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, |
29 | int len, int sum); | ||
29 | 30 | ||
30 | 31 | ||
31 | /* | 32 | /* |
@@ -35,8 +36,8 @@ unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum); | |||
35 | * better 64-bit) boundary | 36 | * better 64-bit) boundary |
36 | */ | 37 | */ |
37 | 38 | ||
38 | extern unsigned int csum_partial_copy_from_user(const char *src, char *dst, | 39 | extern unsigned int csum_partial_copy_from_user(const unsigned char *src, |
39 | int len, int sum, int *csum_err); | 40 | unsigned char *dst, int len, int sum, int *csum_err); |
40 | 41 | ||
41 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | 42 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ |
42 | csum_partial_copy((src), (dst), (len), (sum)) | 43 | csum_partial_copy((src), (dst), (len), (sum)) |
diff --git a/include/asm-m68knommu/m527xsim.h b/include/asm-m68knommu/m527xsim.h index d280d013da03..e7878d0f7d7a 100644 --- a/include/asm-m68knommu/m527xsim.h +++ b/include/asm-m68knommu/m527xsim.h | |||
@@ -37,13 +37,14 @@ | |||
37 | /* | 37 | /* |
38 | * SDRAM configuration registers. | 38 | * SDRAM configuration registers. |
39 | */ | 39 | */ |
40 | #ifdef CONFIG_M5271EVB | 40 | #ifdef CONFIG_M5271 |
41 | #define MCFSIM_DCR 0x40 /* SDRAM control */ | 41 | #define MCFSIM_DCR 0x40 /* SDRAM control */ |
42 | #define MCFSIM_DACR0 0x48 /* SDRAM base address 0 */ | 42 | #define MCFSIM_DACR0 0x48 /* SDRAM base address 0 */ |
43 | #define MCFSIM_DMR0 0x4c /* SDRAM address mask 0 */ | 43 | #define MCFSIM_DMR0 0x4c /* SDRAM address mask 0 */ |
44 | #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ | 44 | #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ |
45 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ | 45 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ |
46 | #else | 46 | #endif |
47 | #ifdef CONFIG_M5275 | ||
47 | #define MCFSIM_DMR 0x40 /* SDRAM mode */ | 48 | #define MCFSIM_DMR 0x40 /* SDRAM mode */ |
48 | #define MCFSIM_DCR 0x44 /* SDRAM control */ | 49 | #define MCFSIM_DCR 0x44 /* SDRAM control */ |
49 | #define MCFSIM_DCFG1 0x48 /* SDRAM configuration 1 */ | 50 | #define MCFSIM_DCFG1 0x48 /* SDRAM configuration 1 */ |
@@ -54,5 +55,21 @@ | |||
54 | #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ | 55 | #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ |
55 | #endif | 56 | #endif |
56 | 57 | ||
58 | /* | ||
59 | * GPIO pins setups to enable the UARTs. | ||
60 | */ | ||
61 | #ifdef CONFIG_M5271 | ||
62 | #define MCF_GPIO_PAR_UART 0x100048 /* PAR UART address */ | ||
63 | #define UART0_ENABLE_MASK 0x000f | ||
64 | #define UART1_ENABLE_MASK 0x0ff0 | ||
65 | #define UART2_ENABLE_MASK 0x3000 | ||
66 | #endif | ||
67 | #ifdef CONFIG_M5275 | ||
68 | #define MCF_GPIO_PAR_UART 0x10007c /* PAR UART address */ | ||
69 | #define UART0_ENABLE_MASK 0x000f | ||
70 | #define UART1_ENABLE_MASK 0x00f0 | ||
71 | #define UART2_ENABLE_MASK 0x3f00 | ||
72 | #endif | ||
73 | |||
57 | /****************************************************************************/ | 74 | /****************************************************************************/ |
58 | #endif /* m527xsim_h */ | 75 | #endif /* m527xsim_h */ |
diff --git a/include/asm-m68knommu/m528xsim.h b/include/asm-m68knommu/m528xsim.h index 371993a206ac..610774a17f70 100644 --- a/include/asm-m68knommu/m528xsim.h +++ b/include/asm-m68knommu/m528xsim.h | |||
@@ -41,5 +41,117 @@ | |||
41 | #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ | 41 | #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ |
42 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ | 42 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ |
43 | 43 | ||
44 | /* | ||
45 | * Derek Cheung - 6 Feb 2005 | ||
46 | * add I2C and QSPI register definition using Freescale's MCF5282 | ||
47 | */ | ||
48 | /* set Port AS pin for I2C or UART */ | ||
49 | #define MCF5282_GPIO_PASPAR (volatile u16 *) (MCF_IPSBAR + 0x00100056) | ||
50 | |||
51 | /* Interrupt Mask Register Register Low */ | ||
52 | #define MCF5282_INTC0_IMRL (volatile u32 *) (MCF_IPSBAR + 0x0C0C) | ||
53 | /* Interrupt Control Register 7 */ | ||
54 | #define MCF5282_INTC0_ICR17 (volatile u8 *) (MCF_IPSBAR + 0x0C51) | ||
55 | |||
56 | |||
57 | |||
58 | /********************************************************************* | ||
59 | * | ||
60 | * Inter-IC (I2C) Module | ||
61 | * | ||
62 | *********************************************************************/ | ||
63 | /* Read/Write access macros for general use */ | ||
64 | #define MCF5282_I2C_I2ADR (volatile u8 *) (MCF_IPSBAR + 0x0300) // Address | ||
65 | #define MCF5282_I2C_I2FDR (volatile u8 *) (MCF_IPSBAR + 0x0304) // Freq Divider | ||
66 | #define MCF5282_I2C_I2CR (volatile u8 *) (MCF_IPSBAR + 0x0308) // Control | ||
67 | #define MCF5282_I2C_I2SR (volatile u8 *) (MCF_IPSBAR + 0x030C) // Status | ||
68 | #define MCF5282_I2C_I2DR (volatile u8 *) (MCF_IPSBAR + 0x0310) // Data I/O | ||
69 | |||
70 | /* Bit level definitions and macros */ | ||
71 | #define MCF5282_I2C_I2ADR_ADDR(x) (((x)&0x7F)<<0x01) | ||
72 | |||
73 | #define MCF5282_I2C_I2FDR_IC(x) (((x)&0x3F)) | ||
74 | |||
75 | #define MCF5282_I2C_I2CR_IEN (0x80) // I2C enable | ||
76 | #define MCF5282_I2C_I2CR_IIEN (0x40) // interrupt enable | ||
77 | #define MCF5282_I2C_I2CR_MSTA (0x20) // master/slave mode | ||
78 | #define MCF5282_I2C_I2CR_MTX (0x10) // transmit/receive mode | ||
79 | #define MCF5282_I2C_I2CR_TXAK (0x08) // transmit acknowledge enable | ||
80 | #define MCF5282_I2C_I2CR_RSTA (0x04) // repeat start | ||
81 | |||
82 | #define MCF5282_I2C_I2SR_ICF (0x80) // data transfer bit | ||
83 | #define MCF5282_I2C_I2SR_IAAS (0x40) // I2C addressed as a slave | ||
84 | #define MCF5282_I2C_I2SR_IBB (0x20) // I2C bus busy | ||
85 | #define MCF5282_I2C_I2SR_IAL (0x10) // aribitration lost | ||
86 | #define MCF5282_I2C_I2SR_SRW (0x04) // slave read/write | ||
87 | #define MCF5282_I2C_I2SR_IIF (0x02) // I2C interrupt | ||
88 | #define MCF5282_I2C_I2SR_RXAK (0x01) // received acknowledge | ||
89 | |||
90 | |||
91 | |||
92 | /********************************************************************* | ||
93 | * | ||
94 | * Queued Serial Peripheral Interface (QSPI) Module | ||
95 | * | ||
96 | *********************************************************************/ | ||
97 | /* Derek - 21 Feb 2005 */ | ||
98 | /* change to the format used in I2C */ | ||
99 | /* Read/Write access macros for general use */ | ||
100 | #define MCF5282_QSPI_QMR MCF_IPSBAR + 0x0340 | ||
101 | #define MCF5282_QSPI_QDLYR MCF_IPSBAR + 0x0344 | ||
102 | #define MCF5282_QSPI_QWR MCF_IPSBAR + 0x0348 | ||
103 | #define MCF5282_QSPI_QIR MCF_IPSBAR + 0x034C | ||
104 | #define MCF5282_QSPI_QAR MCF_IPSBAR + 0x0350 | ||
105 | #define MCF5282_QSPI_QDR MCF_IPSBAR + 0x0354 | ||
106 | #define MCF5282_QSPI_QCR MCF_IPSBAR + 0x0354 | ||
107 | |||
108 | /* Bit level definitions and macros */ | ||
109 | #define MCF5282_QSPI_QMR_MSTR (0x8000) | ||
110 | #define MCF5282_QSPI_QMR_DOHIE (0x4000) | ||
111 | #define MCF5282_QSPI_QMR_BITS_16 (0x0000) | ||
112 | #define MCF5282_QSPI_QMR_BITS_8 (0x2000) | ||
113 | #define MCF5282_QSPI_QMR_BITS_9 (0x2400) | ||
114 | #define MCF5282_QSPI_QMR_BITS_10 (0x2800) | ||
115 | #define MCF5282_QSPI_QMR_BITS_11 (0x2C00) | ||
116 | #define MCF5282_QSPI_QMR_BITS_12 (0x3000) | ||
117 | #define MCF5282_QSPI_QMR_BITS_13 (0x3400) | ||
118 | #define MCF5282_QSPI_QMR_BITS_14 (0x3800) | ||
119 | #define MCF5282_QSPI_QMR_BITS_15 (0x3C00) | ||
120 | #define MCF5282_QSPI_QMR_CPOL (0x0200) | ||
121 | #define MCF5282_QSPI_QMR_CPHA (0x0100) | ||
122 | #define MCF5282_QSPI_QMR_BAUD(x) (((x)&0x00FF)) | ||
123 | |||
124 | #define MCF5282_QSPI_QDLYR_SPE (0x80) | ||
125 | #define MCF5282_QSPI_QDLYR_QCD(x) (((x)&0x007F)<<8) | ||
126 | #define MCF5282_QSPI_QDLYR_DTL(x) (((x)&0x00FF)) | ||
127 | |||
128 | #define MCF5282_QSPI_QWR_HALT (0x8000) | ||
129 | #define MCF5282_QSPI_QWR_WREN (0x4000) | ||
130 | #define MCF5282_QSPI_QWR_WRTO (0x2000) | ||
131 | #define MCF5282_QSPI_QWR_CSIV (0x1000) | ||
132 | #define MCF5282_QSPI_QWR_ENDQP(x) (((x)&0x000F)<<8) | ||
133 | #define MCF5282_QSPI_QWR_CPTQP(x) (((x)&0x000F)<<4) | ||
134 | #define MCF5282_QSPI_QWR_NEWQP(x) (((x)&0x000F)) | ||
135 | |||
136 | #define MCF5282_QSPI_QIR_WCEFB (0x8000) | ||
137 | #define MCF5282_QSPI_QIR_ABRTB (0x4000) | ||
138 | #define MCF5282_QSPI_QIR_ABRTL (0x1000) | ||
139 | #define MCF5282_QSPI_QIR_WCEFE (0x0800) | ||
140 | #define MCF5282_QSPI_QIR_ABRTE (0x0400) | ||
141 | #define MCF5282_QSPI_QIR_SPIFE (0x0100) | ||
142 | #define MCF5282_QSPI_QIR_WCEF (0x0008) | ||
143 | #define MCF5282_QSPI_QIR_ABRT (0x0004) | ||
144 | #define MCF5282_QSPI_QIR_SPIF (0x0001) | ||
145 | |||
146 | #define MCF5282_QSPI_QAR_ADDR(x) (((x)&0x003F)) | ||
147 | |||
148 | #define MCF5282_QSPI_QDR_COMMAND(x) (((x)&0xFF00)) | ||
149 | #define MCF5282_QSPI_QCR_DATA(x) (((x)&0x00FF)<<8) | ||
150 | #define MCF5282_QSPI_QCR_CONT (0x8000) | ||
151 | #define MCF5282_QSPI_QCR_BITSE (0x4000) | ||
152 | #define MCF5282_QSPI_QCR_DT (0x2000) | ||
153 | #define MCF5282_QSPI_QCR_DSCK (0x1000) | ||
154 | #define MCF5282_QSPI_QCR_CS (((x)&0x000F)<<8) | ||
155 | |||
44 | /****************************************************************************/ | 156 | /****************************************************************************/ |
45 | #endif /* m528xsim_h */ | 157 | #endif /* m528xsim_h */ |
diff --git a/include/asm-m68knommu/mcfcache.h b/include/asm-m68knommu/mcfcache.h index bdd8c53ef34c..b17cd920977f 100644 --- a/include/asm-m68knommu/mcfcache.h +++ b/include/asm-m68knommu/mcfcache.h | |||
@@ -33,7 +33,7 @@ | |||
33 | .endm | 33 | .endm |
34 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ | 34 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ |
35 | 35 | ||
36 | #if defined(CONFIG_M527x) | 36 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) |
37 | /* | 37 | /* |
38 | * New version 2 cores have a configurable split cache arrangement. | 38 | * New version 2 cores have a configurable split cache arrangement. |
39 | * For now I am just enabling instruction cache - but ultimately I | 39 | * For now I am just enabling instruction cache - but ultimately I |
@@ -51,23 +51,20 @@ | |||
51 | movec %d0,%CACR /* enable cache */ | 51 | movec %d0,%CACR /* enable cache */ |
52 | nop | 52 | nop |
53 | .endm | 53 | .endm |
54 | #endif /* CONFIG_M527x */ | 54 | #endif /* CONFIG_M523x || CONFIG_M527x */ |
55 | 55 | ||
56 | #if defined(CONFIG_M528x) | 56 | #if defined(CONFIG_M528x) |
57 | /* | ||
58 | * Cache is totally broken on early 5282 silicon. So far now we | ||
59 | * disable its cache all together. | ||
60 | */ | ||
61 | .macro CACHE_ENABLE | 57 | .macro CACHE_ENABLE |
62 | movel #0x01000000,%d0 | ||
63 | movec %d0,%CACR /* invalidate cache */ | ||
64 | nop | 58 | nop |
65 | movel #0x0000c000,%d0 /* set SDRAM cached only */ | 59 | movel #0x01000000, %d0 |
66 | movec %d0,%ACR0 | 60 | movec %d0, %CACR /* Invalidate cache */ |
67 | movel #0x00000000,%d0 /* no other regions cached */ | 61 | nop |
68 | movec %d0,%ACR1 | 62 | movel #0x0000c020, %d0 /* Set SDRAM cached only */ |
69 | movel #0x00000000,%d0 /* configure cache */ | 63 | movec %d0, %ACR0 |
70 | movec %d0,%CACR /* enable cache */ | 64 | movel #0xff00c000, %d0 /* Cache Flash also */ |
65 | movec %d0, %ACR1 | ||
66 | movel #0x80000200, %d0 /* Setup cache mask */ | ||
67 | movec %d0, %CACR /* Enable cache */ | ||
71 | nop | 68 | nop |
72 | .endm | 69 | .endm |
73 | #endif /* CONFIG_M528x */ | 70 | #endif /* CONFIG_M528x */ |
diff --git a/include/asm-m68knommu/mcfdma.h b/include/asm-m68knommu/mcfdma.h index 350c6090b5c1..b93f8ba8a248 100644 --- a/include/asm-m68knommu/mcfdma.h +++ b/include/asm-m68knommu/mcfdma.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define MCFDMA_BASE1 0x240 /* Base address of DMA 1 */ | 21 | #define MCFDMA_BASE1 0x240 /* Base address of DMA 1 */ |
22 | #elif defined(CONFIG_M5272) | 22 | #elif defined(CONFIG_M5272) |
23 | #define MCFDMA_BASE0 0x0e0 /* Base address of DMA 0 */ | 23 | #define MCFDMA_BASE0 0x0e0 /* Base address of DMA 0 */ |
24 | #elif defined(CONFIG_M527x) || defined(CONFIG_M528x) | 24 | #elif defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) |
25 | /* These are relative to the IPSBAR, not MBAR */ | 25 | /* These are relative to the IPSBAR, not MBAR */ |
26 | #define MCFDMA_BASE0 0x100 /* Base address of DMA 0 */ | 26 | #define MCFDMA_BASE0 0x100 /* Base address of DMA 0 */ |
27 | #define MCFDMA_BASE1 0x140 /* Base address of DMA 1 */ | 27 | #define MCFDMA_BASE1 0x140 /* Base address of DMA 1 */ |
diff --git a/include/asm-powerpc/siginfo.h b/include/asm-powerpc/siginfo.h index 538ea8ef509b..12f1bce037be 100644 --- a/include/asm-powerpc/siginfo.h +++ b/include/asm-powerpc/siginfo.h | |||
@@ -15,4 +15,12 @@ | |||
15 | 15 | ||
16 | #include <asm-generic/siginfo.h> | 16 | #include <asm-generic/siginfo.h> |
17 | 17 | ||
18 | /* | ||
19 | * SIGTRAP si_codes | ||
20 | */ | ||
21 | #define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */ | ||
22 | #define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint or watchpoint */ | ||
23 | #undef NSIGTRAP | ||
24 | #define NSIGTRAP 4 | ||
25 | |||
18 | #endif /* _ASM_POWERPC_SIGINFO_H */ | 26 | #endif /* _ASM_POWERPC_SIGINFO_H */ |
diff --git a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h index 9d4e4ea530c3..7043c164b537 100644 --- a/include/asm-ppc/ptrace.h +++ b/include/asm-ppc/ptrace.h | |||
@@ -142,4 +142,11 @@ do { \ | |||
142 | #define PTRACE_GETEVRREGS 20 | 142 | #define PTRACE_GETEVRREGS 20 |
143 | #define PTRACE_SETEVRREGS 21 | 143 | #define PTRACE_SETEVRREGS 21 |
144 | 144 | ||
145 | /* | ||
146 | * Get or set a debug register. The first 16 are DABR registers and the | ||
147 | * second 16 are IABR registers. | ||
148 | */ | ||
149 | #define PTRACE_GET_DEBUGREG 25 | ||
150 | #define PTRACE_SET_DEBUGREG 26 | ||
151 | |||
145 | #endif | 152 | #endif |
diff --git a/include/asm-ppc64/hvcall.h b/include/asm-ppc64/hvcall.h index 4f668a4baff0..ab7c3cf24888 100644 --- a/include/asm-ppc64/hvcall.h +++ b/include/asm-ppc64/hvcall.h | |||
@@ -56,6 +56,11 @@ | |||
56 | #define H_PP1 (1UL<<(63-62)) | 56 | #define H_PP1 (1UL<<(63-62)) |
57 | #define H_PP2 (1UL<<(63-63)) | 57 | #define H_PP2 (1UL<<(63-63)) |
58 | 58 | ||
59 | /* DABRX flags */ | ||
60 | #define H_DABRX_HYPERVISOR (1UL<<(63-61)) | ||
61 | #define H_DABRX_KERNEL (1UL<<(63-62)) | ||
62 | #define H_DABRX_USER (1UL<<(63-63)) | ||
63 | |||
59 | /* pSeries hypervisor opcodes */ | 64 | /* pSeries hypervisor opcodes */ |
60 | #define H_REMOVE 0x04 | 65 | #define H_REMOVE 0x04 |
61 | #define H_ENTER 0x08 | 66 | #define H_ENTER 0x08 |
@@ -101,6 +106,7 @@ | |||
101 | #define H_VIO_SIGNAL 0x104 | 106 | #define H_VIO_SIGNAL 0x104 |
102 | #define H_SEND_CRQ 0x108 | 107 | #define H_SEND_CRQ 0x108 |
103 | #define H_COPY_RDMA 0x110 | 108 | #define H_COPY_RDMA 0x110 |
109 | #define H_SET_XDABR 0x134 | ||
104 | #define H_STUFF_TCE 0x138 | 110 | #define H_STUFF_TCE 0x138 |
105 | #define H_PUT_TCE_INDIRECT 0x13C | 111 | #define H_PUT_TCE_INDIRECT 0x13C |
106 | #define H_VTERM_PARTNER_INFO 0x150 | 112 | #define H_VTERM_PARTNER_INFO 0x150 |
diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h index 9a1ef4427ed2..8027160ec96d 100644 --- a/include/asm-ppc64/machdep.h +++ b/include/asm-ppc64/machdep.h | |||
@@ -88,6 +88,7 @@ struct machdep_calls { | |||
88 | 88 | ||
89 | /* PCI stuff */ | 89 | /* PCI stuff */ |
90 | void (*pcibios_fixup)(void); | 90 | void (*pcibios_fixup)(void); |
91 | int (*pci_probe_mode)(struct pci_bus *); | ||
91 | 92 | ||
92 | void (*restart)(char *cmd); | 93 | void (*restart)(char *cmd); |
93 | void (*power_off)(void); | 94 | void (*power_off)(void); |
@@ -173,10 +174,6 @@ extern sys_ctrler_t sys_ctrler; | |||
173 | void ppc64_boot_msg(unsigned int src, const char *msg); | 174 | void ppc64_boot_msg(unsigned int src, const char *msg); |
174 | /* Print a termination message (print only -- does not stop the kernel) */ | 175 | /* Print a termination message (print only -- does not stop the kernel) */ |
175 | void ppc64_terminate_msg(unsigned int src, const char *msg); | 176 | void ppc64_terminate_msg(unsigned int src, const char *msg); |
176 | /* Print something that needs attention (device error, etc) */ | ||
177 | void ppc64_attention_msg(unsigned int src, const char *msg); | ||
178 | /* Print a dump progress message. */ | ||
179 | void ppc64_dump_msg(unsigned int src, const char *msg); | ||
180 | 177 | ||
181 | static inline void log_error(char *buf, unsigned int err_type, int fatal) | 178 | static inline void log_error(char *buf, unsigned int err_type, int fatal) |
182 | { | 179 | { |
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h index 6b4a5b1f695e..d8991389ab39 100644 --- a/include/asm-ppc64/pci-bridge.h +++ b/include/asm-ppc64/pci-bridge.h | |||
@@ -119,5 +119,10 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) | |||
119 | return PCI_DN(busdn)->phb; | 119 | return PCI_DN(busdn)->phb; |
120 | } | 120 | } |
121 | 121 | ||
122 | /* Return values for ppc_md.pci_probe_mode function */ | ||
123 | #define PCI_PROBE_NONE -1 /* Don't look at this bus at all */ | ||
124 | #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ | ||
125 | #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ | ||
126 | |||
122 | #endif | 127 | #endif |
123 | #endif /* __KERNEL__ */ | 128 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc64/plpar_wrappers.h b/include/asm-ppc64/plpar_wrappers.h index f4a5fb7d67c7..72dd2449ee76 100644 --- a/include/asm-ppc64/plpar_wrappers.h +++ b/include/asm-ppc64/plpar_wrappers.h | |||
@@ -107,5 +107,14 @@ static inline long plpar_put_term_char(unsigned long termno, | |||
107 | lbuf[1]); | 107 | lbuf[1]); |
108 | } | 108 | } |
109 | 109 | ||
110 | static inline long plpar_set_xdabr(unsigned long address, unsigned long flags) | ||
111 | { | ||
112 | return plpar_hcall_norets(H_SET_XDABR, address, flags); | ||
113 | } | ||
114 | |||
115 | static inline long plpar_set_dabr(unsigned long val) | ||
116 | { | ||
117 | return plpar_hcall_norets(H_SET_DABR, val); | ||
118 | } | ||
110 | 119 | ||
111 | #endif /* _PPC64_PLPAR_WRAPPERS_H */ | 120 | #endif /* _PPC64_PLPAR_WRAPPERS_H */ |
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index 8bd7aa959385..4146189006e3 100644 --- a/include/asm-ppc64/processor.h +++ b/include/asm-ppc64/processor.h | |||
@@ -433,6 +433,7 @@ struct thread_struct { | |||
433 | unsigned long start_tb; /* Start purr when proc switched in */ | 433 | unsigned long start_tb; /* Start purr when proc switched in */ |
434 | unsigned long accum_tb; /* Total accumilated purr for process */ | 434 | unsigned long accum_tb; /* Total accumilated purr for process */ |
435 | unsigned long vdso_base; /* base of the vDSO library */ | 435 | unsigned long vdso_base; /* base of the vDSO library */ |
436 | unsigned long dabr; /* Data address breakpoint register */ | ||
436 | #ifdef CONFIG_ALTIVEC | 437 | #ifdef CONFIG_ALTIVEC |
437 | /* Complete AltiVec register set */ | 438 | /* Complete AltiVec register set */ |
438 | vector128 vr[32] __attribute((aligned(16))); | 439 | vector128 vr[32] __attribute((aligned(16))); |
diff --git a/include/asm-ppc64/ptrace-common.h b/include/asm-ppc64/ptrace-common.h index af03547f9c7e..b1babb729673 100644 --- a/include/asm-ppc64/ptrace-common.h +++ b/include/asm-ppc64/ptrace-common.h | |||
@@ -11,6 +11,10 @@ | |||
11 | 11 | ||
12 | #ifndef _PPC64_PTRACE_COMMON_H | 12 | #ifndef _PPC64_PTRACE_COMMON_H |
13 | #define _PPC64_PTRACE_COMMON_H | 13 | #define _PPC64_PTRACE_COMMON_H |
14 | |||
15 | #include <linux/config.h> | ||
16 | #include <asm/system.h> | ||
17 | |||
14 | /* | 18 | /* |
15 | * Set of msr bits that gdb can change on behalf of a process. | 19 | * Set of msr bits that gdb can change on behalf of a process. |
16 | */ | 20 | */ |
@@ -69,4 +73,92 @@ static inline void clear_single_step(struct task_struct *task) | |||
69 | clear_ti_thread_flag(task->thread_info, TIF_SINGLESTEP); | 73 | clear_ti_thread_flag(task->thread_info, TIF_SINGLESTEP); |
70 | } | 74 | } |
71 | 75 | ||
76 | #ifdef CONFIG_ALTIVEC | ||
77 | /* | ||
78 | * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. | ||
79 | * The transfer totals 34 quadword. Quadwords 0-31 contain the | ||
80 | * corresponding vector registers. Quadword 32 contains the vscr as the | ||
81 | * last word (offset 12) within that quadword. Quadword 33 contains the | ||
82 | * vrsave as the first word (offset 0) within the quadword. | ||
83 | * | ||
84 | * This definition of the VMX state is compatible with the current PPC32 | ||
85 | * ptrace interface. This allows signal handling and ptrace to use the | ||
86 | * same structures. This also simplifies the implementation of a bi-arch | ||
87 | * (combined (32- and 64-bit) gdb. | ||
88 | */ | ||
89 | |||
90 | /* | ||
91 | * Get contents of AltiVec register state in task TASK | ||
92 | */ | ||
93 | static inline int get_vrregs(unsigned long __user *data, | ||
94 | struct task_struct *task) | ||
95 | { | ||
96 | unsigned long regsize; | ||
97 | |||
98 | /* copy AltiVec registers VR[0] .. VR[31] */ | ||
99 | regsize = 32 * sizeof(vector128); | ||
100 | if (copy_to_user(data, task->thread.vr, regsize)) | ||
101 | return -EFAULT; | ||
102 | data += (regsize / sizeof(unsigned long)); | ||
103 | |||
104 | /* copy VSCR */ | ||
105 | regsize = 1 * sizeof(vector128); | ||
106 | if (copy_to_user(data, &task->thread.vscr, regsize)) | ||
107 | return -EFAULT; | ||
108 | data += (regsize / sizeof(unsigned long)); | ||
109 | |||
110 | /* copy VRSAVE */ | ||
111 | if (put_user(task->thread.vrsave, (u32 __user *)data)) | ||
112 | return -EFAULT; | ||
113 | |||
114 | return 0; | ||
115 | } | ||
116 | |||
117 | /* | ||
118 | * Write contents of AltiVec register state into task TASK. | ||
119 | */ | ||
120 | static inline int set_vrregs(struct task_struct *task, | ||
121 | unsigned long __user *data) | ||
122 | { | ||
123 | unsigned long regsize; | ||
124 | |||
125 | /* copy AltiVec registers VR[0] .. VR[31] */ | ||
126 | regsize = 32 * sizeof(vector128); | ||
127 | if (copy_from_user(task->thread.vr, data, regsize)) | ||
128 | return -EFAULT; | ||
129 | data += (regsize / sizeof(unsigned long)); | ||
130 | |||
131 | /* copy VSCR */ | ||
132 | regsize = 1 * sizeof(vector128); | ||
133 | if (copy_from_user(&task->thread.vscr, data, regsize)) | ||
134 | return -EFAULT; | ||
135 | data += (regsize / sizeof(unsigned long)); | ||
136 | |||
137 | /* copy VRSAVE */ | ||
138 | if (get_user(task->thread.vrsave, (u32 __user *)data)) | ||
139 | return -EFAULT; | ||
140 | |||
141 | return 0; | ||
142 | } | ||
143 | #endif | ||
144 | |||
145 | static inline int ptrace_set_debugreg(struct task_struct *task, | ||
146 | unsigned long addr, unsigned long data) | ||
147 | { | ||
148 | /* We only support one DABR and no IABRS at the moment */ | ||
149 | if (addr > 0) | ||
150 | return -EINVAL; | ||
151 | |||
152 | /* The bottom 3 bits are flags */ | ||
153 | if ((data & ~0x7UL) >= TASK_SIZE) | ||
154 | return -EIO; | ||
155 | |||
156 | /* Ensure translation is on */ | ||
157 | if (data && !(data & DABR_TRANSLATION)) | ||
158 | return -EIO; | ||
159 | |||
160 | task->thread.dabr = data; | ||
161 | return 0; | ||
162 | } | ||
163 | |||
72 | #endif /* _PPC64_PTRACE_COMMON_H */ | 164 | #endif /* _PPC64_PTRACE_COMMON_H */ |
diff --git a/include/asm-ppc64/ptrace.h b/include/asm-ppc64/ptrace.h index c96aad28fc08..3a55377f1fd3 100644 --- a/include/asm-ppc64/ptrace.h +++ b/include/asm-ppc64/ptrace.h | |||
@@ -25,56 +25,49 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #ifndef __ASSEMBLY__ | 27 | #ifndef __ASSEMBLY__ |
28 | #define PPC_REG unsigned long | 28 | |
29 | struct pt_regs { | 29 | struct pt_regs { |
30 | PPC_REG gpr[32]; | 30 | unsigned long gpr[32]; |
31 | PPC_REG nip; | 31 | unsigned long nip; |
32 | PPC_REG msr; | 32 | unsigned long msr; |
33 | PPC_REG orig_gpr3; /* Used for restarting system calls */ | 33 | unsigned long orig_gpr3; /* Used for restarting system calls */ |
34 | PPC_REG ctr; | 34 | unsigned long ctr; |
35 | PPC_REG link; | 35 | unsigned long link; |
36 | PPC_REG xer; | 36 | unsigned long xer; |
37 | PPC_REG ccr; | 37 | unsigned long ccr; |
38 | PPC_REG softe; /* Soft enabled/disabled */ | 38 | unsigned long softe; /* Soft enabled/disabled */ |
39 | PPC_REG trap; /* Reason for being here */ | 39 | unsigned long trap; /* Reason for being here */ |
40 | PPC_REG dar; /* Fault registers */ | 40 | unsigned long dar; /* Fault registers */ |
41 | PPC_REG dsisr; | 41 | unsigned long dsisr; |
42 | PPC_REG result; /* Result of a system call */ | 42 | unsigned long result; /* Result of a system call */ |
43 | }; | 43 | }; |
44 | 44 | ||
45 | #define PPC_REG_32 unsigned int | ||
46 | struct pt_regs32 { | 45 | struct pt_regs32 { |
47 | PPC_REG_32 gpr[32]; | 46 | unsigned int gpr[32]; |
48 | PPC_REG_32 nip; | 47 | unsigned int nip; |
49 | PPC_REG_32 msr; | 48 | unsigned int msr; |
50 | PPC_REG_32 orig_gpr3; /* Used for restarting system calls */ | 49 | unsigned int orig_gpr3; /* Used for restarting system calls */ |
51 | PPC_REG_32 ctr; | 50 | unsigned int ctr; |
52 | PPC_REG_32 link; | 51 | unsigned int link; |
53 | PPC_REG_32 xer; | 52 | unsigned int xer; |
54 | PPC_REG_32 ccr; | 53 | unsigned int ccr; |
55 | PPC_REG_32 mq; /* 601 only (not used at present) */ | 54 | unsigned int mq; /* 601 only (not used at present) */ |
56 | /* Used on APUS to hold IPL value. */ | 55 | unsigned int trap; /* Reason for being here */ |
57 | PPC_REG_32 trap; /* Reason for being here */ | 56 | unsigned int dar; /* Fault registers */ |
58 | PPC_REG_32 dar; /* Fault registers */ | 57 | unsigned int dsisr; |
59 | PPC_REG_32 dsisr; | 58 | unsigned int result; /* Result of a system call */ |
60 | PPC_REG_32 result; /* Result of a system call */ | ||
61 | }; | 59 | }; |
62 | 60 | ||
61 | #ifdef __KERNEL__ | ||
62 | |||
63 | #define instruction_pointer(regs) ((regs)->nip) | 63 | #define instruction_pointer(regs) ((regs)->nip) |
64 | |||
64 | #ifdef CONFIG_SMP | 65 | #ifdef CONFIG_SMP |
65 | extern unsigned long profile_pc(struct pt_regs *regs); | 66 | extern unsigned long profile_pc(struct pt_regs *regs); |
66 | #else | 67 | #else |
67 | #define profile_pc(regs) instruction_pointer(regs) | 68 | #define profile_pc(regs) instruction_pointer(regs) |
68 | #endif | 69 | #endif |
69 | 70 | ||
70 | #endif /* __ASSEMBLY__ */ | ||
71 | |||
72 | #define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */ | ||
73 | |||
74 | /* Size of dummy stack frame allocated when calling signal handler. */ | ||
75 | #define __SIGNAL_FRAMESIZE 128 | ||
76 | #define __SIGNAL_FRAMESIZE32 64 | ||
77 | |||
78 | #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1) | 71 | #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1) |
79 | 72 | ||
80 | #define force_successful_syscall_return() \ | 73 | #define force_successful_syscall_return() \ |
@@ -89,6 +82,16 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
89 | #define TRAP(regs) ((regs)->trap & ~0xF) | 82 | #define TRAP(regs) ((regs)->trap & ~0xF) |
90 | #define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) | 83 | #define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) |
91 | 84 | ||
85 | #endif /* __KERNEL__ */ | ||
86 | |||
87 | #endif /* __ASSEMBLY__ */ | ||
88 | |||
89 | #define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */ | ||
90 | |||
91 | /* Size of dummy stack frame allocated when calling signal handler. */ | ||
92 | #define __SIGNAL_FRAMESIZE 128 | ||
93 | #define __SIGNAL_FRAMESIZE32 64 | ||
94 | |||
92 | /* | 95 | /* |
93 | * Offsets used by 'ptrace' system call interface. | 96 | * Offsets used by 'ptrace' system call interface. |
94 | */ | 97 | */ |
@@ -135,17 +138,21 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
135 | #define PT_XER 37 | 138 | #define PT_XER 37 |
136 | #define PT_CCR 38 | 139 | #define PT_CCR 38 |
137 | #define PT_SOFTE 39 | 140 | #define PT_SOFTE 39 |
141 | #define PT_TRAP 40 | ||
142 | #define PT_DAR 41 | ||
143 | #define PT_DSISR 42 | ||
138 | #define PT_RESULT 43 | 144 | #define PT_RESULT 43 |
139 | 145 | ||
140 | #define PT_FPR0 48 | 146 | #define PT_FPR0 48 |
141 | 147 | ||
142 | /* Kernel and userspace will both use this PT_FPSCR value. 32-bit apps will have | 148 | /* |
143 | * visibility to the asm-ppc/ptrace.h header instead of this one. | 149 | * Kernel and userspace will both use this PT_FPSCR value. 32-bit apps will |
150 | * have visibility to the asm-ppc/ptrace.h header instead of this one. | ||
144 | */ | 151 | */ |
145 | #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ | 152 | #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ |
146 | 153 | ||
147 | #ifdef __KERNEL__ | 154 | #ifdef __KERNEL__ |
148 | #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */ | 155 | #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */ |
149 | #endif | 156 | #endif |
150 | 157 | ||
151 | #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ | 158 | #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ |
@@ -173,17 +180,34 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
173 | #define PTRACE_GETVRREGS 18 | 180 | #define PTRACE_GETVRREGS 18 |
174 | #define PTRACE_SETVRREGS 19 | 181 | #define PTRACE_SETVRREGS 19 |
175 | 182 | ||
176 | /* Additional PTRACE requests implemented on PowerPC. */ | 183 | /* |
177 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ | 184 | * While we dont have 64bit book E processors, we need to reserve the |
178 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ | 185 | * relevant ptrace calls for 32bit compatibility. |
179 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ | 186 | */ |
180 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ | 187 | #if 0 |
181 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 /* Read word at location ADDR on a 64-bit process from a 32-bit process. */ | 188 | #define PTRACE_GETEVRREGS 20 |
182 | #define PPC_PTRACE_PEEKDATA_3264 0x94 /* Read word at location ADDR on a 64-bit process from a 32-bit process. */ | 189 | #define PTRACE_SETEVRREGS 21 |
183 | #define PPC_PTRACE_POKETEXT_3264 0x93 /* Write word at location ADDR on a 64-bit process from a 32-bit process. */ | 190 | #endif |
184 | #define PPC_PTRACE_POKEDATA_3264 0x92 /* Write word at location ADDR on a 64-bit process from a 32-bit process. */ | ||
185 | #define PPC_PTRACE_PEEKUSR_3264 0x91 /* Read a register (specified by ADDR) out of the "user area" on a 64-bit process from a 32-bit process. */ | ||
186 | #define PPC_PTRACE_POKEUSR_3264 0x90 /* Write DATA into location ADDR within the "user area" on a 64-bit process from a 32-bit process. */ | ||
187 | 191 | ||
192 | /* | ||
193 | * Get or set a debug register. The first 16 are DABR registers and the | ||
194 | * second 16 are IABR registers. | ||
195 | */ | ||
196 | #define PTRACE_GET_DEBUGREG 25 | ||
197 | #define PTRACE_SET_DEBUGREG 26 | ||
198 | |||
199 | /* Additional PTRACE requests implemented on PowerPC. */ | ||
200 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ | ||
201 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ | ||
202 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ | ||
203 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ | ||
204 | |||
205 | /* Calls to trace a 64bit program from a 32bit program */ | ||
206 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 | ||
207 | #define PPC_PTRACE_PEEKDATA_3264 0x94 | ||
208 | #define PPC_PTRACE_POKETEXT_3264 0x93 | ||
209 | #define PPC_PTRACE_POKEDATA_3264 0x92 | ||
210 | #define PPC_PTRACE_PEEKUSR_3264 0x91 | ||
211 | #define PPC_PTRACE_POKEUSR_3264 0x90 | ||
188 | 212 | ||
189 | #endif /* _PPC64_PTRACE_H */ | 213 | #endif /* _PPC64_PTRACE_H */ |
diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h index c0396428cc3c..375015c62f20 100644 --- a/include/asm-ppc64/system.h +++ b/include/asm-ppc64/system.h | |||
@@ -101,6 +101,9 @@ static inline int debugger_dabr_match(struct pt_regs *regs) { return 0; } | |||
101 | static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; } | 101 | static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; } |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | extern int set_dabr(unsigned long dabr); | ||
105 | extern void _exception(int signr, struct pt_regs *regs, int code, | ||
106 | unsigned long addr); | ||
104 | extern int fix_alignment(struct pt_regs *regs); | 107 | extern int fix_alignment(struct pt_regs *regs); |
105 | extern void bad_page_fault(struct pt_regs *regs, unsigned long address, | 108 | extern void bad_page_fault(struct pt_regs *regs, unsigned long address, |
106 | int sig); | 109 | int sig); |
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index 16ec82e16b21..6c5d5ca8383a 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
@@ -109,9 +109,10 @@ extern unsigned int nmi_watchdog; | |||
109 | #define NMI_LOCAL_APIC 2 | 109 | #define NMI_LOCAL_APIC 2 |
110 | #define NMI_INVALID 3 | 110 | #define NMI_INVALID 3 |
111 | 111 | ||
112 | extern int disable_timer_pin_1; | ||
113 | |||
112 | #endif /* CONFIG_X86_LOCAL_APIC */ | 114 | #endif /* CONFIG_X86_LOCAL_APIC */ |
113 | 115 | ||
114 | #define esr_disable 0 | ||
115 | extern unsigned boot_cpu_id; | 116 | extern unsigned boot_cpu_id; |
116 | 117 | ||
117 | #endif /* __ASM_APIC_H */ | 118 | #endif /* __ASM_APIC_H */ |
diff --git a/include/asm-x86_64/apicdef.h b/include/asm-x86_64/apicdef.h index 9388062c4f6e..fb1c99ac669f 100644 --- a/include/asm-x86_64/apicdef.h +++ b/include/asm-x86_64/apicdef.h | |||
@@ -113,6 +113,7 @@ | |||
113 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) | 113 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) |
114 | 114 | ||
115 | #define MAX_IO_APICS 128 | 115 | #define MAX_IO_APICS 128 |
116 | #define MAX_LOCAL_APIC 256 | ||
116 | 117 | ||
117 | /* | 118 | /* |
118 | * All x86-64 systems are xAPIC compatible. | 119 | * All x86-64 systems are xAPIC compatible. |
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h index eed785667289..80ac1fe966ac 100644 --- a/include/asm-x86_64/bug.h +++ b/include/asm-x86_64/bug.h | |||
@@ -9,10 +9,8 @@ | |||
9 | */ | 9 | */ |
10 | struct bug_frame { | 10 | struct bug_frame { |
11 | unsigned char ud2[2]; | 11 | unsigned char ud2[2]; |
12 | unsigned char mov; | 12 | unsigned char push; |
13 | /* should use 32bit offset instead, but the assembler doesn't | 13 | signed int filename; |
14 | like it */ | ||
15 | char *filename; | ||
16 | unsigned char ret; | 14 | unsigned char ret; |
17 | unsigned short line; | 15 | unsigned short line; |
18 | } __attribute__((packed)); | 16 | } __attribute__((packed)); |
@@ -25,8 +23,8 @@ struct bug_frame { | |||
25 | The magic numbers generate mov $64bitimm,%eax ; ret $offset. */ | 23 | The magic numbers generate mov $64bitimm,%eax ; ret $offset. */ |
26 | #define BUG() \ | 24 | #define BUG() \ |
27 | asm volatile( \ | 25 | asm volatile( \ |
28 | "ud2 ; .byte 0xa3 ; .quad %c1 ; .byte 0xc2 ; .short %c0" :: \ | 26 | "ud2 ; pushq $%c1 ; ret $%c0" :: \ |
29 | "i"(__LINE__), "i" (__stringify(__FILE__))) | 27 | "i"(__LINE__), "i" (__FILE__)) |
30 | void out_of_line_bug(void); | 28 | void out_of_line_bug(void); |
31 | #else | 29 | #else |
32 | static inline void out_of_line_bug(void) { } | 30 | static inline void out_of_line_bug(void) { } |
diff --git a/include/asm-x86_64/calling.h b/include/asm-x86_64/calling.h index 0bc12655fa5b..fc2c5a6c262a 100644 --- a/include/asm-x86_64/calling.h +++ b/include/asm-x86_64/calling.h | |||
@@ -65,27 +65,36 @@ | |||
65 | .if \skipr11 | 65 | .if \skipr11 |
66 | .else | 66 | .else |
67 | movq (%rsp),%r11 | 67 | movq (%rsp),%r11 |
68 | CFI_RESTORE r11 | ||
68 | .endif | 69 | .endif |
69 | .if \skipr8910 | 70 | .if \skipr8910 |
70 | .else | 71 | .else |
71 | movq 1*8(%rsp),%r10 | 72 | movq 1*8(%rsp),%r10 |
73 | CFI_RESTORE r10 | ||
72 | movq 2*8(%rsp),%r9 | 74 | movq 2*8(%rsp),%r9 |
75 | CFI_RESTORE r9 | ||
73 | movq 3*8(%rsp),%r8 | 76 | movq 3*8(%rsp),%r8 |
77 | CFI_RESTORE r8 | ||
74 | .endif | 78 | .endif |
75 | .if \skiprax | 79 | .if \skiprax |
76 | .else | 80 | .else |
77 | movq 4*8(%rsp),%rax | 81 | movq 4*8(%rsp),%rax |
82 | CFI_RESTORE rax | ||
78 | .endif | 83 | .endif |
79 | .if \skiprcx | 84 | .if \skiprcx |
80 | .else | 85 | .else |
81 | movq 5*8(%rsp),%rcx | 86 | movq 5*8(%rsp),%rcx |
87 | CFI_RESTORE rcx | ||
82 | .endif | 88 | .endif |
83 | .if \skiprdx | 89 | .if \skiprdx |
84 | .else | 90 | .else |
85 | movq 6*8(%rsp),%rdx | 91 | movq 6*8(%rsp),%rdx |
92 | CFI_RESTORE rdx | ||
86 | .endif | 93 | .endif |
87 | movq 7*8(%rsp),%rsi | 94 | movq 7*8(%rsp),%rsi |
95 | CFI_RESTORE rsi | ||
88 | movq 8*8(%rsp),%rdi | 96 | movq 8*8(%rsp),%rdi |
97 | CFI_RESTORE rdi | ||
89 | .if ARG_SKIP+\addskip > 0 | 98 | .if ARG_SKIP+\addskip > 0 |
90 | addq $ARG_SKIP+\addskip,%rsp | 99 | addq $ARG_SKIP+\addskip,%rsp |
91 | CFI_ADJUST_CFA_OFFSET -(ARG_SKIP+\addskip) | 100 | CFI_ADJUST_CFA_OFFSET -(ARG_SKIP+\addskip) |
@@ -124,11 +133,17 @@ | |||
124 | 133 | ||
125 | .macro RESTORE_REST | 134 | .macro RESTORE_REST |
126 | movq (%rsp),%r15 | 135 | movq (%rsp),%r15 |
136 | CFI_RESTORE r15 | ||
127 | movq 1*8(%rsp),%r14 | 137 | movq 1*8(%rsp),%r14 |
138 | CFI_RESTORE r14 | ||
128 | movq 2*8(%rsp),%r13 | 139 | movq 2*8(%rsp),%r13 |
140 | CFI_RESTORE r13 | ||
129 | movq 3*8(%rsp),%r12 | 141 | movq 3*8(%rsp),%r12 |
142 | CFI_RESTORE r12 | ||
130 | movq 4*8(%rsp),%rbp | 143 | movq 4*8(%rsp),%rbp |
144 | CFI_RESTORE rbp | ||
131 | movq 5*8(%rsp),%rbx | 145 | movq 5*8(%rsp),%rbx |
146 | CFI_RESTORE rbx | ||
132 | addq $REST_SKIP,%rsp | 147 | addq $REST_SKIP,%rsp |
133 | CFI_ADJUST_CFA_OFFSET -(REST_SKIP) | 148 | CFI_ADJUST_CFA_OFFSET -(REST_SKIP) |
134 | .endm | 149 | .endm |
@@ -146,11 +161,3 @@ | |||
146 | .macro icebp | 161 | .macro icebp |
147 | .byte 0xf1 | 162 | .byte 0xf1 |
148 | .endm | 163 | .endm |
149 | |||
150 | #ifdef CONFIG_FRAME_POINTER | ||
151 | #define ENTER enter | ||
152 | #define LEAVE leave | ||
153 | #else | ||
154 | #define ENTER | ||
155 | #define LEAVE | ||
156 | #endif | ||
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h index c89b58bebee2..594e610f4a1e 100644 --- a/include/asm-x86_64/desc.h +++ b/include/asm-x86_64/desc.h | |||
@@ -191,7 +191,7 @@ static inline void load_TLS(struct thread_struct *t, unsigned int cpu) | |||
191 | /* | 191 | /* |
192 | * load one particular LDT into the current CPU | 192 | * load one particular LDT into the current CPU |
193 | */ | 193 | */ |
194 | extern inline void load_LDT_nolock (mm_context_t *pc, int cpu) | 194 | static inline void load_LDT_nolock (mm_context_t *pc, int cpu) |
195 | { | 195 | { |
196 | int count = pc->size; | 196 | int count = pc->size; |
197 | 197 | ||
diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index a416dc31634a..e784fdc524f1 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h | |||
@@ -85,6 +85,11 @@ static inline void dma_sync_single_for_device(struct device *hwdev, | |||
85 | flush_write_buffers(); | 85 | flush_write_buffers(); |
86 | } | 86 | } |
87 | 87 | ||
88 | #define dma_sync_single_range_for_cpu(dev, dma_handle, offset, size, dir) \ | ||
89 | dma_sync_single_for_cpu(dev, dma_handle, size, dir) | ||
90 | #define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \ | ||
91 | dma_sync_single_for_device(dev, dma_handle, size, dir) | ||
92 | |||
88 | static inline void dma_sync_sg_for_cpu(struct device *hwdev, | 93 | static inline void dma_sync_sg_for_cpu(struct device *hwdev, |
89 | struct scatterlist *sg, | 94 | struct scatterlist *sg, |
90 | int nelems, int direction) | 95 | int nelems, int direction) |
diff --git a/include/asm-x86_64/dwarf2.h b/include/asm-x86_64/dwarf2.h index afd4212e860b..582757fc0365 100644 --- a/include/asm-x86_64/dwarf2.h +++ b/include/asm-x86_64/dwarf2.h | |||
@@ -24,6 +24,10 @@ | |||
24 | #define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset | 24 | #define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset |
25 | #define CFI_OFFSET .cfi_offset | 25 | #define CFI_OFFSET .cfi_offset |
26 | #define CFI_REL_OFFSET .cfi_rel_offset | 26 | #define CFI_REL_OFFSET .cfi_rel_offset |
27 | #define CFI_REGISTER .cfi_register | ||
28 | #define CFI_RESTORE .cfi_restore | ||
29 | #define CFI_REMEMBER_STATE .cfi_remember_state | ||
30 | #define CFI_RESTORE_STATE .cfi_restore_state | ||
27 | 31 | ||
28 | #else | 32 | #else |
29 | 33 | ||
@@ -36,6 +40,10 @@ | |||
36 | #define CFI_ADJUST_CFA_OFFSET # | 40 | #define CFI_ADJUST_CFA_OFFSET # |
37 | #define CFI_OFFSET # | 41 | #define CFI_OFFSET # |
38 | #define CFI_REL_OFFSET # | 42 | #define CFI_REL_OFFSET # |
43 | #define CFI_REGISTER # | ||
44 | #define CFI_RESTORE # | ||
45 | #define CFI_REMEMBER_STATE # | ||
46 | #define CFI_RESTORE_STATE # | ||
39 | 47 | ||
40 | #endif | 48 | #endif |
41 | 49 | ||
diff --git a/include/asm-x86_64/fixmap.h b/include/asm-x86_64/fixmap.h index cf8b16cbe8db..a582cfcf2231 100644 --- a/include/asm-x86_64/fixmap.h +++ b/include/asm-x86_64/fixmap.h | |||
@@ -76,7 +76,7 @@ extern void __this_fixmap_does_not_exist(void); | |||
76 | * directly without translation, we catch the bug with a NULL-deference | 76 | * directly without translation, we catch the bug with a NULL-deference |
77 | * kernel oops. Illegal ranges of incoming indices are caught too. | 77 | * kernel oops. Illegal ranges of incoming indices are caught too. |
78 | */ | 78 | */ |
79 | extern inline unsigned long fix_to_virt(const unsigned int idx) | 79 | static inline unsigned long fix_to_virt(const unsigned int idx) |
80 | { | 80 | { |
81 | /* | 81 | /* |
82 | * this branch gets completely eliminated after inlining, | 82 | * this branch gets completely eliminated after inlining, |
diff --git a/include/asm-x86_64/hardirq.h b/include/asm-x86_64/hardirq.h index 27c381fa1c9d..8661b476fb40 100644 --- a/include/asm-x86_64/hardirq.h +++ b/include/asm-x86_64/hardirq.h | |||
@@ -9,11 +9,12 @@ | |||
9 | 9 | ||
10 | #define __ARCH_IRQ_STAT 1 | 10 | #define __ARCH_IRQ_STAT 1 |
11 | 11 | ||
12 | /* Generate a lvalue for a pda member. Should fix softirq.c instead to use | 12 | #define local_softirq_pending() read_pda(__softirq_pending) |
13 | special access macros. This would generate better code. */ | ||
14 | #define __IRQ_STAT(cpu,member) (read_pda(me)->member) | ||
15 | 13 | ||
16 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 14 | #define __ARCH_SET_SOFTIRQ_PENDING 1 |
15 | |||
16 | #define set_softirq_pending(x) write_pda(__softirq_pending, (x)) | ||
17 | #define or_softirq_pending(x) or_pda(__softirq_pending, (x)) | ||
17 | 18 | ||
18 | /* | 19 | /* |
19 | * 'what should we do if we get a hw irq event on an illegal vector'. | 20 | * 'what should we do if we get a hw irq event on an illegal vector'. |
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 2b5cb2865d21..dc97668ea0f9 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h | |||
@@ -26,6 +26,7 @@ | |||
26 | struct hw_interrupt_type; | 26 | struct hw_interrupt_type; |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #define NMI_VECTOR 0x02 | ||
29 | /* | 30 | /* |
30 | * IDT vectors usable for external interrupt sources start | 31 | * IDT vectors usable for external interrupt sources start |
31 | * at 0x20: | 32 | * at 0x20: |
@@ -50,14 +51,15 @@ struct hw_interrupt_type; | |||
50 | */ | 51 | */ |
51 | #define SPURIOUS_APIC_VECTOR 0xff | 52 | #define SPURIOUS_APIC_VECTOR 0xff |
52 | #define ERROR_APIC_VECTOR 0xfe | 53 | #define ERROR_APIC_VECTOR 0xfe |
53 | #define INVALIDATE_TLB_VECTOR 0xfd | 54 | #define RESCHEDULE_VECTOR 0xfd |
54 | #define RESCHEDULE_VECTOR 0xfc | 55 | #define CALL_FUNCTION_VECTOR 0xfc |
55 | #define TASK_MIGRATION_VECTOR 0xfb | 56 | #define KDB_VECTOR 0xfb /* reserved for KDB */ |
56 | #define CALL_FUNCTION_VECTOR 0xfa | 57 | #define THERMAL_APIC_VECTOR 0xfa |
57 | #define KDB_VECTOR 0xf9 | 58 | /* 0xf9 free */ |
58 | 59 | #define INVALIDATE_TLB_VECTOR_END 0xf8 | |
59 | #define THERMAL_APIC_VECTOR 0xf0 | 60 | #define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f8 used for TLB flush */ |
60 | 61 | ||
62 | #define NUM_INVALIDATE_TLB_VECTORS 8 | ||
61 | 63 | ||
62 | /* | 64 | /* |
63 | * Local APIC timer IRQ vector is on a different priority level, | 65 | * Local APIC timer IRQ vector is on a different priority level, |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index 37fc3f149a5a..52ff269fe054 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
@@ -48,7 +48,7 @@ | |||
48 | * Talk about misusing macros.. | 48 | * Talk about misusing macros.. |
49 | */ | 49 | */ |
50 | #define __OUT1(s,x) \ | 50 | #define __OUT1(s,x) \ |
51 | extern inline void out##s(unsigned x value, unsigned short port) { | 51 | static inline void out##s(unsigned x value, unsigned short port) { |
52 | 52 | ||
53 | #define __OUT2(s,s1,s2) \ | 53 | #define __OUT2(s,s1,s2) \ |
54 | __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" | 54 | __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" |
@@ -58,7 +58,7 @@ __OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "Nd" (port)); } \ | |||
58 | __OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \ | 58 | __OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \ |
59 | 59 | ||
60 | #define __IN1(s) \ | 60 | #define __IN1(s) \ |
61 | extern inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v; | 61 | static inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v; |
62 | 62 | ||
63 | #define __IN2(s,s1,s2) \ | 63 | #define __IN2(s,s1,s2) \ |
64 | __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" | 64 | __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" |
@@ -68,12 +68,12 @@ __IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ | |||
68 | __IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ | 68 | __IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ |
69 | 69 | ||
70 | #define __INS(s) \ | 70 | #define __INS(s) \ |
71 | extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ | 71 | static inline void ins##s(unsigned short port, void * addr, unsigned long count) \ |
72 | { __asm__ __volatile__ ("rep ; ins" #s \ | 72 | { __asm__ __volatile__ ("rep ; ins" #s \ |
73 | : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } | 73 | : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } |
74 | 74 | ||
75 | #define __OUTS(s) \ | 75 | #define __OUTS(s) \ |
76 | extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ | 76 | static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ |
77 | { __asm__ __volatile__ ("rep ; outs" #s \ | 77 | { __asm__ __volatile__ ("rep ; outs" #s \ |
78 | : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } | 78 | : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } |
79 | 79 | ||
@@ -110,12 +110,12 @@ __OUTS(l) | |||
110 | * Change virtual addresses to physical addresses and vv. | 110 | * Change virtual addresses to physical addresses and vv. |
111 | * These are pretty trivial | 111 | * These are pretty trivial |
112 | */ | 112 | */ |
113 | extern inline unsigned long virt_to_phys(volatile void * address) | 113 | static inline unsigned long virt_to_phys(volatile void * address) |
114 | { | 114 | { |
115 | return __pa(address); | 115 | return __pa(address); |
116 | } | 116 | } |
117 | 117 | ||
118 | extern inline void * phys_to_virt(unsigned long address) | 118 | static inline void * phys_to_virt(unsigned long address) |
119 | { | 119 | { |
120 | return __va(address); | 120 | return __va(address); |
121 | } | 121 | } |
@@ -130,7 +130,7 @@ extern inline void * phys_to_virt(unsigned long address) | |||
130 | 130 | ||
131 | extern void __iomem *__ioremap(unsigned long offset, unsigned long size, unsigned long flags); | 131 | extern void __iomem *__ioremap(unsigned long offset, unsigned long size, unsigned long flags); |
132 | 132 | ||
133 | extern inline void __iomem * ioremap (unsigned long offset, unsigned long size) | 133 | static inline void __iomem * ioremap (unsigned long offset, unsigned long size) |
134 | { | 134 | { |
135 | return __ioremap(offset, size, 0); | 135 | return __ioremap(offset, size, 0); |
136 | } | 136 | } |
diff --git a/include/asm-x86_64/ipi.h b/include/asm-x86_64/ipi.h index 5e166b9d3bde..022e9d340ad7 100644 --- a/include/asm-x86_64/ipi.h +++ b/include/asm-x86_64/ipi.h | |||
@@ -31,9 +31,20 @@ | |||
31 | 31 | ||
32 | static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, unsigned int dest) | 32 | static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, unsigned int dest) |
33 | { | 33 | { |
34 | unsigned int icr = APIC_DM_FIXED | shortcut | vector | dest; | 34 | unsigned int icr = shortcut | dest; |
35 | if (vector == KDB_VECTOR) | 35 | |
36 | icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI; | 36 | switch (vector) { |
37 | default: | ||
38 | icr |= APIC_DM_FIXED | vector; | ||
39 | break; | ||
40 | case NMI_VECTOR: | ||
41 | /* | ||
42 | * Setup KDB IPI to be delivered as an NMI | ||
43 | */ | ||
44 | case KDB_VECTOR: | ||
45 | icr |= APIC_DM_NMI; | ||
46 | break; | ||
47 | } | ||
37 | return icr; | 48 | return icr; |
38 | } | 49 | } |
39 | 50 | ||
@@ -66,7 +77,7 @@ static inline void __send_IPI_shortcut(unsigned int shortcut, int vector, unsign | |||
66 | /* | 77 | /* |
67 | * Send the IPI. The write to APIC_ICR fires this off. | 78 | * Send the IPI. The write to APIC_ICR fires this off. |
68 | */ | 79 | */ |
69 | apic_write_around(APIC_ICR, cfg); | 80 | apic_write(APIC_ICR, cfg); |
70 | } | 81 | } |
71 | 82 | ||
72 | 83 | ||
@@ -92,7 +103,7 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
92 | * prepare target chip field | 103 | * prepare target chip field |
93 | */ | 104 | */ |
94 | cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]); | 105 | cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]); |
95 | apic_write_around(APIC_ICR2, cfg); | 106 | apic_write(APIC_ICR2, cfg); |
96 | 107 | ||
97 | /* | 108 | /* |
98 | * program the ICR | 109 | * program the ICR |
@@ -102,7 +113,7 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
102 | /* | 113 | /* |
103 | * Send the IPI. The write to APIC_ICR fires this off. | 114 | * Send the IPI. The write to APIC_ICR fires this off. |
104 | */ | 115 | */ |
105 | apic_write_around(APIC_ICR, cfg); | 116 | apic_write(APIC_ICR, cfg); |
106 | } | 117 | } |
107 | local_irq_restore(flags); | 118 | local_irq_restore(flags); |
108 | } | 119 | } |
diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h index b90341994d80..f604e84c5303 100644 --- a/include/asm-x86_64/kdebug.h +++ b/include/asm-x86_64/kdebug.h | |||
@@ -46,7 +46,7 @@ extern void die(const char *,struct pt_regs *,long); | |||
46 | extern void __die(const char *,struct pt_regs *,long); | 46 | extern void __die(const char *,struct pt_regs *,long); |
47 | extern void show_registers(struct pt_regs *regs); | 47 | extern void show_registers(struct pt_regs *regs); |
48 | extern void dump_pagetable(unsigned long); | 48 | extern void dump_pagetable(unsigned long); |
49 | extern void oops_begin(void); | 49 | extern unsigned long oops_begin(void); |
50 | extern void oops_end(void); | 50 | extern void oops_end(unsigned long); |
51 | 51 | ||
52 | #endif | 52 | #endif |
diff --git a/include/asm-x86_64/local.h b/include/asm-x86_64/local.h index c954f15c1a75..3e72c41727c5 100644 --- a/include/asm-x86_64/local.h +++ b/include/asm-x86_64/local.h | |||
@@ -29,7 +29,7 @@ static __inline__ void local_dec(local_t *v) | |||
29 | :"m" (v->counter)); | 29 | :"m" (v->counter)); |
30 | } | 30 | } |
31 | 31 | ||
32 | static __inline__ void local_add(unsigned long i, local_t *v) | 32 | static __inline__ void local_add(unsigned int i, local_t *v) |
33 | { | 33 | { |
34 | __asm__ __volatile__( | 34 | __asm__ __volatile__( |
35 | "addl %1,%0" | 35 | "addl %1,%0" |
@@ -37,7 +37,7 @@ static __inline__ void local_add(unsigned long i, local_t *v) | |||
37 | :"ir" (i), "m" (v->counter)); | 37 | :"ir" (i), "m" (v->counter)); |
38 | } | 38 | } |
39 | 39 | ||
40 | static __inline__ void local_sub(unsigned long i, local_t *v) | 40 | static __inline__ void local_sub(unsigned int i, local_t *v) |
41 | { | 41 | { |
42 | __asm__ __volatile__( | 42 | __asm__ __volatile__( |
43 | "subl %1,%0" | 43 | "subl %1,%0" |
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h index 768413751b34..b40c661f111e 100644 --- a/include/asm-x86_64/mmzone.h +++ b/include/asm-x86_64/mmzone.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <asm/smp.h> | 13 | #include <asm/smp.h> |
14 | 14 | ||
15 | #define NODEMAPSIZE 0xff | 15 | #define NODEMAPSIZE 0xfff |
16 | 16 | ||
17 | /* Simple perfect hash to map physical addresses to node numbers */ | 17 | /* Simple perfect hash to map physical addresses to node numbers */ |
18 | extern int memnode_shift; | 18 | extern int memnode_shift; |
@@ -54,7 +54,7 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) | |||
54 | 54 | ||
55 | #define pfn_valid(pfn) ((pfn) >= num_physpages ? 0 : \ | 55 | #define pfn_valid(pfn) ((pfn) >= num_physpages ? 0 : \ |
56 | ({ u8 nid__ = pfn_to_nid(pfn); \ | 56 | ({ u8 nid__ = pfn_to_nid(pfn); \ |
57 | nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) <= node_end_pfn(nid__); })) | 57 | nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) < node_end_pfn(nid__); })) |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #define local_mapnr(kvaddr) \ | 60 | #define local_mapnr(kvaddr) \ |
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index ba15279a79d0..4d727f3f5550 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
@@ -29,22 +29,37 @@ | |||
29 | #define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) | 29 | #define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) |
30 | 30 | ||
31 | /* wrmsr with exception handling */ | 31 | /* wrmsr with exception handling */ |
32 | #define wrmsr_safe(msr,a,b) ({ int ret__; \ | 32 | #define wrmsr_safe(msr,a,b) ({ int ret__; \ |
33 | asm volatile("2: wrmsr ; xorl %0,%0\n" \ | 33 | asm volatile("2: wrmsr ; xorl %0,%0\n" \ |
34 | "1:\n\t" \ | 34 | "1:\n\t" \ |
35 | ".section .fixup,\"ax\"\n\t" \ | 35 | ".section .fixup,\"ax\"\n\t" \ |
36 | "3: movl %4,%0 ; jmp 1b\n\t" \ | 36 | "3: movl %4,%0 ; jmp 1b\n\t" \ |
37 | ".previous\n\t" \ | 37 | ".previous\n\t" \ |
38 | ".section __ex_table,\"a\"\n" \ | 38 | ".section __ex_table,\"a\"\n" \ |
39 | " .align 8\n\t" \ | 39 | " .align 8\n\t" \ |
40 | " .quad 2b,3b\n\t" \ | 40 | " .quad 2b,3b\n\t" \ |
41 | ".previous" \ | 41 | ".previous" \ |
42 | : "=a" (ret__) \ | 42 | : "=a" (ret__) \ |
43 | : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ | 43 | : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT)); \ |
44 | ret__; }) | 44 | ret__; }) |
45 | 45 | ||
46 | #define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) | 46 | #define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) |
47 | 47 | ||
48 | #define rdmsr_safe(msr,a,b) \ | ||
49 | ({ int ret__; \ | ||
50 | asm volatile ("1: rdmsr\n" \ | ||
51 | "2:\n" \ | ||
52 | ".section .fixup,\"ax\"\n" \ | ||
53 | "3: movl %4,%0\n" \ | ||
54 | " jmp 2b\n" \ | ||
55 | ".previous\n" \ | ||
56 | ".section __ex_table,\"a\"\n" \ | ||
57 | " .align 8\n" \ | ||
58 | " .quad 1b,3b\n" \ | ||
59 | ".previous":"=&bDS" (ret__), "=a"(a), "=d"(b)\ | ||
60 | :"c"(msr), "i"(-EIO), "0"(0)); \ | ||
61 | ret__; }) | ||
62 | |||
48 | #define rdtsc(low,high) \ | 63 | #define rdtsc(low,high) \ |
49 | __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) | 64 | __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) |
50 | 65 | ||
@@ -64,7 +79,7 @@ | |||
64 | : "=a" (low), "=d" (high) \ | 79 | : "=a" (low), "=d" (high) \ |
65 | : "c" (counter)) | 80 | : "c" (counter)) |
66 | 81 | ||
67 | extern inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, | 82 | static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, |
68 | unsigned int *ecx, unsigned int *edx) | 83 | unsigned int *ecx, unsigned int *edx) |
69 | { | 84 | { |
70 | __asm__("cpuid" | 85 | __asm__("cpuid" |
@@ -90,7 +105,7 @@ static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, | |||
90 | /* | 105 | /* |
91 | * CPUID functions returning a single datum | 106 | * CPUID functions returning a single datum |
92 | */ | 107 | */ |
93 | extern inline unsigned int cpuid_eax(unsigned int op) | 108 | static inline unsigned int cpuid_eax(unsigned int op) |
94 | { | 109 | { |
95 | unsigned int eax; | 110 | unsigned int eax; |
96 | 111 | ||
@@ -100,7 +115,7 @@ extern inline unsigned int cpuid_eax(unsigned int op) | |||
100 | : "bx", "cx", "dx"); | 115 | : "bx", "cx", "dx"); |
101 | return eax; | 116 | return eax; |
102 | } | 117 | } |
103 | extern inline unsigned int cpuid_ebx(unsigned int op) | 118 | static inline unsigned int cpuid_ebx(unsigned int op) |
104 | { | 119 | { |
105 | unsigned int eax, ebx; | 120 | unsigned int eax, ebx; |
106 | 121 | ||
@@ -110,7 +125,7 @@ extern inline unsigned int cpuid_ebx(unsigned int op) | |||
110 | : "cx", "dx" ); | 125 | : "cx", "dx" ); |
111 | return ebx; | 126 | return ebx; |
112 | } | 127 | } |
113 | extern inline unsigned int cpuid_ecx(unsigned int op) | 128 | static inline unsigned int cpuid_ecx(unsigned int op) |
114 | { | 129 | { |
115 | unsigned int eax, ecx; | 130 | unsigned int eax, ecx; |
116 | 131 | ||
@@ -120,7 +135,7 @@ extern inline unsigned int cpuid_ecx(unsigned int op) | |||
120 | : "bx", "dx" ); | 135 | : "bx", "dx" ); |
121 | return ecx; | 136 | return ecx; |
122 | } | 137 | } |
123 | extern inline unsigned int cpuid_edx(unsigned int op) | 138 | static inline unsigned int cpuid_edx(unsigned int op) |
124 | { | 139 | { |
125 | unsigned int eax, edx; | 140 | unsigned int eax, edx; |
126 | 141 | ||
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h index 5c363a1482e4..bcf55c3f7f7f 100644 --- a/include/asm-x86_64/numa.h +++ b/include/asm-x86_64/numa.h | |||
@@ -9,6 +9,7 @@ struct node { | |||
9 | }; | 9 | }; |
10 | 10 | ||
11 | extern int compute_hash_shift(struct node *nodes, int numnodes); | 11 | extern int compute_hash_shift(struct node *nodes, int numnodes); |
12 | extern int pxm_to_node(int nid); | ||
12 | 13 | ||
13 | #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) | 14 | #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) |
14 | 15 | ||
@@ -16,6 +17,8 @@ extern void numa_add_cpu(int cpu); | |||
16 | extern void numa_init_array(void); | 17 | extern void numa_init_array(void); |
17 | extern int numa_off; | 18 | extern int numa_off; |
18 | 19 | ||
20 | extern unsigned char apicid_to_node[256]; | ||
21 | |||
19 | #define NUMA_NO_NODE 0xff | 22 | #define NUMA_NO_NODE 0xff |
20 | 23 | ||
21 | #endif | 24 | #endif |
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index 135ffaa0393b..e5ab4d231f2c 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
@@ -32,6 +32,8 @@ | |||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | #ifndef __ASSEMBLY__ | 33 | #ifndef __ASSEMBLY__ |
34 | 34 | ||
35 | extern unsigned long end_pfn; | ||
36 | |||
35 | void clear_page(void *); | 37 | void clear_page(void *); |
36 | void copy_page(void *, void *); | 38 | void copy_page(void *, void *); |
37 | 39 | ||
@@ -111,7 +113,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
111 | #ifdef CONFIG_FLATMEM | 113 | #ifdef CONFIG_FLATMEM |
112 | #define pfn_to_page(pfn) (mem_map + (pfn)) | 114 | #define pfn_to_page(pfn) (mem_map + (pfn)) |
113 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | 115 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) |
114 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 116 | #define pfn_valid(pfn) ((pfn) < end_pfn) |
115 | #endif | 117 | #endif |
116 | 118 | ||
117 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 119 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index eeb3088a1c9e..5a82a6762c21 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h | |||
@@ -50,10 +50,10 @@ extern int iommu_setup(char *opt); | |||
50 | * address space. The networking and block device layers use | 50 | * address space. The networking and block device layers use |
51 | * this boolean for bounce buffer decisions | 51 | * this boolean for bounce buffer decisions |
52 | * | 52 | * |
53 | * On AMD64 it mostly equals, but we set it to zero to tell some subsystems | 53 | * On x86-64 it mostly equals, but we set it to zero to tell some subsystems |
54 | * that an IOMMU is available. | 54 | * that an hard or soft IOMMU is available. |
55 | */ | 55 | */ |
56 | #define PCI_DMA_BUS_IS_PHYS (no_iommu ? 1 : 0) | 56 | #define PCI_DMA_BUS_IS_PHYS 0 |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * x86-64 always supports DAC, but sometimes it is useful to force | 59 | * x86-64 always supports DAC, but sometimes it is useful to force |
diff --git a/include/asm-x86_64/pda.h b/include/asm-x86_64/pda.h index 36b766cfc4d5..bbf89aa8a1af 100644 --- a/include/asm-x86_64/pda.h +++ b/include/asm-x86_64/pda.h | |||
@@ -10,10 +10,8 @@ | |||
10 | struct x8664_pda { | 10 | struct x8664_pda { |
11 | struct task_struct *pcurrent; /* Current process */ | 11 | struct task_struct *pcurrent; /* Current process */ |
12 | unsigned long data_offset; /* Per cpu data offset from linker address */ | 12 | unsigned long data_offset; /* Per cpu data offset from linker address */ |
13 | struct x8664_pda *me; /* Pointer to itself */ | ||
14 | unsigned long kernelstack; /* top of kernel stack for current */ | 13 | unsigned long kernelstack; /* top of kernel stack for current */ |
15 | unsigned long oldrsp; /* user rsp for system call */ | 14 | unsigned long oldrsp; /* user rsp for system call */ |
16 | unsigned long irqrsp; /* Old rsp for interrupts. */ | ||
17 | int irqcount; /* Irq nesting counter. Starts with -1 */ | 15 | int irqcount; /* Irq nesting counter. Starts with -1 */ |
18 | int cpunumber; /* Logical CPU number */ | 16 | int cpunumber; /* Logical CPU number */ |
19 | char *irqstackptr; /* top of irqstack */ | 17 | char *irqstackptr; /* top of irqstack */ |
@@ -22,7 +20,7 @@ struct x8664_pda { | |||
22 | struct mm_struct *active_mm; | 20 | struct mm_struct *active_mm; |
23 | int mmu_state; | 21 | int mmu_state; |
24 | unsigned apic_timer_irqs; | 22 | unsigned apic_timer_irqs; |
25 | } ____cacheline_aligned; | 23 | } ____cacheline_aligned_in_smp; |
26 | 24 | ||
27 | 25 | ||
28 | #define IRQSTACK_ORDER 2 | 26 | #define IRQSTACK_ORDER 2 |
@@ -42,13 +40,14 @@ extern void __bad_pda_field(void); | |||
42 | #define pda_offset(field) offsetof(struct x8664_pda, field) | 40 | #define pda_offset(field) offsetof(struct x8664_pda, field) |
43 | 41 | ||
44 | #define pda_to_op(op,field,val) do { \ | 42 | #define pda_to_op(op,field,val) do { \ |
43 | typedef typeof_field(struct x8664_pda, field) T__; \ | ||
45 | switch (sizeof_field(struct x8664_pda, field)) { \ | 44 | switch (sizeof_field(struct x8664_pda, field)) { \ |
46 | case 2: \ | 45 | case 2: \ |
47 | asm volatile(op "w %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ | 46 | asm volatile(op "w %0,%%gs:%P1"::"ri" ((T__)val),"i"(pda_offset(field)):"memory"); break; \ |
48 | case 4: \ | 47 | case 4: \ |
49 | asm volatile(op "l %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ | 48 | asm volatile(op "l %0,%%gs:%P1"::"ri" ((T__)val),"i"(pda_offset(field)):"memory"); break; \ |
50 | case 8: \ | 49 | case 8: \ |
51 | asm volatile(op "q %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ | 50 | asm volatile(op "q %0,%%gs:%P1"::"ri" ((T__)val),"i"(pda_offset(field)):"memory"); break; \ |
52 | default: __bad_pda_field(); \ | 51 | default: __bad_pda_field(); \ |
53 | } \ | 52 | } \ |
54 | } while (0) | 53 | } while (0) |
@@ -58,7 +57,7 @@ asm volatile(op "q %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); bre | |||
58 | * Unfortunately removing them causes all hell to break lose currently. | 57 | * Unfortunately removing them causes all hell to break lose currently. |
59 | */ | 58 | */ |
60 | #define pda_from_op(op,field) ({ \ | 59 | #define pda_from_op(op,field) ({ \ |
61 | typedef typeof_field(struct x8664_pda, field) T__; T__ ret__; \ | 60 | typeof_field(struct x8664_pda, field) ret__; \ |
62 | switch (sizeof_field(struct x8664_pda, field)) { \ | 61 | switch (sizeof_field(struct x8664_pda, field)) { \ |
63 | case 2: \ | 62 | case 2: \ |
64 | asm volatile(op "w %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ | 63 | asm volatile(op "w %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ |
@@ -75,6 +74,7 @@ asm volatile(op "q %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); b | |||
75 | #define write_pda(field,val) pda_to_op("mov",field,val) | 74 | #define write_pda(field,val) pda_to_op("mov",field,val) |
76 | #define add_pda(field,val) pda_to_op("add",field,val) | 75 | #define add_pda(field,val) pda_to_op("add",field,val) |
77 | #define sub_pda(field,val) pda_to_op("sub",field,val) | 76 | #define sub_pda(field,val) pda_to_op("sub",field,val) |
77 | #define or_pda(field,val) pda_to_op("or",field,val) | ||
78 | 78 | ||
79 | #endif | 79 | #endif |
80 | 80 | ||
diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h index deadd146978b..08cad2482bcb 100644 --- a/include/asm-x86_64/pgalloc.h +++ b/include/asm-x86_64/pgalloc.h | |||
@@ -18,12 +18,12 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p | |||
18 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); | 18 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); |
19 | } | 19 | } |
20 | 20 | ||
21 | extern __inline__ pmd_t *get_pmd(void) | 21 | static inline pmd_t *get_pmd(void) |
22 | { | 22 | { |
23 | return (pmd_t *)get_zeroed_page(GFP_KERNEL); | 23 | return (pmd_t *)get_zeroed_page(GFP_KERNEL); |
24 | } | 24 | } |
25 | 25 | ||
26 | extern __inline__ void pmd_free(pmd_t *pmd) | 26 | static inline void pmd_free(pmd_t *pmd) |
27 | { | 27 | { |
28 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | 28 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); |
29 | free_page((unsigned long)pmd); | 29 | free_page((unsigned long)pmd); |
@@ -86,13 +86,13 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long add | |||
86 | /* Should really implement gc for free page table pages. This could be | 86 | /* Should really implement gc for free page table pages. This could be |
87 | done with a reference count in struct page. */ | 87 | done with a reference count in struct page. */ |
88 | 88 | ||
89 | extern __inline__ void pte_free_kernel(pte_t *pte) | 89 | static inline void pte_free_kernel(pte_t *pte) |
90 | { | 90 | { |
91 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); | 91 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); |
92 | free_page((unsigned long)pte); | 92 | free_page((unsigned long)pte); |
93 | } | 93 | } |
94 | 94 | ||
95 | extern inline void pte_free(struct page *pte) | 95 | static inline void pte_free(struct page *pte) |
96 | { | 96 | { |
97 | __free_page(pte); | 97 | __free_page(pte); |
98 | } | 98 | } |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 5e0f2fdab0d3..1dc110ba82d6 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -85,7 +85,7 @@ static inline void set_pud(pud_t *dst, pud_t val) | |||
85 | pud_val(*dst) = pud_val(val); | 85 | pud_val(*dst) = pud_val(val); |
86 | } | 86 | } |
87 | 87 | ||
88 | extern inline void pud_clear (pud_t *pud) | 88 | static inline void pud_clear (pud_t *pud) |
89 | { | 89 | { |
90 | set_pud(pud, __pud(0)); | 90 | set_pud(pud, __pud(0)); |
91 | } | 91 | } |
@@ -95,7 +95,7 @@ static inline void set_pgd(pgd_t *dst, pgd_t val) | |||
95 | pgd_val(*dst) = pgd_val(val); | 95 | pgd_val(*dst) = pgd_val(val); |
96 | } | 96 | } |
97 | 97 | ||
98 | extern inline void pgd_clear (pgd_t * pgd) | 98 | static inline void pgd_clear (pgd_t * pgd) |
99 | { | 99 | { |
100 | set_pgd(pgd, __pgd(0)); | 100 | set_pgd(pgd, __pgd(0)); |
101 | } | 101 | } |
@@ -375,7 +375,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
375 | } | 375 | } |
376 | 376 | ||
377 | /* Change flags of a PTE */ | 377 | /* Change flags of a PTE */ |
378 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 378 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
379 | { | 379 | { |
380 | pte_val(pte) &= _PAGE_CHG_MASK; | 380 | pte_val(pte) &= _PAGE_CHG_MASK; |
381 | pte_val(pte) |= pgprot_val(newprot); | 381 | pte_val(pte) |= pgprot_val(newprot); |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index a8321999448f..03837d34fba0 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -254,7 +254,13 @@ struct thread_struct { | |||
254 | u64 tls_array[GDT_ENTRY_TLS_ENTRIES]; | 254 | u64 tls_array[GDT_ENTRY_TLS_ENTRIES]; |
255 | } __attribute__((aligned(16))); | 255 | } __attribute__((aligned(16))); |
256 | 256 | ||
257 | #define INIT_THREAD {} | 257 | #define INIT_THREAD { \ |
258 | .rsp0 = (unsigned long)&init_stack + sizeof(init_stack) \ | ||
259 | } | ||
260 | |||
261 | #define INIT_TSS { \ | ||
262 | .rsp0 = (unsigned long)&init_stack + sizeof(init_stack) \ | ||
263 | } | ||
258 | 264 | ||
259 | #define INIT_MMAP \ | 265 | #define INIT_MMAP \ |
260 | { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } | 266 | { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } |
@@ -375,13 +381,13 @@ struct extended_sigtable { | |||
375 | #define ASM_NOP_MAX 8 | 381 | #define ASM_NOP_MAX 8 |
376 | 382 | ||
377 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ | 383 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ |
378 | extern inline void rep_nop(void) | 384 | static inline void rep_nop(void) |
379 | { | 385 | { |
380 | __asm__ __volatile__("rep;nop": : :"memory"); | 386 | __asm__ __volatile__("rep;nop": : :"memory"); |
381 | } | 387 | } |
382 | 388 | ||
383 | /* Stop speculative execution */ | 389 | /* Stop speculative execution */ |
384 | extern inline void sync_core(void) | 390 | static inline void sync_core(void) |
385 | { | 391 | { |
386 | int tmp; | 392 | int tmp; |
387 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); | 393 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index f7574196424e..dbb37b0adb43 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -74,9 +74,6 @@ extern void acpi_reserve_bootmem(void); | |||
74 | 74 | ||
75 | extern void swap_low_mappings(void); | 75 | extern void swap_low_mappings(void); |
76 | 76 | ||
77 | extern void oops_begin(void); | ||
78 | extern void die(const char *,struct pt_regs *,long); | ||
79 | extern void __die(const char * str, struct pt_regs * regs, long err); | ||
80 | extern void __show_regs(struct pt_regs * regs); | 77 | extern void __show_regs(struct pt_regs * regs); |
81 | extern void show_regs(struct pt_regs * regs); | 78 | extern void show_regs(struct pt_regs * regs); |
82 | 79 | ||
@@ -93,8 +90,6 @@ extern int unhandled_signal(struct task_struct *tsk, int sig); | |||
93 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 90 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
94 | extern void swiotlb_init(void); | 91 | extern void swiotlb_init(void); |
95 | 92 | ||
96 | extern unsigned long max_mapnr; | ||
97 | extern unsigned long end_pfn; | ||
98 | extern unsigned long table_start, table_end; | 93 | extern unsigned long table_start, table_end; |
99 | 94 | ||
100 | extern int exception_trace; | 95 | extern int exception_trace; |
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index fe9b96d94815..f8d55798535a 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h | |||
@@ -143,23 +143,23 @@ typedef struct sigaltstack { | |||
143 | #undef __HAVE_ARCH_SIG_BITOPS | 143 | #undef __HAVE_ARCH_SIG_BITOPS |
144 | #if 0 | 144 | #if 0 |
145 | 145 | ||
146 | extern __inline__ void sigaddset(sigset_t *set, int _sig) | 146 | static inline void sigaddset(sigset_t *set, int _sig) |
147 | { | 147 | { |
148 | __asm__("btsq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); | 148 | __asm__("btsq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); |
149 | } | 149 | } |
150 | 150 | ||
151 | extern __inline__ void sigdelset(sigset_t *set, int _sig) | 151 | static inline void sigdelset(sigset_t *set, int _sig) |
152 | { | 152 | { |
153 | __asm__("btrq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); | 153 | __asm__("btrq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); |
154 | } | 154 | } |
155 | 155 | ||
156 | extern __inline__ int __const_sigismember(sigset_t *set, int _sig) | 156 | static inline int __const_sigismember(sigset_t *set, int _sig) |
157 | { | 157 | { |
158 | unsigned long sig = _sig - 1; | 158 | unsigned long sig = _sig - 1; |
159 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig & ~(_NSIG_BPW-1))); | 159 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig & ~(_NSIG_BPW-1))); |
160 | } | 160 | } |
161 | 161 | ||
162 | extern __inline__ int __gen_sigismember(sigset_t *set, int _sig) | 162 | static inline int __gen_sigismember(sigset_t *set, int _sig) |
163 | { | 163 | { |
164 | int ret; | 164 | int ret; |
165 | __asm__("btq %2,%1\n\tsbbq %0,%0" | 165 | __asm__("btq %2,%1\n\tsbbq %0,%0" |
@@ -172,7 +172,7 @@ extern __inline__ int __gen_sigismember(sigset_t *set, int _sig) | |||
172 | __const_sigismember((set),(sig)) : \ | 172 | __const_sigismember((set),(sig)) : \ |
173 | __gen_sigismember((set),(sig))) | 173 | __gen_sigismember((set),(sig))) |
174 | 174 | ||
175 | extern __inline__ int sigfindinword(unsigned long word) | 175 | static inline int sigfindinword(unsigned long word) |
176 | { | 176 | { |
177 | __asm__("bsfq %1,%0" : "=r"(word) : "rm"(word) : "cc"); | 177 | __asm__("bsfq %1,%0" : "=r"(word) : "rm"(word) : "cc"); |
178 | return word; | 178 | return word; |
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index de8b57b2b62b..24e32611f0bf 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
@@ -72,7 +72,7 @@ static inline int num_booting_cpus(void) | |||
72 | 72 | ||
73 | #define raw_smp_processor_id() read_pda(cpunumber) | 73 | #define raw_smp_processor_id() read_pda(cpunumber) |
74 | 74 | ||
75 | extern __inline int hard_smp_processor_id(void) | 75 | static inline int hard_smp_processor_id(void) |
76 | { | 76 | { |
77 | /* we don't want to mark this access volatile - bad code generation */ | 77 | /* we don't want to mark this access volatile - bad code generation */ |
78 | return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID)); | 78 | return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID)); |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index 8606e170a7dc..85348e02ad2e 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -188,7 +188,7 @@ static inline void write_cr4(unsigned long val) | |||
188 | 188 | ||
189 | #define __xg(x) ((volatile long *)(x)) | 189 | #define __xg(x) ((volatile long *)(x)) |
190 | 190 | ||
191 | extern inline void set_64bit(volatile unsigned long *ptr, unsigned long val) | 191 | static inline void set_64bit(volatile unsigned long *ptr, unsigned long val) |
192 | { | 192 | { |
193 | *ptr = val; | 193 | *ptr = val; |
194 | } | 194 | } |
@@ -253,19 +253,19 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
253 | case 2: | 253 | case 2: |
254 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" | 254 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" |
255 | : "=a"(prev) | 255 | : "=a"(prev) |
256 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 256 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
257 | : "memory"); | 257 | : "memory"); |
258 | return prev; | 258 | return prev; |
259 | case 4: | 259 | case 4: |
260 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %k1,%2" | 260 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %k1,%2" |
261 | : "=a"(prev) | 261 | : "=a"(prev) |
262 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 262 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
263 | : "memory"); | 263 | : "memory"); |
264 | return prev; | 264 | return prev; |
265 | case 8: | 265 | case 8: |
266 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgq %1,%2" | 266 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgq %1,%2" |
267 | : "=a"(prev) | 267 | : "=a"(prev) |
268 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 268 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
269 | : "memory"); | 269 | : "memory"); |
270 | return prev; | 270 | return prev; |
271 | } | 271 | } |
diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h index 24ecf6a637cb..f971f45d6d78 100644 --- a/include/asm-x86_64/timex.h +++ b/include/asm-x86_64/timex.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #ifndef _ASMx8664_TIMEX_H | 6 | #ifndef _ASMx8664_TIMEX_H |
7 | #define _ASMx8664_TIMEX_H | 7 | #define _ASMx8664_TIMEX_H |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <asm/8253pit.h> | 9 | #include <asm/8253pit.h> |
11 | #include <asm/msr.h> | 10 | #include <asm/msr.h> |
12 | #include <asm/vsyscall.h> | 11 | #include <asm/vsyscall.h> |
diff --git a/include/asm-x86_64/tlbflush.h b/include/asm-x86_64/tlbflush.h index 505b0cf906de..4a9c20ea9b10 100644 --- a/include/asm-x86_64/tlbflush.h +++ b/include/asm-x86_64/tlbflush.h | |||
@@ -109,6 +109,10 @@ static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long st | |||
109 | #define TLBSTATE_OK 1 | 109 | #define TLBSTATE_OK 1 |
110 | #define TLBSTATE_LAZY 2 | 110 | #define TLBSTATE_LAZY 2 |
111 | 111 | ||
112 | /* Roughly an IPI every 20MB with 4k pages for freeing page table | ||
113 | ranges. Cost is about 42k of memory for each CPU. */ | ||
114 | #define ARCH_FREE_PTE_NR 5350 | ||
115 | |||
112 | #endif | 116 | #endif |
113 | 117 | ||
114 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() | 118 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() |
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index c1bc3fad482e..1c603cd7e4d0 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -13,7 +13,6 @@ | |||
13 | extern cpumask_t cpu_online_map; | 13 | extern cpumask_t cpu_online_map; |
14 | 14 | ||
15 | extern unsigned char cpu_to_node[]; | 15 | extern unsigned char cpu_to_node[]; |
16 | extern unsigned char pci_bus_to_node[]; | ||
17 | extern cpumask_t node_to_cpumask[]; | 16 | extern cpumask_t node_to_cpumask[]; |
18 | 17 | ||
19 | #ifdef CONFIG_ACPI_NUMA | 18 | #ifdef CONFIG_ACPI_NUMA |
@@ -26,7 +25,7 @@ extern int __node_distance(int, int); | |||
26 | #define parent_node(node) (node) | 25 | #define parent_node(node) (node) |
27 | #define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) | 26 | #define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) |
28 | #define node_to_cpumask(node) (node_to_cpumask[node]) | 27 | #define node_to_cpumask(node) (node_to_cpumask[node]) |
29 | #define pcibus_to_node(bus) pci_bus_to_node[(bus)->number] | 28 | #define pcibus_to_node(bus) ((long)(bus->sysdata)) |
30 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)); | 29 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)); |
31 | 30 | ||
32 | /* sched_domains SD_NODE_INIT for x86_64 machines */ | 31 | /* sched_domains SD_NODE_INIT for x86_64 machines */ |
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index 2872da23fc7e..438a3f52f839 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h | |||
@@ -29,7 +29,6 @@ enum vsyscall_num { | |||
29 | 29 | ||
30 | struct vxtime_data { | 30 | struct vxtime_data { |
31 | long hpet_address; /* HPET base address */ | 31 | long hpet_address; /* HPET base address */ |
32 | unsigned long hz; /* HPET clocks / sec */ | ||
33 | int last; | 32 | int last; |
34 | unsigned long last_tsc; | 33 | unsigned long last_tsc; |
35 | long quot; | 34 | long quot; |
diff --git a/include/linux/crc16.h b/include/linux/crc16.h index bdedf825b04a..9443c084f881 100644 --- a/include/linux/crc16.h +++ b/include/linux/crc16.h | |||
@@ -1,22 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * crc16.h - CRC-16 routine | 2 | * crc16.h - CRC-16 routine |
3 | * | 3 | * |
4 | * Implements the standard CRC-16, as used with 1-wire devices: | 4 | * Implements the standard CRC-16: |
5 | * Width 16 | 5 | * Width 16 |
6 | * Poly 0x8005 (x^16 + x^15 + x^2 + 1) | 6 | * Poly 0x8005 (x^16 + x^15 + x^2 + 1) |
7 | * Init 0 | 7 | * Init 0 |
8 | * | 8 | * |
9 | * For 1-wire devices, the CRC is stored inverted, LSB-first | ||
10 | * | ||
11 | * Example buffer with the CRC attached: | ||
12 | * 31 32 33 34 35 36 37 38 39 C2 44 | ||
13 | * | ||
14 | * The CRC over a buffer with the CRC attached is 0xB001. | ||
15 | * So, if (crc16(0, buf, size) == 0xB001) then the buffer is valid. | ||
16 | * | ||
17 | * Refer to "Application Note 937: Book of iButton Standards" for details. | ||
18 | * http://www.maxim-ic.com/appnotes.cfm/appnote_number/937 | ||
19 | * | ||
20 | * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com> | 9 | * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com> |
21 | * | 10 | * |
22 | * This source code is licensed under the GNU General Public License, | 11 | * This source code is licensed under the GNU General Public License, |
@@ -28,9 +17,6 @@ | |||
28 | 17 | ||
29 | #include <linux/types.h> | 18 | #include <linux/types.h> |
30 | 19 | ||
31 | #define CRC16_INIT 0 | ||
32 | #define CRC16_VALID 0xb001 | ||
33 | |||
34 | extern u16 const crc16_table[256]; | 20 | extern u16 const crc16_table[256]; |
35 | 21 | ||
36 | extern u16 crc16(u16 crc, const u8 *buffer, size_t len); | 22 | extern u16 crc16(u16 crc, const u8 *buffer, size_t len); |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index c30175e8dec6..a415f1d93e9a 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -70,7 +70,7 @@ extern struct dmi_device * dmi_find_device(int type, const char *name, | |||
70 | 70 | ||
71 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } | 71 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } |
72 | static inline char * dmi_get_system_info(int field) { return NULL; } | 72 | static inline char * dmi_get_system_info(int field) { return NULL; } |
73 | static struct dmi_device * dmi_find_device(int type, const char *name, | 73 | static inline struct dmi_device * dmi_find_device(int type, const char *name, |
74 | struct dmi_device *from) { return NULL; } | 74 | struct dmi_device *from) { return NULL; } |
75 | 75 | ||
76 | #endif | 76 | #endif |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index d99e7aeb7d33..0a90205184b0 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -57,6 +57,11 @@ extern void disable_irq(unsigned int irq); | |||
57 | extern void enable_irq(unsigned int irq); | 57 | extern void enable_irq(unsigned int irq); |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #ifndef __ARCH_SET_SOFTIRQ_PENDING | ||
61 | #define set_softirq_pending(x) (local_softirq_pending() = (x)) | ||
62 | #define or_softirq_pending(x) (local_softirq_pending() |= (x)) | ||
63 | #endif | ||
64 | |||
60 | /* | 65 | /* |
61 | * Temporary defines for UP kernels, until all code gets fixed. | 66 | * Temporary defines for UP kernels, until all code gets fixed. |
62 | */ | 67 | */ |
@@ -123,7 +128,7 @@ struct softirq_action | |||
123 | asmlinkage void do_softirq(void); | 128 | asmlinkage void do_softirq(void); |
124 | extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); | 129 | extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); |
125 | extern void softirq_init(void); | 130 | extern void softirq_init(void); |
126 | #define __raise_softirq_irqoff(nr) do { local_softirq_pending() |= 1UL << (nr); } while (0) | 131 | #define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0) |
127 | extern void FASTCALL(raise_softirq_irqoff(unsigned int nr)); | 132 | extern void FASTCALL(raise_softirq_irqoff(unsigned int nr)); |
128 | extern void FASTCALL(raise_softirq(unsigned int nr)); | 133 | extern void FASTCALL(raise_softirq(unsigned int nr)); |
129 | 134 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index ed3bb19d1337..38c8654aaa96 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -785,7 +785,6 @@ struct task_struct { | |||
785 | short il_next; | 785 | short il_next; |
786 | #endif | 786 | #endif |
787 | #ifdef CONFIG_CPUSETS | 787 | #ifdef CONFIG_CPUSETS |
788 | short cpuset_sem_nest_depth; | ||
789 | struct cpuset *cpuset; | 788 | struct cpuset *cpuset; |
790 | nodemask_t mems_allowed; | 789 | nodemask_t mems_allowed; |
791 | int cpuset_mems_generation; | 790 | int cpuset_mems_generation; |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index fb57c2217468..9facf733800c 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -32,7 +32,6 @@ | |||
32 | #define _LINUX_USBDEVICE_FS_H | 32 | #define _LINUX_USBDEVICE_FS_H |
33 | 33 | ||
34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
35 | #include <linux/compat.h> | ||
36 | 35 | ||
37 | /* --------------------------------------------------------------------- */ | 36 | /* --------------------------------------------------------------------- */ |
38 | 37 | ||
@@ -125,6 +124,7 @@ struct usbdevfs_hub_portinfo { | |||
125 | }; | 124 | }; |
126 | 125 | ||
127 | #ifdef CONFIG_COMPAT | 126 | #ifdef CONFIG_COMPAT |
127 | #include <linux/compat.h> | ||
128 | struct usbdevfs_urb32 { | 128 | struct usbdevfs_urb32 { |
129 | unsigned char type; | 129 | unsigned char type; |
130 | unsigned char endpoint; | 130 | unsigned char endpoint; |