diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/bitops.h | 53 | ||||
-rw-r--r-- | include/asm-i386/mach-visws/do_timer.h | 1 | ||||
-rw-r--r-- | include/asm-i386/pci.h | 4 | ||||
-rw-r--r-- | include/asm-i386/ptrace.h | 3 | ||||
-rw-r--r-- | include/asm-i386/smp.h | 3 |
5 files changed, 28 insertions, 36 deletions
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h index 9db0b712d57a..ddf1739dc7fd 100644 --- a/include/asm-i386/bitops.h +++ b/include/asm-i386/bitops.h | |||
@@ -311,6 +311,20 @@ static inline int find_first_zero_bit(const unsigned long *addr, unsigned size) | |||
311 | int find_next_zero_bit(const unsigned long *addr, int size, int offset); | 311 | int find_next_zero_bit(const unsigned long *addr, int size, int offset); |
312 | 312 | ||
313 | /** | 313 | /** |
314 | * __ffs - find first bit in word. | ||
315 | * @word: The word to search | ||
316 | * | ||
317 | * Undefined if no bit exists, so code should check against 0 first. | ||
318 | */ | ||
319 | static inline unsigned long __ffs(unsigned long word) | ||
320 | { | ||
321 | __asm__("bsfl %1,%0" | ||
322 | :"=r" (word) | ||
323 | :"rm" (word)); | ||
324 | return word; | ||
325 | } | ||
326 | |||
327 | /** | ||
314 | * find_first_bit - find the first set bit in a memory region | 328 | * find_first_bit - find the first set bit in a memory region |
315 | * @addr: The address to start the search at | 329 | * @addr: The address to start the search at |
316 | * @size: The maximum size to search | 330 | * @size: The maximum size to search |
@@ -320,22 +334,15 @@ int find_next_zero_bit(const unsigned long *addr, int size, int offset); | |||
320 | */ | 334 | */ |
321 | static inline int find_first_bit(const unsigned long *addr, unsigned size) | 335 | static inline int find_first_bit(const unsigned long *addr, unsigned size) |
322 | { | 336 | { |
323 | int d0, d1; | 337 | int x = 0; |
324 | int res; | 338 | |
325 | 339 | while (x < size) { | |
326 | /* This looks at memory. Mark it volatile to tell gcc not to move it around */ | 340 | unsigned long val = *addr++; |
327 | __asm__ __volatile__( | 341 | if (val) |
328 | "xorl %%eax,%%eax\n\t" | 342 | return __ffs(val) + x; |
329 | "repe; scasl\n\t" | 343 | x += (sizeof(*addr)<<3); |
330 | "jz 1f\n\t" | 344 | } |
331 | "leal -4(%%edi),%%edi\n\t" | 345 | return x; |
332 | "bsfl (%%edi),%%eax\n" | ||
333 | "1:\tsubl %%ebx,%%edi\n\t" | ||
334 | "shll $3,%%edi\n\t" | ||
335 | "addl %%edi,%%eax" | ||
336 | :"=a" (res), "=&c" (d0), "=&D" (d1) | ||
337 | :"1" ((size + 31) >> 5), "2" (addr), "b" (addr) : "memory"); | ||
338 | return res; | ||
339 | } | 346 | } |
340 | 347 | ||
341 | /** | 348 | /** |
@@ -360,20 +367,6 @@ static inline unsigned long ffz(unsigned long word) | |||
360 | return word; | 367 | return word; |
361 | } | 368 | } |
362 | 369 | ||
363 | /** | ||
364 | * __ffs - find first bit in word. | ||
365 | * @word: The word to search | ||
366 | * | ||
367 | * Undefined if no bit exists, so code should check against 0 first. | ||
368 | */ | ||
369 | static inline unsigned long __ffs(unsigned long word) | ||
370 | { | ||
371 | __asm__("bsfl %1,%0" | ||
372 | :"=r" (word) | ||
373 | :"rm" (word)); | ||
374 | return word; | ||
375 | } | ||
376 | |||
377 | /* | 370 | /* |
378 | * fls: find last bit set. | 371 | * fls: find last bit set. |
379 | */ | 372 | */ |
diff --git a/include/asm-i386/mach-visws/do_timer.h b/include/asm-i386/mach-visws/do_timer.h index 33acd50fd9a8..92d638fc8b11 100644 --- a/include/asm-i386/mach-visws/do_timer.h +++ b/include/asm-i386/mach-visws/do_timer.h | |||
@@ -1,6 +1,7 @@ | |||
1 | /* defines for inline arch setup functions */ | 1 | /* defines for inline arch setup functions */ |
2 | 2 | ||
3 | #include <asm/fixmap.h> | 3 | #include <asm/fixmap.h> |
4 | #include <asm/i8259.h> | ||
4 | #include "cobalt.h" | 5 | #include "cobalt.h" |
5 | 6 | ||
6 | static inline void do_timer_interrupt_hook(struct pt_regs *regs) | 7 | static inline void do_timer_interrupt_hook(struct pt_regs *regs) |
diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h index 78c85985aee3..2cbab30734d6 100644 --- a/include/asm-i386/pci.h +++ b/include/asm-i386/pci.h | |||
@@ -18,11 +18,9 @@ extern unsigned int pcibios_assign_all_busses(void); | |||
18 | #define pcibios_scan_all_fns(a, b) 0 | 18 | #define pcibios_scan_all_fns(a, b) 0 |
19 | 19 | ||
20 | extern unsigned long pci_mem_start; | 20 | extern unsigned long pci_mem_start; |
21 | #define PCIBIOS_MIN_IO 0x1000 | 21 | #define PCIBIOS_MIN_IO 0x4000 |
22 | #define PCIBIOS_MIN_MEM (pci_mem_start) | 22 | #define PCIBIOS_MIN_MEM (pci_mem_start) |
23 | 23 | ||
24 | #define PCIBIOS_MIN_CARDBUS_IO 0x4000 | ||
25 | |||
26 | void pcibios_config_init(void); | 24 | void pcibios_config_init(void); |
27 | struct pci_bus * pcibios_scan_root(int bus); | 25 | struct pci_bus * pcibios_scan_root(int bus); |
28 | 26 | ||
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h index b926cb4f4cfd..05532875e39e 100644 --- a/include/asm-i386/ptrace.h +++ b/include/asm-i386/ptrace.h | |||
@@ -55,6 +55,9 @@ struct pt_regs { | |||
55 | #define PTRACE_SET_THREAD_AREA 26 | 55 | #define PTRACE_SET_THREAD_AREA 26 |
56 | 56 | ||
57 | #ifdef __KERNEL__ | 57 | #ifdef __KERNEL__ |
58 | |||
59 | #include <asm/vm86.h> | ||
60 | |||
58 | struct task_struct; | 61 | struct task_struct; |
59 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); | 62 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); |
60 | 63 | ||
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index edad9b4712fa..a283738b80b3 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h | |||
@@ -37,9 +37,6 @@ extern int smp_num_siblings; | |||
37 | extern cpumask_t cpu_sibling_map[]; | 37 | extern cpumask_t cpu_sibling_map[]; |
38 | extern cpumask_t cpu_core_map[]; | 38 | extern cpumask_t cpu_core_map[]; |
39 | 39 | ||
40 | extern void smp_flush_tlb(void); | ||
41 | extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs); | ||
42 | extern void smp_invalidate_rcv(void); /* Process an NMI */ | ||
43 | extern void (*mtrr_hook) (void); | 40 | extern void (*mtrr_hook) (void); |
44 | extern void zap_low_mappings (void); | 41 | extern void zap_low_mappings (void); |
45 | extern void lock_ipi_call_lock(void); | 42 | extern void lock_ipi_call_lock(void); |