]> git.hungrycats.org Git - linux/log
linux
22 years ago[PATCH] Rename bitmap_clear to bitmap_zero, remove CLEAR_BITMAP
Andrew Morton [Mon, 12 Apr 2004 08:03:29 +0000 (01:03 -0700)]
[PATCH] Rename bitmap_clear to bitmap_zero, remove CLEAR_BITMAP

From: Rusty Russell <rusty@rustcorp.com.au>

clear_bit(n, addr) clears the nth bit.
test_and_clear_bit(n, addr) clears the nth bit.
cpu_clear(n, cpumask) clears the nth bit (vs. cpus_clear()).
bitmap_clear(bitmap, n) clears out all the bits up to n.

Moreover, there's a CLEAR_BITMAP() in linux/types.h which bitmap_clear() is
a wrapper for.

Rename bitmap_clear to bitmap_zero, which is harder to confuse (yes, it bit
me), and make everyone use it.

22 years ago[PATCH] Fix More Problems Introduced By Module Structure Added in modpost.c
Andrew Morton [Mon, 12 Apr 2004 08:03:15 +0000 (01:03 -0700)]
[PATCH] Fix More Problems Introduced By Module Structure Added in modpost.c

From: Rusty Russell <rusty@rustcorp.com.au>

Sam Ravnborg found these.

1) have_vmlinux is a global, and should not be reset every time.

2) We pretend every module needs cleanup_module so it gets versioned,
   but that isn't defined for CONFIG_MODULE_UNLOAD=n.

3) The visible effect of this is that modpost will start complaning about
   undefined symbols - previously this happened only when the module was
   isntalled.

22 years ago[PATCH] do_fork() error path memory leak
Andrew Morton [Mon, 12 Apr 2004 08:03:03 +0000 (01:03 -0700)]
[PATCH] do_fork() error path memory leak

From: <john.l.byrne@hp.com>

In do_fork(), if an error occurs after the mm_struct for the child has been
allocated, it is never freed.  The exit_mm() meant to free it increments
the mm_count and this count is never decremented.  (For a running process
that is exitting, schedule() takes care this; however, the child process
being cleaned up is not running.) In the CLONE_VM case, the parent's
mm_struct will get an extra mm_count and so it will never be freed.

This patch should fix both the CLONE_VM and the not CLONE_VM case; the test
of p->active_mm prevents a panic in the case that a kernel-thread is being
cloned.

22 years ago[PATCH] mdacon.c warning fix.
Andrew Morton [Mon, 12 Apr 2004 08:02:49 +0000 (01:02 -0700)]
[PATCH] mdacon.c warning fix.

From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>

drivers/video/console/mdacon.c:599: warning: initialization from incompatible pointer type

22 years ago[PATCH] fix for potential integer overflow in zoran driver
Andrew Morton [Mon, 12 Apr 2004 08:02:37 +0000 (01:02 -0700)]
[PATCH] fix for potential integer overflow in zoran driver

From: "Ronald S. Bultje" <R.S.Bultje@students.uu.nl>

Attached patch fixes a potential integer overflow in zoran_procs.c (part of
the zr36067 driver).  Bug was detected by Ken Ashcraft with the Stanford
checker.

22 years ago[PATCH] ext3fs sb= mount option fix
Andrew Morton [Mon, 12 Apr 2004 08:02:23 +0000 (01:02 -0700)]
[PATCH] ext3fs sb= mount option fix

From: <achurch@achurch.org> (Andrew Church)

The following patch fixes a bug in the processing of the sb= (alternate
superblock) mount option for ext3: when changing the device block size, the
given superblock is ignored and the code reverts to using block 1.

22 years ago[PATCH] ext2fs sb= mount option fix
Andrew Morton [Mon, 12 Apr 2004 08:02:11 +0000 (01:02 -0700)]
[PATCH] ext2fs sb= mount option fix

From: <achurch@achurch.org> (Andrew Church)

The following patch fixes a bug in the processing of the sb= (alternate
superblock) mount option for ext2: when changing the device block size, the
given superblock is ignored and the code reverts to using block 1.

22 years ago[PATCH] fix test_and_change_bit comment
Andrew Morton [Mon, 12 Apr 2004 08:01:57 +0000 (01:01 -0700)]
[PATCH] fix test_and_change_bit comment

From: Paul Jackson <pj@sgi.com>

I've read over the code in each case, built and ran a test case for i386 in
particular, and studied the other uses and definitions of
test_and_change_bit().  Everything I see recommends this change.

- Fix test_and_change_bit() comment: returns old value, not new one.

22 years ago[PATCH] make ibmasm driver uart support depend on SERIAL_8250
Andrew Morton [Mon, 12 Apr 2004 08:01:45 +0000 (01:01 -0700)]
[PATCH] make ibmasm driver uart support depend on SERIAL_8250

From: Max Asbock <masbock@us.ibm.com>

This patch makes serial line registration in the ibmasm service processor
driver depend on CONFIG_SERIAL_8250.  Previously the driver wouldn't
compile when serial driver support wasn't enabled.

22 years ago[PATCH] Fix Raid5/6 above 2 Terabytes
Andrew Morton [Mon, 12 Apr 2004 08:01:30 +0000 (01:01 -0700)]
[PATCH] Fix Raid5/6 above 2 Terabytes

From: Evan Felix <evan.felix@pnl.gov>

Here is a patch that fixes a major issue in the raid5/6 code.  It seems
that the code:

logical_sector = bi->bi_sector & ~(STRIPE_SECTORS-1);
(sector_t)     = (sector_t)    & (constant)

that the right side of the & does not get extended correctly when the
constant is promoted to the sector_t type.  I have CONFIG_LBD turned on so
sector_t should be 64bits wide.  This fails to properly mask the value of
4294967296 (2TB/512) to 4294967296.  in my case it was coming out 0.  this
cause the loop following this code to read from 0 to 4294967296 blocks so
it could write one character.

As you might imagine this makes a format of a 3.5TB filesystem take a very
long time.

