[PATCH] ppc64: Add missing include

inline pmac_call_feature references ppc_md so include asm/machdep.h
in asm/pmac_feature.h

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: dont bypass ppc_md.udbg* functions

udbg_getc_poll is a ppc_md function.   don't call directly into udbg.c

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Remove dummy getc routines

Now that xmon is fixed we should not need the dummy getc routines.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Clean up CR handling

Make the 16550 and real mode 16550 use tail recursion like the scc code
instead of repeating the routine except for the character sent.

Gcc recoginizes the tail recursion and handles it efficently without
stack allocations.  The maple real putc shrinks from 188 to 104 bytes
of instructions.  udbg_putc drops from 188 to 140 bytes.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Make udbg_init_uart set the ppc_md udbg methods.

make udbg_init_uart set the ppc_md udbg methods.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Split SCC and 15550 udbg code

Split scc and 15550 functions from udbg each into their own file.
This makes them more symetric with the lpar and btext code.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Take udbg out of ppc_md

Take udbg out of ppc_md. Allows us to not overwrite early udbg inits
when assigning ppc_md.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Remove old includes

Trim some no longer needed includes from udbg.c and friends.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Consolidate early console and PPCDBG code

Consolidate the early console and PPCDBG code in udbg.c

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: systemcfg is now a pointer

The following patch fixes 2 issues:
  1) use PLATFORM_LPAR bit to test if running in LPAR mode
  2) systemcfg pointer is assigned from static data in
     arch/ppc64/kernel/pacaData.c.  The file arch/ppc64/kernel/head.S
     now refers to is using the GOT binding to the pointer and hence
     must deref it.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: poison initmem

Poison initmem after we free it so we catch use after free issues.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: speedup cmpxchg

cmpxchg has the following code:

__typeof__(*(ptr)) _o_ = (o);
__typeof__(*(ptr)) _n_ = (n);

Unfortunately it makes gcc 4.0 store and load the variables to the stack.
Eg in atomic_dec_and_test we get:

  stw     r10,112(r1)
  stw     r9,116(r1)
  lwz     r9,112(r1)
  lwz     r0,116(r1)

x86 is just casting the values so do that instead. Also change __xchg*
and __cmpxchg* to take unsigned values, removing a few sign extensions.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] Move 3 more headers to asm-powerpc

Merged several nearly-identical header files from asm-ppc and asm-ppc64
into asm-powerpc.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc/ppc64: Merge more include files

This patch merges several include files from
asm-ppc and asm-ppc64 into the new asm-powerpc.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: remove use of asm/segment.h

Removed PPC64 architecture specific users of asm/segment.h.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Allow world readable /proc/ppc64/lparcfg

I would like to be able to read the lparcfg data from any user so we
can make "intelligent" decisions based on underlying attributes when
running in lpars.  Yes there's software that likes to do this :) and
runs as non-root.

It's very similar to say VM where you can get CP to provide feedback
of the real hardware inside a VM guest.

Signed-off-by: Wim Coekaerts <wim.coekaerts@oracle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: add number of PMCs to cputable

Add a field in the cputable struct to store the number of PMCs.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: remove CPU_FTR_PMC8

Remove the CPU_FTR_PMC8 feature now we encode the number of PMCs
directly.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Use num_pmcs in oprofile code

Change oprofile to use num_pmcs from the cpu feature struct.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] ppc64: Add oprofile cpu_type to cpu feature struct

Add oprofile cpu_type to cpu feature struct.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>