Russell King [Fri, 5 Sep 2003 17:28:53 +0000 (18:28 +0100)]
[ARM] Restore preempt count before reporting unbalanced preempt count
On ARM, we oops when we detect that an interrupt handler has unbalanced
the preempt count. We should restore the preempt count when we started
to handle the interrupt and then cause the oops.
James Bottomley [Thu, 4 Sep 2003 03:13:28 +0000 (20:13 -0700)]
[PATCH] fix remap of shared read only mappings
When mmap MAP_SHARED is done on a file, it gets marked with VM_MAYSHARE
and, if it's read/write, VM_SHARED. However, if it is remapped with
mremap(), the MAP_SHARED is only passed into the new mapping based on
VM_SHARED. This means that remapped read only MAP_SHARED mappings lose
VM_MAYSHARE. This is causing us a problem on parisc because we have to
align all shared mappings carefully to mitigate cache aliasing problems.
The fix is to key passing the MAP_SHARED flag back into the remapped are
off VM_MAYSHARE not VM_SHARED.
[PATCH] ide: remove supports_dma field from ide_driver_t
driver->supports_dma was used together with CONFIG_IDEDMA_ONLYDISK to limit
DMA access to disk devices only. However Alan introduced new scheme in 2.5.63
and this field is not needed any longer because all ide drivers support DMA.
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
Matthew Wilcox [Wed, 3 Sep 2003 12:34:05 +0000 (07:34 -0500)]
[PATCH] sym2 patchset
A big pile of sym2-related changes. I have most of them split apart in
CVS, so I can submit them as individual patches if anyone's interested.
Changelog:
- Use pci_set_mwi() instead of trying to do it ourselves.
- Rename PCI_ID_LSI53C1010 to 1010_33 and PCI_ID_LSI53C1010_2 to 1010_66.
- Turn sym_udelay and sym_mdelay into macros.
- Move the definition of sym53c8xx_lock near the functions that call it
and remove the macros that wrapper it.
- SYM_LINUX_DYNAMIC_DMA_MAPPING is always defined. (Christoph Hellwig)
- Remove first_host (Christoph Hellwig)
- Support for hp C3000 (Grant Grundler)
- Switch to using pci_name()
- Remove the #if 0'd code from the pci_driver conversion.
- Remove the sym_chip typedef.
- Remove the pcifix option.
- Remove a redundant printk on driver initialisation.
- Use rmb() for __READ_BARRIER and wmb() for __WRITE_BARRIER
- Increment the version to 2.1.17a.
David Jeffery [Wed, 3 Sep 2003 12:18:58 +0000 (07:18 -0500)]
[PATCH] ips: remove arch limitations
This patch removes the X86 arch limitation in drivers/scsi/Kconfig,
downgrades the #error check for x86/x86_64/ia64 to a #warning, and
updates an old email address in the help.
It also fixes up a two places in the driver which have 8 spaces instead
of a tab for indention.
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