lkml.org 
[lkml]   [1999]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
SubjectSome patches to get kernel 2.3.1pre3 to build here (i586)
Date
From
As requested. The resulting kernel is what I am rinning right now.

--- linux/fs/smbfs/inode.c.dist-2.3.1pre3 Wed Dec 23 14:44:42 1998
+++ linux/fs/smbfs/inode.c Wed May 12 17:46:48 1999
@@ -68,7 +68,7 @@
}

static struct smb_fattr *read_fattr = NULL;
-static struct semaphore read_semaphore = MUTEX;
+static DECLARE_MUTEX(read_semaphore);

struct inode *
smb_iget(struct super_block *sb, struct smb_fattr *fattr)
@@ -362,7 +362,7 @@
sb->s_op = &smb_sops;

sb->u.smbfs_sb.sock_file = NULL;
- sb->u.smbfs_sb.sem = MUTEX;
+ init_MUTEX(&sb->u.smbfs_sb.sem);
sb->u.smbfs_sb.wait = NULL;
sb->u.smbfs_sb.conn_pid = 0;
sb->u.smbfs_sb.state = CONN_INVALID; /* no connection yet */
@@ -609,7 +609,7 @@
smb_current_vmalloced = 0;
#endif

- read_semaphore = MUTEX;
+ init_MUTEX(&read_semaphore);

return init_smb_fs();
}
--- linux/fs/lockd/svc.c.dist-2.3.1pre3 Wed May 12 16:40:48 1999
+++ linux/fs/lockd/svc.c Wed May 12 17:32:33 1999
@@ -322,7 +322,6 @@
init_MUTEX(&nlmsvc_sema);
nlmsvc_users = 0;
nlmsvc_pid = 0;
- lockd_exit = NULL;
nlmxdr_init();
return 0;
}
--- linux/fs/dquot.c.dist-2.3.1pre3 Wed May 12 16:40:47 1999
+++ linux/fs/dquot.c Wed May 12 17:25:46 1999
@@ -195,7 +195,7 @@

static void __wait_on_dquot(struct dquot *dquot)
{
- struct wait_queue wait = { current, NULL };
+ DECLARE_WAITQUEUE(wait, current);

add_wait_queue(&dquot->dq_wait, &wait);
repeat:
--- linux/net/core/firewall.c.dist-2.3.1pre3 Tue Dec 29 16:21:49 1998
+++ linux/net/core/firewall.c Wed May 12 17:18:12 1999
@@ -13,7 +13,7 @@
#include <linux/interrupt.h>
#include <asm/semaphore.h>

-struct semaphore firewall_sem = MUTEX;
+DECLARE_MUTEX(firewall_sem);
static int firewall_policy[NPROTO];
static struct firewall_ops *firewall_chain[NPROTO];

--- linux/net/ipv4/ip_masq_mfw.c.dist-2.3.1pre3 Mon Feb 8 14:26:29 1999
+++ linux/net/ipv4/ip_masq_mfw.c Wed May 12 17:37:39 1999
@@ -79,7 +79,7 @@
};


-static struct semaphore mfw_sema = MUTEX;
+static DECLARE_MUTEX(mfw_sema);
#ifdef __SMP__
static rwlock_t mfw_lock = RW_LOCK_UNLOCKED;
#endif
--- linux/net/netlink/af_netlink.c.dist-2.3.1pre3 Fri Apr 16 22:17:15 1999
+++ linux/net/netlink/af_netlink.c Wed May 12 17:53:28 1999
@@ -45,7 +45,7 @@

static struct sock *nl_table[MAX_LINKS];
static atomic_t nl_table_lock[MAX_LINKS];
-static struct wait_queue *nl_table_wait;
+static DECLARE_WAIT_QUEUE_HEAD(nl_table_wait);

#ifdef NL_EMULATE_DEV
static struct socket *netlink_kernel[MAX_LINKS];
@@ -331,7 +331,7 @@
struct sock *sk;
int len = skb->len;
int protocol = ssk->protocol;
- struct wait_queue wait = { current, NULL };
+ DECLARE_WAITQUEUE(wait, current);

retry:
for (sk = nl_table[protocol]; sk; sk = sk->next) {
--- linux/drivers/block/md.c.dist-2.3.1pre3 Wed May 12 16:40:43 1999
+++ linux/drivers/block/md.c Wed May 12 17:16:00 1999
@@ -817,7 +817,7 @@
struct md_thread *thread = (struct md_thread *)
kmalloc(sizeof(struct md_thread), GFP_KERNEL);
int ret;
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);

if (!thread) return NULL;

@@ -838,7 +838,7 @@

void md_unregister_thread (struct md_thread *thread)
{
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);

thread->sem = &sem;
thread->run = NULL;
--- linux/drivers/block/nbd.c.dist-2.3.1pre3 Tue Mar 9 21:58:05 1999
+++ linux/drivers/block/nbd.c Wed May 12 17:45:33 1999
@@ -75,7 +75,7 @@
nbdev = &nbd_dev[dev];
nbd_dev[dev].refcnt++;
if (!(nbdev->flags & NBD_INITIALISED)) {
- nbdev->queue_lock = MUTEX;
+ init_MUTEX(&nbdev->queue_lock);
nbdev->flags |= NBD_INITIALISED;
}
MOD_INC_USE_COUNT;
--- linux/drivers/char/joystick/joystick.c.dist-2.3.1pre3 Wed Dec 2 00:05:05 1998
+++ linux/drivers/char/joystick/joystick.c Wed May 12 17:28:34 1999
@@ -491,7 +491,7 @@
static int js_read(struct inode *inode, struct file *file, char *buf, int count)
#endif
{
- struct wait_queue wait = { current, NULL };
+ DECLARE_WAITQUEUE(wait, current);
struct js_event *buff = (void *) buf;
struct js_list *curl;
struct js_dev *jd;
But just when trying to send this (via CSLIP, started from dip(1)),
the kernel crashed. Didn't save the Oops, as it killed init(8) in the
process... Will try again.

Next try: Oops doesn't crash the machine now, points (via wq bug) to
problems with the serial port. Sure enough, there are waitqueues that
aren't set up right in struct async_struct, patch follows:

--- linux/drivers/char/serial.c.dist-2.3.1pre3 Wed May 12 16:40:44 1999
+++ linux/drivers/char/serial.c Wed May 12 19:09:59 1999
@@ -2571,6 +2571,9 @@
return -ENOMEM;
}
memset(info, 0, sizeof(struct async_struct));
+ init_waitqueue_head(&info->open_wait);
+ init_waitqueue_head(&info->close_wait);
+ init_waitqueue_head(&info->delta_msr_wait);
info->magic = SERIAL_MAGIC;
info->port = sstate->port;
info->flags = sstate->flags;
--
Horst von Brand vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile +56 32 672616
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:1.245 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site