changeset: 10384:b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8
tag: tip
user: jimix@xxxxxxxxxxxxxxxxxxxxx
date: Tue May 23 13:03:45 2006 -0400
files: tools/domctrl/Makefile tools/domctrl/create.c xen/arch/ppc/0opt.c
xen/arch/ppc/Makefile xen/arch/ppc/audit.c xen/arch/ppc/boot_of.c
xen/arch/ppc/dart.c xen/arch/ppc/dom0_ops.c xen/arch/ppc/domain.c
xen/arch/ppc/domain_build.c xen/arch/ppc/exceptions.c xen/arch/ppc/exceptions.h
xen/arch/ppc/external.c xen/arch/ppc/hcalls.c xen/arch/ppc/irq.c
xen/arch/ppc/of_handler/memory.c xen/arch/ppc/of_handler/ofh.c
xen/arch/ppc/of_handler/ofh.h xen/arch/ppc/ofd_fixup.c xen/arch/ppc/physdev.c
xen/arch/ppc/ppc64/asm-offsets.c xen/arch/ppc/setup.c xen/arch/ppc/smp.c
xen/arch/ppc/time.c xen/arch/ppc/usercopy.c xen/include/asm-ppc/config.h
xen/include/asm-ppc/current.h xen/include/public/of-devtree.h
description:
[ppc] janitor jimix
This patch turns on some more compiler warnings in an attempt to find
and remove dead code. It also cleans up much of our externs, at least
the ones we control.
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 tools/domctrl/Makefile
--- a/tools/domctrl/Makefile Tue May 23 12:11:17 2006 -0400
+++ b/tools/domctrl/Makefile Tue May 23 13:03:45 2006 -0400
@@ -18,12 +18,13 @@ LDFLAGS := \
-static
OBJS := \
+ xc_bvtsched.o \
xc_domain.o \
- xc_bvtsched.o \
+ xc_evtchn.o \
+ xc_linux.o \
+ xc_load_elf.o \
xc_misc.o \
xc_private.o \
- xc_load_elf.o \
- xc_linux.o \
create.o \
list.o \
destroy.o \
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 tools/domctrl/create.c
--- a/tools/domctrl/create.c Tue May 23 12:11:17 2006 -0400
+++ b/tools/domctrl/create.c Tue May 23 13:03:45 2006 -0400
@@ -314,10 +314,11 @@ static int load_start_info(
return rc;
}
-static unsigned long create_start_info(start_info_t *si)
+static unsigned long create_start_info(int domid, start_info_t *si)
{
unsigned long eomem;
unsigned long si_addr;
+ int ch;
memset(si, 0, sizeof(*si));
snprintf(si->magic, sizeof(si->magic), "xen-%d.%d-powerpc64HV", 3, 0);
@@ -327,7 +328,20 @@ static unsigned long create_start_info(s
si->shared_info = eomem - (PAGE_SIZE * 1);
si->store_mfn = si->nr_pages - 2;
si->console_mfn = si->nr_pages - 3;
- si->console_evtchn = 2;
+
+ ch = xc_evtchn_alloc_unbound(xc_handle, domid, 0);
+ if (ch <= 0) {
+ fprintf(stderr, "bad evtchan for console\n");
+ exit(1);
+ }
+ si->console_evtchn = ch;
+ ch = xc_evtchn_alloc_unbound(xc_handle, domid, 0);
+ if (ch <= 0) {
+ fprintf(stderr, "bad evtchan for store\n");
+ exit(1);
+ }
+ si->store_evtchn = ch;
+
si_addr = eomem - (PAGE_SIZE * 4);
return si_addr;
@@ -395,7 +409,7 @@ int create(char *argv[], int argc)
}
#endif
- si_addr = create_start_info(&si);
+ si_addr = create_start_info(domid, &si);
if (-1 == load_start_info(domid, &si, si_addr, page_array)) {
rc = -1;
goto out;
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/0opt.c
--- a/xen/arch/ppc/0opt.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/0opt.c Tue May 23 13:03:45 2006 -0400
@@ -1,6 +1,7 @@
#include <xen/config.h>
#include <asm/misc.h>
+extern void __cmpxchg_called_with_bad_pointer(void);
void __cmpxchg_called_with_bad_pointer(void)
{
trap();
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/Makefile
--- a/xen/arch/ppc/Makefile Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/Makefile Tue May 23 13:03:45 2006 -0400
@@ -20,7 +20,6 @@ obj-y += float.o
obj-y += float.o
obj-y += hcalls.o
obj-y += htab.o
-obj-y += io.o
obj-y += iommu.o
obj-y += irq.o
obj-y += mambo.o
@@ -32,7 +31,6 @@ obj-y += ofd_fixup.o
obj-y += ofd_fixup.o
obj-y += physdev.o
obj-y += rtas.o
-obj-y += serial_mambo.o
obj-y += setup.o
obj-y += smp.o
obj-y += time.o
@@ -44,8 +42,12 @@ obj-$(builtin_dom0) += dom0.o
obj-y += firmware_image.o
+CFLAGS += -Wundef -Wpointer-arith
+CFLAGS += -Wmissing-prototypes -Wmissing-declarations -Wpacked
+CFALGS += -Wredundant-decls
+
firmware: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
- $(LD) $(LDFLAGS) -N -Ttext=0x0 $^ -o $@
+ $(LD) $(LDFLAGS) -e __ofh_start -N -Ttext=0x0 $^ -o $@
firmware_image: firmware
$(CROSS_COMPILE)objcopy --output-target=binary $< $@
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/audit.c
--- a/xen/arch/ppc/audit.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/audit.c Tue May 23 13:03:45 2006 -0400
@@ -18,12 +18,27 @@
*/
#ifndef NDEBUG
+#include <xen/lib.h>
+#include <xen/sched.h>
-#include <xen/lib.h>
+extern void audit_domain(struct domain *d);
+extern void audit_domains(void);
+extern void audit_domains_key(unsigned char key);
-void audit_domains_key(unsigned char key)
+void audit_domain(struct domain *d)
{
panic("%s unimplemented\n", __func__);
}
+void audit_domains(void)
+{
+ struct domain *d;
+ for_each_domain ( d )
+ audit_domain(d);
+}
+
+void audit_domains_key(unsigned char key)
+{
+ audit_domains();
+}
#endif
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/boot_of.c
--- a/xen/arch/ppc/boot_of.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/boot_of.c Tue May 23 13:03:45 2006 -0400
@@ -27,6 +27,7 @@
#include <public/of-devtree.h>
#include <asm/page.h>
#include <asm/io.h>
+#include "exceptions.h"
static ulong of_vec;
static ulong of_msr;
@@ -306,7 +307,7 @@ static int __init of_start_cpu(int cpu,
return rets[0];
}
-static void __init of_test(char * of_method_name)
+static void __init of_test(const char *of_method_name)
{
int rets[1] = { OF_FAILURE };
@@ -351,10 +352,6 @@ static int __init of_getparent(int ph)
DBG("getparent 0x%x -> 0x%x\n", ph, rets[0]);
return rets[0];
}
-
-extern char _start[];
-extern char _end[];
-
static void boot_of_probemem(multiboot_info_t *mbi)
{
@@ -449,7 +446,7 @@ static void boot_of_bootargs(multiboot_i
static void boot_of_bootargs(multiboot_info_t *mbi)
{
int rc;
- char *p;
+ const char *p;
int len;
const char sepr[] = " -- ";
@@ -942,7 +939,6 @@ static int __init boot_of_cpus(void)
int cpus;
int cpu;
int result;
- extern int spin_start[];
cpus = of_finddevice("/cpus");
cpu = of_getchild(cpus);
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/dart.c
--- a/xen/arch/ppc/dart.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/dart.c Tue May 23 13:03:45 2006 -0400
@@ -166,7 +166,7 @@ static int find_dart_simple_probe(void *
dart_node = ofd_node_find(oft_p, "/dart");
if (dart_node < 0) {
- return rc;
+ return -1;
}
/* if the property does not exist, then the value of dart_address is
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/dom0_ops.c
--- a/xen/arch/ppc/dom0_ops.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/dom0_ops.c Tue May 23 13:03:45 2006 -0400
@@ -24,6 +24,9 @@
#include <xen/guest_access.h>
#include <public/xen.h>
#include <public/dom0_ops.h>
+
+extern void arch_getdomaininfo_ctxt(struct vcpu *v, vcpu_guest_context_t *c);
+extern long arch_do_dom0_op(struct dom0_op *op, XEN_GUEST_HANDLE(dom0_op_t)
u_dom0_op);
void arch_getdomaininfo_ctxt(struct vcpu *v, vcpu_guest_context_t *c)
{
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/domain.c
--- a/xen/arch/ppc/domain.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/domain.c Tue May 23 13:03:45 2006 -0400
@@ -24,9 +24,12 @@
#include <xen/serial.h>
#include <xen/domain.h>
#include <xen/console.h>
+#include <xen/reboot.h>
#include <asm/htab.h>
#include <asm/current.h>
#include <asm/hcalls.h>
+
+extern void idle_loop(void);
#define next_arg(fmt, args) ({ \
unsigned long __arg; \
@@ -113,11 +116,6 @@ void machine_restart(char * __unused)
while(1);
}
-void free_perdomain_pt(struct domain *d)
-{
- panic("%s: called\n", __func__);
-}
-
struct vcpu *alloc_vcpu_struct(struct domain *d, unsigned int vcpu_id)
{
struct vcpu *v;
@@ -148,11 +146,6 @@ int arch_set_info_guest(struct vcpu *v,
cpu_init_vcpu(v);
return 0;
-}
-
-void domain_relinquish_memory(struct domain *d)
-{
- panic("%s: called\n", __func__);
}
void dump_pageframe_info(struct domain *d)
@@ -228,7 +221,6 @@ void context_switch(struct vcpu *prev, s
local_flush_tlb(); /* XXX maybe flush_tlb_mask? */
if (is_idle_vcpu(next)) {
- void idle_loop(void);
reset_stack_and_jump(idle_loop);
}
@@ -241,16 +233,6 @@ void continue_running(struct vcpu *same)
/* nothing to do */
}
-void sync_lazy_execstate_cpu(unsigned int cpu)
-{
- panic("%s: called\n", __func__);
-}
-
-void sync_lazy_execstate_mask(cpumask_t mask)
-{
- panic("%s: called\n", __func__);
-}
-
void sync_vcpu_execstate(struct vcpu *v)
{
/* XXX for now, for domain destruction, make this non-fatal */
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/domain_build.c
--- a/xen/arch/ppc/domain_build.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/domain_build.c Tue May 23 13:03:45 2006 -0400
@@ -42,18 +42,6 @@ static void parse_dom0_mem(char *s)
}
custom_param("dom0_mem", parse_dom0_mem);
-struct page_info *alloc_largest(struct domain *d, unsigned long max)
-{
- struct page_info *page;
- unsigned int order = get_order(max * PAGE_SIZE);
- if ((max & (max-1)) != 0)
- order--;
- while ((page = alloc_domheap_pages(d, order, 0)) == NULL)
- if (order-- == 0)
- break;
- return page;
-}
-
int elf_sanity_check(Elf_Ehdr *ehdr)
{
#if !defined(ELFSIZE)
@@ -107,7 +95,7 @@ static int rm_loadelfimage(struct domain
0, phdr->p_memsz - phdr->p_filesz);
}
-#if not_yet
+#ifdef NOT_YET
loadelfsymtab(dsi, 1);
#endif
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/exceptions.c
--- a/xen/arch/ppc/exceptions.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/exceptions.c Tue May 23 13:03:45 2006 -0400
@@ -26,6 +26,11 @@
#undef DEBUG
#define HDEC_PREEMPT
+
+extern ulong ppc_do_softirq(ulong orig_msr);
+extern void do_timer(struct cpu_user_regs *regs);
+extern void do_dec(struct cpu_user_regs *regs);
+extern void program_exception(struct cpu_user_regs *regs, unsigned long
cookie);
int hdec_sample = 0;
@@ -74,20 +79,6 @@ void do_dec(struct cpu_user_regs *regs)
mtdec(INT_MAX);
}
-void set_dabr(ulong addr)
-{
- ulong dabr;
- ulong dabrx;
-
- dabr = addr | 0x3;
- dabrx = 0xd;
-
- asm volatile("mtspr %0,%1; mtspr %2,%3"
- : /* output */ :
- "I" (SPRN_DABR), "r" (dabr),
- "I" (SPRN_DABRX), "r" (dabrx) : "memory");
-}
-
void program_exception(struct cpu_user_regs *regs, unsigned long cookie)
{
#ifdef CRASH_DEBUG
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/external.c
--- a/xen/arch/ppc/external.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/external.c Tue May 23 13:03:45 2006 -0400
@@ -27,6 +27,7 @@
#include <asm/hardirq.h>
#include <asm/mpic.h>
#include "mpic_init.h"
+#include "exceptions.h"
#undef DEBUG
#ifdef DEBUG
@@ -34,8 +35,6 @@
#else
#define DBG(fmt...)
#endif
-
-extern void do_IRQ(struct cpu_user_regs *regs);
int vector_irq[NR_VECTORS] __read_mostly = { [0 ... NR_VECTORS - 1] = -1};
@@ -175,7 +174,8 @@ void init_IRQ(void)
hc_irq = xen_mpic_init(&xen_irq);
}
-void ack_APIC_irq(void) {
+void ack_APIC_irq(void)
+{
printk("%s: EOI the whole MPIC?\n", __func__);
for (;;);
}
@@ -194,6 +194,7 @@ void ack_bad_irq(unsigned int irq)
ack_APIC_irq();
}
+extern void dump_ioapic_irq_info(void);
void dump_ioapic_irq_info(void)
{
printk("%s: can't dump yet\n", __func__);
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/hcalls.c
--- a/xen/arch/ppc/hcalls.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/hcalls.c Tue May 23 13:03:45 2006 -0400
@@ -28,6 +28,7 @@
#include <asm/hcalls.h>
#include <asm/debugger.h>
#include <asm/msr.h>
+#include "exceptions.h"
u32 *papr_hcalls; /* PAPR Hypervisor Calls */
u32 *hypercall_table; /* Xen Hypervisor Calls */
@@ -53,7 +54,6 @@ static void hcall_xen(ulong num, struct
static void hcall_xen(ulong num, struct cpu_user_regs *regs)
{
u32 address;
- extern long xen_hvcall_jump(struct cpu_user_regs *regs, ulong address);
if (regs->msr & MSR_PR) {
regs->gprs[3] = -EPERM;
@@ -147,7 +147,6 @@ static void init_hypercall_table(void)
static void init_hypercall_table(void)
{
int i;
- extern ulong *__hypercall_table[];
hypercall_table = xmalloc_array(u32, NR_hypercalls);
ASSERT(hypercall_table != NULL);
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/irq.c
--- a/xen/arch/ppc/irq.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/irq.c Tue May 23 13:03:45 2006 -0400
@@ -1,1 +1,2 @@
+#include "exceptions.h"
#include "../x86/irq.c"
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/of_handler/memory.c
--- a/xen/arch/ppc/of_handler/memory.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/of_handler/memory.c Tue May 23 13:03:45 2006 -0400
@@ -17,8 +17,6 @@
*/
#include "ofh.h"
-
-extern char _end[];
struct of_malloc_s {
u32 ofm_start;
@@ -42,7 +40,7 @@ claim(ulong b, u32 virt, u32 size, u32 a
end = virt + size;
/* you cannot claim OF's own space */
- if (virt >= (u32)_start && end < (u32)_end) {
+ if (virt >= (u32)ofh_start && end < (u32)_end) {
return OF_FAILURE;
}
@@ -96,7 +94,7 @@ release(ulong b, u32 virt, u32 size)
end = virt + size;
/* you cannot release OF's own space */
- if (virt >= (u32)_start && end < (u32)_end) {
+ if (virt >= (u32)ofh_start && end < (u32)_end) {
return OF_FAILURE;
}
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/of_handler/ofh.c
--- a/xen/arch/ppc/of_handler/ofh.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/of_handler/ofh.c Tue May 23 13:03:45 2006 -0400
@@ -224,12 +224,6 @@ ofh_options_init(ulong b)
buf, i);
}
-
-
-
-extern char __bss_start[];
-extern char _end[];
-
static void
ofh_init(ulong b)
{
@@ -366,7 +360,7 @@ ofh_handler(struct ofh_args *args, ulong
* The following code exists solely to run the handler code standalone
*/
void
-_start(void)
+__ofh_start(void)
{
s32 ret;
u32 of_stdout;
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/of_handler/ofh.h
--- a/xen/arch/ppc/of_handler/ofh.h Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/of_handler/ofh.h Tue May 23 13:03:45 2006 -0400
@@ -117,7 +117,6 @@ enum prop_type {
};
extern s32 ofh_start(struct ofh_args *);
-extern void _start(void);
#define OFH_CONS_XEN -1
extern void ofh_cons_init(struct ofh_ihandle *ihp, ulong b);
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/ofd_fixup.c
--- a/xen/arch/ppc/ofd_fixup.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/ofd_fixup.c Tue May 23 13:03:45 2006 -0400
@@ -191,8 +191,8 @@ static ofdn_t ofd_cpus_props(void *m, st
return n;
}
-ofdn_t
-ofd_xics_props(void *m)
+#ifdef ADD_XICS
+static ofdn_t ofd_xics_props(void *m)
{
ofdn_t n;
static const char path[] = "/interrupt-controller";
@@ -238,6 +238,7 @@ ofd_xics_props(void *m)
return n;
}
+#endif
/*
* Good things you can stick here:
@@ -455,7 +456,8 @@ static ofdn_t ofd_xen_props(void *m, str
}
return n;
}
-
+extern int ofd_dom0_fixup(
+ struct domain *d, ulong oftree, start_info_t *si, ulong dst);
int ofd_dom0_fixup(struct domain *d, ulong mem, start_info_t *si, ulong eoload)
{
void *m;
@@ -503,7 +505,8 @@ int ofd_dom0_fixup(struct domain *d, ulo
printk("Create a new RTAS with just enough stuff to convince "
"Linux that its on LPAR\n");
ofd_rtas_props(m);
-#elif FIX_COMPAT
+#endif
+#ifdef FIX_COMPAT
const char compat[] = "Hypervisor,Maple";
r = ofd_prop_add(m, n, "compatible", compat, sizeof (compat));
ASSERT( r > 0 );
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/physdev.c
--- a/xen/arch/ppc/physdev.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/physdev.c Tue May 23 13:03:45 2006 -0400
@@ -1,1 +1,4 @@
+#include <xen/types.h>
+#include <public/xen.h>
+extern long do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg);
#include "../x86/physdev.c"
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/ppc64/asm-offsets.c
--- a/xen/arch/ppc/ppc64/asm-offsets.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/ppc64/asm-offsets.c Tue May 23 13:03:45 2006 -0400
@@ -23,7 +23,8 @@
#define __L16(_x) (((_x) & 0x0000ff00) ? ( 8 + __L8( (_x)>> 8)) : __L8( _x))
#define LOG_2(_x) (((_x) & 0xffff0000) ? (16 + __L16((_x)>>16)) : __L16(_x))
-void __dummy__(void)
+extern void __dummy__(void);
+void __dummy__(void)
{
DEFINE(GPR_WIDTH, sizeof(unsigned long));
DEFINE(FPR_WIDTH, sizeof(double));
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/setup.c
--- a/xen/arch/ppc/setup.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/setup.c Tue May 23 13:03:45 2006 -0400
@@ -29,6 +29,7 @@
#include <xen/mm.h>
#include <xen/domain.h>
#include <xen/gdbstub.h>
+#include <xen/symbols.h>
#include <public/of-devtree.h>
#include <public/version.h>
#include <asm/processor.h>
@@ -36,6 +37,7 @@
#include <asm/cache.h>
#include <asm/debugger.h>
#include <asm/delay.h>
+#include "exceptions.h"
#define DEBUG
unsigned long xenheap_phys_end;
@@ -64,16 +66,10 @@ struct ns16550_defaults ns16550;
struct ns16550_defaults ns16550;
struct vcpu *idle_vcpu[NR_CPUS];
-extern char _start[];
-extern char _etext[];
-extern char _end[];
-extern char __bss_start[];
-extern char exception_vectors[];
-extern char exception_vectors_end[];
+extern void idle_loop(void);
/* move us to a header file */
extern void initialize_keytable(void);
-extern void init_IRQ(unsigned long oftree);
int is_kernel_text(unsigned long addr)
{
@@ -115,7 +111,7 @@ static void __init start_of_day(void)
{
struct domain *idle_domain;
- init_IRQ(oftree);
+ init_IRQ();
scheduler_init();
@@ -324,9 +320,6 @@ static void __init __start_xen(multiboot
startup_cpu_idle_loop();
}
-
-extern multiboot_info_t *boot_of_init(ulong r3, ulong r4, ulong vec, ulong
r6, ulong r7, ulong orig_msr);
-
void __init __start_xen_ppc(
ulong r3, ulong r4, ulong r5, ulong r6, ulong r7, ulong orig_msr)
{
@@ -348,6 +341,7 @@ void __init __start_xen_ppc(
}
+extern void arch_get_xen_caps(xen_capabilities_info_t info);
void arch_get_xen_caps(xen_capabilities_info_t info)
{
}
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/smp.c
--- a/xen/arch/ppc/smp.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/smp.c Tue May 23 13:03:45 2006 -0400
@@ -19,17 +19,19 @@
#include <asm/misc.h>
#include <xen/cpumask.h>
+#include <xen/smp.h>
+#include <asm/flushtlb.h>
int smp_num_siblings = 1;
int smp_num_cpus = 1;
int ht_per_core = 1;
-void __flush_tlb_mask(unsigned long mask, unsigned long addr)
+void __flush_tlb_mask(cpumask_t mask, unsigned long addr)
{
unimplemented();
}
-void smp_send_event_check_mask(unsigned long cpu_mask)
+void smp_send_event_check_mask(cpumask_t cpu_mask)
{
unimplemented();
}
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/time.c
--- a/xen/arch/ppc/time.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/time.c Tue May 23 13:03:45 2006 -0400
@@ -84,6 +84,7 @@ static void set_preempt(unsigned ns)
* returns 1 on success
* returns 0 if the timeout value is too small or in the past.
*/
+extern int reprogram_timer(s_time_t timeout);
int reprogram_timer(s_time_t timeout)
{
s_time_t expire;
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/usercopy.c
--- a/xen/arch/ppc/usercopy.c Tue May 23 12:11:17 2006 -0400
+++ b/xen/arch/ppc/usercopy.c Tue May 23 13:03:45 2006 -0400
@@ -33,7 +33,7 @@ static int xencomm_debug = 1; /* extreme
#endif
/* XXX need to return error, not panic, if domain passed a bad pointer */
-unsigned long paddr_to_maddr(unsigned long paddr)
+static unsigned long paddr_to_maddr(unsigned long paddr)
{
struct vcpu *v = get_current();
struct domain *d = v->domain;
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/include/asm-ppc/config.h
--- a/xen/include/asm-ppc/config.h Tue May 23 12:11:17 2006 -0400
+++ b/xen/include/asm-ppc/config.h Tue May 23 13:03:45 2006 -0400
@@ -28,9 +28,15 @@
/* older assemblers do not like UL */
#define U(x) (x)
#define UL(x) (x)
-#else
+
+#else /* __ASSEMBLY__ */
+
#define U(x) (x ## U)
#define UL(x) (x ## UL)
+extern char _start[];
+extern char _end[];
+extern char _etext[];
+extern char __bss_start[];
#endif
/* align addr on a size boundary - adjust address up/down if needed */
@@ -69,4 +75,5 @@
#include <asm/ppc32/config.h>
#endif
+
#endif
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/include/asm-ppc/current.h
--- a/xen/include/asm-ppc/current.h Tue May 23 12:11:17 2006 -0400
+++ b/xen/include/asm-ppc/current.h Tue May 23 13:03:45 2006 -0400
@@ -51,7 +51,7 @@ static inline void reset_stack_and_jump(
void _reset_stack_and_jump(void (*f)(void), struct cpu_user_regs *regs);
struct cpu_user_regs *regs = guest_cpu_user_regs();
-#if TRACK_RESUME
+#ifdef TRACK_RESUME
printk("PC: 0x%lx, MSR: 0x%lx\n", regs->pc, regs->msr);
#endif
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/include/public/of-devtree.h
--- a/xen/include/public/of-devtree.h Tue May 23 12:11:17 2006 -0400
+++ b/xen/include/public/of-devtree.h Tue May 23 13:03:45 2006 -0400
@@ -132,5 +132,6 @@ extern ofdn_t ofd_node_find_by_prop(void
const void *val, size_t sz);
extern ofdn_t ofd_node_find_next(void *mem, ofdn_t n);
extern ofdn_t ofd_node_find_prev(void *mem, ofdn_t n);
+extern void ofd_init(int (*write)(const char *, size_t len));
#endif /* _OF_DEVTREE_H */
diff -r 8c8eaaec5fcd7f5da89211b66ded71270fcde77a -r
b1ddcce90f98313265e23bd9c1531b2ff9c2b7b8 xen/arch/ppc/exceptions.h
--- /dev/null Thu Jan 1 00:00:00 1970 +0000
+++ b/xen/arch/ppc/exceptions.h Tue May 23 13:03:45 2006 -0400
@@ -0,0 +1,39 @@
+#ifndef _ARCH_PPC_EXCEPTIONS_H_
+#define _ARCH_PPC_EXCEPTIONS_H_
+
+#include <xen/types.h>
+#include <public/xen.h>
+#include <xen/multiboot.h>
+
+extern void do_hcall(struct cpu_user_regs *regs);
+extern void do_IRQ(struct cpu_user_regs *regs);
+extern void deliver_ee(struct cpu_user_regs *regs);
+extern void do_external(struct cpu_user_regs *regs);
+extern void init_IRQ(void);
+extern void ack_APIC_irq(void);
+extern int ioapic_guest_read(unsigned long physbase, unsigned int reg, u32
*pval);
+extern int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32
val);
+extern int pirq_acktype(int irq);
+extern void __start_xen_ppc(
+ ulong r3, ulong r4, ulong r5, ulong r6, ulong r7, ulong orig_msr);
+extern multiboot_info_t *boot_of_init(ulong r3, ulong r4, ulong vec, ulong
r6, ulong r7, ulong orig_msr);
+
+extern ulong ppc_do_softirq(ulong orig_msr);
+extern void do_timer(struct cpu_user_regs *regs);
+extern void do_dec(struct cpu_user_regs *regs);
+extern void program_exception(
+ struct cpu_user_regs *regs, unsigned long cookie);
+
+extern long xen_hvcall_jump(struct cpu_user_regs *regs, ulong address);
+extern void *mambo_memset(void *, int, ulong);
+extern void *mambo_memcpy(void *, const void *, ulong);
+
+extern ulong *__hypercall_table[];
+
+extern char exception_vectors[];
+extern char exception_vectors_end[];
+extern int spin_start[];
+extern int firmware_image_start[0];
+extern int firmware_image_size[0];
+
+#endif
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|