Robert Love [Mon, 13 Jan 2003 01:38:50 +0000 (17:38 -0800)]
[PATCH] P4-based Celeron comments
As you mentioned, we do not correctly identify the P4-based Celeron in
the kernel configuration help. Unfortunately, Intel has called all
Celeron products simply "Celeron", so we call these "P4-based Celerons".
Dale Farnsworth [Tue, 14 Jan 2003 09:17:16 +0000 (20:17 +1100)]
PPC32: Fix copy_from_user to copy as much as possible.
copy_from_user is supposed to transfer as much data as is
valid and then to return the number of bytes not tranferred.
That's how it works on x86. On ppc it can be as much as 15
bytes short.
I initially saw the problem with the mount system call.
Note that the fifth argument to mount is an address 8 bytes from the end
of user data space. There is a null byte at that address, since no mount
options are being passed.
In the kernel, sys_mount() allocates a page for the options and
does copy_from_user(new_page, 0x1005eff8, PAGE_SIZE). copy_from_user
should copy 8 bytes and return (PAGE_SIZE-8). Instead, on ppc it reads
8 bytes, faults, writes no bytes, and returns PAGE_SIZE, which causes the
EFAULT to be erroneously reported.
Bart De Schuymer [Sun, 12 Jan 2003 16:16:44 +0000 (08:16 -0800)]
[ebtables] use Rustys new module scheme in ebtables.c, vs 2.5.56
- use /* */ instead of //
- change my mail alias
- remove MOD_DEC_USE_COUNT and MOD_INC_USE_COUNT
- use try_module_get (and check result) and module_put instead of
__MOD_INC_USE_COUNT and __MOD_DEC_USE_COUNT
- add \n in init/exit messages
I appreciate the adaption of the ISDN drivers to the new PnP layer
(though I don't know why it was actually necessary to break the old
ISAPnP so late in the cycle), but the gratuitious changes to the coding
style were not exactly necessary. So revert things to the
"if (retval) goto err_unwind;" style and fix a couple of other compile
time errors.
ISDN/HiSax: Move chipset init code into *_setup() functions
This is just again moving some common code into shared places,
let the chip-specific driver check the versions instead of having
every card-specific driver do so.
This patch introduces, private to the HiSax driver, new helper functions
request_io/mmio(), which correspond to request_region()/
request_mem_region() but also are verbose about failures and keep track
of the allocated regions, so unwinding in case of errors is automatic.
Additionally, request_mmio() will also ioremap() the region.
Jaroslav Kysela [Sun, 12 Jan 2003 03:46:40 +0000 (19:46 -0800)]
[PATCH] PnP update - drivers
this patch must be applied after PnP patch v0.94. It contains my
small cleanups of PnP code and I tried to rewrite almost all ISA PnP
drivers to new PnP subsystem except sound drivers (ALSA & OSS).
PnP update
- separated dev->resource to dev->io_resource and dev->mem_resource
- added pnp_*_valid() macros
- added status member to pnp_card structure
- added pnp_device_attach/detach functions
- added pnpc_attach/detach functions
- moved pnp_find_card() and pnp_find_dev() functions to isapnp.h
- updated IDE/gameport/ISDN/network/scsi/radio/telephone drivers
to latest PnP code
Robert Love [Sun, 12 Jan 2003 03:23:34 +0000 (19:23 -0800)]
[PATCH] add explicit Pentium II support
This separates the "PPro/Celeron/Pentium-II" compile option into "PPro"
and "Pentium-II/Celeron" options.
This allows us to explicitly support the Pentium II and Celeron,
specifically adding the `-march' option for the chip and enabling the
unaligned copy optimizations. PPro support remains unchanged.
This patch is by Luuk van der Duim with some changes by me (primarily to
also support the pre-Coppermine Celeron chips, since those use Pentium
II cores). This patch has been in 2.5-mm for awhile and Andrew ack'ed
this submission.
Alan Cox [Sun, 12 Jan 2003 03:19:39 +0000 (19:19 -0800)]
[PATCH] Update 2.5 PIIX driver to match 2.4 PIIX
This adds knowledge of the relevant Intel errata
- 450NX rev B0 we must not do IDE DMA
- 450NX rev C0 we must ensure restreaming is off or risk corruption
- ICH0-ICH2 have a data corrupting hardware bug in the old old MWDMA0
mode, so we avoid MWDMA0 on such devices
Linus Torvalds [Sun, 12 Jan 2003 00:50:14 +0000 (16:50 -0800)]
Re-instate the SA_RESTORER functionality, since it seems that some
programs still depend on it and in fact do install a different signal
restorer than the standard kernel version.
Brian Gerst [Sun, 12 Jan 2003 00:48:49 +0000 (16:48 -0800)]
[PATCH] x86 page table initialization fix
At bootup, one_page_table_init() pulls the rug out from under the kernel
by installing a new page table before setting it up. With big TLB's, it
can go unnoticed, but a 486 has a small TLB so any miss will cause a
triple fault and reset.
Russell King [Sat, 11 Jan 2003 23:12:02 +0000 (23:12 +0000)]
[ARM] CPUFREQ updates from Dominik
cpu-sa11x0: CPUFREQ_ALL_CPUS shouldn't be passed as argument to
cpufreq_notify_transition() any more, but the exact CPU number.
mach-integrator: cpufreq_notify_transition() isn't called -- which
means that the transition notifiers are not informed. This patch adds
these callbacks. Also, CPUFREQ_ALL_CPUS can't passed to
cpufreq_driver->set_policy any longer, so some code can safely be
removed.
Jaroslav Kysela [Sat, 11 Jan 2003 11:57:09 +0000 (12:57 +0100)]
Linux PnP Support 0.94
(Adam Belay) -use list_del instead of list_del_init in some areas
-introduce pnp capability and status flags
-remove static resource setting, I did some research and found that only
PnPBIOS supports it, therefore it is better to implememt this in the
PnPBIOS protocol itself. (it appears ACPI doesn't use this)
-Remove pnp_dev_has_driver and use PNP_ATTACHED instead, this is necessary
because a card driver only has rights over a device that it requests.
-added card_for_each_dev macro
-undo isapnp protocol changes, the pnp layer was designed to handle cards
and devices on the same protocol and I feel they should not be seperated.
(Pual Laufer) -Fix remove driver bug in pnp card services
(Adam Richter) -Fix a potential oops in id registration functions
From: Christian Borntraeger <linux@borntraeger.net>
This patch makes isdn_tty HZ aware.
The first change changes 3000 jiffies (now 3 seconds) to 30 seconds according to
the comment.
I dont know, if the second change (schedule_timeout(50);) has to be half a
second but this was the value used in 2.4.
Instead of having "switch (subtype)" in just about every function,
rather use separate functions and invoke the right one using
the now existing struct card_ops infrastructure.
ISDN/HiSax: Move interrupt function to per-card struct
Since we now have a per-card ops struct, use it to provide the
irq handler function, too.
Some drivers actually drive more than one specific hardware card,
instead of having "switch (cs->subtyp)" scattered around, we rather
aim at having different card_ops structures which just provide the
right functions for the hardware. Of course, this patch is only the
beginning of that separation, but allows for some cleaning already.
Andrew Morton [Sat, 11 Jan 2003 02:40:27 +0000 (18:40 -0800)]
[PATCH] fix set_page_dirty vs truncate&free races
set_page_dirty() is racy if the caller has no reference against
page->mapping->host, and if the page is unlocked. This is because
another CPU could truncate the page off the mapping and then free the
mapping.
Usually, the page _is_ locked, or the caller is a user-space process which
holds a reference on the inode by having an open file.
The exceptional cases are where the page was obtained via
get_user_pages(). The patch changes those to lock the page around the
set_page_dirty() call.
CPU0:
spin_lock(some_lock);
do_very_long_thing(); /* This has cond_resched()s in it */
CPU1:
spin_lock(some_lock);
Now suppose that the scheduler tries to schedule a task on CPU1. Nothing
happens, because CPU1 is spinning on the lock with preemption disabled. CPU0
will happliy hold the lock for a long time because nobody has set
need_resched() against CPU0.
This problem can cause scheduling latencies of many tens of milliseconds on
SMP on kernels which handle UP quite happily.
This patch fixes the problem by changing the spin_lock() and write_lock()
contended slowpath to spin on the lock by hand, while polling for preemption
requests.
I would have done read_lock() too, but we don't seem to have read_trylock()
primitives.
The patch also shrinks the kernel by 30k due to not having separate
out-of-line spinning code for each spin_lock() callsite.
Andrew Morton [Sat, 11 Jan 2003 02:40:06 +0000 (18:40 -0800)]
[PATCH] low-latency pagetable teardown
Pagetable teardown can hold page_table_lock for extremely long periods -
hundreds of milliseconds. This is pretty much the final source of high
scheduling latency in the core kernel.
We fixed it for zap_page_range() by chunking the work up and dropping the
lock occasionally if needed. But that did not fix exit_mmap() and
unmap_region().
So what this patch does is to create an uber-zapper "unmap_vmas()" which
provides all the vma-walking, page unmapping and low-latency lock-dropping
which zap_page_range(), exit_mmap() and unmap_region() require. Those three
functions are updated to call unmap_vmas().
Andrew Morton [Sat, 11 Jan 2003 02:39:59 +0000 (18:39 -0800)]
[PATCH] Don't reverse the VMA list in touched_by_munmap()
touched_by_munmap() returns a reversed list of VMA's. That makes things
harder in the low-latency-page-zapping patch.
So change touched_by_munmap() to return a VMA list which is in the original
order - ascending virtual addresses.
Oh, and rename it to <hugh>detach_vmas_to_be_unmapped()</hugh>. It now
returns nothing, because we know that the VMA we passed in is the head of the
to-be-unmapped list.
Andrew Morton [Sat, 11 Jan 2003 02:39:43 +0000 (18:39 -0800)]
[PATCH] simplify and generalise cond_resched_lock
cond_resched_lock() _used_ to be "if this is the only lock which I am holding
then drop it and schedule if needed".
However with the i_shared_lock->i_shared_sem change, neither of its two
callsites now need those semantics. So this patch changes it to mean just
"if needed, drop this lock and reschedule".
This allows us to also schedule if CONFIG_PREEMPT=n, which is useful -
zap_page_range() can run for an awfully long time.
The preempt and non-preempt versions of cond_resched_lock() have been
unified.
Andrew Morton [Sat, 11 Jan 2003 02:39:36 +0000 (18:39 -0800)]
[PATCH] turn i_shared_lock into a semaphore
i_shared_lock is held for a very long time during vmtruncate() and causes
high scheduling latencies when truncating a file which is mmapped. I've seen
100 milliseconds.
So turn it into a semaphore. It nests inside mmap_sem.
This change is also needed by the shared pagetable patch, which needs to
unshare pte's on the vmtruncate path - lots of pagetable pages need to
be allocated and they are using __GFP_WAIT.
Randy Vinson [Sat, 11 Jan 2003 02:29:29 +0000 (13:29 +1100)]
PPC32: Explicitly control store-gathering on MPC10x host bridges.
This change alters the behavior of the "MCP10x Store Gathering
Enable" option. Previously, selecting this option would enable
store gathering, while not selecting the option would leave the
firmware-provided state. In short, there was no way to disable
store gathering if the firmware had left it enabled. This caused
problems with the Adaptec 2940U2W when run in 8240 and 8245
Sandpoint systems. The new code will disable store gathering unless
the user requests it.