dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

125 Commits

Author SHA1 Message Date
Paul Mackerras 292a6c58e9 Merge branch 'for-paulus' of git://kernel/home/michael/src/work/ 2005-11-04 16:17:32 +11:00
Paul Mackerras 8ad200d7b7 powerpc: Merge smp-tbsync.c (the generic timebase sync routine)
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-04 13:28:58 +11:00
Michael Ellerman dc3a9efb5e Merge with Paulus 2005-11-04 12:12:52 +11:00
Michael Ellerman b8f510219e powerpc: Implement smp_release_cpus() in C not asm
There's no reason for smp_release_cpus() to be asm, and most people can make
more sense of C code. Add an extern declaration to smp.h and remove the custom
one in machine_kexec.c

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-04 12:09:42 +11:00
Stephen Rothwell 879168ee51 powerpc: move include/asm-ppc64/ppc32.h to arch/powerpc/kernel
It is only included by signal_32.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-03 16:03:28 +11:00
Stephen Rothwell 62f4f47da6 powerpc: move ppc64/kernel/signal.c to arch/powerpc
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-03 16:03:20 +11:00
Michael Ellerman e19e4ab415 powerpc: Set entry point and text address in linker script
Currently we set the kernel entry point and the address of the text
section in the Makefile, using CONFIG_KERNEL_START.

But we've already got <asm/page.h> in the linker script, so we can just
use KERNELBASE directly. That means if we ever change KERNELBASE there's
one less place to change it.

And we can set the entry point with ENTRY().

There are zero differences from "readelf -a vmlinux" with or without this
patch.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
2005-11-03 16:03:06 +11:00
Michael Ellerman 358c86fda0 powerpc: Make early debugging fit on 80 character terminal
There's some debugging in prom.c that wraps nastly on 80 character
terminals, reformat it to fit.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
2005-11-03 15:39:09 +11:00
Michael Ellerman cab0af98df powerpc: Make set_dabr() a ppc_md function
Move pSeries specific code in set_dabr() into a ppc_md function, this will
allow us to keep plpar_wrappers.h private to platforms/pseries.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
2005-11-03 15:30:49 +11:00
Paul Mackerras f4fcbbe9a7 powerpc: Merge remaining RTAS code
This moves rtas-proc.c and rtas_flash.c into arch/powerpc/kernel, since
cell wants them as well as pseries (and chrp can use rtas-proc.c too,
at least in principle).  rtas_fw.c is gone, with its bits moved into
rtas_flash.c and rtas.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-03 14:41:19 +11:00
Stephen Rothwell aaf8a7a294 Merge iSeries include file move 2005-11-02 16:06:03 +11:00
Paul Mackerras 104dd65fef powerpc: clean up bug.h further
This simplifies the macros which are different between 32-bit and
64-bit.  It also fixes a couple of printks on the bug->line element,
which is now a long.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-02 15:19:47 +11:00
Paul Mackerras bccfd58842 powerpc: Fix compile error with CONFIG_TAU=y
A couple of instances of "i" that needed to be changed to "cpu_id"
got missed in the merge, because they were in CONFIG_TAU code.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-02 15:06:22 +11:00
Kelly Daly c43a55ff4e merge filename and modify references to iseries/lpar_map.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 15:02:47 +11:00
Kelly Daly 8875ccfb7a merge filename and modify references to iseries/it_lp_queue.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 14:13:34 +11:00
Kelly Daly f218aab5cf merge filename and modify references to iseries/it_lp_naca.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 13:51:41 +11:00
Kelly Daly e45423eac2 merge filename and modify references to iseries/hv_lp_event.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 12:08:31 +11:00
Kelly Daly 8021b8a776 merge filename and modify references to iseries/hv_call_xm.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 11:41:12 +11:00
David Gibson a0e60b2033 [PATCH] powerpc: Merge bitops.h
Here's a revised version.  This re-introduces the set_bits() function
from ppc64, which I removed because I thought it was unused (it exists
on no other arch).  In fact it is used in the powermac interrupt code
(but not on pSeries).

