Andrew Morton [Mon, 19 Jan 2004 02:25:35 +0000 (18:25 -0800)]
[PATCH] ppc64: early BSS clear, from Ben Herrenschmidt
From: Anton Blanchard <anton@samba.org>
Gone are the days of initialising stuff we touch in prom_init just
to keep it out of the BSS. There are a few things the hypervisor
writes to in the iseries case, hard code them into the data segment
and add a comment.
Remove the -fno-zero-initialized-in-bss hack, it was required when
gcc got smart and put zero initialised stuff into the BSS
Andrew Morton [Mon, 19 Jan 2004 02:25:09 +0000 (18:25 -0800)]
[PATCH] ppc64: cp_compat_stat should copy nanosecond fields
From: Anton Blanchard <anton@samba.org>
Looks like glibc is using stat in some places, so we should modify
it to copy the nanosecond fields. Also speed up stat by only checking
the region once instead of each put_user call.
Andrew Morton [Mon, 19 Jan 2004 02:24:52 +0000 (18:24 -0800)]
[PATCH] ppc64: setup_cpu must be called on boot cpu
From: Anton Blanchard <anton@samba.org>
setup_cpu was being called for the boot cpu after all other cpus had been
spun up. The init thread can sleep during secondary cpu spinup (eg migration
thread init) and sometimes the init thread would switch to another cpu at
this time. The end result was setup_cpu was called twice on one cpu and
never on the boot cpu.
The original fix called setup_cpu on the boot cpu before all others but that
wont work for G5, so we now use cpu affinity calls to enforce it.
Andrew Morton [Mon, 19 Jan 2004 02:24:43 +0000 (18:24 -0800)]
[PATCH] ppc64: vmlinux.lds fixes, from Alan Modra
From: Anton Blanchard <anton@samba.org>
- Remove a bunch of unnecessary sections
- Always declare section labels inside the section (bug found on ppc32)
- Rearrange sections to waste less space
Andrew Morton [Mon, 19 Jan 2004 02:24:35 +0000 (18:24 -0800)]
[PATCH] ppc64: Makefile fixes
From: Anton Blanchard <anton@samba.org>
- remove old checks target, no longer used
- add -mtraceback=none, we dont use traceback tables any more
- add check for -mcpu=power4, older toolchains dont support this option
Andrew Morton [Mon, 19 Jan 2004 02:23:35 +0000 (18:23 -0800)]
[PATCH] ppc64: __hash_page rewrite, from Ben Herrenschmidt
From: Anton Blanchard <anton@samba.org>
Rewrite __hash_page function in assembly in such a way we don't need
the page table lock any more. We now rely on a BUSY bit in the linux
PTE on which we spin on when doing an update of the PTE
Andrew Morton [Mon, 19 Jan 2004 02:22:27 +0000 (18:22 -0800)]
[PATCH] ppc64: fix POWER3 boot
From: Anton Blanchard <anton@samba.org>
Binutils uses the recent mtcrf optimisation when compiling for a POWER4
target. Unfortunately this causes a program check on POWER3. We required
compiling for POWER4 so the tlbiel instruction would be recognised.
For the moment we hardwire the tlbiel instruction, longer term we can use the
binutils -many flag.
Andrew Morton [Mon, 19 Jan 2004 02:19:35 +0000 (18:19 -0800)]
[PATCH] ppc64: preliminary iseries support, from Paul Mackerras
From: Anton Blanchard <anton@samba.org>
Preliminary iSeries support. Still a bit hackish in parts but it does
compile. The viodasd driver is almost completely untested so don't trust it
with your data.
Andrew Morton [Mon, 19 Jan 2004 02:19:16 +0000 (18:19 -0800)]
[PATCH] ppc64: NVRAM error logging/buffering patch, from Jake Moilanen
From: Anton Blanchard <anton@samba.org>
This is a port of the nvram buffering/error logging code from 2.4 to 2.6. It
includes moving /proc/rtas to /proc/ppc64/rtas and making /proc/rtas a
symlink to /proc/ppc64/rtas. It also splits up the /dev/nvram device
read/write functions from the basic nvram access functions, and adds ppc_md
fields for the nvram access functions.
Andrew Morton [Mon, 19 Jan 2004 02:17:48 +0000 (18:17 -0800)]
[PATCH] ppc64: shared processor support, from Dave Engebretsen
From: Anton Blanchard <anton@samba.org>
Initial round of code to add shared processor support into 2.6. This adds
h_call interfaces, paca/VPA fields, and vpa register. Add adds new idle loop
code.
Andrew Morton [Mon, 19 Jan 2004 02:17:03 +0000 (18:17 -0800)]
[PATCH] ppc64: fix sched_clock, from Paul Mackerras:
From: Anton Blanchard <anton@samba.org>
Currently the sched_clock implementation for PPC64 is bogus. It just reads
the timebase register, which counts at some fixed rate, typically around
100MHz. This patch adds code to calculate a suitable multiplier from the
timebase frequency, and use that in sched_clock().
Andrew Morton [Mon, 19 Jan 2004 02:13:20 +0000 (18:13 -0800)]
[PATCH] ppc64: Open Firmware device tree manipulation support, from Nathan Lynch
From: Anton Blanchard <anton@samba.org>
Implementation of /proc/ppc64/ofdt, for manipulation of Open Firmware
device tree (/proc/device-tree). Supports addition and removal of
OF device nodes.
Andrew Morton [Mon, 19 Jan 2004 02:11:09 +0000 (18:11 -0800)]
[PATCH] ppc64: Change to new OF device tree API, from Nathan Lynch
From: Anton Blanchard <anton@samba.org>
Attached is a patch which replaces all the uses of the old device tree API in
arch/ppc64. Patch is against 2.6.0-test5 (cset 1.1328) from ameslab bk, plus
the patch from my previous message. I've tested this on a pSeries LPAR.
Andrew Morton [Mon, 19 Jan 2004 02:10:48 +0000 (18:10 -0800)]
[PATCH] ppc64: New Open Firmware device tree API, from Nathan Lynch
From: Anton Blanchard <anton@samba.org>
This is an adaptation of the new Open Firmware device tree traversal API from
ppc32, originally written by Benjamin Herrenschmidt. This patch is against
2.6.0-test3, but should apply ok to the latest 2.5 ameslab tree.
These functions are meant to be SMP-safe alternatives to the current set of
query/traversal routines (find_devices, find_type_devices, et al).
Andrew Morton [Mon, 19 Jan 2004 02:10:29 +0000 (18:10 -0800)]
[PATCH] ppc64: support for ibm,phandle OF property, from Dave Engebretsen:
From: Anton Blanchard <anton@samba.org>
Upcoming partition firmware requires the use of the ibm,phandle property for
matching device nodes. Add a new field in device_node to contain this data.
Andrew Morton [Mon, 19 Jan 2004 02:07:58 +0000 (18:07 -0800)]
[PATCH] input: i8042 suspend
From: Dmitry Torokhov <dtor_core@ameritech.net>
Add suspend methods to restore original controller state on suspend as some
BIOS don't like the state we leave it in. Also synchroniously delete the
polling timer on module exit.
Andrew Morton [Mon, 19 Jan 2004 02:07:34 +0000 (18:07 -0800)]
[PATCH] raw.c refcounting fix
From: viro@parcelfarce.linux.theplanet.co.uk
raw.c has a refcounting bug (patch attached).
As for the theory... If you have a pathname - use filp_open() or
open_bdev_excl() and be done with that. bdget() et.al. are OK only if you
really have nothing better than device number and that's a situation that
should be avoided unless you really have no choice.
Said that, we have the following primitives:
* lookup_bdev(): takes a pathname, returns a reference to block_device.
* bdget(): takes a number, returns a reference to block_device.
* blkdev_get(): takes a reference to block_device and opens it. If open
fails - drops the reference to block_device passed to it.
* blkdev_put(): takes a reference to block_device and closes it. The
reference is dropped.
* bdput(): drops a reference to block_device.
Note that behaviour of blkdev_get() and blkdev_put() is such that it makes
for minimal cleanup code.
bd_claim()/bd_release() is the exclusion mechanism - that's what mount,
swapon, open with O_EXCL, etc. are using to avoid stepping on each others
toes. bd_claim() claims bdev for given owner; if it's already owned and
not by the same owner you'll get -EBUSY. bd_release() reverts the effect
of bd_claim(). Note that if you claim the thing N times (with the same
owner, obviously), you'll need N bd_release() before it stops being owned.
raw.c grabbed a reference to bdev only after blkdev_get(). If blkdev_get()
failed (e.g. media being absent), you've got an unbalanced bdput().
Andrew Morton [Mon, 19 Jan 2004 02:07:25 +0000 (18:07 -0800)]
[PATCH] cramfs: use pagecache better
From: viro@parcelfarce.linux.theplanet.co.uk
Patch switches cramfs_read() to direct use of pagecache and
eliminates all messing with buffer_heads. Fixes the interaction with
ramdisk (there set_blocksize() simply killed the ramdisk contents) and
gets code less brittle overall.
For bdevfs inodes (ones created along with struct block_device by
fs/block_dev.c) we have inode->i_bdev equal to &BDEV_I(inode)->bdev (i.e.
it's at the constant offset from inode). New helper added for such inodes
(I_BDEV(inode)). A bunch of places (mostly in block_dev.c) switched to use
of that helper. A bunch of places that used
file->f_dentry->d_inode->i_bdev->bd_inode
switched to
file->f_mapping->host
- those expressions are equal whenever the former is valid.
generic_osync_inode() got an extra argument - mapping and doesn't calculate
inode->i_mapping anymore. Callers updated and switched to use of
->f_mapping.
In a bunch of places we used file->f_dentry->d_inode->i_sem to protect
fdatasync et.al. Replaced with corrent file->f_mapping->host->i_sem - the
object we are protecting is address_space, so we want an exclusion that would
work for redirected ->i_mapping. For normal files (not coda, not bdev) it's
all the same, of course - there we have
A lot of places used to use ->f_dentry->d_inode->i_mapping all over the
place. Replaced with use of ->f_mapping. For now - just the places where we
literally could do search-and-replace.
presto_journal_close() switched to passing struct presto_file_data * instead
of bogus struct file *. The only field of struct file we used to look at was
file->private_data and most of the callers allocated on-stack struct file,
assigned file.private_data and passed the sucker to presto_journal_close().
Idiocy removed.
Looks like they started with case where the data they wanted all along was,
indeed, in ->private_data of already available struct file, so they just
passed pointer to struct file. And when they found that they need to call it
in other places where there was no such struct file, they'd done it the dumb
way instead of fixing the prototype...
Andrew Morton [Mon, 19 Jan 2004 02:05:49 +0000 (18:05 -0800)]
[PATCH] bdev: open() changes
The first of a series which move us toward blockdev hotplug support. After
these we have achieved the following:
a) For "normal" (not bdevfs) inodes of block devices we never look at
->i_mapping.
b) For the same inodes we only look at ->i_bdev in bd_acquire() where it's
used only as "here's what we'd found the last time" sort of cached value.
If it's NULL, we just recalculate it.
c) Lots of messy expressions had been trimmed down, while we are at it.
(a) and (b) allow us to start doing proper block hotplug - we can destroy the
association between inode and bdev at any time, unhash bdev in question and
have new open() do everything from scratch, without waiting for old opened
files to close. The goal is to be able to say "revoke everything over that
gendisk"/"revoke that partition" and have it do the right thing.
This patch:
Where the old code called (block device) ->open(inode, file), use
->open(inode->i_bdev->bd_inode, file). Changes in drivers:
* none to those that only used inode->i_bdev and inode->i_rdev in their
->open() (bdev->bd_inode->i_bdev == bdev, so we are OK)
* floppy.c and floppy98.c used to call permission(inode, ...) in
floppy_open(). Switched to permission(file->f_dentry->d_inode, ...)
Andrew Morton [Mon, 19 Jan 2004 02:05:15 +0000 (18:05 -0800)]
[PATCH] kyrofb support
From: Paul Mundt <lethal@linux-sh.org>
This patch adds support for the Kyro graphics boards (STG4000/PowerVR
3/etc= .) to 2.6. This is a direct port and substantial cleanup / rewrite
of the 2.4 driver that's available in the sh64 tree at linux-sh.bkbits.net.
Some of the overlay code and the STG4000 bits are still a bit ugly, so be
forewarned.
Andrew Morton [Mon, 19 Jan 2004 02:05:04 +0000 (18:05 -0800)]
[PATCH] SH Merge
From: Paul Mundt <lethal@linux-sh.org>
Here's a rather large update for SH (this is a bit large mainly since a
number of things have piled up, and Linus didn't want any of this during
feature freeze time). All of these changes are specific to the SH platform,
and as such, shouldn't effect any other platforms.
Bjorn Helgaas [Fri, 16 Jan 2004 22:03:20 +0000 (22:03 +0000)]
[SERIAL] make ACPI serial module unload work
Patch from Bjorn Helgaas
This patch makes ACPI serial ports work right when the serial driver
is built as a module. Previously, loading worked fine, but we
didn't clean up on module removal.