Commit graph

66 commits

Author SHA1 Message Date
John Rose d3588ba9bb [PATCH] initialize TCE tables
A fairly recent platform requirement states that the OS must clear the
whole TCE table at setup time, in case firmware left any active
mappings in it.  Without this initialization, dynamic bus removes can
fail.  Firmware rejects these requests if active mappings still exist 
for a slot that has been deallocated by the OS.

Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-06-20 21:43:48 +10:00
Anton Blanchard 0231c290d8 [PATCH] ppc64: use cpu_has_feature macro
Use the new cpu_has_feature macros instead of open coding it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-06-20 21:43:15 +10:00
Anton Blanchard ad21798e0e [PATCH] ppc64: quieten RTAS printks
Some rtasd printks were too loud. They would appear on a quiet boot
even though they were only informational.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-06-20 21:43:07 +10:00
Olaf Hering 1016888fb6 [PATCH] update ppc64 defconfig
enable cpusets
enable new lpfc and jsm drivers
enable new dm-multipath
leave new agp disabled
disable rivafb, it does not handle the cards in G5 models (FX5200 as example)
the new nvidiafb doesnt work on bigendian, yet

Signed-off-by: Olaf Hering <olh@suse.de>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-14 17:41:39 -07:00
Paul Mackerras 4845f33337 [PATCH] ppc64: update example configs
Here is a patch to update the example configs in arch/ppc64/configs.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-14 12:11:12 -07:00
Paul Mackerras ce10d97905 [PATCH] ppc64: Fix PER_LINUX32 behaviour
This patch fixes some bugs in the ppc64 PER_LINUX32 implementation,
noted by Juergen Kreileder:

* uname(2) doesn't respect PER_LINUX32, it returns 'ppc64' instead of 'ppc'
* Child processes of a PER_LINUX32 process don't inherit PER_LINUX32

Along the way I took the opportunity to move things around so that
sys_ppc32.c only has 32-bit syscall emulation functions and to remove
the obsolete "fakeppc" command line option.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 16:24:15 -07:00
Ananth N Mavinakayanahalli f829fd23c8 [PATCH] ppc64 kprobes: remove spurious MSR_SE masking
Remove spurious MSR_SE reset during kprobe processing.
single_step_exception() already does it for us.  Reset it to be safe when
executing the fault_handler.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 16:21:13 -07:00
Ananth N Mavinakayanahalli 63224d1e8b [PATCH] ppc64 kprobes: correct kprobe registration return values
Add stricter checks during kprobe registration.  Return correct error value so
insmod doesn't succeed.  Also printk reason for registration failure.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 16:21:13 -07:00
Ananth N Mavinakayanahalli 358c6ac0dd [PATCH] ppc64 kprobes: don't eat dabr/iabr exceptions
Kprobes was eating the hardware instruction and data address
breakpoint exceptions.  This patch fixes it; kprobes doesn't use those
exceptions at all and should ignore them.

Signed-off-by: Ananth N Mavinakayanahalli <amavin@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 10:18:59 -07:00
Olaf Hering 7840e5e95c [PATCH] ppc64: print negative numbers correctly in boot wrapper
if num has a value of -1, accessing the digits[] array will fail and the
format string will be printed in funny way, or not at all. This happens if
one prints negative numbers.
Just change the code to match lib/vsprintf.c
asm/div64.h cant be used because u64 maps to u32 for this build.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-06-08 10:18:59 -07:00
Nathan Lynch 8be3de3fd8 [PATCH] prom_find_machine_type typo breaks pSeries lpar boot
A typo in prom_find_machine_type from Ben's recent patch "ppc64: Fix
result code handling in prom_init" prevents pSeries LPAR systems from
booting.

Tested on a pSeries 570 and OpenPower 720 (both Power5 LPAR).

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-03 13:20:04 -07:00
Anton Blanchard c4eb2a9331 [PATCH] ppc64: remove decr_overclock
Now that we have HZ=1000 there is much less of a need for decr_overclock.
Remove it.

Leave spread_lpevents but move it into iSeries_setup.c.  We should look at
making event spreading the default some day.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-02 15:12:30 -07:00
Anton Blanchard 6dc2f0c7df [PATCH] ppc64: cleanup iseries runlight support
The iseries has a bar graph on the front panel that shows how busy it is.
The operating system sets and clears a bit in the CTRL register to control
it.