- We use LARXL/STCXL macros to generate the right (32 or 64 bit)
  instructions, similar to LDL/STL from ppc_asm.h, used in fpu.S

- ppc32 previously used a full "sync" barrier at the end of
  test_and_*_bit(), whereas ppc64 used an "isync".  The merged version
  uses "isync", since I believe that's sufficient.

- The ppc64 versions of then minix_*() bitmap functions have changed
  semantics.  Previously on ppc64, these functions were big-endian
  (that is bit 0 was the LSB in the first 64-bit, big-endian word).
  On ppc32 (and x86, for that matter, they were little-endian.  As far
  as I can tell, the big-endian usage was simply wrong - I guess
  no-one ever tried to use minixfs on ppc64.

- On ppc32 find_next_bit() and find_next_zero_bit() are no longer
  inline (they were already out-of-line on ppc64).

- For ppc64, sched_find_first_bit() has moved from mmu_context.h to
  the merged bitops.  What it was doing in mmu_context.h in the first
  place, I have no idea.

- The fls() function is now implemented using the cntlzw instruction
  on ppc64, instead of generic_fls(), as it already was on ppc32.

- For ARCH=ppc, this patch requires adding arch/powerpc/lib to the
  arch/ppc/Makefile.  This in turn requires some changes to
  arch/powerpc/lib/Makefile which didn't correctly handle ARCH=ppc.

Built and running on G5.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-01 21:49:02 +11:00
Arnd Bergmann e9add2eeb1 [PATCH] powerpc: move rtas_fw.c out of platforms/pseries
Cell uses the same code as pSeries for flashing the firmware
through rtas, so the implementation should not be part of
platforms/pseries.

Put it into arch/powerpc/kernel instead.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-01 21:02:59 +11:00
Arnd Bergmann f3f66f599d [PATCH] powerpc: Rename BPA to Cell
The official name for BPA is now CBEA (Cell Broadband
Engine Architecture). This patch renames all occurences
of the term BPA to 'Cell' for easier recognition.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-01 21:02:44 +11:00
Stephen Rothwell bec7c458b3 powerpc: make mem= work on iSeries again
By parsing the command line earlier, we can add the mem= value to the
flattened device tree and let the generic code sort out the memory limit
for us.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-01 14:34:30 +11:00
Paul Mackerras 734d652480 powerpc: apply recent changes to merged code
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-31 13:57:01 +11:00
Paul Mackerras cf00a8d18b powerpc: Fix bug arising from having multiple memory_limit variables
We had a static memory_limit in prom.c, and then another one defined
in setup_64.c and used in numa.c, which resulted in the kernel crashing
when mem=xxx was given on the command line.  This puts the declaration
in system.h and the definition in mem.c.  This also moves the
definition of tce_alloc_start/end out of setup_64.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-31 13:07:02 +11:00
Paul Mackerras 5f6b5b973a powerpc: Fix time setting bug on 32-bit
This fixes a bug where settimeofday would set the wrong parameters
in do_gtod, resulting in gettimeofday returning a value about 4
hours after the correct time.  The bug was that we divided a
negative 64-bit value with do_div, which treated it as unsigned
and gave us a result that was approximately 1.8e10 too large
(since the divisor was 1e9).

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-30 22:55:52 +11:00
Paul Mackerras c1c3a554a3 powerpc: 32-bit needs cur_cpu_spec exported too
Somehow we ended up with an #ifdef CONFIG_PPC64 around the export
of cur_cpu_spec, but raid6 as a module needs it on ppc32 as well
as ppc64.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 22:08:55 +10:00
Olaf Hering ea6526605a [PATCH] ppc64: remove duplicate local variable in set_preferred_console
remove duplicate local variable, saves 2 asm instructions.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:23:08 +10:00
Paul Mackerras f78541dcec powerpc: Merge xmon
The merged version follows the ppc64 version pretty closely mostly,
and in fact ARCH=ppc64 now uses the arch/powerpc/xmon version.
The main difference for ppc64 is that the 'p' command to call
show_state (which was always pretty dodgy) has been replaced by
the ppc32 'p' command, which calls a given procedure (so in fact
the old 'p' command behaviour can be achieved with 'p $show_state').

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 22:53:37 +10:00
Paul Mackerras d73e0c99f5 powerpc: Rename asm offset TRAP to _TRAP for 32-bit
... for consistency with 64-bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 22:45:25 +10:00
Paul Mackerras 22b280324a Merge git://oak/home/sfr/kernels/iseries/work/ 2005-10-28 13:50:39 +10:00
Stephen Rothwell 640768eef2 ppc64: use the merged syscall table
This allows us to also use entry_64.S from the merged tree and reverts
the setup_64.c part of fda262b897.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:51:45 +10:00
David Gibson a8e3d48150 [PATCH] powerpc: Remove dregs of bootinfo.h
Since I sent the patch to purge bootinfo.h from ARCH=powerpc and
ARCH=ppc64, setup-common.c has come into existence, and another
#include of bootinfo.h slipped in.  This patch removes it.  It also
removes include/asm-ppc64/bootinfo.h, which somehow survived the
previous patch which was supposed to remove it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 11:37:03 +10:00
Kumar Gala e6b4fe92ef [PATCH] powerpc: only build idle_6xx for 6xx
For the current time idle_6xx only applies to 6xx ppc32 CPUs

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 11:36:55 +10:00
Paul Mackerras 9675c7ebcf ppc64: Include arch/powerpc/kernel/setup-common.o
... which is needed now that ARCH=ppc64 is using the merged
setup_64.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 08:30:25 +10:00
Paul Mackerras 6316222ea0 powerpc: Introduce toreal/fromreal assembly macros
On 32-bit platforms, these convert from kernel virtual addresses
to real (physical addresses), like tophys/tovirt but they use
the same register for the source and destination.  On 64-bit
platforms, they do nothing because the hardware ignores the top
two bits of the address in real mode.

These new macros are used in fpu.S now.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 22:44:39 +10:00
Paul Mackerras 80579e1f4a powerpc: 32-bit CHRP SMP fixes
Untested, but "should" work...  at least this way it compiles.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 22:42:04 +10:00
Paul Mackerras eef69e3cfb powerpc: remove duplicate screen_info from setup_32.c
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 22:21:37 +10:00
David Gibson e37bc5df8e [PATCH] powerpc: Purge bootinfo.h
With ARCH=powerpc we assume the presence of a device tree, so we don't
require any support for the old bi_recs method of passing boot
parameters.  Likewise, we've never needed it for ppc64, but we still
had an include/asm-ppc64/bootinfo.h from which nothing was used.  This
patch removes that file, and all references to it in arch/ppc64 and
arch/powerpc.  A related, unused variable 'boot_mem_size' is also
removed from setup_32.c.  The bootinfo stuff remains in ARCH=ppc for
the time being.

Built and booted on Power5 (ARCH=ppc64 and ARCH=powerpc), built for
32-bit powermac (ARCH=powerpc and ARCH=ppc).

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:50:46 +10:00
David Gibson 25c8a78b1e [PATCH] powerpc: Fix handling of fpscr on 64-bit
The recent merge of fpu.S broken the handling of fpscr for
ARCH=powerpc and CONFIG_PPC64=y.  FP registers could be corrupted,
leading to strange random application crashes.

The confusion arises, because the thread_struct has (and requires) a
64-bit area to save the fpscr, because we use load/store double
instructions to get it in to/out of the FPU.  However, only the low
32-bits are actually used, so we want to treat it as a 32-bit quantity
when manipulating its bits to avoid extra load/stores on 32-bit.  This
patch replaces the current definition with a structure of two 32-bit
quantities (pad and val), to clarify things as much as is possible.
The 'val' field is used when manipulating bits, the structure itself
is used when obtaining the address for loading/unloading the value
from the FPU.

While we're at it, consolidate the 4 (!) almost identical versions of
cvt_fd() and cvt_df() (arch/ppc/kernel/misc.S,
arch/ppc64/kernel/misc.S, arch/powerpc/kernel/misc_32.S,
arch/powerpc/kernel/misc_64.S) into a single version in fpu.S.  The
new version takes a pointer to thread_struct and applies the correct
offset itself, rather than a pointer to the fpscr field itself, again
to avoid confusion as to which is the correct field to use.

Finally, this patch makes ARCH=ppc64 also use the consolidated fpu.S
code, which it previously did not.

Built for G5 (ARCH=ppc64 and ARCH=powerpc), 32-bit powermac (ARCH=ppc
and ARCH=powerpc) and Walnut (ARCH=ppc, CONFIG_MATH_EMULATION=y).
Booted on G5 (ARCH=powerpc) and things which previously fell over no
longer do.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:48:50 +10:00
Paul Mackerras fda262b897 [PATCH] ppc64: remove arch/ppc64/kernel/setup.c
and use setup_64.c from the merged tree instead.  The only difference
between them was the code to set up the syscall maps.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:20:42 +10:00
Paul Mackerras cb4ab974ae powerpc: Remove common stuff from setup_64.c
This should have been in commit 03501dab03
but got missed by accident.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 11:08:31 +10:00
Paul Mackerras c49888203d powerpc: Fixes to get the Longtrail CHRP a bit further
Talk about buggy firmware...  the OF on the Longtrail returns 0
from the claim client service rather than -1 when the claim fails.
It also has no device_type on the /memory node and blows up if
the output buffer for package-to-path is too big.

This also fixes a bug with calling alloc_up with align == 0, where
we did _ALIGN_UP(alloc_bottom, 0) which will end up as 0.

Lastly, we now check the return value (in r3) from calling the
prom, and return -1 from call_prom if we get a negative value back.
That is supposed to indicate that the requested client service
doesn't exist.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 21:52:53 +10:00
Paul Mackerras bbd0abda9c powerpc: Merge 32-bit CHRP support.
SMP still needs more work but UP gets as far as starting userspace
at least.  This uses the 64-bit-style code for spinning up the cpus.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 21:45:56 +10:00
Paul Mackerras 6d0124fc06 powerpc: Fix interrupt-tree parsing
The interrupt-tree parsing code wasn't offsetting interrupt numbers
by 16 on 32-bit platforms with an i8259 interrupt controller, and
it was confused about the encoding of interrupt sense and level
(which is different for i8259 and openpic interrupt controllers,
just to make things interesting).

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 17:19:06 +10:00
Paul Mackerras 03501dab03 powerpc: Pull common bits of setup_{32,64}.c into setup-common.c
This creates a new arch/powerpc/kernel/setup-common.c with various
bits that setup_32.c and setup_64.c had in common - functions like
machine_shutdown/restart/power_off, show_cpuinfo, set_preferred_console
etc.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 17:11:18 +10:00
Paul Mackerras 033ef338b6 powerpc: Merge rtas.c into arch/powerpc/kernel
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>
2005-10-26 17:05:24 +10:00
Kumar Gala 6d7f58b04d [PATCH] powerpc: Some minor cleanups to setup_32.c
* Removed of_show_percpuinfo and just report CPU frequency in generic
  show_cpuinfo code.
* Killed OCP and PPC_SYS related code which doesn't belong in the
  merge tree

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:55:53 +10:00
Kumar Gala 0fd6f71794 [PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decr
We need to initialize some control SPRS for timers on Book-E before
we start taking decrementer interrupts.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:55:46 +10:00
Kumar Gala 60dda2565b [PATCH] powerpc: some prom.c cleanups
On !CONFIG_PPC_MULTIPLATFORM _machine is defined as 0.  This is ok, but
we can't assign a value to _machine then.

We may not have CONFIG_PCI available, so only build in support for
find_parent_pci_resource(), request_OF_resource(), release_OF_resource()
if PCI is enabled.  This is probably not the long term fix but works out
for now.

Make reg_property64 contain 64-bit elements on a 32-bit machine.

Mark the deprecated prom.c functions as __deprecated.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:52:56 +10:00
Kumar Gala d2e6151257 [PATCH] powerpc: Make sure we have an RTC before trying to adjust it
Its valid for ppc_md.set_rtc_time to be NULL.  We need to check
that its non-NULL before trying to update the RTC.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:52:37 +10:00