PERFORCE change 59893 for review
Peter Wemm
peter at FreeBSD.org
Mon Aug 16 15:30:21 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=59893
Change 59893 by peter at peter_daintree on 2004/08/16 22:29:40
integ -I -b i386_hammer
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/legacy.c#14 integrate
.. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#66 integrate
.. //depot/projects/hammer/sys/amd64/conf/NOTES#41 integrate
.. //depot/projects/hammer/sys/amd64/include/vmparam.h#21 integrate
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/legacy.c#14 (text+ko) ====
@@ -51,7 +51,6 @@
static MALLOC_DEFINE(M_LEGACYDEV, "legacydrv", "legacy system device");
struct legacy_device {
- struct resource_list lg_resources;
int lg_pcibus;
};
@@ -63,15 +62,8 @@
static int legacy_print_child(device_t, device_t);
static device_t legacy_add_child(device_t bus, int order, const char *name,
int unit);
-static struct resource *legacy_alloc_resource(device_t, device_t, int, int *,
- u_long, u_long, u_long, u_int);
static int legacy_read_ivar(device_t, device_t, int, uintptr_t *);
static int legacy_write_ivar(device_t, device_t, int, uintptr_t);
-static int legacy_release_resource(device_t, device_t, int, int,
- struct resource *);
-static int legacy_set_resource(device_t, device_t, int, int, u_long, u_long);
-static int legacy_get_resource(device_t, device_t, int, int, u_long *, u_long *);
-static void legacy_delete_resource(device_t, device_t, int, int);
static device_method_t legacy_methods[] = {
/* Device interface */
@@ -88,11 +80,8 @@
DEVMETHOD(bus_add_child, legacy_add_child),
DEVMETHOD(bus_read_ivar, legacy_read_ivar),
DEVMETHOD(bus_write_ivar, legacy_write_ivar),
- DEVMETHOD(bus_set_resource, legacy_set_resource),
- DEVMETHOD(bus_get_resource, legacy_get_resource),
- DEVMETHOD(bus_alloc_resource, legacy_alloc_resource),
- DEVMETHOD(bus_release_resource, legacy_release_resource),
- DEVMETHOD(bus_delete_resource, legacy_delete_resource),
+ DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
+ DEVMETHOD(bus_release_resource, bus_generic_release_resource),
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
@@ -183,30 +172,12 @@
}
static int
-legacy_print_all_resources(device_t dev)
-{
- struct legacy_device *atdev = DEVTOAT(dev);
- struct resource_list *rl = &atdev->lg_resources;
- int retval = 0;
-
- if (SLIST_FIRST(rl) || atdev->lg_pcibus != -1)
- retval += printf(" at");
-
- retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#lx");
- retval += resource_list_print_type(rl, "iomem", SYS_RES_MEMORY, "%#lx");
- retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld");
-
- return retval;
-}
-
-static int
legacy_print_child(device_t bus, device_t child)
{
struct legacy_device *atdev = DEVTOAT(child);
int retval = 0;
retval += bus_print_child_header(bus, child);
- retval += legacy_print_all_resources(child);
if (atdev->lg_pcibus != -1)
retval += printf(" pcibus %d", atdev->lg_pcibus);
retval += printf(" on motherboard\n"); /* XXX "motherboard", ick */
@@ -224,7 +195,6 @@
M_NOWAIT | M_ZERO);
if (atdev == NULL)
return(NULL);
- resource_list_init(&atdev->lg_resources);
atdev->lg_pcibus = -1;
child = device_add_child_ordered(bus, order, name, unit);
@@ -268,66 +238,6 @@
return 0;
}
-
-static struct resource *
-legacy_alloc_resource(device_t bus, device_t child, int type, int *rid,
- u_long start, u_long end, u_long count, u_int flags)
-{
- struct legacy_device *atdev = DEVTOAT(child);
- struct resource_list *rl = &atdev->lg_resources;
-
- return (resource_list_alloc(rl, bus, child, type, rid, start, end,
- count, flags));
-}
-
-static int
-legacy_release_resource(device_t bus, device_t child, int type, int rid,
- struct resource *r)
-{
- struct legacy_device *atdev = DEVTOAT(child);
- struct resource_list *rl = &atdev->lg_resources;
-
- return (resource_list_release(rl, bus, child, type, rid, r));
-}
-
-static int
-legacy_set_resource(device_t dev, device_t child, int type, int rid,
- u_long start, u_long count)
-{
- struct legacy_device *atdev = DEVTOAT(child);
- struct resource_list *rl = &atdev->lg_resources;
-
- resource_list_add(rl, type, rid, start, start + count - 1, count);
- return(0);
-}
-
-static int
-legacy_get_resource(device_t dev, device_t child, int type, int rid,
- u_long *startp, u_long *countp)
-{
- struct legacy_device *atdev = DEVTOAT(child);
- struct resource_list *rl = &atdev->lg_resources;
- struct resource_list_entry *rle;
-
- rle = resource_list_find(rl, type, rid);
- if (!rle)
- return(ENOENT);
- if (startp)
- *startp = rle->start;
- if (countp)
- *countp = rle->count;
- return(0);
-}
-
-static void
-legacy_delete_resource(device_t dev, device_t child, int type, int rid)
-{
- struct legacy_device *atdev = DEVTOAT(child);
- struct resource_list *rl = &atdev->lg_resources;
-
- resource_list_delete(rl, type, rid);
-}
-
/*
* Legacy CPU attachment when ACPI is not available. Drivers like
* cpufreq(4) hang off this.
==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#66 (text+ko) ====
@@ -29,6 +29,7 @@
#include "opt_cpu.h"
#include "opt_kstack_pages.h"
+#include "opt_mp_watchdog.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,6 +57,7 @@
#include <machine/apicreg.h>
#include <machine/clock.h>
#include <machine/md_var.h>
+#include <machine/mp_watchdog.h>
#include <machine/pcb.h>
#include <machine/psl.h>
#include <machine/smp.h>
@@ -1070,8 +1072,15 @@
mp_grab_cpu_hlt(void)
{
u_int mask = PCPU_GET(cpumask);
+#ifdef MP_WATCHDOG
+ u_int cpuid = PCPU_GET(cpuid);
+#endif
int retval;
+#ifdef MP_WATCHDOG
+ ap_watchdog(cpuid);
+#endif
+
retval = mask & hlt_cpus_mask;
while (mask & hlt_cpus_mask)
__asm __volatile("sti; hlt" : : : "memory");
==== //depot/projects/hammer/sys/amd64/conf/NOTES#41 (text+ko) ====
@@ -4,7 +4,7 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
#
-# (XXX from i386:NOTES,v 1.1167)
+# (XXX from i386:NOTES,v 1.1168)
# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.18 2004/08/16 12:39:27 tjr Exp $
#
@@ -159,6 +159,7 @@
#
# AGP GART support
device agp
+options AGP_AMD64_GART # Included GART code for AMD64 machines.
#####################################################################
==== //depot/projects/hammer/sys/amd64/include/vmparam.h#21 (text+ko) ====
More information about the p4-projects
mailing list