diff -ur /home/refugee/freebsd/current/src/sys/alpha/alpha/machdep.c repl/alpha/alpha/machdep.c --- /home/refugee/freebsd/current/src/sys/alpha/alpha/machdep.c Wed Dec 8 20:39:47 2004 +++ repl/alpha/alpha/machdep.c Tue Dec 14 00:49:39 2004 @@ -163,10 +163,10 @@ vm_offset_t proc0kstack; char machine[] = "alpha"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); +SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "", &Giant); static char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, ""); +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "", &Giant); #ifdef DDB extern vm_offset_t ksym_start, ksym_end; @@ -177,13 +177,13 @@ int alpha_unaligned_sigbus = 0; /* don't SIGBUS on fixed-up accesses */ SYSCTL_INT(_machdep, CPU_UNALIGNED_PRINT, unaligned_print, - CTLFLAG_RW, &alpha_unaligned_print, 0, ""); + CTLFLAG_RW, &alpha_unaligned_print, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_UNALIGNED_FIX, unaligned_fix, - CTLFLAG_RW, &alpha_unaligned_fix, 0, ""); + CTLFLAG_RW, &alpha_unaligned_fix, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_UNALIGNED_SIGBUS, unaligned_sigbus, - CTLFLAG_RW, &alpha_unaligned_sigbus, 0, ""); + CTLFLAG_RW, &alpha_unaligned_sigbus, 0, "", &Giant); static void cpu_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) @@ -2233,20 +2233,20 @@ { int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, - req); + req, &Giant); if (!error && req->newptr) resettodr(); return (error); } SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "", &Giant); SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); + CTLFLAG_RW, &disable_rtc_set, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "", &Giant); void alpha_fpstate_check(struct thread *td) diff -ur /home/refugee/freebsd/current/src/sys/alpha/pci/pcibus.c repl/alpha/pci/pcibus.c --- /home/refugee/freebsd/current/src/sys/alpha/pci/pcibus.c Sun Oct 31 04:50:16 2004 +++ repl/alpha/pci/pcibus.c Tue Dec 14 00:49:39 2004 @@ -64,19 +64,19 @@ long chipset_dense = 0; long chipset_hae_mask = 0; -SYSCTL_NODE(_hw, OID_AUTO, chipset, CTLFLAG_RW, 0, "PCI chipset information"); +SYSCTL_NODE(_hw, OID_AUTO, chipset, CTLFLAG_RW, 0, "PCI chipset information", NULL); SYSCTL_STRING(_hw_chipset, OID_AUTO, type, CTLFLAG_RD, chipset_type, 0, - "PCI chipset type"); + "PCI chipset type", &Giant); SYSCTL_INT(_hw_chipset, OID_AUTO, bwx, CTLFLAG_RD, &chipset_bwx, 0, - "PCI chipset supports BWX access"); + "PCI chipset supports BWX access", &Giant); SYSCTL_LONG(_hw_chipset, OID_AUTO, ports, CTLFLAG_RD, &chipset_ports, 0, - "PCI chipset port address"); + "PCI chipset port address", &Giant); SYSCTL_LONG(_hw_chipset, OID_AUTO, memory, CTLFLAG_RD, &chipset_memory, 0, - "PCI chipset memory address"); + "PCI chipset memory address", &Giant); SYSCTL_LONG(_hw_chipset, OID_AUTO, dense, CTLFLAG_RD, &chipset_dense, 0, - "PCI chipset dense memory address"); + "PCI chipset dense memory address", &Giant); SYSCTL_LONG(_hw_chipset, OID_AUTO, hae_mask, CTLFLAG_RD, &chipset_hae_mask, 0, - "PCI chipset mask for HAE register"); + "PCI chipset mask for HAE register", &Giant); int alpha_pci_route_interrupt(device_t bus, device_t dev, int pin) diff -ur /home/refugee/freebsd/current/src/sys/amd64/acpica/OsdEnvironment.c repl/amd64/acpica/OsdEnvironment.c --- /home/refugee/freebsd/current/src/sys/amd64/acpica/OsdEnvironment.c Sun Oct 31 04:53:01 2004 +++ repl/amd64/acpica/OsdEnvironment.c Tue Dec 14 00:49:58 2004 @@ -40,7 +40,7 @@ static u_long amd64_acpi_root; SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &amd64_acpi_root, 0, - "The physical address of the RSDP"); + "The physical address of the RSDP", &Giant); ACPI_STATUS AcpiOsInitialize(void) diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/amd64_mem.c repl/amd64/amd64/amd64_mem.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/amd64_mem.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/amd64_mem.c Tue Dec 14 00:49:58 2004 @@ -65,7 +65,7 @@ static int mtrrs_disabled; TUNABLE_INT("machdep.disable_mtrrs", &mtrrs_disabled); SYSCTL_INT(_machdep, OID_AUTO, disable_mtrrs, CTLFLAG_RDTUN, - &mtrrs_disabled, 0, "Disable amd64 MTRRs."); + &mtrrs_disabled, 0, "Disable amd64 MTRRs.", &Giant); static void amd64_mrinit(struct mem_range_softc *sc); static int amd64_mrset(struct mem_range_softc *sc, diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/busdma_machdep.c repl/amd64/amd64/busdma_machdep.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/busdma_machdep.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/amd64/busdma_machdep.c Tue Dec 14 00:49:58 2004 @@ -107,9 +107,9 @@ static STAILQ_HEAD(, bounce_zone) bounce_zone_list; static bus_addr_t bounce_lowaddr = BUS_SPACE_MAXADDR; -SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters", NULL); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, - "Total bounce pages"); + "Total bounce pages", &Giant); struct bus_dmamap { struct bp_list bpages; @@ -903,13 +903,13 @@ static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) { - return (&bz->sysctl_tree); + return (&bz->sysctl_tree, &Giant); } static struct sysctl_oid * busdma_sysctl_tree_top(struct bounce_zone *bz) { - return (bz->sysctl_tree_top); + return (bz->sysctl_tree_top, &Giant); } static int @@ -944,48 +944,48 @@ STAILQ_INSERT_TAIL(&bounce_zone_list, bz, links); dmat->bounce_zone = bz; - sysctl_ctx_init(&bz->sysctl_tree); + sysctl_ctx_init(&bz->sysctl_tree, &Giant); bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid, - CTLFLAG_RD, 0, ""); + CTLFLAG_RD, 0, "", &Giant); if (bz->sysctl_tree_top == NULL) { - sysctl_ctx_free(&bz->sysctl_tree); + sysctl_ctx_free(&bz->sysctl_tree, &Giant); return (0); /* XXX error code? */ } SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_bpages", CTLFLAG_RD, &bz->total_bpages, 0, - "Totoal bounce pages"); + "Totoal bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "free_bpages", CTLFLAG_RD, &bz->free_bpages, 0, - "Free bounce pages"); + "Free bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "reserved_bpages", CTLFLAG_RD, &bz->reserved_bpages, 0, - "Reserved bounce pages"); + "Reserved bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "active_bpages", CTLFLAG_RD, &bz->active_bpages, 0, - "Active bounce pages"); + "Active bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_bounced", CTLFLAG_RD, &bz->total_bounced, 0, - "Total bounce requests"); + "Total bounce requests", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_deferred", CTLFLAG_RD, &bz->total_deferred, 0, - "Total bounce requests that were deferred"); + "Total bounce requests that were deferred", &Giant); SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); + "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, "", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, 0, "", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "boundary", CTLFLAG_RD, &bz->boundary, 0, ""); + "boundary", CTLFLAG_RD, &bz->boundary, 0, "", &Giant); return (0); } diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/fpu.c repl/amd64/amd64/fpu.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/fpu.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/amd64/fpu.c Tue Dec 14 00:49:58 2004 @@ -99,7 +99,7 @@ int hw_float = 1; SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, - "Floatingpoint instructions executed in hardware"); + "Floatingpoint instructions executed in hardware", &Giant); static struct savefpu fpu_cleanstate; static bool_t fpu_cleanstate_ready; diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/identcpu.c repl/amd64/amd64/identcpu.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/identcpu.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/identcpu.c Tue Dec 14 00:49:58 2004 @@ -75,15 +75,15 @@ int cpu_class; char machine[] = "amd64"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, - machine, 0, "Machine class"); + machine, 0, "Machine class", &Giant); static char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, - cpu_model, 0, "Machine model"); + cpu_model, 0, "Machine model", &Giant); static int hw_clockrate; SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, - &hw_clockrate, 0, "CPU instruction clock rate"); + &hw_clockrate, 0, "CPU instruction clock rate", &Giant); static char cpu_brand[48]; diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/initcpu.c repl/amd64/amd64/initcpu.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/initcpu.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/initcpu.c Tue Dec 14 00:49:58 2004 @@ -46,7 +46,7 @@ static int hw_instruction_sse; SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD, - &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU"); + &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU", &Giant); int cpu; /* Are we 386, 386sx, 486, etc? */ u_int cpu_feature; /* Feature flags */ diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/machdep.c repl/amd64/amd64/machdep.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/machdep.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/amd64/machdep.c Tue Dec 14 00:49:58 2004 @@ -477,7 +477,7 @@ */ static int cpu_idle_hlt = 1; SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, - &cpu_idle_hlt, 0, "Idle loop HLT enable"); + &cpu_idle_hlt, 0, "Idle loop HLT enable", &Giant); static void cpu_idle_default(void) @@ -598,20 +598,20 @@ { int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, - req); + req, &Giant); if (!error && req->newptr) resettodr(); return (error); } SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "", &Giant); SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); + CTLFLAG_RW, &disable_rtc_set, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "", &Giant); /* * Initialize 386 and configure to run kernel diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/mp_machdep.c repl/amd64/amd64/mp_machdep.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/mp_machdep.c Sun Nov 14 03:55:57 2004 +++ repl/amd64/amd64/mp_machdep.c Tue Dec 14 00:49:58 2004 @@ -1016,7 +1016,7 @@ int error; mask = hlt_cpus_mask; - error = sysctl_handle_int(oidp, &mask, 0, req); + error = sysctl_handle_int(oidp, &mask, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -1033,7 +1033,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, hlt_cpus, CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_hlt_cpus, "IU", - "Bitmap of CPUs to halt. 101 (binary) will halt CPUs 0 and 2."); + "Bitmap of CPUs to halt. 101 (binary) will halt CPUs 0 and 2.", &Giant); static int sysctl_hlt_logical_cpus(SYSCTL_HANDLER_ARGS) @@ -1041,7 +1041,7 @@ int disable, error; disable = hlt_logical_cpus; - error = sysctl_handle_int(oidp, &disable, 0, req); + error = sysctl_handle_int(oidp, &disable, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -1064,7 +1064,7 @@ if (logical_cpus_mask != 0) { TUNABLE_INT_FETCH("machdep.hlt_logical_cpus", &hlt_logical_cpus); - sysctl_ctx_init(&logical_cpu_clist); + sysctl_ctx_init(&logical_cpu_clist, &Giant); SYSCTL_ADD_PROC(&logical_cpu_clist, SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO, "hlt_logical_cpus", CTLTYPE_INT|CTLFLAG_RW, 0, 0, @@ -1072,7 +1072,7 @@ SYSCTL_ADD_UINT(&logical_cpu_clist, SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO, "logical_cpus_mask", CTLTYPE_INT|CTLFLAG_RD, - &logical_cpus_mask, 0, ""); + &logical_cpus_mask, 0, "", &Giant); if (hlt_logical_cpus) hlt_cpus_mask |= logical_cpus_mask; diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/mp_watchdog.c repl/amd64/amd64/mp_watchdog.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/mp_watchdog.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/mp_watchdog.c Tue Dec 14 00:49:58 2004 @@ -69,7 +69,7 @@ static int watchdog_nmi = 1; SYSCTL_INT(_debug, OID_AUTO, watchdog_nmi, CTLFLAG_RW, &watchdog_nmi, 0, - "IPI the boot processor with an NMI to enter the debugger"); + "IPI the boot processor with an NMI to enter the debugger", &Giant); static struct callout watchdog_callout; @@ -118,7 +118,7 @@ int error, temp; temp = watchdog_cpu; - error = sysctl_handle_int(oidp, &temp, 0, req); + error = sysctl_handle_int(oidp, &temp, 0, req, &Giant); if (error) return (error); @@ -142,7 +142,7 @@ return (0); } SYSCTL_PROC(_debug, OID_AUTO, watchdog, CTLTYPE_INT|CTLFLAG_RW, 0, 0, - sysctl_watchdog, "IU", ""); + sysctl_watchdog, "IU", "", &Giant); /* * A badly behaved sysctl that leaks the sched lock when written to. Then @@ -156,7 +156,7 @@ int error, temp; temp = 0; - error = sysctl_handle_int(oidp, &temp, 0, req); + error = sysctl_handle_int(oidp, &temp, 0, req, &Giant); if (error) return (error); @@ -170,7 +170,7 @@ return (0); } SYSCTL_PROC(_debug, OID_AUTO, leak_schedlock, CTLTYPE_INT|CTLFLAG_RW, 0, 0, - sysctl_leak_schedlock, "IU", ""); + sysctl_leak_schedlock, "IU", "", &Giant); /* * Drop into the debugger by sending an IPI NMI to the boot processor. diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/pmap.c repl/amd64/amd64/pmap.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/pmap.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/amd64/pmap.c Tue Dec 14 00:49:58 2004 @@ -1321,20 +1321,20 @@ { unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE; - return sysctl_handle_long(oidp, &ksize, 0, req); + return sysctl_handle_long(oidp, &ksize, 0, req, &Giant); } SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_size, "IU", "Size of KVM"); + 0, 0, kvm_size, "IU", "Size of KVM", &Giant); static int kvm_free(SYSCTL_HANDLER_ARGS) { unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end; - return sysctl_handle_long(oidp, &kfree, 0, req); + return sysctl_handle_long(oidp, &kfree, 0, req, &Giant); } SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_free, "IU", "Amount of KVM free"); + 0, 0, kvm_free, "IU", "Amount of KVM free", &Giant); /* * grow the number of kernel page table entries, if needed diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/prof_machdep.c repl/amd64/amd64/prof_machdep.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/prof_machdep.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/prof_machdep.c Tue Dec 14 00:49:58 2004 @@ -290,7 +290,7 @@ clock += pmc.pmc_event; } #endif - error = sysctl_handle_opaque(oidp, &clock, sizeof clock, req); + error = sysctl_handle_opaque(oidp, &clock, sizeof clock, req, &Giant); if (error == 0 && req->newptr != NULL) { #if defined(PERFMON) && defined(I586_PMC_GUPROF) if (clock >= CPUTIME_CLOCK_I586_PMC) { @@ -316,7 +316,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", ""); + 0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", "", &Giant); /* * The start and stop routines need not be here since we turn off profiling diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/trap.c repl/amd64/amd64/trap.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/trap.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/trap.c Tue Dec 14 00:49:58 2004 @@ -131,11 +131,11 @@ #ifdef KDB static int kdb_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RW, - &kdb_on_nmi, 0, "Go to KDB on NMI"); + &kdb_on_nmi, 0, "Go to KDB on NMI", &Giant); #endif static int panic_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RW, - &panic_on_nmi, 0, "Panic on NMI"); + &panic_on_nmi, 0, "Panic on NMI", &Giant); #ifdef WITNESS extern char *syscallnames[]; diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/tsc.c repl/amd64/amd64/tsc.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/tsc.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/tsc.c Tue Dec 14 00:49:58 2004 @@ -47,7 +47,7 @@ #ifdef SMP static int smp_tsc; SYSCTL_INT(_kern_timecounter, OID_AUTO, smp_tsc, CTLFLAG_RDTUN, &smp_tsc, 0, - "Indicates whether the TSC is safe to use in SMP mode"); + "Indicates whether the TSC is safe to use in SMP mode", &Giant); TUNABLE_INT("kern.timecounter.smp_tsc", &smp_tsc); #endif @@ -112,7 +112,7 @@ if (tsc_timecounter.tc_frequency == 0) return (EOPNOTSUPP); freq = tsc_freq; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; @@ -121,7 +121,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_LONG | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", "", &Giant); static unsigned tsc_get_timecount(struct timecounter *tc) diff -ur /home/refugee/freebsd/current/src/sys/amd64/isa/clock.c repl/amd64/isa/clock.c --- /home/refugee/freebsd/current/src/sys/amd64/isa/clock.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/isa/clock.c Tue Dec 14 00:49:58 2004 @@ -798,7 +798,7 @@ * is is too generic. Should use it everywhere. */ freq = timer_freq; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; @@ -807,7 +807,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", "", &Giant); static unsigned i8254_get_timecount(struct timecounter *tc) diff -ur /home/refugee/freebsd/current/src/sys/amd64/linux32/linux32_sysvec.c repl/amd64/linux32/linux32_sysvec.c --- /home/refugee/freebsd/current/src/sys/amd64/linux32/linux32_sysvec.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/linux32/linux32_sysvec.c Tue Dec 14 00:49:58 2004 @@ -928,13 +928,13 @@ static u_long linux32_maxdsiz = LINUX32_MAXDSIZ; SYSCTL_ULONG(_compat_linux32, OID_AUTO, maxdsiz, CTLFLAG_RW, - &linux32_maxdsiz, 0, ""); + &linux32_maxdsiz, 0, "", &Giant); static u_long linux32_maxssiz = LINUX32_MAXSSIZ; SYSCTL_ULONG(_compat_linux32, OID_AUTO, maxssiz, CTLFLAG_RW, - &linux32_maxssiz, 0, ""); + &linux32_maxssiz, 0, "", &Giant); static u_long linux32_maxvmem = LINUX32_MAXVMEM; SYSCTL_ULONG(_compat_linux32, OID_AUTO, maxvmem, CTLFLAG_RW, - &linux32_maxvmem, 0, ""); + &linux32_maxvmem, 0, "", &Giant); /* * XXX copied from ia32_sysvec.c. diff -ur /home/refugee/freebsd/current/src/sys/amd64/pci/pci_bus.c repl/amd64/pci/pci_bus.c --- /home/refugee/freebsd/current/src/sys/amd64/pci/pci_bus.c Sun Nov 14 03:55:57 2004 +++ repl/amd64/pci/pci_bus.c Tue Dec 14 00:49:58 2004 @@ -271,7 +271,7 @@ SYSCTL_ULONG(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, &legacy_host_mem_start, 0x80000000, "Limit the host bridge memory to being above this address. Must be\n\ -set at boot via a tunable."); +set at boot via a tunable.", &Giant); static struct resource * legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, diff -ur /home/refugee/freebsd/current/src/sys/arm/arm/identcpu.c repl/arm/arm/identcpu.c --- /home/refugee/freebsd/current/src/sys/arm/arm/identcpu.c Sun Nov 14 03:55:57 2004 +++ repl/arm/arm/identcpu.c Tue Dec 14 00:49:38 2004 @@ -58,7 +58,7 @@ char machine[] = "arm"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, - machine, 0, "Machine class"); + machine, 0, "Machine class", &Giant); enum cpu_class { CPU_CLASS_NONE, CPU_CLASS_ARM2, diff -ur /home/refugee/freebsd/current/src/sys/cam/cam.c repl/cam/cam.c --- /home/refugee/freebsd/current/src/sys/cam/cam.c Sun Oct 31 04:50:27 2004 +++ repl/cam/cam.c Tue Dec 14 00:49:42 2004 @@ -100,7 +100,7 @@ sizeof(cam_status_table)/sizeof(*cam_status_table); #ifdef _KERNEL -SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem"); +SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem", NULL); #endif void diff -ur /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_all.c repl/cam/scsi/scsi_all.c --- /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_all.c Sun Oct 31 04:50:27 2004 +++ repl/cam/scsi/scsi_all.c Tue Dec 14 00:49:42 2004 @@ -97,7 +97,7 @@ const struct asc_table_entry **); #ifdef _KERNEL static void init_scsi_delay(void); -static int sysctl_scsi_delay(SYSCTL_HANDLER_ARGS); +static int sysctl_scsi_delay(SYSCTL_HANDLER_ARGS, &Giant); static int set_scsi_delay(int delay); #endif @@ -3014,14 +3014,14 @@ int error, delay; delay = scsi_delay; - error = sysctl_handle_int(oidp, &delay, sizeof(delay), req); + error = sysctl_handle_int(oidp, &delay, sizeof(delay), req, &Giant); if (error != 0 || req->newptr == NULL) return (error); return (set_scsi_delay(delay)); } SYSCTL_PROC(_kern_cam, OID_AUTO, scsi_delay, CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_scsi_delay, "I", - "Delay to allow devices to settle after a SCSI bus reset (ms)"); + "Delay to allow devices to settle after a SCSI bus reset (ms)", &Giant); static int set_scsi_delay(int delay) diff -ur /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_cd.c repl/cam/scsi/scsi_cd.c --- /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_cd.c Sun Oct 31 04:50:26 2004 +++ repl/cam/scsi/scsi_cd.c Tue Dec 14 00:49:42 2004 @@ -303,13 +303,13 @@ static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS; -SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver"); -SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, "CD Changer"); +SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver", NULL); +SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, "CD Changer", NULL); SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW, - &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum"); + &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum", &Giant); TUNABLE_INT("kern.cam.cd.changer.min_busy_seconds", &changer_min_busy_seconds); SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, max_busy_seconds, CTLFLAG_RW, - &changer_max_busy_seconds, 0, "Maximum changer scheduling quantum"); + &changer_max_busy_seconds, 0, "Maximum changer scheduling quantum", &Giant); TUNABLE_INT("kern.cam.cd.changer.max_busy_seconds", &changer_max_busy_seconds); struct cdchanger { @@ -424,7 +424,7 @@ if ((softc->flags & CD_FLAG_SCTX_INIT) != 0 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { - xpt_print_path(periph->path); + xpt_print_path(periph->path, &Giant); printf("can't remove sysctl context\n"); } @@ -582,14 +582,14 @@ mtx_lock(&Giant); - sysctl_ctx_init(&softc->sysctl_ctx); + sysctl_ctx_init(&softc->sysctl_ctx, &Giant); softc->flags |= CD_FLAG_SCTX_INIT; softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_cd), OID_AUTO, - tmpstr2, CTLFLAG_RD, 0, tmpstr); + tmpstr2, CTLFLAG_RD, 0, tmpstr, &Giant); if (softc->sysctl_tree == NULL) { - printf("cdsysctlinit: unable to allocate sysctl tree\n"); + printf("cdsysctlinit: unable to allocate sysctl tree\n", &Giant); return; } @@ -616,7 +616,7 @@ value = *(int *)arg1; - error = sysctl_handle_int(oidp, &value, 0, req); + error = sysctl_handle_int(oidp, &value, 0, req, &Giant); if ((error != 0) || (req->newptr == NULL)) diff -ur /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_da.c repl/cam/scsi/scsi_da.c --- /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_da.c Sun Oct 31 04:50:26 2004 +++ repl/cam/scsi/scsi_da.c Tue Dec 14 00:49:42 2004 @@ -352,10 +352,10 @@ SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); SYSCTL_INT(_kern_cam_da, OID_AUTO, retry_count, CTLFLAG_RW, - &da_retry_count, 0, "Normal I/O retry count"); + &da_retry_count, 0, "Normal I/O retry count", &Giant); TUNABLE_INT("kern.cam.da.retry_count", &da_retry_count); SYSCTL_INT(_kern_cam_da, OID_AUTO, default_timeout, CTLFLAG_RW, - &da_default_timeout, 0, "Normal I/O timeout (in seconds)"); + &da_default_timeout, 0, "Normal I/O timeout (in seconds)", &Giant); TUNABLE_INT("kern.cam.da.default_timeout", &da_default_timeout); /* @@ -779,7 +779,7 @@ */ if ((softc->flags & DA_FLAG_SCTX_INIT) != 0 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { - xpt_print_path(periph->path); + xpt_print_path(periph->path, &Giant); printf("can't remove sysctl context\n"); } disk_destroy(softc->disk); @@ -864,13 +864,13 @@ snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number); mtx_lock(&Giant); - sysctl_ctx_init(&softc->sysctl_ctx); + sysctl_ctx_init(&softc->sysctl_ctx, &Giant); softc->flags |= DA_FLAG_SCTX_INIT; softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2, - CTLFLAG_RD, 0, tmpstr); + CTLFLAG_RD, 0, tmpstr, &Giant); if (softc->sysctl_tree == NULL) { - printf("dasysctlinit: unable to allocate sysctl tree\n"); + printf("dasysctlinit: unable to allocate sysctl tree\n", &Giant); return; } @@ -893,7 +893,7 @@ value = *(int *)arg1; - error = sysctl_handle_int(oidp, &value, 0, req); + error = sysctl_handle_int(oidp, &value, 0, req, &Giant); if ((error != 0) || (req->newptr == NULL)) diff -ur /home/refugee/freebsd/current/src/sys/compat/ia32/ia32_sysvec.c repl/compat/ia32/ia32_sysvec.c --- /home/refugee/freebsd/current/src/sys/compat/ia32/ia32_sysvec.c Sun Oct 31 04:52:27 2004 +++ repl/compat/ia32/ia32_sysvec.c Tue Dec 14 00:49:53 2004 @@ -97,7 +97,7 @@ extern struct sysent freebsd32_sysent[]; -SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode"); +SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode", NULL); struct sysentvec ia32_freebsd_sysvec = { FREEBSD32_SYS_MAXSYSCALL, @@ -271,11 +271,11 @@ } static u_long ia32_maxdsiz = IA32_MAXDSIZ; -SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxdsiz, CTLFLAG_RW, &ia32_maxdsiz, 0, ""); +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxdsiz, CTLFLAG_RW, &ia32_maxdsiz, 0, "", &Giant); static u_long ia32_maxssiz = IA32_MAXSSIZ; -SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxssiz, CTLFLAG_RW, &ia32_maxssiz, 0, ""); +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxssiz, CTLFLAG_RW, &ia32_maxssiz, 0, "", &Giant); static u_long ia32_maxvmem = IA32_MAXVMEM; -SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxvmem, CTLFLAG_RW, &ia32_maxvmem, 0, ""); +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxvmem, CTLFLAG_RW, &ia32_maxvmem, 0, "", &Giant); static void ia32_fixlimits(struct image_params *imgp) diff -ur /home/refugee/freebsd/current/src/sys/compat/linux/linux_mib.c repl/compat/linux/linux_mib.c --- /home/refugee/freebsd/current/src/sys/compat/linux/linux_mib.c Sun Oct 31 04:52:26 2004 +++ repl/compat/linux/linux_mib.c Tue Dec 14 00:49:52 2004 @@ -69,7 +69,7 @@ int error; linux_get_osname(req->td, osname); - error = sysctl_handle_string(oidp, osname, LINUX_MAX_UTSNAME, req); + error = sysctl_handle_string(oidp, osname, LINUX_MAX_UTSNAME, req, &Giant); if (error || req->newptr == NULL) return (error); error = linux_set_osname(req->td, osname); @@ -79,7 +79,7 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, osname, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON, 0, 0, linux_sysctl_osname, "A", - "Linux kernel OS name"); + "Linux kernel OS name", &Giant); static char linux_osrelease[LINUX_MAX_UTSNAME] = "2.4.2"; @@ -90,7 +90,7 @@ int error; linux_get_osrelease(req->td, osrelease); - error = sysctl_handle_string(oidp, osrelease, LINUX_MAX_UTSNAME, req); + error = sysctl_handle_string(oidp, osrelease, LINUX_MAX_UTSNAME, req, &Giant); if (error || req->newptr == NULL) return (error); error = linux_set_osrelease(req->td, osrelease); @@ -100,7 +100,7 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, osrelease, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON, 0, 0, linux_sysctl_osrelease, "A", - "Linux kernel OS release"); + "Linux kernel OS release", &Giant); static int linux_oss_version = 0x030600; @@ -111,7 +111,7 @@ int error; oss_version = linux_get_oss_version(req->td); - error = sysctl_handle_int(oidp, &oss_version, 0, req); + error = sysctl_handle_int(oidp, &oss_version, 0, req, &Giant); if (error || req->newptr == NULL) return (error); error = linux_set_oss_version(req->td, oss_version); @@ -121,7 +121,7 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, oss_version, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_PRISON, 0, 0, linux_sysctl_oss_version, "I", - "Linux OSS version"); + "Linux OSS version", &Giant); /* * Returns holding the prison mutex if return non-NULL. @@ -339,7 +339,7 @@ int global = 0; value[0] = '\0'; - error = sysctl_handle_string(oidp, value, LINUX_MAX_DEBUGSTR, req); + error = sysctl_handle_string(oidp, value, LINUX_MAX_DEBUGSTR, req, &Giant); if (error || req->newptr == NULL) return (error); for (p = value; *p != '\0' && *p != '.'; p++); @@ -357,6 +357,6 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, linux_sysctl_debug, "A", - "Linux debugging control"); + "Linux debugging control", &Giant); #endif /* DEBUG */ diff -ur /home/refugee/freebsd/current/src/sys/compat/ndis/kern_ndis.c repl/compat/ndis/kern_ndis.c --- /home/refugee/freebsd/current/src/sys/compat/ndis/kern_ndis.c Sun Oct 31 04:52:27 2004 +++ repl/compat/ndis/kern_ndis.c Tue Dec 14 00:49:53 2004 @@ -622,7 +622,7 @@ sc->ndis_tree = SYSCTL_ADD_NODE(&sc->ndis_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_nameunit(sc->ndis_dev), CTLFLAG_RD, 0, - device_get_desc(sc->ndis_dev)); + device_get_desc(sc->ndis_dev), &Giant); #endif /* Add the driver-specific registry keys. */ @@ -666,7 +666,7 @@ OID_AUTO, vals->nc_cfgkey, CTLFLAG_RW, vals->nc_val, sizeof(vals->nc_val), - vals->nc_cfgdesc); + vals->nc_cfgdesc, &Giant); vals++; } @@ -739,7 +739,7 @@ #endif OID_AUTO, cfg->ndis_cfg.nc_cfgkey, flag, cfg->ndis_cfg.nc_val, sizeof(cfg->ndis_cfg.nc_val), - cfg->ndis_cfg.nc_cfgdesc); + cfg->ndis_cfg.nc_cfgdesc, &Giant); return(0); } diff -ur /home/refugee/freebsd/current/src/sys/compat/ndis/subr_ndis.c repl/compat/ndis/subr_ndis.c --- /home/refugee/freebsd/current/src/sys/compat/ndis/subr_ndis.c Sun Oct 31 04:52:27 2004 +++ repl/compat/ndis/subr_ndis.c Tue Dec 14 00:49:53 2004 @@ -112,7 +112,7 @@ extern struct nd_head ndis_devhead; SYSCTL_STRING(_hw, OID_AUTO, ndis_filepath, CTLFLAG_RW, ndis_filepath, - MAXPATHLEN, "Path used by NdisOpenFile() to search for files"); + MAXPATHLEN, "Path used by NdisOpenFile() to search for files", &Giant); __stdcall static void ndis_initwrap(ndis_handle *, device_object *, void *, void *); diff -ur /home/refugee/freebsd/current/src/sys/contrib/dev/ath/freebsd/ah_osdep.c repl/contrib/dev/ath/freebsd/ah_osdep.c --- /home/refugee/freebsd/current/src/sys/contrib/dev/ath/freebsd/ah_osdep.c Wed Dec 8 20:39:58 2004 +++ repl/contrib/dev/ath/freebsd/ah_osdep.c Tue Dec 14 00:49:57 2004 @@ -69,31 +69,31 @@ #endif /* AH_DEBUG */ /* NB: put this here instead of the driver to avoid circular references */ -SYSCTL_NODE(_hw, OID_AUTO, ath, CTLFLAG_RD, 0, "Atheros driver parameters"); -SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, "Atheros HAL parameters"); +SYSCTL_NODE(_hw, OID_AUTO, ath, CTLFLAG_RD, 0, "Atheros driver parameters", NULL); +SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, "Atheros HAL parameters", NULL); #ifdef AH_DEBUG static int ath_hal_debug = 0; SYSCTL_INT(_hw_ath_hal, OID_AUTO, debug, CTLFLAG_RW, &ath_hal_debug, - 0, "Atheros HAL debugging printfs"); + 0, "Atheros HAL debugging printfs", &Giant); TUNABLE_INT("hw.ath.hal.debug", &ath_hal_debug); #endif /* AH_DEBUG */ SYSCTL_STRING(_hw_ath_hal, OID_AUTO, version, CTLFLAG_RD, ath_hal_version, 0, - "Atheros HAL version"); + "Atheros HAL version", &Giant); int ath_hal_dma_beacon_response_time = 2; /* in TU's */ SYSCTL_INT(_hw_ath_hal, OID_AUTO, dma_brt, CTLFLAG_RW, &ath_hal_dma_beacon_response_time, 0, - "Atheros HAL DMA beacon response time"); + "Atheros HAL DMA beacon response time", &Giant); int ath_hal_sw_beacon_response_time = 10; /* in TU's */ SYSCTL_INT(_hw_ath_hal, OID_AUTO, sw_brt, CTLFLAG_RW, &ath_hal_sw_beacon_response_time, 0, - "Atheros HAL software beacon response time"); + "Atheros HAL software beacon response time", &Giant); int ath_hal_additional_swba_backoff = 0; /* in TU's */ SYSCTL_INT(_hw_ath_hal, OID_AUTO, swba_backoff, CTLFLAG_RW, &ath_hal_additional_swba_backoff, 0, - "Atheros HAL additional SWBA backoff time"); + "Atheros HAL additional SWBA backoff time", &Giant); void* ath_hal_malloc(size_t size) @@ -208,18 +208,18 @@ int error, enable; enable = (ath_hal_alq != NULL); - error = sysctl_handle_int(oidp, &enable, 0, req); + error = sysctl_handle_int(oidp, &enable, 0, req, &Giant); if (error || !req->newptr) return (error); else return (ath_hal_setlogging(enable)); } SYSCTL_PROC(_hw_ath_hal, OID_AUTO, alq, CTLTYPE_INT|CTLFLAG_RW, - 0, 0, sysctl_hw_ath_hal_log, "I", "Enable HAL register logging"); + 0, 0, sysctl_hw_ath_hal_log, "I", "Enable HAL register logging", &Giant); SYSCTL_INT(_hw_ath_hal, OID_AUTO, alq_size, CTLFLAG_RW, - &ath_hal_alq_qsize, 0, "In-memory log size (#records)"); + &ath_hal_alq_qsize, 0, "In-memory log size (#records)", &Giant); SYSCTL_INT(_hw_ath_hal, OID_AUTO, alq_lost, CTLFLAG_RW, - &ath_hal_alq_lost, 0, "Register operations not logged"); + &ath_hal_alq_lost, 0, "Register operations not logged", &Giant); static struct ale * ath_hal_alq_get(struct ath_hal *ah) diff -ur /home/refugee/freebsd/current/src/sys/contrib/dev/hptmv/hptproc.c repl/contrib/dev/hptmv/hptproc.c --- /home/refugee/freebsd/current/src/sys/contrib/dev/hptmv/hptproc.c Sun Oct 31 04:52:56 2004 +++ repl/contrib/dev/hptmv/hptproc.c Tue Dec 14 00:49:57 2004 @@ -594,7 +594,7 @@ #define hptregister_node(name) \ SYSCTL_NODE(, OID_AUTO, name, CTLFLAG_RW, 0, "Get/Set " #name " state root node"); \ SYSCTL_OID(_ ## name, OID_AUTO, status, CTLTYPE_STRING|CTLFLAG_RW, \ - NULL, 0, hpt_status, "A", "Get/Set " #name " state"); + NULL, 0, hpt_status, "A", "Get/Set " #name " state", &Giant); #endif xhptregister_node(PROC_DIR_NAME); diff -ur /home/refugee/freebsd/current/src/sys/contrib/ipfilter/netinet/mlfk_ipl.c repl/contrib/ipfilter/netinet/mlfk_ipl.c --- /home/refugee/freebsd/current/src/sys/contrib/ipfilter/netinet/mlfk_ipl.c Sun Oct 31 04:52:57 2004 +++ repl/contrib/ipfilter/netinet/mlfk_ipl.c Tue Dec 14 00:49:58 2004 @@ -58,50 +58,50 @@ static struct cdev *ipf_devs[IPL_LOGMAX + 1]; SYSCTL_DECL(_net_inet); -SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF"); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, ""); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_pass, CTLFLAG_RW, &fr_pass, 0, ""); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &fr_active, 0, ""); +SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF", NULL); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, "", &Giant); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_pass, CTLFLAG_RW, &fr_pass, 0, "", &Giant); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &fr_active, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpidletimeout, CTLFLAG_RW, - &fr_tcpidletimeout, 0, ""); + &fr_tcpidletimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpclosewait, CTLFLAG_RW, - &fr_tcpclosewait, 0, ""); + &fr_tcpclosewait, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcplastack, CTLFLAG_RW, - &fr_tcplastack, 0, ""); + &fr_tcplastack, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcptimeout, CTLFLAG_RW, - &fr_tcptimeout, 0, ""); + &fr_tcptimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpclosed, CTLFLAG_RW, - &fr_tcpclosed, 0, ""); + &fr_tcpclosed, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcphalfclosed, CTLFLAG_RW, - &fr_tcphalfclosed, 0, ""); + &fr_tcphalfclosed, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_udptimeout, CTLFLAG_RW, - &fr_udptimeout, 0, ""); + &fr_udptimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_udpacktimeout, CTLFLAG_RW, - &fr_udpacktimeout, 0, ""); + &fr_udpacktimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_icmptimeout, CTLFLAG_RW, - &fr_icmptimeout, 0, ""); + &fr_icmptimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_icmpacktimeout, CTLFLAG_RW, - &fr_icmpacktimeout, 0, ""); + &fr_icmpacktimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_defnatage, CTLFLAG_RW, - &fr_defnatage, 0, ""); + &fr_defnatage, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_ipfrttl, CTLFLAG_RW, - &fr_ipfrttl, 0, ""); + &fr_ipfrttl, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, ipl_unreach, CTLFLAG_RW, - &ipl_unreach, 0, ""); + &ipl_unreach, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, - &fr_running, 0, ""); + &fr_running, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_authsize, CTLFLAG_RD, - &fr_authsize, 0, ""); + &fr_authsize, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_authused, CTLFLAG_RD, - &fr_authused, 0, ""); + &fr_authused, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_defaultauthage, CTLFLAG_RW, - &fr_defaultauthage, 0, ""); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &fr_chksrc, 0, ""); + &fr_defaultauthage, 0, "", &Giant); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &fr_chksrc, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, ippr_ftp_pasvonly, CTLFLAG_RW, - &ippr_ftp_pasvonly, 0, ""); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &fr_minttl, 0, ""); + &ippr_ftp_pasvonly, 0, "", &Giant); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &fr_minttl, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttllog, CTLFLAG_RW, - &fr_minttllog, 0, ""); + &fr_minttllog, 0, "", &Giant); #define CDEV_MAJOR 79 static struct cdevsw ipl_cdevsw = { diff -ur /home/refugee/freebsd/current/src/sys/ddb/db_output.c repl/ddb/db_output.c --- /home/refugee/freebsd/current/src/sys/ddb/db_output.c Sun Nov 14 03:56:01 2004 +++ repl/ddb/db_output.c Tue Dec 14 00:49:55 2004 @@ -72,7 +72,7 @@ static void *db_page_callout_arg = NULL; static int ddb_use_printf = 0; SYSCTL_INT(_debug, OID_AUTO, ddb_use_printf, CTLFLAG_RW, &ddb_use_printf, 0, - "use printf for all ddb output"); + "use printf for all ddb output", &Giant); static void db_putchar(int c, void *arg); diff -ur /home/refugee/freebsd/current/src/sys/dev/aac/aac.c repl/dev/aac/aac.c --- /home/refugee/freebsd/current/src/sys/dev/aac/aac.c Sun Nov 21 00:02:53 2004 +++ repl/dev/aac/aac.c Tue Dec 14 00:49:49 2004 @@ -213,7 +213,7 @@ MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver"); /* sysctl node */ -SYSCTL_NODE(_hw, OID_AUTO, aac, CTLFLAG_RD, 0, "AAC driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, aac, CTLFLAG_RD, 0, "AAC driver parameters", NULL); /* * Device Interface diff -ur /home/refugee/freebsd/current/src/sys/dev/aac/aac_disk.c repl/dev/aac/aac_disk.c --- /home/refugee/freebsd/current/src/sys/dev/aac/aac_disk.c Sun Oct 31 04:52:02 2004 +++ repl/dev/aac/aac_disk.c Tue Dec 14 00:49:49 2004 @@ -93,7 +93,7 @@ SYSCTL_DECL(_hw_aac); SYSCTL_UINT(_hw_aac, OID_AUTO, iosize_max, CTLFLAG_RDTUN, &aac_iosize_max, 0, - "Max I/O size per transfer to an array"); + "Max I/O size per transfer to an array", &Giant); /* * Handle open from generic layer. diff -ur /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_asus.c repl/dev/acpi_support/acpi_asus.c --- /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_asus.c Sun Nov 21 00:02:53 2004 +++ repl/dev/acpi_support/acpi_asus.c Tue Dec 14 00:49:50 2004 @@ -227,9 +227,9 @@ static void acpi_asus_led(struct acpi_asus_led *led, int state); -static int acpi_asus_sysctl_brn(SYSCTL_HANDLER_ARGS); -static int acpi_asus_sysctl_lcd(SYSCTL_HANDLER_ARGS); -static int acpi_asus_sysctl_disp(SYSCTL_HANDLER_ARGS); +static int acpi_asus_sysctl_brn(SYSCTL_HANDLER_ARGS, &Giant); +static int acpi_asus_sysctl_lcd(SYSCTL_HANDLER_ARGS, &Giant); +static int acpi_asus_sysctl_disp(SYSCTL_HANDLER_ARGS, &Giant); static void acpi_asus_notify(ACPI_HANDLE h, UINT32 notify, void *context); @@ -351,10 +351,10 @@ acpi_sc = acpi_device_get_parent_softc(dev); /* Build sysctl tree */ - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), - OID_AUTO, "asus", CTLFLAG_RD, 0, ""); + OID_AUTO, "asus", CTLFLAG_RD, 0, "", &Giant); /* Attach leds */ if (sc->model->mled_set) { @@ -439,7 +439,7 @@ SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "lcd_backlight", CTLTYPE_INT | CTLFLAG_RW, sc, 0, acpi_asus_sysctl_lcd, "I", - "state of the lcd backlight"); + "state of the lcd backlight", &Giant); } } @@ -477,7 +477,7 @@ acpi_asus_notify); /* Free sysctl tree */ - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (0); } @@ -527,7 +527,7 @@ /* Sanity check */ brn = sc->s_brn; - err = sysctl_handle_int(oidp, &brn, 0, req); + err = sysctl_handle_int(oidp, &brn, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; @@ -571,7 +571,7 @@ /* Sanity check */ lcd = sc->s_lcd; - err = sysctl_handle_int(oidp, &lcd, 0, req); + err = sysctl_handle_int(oidp, &lcd, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; @@ -608,7 +608,7 @@ /* Sanity check */ ACPI_SERIAL_BEGIN(asus); disp = sc->s_disp; - err = sysctl_handle_int(oidp, &disp, 0, req); + err = sysctl_handle_int(oidp, &disp, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; diff -ur /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_panasonic.c repl/dev/acpi_support/acpi_panasonic.c --- /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_panasonic.c Sun Nov 21 00:02:53 2004 +++ repl/dev/acpi_support/acpi_panasonic.c Tue Dec 14 00:49:50 2004 @@ -156,16 +156,16 @@ acpi_sc = acpi_device_get_parent_softc(dev); /* Build sysctl tree */ - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, - "panasonic", CTLFLAG_RD, 0, ""); + "panasonic", CTLFLAG_RD, 0, "", &Giant); for (i = 0; sysctl_table[i].name != NULL; i++) { SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, sysctl_table[i].name, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY, - sc, i, acpi_panasonic_sysctl, "I", ""); + sc, i, acpi_panasonic_sysctl, "I", "", &Giant); } #if 0 @@ -173,7 +173,7 @@ status = AcpiEvaluateObject(sc->handle, "", NULL, NULL); if (ACPI_FAILURE(status)) { device_printf(dev, "enable FN keys failed\n"); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (ENXIO); } #endif @@ -184,7 +184,7 @@ if (ACPI_FAILURE(status)) { device_printf(dev, "couldn't install notify handler - %s\n", AcpiFormatException(status)); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (ENXIO); } @@ -210,7 +210,7 @@ acpi_panasonic_notify); /* Free sysctl tree */ - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (0); } @@ -234,7 +234,7 @@ goto out; /* Send the current value to the user and return if no new value. */ - error = sysctl_handle_int(oidp, &arg, 0, req); + error = sysctl_handle_int(oidp, &arg, 0, req, &Giant); if (error != 0 || req->newptr == NULL) goto out; diff -ur /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_sony.c repl/dev/acpi_support/acpi_sony.c --- /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_sony.c Wed Dec 8 20:40:49 2004 +++ repl/dev/acpi_support/acpi_sony.c Tue Dec 14 00:49:50 2004 @@ -68,7 +68,7 @@ static int acpi_sony_probe(device_t dev); static int acpi_sony_attach(device_t dev); static int acpi_sony_detach(device_t dev); -static int sysctl_acpi_sony_gen_handler(SYSCTL_HANDLER_ARGS); +static int sysctl_acpi_sony_gen_handler(SYSCTL_HANDLER_ARGS, &Giant); static device_method_t acpi_sony_methods[] = { /* Device interface */ @@ -122,7 +122,7 @@ i, acpi_sony_oids[i].nodename , CTLTYPE_INT | ((acpi_sony_oids[i].setmethod)? CTLFLAG_RW: CTLFLAG_RD), dev, i, sysctl_acpi_sony_gen_handler, "I", - acpi_sony_oids[i].comment); + acpi_sony_oids[i].comment, &Giant); } return (0); } @@ -157,7 +157,7 @@ acpi_GetInteger(acpi_get_handle(dev), acpi_sony_oids[function].getmethod, &val); - error = sysctl_handle_int(oidp, &val, 0, req); + error = sysctl_handle_int(oidp, &val, 0, req, &Giant); if (error || !req->newptr || !acpi_sony_oids[function].setmethod) return (error); acpi_SetInteger(acpi_get_handle(dev), diff -ur /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_toshiba.c repl/dev/acpi_support/acpi_toshiba.c --- /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_toshiba.c Sun Nov 21 00:02:53 2004 +++ repl/dev/acpi_support/acpi_toshiba.c Tue Dec 14 00:49:50 2004 @@ -238,17 +238,17 @@ sc->handle = acpi_get_handle(dev); acpi_sc = acpi_device_get_parent_softc(dev); - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, - "toshiba", CTLFLAG_RD, 0, ""); + "toshiba", CTLFLAG_RD, 0, "", &Giant); for (i = 0; sysctl_table[i].name != NULL; i++) { SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, sysctl_table[i].name, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY, - sc, i, acpi_toshiba_sysctl, "I", ""); + sc, i, acpi_toshiba_sysctl, "I", "", &Giant); } if (enable_fn_keys != 0) { @@ -256,7 +256,7 @@ NULL, NULL); if (ACPI_FAILURE(status)) { device_printf(dev, "enable FN keys failed\n"); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (ENXIO); } AcpiInstallNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY, @@ -276,7 +276,7 @@ AcpiRemoveNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY, acpi_toshiba_notify); } - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (0); } @@ -300,7 +300,7 @@ goto out; /* Send the current value to the user and return if no new value. */ - error = sysctl_handle_int(oidp, &arg, 0, req); + error = sysctl_handle_int(oidp, &arg, 0, req, &Giant); if (error != 0 || req->newptr == NULL) goto out; diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/Osd/OsdSynch.c repl/dev/acpica/Osd/OsdSynch.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/Osd/OsdSynch.c Sun Oct 31 04:51:42 2004 +++ repl/dev/acpica/Osd/OsdSynch.c Tue Dec 14 00:49:47 2004 @@ -69,7 +69,7 @@ TUNABLE_INT("debug.acpi_semaphore_debug", &acpi_semaphore_debug); SYSCTL_DECL(_debug_acpi); SYSCTL_INT(_debug_acpi, OID_AUTO, semaphore_debug, CTLFLAG_RW, - &acpi_semaphore_debug, 0, "Enable ACPI semaphore debug messages"); + &acpi_semaphore_debug, 0, "Enable ACPI semaphore debug messages", &Giant); #endif /* !ACPI_NO_SEMAPHORES */ ACPI_STATUS diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi.c repl/dev/acpica/acpi.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi.c Wed Dec 8 20:40:50 2004 +++ repl/dev/acpica/acpi.c Tue Dec 14 00:49:47 2004 @@ -138,7 +138,7 @@ static int acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate); static int acpi_wake_run_prep(ACPI_HANDLE handle, int sstate); static int acpi_wake_prep_walk(int sstate); -static int acpi_wake_sysctl_walk(device_t dev); +static int acpi_wake_sysctl_walk(device_t dev, &Giant); static int acpi_wake_set_sysctl(SYSCTL_HANDLER_ARGS); static void acpi_system_eventhandler_sleep(void *arg, int state); static void acpi_system_eventhandler_wakeup(void *arg, int state); @@ -214,10 +214,10 @@ static const char* sleep_state_names[] = { "S0", "S1", "S2", "S3", "S4", "S5", "NONE"}; -SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging"); +SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging", NULL); static char acpi_ca_version[12]; SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD, - acpi_ca_version, 0, "Version of Intel ACPI-CA"); + acpi_ca_version, 0, "Version of Intel ACPI-CA", &Giant); /* * Allow override of whether methods execute in parallel or not. @@ -233,7 +233,7 @@ static int acpi_do_powerstate = 1; TUNABLE_INT("debug.acpi.do_powerstate", &acpi_do_powerstate); SYSCTL_INT(_debug_acpi, OID_AUTO, do_powerstate, CTLFLAG_RW, - &acpi_do_powerstate, 1, "Turn off devices when suspending."); + &acpi_do_powerstate, 1, "Turn off devices when suspending.", &Giant); /* * ACPI can only be loaded as a module by the loader; activating it after @@ -481,10 +481,10 @@ * * XXX: This doesn't check to make sure that none of these fail. */ - sysctl_ctx_init(&sc->acpi_sysctl_ctx); + sysctl_ctx_init(&sc->acpi_sysctl_ctx, &Giant); sc->acpi_sysctl_tree = SYSCTL_ADD_NODE(&sc->acpi_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, - device_get_name(dev), CTLFLAG_RD, 0, ""); + device_get_name(dev), CTLFLAG_RD, 0, "", &Giant); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "supported_sleep_state", CTLTYPE_STRING | CTLFLAG_RD, 0, 0, acpi_supported_sleep_state_sysctl, "A", ""); @@ -505,13 +505,13 @@ &sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", ""); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "sleep_delay", CTLFLAG_RD | CTLFLAG_RW, - &sc->acpi_sleep_delay, 0, "sleep delay"); + &sc->acpi_sleep_delay, 0, "sleep delay", &Giant); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "s4bios", CTLFLAG_RD | CTLFLAG_RW, - &sc->acpi_s4bios, 0, "S4BIOS mode"); + &sc->acpi_s4bios, 0, "S4BIOS mode", &Giant); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW, - &sc->acpi_verbose, 0, "verbose mode"); + &sc->acpi_verbose, 0, "verbose mode", &Giant); /* * Default to 1 second before sleeping to give some machines time to @@ -1444,7 +1444,7 @@ bus_generic_attach(bus); /* Attach wake sysctls. */ - acpi_wake_sysctl_walk(bus); + acpi_wake_sysctl_walk(bus, &Giant); ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "done attaching children\n")); return_VOID; @@ -2314,7 +2314,7 @@ return (error); for (i = 0; i < numdevs; i++) { child = devlist[i]; - acpi_wake_sysctl_walk(child); + acpi_wake_sysctl_walk(child, &Giant); if (!device_is_attached(child)) continue; status = AcpiEvaluateObject(acpi_get_handle(child), "_PRW", NULL, NULL); @@ -2340,7 +2340,7 @@ dev = (device_t)arg1; enable = (acpi_get_flags(dev) & ACPI_FLAG_WAKE_ENABLED) ? 1 : 0; - error = sysctl_handle_int(oidp, &enable, 0, req); + error = sysctl_handle_int(oidp, &enable, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (enable != 0 && enable != 1) @@ -2748,7 +2748,7 @@ sbuf_printf(&sb, "S%d ", state); sbuf_trim(&sb); sbuf_finish(&sb); - error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req, &Giant); sbuf_delete(&sb); return (error); } @@ -2765,7 +2765,7 @@ strlcpy(sleep_state, "unknown", sizeof(sleep_state)); else strlcpy(sleep_state, sleep_state_names[old_state], sizeof(sleep_state)); - error = sysctl_handle_string(oidp, sleep_state, sizeof(sleep_state), req); + error = sysctl_handle_string(oidp, sleep_state, sizeof(sleep_state), req, &Giant); if (error == 0 && req->newptr != NULL) { new_state = ACPI_STATE_S0; for (; new_state <= ACPI_S_STATES_MAX + 1; new_state++) @@ -3010,9 +3010,9 @@ } SYSCTL_PROC(_debug_acpi, OID_AUTO, layer, CTLFLAG_RW | CTLTYPE_STRING, - "debug.acpi.layer", 0, acpi_debug_sysctl, "A", ""); + "debug.acpi.layer", 0, acpi_debug_sysctl, "A", "", &Giant); SYSCTL_PROC(_debug_acpi, OID_AUTO, level, CTLFLAG_RW | CTLTYPE_STRING, - "debug.acpi.level", 0, acpi_debug_sysctl, "A", ""); + "debug.acpi.level", 0, acpi_debug_sysctl, "A", "", &Giant); #endif /* ACPI_DEBUG */ static int diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_acad.c repl/dev/acpica/acpi_acad.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_acad.c Wed Dec 8 20:40:50 2004 +++ repl/dev/acpica/acpi_acad.c Tue Dec 14 00:49:47 2004 @@ -218,7 +218,7 @@ return (ENXIO); val = *(u_int *)oidp->oid_arg1; - error = sysctl_handle_int(oidp, &val, 0, req); + error = sysctl_handle_int(oidp, &val, 0, req, &Giant); return (error); } diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_battery.c repl/dev/acpica/acpi_battery.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_battery.c Sun Oct 31 04:51:42 2004 +++ repl/dev/acpica/acpi_battery.c Tue Dec 14 00:49:47 2004 @@ -160,7 +160,7 @@ acpi_battery_get_battinfo(-1, &acpi_battery_battinfo); val = *(u_int *)oidp->oid_arg1; - error = sysctl_handle_int(oidp, &val, 0, req); + error = sysctl_handle_int(oidp, &val, 0, req, &Giant); return (error); } @@ -195,10 +195,10 @@ if (error != 0) goto out; - sysctl_ctx_init(&sc->acpi_battery_sysctl_ctx); + sysctl_ctx_init(&sc->acpi_battery_sysctl_ctx, &Giant); sc->acpi_battery_sysctl_tree = SYSCTL_ADD_NODE(&sc->acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "battery", CTLFLAG_RD, - 0, ""); + 0, "", &Giant); SYSCTL_ADD_PROC(&sc->acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_battery_sysctl_tree), OID_AUTO, "life", CTLTYPE_INT | CTLFLAG_RD, @@ -213,11 +213,11 @@ &acpi_battery_battinfo.state, 0, acpi_battery_sysctl, "I", ""); SYSCTL_ADD_INT(&sc->acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_battery_sysctl_tree), - OID_AUTO, "units", CTLFLAG_RD, &acpi_batteries_units, 0, ""); + OID_AUTO, "units", CTLFLAG_RD, &acpi_batteries_units, 0, "", &Giant); SYSCTL_ADD_INT(&sc->acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_battery_sysctl_tree), OID_AUTO, "info_expire", CTLFLAG_RD | CTLFLAG_RW, - &acpi_battery_info_expire, 0, ""); + &acpi_battery_info_expire, 0, "", &Giant); acpi_batteries_initted = TRUE; diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_cpu.c repl/dev/acpica/acpi_cpu.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_cpu.c Sun Nov 21 00:02:53 2004 +++ repl/dev/acpica/acpi_cpu.c Tue Dec 14 00:49:47 2004 @@ -294,10 +294,10 @@ device_get_unit(dev), sc->cpu_p_blk, sc->cpu_p_blk_len)); acpi_sc = acpi_device_get_parent_softc(dev); - sysctl_ctx_init(&acpi_cpu_sysctl_ctx); + sysctl_ctx_init(&acpi_cpu_sysctl_ctx, &Giant); acpi_cpu_sysctl_tree = SYSCTL_ADD_NODE(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), - OID_AUTO, "cpu", CTLFLAG_RD, 0, ""); + OID_AUTO, "cpu", CTLFLAG_RD, 0, "", &Giant); /* * Probe for throttling and Cx state support. @@ -311,7 +311,7 @@ if (device_get_unit(dev) == 0) AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_cpu_startup, NULL); } else { - sysctl_ctx_free(&acpi_cpu_sysctl_ctx); + sysctl_ctx_free(&acpi_cpu_sysctl_ctx, &Giant); } return_VALUE (0); @@ -713,7 +713,7 @@ SYSCTL_ADD_INT(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_cpu_sysctl_tree), OID_AUTO, "throttle_max", CTLFLAG_RD, - &cpu_throttle_max, 0, "maximum CPU speed"); + &cpu_throttle_max, 0, "maximum CPU speed", &Giant); SYSCTL_ADD_PROC(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_cpu_sysctl_tree), OID_AUTO, "throttle_state", @@ -762,7 +762,7 @@ SYSCTL_ADD_STRING(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_cpu_sysctl_tree), OID_AUTO, "cx_supported", CTLFLAG_RD, cpu_cx_supported, - 0, "Cx/microsecond values for supported Cx states"); + 0, "Cx/microsecond values for supported Cx states", &Giant); SYSCTL_ADD_PROC(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_cpu_sysctl_tree), OID_AUTO, "cx_lowest", CTLTYPE_STRING | CTLFLAG_RW, @@ -1038,7 +1038,7 @@ argp = (uint32_t *)oidp->oid_arg1; arg = *argp; - error = sysctl_handle_int(oidp, &arg, 0, req); + error = sysctl_handle_int(oidp, &arg, 0, req, &Giant); /* Error or no new value */ if (error != 0 || req->newptr == NULL) @@ -1080,7 +1080,7 @@ } sbuf_trim(&sb); sbuf_finish(&sb); - sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req, &Giant); sbuf_delete(&sb); return (0); @@ -1095,7 +1095,7 @@ sc = device_get_softc(cpu_devices[0]); snprintf(state, sizeof(state), "C%d", cpu_cx_lowest + 1); - error = sysctl_handle_string(oidp, state, sizeof(state), req); + error = sysctl_handle_string(oidp, state, sizeof(state), req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (strlen(state) < 2 || toupper(state[0]) != 'C') diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_thermal.c repl/dev/acpica/acpi_thermal.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_thermal.c Sun Oct 31 04:51:42 2004 +++ repl/dev/acpica/acpi_thermal.c Tue Dec 14 00:49:47 2004 @@ -205,48 +205,48 @@ */ if (device_get_unit(dev) == 0) { acpi_sc = acpi_device_get_parent_softc(dev); - sysctl_ctx_init(&acpi_tz_sysctl_ctx); + sysctl_ctx_init(&acpi_tz_sysctl_ctx, &Giant); acpi_tz_sysctl_tree = SYSCTL_ADD_NODE(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), - OID_AUTO, "thermal", CTLFLAG_RD, 0, ""); + OID_AUTO, "thermal", CTLFLAG_RD, 0, "", &Giant); SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "min_runtime", CTLFLAG_RD | CTLFLAG_RW, &acpi_tz_min_runtime, 0, - "minimum cooling run time in sec"); + "minimum cooling run time in sec", &Giant); SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "polling_rate", CTLFLAG_RD | CTLFLAG_RW, - &acpi_tz_polling_rate, 0, "monitor polling rate"); + &acpi_tz_polling_rate, 0, "monitor polling rate", &Giant); } - sysctl_ctx_init(&sc->tz_sysctl_ctx); + sysctl_ctx_init(&sc->tz_sysctl_ctx, &Giant); sprintf(oidname, "tz%d", device_get_unit(dev)); sc->tz_sysctl_tree = SYSCTL_ADD_NODE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), - OID_AUTO, oidname, CTLFLAG_RD, 0, ""); + OID_AUTO, oidname, CTLFLAG_RD, 0, "", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "temperature", CTLFLAG_RD, &sc->tz_temperature, sizeof(sc->tz_temperature), "IK", - "current thermal zone temperature"); + "current thermal zone temperature", &Giant); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW, sc, 0, acpi_tz_active_sysctl, "I", ""); SYSCTL_ADD_INT(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "thermal_flags", CTLFLAG_RD, - &sc->tz_thflags, 0, "thermal zone flags"); + &sc->tz_thflags, 0, "thermal zone flags", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_PSV", CTLFLAG_RD, &sc->tz_zone.psv, - sizeof(sc->tz_zone.psv), "IK", ""); + sizeof(sc->tz_zone.psv), "IK", "", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_HOT", CTLFLAG_RD, &sc->tz_zone.hot, - sizeof(sc->tz_zone.hot), "IK", ""); + sizeof(sc->tz_zone.hot), "IK", "", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_CRT", CTLFLAG_RD, &sc->tz_zone.crt, - sizeof(sc->tz_zone.crt), "IK", ""); + sizeof(sc->tz_zone.crt), "IK", "", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_ACx", CTLFLAG_RD, &sc->tz_zone.ac, - sizeof(sc->tz_zone.ac), "IK", ""); + sizeof(sc->tz_zone.ac), "IK", "", &Giant); /* * Create our thread; we only need one, it will service all of the @@ -276,7 +276,7 @@ EVENTHANDLER_DEREGISTER(power_profile_change, sc->tz_event); AcpiRemoveNotifyHandler(sc->tz_handle, ACPI_DEVICE_NOTIFY, acpi_tz_notify_handler); - sysctl_ctx_free(&sc->tz_sysctl_ctx); + sysctl_ctx_free(&sc->tz_sysctl_ctx, &Giant); } return_VALUE (error); } @@ -588,7 +588,7 @@ sc = (struct acpi_tz_softc *)oidp->oid_arg1; active = sc->tz_active; - error = sysctl_handle_int(oidp, &active, 0, req); + error = sysctl_handle_int(oidp, &active, 0, req, &Giant); /* Error or no new value */ if (error != 0 || req->newptr == NULL) diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_timer.c repl/dev/acpica/acpi_timer.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_timer.c Sun Nov 14 03:56:04 2004 +++ repl/dev/acpica/acpi_timer.c Tue Dec 14 00:49:47 2004 @@ -64,7 +64,7 @@ static int acpi_timer_attach(device_t dev); static u_int acpi_timer_get_timecount(struct timecounter *tc); static u_int acpi_timer_get_timecount_safe(struct timecounter *tc); -static int acpi_timer_sysctl_freq(SYSCTL_HANDLER_ARGS); +static int acpi_timer_sysctl_freq(SYSCTL_HANDLER_ARGS, &Giant); static void acpi_timer_boot_test(void); static u_int acpi_timer_read(void); @@ -260,7 +260,7 @@ if (acpi_timer_timecounter.tc_frequency == 0) return (EOPNOTSUPP); freq = acpi_timer_frequency; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { acpi_timer_frequency = freq; acpi_timer_timecounter.tc_frequency = acpi_timer_frequency; @@ -270,7 +270,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, acpi_timer_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), acpi_timer_sysctl_freq, "I", ""); + 0, sizeof(u_int), acpi_timer_sysctl_freq, "I", "", &Giant); /* * Some ACPI timers are known or believed to suffer from implementation diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_video.c repl/dev/acpica/acpi_video.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_video.c Sun Nov 14 03:56:04 2004 +++ repl/dev/acpica/acpi_video.c Tue Dec 14 00:49:47 2004 @@ -170,14 +170,14 @@ err = 0; switch (evt) { case MOD_LOAD: - sysctl_ctx_init(&acpi_video_sysctl_ctx); + sysctl_ctx_init(&acpi_video_sysctl_ctx, &Giant); STAILQ_INIT(&lcd_units); STAILQ_INIT(&crt_units); STAILQ_INIT(&tv_units); STAILQ_INIT(&other_units); break; case MOD_UNLOAD: - sysctl_ctx_free(&acpi_video_sysctl_ctx); + sysctl_ctx_free(&acpi_video_sysctl_ctx, &Giant); acpi_video_sysctl_tree = NULL; break; default: @@ -220,7 +220,7 @@ acpi_video_sysctl_tree = SYSCTL_ADD_NODE(&acpi_video_sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "video", CTLFLAG_RD, 0, - "video extension control"); + "video extension control", &Giant); } sc->device = dev; @@ -447,7 +447,7 @@ if (getenv_int(env, &x)) vo->vo_economy = x; - sysctl_ctx_init(&vo->vo_sysctl_ctx); + sysctl_ctx_init(&vo->vo_sysctl_ctx, &Giant); if (vp != NULL) STAILQ_INSERT_AFTER(voqh, vp, vo, vo_unit.next); else @@ -456,14 +456,14 @@ vo->vo_sysctl_tree = SYSCTL_ADD_NODE(&vo->vo_sysctl_ctx, SYSCTL_CHILDREN(acpi_video_sysctl_tree), - OID_AUTO, name, CTLFLAG_RD, 0, desc); + OID_AUTO, name, CTLFLAG_RD, 0, desc, &Giant); if (vo->vo_sysctl_tree != NULL) { SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx, SYSCTL_CHILDREN(vo->vo_sysctl_tree), OID_AUTO, "active", CTLTYPE_INT|CTLFLAG_RW, vo, 0, acpi_video_vo_active_sysctl, "I", - "current activity of this device"); + "current activity of this device", &Giant); SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx, SYSCTL_CHILDREN(vo->vo_sysctl_tree), OID_AUTO, "brightness", @@ -536,7 +536,7 @@ ACPI_SERIAL_ASSERT(video); if (vo->vo_sysctl_tree != NULL) { vo->vo_sysctl_tree = NULL; - sysctl_ctx_free(&vo->vo_sysctl_ctx); + sysctl_ctx_free(&vo->vo_sysctl_ctx, &Giant); } if (vo->vo_levels != NULL) AcpiOsFree(vo->vo_levels); @@ -584,7 +584,7 @@ return (ENXIO); ACPI_SERIAL_BEGIN(video); state = (vo_get_device_status(vo->handle) & DCS_ACTIVE) ? 1 : 0; - err = sysctl_handle_int(oidp, &state, 0, req); + err = sysctl_handle_int(oidp, &state, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; vo_set_device_state(vo->handle, @@ -618,7 +618,7 @@ if (level == -1) level = preset; - err = sysctl_handle_int(oidp, &level, 0, req); + err = sysctl_handle_int(oidp, &level, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; if (level < -1 || level > 100) { @@ -656,7 +656,7 @@ preset = (arg2 == POWER_PROFILE_ECONOMY) ? &vo->vo_economy : &vo->vo_fullpower; level = *preset; - err = sysctl_handle_int(oidp, &level, 0, req); + err = sysctl_handle_int(oidp, &level, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; if (level < -1 || level > 100) { @@ -697,7 +697,7 @@ goto out; } err = sysctl_handle_opaque(oidp, vo->vo_levels, - vo->vo_numlevels * sizeof(*vo->vo_levels), req); + vo->vo_numlevels * sizeof(*vo->vo_levels), req, &Giant); out: ACPI_SERIAL_END(video); diff -ur /home/refugee/freebsd/current/src/sys/dev/an/if_an.c repl/dev/an/if_an.c --- /home/refugee/freebsd/current/src/sys/dev/an/if_an.c Sun Oct 31 04:52:20 2004 +++ repl/dev/an/if_an.c Tue Dec 14 00:49:52 2004 @@ -201,7 +201,7 @@ /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, an, CTLFLAG_RD, 0, "Wireless driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, an, CTLFLAG_RD, 0, "Wireless driver parameters", NULL); /* XXX violate ethernet/netgraph callback hooks */ extern void (*ng_ether_attach_p)(struct ifnet *ifp); @@ -230,7 +230,7 @@ break; } - error = sysctl_handle_string(oidp, an_conf, sizeof(an_conf), req); + error = sysctl_handle_string(oidp, an_conf, sizeof(an_conf), req, &Giant); if (strncmp(an_conf,"off", 3) == 0) { an_dump = 0; @@ -261,7 +261,7 @@ } SYSCTL_PROC(_hw_an, OID_AUTO, an_dump, CTLTYPE_STRING | CTLFLAG_RW, - 0, sizeof(an_conf), sysctl_an_dump, "A", ""); + 0, sizeof(an_conf), sysctl_an_dump, "A", "", &Giant); static int sysctl_an_cache_mode(SYSCTL_HANDLER_ARGS) @@ -283,7 +283,7 @@ } error = sysctl_handle_string(oidp, an_conf_cache, - sizeof(an_conf_cache), req); + sizeof(an_conf_cache), req, &Giant); if (strncmp(an_conf_cache,"dbm", 3) == 0) { an_cache_mode = 0; @@ -299,7 +299,7 @@ } SYSCTL_PROC(_hw_an, OID_AUTO, an_cache_mode, CTLTYPE_STRING | CTLFLAG_RW, - 0, sizeof(an_conf_cache), sysctl_an_cache_mode, "A", ""); + 0, sizeof(an_conf_cache), sysctl_an_cache_mode, "A", "", &Giant); /* * We probe for an Aironet 4500/4800 card by attempting to @@ -2975,13 +2975,13 @@ */ static int an_cache_mcastonly = 0; SYSCTL_INT(_hw_an, OID_AUTO, an_cache_mcastonly, CTLFLAG_RW, - &an_cache_mcastonly, 0, ""); + &an_cache_mcastonly, 0, "", &Giant); /* set true if you want to limit cache items to IP packets only */ static int an_cache_iponly = 1; SYSCTL_INT(_hw_an, OID_AUTO, an_cache_iponly, CTLFLAG_RW, - &an_cache_iponly, 0, ""); + &an_cache_iponly, 0, "", &Giant); /* * an_cache_store, per rx packet store signal diff -ur /home/refugee/freebsd/current/src/sys/dev/ata/ata-all.c repl/dev/ata/ata-all.c --- /home/refugee/freebsd/current/src/sys/dev/ata/ata-all.c Wed Dec 8 20:40:50 2004 +++ repl/dev/ata/ata-all.c Tue Dec 14 00:49:52 2004 @@ -88,16 +88,16 @@ static int atapi_dma = 1; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters", NULL); TUNABLE_INT("hw.ata.ata_dma", &ata_dma); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0, - "ATA disk DMA mode control"); + "ATA disk DMA mode control", &Giant); TUNABLE_INT("hw.ata.wc", &ata_wc); SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLAG_RDTUN, &ata_wc, 0, - "ATA disk write caching"); + "ATA disk write caching", &Giant); TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma); SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0, - "ATAPI device DMA mode control"); + "ATAPI device DMA mode control", &Giant); /* * newbus device interface related functions diff -ur /home/refugee/freebsd/current/src/sys/dev/ath/ath_rate/amrr/amrr.c repl/dev/ath/ath_rate/amrr/amrr.c --- /home/refugee/freebsd/current/src/sys/dev/ath/ath_rate/amrr/amrr.c Wed Dec 8 12:32:01 2004 +++ repl/dev/ath/ath_rate/amrr/amrr.c Tue Dec 14 00:49:52 2004 @@ -480,19 +480,19 @@ static void ath_rate_sysctlattach(struct ath_softc *sc) { - struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); - struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev, &Giant); + struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev, &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rate_interval", CTLFLAG_RW, &ath_rateinterval, 0, - "rate control: operation interval (ms)"); + "rate control: operation interval (ms)", &Giant); /* XXX bounds check values */ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "max_sucess_threshold", CTLFLAG_RW, - &ath_rate_max_success_threshold, 0, ""); + &ath_rate_max_success_threshold, 0, "", &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "min_sucess_threshold", CTLFLAG_RW, - &ath_rate_min_success_threshold, 0, ""); + &ath_rate_min_success_threshold, 0, "", &Giant); } struct ath_ratectrl * diff -ur /home/refugee/freebsd/current/src/sys/dev/ath/ath_rate/onoe/onoe.c repl/dev/ath/ath_rate/onoe/onoe.c --- /home/refugee/freebsd/current/src/sys/dev/ath/ath_rate/onoe/onoe.c Wed Dec 8 12:32:02 2004 +++ repl/dev/ath/ath_rate/onoe/onoe.c Tue Dec 14 00:49:52 2004 @@ -461,19 +461,19 @@ static void ath_rate_sysctlattach(struct ath_softc *sc) { - struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); - struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev, &Giant); + struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev, &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rate_interval", CTLFLAG_RW, &ath_rateinterval, 0, - "rate control: operation interval (ms)"); + "rate control: operation interval (ms)", &Giant); /* XXX bounds check values */ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rate_raise", CTLFLAG_RW, &ath_rate_raise, 0, - "rate control: retry threshold to credit rate raise (%%)"); + "rate control: retry threshold to credit rate raise (%%)", &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rate_raise_threshold", CTLFLAG_RW, &ath_rate_raise_threshold,0, - "rate control: # good periods before raising rate"); + "rate control: # good periods before raising rate", &Giant); } struct ath_ratectrl * diff -ur /home/refugee/freebsd/current/src/sys/dev/ath/if_ath.c repl/dev/ath/if_ath.c --- /home/refugee/freebsd/current/src/sys/dev/ath/if_ath.c Wed Dec 8 20:40:51 2004 +++ repl/dev/ath/if_ath.c Tue Dec 14 00:49:52 2004 @@ -172,30 +172,30 @@ /* XXX validate sysctl values */ static int ath_dwelltime = 200; /* 5 channels/second */ SYSCTL_INT(_hw_ath, OID_AUTO, dwell, CTLFLAG_RW, &ath_dwelltime, - 0, "channel dwell time (ms) for AP/station scanning"); + 0, "channel dwell time (ms) for AP/station scanning", &Giant); static int ath_calinterval = 30; /* calibrate every 30 secs */ SYSCTL_INT(_hw_ath, OID_AUTO, calibrate, CTLFLAG_RW, &ath_calinterval, - 0, "chip calibration interval (secs)"); + 0, "chip calibration interval (secs)", &Giant); static int ath_outdoor = AH_TRUE; /* outdoor operation */ SYSCTL_INT(_hw_ath, OID_AUTO, outdoor, CTLFLAG_RD, &ath_outdoor, - 0, "outdoor operation"); + 0, "outdoor operation", &Giant); TUNABLE_INT("hw.ath.outdoor", &ath_outdoor); static int ath_xchanmode = AH_TRUE; /* extended channel use */ SYSCTL_INT(_hw_ath, OID_AUTO, xchanmode, CTLFLAG_RD, &ath_xchanmode, - 0, "extended channel mode"); + 0, "extended channel mode", &Giant); TUNABLE_INT("hw.ath.xchanmode", &ath_xchanmode); static int ath_countrycode = CTRY_DEFAULT; /* country code */ SYSCTL_INT(_hw_ath, OID_AUTO, countrycode, CTLFLAG_RD, &ath_countrycode, - 0, "country code"); + 0, "country code", &Giant); TUNABLE_INT("hw.ath.countrycode", &ath_countrycode); static int ath_regdomain = 0; /* regulatory domain */ SYSCTL_INT(_hw_ath, OID_AUTO, regdomain, CTLFLAG_RD, &ath_regdomain, - 0, "regulatory domain"); + 0, "regulatory domain", &Giant); #ifdef AR_DEBUG static int ath_debug = 0; SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, - 0, "control debugging printfs"); + 0, "control debugging printfs", &Giant); TUNABLE_INT("hw.ath.debug", &ath_debug); enum { ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ @@ -4314,7 +4314,7 @@ u_int slottime = ath_hal_getslottime(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &slottime, 0, req); + error = sysctl_handle_int(oidp, &slottime, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_setslottime(sc->sc_ah, slottime) ? EINVAL : 0; @@ -4327,7 +4327,7 @@ u_int acktimeout = ath_hal_getacktimeout(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &acktimeout, 0, req); + error = sysctl_handle_int(oidp, &acktimeout, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_setacktimeout(sc->sc_ah, acktimeout) ? EINVAL : 0; @@ -4340,7 +4340,7 @@ u_int ctstimeout = ath_hal_getctstimeout(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &ctstimeout, 0, req); + error = sysctl_handle_int(oidp, &ctstimeout, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_setctstimeout(sc->sc_ah, ctstimeout) ? EINVAL : 0; @@ -4353,7 +4353,7 @@ int softled = sc->sc_softled; int error; - error = sysctl_handle_int(oidp, &softled, 0, req); + error = sysctl_handle_int(oidp, &softled, 0, req, &Giant); if (error || !req->newptr) return error; if (softled > 1) @@ -4374,7 +4374,7 @@ u_int defantenna = ath_hal_getdefantenna(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &defantenna, 0, req); + error = sysctl_handle_int(oidp, &defantenna, 0, req, &Giant); if (!error && req->newptr) ath_hal_setdefantenna(sc->sc_ah, defantenna); return error; @@ -4387,7 +4387,7 @@ u_int diversity = sc->sc_diversity; int error; - error = sysctl_handle_int(oidp, &diversity, 0, req); + error = sysctl_handle_int(oidp, &diversity, 0, req, &Giant); if (error || !req->newptr) return error; sc->sc_diversity = diversity; @@ -4403,7 +4403,7 @@ if (!ath_hal_getdiag(sc->sc_ah, &diag)) return EINVAL; - error = sysctl_handle_int(oidp, &diag, 0, req); + error = sysctl_handle_int(oidp, &diag, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_setdiag(sc->sc_ah, diag) ? EINVAL : 0; @@ -4418,7 +4418,7 @@ int error; ath_hal_gettpscale(sc->sc_ah, &scale); - error = sysctl_handle_int(oidp, &scale, 0, req); + error = sysctl_handle_int(oidp, &scale, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_settpscale(sc->sc_ah, scale) ? EINVAL : ath_reset(ifp); @@ -4431,7 +4431,7 @@ u_int tpc = ath_hal_gettpc(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &tpc, 0, req); + error = sysctl_handle_int(oidp, &tpc, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_settpc(sc->sc_ah, tpc) ? EINVAL : 0; @@ -4440,21 +4440,21 @@ static void ath_sysctlattach(struct ath_softc *sc) { - struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); - struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev, &Giant); + struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev, &Giant); ath_hal_getcountrycode(sc->sc_ah, &sc->sc_countrycode); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "countrycode", CTLFLAG_RD, &sc->sc_countrycode, 0, - "EEPROM country code"); + "EEPROM country code", &Giant); ath_hal_getregdomain(sc->sc_ah, &sc->sc_regdomain); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "regdomain", CTLFLAG_RD, &sc->sc_regdomain, 0, - "EEPROM regdomain code"); + "EEPROM regdomain code", &Giant); sc->sc_debug = ath_debug; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->sc_debug, 0, - "control debugging printfs"); + "control debugging printfs", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "slottime", CTLTYPE_INT | CTLFLAG_RW, sc, 0, @@ -4470,10 +4470,10 @@ ath_sysctl_softled, "I", "enable/disable software LED support"); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ledpin", CTLFLAG_RW, &sc->sc_ledpin, 0, - "GPIO pin connected to LED"); + "GPIO pin connected to LED", &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "txantenna", CTLFLAG_RW, &sc->sc_txantenna, 0, - "tx antenna (0=auto)"); + "tx antenna (0=auto)", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rxantenna", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_rxantenna, "I", "default/rx antenna"); @@ -4484,7 +4484,7 @@ sc->sc_txintrperiod = ATH_TXINTR_PERIOD; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "txintrperiod", CTLFLAG_RW, &sc->sc_txintrperiod, 0, - "tx descriptor batching"); + "tx descriptor batching", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "diag", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_diag, "I", "h/w diagnostic control"); diff -ur /home/refugee/freebsd/current/src/sys/dev/bktr/bktr_os.c repl/dev/bktr/bktr_os.c --- /home/refugee/freebsd/current/src/sys/dev/bktr/bktr_os.c Sun Oct 31 04:52:11 2004 +++ repl/dev/bktr/bktr_os.c Tue Dec 14 00:49:50 2004 @@ -116,16 +116,16 @@ int bt848_dolby = 0; #endif -SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW, 0, "Bt848 Driver mgmt"); -SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, ""); +SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW, 0, "Bt848 Driver mgmt", NULL); +SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, "", &Giant); #ifdef BKTR_NEW_MSP34XX_DRIVER -SYSCTL_INT(_hw_bt848, OID_AUTO, stereo_once, CTLFLAG_RW, &bt848_stereo_once, 0, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, amsound, CTLFLAG_RW, &bt848_amsound, 0, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, dolby, CTLFLAG_RW, &bt848_dolby, 0, ""); +SYSCTL_INT(_hw_bt848, OID_AUTO, stereo_once, CTLFLAG_RW, &bt848_stereo_once, 0, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, amsound, CTLFLAG_RW, &bt848_amsound, 0, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, dolby, CTLFLAG_RW, &bt848_dolby, 0, "", &Giant); #endif #endif /* end freebsd section */ diff -ur /home/refugee/freebsd/current/src/sys/dev/cardbus/cardbus.c repl/dev/cardbus/cardbus.c --- /home/refugee/freebsd/current/src/sys/dev/cardbus/cardbus.c Sun Oct 31 04:51:57 2004 +++ repl/dev/cardbus/cardbus.c Tue Dec 14 00:49:49 2004 @@ -56,19 +56,19 @@ #include "pcib_if.h" /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, cardbus, CTLFLAG_RD, 0, "CardBus parameters"); +SYSCTL_NODE(_hw, OID_AUTO, cardbus, CTLFLAG_RD, 0, "CardBus parameters", NULL); int cardbus_debug = 0; TUNABLE_INT("hw.cardbus.debug", &cardbus_debug); SYSCTL_INT(_hw_cardbus, OID_AUTO, debug, CTLFLAG_RW, &cardbus_debug, 0, - "CardBus debug"); + "CardBus debug", &Giant); int cardbus_cis_debug = 0; TUNABLE_INT("hw.cardbus.cis_debug", &cardbus_cis_debug); SYSCTL_INT(_hw_cardbus, OID_AUTO, cis_debug, CTLFLAG_RW, &cardbus_cis_debug, 0, - "CardBus CIS debug"); + "CardBus CIS debug", &Giant); #define DPRINTF(a) if (cardbus_debug) printf a #define DEVPRINTF(x) if (cardbus_debug) device_printf x diff -ur /home/refugee/freebsd/current/src/sys/dev/cs/if_cs.c repl/dev/cs/if_cs.c --- /home/refugee/freebsd/current/src/sys/dev/cs/if_cs.c Sun Oct 31 04:51:45 2004 +++ repl/dev/cs/if_cs.c Tue Dec 14 00:49:48 2004 @@ -99,23 +99,23 @@ devclass_t cs_devclass; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, cs, CTLFLAG_RD, 0, "cs device parameters"); +SYSCTL_NODE(_hw, OID_AUTO, cs, CTLFLAG_RD, 0, "cs device parameters", NULL); int cs_debug = 0; TUNABLE_INT("hw.cs.debug", &cs_debug); SYSCTL_INT(_hw_cs, OID_AUTO, debug, CTLFLAG_RW, &cs_debug, 0, - "cs debug"); + "cs debug", &Giant); int cs_ignore_cksum_failure = 0; TUNABLE_INT("hw.cs.ignore_checksum_failure", &cs_ignore_cksum_failure); SYSCTL_INT(_hw_cs, OID_AUTO, ignore_checksum_failure, CTLFLAG_RW, &cs_ignore_cksum_failure, 0, - "ignore checksum errors in cs card EEPROM"); + "ignore checksum errors in cs card EEPROM", &Giant); static int cs_recv_delay = 570; TUNABLE_INT("hw.cs.recv_delay", &cs_ignore_cksum_failure); -SYSCTL_INT(_hw_cs, OID_AUTO, recv_delay, CTLFLAG_RW, &cs_recv_delay, 570, ""); +SYSCTL_INT(_hw_cs, OID_AUTO, recv_delay, CTLFLAG_RW, &cs_recv_delay, 570, "", &Giant); static int get_eeprom_data(struct cs_softc *sc, int off, int len, uint16_t *buffer) diff -ur /home/refugee/freebsd/current/src/sys/dev/dcons/dcons_os.c repl/dev/dcons/dcons_os.c --- /home/refugee/freebsd/current/src/sys/dev/dcons/dcons_os.c Sun Oct 31 05:07:37 2004 +++ repl/dev/dcons/dcons_os.c Tue Dec 14 00:49:50 2004 @@ -144,9 +144,9 @@ static struct dcons_softc sc[DCONS_NPORT]; -SYSCTL_NODE(_kern, OID_AUTO, dcons, CTLFLAG_RD, 0, "Dumb Console"); +SYSCTL_NODE(_kern, OID_AUTO, dcons, CTLFLAG_RD, 0, "Dumb Console", NULL); SYSCTL_INT(_kern_dcons, OID_AUTO, poll_hz, CTLFLAG_RW, &poll_hz, 0, - "dcons polling rate"); + "dcons polling rate", &Giant); static int drv_init = 0; static struct callout dcons_callout; diff -ur /home/refugee/freebsd/current/src/sys/dev/em/if_em.c repl/dev/em/if_em.c --- /home/refugee/freebsd/current/src/sys/dev/em/if_em.c Sun Nov 21 00:02:53 2004 +++ repl/dev/em/if_em.c Tue Dec 14 00:49:49 2004 @@ -173,12 +173,12 @@ static void em_dma_free(struct adapter *, struct em_dma_alloc *); static void em_print_debug_info(struct adapter *); static int em_is_valid_ether_addr(u_int8_t *); -static int em_sysctl_stats(SYSCTL_HANDLER_ARGS); -static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS); +static int em_sysctl_stats(SYSCTL_HANDLER_ARGS, &Giant); +static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS, &Giant); static u_int32_t em_fill_descriptors (u_int64_t address, u_int32_t length, PDESC_ARRAY desc_array); -static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); +static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS, &Giant); static void em_add_int_delay_sysctl(struct adapter *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -3337,7 +3337,7 @@ struct adapter *adapter; result = -1; - error = sysctl_handle_int(oidp, &result, 0, req); + error = sysctl_handle_int(oidp, &result, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -3359,7 +3359,7 @@ struct adapter *adapter; result = -1; - error = sysctl_handle_int(oidp, &result, 0, req); + error = sysctl_handle_int(oidp, &result, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -3386,7 +3386,7 @@ info = (struct em_int_delay_info *)arg1; adapter = info->adapter; usecs = info->value; - error = sysctl_handle_int(oidp, &usecs, 0, req); + error = sysctl_handle_int(oidp, &usecs, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return error; if (usecs < 0 || usecs > E1000_TICKS_TO_USECS(65535)) diff -ur /home/refugee/freebsd/current/src/sys/dev/en/midway.c repl/dev/en/midway.c --- /home/refugee/freebsd/current/src/sys/dev/en/midway.c Sun Oct 31 04:52:00 2004 +++ repl/dev/en/midway.c Tue Dec 14 00:49:49 2004 @@ -2908,7 +2908,7 @@ /* * Make the sysctl tree */ - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); if ((sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw_atm), OID_AUTO, @@ -3082,7 +3082,7 @@ if (sc->txtag != NULL) bus_dma_tag_destroy(sc->txtag); - (void)sysctl_ctx_free(&sc->sysctl_ctx); + (void)sysctl_ctx_free(&sc->sysctl_ctx, &Giant); cv_destroy(&sc->cv_close); mtx_destroy(&sc->en_mtx); diff -ur /home/refugee/freebsd/current/src/sys/dev/fatm/if_fatm.c repl/dev/fatm/if_fatm.c --- /home/refugee/freebsd/current/src/sys/dev/fatm/if_fatm.c Sun Oct 31 04:52:09 2004 +++ repl/dev/fatm/if_fatm.c Tue Dec 14 00:49:50 2004 @@ -2613,7 +2613,7 @@ bus_release_resource(dev, SYS_RES_MEMORY, sc->memid, sc->memres); - (void)sysctl_ctx_free(&sc->sysctl_ctx); + (void)sysctl_ctx_free(&sc->sysctl_ctx, &Giant); cv_destroy(&sc->cv_stat); cv_destroy(&sc->cv_regs); @@ -2767,7 +2767,7 @@ cv_init(&sc->cv_stat, "fatm_stat"); cv_init(&sc->cv_regs, "fatm_regs"); - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); /* * Make the sysctl tree diff -ur /home/refugee/freebsd/current/src/sys/dev/fdc/fdc.c repl/dev/fdc/fdc.c --- /home/refugee/freebsd/current/src/sys/dev/fdc/fdc.c Wed Dec 8 20:40:55 2004 +++ repl/dev/fdc/fdc.c Tue Dec 14 00:49:47 2004 @@ -256,31 +256,31 @@ static driver_intr_t fdc_intr; static void fdc_reset(struct fdc_data *); -SYSCTL_NODE(_debug, OID_AUTO, fdc, CTLFLAG_RW, 0, "fdc driver"); +SYSCTL_NODE(_debug, OID_AUTO, fdc, CTLFLAG_RW, 0, "fdc driver", NULL); static int fifo_threshold = 8; SYSCTL_INT(_debug_fdc, OID_AUTO, fifo, CTLFLAG_RW, &fifo_threshold, 0, - "FIFO threshold setting"); + "FIFO threshold setting", &Giant); static int debugflags = 0; SYSCTL_INT(_debug_fdc, OID_AUTO, debugflags, CTLFLAG_RW, &debugflags, 0, - "Debug flags"); + "Debug flags", &Giant); static int retries = 10; SYSCTL_INT(_debug_fdc, OID_AUTO, retries, CTLFLAG_RW, &retries, 0, - "Number of retries to attempt"); + "Number of retries to attempt", &Giant); static int spec1 = 0xaf; SYSCTL_INT(_debug_fdc, OID_AUTO, spec1, CTLFLAG_RW, &spec1, 0, - "Specification byte one (step-rate + head unload)"); + "Specification byte one (step-rate + head unload)", &Giant); static int spec2 = 0x10; SYSCTL_INT(_debug_fdc, OID_AUTO, spec2, CTLFLAG_RW, &spec2, 0, - "Specification byte two (head load time + no-dma)"); + "Specification byte two (head load time + no-dma)", &Giant); static int settle; SYSCTL_INT(_debug_fdc, OID_AUTO, settle, CTLFLAG_RW, &settle, 0, - "Head settling time in sec/hz"); + "Head settling time in sec/hz", &Giant); static void fdprinttype(struct fd_type *ft) diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/firewire.c repl/dev/firewire/firewire.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/firewire.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/firewire.c Tue Dec 14 00:49:48 2004 @@ -75,12 +75,12 @@ int firewire_debug=0, try_bmr=1, hold_count=3; SYSCTL_INT(_debug, OID_AUTO, firewire_debug, CTLFLAG_RW, &firewire_debug, 0, - "FireWire driver debug flag"); -SYSCTL_NODE(_hw, OID_AUTO, firewire, CTLFLAG_RD, 0, "FireWire Subsystem"); + "FireWire driver debug flag", &Giant); +SYSCTL_NODE(_hw, OID_AUTO, firewire, CTLFLAG_RD, 0, "FireWire Subsystem", NULL); SYSCTL_INT(_hw_firewire, OID_AUTO, try_bmr, CTLFLAG_RW, &try_bmr, 0, - "Try to be a bus manager"); + "Try to be a bus manager", &Giant); SYSCTL_INT(_hw_firewire, OID_AUTO, hold_count, CTLFLAG_RW, &hold_count, 0, - "Number of count of bus resets for removing lost device information"); + "Number of count of bus resets for removing lost device information", &Giant); MALLOC_DEFINE(M_FW, "firewire", "FireWire"); MALLOC_DEFINE(M_FWXFER, "fw_xfer", "XFER/FireWire"); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/fwmem.c repl/dev/firewire/fwmem.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/fwmem.c Sun Nov 14 03:56:04 2004 +++ repl/dev/firewire/fwmem.c Tue Dec 14 00:49:48 2004 @@ -76,13 +76,13 @@ SYSCTL_NODE(_hw_firewire, OID_AUTO, fwmem, CTLFLAG_RD, 0, "FireWire Memory Access"); SYSCTL_UINT(_hw_firewire_fwmem, OID_AUTO, eui64_hi, CTLFLAG_RW, - &fwmem_eui64.hi, 0, "Fwmem target EUI64 high"); + &fwmem_eui64.hi, 0, "Fwmem target EUI64 high", &Giant); SYSCTL_UINT(_hw_firewire_fwmem, OID_AUTO, eui64_lo, CTLFLAG_RW, - &fwmem_eui64.lo, 0, "Fwmem target EUI64 low"); + &fwmem_eui64.lo, 0, "Fwmem target EUI64 low", &Giant); SYSCTL_INT(_hw_firewire_fwmem, OID_AUTO, speed, CTLFLAG_RW, &fwmem_speed, 0, - "Fwmem link speed"); + "Fwmem link speed", &Giant); SYSCTL_INT(_debug, OID_AUTO, fwmem_debug, CTLFLAG_RW, &fwmem_debug, 0, - "Fwmem driver debug flag"); + "Fwmem driver debug flag", &Giant); MALLOC_DEFINE(M_FWMEM, "fwmem", "fwmem/FireWire"); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/if_fwe.c repl/dev/firewire/if_fwe.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/if_fwe.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/if_fwe.c Tue Dec 14 00:49:48 2004 @@ -83,16 +83,16 @@ static int rx_queue_len = FWMAXQUEUE; MALLOC_DEFINE(M_FWE, "if_fwe", "Ethernet over FireWire interface"); -SYSCTL_INT(_debug, OID_AUTO, if_fwe_debug, CTLFLAG_RW, &fwedebug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, if_fwe_debug, CTLFLAG_RW, &fwedebug, 0, "", &Giant); SYSCTL_DECL(_hw_firewire); SYSCTL_NODE(_hw_firewire, OID_AUTO, fwe, CTLFLAG_RD, 0, "Ethernet emulation subsystem"); SYSCTL_INT(_hw_firewire_fwe, OID_AUTO, stream_ch, CTLFLAG_RW, &stream_ch, 0, - "Stream channel to use"); + "Stream channel to use", &Giant); SYSCTL_INT(_hw_firewire_fwe, OID_AUTO, tx_speed, CTLFLAG_RW, &tx_speed, 0, - "Transmission speed"); + "Transmission speed", &Giant); SYSCTL_INT(_hw_firewire_fwe, OID_AUTO, rx_queue_len, CTLFLAG_RW, &rx_queue_len, - 0, "Length of the receive queue"); + 0, "Length of the receive queue", &Giant); TUNABLE_INT("hw.firewire.fwe.stream_ch", &stream_ch); TUNABLE_INT("hw.firewire.fwe.tx_speed", &tx_speed); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/if_fwip.c repl/dev/firewire/if_fwip.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/if_fwip.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/if_fwip.c Tue Dec 14 00:49:48 2004 @@ -96,12 +96,12 @@ static int rx_queue_len = FWMAXQUEUE; MALLOC_DEFINE(M_FWIP, "if_fwip", "IP over FireWire interface"); -SYSCTL_INT(_debug, OID_AUTO, if_fwip_debug, CTLFLAG_RW, &fwipdebug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, if_fwip_debug, CTLFLAG_RW, &fwipdebug, 0, "", &Giant); SYSCTL_DECL(_hw_firewire); SYSCTL_NODE(_hw_firewire, OID_AUTO, fwip, CTLFLAG_RD, 0, "Firewire ip subsystem"); SYSCTL_INT(_hw_firewire_fwip, OID_AUTO, rx_queue_len, CTLFLAG_RW, &rx_queue_len, - 0, "Length of the receive queue"); + 0, "Length of the receive queue", &Giant); TUNABLE_INT("hw.firewire.fwip.rx_queue_len", &rx_queue_len); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/sbp.c repl/dev/firewire/sbp.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/sbp.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/sbp.c Tue Dec 14 00:49:48 2004 @@ -131,23 +131,23 @@ static int sbp_tags = 0; SYSCTL_DECL(_hw_firewire); -SYSCTL_NODE(_hw_firewire, OID_AUTO, sbp, CTLFLAG_RD, 0, "SBP-II Subsystem"); +SYSCTL_NODE(_hw_firewire, OID_AUTO, sbp, CTLFLAG_RD, 0, "SBP-II Subsystem", NULL); SYSCTL_INT(_debug, OID_AUTO, sbp_debug, CTLFLAG_RW, &debug, 0, - "SBP debug flag"); + "SBP debug flag", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, auto_login, CTLFLAG_RW, &auto_login, 0, - "SBP perform login automatically"); + "SBP perform login automatically", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, max_speed, CTLFLAG_RW, &max_speed, 0, - "SBP transfer max speed"); + "SBP transfer max speed", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, exclusive_login, CTLFLAG_RW, - &ex_login, 0, "SBP enable exclusive login"); + &ex_login, 0, "SBP enable exclusive login", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, login_delay, CTLFLAG_RW, - &login_delay, 0, "SBP login delay in msec"); + &login_delay, 0, "SBP login delay in msec", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, scan_delay, CTLFLAG_RW, - &scan_delay, 0, "SBP scan delay in msec"); + &scan_delay, 0, "SBP scan delay in msec", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, use_doorbell, CTLFLAG_RW, - &use_doorbell, 0, "SBP use doorbell request"); + &use_doorbell, 0, "SBP use doorbell request", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, tags, CTLFLAG_RW, &sbp_tags, 0, - "SBP tagged queuing support"); + "SBP tagged queuing support", &Giant); TUNABLE_INT("hw.firewire.sbp.auto_login", &auto_login); TUNABLE_INT("hw.firewire.sbp.max_speed", &max_speed); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/sbp_targ.c repl/dev/firewire/sbp_targ.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/sbp_targ.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/sbp_targ.c Tue Dec 14 00:49:48 2004 @@ -99,7 +99,7 @@ static int debug = 0; SYSCTL_INT(_debug, OID_AUTO, sbp_targ_debug, CTLFLAG_RW, &debug, 0, - "SBP target mode debug flag"); + "SBP target mode debug flag", &Giant); struct sbp_targ_login { struct sbp_targ_lstate *lstate; diff -ur /home/refugee/freebsd/current/src/sys/dev/fxp/if_fxp.c repl/dev/fxp/if_fxp.c --- /home/refugee/freebsd/current/src/sys/dev/fxp/if_fxp.c Sun Nov 21 00:02:53 2004 +++ repl/dev/fxp/if_fxp.c Tue Dec 14 00:49:51 2004 @@ -242,9 +242,9 @@ int value); static void fxp_load_ucode(struct fxp_softc *sc); static int sysctl_int_range(SYSCTL_HANDLER_ARGS, - int low, int high); -static int sysctl_hw_fxp_bundle_max(SYSCTL_HANDLER_ARGS); -static int sysctl_hw_fxp_int_delay(SYSCTL_HANDLER_ARGS); + int low, int high, &Giant); +static int sysctl_hw_fxp_bundle_max(SYSCTL_HANDLER_ARGS, &Giant); +static int sysctl_hw_fxp_int_delay(SYSCTL_HANDLER_ARGS, &Giant); static void fxp_scb_wait(struct fxp_softc *sc); static void fxp_scb_cmd(struct fxp_softc *sc, int cmd); static void fxp_dma_wait(struct fxp_softc *sc, @@ -460,20 +460,20 @@ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "int_delay", CTLTYPE_INT | CTLFLAG_RW, &sc->tunable_int_delay, 0, sysctl_hw_fxp_int_delay, "I", - "FXP driver receive interrupt microcode bundling delay"); + "FXP driver receive interrupt microcode bundling delay", &Giant); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "bundle_max", CTLTYPE_INT | CTLFLAG_RW, &sc->tunable_bundle_max, 0, sysctl_hw_fxp_bundle_max, "I", - "FXP driver receive interrupt microcode bundle size limit"); + "FXP driver receive interrupt microcode bundle size limit", &Giant); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rnr", CTLFLAG_RD, &sc->rnr, 0, - "FXP RNR events"); + "FXP RNR events", &Giant); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "noflow", CTLFLAG_RW, &sc->tunable_noflow, 0, - "FXP flow control disabled"); + "FXP flow control disabled", &Giant); /* * Pull in device tunables. @@ -2693,7 +2693,7 @@ int error, value; value = *(int *)arg1; - error = sysctl_handle_int(oidp, &value, 0, req); + error = sysctl_handle_int(oidp, &value, 0, req, &Giant); if (error || !req->newptr) return (error); if (value < low || value > high) @@ -2709,11 +2709,11 @@ static int sysctl_hw_fxp_int_delay(SYSCTL_HANDLER_ARGS) { - return (sysctl_int_range(oidp, arg1, arg2, req, 300, 3000)); + return (sysctl_int_range(oidp, arg1, arg2, req, 300, 3000), &Giant); } static int sysctl_hw_fxp_bundle_max(SYSCTL_HANDLER_ARGS) { - return (sysctl_int_range(oidp, arg1, arg2, req, 1, 0xffff)); + return (sysctl_int_range(oidp, arg1, arg2, req, 1, 0xffff), &Giant); } diff -ur /home/refugee/freebsd/current/src/sys/dev/hatm/if_hatm.c repl/dev/hatm/if_hatm.c --- /home/refugee/freebsd/current/src/sys/dev/hatm/if_hatm.c Sun Oct 31 04:51:58 2004 +++ repl/dev/hatm/if_hatm.c Tue Dec 14 00:49:49 2004 @@ -491,7 +491,7 @@ bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->memid, sc->memres); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); cv_destroy(&sc->cv_rcclose); cv_destroy(&sc->vcc_cv); @@ -1309,7 +1309,7 @@ if (SYSCTL_ADD_UINT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, var, rw ? CTLFLAG_RW : CTLFLAG_RD, ptr, 0, "") == NULL) - return (ENOMEM); + return (ENOMEM, &Giant); snprintf(full, sizeof(full), "hw.%s.%s", device_get_nameunit(sc->dev), var); @@ -1669,7 +1669,7 @@ cv_init(&sc->vcc_cv, "HEVCCcv"); cv_init(&sc->cv_rcclose, "RCClose"); - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); /* * 4.2 BIOS Configuration diff -ur /home/refugee/freebsd/current/src/sys/dev/hatm/if_hatm_ioctl.c repl/dev/hatm/if_hatm_ioctl.c --- /home/refugee/freebsd/current/src/sys/dev/hatm/if_hatm_ioctl.c Sun Oct 31 04:51:58 2004 +++ repl/dev/hatm/if_hatm_ioctl.c Tue Dec 14 00:49:49 2004 @@ -78,15 +78,15 @@ static u_int hatm_natm_traffic = ATMIO_TRAFFIC_UBR; static u_int hatm_natm_pcr = 0; -static int hatm_sysctl_natm_traffic(SYSCTL_HANDLER_ARGS); +static int hatm_sysctl_natm_traffic(SYSCTL_HANDLER_ARGS, &Giant); SYSCTL_DECL(_hw_atm); SYSCTL_PROC(_hw_atm, OID_AUTO, natm_traffic, CTLTYPE_UINT | CTLFLAG_RW, &hatm_natm_traffic, sizeof(hatm_natm_traffic), hatm_sysctl_natm_traffic, - "IU", "traffic type for NATM connections"); + "IU", "traffic type for NATM connections", &Giant); SYSCTL_UINT(_hw_atm, OID_AUTO, natm_pcr, CTLFLAG_RW, - &hatm_natm_pcr, 0, "PCR for NATM connections"); + &hatm_natm_pcr, 0, "PCR for NATM connections", &Giant); /* * Try to open the given VCC. @@ -372,7 +372,7 @@ int tmp; tmp = hatm_natm_traffic; - error = sysctl_handle_int(oidp, &tmp, 0, req); + error = sysctl_handle_int(oidp, &tmp, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return (error); diff -ur /home/refugee/freebsd/current/src/sys/dev/idt/idt.c repl/dev/idt/idt.c --- /home/refugee/freebsd/current/src/sys/dev/idt/idt.c Sun Oct 31 04:51:37 2004 +++ repl/dev/idt/idt.c Tue Dec 14 00:49:46 2004 @@ -165,25 +165,25 @@ static int idt_sysctl_qptrhold = 1; /* hold TX queue pointer back */ int idt_sysctl_vbriscbr = 0; /* use CBR slots for VBR VC's */ -SYSCTL_NODE(_hw, OID_AUTO, idt, CTLFLAG_RW, 0, "IDT Nicstar"); +SYSCTL_NODE(_hw, OID_AUTO, idt, CTLFLAG_RW, 0, "IDT Nicstar", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, log_bufstat, CTLFLAG_RW, - &idt_sysctl_logbufs, 0, "Log buffer status"); + &idt_sysctl_logbufs, 0, "Log buffer status", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, log_vcs, CTLFLAG_RW, - &idt_sysctl_logvcs, 0, "Log VC open/close"); + &idt_sysctl_logvcs, 0, "Log VC open/close", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, bufs_large, CTLFLAG_RW, - &idt_sysctl_buflarge, IDT_LBUFS, "Large buffer queue"); + &idt_sysctl_buflarge, IDT_LBUFS, "Large buffer queue", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, bufs_small, CTLFLAG_RW, - &idt_sysctl_bufsmall, IDT_SBUFS, "Small buffer queue"); + &idt_sysctl_bufsmall, IDT_SBUFS, "Small buffer queue", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, cur_large, CTLFLAG_RD, - &idt_sysctl_curlarge, 0, "Current large queue"); + &idt_sysctl_curlarge, 0, "Current large queue", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, cur_small, CTLFLAG_RD, - &idt_sysctl_cursmall, 0, "Current small queue"); + &idt_sysctl_cursmall, 0, "Current small queue", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, qptr_hold, CTLFLAG_RW, - &idt_sysctl_qptrhold, 1, "Optimize TX queue ptr"); + &idt_sysctl_qptrhold, 1, "Optimize TX queue ptr", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, vbr_is_cbr, CTLFLAG_RW, - &idt_sysctl_vbriscbr, 0, "Use CBR for VBR VC's"); + &idt_sysctl_vbriscbr, 0, "Use CBR for VBR VC's", &Giant); /****************************************************************************** * @@ -1178,7 +1178,7 @@ idt_sysctl_buflarge = 10; while (card_small < idt_sysctl_bufsmall) { /* 05/25/2001 from fixed */ - MGETHDR(m1, M_DONTWAIT, MT_DATA); + MGETHDR(m1, M_DONTWAIT, MT_DATA, &Giant); if (m1 == NULL) break; MGETHDR(m2, M_DONTWAIT, MT_DATA); @@ -1201,7 +1201,7 @@ } while (card_large < idt_sysctl_buflarge) { /* 05/25/2001 from fixed */ - m1 = idt_mbufcl_get(); + m1 = idt_mbufcl_get(, &Giant); if (m1 == NULL) break; m2 = idt_mbufcl_get(); @@ -1281,7 +1281,7 @@ device_printf(idt->dev, "BUFFER STATUS: small=%d/%d, large=%d/%d.\n", card_small, idt_sysctl_bufsmall, - card_large, idt_sysctl_buflarge); + card_large, idt_sysctl_buflarge, &Giant); } /* Since this is called when the card timer wraps, we should only see @@ -1633,13 +1633,13 @@ if (pcr == 171) { if (idt_sysctl_logvcs) device_printf(idt->dev, - "idt_slots_cbr: CBR channel=64000, 1 slot\n"); + "idt_slots_cbr: CBR channel=64000, 1 slot\n", &Giant); return (1); } if (pcr < 171) { if (idt_sysctl_logvcs) device_printf(idt->dev, - "idt_slots_cbr: CBR pcr %d rounded up to 1 slot\n", pcr); + "idt_slots_cbr: CBR pcr %d rounded up to 1 slot\n", pcr, &Giant); return (1); } bitrate = pcr * 47 * 8; @@ -1652,7 +1652,7 @@ if (idt_sysctl_logvcs) device_printf(idt->dev, - "idt_slots_cbr: CBR pcr=%d, slots=%d.\n", pcr, slots); + "idt_slots_cbr: CBR pcr=%d, slots=%d.\n", pcr, slots, &Giant); return (slots); } @@ -1813,14 +1813,14 @@ connection->queue = &idt->queue_ubr; if (idt_sysctl_logvcs) printf("idt_connect_txopen: UBR connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); return (0); } if (connection->class == T_ATM_ABR) { /* ABR treated as UBR-plus */ connection->queue = &idt->queue_abr; if (idt_sysctl_logvcs) printf("idt_connect_txopen: UBR+ connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); return (0); } if (connection->class == T_ATM_CBR) { @@ -1848,7 +1848,7 @@ splx(s); if (idt_sysctl_logvcs) printf("idt_connect_txopen: CBR connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); connection->queue = txqueue; } if (connection->class == T_ATM_VBR) { @@ -1858,7 +1858,7 @@ * 12/17/2000 */ if (idt_sysctl_logvcs) printf("idt_connect_txopen: VBR connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); } idt_connect_newvbr(idt);/* recalculate VBR divisor values */ @@ -1890,7 +1890,7 @@ txqueue = connection->queue; if (idt_sysctl_logvcs) printf("idt_connect_txclose: closing connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); idt_queue_flush(connection); /* flush all connection mbufs */ @@ -1963,11 +1963,11 @@ divisor /= rate_noncbr; /* always < 1000, since newvbr < noncbr */ if (idt_sysctl_logvcs) - printf("idt_connect_newvbr: divisor=%d\n", divisor); + printf("idt_connect_newvbr: divisor=%d\n", divisor, &Giant); txqueue->vbr_m = vbr_div_m[divisor]; txqueue->vbr_n = vbr_div_n[divisor]; if (idt_sysctl_logvcs) - printf("idt_connect_newvbr: m=%d, n=%d\n", txqueue->vbr_m, txqueue->vbr_n); + printf("idt_connect_newvbr: m=%d, n=%d\n", txqueue->vbr_m, txqueue->vbr_n, &Giant); } /* For VBR, we track the sum of all the VBR peak cellrates, and divide @@ -2514,7 +2514,7 @@ * alignment problem is at 'malign' */ if (idt_sysctl_logvcs) - device_printf(idt->dev, "Bad TX buf alignment, len=%d.\n", tot_size); + device_printf(idt->dev, "Bad TX buf alignment, len=%d.\n", tot_size, &Giant); if (idt_mbuf_align(mfirst, NULL)) { printf("idt_transmit: cannot align first mbuf.\n"); @@ -3282,7 +3282,7 @@ * status */ } if (stat_val & STAT_REG_PHY) { /* physical interrupt */ - nicstar_phys(idt); + nicstar_phys(idt, &Giant); *idt->reg_stat = STAT_REG_PHY; /* clear the int flag */ } if (stat_val & STAT_REG_RSQAF) { /* RSQ almost full */ diff -ur /home/refugee/freebsd/current/src/sys/dev/idt/idt_harp.c repl/dev/idt/idt_harp.c --- /home/refugee/freebsd/current/src/sys/dev/idt/idt_harp.c Sun Oct 31 04:51:37 2004 +++ repl/dev/idt/idt_harp.c Tue Dec 14 00:49:46 2004 @@ -271,7 +271,7 @@ if (idt_sysctl_vbriscbr) return (NICCBR); /* use CBR slots for VBR VC's */ else - return (NICVBR); + return (NICVBR, &Giant); case T_ATM_CLASS_X: if (bearer->v.traffic_type == T_ATM_CBR) return (NICCBR); @@ -520,7 +520,7 @@ } if (idt_sysctl_logvcs) printf("idt_openvcc: %d/%d, PCR=%d, SCR=%d\n", vpi, vci, - connection->traf_pcr, connection->traf_scr); + connection->traf_pcr, connection->traf_scr, &Giant); idt_connect_opencls(idt, connection, 1); /* open entry in rcv * connect table */ @@ -577,7 +577,7 @@ connection->traf_scr = 0; if (idt_sysctl_logvcs) - printf("idt_closevcc: vpi=%d vci=%d\n", vpi, vci); + printf("idt_closevcc: vpi=%d vci=%d\n", vpi, vci, &Giant); return (0); } @@ -643,7 +643,7 @@ if (idt_sysctl_logvcs) device_printf(idt->dev, "Insufficient bandwidth (vc=%d cur=%d max=%d)\n", - slots_vc, slots_cur, slots_max); + slots_vc, slots_cur, slots_max, &Giant); return (EINVAL); } } diff -ur /home/refugee/freebsd/current/src/sys/dev/if_ndis/if_ndis.c repl/dev/if_ndis/if_ndis.c --- /home/refugee/freebsd/current/src/sys/dev/if_ndis/if_ndis.c Wed Dec 8 20:40:55 2004 +++ repl/dev/if_ndis/if_ndis.c Tue Dec 14 00:49:48 2004 @@ -401,7 +401,7 @@ sc->ndis_regvals = ndis_regvals; #if __FreeBSD_version < 502113 - sysctl_ctx_init(&sc->ndis_ctx); + sysctl_ctx_init(&sc->ndis_ctx, &Giant); #endif /* Create sysctl registry nodes */ @@ -771,7 +771,7 @@ bus_dma_tag_destroy(sc->ndis_parent_tag); #if __FreeBSD_version < 502113 - sysctl_ctx_free(&sc->ndis_ctx); + sysctl_ctx_free(&sc->ndis_ctx, &Giant); #endif mtx_destroy(&sc->ndis_mtx); diff -ur /home/refugee/freebsd/current/src/sys/dev/ixgb/if_ixgb.c repl/dev/ixgb/if_ixgb.c --- /home/refugee/freebsd/current/src/sys/dev/ixgb/if_ixgb.c Sun Oct 31 04:52:16 2004 +++ repl/dev/ixgb/if_ixgb.c Tue Dec 14 00:49:51 2004 @@ -134,7 +134,7 @@ struct mbuf *); static void ixgb_enable_vlans(struct adapter * adapter); static int ixgb_encap(struct adapter * adapter, struct mbuf * m_head); -static int ixgb_sysctl_stats(SYSCTL_HANDLER_ARGS); +static int ixgb_sysctl_stats(SYSCTL_HANDLER_ARGS, &Giant); static int ixgb_dma_malloc(struct adapter *, bus_size_t, struct ixgb_dma_alloc *, int); @@ -259,13 +259,13 @@ ixgb_adapter_list = adapter; /* SYSCTL APIs */ - sysctl_ctx_init(&adapter->sysctl_ctx); + sysctl_ctx_init(&adapter->sysctl_ctx, &Giant); adapter->sysctl_tree = SYSCTL_ADD_NODE(&adapter->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_nameunit(dev), CTLFLAG_RD, - 0, ""); + 0, "", &Giant); if (adapter->sysctl_tree == NULL) { error = EIO; goto err_sysctl; @@ -354,7 +354,7 @@ err_tx_desc: err_pci: ixgb_free_pci_resources(adapter); - sysctl_ctx_free(&adapter->sysctl_ctx); + sysctl_ctx_free(&adapter->sysctl_ctx, &Giant); err_sysctl: splx(s); return (error); @@ -415,7 +415,7 @@ ifp->if_timer = 0; adapter->sysctl_tree = NULL; - sysctl_ctx_free(&adapter->sysctl_ctx); + sysctl_ctx_free(&adapter->sysctl_ctx, &Giant); splx(s); return (0); @@ -2472,7 +2472,7 @@ struct adapter *adapter; result = -1; - error = sysctl_handle_int(oidp, &result, 0, req); + error = sysctl_handle_int(oidp, &result, 0, req, &Giant); if (error || !req->newptr) return (error); diff -ur /home/refugee/freebsd/current/src/sys/dev/kbd/kbd.c repl/dev/kbd/kbd.c --- /home/refugee/freebsd/current/src/sys/dev/kbd/kbd.c Sun Oct 31 04:51:44 2004 +++ repl/dev/kbd/kbd.c Tue Dec 14 00:49:47 2004 @@ -75,9 +75,9 @@ keyboard_switch_t **kbdsw = &kbdsw_ini; static int keymap_restrict_change; -SYSCTL_NODE(_hw, OID_AUTO, kbd, CTLFLAG_RD, 0, "kbd"); +SYSCTL_NODE(_hw, OID_AUTO, kbd, CTLFLAG_RD, 0, "kbd", NULL); SYSCTL_INT(_hw_kbd, OID_AUTO, keymap_restrict_change, CTLFLAG_RW, - &keymap_restrict_change, 0, "restrict ability to change keymap"); + &keymap_restrict_change, 0, "restrict ability to change keymap", &Giant); #define ARRAY_DELTA 4 diff -ur /home/refugee/freebsd/current/src/sys/dev/md/md.c repl/dev/md/md.c --- /home/refugee/freebsd/current/src/sys/dev/md/md.c Sun Nov 14 03:56:04 2004 +++ repl/dev/md/md.c Tue Dec 14 00:49:49 2004 @@ -96,7 +96,7 @@ static MALLOC_DEFINE(M_MDSECT, "MD sectors", "Memory Disk Sectors"); static int md_debug; -SYSCTL_INT(_debug, OID_AUTO, mddebug, CTLFLAG_RW, &md_debug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, mddebug, CTLFLAG_RW, &md_debug, 0, "", &Giant); #if defined(MD_ROOT) && defined(MD_ROOT_SIZE) /* Image gets put here: */ diff -ur /home/refugee/freebsd/current/src/sys/dev/musycc/musycc.c repl/dev/musycc/musycc.c --- /home/refugee/freebsd/current/src/sys/dev/musycc/musycc.c Sun Oct 31 04:52:20 2004 +++ repl/dev/musycc/musycc.c Tue Dec 14 00:49:52 2004 @@ -72,7 +72,7 @@ ); static int debug = 0; -SYSCTL_INT(_debug, OID_AUTO, musycc_debug, CTLFLAG_RW, &debug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, musycc_debug, CTLFLAG_RW, &debug, 0, "", &Giant); struct softc; static void init_8370(struct softc *sc); diff -ur /home/refugee/freebsd/current/src/sys/dev/owi/if_owi.c repl/dev/owi/if_owi.c --- /home/refugee/freebsd/current/src/sys/dev/owi/if_owi.c Sun Oct 31 04:52:19 2004 +++ repl/dev/owi/if_owi.c Tue Dec 14 00:49:51 2004 @@ -2074,13 +2074,13 @@ */ static int wi_cache_mcastonly = 0; SYSCTL_INT(_machdep, OID_AUTO, wi_cache_mcastonly, CTLFLAG_RW, - &wi_cache_mcastonly, 0, ""); + &wi_cache_mcastonly, 0, "", &Giant); /* set true if you want to limit cache items to IP packets only */ static int wi_cache_iponly = 1; SYSCTL_INT(_machdep, OID_AUTO, wi_cache_iponly, CTLFLAG_RW, - &wi_cache_iponly, 0, ""); + &wi_cache_iponly, 0, "", &Giant); /* * Original comments: diff -ur /home/refugee/freebsd/current/src/sys/dev/patm/if_patm_attach.c repl/dev/patm/if_patm_attach.c --- /home/refugee/freebsd/current/src/sys/dev/patm/if_patm_attach.c Sun Oct 31 04:51:59 2004 +++ repl/dev/patm/if_patm_attach.c Tue Dec 14 00:49:49 2004 @@ -121,8 +121,8 @@ static void patm_destroy(struct patm_softc *sc); -static int patm_sysctl_istats(SYSCTL_HANDLER_ARGS); -static int patm_sysctl_eeprom(SYSCTL_HANDLER_ARGS); +static int patm_sysctl_istats(SYSCTL_HANDLER_ARGS, &Giant); +static int patm_sysctl_eeprom(SYSCTL_HANDLER_ARGS, &Giant); static void patm_read_eeprom(struct patm_softc *sc); static int patm_sq_init(struct patm_softc *sc); @@ -132,8 +132,8 @@ static void patm_env_getuint(struct patm_softc *, u_int *, const char *); #ifdef PATM_DEBUG -static int patm_sysctl_regs(SYSCTL_HANDLER_ARGS); -static int patm_sysctl_tsq(SYSCTL_HANDLER_ARGS); +static int patm_sysctl_regs(SYSCTL_HANDLER_ARGS, &Giant); +static int patm_sysctl_tsq(SYSCTL_HANDLER_ARGS, &Giant); int patm_dump_vc(u_int unit, u_int vc) __unused; int patm_dump_regs(u_int unit) __unused; int patm_dump_sram(u_int unit, u_int from, u_int words) __unused; @@ -206,7 +206,7 @@ callout_init(&sc->tst_callout, CALLOUT_MPSAFE); - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); /* * Get revision @@ -551,7 +551,7 @@ IDT_PCI_REG_MEMBASE, sc->memres); /* this was initialize unconditionally */ - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); cv_destroy(&sc->vcc_cv); mtx_destroy(&sc->tst_lock); mtx_destroy(&sc->mtx); diff -ur /home/refugee/freebsd/current/src/sys/dev/pccard/pccard.c repl/dev/pccard/pccard.c --- /home/refugee/freebsd/current/src/sys/dev/pccard/pccard.c Sun Oct 31 04:52:05 2004 +++ repl/dev/pccard/pccard.c Tue Dec 14 00:49:50 2004 @@ -57,18 +57,18 @@ #define PCCARDDEBUG /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, pccard, CTLFLAG_RD, 0, "PCCARD parameters"); +SYSCTL_NODE(_hw, OID_AUTO, pccard, CTLFLAG_RD, 0, "PCCARD parameters", NULL); int pccard_debug = 0; TUNABLE_INT("hw.pccard.debug", &pccard_debug); SYSCTL_INT(_hw_pccard, OID_AUTO, debug, CTLFLAG_RW, &pccard_debug, 0, - "pccard debug"); + "pccard debug", &Giant); int pccard_cis_debug = 0; TUNABLE_INT("hw.pccard.cis_debug", &pccard_cis_debug); SYSCTL_INT(_hw_pccard, OID_AUTO, cis_debug, CTLFLAG_RW, - &pccard_cis_debug, 0, "pccard CIS debug"); + &pccard_cis_debug, 0, "pccard CIS debug", &Giant); #ifdef PCCARDDEBUG #define DPRINTF(arg) if (pccard_debug) printf arg diff -ur /home/refugee/freebsd/current/src/sys/dev/pccbb/pccbb.c repl/dev/pccbb/pccbb.c --- /home/refugee/freebsd/current/src/sys/dev/pccbb/pccbb.c Sun Oct 31 04:51:40 2004 +++ repl/dev/pccbb/pccbb.c Tue Dec 14 00:49:47 2004 @@ -130,31 +130,31 @@ devclass_t cbb_devclass; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, cbb, CTLFLAG_RD, 0, "CBB parameters"); +SYSCTL_NODE(_hw, OID_AUTO, cbb, CTLFLAG_RD, 0, "CBB parameters", NULL); /* There's no way to say TUNEABLE_LONG to get the right types */ u_long cbb_start_mem = CBB_START_MEM; TUNABLE_INT("hw.cbb.start_memory", (int *)&cbb_start_mem); SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_memory, CTLFLAG_RW, &cbb_start_mem, CBB_START_MEM, - "Starting address for memory allocations"); + "Starting address for memory allocations", &Giant); u_long cbb_start_16_io = CBB_START_16_IO; TUNABLE_INT("hw.cbb.start_16_io", (int *)&cbb_start_16_io); SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_16_io, CTLFLAG_RW, &cbb_start_16_io, CBB_START_16_IO, - "Starting ioport for 16-bit cards"); + "Starting ioport for 16-bit cards", &Giant); u_long cbb_start_32_io = CBB_START_32_IO; TUNABLE_INT("hw.cbb.start_32_io", (int *)&cbb_start_32_io); SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_32_io, CTLFLAG_RW, &cbb_start_32_io, CBB_START_32_IO, - "Starting ioport for 32-bit cards"); + "Starting ioport for 32-bit cards", &Giant); int cbb_debug = 0; TUNABLE_INT("hw.cbb.debug", &cbb_debug); SYSCTL_ULONG(_hw_cbb, OID_AUTO, debug, CTLFLAG_RW, &cbb_debug, 0, - "Verbose cardbus bridge debugging"); + "Verbose cardbus bridge debugging", &Giant); static void cbb_insert(struct cbb_softc *sc); static void cbb_removal(struct cbb_softc *sc); diff -ur /home/refugee/freebsd/current/src/sys/dev/pccbb/pccbb_isa.c repl/dev/pccbb/pccbb_isa.c --- /home/refugee/freebsd/current/src/sys/dev/pccbb/pccbb_isa.c Sun Oct 31 04:51:40 2004 +++ repl/dev/pccbb/pccbb_isa.c Tue Dec 14 00:49:47 2004 @@ -70,7 +70,7 @@ *****************************************************************************/ /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, pcic, CTLFLAG_RD, 0, "PCIC parameters"); +SYSCTL_NODE(_hw, OID_AUTO, pcic, CTLFLAG_RD, 0, "PCIC parameters", NULL); static int isa_intr_mask = EXCA_INT_MASK_ALLOWED; TUNABLE_INT("hw.cbb.intr_mask", &isa_intr_mask); @@ -79,7 +79,7 @@ correct, but some laptops do not route all the IRQ pins to the bridge to\n\ save wires. Sometimes you need a more restrictive mask because some of the\n\ hardware in your laptop may not have a driver so its IRQ might not be\n\ -allocated."); +allocated.", &Giant); /***************************************************************************** * End of configurable parameters. diff -ur /home/refugee/freebsd/current/src/sys/dev/pci/pci.c repl/dev/pci/pci.c --- /home/refugee/freebsd/current/src/sys/dev/pci/pci.c Wed Dec 8 20:40:55 2004 +++ repl/dev/pci/pci.c Tue Dec 14 00:49:50 2004 @@ -175,7 +175,7 @@ uint32_t pci_numdevs = 0; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, "PCI bus tuning parameters"); +SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, "PCI bus tuning parameters", NULL); static int pci_enable_io_modes = 1; TUNABLE_INT("hw.pci.enable_io_modes", &pci_enable_io_modes); @@ -183,14 +183,14 @@ &pci_enable_io_modes, 1, "Enable I/O and memory bits in the config register. Some BIOSes do not\n\ enable these bits correctly. We'd like to do this all the time, but there\n\ -are some peripherals that this causes problems with."); +are some peripherals that this causes problems with.", &Giant); static int pci_do_powerstate = 1; TUNABLE_INT("hw.pci.do_powerstate", &pci_do_powerstate); SYSCTL_INT(_hw_pci, OID_AUTO, do_powerstate, CTLFLAG_RW, &pci_do_powerstate, 1, "Power down devices into D3 state when no driver attaches to them.\n\ -Otherwise, leave the device in D0 state when no driver attaches."); +Otherwise, leave the device in D0 state when no driver attaches.", &Giant); /* Find a device_t by bus/slot/function */ diff -ur /home/refugee/freebsd/current/src/sys/dev/random/randomdev_soft.c repl/dev/random/randomdev_soft.c --- /home/refugee/freebsd/current/src/sys/dev/random/randomdev_soft.c Sun Nov 14 03:56:06 2004 +++ repl/dev/random/randomdev_soft.c Tue Dec 14 00:49:49 2004 @@ -107,7 +107,7 @@ { if (oidp->oid_arg1 != NULL && *(u_int *)(oidp->oid_arg1) != 0) *(u_int *)(oidp->oid_arg1) = 1; - return sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + return sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req, &Giant); } /* ARGSUSED */ @@ -122,7 +122,7 @@ o = SYSCTL_ADD_NODE(&random_clist, SYSCTL_STATIC_CHILDREN(_kern), OID_AUTO, "random", CTLFLAG_RW, 0, - "Software Random Number Generator"); + "Software Random Number Generator", &Giant); random_o = o; @@ -131,7 +131,7 @@ o = SYSCTL_ADD_NODE(&random_clist, SYSCTL_CHILDREN(random_o), OID_AUTO, "sys", CTLFLAG_RW, 0, - "Entropy Device Parameters"); + "Entropy Device Parameters", &Giant); random_sys_o = o; @@ -144,7 +144,7 @@ o = SYSCTL_ADD_NODE(&random_clist, SYSCTL_CHILDREN(random_sys_o), OID_AUTO, "harvest", CTLFLAG_RW, 0, - "Entropy Sources"); + "Entropy Sources", &Giant); random_sys_harvest_o = o; @@ -229,7 +229,7 @@ mtx_destroy(&harvest_mtx); - sysctl_ctx_free(&random_clist); + sysctl_ctx_free(&random_clist, &Giant); } /* ARGSUSED */ diff -ur /home/refugee/freebsd/current/src/sys/dev/random/yarrow.c repl/dev/random/yarrow.c --- /home/refugee/freebsd/current/src/sys/dev/random/yarrow.c Sun Oct 31 04:51:57 2004 +++ repl/dev/random/yarrow.c Tue Dec 14 00:49:49 2004 @@ -112,7 +112,7 @@ o = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(in_o), OID_AUTO, "yarrow", CTLFLAG_RW, 0, - "Yarrow Parameters"); + "Yarrow Parameters", &Giant); random_yarrow_o = o; diff -ur /home/refugee/freebsd/current/src/sys/dev/rndtest/rndtest.c repl/dev/rndtest/rndtest.c --- /home/refugee/freebsd/current/src/sys/dev/rndtest/rndtest.c Sun Oct 31 04:51:57 2004 +++ repl/dev/rndtest/rndtest.c Tue Dec 14 00:49:49 2004 @@ -70,17 +70,17 @@ #define RNDTEST_NTESTS (sizeof(rndtest_funcs)/sizeof(rndtest_funcs[0])) -SYSCTL_NODE(_kern, OID_AUTO, rndtest, CTLFLAG_RD, 0, "RNG test parameters"); +SYSCTL_NODE(_kern, OID_AUTO, rndtest, CTLFLAG_RD, 0, "RNG test parameters", NULL); static int rndtest_retest = 120; /* interval in seconds */ SYSCTL_INT(_kern_rndtest, OID_AUTO, retest, CTLFLAG_RW, &rndtest_retest, - 0, "retest interval (seconds)"); + 0, "retest interval (seconds)", &Giant); static struct rndtest_stats rndstats; SYSCTL_STRUCT(_kern_rndtest, OID_AUTO, stats, CTLFLAG_RD, &rndstats, - rndtest_stats, "RNG test statistics"); + rndtest_stats, "RNG test statistics", &Giant); static int rndtest_verbose = 1; /* report only failures */ SYSCTL_INT(_kern_rndtest, OID_AUTO, verbose, CTLFLAG_RW, &rndtest_verbose, - 0, "display results on console"); + 0, "display results on console", &Giant); struct rndtest_state * rndtest_attach(device_t dev) diff -ur /home/refugee/freebsd/current/src/sys/dev/safe/safe.c repl/dev/safe/safe.c --- /home/refugee/freebsd/current/src/sys/dev/safe/safe.c Sun Oct 31 04:52:12 2004 +++ repl/dev/safe/safe.c Tue Dec 14 00:49:50 2004 @@ -139,7 +139,7 @@ static int safe_free_entry(struct safe_softc *, struct safe_ringentry *); -SYSCTL_NODE(_hw, OID_AUTO, safe, CTLFLAG_RD, 0, "SafeNet driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, safe, CTLFLAG_RD, 0, "SafeNet driver parameters", NULL); #ifdef SAFE_DEBUG static void safe_dump_dmastatus(struct safe_softc *, const char *); @@ -152,7 +152,7 @@ static int safe_debug = 0; SYSCTL_INT(_hw_safe, OID_AUTO, debug, CTLFLAG_RW, &safe_debug, - 0, "control debugging msgs"); + 0, "control debugging msgs", &Giant); #define DPRINTF(_x) if (safe_debug) printf _x #else #define DPRINTF(_x) @@ -166,17 +166,17 @@ struct safe_stats safestats; SYSCTL_STRUCT(_hw_safe, OID_AUTO, stats, CTLFLAG_RD, &safestats, - safe_stats, "driver statistics"); + safe_stats, "driver statistics", &Giant); #ifndef SAFE_NO_RNG static int safe_rnginterval = 1; /* poll once a second */ SYSCTL_INT(_hw_safe, OID_AUTO, rnginterval, CTLFLAG_RW, &safe_rnginterval, - 0, "RNG polling interval (secs)"); + 0, "RNG polling interval (secs)", &Giant); static int safe_rngbufsize = 16; /* 64 bytes each poll */ SYSCTL_INT(_hw_safe, OID_AUTO, rngbufsize, CTLFLAG_RW, &safe_rngbufsize, - 0, "RNG polling buffer size (32-bit words)"); + 0, "RNG polling buffer size (32-bit words)", &Giant); static int safe_rngmaxalarm = 8; /* max alarms before reset */ SYSCTL_INT(_hw_safe, OID_AUTO, rngmaxalarm, CTLFLAG_RW, &safe_rngmaxalarm, - 0, "RNG max alarms before reset"); + 0, "RNG max alarms before reset", &Giant); #endif /* SAFE_NO_RNG */ static int @@ -2225,7 +2225,7 @@ strncpy(dmode, "", sizeof(dmode) - 1); dmode[sizeof(dmode) - 1] = '\0'; - error = sysctl_handle_string(oidp, &dmode[0], sizeof(dmode), req); + error = sysctl_handle_string(oidp, &dmode[0], sizeof(dmode), req, &Giant); if (error == 0 && req->newptr != NULL) { struct safe_softc *sc = safec; @@ -2244,5 +2244,5 @@ return error; } SYSCTL_PROC(_hw_safe, OID_AUTO, dump, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_hw_safe_dump, "A", "Dump driver state"); + 0, 0, sysctl_hw_safe_dump, "A", "Dump driver state", &Giant); #endif /* SAFE_DEBUG */ diff -ur /home/refugee/freebsd/current/src/sys/dev/si/si.c repl/dev/si/si.c --- /home/refugee/freebsd/current/src/sys/dev/si/si.c Sun Oct 31 04:51:46 2004 +++ repl/dev/si/si.c Tue Dec 14 00:49:48 2004 @@ -115,7 +115,7 @@ static int si_Nmodules; static int si_debug = 0; /* data, not bss, so it's patchable */ -SYSCTL_INT(_machdep, OID_AUTO, si_debug, CTLFLAG_RW, &si_debug, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, si_debug, CTLFLAG_RW, &si_debug, 0, "", &Giant); TUNABLE_INT("machdep.si_debug", &si_debug); static int si_numunits; @@ -170,8 +170,8 @@ static int si_pollrate; /* in addition to irq */ static int si_realpoll = 0; /* poll HW on timer */ -SYSCTL_INT(_machdep, OID_AUTO, si_pollrate, CTLFLAG_RW, &si_pollrate, 0, ""); -SYSCTL_INT(_machdep, OID_AUTO, si_realpoll, CTLFLAG_RW, &si_realpoll, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, si_pollrate, CTLFLAG_RW, &si_pollrate, 0, "", &Giant); +SYSCTL_INT(_machdep, OID_AUTO, si_realpoll, CTLFLAG_RW, &si_realpoll, 0, "", &Giant); static int init_finished = 0; static void si_poll(void *); diff -ur /home/refugee/freebsd/current/src/sys/dev/sio/sio.c repl/dev/sio/sio.c --- /home/refugee/freebsd/current/src/sys/dev/sio/sio.c Sun Oct 31 04:51:42 2004 +++ repl/dev/sio/sio.c Tue Dec 14 00:49:47 2004 @@ -286,10 +286,10 @@ int comconsole = -1; static volatile speed_t comdefaultrate = CONSPEED; static u_long comdefaultrclk = DEFAULT_RCLK; -SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, ""); +SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, "", &Giant); static speed_t gdbdefaultrate = GDBSPEED; SYSCTL_UINT(_machdep, OID_AUTO, gdbspeed, CTLFLAG_RW, - &gdbdefaultrate, GDBSPEED, ""); + &gdbdefaultrate, GDBSPEED, "", &Giant); static u_int com_events; /* input chars + weighted output completions */ static Port_t siocniobase; static int siocnunit = -1; @@ -332,7 +332,7 @@ newspeed = comdefaultrate; - error = sysctl_handle_opaque(oidp, &newspeed, sizeof newspeed, req); + error = sysctl_handle_opaque(oidp, &newspeed, sizeof newspeed, req, &Giant); if (error || !req->newptr) return (error); @@ -370,7 +370,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, conspeed, CTLTYPE_INT | CTLFLAG_RW, - 0, 0, sysctl_machdep_comdefaultrate, "I", ""); + 0, 0, sysctl_machdep_comdefaultrate, "I", "", &Giant); /* TUNABLE_INT("machdep.conspeed", &comdefaultrate); */ #define SET_FLAG(dev, bit) device_set_flags(dev, device_get_flags(dev) | (bit)) @@ -1456,7 +1456,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, siots, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_siots, "A", "sio timestamps"); + 0, 0, sysctl_siots, "A", "sio timestamps", &Giant); static void siointr1(com) diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pci/cmi.c repl/dev/sound/pci/cmi.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pci/cmi.c Sun Oct 31 04:51:53 2004 +++ repl/dev/sound/pci/cmi.c Tue Dec 14 00:49:48 2004 @@ -733,7 +733,7 @@ SYSCTL_CHILDREN(snd_sysctl_tree_top(sc->dev)), OID_AUTO, "spdif_enabled", CTLFLAG_RW, &sc->spdif_enabled, 0, - "enable SPDIF output at 44.1 kHz and above"); + "enable SPDIF output at 44.1 kHz and above", &Giant); #endif /* SND_DYNSYSCTL */ return 0; } diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pci/es137x.c repl/dev/sound/pci/es137x.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pci/es137x.c Sun Oct 31 04:51:53 2004 +++ repl/dev/sound/pci/es137x.c Tue Dec 14 00:49:48 2004 @@ -62,7 +62,7 @@ SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/es137x.c,v 1.52 2004/10/13 05:45:16 yongari Exp $"); static int debug = 0; -SYSCTL_INT(_debug, OID_AUTO, es_debug, CTLFLAG_RW, &debug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, es_debug, CTLFLAG_RW, &debug, 0, "", &Giant); #define MEM_MAP_REG 0x14 diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pci/ich.c repl/dev/sound/pci/ich.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pci/ich.c Sun Oct 31 04:51:53 2004 +++ repl/dev/sound/pci/ich.c Tue Dec 14 00:49:48 2004 @@ -457,7 +457,7 @@ SYSCTL_CHILDREN(snd_sysctl_tree_top(sc->dev)), OID_AUTO, "ac97rate", CTLFLAG_RW, &sc->ac97rate, 48000, - "AC97 link rate (default =