]> git.hungrycats.org Git - linux/log
linux
22 years ago[PATCH] Really enable NUMA API on x86-64
Andrew Morton [Tue, 25 May 2004 01:43:39 +0000 (18:43 -0700)]
[PATCH] Really enable NUMA API on x86-64

From: Andi Kleen <ak@muc.de>

Really enable the NUMA API system calls on x86-64.

22 years ago[PATCH] remap_file_pages: fix syscall declaration
Andrew Morton [Tue, 25 May 2004 01:43:28 +0000 (18:43 -0700)]
[PATCH] remap_file_pages: fix syscall declaration

Signed-off-by: Hugh Dickins <hugh@veritas.com>
sys_remap_file_pages is declared as asmlinkage in mm/fremap.c, but is the one
syscall declared without asmlinkage in include/linux/syscalls.h.

22 years ago[PATCH] remap_file_pages: implement MAP_POPULATE for all protections
Andrew Morton [Tue, 25 May 2004 01:43:17 +0000 (18:43 -0700)]
[PATCH] remap_file_pages: implement MAP_POPULATE for all protections

Signed-off-by: Hugh Dickins <hugh@veritas.com>
It seems eccentric to implement MAP_POPULATE only on PROT_NONE mappings:
do_mmap_pgoff is passing down prot, then sys_remap_file_pages verifies it's
not set.  I guess that's an oversight from when we realized that the prot arg
to sys_remap_file_pages was misdesigned.

There's another oddity whose heritage is harder for me to understand, so
please let me leave it to you: sys_remap_file_pages is declared as asmlinkage
in mm/fremap.c, but is the one syscall declared without asmlinkage in
include/linux/syscalls.h.

22 years ago[PATCH] Fix for lockup in reiserfs acl/xattrs
Andrew Morton [Tue, 25 May 2004 01:43:06 +0000 (18:43 -0700)]
[PATCH] Fix for lockup in reiserfs acl/xattrs

From: Jeff Mahoney <jeffm@suse.com>

The following is a patch to fix a locking problem in ACL/xattr code. It
manifests when a user attempts to set an xattr on a file which they do
not own, and on which an ACL is applied.

What happens is this:
reiserfs_setxattr [write lock inode xattr sem]
  ->xattr_set
    -> lookup
       -> __reiserfs_permission [if conditions above are met, and need_lock=
 is
          unset, read lock inode xattr sem] *lockup*

Since we already keep track of when to lock during permission calls, the
fix is simple: just make the locking conditional as it was before.

Credits to Andreas Gruenbacher <agruen@suse.de>

22 years ago[PATCH] UDF: directory reading fix
Andrew Morton [Tue, 25 May 2004 01:42:56 +0000 (18:42 -0700)]
[PATCH] UDF: directory reading fix

From: Ben Fennema <bfennema@falcon.csc.calpoly.edu>

The problem occured when files were stored on the disc in 16-bit per
character mode when all the upper bits were 0.  The fs module
converted the file name given by the user to a 8-bit per character
string to compare, so the comparison always failed.

The patch maps the file from disc into the current locale and then
compares it directly to the file name given by the user.

22 years ago[PATCH] bk-kernel-howto reversion
Andrew Morton [Tue, 25 May 2004 01:42:45 +0000 (18:42 -0700)]
[PATCH] bk-kernel-howto reversion

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

This one snuck through - Jeff prefers the bk:// addresses.

22 years ago[PATCH] CREDITS is unmaintained
Andrew Morton [Tue, 25 May 2004 01:42:34 +0000 (18:42 -0700)]
[PATCH] CREDITS is unmaintained

From: Adrian Bunk <bunk@fs.tum.de>

This information seems to be quite outdated.

22 years ago[PATCH] H8/300 ne driver module fix
Andrew Morton [Tue, 25 May 2004 01:42:23 +0000 (18:42 -0700)]
[PATCH] H8/300 ne driver module fix

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- module support fix

22 years ago[PATCH] H8/300 module fix
Andrew Morton [Tue, 25 May 2004 01:42:12 +0000 (18:42 -0700)]
[PATCH] H8/300 module fix

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- fix relocation
- define SYMBOL_PREFIX

22 years ago[PATCH] Fix various memory leaks
Andrew Morton [Tue, 25 May 2004 01:42:00 +0000 (18:42 -0700)]
[PATCH] Fix various memory leaks

From: Yury Umanets <torque@ukrpost.net>

Thanks to smatch I have found few memory leaks and other related issues.

22 years ago[PATCH] v4l: use saa7111 i2c module in V4L MXB driver
Andrew Morton [Tue, 25 May 2004 01:41:49 +0000 (18:41 -0700)]
[PATCH] v4l: use saa7111 i2c module in V4L MXB driver

From: Michael Hunold <hunold@convergence.de>

The attached patch changes my "Multimedia eXtension Board" (MXB)
Video4Linux-driver to use the standard saa7111 video decoder infrastructure
(to which I recently submitted changes through Ronald Bultje) instead of
some home-brewn direct-access stuff.

Nothing serious, but it removes code duplication and makes the code use the
video decoder api.

22 years ago[PATCH] initramfs uncpio fix
Andrew Morton [Tue, 25 May 2004 01:41:40 +0000 (18:41 -0700)]
[PATCH] initramfs uncpio fix

From: <viro@parcelfarce.linux.theplanet.co.uk>

init/initramfs.c::do_skip() has an off-by-one that leads to unpacking
failures for some gzipped cpio images.  We have

static int __init do_skip(void)
{
        if (this_header + count <= next_header) {
                eat(count);
                return 1;
        } else {
                eat(next_header - this_header);
                state = next_state;
                return 0;
        }
}

and that <= should actually be <.  It almost never matters, since if we hit
the boundary case (header ending exactly on the gunzip window end) the
current variant will simply end up doing extra call of do_skip() when we
get to the next window and that will finish the work (assign state).  The
only exception is when we hit that in the last window.  That is, if there's
nothing after the final header (trailer).  Then we miss the final state
transition (Skip -> Reset) and get "junk in archive" panic.  Normally
cpio(1) pads the image to multiple of 512, so we actually have a bunch of
zeroes after the trailer.  And that almost always saves our butts - trailer
is followed by zeroes, so we get to Reset state just fine.

So we never see that on small in-kernel image (it's less than 512 bytes, so
it gets a lot of padding) and we almost never see that on external ones
(1:127 odds of hitting the bug).

22 years ago[PATCH] FAT: small fixes
Andrew Morton [Tue, 25 May 2004 01:41:29 +0000 (18:41 -0700)]
[PATCH] FAT: small fixes

From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

- use fat_fs_panic() instead of BUG() if it read a corrupted inode.

- add missing "\n".

