summaryrefslogtreecommitdiffstats
path: root/include/asm-i386
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-08 00:53:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-08 00:53:00 +0000
commitb8553086288629b4efb77e97f5582e08bc50ad65 (patch)
tree0a19bd1c21e148f35c7a0f76baa4f7a056b966b0 /include/asm-i386
parent75b6d92f2dd5112b02f4e78cf9f35f9825946ef0 (diff)
Merge with 2.4.0-test3-pre4.
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/bugs.h15
-rw-r--r--include/asm-i386/fcntl.h8
-rw-r--r--include/asm-i386/io_apic.h2
-rw-r--r--include/asm-i386/socket.h4
-rw-r--r--include/asm-i386/spinlock.h3
5 files changed, 18 insertions, 14 deletions
diff --git a/include/asm-i386/bugs.h b/include/asm-i386/bugs.h
index 23460fcb6..04ec17c63 100644
--- a/include/asm-i386/bugs.h
+++ b/include/asm-i386/bugs.h
@@ -52,11 +52,12 @@ __setup("no387", no_387);
static char __initdata fpu_error = 0;
-static void __init copro_timeout(void)
+static struct timer_list copro_timer __initdata = {{0, 0}, 0};
+
+static void __init copro_timeout(unsigned long dummy)
{
fpu_error = 1;
- timer_table[COPRO_TIMER].expires = jiffies+HZ;
- timer_active |= 1<<COPRO_TIMER;
+ mod_timer(&copro_timer, jiffies+HZ);
printk(KERN_ERR "387 failed: trying to reset\n");
send_sig(SIGFPE, current, 1);
outb_p(0,0xf1);
@@ -118,15 +119,15 @@ static void __init check_fpu(void)
* should get there first..
*/
printk(KERN_INFO "Checking 386/387 coupling... ");
- timer_table[COPRO_TIMER].expires = jiffies+HZ/2;
- timer_table[COPRO_TIMER].fn = copro_timeout;
- timer_active |= 1<<COPRO_TIMER;
+ init_timer(&copro_timer);
+ copro_timer.function = copro_timeout;
+ mod_timer(&copro_timer, jiffies+HZ/2);
__asm__("clts ; fninit ; fnstcw %0 ; fwait":"=m" (*&control_word));
control_word &= 0xffc0;
__asm__("fldcw %0 ; fwait": :"m" (*&control_word));
outb_p(inb_p(0x21) | (1 << 2), 0x21);
__asm__("fldz ; fld1 ; fdiv %st,%st(1) ; fwait");
- timer_active &= ~(1<<COPRO_TIMER);
+ del_timer(&copro_timer);
if (fpu_error)
return;
if (!ignore_irq13) {
diff --git a/include/asm-i386/fcntl.h b/include/asm-i386/fcntl.h
index eff29ac8f..971b563a8 100644
--- a/include/asm-i386/fcntl.h
+++ b/include/asm-i386/fcntl.h
@@ -22,10 +22,10 @@
#define O_NOFOLLOW 0400000 /* don't follow links */
#define F_DUPFD 0 /* dup */
-#define F_GETFD 1 /* get f_flags */
-#define F_SETFD 2 /* set f_flags */
-#define F_GETFL 3 /* more flags (cloexec) */
-#define F_SETFL 4
+#define F_GETFD 1 /* get close_on_exec */
+#define F_SETFD 2 /* set/clear close_on_exec */
+#define F_GETFL 3 /* get file->f_flags */
+#define F_SETFL 4 /* set file->f_flags */
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h
index 9ac8df6ec..868f92e0e 100644
--- a/include/asm-i386/io_apic.h
+++ b/include/asm-i386/io_apic.h
@@ -137,7 +137,7 @@ extern void IO_APIC_init_uniprocessor (void);
* If we use the IO-APIC for IRQ routing, disable automatic
* assignment of PCI IRQ's.
*/
-#define io_apic_assign_pci_irqs (mp_irq_entries != 0)
+#define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup)
#else /* !CONFIG_X86_IO_APIC */
#define io_apic_assign_pci_irqs 0
diff --git a/include/asm-i386/socket.h b/include/asm-i386/socket.h
index b547eeca1..9dc6c3389 100644
--- a/include/asm-i386/socket.h
+++ b/include/asm-i386/socket.h
@@ -41,8 +41,8 @@
#define SO_PEERNAME 28
-/* Nast libc5 fixup - bletch */
-#if defined(__KERNEL__)
+/* Nasty libc5 fixup - bletch */
+#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
/* Socket types. */
#define SOCK_STREAM 1 /* stream (connection) socket */
#define SOCK_DGRAM 2 /* datagram (conn.less) socket */
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h
index a393580b9..5d5b67ab2 100644
--- a/include/asm-i386/spinlock.h
+++ b/include/asm-i386/spinlock.h
@@ -36,6 +36,7 @@ typedef struct {
#define SPIN_LOCK_UNLOCKED (spinlock_t) { 1 SPINLOCK_MAGIC_INIT }
#define spin_lock_init(x) do { *(x) = SPIN_LOCK_UNLOCKED; } while(0)
+
/*
* Simple spin lock operations. There are two variants, one clears IRQ's
* on the local processor, one does not.
@@ -129,6 +130,8 @@ typedef struct {
#define RW_LOCK_UNLOCKED (rwlock_t) { RW_LOCK_BIAS RWLOCK_MAGIC_INIT }
+#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
+
/*
* On x86, we implement read-write locks as a 32-bit counter
* with the high bit (sign) being the "contended" bit.