22 years ago[PATCH] remove concatenation with __FUNCTION__ sound/*
Andrew Morton [Mon, 12 Apr 2004 08:01:18 +0000 (01:01 -0700)]
[PATCH] remove concatenation with __FUNCTION__ sound/*

From: Tony Breeds <tony@bakeyournoodle.com>

22 years ago[PATCH] remove concatenation with __FUNCTION__ include/*
Andrew Morton [Mon, 12 Apr 2004 08:01:04 +0000 (01:01 -0700)]
[PATCH] remove concatenation with __FUNCTION__ include/*

From: Tony Breeds <tony@bakeyournoodle.com>

22 years ago[PATCH] remove concatenation with __FUNCTION__ drivers/*
Andrew Morton [Mon, 12 Apr 2004 08:00:51 +0000 (01:00 -0700)]
[PATCH] remove concatenation with __FUNCTION__ drivers/*

From: Tony Breeds <tony@bakeyournoodle.com>

22 years ago[PATCH] remove concatenation with __FUNCTION__ arch/*
Andrew Morton [Mon, 12 Apr 2004 08:00:37 +0000 (01:00 -0700)]
[PATCH] remove concatenation with __FUNCTION__ arch/*

From: Tony Breeds <tony@bakeyournoodle.com>

22 years ago[PATCH] don't offer GEN_RTC on ia64
Andrew Morton [Mon, 12 Apr 2004 08:00:24 +0000 (01:00 -0700)]
[PATCH] don't offer GEN_RTC on ia64

From: Bjorn Helgaas <bjorn.helgaas@hp.com>

gen_rtc.c doesn't work on ia64 (we don't have asm/rtc.h, for starters), so
don't offer it there.

22 years ago[PATCH] pdaudiocf.c needs init.h
Andrew Morton [Mon, 12 Apr 2004 08:00:11 +0000 (01:00 -0700)]
[PATCH] pdaudiocf.c needs init.h

From: Herbert Xu <herbert@gondor.apana.org.au>

This patch makes this file includes linux/init.h since it uses the __init
tag.

22 years ago[PATCH] saa7134 - Add two inputs for Asus TV FM
Andrew Morton [Mon, 12 Apr 2004 07:59:59 +0000 (00:59 -0700)]
[PATCH] saa7134 - Add two inputs for Asus TV FM

From: Martin Hicks <mort@bork.org>

I just bought an ASUS TV FM capture card, based on the saa7134 chip.  It only
had one input specified, coax.  This patch adds the Composite and S-Video
inputs.  It seems to work correctly for me.

22 years ago[PATCH] Fix parportbook build again
Andrew Morton [Mon, 12 Apr 2004 07:59:45 +0000 (00:59 -0700)]
[PATCH] Fix parportbook build again

From: Herbert Xu <herbert@gondor.apana.org.au>

The previous fix causes a syntax error when building:

Working on: /home/gondolin/herbert/src/debian/work/kernel/build/2.6/kernel-source-2.6.5-2.6.5/Documentation/DocBook/parportbook.sgml
jade:/home/gondolin/herbert/src/debian/work/kernel/build/2.6/kernel-source-2.6.5-2.6.5/Documentation/DocBook/parportbook.sgml:4059:2:E: invalid comment declaration: found character "!" outside comment but inside comment declaration
jade:/home/gondolin/herbert/src/debian/work/kernel/build/2.6/kernel-source-2.6.5-2.6.5/Documentation/DocBook/parportbook.sgml:4058:0: comment declaration started here
jade:/home/gondolin/herbert/src/debian/work/kernel/build/2.6/kernel-source-2.6.5-2.6.5/Documentation/DocBook/parportbook.sgml:4059:4:E: character data is not allowed here

This patch removes the offending line completely since that file is probably
not coming back anyway.

22 years ago[PATCH] QD65xx I/O ports fix
Andrew Morton [Mon, 12 Apr 2004 07:59:33 +0000 (00:59 -0700)]
[PATCH] QD65xx I/O ports fix

From: Geert Uytterhoeven <geert@linux-m68k.org>

I/O port numbers can be larger than 8-bit on many platforms (this caused a
warning when {out,in}b() cast reg to a pointer on platforms with memory
mapped I/O)

22 years ago[PATCH] isicom error path fix
Andrew Morton [Mon, 12 Apr 2004 07:59:19 +0000 (00:59 -0700)]
[PATCH] isicom error path fix

From: Geert Uytterhoeven <geert@linux-m68k.org>

Variable error is not initialized, but printed if tty_unregister_driver()
fails.

22 years ago[PATCH] DVB dependency fix
Andrew Morton [Mon, 12 Apr 2004 07:59:06 +0000 (00:59 -0700)]
[PATCH] DVB dependency fix

From: Geert Uytterhoeven <geert@linux-m68k.org>

DVB_TWINHAN_DST depends on DVB_BT8XX (dependency is explicitly mentioned in
help text, but not enforced)

22 years ago[PATCH] parport dependency fix
Andrew Morton [Mon, 12 Apr 2004 07:58:53 +0000 (00:58 -0700)]
[PATCH] parport dependency fix

From: Geert Uytterhoeven <geert@linux-m68k.org>

PCI multi-IO card support depends on PCI

22 years ago[PATCH] isicom.c: unused vars
Andrew Morton [Mon, 12 Apr 2004 07:58:40 +0000 (00:58 -0700)]
[PATCH] isicom.c: unused vars

From: Geert Uytterhoeven <geert@linux-m68k.org>

Recent serial changes moved some code, causing unused variable warnings.

22 years ago[PATCH] isicom.c: jiffies must be unsigned long
Andrew Morton [Mon, 12 Apr 2004 07:58:27 +0000 (00:58 -0700)]
[PATCH] isicom.c: jiffies must be unsigned long

From: Geert Uytterhoeven <geert@linux-m68k.org>

jiffies must be unsigned long

22 years ago[PATCH] get_user_pages shortcut for anonymous pages
Andrew Morton [Mon, 12 Apr 2004 07:58:14 +0000 (00:58 -0700)]
[PATCH] get_user_pages shortcut for anonymous pages

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

The patch avoids the instantiation of pagetables for not-present pages in
get_user_pages().  Without this, the coredump code can cause total memory
exhaustion in pagetables.  Consider a store to current stack - 1TB.  The
stack vma is extended to include this address because of VM_GROWSDOWN.  If
such a process dies (which is likely for a defunc process) then the elf core
dumper will cause the system to hang because of too many page tables.

We especially recognise this situation and simply return a ref to the zero
page.

22 years ago[PATCH] Correct kernel-doc comment with incorrect parameters documented
Andrew Morton [Mon, 12 Apr 2004 07:58:01 +0000 (00:58 -0700)]
[PATCH] Correct kernel-doc comment with incorrect parameters documented

From: "Randy.Dunlap" <rddunlap@osdl.org>

From: Michael Still <mikal@stillhq.com>

Correct kernel-doc comment with incorrect parameters documented

22 years ago[PATCH] Swsusp should not wake up stopped processes
Andrew Morton [Mon, 12 Apr 2004 07:57:48 +0000 (00:57 -0700)]
[PATCH] Swsusp should not wake up stopped processes

From: Pavel Machek <pavel@suse.cz>

If you stop process with ^Z, then suspend, process is awakened.  Thats a
bug.  Solution is to simply leave already stopped processes alone.  Plus we
no longer use TASK_STOPPED for processes in refrigerator.  Userland might
see us and get confused.

22 years ago[PATCH] swsusp update: supports discontingmem/highmem fixes
Andrew Morton [Mon, 12 Apr 2004 07:57:34 +0000 (00:57 -0700)]
[PATCH] swsusp update: supports discontingmem/highmem fixes

From: Pavel Machek <pavel@ucw.cz>

It makes swsusp behave correctly w.r.t.  discontingmem, and adds highmem
handling.

22 years ago[PATCH] swsusp update: supports discontingmem/highmem
Andrew Morton [Mon, 12 Apr 2004 07:57:22 +0000 (00:57 -0700)]
[PATCH] swsusp update: supports discontingmem/highmem

From: Pavel Machek <pavel@ucw.cz>

Bill Irwin did some work on this.  It makes swsusp behave correctly w.r.t.
discontingmem, and adds highmem handling (very simple-minded, but should work
ok with 1GB).  It now should behave correctly w.r.t.  more than one swap
device, and fixes double restoring of console.

22 years ago[PATCH] i386 probe_roms(): fixes
Andrew Morton [Mon, 12 Apr 2004 07:57:08 +0000 (00:57 -0700)]
[PATCH] i386 probe_roms(): fixes

From: Rene Herman <rene.herman@keyaccess.nl>

This patch tries to improve the i386/mach-default probe_roms().  This also
c99ifies the data, adds an IORESOURCE_IO flag for the I/O port resources,
an IORESOURCE_MEM flag for the VRAM resource, IORESOURCE_READONLY |
IORESOURCE_MEM for the ROM resources and adds two additional "adapter ROM
slots" (for a total of 6) since it now also scans the 0xe0000 segment.

22 years ago[PATCH] i386 probe_roms(): preparation
Andrew Morton [Mon, 12 Apr 2004 07:56:55 +0000 (00:56 -0700)]
[PATCH] i386 probe_roms(): preparation

From: Rene Herman <rene.herman@keyaccess.nl>

The i386 probe_roms() function has a fair number of problems currently:

- When you actually have an adapter ROM in the machine, your video ROM
  disappears.  This is due to the pc9800 subarch merge that split it up in
  probe_video_rom(int roms) and probe_extension_roms(int roms), but expects a
  "roms++" in probe_video_roms() to have an effect outside of that function.

- The majority of VGA adapters these days host a ROM larger then 32K, yet
  the current code hardcodes a 32K ROM.  The VGA BIOS "length" byte is
  normally valid (it in fact needs to be for a regular mainboard BIOS to
  accept it) and I've verified on a few dozen very new to very old VGAs that
  it is.  However, assuming someone actually did not check for the length and
  checksum there for a reason, the safe thing to do here is accept the length
  byte when we also get a valid checksum.

- The current code scans 0xc0000 to 0xdffff for a video ROM while the
  standard PC thing to do (that which the BIOS does) is only scan for a video
  ROM starting between 0xc0000 and 0xc7fff.  This means that on a headless-
  (or BIOS-less monochrome adapter-) box, the first adapter ROM found
  triggers the registration of a 32K "Video ROM" at hardcoded address
  0xc0000, even when _nothing_ is present between 0xc0000 and 0xc7fff.

- The current adapter ROM scan stops at 0xdffff, whether or not an
  extension ROM is present at 0xe0000.  The PC thing to do is scan 0xc8000
  upto 0xdffff if an extension ROM is present, and upto 0xeffff when it's not
  (it's not/hardly ever).

- Adapter ROMs are called "Extension ROM", but the latter term is really
  better reserved for a motherboard extension ROM.

- Currently, the code happily starts scanning through a ROM it just
  registered looking for the next one (just does += 2048, even when that's
  inside the previous ROM) which is at least silly.

Unfortunately, this code is "subarched" between mach-default and
mach-pc9800, meaning the patch got a bit involved. Currently all this
code, and gobs of data, is defined (not just declared) in the header:

   include/asm-i386/mach-{default,pc9800}/mach_resources.h

which isn't nice. That .h really wants to be a .c. The first patch, in
the next message, does not change any code but only undoes the
probe_video_rom / probe_extension_roms split and moves the code to a new
file

   arch/i386/mach-{default,pc9800}/std_resources.c

with a header

   include/asm-i386/std_resources.h

for the prototypes only. The second patch overhauls the code itself for
mach-default. Please see comments on top of that patch for (yet more)
comments. It's tested on various machines, with and without adapter ROMs.

I haven't touched pc9800. Nothing should have changed though. The pc9800
author, as given in the code, is CCed.

Also, x86-64 inherits the probe_roms() code from 2.4, and while it
doesn't have the subarch specific problems, it has all others. I'll
convert it to if this i386 version is deemed desirable.

This patch doesn't change any code, just moves stuff from the
"mach_resources.h" header to a "std_resources.c" subarch specific file, and
introduces a "std_resources.h" header for the prototypes.

22 years ago[PATCH] jbd: b_transaction zeroing cleanup
Andrew Morton [Mon, 12 Apr 2004 07:55:49 +0000 (00:55 -0700)]
[PATCH] jbd: b_transaction zeroing cleanup

Almost everywhere where JBD removes a buffer from the transaction lists the
caller then nulls out jh->b_transaction.  Sometimes, the caller does that
without holding the locks which are defined to protect b_transaction.  This
makes me queazy.

So change things so that __journal_unfile_buffer() nulls out b_transaction
inside both j_list_lock and jbd_lock_bh_state().

It cleans things up a bit, too.

22 years ago[PATCH] jbd: do_get_write_access lock contention reduction
Andrew Morton [Mon, 12 Apr 2004 07:55:38 +0000 (00:55 -0700)]
[PATCH] jbd: do_get_write_access lock contention reduction

We're seeing heavy contention against j_list_lock on 8-way in
do_get_write_access().

We actually don't need j_list_lock in there except for one little case - the
per-bh jbd_lock_bh_state() is sufficient to protect this buffer's internal
state.

On some nice quick LVM array Ram Pai measured an overall 3x speedup from this
patch:

the script took the following time on 265mm1
 real    0m57.504s
 user    0m0.400s
 sys     7m29.867s

 and with the 2patches it took
 real  0m19.983s
 user    0m0.438s
 sys     1m55.896s

22 years ago[PATCH] Feed floppy.c through Lindent
Andrew Morton [Mon, 12 Apr 2004 07:55:23 +0000 (00:55 -0700)]
[PATCH] Feed floppy.c through Lindent

From: "Randy.Dunlap" <rddunlap@osdl.org>

22 years ago[PATCH] dnotify_parent speedup
Andrew Morton [Mon, 12 Apr 2004 07:55:11 +0000 (00:55 -0700)]
[PATCH] dnotify_parent speedup

From: Anton Blanchard <anton@samba.org>

Directory notify code was showing up in a dd bs=1024k from 2 raid arrays
on an emulex FC adapter:

3635     69.4896  vmlinux-2.6.5            .default_idle
332       6.3468  vmlinux-2.6.5            .__copy_tofrom_user
112       2.1411  vmlinux-2.6.5            .save_remaining_regs
76        1.4529  vmlinux-2.6.5            .scsi_dispatch_cmd
64        1.2235  vmlinux-2.6.5            .dnotify_parent
61        1.1661  vmlinux-2.6.5            .do_generic_mapping_read

We already have a sysctl to enable/disable it, the patch below uses it
in dnotify_parent. dnotify_parent disappears and idle time goes up:

4508     70.8582  vmlinux-2.6.5            .default_idle
253       3.9767  vmlinux-2.6.5            .__copy_tofrom_user
142       2.2320  vmlinux-2.6.5            .save_remaining_regs
88        1.3832  vmlinux-2.6.5            .shrink_zone
84        1.3203  vmlinux-2.6.5            .elx_drvr_unlock
75        1.1789  vmlinux-2.6.5            .scsi_dispatch_cmd
69        1.0846  vmlinux-2.6.5            .do_generic_mapping_read

Of course, to gain this small speedup isers need to know to set
/proc/sys/fs/dir-notify-enable to zero.  Nobody does that.

22 years ago[PATCH] cyclades works OK on SMP
Andrew Morton [Mon, 12 Apr 2004 07:54:58 +0000 (00:54 -0700)]
[PATCH] cyclades works OK on SMP

From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>

The cyclades.c driver was marked BROKEN_ON_SMP during early 2.6.  It was
fixed later on but the tag was left in Kconfig.

The driver is not very smart wrt SMP locking, it can be improved.  There is
only one spinlock per card which guarantees command block ordering and
protects different shared data, which can be held for long periods.

_But_ the locking works reliably, so remove the BROKEN_ON_SMP tag.

22 years ago[PATCH] rename page_to_nodenum()
Andrew Morton [Mon, 12 Apr 2004 07:54:44 +0000 (00:54 -0700)]
[PATCH] rename page_to_nodenum()

From: "Martin J. Bligh" <mbligh@aracnet.com>

I'd prefer we renamed this to page_to_nid() before anyone starts using it.
This fits with the naming convention of everything else (pfn_to_nid, etc).
Nobody uses it right now - I grepped the whole tree.

22 years ago[PATCH] rmap 3 arches + mapping_mapped
Andrew Morton [Mon, 12 Apr 2004 07:54:31 +0000 (00:54 -0700)]
[PATCH] rmap 3 arches + mapping_mapped

From: Hugh Dickins <hugh@veritas.com>

Some arches refer to page->mapping for their dcache flushing: use
page_mapping(page) for safety, to avoid confusion on anon pages, which will
store a different pointer there - though in most cases flush_dcache_page is
being applied to pagecache pages.

arm has a useful mapping_mapped macro: move that to generic, and add
mapping_writably_mapped, to avoid explicit list_empty checks on i_mmap and
i_mmap_shared in several places.

Very tempted to add page_mapped(page) tests, perhaps along with the
mapping_writably_mapped tests in do_generic_mapping_read and
do_shmem_file_read, to cut down on wasted flush_dcache effort; but the
serialization is not obvious, too unsafe to do in a hurry.

22 years ago[PATCH] rw_swap_page_sync fixes
Andrew Morton [Mon, 12 Apr 2004 07:54:17 +0000 (00:54 -0700)]
[PATCH] rw_swap_page_sync fixes

Fix up the rw_swap_page_sync() gorrors by fully decoupling this function
from the VM - it is now just a helper function which reads a page from or
writes a page to swap.

22 years ago[PATCH] rmap 2 anon and swapcache
Andrew Morton [Mon, 12 Apr 2004 07:54:03 +0000 (00:54 -0700)]
[PATCH] rmap 2 anon and swapcache

From: Hugh Dickins <hugh@veritas.com>

Tracking anonymous pages by anon_vma,pgoff or mm,address needs a
pointer,offset pair in struct page: mapping,index the natural choice.  But
swapcache uses those for &swapper_space,swp_entry_t.

It's trivial to separate swapcache from pagecache with radix tree; most of
swapper_space is actually unused, just a fiction to pretend swap like file;
and page->private is a good place to keep swp_entry_t, now that swap never
uses bufferheads.

Define PG_anon bit, page_add_rmap SetPageAnon and put an oopsable address in
page->mapping to test that we're not confused by it.  Define
page_mapping(page) macro to give NULL when PageAnon, whatever may be in
page->mapping.  Define PG_swapcache bit, deduce swapper_space from that in
the few places we need it.

add_to_swap_cache now distinct from add_to_page_cache.  Separating the caches
somewhat simplifies the tmpfs swizzling in swap_state.c, now the page can
briefly be in both caches.

The rmap method remains pte chains, no change to that yet.  But one small
functional difference: the use of PageAnon implies that a page truncated
while still mapped will no longer be found and freed (swapped out) by
try_to_unmap, will only be freed by exit or munmap.  But normally pages are
unmapped by vmtruncate: this should only affect nonlinear mappings, and a
later patch not in this batch will fix that.

22 years ago[PATCH] rmap 1 linux/rmap.h
Andrew Morton [Mon, 12 Apr 2004 07:53:50 +0000 (00:53 -0700)]
[PATCH] rmap 1 linux/rmap.h

From: Hugh Dickins <hugh@veritas.com>

First of a batch of three rmap patches: this initial batch of three paving
the way for a move to some form of object-based rmap (probably Andrea's, but
drawing from mine too), and making almost no functional change by itself.  A
few days will intervene before the next batch, to give the struct page
changes in the second patch some exposure before proceeding.

rmap 1 create include/linux/rmap.h

Start small: linux/rmap-locking.h has already gathered some declarations
unrelated to locking, and the rest of the rmap declarations were over in
linux/swap.h: gather them all together in linux/rmap.h, and rename the
pte_chain_lock to rmap_lock.

22 years ago[PATCH] CFQ io scheduler
Andrew Morton [Mon, 12 Apr 2004 07:16:44 +0000 (00:16 -0700)]
[PATCH] CFQ io scheduler

From: Jens Axboe <axboe@suse.de>

CFQ I/O scheduler

22 years ago[PATCH] Correct unplugs on nr_queued
Andrew Morton [Mon, 12 Apr 2004 07:16:32 +0000 (00:16 -0700)]
[PATCH] Correct unplugs on nr_queued

From: Jens Axboe <axboe@suse.de>

There's a small discrepancy in when we decide to unplug a queue based on
q->unplug_thresh.  Basically it doesn't work for tagged queues, since
q->rq.count[READ] + q->rq.count[WRITE] is just the number of allocated
requests, not the number of requests stuck in the io scheduler.  We could
just change the nr_queued == to a nr_queued >=, however that is still
suboptimal.

This patch adds accounting for requests that have been dequeued from the io
scheduler, but not freed yet.  These are q->in_flight.  allocated_requests
- q->in_flight == requests_in_scheduler.  So the condition correctly
becomes

if (requests_in_scheduler == q->unplug_thresh)

instead.  I did a quick round of testing, and for dbench on a SCSI disk the
number of timer induced unplugs was reduced from 13 to 5 :-).  Not a huge
number, but there might be cases where it's more significant.  Either way,
it gets ->unplug_thresh always right, which the old logic didn't.

22 years ago[PATCH] unplugging: md update
Andrew Morton [Mon, 12 Apr 2004 07:16:17 +0000 (00:16 -0700)]
[PATCH] unplugging: md update

From: Neil Brown <neilb@cse.unsw.edu.au>

I've made a bunch of changes to the 'md' bits - largely moving the
unplugging into the individual personalities which know more about which
drives are actually in use.

22 years ago[PATCH] Use BIO_RW_SYNC in swap write page
Andrew Morton [Mon, 12 Apr 2004 07:16:04 +0000 (00:16 -0700)]
[PATCH] Use BIO_RW_SYNC in swap write page

From: Jens Axboe <axboe@suse.de>

Dog slow software suspend found this one. If WB_SYNC_ALL, then you need
to mark the bio as sync as well.

This is because swap_writepage() does a remove_exclusive_swap_page() (going
to __delete_from_swap_cache -> __remove_from_page_cache) which can kill
page->mapping, thus aops->sync_page() has nothing to work with for unplugging
the address space.

22 years ago[PATCH] per-backing dev unplugging
Andrew Morton [Mon, 12 Apr 2004 07:15:51 +0000 (00:15 -0700)]
[PATCH] per-backing dev unplugging

From: Jens Axboe <axboe@suse.de>,
      Chris Mason,
      me, others.

The global unplug list causes horrid spinlock contention on many-disk
many-CPU setups - throughput is worse than halved.

The other problem with the global unplugging is of course that it will cause
the unplugging of queues which are unrelated to the I/O upon which the caller
is about to wait.

So what we do to solve these problems is to remove the global unplug and set
up the infrastructure under which the VFS can tell the block layer to unplug
only those queues which are relevant to the page or buffer_head whcih is
about to be waited upon.

We do this via the very appropriate address_space->backing_dev_info structure.

Most of the complexity is in devicemapper, MD and swapper_space, because for
these backing devices, multiple queues may need to be unplugged to complete a
page/buffer I/O.  In each case we ensure that data structures are in place to
permit us to identify all the lower-level queues which contribute to the
higher-level backing_dev_info.  Each contributing queue is told to unplug in
response to a higher-level unplug.

To simplify things in various places we also introduce the concept of a
"synchronous BIO": it is tagged with BIO_RW_SYNC.  The block layer will
perform an immediate unplug when it sees one of these go past.

22 years ago[PATCH] dmL remove __dm_request
Andrew Morton [Mon, 12 Apr 2004 07:15:36 +0000 (00:15 -0700)]
[PATCH] dmL remove __dm_request

From: Joe Thornber <thornber@redhat.com>

dm.c: remove __dm_request (merge with previous patch).

22 years ago[PATCH] Implement queue congestion callout for device mapper
Andrew Morton [Mon, 12 Apr 2004 07:15:25 +0000 (00:15 -0700)]
[PATCH] Implement queue congestion callout for device mapper

From: Miquel van Smoorenburg <miquels@cistron.nl>
      Joe Thornber <thornber@redhat.com>

This implements the queue congestion callout for DM stacks.  To make
bdi_read/write_congested() return correct information.

- md->lock protects all fields in md _except_ md->map
- md->map_lock protects md->map
- Anyone who wants to read md->map should use dm_get_table() which
  increments the tables reference count.

This means the spin lock is now only held for the duration of a
reference count increment.

Udpate:

dm.c: protect md->map with a rw spin lock rather than the md->lock
semaphore.  Also ensure that everyone accesses md->map through
dm_get_table(), rather than directly.

22 years ago[PATCH] Add queue congestion callout
Andrew Morton [Mon, 12 Apr 2004 07:15:12 +0000 (00:15 -0700)]
[PATCH] Add queue congestion callout

From: Miquel van Smoorenburg <miquels@cistron.nl>

The VM and VFS use the address_space_backing_dev_info to track the realtime
status of the device which backs the mapping.  The read_congested and
write_congested fields are used to determine whether a read or write
against that device may block.

We use this infrastructure to

a) allow pdflush to service many queues in parallel (by not getting
   stuck on any particular one) and

b) to avoid undesirable and uncontrolled latencies in places such as
   page reclaim and

c) To avoid blocking in readahead operations

The current code only supports simple disk queues (and I have a patch here
for NFS).  Stacked queues (MD and DM) don't get this information right and
problems were expected.  Efficiency problems have now been noted and it's
time to fix it.

This patch lays down the infrastructure which permits the queue
implementation to get control when someone at a higher level is querying
the queue's congestion state.  So DM (for example) can run around and
examine all the queues which contribute to the higher-level queue.

It also adds bdi_rw_congested() for code in xfs and ext2 that calls both
bdi_read_congested() and bdi_write_congested() in a row, and it was "free"
anyway.

22 years ago[PATCH] s390: rewritten qeth driver
Andrew Morton [Mon, 12 Apr 2004 07:14:58 +0000 (00:14 -0700)]
[PATCH] s390: rewritten qeth driver

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

The rewritten qeth network driver.

22 years ago[PATCH] s390: crypto device driver part 2
Andrew Morton [Mon, 12 Apr 2004 06:44:01 +0000 (23:44 -0700)]
[PATCH] s390: crypto device driver part 2

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

The crypto device driver for PCICA & PCICC cards, part 2.

22 years ago[PATCH] s390: crypto device driver part 1
Andrew Morton [Mon, 12 Apr 2004 06:43:48 +0000 (23:43 -0700)]
[PATCH] s390: crypto device driver part 1

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

The crypto device driver for PCICA & PCICC cards, part 1.

22 years ago[PATCH] s390: zfcp log messages part 2
Andrew Morton [Mon, 12 Apr 2004 06:43:34 +0000 (23:43 -0700)]
[PATCH] s390: zfcp log messages part 2

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

zfcp host adapter log message cleanup part 2:
 - Shorten log output.
 - Increase log level for some messages.
 - Always print leading zeroes for wwpn and fcp-lun.

22 years ago[PATCH] s390: zfcp log messages part 1
Andrew Morton [Mon, 12 Apr 2004 06:43:21 +0000 (23:43 -0700)]
[PATCH] s390: zfcp log messages part 1

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

zfcp host adapter log message cleanup part 1:
 - Shorten log output.
 - Increase log level for some messages.
 - Always print leading zeroes for wwpn and fcp-lun.

22 years ago[PATCH] s390: zfcp fixes (without kfree hack)
Andrew Morton [Mon, 12 Apr 2004 06:43:08 +0000 (23:43 -0700)]
[PATCH] s390: zfcp fixes (without kfree hack)

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

zfcp host adapter fixes:
 - Reuse freed scsi_ids and scsi_luns for mappings.
 - Order list of ports/units by assigned scsi_id/scsi_lun.
 - Don't update max_id/max_lun in scsi_host anymore.
 - Get rid of all magics.
 - Add owner field to ccw_driver structure.
 - Avoid deadlock on bus->subsys.rwsem.
 - Use a macro for all scsi device sysfs attributes.
 - Change proc_name from "dummy" to "zfcp".
 - Don't wait for scsi_add_device to complete while holding a semaphore.
 - Cleanup include files in zfcp_aux.c & zfcp_def.h.
 - Get rid of zfcp_erp_fsf_req_handler.
 - Proper link up/down handling.
 - Avoid possible NULL pointer dereference in zfcp_erp_schedule_work.
 - Remove module_exit function. Without an external release function for
   the zfcp_port/zfcp_unit objects module unloading is racy.

22 years ago[PATCH] s390: dcss block driver fix
Andrew Morton [Mon, 12 Apr 2004 06:42:53 +0000 (23:42 -0700)]
[PATCH] s390: dcss block driver fix

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

DCSS block device driver changes:
 - Fix remove_store function, put_device is called too early.

22 years ago[PATCH] s390: network driver fixes
Andrew Morton [Mon, 12 Apr 2004 06:42:41 +0000 (23:42 -0700)]
[PATCH] s390: network driver fixes

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

Network driver changes:
 - ctc: move kfree of driver structure after the last use of it.
 - netiucv: stay in state startwait if peer is down.
 - lcs: initialize ipm_list and unregister netdev only if it is present.

22 years ago[PATCH] s390: dasd driver fix
Andrew Morton [Mon, 12 Apr 2004 06:42:28 +0000 (23:42 -0700)]
[PATCH] s390: dasd driver fix

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

dasd driver changes:
 - Fix check for device type in error recovery for fba devices.

22 years ago[PATCH] s390: tape driver fixes
Andrew Morton [Mon, 12 Apr 2004 06:42:16 +0000 (23:42 -0700)]
[PATCH] s390: tape driver fixes

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

Tape driver changes:
 - Add missing break in tape_34xx_work_handler to avoid misleading message.
 - Cleanup offline/remove code.

22 years ago[PATCH] s390: common i/o layer
Andrew Morton [Mon, 12 Apr 2004 06:42:02 +0000 (23:42 -0700)]
[PATCH] s390: common i/o layer

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

Common i/o layer changes:
 - Avoid de-registering a ccwgroup device multiple times.
 - Remove check for channel path objects in get_subchannel_by_schid.
   Channel patch objects are never in the bus list.
 - Avoid NULL pointer deref. in qdio_unmark_q.
 - Fix reference counting on subchannel objects.
 - Add shutdown function to terminate i/o and disable subchannels at reipl.
 - Remove all ccwgroup devices if the ccwgroup driver is unregistered.

22 years ago[PATCH] s390: core s390
Andrew Morton [Mon, 12 Apr 2004 06:41:49 +0000 (23:41 -0700)]
[PATCH] s390: core s390

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

s390 core changes:
 - Fix _raw_spin_trylock for 64 bit.
 - Add clarification to s390 debug debug documentation.

22 years ago[PATCH] hugetlb consolidation
Andrew Morton [Mon, 12 Apr 2004 06:41:36 +0000 (23:41 -0700)]
[PATCH] hugetlb consolidation

From: William Lee Irwin III <wli@holomorphy.com>

The following patch consolidates redundant code in various hugetlb
implementations.  I took the liberty of renaming a few things, since the
code was all moved anyway, and it has the benefit of helping to catch
missed conversions and/or consolidations.

22 years ago[PATCH] missing \n in timer_tsc.c
Andrew Morton [Mon, 12 Apr 2004 06:41:23 +0000 (23:41 -0700)]
[PATCH] missing \n in timer_tsc.c

From: Arjan van de Ven <arjanv@redhat.com>

patch below fixes a missing \n in a printk; without this you get to see a
<4> in the middle of that line...

22 years ago[PATCH] 68knommu: add support for 64MHz clock for ColdFire boards
Andrew Morton [Mon, 12 Apr 2004 06:41:09 +0000 (23:41 -0700)]
[PATCH] 68knommu: add support for 64MHz clock for ColdFire boards

From: <gerg@snapgear.com>

Add support for boards that have a 64MHz clock to common Coldfire header.

22 years ago[PATCH] 68knommu: 68EZ328/ucdimm setup code printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:40:57 +0000 (23:40 -0700)]
[PATCH] 68knommu: 68EZ328/ucdimm setup code printk cleanup

From: <gerg@snapgear.com>

Add type specifier to printk calls in 68EZ328/ucdimm setup code.  Patch
original from kernel janitors.

22 years ago[PATCH] 68knommu: cleanup startup code for 68EZ328 DragonEngine board
Andrew Morton [Mon, 12 Apr 2004 06:40:43 +0000 (23:40 -0700)]
[PATCH] 68knommu: cleanup startup code for 68EZ328 DragonEngine board

From: <gerg@snapgear.com>

Clean up debug trace in startup code of 68EZ328 DragonEngine board.

22 years ago[PATCH] 68knommu: mk68knommu DragonEngine setup code printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:40:31 +0000 (23:40 -0700)]
[PATCH] 68knommu: mk68knommu DragonEngine setup code printk cleanup

From: <gerg@snapgear.com>

A couple of fixes for the DragonEngine sepcific setup code:

. remove cs8900 ethernet setup from here
. add type specifier to printk calls (from kernel janitors)

22 years ago[PATCH] 68knommu: cleanup Motorola 68360 ints code
Andrew Morton [Mon, 12 Apr 2004 06:40:17 +0000 (23:40 -0700)]
[PATCH] 68knommu: cleanup Motorola 68360 ints code

From: <gerg@snapgear.com>

Some fixes for the 68360 common ints management code:

. use irqreturn_t for return type of interrupt handlers
. add type field to printk calls (from kernel janitors)
. there is no loop in show_interrupts(), don't use continue

22 years ago[PATCH] 68knommu: cleanup Motorola 68328 ints code
Andrew Morton [Mon, 12 Apr 2004 06:40:05 +0000 (23:40 -0700)]
[PATCH] 68knommu: cleanup Motorola 68328 ints code

From: <gerg@snapgear.com>

Some fixes for the 68328 common ints management code:

. use irqreturn_t for return type of interrupt handlers
. clean up asm code to be gcc-3.3.x clean
. add type field to printk calls (from kernel janitors)
. there is no loop in show_interrupts(), don't use continue

22 years ago[PATCH] 68knommu: use irqreturn_t in Motorola 68328 setup code
Andrew Morton [Mon, 12 Apr 2004 06:39:51 +0000 (23:39 -0700)]
[PATCH] 68knommu: use irqreturn_t in Motorola 68328 setup code

From: <gerg@snapgear.com>

A number of small fixes for the Motorola 68328 setup code:

. fix interrupt routine return types to be irqreturn_t
. add type specifier to printk calls (from kernel janitors)
. rework asm code to be gcc-3.3.x clean

22 years ago[PATCH] 68knommu: use irqreturn_t in ColdFire 5407 setup code
Andrew Morton [Mon, 12 Apr 2004 06:39:39 +0000 (23:39 -0700)]
[PATCH] 68knommu: use irqreturn_t in ColdFire 5407 setup code

From: <gerg@snapgear.com>

Fixes to the Motorola ColdFire 5407 setup code:

. fix interrupt routine return types to be irqreturn_t
. add DMA base addresses array
. support compile time setting of kernel boot arguments

22 years ago[PATCH] m68knommu: 68EZ328 config.c printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:39:26 +0000 (23:39 -0700)]
[PATCH] m68knommu: 68EZ328 config.c printk cleanup

From: <gerg@snapgear.com>

Add type specifier to printk calls.  Patch originally from kernel janitors.

22 years ago[PATCH] m68knommu: 68360 config.c printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:39:13 +0000 (23:39 -0700)]
[PATCH] m68knommu: 68360 config.c printk cleanup

From: <gerg@snapgear.com>

Add type specifier to printk calls.  Patch originally from kernel janitors.

22 years ago[PATCH] m68knommu: 68360 commproc.c printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:39:00 +0000 (23:39 -0700)]
[PATCH] m68knommu: 68360 commproc.c printk cleanup

From: <gerg@snapgear.com>

Add type specifier to printk calls.  Original patch from kernel janitors.

22 years ago[PATCH] m68knommu: conditional ROMfs copy for 5407 CLEOPATRA board
Andrew Morton [Mon, 12 Apr 2004 06:38:48 +0000 (23:38 -0700)]
[PATCH] m68knommu: conditional ROMfs copy for 5407 CLEOPATRA board

From: <gerg@snapgear.com>

Conditionaly copy an attached ROMfs filesystem in memory on kernel startup.
This should only be done if there really is a ROMfs there.

22 years ago[PATCH] m68knommu: mm/5307/vectors.c printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:38:35 +0000 (23:38 -0700)]
[PATCH] m68knommu: mm/5307/vectors.c printk cleanup

From: <gerg@snapgear.com>

Add type field to printk call.  Original patch supplied bu kernel janitors.

22 years ago[PATCH] m68knommu: use irqreturn_t in ColdFire 5307 setup code
Andrew Morton [Mon, 12 Apr 2004 06:38:21 +0000 (23:38 -0700)]
[PATCH] m68knommu: use irqreturn_t in ColdFire 5307 setup code

From: <gerg@snapgear.com>

Fixes to the Motorola ColdFire 5307 setup code:

. fix interrupt routine return types to be irqreturn_t
. add DMA base addresses array

22 years ago[PATCH] m68knommu: cleanup ColdFire/5307 ints code
Andrew Morton [Mon, 12 Apr 2004 06:38:08 +0000 (23:38 -0700)]
[PATCH] m68knommu: cleanup ColdFire/5307 ints code

From: <gerg@snapgear.com>

. add type field to printk calls (from kernel janitors)
. there is no loop in show_interrupts(), don't use continue

22 years ago[PATCH] m68knommu: add start code for COBRA5282 board
Andrew Morton [Mon, 12 Apr 2004 06:37:56 +0000 (23:37 -0700)]
[PATCH] m68knommu: add start code for COBRA5282 board

From: <gerg@snapgear.com>

Add start up code specific to the newly added COBRA5282 board.

22 years ago[PATCH] m68knommu: use irqreturn_t in ColdFire 5282 setup code
Andrew Morton [Mon, 12 Apr 2004 06:37:43 +0000 (23:37 -0700)]
[PATCH] m68knommu: use irqreturn_t in ColdFire 5282 setup code

From: <gerg@snapgear.com>

Fixes to the Motorola ColdFire 5282 setup code:

. fix interrupt routine return types to be irqreturn_t
. add DMA base addresses array

22 years ago[PATCH] m68knommu: add start code for COBRA5272 board
Andrew Morton [Mon, 12 Apr 2004 06:37:30 +0000 (23:37 -0700)]
[PATCH] m68knommu: add start code for COBRA5272 board

From: <gerg@snapgear.com>

Add startup code specific to newly supported COBRA5272 board.

22 years ago[PATCH] m68knommu: auto-size DRAM on Motorola/5272 ColdFire board
Andrew Morton [Mon, 12 Apr 2004 06:37:16 +0000 (23:37 -0700)]
[PATCH] m68knommu: auto-size DRAM on Motorola/5272 ColdFire board

From: <gerg@snapgear.com>

Allow for auto-detecting the size of the DRAM in the startup code for the
Motorola/5272 (ColdFire) board.  Use the DRAM sizing register, since it will
have been setup by the debug boot monitor (dBUG).

22 years ago[PATCH] m68knommu: timers.c printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:37:03 +0000 (23:37 -0700)]
[PATCH] m68knommu: timers.c printk cleanup

From: <gerg@snapgear.com>

Add type field to printk calls in m68knommu timers.c

22 years ago[PATCH] m68knommu/ColdFire base DMA addresses
Andrew Morton [Mon, 12 Apr 2004 06:36:50 +0000 (23:36 -0700)]
[PATCH] m68knommu/ColdFire base DMA addresses

From: <gerg@snapgear.com>

Define the DMA register set base address array for those m68knommu/ColdFire
CPU's that have a DMA engines.

22 years ago[PATCH] m68knommu: mm/init.c printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:36:37 +0000 (23:36 -0700)]
[PATCH] m68knommu: mm/init.c printk cleanup

From: <gerg@snapgear.com>

Add type field to printk calls in m68knommu mm/init.c.  Patch originally
from kernel janitors.

22 years ago[PATCH] m68knommu: fault.c printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:36:26 +0000 (23:36 -0700)]
[PATCH] m68knommu: fault.c printk cleanup

From: <gerg@snapgear.com>

Add type field to printk calls.  Patch original provided by kernel
janitors.

22 years ago[PATCH] m68knommu: add senTec vendor support to Makefile
Andrew Morton [Mon, 12 Apr 2004 06:36:13 +0000 (23:36 -0700)]
[PATCH] m68knommu: add senTec vendor support to Makefile

From: <gerg@snapgear.com>

Add build support for the senTec vendor to m68knommu architecture Makefile.

22 years ago[PATCH] m68knommu/coldfire: fix gcc cpu define
Andrew Morton [Mon, 12 Apr 2004 06:35:59 +0000 (23:35 -0700)]
[PATCH] m68knommu/coldfire: fix gcc cpu define

From: <gerg@snapgear.com>

Fix architecture/cpu defines to support those used by modern versions of
gcc (that is gcc > 3.3.x) for m68knommu.  The standard for defining
ColdFire architectures is no longer __mcf5200__, it is now __mcoldfire__.
This patch fixes all the occurances in the m68knommu/lib functions.

22 years ago[PATCH] m68knommu: platform additions in linker script
Andrew Morton [Mon, 12 Apr 2004 06:35:47 +0000 (23:35 -0700)]
[PATCH] m68knommu: platform additions in linker script

From: <gerg@snapgear.com>

A couple of additions to the linker script for m68knommu platforms:

. add support for COBRA5272 and COBRA5282 boards
. link in .rodata.str1 generated by gcc-3.3.x compilers

22 years ago[PATCH] m68knommu cleanup traps.c (printk and dump_stack)
Andrew Morton [Mon, 12 Apr 2004 06:35:33 +0000 (23:35 -0700)]
[PATCH] m68knommu cleanup traps.c (printk and dump_stack)

From: <gerg@snapgear.com>

Add type to all printk calls in m68knommu traps.c.  Also added a modern
dump_stack function.

22 years ago[PATCH] m68knommu cleanup setup.c (printk and irqreturn_t)
Andrew Morton [Mon, 12 Apr 2004 06:35:21 +0000 (23:35 -0700)]
[PATCH] m68knommu cleanup setup.c (printk and irqreturn_t)

From: <gerg@snapgear.com>

Cleanup m68knommu/kernel/setup.c.  Add type to all printk calls, remove
obsolete framebuffer setup and fix a few irqreturn_t for interrupt handlers
in prototypes.

Printk cleanup originally from kernel janitors.

22 years ago[PATCH] m68knommu: build dma.c
Andrew Morton [Mon, 12 Apr 2004 06:35:08 +0000 (23:35 -0700)]
[PATCH] m68knommu: build dma.c

From: <gerg@snapgear.com>

Add local m68knommu dma allocation code to build list.

22 years ago[PATCH] m68knommu: coherent dma allocation
Andrew Morton [Mon, 12 Apr 2004 06:34:55 +0000 (23:34 -0700)]
[PATCH] m68knommu: coherent dma allocation

From: <gerg@snapgear.com>

Create the coherent DMA allocation functions for m68knommu.  No current
hardware in this class requires anything special, so it just just does
normal allocations after sanity checks.

22 years ago[PATCH] m68knommu: comempci.c printk cleanup
Andrew Morton [Mon, 12 Apr 2004 06:34:41 +0000 (23:34 -0700)]
[PATCH] m68knommu: comempci.c printk cleanup

From: <gerg@snapgear.com>

Cleanup m68knommu's comempci.c support code.  Add type to all printk calls.
Patch originally from kernel janitors.

22 years ago[PATCH] m68knommu: Kconfig cleanup
Andrew Morton [Mon, 12 Apr 2004 06:34:27 +0000 (23:34 -0700)]
[PATCH] m68knommu: Kconfig cleanup

From: <gerg@snapgear.com>

A few changes to the m68knommu Kconfig:

. Add support for 64MHz clocked CPU's
. Add support for selecting the COBRA5272 and COBRA5282 boards
. Use drivers/Kconfig for driver configuration
. Allow configuring compilation with frame-pointer

22 years ago[PATCH] m68knommu: fix kernel_thread()
Andrew Morton [Mon, 12 Apr 2004 06:34:13 +0000 (23:34 -0700)]
[PATCH] m68knommu: fix kernel_thread()

From: <gerg@snapgear.com>

Some kernel janitor clean ups of printk for the m68knommu specific process
code.

And more importantly a fix to the kernel_thread() asm code to correctly
return the pid back to the return var from the clone system call.

22 years ago[PATCH] m68knommu: create dma-mapping.h
Andrew Morton [Mon, 12 Apr 2004 06:34:01 +0000 (23:34 -0700)]
[PATCH] m68knommu: create dma-mapping.h

From: <gerg@snapgear.com>

Create a dma-mapping.h for m68knommu architecture.

22 years ago[PATCH] v850: make v850 dma-mapping.h header work when !CONFIG_PCI
Andrew Morton [Mon, 12 Apr 2004 06:33:47 +0000 (23:33 -0700)]
[PATCH] v850: make v850 dma-mapping.h header work when !CONFIG_PCI

From: <miles@mcspd15.ucom.lsi.nec.co.jp> (Miles Bader)

Is this something that should be done in <asm-generic/dma-mapping.h>?

22 years ago[PATCH] v850: use volatile qualifier on v850 test-n-bitop asm statements
Andrew Morton [Mon, 12 Apr 2004 06:33:35 +0000 (23:33 -0700)]
[PATCH] v850: use volatile qualifier on v850 test-n-bitop asm statements

From: <miles@mcspd15.ucom.lsi.nec.co.jp> (Miles Bader)

Otherwise the compiler can delete them (this is one of those "how on earth
did it ever work before" moments).

22 years ago[PATCH] fix posix-timers to have proper per-process scope
Andrew Morton [Mon, 12 Apr 2004 06:33:21 +0000 (23:33 -0700)]
[PATCH] fix posix-timers to have proper per-process scope

From: Roland McGrath <roland@redhat.com>

The posix-timers implementation associates timers with the creating thread
and destroys timers when their creator thread dies.  POSIX clearly
specifies that these timers are per-process, and a timer should not be torn
down when the thread that created it exits.  I hope there won't be any
controversy on what the correct semantics are here, since POSIX is clear
and the Linux feature is called "posix-timers".

The attached program built with NPTL -lrt -lpthread demonstrates the bug.
The program is correct by POSIX, but fails on Linux.  Note that a until
just the other day, NPTL had a trivial bug that always disabled its use of
kernel timer syscalls (check strace for lack of timer_create/SYS_259).  So
unless you have built your own NPTL libs very recently, you probably won't
see the kernel calls actually used by this program.

Also attached is my patch to fix this.  It (you guessed it) moves the
posix_timers field from task_struct to signal_struct.  Access is now
governed by the siglock instead of the task lock.  exit_itimers is called
from __exit_signal, i.e.  only on the death of the last thread in the
group, rather than from do_exit for every thread.  Timers' it_process
fields store the group leader's pointer, which won't die.  For the case of
SIGEV_THREAD_ID, I hold a ref on the task_struct for it_process to stay
robust in case the target thread dies; the ref is released and the dangling
pointer cleared when the timer fires and the target thread is dead.  (This
should only come up in a buggy user program, so noone cares exactly how the
kernel handles that case.  But I think what I did is robust and sensical.)

/* Test for bogus per-thread deletion of timers.  */

