PERFORCE change 59952 for review
Robert Watson
rwatson at FreeBSD.org
Tue Aug 17 19:38:45 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=59952
Change 59952 by rwatson at rwatson_paprika on 2004/08/18 02:38:20
Integrate netperf_socket from FreeBSD CVS HEAD:
Much MFi386 into amd64.
ipfw, dummynet, et al, use PFIL_HOOKS (woo!).
aic* driver fixups.
netinet white space cleanup.
psm sync bits fixup.
6.x-current.
Affected files ...
.. //depot/projects/netperf_socket/sys/amd64/acpica/acpi_machdep.c#4 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/busdma_machdep.c#4 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/cpu_switch.S#5 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/db_interface.c#5 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/intr_machdep.c#6 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/io_apic.c#5 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/legacy.c#4 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/local_apic.c#5 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/machdep.c#15 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/trap.c#9 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/vm_machdep.c#11 integrate
.. //depot/projects/netperf_socket/sys/amd64/conf/GENERIC#15 integrate
.. //depot/projects/netperf_socket/sys/amd64/include/intr_machdep.h#3 integrate
.. //depot/projects/netperf_socket/sys/amd64/isa/atpic.c#6 integrate
.. //depot/projects/netperf_socket/sys/amd64/isa/clock.c#6 integrate
.. //depot/projects/netperf_socket/sys/amd64/isa/isa.h#3 integrate
.. //depot/projects/netperf_socket/sys/amd64/isa/isa_dma.c#4 integrate
.. //depot/projects/netperf_socket/sys/boot/Makefile#4 integrate
.. //depot/projects/netperf_socket/sys/boot/ofw/common/main.c#3 integrate
.. //depot/projects/netperf_socket/sys/boot/ofw/libofw/ofw_console.c#2 integrate
.. //depot/projects/netperf_socket/sys/boot/ofw/libofw/ofw_net.c#2 integrate
.. //depot/projects/netperf_socket/sys/boot/ofw/libofw/openfirm.c#3 integrate
.. //depot/projects/netperf_socket/sys/boot/ofw/libofw/openfirm.h#2 integrate
.. //depot/projects/netperf_socket/sys/boot/powerpc/loader/Makefile#5 integrate
.. //depot/projects/netperf_socket/sys/boot/sparc64/boot1/boot1.c#2 integrate
.. //depot/projects/netperf_socket/sys/boot/sparc64/loader/Makefile#3 integrate
.. //depot/projects/netperf_socket/sys/boot/sparc64/loader/main.c#2 integrate
.. //depot/projects/netperf_socket/sys/compat/ndis/kern_ndis.c#19 integrate
.. //depot/projects/netperf_socket/sys/compat/ndis/ndis_var.h#10 integrate
.. //depot/projects/netperf_socket/sys/compat/ndis/subr_ndis.c#15 integrate
.. //depot/projects/netperf_socket/sys/compat/ndis/subr_ntoskrnl.c#18 integrate
.. //depot/projects/netperf_socket/sys/conf/files#48 integrate
.. //depot/projects/netperf_socket/sys/conf/files.ia64#7 integrate
.. //depot/projects/netperf_socket/sys/conf/newvers.sh#4 integrate
.. //depot/projects/netperf_socket/sys/conf/options#26 integrate
.. //depot/projects/netperf_socket/sys/conf/options.ia64#2 integrate
.. //depot/projects/netperf_socket/sys/contrib/pf/net/pf_if.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_cmbat.c#9 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/ahc_eisa.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/ahc_isa.c#1 branch
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/ahc_pci.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.c#5 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.h#5 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx_osm.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic7xxx.c#5 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic7xxx.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic7xxx_osm.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic7xxx_osm.h#3 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic_osm_lib.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic_osm_lib.h#3 integrate
.. //depot/projects/netperf_socket/sys/dev/amr/amr.c#5 integrate
.. //depot/projects/netperf_socket/sys/dev/amr/amrio.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/ciss/ciss.c#14 integrate
.. //depot/projects/netperf_socket/sys/dev/cp/cpddk.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/eisa/eisaconf.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/if_ndis/if_ndis_pci.c#8 integrate
.. //depot/projects/netperf_socket/sys/dev/ofw/ofw_disk.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/ofw/openfirm.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/ofw/openfirm.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/ofw/openfirmio.c#6 integrate
.. //depot/projects/netperf_socket/sys/dev/ofw/openpromio.c#5 integrate
.. //depot/projects/netperf_socket/sys/dev/pccard/pccard.c#3 integrate
.. //depot/projects/netperf_socket/sys/i386/i386/legacy.c#5 integrate
.. //depot/projects/netperf_socket/sys/ia64/disasm/disasm_decode.c#2 integrate
.. //depot/projects/netperf_socket/sys/ia64/ia64/machdep.c#10 integrate
.. //depot/projects/netperf_socket/sys/ia64/ia64/unaligned.c#2 integrate
.. //depot/projects/netperf_socket/sys/ia64/include/pcb.h#3 integrate
.. //depot/projects/netperf_socket/sys/isa/psm.c#10 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_intr.c#9 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_lock.c#4 integrate
.. //depot/projects/netperf_socket/sys/modules/agp/Makefile#3 integrate
.. //depot/projects/netperf_socket/sys/modules/aic7xxx/ahc/Makefile#2 integrate
.. //depot/projects/netperf_socket/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile#3 integrate
.. //depot/projects/netperf_socket/sys/modules/aic7xxx/ahc/ahc_isa/Makefile#1 branch
.. //depot/projects/netperf_socket/sys/modules/cbb/Makefile#2 integrate
.. //depot/projects/netperf_socket/sys/modules/ipfw/Makefile#2 integrate
.. //depot/projects/netperf_socket/sys/net/bridge.c#9 integrate
.. //depot/projects/netperf_socket/sys/netgraph/ng_bridge.c#7 integrate
.. //depot/projects/netperf_socket/sys/netinet/icmp_var.h#4 integrate
.. //depot/projects/netperf_socket/sys/netinet/if_atm.c#2 integrate
.. //depot/projects/netperf_socket/sys/netinet/if_atm.h#2 integrate
.. //depot/projects/netperf_socket/sys/netinet/igmp.h#3 integrate
.. //depot/projects/netperf_socket/sys/netinet/in.c#5 integrate
.. //depot/projects/netperf_socket/sys/netinet/in.h#6 integrate
.. //depot/projects/netperf_socket/sys/netinet/in_pcb.h#7 integrate
.. //depot/projects/netperf_socket/sys/netinet/in_proto.c#6 integrate
.. //depot/projects/netperf_socket/sys/netinet/in_var.h#4 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_divert.c#13 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_dummynet.c#7 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_dummynet.h#4 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_fastfwd.c#9 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_fw.h#9 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_fw2.c#15 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_fw_pfil.c#1 branch
.. //depot/projects/netperf_socket/sys/netinet/ip_gre.c#4 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_icmp.c#10 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_id.c#4 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_input.c#21 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_mroute.c#12 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_mroute.h#3 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_output.c#17 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_var.h#8 integrate
.. //depot/projects/netperf_socket/sys/netinet/raw_ip.c#13 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp.h#5 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_debug.h#3 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_hostcache.c#4 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_input.c#18 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_output.c#10 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_sack.c#2 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_subr.c#18 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_syncache.c#13 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_timer.c#4 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_timer.h#3 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_usrreq.c#14 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_var.h#10 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcpip.h#3 integrate
.. //depot/projects/netperf_socket/sys/netinet/udp_usrreq.c#12 integrate
.. //depot/projects/netperf_socket/sys/netinet/udp_var.h#3 integrate
.. //depot/projects/netperf_socket/sys/powerpc/conf/GENERIC#10 integrate
.. //depot/projects/netperf_socket/sys/powerpc/ofw/ofw_pcib_pci.c#3 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powermac/ata_kauai.c#5 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powermac/hrowpic.c#7 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powermac/macio.c#6 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powermac/uninorth.c#5 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powerpc/locore.S#5 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powerpc/nexus.c#4 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powerpc/ofw_machdep.c#3 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powerpc/ofwmagic.S#2 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powerpc/pmap.c#15 integrate
.. //depot/projects/netperf_socket/sys/sparc64/conf/GENERIC#10 integrate
.. //depot/projects/netperf_socket/sys/sparc64/conf/NOTES#6 integrate
.. //depot/projects/netperf_socket/sys/sparc64/include/ofw_bus.h#3 integrate
.. //depot/projects/netperf_socket/sys/sparc64/sparc64/machdep.c#7 integrate
.. //depot/projects/netperf_socket/sys/sparc64/sparc64/nexus.c#7 integrate
.. //depot/projects/netperf_socket/sys/sparc64/sparc64/ofw_bus.c#3 integrate
.. //depot/projects/netperf_socket/sys/sparc64/sparc64/ofw_machdep.c#6 integrate
.. //depot/projects/netperf_socket/sys/sys/mbuf.h#17 integrate
.. //depot/projects/netperf_socket/sys/sys/param.h#24 integrate
Differences ...
==== //depot/projects/netperf_socket/sys/amd64/acpica/acpi_machdep.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.14 2004/06/30 04:42:29 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.15 2004/08/16 23:10:18 peter Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -40,8 +40,7 @@
{
struct acpi_softc *sc;
- sc = device_get_softc(dev);
-
+ sc = devclass_get_softc(devclass_find("acpi"), 0);
acpi_install_wakeup_handler(sc);
if (intr_model != ACPI_INTR_PIC)
==== //depot/projects/netperf_socket/sys/amd64/amd64/busdma_machdep.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.56 2004/07/08 01:28:33 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.57 2004/08/16 22:53:03 peter Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -526,7 +526,7 @@
if ((dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)
|| dmat->boundary > 0 || dmat->alignment > 1)
- && map->pagesneeded == 0) {
+ && map != &nobounce_dmamap && map->pagesneeded == 0) {
vm_offset_t vendaddr;
/*
==== //depot/projects/netperf_socket/sys/amd64/amd64/cpu_switch.S#5 (text+ko) ====
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.150 2004/05/16 22:43:57 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.151 2004/08/16 22:53:29 peter Exp $
*/
#include <machine/asmacros.h>
@@ -53,7 +53,7 @@
/*
* cpu_throw()
*
- * This is the second half of cpu_swtch(). It is used when the current
+ * This is the second half of cpu_switch(). It is used when the current
* thread is either a dummy or slated to die, and we no longer care
* about its state. This is only a slight optimization and is probably
* not worth it anymore. Note that we need to clear the pm_active bits so
==== //depot/projects/netperf_socket/sys/amd64/amd64/db_interface.c#5 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_interface.c,v 1.79 2004/07/10 23:47:18 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_interface.c,v 1.80 2004/08/16 23:10:46 peter Exp $");
/*
* Interface to new debugger.
@@ -33,11 +33,9 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kdb.h>
-#include <sys/reboot.h>
#include <sys/cons.h>
#include <sys/pcpu.h>
#include <sys/proc.h>
-#include <sys/smp.h>
#include <machine/cpu.h>
==== //depot/projects/netperf_socket/sys/amd64/amd64/intr_machdep.c#6 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.8 2004/07/19 16:37:47 jhb Exp $
+ * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.9 2004/08/16 23:12:29 peter Exp $
*/
/*
@@ -212,8 +212,7 @@
* For stray and threaded interrupts, we mask and EOI the
* source.
*/
- isrc->is_pic->pic_disable_source(isrc);
- isrc->is_pic->pic_eoi_source(isrc);
+ isrc->is_pic->pic_disable_source(isrc, PIC_EOI);
if (ih == NULL)
error = EINVAL;
else
==== //depot/projects/netperf_socket/sys/amd64/amd64/io_apic.c#5 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.10 2004/07/08 01:42:49 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.11 2004/08/16 23:12:29 peter Exp $");
#include "opt_atpic.h"
#include "opt_isa.h"
@@ -119,7 +119,7 @@
static const char *ioapic_bus_string(int bus_type);
static void ioapic_print_vector(struct ioapic_intsrc *intpin);
static void ioapic_enable_source(struct intsrc *isrc);
-static void ioapic_disable_source(struct intsrc *isrc);
+static void ioapic_disable_source(struct intsrc *isrc, int eoi);
static void ioapic_eoi_source(struct intsrc *isrc);
static void ioapic_enable_intr(struct intsrc *isrc);
static int ioapic_vector(struct intsrc *isrc);
@@ -148,6 +148,12 @@
#endif
TUNABLE_INT("hw.apic.mixed_mode", &mixed_mode_active);
+static __inline void
+_ioapic_eoi_source(struct intsrc *isrc)
+{
+ lapic_eoi();
+}
+
static u_int
ioapic_read(volatile ioapic_t *apic, int reg)
{
@@ -225,7 +231,7 @@
}
static void
-ioapic_disable_source(struct intsrc *isrc)
+ioapic_disable_source(struct intsrc *isrc, int eoi)
{
struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc;
struct ioapic *io = (struct ioapic *)isrc->is_pic;
@@ -240,6 +246,10 @@
flags);
intpin->io_masked = 1;
}
+
+ if (eoi == PIC_EOI)
+ _ioapic_eoi_source(isrc);
+
mtx_unlock_spin(&icu_lock);
}
@@ -247,7 +257,7 @@
ioapic_eoi_source(struct intsrc *isrc)
{
- lapic_eoi();
+ _ioapic_eoi_source(isrc);
}
/*
==== //depot/projects/netperf_socket/sys/amd64/amd64/legacy.c#4 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/legacy.c,v 1.55 2004/06/03 20:25:05 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/legacy.c,v 1.56 2004/08/16 22:54:50 peter Exp $");
/*
* This code implements a system driver for legacy systems that do not
@@ -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/netperf_socket/sys/amd64/amd64/local_apic.c#5 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.9 2004/05/16 20:30:46 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.10 2004/08/16 22:55:32 peter Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -194,7 +194,7 @@
{
int i;
- if (apic_id > MAX_APICID) {
+ if (apic_id >= MAX_APICID) {
printf("APIC: Ignoring local APIC with ID %d\n", apic_id);
if (boot_cpu)
panic("Can't ignore BSP");
==== //depot/projects/netperf_socket/sys/amd64/amd64/machdep.c#15 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.617 2004/08/10 12:15:27 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.618 2004/08/16 22:57:47 peter Exp $");
#include "opt_atalk.h"
#include "opt_atpic.h"
@@ -95,6 +95,11 @@
#include <sys/exec.h>
#include <sys/cons.h>
+#ifdef DDB
+#ifndef KDB
+#error KDB must be enabled in order for DDB to work!
+#endif
+#endif
#include <ddb/ddb.h>
#include <net/netisr.h>
==== //depot/projects/netperf_socket/sys/amd64/amd64/trap.c#9 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.278 2004/08/09 23:57:59 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.279 2004/08/16 22:56:20 peter Exp $");
/*
* AMD64 Trap and System call handling
@@ -286,7 +286,7 @@
*/
if (kdb_on_nmi) {
printf ("NMI ... going to debugger\n");
- kdb_trap (type, 0, &frame);
+ kdb_trap(type, 0, &frame);
}
#endif /* KDB */
goto userout;
@@ -747,6 +747,9 @@
ktrsyscall(code, narg, argp);
#endif
+ CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td,
+ td->td_proc->p_pid, td->td_proc->p_comm, code);
+
if (error == 0) {
td->td_retval[0] = 0;
td->td_retval[1] = frame.tf_rdx;
@@ -810,6 +813,9 @@
*/
userret(td, &frame, sticks);
+ CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td,
+ td->td_proc->p_pid, td->td_proc->p_comm, code);
+
#ifdef KTRACE
if (KTRPOINT(td, KTR_SYSRET))
ktrsysret(code, error, td->td_retval[0]);
==== //depot/projects/netperf_socket/sys/amd64/amd64/vm_machdep.c#11 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.236 2004/08/11 23:23:05 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.237 2004/08/16 22:57:13 peter Exp $");
#include "opt_isa.h"
#include "opt_cpu.h"
@@ -314,6 +314,7 @@
* Set the trap frame to point at the beginning of the uts
* function.
*/
+ td->td_frame->tf_rbp = 0;
td->td_frame->tf_rsp =
((register_t)ku->ku_stack.ss_sp + ku->ku_stack.ss_size) & ~0x0f;
td->td_frame->tf_rsp -= 8;
==== //depot/projects/netperf_socket/sys/amd64/conf/GENERIC#15 (text+ko) ====
@@ -16,7 +16,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.420 2004/08/16 12:51:32 obrien Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.421 2004/08/16 22:59:24 peter Exp $
machine amd64
cpu HAMMER
@@ -58,6 +58,7 @@
options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~215k to driver.
options PFIL_HOOKS # pfil(9) framework
+options ADAPTIVE_GIANT # Giant mutex is adaptive.
# Debugging for use in -current
options KDB # Enable kernel debugger support.
@@ -149,7 +150,6 @@
# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
device cbb # cardbus (yenta) bridge
-#device pcic # ExCA ISA and PCI bridges
device pccard # PC Card (16-bit) bus
device cardbus # CardBus (32-bit) bus
==== //depot/projects/netperf_socket/sys/amd64/include/intr_machdep.h#3 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.3 2004/05/16 20:30:46 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.4 2004/08/16 23:12:30 peter Exp $
*/
#ifndef __MACHINE_INTR_MACHDEP_H__
@@ -50,7 +50,7 @@
*/
struct pic {
void (*pic_enable_source)(struct intsrc *);
- void (*pic_disable_source)(struct intsrc *);
+ void (*pic_disable_source)(struct intsrc *, int);
void (*pic_eoi_source)(struct intsrc *);
void (*pic_enable_intr)(struct intsrc *);
int (*pic_vector)(struct intsrc *);
@@ -61,6 +61,12 @@
enum intr_polarity);
};
+/* Flags for pic_disable_source() */
+enum {
+ PIC_EOI,
+ PIC_NO_EOI,
+};
+
/*
* An interrupt source. The upper-layer code uses the PIC methods to
* control a given source. The lower-layer PIC drivers can store additional
==== //depot/projects/netperf_socket/sys/amd64/isa/atpic.c#6 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/atpic.c,v 1.12 2004/06/03 05:58:30 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/atpic.c,v 1.13 2004/08/16 23:12:30 peter Exp $");
#include "opt_auto_eoi.h"
#include "opt_isa.h"
@@ -140,7 +140,7 @@
};
static void atpic_enable_source(struct intsrc *isrc);
-static void atpic_disable_source(struct intsrc *isrc);
+static void atpic_disable_source(struct intsrc *isrc, int eoi);
static void atpic_eoi_master(struct intsrc *isrc);
static void atpic_eoi_slave(struct intsrc *isrc);
static void atpic_enable_intr(struct intsrc *isrc);
@@ -177,6 +177,35 @@
CTASSERT(sizeof(atintrs) / sizeof(atintrs[0]) == NUM_ISA_IRQS);
+static __inline void
+_atpic_eoi_master(struct intsrc *isrc)
+{
+
+ KASSERT(isrc->is_pic == &atpics[MASTER].at_pic,
+ ("%s: mismatched pic", __func__));
+#ifndef AUTO_EOI_1
+ outb(atpics[MASTER].at_ioaddr, OCW2_EOI);
+#endif
+}
+
+/*
+ * The data sheet says no auto-EOI on slave, but it sometimes works.
+ * So, if AUTO_EOI_2 is enabled, we use it.
+ */
+static __inline void
+_atpic_eoi_slave(struct intsrc *isrc)
+{
+
+ KASSERT(isrc->is_pic == &atpics[SLAVE].at_pic,
+ ("%s: mismatched pic", __func__));
+#ifndef AUTO_EOI_2
+ outb(atpics[SLAVE].at_ioaddr, OCW2_EOI);
+#ifndef AUTO_EOI_1
+ outb(atpics[MASTER].at_ioaddr, OCW2_EOI);
+#endif
+#endif
+}
+
static void
atpic_enable_source(struct intsrc *isrc)
{
@@ -192,48 +221,48 @@
}
static void
-atpic_disable_source(struct intsrc *isrc)
+atpic_disable_source(struct intsrc *isrc, int eoi)
{
struct atpic_intsrc *ai = (struct atpic_intsrc *)isrc;
struct atpic *ap = (struct atpic *)isrc->is_pic;
- if (ai->at_trigger == INTR_TRIGGER_EDGE)
- return;
mtx_lock_spin(&icu_lock);
- *ap->at_imen |= IMEN_MASK(ai);
- outb(ap->at_ioaddr + ICU_IMR_OFFSET, *ap->at_imen);
+ if (ai->at_trigger != INTR_TRIGGER_EDGE) {
+ *ap->at_imen |= IMEN_MASK(ai);
+ outb(ap->at_ioaddr + ICU_IMR_OFFSET, *ap->at_imen);
+ }
+
+ /*
+ * Take care to call these functions directly instead of through
+ * a function pointer. All of the referenced variables should
+ * still be hot in the cache.
+ */
+ if (eoi == PIC_EOI) {
+ if (isrc->is_pic == &atpics[MASTER].at_pic)
+ _atpic_eoi_master(isrc);
+ else
+ _atpic_eoi_slave(isrc);
+ }
+
mtx_unlock_spin(&icu_lock);
}
static void
atpic_eoi_master(struct intsrc *isrc)
{
-
- KASSERT(isrc->is_pic == &atpics[MASTER].at_pic,
- ("%s: mismatched pic", __func__));
#ifndef AUTO_EOI_1
mtx_lock_spin(&icu_lock);
- outb(atpics[MASTER].at_ioaddr, OCW2_EOI);
+ _atpic_eoi_master(isrc);
mtx_unlock_spin(&icu_lock);
#endif
}
-/*
- * The data sheet says no auto-EOI on slave, but it sometimes works.
- * So, if AUTO_EOI_2 is enabled, we use it.
- */
static void
atpic_eoi_slave(struct intsrc *isrc)
{
-
- KASSERT(isrc->is_pic == &atpics[SLAVE].at_pic,
- ("%s: mismatched pic", __func__));
#ifndef AUTO_EOI_2
mtx_lock_spin(&icu_lock);
- outb(atpics[SLAVE].at_ioaddr, OCW2_EOI);
-#ifndef AUTO_EOI_1
- outb(atpics[MASTER].at_ioaddr, OCW2_EOI);
-#endif
+ _atpic_eoi_slave(isrc);
mtx_unlock_spin(&icu_lock);
#endif
}
==== //depot/projects/netperf_socket/sys/amd64/isa/clock.c#6 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.213 2004/07/11 18:07:55 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.214 2004/08/16 22:52:02 peter Exp $");
/*
* Routines to handle clock hardware.
@@ -212,6 +212,7 @@
static void
rtcintr(struct clockframe *frame)
{
+
while (rtcin(RTC_INTR) & RTCIR_PERIOD) {
if (profprocs != 0) {
if (--pscnt == 0)
@@ -295,7 +296,7 @@
* multiplications and divisions to scale the count take a while).
*
* However, if ddb is active then use a fake counter since reading
- * the i8254 counter involves acquiring a lock. ddb must not go
+ * the i8254 counter involves acquiring a lock. ddb must not do
* locking for many reasons, but it calls here for at least atkbd
* input.
*/
==== //depot/projects/netperf_socket/sys/amd64/isa/isa.h#3 (text+ko) ====
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.h 5.7 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/isa/isa.h,v 1.25 2004/04/05 21:25:52 imp Exp $
+ * $FreeBSD: src/sys/amd64/isa/isa.h,v 1.26 2004/08/16 22:51:44 peter Exp $
*/
#ifndef _I386_ISA_ISA_H_
@@ -64,69 +64,9 @@
#define IO_NPX 0x0F0 /* Numeric Coprocessor */
/* Cards */
- /* 0x100 - 0x16F Open */
-
-#define IO_WD2 0x170 /* Secondary Fixed Disk Controller */
-
-#define IO_PMP2 0x178 /* 82347 Power Management Peripheral */
-
- /* 0x17A - 0x1EF Open */
-
-#define IO_WD1 0x1F0 /* Primary Fixed Disk Controller */
-#define IO_GAME 0x201 /* Game Controller */
-
- /* 0x202 - 0x22A Open */
-
-#define IO_ASC2 0x22B /* AmiScan addr.grp. 2 */
-
- /* 0x230 - 0x26A Open */
-
-#define IO_ASC3 0x26B /* AmiScan addr.grp. 3 */
-#define IO_GSC1 0x270 /* -- 0x27B! GeniScan GS-4500 addr.grp. 1 */
-#define IO_LPT2 0x278 /* Parallel Port #2 */
-
- /* 0x280 - 0x2AA Open */
-
-#define IO_ASC4 0x2AB /* AmiScan addr.grp. 4 */
-
- /* 0x2B0 - 0x2DF Open */
-
-#define IO_GSC2 0x2E0 /* GeniScan GS-4500 addr.grp. 2 */
-#define IO_COM4 0x2E8 /* COM4 i/o address */
-#define IO_ASC5 0x2EB /* AmiScan addr.grp. 5 */
-
- /* 0x2F0 - 0x2F7 Open */
-
-#define IO_COM2 0x2F8 /* COM2 i/o address */
-
- /* 0x300 - 0x32A Open */
-
-#define IO_ASC6 0x32B /* AmiScan addr.grp. 6 */
-#define IO_AHA0 0x330 /* adaptec 1542 default addr. */
-#define IO_BT0 0x330 /* bustek 742a default addr. */
-#define IO_UHA0 0x330 /* ultrastore 14f default addr. */
-#define IO_AHA1 0x334 /* adaptec 1542 default addr. */
-#define IO_BT1 0x334 /* bustek 742a default addr. */
-
- /* 0x340 - 0x36A Open */
-
-#define IO_ASC7 0x36B /* AmiScan addr.grp. 7 */
-#define IO_GSC3 0x370 /* GeniScan GS-4500 addr.grp. 3 */
-#define IO_FD2 0x370 /* secondary base i/o address */
-#define IO_LPT1 0x378 /* Parallel Port #1 */
-
- /* 0x380 - 0x3AA Open */
-
-#define IO_ASC8 0x3AB /* AmiScan addr.grp. 8 */
-#define IO_MDA 0x3B0 /* Monochome Adapter */
-#define IO_LPT3 0x3BC /* Monochome Adapter Printer Port */
#define IO_VGA 0x3C0 /* E/VGA Ports */
#define IO_CGA 0x3D0 /* CGA Ports */
-#define IO_GSC4 0x3E0 /* GeniScan GS-4500 addr.grp. 4 */
-#define IO_COM3 0x3E8 /* COM3 i/o address */
-#define IO_ASC1 0x3EB /* AmiScan addr.grp. 1 */
-#define IO_FD1 0x3F0 /* primary base i/o address */
-#define IO_COM1 0x3F8 /* COM1 i/o address */
+#define IO_MDA 0x3B0 /* Monochome Adapter */
#define IO_ISAEND 0x3FF /* End (actually Max) of I/O Regs */
#endif /* !IO_ISABEGIN */
@@ -138,25 +78,10 @@
#ifndef IO_ISASIZES
#define IO_ISASIZES
-#define IO_ASCSIZE 5 /* AmiScan GI1904-based hand scanner */
#define IO_CGASIZE 12 /* CGA controllers */
-#define IO_COMSIZE 8 /* 8250, 16x50 com controllers */
-#define IO_DMASIZE 16 /* 8237 DMA controllers */
-#define IO_DPGSIZE 32 /* 74LS612 DMA page registers */
-#define IO_FDCSIZE 8 /* Nec765 floppy controllers */
-#define IO_GAMSIZE 16 /* AT compatible game controllers */
-#define IO_GSCSIZE 8 /* GeniScan GS-4500G hand scanner */
-#define IO_ICUSIZE 16 /* 8259A interrupt controllers */
-#define IO_KBDSIZE 16 /* 8042 Keyboard controllers */
-#define IO_LPTSIZE 8 /* LPT controllers, some use only 4 */
#define IO_MDASIZE 12 /* Monochrome display controllers */
#define IO_NPXSIZE 16 /* 80387/80487 NPX registers */
-#define IO_PMPSIZE 2 /* 82347 power management peripheral */
-#define IO_PSMSIZE 5 /* 8042 Keyboard controllers */
-#define IO_RTCSIZE 16 /* CMOS real time clock, NMI control */
-#define IO_TMRSIZE 16 /* 8253 programmable timers */
#define IO_VGASIZE 16 /* VGA controllers */
-#define IO_WDCSIZE 8 /* WD compatible disk controllers */
#endif /* !IO_ISASIZES */
==== //depot/projects/netperf_socket/sys/amd64/isa/isa_dma.c#4 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/isa_dma.c,v 1.18 2004/04/05 21:25:52 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/isa_dma.c,v 1.19 2004/08/16 22:51:13 peter Exp $");
/*
* code to manage AT bus
@@ -103,12 +103,20 @@
{
void *buf;
+ /*
+ * If a DMA channel is shared, both drivers have to call isa_dmainit
+ * since they don't know that the other driver will do it.
+ * Just return if we're already set up good.
+ * XXX: this only works if they agree on the bouncebuf size. This
+ * XXX: is typically the case since they are multiple instances of
+ * XXX: the same driver.
+ */
+ if (dma_bouncebuf[chan] != NULL)
+ return;
+
#ifdef DIAGNOSTIC
if (chan & ~VALID_DMA_MASK)
panic("isa_dmainit: channel out of range");
-
- if (dma_bouncebuf[chan] != NULL)
- panic("isa_dmainit: impossible request");
#endif
dma_bouncebufsize[chan] = bouncebufsize;
==== //depot/projects/netperf_socket/sys/boot/Makefile#4 (text+ko) ====
@@ -1,11 +1,11 @@
-# $FreeBSD: src/sys/boot/Makefile,v 1.23 2004/05/16 00:19:12 cognet Exp $
+# $FreeBSD: src/sys/boot/Makefile,v 1.24 2004/08/16 15:45:24 marius Exp $
.if !defined(NOFORTH)
# Build the add-in FORTH interpreter.
SUBDIR+= ficl
.endif
-# Build OpenFirmware library.
+# Build Open Firmware library.
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
SUBDIR+= ofw
.endif
==== //depot/projects/netperf_socket/sys/boot/ofw/common/main.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/ofw/common/main.c,v 1.6 2004/08/02 03:05:09 grehan Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/ofw/common/main.c,v 1.7 2004/08/16 15:45:24 marius Exp $");
#include <stand.h>
#include "openfirm.h"
@@ -102,7 +102,7 @@
char **bargv;
/*
- * Initalise the OpenFirmware routines by giving them the entry point.
+ * Initalise the Open Firmware routines by giving them the entry point.
*/
OF_init(openfirm);
==== //depot/projects/netperf_socket/sys/boot/ofw/libofw/ofw_console.c#2 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/ofw/libofw/ofw_console.c,v 1.8 2004/01/04 23:27:31 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/ofw/libofw/ofw_console.c,v 1.9 2004/08/16 15:45:25 marius Exp $");
#include <sys/types.h>
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list