/drivers/mtd/nand/ |
D | nandsim.c | 203 #define NS_IS_INITIALIZED(ns) ((ns)->geom.totsz != 0) argument 206 #define NS_STATUS_OK(ns) (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0))) argument 209 #define NS_STATUS_FAILED(ns) (NAND_STATUS_FAIL | NS_STATUS_OK(ns)) argument 212 #define NS_RAW_OFFSET(ns) \ argument 213 (((ns)->regs.row * (ns)->geom.pgszoob) + (ns)->regs.column) 216 #define NS_RAW_OFFSET_OOB(ns) (NS_RAW_OFFSET(ns) + ns->geom.pgsz) argument 560 static void nandsim_debugfs_remove(struct nandsim *ns) in nandsim_debugfs_remove() argument 563 debugfs_remove_recursive(ns->dbg.dfs_root); in nandsim_debugfs_remove() 572 static int __init alloc_device(struct nandsim *ns) in alloc_device() argument 591 ns->pages_written = vzalloc(BITS_TO_LONGS(ns->geom.pgnum) * in alloc_device() [all …]
|
/drivers/staging/lustre/lustre/ldlm/ |
D | ldlm_resource.c | 162 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in resource_count_show() local 169 cfs_hash_for_each_bucket(ns->ns_rs_hash, &bd, i) in resource_count_show() 178 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in lock_count_show() local 182 locks = lprocfs_stats_collector(ns->ns_stats, LDLM_NSS_LOCKS, in lock_count_show() 192 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in lock_unused_count_show() local 195 return sprintf(buf, "%d\n", ns->ns_nr_unused); in lock_unused_count_show() 202 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in lru_size_show() local 204 __u32 *nr = &ns->ns_max_unused; in lru_size_show() 206 if (ns_connect_lru_resize(ns)) in lru_size_show() 207 nr = &ns->ns_nr_unused; in lru_size_show() [all …]
|
D | ldlm_pool.c | 319 struct ldlm_namespace *ns; in ldlm_cli_pool_shrink() local 322 ns = container_of(pl, struct ldlm_namespace, ns_pool); in ldlm_cli_pool_shrink() 327 if (!ns_connect_lru_resize(ns)) in ldlm_cli_pool_shrink() 335 spin_lock(&ns->ns_lock); in ldlm_cli_pool_shrink() 336 unused = ns->ns_nr_unused; in ldlm_cli_pool_shrink() 337 spin_unlock(&ns->ns_lock); in ldlm_cli_pool_shrink() 342 return ldlm_cancel_lru(ns, nr, LCF_ASYNC, LDLM_CANCEL_SHRINK); in ldlm_cli_pool_shrink() 541 struct ldlm_namespace *ns = container_of(pl, struct ldlm_namespace, in ldlm_pool_sysfs_init() local 546 err = kobject_init_and_add(&pl->pl_kobj, &ldlm_pl_ktype, &ns->ns_kobj, in ldlm_pool_sysfs_init() 554 struct ldlm_namespace *ns = container_of(pl, struct ldlm_namespace, in ldlm_pool_debugfs_init() local [all …]
|
D | ldlm_request.c | 293 static void failed_lock_cleanup(struct ldlm_namespace *ns, in failed_lock_cleanup() argument 351 struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; in ldlm_cli_enqueue_fini() local 457 rc = ldlm_lock_change_resource(ns, lock, in ldlm_cli_enqueue_fini() 511 rc = ldlm_lock_enqueue(ns, &lock, NULL, flags); in ldlm_cli_enqueue_fini() 532 failed_lock_cleanup(ns, lock, mode); in ldlm_cli_enqueue_fini() 590 struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; in ldlm_prep_elc_req() local 599 if (ns_connect_cancelset(ns)) { in ldlm_prep_elc_req() 604 flags = ns_connect_lru_resize(ns) ? in ldlm_prep_elc_req() 606 to_free = !ns_connect_lru_resize(ns) && in ldlm_prep_elc_req() 614 count += ldlm_cancel_lru_local(ns, cancels, to_free, in ldlm_prep_elc_req() [all …]
|
D | ldlm_internal.h | 77 static inline int ldlm_ns_empty(struct ldlm_namespace *ns) in ldlm_ns_empty() argument 79 return atomic_read(&ns->ns_bref) == 0; in ldlm_ns_empty() 100 int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, 102 int ldlm_cancel_lru_local(struct ldlm_namespace *ns, 110 void ldlm_namespace_free_prior(struct ldlm_namespace *ns, 112 void ldlm_namespace_free_post(struct ldlm_namespace *ns); 134 ldlm_lock_create(struct ldlm_namespace *ns, const struct ldlm_res_id *, 144 int ldlm_run_ast_work(struct ldlm_namespace *ns, struct list_head *rpc_list, 152 int ldlm_bl_to_thread_lock(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld, 154 int ldlm_bl_to_thread_list(struct ldlm_namespace *ns, [all …]
|
D | ldlm_lockd.c | 115 void ldlm_handle_bl_callback(struct ldlm_namespace *ns, in ldlm_handle_bl_callback() argument 154 struct ldlm_namespace *ns, in ldlm_handle_cp_callback() argument 244 rc = ldlm_lock_change_resource(ns, lock, in ldlm_handle_cp_callback() 281 ldlm_run_ast_work(ns, &ast_list, LDLM_WORK_CP_AST); in ldlm_handle_cp_callback() 305 struct ldlm_namespace *ns, in ldlm_handle_gl_callback() argument 330 if (ldlm_bl_to_thread_lock(ns, NULL, lock)) in ldlm_handle_gl_callback() 331 ldlm_handle_bl_callback(ns, NULL, lock); in ldlm_handle_gl_callback() 380 struct ldlm_namespace *ns, in init_blwi() argument 392 blwi->blwi_ns = ns; in init_blwi() 414 static int ldlm_bl_to_thread(struct ldlm_namespace *ns, in ldlm_bl_to_thread() argument [all …]
|
/drivers/block/drbd/ |
D | drbd_state.c | 38 union drbd_state ns; member 293 union drbd_state ns, enum chg_state_flags flags, 297 static enum drbd_state_rv is_valid_transition(union drbd_state os, union drbd_state ns); 299 union drbd_state ns, enum sanitize_state_warnings *warn); 480 union drbd_state os, union drbd_state ns) in cl_wide_st_chg() argument 482 return (os.conn >= C_CONNECTED && ns.conn >= C_CONNECTED && in cl_wide_st_chg() 483 ((os.role != R_PRIMARY && ns.role == R_PRIMARY) || in cl_wide_st_chg() 484 (os.conn != C_STARTING_SYNC_T && ns.conn == C_STARTING_SYNC_T) || in cl_wide_st_chg() 485 (os.conn != C_STARTING_SYNC_S && ns.conn == C_STARTING_SYNC_S) || in cl_wide_st_chg() 486 (os.disk != D_FAILED && ns.disk == D_FAILED))) || in cl_wide_st_chg() [all …]
|
/drivers/nvme/host/ |
D | core.c | 157 struct nvme_ns *ns = container_of(kref, struct nvme_ns, kref); in nvme_free_ns() local 159 if (ns->ndev) in nvme_free_ns() 160 nvme_nvm_unregister(ns); in nvme_free_ns() 162 if (ns->disk) { in nvme_free_ns() 164 ns->disk->private_data = NULL; in nvme_free_ns() 168 put_disk(ns->disk); in nvme_free_ns() 169 ida_simple_remove(&ns->ctrl->ns_ida, ns->instance); in nvme_free_ns() 170 nvme_put_ctrl(ns->ctrl); in nvme_free_ns() 171 kfree(ns); in nvme_free_ns() 174 static void nvme_put_ns(struct nvme_ns *ns) in nvme_put_ns() argument [all …]
|
D | scsi.c | 514 static int nvme_trans_standard_inquiry_page(struct nvme_ns *ns, in nvme_trans_standard_inquiry_page() argument 518 struct nvme_ctrl *ctrl = ns->ctrl; in nvme_trans_standard_inquiry_page() 529 nvme_sc = nvme_identify_ns(ctrl, ns->ns_id, &id_ns); in nvme_trans_standard_inquiry_page() 558 static int nvme_trans_supported_vpd_pages(struct nvme_ns *ns, in nvme_trans_supported_vpd_pages() argument 578 static int nvme_trans_unit_serial_page(struct nvme_ns *ns, in nvme_trans_unit_serial_page() argument 587 strncpy(&inq_response[4], ns->ctrl->serial, INQ_SERIAL_NUMBER_LENGTH); in nvme_trans_unit_serial_page() 593 static int nvme_fill_device_id_eui64(struct nvme_ns *ns, struct sg_io_hdr *hdr, in nvme_fill_device_id_eui64() argument 601 nvme_sc = nvme_identify_ns(ns->ctrl, ns->ns_id, &id_ns); in nvme_fill_device_id_eui64() 609 if (ns->ctrl->vs >= NVME_VS(1, 2, 0)) { in nvme_fill_device_id_eui64() 638 static int nvme_fill_device_id_scsi_string(struct nvme_ns *ns, in nvme_fill_device_id_scsi_string() argument [all …]
|
D | lightnvm.c | 310 struct nvme_ns *ns = nvmdev->q->queuedata; in nvme_nvm_identity() local 316 c.identity.nsid = cpu_to_le32(ns->ns_id); in nvme_nvm_identity() 323 ret = nvme_submit_sync_cmd(ns->ctrl->admin_q, (struct nvme_command *)&c, in nvme_nvm_identity() 347 struct nvme_ns *ns = nvmdev->q->queuedata; in nvme_nvm_get_l2p_tbl() local 349 u32 len = queue_max_hw_sectors(ns->ctrl->admin_q) << 9; in nvme_nvm_get_l2p_tbl() 356 c.l2p.nsid = cpu_to_le32(ns->ns_id); in nvme_nvm_get_l2p_tbl() 367 ret = nvme_submit_sync_cmd(ns->ctrl->admin_q, in nvme_nvm_get_l2p_tbl() 370 dev_err(ns->ctrl->device, in nvme_nvm_get_l2p_tbl() 394 struct nvme_ns *ns = q->queuedata; in nvme_nvm_get_bb_tbl() local 395 struct nvme_ctrl *ctrl = ns->ctrl; in nvme_nvm_get_bb_tbl() [all …]
|
D | nvme.h | 209 static inline u64 nvme_block_nr(struct nvme_ns *ns, sector_t sector) in nvme_block_nr() argument 211 return (sector >> (ns->lba_shift - 9)); in nvme_block_nr() 275 int nvme_setup_cmd(struct nvme_ns *ns, struct request *req, 303 int nvme_sg_io(struct nvme_ns *ns, struct sg_io_hdr __user *u_hdr); 304 int nvme_sg_io32(struct nvme_ns *ns, unsigned long arg); 308 int nvme_nvm_ns_supported(struct nvme_ns *ns, struct nvme_id_ns *id); 309 int nvme_nvm_register(struct nvme_ns *ns, char *disk_name, int node, 311 void nvme_nvm_unregister(struct nvme_ns *ns); 321 static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name, in nvme_nvm_register() argument 328 static inline void nvme_nvm_unregister(struct nvme_ns *ns) {}; in nvme_nvm_unregister() argument [all …]
|
/drivers/clk/qcom/ |
D | clk-rcg.c | 26 static u32 ns_to_src(struct src_sel *s, u32 ns) in ns_to_src() argument 28 ns >>= s->src_sel_shift; in ns_to_src() 29 ns &= SRC_SEL_MASK; in ns_to_src() 30 return ns; in ns_to_src() 33 static u32 src_to_ns(struct src_sel *s, u8 src, u32 ns) in src_to_ns() argument 39 ns &= ~mask; in src_to_ns() 41 ns |= src << s->src_sel_shift; in src_to_ns() 42 return ns; in src_to_ns() 49 u32 ns; in clk_rcg_get_parent() local 52 ret = regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns); in clk_rcg_get_parent() [all …]
|
/drivers/scsi/bfa/ |
D | bfa_fcs_lport.c | 3655 static void bfa_fcs_lport_ns_sm_offline(struct bfa_fcs_lport_ns_s *ns, 3657 static void bfa_fcs_lport_ns_sm_plogi_sending(struct bfa_fcs_lport_ns_s *ns, 3659 static void bfa_fcs_lport_ns_sm_plogi(struct bfa_fcs_lport_ns_s *ns, 3661 static void bfa_fcs_lport_ns_sm_plogi_retry(struct bfa_fcs_lport_ns_s *ns, 3664 struct bfa_fcs_lport_ns_s *ns, 3666 static void bfa_fcs_lport_ns_sm_rspn_id(struct bfa_fcs_lport_ns_s *ns, 3668 static void bfa_fcs_lport_ns_sm_rspn_id_retry(struct bfa_fcs_lport_ns_s *ns, 3671 struct bfa_fcs_lport_ns_s *ns, 3673 static void bfa_fcs_lport_ns_sm_rft_id_retry(struct bfa_fcs_lport_ns_s *ns, 3675 static void bfa_fcs_lport_ns_sm_rft_id(struct bfa_fcs_lport_ns_s *ns, [all …]
|
/drivers/nvme/target/ |
D | core.c | 225 struct nvmet_ns *ns; in __nvmet_find_namespace() local 227 list_for_each_entry_rcu(ns, &ctrl->subsys->namespaces, dev_link) { in __nvmet_find_namespace() 228 if (ns->nsid == le32_to_cpu(nsid)) in __nvmet_find_namespace() 229 return ns; in __nvmet_find_namespace() 237 struct nvmet_ns *ns; in nvmet_find_namespace() local 240 ns = __nvmet_find_namespace(ctrl, nsid); in nvmet_find_namespace() 241 if (ns) in nvmet_find_namespace() 242 percpu_ref_get(&ns->ref); in nvmet_find_namespace() 245 return ns; in nvmet_find_namespace() 250 struct nvmet_ns *ns = container_of(ref, struct nvmet_ns, ref); in nvmet_destroy_namespace() local [all …]
|
D | admin-cmd.c | 37 struct nvmet_ns *ns; in nvmet_get_smart_log_nsid() local 41 ns = nvmet_find_namespace(req->sq->ctrl, req->cmd->get_log_page.nsid); in nvmet_get_smart_log_nsid() 42 if (!ns) { in nvmet_get_smart_log_nsid() 49 host_reads = part_stat_read(ns->bdev->bd_part, ios[READ]); in nvmet_get_smart_log_nsid() 50 data_units_read = part_stat_read(ns->bdev->bd_part, sectors[READ]); in nvmet_get_smart_log_nsid() 51 host_writes = part_stat_read(ns->bdev->bd_part, ios[WRITE]); in nvmet_get_smart_log_nsid() 52 data_units_written = part_stat_read(ns->bdev->bd_part, sectors[WRITE]); in nvmet_get_smart_log_nsid() 58 nvmet_put_namespace(ns); in nvmet_get_smart_log_nsid() 69 struct nvmet_ns *ns; in nvmet_get_smart_log_all() local 76 list_for_each_entry_rcu(ns, &ctrl->subsys->namespaces, dev_link) { in nvmet_get_smart_log_all() [all …]
|
D | io-cmd.c | 33 req->ns->blksize_shift; in nvmet_rw_len() 69 sector <<= (req->ns->blksize_shift - 9); in nvmet_execute_rw() 73 bio->bi_bdev = req->ns->bdev; in nvmet_execute_rw() 85 bio->bi_bdev = req->ns->bdev; in nvmet_execute_rw() 99 blk_poll(bdev_get_queue(req->ns->bdev), cookie); in nvmet_execute_rw() 109 bio->bi_bdev = req->ns->bdev; in nvmet_execute_flush() 117 static u16 nvmet_discard_range(struct nvmet_ns *ns, in nvmet_discard_range() argument 120 if (__blkdev_issue_discard(ns->bdev, in nvmet_discard_range() 121 le64_to_cpu(range->slba) << (ns->blksize_shift - 9), in nvmet_discard_range() 122 le32_to_cpu(range->nlb) << (ns->blksize_shift - 9), in nvmet_discard_range() [all …]
|
/drivers/of/ |
D | fdt_address.c | 26 #define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \ argument 27 (ns) > 0) 47 int na, int ns, int pna); 75 int na, int ns, int pna) in fdt_bus_default_map() argument 80 s = of_read_number(range + na + pna, ns); in fdt_bus_default_map() 116 int na, int ns, int pna, const char *rprop) in fdt_translate_one() argument 137 rone = na + pna + ns; in fdt_translate_one() 139 offset = bus->map(addr, ranges, na, ns, pna); in fdt_translate_one() 173 int na, ns, pna, pns; in fdt_translate_address() local 193 bus->count_cells(blob, parent, &na, &ns); in fdt_translate_address() [all …]
|
D | address.c | 18 #define OF_CHECK_COUNTS(na, ns) (OF_CHECK_ADDR_COUNT(na) && (ns) > 0) argument 46 int na, int ns, int pna); 65 int na, int ns, int pna) in of_bus_default_map() argument 70 s = of_read_number(range + na + pna, ns); in of_bus_default_map() 143 static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_pci_map() argument 158 s = of_read_number(range + na + pna, ns); in of_bus_pci_map() 184 int onesize, i, na, ns; in of_get_pci_address() local 195 bus->count_cells(dev, &na, &ns); in of_get_pci_address() 206 onesize = na + ns; in of_get_pci_address() 211 *size = of_read_number(prop + na, ns); in of_get_pci_address() [all …]
|
/drivers/net/ethernet/freescale/ |
D | gianfar_ptp.c | 159 u64 ns; in tmr_cnt_read() local 164 ns = ((u64) hi) << 32; in tmr_cnt_read() 165 ns |= lo; in tmr_cnt_read() 166 return ns; in tmr_cnt_read() 170 static void tmr_cnt_write(struct etsects *etsects, u64 ns) in tmr_cnt_write() argument 172 u32 hi = ns >> 32; in tmr_cnt_write() 173 u32 lo = ns & 0xffffffff; in tmr_cnt_write() 182 u64 ns; in set_alarm() local 185 ns = tmr_cnt_read(etsects) + 1500000000ULL; in set_alarm() 186 ns = div_u64(ns, 1000000000UL) * 1000000000ULL; in set_alarm() [all …]
|
/drivers/net/ethernet/mellanox/mlx5/core/ |
D | fs_core.c | 239 static struct fs_prio *find_prio(struct mlx5_flow_namespace *ns, in find_prio() argument 244 fs_for_each_prio(iter_prio, ns) { in find_prio() 322 struct mlx5_flow_namespace *ns; in find_root() local 331 ns = container_of(root, struct mlx5_flow_namespace, node); in find_root() 332 return container_of(ns, struct mlx5_flow_root_namespace, ns); in find_root() 739 static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespace *ns, in __mlx5_create_flow_table() argument 749 find_root(&ns->node); in __mlx5_create_flow_table() 758 fs_prio = find_prio(ns, prio); in __mlx5_create_flow_table() 808 struct mlx5_flow_table *mlx5_create_flow_table(struct mlx5_flow_namespace *ns, in mlx5_create_flow_table() argument 812 return __mlx5_create_flow_table(ns, FS_FT_OP_MOD_NORMAL, 0, prio, in mlx5_create_flow_table() [all …]
|
/drivers/ptp/ |
D | ptp_ixp46x.c | 56 u64 ns; in ixp_systime_read() local 62 ns = ((u64) hi) << 32; in ixp_systime_read() 63 ns |= lo; in ixp_systime_read() 64 ns <<= TICKS_NS_SHIFT; in ixp_systime_read() 66 return ns; in ixp_systime_read() 69 static void ixp_systime_write(struct ixp46x_ts_regs *regs, u64 ns) in ixp_systime_write() argument 73 ns >>= TICKS_NS_SHIFT; in ixp_systime_write() 74 hi = ns >> 32; in ixp_systime_write() 75 lo = ns & 0xffffffff; in ixp_systime_write() 180 u64 ns; in ptp_ixp_gettime() local [all …]
|
D | ptp_pch.c | 159 u64 ns; in pch_systime_read() local 165 ns = ((u64) hi) << 32; in pch_systime_read() 166 ns |= lo; in pch_systime_read() 167 ns <<= TICKS_NS_SHIFT; in pch_systime_read() 169 return ns; in pch_systime_read() 172 static void pch_systime_write(struct pch_ts_regs __iomem *regs, u64 ns) in pch_systime_write() argument 176 ns >>= TICKS_NS_SHIFT; in pch_systime_write() 177 hi = ns >> 32; in pch_systime_write() 178 lo = ns & 0xffffffff; in pch_systime_write() 257 u64 ns; in pch_rx_snap_read() local [all …]
|
/drivers/gpu/drm/i915/ |
D | dvo_ns2501.c | 394 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_readb() local 422 if (!ns->quiet) { in ns2501_readb() 439 struct ns2501_priv *ns = dvo->dev_priv; in ns2501_writeb() local 457 if (!ns->quiet) { in ns2501_writeb() 475 struct ns2501_priv *ns; in ns2501_init() local 478 ns = kzalloc(sizeof(struct ns2501_priv), GFP_KERNEL); in ns2501_init() 479 if (ns == NULL) in ns2501_init() 483 dvo->dev_priv = ns; in ns2501_init() 484 ns->quiet = true; in ns2501_init() 503 ns->quiet = false; in ns2501_init() [all …]
|
/drivers/staging/lustre/lustre/include/ |
D | lustre_dlm.h | 468 static inline int ns_connect_cancelset(struct ldlm_namespace *ns) in ns_connect_cancelset() argument 470 return !!(ns->ns_connect_flags & OBD_CONNECT_CANCELSET); in ns_connect_cancelset() 476 static inline int ns_connect_lru_resize(struct ldlm_namespace *ns) in ns_connect_lru_resize() argument 478 return !!(ns->ns_connect_flags & OBD_CONNECT_LRU_RESIZE); in ns_connect_lru_resize() 481 static inline void ns_register_cancel(struct ldlm_namespace *ns, in ns_register_cancel() argument 484 ns->ns_cancel = arg; in ns_register_cancel() 897 ldlm_ns_name(struct ldlm_namespace *ns) in ldlm_ns_name() argument 899 return ns->ns_rs_hash->hs_name; in ldlm_ns_name() 928 struct ldlm_namespace *ns = ldlm_res_to_ns(res); in ldlm_lvbo_init() local 930 if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) in ldlm_lvbo_init() [all …]
|
/drivers/net/ethernet/ti/ |
D | cpts.c | 172 u64 ns; in cpts_ptp_gettime() local 177 ns = timecounter_read(&cpts->tc); in cpts_ptp_gettime() 180 *ts = ns_to_timespec64(ns); in cpts_ptp_gettime() 188 u64 ns; in cpts_ptp_settime() local 192 ns = timespec64_to_ns(ts); in cpts_ptp_settime() 195 timecounter_init(&cpts->tc, &cpts->cc, ns); in cpts_ptp_settime() 288 u64 ns = 0; in cpts_find_ts() local 312 ns = timecounter_cyc2time(&cpts->tc, event->low); in cpts_find_ts() 320 return ns; in cpts_find_ts() 325 u64 ns; in cpts_rx_timestamp() local [all …]
|