git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git]
/
arch
/
ppc64
/
kernel
/
setup.c
diff --git
a/arch/ppc64/kernel/setup.c
b/arch/ppc64/kernel/setup.c
index
dce198d
..
687e855
100644
(file)
--- a/
arch/ppc64/kernel/setup.c
+++ b/
arch/ppc64/kernel/setup.c
@@
-41,7
+41,6
@@
#include <asm/smp.h>
#include <asm/elf.h>
#include <asm/machdep.h>
#include <asm/smp.h>
#include <asm/elf.h>
#include <asm/machdep.h>
-#include <asm/iSeries/LparData.h>
#include <asm/paca.h>
#include <asm/ppcdebug.h>
#include <asm/time.h>
#include <asm/paca.h>
#include <asm/ppcdebug.h>
#include <asm/time.h>
@@
-57,6
+56,8
@@
#include <asm/cache.h>
#include <asm/page.h>
#include <asm/mmu.h>
#include <asm/cache.h>
#include <asm/page.h>
#include <asm/mmu.h>
+#include <asm/lmb.h>
+#include <asm/iSeries/ItLpNaca.h>
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
@@
-95,7
+96,6
@@
extern void udbg_init_maple_realmode(void);
extern unsigned long klimit;
extern void mm_init_ppc64(void);
extern unsigned long klimit;
extern void mm_init_ppc64(void);
-extern int idle_setup(void);
extern void stab_initialize(unsigned long stab);
extern void htab_initialize(void);
extern void early_init_devtree(void *flat_dt);
extern void stab_initialize(unsigned long stab);
extern void htab_initialize(void);
extern void early_init_devtree(void *flat_dt);
@@
-343,6
+343,7
@@
static void __init setup_cpu_maps(void)
extern struct machdep_calls pSeries_md;
extern struct machdep_calls pmac_md;
extern struct machdep_calls maple_md;
extern struct machdep_calls pSeries_md;
extern struct machdep_calls pmac_md;
extern struct machdep_calls maple_md;
+extern struct machdep_calls bpa_md;
/* Ultimately, stuff them in an elf section like initcalls... */
static struct machdep_calls __initdata *machines[] = {
/* Ultimately, stuff them in an elf section like initcalls... */
static struct machdep_calls __initdata *machines[] = {
@@
-355,6
+356,9
@@
static struct machdep_calls __initdata *machines[] = {
#ifdef CONFIG_PPC_MAPLE
&maple_md,
#endif /* CONFIG_PPC_MAPLE */
#ifdef CONFIG_PPC_MAPLE
&maple_md,
#endif /* CONFIG_PPC_MAPLE */
+#ifdef CONFIG_PPC_BPA
+ &bpa_md,
+#endif
NULL
};
NULL
};
@@
-672,37
+676,49
@@
void __init setup_system(void)
DBG(" <- setup_system()\n");
}
DBG(" <- setup_system()\n");
}
-
-void machine_
restart(char *cm
d)
+/* also used by kexec */
+void machine_
shutdown(voi
d)
{
if (ppc_md.nvram_sync)
ppc_md.nvram_sync();
{
if (ppc_md.nvram_sync)
ppc_md.nvram_sync();
+}
+
+void machine_restart(char *cmd)
+{
+ machine_shutdown();
ppc_md.restart(cmd);
ppc_md.restart(cmd);
+#ifdef CONFIG_SMP
+ smp_send_stop();
+#endif
+ printk(KERN_EMERG "System Halted, OK to turn off power\n");
+ local_irq_disable();
+ while (1) ;
}
}
-EXPORT_SYMBOL(machine_restart);
-
void machine_power_off(void)
{
void machine_power_off(void)
{
- if (ppc_md.nvram_sync)
- ppc_md.nvram_sync();
+ machine_shutdown();
ppc_md.power_off();
ppc_md.power_off();
+#ifdef CONFIG_SMP
+ smp_send_stop();
+#endif
+ printk(KERN_EMERG "System Halted, OK to turn off power\n");
+ local_irq_disable();
+ while (1) ;
}
}
-EXPORT_SYMBOL(machine_power_off);
-
void machine_halt(void)
{
void machine_halt(void)
{
- if (ppc_md.nvram_sync)
- ppc_md.nvram_sync();
+ machine_shutdown();
ppc_md.halt();
ppc_md.halt();
+#ifdef CONFIG_SMP
+ smp_send_stop();
+#endif
+ printk(KERN_EMERG "System Halted, OK to turn off power\n");
+ local_irq_disable();
+ while (1) ;
}
}
-EXPORT_SYMBOL(machine_halt);
-
-unsigned long ppc_proc_freq;
-unsigned long ppc_tb_freq;
-
static int ppc64_panic_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
static int ppc64_panic_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
@@
-1052,16
+1068,22
@@
void __init setup_arch(char **cmdline_p)
irqstack_early_init();
emergency_stack_init();
irqstack_early_init();
emergency_stack_init();
+ stabs_alloc();
+
/* set up the bootmem stuff with available memory */
do_init_bootmem();
/* set up the bootmem stuff with available memory */
do_init_bootmem();
+ sparse_init();
/* initialize the syscall map in systemcfg */
setup_syscall_map();
ppc_md.setup_arch();
/* initialize the syscall map in systemcfg */
setup_syscall_map();
ppc_md.setup_arch();
- /* Select the correct idle loop for the platform. */
- idle_setup();
+ /* Use the default idle loop if the platform hasn't provided one. */
+ if (NULL == ppc_md.idle_loop) {
+ ppc_md.idle_loop = default_idle;
+ printk(KERN_INFO "Using default idle loop\n");
+ }
paging_init();
ppc64_boot_msg(0x15, "Setup Done");
paging_init();
ppc64_boot_msg(0x15, "Setup Done");
@@
-1078,11
+1100,11
@@
void __init setup_arch(char **cmdline_p)
static void ppc64_do_msg(unsigned int src, const char *msg)
{
if (ppc_md.progress) {
static void ppc64_do_msg(unsigned int src, const char *msg)
{
if (ppc_md.progress) {
- char buf[
32
];
+ char buf[
128
];
- sprintf(buf, "%08
x
\n", src);
+ sprintf(buf, "%08
X
\n", src);
ppc_md.progress(buf, 0);
ppc_md.progress(buf, 0);
- s
printf(buf, "%-16
s", msg);
+ s
nprintf(buf, 128, "%
s", msg);
ppc_md.progress(buf, 0);
}
}
ppc_md.progress(buf, 0);
}
}
@@
-1116,7
+1138,7
@@
void ppc64_dump_msg(unsigned int src, const char *msg)
}
/* This should only be called on processor 0 during calibrate decr */
}
/* This should only be called on processor 0 during calibrate decr */
-void setup_default_decr(void)
+void
__init
setup_default_decr(void)
{
struct paca_struct *lpaca = get_paca();
{
struct paca_struct *lpaca = get_paca();