Instead of going to the complexity of using a thread info bit, just set and
clear it in the idle loop.

Also create two helper functions, ppc64_runlatch_on and ppc64_runlatch_off.

Finally don't use the short form of the SPR defines.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-02 15:12:30 -07:00
Benjamin Herrenschmidt 1e86d1c648 [PATCH] ppc64: Fix result code handling in prom_init
prom_init(), the trampoline code that "talks" to Open Firmware during
early boot, has various issues with managing OF result codes. Some of my
recent fixups in fact made the problem worse on some platforms.

This patch reworks it all. Tested on g5, Maple, POWER3 and POWER5.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-02 08:19:27 -07:00
Benjamin Herrenschmidt 5f64f73957 [PATCH] ppc32/ppc64: cleanup /proc/device-tree
This cleans up the /proc/device-tree representation of the Open Firmware
device-tree on ppc and ppc64.  It does the following things:

 - Workaround an issue in some Apple device-trees where a property may
   exist with the same name as a child node of the parent.  We now
   simply "drop" the property instead of creating duplicate entries in
   /proc with random result...

 - Do not try to chop off the "@0" at the end of a node name whose unit
   address is 0.  This is not useful, inconsistent, and the code was
   buggy and didn't always work anyway.

 - Do not create symlinks for the short name and unit address parts of a
   node.  These were never really used, bloated the memory footprint of
   the device-tree with useless struct proc_dir_entry and their matching
   dentry and inode cache bloat.

This results in smaller code, smaller memory footprint, and a more
accurate view of the tree presented to userland.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-01 07:54:14 -07:00
Benjamin Herrenschmidt 44e4665cc9 [PATCH] ppc64: Fix a device-tree bug on Apple's
Apple's Open Firmware has a funny bug when creating the /cpus nodes
where it leaves a dangling '\0' character in the CPU name which ends up
appearing in the full path of the node. This is bogus and
confuses /proc/device-tree badly.

This patch strips those bogus zero's from the node full path when
reading the device-tree from Open Firmware. The "name" property is not
modified and still contains the spurrious 0 (it basically contains 0
tailing 0 instead of one) but that shouldn't be a problem.

An equivalent patch for ppc32 will follow shortly

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-01 07:54:13 -07:00
Anton Blanchard f50734569c [PATCH] ppc64: allow timer based profiling on iseries
We used to have an iseries specific profiler that used /proc/profile.  Now
thats gone we can use the generic timer based stuff.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-31 14:54:18 -07:00
Paul Mackerras 05fda3b1d8 [PATCH] ppc64: actually call prom_send_capabilities
When I sent in the patch adding the code for the kernel to tell the
firmware about its capabilities on pSeries machines, I included the
function to give the capabilities to firmware but somehow forgot the
hunk that adds the call to the new function.  This patch adds the
call.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-31 08:26:05 -07:00
Stephen Rothwell d0e8e29100 [PATCH] ppc64 iSeries: fix boot time setting
For quite a while, there has existed a hypervisor bug on legacy iSeries
which means that we do not get the boot time set in the kernel.  This
patch works around that bug.  This was most noticable when the root
partition needed to be checked at every boot as the kernel thought it
was some time in 1905 until user mode reset the time correctly.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-25 10:13:43 -07:00
Stephen Rothwell 8f80e5c911 [PATCH] ppc64: fix initialisation of gettimeofday calculations
On PPC64, we keep track of when we need to update jiffies (and the
variables used to calculate the time of day) based on the time base.

If the time base frequence is sufficiently high compared to the
processor clock frequency, then it is possible for the time of day
variables to be corrupted at the time of the first decrementer interrupt
we take.  This became obvious on a legacy iSeries where the time base
frequency is the same as the processor clock.

This one line patch fixes the initialisation so that the time of day
variables and the indicator we use to tell when updates are due are
better synchronised.

Signed-off-by:  Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-25 10:13:42 -07:00
Benjamin Herrenschmidt f10d20c1f1 [PATCH] ppc64: Fix g5 hw timebase sync
The hardware sync of the timebase on SMP G5s uses a black magic
incantation to the i2c clock chip that was inspired from what Darwin
does.

However, this was an earlier version of Darwin that was ...  buggy !
heh.  This causes the latest models to break though when starting SMP,
so it's worth fixing.

