Commit de0e0ad9 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.4.0-test2pre7

parent eea87ac9
This diff is collapsed.
......@@ -1533,3 +1533,38 @@ Work sponsored by SGI
- Updated Documentation/filesystems/devfs/README
- Updated sample modules.conf
===============================================================================
Changes for patch v168
Work sponsored by SGI
- Disabled multi-mount capability (use VFS bindings instead)
- Updated README from master HTML file
===============================================================================
Changes for patch v169
Work sponsored by SGI
- Removed multi-mount code
- Removed compatibility macros: VFS has changed too much
===============================================================================
Changes for patch v170
Work sponsored by SGI
- Updated README from master HTML file
- Merged devfs inode into devfs entry
===============================================================================
Changes for patch v171
Work sponsored by SGI
- Updated sample modules.conf
- Removed dead code in <devfs_register> which used to call
<free_dentries>
- Ported to kernel 2.4.0-test2-pre3
......@@ -3,7 +3,7 @@ Devfs (Device File System) FAQ
Linux Devfs (Device File System) FAQ
Richard Gooch
1-MAY-2000
14-JUN-2000
-----------------------------------------------------------------------------
......@@ -797,13 +797,15 @@ which must exist *before* init starts. Once again, you need to
mount devfs and then create the named pipe *before* init
starts.
The default behaviour now is not to mount devfs onto /dev at boot time.
You can correct this with the "devfs=mount" boot option. This solves
any problems with init, and also prevents the dreaded:
The default behaviour now is not to mount devfs onto /dev at boot time
for 2.3.x and later kernels. You can correct this with the
"devfs=mount" boot option. This solves any problems with init,
and also prevents the dreaded:
Cannot open initial console
message.
message. For 2.2.x kernels where you need to apply the devfs patch,
the default is to mount.
If you have automatic mounting of devfs onto /dev then you may need to
create /dev/initctl in your boot scripts. The following lines should
......@@ -1460,9 +1462,19 @@ Other resources
Douglas Gilbert has written a useful document at
http://www.torque.net/sg/devfs_scsi.html which
explores the SCSI subsystem and how it interacts with devfs.
explores the SCSI subsystem and how it interacts with devfs
Douglas Gilbert has written another useful document at
http://www.torque.net/scsi/scsihosts.html which
discusses the scsihosts= boot option
Douglas Gilbert has written yet another useful document at
http://www.torque.net/scsi/linux_scsi_24 which
discusses the Linux SCSI subsystem in 2.4.
# Sample entries for /etc/modules.conf for devfs
###############################################################################
# Configuration section: change to suit
# Configuration section: change to suit your hardware
#
alias /dev/sound sb
alias /dev/v4l bttv
......
This diff is collapsed.
This diff is collapsed.
......@@ -36,8 +36,6 @@ fi
dep_tristate 'Compaq SMART2 support' CONFIG_BLK_CPQ_DA $CONFIG_PCI
dep_tristate 'Mylex DAC960/DAC1100 PCI RAID Controller support' CONFIG_BLK_DEV_DAC960 $CONFIG_PCI
comment 'Additional Block Devices'
tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
......@@ -49,14 +47,16 @@ fi
bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD
dep_tristate ' Linear (append) mode' CONFIG_MD_LINEAR $CONFIG_BLK_DEV_MD
dep_tristate ' RAID-0 (striping) mode' CONFIG_MD_RAID0 $CONFIG_BLK_DEV_MD
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool ' RAID-1/RAID-5 code (DANGEROUS)' CONFIG_RAID15_DANGEROUS
if [ "$CONFIG_RAID15_DANGEROUS" = "y" ]; then
dep_tristate ' RAID-1 (mirroring) mode' CONFIG_MD_RAID1 $CONFIG_BLK_DEV_MD
dep_tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5 $CONFIG_BLK_DEV_MD
fi
dep_tristate ' RAID-1 (mirroring) mode' CONFIG_MD_RAID1 $CONFIG_BLK_DEV_MD
dep_tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5 $CONFIG_BLK_DEV_MD
if [ "$CONFIG_MD_LINEAR" = "y" -o "$CONFIG_MD_RAID0" = "y" -o "$CONFIG_MD_RAID1" = "y" -o "$CONFIG_MD_RAID5" = "y" ]; then
bool ' Boot support' CONFIG_MD_BOOT
bool ' Auto Detect support' CONFIG_AUTODETECT_RAID
fi
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
int ' Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
fi
dep_bool ' Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
endmenu
......@@ -148,7 +148,7 @@ static int linear_make_request (request_queue_t *q, mddev_t *mddev,
return -1;
}
bh->b_rdev = tmp_dev->dev;
bh->b_rsector = (block - tmp_dev->offset) << 1;
bh->b_rsector = ((block - tmp_dev->offset) << 1) + (bh->b_rsector & 1);
return 1;
}
......@@ -183,17 +183,11 @@ static int linear_status (char *page, mddev_t *mddev)
static mdk_personality_t linear_personality=
{
"linear",
linear_make_request,
NULL,
linear_run,
linear_stop,
linear_status,
0,
NULL,
NULL,
NULL,
NULL
name: "linear",
make_request: linear_make_request,
run: linear_run,
stop: linear_stop,
status: linear_status,
};
#ifndef MODULE
......
......@@ -238,7 +238,8 @@ static int lo_read_actor(read_descriptor_t * desc, struct page *page, unsigned l
kaddr = (char*)kmap(page);
if ((lo->transfer)(lo,READ,kaddr+offset,p->data,size,IV)) {
size = 0;
printk(KERN_ERR "loop: transfer error block %ld\n",page->index);
printk(KERN_ERR "loop: transfer error block %ld\n",
page->index);
desc->error = -EINVAL;
}
kunmap(page);
......@@ -345,9 +346,11 @@ static void do_lo_request(request_queue_t * q)
}
}
if ((lo->transfer)(lo, current_request->cmd, bh->b_data + offset,
dest_addr, size, block)) {
printk(KERN_ERR "loop: transfer error block %d\n", block);
if ((lo->transfer)(lo, current_request->cmd,
bh->b_data + offset,
dest_addr, size, block)) {
printk(KERN_ERR "loop: transfer error block %d\n",
block);
brelse(bh);
goto error_out_lock;
}
......@@ -469,7 +472,7 @@ static int loop_set_fd(struct loop_device *lo, kdev_t dev, unsigned int arg)
lo->lo_backing_file->f_owner = file->f_owner;
lo->lo_backing_file->f_dentry = file->f_dentry;
lo->lo_backing_file->f_vfsmnt = mntget(file->f_vfsmnt);
lo->lo_backing_file->f_op = file->f_op;
lo->lo_backing_file->f_op = fops_get(file->f_op);
lo->lo_backing_file->private_data = file->private_data;
file_moveto(lo->lo_backing_file, file);
......@@ -539,8 +542,10 @@ static int loop_clr_fd(struct loop_device *lo, kdev_t dev)
lo->lo_dentry = NULL;
if (lo->lo_backing_file != NULL) {
put_write_access(lo->lo_backing_file->f_dentry->d_inode);
fput(lo->lo_backing_file);
struct file *filp = lo->lo_backing_file;
if ((filp->f_mode & FMODE_WRITE) == 0)
put_write_access(filp->f_dentry->d_inode);
fput(filp);
lo->lo_backing_file = NULL;
} else {
dput(dentry);
......@@ -636,7 +641,8 @@ static int lo_ioctl(struct inode * inode, struct file * file,
if (!inode)
return -EINVAL;
if (MAJOR(inode->i_rdev) != MAJOR_NR) {
printk(KERN_WARNING "lo_ioctl: pseudo-major != %d\n", MAJOR_NR);
printk(KERN_WARNING "lo_ioctl: pseudo-major != %d\n",
MAJOR_NR);
return -ENODEV;
}
dev = MINOR(inode->i_rdev);
......@@ -698,7 +704,8 @@ static int lo_release(struct inode *inode, struct file *file)
if (!inode)
return 0;
if (MAJOR(inode->i_rdev) != MAJOR_NR) {
printk(KERN_WARNING "lo_release: pseudo-major != %d\n", MAJOR_NR);
printk(KERN_WARNING "lo_release: pseudo-major != %d\n",
MAJOR_NR);
return 0;
}
dev = MINOR(inode->i_rdev);
......@@ -706,7 +713,8 @@ static int lo_release(struct inode *inode, struct file *file)
return 0;
lo = &loop_dev[dev];
if (lo->lo_refcnt <= 0)
printk(KERN_ERR "lo_release: refcount(%d) <= 0\n", lo->lo_refcnt);
printk(KERN_ERR "lo_release: refcount(%d) <= 0\n",
lo->lo_refcnt);
else {
int type = lo->lo_encrypt_type;
--lo->lo_refcnt;
......@@ -761,6 +769,10 @@ int loop_unregister_transfer(int number)
EXPORT_SYMBOL(loop_register_transfer);
EXPORT_SYMBOL(loop_unregister_transfer);
static void no_plug_device(request_queue_t *q, kdev_t device)
{
}
int __init loop_init(void)
{
int i;
......@@ -806,6 +818,7 @@ int __init loop_init(void)
}
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
blk_queue_pluggable(BLK_DEFAULT_QUEUE(MAJOR_NR), no_plug_device);
blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0);
for (i=0; i < max_loop; i++) {
memset(&loop_dev[i], 0, sizeof(struct loop_device));
......@@ -828,6 +841,7 @@ void cleanup_module(void)
if (devfs_unregister_blkdev(MAJOR_NR, "loop") != 0)
printk(KERN_WARNING "loop: cannot unregister blkdev\n");
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
kfree (loop_dev);
kfree (loop_sizes);
kfree (loop_blksizes);
......
This diff is collapsed.
......@@ -325,17 +325,11 @@ static int raid0_status (char *page, mddev_t *mddev)
static mdk_personality_t raid0_personality=
{
"raid0",
raid0_make_request,
NULL, /* no special end_request */
raid0_run,
raid0_stop,
raid0_status,
0,
NULL, /* no error_handler */
NULL, /* no diskop */
NULL, /* no stop resync */
NULL /* no restart resync */
name: "raid0",
make_request: raid0_make_request,
run: raid0_run,
stop: raid0_stop,
status: raid0_status,
};
#ifndef MODULE
......
This diff is collapsed.
This diff is collapsed.
......@@ -693,6 +693,9 @@ static void __init rd_load_image(kdev_t device, int offset, int unit)
iput(inode);
}
#ifdef CONFIG_MAC_FLOPPY
int swim3_fd_eject(int devnum);
#endif
static void __init rd_load_disk(int n)
{
......@@ -713,6 +716,12 @@ static void __init rd_load_disk(int n)
if (rd_prompt) {
#ifdef CONFIG_BLK_DEV_FD
floppy_eject();
#endif
#ifdef CONFIG_MAC_FLOPPY
if(MAJOR(ROOT_DEV) == FLOPPY_MAJOR)
swim3_fd_eject(MINOR(ROOT_DEV));
else if(MAJOR(real_root_dev) == FLOPPY_MAJOR)
swim3_fd_eject(MINOR(real_root_dev));
#endif
printk(KERN_NOTICE
"VFS: Insert root floppy disk to be loaded into RAM disk and press ENTER\n");
......
......@@ -1814,7 +1814,7 @@ static inline void pick_fastest_function(void)
fastest = f;
}
#ifdef CONFIG_X86_XMM
if (boot_cpu_data.mmu_cr4_features & X86_CR4_OSXMMEXCPT) {
if (cpu_has_xmm) {
fastest = &t_xor_block_pIII_kni;
}
#endif
......@@ -1849,7 +1849,7 @@ void calibrate_xor_block(void)
#endif
#ifdef CONFIG_X86_XMM
if (boot_cpu_data.mmu_cr4_features & X86_CR4_OSXMMEXCPT) {
if (cpu_has_xmm) {
printk(KERN_INFO
"raid5: KNI detected, trying cache-avoiding KNI checksum routine\n");
/* we force the use of the KNI xor block because it
......@@ -1892,4 +1892,3 @@ void calibrate_xor_block(void)
#endif /* __sparc_v9__ */
MD_EXPORT_SYMBOL(xor_block);
......@@ -110,8 +110,7 @@ void busmouse_add_movementbuttons(int mousedev, int dx, int dy, int buttons)
if (changed) {
wake_up(&mse->wait);
if (mse->fasyncptr)
kill_fasync(mse->fasyncptr, SIGIO, POLL_IN);
kill_fasync(&mse->fasyncptr, SIGIO, POLL_IN);
}
}
......
......@@ -39,6 +39,17 @@ else
endif
endif
ifeq ($(CONFIG_DRM_FFB),y)
OX_OBJS += ffb_drv.o
O_OBJS += ffb_context.o
else
ifeq ($(CONFIG_DRM_FFB),m)
MIX_OBJC += ffb_drv.o
MI_OBJS += ffb_context.o
M_OBJS += ffb.o
endif
endif
O_OBJS += $(L_OBJS)
include $(TOPDIR)/Rules.make
......@@ -48,3 +59,6 @@ gamma.o : gamma_drv.o gamma_dma.o $(L_OBJS)
tdfx.o: tdfx_drv.o tdfx_context.o $(L_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o $(L_OBJS)
ffb.o: ffb_drv.o ffb_context.o $(L_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ ffb_drv.o ffb_context.o $(L_OBJS)
......@@ -72,11 +72,13 @@ int drm_addmap(struct inode *inode, struct file *filp, unsigned int cmd,
switch (map->type) {
case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER:
#ifndef __sparc__
if (map->offset + map->size < map->offset
|| map->offset < virt_to_phys(high_memory)) {
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
return -EINVAL;
}
#endif
#ifdef CONFIG_MTRR
if (map->type == _DRM_FRAME_BUFFER
|| (map->flags & _DRM_WRITE_COMBINING)) {
......@@ -478,8 +480,10 @@ int drm_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd,
-EFAULT);
if (request.count >= dma->buf_count) {
down(&current->mm->mmap_sem);
virtual = do_mmap(filp, 0, dma->byte_count,
PROT_READ|PROT_WRITE, MAP_SHARED, 0);
up(&current->mm->mmap_sem);
if (virtual > -1024UL) {
/* Real error */
retcode = (signed long)virtual;
......
......@@ -433,9 +433,9 @@ typedef struct drm_device {
/* Context support */
int irq; /* Interrupt used by board */
__volatile__ int context_flag; /* Context swapping flag */
__volatile__ int interrupt_flag;/* Interruption handler flag */
__volatile__ int dma_flag; /* DMA dispatch flag */
__volatile__ long context_flag; /* Context swapping flag */
__volatile__ long interrupt_flag;/* Interruption handler flag */
__volatile__ long dma_flag; /* DMA dispatch flag */
struct timer_list timer; /* Timer for delaying ctx switch */
wait_queue_head_t context_wait; /* Processes waiting on ctx switch */
int last_checked; /* Last context checked for DMA */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -92,7 +92,8 @@ int drm_release(struct inode *inode, struct file *filp)
DRM_DEBUG("pid = %d, device = 0x%x, open_count = %d\n",
current->pid, dev->device, dev->open_count);
if (_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
if (dev->lock.hw_lock != NULL
&& _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
&& dev->lock.pid == current->pid) {
DRM_ERROR("Process %d dead, freeing lock for context %d\n",
current->pid,
......@@ -216,7 +217,7 @@ int drm_write_string(drm_device_t *dev, const char *s)
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO);
#else
/* Parameter added in 2.3.21 */
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN);
kill_fasync(&dev->buf_async, SIGIO, POLL_IN);
#endif
DRM_DEBUG("waking\n");
wake_up_interruptible(&dev->buf_readers);
......
......@@ -103,6 +103,10 @@ int drm_cpu_valid(void)
{
#if defined(__i386__)
if (boot_cpu_data.x86 == 3) return 0; /* No cmpxchg on a 386 */
#endif
#if defined(__sparc__) && !defined(__sparc_v9__)
if (1)
return 0; /* No cmpxchg before v9 sparc. */
#endif
return 1;
}
......@@ -512,9 +512,9 @@ static int _drm_histo_info(char *buf, char **start, off_t offset, int len,
} else {
DRM_PROC_PRINT("lock none\n");
}
DRM_PROC_PRINT("context_flag 0x%08x\n", dev->context_flag);
DRM_PROC_PRINT("interrupt_flag 0x%08x\n", dev->interrupt_flag);
DRM_PROC_PRINT("dma_flag 0x%08x\n", dev->dma_flag);
DRM_PROC_PRINT("context_flag 0x%08lx\n", dev->context_flag);
DRM_PROC_PRINT("interrupt_flag 0x%08lx\n", dev->interrupt_flag);
DRM_PROC_PRINT("dma_flag 0x%08lx\n", dev->dma_flag);
DRM_PROC_PRINT("queue_count %10d\n", dev->queue_count);
DRM_PROC_PRINT("last_context %10d\n", dev->last_context);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -18,7 +18,6 @@
#include <linux/mman.h>
#include <linux/random.h>
#include <linux/init.h>
#include <linux/joystick.h>
#include <linux/raw.h>
#include <linux/capability.h>
......@@ -652,13 +651,6 @@ int __init chr_dev_init(void)
#ifdef CONFIG_SPARCAUDIO
sparcaudio_init();
#endif
#ifdef CONFIG_JOYSTICK
/*
* Some joysticks only appear when the sound card they are
* connected to is configured. Keep the sound/joystick ordering.
*/
js_init();
#endif
#if CONFIG_QIC02_TAPE
qic02_tape_init();
#endif
......
......@@ -663,7 +663,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty,
#if LINUX_VERSION_CODE < VERSION(2,3,0)
kill_fasync (n_hdlc->tty->fasync, SIGIO);
#else
kill_fasync (n_hdlc->tty->fasync, SIGIO, POLL_IN);
kill_fasync(&n_hdlc->tty->fasync, SIGIO, POLL_IN);
#endif
} /* end of n_hdlc_tty_receive() */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment