GitHub/exynos8895/android_kernel_samsung_universal8895.git
19 years ago[PATCH] autofs4: bad lookup fix
Ian Kent [Wed, 22 Jun 2005 00:16:41 +0000 (17:16 -0700)]
[PATCH] autofs4: bad lookup fix

For browsable autofs maps, a mount request that arrives at the same time an
expire is happening can fail to perform the needed mount.

This happens becuase the directory exists and so the revalidate succeeds when
we need it to fail so that lookup is called on the same dentry to do the
mount.  Instead lookup is called on the next path component which should be
whithin the mount, but the parent isn't mounted.

The solution is to allow the revalidate to continue and perform the mount as
no directory creation (at mount time) is needed for browsable mount entries.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] autofs4: post expire race fix
Ian Kent [Wed, 22 Jun 2005 00:16:39 +0000 (17:16 -0700)]
[PATCH] autofs4: post expire race fix

At the tail end of an expire it's possible for a process to enter
autofs4_wait, with a waitq type of NFY_NONE but find that the expire is
finished.  In this cause autofs4_wait will try to create a new wait but not
notify the daemon leading to a hang.  As the wait type is meant to delay mount
requests from revalidate or lookup during an expire and the expire is done all
we need to do is check if the dentry is a mountpoint.  If it's not then we're
done.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] autofs4: avoid panic on bind mount of autofs owned directory
Ian Kent [Wed, 22 Jun 2005 00:16:38 +0000 (17:16 -0700)]
[PATCH] autofs4: avoid panic on bind mount of autofs owned directory

While this is not a solution to bind and move mounts on autofs owned
directories it is necessary to fix the trady error handling.

At least it avoids the kernel panic I observed checking out bug #4589.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ibmasm driver: fix race in command refcount logic
Max Asbock [Wed, 22 Jun 2005 00:16:36 +0000 (17:16 -0700)]
[PATCH] ibmasm driver: fix race in command refcount logic

This patch fixes a race in the command reference counting logic by putting
spinlocks around kobject_put() in the command_put function.

- Also added debug messages.

- Changed a memcpy to memcpy_fromio since we are reading from io space.

Signed-off-by: Max Asbock <masbock@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ibmasm driver: redesign handling of remote control events
Max Asbock [Wed, 22 Jun 2005 00:16:34 +0000 (17:16 -0700)]
[PATCH] ibmasm driver: redesign handling of remote control events

This patch rewrites the handling of remote control events.  Rather than making
them available from a special file in the ibmasmfs, now the events from the
RSA card get translated into kernel input events and injected into the input
subsystem.  The driver now will generate two /dev/input/eventX nodes -- one
for the keyboard and one for the mouse.  The mouse node generates absolute
events more like a touch pad than a mouse.

Signed-off-by: Vernon Mauery <vernux@us.ibm.com>
Signed-off-by: Max Asbock <masbock@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ibmasm driver: correctly wake up sleeping threads
Max Asbock [Wed, 22 Jun 2005 00:16:33 +0000 (17:16 -0700)]
[PATCH] ibmasm driver: correctly wake up sleeping threads

Due to my incomplete understanding of the wait_event_interruptible() function
threads waiting for service processor events were not woken up.  This patch
fixes that problem.

Signed-off-by: Max Asbock <masbock@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ibmasm driver: fix command buffer size
Max Asbock [Wed, 22 Jun 2005 00:16:32 +0000 (17:16 -0700)]
[PATCH] ibmasm driver: fix command buffer size

First of a series of patches for the ibmasm driver.  (that is the driver for
the IBM xSeries RSA service processor)

To summarize what they do:

[1] change a #define for the buffer size for commands

[2] Fix a bug where threads in the event handling code calling
    wait_event_interruptible() weren't woken up as expected.

[3] Redesigned how remote mouse and keyboard events received by the driver
    are handled.

[4] Fixed a race in the command reference counting logic.

This patch:

- change a #define for the buffer size for commands

Signed-off-by: Max Asbock <masbock@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] s390: pending interrupt after ipl from reader
Heiko Carstens [Wed, 22 Jun 2005 00:16:31 +0000 (17:16 -0700)]
[PATCH] s390: pending interrupt after ipl from reader

Wait for interrupt and clear status pending after resetting the reader.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] s390: memory detection > 32GB
Heiko Carstens [Wed, 22 Jun 2005 00:16:30 +0000 (17:16 -0700)]
[PATCH] s390: memory detection > 32GB

The kernel takes a very long time to boot if the memory size is bigger then
32767 MB.  The memory size is contained in a structure created by an sclp
call.  The kernel accesses the field with a LH instrution which performs a
sign extension of a 16 bit word.  In the case of a memory size with bit 2^15
set this results in a very large value and the memory detection just loops for
a long time.  In addition if more then 64 GB are used on a 64 bit system the
memory size is read from an incorrect storage location.

Use zero-extention to read the 16 bit memory size and the correct offset to
read the 4 byte memory size on 64 bit.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] s390: cmm sender parameter visibility
Heiko Carstens [Wed, 22 Jun 2005 00:16:29 +0000 (17:16 -0700)]
[PATCH] s390: cmm sender parameter visibility

Make cmm module parameter "sender" visible in sysfs.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] s390: kernel stack overflow panic
Heiko Carstens [Wed, 22 Jun 2005 00:16:28 +0000 (17:16 -0700)]
[PATCH] s390: kernel stack overflow panic

die() doesn't return, therefore print registers and then panic instead.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] s390: #ifdefs in compat_ioctls
Martin Schwidefsky [Wed, 22 Jun 2005 00:16:28 +0000 (17:16 -0700)]
[PATCH] s390: #ifdefs in compat_ioctls

Remove superflous #if .. #endif pairs from compat_ioctl.c.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] s390: cio documentation
Cornelia Huck [Wed, 22 Jun 2005 00:16:27 +0000 (17:16 -0700)]
[PATCH] s390: cio documentation

Some clarifications in the cio documentation.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] s390: cio max channels checks
Cornelia Huck [Wed, 22 Jun 2005 00:16:26 +0000 (17:16 -0700)]
[PATCH] s390: cio max channels checks

Fix max channel check in cio_ignore display function.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: fix linkage of tt mode against NPTL
Paolo 'Blaisorblade' Giarrusso [Wed, 22 Jun 2005 00:16:25 +0000 (17:16 -0700)]
[PATCH] uml: fix linkage of tt mode against NPTL

With Al Viro <viro@parcelfarce.linux.theplanet.co.uk>

To make sure switcheroo() can execute when we remap all the executable
image, we used a trick to make it use a local copy of errno...  this trick
does not work with NPTL glibc, only with LinuxThreads, so use another
(simpler) one to make it work anyway.

Hopefully, a lot improved thanks to merging with the version of Al Viro
(which had his part of problems, though, i.e.  removing a fix to another
bug and not fixing the problem on i386).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: make hw_controller_type->release exist only for archs needing it
Paolo 'Blaisorblade' Giarrusso [Wed, 22 Jun 2005 00:16:24 +0000 (17:16 -0700)]
[PATCH] uml: make hw_controller_type->release exist only for archs needing it