Here's a new version of the incantation based on careful transcription
of the said incantations as found in the latest version of apple's
temple.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-23 11:51:24 -07:00
Benjamin Herrenschmidt 1263cc67c0 [PATCH] ppc64: Fix booting on latest G5 models
The latest speedbumped Apple G5 models have a "bug" in the Open Firmware
device tree that lacks the proper interrupt routing information for the
northbridge i2c controller.  Apple's driver silently falls back into a
sub-optimal "polled" mode (heh, maybe they didn't even notice the bug
because of that :), our driver didn't properly check and crashes :(

This patch fixes our driver to not crash, and adds code to the
prom_init() OF trampoline code that detects the "bug" and adds the
missing information back for this chipset revision.  This fixes booting
and thermal control on these models.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-22 17:34:42 -07:00
Paul Mackerras b7c2b704bd [PATCH] ppc64: enable CONFIG_RTAS_PROC by default
This patch enables CONFIG_RTAS_PROC by default on pSeries.  This will
preserve /proc/ppc64/rtas/rmo_buffer, which is needed by librtas.

Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:27 -07:00
Paul Mackerras 6c80a21cb1 [PATCH] ppc64: global interrupt queue cleanup
Move the code to set global interrupt queue membership to xics.c,
and remove no longer needed extern declarations.  Also call it on
all cpus (even the boot cpu) to prepare for kexec.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: R Sharada <sharada@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 08:07:01 -07:00
Paul Mackerras 2512809255 [PATCH] ppc64: remove explicit contig_page_data reference
Trivial patch to remove our last direct reference to contig_page_data.
This will make it just that much less hard to seperate NUMA and
DISCONTIG.  Please forward on.  Against 2.6.12-rc1

Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Paul Mackerras 8b3447db2e [PATCH] ppc64: remove unused arch/ppc64/boot/start.c
start.c is not referenced in the arch/ppc64/boot/Makefile

compile tested with the defconfig.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Paul Mackerras af4d4b3410 [PATCH] ppc64: remove asm/bootinfo.h include
The defines in bootinfo.h are not used, so the include can be removed.
According to Ben, birecs are not used on ppc64:

  on ppc64, we made the decision of enforcing the presence of an
  OF device-tree and either an OF-like client interface or a kexec
  like flattened tree.
  so if your bootloader want to say things to the kernel,
  it can do so by adding properties to the device-tree

compile-tested with defconfig

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Paul Mackerras 5e2afc1ddd [PATCH] ppc64: fix reloc_offset comment
The code in reloc_offset is actually subtracting the address in the link
register from the address calculated by the linker.  Perhaps the
extended mnemonic `sub' replaced an original `subf' and the comment just
did not get updated.

        bl      1f
1:      mflr    r3
        LOADADDR(r4,1b)
        sub     r3,r4,r3

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Paul Mackerras 3892c5fa94 [PATCH] ppc64: fix prom.c compile warning
The code in unflatten_device_tree knows that get_property is written to
only return with lenp equal to 1 when also returning a valid pointer.
The gcc 3.3.3 compiler is not able to prove this to itself, so it warns
about a possible uninitialized pointer dereference:

 .../arch/ppc64/kernel/prom.c: In function `unflatten_device_tree':
 .../arch/ppc64/kernel/prom.c:828:
 warning: `p' might be used uninitialized in this function

Unless it is desired to rework the interaction between the two
functions, this will keep the existing behavior but quiet the compiler.

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Tobias Klauser 6741f3a7f9 [PATCH] arch/ppc64: Replace custom MIN macro
Replace a custom MIN() macro with the min() macro from kernel.h
This patch removes 4 lines of redundant code.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 19:32:59 -07:00
David Gibson 1f8d419e29 [PATCH] ppc64: pgtable.h and other header cleanups
This patch started as simply removing a few never-used macros from
asm-ppc64/pgtable.h, then kind of grew.  It now makes a bunch of
cleanups to the ppc64 low-level header files (with corresponding
changes to .c files where necessary) such as:
	- Abolishing never-used macros
	- Eliminating multiple #defines with the same purpose
	- Removing pointless macros (cases where just expanding the
macro everywhere turns out clearer and more sensible)
	- Removing some cases where macros which could be defined in
terms of each other weren't
	- Moving imalloc() related definitions from pgtable.h to their
own header file (imalloc.h)
	- Re-arranging headers to group things more logically
	- Moving all VSID allocation related things to mmu.h, instead
of being split between mmu.h and mmu_context.h
	- Removing some reserved space for flags from the PMD - we're
not using it.
	- Fix some bugs which broke compile with STRICT_MM_TYPECHECKS.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:32 -07:00
Jesper Juhl e685752de1 [PATCH] ppc64: add missing Kconfig help text
There's no help text for CONFIG_DEBUG_STACKOVERFLOW - add one.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:32 -07:00
Anton Blanchard 7d12e522ba [PATCH] ppc64: remove hidden -fno-omit-frame-pointer for schedule.c
While looking at code generated by gcc4.0 I noticed some functions still
had frame pointers, even after we stopped ppc64 from defining
CONFIG_FRAME_POINTER.  It turns out kernel/Makefile hardwires
-fno-omit-frame-pointer on when compiling schedule.c.

Create CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER and define it on architectures
that dont require frame pointers in sched.c code.

(akpm: blame me for the name)

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:32 -07:00
David Woodhouse bfd4bda097 Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2005-05-05 13:59:37 +01:00
Al Viro 5cae841b13 [PATCH] ISA DMA Kconfig fixes - part 1
A bunch of drivers use ISA DMA helpers or their equivalents for
platforms that have ISA with different DMA controller (a lot of ARM
boxen).  Currently there is no way to put such dependency in Kconfig -
CONFIG_ISA is not it (e.g.  it is not set on platforms that have no ISA
slots, but have on-board devices that pretend to be ISA ones).

New symbol added - ISA_DMA_API.  Set when we have functional
enable_dma()/set_dma_mode()/etc.  set of helpers.  Next patches in the
series will add missing dependencies for drivers that need them.

I'm very carefully staying the hell out of the recurring flamefest on
what exactly CONFIG_ISA would mean in ideal world - added symbol has a
well-defined meaning and for now I really want to treat it as completely
independent from the mess around CONFIG_ISA.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-04 07:33:13 -07:00
Benjamin Herrenschmidt 52292c9b8c [PATCH] ppc64: fix gcc 4.0 vs CONFIG_ALTIVEC
gcc-4.0 generates altivec code implicitly when -mcpu indicates an
altivec capable CPU which is not suitable for the kernel.  However, we
used to set -mcpu=970 when CONFIG_ALTIVEC was set because a gcc-3.x bug
prevented from using -maltivec along with -mcpu=power4, thus prevented
building the RAID6 altivec code.

This patch fixes all of this by testing for the gcc version.  If 4.0 or
later, just normally use -mcpu=power4 and let the RAID6 code add
-maltivec to the few files it needs to be compiled with altivec support.
For 3.x, we still use -mcpu=970 to work around the above problem, which
is fine as 3.x will never implicitly generate altivec code.

The Makefile hackery may not be the most lovely, I welcome anybody more
skilled than me to improve it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-03 07:38:34 -07:00
David Woodhouse 27b030d58c Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2005-05-03 08:14:09 +01:00
Jesper Juhl 7ed20e1ad5 [PATCH] convert that currently tests _NSIG directly to use valid_signal()
Convert most of the current code that uses _NSIG directly to instead use
valid_signal().  This avoids gcc -W warnings and off-by-one errors.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:59:14 -07:00
Paul E. McKenney fbd568a3e6 [PATCH] Change synchronize_kernel to _rcu and _sched
This patch changes calls to synchronize_kernel(), deprecated in the earlier
"Deprecate synchronize_kernel, GPL replacement" patch to instead call the new
synchronize_rcu() and synchronize_sched() APIs.

Signed-off-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:59:04 -07:00
Anton Blanchard 0d8d4d42f2 [PATCH] ppc64: use smp_mb and smp_wmb
Use smp_mb and smp_wmb. In particular smp_wmb is lighter weight than wmb.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:47 -07:00
Anton Blanchard eeb24de431 [PATCH] ppc64: enforce medium thread priority in hypervisor calls
Calls into the hypervisor do not raise the thread priority.  Ensure we are
running at medium priority upon entry to the hypervisor.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:46 -07:00
Anton Blanchard c4005e4f66 [PATCH] ppc64: firmware workaround
Recent gcc 4.0 testing uncovered a firmware issue.  Some properties are larger
than 31 bytes and due to gcc 4.0s better stack allocation this overflow ran
over non volatile register storage.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:46 -07:00
Olof Johansson d03853d566 [PATCH] PPC64: Remove hot busy-wait loop in __hash_page
It turns out that our current __hash_page code will do a very hot busy-wait
loop waiting on _PAGE_BUSY to be cleared.  It even does ldarx/stdcx in the
loop, which will bounce reservations around like crazy if there's more than
one CPU spinning on the same PTE (or even another PTE in the same
reservation granule).  The end result is that each fault takes longer when
there's contention, which in turn increases the chance of another thread
hitting the same fault and also piling up.  Not pretty.