22 years ago[PATCH] swsusp: fix swsusp with intel-agp
Andrew Morton [Tue, 25 May 2004 01:41:18 +0000 (18:41 -0700)]
[PATCH] swsusp: fix swsusp with intel-agp

From: Pavel Machek <pavel@suse.cz>

swsusp contained rather nasty bug where it killed machine when intel-agp or
anything else split kernel 4MB mapping.  Herbert Xu diagnosed this.  Fixed by
switching to "known good" mapping for during suspend/resume.

22 years ago[PATCH] Don't use "cut" in laptop mode control script -- it is in /usr.
Andrew Morton [Tue, 25 May 2004 01:41:07 +0000 (18:41 -0700)]
[PATCH] Don't use "cut" in laptop mode control script -- it is in /usr.

From: Bart Samwel <bart@samwel.tk>

We don't want to use "cut" in the laptop mode control script, because that
is in /usr.  This patch is from Jasper Spaans.

22 years ago[PATCH] matroxfb: Add support for mapping CRTC<->outputs at boot time
Andrew Morton [Tue, 25 May 2004 01:40:54 +0000 (18:40 -0700)]
[PATCH] matroxfb: Add support for mapping CRTC<->outputs at boot time

Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Some people expressed interest in having possibility to set CRTC <->
outputs mapping at boot time, without having to use 'matroxset' later after
kernel boots.

This patch adds option 'video=matroxfb:outputs:XYZ', where X sets which
CRTC will connect to primary output, Y sets secondary output and Z sets DVI
output.

In addition to that I also added missing memset() into maven, which was
broken since i2c was kobjectified.

22 years ago[PATCH] ext3: remove duplicated ext3_std_error() call
Andrew Morton [Tue, 25 May 2004 01:40:43 +0000 (18:40 -0700)]
[PATCH] ext3: remove duplicated ext3_std_error() call

From: Andi Kleen <ak@muc.de>

When start_transaction() detects an error it already calls ext3_std_error.
No need to do it again in the caller.

22 years ago[PATCH] make i386 dma-mapping.h includeable standalone
Andrew Morton [Tue, 25 May 2004 01:40:34 +0000 (18:40 -0700)]
[PATCH] make i386 dma-mapping.h includeable standalone

From: Christoph Hellwig <hch@lst.de>

From: Debian kernel package, author probably Herbert Xu

Include asm/io.h and asm/scatterlist.h in include/asm-i386/dma-mapping.h to
make it useable standalone, which is already true for most architectures.

22 years ago[PATCH] befs: typo fix
Andrew Morton [Tue, 25 May 2004 01:40:22 +0000 (18:40 -0700)]
[PATCH] befs: typo fix

From: "Sergey S. Kostyliov" <rathamahata@php4.ru>

Fix a typo in an error message.

22 years ago[PATCH] include linux/selection.h for color_table in drivers/video/tgafb.c
Andrew Morton [Tue, 25 May 2004 01:40:12 +0000 (18:40 -0700)]
[PATCH] include linux/selection.h for color_table in drivers/video/tgafb.c

From: Christoph Hellwig <hch@lst.de>

From: Debian kernel package, author probably Herbert Xu

22 years ago[PATCH] include linux/root_dev.h for ROOT_DEV in drivers/mtd/maps/uclinux.c
Andrew Morton [Tue, 25 May 2004 01:40:01 +0000 (18:40 -0700)]
[PATCH] include linux/root_dev.h for ROOT_DEV in drivers/mtd/maps/uclinux.c

From: Christoph Hellwig <hch@lst.de>

* Include linux/root_dev.h for ROOT_DEV in drivers/mtd/maps/uclinux.c

22 years ago[PATCH] missing init.h in drivers/mtd/chips/sharp.c
Andrew Morton [Tue, 25 May 2004 01:39:49 +0000 (18:39 -0700)]
[PATCH] missing init.h in drivers/mtd/chips/sharp.c

From: Christoph Hellwig <hch@lst.de>

again needed by most non-x86 arches.

 * Include linux/init.h for __init

22 years ago[PATCH] add one more neomagic audio device id
Andrew Morton [Tue, 25 May 2004 01:39:38 +0000 (18:39 -0700)]
[PATCH] add one more neomagic audio device id

From: Christoph Hellwig <hch@lst.de>

From: Mattia Monga via Debian kernel package

Add support for nm256xl+ in sound/oss/nm256_audio.c

22 years ago[PATCH] remove a dead variable from isofs
Andrew Morton [Tue, 25 May 2004 01:39:28 +0000 (18:39 -0700)]
[PATCH] remove a dead variable from isofs

From: Christoph Hellwig <hch@lst.de>

From: Debian kernel package, author is probably Herbert Xu

 * Do not get seqno since we will not use it in fs/isofs/inode.c

22 years ago[PATCH] fix a bash-ism in toplevel Makefile
Andrew Morton [Tue, 25 May 2004 01:39:18 +0000 (18:39 -0700)]
[PATCH] fix a bash-ism in toplevel Makefile

From: Christoph Hellwig <hch@lst.de>

From: Debian kernel package, author probably Herbert Xu.

 * Fixed bashism in Makefile

22 years ago[PATCH] befs: nls fix
Andrew Morton [Tue, 25 May 2004 01:39:07 +0000 (18:39 -0700)]
[PATCH] befs: nls fix

From: "Sergey S. Kostyliov" <rathamahata@php4.ru>

Fix nls support for character sets with character width large than 1.

22 years ago[PATCH] hfsplus: update dir time after change
Andrew Morton [Tue, 25 May 2004 01:38:57 +0000 (18:38 -0700)]
[PATCH] hfsplus: update dir time after change

From: Roman Zippel <zippel@linux-m68k.org>

Update dir ctime/mtime when adding/removing an entry.

22 years ago[PATCH] hfsplus: don't release not existing nodes
Andrew Morton [Tue, 25 May 2004 01:38:46 +0000 (18:38 -0700)]
[PATCH] hfsplus: don't release not existing nodes

From: Roman Zippel <zippel@linux-m68k.org>

When releasing a page don't try to release not existing nodes.

22 years ago[PATCH] hfsplus: completely remove half inserted catalog entry
Andrew Morton [Tue, 25 May 2004 01:38:35 +0000 (18:38 -0700)]
[PATCH] hfsplus: completely remove half inserted catalog entry

From: Roman Zippel <zippel@linux-m68k.org>

If the inserting of the file or dir record failed, remove the previously
inserted thread record.

22 years ago[PATCH] hfsplus: delete inode properly
Andrew Morton [Tue, 25 May 2004 01:38:25 +0000 (18:38 -0700)]
[PATCH] hfsplus: delete inode properly

From: Roman Zippel <zippel@linux-m68k.org>

Call hfsplus_delete_inode() to delete an inode when adding it to the
filesystem failed, so superblock info is correctly updated.

22 years ago[PATCH] hfsplus: correct dentry initialization for dir dentries.
Andrew Morton [Tue, 25 May 2004 01:38:14 +0000 (18:38 -0700)]
[PATCH] hfsplus: correct dentry initialization for dir dentries.

From: Roman Zippel <zippel@linux-m68k.org>

Initialize d_fsdata field also for dir dentries, use hfsplus_instantiate
helper function for this.

22 years ago[PATCH] hfsplus: fix key length for index nodes
Andrew Morton [Tue, 25 May 2004 01:38:04 +0000 (18:38 -0700)]
[PATCH] hfsplus: fix key length for index nodes

From: Roman Zippel <zippel@linux-m68k.org>

Use the correct key length for index nodes.

22 years ago[PATCH] Decrease srtuct file size by 8
Andrew Morton [Tue, 25 May 2004 01:37:53 +0000 (18:37 -0700)]
[PATCH] Decrease srtuct file size by 8

From: Kurt Garloff <garloff@suse.de>

Attached patch decreases the size of struct file by 8 bytes on 64 bit arches
by avoiding unecessary padding.

22 years ago[PATCH] remove stale comments above struct page
Andrew Morton [Tue, 25 May 2004 01:37:44 +0000 (18:37 -0700)]
[PATCH] remove stale comments above struct page

From: Christoph Hellwig <hch@lst.de>

struct page easily fits into a single cacheline with any recent CPU, and the
ordering isn't as described anymore anyway.

22 years ago[PATCH] don't export vma_prio_tree_next
Andrew Morton [Tue, 25 May 2004 01:37:33 +0000 (18:37 -0700)]
[PATCH] don't export vma_prio_tree_next

From: Christoph Hellwig <hch@lst.de>

there's no user is modules, the function isn't in mainline and I don't see why
modules should use it.

22 years ago[PATCH] Fix race condition with current->group_info
Andrew Morton [Tue, 25 May 2004 01:37:14 +0000 (18:37 -0700)]
[PATCH] Fix race condition with current->group_info

From: Olaf Kirch <okir@suse.de>

I have been chasing a corruption of current->group_info on PPC during NFS
stress tests.  The problem seems to be that nfsd is messing with its
group_info quite a bit, while some monitoring processes look at
/proc/<pid>/status and do a get_group_info/put_group_info without any locking.

This problem can be reproduced on ppc platforms within a few seconds if you
generate some NFS load and do a "cat /proc/XXX/status" of an nfsd thread in a
tight loop.

I therefore think changes to current->group_info, and querying it from a
different process, needs to be protected using the task_lock.

(akpm: task->group_info here is safe against exit() because the task holds a
ref on group_info which is released in __put_task_struct, and the /proc file
has a ref on the task_struct).

22 years ago[PATCH] ep_send_events() stack reduction
Andrew Morton [Tue, 25 May 2004 01:36:57 +0000 (18:36 -0700)]
[PATCH] ep_send_events() stack reduction

ep_send_events() uses ~350 bytes of stack for a local buffer of events to send
to userspace.  The patch fixes that by removing the double-buffering
altogether.  A pipe-based microbenchmark from Davide Libenzi
<davidel@xmailserver.org> was sped up by 1-2%.

22 years ago[PATCH] Fix the mangled-oops-output-on-SMP problem
Andrew Morton [Tue, 25 May 2004 01:36:46 +0000 (18:36 -0700)]
[PATCH] Fix the mangled-oops-output-on-SMP problem

From: Ingo Molnar <mingo@elte.hu>

printk currently does

if (oops_in_progres)
bust_printk_locks();

which means that once we oops, the printk locking is 100% ineffective and
multiple CPUs make an unreadable mess on a serial console.  It's a significant
development hassle.

Fix that up by only popping locks once per ten seconds.

akpm@osdl.org did:

  - Bump the timeout to 30 seconds - 9600 baud is slow.

  - Handle jiffy wraps: change the logic so that we only skip the lockbust
    if the current time is within 30 seconds of the previous lockbusting
    attempt.

22 years ago[PATCH] Prevent scary warnings from knfsd
Andrew Morton [Tue, 25 May 2004 01:36:31 +0000 (18:36 -0700)]
[PATCH] Prevent scary warnings from knfsd

From: "J. Bruce Fields" <bfields@fieldses.org>

The kernel currently prints:

 nfsd: nobody listening for auth.unix.ip upcall; has some daemon not been started?

on every bootup, during initscripts.

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

  It was part of the recent set of idmapper patches.  Bruce wanted the admin
  to get a warning when the idmapper daemon wasn't running.  I thought the
  same warning should apply to any daemon that responded to upcalls.

  In the case of auth.unix.ip it isn't strictly necessary for a daemon to be
  running (for comparability with 2.4).

  You can get rid of the warning by doing:

    mount -t nfsd nfsd /proc/fs/nfs

  before mountd is started (init scripts should start doing this I hope, but
  distributions don't tend to use the init script from nfs-utils, so it is
  hard to push it).  This will trigger mountd to listen on auth.unix.ip and
  others.

That's a hassle, so Bruce's patch limits the warning purely to the new
idmapper cache.  It provides a callback in the cache_detail that individual
caches can use to log messages when upcalls fail because a userspace daemon
not running.  Implement this method for the idmapping caches.

22 years ago[PATCH] Fix userspace include of linux/fs.h
Andrew Morton [Tue, 25 May 2004 01:36:18 +0000 (18:36 -0700)]
[PATCH] Fix userspace include of linux/fs.h

From: Mans Rullgard <mru@kth.se>

There are a few include which should have been under __KERNEL__.

22 years ago[PATCH] use SLAB_PANIC in ll_rw_blk.c
Andrew Morton [Tue, 25 May 2004 01:36:02 +0000 (18:36 -0700)]
[PATCH] use SLAB_PANIC in ll_rw_blk.c

22 years ago[PATCH] ppc64: avoid bogus real IRQ numbers
Andrew Morton [Tue, 25 May 2004 01:35:48 +0000 (18:35 -0700)]
[PATCH] ppc64: avoid bogus real IRQ numbers

Signed-off-by: Paul Mackerras <paulus@samba.org>
Early in the boot process on pSeries machines, we look in the Open Firmware
device tree for information about the interrupt assignments, and assign
virtual IRQ numbers for each physical IRQ.  There is currently a couple of
bugs in this code which result in us assigning virtual IRQs for nonexistent
physical IRQs.  This causes problems when we call the firmware to enable or
disable those nonexistent physical IRQs.  Some versions at least of the
firmware will hit an assertion failure and crash the machine when this
happens.

This patch fixes the bugs and ensures that we don't try and use nonexistent
physical IRQ numbers.  One bug was that we were mapping ISA interrupts,
which is unnecessary since virtual IRQ numbers 0 - 15 are reserved for
them.  The other was that when we had a PCI interrupt (which is always in
the range 1 to 4, corresponding to INTA to INTD) which didn't have a
mapping in the PCI host bridge above it, we were just using the original
number (usually 1) rather than ignoring it.

22 years ago[PATCH] ppc64: bump IOMMU_MAX_ORDER
Andrew Morton [Tue, 25 May 2004 01:35:31 +0000 (18:35 -0700)]
[PATCH] ppc64: bump IOMMU_MAX_ORDER

Signed-off-by: Anton Blanchard <anton@samba.org>
We have cards that want over 2MB of PCI consistent memory.  The
IOMAP_MAX_ORDER limit is just to catch bad drivers early, so we can bump
this a bit.

We want some room to grow but our maximum get_free_pages allocation on
ppc64 is currently 16MB, so it doesnt make sense to go above that.

22 years ago[PATCH] ppc64: small enter_rtas fix
Andrew Morton [Tue, 25 May 2004 01:35:13 +0000 (18:35 -0700)]
[PATCH] ppc64: small enter_rtas fix

From: Anton Blanchard <anton@samba.org>

enter_rtas now takes an unsigned long.

22 years ago[PATCH] dynamic addition of virtual disks on PPC64 iSeries
Andrew Morton [Tue, 25 May 2004 01:34:57 +0000 (18:34 -0700)]
[PATCH] dynamic addition of virtual disks on PPC64 iSeries

From: Stephen Rothwell <sfr@canb.auug.org.au>

This patch allows us to dynamically add virtual disks to an iSeries partition.
 It works like this: after you have created the virtual disk file on OS/400