With Chris Wedgwood <cw@f00f.org>

As suggested by Chris, we can make the "just added" method ->release
conditional to UML only (better: to archs requesting it, i.e.  only UML
currently), so that other archs don't get this unneeded crud, and if UML
won't need it any more we can kill this.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
CC: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: complete hw_controller_type->release conversion
Paolo 'Blaisorblade' Giarrusso [Wed, 22 Jun 2005 00:16:21 +0000 (17:16 -0700)]
[PATCH] uml: complete hw_controller_type->release conversion

This occurrence of free_irq_by_irq_and_dev() was missed when converting UML
to the use of hw_controller_type->release.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: add and use generic hw_controller_type->release
Paolo 'Blaisorblade' Giarrusso [Wed, 22 Jun 2005 00:16:19 +0000 (17:16 -0700)]
[PATCH] uml: add and use generic hw_controller_type->release

With Chris Wedgwood <cw@f00f.org>

Currently UML must explicitly call the UML-specific
free_irq_by_irq_and_dev() for each free_irq call it's done.

This is needed because ->shutdown and/or ->disable are only called when the
last "action" for that irq is removed.

Instead, for UML shared IRQs (UML IRQs are very often, if not always,
shared), for each dev_id some setup is done, which must be cleared on the
release of that fd.  For instance, for each open console a new instance
(i.e.  new dev_id) of the same IRQ is requested().

Exactly, a fd is stored in an array (pollfds), which is after read by a
host thread and passed to poll().  Each event registered by poll() triggers
an interrupt.  So, for each free_irq() we must remove the corresponding
host fd from the table, which we do via this -release() method.

In this patch we add an appropriate hook for this, and remove all uses of
it by pointing the hook to the said procedure; this is safe to do since the
said procedure.

Also some cosmetic improvements are included.

This is heavily based on some work by Chris Wedgwood, which however didn't
get the patch merged for something I'd call a "misunderstanding" (the need
for this patch wasn't cleanly explained, thus adding the generic hook was
felt as undesirable).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
CC: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: Use asm-generic/div64.h
Hirokazu Takata [Wed, 22 Jun 2005 00:16:17 +0000 (17:16 -0700)]
[PATCH] m32r: Use asm-generic/div64.h

The current include/asm-m32r/div64.h of 2.6.12-rc5 looks buggy.  Here is a
patch for updating it to use asm-generic/div64.h for m32r like other
architectures.

Signed-off-by: Hitoshi Yamamoto <hitoshiy@isl.melco.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: Update defconfig files
Hirokazu Takata [Wed, 22 Jun 2005 00:16:16 +0000 (17:16 -0700)]
[PATCH] m32r: Update defconfig files

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: Remove include/asm-m32r/m32102peri.h
Hirokazu Takata [Wed, 22 Jun 2005 00:16:16 +0000 (17:16 -0700)]
[PATCH] m32r: Remove include/asm-m32r/m32102peri.h

This patch removes an obsolete header file include/asm-m32r/m32102peri.h.
In this header, there are some undesirable single character types, like V.
And the header is almost no longer used.

Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: Cleanup arch/m32r/mm/extable.c
Hirokazu Takata [Wed, 22 Jun 2005 00:16:15 +0000 (17:16 -0700)]
[PATCH] m32r: Cleanup arch/m32r/mm/extable.c

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: Update m32r_cfc.[ch] to support Mappi-III platform
Hirokazu Takata [Wed, 22 Jun 2005 00:16:14 +0000 (17:16 -0700)]
[PATCH] m32r: Update m32r_cfc.[ch] to support Mappi-III platform

This patch is for the M32R CF/PCMCIA drivers to support a new platform,
Mappi-III evaluation board.

Signed-off-by: Mamoru Sakugawa <sakugawa@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: Update setup_xxxxx.c
Hirokazu Takata [Wed, 22 Jun 2005 00:16:13 +0000 (17:16 -0700)]
[PATCH] m32r: Update setup_xxxxx.c

Change coding styles of hw_interrupt_type struct's initialization portions.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: Support M3A-2170(Mappi-III) platform
Hirokazu Takata [Wed, 22 Jun 2005 00:16:10 +0000 (17:16 -0700)]
[PATCH] m32r: Support M3A-2170(Mappi-III) platform

This patchset is for supporting a new m32r platform, M3A-2170(Mappi-III)
evaluation board.  An M32R chip multiprocessor is equipped on the board.
http://http://www.linux-m32r.org/eng/platform/platform.html

* arch/m32r/Kconfig: Support Mappi-III platform.
* arch/m32r/kernel/Makefile: ditto.
* arch/m32r/kernel/io_mappi3.c: ditto.
* arch/m32r/kernel/setup.c: ditto.
* arch/m32r/kernel/setup_mappi3.c: ditto.
* include/asm-m32r/m32102.h: ditto.
* include/asm-m32r/m32r.h: ditto.
* include/asm-m32r/mappi3/mappi3_pld.h: ditto.

* include/asm-m32r/ide.h: CF support for Mappi-III.
* arch/m32r/kernel/setup_mappi3.c: ditto.

* arch/m32r/mappi3/defconfig.smp: A default config file for Mappi-III.
* arch/m32r/mappi3/dot.gdbinit: A default .gdbinit file for Mappi-III.

* arch/m32r/boot/compressed/m32r_sio.c: Modified for Mappi-III
  - At boot time, m32r-g00ff bootloader makes MMU off for Mappi-III,
    on the contrary it makes MMU on for Mappi-II.

* arch/m32r/kernel/io_mappi2.c: Update comments.
* arch/m32r/kernel/setup_mappi2.c: ditto.

Signed-off-by: Mamoru Sakugawa <sakugawa@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ioc4: PCI bus speed detection
Brent Casavant [Wed, 22 Jun 2005 00:16:01 +0000 (17:16 -0700)]
[PATCH] ioc4: PCI bus speed detection

Several hardware features of SGI's IOC4 I/O controller chip require
timing-related driver calculations dependent upon the PCI bus speed.  This
patch enables the core IOC4 driver code to detect the actual bus speed and
store a value that can later be used by the IOC4 subdrivers as needed.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Acked-by: Pat Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ioc4: CONFIG split
Brent Casavant [Wed, 22 Jun 2005 00:16:01 +0000 (17:16 -0700)]
[PATCH] ioc4: CONFIG split

The SGI IOC4 I/O controller chip drivers are currently all configured by
CONFIG_BLK_DEV_SGIIOC4.  This is undesirable as not all IOC4 hardware features
are needed by all systems.

This patch adds two configuration variables, CONFIG_SGI_IOC4 for core IOC4
driver support (see patch 1/3 in this series for further explanation) and
CONFIG_SERIAL_SGI_IOC4 to independently enable serial port support.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Acked-by: Pat Gefre <pfg@sgi.com>
Acked-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ioc4: Core driver rewrite
Brent Casavant [Wed, 22 Jun 2005 00:15:59 +0000 (17:15 -0700)]
[PATCH] ioc4: Core driver rewrite

This series of patches reworks the configuration and internal structure
of the SGI IOC4 I/O controller device drivers.

