PERFORCE change 85891 for review
John Baldwin
jhb at FreeBSD.org
Wed Oct 26 07:44:35 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=85891
Change 85891 by jhb at jhb_slimer on 2005/10/26 14:43:53
IFC @85890.
Affected files ...
.. //depot/projects/smpng/sys/compat/ndis/kern_ndis.c#32 integrate
.. //depot/projects/smpng/sys/compat/ndis/ntoskrnl_var.h#20 integrate
.. //depot/projects/smpng/sys/compat/ndis/subr_ndis.c#32 integrate
.. //depot/projects/smpng/sys/compat/ndis/subr_ntoskrnl.c#33 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpi_cpu.c#35 integrate
.. //depot/projects/smpng/sys/dev/cx/if_cx.c#23 integrate
.. //depot/projects/smpng/sys/dev/cy/cy.c#8 integrate
.. //depot/projects/smpng/sys/dev/mii/brgphy.c#27 integrate
.. //depot/projects/smpng/sys/dev/rc/rc.c#17 integrate
.. //depot/projects/smpng/sys/dev/sab/sab.c#27 integrate
.. //depot/projects/smpng/sys/dev/uart/uart_bus_pci.c#6 integrate
.. //depot/projects/smpng/sys/dev/zs/zs.c#21 integrate
.. //depot/projects/smpng/sys/geom/label/g_label_ntfs.c#3 integrate
.. //depot/projects/smpng/sys/kern/kern_exit.c#102 integrate
.. //depot/projects/smpng/sys/kern/kern_thr.c#28 integrate
.. //depot/projects/smpng/sys/kern/kern_umtx.c#21 integrate
.. //depot/projects/smpng/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#12 integrate
.. //depot/projects/smpng/sys/netgraph/ng_split.h#5 integrate
.. //depot/projects/smpng/sys/netinet/ip_carp.c#14 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_lock.c#30 integrate
.. //depot/projects/smpng/sys/nfsclient/nlminfo.h#3 integrate
.. //depot/projects/smpng/sys/pc98/cbus/sio.c#5 integrate
.. //depot/projects/smpng/sys/sys/lockf.h#6 integrate
.. //depot/projects/smpng/sys/sys/umtx.h#13 integrate
Differences ...
==== //depot/projects/smpng/sys/compat/ndis/kern_ndis.c#32 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.88 2005/10/18 19:52:15 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.89 2005/10/26 06:52:57 wpaul Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1108,8 +1108,6 @@
return(0);
}
-#undef NDIS_REAP_TIMERS
-
int
ndis_halt_nic(arg)
void *arg;
@@ -1117,9 +1115,6 @@
struct ndis_softc *sc;
ndis_handle adapter;
ndis_halt_handler haltfunc;
-#ifdef NDIS_REAP_TIMERS
- ndis_miniport_timer *t, *n;
-#endif
ndis_miniport_block *block;
int empty = 0;
uint8_t irql;
@@ -1127,24 +1122,6 @@
sc = arg;
block = sc->ndis_block;
-#ifdef NDIS_REAP_TIMERS
- /*
- * Drivers are sometimes very lax about cancelling all
- * their timers. Cancel them all ourselves, just to be
- * safe. We must do this before invoking MiniportHalt(),
- * since if we wait until after, the memory in which
- * the timers reside will no longer be valid.
- */
-
- t = sc->ndis_block->nmb_timerlist;
- while (t != NULL) {
- KeCancelTimer(&t->nmt_ktimer);
- n = t;
- t = t->nmt_nexttimer;
- n->nmt_nexttimer = NULL;
- }
- sc->ndis_block->nmb_timerlist = NULL;
-#endif
if (!cold)
KeFlushQueuedDpcs();
==== //depot/projects/smpng/sys/compat/ndis/ntoskrnl_var.h#20 (text+ko) ====
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/ndis/ntoskrnl_var.h,v 1.40 2005/10/21 05:23:20 wpaul Exp $
+ * $FreeBSD: src/sys/compat/ndis/ntoskrnl_var.h,v 1.41 2005/10/26 06:52:57 wpaul Exp $
*/
#ifndef _NTOSKRNL_VAR_H_
@@ -1362,6 +1362,8 @@
extern uint32_t IoConnectInterrupt(kinterrupt **, void *, void *,
kspin_lock *, uint32_t, uint8_t, uint8_t, uint8_t, uint8_t,
uint32_t, uint8_t);
+extern void *MmMapIoSpace(uint64_t, uint32_t, uint32_t);
+extern void MmUnmapIoSpace(void *, size_t);
extern void MmBuildMdlForNonPagedPool(mdl *);
extern void IoDisconnectInterrupt(kinterrupt *);
extern uint32_t IoAllocateDriverObjectExtension(driver_object *,
==== //depot/projects/smpng/sys/compat/ndis/subr_ndis.c#32 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.97 2005/10/24 05:05:09 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.98 2005/10/26 06:52:57 wpaul Exp $");
/*
* This file implements a translation layer between the BSD networking
@@ -1257,8 +1257,6 @@
ndis_timer_function func;
void *ctx;
{
- uint8_t irql;
-
/* Save the driver's funcptr and context */
timer->nmt_timerfunc = func;
@@ -1276,13 +1274,6 @@
ndis_findwrap((funcptr)ndis_timercall), timer);
timer->nmt_ktimer.k_dpc = &timer->nmt_kdpc;
- KeAcquireSpinLock(&timer->nmt_block->nmb_lock, &irql);
-
- timer->nmt_nexttimer = timer->nmt_block->nmb_timerlist;
- timer->nmt_block->nmb_timerlist = timer;
-
- KeReleaseSpinLock(&timer->nmt_block->nmb_lock, irql);
-
return;
}
@@ -1750,25 +1741,12 @@
ndis_physaddr paddr;
uint32_t len;
{
- ndis_miniport_block *block;
- struct ndis_softc *sc;
-
if (adapter == NULL)
return(NDIS_STATUS_FAILURE);
- block = (ndis_miniport_block *)adapter;
- sc = device_get_softc(block->nmb_physdeviceobj->do_devext);
+ *vaddr = MmMapIoSpace(paddr.np_quad, len, 0);
- if (sc->ndis_res_mem != NULL &&
- paddr.np_quad == rman_get_start(sc->ndis_res_mem))
- *vaddr = (void *)rman_get_virtual(sc->ndis_res_mem);
- else if (sc->ndis_res_altmem != NULL &&
- paddr.np_quad == rman_get_start(sc->ndis_res_altmem))
- *vaddr = (void *)rman_get_virtual(sc->ndis_res_altmem);
- else if (sc->ndis_res_am != NULL &&
- paddr.np_quad == rman_get_start(sc->ndis_res_am))
- *vaddr = (void *)rman_get_virtual(sc->ndis_res_am);
- else
+ if (*vaddr == NULL)
return(NDIS_STATUS_FAILURE);
return(NDIS_STATUS_SUCCESS);
@@ -1780,6 +1758,7 @@
void *vaddr;
uint32_t len;
{
+ MmUnmapIoSpace(vaddr, len);
return;
}
==== //depot/projects/smpng/sys/compat/ndis/subr_ntoskrnl.c#33 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.77 2005/10/22 05:15:20 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.78 2005/10/26 06:52:57 wpaul Exp $");
#include <sys/ctype.h>
#include <sys/unistd.h>
@@ -204,6 +204,7 @@
uint8_t, uint32_t, void *, uint32_t, uint32_t);
static void MmUnmapLockedPages(void *, mdl *);
static uint8_t MmIsAddressValid(void *);
+static device_t ntoskrnl_finddev(device_t, uint64_t, struct resource **);
static size_t RtlCompareMemory(const void *, const void *, size_t);
static ndis_status RtlUnicodeStringToInteger(unicode_string *,
uint32_t, uint32_t *);
@@ -2541,6 +2542,116 @@
return(FALSE);
}
+void *
+MmMapIoSpace(paddr, len, cachetype)
+ uint64_t paddr;
+ uint32_t len;
+ uint32_t cachetype;
+{
+ devclass_t nexus_class;
+ device_t *nexus_devs, devp;
+ int nexus_count = 0;
+ device_t matching_dev = NULL;
+ struct resource *res;
+ int i;
+ vm_offset_t v;
+
+ nexus_class = devclass_find("nexus");
+ devclass_get_devices(nexus_class, &nexus_devs, &nexus_count);
+
+ for (i = 0; i < nexus_count; i++) {
+ devp = nexus_devs[i];
+ matching_dev = ntoskrnl_finddev(devp, paddr, &res);
+ if (matching_dev)
+ break;
+ }
+
+ free(nexus_devs, M_TEMP);
+
+ if (matching_dev == NULL)
+ return(NULL);
+
+ v = (vm_offset_t)rman_get_virtual(res);
+ if (paddr > rman_get_start(res))
+ v += paddr - rman_get_start(res);
+
+ return((void *)v);
+}
+
+void
+MmUnmapIoSpace(vaddr, len)
+ void *vaddr;
+ size_t len;
+{
+ return;
+}
+
+
+static device_t
+ntoskrnl_finddev(dev, paddr, res)
+ device_t dev;
+ uint64_t paddr;
+ struct resource **res;
+{
+ device_t *children;
+ device_t matching_dev;
+ int childcnt;
+ struct resource *r;
+ struct resource_list *rl;
+ struct resource_list_entry *rle;
+ uint32_t flags;
+ int i;
+
+ /* We only want devices that have been successfully probed. */
+
+ if (device_is_alive(dev) == FALSE)
+ return(NULL);
+
+ rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev);
+ if (rl != NULL) {
+#if __FreeBSD_version < 600022
+ SLIST_FOREACH(rle, rl, link) {
+#else
+ STAILQ_FOREACH(rle, rl, link) {
+#endif
+ r = rle->res;
+
+ if (r == NULL)
+ continue;
+
+ flags = rman_get_flags(r);
+
+ if (rle->type == SYS_RES_MEMORY &&
+ paddr >= rman_get_start(r) &&
+ paddr <= rman_get_end(r)) {
+ if (!(flags & RF_ACTIVE))
+ bus_activate_resource(dev,
+ SYS_RES_MEMORY, 0, r);
+ *res = r;
+ return(dev);
+ }
+ }
+ }
+
+ /*
+ * If this device has children, do another
+ * level of recursion to inspect them.
+ */
+
+ device_get_children(dev, &children, &childcnt);
+
+ for (i = 0; i < childcnt; i++) {
+ matching_dev = ntoskrnl_finddev(children[i], paddr, res);
+ if (matching_dev != NULL) {
+ free(children, M_TEMP);
+ return(matching_dev);
+ }
+ }
+
+ free(children, M_TEMP);
+ return(NULL);
+}
+
/*
* Workitems are unlike DPCs, in that they run in a user-mode thread
* context rather than at DISPATCH_LEVEL in kernel context. In our
@@ -4053,6 +4164,8 @@
IMPORT_SFUNC(MmUnmapLockedPages, 2),
IMPORT_SFUNC(MmBuildMdlForNonPagedPool, 1),
IMPORT_SFUNC(MmIsAddressValid, 1),
+ IMPORT_SFUNC(MmMapIoSpace, 3 + 1),
+ IMPORT_SFUNC(MmUnmapIoSpace, 2),
IMPORT_SFUNC(KeInitializeSpinLock, 1),
IMPORT_SFUNC(IoIsWdmVersionAvailable, 2),
IMPORT_SFUNC(IoGetDeviceProperty, 5),
==== //depot/projects/smpng/sys/dev/acpica/acpi_cpu.c#35 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.58 2005/09/11 18:39:01 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.59 2005/10/25 21:15:47 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -116,6 +116,7 @@
/* Runtime state. */
static int cpu_cx_count; /* Number of valid states */
static int cpu_non_c3; /* Index of lowest non-C3 state. */
+static int cpu_short_slp; /* Count of < 1us sleeps. */
static u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */
/* Values for sysctl. */
@@ -599,7 +600,7 @@
acpi_PkgInt32(pkg, 2, &cx_ptr->trans_lat) != 0 ||
acpi_PkgInt32(pkg, 3, &cx_ptr->power) != 0) {
- device_printf(sc->cpu_dev, "Skipping invalid Cx state package\n");
+ device_printf(sc->cpu_dev, "skipping invalid Cx state package\n");
continue;
}
@@ -779,12 +780,32 @@
* the length of our last sleep.
*/
cx_next_idx = cpu_cx_lowest;
- if (sc->cpu_prev_sleep < 100)
+ if (sc->cpu_prev_sleep < 100) {
+ /*
+ * If we sleep too short all the time, this system may not implement
+ * C2/3 correctly (i.e. reads return immediately). In this case,
+ * back off and use the next higher level.
+ */
+ if (sc->cpu_prev_sleep <= 1) {
+ cpu_short_slp++;
+ if (cpu_short_slp == 1000 && cpu_cx_lowest != 0) {
+ if (cpu_non_c3 == cpu_cx_lowest && cpu_non_c3 != 0)
+ cpu_non_c3--;
+ cpu_cx_lowest--;
+ cpu_short_slp = 0;
+ device_printf(sc->cpu_dev,
+ "too many short sleeps, backing off to C%d\n",
+ cpu_cx_lowest + 1);
+ }
+ } else
+ cpu_short_slp = 0;
+
for (i = cpu_cx_lowest; i >= 0; i--)
if (sc->cpu_cx_states[i].trans_lat <= sc->cpu_prev_sleep) {
cx_next_idx = i;
break;
}
+ }
/*
* Check for bus master activity. If there was activity, clear
@@ -855,11 +876,11 @@
AcpiSetRegister(ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_DO_NOT_LOCK);
AcpiSetRegister(ACPI_BITREG_BUS_MASTER_RLD, 0, ACPI_MTX_DO_NOT_LOCK);
}
+ ACPI_ENABLE_IRQS();
/* Find the actual time asleep in microseconds, minus overhead. */
end_time = acpi_TimerDelta(end_time, start_time);
sc->cpu_prev_sleep = PM_USEC(end_time) - cx_next->trans_lat;
- ACPI_ENABLE_IRQS();
}
/*
==== //depot/projects/smpng/sys/dev/cx/if_cx.c#23 (text+ko) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cx/if_cx.c,v 1.49 2005/10/16 20:22:54 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cx/if_cx.c,v 1.50 2005/10/26 06:44:58 ru Exp $");
#include <sys/param.h>
@@ -2547,7 +2547,7 @@
callout_init (&timeout_handle, cx_mpsafenet?CALLOUT_MPSAFE:0);
callout_reset (&timeout_handle, hz*5, cx_timeout, 0);
/* Software interrupt. */
- swi_add(&tty_ithd, "cx", cx_softintr, NULL, SWI_TTY,
+ swi_add(&tty_intr_event, "cx", cx_softintr, NULL, SWI_TTY,
(cx_mpsafenet?INTR_MPSAFE:0), &cx_fast_ih);
break;
case MOD_UNLOAD:
@@ -2560,7 +2560,7 @@
/* If we were wait it than it reasserted now, just stop it. */
if (!callout_drain (&timeout_handle))
callout_stop (&timeout_handle);
- ithread_remove_handler (cx_fast_ih);
+ intr_event_remove_handler (cx_fast_ih);
--load_count;
break;
case MOD_SHUTDOWN:
==== //depot/projects/smpng/sys/dev/cy/cy.c#8 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cy/cy.c,v 1.161 2005/10/16 20:22:54 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cy/cy.c,v 1.162 2005/10/26 06:40:21 ru Exp $");
#include "opt_compat.h"
@@ -428,9 +428,9 @@
splx(s);
if (cy_fast_ih == NULL) {
- swi_add(&tty_ithd, "cy", cypoll, NULL, SWI_TTY, 0,
+ swi_add(&tty_intr_event, "cy", cypoll, NULL, SWI_TTY, 0,
&cy_fast_ih);
- swi_add(&clk_ithd, "cy", cypoll, NULL, SWI_CLOCK, 0,
+ swi_add(&clk_intr_event, "cy", cypoll, NULL, SWI_CLOCK, 0,
&cy_slow_ih);
}
ttycreate(tp, TS_CALLOUT, "c%r%r",
==== //depot/projects/smpng/sys/dev/mii/brgphy.c#27 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mii/brgphy.c,v 1.36 2005/10/16 05:29:14 grehan Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mii/brgphy.c,v 1.37 2005/10/26 00:55:22 grehan Exp $");
/*
* Driver for the Broadcom BCR5400 1000baseTX PHY. Speed is always
==== //depot/projects/smpng/sys/dev/rc/rc.c#17 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/rc/rc.c,v 1.100 2005/10/16 20:22:54 phk Exp $
+ * $FreeBSD: src/sys/dev/rc/rc.c,v 1.101 2005/10/26 06:40:22 ru Exp $
*/
/*
@@ -311,7 +311,7 @@
goto fail;
}
- swi_add(&tty_ithd, "tty:rc", rc_pollcard, sc, SWI_TTY, 0,
+ swi_add(&tty_intr_event, "tty:rc", rc_pollcard, sc, SWI_TTY, 0,
&sc->sc_swicookie);
return (0);
@@ -336,7 +336,7 @@
error = bus_teardown_intr(dev, sc->sc_irq, sc->sc_hwicookie);
if (error)
device_printf(dev, "failed to deregister interrupt handler\n");
- ithread_remove_handler(sc->sc_swicookie);
+ intr_event_remove_handler(sc->sc_swicookie);
rc_release_resources(dev);
return (0);
==== //depot/projects/smpng/sys/dev/sab/sab.c#27 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sab/sab.c,v 1.40 2005/10/16 20:22:55 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sab/sab.c,v 1.41 2005/10/26 06:44:58 ru Exp $");
/*
* SAB82532 Dual UART driver
@@ -321,7 +321,7 @@
for (i = 0; i < SAB_NCHAN; i++)
sc->sc_child[i] = device_get_softc(child[i]);
- swi_add(&tty_ithd, "tty:sab", sab_softintr, sc, SWI_TTY,
+ swi_add(&tty_intr_event, "tty:sab", sab_softintr, sc, SWI_TTY,
INTR_TYPE_TTY, &sc->sc_softih);
if (sabtty_cons != NULL) {
==== //depot/projects/smpng/sys/dev/uart/uart_bus_pci.c#6 (text+ko) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_pci.c,v 1.5 2005/01/06 01:43:26 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_pci.c,v 1.6 2005/10/26 01:49:11 marcel Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -63,16 +63,11 @@
};
static struct pci_id pci_ns8250_ids[] = {
- { 0x100812b9, "3COM PCI FaxModem", 0x10 },
- { 0x2000131f, "CyberSerial (1-port) 16550", 0x10 },
- { 0x01101407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
- { 0x01111407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
- { 0x048011c1, "Lucent kermit based PCI Modem", 0x14 },
- { 0x95211415, "Oxford Semiconductor PCI Dual Port Serial", 0x10 },
- { 0x7101135e, "SeaLevel Ultra 530.PCI Single Port Serial", 0x18 },
- { 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 },
- { 0x0103115d, "Xircom Cardbus modem", 0x10 },
- { 0x98459710, "Netmos Nm9845 PCI Bridge with Dual UART", 0x10 },
+ { 0x048011c1, "Actiontec 56K PCI Master", 0x14 },
+ { 0x01101407, "Lava Computers serial port", 0x10 },
+ { 0x01111407, "Lava Computers serial port", 0x10 },
+ { 0x9051deaf, "Middle Digital, Inc. Weasel serial port", 0x10 },
+ { 0x950b1415, "Oxford Semiconductor OXCB950 UART", 0x10 },
{ 0x01c0135c, "Quatech SSCLP-200/300", 0x18
/*
* NB: You must mount the "SPAD" jumper to correctly detect
@@ -80,6 +75,16 @@
* we do not support the extra registers on the Quatech.
*/
},
+ { 0x7101135e, "SeaLevel Ultra 530.PCI Single Port Serial", 0x18 },
+ { 0x1000131f, "SIIG Cyber Serial PCI 16C550 (10x family)", 0x18 },
+ { 0x1001131f, "SIIG Cyber Serial PCI 16C650 (10x family)", 0x18 },
+ { 0x1002131f, "SIIG Cyber Serial PCI 16C850 (10x family)", 0x18 },
+ { 0x2000131f, "SIIG Cyber Serial PCI 16C550 (20x family)", 0x10 },
+ { 0x2001131f, "SIIG Cyber Serial PCI 16C650 (20x family)", 0x10 },
+ { 0x2002131f, "SIIG Cyber Serial PCI 16C850 (20x family)", 0x10 },
+ { 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 },
+ { 0x100812b9, "US Robotics (3Com) 3CP5609 PCI 16550 Modem", 0x10 },
+ { 0x0103115d, "Xircom Cardbus modem", 0x10 },
{ 0x00000000, NULL, 0 }
};
==== //depot/projects/smpng/sys/dev/zs/zs.c#21 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/zs/zs.c,v 1.31 2005/10/16 20:58:22 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/zs/zs.c,v 1.32 2005/10/25 21:31:22 grehan Exp $");
/*-
* Copyright (c) 2003 Jake Burkholder.
* All rights reserved.
@@ -183,7 +183,7 @@
for (i = 0; i < ZS_NCHAN; i++)
sc->sc_child[i] = device_get_softc(child[i]);
- swi_add(&tty_ithd, "tty:zs", zs_softintr, sc, SWI_TTY,
+ swi_add(&tty_intr_event, "tty:zs", zs_softintr, sc, SWI_TTY,
INTR_TYPE_TTY, &sc->sc_softih);
ZS_WRITE_REG(sc->sc_child[0], 2, sc->sc_child[0]->sc_creg[2]);
==== //depot/projects/smpng/sys/geom/label/g_label_ntfs.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/label/g_label_ntfs.c,v 1.2 2005/08/28 00:14:21 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/label/g_label_ntfs.c,v 1.3 2005/10/26 03:24:28 takawata Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -75,6 +75,12 @@
filerecp = g_read_data(cp, voloff, recsize, &error);
fr = (struct filerec *)filerecp;
+
+ if(fr->fr_fixup.fh_magic != NTFS_FILEMAGIC){
+ label[0] = 0;
+ goto done;
+ }
+
for (ap = filerecp + fr->fr_attroff; atr = (struct attr *)ap, atr->a_hdr.a_type != -1; ap += atr->a_hdr.reclen) {
if (atr->a_hdr.a_type == NTFS_A_VOLUMENAME) {
if(atr->a_r.a_datalen >= size *2){
==== //depot/projects/smpng/sys/kern/kern_exit.c#102 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.268 2005/10/23 12:19:08 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.269 2005/10/26 07:18:36 glebius Exp $");
#include "opt_compat.h"
#include "opt_ktrace.h"
@@ -82,6 +82,9 @@
/* Required to be non-static for SysVR4 emulator */
MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status");
+/* Hook for NFS teardown procedure. */
+void (*nlminfo_release_p)(struct proc *p);
+
/*
* exit --
* Death of process.
@@ -234,6 +237,12 @@
funsetownlst(&p->p_sigiolst);
/*
+ * If this process has an nlminfo data area (for lockd), release it
+ */
+ if (nlminfo_release_p != NULL && p->p_nlminfo != NULL)
+ (*nlminfo_release_p)(p);
+
+ /*
* Close open files and release open-file table.
* This may block!
*/
==== //depot/projects/smpng/sys/kern/kern_thr.c#28 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.35 2005/10/14 12:43:46 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.36 2005/10/26 06:55:46 davidxu Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -42,6 +42,8 @@
#include <sys/signalvar.h>
#include <sys/ucontext.h>
#include <sys/thr.h>
+#include <sys/umtx.h>
+#include <sys/limits.h>
#include <machine/frame.h>
@@ -275,8 +277,10 @@
p = td->td_proc;
/* Signal userland that it can free the stack. */
- if ((void *)uap->state != NULL)
+ if ((void *)uap->state != NULL) {
suword((void *)uap->state, 1);
+ kern_umtx_wake(td, uap->state, INT_MAX);
+ }
PROC_LOCK(p);
sigqueue_flush(&td->td_sigqueue);
==== //depot/projects/smpng/sys/kern/kern_umtx.c#21 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.33 2005/03/05 09:15:03 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.34 2005/10/26 06:55:46 davidxu Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -687,8 +687,8 @@
return (error);
}
-static int
-do_wake(struct thread *td, void *uaddr, int n_wake)
+int
+kern_umtx_wake(struct thread *td, void *uaddr, int n_wake)
{
struct umtx_key key;
int ret;
@@ -762,7 +762,7 @@
error = do_wait(td, uap->umtx, uap->id, ts);
break;
case UMTX_OP_WAKE:
- error = do_wake(td, uap->umtx, uap->id);
+ error = kern_umtx_wake(td, uap->umtx, uap->id);
break;
default:
error = EINVAL;
==== //depot/projects/smpng/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#12 (text+ko) ====
@@ -28,7 +28,7 @@
* SUCH DAMAGE.
*
* $Id: ng_bt3c_pccard.c,v 1.5 2003/04/01 18:15:21 max Exp $
- * $FreeBSD: src/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c,v 1.15 2005/09/22 19:15:33 emax Exp $
+ * $FreeBSD: src/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c,v 1.16 2005/10/26 06:17:27 ru Exp $
*
* XXX XXX XX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
*
@@ -645,7 +645,7 @@
/* Attach handler to TTY SWI thread */
sc->ith = NULL;
- if (swi_add(&tty_ithd, device_get_nameunit(dev),
+ if (swi_add(&tty_intr_event, device_get_nameunit(dev),
bt3c_swi_intr, sc, SWI_TTY, 0, &sc->ith) < 0) {
device_printf(dev, "Could not setup SWI ISR\n");
goto bad;
@@ -682,7 +682,7 @@
return (0);
bad:
if (sc->ith != NULL) {
- ithread_remove_handler(sc->ith);
+ intr_event_remove_handler(sc->ith);
sc->ith = NULL;
}
@@ -724,7 +724,7 @@
device_set_softc(dev, NULL);
- ithread_remove_handler(sc->ith);
+ intr_event_remove_handler(sc->ith);
sc->ith = NULL;
bus_teardown_intr(dev, sc->irq, sc->irq_cookie);
==== //depot/projects/smpng/sys/netgraph/ng_split.h#5 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netgraph/ng_split.h,v 1.4 2005/01/07 01:45:39 imp Exp $
+ * $FreeBSD: src/sys/netgraph/ng_split.h,v 1.5 2005/10/25 20:56:12 ru Exp $
*
*/
@@ -35,7 +35,7 @@
/* Node type name and magic cookie */
#define NG_SPLIT_NODE_TYPE "split"
-#define NGM_NG_SPLIT_COOKIE 949409402
+#define NGM_SPLIT_COOKIE 949409402
/* My hook names */
#define NG_SPLIT_HOOK_MIXED "mixed" /* Mixed stream (in/out) */
==== //depot/projects/smpng/sys/netinet/ip_carp.c#14 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet/ip_carp.c,v 1.33 2005/10/22 14:54:02 mlaier Exp $ */
+/* $FreeBSD: src/sys/netinet/ip_carp.c,v 1.34 2005/10/26 05:57:35 yar Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -380,7 +380,7 @@
ifp->if_softc = sc;
if_initname(ifp, CARP_IFNAME, unit);
ifp->if_mtu = ETHERMTU;
- ifp->if_flags = 0;
+ ifp->if_flags = IFF_LOOPBACK;
ifp->if_ioctl = carp_ioctl;
ifp->if_output = carp_looutput;
ifp->if_start = carp_start;
==== //depot/projects/smpng/sys/nfsclient/nfs_lock.c#30 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_lock.c,v 1.40 2004/12/06 08:31:32 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_lock.c,v 1.41 2005/10/26 07:18:36 glebius Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -62,9 +62,13 @@
#include <nfsclient/nfs_lock.h>
#include <nfsclient/nlminfo.h>
+extern void (*nlminfo_release_p)(struct proc *p);
+
MALLOC_DEFINE(M_NFSLOCK, "NFS lock", "NFS lock request");
+MALLOC_DEFINE(M_NLMINFO, "nlminfo", "NFS lock process structure");
static int nfslockdans(struct thread *td, struct lockd_ans *ansp);
+static void nlminfo_release(struct proc *p);
/*
* --------------------------------------------------------------------
* A miniature device driver which the userland uses to talk to us.
@@ -194,6 +198,7 @@
printf("nfslock: pseudo-device\n");
mtx_init(&nfslock_mtx, "nfslock", NULL, MTX_DEF);
TAILQ_INIT(&nfslock_list);
+ nlminfo_release_p = nlminfo_release;
nfslock_dev = make_dev(&nfslock_cdevsw, 0,
UID_ROOT, GID_KMEM, 0600, _PATH_NFSLCKDEV);
return (0);
@@ -259,7 +264,7 @@
*/
if (p->p_nlminfo == NULL) {
MALLOC(p->p_nlminfo, struct nlminfo *,
- sizeof(struct nlminfo), M_LOCKF, M_WAITOK | M_ZERO);
+ sizeof(struct nlminfo), M_NLMINFO, M_WAITOK | M_ZERO);
p->p_nlminfo->pid_start = p->p_stats->p_start;
timevaladd(&p->p_nlminfo->pid_start, &boottime);
}
@@ -381,3 +386,12 @@
return (0);
}
+/*
+ * Free nlminfo attached to process.
+ */
+void
+nlminfo_release(struct proc *p)
+{
+ free(p->p_nlminfo, M_NLMINFO);
+ p->p_nlminfo = NULL;
+}
==== //depot/projects/smpng/sys/nfsclient/nlminfo.h#3 (text+ko) ====
@@ -25,7 +25,7 @@
* SUCH DAMAGE.
*
* from BSDI nlminfo.h,v 2.1 1998/03/18 01:30:38 don Exp
- * $FreeBSD: src/sys/nfsclient/nlminfo.h,v 1.2 2001/09/18 23:31:53 peter Exp $
+ * $FreeBSD: src/sys/nfsclient/nlminfo.h,v 1.3 2005/10/26 07:18:36 glebius Exp $
*/
/*
@@ -40,5 +40,3 @@
int getlk_pid;
struct timeval pid_start; /* process starting time */
};
-
-extern void nlminfo_release(struct proc *p);
==== //depot/projects/smpng/sys/pc98/cbus/sio.c#5 (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/pc98/cbus/sio.c,v 1.237 2005/10/16 20:22:56 phk Exp $
+ * $FreeBSD: src/sys/pc98/cbus/sio.c,v 1.238 2005/10/26 06:44:59 ru Exp $
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* from: i386/isa sio.c,v 1.234
*/
@@ -1718,9 +1718,9 @@
printf("\n");
if (sio_fast_ih == NULL) {
- swi_add(&tty_ithd, "sio", siopoll, NULL, SWI_TTY, 0,
+ swi_add(&tty_intr_event, "sio", siopoll, NULL, SWI_TTY, 0,
&sio_fast_ih);
- swi_add(&clk_ithd, "sio", siopoll, NULL, SWI_CLOCK, 0,
+ swi_add(&clk_intr_event, "sio", siopoll, NULL, SWI_CLOCK, 0,
&sio_slow_ih);
}
==== //depot/projects/smpng/sys/sys/lockf.h#6 (text+ko) ====
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* @(#)lockf.h 8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/sys/lockf.h,v 1.18 2005/01/25 10:15:25 jeff Exp $
+ * $FreeBSD: src/sys/sys/lockf.h,v 1.19 2005/10/26 07:18:37 glebius Exp $
*/
#ifndef _SYS_LOCKF_H_
@@ -40,10 +40,6 @@
struct vop_advlock_args;
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_LOCKF);
-#endif
-
/*
* The lockf structure is a kernel structure which contains the information
* associated with a byte range lock. The lockf structures are linked into
==== //depot/projects/smpng/sys/sys/umtx.h#13 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/sys/umtx.h,v 1.16 2005/03/05 09:15:03 davidxu Exp $
+ * $FreeBSD: src/sys/sys/umtx.h,v 1.17 2005/10/26 06:55:46 davidxu Exp $
*
*/
@@ -135,6 +135,8 @@
struct umtx_q *umtxq_alloc(void);
void umtxq_free(struct umtx_q *);
+struct thread;
+int kern_umtx_wake(struct thread *td, void *uaddr, int n_wake);
#endif /* !_KERNEL */
#endif /* !_SYS_UMTX_H_ */
More information about the p4-projects
mailing list