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.
Russell King [Wed, 23 Apr 2003 23:04:13 +0000 (00:04 +0100)]
[PCMCIA] Make cb_release_cis_mem() local to cardbus.c
The cardbus CIS parsing code does not use the PCMCIA resource
subsystem, so there isn't any point in freeing its memory when
we remove PCMCIA memory resources. We also free CIS resources
immediately prior to calling cb_free(). We might as well move
the function call into cb_free(), thereby making all references
to cb_release_cis_mem() local to cardbus.c
Russell King [Wed, 23 Apr 2003 22:18:16 +0000 (23:18 +0100)]
[PCMCIA] Don't cache CIS bytes found to be invalid.
Several PCMCIA cards I have here do not work correctly over a
suspend/resume cycle; the PCMCIA code believes that the card has
been changed in the slot, and therefore performs a remove/insert
cycle.
This seems to be because the card returns more or less random data
when reading memory space, leading to the CIS cache mismatching
the card data. This in turn is caused because we try to read CIS
data from both the attribute and memory spaces, and we add the result
to the CIS cache whether or not the returned data was valid.
We therefore convert the CIS cache to use a linked list, and provide
a way to remove cached data from that list. We also replace the
"s->cis_used=0;" construct with a function "destroy_cis_cache(s)"
which clearly describes what we're doing.
Pavel Roskin [Wed, 23 Apr 2003 21:59:33 +0000 (22:59 +0100)]
[PCMCIA] Fix oops in validate_mem when CONFIG_PCMCIA_PROBE=n
If I compile a recent 2.5.x kernel without CONFIG_ISA defined, I get
an oops in validate_mem(). Stack trace contains 0x6b6b6b6 - a clear
sign that freed memory is being accessed.
It's the second validate_mem() in drivers/pcmcia/rsrc_mgr.c - the one
used when CONFIG_PCMCIA_PROBE is not defined. It turns out the memory
is freed in do_mem_probe() when it's called from validate_mem().
The solution is to use the same trick as in the first validate_mem().
This problem is quite serious and it's not specific to the plx9052
driver. I see it with yenta_socket as well.
I had to move the rtnetlink_init and init_netlink calls to af_netlink init time, so that
the sk_alloc called down the rtnetlink_init callchain is done after the PF_NETLINK
net_proto_family is sock_registered, and because of that the af_netlink init function
call had to be moved to earlier by means of subsys_initcall (DaveM's suggestion).
This fixes a problem with drivers that have request on the stack for
some operations, like IDE. If we wake before releasing the request, the
stack may have already disappeared beneath us when the rest of
end_that_request_last() is run.
Eli Carter [Mon, 21 Apr 2003 18:31:47 +0000 (19:31 +0100)]
[ARM PATCH] 1511/1: iop321 #define cleanup
Patch from Eli Carter
# Mon Apr 21 11:20:06 CDT 2003 ejc@rnd-linux-c84
# pci-io-mem-size-defines
#
# Rename the IOP321_PCI_WINDOW_SIZE #defines to use
# IOP321_PCI_{IO,MEM}_{BASE,SIZE} instead. This makes the #defines a bit more
# consistent. No functional change, though it does bring up the question of
# whether res[].end should be BASE+SIZE-1 or BASE+SIZE.
#
# Diffed against linux-2.5.67-rmk1+1501-3+1506+1508-10
#
# arch/arm/mach-iop3xx/iop321-pci.c | 8 ++++----
# include/asm-arm/arch-iop3xx/iop321.h | 10 ++++------
# 2 files changed, 8 insertions(+), 10 deletions(-)
#
This implements automatic code patching of memory barriers based
on the CPU capabilities. Normally lock ; addl $0,(%esp) barriers
are used, but these are a bit slow on the Pentium 4.
Linus proposed this a few weeks ago after the support for SSE1/SSE2
barriers was introduced. I now got around to implement it.
The main advantage is that it allows distributors to ship less binary
kernels but still get fast kernels. In particular it avoids the
need of a special Pentium 4 kernel.
The patching code is quite generic and could be used to patch
other instructions (like prefetches or specific other critical
instructions) too.
Thanks to Rusty's in kernel loader it also works seamlessly for modules.
The patching is done before other CPUs start to avoid potential
erratas with self modifying code on SMP systems. It makes no
attempt to automatically handle assymetric systems (an secondary
CPU having less capabilities than the boot CPU). In this
case just boot with "noreplacement"
Andrew Morton [Mon, 21 Apr 2003 09:23:10 +0000 (02:23 -0700)]
[PATCH] More careful about VMA merging
The VMA merging code can merge vmas which have a ->vm_ops->close() handler.
But this means that per-VMA resources in one of the merged VMAs will not be
freed.
Fix that up by just refusing to merge any VMA's which look "complex": they
have special flags set or they have a ->close handler.
Robert Love [Mon, 21 Apr 2003 06:24:30 +0000 (23:24 -0700)]
[PATCH] trivial task_prio() fix
Here is a trivial fix for task_prio() in the case MAX_RT_PRIO !=
MAX_USER_RT_PRIO. In this case, all priorities are skewed by
(MAX_RT_PRIO - MAX_USER_RT_PRIO).
The fix is to subtract the full MAX_RT_PRIO value from p->prio, not just
MAX_USER_RT_PRIO. This makes sense, as the full priority range is
unrelated to the maximum user value. Only the real maximum RT value
matters.
This has been in Andrew's tree for awhile, with no issue. Also, Ingo
acked it.
Allow gcc to generate better code for irq handling.
Ok, now that most drivers have been converted to the new
irqreturn_t, we can remove the fascist type-checks and just
use a regular integer type which has a simpler calling
convention.
Ben Collins [Mon, 21 Apr 2003 04:28:14 +0000 (21:28 -0700)]
[PATCH] 1394 updates
- New irq handler prototypes.
- Lots of un-enumurated locking fixes/cleanups (thanks in large part to
spinlock debug compile options in the kernel).
- Other various trivial fixes.
Andrew Morton [Mon, 21 Apr 2003 03:20:32 +0000 (20:20 -0700)]
[PATCH] irqs: multimedia drivers
Update a couple of media drivers to the new IRQ API.
Some stuff in there doesn't link btw:
drivers/built-in.o: In function `rds_waitread':
drivers/built-in.o(.text+0x6c152): undefined reference to `aci_port'
drivers/built-in.o: In function `rds_rawwrite':
drivers/built-in.o(.text+0x6c1a3): undefined reference to `aci_port'