These changes are motivated by several factors:

- The IOC4 chip PCI resources are of mixed use between functions (i.e.
  multiple functions are handled in the same address range, sometimes
  within the same register), muddling resource ownership and initialization
  issues.  Centralizing this ownership in a core driver is desirable.

- The IOC4 chip implements multiple functions (serial, IDE, others not
  yet implemented in the mainline kernel) but is not a multifunction
  PCI device.  In order to properly handle device addition and removal
  as well as module insertion and deletion, an intermediary IOC4-specific
  driver layer is needed to handle these operations cleanly.

- All IOC4 drivers are currently enabled by a single CONFIG value.  As
  not all systems need all IOC4 functions, it is desireable to enable
  these drivers independently.

- The current IOC4 core driver will trigger loading of all function-level
  drivers, as it makes direct calls to them.  This situation should be
  reversed (i.e. function-level drivers cause loading of core driver)
  in order to maintain a clear and least-surprise driver loading model.

- IOC4 hardware design necessitates some driver-level dependency on
  the PCI bus clock speed.  Current code assumes a 66MHz bus, but the
  speed should be autodetected and appropriate compensation taken.

This patch series effects the above changes by a newly and better designed
IOC4 core driver with which the function-level drivers can register and
deregister themselves upon module insertion/removal.  By tracking these
modules, device addition/removal is also handled properly.  PCI resource
management and ownership issues are centralized in this core driver, and
IOC4-wide configuration actions such as bus speed detection are also
handled in this core driver.

This patch:

The SGI IOC4 I/O controller chip implements multiple functions, though it is
not a multi-function PCI device.  Additionally, various PCI resources of the
IOC4 are shared by multiple hardware functions, and thus resource ownership by
driver is not clearly delineated.  Due to the current driver design, all core
and subordinate drivers must be loaded, or none, which is undesirable if not
all IOC4 hardware features are being used.

This patch reorganizes the IOC4 drivers so that the core driver provides a
subdriver registration service.  Through appropriate callbacks the subdrivers
can now handle device addition and removal, as well as module insertion and
deletion (though the IOC4 IDE driver requires further work before module
deletion will work).  The core driver now takes care of allocating PCI
resources and data which must be shared between subdrivers, to clearly
delineate module ownership of these items.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Acked-by: Pat Gefre <pfg@sgi.com
Acked-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] mips: add vr41xx gpio support
Yoichi Yuasa [Wed, 22 Jun 2005 00:15:56 +0000 (17:15 -0700)]
[PATCH] mips: add vr41xx gpio support

Add vr41xx gpio support.

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: set/clear SMT capable bit at boot
Anton Blanchard [Wed, 22 Jun 2005 00:15:55 +0000 (17:15 -0700)]
[PATCH] ppc64: set/clear SMT capable bit at boot

Allow the SMT bit to be set/reset at boot, like the ALTIVEC bit.  This
means we will enable SMT on unknown cpus that support it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: Mark kernel hptes dirty
Anton Blanchard [Wed, 22 Jun 2005 00:15:55 +0000 (17:15 -0700)]
[PATCH] ppc64: Mark kernel hptes dirty

We dont use the hardware referenced and changed bits and setting them early
avoids a store to memory.  We already do this for userspace hptes but not
kernel ones.  Do it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: tidy up vio devices fake parent
Stephen Rothwell [Wed, 22 Jun 2005 00:15:54 +0000 (17:15 -0700)]
[PATCH] ppc64: tidy up vio devices fake parent

Currently we dynamically allocate the fake parent device for all devices on
the vio bus.  This patch statically allocates it.  This also allows us to
reuse it for the iSeries "generic" vio device (that is used for passing to
dma routines when communicating with the hypervisor without a device
involved).  Also unexport vio_bus_type as it is never used in modules.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: allow build with no PCI
Stephen Rothwell [Wed, 22 Jun 2005 00:15:52 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: allow build with no PCI

This patch allows iSeries to build with CONFIG_PCI=n.  This is useful for
partitions that have only virtual I/O.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: tidy up irq code after merge
Stephen Rothwell [Wed, 22 Jun 2005 00:15:51 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: tidy up irq code after merge

This patch just removes some dead code, fixes messages that referred to the
file this code used to be in and inserts XmPciLpEvent_init into its caller.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: remove XmPciLpEvent.c
Stephen Rothwell [Wed, 22 Jun 2005 00:15:50 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: remove XmPciLpEvent.c

This patch just merges XmPciLpEvent.c into iSeries_irq.c (the only caller of
its only external function).  XmPciLpEvent.c just contained the lowlevel
iSeries irq code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: irq simple cleanups
Stephen Rothwell [Wed, 22 Jun 2005 00:15:49 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: irq simple cleanups

This patch is just simple cleanups to the iSeries irq code.
- whitespace and comments
- rearrange some functions to avoid forward declarations
- remove XmPciLpEvent.h as its functions were declared elsewhere
- remove decaration of function that no longer exists
No semantic changes.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: remove some more members of iSeries_Device_Node
Stephen Rothwell [Wed, 22 Jun 2005 00:15:48 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: remove some more members of iSeries_Device_Node

The AgentId, PhbId, FrameId, CardLocation and Location members of
iSeries_Device_Node are stored early in the boot process just so that a
message about the device can be printed later in the boot process.  Remove
them and construct the message by doing the VPD parsing at the time the
message is printed.

Also remove a few unused defines in iSeries_VpdInfo.c.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: remove IoRetry from iSeries_Device_Node
Stephen Rothwell [Wed, 22 Jun 2005 00:15:47 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: remove IoRetry from iSeries_Device_Node

The IoRetry member of iSeries_Devide_Node is really only used locally, so
remove it and replace it with a local variable.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: iSeries_pci.h cleanups
Stephen Rothwell [Wed, 22 Jun 2005 00:15:46 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: iSeries_pci.h cleanups

Remove no longer used things from iSeries_pci.h.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: iSeries_VpdInfo.c cleanups
Stephen Rothwell [Wed, 22 Jun 2005 00:15:45 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: iSeries_VpdInfo.c cleanups

Clean up iSeries_VpdInfo.c:
- white space and comment fixes
- make a function static
- the functions here are only called from iSeries_pci.c, so
  CONFIG_PCI will be set (so remove check)
- only build when CONFIG_PCI is set
- remove unneeded includes and cast

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: iommu.h cleanups
Stephen Rothwell [Wed, 22 Jun 2005 00:15:44 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: iommu.h cleanups

The iommu_table_cb structure is iSeries specific, so move it to the header
file that declares the function we pass it to.  vio_tce_table and
iommu_setup_iSeries no longer exist, so remove their declarations.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: remove iSeries_pci_reset.c
Stephen Rothwell [Wed, 22 Jun 2005 00:15:42 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: remove iSeries_pci_reset.c

The file arch/ppc64/kernel/iSeries_pci_reset contains only one function that
is not use anywhere (any more).  Remove it.  This function is the only user of
the ReturnCode member of iSeries_Device_Node, so remove that as well.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: misc header cleanups
Stephen Rothwell [Wed, 22 Jun 2005 00:15:41 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: misc header cleanups

Last of this round of the iSeries header cleanups
- don't have two defines for the same thing (HvMaxArchitectedLps
  and HvMaxArchitectedVirtualLans)
- HvCallSc.h only needs linux/types.h
- remove unused struct definition
- add "extern" to some more function declarations

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: tidy up some includes and HvCall.h
Stephen Rothwell [Wed, 22 Jun 2005 00:15:40 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: tidy up some includes and HvCall.h

This patch removes some unused bits from HvCall.h and some unneeded #includes
from other files.  Also includes ItLpQueue.h in paca.h in preference to a stub
declaration of struct ItLpQueue.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: cleanup ItLpQueue.h
Stephen Rothwell [Wed, 22 Jun 2005 00:15:39 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: cleanup ItLpQueue.h

Just white space cleaups and move process_iSeries_events into its only caller.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: remove HvCallCfg.h
Stephen Rothwell [Wed, 22 Jun 2005 00:15:38 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: remove HvCallCfg.h

Now that the only users of things in HvCallCfg.h are in HvLpConfig.h, merge in
the bit we need and remove HvCallCfg.h.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: eliminate some unused inline functions
Stephen Rothwell [Wed, 22 Jun 2005 00:15:37 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: eliminate some unused inline functions

This patch removes from the iSeries header files a large number of inline
functions that are not used.  It also changes the only caller of a HvCallCfg
function that is outside HvLpConfig.h to its equivalent HvLpConfig function
and no longer includes HvCallCfg.h where it is not needed.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: remove LparData.h
Stephen Rothwell [Wed, 22 Jun 2005 00:15:36 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: remove LparData.h

include/asm-ppc64/iSeries/LparData.h just included a whole lot of other files
to declare variables that would be better declared in those other files.  So,
remove it.  This will reduce that number of things needed to be included in
most cases to access the relevant variables.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: obvious code simplifications
Stephen Rothwell [Wed, 22 Jun 2005 00:15:35 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: obvious code simplifications

This patch does some obvious code cleanups in the iSeries headers files.
- simplifies the bodies of lots of inline functions
- parenthesises a macros result
- removes C++ wrapping
- adds "extern" to some function declarations
There are no semantic changes.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: more header file white space cleanups
Stephen Rothwell [Wed, 22 Jun 2005 00:15:34 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: more header file white space cleanups

This patch just contains white space and comment cleanups in the iSeries
headers files.  There are no semantic changes.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: header file white space cleanups
Stephen Rothwell [Wed, 22 Jun 2005 00:15:33 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: header file white space cleanups

This patch just contains white space and comment cleanups in the iSeries
headers files.  There are no semantic changes.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: remove iSeries_proc.h
Stephen Rothwell [Wed, 22 Jun 2005 00:15:33 +0000 (17:15 -0700)]
[PATCH] ppc64 iSeries: remove iSeries_proc.h

include/asm-ppc64/iSeries/iSeries_proc.h just contains a declaration of a
function that no longer exists.  Remove it.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: override command line AS/LD/CC variables when adding -m64 and co for...
Sven Luther [Wed, 22 Jun 2005 00:15:32 +0000 (17:15 -0700)]
[PATCH] ppc64: override command line AS/LD/CC variables when adding -m64 and co for biarch compilers

The following kind of calls currently fails :

  make ARCH=ppc64 CC="gcc-3.4"

Since the code for detecting a biarch compiler and adding the needed 64bit
magic argument fails if the AS/LD/CC commands are overriden in the command
line.

The attached patch fixes this by using the make override and += directive,
but i am not 100% sure this will work without gmake, as i am no Makefile
expert.

Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: Abolish ioremap_mm
David Gibson [Wed, 22 Jun 2005 00:15:31 +0000 (17:15 -0700)]
[PATCH] ppc64: Abolish ioremap_mm

Currently ppc64 has two mm_structs for the kernel, init_mm and also
ioremap_mm.  The latter really isn't necessary: this patch abolishes it,
instead restricting vmallocs to the lower 1TB of the init_mm's range and
placing io mappings in the upper 1TB.  This simplifies the code in a number
of places and eliminates an unecessary set of pagetables.  It also tweaks
the unmap/free path a little, allowing us to remove the unmap_im_area() set
of page table walkers, replacing them with unmap_vm_area().

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Kill embedded system.map, use kallsyms
Benjamin Herrenschmidt [Wed, 22 Jun 2005 00:15:30 +0000 (17:15 -0700)]
[PATCH] ppc32: Kill embedded system.map, use kallsyms

This patch kills the whole embedded System.map mecanism and the
bootloader-passed System.map that was used to provide symbol resolution in
xmon.  Instead, xmon now uses kallsyms like ppc64 does.

No hurry getting that in Linus tree, let it be tested in -mm for a while
first and make sure it doesn't break various embedded configs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: don't recursively crash in die() on CHRP/PReP machines
Jakub Bogusz [Wed, 22 Jun 2005 00:15:29 +0000 (17:15 -0700)]
[PATCH] ppc32: don't recursively crash in die() on CHRP/PReP machines

This patch avoids recursive crash (leading to kernel stack overflow) in
die() on CHRP/PReP machines when CONFIG_PMAC_BACKLIGHT=y.  set_backlight_*
functions are placed in pmac section, which is discarded when _machine !=
_MACH_Pmac.

Signed-off-by: Jakub Bogusz <qboosh@pld-linux.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: remove some unnecessary includes of prom.h
Kumar Gala [Wed, 22 Jun 2005 00:15:28 +0000 (17:15 -0700)]
[PATCH] ppc32: remove some unnecessary includes of prom.h

Fight the Good Fight: Limit prom.h header creep.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Factor out common exception code into macro's for 4xx/Book-E
Kumar Gala [Wed, 22 Jun 2005 00:15:27 +0000 (17:15 -0700)]
[PATCH] ppc32: Factor out common exception code into macro's for 4xx/Book-E

4xx and Book-E PPC's have several exception levels.  The code to handle
each level is fairly regular.  Turning the code into macro's will ease the
handling of future exception levels (debug) in forth coming chips.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Clean up NUM_TLBCAMS usage for Freescale Book-E PPC's
Kumar Gala [Wed, 22 Jun 2005 00:15:26 +0000 (17:15 -0700)]
[PATCH] ppc32: Clean up NUM_TLBCAMS usage for Freescale Book-E PPC's

Made the number of TLB CAM entries private and converted the board
consumers to use num_tlbcam_entries which is setup at boot time from
configuration registers.  This way the only consumers of the #define
NUM_TLBCAMS are the arrays used to manage the TLB.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Added support for all MPC8548 internal interrupts
Kumar Gala [Wed, 22 Jun 2005 00:15:25 +0000 (17:15 -0700)]
[PATCH] ppc32: Added support for all MPC8548 internal interrupts

The MPC8548 has 48 internal interrupts and 12 external interrupts.  The
previous generation PowerQUICC III devices only had 32 internal and 12
external interrupts on the primary interrupt controller.

Expanded the number of internal interrupts to 48 for all PowerQUICC III
processors and moved the interrupt numbers for the external after the 48
internal interrupt lines, rather than putting the 12 new internal
interrupts at the end and ifdef'ng the whole mess.  As parted of this
created a macro which represents the internal interrupt senses since they
are the same on all PQ3 processors.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: remove orphaned ppc4xx_kgdb.c
Matt Porter [Wed, 22 Jun 2005 00:15:24 +0000 (17:15 -0700)]
[PATCH] ppc32: remove orphaned ppc4xx_kgdb.c

Removes ppc4xx_kgdb.c which is no longer being used.  Pointed out by Andrei
Konovalov.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Add support for MPC8245 8250 serial ports on Sandpoint
Kumar Gala [Wed, 22 Jun 2005 00:15:23 +0000 (17:15 -0700)]
[PATCH] ppc32: Add support for MPC8245 8250 serial ports on Sandpoint

Added platform device initialization for the two 8250 style UARTs that
exist on the MPC8245.  Additionally, updated the Sandpoint code to enable
one of these UARTs if an MPC8245 is connected to it.

Signed-off-by: Matt McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 40x
Matt Porter [Wed, 22 Jun 2005 00:15:22 +0000 (17:15 -0700)]
[PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 40x

This patch is virtually identical to my previous 44x one.  It removes
0x8000'0000 TASK_SIZE hardcoded assumption from head_4xx.S.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] cpm_uart: Route SCC2 pins for the STx GP3 board
Matt Porter [Wed, 22 Jun 2005 00:15:22 +0000 (17:15 -0700)]
[PATCH] cpm_uart: Route SCC2 pins for the STx GP3 board

Adds SCC2 pin routing specific to the GP3 board.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Converted MPC10X bridge to use platform devices instead of OCP
Kumar Gala [Wed, 22 Jun 2005 00:15:21 +0000 (17:15 -0700)]
[PATCH] ppc32: Converted MPC10X bridge to use platform devices instead of OCP

Converted the MPC10x bridge support (used by MPC10x and 8240/1/5) to used
the standard platform device model.

Signed-off-by: Matt McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Removed dependency on CONFIG_CPM2 for building mpc85xx_device.c
Kumar Gala [Wed, 22 Jun 2005 00:15:20 +0000 (17:15 -0700)]
[PATCH] ppc32: Removed dependency on CONFIG_CPM2 for building mpc85xx_device.c

Previously we needed CONFIG_CPM2 enabled to get the proper IRQ ifdef's for
CPM interrupts.  Recent changes have caused that to be no longer necessary.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Added preliminary support for the MPC8548 CDS board
Kumar Gala [Wed, 22 Jun 2005 00:15:19 +0000 (17:15 -0700)]
[PATCH] ppc32: Added preliminary support for the MPC8548 CDS board

Adds support for using the MPC8548 processor on the CDS reference board.
Currently all the major busses (PCI, PCI-X, PCI-Express, sRIO) and eTSEC3
and eTSEC4 are not supported.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Added support for new MPC8548 family of PowerQUICC III processors
Kumar Gala [Wed, 22 Jun 2005 00:15:18 +0000 (17:15 -0700)]
[PATCH] ppc32: Added support for new MPC8548 family of PowerQUICC III processors

Added descriptions of the new MPC8548 family processors, e500 core and
peripherals.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] SELinux: memory leak in selinux_sb_copy_data()
Gerald Schaefer [Wed, 22 Jun 2005 00:15:18 +0000 (17:15 -0700)]
[PATCH] SELinux: memory leak in selinux_sb_copy_data()

There is a memory leak during mount when SELinux is active and mount
options are specified.

Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Acked-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] VFS: memory leak in do_kern_mount()
Gerald Schaefer [Wed, 22 Jun 2005 00:15:16 +0000 (17:15 -0700)]
[PATCH] VFS: memory leak in do_kern_mount()

There is a memory leak during mount when CONFIG_SECURITY is enabled and
mount options are specified.

Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Acked-by: James Morris <jmorris@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] kbuild: display compile version
Coywolf Qi Hunt [Wed, 22 Jun 2005 00:15:15 +0000 (17:15 -0700)]
[PATCH] kbuild: display compile version

I am always trying to make sure I've booted the right kernel after a new
install.  Too paranoid maybe.  But I guess there're other people like me.
So let's make kbuild display the compile version number at the end to give
us a hint.  I know we may be booting vmlinux someday, but don't care about
it for now.

Signed-off-by: Coywolf Qi Hunt <coywolf@lovecn.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] 3c59x: remove superfluous vortex_debug test from boomerang_start_xmit()
John W. Linville [Wed, 22 Jun 2005 00:15:14 +0000 (17:15 -0700)]
[PATCH] 3c59x: remove superfluous vortex_debug test from boomerang_start_xmit()

Remove the superfluous test of "if (vortex_debug > 3)" inside the "if
(vortex_debug > 6)" clause early in boomerang_start_xmit.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Kill stray newline
Denis Vlasenko [Wed, 22 Jun 2005 00:15:14 +0000 (17:15 -0700)]
[PATCH] Kill stray newline

OOM killer prints a stray newline.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] msync: check pte dirty earlier
Abhijit Karmarkar [Wed, 22 Jun 2005 00:15:13 +0000 (17:15 -0700)]
[PATCH] msync: check pte dirty earlier

It's common practice to msync a large address range regularly, in which
often only a few ptes have actually been dirtied since the previous pass.

sync_pte_range then goes much faster if it tests whether pte is dirty
before locating and accessing each struct page cacheline; and it is hardly
slowed by ptep_clear_flush_dirty repeating that test in the opposite case,
when every pte actually is dirty.

But beware, s390's pte_dirty always says false, since its dirty bit is kept
in the storage key, located via the struct page address.  So skip this
optimization in its case: use a pte_maybe_dirty macro which just says true
if page_test_and_clear_dirty is implemented.

Signed-off-by: Abhijit Karmarkar <abhijitk@veritas.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] can_share_swap_page: use page_mapcount
Hugh Dickins [Wed, 22 Jun 2005 00:15:12 +0000 (17:15 -0700)]
[PATCH] can_share_swap_page: use page_mapcount

Remember that ironic get_user_pages race?  when the raised page_count on a
page swapped out led do_wp_page to decide that it had to copy on write, so
substituted a different page into userspace.  2.6.7 onwards have Andrea's
solution, where try_to_unmap_one backs out if it finds page_count raised.

Which works, but is unsatisfying (rmap.c has no other page_count heuristics),
and was found a few months ago to hang an intensive page migration test.  A
year ago I was hesitant to engage page_mapcount, now it seems the right fix.

So remove the page_count hack from try_to_unmap_one; and use activate_page in
unuse_mm when dropping lock, to replace its secondary effect of helping
swapoff to make progress in that case.

Simplify can_share_swap_page (now called only on anonymous pages) to check
page_mapcount + page_swapcount == 1: still needs the page lock to stabilize
their (pessimistic) sum, but does not need swapper_space.tree_lock for that.

In do_swap_page, move swap_free and unlock_page below page_add_anon_rmap, to
keep sum on the high side, and correct when can_share_swap_page called.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] do_wp_page: cannot share file page
Hugh Dickins [Wed, 22 Jun 2005 00:15:11 +0000 (17:15 -0700)]
[PATCH] do_wp_page: cannot share file page

A small optimization to do_wp_page's check for whether to avoid copy by
reusing the page already mapped.  It can never share a cached file page,
nor can it share a reserved page (often the empty zero page), so it's a
waste of time to lock and unlock in those cases.  Which nowadays can both
be neatly excluded by a preliminary PageAnon test.

Christoph has reported that a preliminary page_count test proved valuable
for scalability here, but PageAnon covers more common cases all at once.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] get_user_pages: kill get_page_map
Hugh Dickins [Wed, 22 Jun 2005 00:15:10 +0000 (17:15 -0700)]
[PATCH] get_user_pages: kill get_page_map

Since its birth, get_user_pages has been calling a misguided get_page_map
function.  follow_page has already returned NULL if the pfn is invalid, we
cannot reach an invalid pfn from a validated struct page.

Remove get_page_map, and the messy rewind in get_user_pages to cope with
its failure.  Oh, and could we please call that "struct page *page" like
everywhere else, instead of "struct page *map"?

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] rme96xx: fix PageReserved range
Hugh Dickins [Wed, 22 Jun 2005 00:15:09 +0000 (17:15 -0700)]
[PATCH] rme96xx: fix PageReserved range

rme96xx busmaster_malloc miscalculates and fails to set PageReserved on any
page of char *buf; but busmaster_free does it right, so do the same (I
don't have the card, just noticed this while sifting for rmap BUGs).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] bad_page: clear reclaim and slab
Hugh Dickins [Wed, 22 Jun 2005 00:15:08 +0000 (17:15 -0700)]
[PATCH] bad_page: clear reclaim and slab

Since free_pages_check complains if PG_reclaim or PG_slab is set, bad_page
ought to clear them to avoid repetitive reports (Nikita noticed this too).
Let prep_new_page check page_count and PG_slab as free_pages_check does.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] dup_mmap: update comment on new vma
Hugh Dickins [Wed, 22 Jun 2005 00:15:08 +0000 (17:15 -0700)]
[PATCH] dup_mmap: update comment on new vma

Remove part of comment on linking new vma in dup_mmap: since anon_vma rmap
came in, try_to_unmap_one knows the vma without needing find_vma.  But add
a comment to note that here vma is inserted without mmap_sem.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] mbind: check_range use standard ptwalk
Hugh Dickins [Wed, 22 Jun 2005 00:15:07 +0000 (17:15 -0700)]
[PATCH] mbind: check_range use standard ptwalk

Strict mbind's check for currently mapped pages being on node has been
using a slow loop which re-evaluates pgd, pud, pmd, pte for each entry:
replace that by a standard four-level page table walk like others in mm.
Since mmap_sem is held for writing, page_table_lock can be taken at the
inner level to limit latency.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] mbind: fix verify_pages pte_page
Hugh Dickins [Wed, 22 Jun 2005 00:15:06 +0000 (17:15 -0700)]
[PATCH] mbind: fix verify_pages pte_page

Strict mbind's check that pages already mapped are on right node has been
using pte_page without checking if pfn_valid, and without page_table_lock
to prevent spurious failures when try_to_unmap_one intervenes between the
pte_present and the pte_page.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ia64: pfn_to_nid() implementation
Bob Picco [Wed, 22 Jun 2005 00:15:05 +0000 (17:15 -0700)]
[PATCH] ia64: pfn_to_nid() implementation

pfn_to_nid is undefined.  We haven't had this interface on ia64.  The
sys_mbind patches need it.

Oh, the paddr_to_nid call could fail when DISCONTIG+NUMA is configured
because there isn't any ACPI SRAT NUMA information.

Signed-off-by: Bob Picco <bob.picco@hp.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] shmem: restore superblock info
Hugh Dickins [Wed, 22 Jun 2005 00:15:04 +0000 (17:15 -0700)]
[PATCH] shmem: restore superblock info

To improve shmem scalability, we allowed tmpfs instances which don't need
their blocks or inodes limited not to count them, and not to allocate any
sbinfo.  Which was okay when the only use for the sbinfo was accounting
blocks and inodes; but since then a couple of unrelated projects extending
tmpfs want to store other data in the sbinfo.  Whether either extension
reaches mainline is beside the point: I'm guilty of a bad design decision,
and should restore sbinfo to make any such future extensions easier.

So, once again allocate a shmem_sb_info for every shmem/tmpfs instance, and
now let max_blocks 0 indicate unlimited blocks, and max_inodes 0 unlimited
inodes.  Brent Casavant verified (many months ago) that this does not
perceptibly impact the scalability (since the unlimited sbinfo cacheline is
repeatedly accessed but only once dirtied).

And merge shmem_set_size into its sole caller shmem_remount_fs.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] SN2 XPC build patches
Jes Sorensen [Wed, 22 Jun 2005 00:15:03 +0000 (17:15 -0700)]
[PATCH] SN2 XPC build patches

This patch contains the bits to make the XPC code use the uncached
allocator rather than calling into the mspec driver.  It also includes the
mspec.h header which is required to build the XPC modules.

Signed-off-by: Jes Sorensen <jes@wildopensource.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ia64 uncached alloc
Jes Sorensen [Wed, 22 Jun 2005 00:15:02 +0000 (17:15 -0700)]
[PATCH] ia64 uncached alloc

This patch contains the ia64 uncached page allocator and the generic
allocator (genalloc).  The uncached allocator was formerly part of the SN2
mspec driver but there are several other users of it so it has been split
off from the driver.

The generic allocator can be used by device driver to manage special memory
etc.  The generic allocator is based on the allocator from the sym53c8xx_2
driver.

Various users on ia64 needs uncached memory.  The SGI SN architecture requires
it for inter-partition communication between partitions within a large NUMA
cluster.  The specific user for this is the XPC code.  Another application is
large MPI style applications which use it for synchronization, on SN this can
be done using special 'fetchop' operations but it also benefits non SN
hardware which may use regular uncached memory for this purpose.  Performance
of doing this through uncached vs cached memory is pretty substantial.  This
is handled by the mspec driver which I will push out in a seperate patch.

Rather than creating a specific allocator for just uncached memory I came up
with genalloc which is a generic purpose allocator that can be used by device
drivers and other subsystems as they please.  For instance to handle onboard
device memory.  It was derived from the sym53c7xx_2 driver's allocator which
is also an example of a potential user (I am refraining from modifying sym2
right now as it seems to have been under fairly heavy development recently).

On ia64 memory has various properties within a granule, ie.  it isn't safe to
access memory as uncached within the same granule as currently has memory
accessed in cached mode.  The regular system therefore doesn't utilize memory
in the lower granules which is mixed in with device PAL code etc.  The
uncached driver walks the EFI memmap and pulls out the spill uncached pages
and sticks them into the uncached pool.  Only after these chunks have been
utilized, will it start converting regular cached memory into uncached memory.
Hence the reason for the EFI related code additions.

Signed-off-by: Jes Sorensen <jes@wildopensource.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Reduce size of huge boot per_cpu_pageset
Christoph Lameter [Wed, 22 Jun 2005 00:15:00 +0000 (17:15 -0700)]
[PATCH] Reduce size of huge boot per_cpu_pageset

Reduce size of the huge per_cpu_pageset structure in __initdata introduced
into mm1 with the pageset localization patchset.  Use one specially
configured pageset per cpu for all zones and nodes during bootup.

- Avoid duplication of pageset initialization code.
- do the adding to the pageset list before potential free_pages_bulk
  in free_hot_cold_page (otherwise we would have to hold a page
  in a pageset during the period that the boot pagesets are in use).
- remove mistaken __cpuinitdata attribute and revert back to __initdata
  for the boot pageset. A boot pageset is not necessary for cpu hotplug.

Tested for UP SMP NUMA on x86_64 (2.6.12-rc6-mm1): UP SMP NUMA Tested on
IA64 (2.6.12-rc5-mm2): NUMA (2.6.12-rc6-mm1 broken for IA64 because of
sparsemem patches)

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Periodically drain non local pagesets
Christoph Lameter [Wed, 22 Jun 2005 00:14:57 +0000 (17:14 -0700)]
[PATCH] Periodically drain non local pagesets

The pageset array can potentially acquire a huge amount of memory on large
NUMA systems.  F.e.  on a system with 512 processors and 256 nodes there
will be 256*512 pagesets.  If each pageset only holds 5 pages then we are
talking about 655360 pages.With a 16K page size on IA64 this results in
potentially 10 Gigabytes of memory being trapped in pagesets.  The typical
cases are much less for smaller systems but there is still the potential of
memory being trapped in off node pagesets.  Off node memory may be rarely
used if local memory is available and so we may potentially have memory in
seldom used pagesets without this patch.

The slab allocator flushes its per cpu caches every 2 seconds.  The
following patch flushes the off node pageset caches in the same way by
tying into the slab flush.

The patch also changes /proc/zoneinfo to include the number of pages
currently in each pageset.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] add OOM debug
Janet Morgan [Wed, 22 Jun 2005 00:14:56 +0000 (17:14 -0700)]
[PATCH] add OOM debug

This patch provides more debug info when the system is OOM.  It displays
memory stats (basically sysrq-m info) from __alloc_pages() when page
allocation fails and during OOM kill.

Thanks to Dave Jones for coming up with the idea.

Signed-off-by: Janet Morgan <janetmor@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] __read_page_state(): pass unsigned long instead of unsigned
Benjamin LaHaise [Wed, 22 Jun 2005 00:14:55 +0000 (17:14 -0700)]
[PATCH] __read_page_state(): pass unsigned long instead of unsigned

By making the offset argument of __read_page_state an unsigned long instead of
unsigned, we can avoid forcing the compiler to sign extend a usually constant
argument.  This saves 1 instruction on x86-64.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] __mod_page_state(): pass unsigned long instead of unsigned
Benjamin LaHaise [Wed, 22 Jun 2005 00:14:54 +0000 (17:14 -0700)]
[PATCH] __mod_page_state(): pass unsigned long instead of unsigned

By making the offset argument of __mod_page_state an unsigned long instead
of unsigned, we can avoid forcing the compiler to sign extend a usually
constant argument.  This saves 1 instruction on x86-64.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] vm: try_to_free_pages unused argument
Darren Hart [Wed, 22 Jun 2005 00:14:53 +0000 (17:14 -0700)]
[PATCH] vm: try_to_free_pages unused argument

try_to_free_pages accepts a third argument, order, but hasn't used it since
before 2.6.0.  The following patch removes the argument and updates all the
calls to try_to_free_pages.

Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] mm: remove PG_highmem
Badari Pulavarty [Wed, 22 Jun 2005 00:14:52 +0000 (17:14 -0700)]
[PATCH] mm: remove PG_highmem

Remove PG_highmem, to save a page flag.  Use is_highmem() instead.  It'll
generate a little more code, but we don't use PageHigheMem() in many places.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] mmap topdown fix for large stack limit, large allocation
Chris Wright [Wed, 22 Jun 2005 00:14:52 +0000 (17:14 -0700)]
[PATCH] mmap topdown fix for large stack limit, large allocation

The topdown changes in 2.6.12-rc1 can cause large allocations with large
stack limit to fail, despite there being space available.  The
mmap_base-len is only valid when len >= mmap_base.  However, nothing in
topdown allocator checks this.  It's only (now) caught at higher level,
which will cause allocation to simply fail.  The following change restores
the fallback to bottom-up path, which will allow large allocations with
large stack limit to potentially still succeed.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Avoiding mmap fragmentation
Wolfgang Wander [Wed, 22 Jun 2005 00:14:49 +0000 (17:14 -0700)]
[PATCH] Avoiding mmap fragmentation

Ingo recently introduced a great speedup for allocating new mmaps using the
free_area_cache pointer which boosts the specweb SSL benchmark by 4-5% and
causes huge performance increases in thread creation.

The downside of this patch is that it does lead to fragmentation in the
mmap-ed areas (visible via /proc/self/maps), such that some applications
that work fine under 2.4 kernels quickly run out of memory on any 2.6
kernel.

The problem is twofold:

  1) the free_area_cache is used to continue a search for memory where
     the last search ended.  Before the change new areas were always
     searched from the base address on.

     So now new small areas are cluttering holes of all sizes
     throughout the whole mmap-able region whereas before small holes
     tended to close holes near the base leaving holes far from the base
     large and available for larger requests.

  2) the free_area_cache also is set to the location of the last
     munmap-ed area so in scenarios where we allocate e.g.  five regions of
     1K each, then free regions 4 2 3 in this order the next request for 1K
     will be placed in the position of the old region 3, whereas before we
     appended it to the still active region 1, placing it at the location
     of the old region 2.  Before we had 1 free region of 2K, now we only
     get two free regions of 1K -> fragmentation.

The patch addresses thes issues by introducing yet another cache descriptor
cached_hole_size that contains the largest known hole size below the
current free_area_cache.  If a new request comes in the size is compared
against the cached_hole_size and if the request can be filled with a hole
below free_area_cache the search is started from the base instead.

The results look promising: Whereas 2.6.12-rc4 fragments quickly and my
(earlier posted) leakme.c test program terminates after 50000+ iterations
with 96 distinct and fragmented maps in /proc/self/maps it performs nicely
(as expected) with thread creation, Ingo's test_str02 with 20000 threads
requires 0.7s system time.

Taking out Ingo's patch (un-patch available per request) by basically
deleting all mentions of free_area_cache from the kernel and starting the
search for new memory always at the respective bases we observe: leakme
terminates successfully with 11 distinctive hardly fragmented areas in
/proc/self/maps but thread creating is gringdingly slow: 30+s(!) system
time for Ingo's test_str02 with 20000 threads.

Now - drumroll ;-) the appended patch works fine with leakme: it ends with
only 7 distinct areas in /proc/self/maps and also thread creation seems
sufficiently fast with 0.71s for 20000 threads.

Signed-off-by: Wolfgang Wander <wwc@rentec.com>
Credit-to: "Richard Purdie" <rpurdie@rpsys.net>
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu> (partly)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] node local per-cpu-pages
Christoph Lameter [Wed, 22 Jun 2005 00:14:47 +0000 (17:14 -0700)]
[PATCH] node local per-cpu-pages

This patch modifies the way pagesets in struct zone are managed.

Each zone has a per-cpu array of pagesets.  So any particular CPU has some
memory in each zone structure which belongs to itself.  Even if that CPU is
not local to that zone.

So the patch relocates the pagesets for each cpu to the node that is nearest
to the cpu instead of allocating the pagesets in the (possibly remote) target
zone.  This means that the operations to manage pages on remote zone can be
done with information available locally.

We play a macro trick so that non-NUMA pmachines avoid the additional
pointer chase on the page allocator fastpath.

AIM7 benchmark on a 32 CPU SGI Altix

w/o patches:
Tasks    jobs/min  jti  jobs/min/task      real       cpu
    1      484.68  100       484.6769     12.01      1.97   Fri Mar 25 11:01:42 2005
  100    27140.46   89       271.4046     21.44    148.71   Fri Mar 25 11:02:04 2005
  200    30792.02   82       153.9601     37.80    296.72   Fri Mar 25 11:02:42 2005
  300    32209.27   81       107.3642     54.21    451.34   Fri Mar 25 11:03:37 2005
  400    34962.83   78        87.4071     66.59    588.97   Fri Mar 25 11:04:44 2005
  500    31676.92   75        63.3538     91.87    742.71   Fri Mar 25 11:06:16 2005
  600    36032.69   73        60.0545     96.91    885.44   Fri Mar 25 11:07:54 2005
  700    35540.43   77        50.7720    114.63   1024.28   Fri Mar 25 11:09:49 2005
  800    33906.70   74        42.3834    137.32   1181.65   Fri Mar 25 11:12:06 2005
  900    34120.67   73        37.9119    153.51   1325.26   Fri Mar 25 11:14:41 2005
 1000    34802.37   74        34.8024    167.23   1465.26   Fri Mar 25 11:17:28 2005

