Russell King [Sun, 27 Apr 2003 21:28:25 +0000 (22:28 +0100)]
[ARM] Clean up ARM cache handling interfaces (part 1)
This starts to move the ARM cache handling interface towards a
purpose-defined rather than functionality-defined interface.
This is necessary so we are able to support a wide range of ARM
CPUs.
Russell King [Sun, 27 Apr 2003 18:51:24 +0000 (19:51 +0100)]
[ARM] Inline PMD entry cache handling
The common case is building a kernel for one CPU type, and we are
able to allow GCC to optimise any the PMD entry cache handling
assembly which will never be used.
Russell King [Sun, 27 Apr 2003 17:36:49 +0000 (18:36 +0100)]
[ARM] Provide more early command line parsing.
We need to parse the command line arguments not only for the memory
parameters, but also CPU cache policies. Rather than extending the
early parsing in arch/arm/kernel/setup.c, we make this a generic
feature. The parameters and their parsing function can now be
placed along side the code which makes use of the parsed information.
Michael Hunold [Thu, 24 Apr 2003 17:19:18 +0000 (10:19 -0700)]
[PATCH] Fix mxb.c stack usage
This does the following:
- make initialization data for helper chipsets (saa7111 and saa7740)
static and with file scope
Additionally fixes:
- don't use irq driven i2c transfer when saa7740 is present (this screws
up the i2c bus and may hang the computer)
- add MODULE_DEVICE_TABLE to allow /sbin/hotplug to handle the device
Bart did this patch, I changed it a bit. Basically it cleans the mapping
interface up a bit, and adds a little helper to set up the request from
the bio.
In addition, it fixes a long standing bug where bio_map_user() would
call blk_queue_bounce() without the direction bit being set, auch.
- Abstract out bio request preparation
- Have bio_map_user() set data direction (fixes bug where blk_queue_bounce()
is called without it set)
- Split bio_map_user() in two
Alexander Viro [Thu, 24 Apr 2003 15:39:15 +0000 (08:39 -0700)]
[PATCH] ppc boot device selection cleanup
PPC logics for choice of default boot device number switched to
dev_t. Rationale: it belongs to userland; we notice partitions with
certain properties and choose one of them as the best candidate for
being a root fs; then we put the resulting device number into ROOT_DEV,
which has only one use - it's passed to mknod(2) to create a device node
on rootfs and allow mount(2) get us the final root.
IOW, all that code has nothing whatsoever with kernel internals
of any description - the value we are generating will be passed to
mknod(2) anyway. Switched to dev_t.
Note: that code should eventually be moved to early userland.
* bogus calls of invalidate_buffers() gone from floppy_open()
* invalidate_buffers() killed.
* new helper - __invalidate_device(bdev, do_sync). invalidate_device()
is calling it.
* fixed races between floppy_open()/floppy_open and
floppy_open()/set_geometry():
a) floppy_open()/floppy_release() is done under a semaphore. That
closes the races between simultaneous open() on /dev/fd0foo and /dev/fd0bar.
b) pointer to struct block_device is kept as long as floppy is
opened (per-drive, non-NULL when number of openers is non-zero, does not
contribute to block_device refcount).
c) set_geometry() grabs the same semaphore and invalidates the
devices directly instead of messing with setting fake "it had changed"
and calling __check_disk_change().
Alexander Viro [Thu, 24 Apr 2003 15:38:58 +0000 (08:38 -0700)]
[PATCH] capifs cleanup
capifs switched to ramfs-style tree and cleaned up; it's the same
changes that had been done its prototype (devpts) + stuff needed to
deal with unload (devpts is non-modular and always internally mounted).
Alexander Viro [Thu, 24 Apr 2003 15:38:50 +0000 (08:38 -0700)]
[PATCH] fbdev cleanup
fbdev.node converted from kdev_t to int - all of its users
have register_framebuffer() which sets .node to mk_kdev(FB_MAJOR, index)
already called and all of them start with applying minor(). IOW, what
they actually want is framebuffer number.
* type of ->node changed to int
* register_framebuffer() sets it to index instead of mk_kdev(...)
* users converted from minor(foo.node) to foo.node
* useless assignments (typically to NODEV) removed - we never
look at that field before register_framebuffer() overwrites it and thus
any assignments prior to register_framebuffer() call are dead code.
Alexander Viro [Thu, 24 Apr 2003 15:38:39 +0000 (08:38 -0700)]
[PATCH] console cleanup (2/2)
Console drivers cleanup. In current tree interaction between
console and tty layer sits in the ->device() method of struct console.
It takes a pointer to console and returns device number of its tty
device. open(2) on /dev/console goes through the list of registered
consoles, picks the first one that has ->device() and remaps the device
number to console->device(console). Then it proceeds with normal
opening of tty. This is the only caller of ->device().
Cleanup: let ->device() return a pair (pointer to tty_driver, index
of tty in question) instead of device number. Note that
a) the first thing tty_open() does with remapped device number is
conversion to such pair.
b) console driver _knows_ which tty_driver we want - one that
implements tty interface to the same physical device (i.e. the part of
the same driver).
c) current code expects the result of ->device() to be a device
number of tty device - anything else is immediate -ENODEV from tty_open();
might as well have NULL ->device in that driver.
Console drivers converted, (the only) caller updated.
Return an error code instead of a devfs_handle_t. The handle isn't
useful for anything and the !CONFIG_DEVFS_FS stub in fact returned
NULL which made it entirely useless. Thus only one driver is actually
checking the retval in the current tree..
Alexander Viro [Wed, 23 Apr 2003 11:19:54 +0000 (04:19 -0700)]
[PATCH] tty cleanups (12/12)
* we allow tty_driver to cover more than 256 devices
* pty.c cleaned up - now we only one driver for UNIX98 masters and
only one driver for UNIX98 slaves, so a lot of ugliness can be killed.
* get_tty_driver() became an analog of get_gendisk() - it does
a lookup by device number and gives (pointer to tty_driver,index).
* registration/unregistration of tty_driver updated
* /proc/tty/drivers code updated (now one structure can be responsible
for several lines)
Alexander Viro [Wed, 23 Apr 2003 11:19:46 +0000 (04:19 -0700)]
[PATCH] tty cleanups (11/12)
tty->device switched to dev_t
There are very few uses of tty->device left by now; most of
them actually want dev_t (process accounting, proc/<pid>/stat, several
ioctls, slip.c logics, etc.) and the rest will go away shortly.
Alexander Viro [Wed, 23 Apr 2003 11:19:36 +0000 (04:19 -0700)]
[PATCH] tty cleanups (10/12)
Preparations to cleanup:
* call of get_tty_driver() moved from init_dev() to its callers
* instead of kdev_t dev we pass struct tty_struct *driver and int index
Alexander Viro [Wed, 23 Apr 2003 11:19:27 +0000 (04:19 -0700)]
[PATCH] tty cleanups (9/12)
* drivers/char/rio/* supports up to 4 boards, each with up to 128
lines. It used to share termios for 1st/3rd and 2nd/4th boards, Fixed.
* cleanups and kdev_t removals - we pass tty instead of tty->device
in a couple of helper functions and instead of comparisons on major(tty->device)
we check where does tty->driver point to.
Alexander Viro [Wed, 23 Apr 2003 11:18:59 +0000 (04:18 -0700)]
[PATCH] tty cleanups (6/12)
tty->tty_index added; we initialize it with minor(tty->device) -
tty->driver->minor_start. Majority of remaining tty->device uses had
that form and are switched to use of tty->index.
Alexander Viro [Wed, 23 Apr 2003 11:18:48 +0000 (04:18 -0700)]
[PATCH] tty cleanups (5/12)
new field - tty->tty_name;
initialized to <driver->name><tty index+driver->base_name>
when we allocate tty_struct. Drivers code switched to use of that
beast (in debugging printks, mostly). Large, but trivial.
Alexander Viro [Wed, 23 Apr 2003 11:18:37 +0000 (04:18 -0700)]
[PATCH] tty cleanups (4/12)
Instead of registering "drivers" for /dev/tty, /dev/vc/0, /dev/ptmx
and /dev/console (they are never looked up since tty_open() special-cases
them and they should not be looked up - these devices are remapped on open)
we register corresponding chrdev ranges and devfs nodes directly.
/proc/tty/drivers code updated to keep the contents unchanged
Ben Collins [Wed, 23 Apr 2003 10:50:15 +0000 (03:50 -0700)]
[PATCH] IEEE1394/Firewire updates
- Workaround possible reset loop trying to get IRM sanity
- Logical Unit DIrectory (LUN) support for sbp2(scsi) devices.
- Fix hostnum allocation.
- Whitespace and formatting sync with 2.4 branch.
- Make pcilynx return IRQ_NONE for no interrupts to handle.