and attached it to the Linux partition, you need to write to
/sys/bus/vio/drivers/viodasd/probe (it doesn't matter what you write).  This
will do the probe.  It calls add_disk() for each new disk, so we get hotplug
events as a side effect.

This was the nicest way I could think of doing this as the interface to the
hypervisor is polled ...

22 years ago[PATCH] ppc64: fix to viopath.c
Andrew Morton [Tue, 25 May 2004 01:34:44 +0000 (18:34 -0700)]
[PATCH] ppc64: fix to viopath.c

From: Anton Blanchard <anton@samba.org>

From: Olaf Hering and Nathan Lynch:

Fix a couple of nasty lurking bugs in viopath.c and add information
required to know if the iseries_veth module should be loaded on legacy
iSeries systems.

22 years ago[PATCH] ppc64: NUMA fixes
Andrew Morton [Tue, 25 May 2004 01:34:35 +0000 (18:34 -0700)]
[PATCH] ppc64: NUMA fixes

From: Anton Blanchard <anton@samba.org>

From: Anton Blanchard, Dave Hansen and Olof Johansson:

Fix multiple bugs in the ppc64 NUMA topology probe code.

- We were using HW cpu numbers instead of logical ones.  615, 630, 650,
  some 670 and some 690 SMP will all fail to boot without this patch.

- The old code would BUG() when it got confused (more NUMA zones than the
  kernel is configured for etc).

- The common depth calculation was incorrect.  Dave found an OF property
  that gives us exactly what we want.

- Things were broken on SMT machines.

The new code should work on those broken systems and should no longer BUG()
but fall back to a flat topology when it gets confused.

22 years ago[PATCH] ppc64: fix inline spinlocks
Andrew Morton [Tue, 25 May 2004 01:34:24 +0000 (18:34 -0700)]
[PATCH] ppc64: fix inline spinlocks

From: Anton Blanchard <anton@samba.org>

In _raw_spin_lock_flags we were branching to the wrong spot and would
restore random stuff to the MSR.

22 years ago[PATCH] Make early_cpu_detect() set x86_cache_alignment on pre-cpuid CPU's too
Dave Jones [Tue, 25 May 2004 01:05:12 +0000 (18:05 -0700)]
[PATCH] Make early_cpu_detect() set x86_cache_alignment on pre-cpuid CPU's too

From: Zdenek Pavlas <pavlas@nextra.cz>

On any x86 without cpuid, early_cpu_detect() left x86_cache_alignment as
zero, so kmem_cache_init() calls cache_estimate() with align == 0, and
it loops forever. I've tried this trivial fix, and it works for me.

Andi Kleen looked over this, and ok'd it.

22 years ago[PATCH] ppc64: better stack traces
Paul Mackerras [Mon, 24 May 2004 10:19:59 +0000 (03:19 -0700)]
[PATCH] ppc64: better stack traces

This improves the stack traces we get on PPC64 by putting a marker in
those stack frames that are created as a result of an interrupt or
exception.  The marker is "regshere" (0x7265677368657265).

With this, stack traces show where exceptions have occurred, which can
be very useful.  This also improves the accuracy of the trace because
the relevant return address can be in the link register at the time of
the exception rather than on the stack.  We now print the PC and
exception type for each exception frame, and then the link register if
appropriate as the next item in the trace.

22 years agoMerge bk://bk.arm.linux.org.uk/linux-2.6-rmk
Linus Torvalds [Mon, 24 May 2004 09:41:46 +0000 (02:41 -0700)]
Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
into ppc970.osdl.org:/home/torvalds/v2.6/linux

22 years ago[ARM] pxa2xx_udc needs asm/mach-types.h
Russell King [Tue, 25 May 2004 00:14:52 +0000 (01:14 +0100)]
[ARM] pxa2xx_udc needs asm/mach-types.h

22 years ago[ARM] Fix lubbock PCMCIA driver.
Russell King [Mon, 24 May 2004 23:42:29 +0000 (00:42 +0100)]
[ARM] Fix lubbock PCMCIA driver.

- access SA1111 GPIO using sa1111_set_io functions.
- access Lubbock misc register using lubbock_set_misc_wr
- fix CF voltage selection.
- don't fiddle with PCMCIA voltage selection when selecting CF
  voltage.
- wait for the voltage switches to stabilise before reading the
  new card state.

22 years ago[ARM] Don't reference __machine_arch_type directly.
Russell King [Mon, 24 May 2004 18:29:49 +0000 (19:29 +0100)]
[ARM] Don't reference __machine_arch_type directly.

22 years ago[ARM PATCH] 1893/1: define __ARCH_WANT_SYS_PAUSE for ARM
Ian Campbell [Mon, 24 May 2004 18:18:24 +0000 (19:18 +0100)]
[ARM PATCH] 1893/1: define __ARCH_WANT_SYS_PAUSE for ARM

Patch from Ian Campbell

The recent changeset "Sanitise handling of unneeded syscall stubs" missed

__ARCH_WANT_SYS_PAUSE from include/asm-arm/unistd.h.

22 years ago[ARM] Remove needless include of asm/mach-types.h
Russell King [Mon, 24 May 2004 18:14:00 +0000 (19:14 +0100)]
[ARM] Remove needless include of asm/mach-types.h

22 years ago[ARM] Enable IRQs over context switches
Russell King [Mon, 24 May 2004 14:16:26 +0000 (15:16 +0100)]
[ARM] Enable IRQs over context switches

Disabling IRQs over context switches causes unreasonable IRQ latency
on VIVT cached machines, so provide our own prepare_arch_switch(),
finish_arch_switch() and task_running() implementations.  We provide
an optimised UP version so we don't end up needlessly incrementing
and decrementing the preempt count.

22 years ago[ARM] Fix sorting of machine class symbols.
Russell King [Mon, 24 May 2004 13:17:09 +0000 (14:17 +0100)]
[ARM] Fix sorting of machine class symbols.

These are supposed to be ordered by option name.

22 years ago[ARM] Remove old static GPIO port definitions for SA1111.
Russell King [Mon, 24 May 2004 01:34:23 +0000 (02:34 +0100)]
[ARM] Remove old static GPIO port definitions for SA1111.

Using these old definitions on PXA will result in randomly
scribbling over memory.  Remove them.

22 years agoMerge http://linux-sound.bkbits.net/linux-sound
Linus Torvalds [Mon, 24 May 2004 01:26:05 +0000 (18:26 -0700)]
Merge http://linux-sound.bkbits.net/linux-sound
into ppc970.osdl.org:/home/torvalds/v2.6/linux

22 years ago[PATCH] pa-risc: kernel/fork.c broken by the new rmap
James Bottomley [Mon, 24 May 2004 01:20:03 +0000 (18:20 -0700)]
[PATCH] pa-risc: kernel/fork.c broken by the new rmap

Any architecture (like pa-risc) that makes use of the helper function
flush_dcache_mmap_lock() won't compile with the new rmap due to use of
the wrong "mapping".

Trivial fix.

22 years agoMerge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6
Linus Torvalds [Mon, 24 May 2004 01:16:24 +0000 (18:16 -0700)]
Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux

22 years ago[ARM] PXAFB bug fixes
Russell King [Mon, 24 May 2004 01:09:54 +0000 (02:09 +0100)]
[ARM] PXAFB bug fixes

- There are only 16 entries in the pseudo palette
- For dual-panel displays, we need to halve the display height
- When disabling the LCD controller, use LCCR0_DIS (aka slow disable)
  rather than quick disable.
- Clean up compiler warnings.

22 years ago[ARM] Remove SA1111 PS/2 IRQ_HANDLED handling.
Russell King [Mon, 24 May 2004 00:52:39 +0000 (01:52 +0100)]
[ARM] Remove SA1111 PS/2 IRQ_HANDLED handling.

Some SA1111 devices are unable to clear the PS/2 receive IRQ before
it has been serviced, so we always re-enter the handler one more
time than is strictly necessary.  We can't clear the IRQ after
servicing because that causes race conditions with other SA1111
devices, so we take the easy option and always return IRQ_HANDLED.

22 years ago[ARM] Update PXA serial driver.
Russell King [Mon, 24 May 2004 00:41:39 +0000 (01:41 +0100)]
[ARM] Update PXA serial driver.

- Move CKEN manipulation into power management handling (so we don't
  shut down the clock to the console port.)
- .iotype should be using UPIO_xxx not SERIAL_IO_xxx
- Remove each port when module is unloaded.
- Remove needless #include.
- Remove ASYNC_SKIP_TEST - we don't have any tests to skip.

22 years ago[ARM] Add LCD display parameters for Lubbock board.
Russell King [Mon, 24 May 2004 00:29:13 +0000 (01:29 +0100)]
[ARM] Add LCD display parameters for Lubbock board.

22 years ago[ARM] Add lubbock_set_misc_wr()
Russell King [Mon, 24 May 2004 00:23:59 +0000 (01:23 +0100)]
[ARM] Add lubbock_set_misc_wr()

This provides an atomic method to update the Lubbock board specific
register from various drivers.

22 years ago[ARM] Provide coherent_dma_mask for PXA MCI device.
Russell King [Sun, 23 May 2004 23:06:28 +0000 (00:06 +0100)]
[ARM] Provide coherent_dma_mask for PXA MCI device.

22 years ago[ARM] Fix oops in dma_unmap_single()
Russell King [Sun, 23 May 2004 22:56:17 +0000 (23:56 +0100)]
[ARM] Fix oops in dma_unmap_single()

Fix an oops caused by a missing failure return value for devices which
do not require DMA bouncing.

22 years agoMerge bk://bk.arm.linux.org.uk/linux-2.6-pcmcia
Linus Torvalds [Sun, 23 May 2004 12:54:19 +0000 (05:54 -0700)]
Merge bk://bk.arm.linux.org.uk/linux-2.6-pcmcia
into ppc970.osdl.org:/home/torvalds/v2.6/linux

22 years agoALSA CVS update - Jaroslav Kysela <perex@suse.cz>
Jaroslav Kysela [Sun, 23 May 2004 12:22:27 +0000 (14:22 +0200)]
ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
PCM Midlevel,ALSA Core
Added SNDRV_PCM_SYNC_PTR_APPL and SNDRV_PCM_SYNC_PTR_AVAIL_MIN extensions
to SYNC_PTR ioctl for PCM API.

22 years agoALSA CVS update - Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Sun, 23 May 2004 12:22:01 +0000 (14:22 +0200)]
ALSA CVS update - Takashi Iwai <tiwai@suse.de>
VIA82xx driver
- added the DXS entry for ECS K7VTA3 v8.0
- fixed the DXS entry for ASUS A7V8X to NO_VRA.

22 years agoALSA CVS update - Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Sun, 23 May 2004 12:21:22 +0000 (14:21 +0200)]
ALSA CVS update - Takashi Iwai <tiwai@suse.de>
ALSA Core
added reverse selections of components to CONFIG_SND_BIT32_EMUL.

22 years agoALSA CVS update - Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Sun, 23 May 2004 12:14:09 +0000 (14:14 +0200)]
ALSA CVS update - Takashi Iwai <tiwai@suse.de>
PCI drivers,ICE1712 driver,ICE1724 driver
- improved the description of ice1724 driver on Kconfig.
- better support of VT1720 with snd-ice1724 driver.
- check PCI subsystem IDs when no EEPROM is available (ice1724 only)
- change the driver name string if given in the board list.
- merged prodigy 7.1 support into aureon.c.  they are almost identical.
- allow to use PDMA4 and RMDA1 for non-SPDIF purpose if specified (ice1724 only).

22 years ago[NET]: Save some space with sysfs strings.
Vadim Lobanov [Sun, 23 May 2004 09:19:28 +0000 (02:19 -0700)]
[NET]: Save some space with sysfs strings.