with slab API changes and pageset patch:

Tasks    jobs/min  jti  jobs/min/task      real       cpu
    1      485.00  100       485.0000     12.00      1.96   Fri Mar 25 11:46:18 2005
  100    28000.96   89       280.0096     20.79    150.45   Fri Mar 25 11:46:39 2005
  200    32285.80   79       161.4290     36.05    293.37   Fri Mar 25 11:47:16 2005
  300    40424.15   84       134.7472     43.19    438.42   Fri Mar 25 11:47:59 2005
  400    39155.01   79        97.8875     59.46    590.05   Fri Mar 25 11:48:59 2005
  500    37881.25   82        75.7625     76.82    730.19   Fri Mar 25 11:50:16 2005
  600    39083.14   78        65.1386     89.35    872.79   Fri Mar 25 11:51:46 2005
  700    38627.83   77        55.1826    105.47   1022.46   Fri Mar 25 11:53:32 2005
  800    39631.94   78        49.5399    117.48   1169.94   Fri Mar 25 11:55:30 2005
  900    36903.70   79        41.0041    141.94   1310.78   Fri Mar 25 11:57:53 2005
 1000    36201.23   77        36.2012    160.77   1458.31   Fri Mar 25 12:00:34 2005

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Shobhit Dayal <shobhit@calsoftinc.com>
Signed-off-by: Shai Fultheim <Shai@Scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Hugepage consolidation
David Gibson [Wed, 22 Jun 2005 00:14:44 +0000 (17:14 -0700)]
[PATCH] Hugepage consolidation

