changeset 508:8188966f0cc5

Revert "cp: the config loading code should not use the schedule()" This reverts commit d463b9c96943cd83c7df8b06b2a72b92b62dfa3a. Which contained a rather hacky workaround for an initialization issue. Since the late init code got moved into a separate task, this is no longer needed. Conflicts: cp/fs/edf.c cp/include/edf.h
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sat, 23 Apr 2011 17:45:26 -0400
parents 354fc5b6cbd9
children e06c429ab0eb
files cp/drivers/dasd.c cp/fs/bdev.c cp/fs/edf.c cp/include/bdev.h cp/include/device.h cp/include/edf.h cp/nucleus/config.c
diffstat 7 files changed, 12 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/cp/drivers/dasd.c	Sat Apr 23 17:43:33 2011 -0400
+++ b/cp/drivers/dasd.c	Sat Apr 23 17:45:26 2011 -0400
@@ -106,7 +106,7 @@
 	return 0;
 }
 
-static int d3390_read(struct device *dev, u8 *buf, int lba, int nosched)
+static int d3390_read(struct device *dev, u8 *buf, int lba)
 {
 	struct io_op ioop;
 	struct ccw ccw[4];
@@ -180,7 +180,7 @@
 	/*
 	 * issue IO
 	 */
-	ret = submit_io(dev, &ioop, nosched ? CAN_LOOP : CAN_SLEEP);
+	ret = submit_io(dev, &ioop, CAN_SLEEP);
 	return ret;
 }
 
--- a/cp/fs/bdev.c	Sat Apr 23 17:43:33 2011 -0400
+++ b/cp/fs/bdev.c	Sat Apr 23 17:45:26 2011 -0400
@@ -8,10 +8,10 @@
 #include <device.h>
 #include <bdev.h>
 
-int bdev_read_block(struct device *dev, void *buf, int lba, int nosched)
+int bdev_read_block(struct device *dev, void *buf, int lba)
 {
 	if (!dev->dev->read)
 		return -EINVAL;
 
-	return dev->dev->read(dev, buf, lba, nosched);
+	return dev->dev->read(dev, buf, lba);
 }
--- a/cp/fs/edf.c	Sat Apr 23 17:43:33 2011 -0400
+++ b/cp/fs/edf.c	Sat Apr 23 17:45:26 2011 -0400
@@ -16,7 +16,7 @@
 static LOCK_CLASS(edf_fs);
 static LOCK_CLASS(edf_file);
 
-struct fs *edf_mount(struct device *dev, int nosched)
+struct fs *edf_mount(struct device *dev)
 {
 	struct page *page;
 	void *tmp;
@@ -33,10 +33,8 @@
 	if (!fs)
 		goto out_free;
 
-	fs->nosched = nosched;
-
 	/* First, read & verify the label */
-	ret = bdev_read_block(dev, tmp, EDF_LABEL_BLOCK_NO, nosched);
+	ret = bdev_read_block(dev, tmp, EDF_LABEL_BLOCK_NO);
 	if (ret)
 		goto out_free;
 
@@ -107,8 +105,7 @@
 	file->buf = page_to_addr(page);
 
 	/* oh well, must do it the hard way ... read from disk */
-	ret = bdev_read_block(fs->dev, fs->tmp_buf, fs->ADT.ADTDOP,
-			      fs->nosched);
+	ret = bdev_read_block(fs->dev, fs->tmp_buf, fs->ADT.ADTDOP);
 	if (ret)
 		goto out_unlock;
 
@@ -160,7 +157,7 @@
 	fop = file->FST.FSTFOP;
 	lrecl = file->FST.FSTLRECL;
 
-	ret = bdev_read_block(fs->dev, file->buf, fop, fs->nosched);
+	ret = bdev_read_block(fs->dev, file->buf, fop);
 	if (ret)
 		goto out;
 
--- a/cp/include/bdev.h	Sat Apr 23 17:43:33 2011 -0400
+++ b/cp/include/bdev.h	Sat Apr 23 17:45:26 2011 -0400
@@ -8,7 +8,6 @@
 #ifndef __BDEV_H
 #define __BDEV_H
 
-extern int bdev_read_block(struct device *dev, void *buf, int lba,
-			   int cansched);
+extern int bdev_read_block(struct device *dev, void *buf, int lba);
 
 #endif
--- a/cp/include/device.h	Sat Apr 23 17:43:33 2011 -0400
+++ b/cp/include/device.h	Sat Apr 23 17:45:26 2011 -0400
@@ -23,7 +23,7 @@
 	int (*snprintf)(struct device *dev, char *buf, int len);
 
 	/* the following ops are for the bdev wrapper layer */
-	int (*read)(struct device *dev, u8 *buf, int len, int nosched);
+	int (*read)(struct device *dev, u8 *buf, int len);
 
 	u16 type;
 	u8 model;
--- a/cp/include/edf.h	Sat Apr 23 17:43:33 2011 -0400
+++ b/cp/include/edf.h	Sat Apr 23 17:45:26 2011 -0400
@@ -90,8 +90,6 @@
 	mutex_t lock;
 	struct device *dev;
 	void *tmp_buf;
-
-	int nosched;
 };
 
 struct file {
@@ -102,7 +100,7 @@
 	char *buf;
 };
 
-extern struct fs *edf_mount(struct device *dev, int nosched);
+extern struct fs *edf_mount(struct device *dev);
 extern struct file *edf_lookup(struct fs *fs, char *fn, char *ft);
 extern int edf_read_rec(struct file *file, char *buf, u32 recno);
 
--- a/cp/nucleus/config.c	Sat Apr 23 17:43:33 2011 -0400
+++ b/cp/nucleus/config.c	Sat Apr 23 17:45:26 2011 -0400
@@ -166,7 +166,7 @@
 		return PTR_ERR(dev);
 
 	/* mount the fs */
-	fs = edf_mount(dev, 1);
+	fs = edf_mount(dev);
 	if (IS_ERR(fs))
 		return PTR_ERR(fs);