22 years agoMerge http://linux-mh.bkbits.net/bluetooth-2.6
David S. Miller [Sun, 23 May 2004 09:13:00 +0000 (02:13 -0700)]
Merge http://linux-mh.bkbits.net/bluetooth-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6

22 years ago[Bluetooth] Define .kobj.k_name for the fake device
Marcel Holtmann [Sun, 23 May 2004 15:43:34 +0000 (17:43 +0200)]
[Bluetooth] Define .kobj.k_name for the fake device

The PCMCIA devices are not devices for the kernel and the bt3c_cs
driver uses a fake device for calling request_firmware(). The fake
device initialization must also set .kobj.k_name to prevent an oops
until PCMCIA devices are fully integrated into the driver model.

22 years ago[Bluetooth] Use try_module_get() for RFCOMM sessions
Marcel Holtmann [Sun, 23 May 2004 15:31:00 +0000 (17:31 +0200)]
[Bluetooth] Use try_module_get() for RFCOMM sessions

It is not possible to use __module_get() when adding a new RFCOMM
session, because there is a case where no reference count is hold.
This happens when the module is not in use right now and an incoming
connection occurs.

22 years ago[PATCH] ipr driver version 2.0.7
Brian King [Sun, 23 May 2004 06:44:28 +0000 (01:44 -0500)]
[PATCH] ipr driver version 2.0.7

Bump driver version

22 years ago[PATCH] ipr remove anonymous unions for gcc 2.95
Brian King [Sun, 23 May 2004 06:37:37 +0000 (01:37 -0500)]
[PATCH] ipr remove anonymous unions for gcc 2.95

This patch removes all usage of anonymous unions from the ipr
driver since gcc 2.95 does not support anonymous unions.

22 years ago[PATCH] ipr fix for ioa reset timeout oops
Brian King [Sun, 23 May 2004 06:25:01 +0000 (01:25 -0500)]
[PATCH] ipr fix for ioa reset timeout oops

This patch fixes an oops discovered in test which can occur
on bad hardware if the ipr adapter times out coming operational.

22 years ago[PATCH] ipr add error logs to abort and reset paths
Brian King [Sun, 23 May 2004 06:22:07 +0000 (01:22 -0500)]
[PATCH] ipr add error logs to abort and reset paths

This patch adds additional error logging to abort, device reset,
and bus reset paths to help in diagnosing scsi problems on ipr.

22 years ago[PATCH] ipr gcc attributes fixes
Brian King [Sun, 23 May 2004 06:19:21 +0000 (01:19 -0500)]
[PATCH] ipr gcc attributes fixes

This patch fixes an issue where ipr was including a kernel
data structure, list_head, in a packed structure, which causes
compile issues on some architectures, and is just a bad thing to do.

22 years agoinitial 2.6 fixup for ATP870U scsi
James Bottomley [Sun, 23 May 2004 06:17:44 +0000 (01:17 -0500)]
initial 2.6 fixup for ATP870U scsi

From:  Alan Cox <alan@redhat.com>

Pretty minimal. queue_command is now called locked, this requires propogating
some small locking changes for send_s870

22 years ago[PATCH] ncpfs compat ioctls
Alexander Viro [Sun, 23 May 2004 05:22:09 +0000 (22:22 -0700)]
[PATCH] ncpfs compat ioctls

This takes ncpfs ioctl handling into fs/compat_ioctl.c, removing it from
ppc64 and sparc64 code.

Code sanitized, switched to compat_alloc_user_space(), bunch of
{k,v}malloc() killed.

22 years agoLinux 2.6.7-rc1 v2.6.7-rc1
Linus Torvalds [Sat, 22 May 2004 15:46:07 +0000 (08:46 -0700)]
Linux 2.6.7-rc1

22 years ago[PATCH] bogus sigaltstack calls by rt_sigreturn
Roland McGrath [Sat, 22 May 2004 15:26:09 +0000 (08:26 -0700)]
[PATCH] bogus sigaltstack calls by rt_sigreturn

There is a longstanding bug in the rt_sigreturn system call.
This exists in both 2.4 and 2.6, and for almost every platform.

I am referring to this code in sys_rt_sigreturn (arch/i386/kernel/signal.c):

if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
goto badframe;
/* It is more difficult to avoid calling this function than to
   call it and ignore errors.  */
/*
 * THIS CANNOT WORK! "&st" is a kernel address, and "do_sigaltstack()"
 * takes a user address (and verifies that it is a user address). End
 * result: it does exactly _nothing_.
 */
do_sigaltstack(&st, NULL, regs->esp);

As the comment says, this is bogus.  On vanilla i386 kernels, this is just
harmlessly stupid--do_sigaltstack always does nothing and returns -EFAULT.

However this code actually bites users on kernels using Ingo Molnar's 4G/4G
address space layout changes.  There some kernel stack address might very
well be a lovely and readable user address as well.  When that happens, we
make a sigaltstack call with some random buffer, and then the fun begins.

To my knowledge, this has produced trouble in the real world only for 4G
i386 kernels (RHEL and Fedora "hugemem" kernels) on machines that actually
have several GB of physical memory (and in programs that are actually using
sigaltstack and handling a lot of signals).  However, the same clearly
broken code has been blindly copied to most other architecture ports, and
off hand I don't know the address space details of any other well enough to
know if real kernel stack addresses and real user addresses are in fact
disjoint as they are on i386 when not using the nonstandard 4GB address
space layout.

The obvious intent of the call being there in the first place is to permit
a signal handler to diddle its ucontext_t.uc_stack before returning, and
have this effect a sigaltstack call on the signal handler return.  This is
not only an optimization vs doing the extra system call, but makes it
possible to make a sigaltstack change when that handler itself was running
on the signal stack.  AFAICT this has never actually worked before, so
certainly noone depends on it.  But the code certainly suggests that
someone intended at one time for that to be the behavior.  Thus I am
inclined to fix it so it works in that way, though it has not done so before.
It would also be reasonable enough to simply rip out the bogus call and not
have this functionality.

From the current state of code in both 2.4 and 2.6, there is no fathoming
how this broken code came about.  It's actually much simpler to just make
it work!  I can only presume that at some point in the past the sigaltstack
implementation functions were different such that this made sense.  Of the
few ports I've looked at briefly, only the ppc/pc64 porters (go paulus!)
actually tried to understand what the i386 code was doing and implemented
it correctly rather than just carefully transliterating the bug.

The patch below fixes only the i386 and x86_64 versions.  The x86_64
patches I have not actually tested.  I think each and every arch (except
ppc and ppc64) need to make the corresponding fixes as well.  Note that
there is a function to fix for each native arch, and then one for each
emulation flavor.  The details differ minutely for getting the calls right
in each emulation flavor, but I think that most or all of the arch's with
biarch/emulation support have similar enough code that each emulation
flavor's fix will look very much like the arch/x86_64/ia32/ia32_signal.c
patch here.