#include <stdio.h>
#include <error.h>
#include <time.h>
#include <signal.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <pthread.h>

/* Creating timers in another thread should work too.  */
static void *do_timer_create(void *arg)
{
struct sigevent *const sigev = arg;
timer_t *const timerId = sigev->sigev_value.sival_ptr;
if (timer_create(CLOCK_REALTIME, sigev, timerId) < 0) {
perror("timer_create");
return NULL;
}
return timerId;
}

int main(void)
{
int i, res;
timer_t timerId;
struct itimerspec itval;
struct sigevent sigev;

itval.it_interval.tv_sec = 2;
itval.it_interval.tv_nsec = 0;
itval.it_value.tv_sec = 2;
itval.it_value.tv_nsec = 0;

sigev.sigev_notify = SIGEV_SIGNAL;
sigev.sigev_signo = SIGALRM;
sigev.sigev_value.sival_ptr = (void *)&timerId;

for (i = 0; i < 100; i++) {
printf("cnt = %d\n", i);

pthread_t thr;
res = pthread_create(&thr, NULL, &do_timer_create, &sigev);
if (res) {
error(0, res, "pthread_create");
continue;
}
void *val;
res = pthread_join(thr, &val);
if (res) {
error(0, res, "pthread_join");
continue;
}
if (val == NULL)
continue;

res = timer_settime(timerId, 0, &itval, NULL);
if (res < 0)
perror("timer_settime");

res = timer_delete(timerId);
if (res < 0)
perror("timer_delete");
}

return 0;
}