| Age | Commit message (Collapse) | Author |
|
This splits arch/ppc64/kernel/rtas.c into arch/powerpc/kernel/rtas.c,
which contains generic RTAS functions useful on any CHRP platform,
and arch/powerpc/platforms/pseries/rtas-fw.[ch], which contain
some pSeries-specific firmware flashing bits. The parts of rtas.c
that are to do with pSeries-specific error logging are protected
by a new CONFIG_RTAS_ERROR_LOGGING symbol. The inclusion of rtas.o
is controlled by the CONFIG_PPC_RTAS symbol, and the relevant
platforms select that.
Signed-off-by: Paul Mackerras <paulus@samba.org>
|
|
In preparation for merging processor.h, this adds some explicit
but won't be after the merge.
Signed-off-by: Paul Mackerras <paulus@samba.org>
|
|
This patch corrects the printing of progress indicators to the op
panel on p/iSeries ppc64 systems. Each discrete reference code should
begin with a form feed char to clear the op panel, and the first and
second lines should be separated with a CR/LF sequence. Padding with
spaces is not necessary.
Also, capitalize the hex value printed on the first line, to be
consistent with the values printed by firmware, service processor,
etc.
It turns out that there's an ibm,form-feed property; this patch uses
it in the pSeries-specific progress routine. This patch also checks
the number of rows and the specific width of each row (the second row
on power5 systems can actually hold 80 characters). If the displayed
text is too wide for the physical display, it can be viewed in the ASM
menus, or by selecting option 14 on the op panel.
Signed-off-by: Mike Strosaker <strosake@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
|
|
The pSeries_progress function is called from some places in the rtas code,
which may also be used by non-pSeries platforms.
Though pSeries is currently the only platform type that implements
display-character, the code is actually generic enough to be part of
the rtas subsystem.
I hit a bug here because the generic rtas code tried calling ppc_md.progress,
which points to an __init function on most platforms.
We could also clear the ppc_md.progress pointer when freeing the init memory
to make it more explicit that ppc_md.progress must not be called after
bootup.
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
|
|
This patch is from John Rose <johnrose@austin.ibm.com>
This patch changes the rtas wrapper functions in rtas.c to map RTAS
failure codes to conventional error values. The goal is to make
failure conditions obvious in the wrapper functions and in the caller
code.
Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch consolidates the variables that define the PPC64 cache sizes into a
single structure (the were in the naca and the systemcfg structures). Those
that were in the systemcfg structure are left there just because they are
exported to user mode through /proc.
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>
|
|
Move the linux,rtas* properties into the /rtas node and make them 32bit. Use
rtas-size and avoid duplicating it in linux,rtas-size.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch is from Olaf Hering.
The rtas property 'ibm,os-term' is not available on JS20, a panic will print:
unable to mount root filesystem on /dev/hda
Kernel panic - not syncing: Attempted to kill init!
<0>ibm,os-term call failed -1
Rebooting in 42 seconds..
Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Use printk_ratelimit() in rtc code to avoid flooding the kernel log buffer
with errors. Also use rtas_get_error_log_max() instead of duplicating it
in __fetch_rtas_last_error.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
The stop_self thing is accessed unconditionally from pSeries_setup.c
|
|
This is the third & hopefully final version of the monster cleanup
patch. It does significant cleanups of the early boot code of the
ppc64 kernel, and begins the long process of cleaning up & splitting
properly the platform support.
It completely reworks the interface between the early code that is
run in the firmware context (prom_init) and the rest of the kernel,
in such a way that will make kexec or static device-tree for embedded
people possible. The early init code can eventually be moved to a
separate link entity, it no longer touches any of the kernel globals,
everything is passed via a single blob of data in memory containing
a flattened version of the device-tree and a memory reserve map.
While doing it, I also cut the ties between pSeries and Powermac. Now,
the kernel config provides a choice between legacy iSeries and
"multiplatform". The later is a set of various supported platform,
each of them beeing a boolean switch, currently defined beeing pSeries
and PowerMac. You can enable both or just one of them. CONFIG_PPC_PSERIES
is now specifically set for IBM pSeries support, you can build a PowerMac
kernel without pSeries support if you which.
The main goal here is to simplify addition of new platform types.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch uses the firmware-defined error log buffer length for calls to
the firmware routine 'check-exception'. It also simplifies code in rtasd.c
that is attempting to obtain the error log length.
Signed-off-by: Linas Vepstas <linas@linas.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Firmware expects the size of the buffer that you hand it when you ask it
for information about a hardware error to be of a very specific size, but
different versions of firmware appearently expect different sizes; using
the wrong size results in a painful, hard-to-debug crash in firmware. Benh
provided a patch for this some months ago, but appreantly missed this code
path. This patch sets up the log buffer size dynamically; it also fixes a
bug with the return code not being handled correctly.
Signed-off-by: Linas Vepstas <linas@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>
|
|
At present rtas_call() can be called before the kmalloc subsystem is
initialized, and if RTAS reports a hardware error, the code tries to do a
kmalloc to make a copy of the error report. This patch changes it so that
we don't do the kmalloc in that situation.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Add some missing exports, required for oprofile to be compiled as a module.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
In migrate_irqs_away we werent converting a virtual irq to a real one. We
ended up passing the wrong irq numbers to the hypervisor and migration of
affinitised irqs on cpu hot unplug didnt work.
Also clarify the rtas_stop_self printk.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
From: Linas Vepstas <linas@austin.ibm.com>
When an RTAS call returns the "hardware error" code, we need to do another
RTAS call to find out what went wrong. Previously we weren't doing that
inside the lock that serializes RTAS calls, and thus another cpu could get
in and do another RTAS call in the meantime. This patch fixes it. This
patch also includes some minor whitespace fixes.
Signed-off-by: Linas Vepstas <linas@linas.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch from Linas Vepstas (rediffed by me) fixes the confusing argument
aliasing of the log_rtas_error() subroutine.
This patch makes no functional changes, it just cleans up some strange
usage.
The rtas_args used to communicate with firmware are always taken from the
paca struct, so as to keep the args at a fixed, low-memory location. But
the log_rtas_error() routine also took an rtas_args pointer, which it
assumed was aliased to the paca struct. This aliasing is both
un-neccessary, and confusing; this patch eliminates this confusion.
Signed-off-by: Linas Vepstas <linas@linas.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch removes the RTAS arguments structure on ppc64 from the PACA.
The args have to be in the RMO, but since we have a global spinlock for
RTAS anyway, there's no reason to have a separate copy of the args per-CPU.
This patch replaces the PACA field with a single instance in the global
rtas structure.
The one exception is for the rtas_stop_self() call, which can't take the
lock, because it never returns. But it has a fixed set of arguments, so we
can use another global instance which is initialized at boot.
This lets us remove rtas.h from paca.h, which substantially reduces overall
#include hairiness (because paca.h is now, as it wants to be, a nice
low-level structure-defining header which relies on very little and can
safely be included almost anywhere). Although it does add some noise to
the patch, because a bunch of places relied on the indirect inclusion of
rtas.h, or even more indirect inclusions (see the hunks applying to eeh.h
and current.h!).
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
rtas.c doesn't call reloc_offset
remove comment from rtas.c and extern function declaration
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Somebody back in the mists of time decided that call_prom and rtas_call
should return longs even though both of those bits of firmware run in
32-bit mode and produce a 32-bit result. To make life more interesting,
the 32-bit result gets zero-extended to 64 bits, which makes checking
for a -1 return value more complicated than it should be.
This patch changes call_prom and rtas_call to return an int, and makes
the corresponding changes to use ints for the variables used to hold
those return values.
While I was doing this I finally got annoyed enough with the strings of
prom_print() and prom_print_hex() calls that we do to write a simple
prom_printf. I deliberately didn't use snprintf because the execution
environment is weird at this point - we aren't running at the address we
are linked at just yet - and I didn't want to inflict that on any code
outside this file. I also did a prom_debug() macro, which eliminated a
few ifdefs.
There are also a bunch of other minor cleanups. This patch makes very
few algorithmic changes but does get rid of a lot of casts. :)
I have been running with this patch for a couple of weeks, and Anton has
tested it too.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This implements CONFIG_PREEMPT for ppc64. Aside from the entry.S
changes to check the _TIF_NEED_RESCHED bit when returning from an
exception, there are various changes to make the ppc64-specific code
preempt-safe, mostly adding preempt_enable/disable or get_cpu/put_cpu
calls where needed. I have been using this on my desktop G5 for the
last week without problems.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
From: Paul Mackerras <paulus@samba.org>
We declare enter_rtas with a struct rtas_args * argument, though it is
supposed to be a physical address, and then every time we call it we cast the
unsigned long result from __pa() to a void *. This patch changes the
declaration of enter_rtas to make it take an unsigned long argument, and
removes the cast from all the callers. The actual enter_rtas() routine is in
assembler and doesn't need to be changed.
|
|
From: Anton Blanchard <anton@samba.org>
From: Jake Moilanen
We want to make sure flash list is above 4 gigs, not 4 megs.
|
|
This is my brown paper bag day, I sent you the wrong patch for
fixing the deadlock in rtas.c, here's one to apply on top of current
bk that fixes build.
|
|
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
My RTAS locking fixes incorrectly added a spinlock around the function used
to stop a CPU, that function never returns, thus the lock becomes stale.
The correct fix is to disable interrupts instead (the RTAS params beeing
per-CPU, this should be safe enough)
|
|
The low level kernel interface to RTAS (the firmware runtime services)
was plagued with races that could cause from bogus results of RTAS
operations to total machine crashes in some circumstances. This patch
fix the ones I could identify, hoping I didn't miss any. I also added
a WARN_ON (well, it's asm equivalent) to enter_rtas to make sure we
never _ever_ try to call that with interrupts enabled.
|
|
From: Joel Schopp <jschopp@austin.ibm.com>
I was looking at rtas serialization for reasons I won't go into here.
While wandering through the code I found that two functions were not
properly serialized. phys_call_rtas and phys_call_rtas_display_status are
the functions. After looking further they are redundant and not
used anywhere at all.
|
|
From: Michael Strosaker <strosake@us.ibm.com>
Add RTAS os-term call for panic on pSeries
|
|
From: Joel Schopp <jschopp@austin.ibm.com>
Add support for hotplug cpus
|
|
From: Anton Blanchard <anton@samba.org>
Rusty Russell <rusty@rustcorp.com.au>
The iSeries has an arch-specific mapping from physical <-> absolute
addresses. Fortunately this is only used in a few places. However, the
following arch-specific macros/functions are provided in addition to the
standard macros:
__a2p()
__a2v()
__p2a()
__p2v()
__v2a()
__v2p()
absolute_to_phys()
phys_to_absolute()
virt_to_absolute()
absolute_to_virt()
Reduce them to these, with slightly shorter names, and taking either pointers
or unsigned long (as per __va and __pa) rather than making the caller cast:
abs_to_phys()
phys_to_abs()
And helper macros:
virt_to_abs()
abs_to_virt()
As is standard, virtual addresses are returned as void *, physical and
absolute as unsigned long.
Note that the change the iSeries_setup is a little subtle: ea is set to
__va(pa) above, so "phys_to_abs(pa)" is the same as "virt_to_abs(ea)".
Also, REALADDR is renamed to ISERIES_HV_ADDR and used in a couple of places
where appropriate.
|
|
From: Anton Blanchard <anton@samba.org>
From: Santiago Leon <santil@us.ibm.com>
Fix log_rtas_error bug where the results from the call that resulted in an
error where lost due the attempt to log the error.
|
|
From: Anton Blanchard <anton@samba.org>
Cleanup ppc64 procfs code:
- Use initcalls everywhere. This allowed us to remove the iseries proc
callback interface.
- Kill proc_pmc.c. Most of it wasnt used (and we are planning to export the
PMCs via sysfs). The few things left were iseries specific so they
got moved into iSeries_proc.c.
- Kill pmc.c. We dont use those statistics and the ones that are left
can be gained via PMCs.
- Create /proc/iSeries and /proc/ppc64 very early. This means we no
longer have to call proc_ppc64_init in all the drivers, we can
assume its there.
- Fix some error return cases in rtas-proc.c and rtas-flash
- Dont even try some pseries specific drivers on pmac.
|
|
From: John Rose <johnrose@austin.ibm.com>
Fixed NULL ptr deref in RTAS syscall ppc_rtas()
|
|
From: John Rose <johnrose@austin.ibm.com>
Added rtas_set_power_level()
|
|
From: Nathan Fontenot <nfont@austin.ibm.com>
Add log_rtas_error(), to be called in the event that a rtas call
returns a hardware error (-1) so we can log additional information
about the hardware error.
|
|
value, from John Rose
From: Anton Blanchard <anton@samba.org>
Fixed rtas_extended_busy_delay_time() to calculate correct value, from John
Rose
|
|
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.
|
|
From: Anton Blanchard <anton@samba.org>
Added RTAS syscall. Reserved lowmem rtas_rmo_buf for userspace use. Created
"rmo_buffer" proc file to export bounds of rtas_rmo_buf.
|
|
From: Anton Blanchard <anton@samba.org>
Added functions for 3 RTAS calls
get-power-level
get-sensor-state
set-indicator
|
|
From: Anton Blanchard <anton@samba.org>
extended flash changes, from Mike Wolf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|