Home
last modified time | relevance | path

Searched refs:unit (Results 1 – 25 of 918) sorted by relevance

12345678910>>...37

/freebsd/contrib/bmake/
H A DFILES73 unit-tests/Makefile
74 unit-tests/Makefile.config.in
75 unit-tests/archive-suffix.exp
76 unit-tests/archive-suffix.mk
77 unit-tests/archive.exp
78 unit-tests/archive.mk
79 unit-tests/cmd-errors-jobs.exp
80 unit-tests/cmd-errors-jobs.mk
81 unit-tests/cmd-errors-lint.exp
82 unit-tests/cmd-errors-lint.mk
[all …]
/freebsd/sys/x86/iommu/
H A Dintel_qi.c62 dmar_enable_qi(struct dmar_unit *unit) in dmar_enable_qi() argument
66 DMAR_ASSERT_LOCKED(unit); in dmar_enable_qi()
67 unit->hw_gcmd |= DMAR_GCMD_QIE; in dmar_enable_qi()
68 dmar_write4(unit, DMAR_GCMD_REG, unit->hw_gcmd); in dmar_enable_qi()
69 DMAR_WAIT_UNTIL(((dmar_read4(unit, DMAR_GSTS_REG) & DMAR_GSTS_QIES) in dmar_enable_qi()
75 dmar_disable_qi(struct dmar_unit *unit) in dmar_disable_qi() argument
79 DMAR_ASSERT_LOCKED(unit); in dmar_disable_qi()
80 unit->hw_gcmd &= ~DMAR_GCMD_QIE; in dmar_disable_qi()
81 dmar_write4(unit, DMAR_GCMD_REG, unit->hw_gcmd); in dmar_disable_qi()
82 DMAR_WAIT_UNTIL(((dmar_read4(unit, DMAR_GSTS_REG) & DMAR_GSTS_QIES) in dmar_disable_qi()
[all …]
H A Damd_event.c73 amdiommu_event_rearm_intr(struct amdiommu_unit *unit) in amdiommu_event_rearm_intr() argument
75 amdiommu_write8(unit, AMDIOMMU_CMDEV_STATUS, in amdiommu_event_rearm_intr()
80 amdiommu_event_log_inc_head(struct amdiommu_unit *unit) in amdiommu_event_log_inc_head() argument
82 unit->event_log_head++; in amdiommu_event_log_inc_head()
83 if (unit->event_log_head >= unit->event_log_size) in amdiommu_event_log_inc_head()
84 unit->event_log_head = 0; in amdiommu_event_log_inc_head()
88 amdiommu_event_log_print(struct amdiommu_unit *unit, in amdiommu_event_log_print() argument
92 unit->iommu.unit, evp->code, evp->w0, evp->ww1, evp->w2, evp->w3); in amdiommu_event_log_print()
96 AMDIOMMU_ASSERT_LOCKED(unit); in amdiommu_event_log_print()
105 dte = &unit->dev_tbl[ev_dte_p->devid]; in amdiommu_event_log_print()
[all …]
H A Dintel_fault.c80 dmar_fault_next(struct dmar_unit *unit, int faultp) in dmar_fault_next() argument
84 if (faultp == unit->fault_log_size) in dmar_fault_next()
90 dmar_fault_intr_clear(struct dmar_unit *unit, uint32_t fsts) in dmar_fault_intr_clear() argument
96 printf("DMAR%d: Invalidation timed out\n", unit->iommu.unit); in dmar_fault_intr_clear()
101 unit->iommu.unit); in dmar_fault_intr_clear()
106 unit->iommu.unit); in dmar_fault_intr_clear()
110 printf("DMAR%d: Advanced pending fault\n", unit->iommu.unit); in dmar_fault_intr_clear()
114 printf("DMAR%d: Advanced fault overflow\n", unit->iommu.unit); in dmar_fault_intr_clear()
118 dmar_write4(unit, DMAR_FSTS_REG, clear); in dmar_fault_intr_clear()
124 struct dmar_unit *unit; in dmar_fault_intr() local
[all …]
H A Damd_cmd.c62 amdiommu_enable_cmdbuf(struct amdiommu_unit *unit) in amdiommu_enable_cmdbuf() argument
64 AMDIOMMU_ASSERT_LOCKED(unit); in amdiommu_enable_cmdbuf()
66 unit->hw_ctrl |= AMDIOMMU_CTRL_CMDBUF_EN; in amdiommu_enable_cmdbuf()
67 amdiommu_write8(unit, AMDIOMMU_CTRL, unit->hw_ctrl); in amdiommu_enable_cmdbuf()
71 amdiommu_disable_cmdbuf(struct amdiommu_unit *unit) in amdiommu_disable_cmdbuf() argument
73 AMDIOMMU_ASSERT_LOCKED(unit); in amdiommu_disable_cmdbuf()
75 unit->hw_ctrl &= ~AMDIOMMU_CTRL_CMDBUF_EN; in amdiommu_disable_cmdbuf()
76 amdiommu_write8(unit, AMDIOMMU_CTRL, unit->hw_ctrl); in amdiommu_disable_cmdbuf()
83 struct amdiommu_unit *unit; in amdiommu_enable_qi_intr() local
85 unit = IOMMU2AMD(iommu); in amdiommu_enable_qi_intr()
[all …]
H A Dintel_intrmap.c64 static void dmar_ir_program_irte(struct dmar_unit *unit, u_int idx,
66 static int dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie);
71 struct dmar_unit *unit; in dmar_alloc_msi_intr() local
76 unit = dmar_ir_find(src, NULL, NULL); in dmar_alloc_msi_intr()
77 if (unit == NULL || !unit->ir_enabled) { in dmar_alloc_msi_intr()
83 error = vmem_alloc(unit->irtids, count, M_FIRSTFIT | M_NOWAIT, in dmar_alloc_msi_intr()
100 struct dmar_unit *unit; in dmar_map_msi_intr() local
105 unit = dmar_ir_find(src, &rid, &is_dmar); in dmar_map_msi_intr()
107 KASSERT(unit == NULL, ("DMAR cannot translate itself")); in dmar_map_msi_intr()
121 if (unit == NULL || !unit->ir_enabled || cookie == -1) in dmar_map_msi_intr()
[all …]
H A Dintel_drv.c235 dmar_release_resources(device_t dev, struct dmar_unit *unit) in dmar_release_resources() argument
239 iommu_fini_busdma(&unit->iommu); in dmar_release_resources()
240 dmar_fini_irt(unit); in dmar_release_resources()
241 dmar_fini_qi(unit); in dmar_release_resources()
242 dmar_fini_fault_log(unit); in dmar_release_resources()
244 iommu_release_intr(DMAR2IOMMU(unit), i); in dmar_release_resources()
245 if (unit->regs != NULL) { in dmar_release_resources()
246 bus_deactivate_resource(dev, SYS_RES_MEMORY, unit->reg_rid, in dmar_release_resources()
247 unit->regs); in dmar_release_resources()
248 bus_release_resource(dev, SYS_RES_MEMORY, unit->reg_rid, in dmar_release_resources()
[all …]
H A Dintel_utils.c111 dmar_pglvl_supported(struct dmar_unit *unit, int pglvl) in dmar_pglvl_supported() argument
118 if ((DMAR_CAP_SAGAW(unit->hw_cap) & sagaw_bits[i].cap) != 0) in dmar_pglvl_supported()
153 dmar_maxaddr2mgaw(struct dmar_unit *unit, iommu_gaddr_t maxaddr, bool allow_less) in dmar_maxaddr2mgaw() argument
159 (DMAR_CAP_SAGAW(unit->hw_cap) & sagaw_bits[i].cap) != 0) in dmar_maxaddr2mgaw()
165 } while ((DMAR_CAP_SAGAW(unit->hw_cap) & sagaw_bits[i].cap) in dmar_maxaddr2mgaw()
203 calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size, in calc_am() argument
209 for (am = DMAR_CAP_MAMV(unit->hw_cap);; am--) { in calc_am()
224 dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) in dmar_flush_transl_to_ram() argument
227 if (DMAR_IS_COHERENT(unit)) in dmar_flush_transl_to_ram()
237 dmar_flush_pte_to_ram(struct dmar_unit *unit, iommu_pte_t *dst) in dmar_flush_pte_to_ram() argument
[all …]
H A Damd_intrmap.c114 struct amdiommu_unit *unit; in amdiommu_map_msi_intr() local
134 unit = CTX2AMD(ctx); in amdiommu_map_msi_intr()
135 if (!unit->irte_enabled || cookie == -1) in amdiommu_map_msi_intr()
137 if (cookie >= unit->irte_nentries) { in amdiommu_map_msi_intr()
139 unit->iommu.unit, cookie, unit->irte_nentries); in amdiommu_map_msi_intr()
143 if (unit->irte_x2apic) { in amdiommu_map_msi_intr()
179 if (unit->irte_x2apic) in amdiommu_map_msi_intr()
184 AMDIOMMU_LOCK(unit); in amdiommu_map_msi_intr()
185 amdiommu_qi_invalidate_ir_locked(unit, rid); in amdiommu_map_msi_intr()
186 AMDIOMMU_UNLOCK(unit); in amdiommu_map_msi_intr()
[all …]
H A Damd_ctx.c74 static void amdiommu_unref_domain_locked(struct amdiommu_unit *unit,
88 struct amdiommu_unit *unit; in amdiommu_domain_unload_entry() local
91 unit = DOM2AMD(domain); in amdiommu_domain_unload_entry()
99 AMDIOMMU_LOCK(unit); in amdiommu_domain_unload_entry()
101 AMDIOMMU_UNLOCK(unit); in amdiommu_domain_unload_entry()
121 struct amdiommu_unit *unit; in amdiommu_domain_unload() local
126 unit = DOM2AMD(domain); in amdiommu_domain_unload()
138 AMDIOMMU_LOCK(unit); in amdiommu_domain_unload()
144 AMDIOMMU_UNLOCK(unit); in amdiommu_domain_unload()
151 struct amdiommu_unit *unit; in amdiommu_domain_destroy() local
[all …]
H A Damd_iommu.h43 struct amdiommu_unit *unit; /* (c) */ member
104 #define AMD2IOMMU(unit) (&((unit)->iommu)) argument
105 #define IOMMU2AMD(unit) \ argument
106 __containerof((unit), struct amdiommu_unit, iommu)
108 #define AMDIOMMU_LOCK(unit) mtx_lock(&AMD2IOMMU(unit)->lock) argument
109 #define AMDIOMMU_UNLOCK(unit) mtx_unlock(&AMD2IOMMU(unit)->lock) argument
110 #define AMDIOMMU_ASSERT_LOCKED(unit) mtx_assert(&AMD2IOMMU(unit)->lock, \ argument
113 #define AMDIOMMU_EVENT_LOCK(unit) mtx_lock_spin(&(unit)->event_lock) argument
114 #define AMDIOMMU_EVENT_UNLOCK(unit) mtx_unlock_spin(&(unit)->event_lock) argument
115 #define AMDIOMMU_EVENT_ASSERT_LOCKED(unit) \ argument
[all …]
H A Dintel_dmar.h174 bool dmar_pglvl_supported(struct dmar_unit *unit, int pglvl);
176 int dmar_maxaddr2mgaw(struct dmar_unit *unit, iommu_gaddr_t maxaddr,
180 int calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size,
182 int dmar_load_root_entry_ptr(struct dmar_unit *unit);
183 int dmar_inv_ctx_glob(struct dmar_unit *unit);
184 int dmar_inv_iotlb_glob(struct dmar_unit *unit);
185 int dmar_flush_write_bufs(struct dmar_unit *unit);
186 void dmar_flush_pte_to_ram(struct dmar_unit *unit, iommu_pte_t *dst);
187 void dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst);
188 void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst);
[all …]
/freebsd/sys/netgraph/bluetooth/hci/
H A Dng_hci_main.c126 ng_hci_unit_p unit = NULL; in ng_hci_constructor() local
128 unit = malloc(sizeof(*unit), M_NETGRAPH_HCI, M_WAITOK | M_ZERO); in ng_hci_constructor()
130 unit->node = node; in ng_hci_constructor()
131 unit->debug = NG_HCI_WARN_LEVEL; in ng_hci_constructor()
133 unit->link_policy_mask = 0xffff; /* Enable all supported modes */ in ng_hci_constructor()
134 unit->packet_mask = 0xffff; /* Enable all packet types */ in ng_hci_constructor()
135 unit->role_switch = 1; /* Enable role switch (if device supports it) */ in ng_hci_constructor()
145 NG_HCI_BUFF_CMD_SET(unit->buffer, 1); in ng_hci_constructor()
146 NG_HCI_BUFF_ACL_SET(unit->buffer, 1, 17, 1); in ng_hci_constructor()
147 NG_HCI_BUFF_SCO_SET(unit->buffer, 1, 10, 1); in ng_hci_constructor()
[all …]
H A Dng_hci_misc.c63 ng_hci_mtap(ng_hci_unit_p unit, struct mbuf *m0) in ng_hci_mtap() argument
68 if (unit->raw != NULL && NG_HOOK_IS_VALID(unit->raw)) { in ng_hci_mtap()
71 NG_SEND_DATA_ONLY(error, unit->raw, m); in ng_hci_mtap()
76 __func__, NG_NODE_NAME(unit->node), error); in ng_hci_mtap()
87 ng_hci_unit_p unit = NULL; in ng_hci_node_is_up() local
96 unit = (ng_hci_unit_p) NG_NODE_PRIVATE(node); in ng_hci_node_is_up()
97 if ((unit->state & NG_HCI_UNIT_READY) != NG_HCI_UNIT_READY) in ng_hci_node_is_up()
100 if (hook != unit->acl && hook != unit->sco) in ng_hci_node_is_up()
107 if (hook == unit->acl) { in ng_hci_node_is_up()
108 NG_HCI_BUFF_ACL_SIZE(unit->buffer, ep->pkt_size); in ng_hci_node_is_up()
[all …]
H A Dng_hci_cmds.c90 ng_hci_send_command(ng_hci_unit_p unit) in ng_hci_send_command() argument
96 if (unit->state & NG_HCI_UNIT_COMMAND_PENDING) in ng_hci_send_command()
100 NG_HCI_BUFF_CMD_GET(unit->buffer, free); in ng_hci_send_command()
105 if (unit->drv == NULL || NG_HOOK_NOT_VALID(unit->drv)) { in ng_hci_send_command()
108 __func__, NG_NODE_NAME(unit->node), NG_HCI_HOOK_DRV); in ng_hci_send_command()
110 NG_BT_MBUFQ_DRAIN(&unit->cmdq); in ng_hci_send_command()
120 m0 = NG_BT_MBUFQ_FIRST(&unit->cmdq); in ng_hci_send_command()
124 ng_hci_mtap(unit, m0); in ng_hci_send_command()
128 NG_SEND_DATA_ONLY(error, unit->drv, m); in ng_hci_send_command()
135 __func__, NG_NODE_NAME(unit->node), error); in ng_hci_send_command()
[all …]
H A Dng_hci_ulpi.c67 ng_hci_lp_con_req(ng_hci_unit_p unit, item_p item, hook_p hook) in ng_hci_lp_con_req() argument
71 if ((unit->state & NG_HCI_UNIT_READY) != NG_HCI_UNIT_READY) { in ng_hci_lp_con_req()
74 __func__, NG_NODE_NAME(unit->node), unit->state); in ng_hci_lp_con_req()
84 __func__, NG_NODE_NAME(unit->node), in ng_hci_lp_con_req()
94 return (ng_hci_lp_acl_con_req(unit, item, hook)); in ng_hci_lp_con_req()
96 if (hook != unit->sco ) { in ng_hci_lp_con_req()
99 __func__, NG_NODE_NAME(unit->node), hook); in ng_hci_lp_con_req()
106 return (ng_hci_lp_sco_con_req(unit, item, hook)); in ng_hci_lp_con_req()
109 return (ng_hci_lp_le_con_req(unit, item, hook, link_type)); in ng_hci_lp_con_req()
122 ng_hci_lp_acl_con_req(ng_hci_unit_p unit, item_p item, hook_p hook) in ng_hci_lp_acl_con_req() argument
[all …]
H A Dng_hci_evnt.c87 ng_hci_process_event(ng_hci_unit_p unit, struct mbuf *event) in ng_hci_process_event() argument
101 __func__, NG_NODE_NAME(unit->node), hdr->event, hdr->length); in ng_hci_process_event()
127 error = le_event(unit, event); in ng_hci_process_event()
131 error = inquiry_result(unit, event); in ng_hci_process_event()
135 error = con_compl(unit, event); in ng_hci_process_event()
139 error = con_req(unit, event); in ng_hci_process_event()
143 error = discon_compl(unit, event); in ng_hci_process_event()
147 error = encryption_change(unit, event); in ng_hci_process_event()
151 error = read_remote_features_compl(unit, event); in ng_hci_process_event()
155 error = qos_setup_compl(unit, event); in ng_hci_process_event()
[all …]
/freebsd/sys/netpfil/ipfilter/netinet/
H A Dip_log.c507 ipf_log_items(ipf_main_softc_t *softc, int unit, fr_info_t *fin, void **items, in ipf_log_items() argument
524 MUTEX_ENTER(&softl->ipl_mutex[unit]); in ipf_log_items()
525 softl->ipl_counter[unit]++; in ipf_log_items()
530 if ((softl->ipl_used[unit] + len) > softl->ipl_logsize) { in ipf_log_items()
531 softl->ipl_logfail[unit]++; in ipf_log_items()
532 MUTEX_EXIT(&softl->ipl_mutex[unit]); in ipf_log_items()
538 softl->ipl_logfail[unit]++; in ipf_log_items()
539 MUTEX_EXIT(&softl->ipl_mutex[unit]); in ipf_log_items()
543 ipl->ipl_magic = softl->ipl_magic[unit]; in ipf_log_items()
545 ipl->ipl_seqnum = softl->ipl_counter[unit]; in ipf_log_items()
[all …]
/freebsd/contrib/ntp/ntpd/
H A Drefclock_gpsvme.c72 /* clock unit control structure */
74 short unit; /* NTP refclock unit number */ member
94 int unit, in psc_start() argument
102 if (unit < 0 || unit > 1) { /* support units 0 and 1 */ in psc_start()
103 msyslog(LOG_ERR, "psc_start: bad unit: %d", unit); in psc_start()
109 snprintf(buf, sizeof(buf), DEVICE, unit); /* dev file name */ in psc_start()
110 fd[unit] in psc_start()
144 psc_shutdown(int unit,struct peer * peer) psc_shutdown() argument
157 psc_poll(int unit,struct peer * peer) psc_poll() argument
230 check_leap_sec(struct refclockproc * pp,int unit) check_leap_sec() argument
[all...]
/freebsd/usr.sbin/mlxcontrol/
H A Dcommand.c183 status_print(int unit, void *arg) in status_print() argument
190 if (mlxd_find_ctrlr(unit, &ctrlr, &sysdrive)) { in status_print()
191 warnx("couldn't get controller/drive for %s", drivepath(unit)); in status_print()
212 if ((fd = open(drivepath(unit), 0)) < 0) { in status_print()
213 warn("can't open %s", drivepath(unit)); in status_print()
224 printf("%s: online", drivename(unit)); in status_print()
228 printf("%s: critical", drivename(unit)); in status_print()
234 printf("%s: offline", drivename(unit)); in status_print()
240 printf("%s: unknown status 0x%x", drivename(unit), result); in status_print()
289 controller_print(int unit, void *arg) in controller_print() argument
[all …]
H A Dinterface.c45 mlx_foreach(void (*func)(int unit, void *arg), void *arg) in mlx_foreach() argument
65 mlx_perform(int unit, void (*func)(int fd, void *arg), void *arg) in mlx_perform() argument
69 if ((fd = open(ctrlrpath(unit), 0)) >= 0) { in mlx_perform()
79 mlxd_foreach_ctrlr(int unit, void *arg) in mlxd_foreach_ctrlr() argument
85 if ((ctrlfd = open(ctrlrpath(unit), 0)) < 0) in mlxd_foreach_ctrlr()
106 mlxd_foreach(void (*func)(int unit, void *arg), void *arg) in mlxd_foreach() argument
121 int unit; member
127 mlxd_find_ctrlr_search(int unit, void *arg) in mlxd_find_ctrlr_search() argument
132 if ((fd = open(ctrlrpath(unit), 0)) >= 0) { in mlxd_find_ctrlr_search()
139 if (i == mlxd_find_ctrlr_param.unit) { in mlxd_find_ctrlr_search()
[all …]
H A Dutil.c45 ctrlrpath(int unit) in ctrlrpath() argument
49 sprintf(buf, "%s%s", _PATH_DEV, ctrlrname(unit)); in ctrlrpath()
55 ctrlrname(int unit) in ctrlrname() argument
59 sprintf(buf, "mlx%d", unit); in ctrlrname()
65 drivepath(int unit) in drivepath() argument
69 sprintf(buf, "%s%s", _PATH_DEV, drivename(unit)); in drivepath()
75 drivename(int unit) in drivename() argument
79 sprintf(buf, "mlxd%d", unit); in drivename()
87 int unit; in ctrlrunit() local
89 if (sscanf(str, "mlx%d", &unit) == 1) in ctrlrunit()
[all …]
/freebsd/stand/efi/libefi/
H A Dhandles.c34 int unit; member
46 int idx, unit; in efi_register_handles() local
54 for (unit = 0; idx < nentries; idx++, unit++) { in efi_register_handles()
55 entry[idx].handle = handles[unit]; in efi_register_handles()
57 entry[idx].alias = aliases[unit]; in efi_register_handles()
61 entry[idx].unit = unit; in efi_register_handles()
67 efi_find_handle(struct devsw *dev, int unit) in efi_find_handle() argument
74 if (entry[idx].unit != unit) in efi_find_handle()
82 efi_handle_lookup(EFI_HANDLE h, struct devsw **dev, int *unit, uint64_t *extra) in efi_handle_lookup() argument
91 if (unit != NULL) in efi_handle_lookup()
[all …]
/freebsd/sys/arm/broadcom/bcm2835/
H A Dbcm2835_clkman.c70 #define W_CMCLK(_sc, unit, _val) BCM_CLKMAN_WRITE(_sc, unit, 0x5a000000 | (_val)) argument
71 #define R_CMCLK(_sc, unit) BCM_CLKMAN_READ(_sc, unit) argument
72 #define W_CMDIV(_sc, unit, _val) BCM_CLKMAN_WRITE(_sc, (unit) + 4, 0x5a000000 | (_val)) argument
73 #define R_CMDIV(_sc, unit) BCM_CLKMAN_READ(_sc, (unit) + 4) argument
119 bcm2835_clkman_set_frequency(device_t dev, uint32_t unit, uint32_t hz) in bcm2835_clkman_set_frequency() argument
127 if (unit != BCM_PWM_CLKSRC) { in bcm2835_clkman_set_frequency()
129 "Unsupported unit 0x%x", unit); in bcm2835_clkman_set_frequency()
133 W_CMCLK(sc, unit, 6); in bcm2835_clkman_set_frequency()
135 u = R_CMCLK(sc, unit); in bcm2835_clkman_set_frequency()
142 "Failed to stop clock for unit 0x%x", unit); in bcm2835_clkman_set_frequency()
[all …]
/freebsd/sys/isa/
H A Disahint.c39 isa_hinted_child(device_t parent, const char *name, int unit) in isa_hinted_child() argument
47 if (resource_int_value(name, unit, "sensitive", &sensitive) != 0) in isa_hinted_child()
55 child = BUS_ADD_CHILD(parent, order, name, unit); in isa_hinted_child()
61 resource_int_value(name, unit, "port", &start); in isa_hinted_child()
62 resource_int_value(name, unit, "portsize", &count); in isa_hinted_child()
68 resource_int_value(name, unit, "maddr", &start); in isa_hinted_child()
69 resource_int_value(name, unit, "msize", &count); in isa_hinted_child()
73 if (resource_int_value(name, unit, "irq", &start) == 0 && start > 0) in isa_hinted_child()
76 if (resource_int_value(name, unit, "drq", &start) == 0 && start >= 0) in isa_hinted_child()
79 if (resource_disabled(name, unit)) in isa_hinted_child()
[all …]

12345678910>>...37