A lot of the code in arch/*/mm/hugetlbpage.c is quite similar.  This patch
attempts to consolidate a lot of the code across the arch's, putting the
combined version in mm/hugetlb.c.  There are a couple of uglyish hacks in
order to covert all the hugepage archs, but the result is a very large
reduction in the total amount of code.  It also means things like hugepage
lazy allocation could be implemented in one place, instead of six.

Tested, at least a little, on ppc64, i386 and x86_64.

Notes:
- this patch changes the meaning of set_huge_pte() to be more
  analagous to set_pte()
- does SH4 need s special huge_ptep_get_and_clear()??

Acked-by: William Lee Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] VM: rate limit early reclaim
Martin Hicks [Wed, 22 Jun 2005 00:14:43 +0000 (17:14 -0700)]
[PATCH] VM: rate limit early reclaim

When early zone reclaim is turned on the LRU is scanned more frequently when a
zone is low on memory.  This limits when the zone reclaim can be called by
skipping the scan if another thread (either via kswapd or sync reclaim) is
already reclaiming from the zone.

Signed-off-by: Martin Hicks <mort@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] VM: add __GFP_NORECLAIM
Martin Hicks [Wed, 22 Jun 2005 00:14:42 +0000 (17:14 -0700)]
[PATCH] VM: add __GFP_NORECLAIM

When using the early zone reclaim, it was noticed that allocating new pages
that should be spread across the whole system caused eviction of local pages.

This adds a new GFP flag to prevent early reclaim from happening during
certain allocation attempts.  The example that is implemented here is for page
cache pages.  We want page cache pages to be spread across the whole system,
and we don't want page cache pages to evict other pages to get local memory.

Signed-off-by: Martin Hicks <mort@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] VM: early zone reclaim
Martin Hicks [Wed, 22 Jun 2005 00:14:41 +0000 (17:14 -0700)]
[PATCH] VM: early zone reclaim

This is the core of the (much simplified) early reclaim.  The goal of this
patch is to reclaim some easily-freed pages from a zone before falling back
onto another zone.

One of the major uses of this is NUMA machines.  With the default allocator
behavior the allocator would look for memory in another zone, which might be
off-node, before trying to reclaim from the current zone.

This adds a zone tuneable to enable early zone reclaim.  It is selected on a
per-zone basis and is turned on/off via syscall.

Adding some extra throttling on the reclaim was also required (patch
4/4).  Without the machine would grind to a crawl when doing a "make -j"
kernel build.  Even with this patch the System Time is higher on
average, but it seems tolerable.  Here are some numbers for kernbench
runs on a 2-node, 4cpu, 8Gig RAM Altix in the "make -j" run:

wall  user   sys   %cpu  ctx sw.  sleeps
----  ----   ---   ----   ------  ------
No patch 1009  1384   847   258   298170   504402
w/patch, no reclaim     880   1376   667   288   254064   396745
w/patch & reclaim       1079  1385   926   252   291625   548873

These numbers are the average of 2 runs of 3 "make -j" runs done right
after system boot.  Run-to-run variability for "make -j" is huge, so
these numbers aren't terribly useful except to seee that with reclaim
the benchmark still finishes in a reasonable amount of time.

I also looked at the NUMA hit/miss stats for the "make -j" runs and the
reclaim doesn't make any difference when the machine is thrashing away.

Doing a "make -j8" on a single node that is filled with page cache pages
takes 700 seconds with reclaim turned on and 735 seconds without reclaim
(due to remote memory accesses).

The simple zone_reclaim syscall program is at
http://www.bork.org/~mort/sgi/zone_reclaim.c

Signed-off-by: Martin Hicks <mort@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>