kbuild: Handle vmlinux linkscript from common code
Now that all archs use the same way to generate the link script, we can
handle it from the common top-level Makefile instead of the individual
arch/*/Makefile's.
This is an untested attempt to convert ARM to preprocessing vmlinux.lds.S
instead of running sed on it - This probably allows for further cleanup,
but I'll leave that to _rmk_.
James Simmons [Tue, 17 Sep 2002 04:27:46 +0000 (21:27 -0700)]
Renames console.c and vt.c. The idea is to break these massive files into smaller ones. The main goal is to move all the high end tterminal emulation into one file. This way we can have a light weight printk without the extra weight. nice for embedded systems.
James Simmons [Tue, 17 Sep 2002 04:07:57 +0000 (21:07 -0700)]
Removed selection.h header. It is not needed and in the future selections will be a pure userland solution. Use set_current_state instead in tty_ioctl.c.
hpt366 pci_tbl has a cut-n-paste error, last entry should be '4' and not
15. fixes a bug where hpt366_init_one() gets passed bogus
id->driver_data and thus goes way beyond hpt366_chipsets[]
USB: convert usb-serial drivers to new driver model.
This adds the requirement that the usb-serial drivers call
usb_register() and usb_unregister() themselves, instead of having
the usbserial.c file do it. Step one in moving the usbserial.c
code to being a "class" :)
Update the ov511 driver to version 1.62:
o Update email address
o Remove some dead code and fix some harmless typos
o New device: Alpha Vision Tech. AlphaCam SE
o Fix assignment of ov->proc_button->owner to not cause
NULL pointer deref (credit: Oleg K.)
o Support I2C read/write ioctl()s via V4L (credit: Oleg K.)
o Add OV518-specific register dump code
o New snapshot reset sequence; old one was causing
erroneous I2C writes (credit: Oleg K.)
o OV6630 needs different register 0x14 settings than OV6620
o Don't print palette errors by default
o Detect OV518 cameras that have packet numbering enabled
by default and set ov->packet_numbering accordingly. This
should fix the problems some users were having with babble
(USB error -75) and cameras not working at all.
H. Peter Anvin [Mon, 16 Sep 2002 04:27:07 +0000 (21:27 -0700)]
[PATCH] CPU detection fixes...
I noticed a kluge had been put into 2.5.35, to cover up *one* of the
errors caused by a particular bug that was introduced when Patrick
Mochel split up arch/i386/kernel/setup.c: he incorrectly thought the
AMD-defined CPUID levels were AMD-specific; they're not -- every other
x86 vendors *including* Intel uses them as well.
This also adds the "i686" hack for TM5xxx that was added in 2.4 recently.
Matthew Dharm [Mon, 16 Sep 2002 03:31:51 +0000 (20:31 -0700)]
[PATCH] USB storage: add error checks, remove useless code
This patch removes attempts to clear halts on a control endpoint (think
about it for a minute if you don't see why this is pointless....) and also
adds return-code checks for all places where halts are cleared.
This _should_ be just redundant code, but recent tests suggest that this
is, in fact, not the case. People should _heavily_ test this patch. I'm
going to pause here for a while (in the patch stream) until we've got this
sorted out -- initial results on my test setup seem to show some problems
still remain. Where those problems are (HCD or usb-storage) remains to be
seen.
Matthew Dharm [Mon, 16 Sep 2002 03:30:55 +0000 (20:30 -0700)]
[PATCH] USB storage: macro-ize address manipulation
This patch converts all uses of page_addres() to the sg_address() macro.
This will make backporting to 2.4 easier, as well as eliminate lots of
redundant code.
Alan Stern [Mon, 16 Sep 2002 03:30:06 +0000 (20:30 -0700)]
[PATCH] USB storage: Merging raw_bulk.c with transport.c
Here's a very simple patch that can go into the source tree right away.
It just fixes some occurrences of the scsi result code GOOD to GOOD << 1
in isd200.c.
This updates the Fusion-MPT driver to the latest stable version.
Changes affect the driver source only.
Major Changes:
Reworked the calls save_flags, cli, restore_flags to 2.5 format.
Modified DV invocation and to handle illegal bus configuration
Negotiation settings honor NVRAM
Bug Fix: Pushing F/W onto part during driver unload.
Bug Fix: Force F/W reset for 1030 on driver load.
Bug Fix: F/W download algorithm.
Bug Fix: Found a memory leak in mptctl.c
Bug Fix: Forcing data direction for reads and writes (sg issue)
Bug Fix: Wrong mask in Inquiry data ANSI version
Minor Changes:
Modified the debug and logging statements of the driver
Upgraded the MPI include files (lsi/)
- if the exec() is done in a non-leader thread then we must inherit the
parent links properly - otherwise the shell will see an early
child-exit notification.
- if the exec()-ing thread is detached then make it use SIGCHLD like the
leader thread.
- wait for the leader thread to become TASK_ZOMBIE properly -
wait_task_inactive() alone was not enough. This should be a rare
codepath.
now sys_execve() from thread groups works as expected in every combination
i could test: standalone, from the leader thread, from one of the child
threads, ptraced, non-ptraced, SMP and UP.
Attribution goes to Petr Vandrovec for finding and solving this one. You
probably read the mail you were cc'ed on, so I'll just mention that this
patch makes sure that the irq disabling and enabling is perfectly
balanced in the probing path. I've also looked at the multiple irq chain
problem you mentioned, and as far as I can see we are never touching the
2nd chain from within the first one. So should be ok.
I'm also including the unexpected interrupt prinkt removal.
elevator_linus is seriously broken wrt accounting. Marcelo recently took
the patch to fix it in 2.4.20-pre, here's the 2.5 equiv.
Right now, we account merges as costly and seeks as not. Only thing that
prevents seek starvation is the aging scan. That is broken, very much
so. This patch fixes that to account merges and inserts differently. A
seek is ELV_LINUS_SEEK_COST more costly than a merge, currently that
define is at '16'. Doing the math on a disk, this sort of makes sense.
Defaults are read latency of 1024, which means 1024 merges or 64 seeks.
Writes are double that.
+ if (i >= scale)
+ pool_entries >>= 1;
+
+ bp->pool = mempool_create(pool_entries, slab_pool_alloc,
slab_pool_free, bp->slab);
So we allocate less and less entries for the bigger sized pools. It
doesn't make too much sense to fill the memory with sg tables for 256
page entries on a 16mb system.
In addition, we select a starting nr_pool_entries point, based on amount
of ram as well:
which is the same as before. The cut-off point is somewhere a bit over
256mb. Andrew suggested we may want to 'cheat' a bit here, and leave the
busy pools alone. We know that mpage is going to be heavy on the 16
entry pool, so it migh make sense to make such a pool and not scale
that. We can deal with that later, though.
- "mm/slab.c contains one leftover from the initial version with
'unsigned short' bufctl entries. The attached patch replaces '2'
with the correct sizeof [which is now 4]" - Manfred Spraul
- BUG checks for vfree/vunmap being called in interrupt context
(because they take irq-unsafe spinlocks, I guess?) - davej
- Simplify some coding in one_highpage_init() (Christoph Hellwig).
Andrew Morton [Sun, 15 Sep 2002 15:50:53 +0000 (08:50 -0700)]
[PATCH] fix a bogus OOM condition for __GFP_NOFS allocations
If a GFP_NOFS allocation is made when the ZONE_NORMAL inactive list is
full of dirty or under-writeback pages, there is nothing the caller can
do to force some page reclaim. The caller ends up getting oom-killed.
- In mempool_alloc(), don't try to perform page reclaim again. Just
go to sleep and wait for some elements to be returned to the pool.
- In try_to_free_pages(): perform a single, short scan of the LRU and
if that doesn't work, fail the allocation. GFP_NOFS allocators know
how to handle that.
Andrew Morton [Sun, 15 Sep 2002 15:50:19 +0000 (08:50 -0700)]
[PATCH] low-latency zap_page_range
zap_page_range and truncate are the two main latency problems
in the VM/VFS. The radix-tree-based truncate grinds that into
the dust, but no algorithmic fixes for pagetable takedown have
presented themselves...
Patch from Robert Love.
Attached patch implements a low latency version of "zap_page_range()".
Calls with even moderately large page ranges result in very long lock
held times and consequently very long periods of non-preemptibility.
This function is in my list of the top 3 worst offenders. It is gross.
This new version reimplements zap_page_range() as a loop over
ZAP_BLOCK_SIZE chunks. After each iteration, if a reschedule is
pending, we drop page_table_lock and automagically preempt. Note we can
not blindly drop the locks and reschedule (e.g. for the non-preempt
case) since there is a possibility to enter this codepath holding other
locks.
... I am sure you are familar with all this, its the same deal as your
low-latency work. This patch implements the "cond_resched_lock()" as we
discussed sometime back. I think this solution should be acceptable to
you and Linus.
There are other misc. cleanups, too.
This new zap_page_range() yields latency too-low-to-benchmark: <<1ms.
This implements one of the last missing POSIX threading details - exec()
semantics. Previous kernels had code that tried to handle it, but that
code had a number of disadvantages:
- it only worked if the exec()-ing thread was the thread group leader,
creating an assymetry. This does not work if the thread group leader
has exited already.
- it was racy: it sent a SIGKILL to every thread in the group but did not
wait for them to actually process the SIGKILL. It did a yield() but
that is not enough. All 'other' threads have to finish processing
before we can continue with the exec().
This adds the same logic, but extended with the following enhancements:
- works from non-leader threads just as much as the thread group leader.
- waits for all other threads to exit before continuing with the exec().
- reuses the PID of the group.
It would perhaps be a more generic approach to add a new syscall,
sys_ungroup() - which would do largely what de_thread() does in this
patch.
But it's not really needed now - posix_spawn() is currently implemented
via starting a non-CLONE_THREAD helper thread that does a sys_exec().
There's no API currently that needs a direct exec() from a thread - but
it could be created (such as pthread_exec_np()). It would have the
advantage of not having to go through a helper thread, but the
difference is minimal.
This fixes one more exit-time resource accounting issue - and it's also
a speedup and a thread-tree (to-be thread-aware pstree) visual
improvement.
In the current code we reparent detached threads to the init thread.
This worked but was not very nice in ps output: threads showed up as
being related to init. There was also a resource-accounting issue, upon
exit they update their parent's (ie. init's) rusage fields -
effectively losing these statistics. Eg. 'time' under-reports CPU
usage if the threaded app is Ctrl-C-ed prematurely.
The solution is to reparent threads to the group leader - this is now
very easy since we have p->group_leader cached and it's also valid all
the time. It's also somewhat faster for applications that use
CLONE_THREAD but do not use the CLONE_DETACHED feature.