There's two options here:
1. Do an out-of-line busy loop a'la spinlocks with just loads (no
   reserves)
2. Just bail and refault if needed.

(2) makes sense here: If the PTE is busy, chances are it's in flux anyway
and the other code path making a change might just be ready to hash it.

This fixes a stampede seen on a large-ish system where a multithreaded
HPC app faults in the same text pages on several cpus at the same time.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:45 -07:00
Paul Mackerras 66faf9845a [PATCH] ppc64: tell firmware about kernel capabilities
On pSeries systems, according to the platform architecture specs, we are
supposed to be supplying a structure to firmware that tells firmware about
our capabilities, such as which version of the data structures that
describe available memory we are expecting to see.  The way we end up
having to supply this data structure is a bit gross, since it was designed
for AIX and doesn't suit us very well.  This patch adds the code to supply
this data structure to the firmware.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:45 -07:00
Benjamin Herrenschmidt 58366af586 [PATCH] ppc64: update to use the new 4L headers
This patch converts ppc64 to use the generic pgtable-nopud.h instead of the
"fixup" header.

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>
2005-05-01 08:58:44 -07:00
akpm@osdl.org 0339ad77c4 [PATCH] ppc64: nvram cleanups
- Fix

  arch/ppc64/kernel/nvram.c:342: warning: `part' might be used uninitialized in this function

- Various codingstyle tweaks.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:44 -07:00
Paul Mackerras dc3ec7503e [PATCH] ppc64: Fix irq parsing on powermac
When I tried Ben's patches to the powermac sound driver on my G5, I found
that it was taking enormous numbers of sound DMA transmit interrupts.  This
turned out to be because it was incorrectly configured as level-sensitive
instead of edge-sensitive, which in turn was because the code that parses
the interrupt tree that Open Firmware gives us was incorrectly assigning
another device the same irq number as the sound DMA transmit interrupt
(i.e.  1).

This patch fixes the problem, in a somewhat quick and dirty way for now,
but one which will work for all the machines we currently run on.
Ultimately Ben and I want to do something more general and robust, but this
should go in for 2.6.12.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:44 -07:00
Olof Johansson bb78cb7220 [PATCH] ppc64: remove unused argument to create_slbe
Remove vsid argument to create_slbe, since it's no longer used.

Spotted by R Sharada.

Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:44 -07:00
Benjamin Herrenschmidt 1b29f9d13e [PATCH] ppc64: add PT_NOTE section to vDSO
This patch from Roland adds a PT_NOTE section to both 32 and 64 bits vDSOs
to expose the kernel version to glibc, thus avoiding a uname syscall on
every launch.  This is equivalent to the patches Roland posted already for
x86 and x86-64.

Note: the 64 bits .note is actually using the 32 bits format.  This is
normal.  The ELF spec specifies a different format for 64 bits .note, but
for some reason, this was never properly implemented, the core dumps for
example are all using 32 bits format .note, and binutils cannot even read a
64 bits format .note.  Talking to our toolchain folks, they think we'd
rather stick to 32 bits format .note everywhere and get the spec fixed some
day ...

Signed-off-by: Roland McGrath <roland@redhat.com>
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>
2005-05-01 08:58:43 -07:00
Paul Mackerras 9747dd6fa9 [PATCH] ppc64: fix 32-bit signal frame back link
When the kernel creates a signal frame on the user stack, it puts the
old stack pointer value at the beginning so that the signal frame is
linked into the chain of stack frames like any other frame.
Unfortunately, for 32-bit processes we are writing the old stack
pointer as a 64-bit value rather than a 32-bit value, and the process
sees that as a null pointer, since it only looks at the first 32 bits,
which are zero since ppc is bigendian and the stack pointer is below
4GB.  This bug is in SLES9 and RHEL4 too, hence the ccs.

This patch fixes the bug by making the signal code write the old stack
pointer as a u32 instead of an unsigned long.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-30 10:01:40 -07:00