Russell King [Thu, 4 Sep 2003 02:43:03 +0000 (19:43 -0700)]
[PATCH] Don't #ifdef prototypes
It seems that changing CONFIG_BLK_DEV_INITRD causes the whole kernel to
rebuild due to an inappropriate ifdef in linux/fs.h - we should not
conditionalise prototypes.
In addition, real_root_dev is only used by two files (kernel/sysctl.c
and init/do_mounts_initrd.c) so it makes even less sense that it was in
linux/fs.h
Andrew Morton [Wed, 3 Sep 2003 18:14:04 +0000 (11:14 -0700)]
[PATCH] hermes.h fails with outw_p() in :?
From: Michael Pruznick <michael_pruznick@mvista.com>
build errors:
hermes.h: In function `hermes_set_irqmask':
hermes.h:337: parse error before "do"
hermes.h:337: parse error before ';' token
hermes.h: In function `hermes_write_words':
In mips, outw_p() is a #define do...while(0) which, in the case of ?:,
results in a statement being used where an expression is required.
Andrew Morton [Wed, 3 Sep 2003 18:13:39 +0000 (11:13 -0700)]
[PATCH] i8042 free_irq() aliasing fix
The same address `i8042_request_irq_cookie' is used in three places for the
i8042 request_irq() argument. This means that if someone calls
i8042_check_mux() or i8042_check_aux() while the IRQ is in use, the
free_irq() call in there will free the wrong IRQ handler.
So give all three instances of request_irq() in i8042.c a distinct address by
which to identify the IRQ instance.
(This is probably a non-bug, because the `check' functions are not called
when the device is open, but it is better this way).
Andrew Morton [Wed, 3 Sep 2003 18:13:22 +0000 (11:13 -0700)]
[PATCH] Enable SELinux via boot parameter
From: James Morris <jmorris@redhat.com>
This patch adds an 'selinux' boot parameter which must be used to actually
enable SELinux.
It follows some internal discussion about deployment issues, where a vendor
would want to ship a single kernel image with SELinux built-in, without
requiring the user to use it.
Without specifying selinux=1 as a boot parameter, SELinux will not register
with LSM and selinuxfs will not be registered as a filesystem. This causes
SELinux to be bypassed entirely from then on, and no performance overhead
is imposed. Other security modules may then also be loaded if needed.
Andrew Morton [Wed, 3 Sep 2003 18:13:12 +0000 (11:13 -0700)]
[PATCH] Remove percpufication of in_flight counter in
From: Ravikiran G Thirumalai <kiran@in.ibm.com>
The routine disk_round_stats showed up considerably under oprofile for high
disk io load (four processes doing dd to the same disk (different
partitions) on a 4 way).
This is because the counter in_flight which is per-cpu right now gets read
every time disk_round_stats gets called. Per cpu counters like disk
statistics improve write speed, but reads are slow (since all cpus' local
counter values have to be read and summed up). Considering the fact that
in_flight counter is modified post disk_round_stats (which reads the
in_flight counter) it is better not to per-cpu this counter.
Following patch does just that. Below is the profile comparison before and
after the change. This was on a 4 way PIII Xeon, 1G ram, 2.6.0-test4-mm2.
Andrew Morton [Wed, 3 Sep 2003 18:13:04 +0000 (11:13 -0700)]
[PATCH] MODULE_ALIAS() in char devices
From: Rusty Russell <rusty@rustcorp.com.au>
Previously, default aliases were hardwired into modutils. Now they should
be inside the modules, using MODULE_ALIAS() (they will be overridden by any
user alias).
Andrew Morton [Wed, 3 Sep 2003 18:12:53 +0000 (11:12 -0700)]
[PATCH] MODULE_ALIAS() in block devices
From: Rusty Russell <rusty@rustcorp.com.au>
Previously, default aliases were hardwired into modutils. Now they should
be inside the modules, using MODULE_ALIAS() (they will be overridden by any
user alias).
Andrew Morton [Wed, 3 Sep 2003 18:12:43 +0000 (11:12 -0700)]
[PATCH] might_sleep() improvements
From: Mitchell Blank Jr <mitch@sfgoth.com>
This patch makes the following improvements to might_sleep():
o Add a "might_sleep_if()" macro for when we might sleep only if some
condition is met. It's a bit tidier, and has an unlikely() in it.
o Add might_sleep checks to skb_share_check() and skb_unshare() which
sometimes need to allocate memory.
o Make all architectures call might_sleep() in both down() and
down_interruptible(). Before only ppc, ppc64, and i386 did this check.
(sh did the check on down() but not down_interruptible())
Andrew Morton [Wed, 3 Sep 2003 18:12:08 +0000 (11:12 -0700)]
[PATCH] elevator insertion fixes
From: Nick Piggin <piggin@cyberone.com.au>
This fixes a bug in deadline and AS that causes insert_here to be ignored on
blk_fs_requests. This has been causing problems with SCSI requeueing code.
It makes elevator insertion more correct as advertised wrt insert_here and
REQ_SOFTBARRIER.
It also fixes a buglet in the as_requeue code where the request wasn't being
put into the front of the list (in rare cases).
Andrew Morton [Wed, 3 Sep 2003 18:11:33 +0000 (11:11 -0700)]
[PATCH] Fix odd code in bio_add_page
From: Neil Brown <neilb@cse.unsw.edu.au>
With the current code in bio_add_page, if fail_segments is ever set, it
stays set, so bio_add_page will eventually fail having recounted the
segmentation once.
I don't think this is intended. This patch changes the code to allow
success if the recounting the segments helps.
Originally from Al Viro
NE11-ltpc
* switched ltpc to dynamic allocation
* ltpc: embedded ->priv
* ltpc: fixed bugs in DMA allocation
* ltpc: fixed resource leaks on failure exits
* ltpc: fixed part of timer bugs (still a-f**ing-plenty of those)
* ltpc: fixed order of freeing bugs
Added
* switch to free_netdev
Now that all the magic chain of static devices is gone from Space.c
The initialization of the one remaining static device (ie the loopback driver)
can be simplified.
One small change was to reduce possibility of failing the initialization if
allocation of private data failed by just going without statistics.
Based on Al viro's NE10-sdla
* switched sdla to dynamic allocation
* sdla: embedded ->priv
* sdla: fixed resource leaks on failure exits
Additionally fixes.
* get rid of cli/sti
* get rid of MOD/INC
Builds and probes, but don't have the hardware.
Driver has never built on 2.6 before this.
This set of patches is a mixture of Al's work to device initialization,
and some of my own to complete it for all the ether, tr, sbni, and loopback
devices.
The first patch adds the hook for converting old driver initialization
code over to dynamic allocation.
This part extracted from Al viro's set of net driver changes for ethertap.
- keep list of arrays for devices and use a lock
- make sure header is contiguous before overlaying data structure
- dynamically allocate dev->priv with alloc_netdev
- get rid of MOD_INC/DEC
- free devices on module unload
- keep refcount on slave device's since holding a ptr
o Big performance improvement. The version of the driver in the kernel
still had a "mdelay(1)" after every register write. This capped
performance at about 8Mbps and ate tons of CPU time. (Luckily, most
users of this card are just terminating a DSL line where its not too
noticeable)
However, after removing this delay the card started getting out of
sync with the driver under stress tests. After a couple days of chasing
the bug I finally determine that the card's support for transmitting
partial PDUs just doesn't quite work as advertised (before we would send
a partial PDU to completely fill a VCC's transmit buffer and then send
the rest of the skb when more buffer space filled up). The usefulness of
this is somewhat doubtful anyway and removing it cleaned up a lot of code.
I also added some memory barriers to make sure operations to the card
happen in the correct order.
Now for the first time ever we get near line-rate performance out of this
card (~19Mb/s TCP in netperf between two ~300Mhz machines)
o Locking changes (essentially the patch Chas sent me a couple weeks ago
with some minor tweaking) I'm still not sure we're getting 100% of the
cases right but it's definitely FAR better than the old lock-less version.
o Cleanup the backlog draining code in lanai_shutdown_tx_vci()
o Remove outdated comment describing how to compile the module
o Got rid of the "service_novcc_[tr]x" stats - it's really the same error
as "service_[tr]x" - there's no reason to count them separately.
o Use the ATM_25_PCR constant instead of computing it for ourselves
Russell King [Wed, 3 Sep 2003 19:19:25 +0000 (20:19 +0100)]
[ARM] Remove more reminants of 26-bit ARM support.
This removes include/asm-arm/proc-armv entirely, merging the
contents into the relevant include files in include/asm-arm.
We also update various files in arch/arm which reference
definitions in the now non-existent directory.
Marc Zyngier [Wed, 3 Sep 2003 09:39:27 +0000 (05:39 -0400)]
[netdrvr de4x5] big modernization / cleanup
The enclosed patch tries to clean the tulip de4x5 driver, and update
it to some of the 2.6 APIs :
- Use PCI and EISA probing APIs
- Use generic DMA API
- Fix DE425 init on the Jensen
- Remove de4x5 from Space.c
It's been tested on x86 and Alpha, with a DE425 (21040, EISA), a DE435
(21040, PCI) and a quad DLink (4*21143, PCI).
The major problem with this patch is that, because of the Space.c
removal, interfaces get potentially renumbered. This has been
discussed to death on lkml, without any obvious solution. IMHO, we'd
better remove as many drivers as we can from Space.c before
2.6.0-final ships...
From Benjamin Herrenschmidt <benh@kernel.crashing.org>:
This adds the Kconfig option for the PowerMac IDE driver "LED" feature
(using the laptop's front LED as a disk activity indicator). It also
adds a small bit to ide-probe.c that was missing from Jens patch when he
added the activity function infrastructure. He did add the hwif field,
but not the code to actually enable it.
Paul Mackerras [Thu, 4 Sep 2003 08:16:47 +0000 (18:16 +1000)]
PPC32: Add support for the PPC 440 family of embedded processors.
This has three main parts: (1) support for the 440GP and 440GX processors,
(2) support for the "Ebony" and "Ocotea" reference boards for those processors,
and (3) support for 64-bit physical addresses. The 440GP and 440GX are "Book E"
processors, and this introduces a CONFIG_BOOKE and some definitions that apply
to all Book E processors.
Having 64-bit physical addresses means that PTEs are now 64 bits. The PTE pages
stay at 4kB, and the pgdir expands to 8kB.
includes these changes from viro
* switched ethertap to dynamic allocation
* ethertap: embedded ->priv
* ethertap: fixed resource leaks on failure exits
and from me
* get it out of the static device list completely.
* add dependency on NETLINK_DEV
* not really obsolete yet
* configurable number of interfaces
David Brownell [Tue, 2 Sep 2003 04:09:09 +0000 (21:09 -0700)]
[PATCH] USB: usb hcd states
AFAICT this is ready for your next merge with Linus.
Ben's ohci stuff was not cooked yet, seemed like the
pm stuff wasn't yet supporting the hook(s) he needed.
RMK had similar issues w.r.t. PM on ARM too.
This patch includes:
- updates from Benjamin Herrenschmidt to make usbcore
behave a bit better during PM suspend (setting and
checking hcd state).
- related updates from me, making more paths into hcds
fail when the driver is suspended.
- updates based on some feedback from Alan Stern,
notably including getting rid of a state we don't
really need (most of the patch, by volume).
- an experiment that tries to give a warning in the
sadly common case of ACPI or APIC (etc) settings
that need to change before USB works.
Net effect is that some of the PM issues start to get
resolved, maybe IRQ problems will be diagnosed quicker,
and some overdue cleanup gets started.
Alan Stern [Tue, 2 Sep 2003 03:49:49 +0000 (20:49 -0700)]
[PATCH] USB: storage: Revised update to isd200 I/O buffer patch
This is a minor revision to the previous patch as83. It changes the name
of the various struct hd_driveid variables from 'drive' to 'id', per
Andries Brouwer's request.
- Don't do DMA into the middle of a structure (info->drive).
- Don't use I/O buffers for two different purposes simultaneously
(info->ATARegs, regs, us->iobuf).
- Rename info->drive to info->id.
Pat LaVarre [Tue, 2 Sep 2003 03:47:33 +0000 (20:47 -0700)]
[PATCH] USB: storage: cbw/csw trace in order
Via this patch ...
We change only when CONFIG_USB_STORAGE_DEBUG=y.
To /proc/kmsg etc. we now trace the fields of
the cbw as we order those fields in ram and as
we order those fields in time on the bus, to
avoid disorientating those of us who view those
canonical orders often.
Also we no longer print "S" or "Sig" to
"Signature", instead we always print "S". We
chose "S" over "Sig" because it is the "T"
signature (aka "Tag") that actually makes each
cbw/csw pair distinct, whereas the so-called
Signatures only distinguish cbw from csw by
flipping one bit.
Also in the trace we uppercase a 'C' and an 'S'
to keep cbw from csw typographically distinct.
For example, what was:
<7>usb-storage: Command INQUIRY (6 bytes)
<7>usb-storage: 12 00 00 00 24 00
<7>usb-storage: Bulk command S 0x43425355 T 0x1f13 Trg 0 LUN 0 L 36 F 128 CL 6
...
<7>usb-storage: Bulk status Sig 0x53425355 T 0x1f13 R 0 Stat 0x0
becomes:
<7>usb-storage: Command INQUIRY (6 bytes)
<7>usb-storage: 12 00 00 00 24 00
<7>usb-storage: Bulk Command S 0x43425355 T 0x1f3b L 36 F 128 Trg 0 LUN 0 CL 6
...
<7>usb-storage: Bulk Status S 0x53425355 T 0x1f3b R 0 Stat 0x0
From Andries Brouwer <aebr@win.tue.nl>: we discard the double
release keypress, but we did it without clearing the "last byte
was E0" flag. So the next byte in the input stream would get
corrupted.
Adrian Bunk [Tue, 2 Sep 2003 02:22:52 +0000 (19:22 -0700)]
[PATCH] Mark more drivers BROKEN{,ON_SMP}
- let more drivers that don't compile depend on BROKEN
- MTD_BLKMTD is fixed, remove the dependency on BROKEN
- let all drivers that don't compile on SMP (due to cli/sti usage)
depend on a BROKEN_ON_SMP that is only defined if !SMP || BROKEN
- #include interrupt.h for dummy cli/sti/... in two files to fix the
UP compilation of these files
I marked only drivers that are broken for a long time and where I don't
know about existing fixes with BROKEN or BROKEN_ON_SMP.
[PATCH] ide: fix ide_unregister() vs. driver model
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This patch seem to have been lost, so here it is again. It fixes an Ooops
on unregistering hwifs due to the device model now having mandatory
release() functions. It also close the possible race we had on release if
the entry was in use (by or /sys typically) by using a semaphore waiting
for the release() to be called after doing an unregister.
As far as I verified this also fixes a bug when doing the
table lookup for IMM_EPP_32, that would result in "Unknown"
as IMM_EPP_32 is equal to 6 and there is the #ifdef...
ChangeSet@1.1386, 2003-09-02 00:11:07-03:00, acme@allegro.kerneljanitors.org
o scsi/*.h: remove not needed #define NULL
ChangeSet@1.1385, 2003-09-02 00:05:16-03:00, acme@allegro.kerneljanitors.org
o scsi/3w-xxx.h: use c99 style init
Rusty Russell [Mon, 1 Sep 2003 21:38:35 +0000 (14:38 -0700)]
[NET]: Use MODULE_ALIAS() in network families.
Previously, default aliases were hardwired into modutils. Now they
should be inside the modules, using MODULE_ALIAS() (they will be overridden
by any user alias).