22 years ago[PATCH] partial prefetch for vma_prio_tree_next
Andrew Morton [Sat, 22 May 2004 15:10:33 +0000 (08:10 -0700)]
[PATCH] partial prefetch for vma_prio_tree_next

From: Rajesh Venkatasubramanian <vrajesh@umich.edu>

This patch adds prefetches for walking a vm_set.list.  Adding prefetches
for prio tree traversals is tricky and may lead to cache trashing.  So this
patch just adds prefetches only when walking a vm_set.list.

I haven't done any benchmarks to show that this patch improves performance.
 However, this patch should help to improve performance when vm_set.lists
are long, e.g., libc.  Since we only prefetch vmas that are guaranteed to
be used in the near future, this patch should not result in cache trashing,
theoretically.

I didn't add any NULL checks before prefetching because prefetch.h clearly
says prefetch(0) is okay.

22 years ago[PATCH] rmap 40 better anon_vma sharing
Andrew Morton [Sat, 22 May 2004 15:10:23 +0000 (08:10 -0700)]
[PATCH] rmap 40 better anon_vma sharing

From: Hugh Dickins <hugh@veritas.com>

anon_vma rmap will always necessarily be more restrictive about vma merging
than before: according to the history of the vmas in an mm, they are liable to
be allocated different anon_vma heads, and from that point on be unmergeable.

Most of the time this doesn't matter at all; but in two cases it may matter.
One case is that mremap refuses (-EFAULT) to span more than a single vma: so
it is conceivable that some app has relied on vma merging prior to mremap in
the past, and will now fail with anon_vma.  Conceivable but unlikely, let's
cross that bridge if we come to it: and the right answer would be to extend
mremap, which should not be exporting the kernel's implementation detail of
vma to user interface.

The other case that matters is when a reasonable repetitive sequence of
syscalls and faults ends up with a large number of separate unmergeable vmas,
instead of the single merged vma it could have.

Andrea's mprotect-vma-merging patch fixed some such instances, but left other
plausible cases unmerged.  There is no perfect solution, and the harder you
try to allow vmas to be merged, the less efficient anon_vma becomes, in the
extreme there being one to span the whole address space, from which hangs
every private vma; but anonmm rmap is clearly superior to that extreme.

Andrea's principle was that neighbouring vmas which could be mprotected into
mergeable vmas should be allowed to share anon_vma: good insight.  His
implementation was to arrange this sharing when trying vma merge, but that
seems to be too early.  This patch sticks to the principle, but implements it
in anon_vma_prepare, when handling the first write fault on a private vma:
with better results.  The drawback is that this first write fault needs an
extra find_vma_prev (whereas prev was already to hand when implementing
anon_vma sharing at try-to-merge time).

22 years ago[PATCH] rmap 39 add anon_vma rmap
Andrew Morton [Sat, 22 May 2004 15:10:11 +0000 (08:10 -0700)]
[PATCH] rmap 39 add anon_vma rmap

From: Hugh Dickins <hugh@veritas.com>

Andrea Arcangeli's anon_vma object-based reverse mapping scheme for anonymous
pages.  Instead of tracking anonymous pages by pte_chains or by mm, this
tracks them by vma.  But because vmas are frequently split and merged
(particularly by mprotect), a page cannot point directly to its vma(s), but
instead to an anon_vma list of those vmas likely to contain the page - a list
on which vmas can easily be linked and unlinked as they come and go.  The vmas
on one list are all related, either by forking or by splitting.

This has three particular advantages over anonmm: that it can cope
effortlessly with mremap moves; and no longer needs page_table_lock to protect
an mm's vma tree, since try_to_unmap finds vmas via page -> anon_vma -> vma
instead of using find_vma; and should use less cpu for swapout since it can
locate its anonymous vmas more quickly.

It does have disadvantages too: a lot more change in mmap.c to deal with
anon_vmas, though small straightforward additions now that the vma merging has
been refactored there; more lowmem needed for each anon_vma and vma structure;
an additional restriction on the merging of vmas (cannot be merged if already
assigned different anon_vmas, since then their pages will be pointing to
different heads).

(There would be no need to enlarge the vma structure if anonymous pages
belonged only to anonymous vmas; but private file mappings accumulate
anonymous pages by copy-on-write, so need to be listed in both anon_vma and
prio_tree at the same time.  A different implementation could avoid that by
using anon_vmas only for purely anonymous vmas, and use the existing prio_tree
to locate cow pages - but that would involve a long search for each single
private copy, probably not a good idea.)

Where before the vm_pgoff of a purely anonymous (not file-backed) vma was
meaningless, now it represents the virtual start address at which that vma is
mapped - which the standard file pgoff manipulations treat linearly as vmas
are split and merged.  But if mremap moves the vma, then it generally carries
its original vm_pgoff to the new location, so pages shared with the old
location can still be found.  Magic.

Hugh has massaged it somewhat: building on the earlier rmap patches, this
patch is a fifth of the size of Andrea's original anon_vma patch.  Please note
that this posting will be his first sight of this patch, which he may or may
not approve.

22 years ago[PATCH] rmap 38 remove anonmm rmap
Andrew Morton [Sat, 22 May 2004 15:10:00 +0000 (08:10 -0700)]
[PATCH] rmap 38 remove anonmm rmap

From: Hugh Dickins <hugh@veritas.com>

Before moving on to anon_vma rmap, remove now what's peculiar to anonmm rmap:
the anonmm handling and the mremap move cows.  Temporarily reduce
page_referenced_anon and try_to_unmap_anon to stubs, so a kernel built with
this patch will not swap anonymous at all.

22 years ago[PATCH] rmap 37 page_add_anon_rmap vma
Andrew Morton [Sat, 22 May 2004 15:09:49 +0000 (08:09 -0700)]
[PATCH] rmap 37 page_add_anon_rmap vma

From: Hugh Dickins <hugh@veritas.com>

Silly final patch for anonmm rmap: change page_add_anon_rmap's mm arg to vma
arg like anon_vma rmap, to smooth the transition between them.

22 years ago[PATCH] rmap 36 mprotect use vma_merge
Andrew Morton [Sat, 22 May 2004 15:09:38 +0000 (08:09 -0700)]
[PATCH] rmap 36 mprotect use vma_merge

From: Hugh Dickins <hugh@veritas.com>

Earlier on, in 2.6.6, we took the vma merging code out of mremap.c and let it
rely on vma_merge instead (via copy_vma).  Now take the vma merging code out
of mprotect.c and let it rely on vma_merge too: so vma_merge becomes the sole
vma merging engine.  The fruit of this consolidation is that mprotect now
merges file-backed vmas naturally.  Make this change now because anon_vma will
complicate the vma merging rules, let's keep them all in one place.

