Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
This commit is contained in:
parent
d7313dc6f5
commit
7029da5c36
@ -325,5 +325,7 @@ efi_time_sysctl_handler(SYSCTL_HANDLER_ARGS)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCTL_PROC(_debug, OID_AUTO, efi_time, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
|
SYSCTL_PROC(_debug, OID_AUTO, efi_time,
|
||||||
efi_time_sysctl_handler, "I", "");
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0,
|
||||||
|
efi_time_sysctl_handler, "I",
|
||||||
|
"");
|
||||||
|
@ -1960,8 +1960,10 @@ smap_sysctl_handler(SYSCTL_HANDLER_ARGS)
|
|||||||
}
|
}
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_machdep, OID_AUTO, smap, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0,
|
SYSCTL_PROC(_machdep, OID_AUTO, smap,
|
||||||
smap_sysctl_handler, "S,bios_smap_xattr", "Raw BIOS SMAP data");
|
CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0,
|
||||||
|
smap_sysctl_handler, "S,bios_smap_xattr",
|
||||||
|
"Raw BIOS SMAP data");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
efi_map_sysctl_handler(SYSCTL_HANDLER_ARGS)
|
efi_map_sysctl_handler(SYSCTL_HANDLER_ARGS)
|
||||||
@ -1980,8 +1982,10 @@ efi_map_sysctl_handler(SYSCTL_HANDLER_ARGS)
|
|||||||
efisize = *((uint32_t *)efihdr - 1);
|
efisize = *((uint32_t *)efihdr - 1);
|
||||||
return (SYSCTL_OUT(req, efihdr, efisize));
|
return (SYSCTL_OUT(req, efihdr, efisize));
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_machdep, OID_AUTO, efi_map, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0,
|
SYSCTL_PROC(_machdep, OID_AUTO, efi_map,
|
||||||
efi_map_sysctl_handler, "S,efi_map_header", "Raw EFI Memory Map");
|
CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0,
|
||||||
|
efi_map_sysctl_handler, "S,efi_map_header",
|
||||||
|
"Raw EFI Memory Map");
|
||||||
|
|
||||||
void
|
void
|
||||||
spinlock_enter(void)
|
spinlock_enter(void)
|
||||||
|
@ -390,7 +390,8 @@ vm_paddr_t dmaplimit;
|
|||||||
vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS;
|
vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS;
|
||||||
pt_entry_t pg_nx;
|
pt_entry_t pg_nx;
|
||||||
|
|
||||||
static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters");
|
static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"VM/pmap parameters");
|
||||||
|
|
||||||
static int pg_ps_enabled = 1;
|
static int pg_ps_enabled = 1;
|
||||||
SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH,
|
SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH,
|
||||||
@ -2196,7 +2197,7 @@ SYSCTL_UINT(_vm_pmap, OID_AUTO, large_map_pml4_entries,
|
|||||||
"Maximum number of PML4 entries for use by large map (tunable). "
|
"Maximum number of PML4 entries for use by large map (tunable). "
|
||||||
"Each entry corresponds to 512GB of address space.");
|
"Each entry corresponds to 512GB of address space.");
|
||||||
|
|
||||||
static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"2MB page mapping counters");
|
"2MB page mapping counters");
|
||||||
|
|
||||||
static u_long pmap_pde_demotions;
|
static u_long pmap_pde_demotions;
|
||||||
@ -2215,7 +2216,7 @@ static u_long pmap_pde_promotions;
|
|||||||
SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, promotions, CTLFLAG_RD,
|
SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, promotions, CTLFLAG_RD,
|
||||||
&pmap_pde_promotions, 0, "2MB page promotions");
|
&pmap_pde_promotions, 0, "2MB page promotions");
|
||||||
|
|
||||||
static SYSCTL_NODE(_vm_pmap, OID_AUTO, pdpe, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_vm_pmap, OID_AUTO, pdpe, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"1GB page mapping counters");
|
"1GB page mapping counters");
|
||||||
|
|
||||||
static u_long pmap_pdpe_demotions;
|
static u_long pmap_pdpe_demotions;
|
||||||
|
@ -262,8 +262,10 @@ sysctl_machdep_cputime_clock(SYSCTL_HANDLER_ARGS)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock, CTLTYPE_INT | CTLFLAG_RW,
|
SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock,
|
||||||
0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", "");
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, sizeof(u_int),
|
||||||
|
sysctl_machdep_cputime_clock, "I",
|
||||||
|
"");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The start and stop routines need not be here since we turn off profiling
|
* The start and stop routines need not be here since we turn off profiling
|
||||||
|
@ -837,7 +837,7 @@ linux_copyout_strings(struct image_params *imgp, uintptr_t *stack_base)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SYSCTL_NODE(_compat, OID_AUTO, linux32, CTLFLAG_RW, 0,
|
static SYSCTL_NODE(_compat, OID_AUTO, linux32, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
"32-bit Linux emulation");
|
"32-bit Linux emulation");
|
||||||
|
|
||||||
static u_long linux32_maxdsiz = LINUX32_MAXDSIZ;
|
static u_long linux32_maxdsiz = LINUX32_MAXDSIZ;
|
||||||
|
@ -190,13 +190,16 @@ rstmgr_add_sysctl(struct rstmgr_softc *sc)
|
|||||||
children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev));
|
children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev));
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "fpga2hps",
|
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "fpga2hps",
|
||||||
CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_FPGA2HPS,
|
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, RSTMGR_SYSCTL_FPGA2HPS,
|
||||||
rstmgr_sysctl, "I", "Enable fpga2hps bridge");
|
rstmgr_sysctl, "I", "Enable fpga2hps bridge");
|
||||||
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "lwhps2fpga",
|
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "lwhps2fpga",
|
||||||
CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_LWHPS2FPGA,
|
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, RSTMGR_SYSCTL_LWHPS2FPGA,
|
||||||
rstmgr_sysctl, "I", "Enable lwhps2fpga bridge");
|
rstmgr_sysctl, "I", "Enable lwhps2fpga bridge");
|
||||||
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "hps2fpga",
|
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "hps2fpga",
|
||||||
CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_HPS2FPGA,
|
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, RSTMGR_SYSCTL_HPS2FPGA,
|
||||||
rstmgr_sysctl, "I", "Enable hps2fpga bridge");
|
rstmgr_sysctl, "I", "Enable hps2fpga bridge");
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -148,7 +148,8 @@ static counter_u64_t maploads_physmem;
|
|||||||
|
|
||||||
static STAILQ_HEAD(, bounce_zone) bounce_zone_list;
|
static STAILQ_HEAD(, bounce_zone) bounce_zone_list;
|
||||||
|
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters");
|
SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"Busdma parameters");
|
||||||
SYSCTL_UINT(_hw_busdma, OID_AUTO, tags_total, CTLFLAG_RD, &tags_total, 0,
|
SYSCTL_UINT(_hw_busdma, OID_AUTO, tags_total, CTLFLAG_RD, &tags_total, 0,
|
||||||
"Number of active tags");
|
"Number of active tags");
|
||||||
SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_total, CTLFLAG_RD, &maps_total, 0,
|
SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_total, CTLFLAG_RD, &maps_total, 0,
|
||||||
@ -1591,7 +1592,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat)
|
|||||||
sysctl_ctx_init(&bz->sysctl_tree);
|
sysctl_ctx_init(&bz->sysctl_tree);
|
||||||
bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree,
|
bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree,
|
||||||
SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid,
|
SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid,
|
||||||
CTLFLAG_RD, 0, "");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
if (bz->sysctl_tree_top == NULL) {
|
if (bz->sysctl_tree_top == NULL) {
|
||||||
sysctl_ctx_free(&bz->sysctl_tree);
|
sysctl_ctx_free(&bz->sysctl_tree);
|
||||||
return (0); /* XXX error code? */
|
return (0); /* XXX error code? */
|
||||||
|
@ -56,9 +56,9 @@ struct cpuinfo cpuinfo =
|
|||||||
.icache_line_mask = 31,
|
.icache_line_mask = 31,
|
||||||
};
|
};
|
||||||
|
|
||||||
static SYSCTL_NODE(_hw, OID_AUTO, cpu, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_hw, OID_AUTO, cpu, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CPU");
|
"CPU");
|
||||||
static SYSCTL_NODE(_hw_cpu, OID_AUTO, quirks, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_hw_cpu, OID_AUTO, quirks, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CPU quirks");
|
"CPU quirks");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -88,7 +88,8 @@ static char linux_command_line[LBABI_MAX_COMMAND_LINE + 1];
|
|||||||
static char atags[LBABI_MAX_COMMAND_LINE * 2];
|
static char atags[LBABI_MAX_COMMAND_LINE * 2];
|
||||||
#endif /* defined(LINUX_BOOT_ABI) */
|
#endif /* defined(LINUX_BOOT_ABI) */
|
||||||
|
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, board, CTLFLAG_RD, 0, "Board attributes");
|
SYSCTL_NODE(_hw, OID_AUTO, board, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"Board attributes");
|
||||||
SYSCTL_UINT(_hw_board, OID_AUTO, revision, CTLFLAG_RD,
|
SYSCTL_UINT(_hw_board, OID_AUTO, revision, CTLFLAG_RD,
|
||||||
&board_revision, 0, "Board revision");
|
&board_revision, 0, "Board revision");
|
||||||
SYSCTL_STRING(_hw_board, OID_AUTO, serial, CTLFLAG_RD,
|
SYSCTL_STRING(_hw_board, OID_AUTO, serial, CTLFLAG_RD,
|
||||||
|
@ -1550,7 +1550,8 @@ pmap_pte2list_init(vm_offset_t *head, void *base, int npages)
|
|||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters");
|
SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"VM/pmap parameters");
|
||||||
|
|
||||||
SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0,
|
SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0,
|
||||||
"Max number of PV entries");
|
"Max number of PV entries");
|
||||||
@ -1572,7 +1573,7 @@ pmap_ps_enabled(pmap_t pmap __unused)
|
|||||||
return (sp_enabled != 0);
|
return (sp_enabled != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SYSCTL_NODE(_vm_pmap, OID_AUTO, pte1, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_vm_pmap, OID_AUTO, pte1, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"1MB page mapping counters");
|
"1MB page mapping counters");
|
||||||
|
|
||||||
static u_long pmap_pte1_demotions;
|
static u_long pmap_pte1_demotions;
|
||||||
@ -2108,8 +2109,9 @@ kvm_size(SYSCTL_HANDLER_ARGS)
|
|||||||
|
|
||||||
return (sysctl_handle_long(oidp, &ksize, 0, req));
|
return (sysctl_handle_long(oidp, &ksize, 0, req));
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD,
|
SYSCTL_PROC(_vm, OID_AUTO, kvm_size,
|
||||||
0, 0, kvm_size, "IU", "Size of KVM");
|
CTLTYPE_LONG | CTLFLAG_RD | CTLFLAG_NEEDGIANT, 0, 0, kvm_size, "IU",
|
||||||
|
"Size of KVM");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kvm_free(SYSCTL_HANDLER_ARGS)
|
kvm_free(SYSCTL_HANDLER_ARGS)
|
||||||
@ -2118,8 +2120,9 @@ kvm_free(SYSCTL_HANDLER_ARGS)
|
|||||||
|
|
||||||
return (sysctl_handle_long(oidp, &kfree, 0, req));
|
return (sysctl_handle_long(oidp, &kfree, 0, req));
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD,
|
SYSCTL_PROC(_vm, OID_AUTO, kvm_free,
|
||||||
0, 0, kvm_free, "IU", "Amount of KVM free");
|
CTLTYPE_LONG | CTLFLAG_RD | CTLFLAG_NEEDGIANT, 0, 0, kvm_free, "IU",
|
||||||
|
"Amount of KVM free");
|
||||||
|
|
||||||
/***********************************************
|
/***********************************************
|
||||||
*
|
*
|
||||||
|
@ -810,7 +810,7 @@ vchi_audio_sysctl_init(struct bcm2835_audio_info *sc)
|
|||||||
tree_node = device_get_sysctl_tree(sc->dev);
|
tree_node = device_get_sysctl_tree(sc->dev);
|
||||||
tree = SYSCTL_CHILDREN(tree_node);
|
tree = SYSCTL_CHILDREN(tree_node);
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "dest",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "dest",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc),
|
||||||
sysctl_bcm2835_audio_dest, "IU", "audio destination, "
|
sysctl_bcm2835_audio_dest, "IU", "audio destination, "
|
||||||
"0 - auto, 1 - headphones, 2 - HDMI");
|
"0 - auto, 1 - headphones, 2 - HDMI");
|
||||||
SYSCTL_ADD_UQUAD(ctx, tree, OID_AUTO, "callbacks",
|
SYSCTL_ADD_UQUAD(ctx, tree, OID_AUTO, "callbacks",
|
||||||
|
@ -248,16 +248,20 @@ bcm_bsc_sysctl_init(struct bcm_bsc_softc *sc)
|
|||||||
tree_node = device_get_sysctl_tree(sc->sc_dev);
|
tree_node = device_get_sysctl_tree(sc->sc_dev);
|
||||||
tree = SYSCTL_CHILDREN(tree_node);
|
tree = SYSCTL_CHILDREN(tree_node);
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "frequency",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "frequency",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, sizeof(*sc),
|
||||||
bcm_bsc_clock_proc, "IU", "I2C BUS clock frequency");
|
bcm_bsc_clock_proc, "IU", "I2C BUS clock frequency");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock_stretch",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock_stretch",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, sizeof(*sc),
|
||||||
bcm_bsc_clkt_proc, "IU", "I2C BUS clock stretch timeout");
|
bcm_bsc_clkt_proc, "IU", "I2C BUS clock stretch timeout");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "fall_edge_delay",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "fall_edge_delay",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, sizeof(*sc),
|
||||||
bcm_bsc_fall_proc, "IU", "I2C BUS falling edge delay");
|
bcm_bsc_fall_proc, "IU", "I2C BUS falling edge delay");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "rise_edge_delay",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "rise_edge_delay",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, sizeof(*sc),
|
||||||
bcm_bsc_rise_proc, "IU", "I2C BUS rising edge delay");
|
bcm_bsc_rise_proc, "IU", "I2C BUS rising edge delay");
|
||||||
SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "debug",
|
SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "debug",
|
||||||
CTLFLAG_RWTUN, &sc->sc_debug, 0,
|
CTLFLAG_RWTUN, &sc->sc_debug, 0,
|
||||||
|
@ -1245,7 +1245,8 @@ bcm2835_cpufreq_init(void *arg)
|
|||||||
ctx = device_get_sysctl_ctx(cpu);
|
ctx = device_get_sysctl_ctx(cpu);
|
||||||
SYSCTL_ADD_PROC(ctx,
|
SYSCTL_ADD_PROC(ctx,
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(cpu)), OID_AUTO,
|
SYSCTL_CHILDREN(device_get_sysctl_tree(cpu)), OID_AUTO,
|
||||||
"temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0,
|
"temperature",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_devcpu_temperature, "IK",
|
sysctl_bcm2835_devcpu_temperature, "IK",
|
||||||
"Current SoC temperature");
|
"Current SoC temperature");
|
||||||
}
|
}
|
||||||
@ -1312,57 +1313,67 @@ bcm2835_cpufreq_attach(device_t dev)
|
|||||||
/* create node for hw.cpufreq */
|
/* create node for hw.cpufreq */
|
||||||
oid = SYSCTL_ADD_NODE(&bcm2835_sysctl_ctx,
|
oid = SYSCTL_ADD_NODE(&bcm2835_sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "cpufreq",
|
SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "cpufreq",
|
||||||
CTLFLAG_RD, NULL, "");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "");
|
||||||
|
|
||||||
/* Frequency (Hz) */
|
/* Frequency (Hz) */
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "arm_freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
OID_AUTO, "arm_freq",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_cpufreq_arm_freq, "IU",
|
sysctl_bcm2835_cpufreq_arm_freq, "IU",
|
||||||
"ARM frequency (Hz)");
|
"ARM frequency (Hz)");
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "core_freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
OID_AUTO, "core_freq",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_cpufreq_core_freq, "IU",
|
sysctl_bcm2835_cpufreq_core_freq, "IU",
|
||||||
"Core frequency (Hz)");
|
"Core frequency (Hz)");
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "sdram_freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
OID_AUTO, "sdram_freq",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_cpufreq_sdram_freq, "IU",
|
sysctl_bcm2835_cpufreq_sdram_freq, "IU",
|
||||||
"SDRAM frequency (Hz)");
|
"SDRAM frequency (Hz)");
|
||||||
|
|
||||||
/* Turbo state */
|
/* Turbo state */
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "turbo", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
OID_AUTO, "turbo",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_cpufreq_turbo, "IU",
|
sysctl_bcm2835_cpufreq_turbo, "IU",
|
||||||
"Disables dynamic clocking");
|
"Disables dynamic clocking");
|
||||||
|
|
||||||
/* Voltage (offset from 1.2V in units of 0.025V) */
|
/* Voltage (offset from 1.2V in units of 0.025V) */
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "voltage_core", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
OID_AUTO, "voltage_core",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_cpufreq_voltage_core, "I",
|
sysctl_bcm2835_cpufreq_voltage_core, "I",
|
||||||
"ARM/GPU core voltage"
|
"ARM/GPU core voltage"
|
||||||
"(offset from 1.2V in units of 0.025V)");
|
"(offset from 1.2V in units of 0.025V)");
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "voltage_sdram", CTLTYPE_INT | CTLFLAG_WR, sc,
|
OID_AUTO, "voltage_sdram",
|
||||||
|
CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, sc,
|
||||||
0, sysctl_bcm2835_cpufreq_voltage_sdram, "I",
|
0, sysctl_bcm2835_cpufreq_voltage_sdram, "I",
|
||||||
"SDRAM voltage (offset from 1.2V in units of 0.025V)");
|
"SDRAM voltage (offset from 1.2V in units of 0.025V)");
|
||||||
|
|
||||||
/* Voltage individual SDRAM */
|
/* Voltage individual SDRAM */
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "voltage_sdram_c", CTLTYPE_INT | CTLFLAG_RW, sc,
|
OID_AUTO, "voltage_sdram_c",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
0, sysctl_bcm2835_cpufreq_voltage_sdram_c, "I",
|
0, sysctl_bcm2835_cpufreq_voltage_sdram_c, "I",
|
||||||
"SDRAM controller voltage"
|
"SDRAM controller voltage"
|
||||||
"(offset from 1.2V in units of 0.025V)");
|
"(offset from 1.2V in units of 0.025V)");
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "voltage_sdram_i", CTLTYPE_INT | CTLFLAG_RW, sc,
|
OID_AUTO, "voltage_sdram_i",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
0, sysctl_bcm2835_cpufreq_voltage_sdram_i, "I",
|
0, sysctl_bcm2835_cpufreq_voltage_sdram_i, "I",
|
||||||
"SDRAM I/O voltage (offset from 1.2V in units of 0.025V)");
|
"SDRAM I/O voltage (offset from 1.2V in units of 0.025V)");
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "voltage_sdram_p", CTLTYPE_INT | CTLFLAG_RW, sc,
|
OID_AUTO, "voltage_sdram_p",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
0, sysctl_bcm2835_cpufreq_voltage_sdram_p, "I",
|
0, sysctl_bcm2835_cpufreq_voltage_sdram_p, "I",
|
||||||
"SDRAM phy voltage (offset from 1.2V in units of 0.025V)");
|
"SDRAM phy voltage (offset from 1.2V in units of 0.025V)");
|
||||||
|
|
||||||
/* Temperature */
|
/* Temperature */
|
||||||
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
SYSCTL_ADD_PROC(&bcm2835_sysctl_ctx, SYSCTL_CHILDREN(oid),
|
||||||
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0,
|
OID_AUTO, "temperature",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_cpufreq_temperature, "I",
|
sysctl_bcm2835_cpufreq_temperature, "I",
|
||||||
"SoC temperature (thousandths of a degree C)");
|
"SoC temperature (thousandths of a degree C)");
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ bcm_fb_sysctl_init(struct bcmsc_softc *sc)
|
|||||||
tree_node = device_get_sysctl_tree(sc->dev);
|
tree_node = device_get_sysctl_tree(sc->dev);
|
||||||
tree = SYSCTL_CHILDREN(tree_node);
|
tree = SYSCTL_CHILDREN(tree_node);
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "resync",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "resync",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc),
|
||||||
bcm_fb_resync_sysctl, "IU", "Set to resync framebuffer with VC");
|
bcm_fb_resync_sysctl, "IU", "Set to resync framebuffer with VC");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,14 +594,14 @@ bcm_gpio_sysctl_init(struct bcm_gpio_softc *sc)
|
|||||||
tree_node = device_get_sysctl_tree(sc->sc_dev);
|
tree_node = device_get_sysctl_tree(sc->sc_dev);
|
||||||
tree = SYSCTL_CHILDREN(tree_node);
|
tree = SYSCTL_CHILDREN(tree_node);
|
||||||
pin_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "pin",
|
pin_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "pin",
|
||||||
CTLFLAG_RD, NULL, "GPIO Pins");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "GPIO Pins");
|
||||||
pin_tree = SYSCTL_CHILDREN(pin_node);
|
pin_tree = SYSCTL_CHILDREN(pin_node);
|
||||||
|
|
||||||
for (i = 0; i < sc->sc_gpio_npins; i++) {
|
for (i = 0; i < sc->sc_gpio_npins; i++) {
|
||||||
|
|
||||||
snprintf(pinbuf, sizeof(pinbuf), "%d", i);
|
snprintf(pinbuf, sizeof(pinbuf), "%d", i);
|
||||||
pinN_node = SYSCTL_ADD_NODE(ctx, pin_tree, OID_AUTO, pinbuf,
|
pinN_node = SYSCTL_ADD_NODE(ctx, pin_tree, OID_AUTO, pinbuf,
|
||||||
CTLFLAG_RD, NULL, "GPIO Pin");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "GPIO Pin");
|
||||||
pinN_tree = SYSCTL_CHILDREN(pinN_node);
|
pinN_tree = SYSCTL_CHILDREN(pinN_node);
|
||||||
|
|
||||||
sc->sc_sysctl[i].sc = sc;
|
sc->sc_sysctl[i].sc = sc;
|
||||||
@ -609,7 +609,7 @@ bcm_gpio_sysctl_init(struct bcm_gpio_softc *sc)
|
|||||||
sc_sysctl->sc = sc;
|
sc_sysctl->sc = sc;
|
||||||
sc_sysctl->pin = sc->sc_gpio_pins[i].gp_pin;
|
sc_sysctl->pin = sc->sc_gpio_pins[i].gp_pin;
|
||||||
SYSCTL_ADD_PROC(ctx, pinN_tree, OID_AUTO, "function",
|
SYSCTL_ADD_PROC(ctx, pinN_tree, OID_AUTO, "function",
|
||||||
CTLFLAG_RW | CTLTYPE_STRING, sc_sysctl,
|
CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT, sc_sysctl,
|
||||||
sizeof(struct bcm_gpio_sysctl), bcm_gpio_func_proc,
|
sizeof(struct bcm_gpio_sysctl), bcm_gpio_func_proc,
|
||||||
"A", "Pin Function");
|
"A", "Pin Function");
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,8 @@ bcm_pwm_sysctl_init(struct bcm_pwm_softc *sc)
|
|||||||
if (bootverbose) {
|
if (bootverbose) {
|
||||||
#define RR(x,y) \
|
#define RR(x,y) \
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, y, \
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, y, \
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0x##x, \
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, \
|
||||||
|
sc, 0x##x, \
|
||||||
bcm_pwm_reg_proc, "IU", "Register 0x" #x " " y);
|
bcm_pwm_reg_proc, "IU", "Register 0x" #x " " y);
|
||||||
|
|
||||||
RR(24, "DAT2")
|
RR(24, "DAT2")
|
||||||
@ -379,31 +380,31 @@ bcm_pwm_sysctl_init(struct bcm_pwm_softc *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "pwm_freq",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "pwm_freq",
|
||||||
CTLFLAG_RD | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_pwm_freq_proc, "IU", "PWM frequency ch 1 (Hz)");
|
bcm_pwm_pwm_freq_proc, "IU", "PWM frequency ch 1 (Hz)");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "period",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "period",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_period_proc, "IU", "PWM period ch 1 (#clocks)");
|
bcm_pwm_period_proc, "IU", "PWM period ch 1 (#clocks)");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "ratio",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "ratio",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_ratio_proc, "IU", "PWM ratio ch 1 (0...period)");
|
bcm_pwm_ratio_proc, "IU", "PWM ratio ch 1 (0...period)");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "freq",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "freq",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_freq_proc, "IU", "PWM clock (Hz)");
|
bcm_pwm_freq_proc, "IU", "PWM clock (Hz)");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "mode",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "mode",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_mode_proc, "IU", "PWM mode ch 1 (0=off, 1=pwm, 2=dither)");
|
bcm_pwm_mode_proc, "IU", "PWM mode ch 1 (0=off, 1=pwm, 2=dither)");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "pwm_freq2",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "pwm_freq2",
|
||||||
CTLFLAG_RD | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_pwm_freq2_proc, "IU", "PWM frequency ch 2 (Hz)");
|
bcm_pwm_pwm_freq2_proc, "IU", "PWM frequency ch 2 (Hz)");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "period2",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "period2",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_period2_proc, "IU", "PWM period ch 2 (#clocks)");
|
bcm_pwm_period2_proc, "IU", "PWM period ch 2 (#clocks)");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "ratio2",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "ratio2",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_ratio2_proc, "IU", "PWM ratio ch 2 (0...period)");
|
bcm_pwm_ratio2_proc, "IU", "PWM ratio ch 2 (0...period)");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "mode2",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "mode2",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
bcm_pwm_mode2_proc, "IU", "PWM mode ch 2 (0=off, 1=pwm, 2=dither)");
|
bcm_pwm_mode2_proc, "IU", "PWM mode ch 2 (0=off, 1=pwm, 2=dither)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,14 +403,14 @@ bcm2835_rng_attach(device_t dev)
|
|||||||
"underrun", CTLFLAG_RD, &sc->sc_underrun,
|
"underrun", CTLFLAG_RD, &sc->sc_underrun,
|
||||||
"Number of FIFO underruns");
|
"Number of FIFO underruns");
|
||||||
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO,
|
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO,
|
||||||
"2xspeed", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
"2xspeed", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_rng_2xspeed, "I", "Enable RBG 2X SPEED");
|
sysctl_bcm2835_rng_2xspeed, "I", "Enable RBG 2X SPEED");
|
||||||
SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO,
|
SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO,
|
||||||
"stall_count", CTLFLAG_RW, &sc->sc_stall_count,
|
"stall_count", CTLFLAG_RW, &sc->sc_stall_count,
|
||||||
RNG_STALL_COUNT_DEFAULT, "Number of underruns to assume RNG stall");
|
RNG_STALL_COUNT_DEFAULT, "Number of underruns to assume RNG stall");
|
||||||
#ifdef BCM2835_RNG_DEBUG_REGISTERS
|
#ifdef BCM2835_RNG_DEBUG_REGISTERS
|
||||||
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO,
|
SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO,
|
||||||
"dumpregs", CTLTYPE_STRING | CTLFLAG_RD, sc, 0,
|
"dumpregs", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
sysctl_bcm2835_rng_dump, "S", "Dump RNG registers");
|
sysctl_bcm2835_rng_dump, "S", "Dump RNG registers");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -204,22 +204,22 @@ bcm_spi_sysctl_init(struct bcm_spi_softc *sc)
|
|||||||
tree_node = device_get_sysctl_tree(sc->sc_dev);
|
tree_node = device_get_sysctl_tree(sc->sc_dev);
|
||||||
tree = SYSCTL_CHILDREN(tree_node);
|
tree = SYSCTL_CHILDREN(tree_node);
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clock",
|
||||||
CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc),
|
||||||
bcm_spi_clock_proc, "IU", "SPI BUS clock frequency");
|
bcm_spi_clock_proc, "IU", "SPI BUS clock frequency");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cpol",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cpol",
|
||||||
CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc),
|
||||||
bcm_spi_cpol_proc, "IU", "SPI BUS clock polarity");
|
bcm_spi_cpol_proc, "IU", "SPI BUS clock polarity");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cpha",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cpha",
|
||||||
CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc),
|
||||||
bcm_spi_cpha_proc, "IU", "SPI BUS clock phase");
|
bcm_spi_cpha_proc, "IU", "SPI BUS clock phase");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol0",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol0",
|
||||||
CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc),
|
||||||
bcm_spi_cspol0_proc, "IU", "SPI BUS chip select 0 polarity");
|
bcm_spi_cspol0_proc, "IU", "SPI BUS chip select 0 polarity");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol1",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol1",
|
||||||
CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc),
|
||||||
bcm_spi_cspol1_proc, "IU", "SPI BUS chip select 1 polarity");
|
bcm_spi_cspol1_proc, "IU", "SPI BUS chip select 1 polarity");
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol2",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "cspol2",
|
||||||
CTLFLAG_RD | CTLTYPE_UINT, sc, sizeof(*sc),
|
CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, sizeof(*sc),
|
||||||
bcm_spi_cspol2_proc, "IU", "SPI BUS chip select 2 polarity");
|
bcm_spi_cspol2_proc, "IU", "SPI BUS chip select 2 polarity");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,11 +400,13 @@ cpufreq_initialize(struct imx6_anatop_softc *sc)
|
|||||||
"CPU frequency");
|
"CPU frequency");
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
||||||
OID_AUTO, "cpu_minmhz", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH,
|
OID_AUTO, "cpu_minmhz",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_NEEDGIANT,
|
||||||
sc, 0, cpufreq_sysctl_minmhz, "IU", "Minimum CPU frequency");
|
sc, 0, cpufreq_sysctl_minmhz, "IU", "Minimum CPU frequency");
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
||||||
OID_AUTO, "cpu_maxmhz", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH,
|
OID_AUTO, "cpu_maxmhz",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_NEEDGIANT,
|
||||||
sc, 0, cpufreq_sysctl_maxmhz, "IU", "Maximum CPU frequency");
|
sc, 0, cpufreq_sysctl_maxmhz, "IU", "Maximum CPU frequency");
|
||||||
|
|
||||||
SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
||||||
@ -627,10 +629,12 @@ initialize_tempmon(struct imx6_anatop_softc *sc)
|
|||||||
0, tempmon_throttle_check, sc, 0);
|
0, tempmon_throttle_check, sc, 0);
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
||||||
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0,
|
OID_AUTO, "temperature",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
temp_sysctl_handler, "IK", "Current die temperature");
|
temp_sysctl_handler, "IK", "Current die temperature");
|
||||||
SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx),
|
||||||
OID_AUTO, "throttle_temperature", CTLTYPE_INT | CTLFLAG_RW, sc,
|
OID_AUTO, "throttle_temperature",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
0, temp_throttle_sysctl_handler, "IK",
|
0, temp_throttle_sysctl_handler, "IK",
|
||||||
"Throttle CPU when exceeding this temperature");
|
"Throttle CPU when exceeding this temperature");
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <arm/freescale/imx/imx_machdep.h>
|
#include <arm/freescale/imx/imx_machdep.h>
|
||||||
#include <arm/freescale/imx/imx_wdogreg.h>
|
#include <arm/freescale/imx/imx_wdogreg.h>
|
||||||
|
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, imx, CTLFLAG_RW, NULL, "i.MX container");
|
SYSCTL_NODE(_hw, OID_AUTO, imx, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL,
|
||||||
|
"i.MX container");
|
||||||
|
|
||||||
static int last_reset_status;
|
static int last_reset_status;
|
||||||
SYSCTL_UINT(_hw_imx, OID_AUTO, last_reset_status, CTLFLAG_RD,
|
SYSCTL_UINT(_hw_imx, OID_AUTO, last_reset_status, CTLFLAG_RD,
|
||||||
|
@ -333,7 +333,7 @@ mv_thermal_attach(device_t dev)
|
|||||||
oid = SYSCTL_CHILDREN(device_get_sysctl_tree(dev));
|
oid = SYSCTL_CHILDREN(device_get_sysctl_tree(dev));
|
||||||
/* There is always at least one sensor */
|
/* There is always at least one sensor */
|
||||||
SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, "internal",
|
SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, "internal",
|
||||||
CTLTYPE_INT | CTLFLAG_RD,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
dev, 0, mv_thermal_sysctl,
|
dev, 0, mv_thermal_sysctl,
|
||||||
"IK",
|
"IK",
|
||||||
"Internal Temperature");
|
"Internal Temperature");
|
||||||
@ -342,7 +342,7 @@ mv_thermal_attach(device_t dev)
|
|||||||
snprintf(name, sizeof(name), "cpu%d", i);
|
snprintf(name, sizeof(name), "cpu%d", i);
|
||||||
snprintf(desc, sizeof(desc), "CPU%d Temperature", i);
|
snprintf(desc, sizeof(desc), "CPU%d Temperature", i);
|
||||||
SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, name,
|
SYSCTL_ADD_PROC(ctx, oid, OID_AUTO, name,
|
||||||
CTLTYPE_INT | CTLFLAG_RD,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
dev, i + 1, mv_thermal_sysctl,
|
dev, i + 1, mv_thermal_sysctl,
|
||||||
"IK",
|
"IK",
|
||||||
desc);
|
desc);
|
||||||
|
@ -150,7 +150,8 @@ ts_attach(device_t dev)
|
|||||||
}
|
}
|
||||||
ctx = device_get_sysctl_ctx(dev);
|
ctx = device_get_sysctl_ctx(dev);
|
||||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||||
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, dev,
|
OID_AUTO, "temperature",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev,
|
||||||
0, ts_sysctl_handler, "IK", "Current Temperature");
|
0, ts_sysctl_handler, "IK", "Current Temperature");
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -220,7 +220,8 @@ tegra124_coretemp_attach(device_t dev)
|
|||||||
|
|
||||||
oid = SYSCTL_ADD_NODE(ctx,
|
oid = SYSCTL_ADD_NODE(ctx,
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), OID_AUTO,
|
SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), OID_AUTO,
|
||||||
"coretemp", CTLFLAG_RD, NULL, "Per-CPU thermal information");
|
"coretemp", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
|
||||||
|
"Per-CPU thermal information");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add the MIBs to dev.cpu.N and dev.cpu.N.coretemp.
|
* Add the MIBs to dev.cpu.N and dev.cpu.N.coretemp.
|
||||||
|
@ -511,7 +511,7 @@ soctherm_init_sysctl(struct soctherm_softc *sc)
|
|||||||
/* create node for hw.temp */
|
/* create node for hw.temp */
|
||||||
oid = SYSCTL_ADD_NODE(&soctherm_sysctl_ctx,
|
oid = SYSCTL_ADD_NODE(&soctherm_sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "temperature",
|
SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "temperature",
|
||||||
CTLFLAG_RD, NULL, "");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "");
|
||||||
if (oid == NULL)
|
if (oid == NULL)
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ soctherm_init_sysctl(struct soctherm_softc *sc)
|
|||||||
for (i = sc->ntsensors - 1; i >= 0; i--) {
|
for (i = sc->ntsensors - 1; i >= 0; i--) {
|
||||||
tmp = SYSCTL_ADD_PROC(&soctherm_sysctl_ctx,
|
tmp = SYSCTL_ADD_PROC(&soctherm_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(oid), OID_AUTO, sc->tsensors[i].name,
|
SYSCTL_CHILDREN(oid), OID_AUTO, sc->tsensors[i].name,
|
||||||
CTLTYPE_INT | CTLFLAG_RD, sc, i,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, i,
|
||||||
soctherm_sysctl_temperature, "IK", "SoC Temperature");
|
soctherm_sysctl_temperature, "IK", "SoC Temperature");
|
||||||
if (tmp == NULL)
|
if (tmp == NULL)
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
@ -589,23 +589,23 @@ am335x_ehrpwm_attach(device_t dev)
|
|||||||
tree = device_get_sysctl_tree(sc->sc_dev);
|
tree = device_get_sysctl_tree(sc->sc_dev);
|
||||||
|
|
||||||
sc->sc_clkdiv_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
sc->sc_clkdiv_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||||
"clkdiv", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
"clkdiv", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
am335x_ehrpwm_sysctl_clkdiv, "I", "PWM clock prescaler");
|
am335x_ehrpwm_sysctl_clkdiv, "I", "PWM clock prescaler");
|
||||||
|
|
||||||
sc->sc_freq_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
sc->sc_freq_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||||
"freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
"freq", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
am335x_ehrpwm_sysctl_freq, "I", "PWM frequency");
|
am335x_ehrpwm_sysctl_freq, "I", "PWM frequency");
|
||||||
|
|
||||||
sc->sc_period_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
sc->sc_period_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||||
"period", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
"period", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
am335x_ehrpwm_sysctl_period, "I", "PWM period");
|
am335x_ehrpwm_sysctl_period, "I", "PWM period");
|
||||||
|
|
||||||
sc->sc_chanA_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
sc->sc_chanA_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||||
"dutyA", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
"dutyA", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
am335x_ehrpwm_sysctl_duty, "I", "Channel A duty cycles");
|
am335x_ehrpwm_sysctl_duty, "I", "Channel A duty cycles");
|
||||||
|
|
||||||
sc->sc_chanB_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
sc->sc_chanB_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||||
"dutyB", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
"dutyB", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
am335x_ehrpwm_sysctl_duty, "I", "Channel B duty cycles");
|
am335x_ehrpwm_sysctl_duty, "I", "Channel B duty cycles");
|
||||||
|
|
||||||
/* CONFIGURE EPWM1 */
|
/* CONFIGURE EPWM1 */
|
||||||
|
@ -1025,7 +1025,7 @@ am335x_lcd_attach(device_t dev)
|
|||||||
ctx = device_get_sysctl_ctx(sc->sc_dev);
|
ctx = device_get_sysctl_ctx(sc->sc_dev);
|
||||||
tree = device_get_sysctl_tree(sc->sc_dev);
|
tree = device_get_sysctl_tree(sc->sc_dev);
|
||||||
sc->sc_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
sc->sc_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
|
||||||
"backlight", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
|
"backlight", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
am335x_lcd_sysctl_backlight, "I", "LCD backlight");
|
am335x_lcd_sysctl_backlight, "I", "LCD backlight");
|
||||||
sc->sc_backlight = 0;
|
sc->sc_backlight = 0;
|
||||||
/* Check if eCAS interface is available at this point */
|
/* Check if eCAS interface is available at this point */
|
||||||
|
@ -115,7 +115,9 @@ static struct resource_spec am335x_musbotg_mem_spec[] = {
|
|||||||
#ifdef USB_DEBUG
|
#ifdef USB_DEBUG
|
||||||
static int usbssdebug = 0;
|
static int usbssdebug = 0;
|
||||||
|
|
||||||
static SYSCTL_NODE(_hw_usb, OID_AUTO, am335x_usbss, CTLFLAG_RW, 0, "AM335x USBSS");
|
static SYSCTL_NODE(_hw_usb, OID_AUTO, am335x_usbss,
|
||||||
|
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"AM335x USBSS");
|
||||||
SYSCTL_INT(_hw_usb_am335x_usbss, OID_AUTO, debug, CTLFLAG_RW,
|
SYSCTL_INT(_hw_usb_am335x_usbss, OID_AUTO, debug, CTLFLAG_RW,
|
||||||
&usbssdebug, 0, "Debug level");
|
&usbssdebug, 0, "Debug level");
|
||||||
#endif
|
#endif
|
||||||
|
@ -2725,15 +2725,17 @@ cpsw_add_sysctls(struct cpsw_softc *sc)
|
|||||||
CTLFLAG_RW, &sc->debug, 0, "Enable switch debug messages");
|
CTLFLAG_RW, &sc->debug, 0, "Enable switch debug messages");
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "attachedSecs",
|
SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "attachedSecs",
|
||||||
CTLTYPE_UINT | CTLFLAG_RD, sc, 0, cpsw_stat_attached, "IU",
|
CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, 0, cpsw_stat_attached, "IU",
|
||||||
"Time since driver attach");
|
"Time since driver attach");
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "intr_coalesce_us",
|
SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "intr_coalesce_us",
|
||||||
CTLTYPE_UINT | CTLFLAG_RW, sc, 0, cpsw_intr_coalesce, "IU",
|
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, 0, cpsw_intr_coalesce, "IU",
|
||||||
"minimum time between interrupts");
|
"minimum time between interrupts");
|
||||||
|
|
||||||
node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "ports",
|
node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "ports",
|
||||||
CTLFLAG_RD, NULL, "CPSW Ports Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "CPSW Ports Statistics");
|
||||||
ports_parent = SYSCTL_CHILDREN(node);
|
ports_parent = SYSCTL_CHILDREN(node);
|
||||||
for (i = 0; i < CPSW_PORTS; i++) {
|
for (i = 0; i < CPSW_PORTS; i++) {
|
||||||
if (!sc->dualemac && i != sc->active_slave)
|
if (!sc->dualemac && i != sc->active_slave)
|
||||||
@ -2741,38 +2743,39 @@ cpsw_add_sysctls(struct cpsw_softc *sc)
|
|||||||
port[0] = '0' + i;
|
port[0] = '0' + i;
|
||||||
port[1] = '\0';
|
port[1] = '\0';
|
||||||
node = SYSCTL_ADD_NODE(ctx, ports_parent, OID_AUTO,
|
node = SYSCTL_ADD_NODE(ctx, ports_parent, OID_AUTO,
|
||||||
port, CTLFLAG_RD, NULL, "CPSW Port Statistics");
|
port, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
|
||||||
|
"CPSW Port Statistics");
|
||||||
port_parent = SYSCTL_CHILDREN(node);
|
port_parent = SYSCTL_CHILDREN(node);
|
||||||
SYSCTL_ADD_PROC(ctx, port_parent, OID_AUTO, "uptime",
|
SYSCTL_ADD_PROC(ctx, port_parent, OID_AUTO, "uptime",
|
||||||
CTLTYPE_UINT | CTLFLAG_RD, sc, i,
|
CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, i,
|
||||||
cpsw_stat_uptime, "IU", "Seconds since driver init");
|
cpsw_stat_uptime, "IU", "Seconds since driver init");
|
||||||
}
|
}
|
||||||
|
|
||||||
stats_node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "stats",
|
stats_node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "stats",
|
||||||
CTLFLAG_RD, NULL, "CPSW Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "CPSW Statistics");
|
||||||
stats_parent = SYSCTL_CHILDREN(stats_node);
|
stats_parent = SYSCTL_CHILDREN(stats_node);
|
||||||
for (i = 0; i < CPSW_SYSCTL_COUNT; ++i) {
|
for (i = 0; i < CPSW_SYSCTL_COUNT; ++i) {
|
||||||
SYSCTL_ADD_PROC(ctx, stats_parent, i,
|
SYSCTL_ADD_PROC(ctx, stats_parent, i,
|
||||||
cpsw_stat_sysctls[i].oid,
|
cpsw_stat_sysctls[i].oid,
|
||||||
CTLTYPE_U64 | CTLFLAG_RD, sc, 0,
|
CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
cpsw_stats_sysctl, "IU",
|
sc, 0, cpsw_stats_sysctl, "IU",
|
||||||
cpsw_stat_sysctls[i].oid);
|
cpsw_stat_sysctls[i].oid);
|
||||||
}
|
}
|
||||||
|
|
||||||
queue_node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "queue",
|
queue_node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "queue",
|
||||||
CTLFLAG_RD, NULL, "CPSW Queue Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "CPSW Queue Statistics");
|
||||||
queue_parent = SYSCTL_CHILDREN(queue_node);
|
queue_parent = SYSCTL_CHILDREN(queue_node);
|
||||||
|
|
||||||
node = SYSCTL_ADD_NODE(ctx, queue_parent, OID_AUTO, "tx",
|
node = SYSCTL_ADD_NODE(ctx, queue_parent, OID_AUTO, "tx",
|
||||||
CTLFLAG_RD, NULL, "TX Queue Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TX Queue Statistics");
|
||||||
cpsw_add_queue_sysctls(ctx, node, &sc->tx);
|
cpsw_add_queue_sysctls(ctx, node, &sc->tx);
|
||||||
|
|
||||||
node = SYSCTL_ADD_NODE(ctx, queue_parent, OID_AUTO, "rx",
|
node = SYSCTL_ADD_NODE(ctx, queue_parent, OID_AUTO, "rx",
|
||||||
CTLFLAG_RD, NULL, "RX Queue Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "RX Queue Statistics");
|
||||||
cpsw_add_queue_sysctls(ctx, node, &sc->rx);
|
cpsw_add_queue_sysctls(ctx, node, &sc->rx);
|
||||||
|
|
||||||
node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "watchdog",
|
node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "watchdog",
|
||||||
CTLFLAG_RD, NULL, "Watchdog Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Watchdog Statistics");
|
||||||
cpsw_add_watchdog_sysctls(ctx, node, sc);
|
cpsw_add_watchdog_sysctls(ctx, node, sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,10 +562,10 @@ ti_adc_sysctl_init(struct ti_adc_softc *sc)
|
|||||||
tree_node = device_get_sysctl_tree(sc->sc_dev);
|
tree_node = device_get_sysctl_tree(sc->sc_dev);
|
||||||
tree = SYSCTL_CHILDREN(tree_node);
|
tree = SYSCTL_CHILDREN(tree_node);
|
||||||
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clockdiv",
|
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "clockdiv",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, sc, 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
ti_adc_clockdiv_proc, "IU", "ADC clock prescaler");
|
ti_adc_clockdiv_proc, "IU", "ADC clock prescaler");
|
||||||
inp_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "ain",
|
inp_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "ain",
|
||||||
CTLFLAG_RD, NULL, "ADC inputs");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ADC inputs");
|
||||||
inp_tree = SYSCTL_CHILDREN(inp_node);
|
inp_tree = SYSCTL_CHILDREN(inp_node);
|
||||||
|
|
||||||
for (i = 0; i < sc->sc_adc_nchannels; i++) {
|
for (i = 0; i < sc->sc_adc_nchannels; i++) {
|
||||||
@ -573,17 +573,20 @@ ti_adc_sysctl_init(struct ti_adc_softc *sc)
|
|||||||
|
|
||||||
snprintf(pinbuf, sizeof(pinbuf), "%d", ain);
|
snprintf(pinbuf, sizeof(pinbuf), "%d", ain);
|
||||||
inpN_node = SYSCTL_ADD_NODE(ctx, inp_tree, OID_AUTO, pinbuf,
|
inpN_node = SYSCTL_ADD_NODE(ctx, inp_tree, OID_AUTO, pinbuf,
|
||||||
CTLFLAG_RD, NULL, "ADC input");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ADC input");
|
||||||
inpN_tree = SYSCTL_CHILDREN(inpN_node);
|
inpN_tree = SYSCTL_CHILDREN(inpN_node);
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "enable",
|
SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "enable",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT,
|
||||||
|
&ti_adc_inputs[ain], 0,
|
||||||
ti_adc_enable_proc, "IU", "Enable ADC input");
|
ti_adc_enable_proc, "IU", "Enable ADC input");
|
||||||
SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "open_delay",
|
SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "open_delay",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT,
|
||||||
|
&ti_adc_inputs[ain], 0,
|
||||||
ti_adc_open_delay_proc, "IU", "ADC open delay");
|
ti_adc_open_delay_proc, "IU", "ADC open delay");
|
||||||
SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "samples_avg",
|
SYSCTL_ADD_PROC(ctx, inpN_tree, OID_AUTO, "samples_avg",
|
||||||
CTLFLAG_RW | CTLTYPE_UINT, &ti_adc_inputs[ain], 0,
|
CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_NEEDGIANT,
|
||||||
|
&ti_adc_inputs[ain], 0,
|
||||||
ti_adc_samples_avg_proc, "IU", "ADC samples average");
|
ti_adc_samples_avg_proc, "IU", "ADC samples average");
|
||||||
SYSCTL_ADD_INT(ctx, inpN_tree, OID_AUTO, "input",
|
SYSCTL_ADD_INT(ctx, inpN_tree, OID_AUTO, "input",
|
||||||
CTLFLAG_RD, &ti_adc_inputs[ain].value, 0,
|
CTLFLAG_RD, &ti_adc_inputs[ain].value, 0,
|
||||||
|
@ -542,10 +542,11 @@ ti_pruss_attach(device_t dev)
|
|||||||
|
|
||||||
sc->sc_glob_irqen = false;
|
sc->sc_glob_irqen = false;
|
||||||
struct sysctl_oid *irq_root = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(poid),
|
struct sysctl_oid *irq_root = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(poid),
|
||||||
OID_AUTO, "irq", CTLFLAG_RD, 0,
|
OID_AUTO, "irq", CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"PRUSS Host Interrupts");
|
"PRUSS Host Interrupts");
|
||||||
SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(poid), OID_AUTO,
|
SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(poid), OID_AUTO,
|
||||||
"global_interrupt_enable", CTLFLAG_RW | CTLTYPE_U8,
|
"global_interrupt_enable",
|
||||||
|
CTLFLAG_RW | CTLTYPE_U8 | CTLFLAG_NEEDGIANT,
|
||||||
sc, 0, ti_pruss_global_interrupt_enable,
|
sc, 0, ti_pruss_global_interrupt_enable,
|
||||||
"CU", "Global interrupt enable");
|
"CU", "Global interrupt enable");
|
||||||
|
|
||||||
@ -564,16 +565,19 @@ ti_pruss_attach(device_t dev)
|
|||||||
snprintf(name, sizeof(name), "%d", i);
|
snprintf(name, sizeof(name), "%d", i);
|
||||||
|
|
||||||
struct sysctl_oid *irq_nodes = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(irq_root),
|
struct sysctl_oid *irq_nodes = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(irq_root),
|
||||||
OID_AUTO, name, CTLFLAG_RD, 0,
|
OID_AUTO, name, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"PRUSS Interrupts");
|
"PRUSS Interrupts");
|
||||||
SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO,
|
SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO,
|
||||||
"channel", CTLFLAG_RW | CTLTYPE_STRING, sc, i, ti_pruss_channel_map,
|
"channel", CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, i, ti_pruss_channel_map,
|
||||||
"A", "Channel attached to this irq");
|
"A", "Channel attached to this irq");
|
||||||
SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO,
|
SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO,
|
||||||
"event", CTLFLAG_RW | CTLTYPE_STRING, sc, i, ti_pruss_event_map,
|
"event", CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, i, ti_pruss_event_map,
|
||||||
"A", "Event attached to this irq");
|
"A", "Event attached to this irq");
|
||||||
SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO,
|
SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO,
|
||||||
"enable", CTLFLAG_RW | CTLTYPE_U8, sc, i, ti_pruss_interrupt_enable,
|
"enable", CTLFLAG_RW | CTLTYPE_U8 | CTLFLAG_NEEDGIANT,
|
||||||
|
sc, i, ti_pruss_interrupt_enable,
|
||||||
"CU", "Enable/Disable interrupt");
|
"CU", "Enable/Disable interrupt");
|
||||||
|
|
||||||
sc->sc_irq_devs[i].event = -1;
|
sc->sc_irq_devs[i].event = -1;
|
||||||
|
@ -471,7 +471,7 @@ twl_clks_add_clock(struct twl_clks_softc *sc, const char *name,
|
|||||||
|
|
||||||
/* Add a sysctl entry for the clock */
|
/* Add a sysctl entry for the clock */
|
||||||
new->oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name,
|
new->oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name,
|
||||||
CTLTYPE_INT | CTLFLAG_RD, sc, 0,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
twl_clks_sysctl_clock, "I", "external clock");
|
twl_clks_sysctl_clock, "I", "external clock");
|
||||||
|
|
||||||
/* Finally add the regulator to list of supported regulators */
|
/* Finally add the regulator to list of supported regulators */
|
||||||
|
@ -848,7 +848,7 @@ twl_vreg_add_regulator(struct twl_vreg_softc *sc, const char *name,
|
|||||||
|
|
||||||
/* Add a sysctl entry for the voltage */
|
/* Add a sysctl entry for the voltage */
|
||||||
new->oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name,
|
new->oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name,
|
||||||
CTLTYPE_INT | CTLFLAG_RD, sc, 0,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
twl_vreg_sysctl_voltage, "I", "voltage regulator");
|
twl_vreg_sysctl_voltage, "I", "voltage regulator");
|
||||||
|
|
||||||
/* Finally add the regulator to list of supported regulators */
|
/* Finally add the regulator to list of supported regulators */
|
||||||
|
@ -101,12 +101,14 @@ static struct zy7_fclk_config fclk_configs[FCLK_NUM];
|
|||||||
#define RD4(sc, off) (bus_read_4((sc)->mem_res, (off)))
|
#define RD4(sc, off) (bus_read_4((sc)->mem_res, (off)))
|
||||||
#define WR4(sc, off, val) (bus_write_4((sc)->mem_res, (off), (val)))
|
#define WR4(sc, off, val) (bus_write_4((sc)->mem_res, (off), (val)))
|
||||||
|
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, fpga, CTLFLAG_RD, 0, \
|
SYSCTL_NODE(_hw, OID_AUTO, fpga, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"Xilinx Zynq-7000 PL (FPGA) section");
|
"Xilinx Zynq-7000 PL (FPGA) section");
|
||||||
|
|
||||||
static int zy7_devcfg_sysctl_pl_done(SYSCTL_HANDLER_ARGS);
|
static int zy7_devcfg_sysctl_pl_done(SYSCTL_HANDLER_ARGS);
|
||||||
SYSCTL_PROC(_hw_fpga, OID_AUTO, pl_done, CTLTYPE_INT | CTLFLAG_RD, NULL, 0,
|
SYSCTL_PROC(_hw_fpga, OID_AUTO, pl_done,
|
||||||
zy7_devcfg_sysctl_pl_done, "I", "PL section config DONE signal");
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, NULL, 0,
|
||||||
|
zy7_devcfg_sysctl_pl_done, "I",
|
||||||
|
"PL section config DONE signal");
|
||||||
|
|
||||||
static int zy7_en_level_shifters = 1;
|
static int zy7_en_level_shifters = 1;
|
||||||
SYSCTL_INT(_hw_fpga, OID_AUTO, en_level_shifters, CTLFLAG_RW,
|
SYSCTL_INT(_hw_fpga, OID_AUTO, en_level_shifters, CTLFLAG_RW,
|
||||||
@ -119,9 +121,9 @@ SYSCTL_INT(_hw, OID_AUTO, ps_vers, CTLFLAG_RD, &zy7_ps_vers, 0,
|
|||||||
|
|
||||||
static int zy7_devcfg_fclk_sysctl_level_shifters(SYSCTL_HANDLER_ARGS);
|
static int zy7_devcfg_fclk_sysctl_level_shifters(SYSCTL_HANDLER_ARGS);
|
||||||
SYSCTL_PROC(_hw_fpga, OID_AUTO, level_shifters,
|
SYSCTL_PROC(_hw_fpga, OID_AUTO, level_shifters,
|
||||||
CTLFLAG_RW | CTLTYPE_INT,
|
CTLFLAG_RW | CTLTYPE_INT | CTLFLAG_NEEDGIANT, NULL, 0,
|
||||||
NULL, 0, zy7_devcfg_fclk_sysctl_level_shifters,
|
zy7_devcfg_fclk_sysctl_level_shifters, "I",
|
||||||
"I", "Enable/disable level shifters");
|
"Enable/disable level shifters");
|
||||||
|
|
||||||
/* cdev entry points. */
|
/* cdev entry points. */
|
||||||
static int zy7_devcfg_open(struct cdev *, int, int, struct thread *);
|
static int zy7_devcfg_open(struct cdev *, int, int, struct thread *);
|
||||||
@ -360,7 +362,7 @@ zy7_devcfg_init_fclk_sysctl(struct zy7_devcfg_softc *sc)
|
|||||||
sysctl_ctx_init(&sc->sysctl_tree);
|
sysctl_ctx_init(&sc->sysctl_tree);
|
||||||
sc->sysctl_tree_top = SYSCTL_ADD_NODE(&sc->sysctl_tree,
|
sc->sysctl_tree_top = SYSCTL_ADD_NODE(&sc->sysctl_tree,
|
||||||
SYSCTL_STATIC_CHILDREN(_hw_fpga), OID_AUTO, "fclk",
|
SYSCTL_STATIC_CHILDREN(_hw_fpga), OID_AUTO, "fclk",
|
||||||
CTLFLAG_RD, 0, "");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
if (sc->sysctl_tree_top == NULL) {
|
if (sc->sysctl_tree_top == NULL) {
|
||||||
sysctl_ctx_free(&sc->sysctl_tree);
|
sysctl_ctx_free(&sc->sysctl_tree);
|
||||||
return (-1);
|
return (-1);
|
||||||
@ -370,7 +372,7 @@ zy7_devcfg_init_fclk_sysctl(struct zy7_devcfg_softc *sc)
|
|||||||
snprintf(fclk_num, sizeof(fclk_num), "%d", i);
|
snprintf(fclk_num, sizeof(fclk_num), "%d", i);
|
||||||
fclk_node = SYSCTL_ADD_NODE(&sc->sysctl_tree,
|
fclk_node = SYSCTL_ADD_NODE(&sc->sysctl_tree,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree_top), OID_AUTO, fclk_num,
|
SYSCTL_CHILDREN(sc->sysctl_tree_top), OID_AUTO, fclk_num,
|
||||||
CTLFLAG_RD, 0, "");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
|
|
||||||
SYSCTL_ADD_INT(&sc->sysctl_tree,
|
SYSCTL_ADD_INT(&sc->sysctl_tree,
|
||||||
SYSCTL_CHILDREN(fclk_node), OID_AUTO,
|
SYSCTL_CHILDREN(fclk_node), OID_AUTO,
|
||||||
@ -379,13 +381,13 @@ zy7_devcfg_init_fclk_sysctl(struct zy7_devcfg_softc *sc)
|
|||||||
"Actual frequency");
|
"Actual frequency");
|
||||||
SYSCTL_ADD_PROC(&sc->sysctl_tree,
|
SYSCTL_ADD_PROC(&sc->sysctl_tree,
|
||||||
SYSCTL_CHILDREN(fclk_node), OID_AUTO,
|
SYSCTL_CHILDREN(fclk_node), OID_AUTO,
|
||||||
"freq", CTLFLAG_RW | CTLTYPE_INT,
|
"freq", CTLFLAG_RW | CTLTYPE_INT | CTLFLAG_NEEDGIANT,
|
||||||
&fclk_configs[i], i,
|
&fclk_configs[i], i,
|
||||||
zy7_devcfg_fclk_sysctl_freq,
|
zy7_devcfg_fclk_sysctl_freq,
|
||||||
"I", "Configured frequency");
|
"I", "Configured frequency");
|
||||||
SYSCTL_ADD_PROC(&sc->sysctl_tree,
|
SYSCTL_ADD_PROC(&sc->sysctl_tree,
|
||||||
SYSCTL_CHILDREN(fclk_node), OID_AUTO,
|
SYSCTL_CHILDREN(fclk_node), OID_AUTO,
|
||||||
"source", CTLFLAG_RW | CTLTYPE_STRING,
|
"source", CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT,
|
||||||
&fclk_configs[i], i,
|
&fclk_configs[i], i,
|
||||||
zy7_devcfg_fclk_sysctl_source,
|
zy7_devcfg_fclk_sysctl_source,
|
||||||
"A", "Clock source");
|
"A", "Clock source");
|
||||||
|
@ -80,7 +80,8 @@ extern void (*zynq7_cpu_reset);
|
|||||||
|
|
||||||
#define ZYNQ_DEFAULT_PS_CLK_FREQUENCY 33333333 /* 33.3 Mhz */
|
#define ZYNQ_DEFAULT_PS_CLK_FREQUENCY 33333333 /* 33.3 Mhz */
|
||||||
|
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, zynq, CTLFLAG_RD, 0, "Xilinx Zynq-7000");
|
SYSCTL_NODE(_hw, OID_AUTO, zynq, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"Xilinx Zynq-7000");
|
||||||
|
|
||||||
static char zynq_bootmode[64];
|
static char zynq_bootmode[64];
|
||||||
SYSCTL_STRING(_hw_zynq, OID_AUTO, bootmode, CTLFLAG_RD, zynq_bootmode, 0,
|
SYSCTL_STRING(_hw_zynq, OID_AUTO, bootmode, CTLFLAG_RD, zynq_bootmode, 0,
|
||||||
|
@ -113,7 +113,8 @@ static int total_bpages;
|
|||||||
static int busdma_zonecount;
|
static int busdma_zonecount;
|
||||||
static STAILQ_HEAD(, bounce_zone) bounce_zone_list;
|
static STAILQ_HEAD(, bounce_zone) bounce_zone_list;
|
||||||
|
|
||||||
static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters");
|
static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"Busdma parameters");
|
||||||
SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0,
|
SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0,
|
||||||
"Total bounce pages");
|
"Total bounce pages");
|
||||||
|
|
||||||
@ -1146,7 +1147,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat)
|
|||||||
sysctl_ctx_init(&bz->sysctl_tree);
|
sysctl_ctx_init(&bz->sysctl_tree);
|
||||||
bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree,
|
bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree,
|
||||||
SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid,
|
SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid,
|
||||||
CTLFLAG_RD, 0, "");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
if (bz->sysctl_tree_top == NULL) {
|
if (bz->sysctl_tree_top == NULL) {
|
||||||
sysctl_ctx_free(&bz->sysctl_tree);
|
sysctl_ctx_free(&bz->sysctl_tree);
|
||||||
return (0); /* XXX error code? */
|
return (0); /* XXX error code? */
|
||||||
|
@ -270,7 +270,8 @@ extern pt_entry_t pagetable_dmap[];
|
|||||||
static vm_paddr_t physmap[PHYSMAP_SIZE];
|
static vm_paddr_t physmap[PHYSMAP_SIZE];
|
||||||
static u_int physmap_idx;
|
static u_int physmap_idx;
|
||||||
|
|
||||||
static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters");
|
static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"VM/pmap parameters");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This ASID allocator uses a bit vector ("asid_set") to remember which ASIDs
|
* This ASID allocator uses a bit vector ("asid_set") to remember which ASIDs
|
||||||
@ -294,7 +295,8 @@ struct asid_set {
|
|||||||
|
|
||||||
static struct asid_set asids;
|
static struct asid_set asids;
|
||||||
|
|
||||||
static SYSCTL_NODE(_vm_pmap, OID_AUTO, asid, CTLFLAG_RD, 0, "ASID allocator");
|
static SYSCTL_NODE(_vm_pmap, OID_AUTO, asid, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ASID allocator");
|
||||||
SYSCTL_INT(_vm_pmap_asid, OID_AUTO, bits, CTLFLAG_RD, &asids.asid_bits, 0,
|
SYSCTL_INT(_vm_pmap_asid, OID_AUTO, bits, CTLFLAG_RD, &asids.asid_bits, 0,
|
||||||
"The number of bits in an ASID");
|
"The number of bits in an ASID");
|
||||||
SYSCTL_INT(_vm_pmap_asid, OID_AUTO, next, CTLFLAG_RD, &asids.asid_next, 0,
|
SYSCTL_INT(_vm_pmap_asid, OID_AUTO, next, CTLFLAG_RD, &asids.asid_next, 0,
|
||||||
@ -1032,7 +1034,7 @@ pmap_init(void)
|
|||||||
vm_initialized = 1;
|
vm_initialized = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"2MB page mapping counters");
|
"2MB page mapping counters");
|
||||||
|
|
||||||
static u_long pmap_l2_demotions;
|
static u_long pmap_l2_demotions;
|
||||||
|
@ -881,7 +881,7 @@ static int ada_read_ahead = ADA_DEFAULT_READ_AHEAD;
|
|||||||
static int ada_write_cache = ADA_DEFAULT_WRITE_CACHE;
|
static int ada_write_cache = ADA_DEFAULT_WRITE_CACHE;
|
||||||
static int ada_enable_biospeedup = 1;
|
static int ada_enable_biospeedup = 1;
|
||||||
|
|
||||||
static SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Direct Access Disk driver");
|
"CAM Direct Access Disk driver");
|
||||||
SYSCTL_INT(_kern_cam_ada, OID_AUTO, retry_count, CTLFLAG_RWTUN,
|
SYSCTL_INT(_kern_cam_ada, OID_AUTO, retry_count, CTLFLAG_RWTUN,
|
||||||
&ada_retry_count, 0, "Normal I/O retry count");
|
&ada_retry_count, 0, "Normal I/O retry count");
|
||||||
@ -1455,7 +1455,7 @@ adasysctlinit(void *context, int pending)
|
|||||||
softc->flags |= ADA_FLAG_SCTX_INIT;
|
softc->flags |= ADA_FLAG_SCTX_INIT;
|
||||||
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_kern_cam_ada), OID_AUTO, tmpstr2,
|
SYSCTL_STATIC_CHILDREN(_kern_cam_ada), OID_AUTO, tmpstr2,
|
||||||
CTLFLAG_RD, 0, tmpstr, "device_index");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, tmpstr, "device_index");
|
||||||
if (softc->sysctl_tree == NULL) {
|
if (softc->sysctl_tree == NULL) {
|
||||||
printf("adasysctlinit: unable to allocate sysctl tree\n");
|
printf("adasysctlinit: unable to allocate sysctl tree\n");
|
||||||
cam_periph_release(periph);
|
cam_periph_release(periph);
|
||||||
@ -1463,7 +1463,8 @@ adasysctlinit(void *context, int pending)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "delete_method",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, adadeletemethodsysctl, "A",
|
softc, 0, adadeletemethodsysctl, "A",
|
||||||
"BIO_DELETE execution method");
|
"BIO_DELETE execution method");
|
||||||
SYSCTL_ADD_UQUAD(&softc->sysctl_ctx,
|
SYSCTL_ADD_UQUAD(&softc->sysctl_ctx,
|
||||||
@ -1491,11 +1492,13 @@ adasysctlinit(void *context, int pending)
|
|||||||
OID_AUTO, "rotating", CTLFLAG_RD | CTLFLAG_MPSAFE,
|
OID_AUTO, "rotating", CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||||
&softc->rotating, 0, "Rotating media");
|
&softc->rotating, 0, "Rotating media");
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "zone_mode", CTLTYPE_STRING | CTLFLAG_RD,
|
OID_AUTO, "zone_mode",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, adazonemodesysctl, "A",
|
softc, 0, adazonemodesysctl, "A",
|
||||||
"Zone Mode");
|
"Zone Mode");
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "zone_support", CTLTYPE_STRING | CTLFLAG_RD,
|
OID_AUTO, "zone_support",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, adazonesupsysctl, "A",
|
softc, 0, adazonesupsysctl, "A",
|
||||||
"Zone Support");
|
"Zone Support");
|
||||||
SYSCTL_ADD_UQUAD(&softc->sysctl_ctx,
|
SYSCTL_ADD_UQUAD(&softc->sysctl_ctx,
|
||||||
@ -1540,7 +1543,7 @@ adasysctlinit(void *context, int pending)
|
|||||||
#ifdef CAM_IO_STATS
|
#ifdef CAM_IO_STATS
|
||||||
softc->sysctl_stats_tree = SYSCTL_ADD_NODE(&softc->sysctl_stats_ctx,
|
softc->sysctl_stats_tree = SYSCTL_ADD_NODE(&softc->sysctl_stats_ctx,
|
||||||
SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "stats",
|
SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "stats",
|
||||||
CTLFLAG_RD, 0, "Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Statistics");
|
||||||
SYSCTL_ADD_INT(&softc->sysctl_stats_ctx,
|
SYSCTL_ADD_INT(&softc->sysctl_stats_ctx,
|
||||||
SYSCTL_CHILDREN(softc->sysctl_stats_tree),
|
SYSCTL_CHILDREN(softc->sysctl_stats_tree),
|
||||||
OID_AUTO, "timeouts", CTLFLAG_RD | CTLFLAG_MPSAFE,
|
OID_AUTO, "timeouts", CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||||
|
@ -139,7 +139,7 @@ static int pmp_retry_count = PMP_DEFAULT_RETRY;
|
|||||||
static int pmp_default_timeout = PMP_DEFAULT_TIMEOUT;
|
static int pmp_default_timeout = PMP_DEFAULT_TIMEOUT;
|
||||||
static int pmp_hide_special = PMP_DEFAULT_HIDE_SPECIAL;
|
static int pmp_hide_special = PMP_DEFAULT_HIDE_SPECIAL;
|
||||||
|
|
||||||
static SYSCTL_NODE(_kern_cam, OID_AUTO, pmp, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_kern_cam, OID_AUTO, pmp, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Direct Access Disk driver");
|
"CAM Direct Access Disk driver");
|
||||||
SYSCTL_INT(_kern_cam_pmp, OID_AUTO, retry_count, CTLFLAG_RWTUN,
|
SYSCTL_INT(_kern_cam_pmp, OID_AUTO, retry_count, CTLFLAG_RWTUN,
|
||||||
&pmp_retry_count, 0, "Normal I/O retry count");
|
&pmp_retry_count, 0, "Normal I/O retry count");
|
||||||
@ -354,7 +354,7 @@ pmpsysctlinit(void *context, int pending)
|
|||||||
softc->flags |= PMP_FLAG_SCTX_INIT;
|
softc->flags |= PMP_FLAG_SCTX_INIT;
|
||||||
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_kern_cam_pmp), OID_AUTO, tmpstr2,
|
SYSCTL_STATIC_CHILDREN(_kern_cam_pmp), OID_AUTO, tmpstr2,
|
||||||
CTLFLAG_RD, 0, tmpstr, "device_index");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, tmpstr, "device_index");
|
||||||
if (softc->sysctl_tree == NULL) {
|
if (softc->sysctl_tree == NULL) {
|
||||||
printf("pmpsysctlinit: unable to allocate sysctl tree\n");
|
printf("pmpsysctlinit: unable to allocate sysctl tree\n");
|
||||||
cam_periph_release(periph);
|
cam_periph_release(periph);
|
||||||
|
@ -108,7 +108,8 @@ const struct cam_status_entry cam_status_table[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem");
|
SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"CAM Subsystem");
|
||||||
|
|
||||||
#ifndef CAM_DEFAULT_SORT_IO_QUEUES
|
#ifndef CAM_DEFAULT_SORT_IO_QUEUES
|
||||||
#define CAM_DEFAULT_SORT_IO_QUEUES 1
|
#define CAM_DEFAULT_SORT_IO_QUEUES 1
|
||||||
|
@ -976,7 +976,7 @@ cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stat
|
|||||||
|
|
||||||
ios->sysctl_tree = SYSCTL_ADD_NODE(&isc->sysctl_ctx,
|
ios->sysctl_tree = SYSCTL_ADD_NODE(&isc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(isc->sysctl_tree), OID_AUTO, name,
|
SYSCTL_CHILDREN(isc->sysctl_tree), OID_AUTO, name,
|
||||||
CTLFLAG_RD, 0, name);
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, name);
|
||||||
n = SYSCTL_CHILDREN(ios->sysctl_tree);
|
n = SYSCTL_CHILDREN(ios->sysctl_tree);
|
||||||
ctx = &ios->sysctl_ctx;
|
ctx = &ios->sysctl_ctx;
|
||||||
|
|
||||||
@ -1015,7 +1015,8 @@ cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stat
|
|||||||
"# of transactions completed with an error");
|
"# of transactions completed with an error");
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, n,
|
SYSCTL_ADD_PROC(ctx, n,
|
||||||
OID_AUTO, "limiter", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "limiter",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
ios, 0, cam_iosched_limiter_sysctl, "A",
|
ios, 0, cam_iosched_limiter_sysctl, "A",
|
||||||
"Current limiting type.");
|
"Current limiting type.");
|
||||||
SYSCTL_ADD_INT(ctx, n,
|
SYSCTL_ADD_INT(ctx, n,
|
||||||
@ -1032,7 +1033,8 @@ cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stat
|
|||||||
"current resource");
|
"current resource");
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, n,
|
SYSCTL_ADD_PROC(ctx, n,
|
||||||
OID_AUTO, "latencies", CTLTYPE_STRING | CTLFLAG_RD,
|
OID_AUTO, "latencies",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
&ios->latencies, 0,
|
&ios->latencies, 0,
|
||||||
cam_iosched_sysctl_latencies, "A",
|
cam_iosched_sysctl_latencies, "A",
|
||||||
"Array of power of 2 latency from 1ms to 1.024s");
|
"Array of power of 2 latency from 1ms to 1.024s");
|
||||||
@ -1056,24 +1058,28 @@ cam_iosched_cl_sysctl_init(struct cam_iosched_softc *isc)
|
|||||||
clp = &isc->cl;
|
clp = &isc->cl;
|
||||||
clp->sysctl_tree = SYSCTL_ADD_NODE(&isc->sysctl_ctx,
|
clp->sysctl_tree = SYSCTL_ADD_NODE(&isc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(isc->sysctl_tree), OID_AUTO, "control",
|
SYSCTL_CHILDREN(isc->sysctl_tree), OID_AUTO, "control",
|
||||||
CTLFLAG_RD, 0, "Control loop info");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Control loop info");
|
||||||
n = SYSCTL_CHILDREN(clp->sysctl_tree);
|
n = SYSCTL_CHILDREN(clp->sysctl_tree);
|
||||||
ctx = &clp->sysctl_ctx;
|
ctx = &clp->sysctl_ctx;
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, n,
|
SYSCTL_ADD_PROC(ctx, n,
|
||||||
OID_AUTO, "type", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "type",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
clp, 0, cam_iosched_control_type_sysctl, "A",
|
clp, 0, cam_iosched_control_type_sysctl, "A",
|
||||||
"Control loop algorithm");
|
"Control loop algorithm");
|
||||||
SYSCTL_ADD_PROC(ctx, n,
|
SYSCTL_ADD_PROC(ctx, n,
|
||||||
OID_AUTO, "steer_interval", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "steer_interval",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&clp->steer_interval, 0, cam_iosched_sbintime_sysctl, "A",
|
&clp->steer_interval, 0, cam_iosched_sbintime_sysctl, "A",
|
||||||
"How often to steer (in us)");
|
"How often to steer (in us)");
|
||||||
SYSCTL_ADD_PROC(ctx, n,
|
SYSCTL_ADD_PROC(ctx, n,
|
||||||
OID_AUTO, "lolat", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "lolat",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&clp->lolat, 0, cam_iosched_sbintime_sysctl, "A",
|
&clp->lolat, 0, cam_iosched_sbintime_sysctl, "A",
|
||||||
"Low water mark for Latency (in us)");
|
"Low water mark for Latency (in us)");
|
||||||
SYSCTL_ADD_PROC(ctx, n,
|
SYSCTL_ADD_PROC(ctx, n,
|
||||||
OID_AUTO, "hilat", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "hilat",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&clp->hilat, 0, cam_iosched_sbintime_sysctl, "A",
|
&clp->hilat, 0, cam_iosched_sbintime_sysctl, "A",
|
||||||
"Hi water mark for Latency (in us)");
|
"Hi water mark for Latency (in us)");
|
||||||
SYSCTL_ADD_INT(ctx, n,
|
SYSCTL_ADD_INT(ctx, n,
|
||||||
@ -1186,7 +1192,7 @@ void cam_iosched_sysctl_init(struct cam_iosched_softc *isc,
|
|||||||
|
|
||||||
isc->sysctl_tree = SYSCTL_ADD_NODE(&isc->sysctl_ctx,
|
isc->sysctl_tree = SYSCTL_ADD_NODE(&isc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(node), OID_AUTO, "iosched",
|
SYSCTL_CHILDREN(node), OID_AUTO, "iosched",
|
||||||
CTLFLAG_RD, 0, "I/O scheduler statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "I/O scheduler statistics");
|
||||||
n = SYSCTL_CHILDREN(isc->sysctl_tree);
|
n = SYSCTL_CHILDREN(isc->sysctl_tree);
|
||||||
ctx = &isc->sysctl_ctx;
|
ctx = &isc->sysctl_ctx;
|
||||||
|
|
||||||
@ -1201,7 +1207,7 @@ void cam_iosched_sysctl_init(struct cam_iosched_softc *isc,
|
|||||||
"How biased towards read should we be independent of limits");
|
"How biased towards read should we be independent of limits");
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(ctx, n,
|
SYSCTL_ADD_PROC(ctx, n,
|
||||||
OID_AUTO, "quanta", CTLTYPE_UINT | CTLFLAG_RW,
|
OID_AUTO, "quanta", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&isc->quanta, 0, cam_iosched_quanta_sysctl, "I",
|
&isc->quanta, 0, cam_iosched_quanta_sysctl, "I",
|
||||||
"How many quanta per second do we slice the I/O up into");
|
"How many quanta per second do we slice the I/O up into");
|
||||||
|
|
||||||
|
@ -406,7 +406,8 @@ const static struct scsi_cddvd_capabilities_page cddvd_page_changeable = {
|
|||||||
/*num_speed_descr*/0,
|
/*num_speed_descr*/0,
|
||||||
};
|
};
|
||||||
|
|
||||||
SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer");
|
SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"CAM Target Layer");
|
||||||
static int worker_threads = -1;
|
static int worker_threads = -1;
|
||||||
SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN,
|
SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN,
|
||||||
&worker_threads, 1, "Number of worker threads");
|
&worker_threads, 1, "Number of worker threads");
|
||||||
@ -1879,7 +1880,7 @@ ctl_init(void)
|
|||||||
sysctl_ctx_init(&softc->sysctl_ctx);
|
sysctl_ctx_init(&softc->sysctl_ctx);
|
||||||
softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
|
softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_kern_cam), OID_AUTO, "ctl",
|
SYSCTL_STATIC_CHILDREN(_kern_cam), OID_AUTO, "ctl",
|
||||||
CTLFLAG_RD, 0, "CAM Target Layer");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CAM Target Layer");
|
||||||
|
|
||||||
if (softc->sysctl_tree == NULL) {
|
if (softc->sysctl_tree == NULL) {
|
||||||
printf("%s: unable to allocate sysctl tree\n", __func__);
|
printf("%s: unable to allocate sysctl tree\n", __func__);
|
||||||
@ -1986,7 +1987,8 @@ ctl_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "ha_role", CTLTYPE_INT | CTLFLAG_RWTUN,
|
OID_AUTO, "ha_role",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, ctl_ha_role_sysctl, "I", "HA role for this head");
|
softc, 0, ctl_ha_role_sysctl, "I", "HA role for this head");
|
||||||
|
|
||||||
if (softc->is_single == 0) {
|
if (softc->is_single == 0) {
|
||||||
|
@ -222,7 +222,7 @@ struct ctl_be_block_io {
|
|||||||
extern struct ctl_softc *control_softc;
|
extern struct ctl_softc *control_softc;
|
||||||
|
|
||||||
static int cbb_num_threads = 14;
|
static int cbb_num_threads = 14;
|
||||||
SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, block, CTLFLAG_RD, 0,
|
SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, block, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Target Layer Block Backend");
|
"CAM Target Layer Block Backend");
|
||||||
SYSCTL_INT(_kern_cam_ctl_block, OID_AUTO, num_threads, CTLFLAG_RWTUN,
|
SYSCTL_INT(_kern_cam_ctl_block, OID_AUTO, num_threads, CTLFLAG_RWTUN,
|
||||||
&cbb_num_threads, 0, "Number of threads per backing file");
|
&cbb_num_threads, 0, "Number of threads per backing file");
|
||||||
|
@ -109,7 +109,7 @@ struct cfcs_softc cfcs_softc;
|
|||||||
*/
|
*/
|
||||||
static int cfcs_max_sense = sizeof(struct scsi_sense_data);
|
static int cfcs_max_sense = sizeof(struct scsi_sense_data);
|
||||||
|
|
||||||
SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD, 0,
|
SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Target Layer SIM frontend");
|
"CAM Target Layer SIM frontend");
|
||||||
SYSCTL_INT(_kern_cam_ctl2cam, OID_AUTO, max_sense, CTLFLAG_RW,
|
SYSCTL_INT(_kern_cam_ctl2cam, OID_AUTO, max_sense, CTLFLAG_RW,
|
||||||
&cfcs_max_sense, 0, "Maximum sense data size");
|
&cfcs_max_sense, 0, "Maximum sense data size");
|
||||||
|
@ -88,7 +88,7 @@ FEATURE(cfiscsi_kernel_proxy, "iSCSI target built with ICL_KERNEL_PROXY");
|
|||||||
static MALLOC_DEFINE(M_CFISCSI, "cfiscsi", "Memory used for CTL iSCSI frontend");
|
static MALLOC_DEFINE(M_CFISCSI, "cfiscsi", "Memory used for CTL iSCSI frontend");
|
||||||
static uma_zone_t cfiscsi_data_wait_zone;
|
static uma_zone_t cfiscsi_data_wait_zone;
|
||||||
|
|
||||||
SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, iscsi, CTLFLAG_RD, 0,
|
SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, iscsi, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Target Layer iSCSI Frontend");
|
"CAM Target Layer iSCSI Frontend");
|
||||||
static int debug = 1;
|
static int debug = 1;
|
||||||
SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, debug, CTLFLAG_RWTUN,
|
SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, debug, CTLFLAG_RWTUN,
|
||||||
|
@ -957,7 +957,8 @@ ctl_ha_msg_init(struct ctl_softc *ctl_softc)
|
|||||||
ctl_ha_msg_shutdown, ctl_softc, SHUTDOWN_PRI_FIRST);
|
ctl_ha_msg_shutdown, ctl_softc, SHUTDOWN_PRI_FIRST);
|
||||||
SYSCTL_ADD_PROC(&ctl_softc->sysctl_ctx,
|
SYSCTL_ADD_PROC(&ctl_softc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(ctl_softc->sysctl_tree),
|
SYSCTL_CHILDREN(ctl_softc->sysctl_tree),
|
||||||
OID_AUTO, "ha_peer", CTLTYPE_STRING | CTLFLAG_RWTUN,
|
OID_AUTO, "ha_peer",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, ctl_ha_peer_sysctl, "A", "HA peer connection method");
|
softc, 0, ctl_ha_peer_sysctl, "A", "HA peer connection method");
|
||||||
|
|
||||||
if (ctl_ha_msg_register(CTL_HA_CHAN_DATA, ctl_dt_event_handler)
|
if (ctl_ha_msg_register(CTL_HA_CHAN_DATA, ctl_dt_event_handler)
|
||||||
|
@ -168,7 +168,7 @@ static void ndasuspend(void *arg);
|
|||||||
#define NDA_MAX_TRIM_ENTRIES (NVME_MAX_DSM_TRIM / sizeof(struct nvme_dsm_range))/* Number of DSM trims to use, max 256 */
|
#define NDA_MAX_TRIM_ENTRIES (NVME_MAX_DSM_TRIM / sizeof(struct nvme_dsm_range))/* Number of DSM trims to use, max 256 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static SYSCTL_NODE(_kern_cam, OID_AUTO, nda, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_kern_cam, OID_AUTO, nda, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Direct Access Disk driver");
|
"CAM Direct Access Disk driver");
|
||||||
|
|
||||||
//static int nda_retry_count = NDA_DEFAULT_RETRY;
|
//static int nda_retry_count = NDA_DEFAULT_RETRY;
|
||||||
@ -627,7 +627,7 @@ ndasysctlinit(void *context, int pending)
|
|||||||
softc->flags |= NDA_FLAG_SCTX_INIT;
|
softc->flags |= NDA_FLAG_SCTX_INIT;
|
||||||
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_kern_cam_nda), OID_AUTO, tmpstr2,
|
SYSCTL_STATIC_CHILDREN(_kern_cam_nda), OID_AUTO, tmpstr2,
|
||||||
CTLFLAG_RD, 0, tmpstr, "device_index");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, tmpstr, "device_index");
|
||||||
if (softc->sysctl_tree == NULL) {
|
if (softc->sysctl_tree == NULL) {
|
||||||
printf("ndasysctlinit: unable to allocate sysctl tree\n");
|
printf("ndasysctlinit: unable to allocate sysctl tree\n");
|
||||||
cam_periph_release(periph);
|
cam_periph_release(periph);
|
||||||
@ -662,7 +662,7 @@ ndasysctlinit(void *context, int pending)
|
|||||||
#ifdef CAM_IO_STATS
|
#ifdef CAM_IO_STATS
|
||||||
softc->sysctl_stats_tree = SYSCTL_ADD_NODE(&softc->sysctl_stats_ctx,
|
softc->sysctl_stats_tree = SYSCTL_ADD_NODE(&softc->sysctl_stats_ctx,
|
||||||
SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "stats",
|
SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "stats",
|
||||||
CTLFLAG_RD, 0, "Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Statistics");
|
||||||
if (softc->sysctl_stats_tree == NULL) {
|
if (softc->sysctl_stats_tree == NULL) {
|
||||||
printf("ndasysctlinit: unable to allocate sysctl tree for stats\n");
|
printf("ndasysctlinit: unable to allocate sysctl tree for stats\n");
|
||||||
cam_periph_release(periph);
|
cam_periph_release(periph);
|
||||||
|
@ -9234,8 +9234,8 @@ sysctl_scsi_delay(SYSCTL_HANDLER_ARGS)
|
|||||||
return (error);
|
return (error);
|
||||||
return (set_scsi_delay(delay));
|
return (set_scsi_delay(delay));
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_kern_cam, OID_AUTO, scsi_delay, CTLTYPE_INT|CTLFLAG_RW,
|
SYSCTL_PROC(_kern_cam, OID_AUTO, scsi_delay,
|
||||||
0, 0, sysctl_scsi_delay, "I",
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 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)");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -326,7 +326,8 @@ static int cd_poll_period = CD_DEFAULT_POLL_PERIOD;
|
|||||||
static int cd_retry_count = CD_DEFAULT_RETRY;
|
static int cd_retry_count = CD_DEFAULT_RETRY;
|
||||||
static int cd_timeout = CD_DEFAULT_TIMEOUT;
|
static int cd_timeout = CD_DEFAULT_TIMEOUT;
|
||||||
|
|
||||||
static SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver");
|
static SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"CAM CDROM driver");
|
||||||
SYSCTL_INT(_kern_cam_cd, OID_AUTO, poll_period, CTLFLAG_RWTUN,
|
SYSCTL_INT(_kern_cam_cd, OID_AUTO, poll_period, CTLFLAG_RWTUN,
|
||||||
&cd_poll_period, 0, "Media polling period in seconds");
|
&cd_poll_period, 0, "Media polling period in seconds");
|
||||||
SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RWTUN,
|
SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RWTUN,
|
||||||
@ -523,7 +524,8 @@ cdsysctlinit(void *context, int pending)
|
|||||||
softc->flags |= CD_FLAG_SCTX_INIT;
|
softc->flags |= CD_FLAG_SCTX_INIT;
|
||||||
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_kern_cam_cd), OID_AUTO,
|
SYSCTL_STATIC_CHILDREN(_kern_cam_cd), OID_AUTO,
|
||||||
tmpstr2, CTLFLAG_RD, 0, tmpstr, "device_index");
|
tmpstr2, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, tmpstr,
|
||||||
|
"device_index");
|
||||||
|
|
||||||
if (softc->sysctl_tree == NULL) {
|
if (softc->sysctl_tree == NULL) {
|
||||||
printf("cdsysctlinit: unable to allocate sysctl tree\n");
|
printf("cdsysctlinit: unable to allocate sysctl tree\n");
|
||||||
@ -536,7 +538,8 @@ cdsysctlinit(void *context, int pending)
|
|||||||
* the fly.
|
* the fly.
|
||||||
*/
|
*/
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "minimum_cmd_size",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&softc->minimum_command_size, 0, cdcmdsizesysctl, "I",
|
&softc->minimum_command_size, 0, cdcmdsizesysctl, "I",
|
||||||
"Minimum CDB size");
|
"Minimum CDB size");
|
||||||
|
|
||||||
|
@ -1549,7 +1549,7 @@ static int da_send_ordered = DA_DEFAULT_SEND_ORDERED;
|
|||||||
static int da_disable_wp_detection = 0;
|
static int da_disable_wp_detection = 0;
|
||||||
static int da_enable_biospeedup = 1;
|
static int da_enable_biospeedup = 1;
|
||||||
|
|
||||||
static SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Direct Access Disk driver");
|
"CAM Direct Access Disk driver");
|
||||||
SYSCTL_INT(_kern_cam_da, OID_AUTO, poll_period, CTLFLAG_RWTUN,
|
SYSCTL_INT(_kern_cam_da, OID_AUTO, poll_period, CTLFLAG_RWTUN,
|
||||||
&da_poll_period, 0, "Media polling period in seconds");
|
&da_poll_period, 0, "Media polling period in seconds");
|
||||||
@ -1566,7 +1566,8 @@ SYSCTL_INT(_kern_cam_da, OID_AUTO, enable_biospeedup, CTLFLAG_RDTUN,
|
|||||||
&da_enable_biospeedup, 0, "Enable BIO_SPEEDUP processing");
|
&da_enable_biospeedup, 0, "Enable BIO_SPEEDUP processing");
|
||||||
|
|
||||||
SYSCTL_PROC(_kern_cam_da, OID_AUTO, default_softtimeout,
|
SYSCTL_PROC(_kern_cam_da, OID_AUTO, default_softtimeout,
|
||||||
CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, dasysctlsofttimeout, "I",
|
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, NULL, 0,
|
||||||
|
dasysctlsofttimeout, "I",
|
||||||
"Soft I/O timeout (ms)");
|
"Soft I/O timeout (ms)");
|
||||||
TUNABLE_INT64("kern.cam.da.default_softtimeout", &da_default_softtimeout);
|
TUNABLE_INT64("kern.cam.da.default_softtimeout", &da_default_softtimeout);
|
||||||
|
|
||||||
@ -2252,7 +2253,7 @@ dasysctlinit(void *context, int pending)
|
|||||||
cam_periph_unlock(periph);
|
cam_periph_unlock(periph);
|
||||||
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2,
|
SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2,
|
||||||
CTLFLAG_RD, 0, tmpstr, "device_index");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, tmpstr, "device_index");
|
||||||
if (softc->sysctl_tree == NULL) {
|
if (softc->sysctl_tree == NULL) {
|
||||||
printf("dasysctlinit: unable to allocate sysctl tree\n");
|
printf("dasysctlinit: unable to allocate sysctl tree\n");
|
||||||
da_periph_release(periph, DA_REF_SYSCTL);
|
da_periph_release(periph, DA_REF_SYSCTL);
|
||||||
@ -2264,15 +2265,18 @@ dasysctlinit(void *context, int pending)
|
|||||||
* the fly.
|
* the fly.
|
||||||
*/
|
*/
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RWTUN,
|
OID_AUTO, "delete_method",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, dadeletemethodsysctl, "A",
|
softc, 0, dadeletemethodsysctl, "A",
|
||||||
"BIO_DELETE execution method");
|
"BIO_DELETE execution method");
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "delete_max", CTLTYPE_U64 | CTLFLAG_RW,
|
OID_AUTO, "delete_max",
|
||||||
|
CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, dadeletemaxsysctl, "Q",
|
softc, 0, dadeletemaxsysctl, "Q",
|
||||||
"Maximum BIO_DELETE size");
|
"Maximum BIO_DELETE size");
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "minimum_cmd_size",
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&softc->minimum_cmd_size, 0, dacmdsizesysctl, "I",
|
&softc->minimum_cmd_size, 0, dacmdsizesysctl, "I",
|
||||||
"Minimum CDB size");
|
"Minimum CDB size");
|
||||||
SYSCTL_ADD_UQUAD(&softc->sysctl_ctx,
|
SYSCTL_ADD_UQUAD(&softc->sysctl_ctx,
|
||||||
@ -2289,11 +2293,13 @@ dasysctlinit(void *context, int pending)
|
|||||||
"Total lbas in the unmap/dsm commands sent");
|
"Total lbas in the unmap/dsm commands sent");
|
||||||
|
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "zone_mode", CTLTYPE_STRING | CTLFLAG_RD,
|
OID_AUTO, "zone_mode",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, dazonemodesysctl, "A",
|
softc, 0, dazonemodesysctl, "A",
|
||||||
"Zone Mode");
|
"Zone Mode");
|
||||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||||
OID_AUTO, "zone_support", CTLTYPE_STRING | CTLFLAG_RD,
|
OID_AUTO, "zone_support",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
softc, 0, dazonesupsysctl, "A",
|
softc, 0, dazonesupsysctl, "A",
|
||||||
"Zone Support");
|
"Zone Support");
|
||||||
SYSCTL_ADD_UQUAD(&softc->sysctl_ctx,
|
SYSCTL_ADD_UQUAD(&softc->sysctl_ctx,
|
||||||
@ -2381,7 +2387,7 @@ dasysctlinit(void *context, int pending)
|
|||||||
*/
|
*/
|
||||||
softc->sysctl_stats_tree = SYSCTL_ADD_NODE(&softc->sysctl_stats_ctx,
|
softc->sysctl_stats_tree = SYSCTL_ADD_NODE(&softc->sysctl_stats_ctx,
|
||||||
SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "stats",
|
SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "stats",
|
||||||
CTLFLAG_RD, 0, "Statistics");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Statistics");
|
||||||
SYSCTL_ADD_INT(&softc->sysctl_stats_ctx,
|
SYSCTL_ADD_INT(&softc->sysctl_stats_ctx,
|
||||||
SYSCTL_CHILDREN(softc->sysctl_stats_tree),
|
SYSCTL_CHILDREN(softc->sysctl_stats_tree),
|
||||||
OID_AUTO,
|
OID_AUTO,
|
||||||
|
@ -78,7 +78,7 @@ static periph_dtor_t enc_dtor;
|
|||||||
static void enc_async(void *, uint32_t, struct cam_path *, void *);
|
static void enc_async(void *, uint32_t, struct cam_path *, void *);
|
||||||
static enctyp enc_type(struct ccb_getdev *);
|
static enctyp enc_type(struct ccb_getdev *);
|
||||||
|
|
||||||
SYSCTL_NODE(_kern_cam, OID_AUTO, enc, CTLFLAG_RD, 0,
|
SYSCTL_NODE(_kern_cam, OID_AUTO, enc, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Enclosure Services driver");
|
"CAM Enclosure Services driver");
|
||||||
|
|
||||||
#if defined(DEBUG) || defined(ENC_DEBUG)
|
#if defined(DEBUG) || defined(ENC_DEBUG)
|
||||||
|
@ -618,7 +618,7 @@ static int sa_allow_io_split = SA_DEFAULT_IO_SPLIT;
|
|||||||
* is bad behavior, because it hides the true tape block size from the
|
* is bad behavior, because it hides the true tape block size from the
|
||||||
* application.
|
* application.
|
||||||
*/
|
*/
|
||||||
static SYSCTL_NODE(_kern_cam, OID_AUTO, sa, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_kern_cam, OID_AUTO, sa, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"CAM Sequential Access Tape Driver");
|
"CAM Sequential Access Tape Driver");
|
||||||
SYSCTL_INT(_kern_cam_sa, OID_AUTO, allow_io_split, CTLFLAG_RDTUN,
|
SYSCTL_INT(_kern_cam_sa, OID_AUTO, allow_io_split, CTLFLAG_RDTUN,
|
||||||
&sa_allow_io_split, 0, "Default I/O split value");
|
&sa_allow_io_split, 0, "Default I/O split value");
|
||||||
@ -2314,7 +2314,7 @@ sasysctlinit(void *context, int pending)
|
|||||||
softc->flags |= SA_FLAG_SCTX_INIT;
|
softc->flags |= SA_FLAG_SCTX_INIT;
|
||||||
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_kern_cam_sa), OID_AUTO, tmpstr2,
|
SYSCTL_STATIC_CHILDREN(_kern_cam_sa), OID_AUTO, tmpstr2,
|
||||||
CTLFLAG_RD, 0, tmpstr, "device_index");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, tmpstr, "device_index");
|
||||||
if (softc->sysctl_tree == NULL)
|
if (softc->sysctl_tree == NULL)
|
||||||
goto bailout;
|
goto bailout;
|
||||||
|
|
||||||
|
@ -80,7 +80,8 @@ struct scsi_quirk_entry {
|
|||||||
|
|
||||||
static int cam_srch_hi = 0;
|
static int cam_srch_hi = 0;
|
||||||
static int sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS);
|
static int sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS);
|
||||||
SYSCTL_PROC(_kern_cam, OID_AUTO, cam_srch_hi, CTLTYPE_INT | CTLFLAG_RWTUN, 0, 0,
|
SYSCTL_PROC(_kern_cam, OID_AUTO, cam_srch_hi,
|
||||||
|
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, 0, 0,
|
||||||
sysctl_cam_search_luns, "I",
|
sysctl_cam_search_luns, "I",
|
||||||
"allow search above LUN 7 for SCSI3 and greater devices");
|
"allow search above LUN 7 for SCSI3 and greater devices");
|
||||||
|
|
||||||
|
@ -36,7 +36,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
static MALLOC_DEFINE(M_KSTAT, "kstat_data", "Kernel statistics");
|
static MALLOC_DEFINE(M_KSTAT, "kstat_data", "Kernel statistics");
|
||||||
|
|
||||||
SYSCTL_ROOT_NODE(OID_AUTO, kstat, CTLFLAG_RW, 0, "Kernel statistics");
|
SYSCTL_ROOT_NODE(OID_AUTO, kstat, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"Kernel statistics");
|
||||||
|
|
||||||
kstat_t *
|
kstat_t *
|
||||||
kstat_create(char *module, int instance, char *name, char *class, uchar_t type,
|
kstat_create(char *module, int instance, char *name, char *class, uchar_t type,
|
||||||
@ -64,8 +65,8 @@ kstat_create(char *module, int instance, char *name, char *class, uchar_t type,
|
|||||||
*/
|
*/
|
||||||
sysctl_ctx_init(&ksp->ks_sysctl_ctx);
|
sysctl_ctx_init(&ksp->ks_sysctl_ctx);
|
||||||
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx,
|
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_kstat), OID_AUTO, module, CTLFLAG_RW, 0,
|
SYSCTL_STATIC_CHILDREN(_kstat), OID_AUTO, module,
|
||||||
"");
|
CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "");
|
||||||
if (root == NULL) {
|
if (root == NULL) {
|
||||||
printf("%s: Cannot create kstat.%s tree!\n", __func__, module);
|
printf("%s: Cannot create kstat.%s tree!\n", __func__, module);
|
||||||
sysctl_ctx_free(&ksp->ks_sysctl_ctx);
|
sysctl_ctx_free(&ksp->ks_sysctl_ctx);
|
||||||
@ -73,7 +74,7 @@ kstat_create(char *module, int instance, char *name, char *class, uchar_t type,
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(root),
|
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(root),
|
||||||
OID_AUTO, class, CTLFLAG_RW, 0, "");
|
OID_AUTO, class, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "");
|
||||||
if (root == NULL) {
|
if (root == NULL) {
|
||||||
printf("%s: Cannot create kstat.%s.%s tree!\n", __func__,
|
printf("%s: Cannot create kstat.%s.%s tree!\n", __func__,
|
||||||
module, class);
|
module, class);
|
||||||
@ -82,7 +83,7 @@ kstat_create(char *module, int instance, char *name, char *class, uchar_t type,
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(root),
|
root = SYSCTL_ADD_NODE(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(root),
|
||||||
OID_AUTO, name, CTLFLAG_RW, 0, "");
|
OID_AUTO, name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "");
|
||||||
if (root == NULL) {
|
if (root == NULL) {
|
||||||
printf("%s: Cannot create kstat.%s.%s.%s tree!\n", __func__,
|
printf("%s: Cannot create kstat.%s.%s.%s tree!\n", __func__,
|
||||||
module, class, name);
|
module, class, name);
|
||||||
|
@ -236,7 +236,8 @@ static unsigned long tpoints_hash_size = FASTTRAP_TPOINTS_DEFAULT_SIZE;
|
|||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
SYSCTL_DECL(_kern_dtrace);
|
SYSCTL_DECL(_kern_dtrace);
|
||||||
SYSCTL_NODE(_kern_dtrace, OID_AUTO, fasttrap, CTLFLAG_RD, 0, "DTrace fasttrap parameters");
|
SYSCTL_NODE(_kern_dtrace, OID_AUTO, fasttrap, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"DTrace fasttrap parameters");
|
||||||
SYSCTL_UINT(_kern_dtrace_fasttrap, OID_AUTO, max_probes, CTLFLAG_RWTUN, &fasttrap_max,
|
SYSCTL_UINT(_kern_dtrace_fasttrap, OID_AUTO, max_probes, CTLFLAG_RWTUN, &fasttrap_max,
|
||||||
FASTTRAP_MAX_DEFAULT, "Maximum number of fasttrap probes");
|
FASTTRAP_MAX_DEFAULT, "Maximum number of fasttrap probes");
|
||||||
SYSCTL_ULONG(_kern_dtrace_fasttrap, OID_AUTO, tpoints_hash_size, CTLFLAG_RDTUN, &tpoints_hash_size,
|
SYSCTL_ULONG(_kern_dtrace_fasttrap, OID_AUTO, tpoints_hash_size, CTLFLAG_RDTUN, &tpoints_hash_size,
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
int zfs_dedup_prefetch = 1;
|
int zfs_dedup_prefetch = 1;
|
||||||
|
|
||||||
SYSCTL_DECL(_vfs_zfs);
|
SYSCTL_DECL(_vfs_zfs);
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dedup, CTLFLAG_RW, 0, "ZFS DEDUP");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dedup, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS DEDUP");
|
||||||
SYSCTL_INT(_vfs_zfs_dedup, OID_AUTO, prefetch, CTLFLAG_RWTUN, &zfs_dedup_prefetch,
|
SYSCTL_INT(_vfs_zfs_dedup, OID_AUTO, prefetch, CTLFLAG_RWTUN, &zfs_dedup_prefetch,
|
||||||
0, "Enable/disable prefetching of dedup-ed blocks which are going to be freed");
|
0, "Enable/disable prefetching of dedup-ed blocks which are going to be freed");
|
||||||
|
|
||||||
|
@ -57,7 +57,8 @@ uint64_t zfetch_array_rd_sz = 1024 * 1024;
|
|||||||
SYSCTL_DECL(_vfs_zfs);
|
SYSCTL_DECL(_vfs_zfs);
|
||||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, prefetch_disable, CTLFLAG_RW,
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, prefetch_disable, CTLFLAG_RW,
|
||||||
&zfs_prefetch_disable, 0, "Disable prefetch");
|
&zfs_prefetch_disable, 0, "Disable prefetch");
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, zfetch, CTLFLAG_RW, 0, "ZFS ZFETCH");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, zfetch, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS ZFETCH");
|
||||||
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_streams, CTLFLAG_RWTUN,
|
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_streams, CTLFLAG_RWTUN,
|
||||||
&zfetch_max_streams, 0, "Max # of streams per zfetch");
|
&zfetch_max_streams, 0, "Max # of streams per zfetch");
|
||||||
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, min_sec_reap, CTLFLAG_RWTUN,
|
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, min_sec_reap, CTLFLAG_RWTUN,
|
||||||
|
@ -39,7 +39,8 @@
|
|||||||
#include <sys/zap.h>
|
#include <sys/zap.h>
|
||||||
|
|
||||||
SYSCTL_DECL(_vfs_zfs);
|
SYSCTL_DECL(_vfs_zfs);
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, 0, "ZFS metaslab");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS metaslab");
|
||||||
|
|
||||||
#define GANG_ALLOCATION(flags) \
|
#define GANG_ALLOCATION(flags) \
|
||||||
((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER))
|
((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER))
|
||||||
|
@ -82,7 +82,8 @@ static u_int trim_max_interval = 1; /* 1s delays between TRIMs */
|
|||||||
static u_int trim_vdev_max_pending = 10000; /* Keep up to 10K segments */
|
static u_int trim_vdev_max_pending = 10000; /* Keep up to 10K segments */
|
||||||
|
|
||||||
SYSCTL_DECL(_vfs_zfs);
|
SYSCTL_DECL(_vfs_zfs);
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, trim, CTLFLAG_RD, 0, "ZFS TRIM");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, trim, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS TRIM");
|
||||||
|
|
||||||
SYSCTL_UINT(_vfs_zfs_trim, OID_AUTO, txg_delay, CTLFLAG_RWTUN, &trim_txg_delay,
|
SYSCTL_UINT(_vfs_zfs_trim, OID_AUTO, txg_delay, CTLFLAG_RWTUN, &trim_txg_delay,
|
||||||
0, "Delay TRIMs by up to this many TXGs");
|
0, "Delay TRIMs by up to this many TXGs");
|
||||||
|
@ -112,7 +112,8 @@ static void txg_quiesce_thread(void *arg);
|
|||||||
int zfs_txg_timeout = 5; /* max seconds worth of delta per txg */
|
int zfs_txg_timeout = 5; /* max seconds worth of delta per txg */
|
||||||
|
|
||||||
SYSCTL_DECL(_vfs_zfs);
|
SYSCTL_DECL(_vfs_zfs);
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0, "ZFS TXG");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS TXG");
|
||||||
SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RWTUN, &zfs_txg_timeout, 0,
|
SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RWTUN, &zfs_txg_timeout, 0,
|
||||||
"Maximum seconds worth of delta per txg");
|
"Maximum seconds worth of delta per txg");
|
||||||
|
|
||||||
|
@ -55,7 +55,8 @@
|
|||||||
#include <sys/vdev_initialize.h>
|
#include <sys/vdev_initialize.h>
|
||||||
|
|
||||||
SYSCTL_DECL(_vfs_zfs);
|
SYSCTL_DECL(_vfs_zfs);
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CTLFLAG_RW, 0, "ZFS VDEV");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS VDEV");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Virtual device management.
|
* Virtual device management.
|
||||||
|
@ -90,7 +90,8 @@ int zfs_vdev_cache_bshift = 16;
|
|||||||
#define VCBS (1 << zfs_vdev_cache_bshift) /* 64KB */
|
#define VCBS (1 << zfs_vdev_cache_bshift) /* 64KB */
|
||||||
|
|
||||||
SYSCTL_DECL(_vfs_zfs_vdev);
|
SYSCTL_DECL(_vfs_zfs_vdev);
|
||||||
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, cache, CTLFLAG_RW, 0, "ZFS VDEV Cache");
|
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS VDEV Cache");
|
||||||
SYSCTL_INT(_vfs_zfs_vdev_cache, OID_AUTO, max, CTLFLAG_RDTUN,
|
SYSCTL_INT(_vfs_zfs_vdev_cache, OID_AUTO, max, CTLFLAG_RDTUN,
|
||||||
&zfs_vdev_cache_max, 0, "Maximum I/O request size that increase read size");
|
&zfs_vdev_cache_max, 0, "Maximum I/O request size that increase read size");
|
||||||
SYSCTL_INT(_vfs_zfs_vdev_cache, OID_AUTO, size, CTLFLAG_RDTUN,
|
SYSCTL_INT(_vfs_zfs_vdev_cache, OID_AUTO, size, CTLFLAG_RDTUN,
|
||||||
|
@ -64,7 +64,8 @@ static int vdev_mirror_shift = 21;
|
|||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
SYSCTL_DECL(_vfs_zfs_vdev);
|
SYSCTL_DECL(_vfs_zfs_vdev);
|
||||||
static SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0,
|
static SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror,
|
||||||
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"ZFS VDEV Mirror");
|
"ZFS VDEV Mirror");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -71,7 +71,8 @@
|
|||||||
struct mtx zfs_debug_mtx;
|
struct mtx zfs_debug_mtx;
|
||||||
MTX_SYSINIT(zfs_debug_mtx, &zfs_debug_mtx, "zfs_debug", MTX_DEF);
|
MTX_SYSINIT(zfs_debug_mtx, &zfs_debug_mtx, "zfs_debug", MTX_DEF);
|
||||||
|
|
||||||
SYSCTL_NODE(_vfs, OID_AUTO, zfs, CTLFLAG_RW, 0, "ZFS file system");
|
SYSCTL_NODE(_vfs, OID_AUTO, zfs, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS file system");
|
||||||
|
|
||||||
int zfs_super_owner;
|
int zfs_super_owner;
|
||||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, super_owner, CTLFLAG_RW, &zfs_super_owner, 0,
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, super_owner, CTLFLAG_RW, &zfs_super_owner, 0,
|
||||||
@ -81,7 +82,8 @@ int zfs_debug_level;
|
|||||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, debug, CTLFLAG_RWTUN, &zfs_debug_level, 0,
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, debug, CTLFLAG_RWTUN, &zfs_debug_level, 0,
|
||||||
"Debug level");
|
"Debug level");
|
||||||
|
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD, 0, "ZFS versions");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS versions");
|
||||||
static int zfs_version_acl = ZFS_ACL_VERSION;
|
static int zfs_version_acl = ZFS_ACL_VERSION;
|
||||||
SYSCTL_INT(_vfs_zfs_version, OID_AUTO, acl, CTLFLAG_RD, &zfs_version_acl, 0,
|
SYSCTL_INT(_vfs_zfs_version, OID_AUTO, acl, CTLFLAG_RD, &zfs_version_acl, 0,
|
||||||
"ZFS_ACL_VERSION");
|
"ZFS_ACL_VERSION");
|
||||||
|
@ -48,7 +48,8 @@
|
|||||||
#include <sys/cityhash.h>
|
#include <sys/cityhash.h>
|
||||||
|
|
||||||
SYSCTL_DECL(_vfs_zfs);
|
SYSCTL_DECL(_vfs_zfs);
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW, 0, "ZFS ZIO");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS ZIO");
|
||||||
#if defined(__amd64__)
|
#if defined(__amd64__)
|
||||||
static int zio_use_uma = 1;
|
static int zio_use_uma = 1;
|
||||||
#else
|
#else
|
||||||
|
@ -133,7 +133,8 @@ static uint32_t zvol_minors;
|
|||||||
|
|
||||||
#ifndef illumos
|
#ifndef illumos
|
||||||
SYSCTL_DECL(_vfs_zfs);
|
SYSCTL_DECL(_vfs_zfs);
|
||||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, vol, CTLFLAG_RW, 0, "ZFS VOLUME");
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, vol, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ZFS VOLUME");
|
||||||
static int volmode = ZFS_VOLMODE_GEOM;
|
static int volmode = ZFS_VOLMODE_GEOM;
|
||||||
SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, mode, CTLFLAG_RWTUN, &volmode, 0,
|
SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, mode, CTLFLAG_RWTUN, &volmode, 0,
|
||||||
"Expose as GEOM providers (1), device files (2) or neither");
|
"Expose as GEOM providers (1), device files (2) or neither");
|
||||||
|
@ -73,13 +73,15 @@ sysctl_dtrace_providers(SYSCTL_HANDLER_ARGS)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCTL_NODE(_debug, OID_AUTO, dtrace, CTLFLAG_RD, 0, "DTrace debug parameters");
|
SYSCTL_NODE(_debug, OID_AUTO, dtrace, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"DTrace debug parameters");
|
||||||
|
|
||||||
SYSCTL_PROC(_debug_dtrace, OID_AUTO, providers,
|
SYSCTL_PROC(_debug_dtrace, OID_AUTO, providers,
|
||||||
CTLTYPE_STRING | CTLFLAG_MPSAFE | CTLFLAG_RD, 0, 0, sysctl_dtrace_providers,
|
CTLTYPE_STRING | CTLFLAG_MPSAFE | CTLFLAG_RD, 0, 0, sysctl_dtrace_providers,
|
||||||
"A", "available DTrace providers");
|
"A", "available DTrace providers");
|
||||||
|
|
||||||
SYSCTL_NODE(_kern, OID_AUTO, dtrace, CTLFLAG_RD, 0, "DTrace parameters");
|
SYSCTL_NODE(_kern, OID_AUTO, dtrace, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"DTrace parameters");
|
||||||
|
|
||||||
SYSCTL_INT(_kern_dtrace, OID_AUTO, err_verbose, CTLFLAG_RW,
|
SYSCTL_INT(_kern_dtrace, OID_AUTO, err_verbose, CTLFLAG_RW,
|
||||||
&dtrace_err_verbose, 0,
|
&dtrace_err_verbose, 0,
|
||||||
|
@ -75,7 +75,9 @@ dtrace_test_sdttest(SYSCTL_HANDLER_ARGS)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SYSCTL_NODE(_debug, OID_AUTO, dtracetest, CTLFLAG_RD, 0, "");
|
static SYSCTL_NODE(_debug, OID_AUTO, dtracetest,
|
||||||
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"");
|
||||||
|
|
||||||
SYSCTL_PROC(_debug_dtracetest, OID_AUTO, sdttest,
|
SYSCTL_PROC(_debug_dtracetest, OID_AUTO, sdttest,
|
||||||
CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, dtrace_test_sdttest,
|
CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, dtrace_test_sdttest,
|
||||||
|
@ -239,7 +239,8 @@ static hrtime_t profile_interval_min = NANOSEC / 5000; /* 5000 hz */
|
|||||||
static int profile_aframes = PROF_ARTIFICIAL_FRAMES;
|
static int profile_aframes = PROF_ARTIFICIAL_FRAMES;
|
||||||
|
|
||||||
SYSCTL_DECL(_kern_dtrace);
|
SYSCTL_DECL(_kern_dtrace);
|
||||||
SYSCTL_NODE(_kern_dtrace, OID_AUTO, profile, CTLFLAG_RD, 0, "DTrace profile parameters");
|
SYSCTL_NODE(_kern_dtrace, OID_AUTO, profile, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"DTrace profile parameters");
|
||||||
SYSCTL_INT(_kern_dtrace_profile, OID_AUTO, aframes, CTLFLAG_RW, &profile_aframes,
|
SYSCTL_INT(_kern_dtrace_profile, OID_AUTO, aframes, CTLFLAG_RW, &profile_aframes,
|
||||||
0, "Skipped frames for profile provider");
|
0, "Skipped frames for profile provider");
|
||||||
|
|
||||||
|
@ -86,7 +86,8 @@ CTASSERT(sizeof(struct ia32_sigframe4) == 408);
|
|||||||
|
|
||||||
extern const char *freebsd32_syscallnames[];
|
extern const char *freebsd32_syscallnames[];
|
||||||
|
|
||||||
static SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode");
|
static SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ia32 mode");
|
||||||
|
|
||||||
static u_long ia32_maxdsiz = IA32_MAXDSIZ;
|
static u_long ia32_maxdsiz = IA32_MAXDSIZ;
|
||||||
SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxdsiz, CTLFLAG_RWTUN, &ia32_maxdsiz, 0, "");
|
SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxdsiz, CTLFLAG_RWTUN, &ia32_maxdsiz, 0, "");
|
||||||
|
@ -60,7 +60,8 @@ static struct linux_prison lprison0 = {
|
|||||||
|
|
||||||
static unsigned linux_osd_jail_slot;
|
static unsigned linux_osd_jail_slot;
|
||||||
|
|
||||||
SYSCTL_NODE(_compat, OID_AUTO, linux, CTLFLAG_RW, 0, "Linux mode");
|
SYSCTL_NODE(_compat, OID_AUTO, linux, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"Linux mode");
|
||||||
|
|
||||||
int linux_ignore_ip_recverr = 1;
|
int linux_ignore_ip_recverr = 1;
|
||||||
SYSCTL_INT(_compat_linux, OID_AUTO, ignore_ip_recverr, CTLFLAG_RWTUN,
|
SYSCTL_INT(_compat_linux, OID_AUTO, ignore_ip_recverr, CTLFLAG_RWTUN,
|
||||||
|
@ -82,8 +82,9 @@ __FBSDID("$FreeBSD$");
|
|||||||
#ifdef NTOSKRNL_DEBUG_TIMERS
|
#ifdef NTOSKRNL_DEBUG_TIMERS
|
||||||
static int sysctl_show_timers(SYSCTL_HANDLER_ARGS);
|
static int sysctl_show_timers(SYSCTL_HANDLER_ARGS);
|
||||||
|
|
||||||
SYSCTL_PROC(_debug, OID_AUTO, ntoskrnl_timers, CTLTYPE_INT | CTLFLAG_RW,
|
SYSCTL_PROC(_debug, OID_AUTO, ntoskrnl_timers,
|
||||||
NULL, 0, sysctl_show_timers, "I",
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, NULL, 0,
|
||||||
|
sysctl_show_timers, "I",
|
||||||
"Show ntoskrnl timer stats");
|
"Show ntoskrnl timer stats");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
static struct mtx x86bios_lock;
|
static struct mtx x86bios_lock;
|
||||||
|
|
||||||
static SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD, NULL,
|
static SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
|
||||||
"x86bios debugging");
|
"x86bios debugging");
|
||||||
static int x86bios_trace_call;
|
static int x86bios_trace_call;
|
||||||
SYSCTL_INT(_debug_x86bios, OID_AUTO, call, CTLFLAG_RWTUN, &x86bios_trace_call, 0,
|
SYSCTL_INT(_debug_x86bios, OID_AUTO, call, CTLFLAG_RWTUN, &x86bios_trace_call, 0,
|
||||||
|
@ -30,7 +30,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#define BUFFERSIZE 512
|
#define BUFFERSIZE 512
|
||||||
|
|
||||||
SYSCTL_NODE(_dev, OID_AUTO, krping, CTLFLAG_RW, 0, "kernel rping module");
|
SYSCTL_NODE(_dev, OID_AUTO, krping, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"kernel rping module");
|
||||||
|
|
||||||
int krping_debug = 0;
|
int krping_debug = 0;
|
||||||
SYSCTL_INT(_dev_krping, OID_AUTO, debug, CTLFLAG_RW, &krping_debug, 0 , "");
|
SYSCTL_INT(_dev_krping, OID_AUTO, debug, CTLFLAG_RW, &krping_debug, 0 , "");
|
||||||
|
@ -80,7 +80,8 @@ static struct ccp_xts_unitsize_map_entry {
|
|||||||
{ CCP_XTS_AES_UNIT_SIZE_4096, 4096 },
|
{ CCP_XTS_AES_UNIT_SIZE_4096, 4096 },
|
||||||
};
|
};
|
||||||
|
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, ccp, CTLFLAG_RD, 0, "ccp node");
|
SYSCTL_NODE(_hw, OID_AUTO, ccp, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"ccp node");
|
||||||
|
|
||||||
unsigned g_ccp_ring_order = 11;
|
unsigned g_ccp_ring_order = 11;
|
||||||
SYSCTL_UINT(_hw_ccp, OID_AUTO, ring_order, CTLFLAG_RDTUN, &g_ccp_ring_order,
|
SYSCTL_UINT(_hw_ccp, OID_AUTO, ring_order, CTLFLAG_RDTUN, &g_ccp_ring_order,
|
||||||
|
@ -82,7 +82,8 @@ static int db_capture_inprogress; /* DDB capture currently in progress. */
|
|||||||
struct sx db_capture_sx; /* Lock against user thread races. */
|
struct sx db_capture_sx; /* Lock against user thread races. */
|
||||||
SX_SYSINIT(db_capture_sx, &db_capture_sx, "db_capture_sx");
|
SX_SYSINIT(db_capture_sx, &db_capture_sx, "db_capture_sx");
|
||||||
|
|
||||||
static SYSCTL_NODE(_debug_ddb, OID_AUTO, capture, CTLFLAG_RW, 0,
|
static SYSCTL_NODE(_debug_ddb, OID_AUTO, capture,
|
||||||
|
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
"DDB capture options");
|
"DDB capture options");
|
||||||
|
|
||||||
SYSCTL_UINT(_debug_ddb_capture, OID_AUTO, bufoff, CTLFLAG_RD,
|
SYSCTL_UINT(_debug_ddb_capture, OID_AUTO, bufoff, CTLFLAG_RD,
|
||||||
@ -165,8 +166,9 @@ sysctl_debug_ddb_capture_bufsize(SYSCTL_HANDLER_ARGS)
|
|||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_debug_ddb_capture, OID_AUTO, bufsize, CTLTYPE_UINT|CTLFLAG_RW,
|
SYSCTL_PROC(_debug_ddb_capture, OID_AUTO, bufsize,
|
||||||
0, 0, sysctl_debug_ddb_capture_bufsize, "IU",
|
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0,
|
||||||
|
sysctl_debug_ddb_capture_bufsize, "IU",
|
||||||
"Size of DDB capture buffer");
|
"Size of DDB capture buffer");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -191,8 +193,10 @@ sysctl_debug_ddb_capture_data(SYSCTL_HANDLER_ARGS)
|
|||||||
ch = '\0';
|
ch = '\0';
|
||||||
return (SYSCTL_OUT(req, &ch, sizeof(ch)));
|
return (SYSCTL_OUT(req, &ch, sizeof(ch)));
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_debug_ddb_capture, OID_AUTO, data, CTLTYPE_STRING | CTLFLAG_RD,
|
SYSCTL_PROC(_debug_ddb_capture, OID_AUTO, data,
|
||||||
NULL, 0, sysctl_debug_ddb_capture_data, "A", "DDB capture data");
|
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0,
|
||||||
|
sysctl_debug_ddb_capture_data, "A",
|
||||||
|
"DDB capture data");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routines for capturing DDB output into a fixed-size buffer. These are
|
* Routines for capturing DDB output into a fixed-size buffer. These are
|
||||||
|
@ -48,7 +48,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <ddb/db_command.h>
|
#include <ddb/db_command.h>
|
||||||
#include <ddb/db_sym.h>
|
#include <ddb/db_sym.h>
|
||||||
|
|
||||||
SYSCTL_NODE(_debug, OID_AUTO, ddb, CTLFLAG_RW, 0, "DDB settings");
|
SYSCTL_NODE(_debug, OID_AUTO, ddb, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
|
"DDB settings");
|
||||||
|
|
||||||
static dbbe_init_f db_init;
|
static dbbe_init_f db_init;
|
||||||
static dbbe_trap_f db_trap;
|
static dbbe_trap_f db_trap;
|
||||||
|
@ -462,7 +462,8 @@ db_unscript_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
|||||||
* like RPCs and a bit less like normal get/set requests. The ddb(8) command
|
* like RPCs and a bit less like normal get/set requests. The ddb(8) command
|
||||||
* line tool wraps them to make things a bit more user-friendly.
|
* line tool wraps them to make things a bit more user-friendly.
|
||||||
*/
|
*/
|
||||||
static SYSCTL_NODE(_debug_ddb, OID_AUTO, scripting, CTLFLAG_RW, 0,
|
static SYSCTL_NODE(_debug_ddb, OID_AUTO, scripting,
|
||||||
|
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
"DDB script settings");
|
"DDB script settings");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -495,8 +496,9 @@ sysctl_debug_ddb_scripting_scripts(SYSCTL_HANDLER_ARGS)
|
|||||||
free(buffer, M_TEMP);
|
free(buffer, M_TEMP);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_debug_ddb_scripting, OID_AUTO, scripts, CTLTYPE_STRING |
|
SYSCTL_PROC(_debug_ddb_scripting, OID_AUTO, scripts,
|
||||||
CTLFLAG_RD, 0, 0, sysctl_debug_ddb_scripting_scripts, "A",
|
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, 0,
|
||||||
|
sysctl_debug_ddb_scripting_scripts, "A",
|
||||||
"List of defined scripts");
|
"List of defined scripts");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -532,8 +534,9 @@ sysctl_debug_ddb_scripting_script(SYSCTL_HANDLER_ARGS)
|
|||||||
free(buffer, M_TEMP);
|
free(buffer, M_TEMP);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_debug_ddb_scripting, OID_AUTO, script, CTLTYPE_STRING |
|
SYSCTL_PROC(_debug_ddb_scripting, OID_AUTO, script,
|
||||||
CTLFLAG_RW, 0, 0, sysctl_debug_ddb_scripting_script, "A",
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0,
|
||||||
|
sysctl_debug_ddb_scripting_script, "A",
|
||||||
"Set a script");
|
"Set a script");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -559,6 +562,7 @@ sysctl_debug_ddb_scripting_unscript(SYSCTL_HANDLER_ARGS)
|
|||||||
return (EINVAL); /* Don't confuse sysctl consumers. */
|
return (EINVAL); /* Don't confuse sysctl consumers. */
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
SYSCTL_PROC(_debug_ddb_scripting, OID_AUTO, unscript, CTLTYPE_STRING |
|
SYSCTL_PROC(_debug_ddb_scripting, OID_AUTO, unscript,
|
||||||
CTLFLAG_RW, 0, 0, sysctl_debug_ddb_scripting_unscript, "A",
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0,
|
||||||
|
sysctl_debug_ddb_scripting_unscript, "A",
|
||||||
"Unset a script");
|
"Unset a script");
|
||||||
|
@ -76,7 +76,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <ddb/ddb.h>
|
#include <ddb/ddb.h>
|
||||||
#include <ddb/db_lex.h>
|
#include <ddb/db_lex.h>
|
||||||
|
|
||||||
static SYSCTL_NODE(_debug_ddb, OID_AUTO, textdump, CTLFLAG_RW, 0,
|
static SYSCTL_NODE(_debug_ddb, OID_AUTO, textdump,
|
||||||
|
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||||
"DDB textdump options");
|
"DDB textdump options");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -225,7 +225,8 @@ static struct cdevsw aac_cdevsw = {
|
|||||||
static MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver");
|
static MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver");
|
||||||
|
|
||||||
/* sysctl node */
|
/* sysctl node */
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, aac, CTLFLAG_RD, 0, "AAC driver parameters");
|
SYSCTL_NODE(_hw, OID_AUTO, aac, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"AAC driver parameters");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Device Interface
|
* Device Interface
|
||||||
|
@ -224,7 +224,8 @@ static struct cdevsw aacraid_cdevsw = {
|
|||||||
MALLOC_DEFINE(M_AACRAIDBUF, "aacraid_buf", "Buffers for the AACRAID driver");
|
MALLOC_DEFINE(M_AACRAIDBUF, "aacraid_buf", "Buffers for the AACRAID driver");
|
||||||
|
|
||||||
/* sysctl node */
|
/* sysctl node */
|
||||||
SYSCTL_NODE(_hw, OID_AUTO, aacraid, CTLFLAG_RD, 0, "AACRAID driver parameters");
|
SYSCTL_NODE(_hw, OID_AUTO, aacraid, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
|
"AACRAID driver parameters");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Device Interface
|
* Device Interface
|
||||||
|
@ -731,7 +731,7 @@ acpi_asus_attach(device_t dev)
|
|||||||
sysctl_ctx_init(&sc->sysctl_ctx);
|
sysctl_ctx_init(&sc->sysctl_ctx);
|
||||||
sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx,
|
sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "asus", CTLFLAG_RD, 0, "");
|
OID_AUTO, "asus", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
|
|
||||||
/* Hook up nodes */
|
/* Hook up nodes */
|
||||||
for (int i = 0; acpi_asus_sysctls[i].name != NULL; i++) {
|
for (int i = 0; acpi_asus_sysctls[i].name != NULL; i++) {
|
||||||
@ -742,14 +742,14 @@ acpi_asus_attach(device_t dev)
|
|||||||
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
acpi_asus_sysctls[i].name,
|
acpi_asus_sysctls[i].name,
|
||||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY |
|
||||||
sc, i, acpi_asus_sysctl, "I",
|
CTLFLAG_NEEDGIANT, sc, i, acpi_asus_sysctl, "I",
|
||||||
acpi_asus_sysctls[i].description);
|
acpi_asus_sysctls[i].description);
|
||||||
} else {
|
} else {
|
||||||
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
acpi_asus_sysctls[i].name,
|
acpi_asus_sysctls[i].name,
|
||||||
CTLTYPE_INT | CTLFLAG_RW,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
sc, i, acpi_asus_sysctl, "I",
|
sc, i, acpi_asus_sysctl, "I",
|
||||||
acpi_asus_sysctls[i].description);
|
acpi_asus_sysctls[i].description);
|
||||||
}
|
}
|
||||||
|
@ -429,14 +429,14 @@ acpi_asus_wmi_attach(device_t dev)
|
|||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
acpi_asus_wmi_sysctls[i].name,
|
acpi_asus_wmi_sysctls[i].name,
|
||||||
CTLTYPE_INT | CTLFLAG_RD,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
sc, i, acpi_asus_wmi_sysctl, "I",
|
sc, i, acpi_asus_wmi_sysctl, "I",
|
||||||
acpi_asus_wmi_sysctls[i].description);
|
acpi_asus_wmi_sysctls[i].description);
|
||||||
} else {
|
} else {
|
||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
acpi_asus_wmi_sysctls[i].name,
|
acpi_asus_wmi_sysctls[i].name,
|
||||||
CTLTYPE_INT | CTLFLAG_RW,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
sc, i, acpi_asus_wmi_sysctl, "I",
|
sc, i, acpi_asus_wmi_sysctl, "I",
|
||||||
acpi_asus_wmi_sysctls[i].description);
|
acpi_asus_wmi_sysctls[i].description);
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ acpi_fujitsu_init(struct acpi_fujitsu_softc *sc)
|
|||||||
sysctl_ctx_init(&sc->sysctl_ctx);
|
sysctl_ctx_init(&sc->sysctl_ctx);
|
||||||
sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx,
|
sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "fujitsu", CTLFLAG_RD, 0, "");
|
OID_AUTO, "fujitsu", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
|
|
||||||
for (i = 0; sysctl_table[i].name != NULL; i++) {
|
for (i = 0; sysctl_table[i].name != NULL; i++) {
|
||||||
switch(sysctl_table[i].method) {
|
switch(sysctl_table[i].method) {
|
||||||
@ -418,8 +418,8 @@ acpi_fujitsu_init(struct acpi_fujitsu_softc *sc)
|
|||||||
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
sysctl_table[i].name,
|
sysctl_table[i].name,
|
||||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY |
|
||||||
sc, i, acpi_fujitsu_sysctl, "I",
|
CTLFLAG_NEEDGIANT, sc, i, acpi_fujitsu_sysctl, "I",
|
||||||
sysctl_table[i].description);
|
sysctl_table[i].description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,13 +593,15 @@ acpi_hp_attach(device_t dev)
|
|||||||
if (acpi_hp_sysctls[i].flag_rdonly != 0) {
|
if (acpi_hp_sysctls[i].flag_rdonly != 0) {
|
||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
acpi_hp_sysctls[i].name, CTLTYPE_INT | CTLFLAG_RD,
|
acpi_hp_sysctls[i].name,
|
||||||
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
sc, i, acpi_hp_sysctl, "I",
|
sc, i, acpi_hp_sysctl, "I",
|
||||||
acpi_hp_sysctls[i].description);
|
acpi_hp_sysctls[i].description);
|
||||||
} else {
|
} else {
|
||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
acpi_hp_sysctls[i].name, CTLTYPE_INT | CTLFLAG_RW,
|
acpi_hp_sysctls[i].name,
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
sc, i, acpi_hp_sysctl, "I",
|
sc, i, acpi_hp_sysctl, "I",
|
||||||
acpi_hp_sysctls[i].description);
|
acpi_hp_sysctls[i].description);
|
||||||
}
|
}
|
||||||
|
@ -543,13 +543,15 @@ acpi_ibm_attach(device_t dev)
|
|||||||
if (acpi_ibm_sysctls[i].flag_rdonly != 0) {
|
if (acpi_ibm_sysctls[i].flag_rdonly != 0) {
|
||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
acpi_ibm_sysctls[i].name, CTLTYPE_INT | CTLFLAG_RD,
|
acpi_ibm_sysctls[i].name,
|
||||||
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
sc, i, acpi_ibm_sysctl, "I",
|
sc, i, acpi_ibm_sysctl, "I",
|
||||||
acpi_ibm_sysctls[i].description);
|
acpi_ibm_sysctls[i].description);
|
||||||
} else {
|
} else {
|
||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
acpi_ibm_sysctls[i].name, CTLTYPE_INT | CTLFLAG_RW,
|
acpi_ibm_sysctls[i].name,
|
||||||
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
sc, i, acpi_ibm_sysctl, "I",
|
sc, i, acpi_ibm_sysctl, "I",
|
||||||
acpi_ibm_sysctls[i].description);
|
acpi_ibm_sysctls[i].description);
|
||||||
}
|
}
|
||||||
@ -559,15 +561,15 @@ acpi_ibm_attach(device_t dev)
|
|||||||
if (acpi_ibm_sysctl_init(sc, ACPI_IBM_METHOD_THERMAL)) {
|
if (acpi_ibm_sysctl_init(sc, ACPI_IBM_METHOD_THERMAL)) {
|
||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "thermal",
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "thermal",
|
||||||
CTLTYPE_INT | CTLFLAG_RD, sc, 0, acpi_ibm_thermal_sysctl,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
"I", "Thermal zones");
|
acpi_ibm_thermal_sysctl, "I", "Thermal zones");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hook up handlerevents node */
|
/* Hook up handlerevents node */
|
||||||
if (acpi_ibm_sysctl_init(sc, ACPI_IBM_METHOD_HANDLEREVENTS)) {
|
if (acpi_ibm_sysctl_init(sc, ACPI_IBM_METHOD_HANDLEREVENTS)) {
|
||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "handlerevents",
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "handlerevents",
|
||||||
CTLTYPE_STRING | CTLFLAG_RW, sc, 0,
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
acpi_ibm_handlerevents_sysctl, "I",
|
acpi_ibm_handlerevents_sysctl, "I",
|
||||||
"devd(8) events handled by acpi_ibm");
|
"devd(8) events handled by acpi_ibm");
|
||||||
}
|
}
|
||||||
|
@ -168,13 +168,13 @@ acpi_panasonic_attach(device_t dev)
|
|||||||
sysctl_ctx_init(&sc->sysctl_ctx);
|
sysctl_ctx_init(&sc->sysctl_ctx);
|
||||||
sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx,
|
sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO,
|
||||||
"panasonic", CTLFLAG_RD, 0, "");
|
"panasonic", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
for (i = 0; sysctl_table[i].name != NULL; i++) {
|
for (i = 0; sysctl_table[i].name != NULL; i++) {
|
||||||
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
sysctl_table[i].name,
|
sysctl_table[i].name,
|
||||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY |
|
||||||
sc, i, acpi_panasonic_sysctl, "I", "");
|
CTLFLAG_NEEDGIANT, sc, i, acpi_panasonic_sysctl, "I", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -90,14 +90,14 @@ acpi_rapidstart_attach(device_t dev)
|
|||||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||||
i, acpi_rapidstart_oids[i].nodename,
|
i, acpi_rapidstart_oids[i].nodename,
|
||||||
CTLTYPE_INT | CTLFLAG_RW,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
dev, i, sysctl_acpi_rapidstart_gen_handler, "I",
|
dev, i, sysctl_acpi_rapidstart_gen_handler, "I",
|
||||||
acpi_rapidstart_oids[i].comment);
|
acpi_rapidstart_oids[i].comment);
|
||||||
} else {
|
} else {
|
||||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||||
i, acpi_rapidstart_oids[i].nodename,
|
i, acpi_rapidstart_oids[i].nodename,
|
||||||
CTLTYPE_INT | CTLFLAG_RD,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
dev, i, sysctl_acpi_rapidstart_gen_handler, "I",
|
dev, i, sysctl_acpi_rapidstart_gen_handler, "I",
|
||||||
acpi_rapidstart_oids[i].comment);
|
acpi_rapidstart_oids[i].comment);
|
||||||
}
|
}
|
||||||
|
@ -137,14 +137,14 @@ acpi_sony_attach(device_t dev)
|
|||||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||||
i, acpi_sony_oids[i].nodename ,
|
i, acpi_sony_oids[i].nodename ,
|
||||||
CTLTYPE_INT | CTLFLAG_RW,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
dev, i, sysctl_acpi_sony_gen_handler, "I",
|
dev, i, sysctl_acpi_sony_gen_handler, "I",
|
||||||
acpi_sony_oids[i].comment);
|
acpi_sony_oids[i].comment);
|
||||||
} else {
|
} else {
|
||||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
|
||||||
i, acpi_sony_oids[i].nodename ,
|
i, acpi_sony_oids[i].nodename ,
|
||||||
CTLTYPE_INT | CTLFLAG_RD,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
dev, i, sysctl_acpi_sony_gen_handler, "I",
|
dev, i, sysctl_acpi_sony_gen_handler, "I",
|
||||||
acpi_sony_oids[i].comment);
|
acpi_sony_oids[i].comment);
|
||||||
}
|
}
|
||||||
|
@ -247,14 +247,14 @@ acpi_toshiba_attach(device_t dev)
|
|||||||
sysctl_ctx_init(&sc->sysctl_ctx);
|
sysctl_ctx_init(&sc->sysctl_ctx);
|
||||||
sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx,
|
sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO,
|
||||||
"toshiba", CTLFLAG_RD, 0, "");
|
"toshiba", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
|
|
||||||
for (i = 0; sysctl_table[i].name != NULL; i++) {
|
for (i = 0; sysctl_table[i].name != NULL; i++) {
|
||||||
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
|
||||||
sysctl_table[i].name,
|
sysctl_table[i].name,
|
||||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY |
|
||||||
sc, i, acpi_toshiba_sysctl, "I", "");
|
CTLFLAG_NEEDGIANT, sc, i, acpi_toshiba_sysctl, "I", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enable_fn_keys != 0) {
|
if (enable_fn_keys != 0) {
|
||||||
|
@ -234,7 +234,7 @@ aibs_sensor_added(struct aibs_softc *sc, struct sysctl_oid *so,
|
|||||||
#endif
|
#endif
|
||||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->sc_dev),
|
SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->sc_dev),
|
||||||
SYSCTL_CHILDREN(so), idx, sysctl_name,
|
SYSCTL_CHILDREN(so), idx, sysctl_name,
|
||||||
CTLTYPE_INT | CTLFLAG_RD, sc, (uintptr_t)sensor,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, (uintptr_t)sensor,
|
||||||
sc->sc_ggrp_method ? aibs_sysctl_ggrp : aibs_sysctl,
|
sc->sc_ggrp_method ? aibs_sysctl_ggrp : aibs_sysctl,
|
||||||
sensor->t == AIBS_SENS_TYPE_TEMP ? "IK" : "I", descr);
|
sensor->t == AIBS_SENS_TYPE_TEMP ? "IK" : "I", descr);
|
||||||
}
|
}
|
||||||
@ -319,7 +319,8 @@ aibs_attach_ggrp(struct aibs_softc *sc)
|
|||||||
/* sysctl subtree for sensors of this type */
|
/* sysctl subtree for sensors of this type */
|
||||||
*so = SYSCTL_ADD_NODE(device_get_sysctl_ctx(sc->sc_dev),
|
*so = SYSCTL_ADD_NODE(device_get_sysctl_ctx(sc->sc_dev),
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)),
|
||||||
sensor->t, name, CTLFLAG_RD, NULL, NULL);
|
sensor->t, name, CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||||
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
aibs_sensor_added(sc, *so, name, *s_idx, sensor, descr);
|
aibs_sensor_added(sc, *so, name, *s_idx, sensor, descr);
|
||||||
*s_idx += 1;
|
*s_idx += 1;
|
||||||
@ -415,7 +416,7 @@ aibs_attach_sif(struct aibs_softc *sc, int st)
|
|||||||
/* sysctl subtree for sensors of this type */
|
/* sysctl subtree for sensors of this type */
|
||||||
*so = SYSCTL_ADD_NODE(device_get_sysctl_ctx(sc->sc_dev),
|
*so = SYSCTL_ADD_NODE(device_get_sysctl_ctx(sc->sc_dev),
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)), st,
|
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)), st,
|
||||||
node, CTLFLAG_RD, NULL, NULL);
|
node, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, NULL);
|
||||||
|
|
||||||
for (i = 0, o++; i < n; i++, o++) {
|
for (i = 0, o++; i < n; i++, o++) {
|
||||||
const char *descr;
|
const char *descr;
|
||||||
|
@ -251,7 +251,8 @@ static struct rman acpi_rman_io, acpi_rman_mem;
|
|||||||
/* Holds the description of the acpi0 device. */
|
/* Holds the description of the acpi0 device. */
|
||||||
static char acpi_desc[ACPI_OEM_ID_SIZE + ACPI_OEM_TABLE_ID_SIZE + 2];
|
static char acpi_desc[ACPI_OEM_ID_SIZE + ACPI_OEM_TABLE_ID_SIZE + 2];
|
||||||
|
|
||||||
SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RD, NULL, "ACPI debugging");
|
SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
|
||||||
|
"ACPI debugging");
|
||||||
static char acpi_ca_version[12];
|
static char acpi_ca_version[12];
|
||||||
SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD,
|
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");
|
||||||
@ -270,7 +271,8 @@ TUNABLE_STR("hw.acpi.remove_interface", acpi_remove_interface,
|
|||||||
static int acpi_debug_objects;
|
static int acpi_debug_objects;
|
||||||
TUNABLE_INT("debug.acpi.enable_debug_objects", &acpi_debug_objects);
|
TUNABLE_INT("debug.acpi.enable_debug_objects", &acpi_debug_objects);
|
||||||
SYSCTL_PROC(_debug_acpi, OID_AUTO, enable_debug_objects,
|
SYSCTL_PROC(_debug_acpi, OID_AUTO, enable_debug_objects,
|
||||||
CTLFLAG_RW | CTLTYPE_INT, NULL, 0, acpi_debug_objects_sysctl, "I",
|
CTLFLAG_RW | CTLTYPE_INT | CTLFLAG_NEEDGIANT, NULL, 0,
|
||||||
|
acpi_debug_objects_sysctl, "I",
|
||||||
"Enable Debug objects");
|
"Enable Debug objects");
|
||||||
|
|
||||||
/* Allow the interpreter to ignore common mistakes in BIOS. */
|
/* Allow the interpreter to ignore common mistakes in BIOS. */
|
||||||
@ -551,29 +553,35 @@ acpi_attach(device_t dev)
|
|||||||
*/
|
*/
|
||||||
sysctl_ctx_init(&sc->acpi_sysctl_ctx);
|
sysctl_ctx_init(&sc->acpi_sysctl_ctx);
|
||||||
sc->acpi_sysctl_tree = SYSCTL_ADD_NODE(&sc->acpi_sysctl_ctx,
|
sc->acpi_sysctl_tree = SYSCTL_ADD_NODE(&sc->acpi_sysctl_ctx,
|
||||||
SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO,
|
SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_name(dev),
|
||||||
device_get_name(dev), CTLFLAG_RD, 0, "");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "supported_sleep_state", CTLTYPE_STRING | CTLFLAG_RD,
|
OID_AUTO, "supported_sleep_state",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
0, 0, acpi_supported_sleep_state_sysctl, "A",
|
0, 0, acpi_supported_sleep_state_sysctl, "A",
|
||||||
"List supported ACPI sleep states.");
|
"List supported ACPI sleep states.");
|
||||||
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "power_button_state", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "power_button_state",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&sc->acpi_power_button_sx, 0, acpi_sleep_state_sysctl, "A",
|
&sc->acpi_power_button_sx, 0, acpi_sleep_state_sysctl, "A",
|
||||||
"Power button ACPI sleep state.");
|
"Power button ACPI sleep state.");
|
||||||
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "sleep_button_state", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "sleep_button_state",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&sc->acpi_sleep_button_sx, 0, acpi_sleep_state_sysctl, "A",
|
&sc->acpi_sleep_button_sx, 0, acpi_sleep_state_sysctl, "A",
|
||||||
"Sleep button ACPI sleep state.");
|
"Sleep button ACPI sleep state.");
|
||||||
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "lid_switch_state", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "lid_switch_state",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&sc->acpi_lid_switch_sx, 0, acpi_sleep_state_sysctl, "A",
|
&sc->acpi_lid_switch_sx, 0, acpi_sleep_state_sysctl, "A",
|
||||||
"Lid ACPI sleep state. Set to S3 if you want to suspend your laptop when close the Lid.");
|
"Lid ACPI sleep state. Set to S3 if you want to suspend your laptop when close the Lid.");
|
||||||
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "standby_state", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "standby_state",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&sc->acpi_standby_sx, 0, acpi_sleep_state_sysctl, "A", "");
|
&sc->acpi_standby_sx, 0, acpi_sleep_state_sysctl, "A", "");
|
||||||
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "suspend_state",
|
||||||
|
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
&sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", "");
|
&sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", "");
|
||||||
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0,
|
OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0,
|
||||||
@ -3353,7 +3361,7 @@ acpi_wake_sysctl_walk(device_t dev)
|
|||||||
if (ACPI_SUCCESS(status)) {
|
if (ACPI_SUCCESS(status)) {
|
||||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(child),
|
SYSCTL_ADD_PROC(device_get_sysctl_ctx(child),
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(child)), OID_AUTO,
|
SYSCTL_CHILDREN(device_get_sysctl_tree(child)), OID_AUTO,
|
||||||
"wake", CTLTYPE_INT | CTLFLAG_RW, child, 0,
|
"wake", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, child, 0,
|
||||||
acpi_wake_set_sysctl, "I", "Device set to wake the system");
|
acpi_wake_set_sysctl, "I", "Device set to wake the system");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4126,10 +4134,14 @@ acpi_debug_sysctl(SYSCTL_HANDLER_ARGS)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCTL_PROC(_debug_acpi, OID_AUTO, layer, CTLFLAG_RW | CTLTYPE_STRING,
|
SYSCTL_PROC(_debug_acpi, OID_AUTO, layer,
|
||||||
"debug.acpi.layer", 0, acpi_debug_sysctl, "A", "");
|
CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT, "debug.acpi.layer", 0,
|
||||||
SYSCTL_PROC(_debug_acpi, OID_AUTO, level, CTLFLAG_RW | CTLTYPE_STRING,
|
acpi_debug_sysctl, "A",
|
||||||
"debug.acpi.level", 0, acpi_debug_sysctl, "A", "");
|
"");
|
||||||
|
SYSCTL_PROC(_debug_acpi, OID_AUTO, level,
|
||||||
|
CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_NEEDGIANT, "debug.acpi.level", 0,
|
||||||
|
acpi_debug_sysctl, "A",
|
||||||
|
"");
|
||||||
#endif /* ACPI_DEBUG */
|
#endif /* ACPI_DEBUG */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -170,9 +170,9 @@ acpi_acad_attach(device_t dev)
|
|||||||
if (device_get_unit(dev) == 0) {
|
if (device_get_unit(dev) == 0) {
|
||||||
acpi_sc = acpi_device_get_parent_softc(dev);
|
acpi_sc = acpi_device_get_parent_softc(dev);
|
||||||
SYSCTL_ADD_PROC(&acpi_sc->acpi_sysctl_ctx,
|
SYSCTL_ADD_PROC(&acpi_sc->acpi_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "acline",
|
||||||
OID_AUTO, "acline", CTLTYPE_INT | CTLFLAG_RD,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, &sc->status, 0,
|
||||||
&sc->status, 0, acpi_acad_sysctl, "I", "");
|
acpi_acad_sysctl, "I", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get initial status after whole system is up. */
|
/* Get initial status after whole system is up. */
|
||||||
|
@ -490,31 +490,31 @@ acpi_battery_init(void)
|
|||||||
|
|
||||||
sysctl_ctx_init(&acpi_battery_sysctl_ctx);
|
sysctl_ctx_init(&acpi_battery_sysctl_ctx);
|
||||||
acpi_battery_sysctl_tree = SYSCTL_ADD_NODE(&acpi_battery_sysctl_ctx,
|
acpi_battery_sysctl_tree = SYSCTL_ADD_NODE(&acpi_battery_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "battery", CTLFLAG_RD,
|
SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "battery",
|
||||||
0, "battery status and info");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "battery status and info");
|
||||||
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
||||||
OID_AUTO, "life", CTLTYPE_INT | CTLFLAG_RD,
|
OID_AUTO, "life", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
&acpi_battery_battinfo.cap, 0, acpi_battery_sysctl, "I",
|
&acpi_battery_battinfo.cap, 0, acpi_battery_sysctl, "I",
|
||||||
"percent capacity remaining");
|
"percent capacity remaining");
|
||||||
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
||||||
OID_AUTO, "time", CTLTYPE_INT | CTLFLAG_RD,
|
OID_AUTO, "time", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
&acpi_battery_battinfo.min, 0, acpi_battery_sysctl, "I",
|
&acpi_battery_battinfo.min, 0, acpi_battery_sysctl, "I",
|
||||||
"remaining time in minutes");
|
"remaining time in minutes");
|
||||||
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
||||||
OID_AUTO, "rate", CTLTYPE_INT | CTLFLAG_RD,
|
OID_AUTO, "rate", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
&acpi_battery_battinfo.rate, 0, acpi_battery_sysctl, "I",
|
&acpi_battery_battinfo.rate, 0, acpi_battery_sysctl, "I",
|
||||||
"present rate in mW");
|
"present rate in mW");
|
||||||
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
||||||
OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RD,
|
OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
&acpi_battery_battinfo.state, 0, acpi_battery_sysctl, "I",
|
&acpi_battery_battinfo.state, 0, acpi_battery_sysctl, "I",
|
||||||
"current status flags");
|
"current status flags");
|
||||||
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
||||||
OID_AUTO, "units", CTLTYPE_INT | CTLFLAG_RD,
|
OID_AUTO, "units", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
NULL, 0, acpi_battery_units_sysctl, "I", "number of batteries");
|
NULL, 0, acpi_battery_units_sysctl, "I", "number of batteries");
|
||||||
SYSCTL_ADD_INT(&acpi_battery_sysctl_ctx,
|
SYSCTL_ADD_INT(&acpi_battery_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
|
||||||
|
@ -391,7 +391,7 @@ acpi_cpu_attach(device_t dev)
|
|||||||
sysctl_ctx_init(&cpu_sysctl_ctx);
|
sysctl_ctx_init(&cpu_sysctl_ctx);
|
||||||
cpu_sysctl_tree = SYSCTL_ADD_NODE(&cpu_sysctl_ctx,
|
cpu_sysctl_tree = SYSCTL_ADD_NODE(&cpu_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu",
|
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu",
|
||||||
CTLFLAG_RD, 0, "node for CPU children");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "node for CPU children");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1023,7 +1023,7 @@ acpi_cpu_startup(void *arg)
|
|||||||
|
|
||||||
/* Add a sysctl handler to handle global Cx lowest setting */
|
/* Add a sysctl handler to handle global Cx lowest setting */
|
||||||
SYSCTL_ADD_PROC(&cpu_sysctl_ctx, SYSCTL_CHILDREN(cpu_sysctl_tree),
|
SYSCTL_ADD_PROC(&cpu_sysctl_ctx, SYSCTL_CHILDREN(cpu_sysctl_tree),
|
||||||
OID_AUTO, "cx_lowest", CTLTYPE_STRING | CTLFLAG_RW,
|
OID_AUTO, "cx_lowest", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
NULL, 0, acpi_cpu_global_cx_lowest_sysctl, "A",
|
NULL, 0, acpi_cpu_global_cx_lowest_sysctl, "A",
|
||||||
"Global lowest Cx sleep state to use");
|
"Global lowest Cx sleep state to use");
|
||||||
|
|
||||||
@ -1067,26 +1067,25 @@ acpi_cpu_startup_cx(struct acpi_cpu_softc *sc)
|
|||||||
sc->cpu_cx_supported, 0,
|
sc->cpu_cx_supported, 0,
|
||||||
"Cx/microsecond values for supported Cx states");
|
"Cx/microsecond values for supported Cx states");
|
||||||
SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)), OID_AUTO,
|
||||||
OID_AUTO, "cx_lowest", CTLTYPE_STRING | CTLFLAG_RW,
|
"cx_lowest", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
|
||||||
(void *)sc, 0, acpi_cpu_cx_lowest_sysctl, "A",
|
(void *)sc, 0, acpi_cpu_cx_lowest_sysctl, "A",
|
||||||
"lowest Cx sleep state to use");
|
"lowest Cx sleep state to use");
|
||||||
SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)), OID_AUTO,
|
||||||
OID_AUTO, "cx_usage", CTLTYPE_STRING | CTLFLAG_RD,
|
"cx_usage", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
(void *)sc, 0, acpi_cpu_usage_sysctl, "A",
|
(void *)sc, 0, acpi_cpu_usage_sysctl, "A",
|
||||||
"percent usage for each Cx state");
|
"percent usage for each Cx state");
|
||||||
SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)), OID_AUTO,
|
||||||
OID_AUTO, "cx_usage_counters", CTLTYPE_STRING | CTLFLAG_RD,
|
"cx_usage_counters", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
(void *)sc, 0, acpi_cpu_usage_counters_sysctl, "A",
|
(void *)sc, 0, acpi_cpu_usage_counters_sysctl, "A",
|
||||||
"Cx sleep state counters");
|
"Cx sleep state counters");
|
||||||
#if defined(__i386__) || defined(__amd64__)
|
#if defined(__i386__) || defined(__amd64__)
|
||||||
SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx,
|
SYSCTL_ADD_PROC(&sc->cpu_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)),
|
SYSCTL_CHILDREN(device_get_sysctl_tree(sc->cpu_dev)), OID_AUTO,
|
||||||
OID_AUTO, "cx_method", CTLTYPE_STRING | CTLFLAG_RD,
|
"cx_method", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
(void *)sc, 0, acpi_cpu_method_sysctl, "A",
|
(void *)sc, 0, acpi_cpu_method_sysctl, "A", "Cx entrance methods");
|
||||||
"Cx entrance methods");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Signal platform that we can handle _CST notification. */
|
/* Signal platform that we can handle _CST notification. */
|
||||||
|
@ -515,7 +515,7 @@ acpi_dock_attach(device_t dev)
|
|||||||
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
SYSCTL_ADD_PROC(sc->sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(sc->sysctl_tree),
|
SYSCTL_CHILDREN(sc->sysctl_tree),
|
||||||
OID_AUTO, "status",
|
OID_AUTO, "status",
|
||||||
CTLTYPE_INT|CTLFLAG_RW, dev, 0,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, dev, 0,
|
||||||
acpi_dock_status_sysctl, "I",
|
acpi_dock_status_sysctl, "I",
|
||||||
"Dock/Undock operation");
|
"Dock/Undock operation");
|
||||||
|
|
||||||
|
@ -179,7 +179,9 @@ struct acpi_ec_softc {
|
|||||||
|
|
||||||
ACPI_SERIAL_DECL(ec, "ACPI embedded controller");
|
ACPI_SERIAL_DECL(ec, "ACPI embedded controller");
|
||||||
|
|
||||||
static SYSCTL_NODE(_debug_acpi, OID_AUTO, ec, CTLFLAG_RD, NULL, "EC debugging");
|
static SYSCTL_NODE(_debug_acpi, OID_AUTO, ec,
|
||||||
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
|
||||||
|
"EC debugging");
|
||||||
|
|
||||||
static int ec_burst_mode;
|
static int ec_burst_mode;
|
||||||
SYSCTL_INT(_debug_acpi_ec, OID_AUTO, burst, CTLFLAG_RWTUN, &ec_burst_mode, 0,
|
SYSCTL_INT(_debug_acpi_ec, OID_AUTO, burst, CTLFLAG_RWTUN, &ec_burst_mode, 0,
|
||||||
|
@ -62,7 +62,8 @@ static int acpi_smbat_get_bst(device_t dev, struct acpi_bst *bst);
|
|||||||
|
|
||||||
ACPI_SERIAL_DECL(smbat, "ACPI Smart Battery");
|
ACPI_SERIAL_DECL(smbat, "ACPI Smart Battery");
|
||||||
|
|
||||||
static SYSCTL_NODE(_debug_acpi, OID_AUTO, batt, CTLFLAG_RD, NULL,
|
static SYSCTL_NODE(_debug_acpi, OID_AUTO, batt,
|
||||||
|
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
|
||||||
"Battery debugging");
|
"Battery debugging");
|
||||||
|
|
||||||
/* On some laptops with smart batteries, enabling battery monitoring
|
/* On some laptops with smart batteries, enabling battery monitoring
|
||||||
|
@ -241,8 +241,8 @@ acpi_tz_attach(device_t dev)
|
|||||||
acpi_sc = acpi_device_get_parent_softc(dev);
|
acpi_sc = acpi_device_get_parent_softc(dev);
|
||||||
sysctl_ctx_init(&acpi_tz_sysctl_ctx);
|
sysctl_ctx_init(&acpi_tz_sysctl_ctx);
|
||||||
acpi_tz_sysctl_tree = SYSCTL_ADD_NODE(&acpi_tz_sysctl_ctx,
|
acpi_tz_sysctl_tree = SYSCTL_ADD_NODE(&acpi_tz_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "thermal",
|
||||||
OID_AUTO, "thermal", CTLFLAG_RD, 0, "");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
|
||||||
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
|
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
|
||||||
OID_AUTO, "min_runtime", CTLFLAG_RW,
|
OID_AUTO, "min_runtime", CTLFLAG_RW,
|
||||||
@ -260,56 +260,52 @@ acpi_tz_attach(device_t dev)
|
|||||||
sysctl_ctx_init(&sc->tz_sysctl_ctx);
|
sysctl_ctx_init(&sc->tz_sysctl_ctx);
|
||||||
sprintf(oidname, "tz%d", device_get_unit(dev));
|
sprintf(oidname, "tz%d", device_get_unit(dev));
|
||||||
sc->tz_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&sc->tz_sysctl_ctx,
|
sc->tz_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&sc->tz_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, oidname,
|
||||||
OID_AUTO, oidname, CTLFLAG_RD, 0, "", "thermal_zone");
|
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "", "thermal_zone");
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD,
|
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
&sc->tz_temperature, 0, sysctl_handle_int,
|
&sc->tz_temperature, 0, sysctl_handle_int, "IK",
|
||||||
"IK", "current thermal zone temperature");
|
"current thermal zone temperature");
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
sc, 0, acpi_tz_active_sysctl, "I", "cooling is active");
|
0, acpi_tz_active_sysctl, "I", "cooling is active");
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "passive_cooling", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "passive_cooling",
|
||||||
sc, 0, acpi_tz_cooling_sysctl, "I",
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0,
|
||||||
|
acpi_tz_cooling_sysctl, "I",
|
||||||
"enable passive (speed reduction) cooling");
|
"enable passive (speed reduction) cooling");
|
||||||
|
|
||||||
SYSCTL_ADD_INT(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_INT(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "thermal_flags", CTLFLAG_RD,
|
OID_AUTO, "thermal_flags", CTLFLAG_RD,
|
||||||
&sc->tz_thflags, 0, "thermal zone flags");
|
&sc->tz_thflags, 0, "thermal zone flags");
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "_PSV", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "_PSV", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
sc, offsetof(struct acpi_tz_softc, tz_zone.psv),
|
offsetof(struct acpi_tz_softc, tz_zone.psv), acpi_tz_temp_sysctl, "IK",
|
||||||
acpi_tz_temp_sysctl, "IK", "passive cooling temp setpoint");
|
"passive cooling temp setpoint");
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "_HOT", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "_HOT", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
sc, offsetof(struct acpi_tz_softc, tz_zone.hot),
|
offsetof(struct acpi_tz_softc, tz_zone.hot), acpi_tz_temp_sysctl, "IK",
|
||||||
acpi_tz_temp_sysctl, "IK",
|
|
||||||
"too hot temp setpoint (suspend now)");
|
"too hot temp setpoint (suspend now)");
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "_CRT", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "_CRT", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
sc, offsetof(struct acpi_tz_softc, tz_zone.crt),
|
offsetof(struct acpi_tz_softc, tz_zone.crt), acpi_tz_temp_sysctl, "IK",
|
||||||
acpi_tz_temp_sysctl, "IK",
|
|
||||||
"critical temp setpoint (shutdown now)");
|
"critical temp setpoint (shutdown now)");
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "_ACx", CTLTYPE_INT | CTLFLAG_RD,
|
OID_AUTO, "_ACx", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
|
||||||
&sc->tz_zone.ac, sizeof(sc->tz_zone.ac),
|
&sc->tz_zone.ac, sizeof(sc->tz_zone.ac), sysctl_handle_opaque, "IK",
|
||||||
sysctl_handle_opaque, "IK", "");
|
"");
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "_TC1", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "_TC1", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
sc, offsetof(struct acpi_tz_softc, tz_zone.tc1),
|
offsetof(struct acpi_tz_softc, tz_zone.tc1), acpi_tz_passive_sysctl,
|
||||||
acpi_tz_passive_sysctl, "I",
|
"I", "thermal constant 1 for passive cooling");
|
||||||
"thermal constant 1 for passive cooling");
|
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "_TC2", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "_TC2", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
sc, offsetof(struct acpi_tz_softc, tz_zone.tc2),
|
offsetof(struct acpi_tz_softc, tz_zone.tc2), acpi_tz_passive_sysctl,
|
||||||
acpi_tz_passive_sysctl, "I",
|
"I", "thermal constant 2 for passive cooling");
|
||||||
"thermal constant 2 for passive cooling");
|
|
||||||
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
|
||||||
OID_AUTO, "_TSP", CTLTYPE_INT | CTLFLAG_RW,
|
OID_AUTO, "_TSP", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc,
|
||||||
sc, offsetof(struct acpi_tz_softc, tz_zone.tsp),
|
offsetof(struct acpi_tz_softc, tz_zone.tsp), acpi_tz_passive_sysctl,
|
||||||
acpi_tz_passive_sysctl, "I",
|
"I", "thermal sampling period for passive cooling");
|
||||||
"thermal sampling period for passive cooling");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register our power profile event handler.
|
* Register our power profile event handler.
|
||||||
|
@ -368,8 +368,10 @@ acpi_timer_sysctl_freq(SYSCTL_HANDLER_ARGS)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCTL_PROC(_machdep, OID_AUTO, acpi_timer_freq, CTLTYPE_INT | CTLFLAG_RW,
|
SYSCTL_PROC(_machdep, OID_AUTO, acpi_timer_freq,
|
||||||
0, sizeof(u_int), acpi_timer_sysctl_freq, "I", "ACPI timer frequency");
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, sizeof(u_int),
|
||||||
|
acpi_timer_sysctl_freq, "I",
|
||||||
|
"ACPI timer frequency");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some ACPI timers are known or believed to suffer from implementation
|
* Some ACPI timers are known or believed to suffer from implementation
|
||||||
|
@ -254,8 +254,8 @@ acpi_video_attach(device_t dev)
|
|||||||
ACPI_SERIAL_BEGIN(video);
|
ACPI_SERIAL_BEGIN(video);
|
||||||
if (acpi_video_sysctl_tree == NULL) {
|
if (acpi_video_sysctl_tree == NULL) {
|
||||||
acpi_video_sysctl_tree = SYSCTL_ADD_NODE(&acpi_video_sysctl_ctx,
|
acpi_video_sysctl_tree = SYSCTL_ADD_NODE(&acpi_video_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO,
|
||||||
OID_AUTO, "video", CTLFLAG_RD, 0,
|
"video", CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
|
||||||
"video extension control");
|
"video extension control");
|
||||||
}
|
}
|
||||||
ACPI_SERIAL_END(video);
|
ACPI_SERIAL_END(video);
|
||||||
@ -539,39 +539,40 @@ acpi_video_vo_init(UINT32 adr)
|
|||||||
vo->vo_sysctl_tree =
|
vo->vo_sysctl_tree =
|
||||||
SYSCTL_ADD_NODE(&vo->vo_sysctl_ctx,
|
SYSCTL_ADD_NODE(&vo->vo_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(acpi_video_sysctl_tree),
|
SYSCTL_CHILDREN(acpi_video_sysctl_tree),
|
||||||
OID_AUTO, name, CTLFLAG_RD, 0, desc);
|
OID_AUTO, name, CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||||
|
0, desc);
|
||||||
if (vo->vo_sysctl_tree != NULL) {
|
if (vo->vo_sysctl_tree != NULL) {
|
||||||
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
||||||
OID_AUTO, "active",
|
OID_AUTO, "active",
|
||||||
CTLTYPE_INT|CTLFLAG_RW, vo, 0,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, vo,
|
||||||
acpi_video_vo_active_sysctl, "I",
|
0, acpi_video_vo_active_sysctl, "I",
|
||||||
"current activity of this device");
|
"current activity of this device");
|
||||||
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
||||||
OID_AUTO, "brightness",
|
OID_AUTO, "brightness",
|
||||||
CTLTYPE_INT|CTLFLAG_RW, vo, 0,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, vo,
|
||||||
acpi_video_vo_bright_sysctl, "I",
|
0, acpi_video_vo_bright_sysctl, "I",
|
||||||
"current brightness level");
|
"current brightness level");
|
||||||
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
||||||
OID_AUTO, "fullpower",
|
OID_AUTO, "fullpower",
|
||||||
CTLTYPE_INT|CTLFLAG_RW, vo,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, vo,
|
||||||
POWER_PROFILE_PERFORMANCE,
|
POWER_PROFILE_PERFORMANCE,
|
||||||
acpi_video_vo_presets_sysctl, "I",
|
acpi_video_vo_presets_sysctl, "I",
|
||||||
"preset level for full power mode");
|
"preset level for full power mode");
|
||||||
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
||||||
OID_AUTO, "economy",
|
OID_AUTO, "economy",
|
||||||
CTLTYPE_INT|CTLFLAG_RW, vo,
|
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, vo,
|
||||||
POWER_PROFILE_ECONOMY,
|
POWER_PROFILE_ECONOMY,
|
||||||
acpi_video_vo_presets_sysctl, "I",
|
acpi_video_vo_presets_sysctl, "I",
|
||||||
"preset level for economy mode");
|
"preset level for economy mode");
|
||||||
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx,
|
||||||
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
SYSCTL_CHILDREN(vo->vo_sysctl_tree),
|
||||||
OID_AUTO, "levels",
|
OID_AUTO, "levels",
|
||||||
CTLTYPE_INT | CTLFLAG_RD, vo, 0,
|
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, vo,
|
||||||
acpi_video_vo_levels_sysctl, "I",
|
0, acpi_video_vo_levels_sysctl, "I",
|
||||||
"supported brightness levels");
|
"supported brightness levels");
|
||||||
} else
|
} else
|
||||||
printf("%s: sysctl node creation failed\n", type);
|
printf("%s: sysctl node creation failed\n", type);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user