vma_merge remains where the decisions are made, whether to merge with prev
and/or next; but now [addr,end) may be the latter part of prev, or first part
or whole of next, whereas before it was always a new area.

vma_adjust carries out vma_merge's decision, but when sliding the boundary
between vma and next, must temporarily remove next from the prio_tree too.
And it turned out (by oops) to have a surer idea of whether next needs to be
removed than vma_merge, so the fput and freeing moves into vma_adjust.

Too much decipherment of what's going on at the start of vma_adjust?  Yes, and
there's a delicate assumption that you may use vma_adjust in sliding a
boundary, or splitting in two, or growing a vma (mremap uses it in that way),
but not for simply shrinking a vma.  Which is so, and must be so (how could
pages mapped in the part to go, be zapped without first splitting?), but would
feel better with some protection.

__vma_unlink can then be moved from mm.h to mmap.c, and mm.h's more misleading
than helpful can_vma_merge is deleted.

22 years ago[PATCH] rmap 35 mmap.c cleanups
Andrew Morton [Sat, 22 May 2004 15:09:27 +0000 (08:09 -0700)]
[PATCH] rmap 35 mmap.c cleanups

From: Hugh Dickins <hugh@veritas.com>

Before some real vma_merge work in mmap.c in the next patch, a patch of
miscellaneous cleanups to cut down the noise:

- remove rb_parent arg from vma_merge: mm->mmap can do that case
- scatter pgoff_t around to ingratiate myself with the boss
- reorder is_mergeable_vma tests, vm_ops->close is least likely
- can_vma_merge_before take combined pgoff+pglen arg (from Andrea)
- rearrange do_mmap_pgoff's ever-confusing anonymous flags switch
- comment do_mmap_pgoff's mysterious (vm_flags & VM_SHARED) test
- fix ISO C90 warning on browse_rb if building with DEBUG_MM_RB
- stop that long MNT_NOEXEC line wrapping

Yes, buried in amidst these is indeed one pgoff replaced by "next->vm_pgoff -
pglen" (reverting a mod of mine which took pgoff supplied by user too
seriously in the anon case), and another pgoff replaced by 0 (reverting
anon_vma mod which crept in with NUMA API): neither of them really matters,
except perhaps in /proc/pid/maps.

22 years ago[PATCH] rmap 34 vm_flags page_table_lock
Andrew Morton [Sat, 22 May 2004 15:09:16 +0000 (08:09 -0700)]
[PATCH] rmap 34 vm_flags page_table_lock

From: Hugh Dickins <hugh@veritas.com>

First of a batch of seven rmap patches, based on 2.6.6-mm3.  Probably the
final batch: remaining issues outstanding can have isolated patches.  The
first half of the batch is good for anonmm or anon_vma, the second half of the
batch replaces my anonmm rmap by Andrea's anon_vma rmap.

Judge for yourselves which you prefer.  I do think I was wrong to call
anon_vma more complex than anonmm (its lists are easier to understand than my
refcounting), and I'm happy with its vma merging after the last patch.  It
just comes down to whether we can spare the extra 24 bytes (maximum, on
32-bit) per vma for its advantages in swapout and mremap.

rmap 34 vm_flags page_table_lock

Why do we guard vm_flags mods with page_table_lock when it's already
down_write guarded by mmap_sem?  There's probably a historical reason, but no
sign of any need for it now.  Andrea added a comment and removed the instance
from mprotect.c, Hugh plagiarized his comment and removed the instances from
madvise.c and mlock.c.  Huge leap in scalability...  not expected; but this
should stop people asking why those spinlocks.

22 years ago[PATCH] rmap 33 install_arg_page vma
Andrew Morton [Sat, 22 May 2004 15:09:05 +0000 (08:09 -0700)]
[PATCH] rmap 33 install_arg_page vma

From: Hugh Dickins <hugh@veritas.com>

anon_vma will need to pass vma to put_dirty_page, so change it and its
various callers (setup_arg_pages and its 32-on-64-bit arch variants); and
please, let's rename it to install_arg_page.

Earlier attempt to do this (rmap 26 __setup_arg_pages) tried to clean up
those callers instead, but failed to boot: so now apply rmap 27's memset
initialization of vmas to these callers too; which relieves them from
needing the recently included linux/mempolicy.h.

While there, moved install_arg_page's flush_dcache_page up before
page_table_lock - doesn't in fact matter at all, just saves one worry when
researching flush_dcache_page locking constraints.

22 years ago[PATCH] rmap 32 zap_pmd_range wrap
Andrew Morton [Sat, 22 May 2004 15:08:54 +0000 (08:08 -0700)]
[PATCH] rmap 32 zap_pmd_range wrap

From: Hugh Dickins <hugh@veritas.com>

From: Andrea Arcangeli <andrea@suse.de>

zap_pmd_range, alone of all those page_range loops, lacks the check for
whether address wrapped.  Hugh is in doubt as to whether this makes any
difference to any config on any arch, but eager to fix the odd one out.

22 years ago[PATCH] rmap 31 unlikely bad memory
Andrew Morton [Sat, 22 May 2004 15:08:43 +0000 (08:08 -0700)]
[PATCH] rmap 31 unlikely bad memory

From: Hugh Dickins <hugh@veritas.com>

From: Andrea Arcangeli <andrea@suse.de>

Sprinkle unlikelys throughout mm/memory.c, wherever we see a pgd_bad or a
pmd_bad; likely or unlikely on pte_same or !pte_same.  Put the jump in the
error return from do_no_page, not in the fast path.

22 years ago[PATCH] rmap 30 fix bad mapcount
Andrew Morton [Sat, 22 May 2004 15:08:33 +0000 (08:08 -0700)]
[PATCH] rmap 30 fix bad mapcount

From: Hugh Dickins <hugh@veritas.com>

From: Andrea Arcangeli <andrea@suse.de>

page_alloc.c's bad_page routine should reset a bad mapcount; and it's more
revealing to show the bad mapcount than just the boolean mapped.

22 years ago[PATCH] rmap 29 VM_RESERVED safety
Andrew Morton [Sat, 22 May 2004 15:08:22 +0000 (08:08 -0700)]
[PATCH] rmap 29 VM_RESERVED safety

From: Hugh Dickins <hugh@veritas.com>

From: Andrea Arcangeli <andrea@suse.de>

Set VM_RESERVED in videobuf_mmap_mapper, to warn do_no_page and swapout not to
worry about its pages.  Set VM_RESERVED in ia64_elf32_init, it too provides an
unusual nopage which might surprise higher level checks.  Future safety: they
don't actually pose a problem in this current tree.