ns                158 arch/mips/cavium-octeon/csrc-octeon.c void __ndelay(unsigned long ns)
ns                164 arch/mips/cavium-octeon/csrc-octeon.c 	inc = ((ns * octeon_ndelay_factor) >> 16);
ns                 17 arch/mips/include/asm/delay.h extern void __ndelay(unsigned long ns);
ns                 20 arch/mips/include/asm/delay.h #define ndelay(ns) __ndelay(ns)
ns                225 arch/mips/include/asm/lasat/lasat.h static inline void lasat_ndelay(unsigned int ns)
ns                227 arch/mips/include/asm/lasat/lasat.h 	__delay(ns / lasat_ndelay_divider);
ns                 59 arch/mips/lib/delay.c void __ndelay(unsigned long ns)
ns                 63 arch/mips/lib/delay.c 	__delay((ns * 0x00000005ull * HZ * lpj) >> 32);
ns                121 arch/nds32/kernel/vdso/gettimeofday.c 	u64 ns;
ns                125 arch/nds32/kernel/vdso/gettimeofday.c 		ns = vdata->xtime_clock_nsec;
ns                126 arch/nds32/kernel/vdso/gettimeofday.c 		ns += vgetsns(vdata);
ns                127 arch/nds32/kernel/vdso/gettimeofday.c 		ns >>= vdata->cs_shift;
ns                130 arch/nds32/kernel/vdso/gettimeofday.c 	ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
ns                131 arch/nds32/kernel/vdso/gettimeofday.c 	ts->tv_nsec = ns;
ns                119 arch/powerpc/boot/addnote.c 	long nnote, nnote2, ns;
ns                174 arch/powerpc/boot/addnote.c 	ns = ph + 2 * ps;
ns                177 arch/powerpc/boot/addnote.c 		PUT_32(ph + PH_OFFSET, ns);
ns                179 arch/powerpc/boot/addnote.c 		PUT_64(ph + PH_OFFSET, ns);
ns                188 arch/powerpc/boot/addnote.c 	PUT_32(ns, strlen(arch) + 1);
ns                189 arch/powerpc/boot/addnote.c 	PUT_32(ns + 4, N_DESCR * 4);
ns                190 arch/powerpc/boot/addnote.c 	PUT_32(ns + 8, 0x1275);
ns                191 arch/powerpc/boot/addnote.c 	strcpy((char *) &buf[ns + 12], arch);
ns                192 arch/powerpc/boot/addnote.c 	ns += 12 + strlen(arch) + 1;
ns                193 arch/powerpc/boot/addnote.c 	for (i = 0; i < N_DESCR; ++i, ns += 4)
ns                194 arch/powerpc/boot/addnote.c 		PUT_32BE(ns, descr[i]);
ns                200 arch/powerpc/boot/addnote.c 		PUT_32(ph + PH_OFFSET, ns);
ns                202 arch/powerpc/boot/addnote.c 		PUT_64(ph + PH_OFFSET, ns);
ns                210 arch/powerpc/boot/addnote.c 	PUT_32(ns, strlen(rpaname) + 1);
ns                211 arch/powerpc/boot/addnote.c 	PUT_32(ns + 4, sizeof(rpanote));
ns                212 arch/powerpc/boot/addnote.c 	PUT_32(ns + 8, 0x12759999);
ns                213 arch/powerpc/boot/addnote.c 	strcpy((char *) &buf[ns + 12], rpaname);
ns                214 arch/powerpc/boot/addnote.c 	ns += 12 + ROUNDUP(strlen(rpaname) + 1);
ns                215 arch/powerpc/boot/addnote.c 	for (i = 0; i < N_RPA_DESCR; ++i, ns += 4)
ns                216 arch/powerpc/boot/addnote.c 		PUT_32BE(ns, rpanote[i]);
ns                 28 arch/powerpc/boot/simpleboot.c 	const u32 *na, *ns, *reg, *timebase;
ns                 43 arch/powerpc/boot/simpleboot.c 	ns = fdt_getprop(_dtb_start, node, "#size-cells", &size);
ns                 44 arch/powerpc/boot/simpleboot.c 	if (!ns || (size != 4))
ns                 53 arch/powerpc/boot/simpleboot.c 	if (size < (*na+*ns) * sizeof(u32))
ns                 63 arch/powerpc/boot/simpleboot.c 	for (i = 0; i < *ns; i++)
ns                454 arch/powerpc/include/asm/eeh.h 			      int ns)
ns                456 arch/powerpc/include/asm/eeh.h 	_insb(addr, buf, ns);
ns                457 arch/powerpc/include/asm/eeh.h 	if (EEH_POSSIBLE_ERROR((*(((u8*)buf)+ns-1)), u8))
ns                462 arch/powerpc/include/asm/eeh.h 			      int ns)
ns                464 arch/powerpc/include/asm/eeh.h 	_insw(addr, buf, ns);
ns                465 arch/powerpc/include/asm/eeh.h 	if (EEH_POSSIBLE_ERROR((*(((u16*)buf)+ns-1)), u16))
ns                502 arch/powerpc/include/asm/ps3av.h 	u8 ns[3];		/* in: audio ns val */
ns                176 arch/powerpc/kernel/isa-bridge.c 	u32 na, ns, pna;
ns                185 arch/powerpc/kernel/isa-bridge.c 	    of_property_read_u32(np, "#size-cells", &ns)) {
ns                192 arch/powerpc/kernel/isa-bridge.c 	if (na != 2 || ns != 1) {
ns                197 arch/powerpc/kernel/isa-bridge.c 	rs = na + ns + pna;
ns                212 arch/powerpc/kernel/isa-bridge.c 		size = of_read_number(ranges + i + na + pna, ns);
ns                 96 arch/powerpc/kernel/sysfs.c static unsigned int get_idle_ticks_bit(u64 ns)
ns                100 arch/powerpc/kernel/sysfs.c 	if (ns >= 10000)
ns                101 arch/powerpc/kernel/sysfs.c 		cycle = div_u64(ns + 500, 1000) * tb_ticks_per_usec;
ns                103 arch/powerpc/kernel/sysfs.c 		cycle = div_u64(ns * tb_ticks_per_usec, 1000);
ns                435 arch/powerpc/kvm/trace_hv.h 	TP_PROTO(int do_sleep, __u64 ns),
ns                437 arch/powerpc/kvm/trace_hv.h 	TP_ARGS(do_sleep, ns),
ns                440 arch/powerpc/kvm/trace_hv.h 		__field(__u64,  ns)
ns                446 arch/powerpc/kvm/trace_hv.h 		__entry->ns     = ns;
ns                453 arch/powerpc/kvm/trace_hv.h 		__entry->ns, __entry->tgid)
ns                646 arch/s390/kernel/perf_cpum_sf.c 		pid = __task_pid_nr_ns(tsk, type, event->ns);
ns                 51 arch/sparc/kernel/of_device_32.c 			  int na, int ns, int pna)
ns                 61 arch/sparc/kernel/of_device_32.c 			    na - 1, ns))
ns                123 arch/sparc/kernel/of_device_32.c 			     int na, int ns, int pna)
ns                125 arch/sparc/kernel/of_device_32.c 	return of_bus_default_map(addr, range, na, ns, pna);
ns                192 arch/sparc/kernel/of_device_32.c 				     int na, int ns, int pna)
ns                214 arch/sparc/kernel/of_device_32.c 	rone = na + pna + ns;
ns                216 arch/sparc/kernel/of_device_32.c 		if (!bus->map(addr, ranges, na, ns, pna))
ns                251 arch/sparc/kernel/of_device_32.c 	int na, ns;
ns                260 arch/sparc/kernel/of_device_32.c 	bus->count_cells(op->dev.of_node, &na, &ns);
ns                270 arch/sparc/kernel/of_device_32.c 	num_reg /= na + ns;
ns                277 arch/sparc/kernel/of_device_32.c 		const u32 *reg = (preg + (index * ((na + ns) * 4)));
ns                286 arch/sparc/kernel/of_device_32.c 		size = of_read_addr(reg + na, ns);
ns                298 arch/sparc/kernel/of_device_32.c 		dns = ns;
ns                 89 arch/sparc/kernel/of_device_64.c 			    int na, int ns, int pna)
ns                104 arch/sparc/kernel/of_device_64.c 			  int na, int ns, int pna)
ns                124 arch/sparc/kernel/of_device_64.c 			    na - 1, ns))
ns                246 arch/sparc/kernel/of_device_64.c 				     int na, int ns, int pna)
ns                267 arch/sparc/kernel/of_device_64.c 	rone = na + pna + ns;
ns                269 arch/sparc/kernel/of_device_64.c 		if (!bus->map(addr, ranges, na, ns, pna))
ns                321 arch/sparc/kernel/of_device_64.c 	int na, ns;
ns                330 arch/sparc/kernel/of_device_64.c 	bus->count_cells(op->dev.of_node, &na, &ns);
ns                340 arch/sparc/kernel/of_device_64.c 	num_reg /= na + ns;
ns                355 arch/sparc/kernel/of_device_64.c 		const u32 *reg = (preg + (index * ((na + ns) * 4)));
ns                364 arch/sparc/kernel/of_device_64.c 		size = of_read_addr(reg + na, ns);
ns                375 arch/sparc/kernel/of_device_64.c 		dns = ns;
ns                 97 arch/sparc/kernel/of_device_common.c 		    const u32 *size, int na, int ns)
ns                105 arch/sparc/kernel/of_device_common.c 	b += of_read_addr(size, ns);
ns                112 arch/sparc/kernel/of_device_common.c int of_bus_default_map(u32 *addr, const u32 *range, int na, int ns, int pna)
ns                117 arch/sparc/kernel/of_device_common.c 	if (ns > 2) {
ns                118 arch/sparc/kernel/of_device_common.c 		printk("of_device: Cannot handle size cells (%d) > 2.", ns);
ns                122 arch/sparc/kernel/of_device_common.c 	if (of_out_of_range(addr, range, range + na + pna, na, ns))
ns                 16 arch/sparc/kernel/of_device_common.h 		    const u32 *size, int na, int ns);
ns                 17 arch/sparc/kernel/of_device_common.h int of_bus_default_map(u32 *addr, const u32 *range, int na, int ns, int pna);
ns                 33 arch/sparc/kernel/of_device_common.h 			       int na, int ns, int pna);
ns                150 arch/sparc/vdso/vclock_gettime.c 	u64 ns;
ns                155 arch/sparc/vdso/vclock_gettime.c 		ns = vvar->wall_time_snsec;
ns                156 arch/sparc/vdso/vclock_gettime.c 		ns += vgetsns(vvar);
ns                157 arch/sparc/vdso/vclock_gettime.c 		ns >>= vvar->clock.shift;
ns                160 arch/sparc/vdso/vclock_gettime.c 	ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
ns                161 arch/sparc/vdso/vclock_gettime.c 	ts->tv_nsec = ns;
ns                170 arch/sparc/vdso/vclock_gettime.c 	u64 ns;
ns                175 arch/sparc/vdso/vclock_gettime.c 		ns = vvar->wall_time_snsec;
ns                176 arch/sparc/vdso/vclock_gettime.c 		ns += vgetsns_stick(vvar);
ns                177 arch/sparc/vdso/vclock_gettime.c 		ns >>= vvar->clock.shift;
ns                180 arch/sparc/vdso/vclock_gettime.c 	ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
ns                181 arch/sparc/vdso/vclock_gettime.c 	ts->tv_nsec = ns;
ns                190 arch/sparc/vdso/vclock_gettime.c 	u64 ns;
ns                195 arch/sparc/vdso/vclock_gettime.c 		ns = vvar->monotonic_time_snsec;
ns                196 arch/sparc/vdso/vclock_gettime.c 		ns += vgetsns(vvar);
ns                197 arch/sparc/vdso/vclock_gettime.c 		ns >>= vvar->clock.shift;
ns                200 arch/sparc/vdso/vclock_gettime.c 	ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
ns                201 arch/sparc/vdso/vclock_gettime.c 	ts->tv_nsec = ns;
ns                210 arch/sparc/vdso/vclock_gettime.c 	u64 ns;
ns                215 arch/sparc/vdso/vclock_gettime.c 		ns = vvar->monotonic_time_snsec;
ns                216 arch/sparc/vdso/vclock_gettime.c 		ns += vgetsns_stick(vvar);
ns                217 arch/sparc/vdso/vclock_gettime.c 		ns >>= vvar->clock.shift;
ns                220 arch/sparc/vdso/vclock_gettime.c 	ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
ns                221 arch/sparc/vdso/vclock_gettime.c 	ts->tv_nsec = ns;
ns                 32 arch/um/include/shared/timer-internal.h static inline void time_travel_set_time(unsigned long long ns)
ns                 34 arch/um/include/shared/timer-internal.h 	time_travel_time = ns;
ns                 57 arch/um/include/shared/timer-internal.h static inline void time_travel_set_time(unsigned long long ns)
ns                 72 arch/unicore32/include/asm/assembler.h 	.else;	.ifc	\cond, ns
ns                117 arch/x86/kernel/cpu/vmware.c 	unsigned long long ns;
ns                119 arch/x86/kernel/cpu/vmware.c 	ns = mul_u64_u32_shr(rdtsc(), vmware_cyc2ns.cyc2ns_mul,
ns                121 arch/x86/kernel/cpu/vmware.c 	ns -= vmware_cyc2ns.cyc2ns_offset;
ns                122 arch/x86/kernel/cpu/vmware.c 	return ns;
ns               1279 arch/x86/kernel/fpu/xstate.c int proc_pid_arch_status(struct seq_file *m, struct pid_namespace *ns,
ns                111 arch/x86/kernel/tsc.c 	unsigned long long ns;
ns                115 arch/x86/kernel/tsc.c 	ns = data.cyc2ns_offset;
ns                116 arch/x86/kernel/tsc.c 	ns += mul_u64_u32_shr(cyc, data.cyc2ns_mul, data.cyc2ns_shift);
ns                120 arch/x86/kernel/tsc.c 	return ns;
ns               1222 arch/x86/kvm/lapic.c 	s64 ns;
ns               1237 arch/x86/kvm/lapic.c 	ns = mod_64(ktime_to_ns(remaining), apic->lapic_timer.period);
ns               1238 arch/x86/kvm/lapic.c 	tmcct = div64_u64(ns,
ns               1483 arch/x86/kvm/lapic.c 	u64 ns;
ns               1492 arch/x86/kvm/lapic.c 		ns = -advance_expire_delta * 1000000ULL;
ns               1493 arch/x86/kvm/lapic.c 		do_div(ns, vcpu->arch.virtual_tsc_khz);
ns               1494 arch/x86/kvm/lapic.c 		timer_advance_ns -= ns/LAPIC_TIMER_ADVANCE_ADJUST_STEP;
ns               1497 arch/x86/kvm/lapic.c 		ns = advance_expire_delta * 1000000ULL;
ns               1498 arch/x86/kvm/lapic.c 		do_div(ns, vcpu->arch.virtual_tsc_khz);
ns               1499 arch/x86/kvm/lapic.c 		timer_advance_ns += ns/LAPIC_TIMER_ADVANCE_ADJUST_STEP;
ns               1573 arch/x86/kvm/lapic.c 	u64 ns = 0;
ns               1588 arch/x86/kvm/lapic.c 	ns = (tscdeadline - guest_tsc) * 1000000ULL;
ns               1589 arch/x86/kvm/lapic.c 	do_div(ns, this_tsc_khz);
ns               1592 arch/x86/kvm/lapic.c 	    likely(ns > apic->lapic_timer.timer_advance_ns)) {
ns               1593 arch/x86/kvm/lapic.c 		expire = ktime_add_ns(now, ns);
ns               1942 arch/x86/kvm/x86.c 	u64 offset, ns, elapsed;
ns               1951 arch/x86/kvm/x86.c 	ns = ktime_get_boottime_ns();
ns               1952 arch/x86/kvm/x86.c 	elapsed = ns - kvm->arch.last_tsc_nsec;
ns               2004 arch/x86/kvm/x86.c 		kvm->arch.cur_tsc_nsec = ns;
ns               2014 arch/x86/kvm/x86.c 	kvm->arch.last_tsc_nsec = ns;
ns               2122 arch/x86/kvm/x86.c 	u64 ns;
ns               2126 arch/x86/kvm/x86.c 		ns = gtod->nsec_base;
ns               2127 arch/x86/kvm/x86.c 		ns += vgettsc(tsc_timestamp, &mode);
ns               2128 arch/x86/kvm/x86.c 		ns >>= gtod->clock.shift;
ns               2129 arch/x86/kvm/x86.c 		ns += gtod->boot_ns;
ns               2131 arch/x86/kvm/x86.c 	*t = ns;
ns               2141 arch/x86/kvm/x86.c 	u64 ns;
ns               2146 arch/x86/kvm/x86.c 		ns = gtod->nsec_base;
ns               2147 arch/x86/kvm/x86.c 		ns += vgettsc(tsc_timestamp, &mode);
ns               2148 arch/x86/kvm/x86.c 		ns >>= gtod->clock.shift;
ns               2151 arch/x86/kvm/x86.c 	ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
ns               2152 arch/x86/kvm/x86.c 	ts->tv_nsec = ns;
ns                456 arch/x86/platform/uv/tlb_uv.c 	unsigned long long ns;
ns                459 arch/x86/platform/uv/tlb_uv.c 	ns = mul_u64_u32_shr(cyc, data.cyc2ns_mul, data.cyc2ns_shift);
ns                462 arch/x86/platform/uv/tlb_uv.c 	return ns;
ns                468 arch/x86/platform/uv/tlb_uv.c static inline unsigned long long ns_2_cycles(unsigned long long ns)
ns                474 arch/x86/platform/uv/tlb_uv.c 	cyc = (ns << data.cyc2ns_shift) / data.cyc2ns_mul;
ns                 88 drivers/base/class.c 			 const void *ns)
ns                 94 drivers/base/class.c 					     &attr->attr, ns);
ns                101 drivers/base/class.c 			  const void *ns)
ns                104 drivers/base/class.c 		sysfs_remove_file_ns(&cls->p->subsys.kobj, &attr->attr, ns);
ns               1111 drivers/base/core.c 	const void *ns = NULL;
ns               1114 drivers/base/core.c 		ns = dev->class->namespace(dev);
ns               1116 drivers/base/core.c 	return ns;
ns                916 drivers/block/aoe/aoecmd.c ata_ident_fixstring(u16 *id, int ns)
ns                920 drivers/block/aoe/aoecmd.c 	while (ns-- > 0) {
ns               1670 drivers/block/drbd/drbd_int.h 			union drbd_state ns;
ns                448 drivers/block/drbd/drbd_main.c 	enum drbd_thread_state ns = restart ? RESTARTING : EXITING;
ns                460 drivers/block/drbd/drbd_main.c 	if (thi->t_state != ns) {
ns                466 drivers/block/drbd/drbd_main.c 		thi->t_state = ns;
ns               1805 drivers/block/drbd/drbd_nl.c 	union drbd_state ns, os;
ns               2119 drivers/block/drbd/drbd_nl.c 	ns = os;
ns               2127 drivers/block/drbd/drbd_nl.c 			ns.disk = D_CONSISTENT;
ns               2129 drivers/block/drbd/drbd_nl.c 			ns.disk = D_OUTDATED;
ns               2131 drivers/block/drbd/drbd_nl.c 		ns.disk = D_INCONSISTENT;
ns               2135 drivers/block/drbd/drbd_nl.c 		ns.pdsk = D_OUTDATED;
ns               2138 drivers/block/drbd/drbd_nl.c 	if (ns.disk == D_CONSISTENT &&
ns               2139 drivers/block/drbd/drbd_nl.c 	    (ns.pdsk == D_OUTDATED || rcu_dereference(device->ldev->disk_conf)->fencing == FP_DONT_CARE))
ns               2140 drivers/block/drbd/drbd_nl.c 		ns.disk = D_UP_TO_DATE;
ns               2157 drivers/block/drbd/drbd_nl.c 		device->new_state_tmp.i = ns.i;
ns               2158 drivers/block/drbd/drbd_nl.c 		ns.i = os.i;
ns               2159 drivers/block/drbd/drbd_nl.c 		ns.disk = D_NEGOTIATING;
ns               2168 drivers/block/drbd/drbd_nl.c 	rv = _drbd_set_state(device, ns, CS_VERBOSE, NULL);
ns               3879 drivers/block/drbd/drbd_nl.c 			    nla_put_u32(skb, T_new_state, sib->ns.i))
ns               4445 drivers/block/drbd/drbd_receiver.c 	union drbd_state os, ns, peer_state;
ns               4465 drivers/block/drbd/drbd_receiver.c 	os = ns = drbd_read_state(device);
ns               4521 drivers/block/drbd/drbd_receiver.c 	if (ns.conn == C_WF_REPORT_PARAMS)
ns               4522 drivers/block/drbd/drbd_receiver.c 		ns.conn = C_CONNECTED;
ns               4525 drivers/block/drbd/drbd_receiver.c 		ns.conn = C_BEHIND;
ns               4567 drivers/block/drbd/drbd_receiver.c 			ns.conn = drbd_sync_handshake(peer_device, peer_state.role, real_peer_disk);
ns               4570 drivers/block/drbd/drbd_receiver.c 		if (ns.conn == C_MASK) {
ns               4571 drivers/block/drbd/drbd_receiver.c 			ns.conn = C_CONNECTED;
ns               4592 drivers/block/drbd/drbd_receiver.c 	ns.peer = peer_state.role;
ns               4593 drivers/block/drbd/drbd_receiver.c 	ns.pdsk = real_peer_disk;
ns               4594 drivers/block/drbd/drbd_receiver.c 	ns.peer_isp = (peer_state.aftr_isp | peer_state.user_isp);
ns               4595 drivers/block/drbd/drbd_receiver.c 	if ((ns.conn == C_CONNECTED || ns.conn == C_WF_BITMAP_S) && ns.disk == D_NEGOTIATING)
ns               4596 drivers/block/drbd/drbd_receiver.c 		ns.disk = device->new_state_tmp.disk;
ns               4597 drivers/block/drbd/drbd_receiver.c 	cs_flags = CS_VERBOSE + (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED ? 0 : CS_HARD);
ns               4598 drivers/block/drbd/drbd_receiver.c 	if (ns.pdsk == D_CONSISTENT && drbd_suspended(device) && ns.conn == C_CONNECTED && os.conn < C_CONNECTED &&
ns               4610 drivers/block/drbd/drbd_receiver.c 	rv = _drbd_set_state(device, ns, cs_flags, NULL);
ns               4611 drivers/block/drbd/drbd_receiver.c 	ns = drbd_read_state(device);
ns               4620 drivers/block/drbd/drbd_receiver.c 		if (ns.conn > C_CONNECTED && peer_state.conn <= C_CONNECTED &&
ns                 26 drivers/block/drbd/drbd_state.c 	union drbd_state ns;
ns                281 drivers/block/drbd/drbd_state.c 			   union drbd_state ns, enum chg_state_flags flags,
ns                285 drivers/block/drbd/drbd_state.c static enum drbd_state_rv is_valid_transition(union drbd_state os, union drbd_state ns);
ns                287 drivers/block/drbd/drbd_state.c 				       union drbd_state ns, enum sanitize_state_warnings *warn);
ns                468 drivers/block/drbd/drbd_state.c 			  union drbd_state os, union drbd_state ns)
ns                470 drivers/block/drbd/drbd_state.c 	return (os.conn >= C_CONNECTED && ns.conn >= C_CONNECTED &&
ns                471 drivers/block/drbd/drbd_state.c 		 ((os.role != R_PRIMARY && ns.role == R_PRIMARY) ||
ns                472 drivers/block/drbd/drbd_state.c 		  (os.conn != C_STARTING_SYNC_T && ns.conn == C_STARTING_SYNC_T) ||
ns                473 drivers/block/drbd/drbd_state.c 		  (os.conn != C_STARTING_SYNC_S && ns.conn == C_STARTING_SYNC_S) ||
ns                474 drivers/block/drbd/drbd_state.c 		  (os.disk != D_FAILED && ns.disk == D_FAILED))) ||
ns                475 drivers/block/drbd/drbd_state.c 		(os.conn >= C_CONNECTED && ns.conn == C_DISCONNECTING) ||
ns                476 drivers/block/drbd/drbd_state.c 		(os.conn == C_CONNECTED && ns.conn == C_VERIFY_S) ||
ns                477 drivers/block/drbd/drbd_state.c 		(os.conn == C_CONNECTED && ns.conn == C_WF_REPORT_PARAMS);
ns                483 drivers/block/drbd/drbd_state.c 	union drbd_state ns;
ns                484 drivers/block/drbd/drbd_state.c 	ns.i = (os.i & ~mask.i) | val.i;
ns                485 drivers/block/drbd/drbd_state.c 	return ns;
ns                493 drivers/block/drbd/drbd_state.c 	union drbd_state ns;
ns                497 drivers/block/drbd/drbd_state.c 	ns = apply_mask_val(drbd_read_state(device), mask, val);
ns                498 drivers/block/drbd/drbd_state.c 	rv = _drbd_set_state(device, ns, f, NULL);
ns                520 drivers/block/drbd/drbd_state.c 	union drbd_state os, ns;
ns                532 drivers/block/drbd/drbd_state.c 	ns = sanitize_state(device, os, apply_mask_val(os, mask, val), NULL);
ns                533 drivers/block/drbd/drbd_state.c 	rv = is_valid_transition(os, ns);
ns                537 drivers/block/drbd/drbd_state.c 	if (!cl_wide_st_chg(device, os, ns))
ns                540 drivers/block/drbd/drbd_state.c 		rv = is_valid_state(device, ns);
ns                542 drivers/block/drbd/drbd_state.c 			rv = is_valid_soft_transition(os, ns, first_peer_device(device)->connection);
ns                568 drivers/block/drbd/drbd_state.c 	union drbd_state os, ns;
ns                581 drivers/block/drbd/drbd_state.c 	ns = sanitize_state(device, os, apply_mask_val(os, mask, val), NULL);
ns                582 drivers/block/drbd/drbd_state.c 	rv = is_valid_transition(os, ns);
ns                588 drivers/block/drbd/drbd_state.c 	if (cl_wide_st_chg(device, os, ns)) {
ns                589 drivers/block/drbd/drbd_state.c 		rv = is_valid_state(device, ns);
ns                591 drivers/block/drbd/drbd_state.c 			rv = is_valid_soft_transition(os, ns, first_peer_device(device)->connection);
ns                596 drivers/block/drbd/drbd_state.c 				print_st_err(device, os, ns, rv);
ns                603 drivers/block/drbd/drbd_state.c 				print_st_err(device, os, ns, rv);
ns                612 drivers/block/drbd/drbd_state.c 				print_st_err(device, os, ns, rv);
ns                616 drivers/block/drbd/drbd_state.c 		ns = apply_mask_val(drbd_read_state(device), mask, val);
ns                617 drivers/block/drbd/drbd_state.c 		rv = _drbd_set_state(device, ns, f, &done);
ns                619 drivers/block/drbd/drbd_state.c 		rv = _drbd_set_state(device, ns, f, &done);
ns                715 drivers/block/drbd/drbd_state.c static void print_st(struct drbd_device *device, const char *name, union drbd_state ns)
ns                719 drivers/block/drbd/drbd_state.c 	    drbd_conn_str(ns.conn),
ns                720 drivers/block/drbd/drbd_state.c 	    drbd_role_str(ns.role),
ns                721 drivers/block/drbd/drbd_state.c 	    drbd_role_str(ns.peer),
ns                722 drivers/block/drbd/drbd_state.c 	    drbd_disk_str(ns.disk),
ns                723 drivers/block/drbd/drbd_state.c 	    drbd_disk_str(ns.pdsk),
ns                724 drivers/block/drbd/drbd_state.c 	    is_susp(ns) ? 's' : 'r',
ns                725 drivers/block/drbd/drbd_state.c 	    ns.aftr_isp ? 'a' : '-',
ns                726 drivers/block/drbd/drbd_state.c 	    ns.peer_isp ? 'p' : '-',
ns                727 drivers/block/drbd/drbd_state.c 	    ns.user_isp ? 'u' : '-',
ns                728 drivers/block/drbd/drbd_state.c 	    ns.susp_fen ? 'F' : '-',
ns                729 drivers/block/drbd/drbd_state.c 	    ns.susp_nod ? 'N' : '-'
ns                734 drivers/block/drbd/drbd_state.c 	          union drbd_state ns, enum drbd_state_rv err)
ns                740 drivers/block/drbd/drbd_state.c 	print_st(device, "wanted", ns);
ns                743 drivers/block/drbd/drbd_state.c static long print_state_change(char *pb, union drbd_state os, union drbd_state ns,
ns                750 drivers/block/drbd/drbd_state.c 	if (ns.role != os.role && flags & CS_DC_ROLE)
ns                753 drivers/block/drbd/drbd_state.c 			       drbd_role_str(ns.role));
ns                754 drivers/block/drbd/drbd_state.c 	if (ns.peer != os.peer && flags & CS_DC_PEER)
ns                757 drivers/block/drbd/drbd_state.c 			       drbd_role_str(ns.peer));
ns                758 drivers/block/drbd/drbd_state.c 	if (ns.conn != os.conn && flags & CS_DC_CONN)
ns                761 drivers/block/drbd/drbd_state.c 			       drbd_conn_str(ns.conn));
ns                762 drivers/block/drbd/drbd_state.c 	if (ns.disk != os.disk && flags & CS_DC_DISK)
ns                765 drivers/block/drbd/drbd_state.c 			       drbd_disk_str(ns.disk));
ns                766 drivers/block/drbd/drbd_state.c 	if (ns.pdsk != os.pdsk && flags & CS_DC_PDSK)
ns                769 drivers/block/drbd/drbd_state.c 			       drbd_disk_str(ns.pdsk));
ns                774 drivers/block/drbd/drbd_state.c static void drbd_pr_state_change(struct drbd_device *device, union drbd_state os, union drbd_state ns,
ns                780 drivers/block/drbd/drbd_state.c 	pbp += print_state_change(pbp, os, ns, flags ^ CS_DC_MASK);
ns                782 drivers/block/drbd/drbd_state.c 	if (ns.aftr_isp != os.aftr_isp)
ns                785 drivers/block/drbd/drbd_state.c 			       ns.aftr_isp);
ns                786 drivers/block/drbd/drbd_state.c 	if (ns.peer_isp != os.peer_isp)
ns                789 drivers/block/drbd/drbd_state.c 			       ns.peer_isp);
ns                790 drivers/block/drbd/drbd_state.c 	if (ns.user_isp != os.user_isp)
ns                793 drivers/block/drbd/drbd_state.c 			       ns.user_isp);
ns                799 drivers/block/drbd/drbd_state.c static void conn_pr_state_change(struct drbd_connection *connection, union drbd_state os, union drbd_state ns,
ns                805 drivers/block/drbd/drbd_state.c 	pbp += print_state_change(pbp, os, ns, flags);
ns                807 drivers/block/drbd/drbd_state.c 	if (is_susp(ns) != is_susp(os) && flags & CS_DC_SUSP)
ns                810 drivers/block/drbd/drbd_state.c 			       is_susp(ns));
ns                823 drivers/block/drbd/drbd_state.c is_valid_state(struct drbd_device *device, union drbd_state ns)
ns                840 drivers/block/drbd/drbd_state.c 		if (!nc->two_primaries && ns.role == R_PRIMARY) {
ns                841 drivers/block/drbd/drbd_state.c 			if (ns.peer == R_PRIMARY)
ns                850 drivers/block/drbd/drbd_state.c 	else if (ns.role == R_SECONDARY && device->open_cnt)
ns                853 drivers/block/drbd/drbd_state.c 	else if (ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.disk < D_UP_TO_DATE)
ns                857 drivers/block/drbd/drbd_state.c 		 ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.pdsk >= D_UNKNOWN)
ns                860 drivers/block/drbd/drbd_state.c 	else if (ns.role == R_PRIMARY && ns.disk <= D_INCONSISTENT && ns.pdsk <= D_INCONSISTENT)
ns                863 drivers/block/drbd/drbd_state.c 	else if (ns.conn > C_CONNECTED && ns.disk < D_INCONSISTENT)
ns                866 drivers/block/drbd/drbd_state.c 	else if (ns.conn > C_CONNECTED && ns.pdsk < D_INCONSISTENT)
ns                869 drivers/block/drbd/drbd_state.c 	else if (ns.conn > C_CONNECTED && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE)
ns                872 drivers/block/drbd/drbd_state.c 	else if ((ns.conn == C_CONNECTED ||
ns                873 drivers/block/drbd/drbd_state.c 		  ns.conn == C_WF_BITMAP_S ||
ns                874 drivers/block/drbd/drbd_state.c 		  ns.conn == C_SYNC_SOURCE ||
ns                875 drivers/block/drbd/drbd_state.c 		  ns.conn == C_PAUSED_SYNC_S) &&
ns                876 drivers/block/drbd/drbd_state.c 		  ns.disk == D_OUTDATED)
ns                879 drivers/block/drbd/drbd_state.c 	else if ((ns.conn == C_VERIFY_S || ns.conn == C_VERIFY_T) &&
ns                883 drivers/block/drbd/drbd_state.c 	else if ((ns.conn == C_VERIFY_S || ns.conn == C_VERIFY_T) &&
ns                887 drivers/block/drbd/drbd_state.c 	else if (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE)
ns                890 drivers/block/drbd/drbd_state.c 	else if ((ns.conn == C_STARTING_SYNC_S || ns.conn == C_STARTING_SYNC_T) &&
ns                891 drivers/block/drbd/drbd_state.c                  ns.pdsk == D_UNKNOWN)
ns                894 drivers/block/drbd/drbd_state.c 	else if (ns.conn >= C_CONNECTED && ns.pdsk == D_UNKNOWN)
ns                912 drivers/block/drbd/drbd_state.c is_valid_soft_transition(union drbd_state os, union drbd_state ns, struct drbd_connection *connection)
ns                916 drivers/block/drbd/drbd_state.c 	if ((ns.conn == C_STARTING_SYNC_T || ns.conn == C_STARTING_SYNC_S) &&
ns                920 drivers/block/drbd/drbd_state.c 	if (ns.conn == C_DISCONNECTING && os.conn == C_STANDALONE)
ns                923 drivers/block/drbd/drbd_state.c 	if (ns.disk > D_ATTACHING && os.disk == D_DISKLESS)
ns                926 drivers/block/drbd/drbd_state.c 	if (ns.conn == C_WF_CONNECTION && os.conn < C_UNCONNECTED)
ns                929 drivers/block/drbd/drbd_state.c 	if (ns.disk == D_OUTDATED && os.disk < D_OUTDATED && os.disk != D_ATTACHING)
ns                932 drivers/block/drbd/drbd_state.c 	if (ns.conn == C_DISCONNECTING && os.conn == C_UNCONNECTED)
ns                938 drivers/block/drbd/drbd_state.c 	    !((ns.conn == C_WF_REPORT_PARAMS && os.conn == C_WF_CONNECTION) ||
ns                939 drivers/block/drbd/drbd_state.c 	      (ns.conn >= C_CONNECTED && os.conn == C_WF_REPORT_PARAMS)))
ns                945 drivers/block/drbd/drbd_state.c 	if (os.role != R_PRIMARY && ns.role == R_PRIMARY
ns                946 drivers/block/drbd/drbd_state.c 		&& ns.pdsk == D_UP_TO_DATE
ns                947 drivers/block/drbd/drbd_state.c 		&& ns.disk != D_UP_TO_DATE && ns.disk != D_DISKLESS
ns                948 drivers/block/drbd/drbd_state.c 		&& (ns.conn <= C_WF_SYNC_UUID || ns.conn != os.conn))
ns                951 drivers/block/drbd/drbd_state.c 	if ((ns.conn == C_VERIFY_S || ns.conn == C_VERIFY_T) && os.conn < C_CONNECTED)
ns                954 drivers/block/drbd/drbd_state.c 	if ((ns.conn == C_VERIFY_S || ns.conn == C_VERIFY_T) &&
ns                955 drivers/block/drbd/drbd_state.c 	    ns.conn != os.conn && os.conn > C_CONNECTED)
ns                958 drivers/block/drbd/drbd_state.c 	if ((ns.conn == C_STARTING_SYNC_S || ns.conn == C_STARTING_SYNC_T) &&
ns                962 drivers/block/drbd/drbd_state.c 	if ((ns.conn == C_SYNC_TARGET || ns.conn == C_SYNC_SOURCE)
ns                966 drivers/block/drbd/drbd_state.c 	if (ns.conn == C_DISCONNECTING && ns.pdsk == D_OUTDATED &&
ns               1014 drivers/block/drbd/drbd_state.c is_valid_transition(union drbd_state os, union drbd_state ns)
ns               1018 drivers/block/drbd/drbd_state.c 	rv = is_valid_conn_transition(os.conn, ns.conn);
ns               1021 drivers/block/drbd/drbd_state.c 	if (ns.disk == D_FAILED && os.disk == D_DISKLESS)
ns               1053 drivers/block/drbd/drbd_state.c 				       union drbd_state ns, enum sanitize_state_warnings *warn)
ns               1070 drivers/block/drbd/drbd_state.c 	if (ns.conn < C_CONNECTED) {
ns               1071 drivers/block/drbd/drbd_state.c 		ns.peer_isp = 0;
ns               1072 drivers/block/drbd/drbd_state.c 		ns.peer = R_UNKNOWN;
ns               1073 drivers/block/drbd/drbd_state.c 		if (ns.pdsk > D_UNKNOWN || ns.pdsk < D_INCONSISTENT)
ns               1074 drivers/block/drbd/drbd_state.c 			ns.pdsk = D_UNKNOWN;
ns               1078 drivers/block/drbd/drbd_state.c 	if (ns.conn == C_STANDALONE && ns.disk == D_DISKLESS && ns.role == R_SECONDARY)
ns               1079 drivers/block/drbd/drbd_state.c 		ns.aftr_isp = 0;
ns               1083 drivers/block/drbd/drbd_state.c 	if (ns.conn > C_CONNECTED && (ns.disk <= D_FAILED || ns.pdsk <= D_FAILED)) {
ns               1085 drivers/block/drbd/drbd_state.c 			*warn = ns.conn == C_VERIFY_S || ns.conn == C_VERIFY_T ?
ns               1087 drivers/block/drbd/drbd_state.c 		ns.conn = C_CONNECTED;
ns               1091 drivers/block/drbd/drbd_state.c 	if (ns.conn < C_CONNECTED && ns.disk == D_NEGOTIATING &&
ns               1094 drivers/block/drbd/drbd_state.c 			ns.disk = device->new_state_tmp.disk;
ns               1095 drivers/block/drbd/drbd_state.c 			ns.pdsk = device->new_state_tmp.pdsk;
ns               1099 drivers/block/drbd/drbd_state.c 			ns.disk = D_DISKLESS;
ns               1100 drivers/block/drbd/drbd_state.c 			ns.pdsk = D_UNKNOWN;
ns               1106 drivers/block/drbd/drbd_state.c 	if (ns.conn >= C_CONNECTED && ns.conn < C_AHEAD) {
ns               1107 drivers/block/drbd/drbd_state.c 		if (ns.disk == D_CONSISTENT || ns.disk == D_OUTDATED)
ns               1108 drivers/block/drbd/drbd_state.c 			ns.disk = D_UP_TO_DATE;
ns               1109 drivers/block/drbd/drbd_state.c 		if (ns.pdsk == D_CONSISTENT || ns.pdsk == D_OUTDATED)
ns               1110 drivers/block/drbd/drbd_state.c 			ns.pdsk = D_UP_TO_DATE;
ns               1118 drivers/block/drbd/drbd_state.c 	switch ((enum drbd_conns)ns.conn) {
ns               1176 drivers/block/drbd/drbd_state.c 	if (ns.disk > disk_max)
ns               1177 drivers/block/drbd/drbd_state.c 		ns.disk = disk_max;
ns               1179 drivers/block/drbd/drbd_state.c 	if (ns.disk < disk_min) {
ns               1182 drivers/block/drbd/drbd_state.c 		ns.disk = disk_min;
ns               1184 drivers/block/drbd/drbd_state.c 	if (ns.pdsk > pdsk_max)
ns               1185 drivers/block/drbd/drbd_state.c 		ns.pdsk = pdsk_max;
ns               1187 drivers/block/drbd/drbd_state.c 	if (ns.pdsk < pdsk_min) {
ns               1190 drivers/block/drbd/drbd_state.c 		ns.pdsk = pdsk_min;
ns               1194 drivers/block/drbd/drbd_state.c 	    (ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.pdsk > D_OUTDATED) &&
ns               1196 drivers/block/drbd/drbd_state.c 		ns.susp_fen = 1; /* Suspend IO while fence-peer handler runs (peer lost) */
ns               1199 drivers/block/drbd/drbd_state.c 	    (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) &&
ns               1201 drivers/block/drbd/drbd_state.c 		ns.susp_nod = 1; /* Suspend IO while no data available (no accessible data available) */
ns               1203 drivers/block/drbd/drbd_state.c 	if (ns.aftr_isp || ns.peer_isp || ns.user_isp) {
ns               1204 drivers/block/drbd/drbd_state.c 		if (ns.conn == C_SYNC_SOURCE)
ns               1205 drivers/block/drbd/drbd_state.c 			ns.conn = C_PAUSED_SYNC_S;
ns               1206 drivers/block/drbd/drbd_state.c 		if (ns.conn == C_SYNC_TARGET)
ns               1207 drivers/block/drbd/drbd_state.c 			ns.conn = C_PAUSED_SYNC_T;
ns               1209 drivers/block/drbd/drbd_state.c 		if (ns.conn == C_PAUSED_SYNC_S)
ns               1210 drivers/block/drbd/drbd_state.c 			ns.conn = C_SYNC_SOURCE;
ns               1211 drivers/block/drbd/drbd_state.c 		if (ns.conn == C_PAUSED_SYNC_T)
ns               1212 drivers/block/drbd/drbd_state.c 			ns.conn = C_SYNC_TARGET;
ns               1215 drivers/block/drbd/drbd_state.c 	return ns;
ns               1261 drivers/block/drbd/drbd_state.c _drbd_set_state(struct drbd_device *device, union drbd_state ns,
ns               1274 drivers/block/drbd/drbd_state.c 	ns = sanitize_state(device, os, ns, &ssw);
ns               1275 drivers/block/drbd/drbd_state.c 	if (ns.i == os.i)
ns               1278 drivers/block/drbd/drbd_state.c 	rv = is_valid_transition(os, ns);
ns               1286 drivers/block/drbd/drbd_state.c 		rv = is_valid_state(device, ns);
ns               1292 drivers/block/drbd/drbd_state.c 				rv = is_valid_soft_transition(os, ns, connection);
ns               1294 drivers/block/drbd/drbd_state.c 			rv = is_valid_soft_transition(os, ns, connection);
ns               1299 drivers/block/drbd/drbd_state.c 			print_st_err(device, os, ns, rv);
ns               1305 drivers/block/drbd/drbd_state.c 	drbd_pr_state_change(device, os, ns, flags);
ns               1311 drivers/block/drbd/drbd_state.c 		conn_pr_state_change(connection, os, ns,
ns               1318 drivers/block/drbd/drbd_state.c 	if ((os.disk != D_FAILED && ns.disk == D_FAILED) ||
ns               1319 drivers/block/drbd/drbd_state.c 	    (os.disk != D_DISKLESS && ns.disk == D_DISKLESS))
ns               1322 drivers/block/drbd/drbd_state.c 	if (!is_sync_state(os.conn) && is_sync_state(ns.conn))
ns               1332 drivers/block/drbd/drbd_state.c 	device->state.i = ns.i;
ns               1333 drivers/block/drbd/drbd_state.c 	device->resource->susp = ns.susp;
ns               1334 drivers/block/drbd/drbd_state.c 	device->resource->susp_nod = ns.susp_nod;
ns               1335 drivers/block/drbd/drbd_state.c 	device->resource->susp_fen = ns.susp_fen;
ns               1342 drivers/block/drbd/drbd_state.c 	    drbd_should_do_remote((union drbd_dev_state)ns.i))
ns               1345 drivers/block/drbd/drbd_state.c 	if (os.disk == D_ATTACHING && ns.disk >= D_NEGOTIATING)
ns               1349 drivers/block/drbd/drbd_state.c 	if (os.conn == C_WF_REPORT_PARAMS && ns.conn != C_WF_REPORT_PARAMS &&
ns               1362 drivers/block/drbd/drbd_state.c 	    ns.conn <= C_CONNECTED) {
ns               1371 drivers/block/drbd/drbd_state.c 	    (ns.conn == C_SYNC_TARGET  || ns.conn == C_SYNC_SOURCE)) {
ns               1375 drivers/block/drbd/drbd_state.c 		if (ns.conn == C_SYNC_TARGET)
ns               1380 drivers/block/drbd/drbd_state.c 	    (ns.conn == C_PAUSED_SYNC_T || ns.conn == C_PAUSED_SYNC_S)) {
ns               1386 drivers/block/drbd/drbd_state.c 	    (ns.conn == C_VERIFY_S || ns.conn == C_VERIFY_T)) {
ns               1390 drivers/block/drbd/drbd_state.c 		set_ov_position(device, ns.conn);
ns               1403 drivers/block/drbd/drbd_state.c 		if (ns.conn == C_VERIFY_S) {
ns               1433 drivers/block/drbd/drbd_state.c 		if (os.disk < D_CONSISTENT && ns.disk >= D_CONSISTENT)
ns               1440 drivers/block/drbd/drbd_state.c 	    os.peer == R_SECONDARY && ns.peer == R_PRIMARY)
ns               1444 drivers/block/drbd/drbd_state.c 	if (os.conn != C_DISCONNECTING && ns.conn == C_DISCONNECTING)
ns               1448 drivers/block/drbd/drbd_state.c 	if (os.conn != C_STANDALONE && ns.conn == C_STANDALONE)
ns               1453 drivers/block/drbd/drbd_state.c 	    ns.conn <= C_TEAR_DOWN && ns.conn >= C_TIMEOUT)
ns               1457 drivers/block/drbd/drbd_state.c 	if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED) {
ns               1466 drivers/block/drbd/drbd_state.c 	    ns.disk > D_NEGOTIATING)
ns               1472 drivers/block/drbd/drbd_state.c 		ascw->ns = ns;
ns               1493 drivers/block/drbd/drbd_state.c 	after_state_ch(device, ascw->os, ascw->ns, ascw->flags, ascw->state_change);
ns               1674 drivers/block/drbd/drbd_state.c static bool lost_contact_to_peer_data(enum drbd_disk_state os, enum drbd_disk_state ns)
ns               1677 drivers/block/drbd/drbd_state.c 	&&  (ns < D_INCONSISTENT || ns == D_UNKNOWN || ns == D_OUTDATED))
ns               1687 drivers/block/drbd/drbd_state.c 	&&  (ns == D_DISKLESS || ns == D_FAILED || ns == D_OUTDATED))
ns               1701 drivers/block/drbd/drbd_state.c 			   union drbd_state ns, enum chg_state_flags flags,
ns               1713 drivers/block/drbd/drbd_state.c 	sib.ns = ns;
ns               1716 drivers/block/drbd/drbd_state.c 	&&  (ns.disk == D_UP_TO_DATE && ns.pdsk == D_UP_TO_DATE)) {
ns               1726 drivers/block/drbd/drbd_state.c 	    (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE))
ns               1732 drivers/block/drbd/drbd_state.c 	if (ns.susp_nod) {
ns               1753 drivers/block/drbd/drbd_state.c 	if (ns.susp_fen) {
ns               1785 drivers/block/drbd/drbd_state.c 	    (ns.conn == C_SYNC_SOURCE || ns.conn == C_PAUSED_SYNC_S) &&
ns               1793 drivers/block/drbd/drbd_state.c 	    ns.pdsk > D_DISKLESS && ns.pdsk != D_UNKNOWN) {      /* attach on the peer */
ns               1802 drivers/block/drbd/drbd_state.c 		drbd_send_state(peer_device, ns);
ns               1807 drivers/block/drbd/drbd_state.c 	if (os.conn != C_WF_BITMAP_S && ns.conn == C_WF_BITMAP_S &&
ns               1814 drivers/block/drbd/drbd_state.c 	if (lost_contact_to_peer_data(os.pdsk, ns.pdsk)) {
ns               1816 drivers/block/drbd/drbd_state.c 			if ((ns.role == R_PRIMARY || ns.peer == R_PRIMARY) &&
ns               1817 drivers/block/drbd/drbd_state.c 			    device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) {
ns               1829 drivers/block/drbd/drbd_state.c 	if (ns.pdsk < D_INCONSISTENT && get_ldev(device)) {
ns               1830 drivers/block/drbd/drbd_state.c 		if (os.peer != R_PRIMARY && ns.peer == R_PRIMARY &&
ns               1831 drivers/block/drbd/drbd_state.c 		    device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) {
ns               1836 drivers/block/drbd/drbd_state.c 		if (os.peer == R_PRIMARY && ns.peer == R_SECONDARY)
ns               1848 drivers/block/drbd/drbd_state.c 	if (os.role == R_PRIMARY && ns.role == R_SECONDARY &&
ns               1858 drivers/block/drbd/drbd_state.c 	if (ns.conn >= C_CONNECTED &&
ns               1859 drivers/block/drbd/drbd_state.c 	    os.disk == D_ATTACHING && ns.disk == D_NEGOTIATING) {
ns               1862 drivers/block/drbd/drbd_state.c 		drbd_send_state(peer_device, ns);
ns               1866 drivers/block/drbd/drbd_state.c 	if (ns.conn >= C_CONNECTED &&
ns               1867 drivers/block/drbd/drbd_state.c 	     ((os.aftr_isp != ns.aftr_isp) ||
ns               1868 drivers/block/drbd/drbd_state.c 	      (os.user_isp != ns.user_isp)))
ns               1869 drivers/block/drbd/drbd_state.c 		drbd_send_state(peer_device, ns);
ns               1873 drivers/block/drbd/drbd_state.c 	    (ns.aftr_isp || ns.peer_isp || ns.user_isp))
ns               1878 drivers/block/drbd/drbd_state.c 	if (os.conn == C_WF_REPORT_PARAMS && ns.conn >= C_CONNECTED)
ns               1879 drivers/block/drbd/drbd_state.c 		drbd_send_state(peer_device, ns);
ns               1881 drivers/block/drbd/drbd_state.c 	if (os.conn != C_AHEAD && ns.conn == C_AHEAD)
ns               1882 drivers/block/drbd/drbd_state.c 		drbd_send_state(peer_device, ns);
ns               1885 drivers/block/drbd/drbd_state.c 	if ((os.conn != C_STARTING_SYNC_T && ns.conn == C_STARTING_SYNC_T) ||
ns               1886 drivers/block/drbd/drbd_state.c 	    (os.conn != C_STARTING_SYNC_S && ns.conn == C_STARTING_SYNC_S))
ns               1894 drivers/block/drbd/drbd_state.c 	if (os.disk != D_FAILED && ns.disk == D_FAILED) {
ns               1939 drivers/block/drbd/drbd_state.c 			if (ns.conn >= C_CONNECTED)
ns               1940 drivers/block/drbd/drbd_state.c 				drbd_send_state(peer_device, ns);
ns               1955 drivers/block/drbd/drbd_state.c 	if (os.disk != D_DISKLESS && ns.disk == D_DISKLESS) {
ns               1963 drivers/block/drbd/drbd_state.c 		if (ns.conn >= C_CONNECTED)
ns               1964 drivers/block/drbd/drbd_state.c 			drbd_send_state(peer_device, ns);
ns               1971 drivers/block/drbd/drbd_state.c 	if (os.disk == D_UP_TO_DATE && ns.disk == D_INCONSISTENT && ns.conn >= C_CONNECTED)
ns               1972 drivers/block/drbd/drbd_state.c 		drbd_send_state(peer_device, ns);
ns               1975 drivers/block/drbd/drbd_state.c 	if (ns.disk > D_NEGOTIATING && ns.pdsk > D_NEGOTIATING &&
ns               1977 drivers/block/drbd/drbd_state.c 		if (ns.conn == C_CONNECTED)
ns               1982 drivers/block/drbd/drbd_state.c 	if ((os.conn > C_CONNECTED && ns.conn <= C_CONNECTED) ||
ns               1983 drivers/block/drbd/drbd_state.c 	    (os.peer_isp && !ns.peer_isp) ||
ns               1984 drivers/block/drbd/drbd_state.c 	    (os.user_isp && !ns.user_isp))
ns               1989 drivers/block/drbd/drbd_state.c 	if (os.disk < D_UP_TO_DATE && os.conn >= C_SYNC_SOURCE && ns.conn == C_CONNECTED)
ns               1990 drivers/block/drbd/drbd_state.c 		drbd_send_state(peer_device, ns);
ns               1995 drivers/block/drbd/drbd_state.c 	if (os.conn == C_VERIFY_S && ns.conn == C_CONNECTED
ns               1997 drivers/block/drbd/drbd_state.c 		drbd_send_state(peer_device, ns);
ns               2011 drivers/block/drbd/drbd_state.c 	    (ns.conn == C_CONNECTED || ns.conn >= C_AHEAD) && get_ldev(device)) {
ns               2017 drivers/block/drbd/drbd_state.c 	if (ns.disk == D_DISKLESS &&
ns               2018 drivers/block/drbd/drbd_state.c 	    ns.conn == C_STANDALONE &&
ns               2019 drivers/block/drbd/drbd_state.c 	    ns.role == R_SECONDARY) {
ns               2020 drivers/block/drbd/drbd_state.c 		if (os.aftr_isp != ns.aftr_isp)
ns               2155 drivers/block/drbd/drbd_state.c 	union drbd_state ns, os;
ns               2163 drivers/block/drbd/drbd_state.c 		ns = sanitize_state(device, os, apply_mask_val(os, mask, val), NULL);
ns               2165 drivers/block/drbd/drbd_state.c 		if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED)
ns               2166 drivers/block/drbd/drbd_state.c 			ns.disk = os.disk;
ns               2168 drivers/block/drbd/drbd_state.c 		if (ns.i == os.i)
ns               2171 drivers/block/drbd/drbd_state.c 		rv = is_valid_transition(os, ns);
ns               2174 drivers/block/drbd/drbd_state.c 			rv = is_valid_state(device, ns);
ns               2177 drivers/block/drbd/drbd_state.c 					rv = is_valid_soft_transition(os, ns, connection);
ns               2179 drivers/block/drbd/drbd_state.c 				rv = is_valid_soft_transition(os, ns, connection);
ns               2184 drivers/block/drbd/drbd_state.c 				print_st_err(device, os, ns, rv);
ns               2197 drivers/block/drbd/drbd_state.c 	union drbd_state ns, os, ns_max = { };
ns               2224 drivers/block/drbd/drbd_state.c 		ns = apply_mask_val(os, mask, val);
ns               2225 drivers/block/drbd/drbd_state.c 		ns = sanitize_state(device, os, ns, NULL);
ns               2227 drivers/block/drbd/drbd_state.c 		if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED)
ns               2228 drivers/block/drbd/drbd_state.c 			ns.disk = os.disk;
ns               2230 drivers/block/drbd/drbd_state.c 		rv = _drbd_set_state(device, ns, flags, NULL);
ns               2232 drivers/block/drbd/drbd_state.c 		ns.i = device->state.i;
ns               2233 drivers/block/drbd/drbd_state.c 		ns_max.role = max_role(ns.role, ns_max.role);
ns               2234 drivers/block/drbd/drbd_state.c 		ns_max.peer = max_role(ns.peer, ns_max.peer);
ns               2235 drivers/block/drbd/drbd_state.c 		ns_max.conn = max_t(enum drbd_conns, ns.conn, ns_max.conn);
ns               2236 drivers/block/drbd/drbd_state.c 		ns_max.disk = max_t(enum drbd_disk_state, ns.disk, ns_max.disk);
ns               2237 drivers/block/drbd/drbd_state.c 		ns_max.pdsk = max_t(enum drbd_disk_state, ns.pdsk, ns_max.pdsk);
ns               2239 drivers/block/drbd/drbd_state.c 		ns_min.role = min_role(ns.role, ns_min.role);
ns               2240 drivers/block/drbd/drbd_state.c 		ns_min.peer = min_role(ns.peer, ns_min.peer);
ns               2241 drivers/block/drbd/drbd_state.c 		ns_min.conn = min_t(enum drbd_conns, ns.conn, ns_min.conn);
ns               2242 drivers/block/drbd/drbd_state.c 		ns_min.disk = min_t(enum drbd_disk_state, ns.disk, ns_min.disk);
ns               2243 drivers/block/drbd/drbd_state.c 		ns_min.pdsk = min_t(enum drbd_disk_state, ns.pdsk, ns_min.pdsk);
ns                858 drivers/block/drbd/drbd_worker.c 	union drbd_state os, ns;
ns                910 drivers/block/drbd/drbd_worker.c 	ns = os;
ns                911 drivers/block/drbd/drbd_worker.c 	ns.conn = C_CONNECTED;
ns                950 drivers/block/drbd/drbd_worker.c 			ns.disk = D_INCONSISTENT;
ns                951 drivers/block/drbd/drbd_worker.c 			ns.pdsk = D_UP_TO_DATE;
ns                953 drivers/block/drbd/drbd_worker.c 			ns.disk = D_UP_TO_DATE;
ns                954 drivers/block/drbd/drbd_worker.c 			ns.pdsk = D_INCONSISTENT;
ns                957 drivers/block/drbd/drbd_worker.c 		ns.disk = D_UP_TO_DATE;
ns                958 drivers/block/drbd/drbd_worker.c 		ns.pdsk = D_UP_TO_DATE;
ns                987 drivers/block/drbd/drbd_worker.c 	_drbd_set_state(device, ns, CS_VERBOSE, NULL);
ns               1736 drivers/block/drbd/drbd_worker.c 	union drbd_state ns;
ns               1802 drivers/block/drbd/drbd_worker.c 	ns = drbd_read_state(device);
ns               1804 drivers/block/drbd/drbd_worker.c 	ns.aftr_isp = !_drbd_may_sync_now(device);
ns               1806 drivers/block/drbd/drbd_worker.c 	ns.conn = side;
ns               1809 drivers/block/drbd/drbd_worker.c 		ns.disk = D_INCONSISTENT;
ns               1811 drivers/block/drbd/drbd_worker.c 		ns.pdsk = D_INCONSISTENT;
ns               1813 drivers/block/drbd/drbd_worker.c 	r = _drbd_set_state(device, ns, CS_VERBOSE, NULL);
ns               1814 drivers/block/drbd/drbd_worker.c 	ns = drbd_read_state(device);
ns               1816 drivers/block/drbd/drbd_worker.c 	if (ns.conn < C_CONNECTED)
ns               1853 drivers/block/drbd/drbd_worker.c 		     drbd_conn_str(ns.conn),
ns               1902 drivers/block/drbd/drbd_worker.c 		if (ns.conn == C_SYNC_TARGET)
ns                 18 drivers/clk/qcom/clk-rcg.c static u32 ns_to_src(struct src_sel *s, u32 ns)
ns                 20 drivers/clk/qcom/clk-rcg.c 	ns >>= s->src_sel_shift;
ns                 21 drivers/clk/qcom/clk-rcg.c 	ns &= SRC_SEL_MASK;
ns                 22 drivers/clk/qcom/clk-rcg.c 	return ns;
ns                 25 drivers/clk/qcom/clk-rcg.c static u32 src_to_ns(struct src_sel *s, u8 src, u32 ns)
ns                 31 drivers/clk/qcom/clk-rcg.c 	ns &= ~mask;
ns                 33 drivers/clk/qcom/clk-rcg.c 	ns |= src << s->src_sel_shift;
ns                 34 drivers/clk/qcom/clk-rcg.c 	return ns;
ns                 41 drivers/clk/qcom/clk-rcg.c 	u32 ns;
ns                 44 drivers/clk/qcom/clk-rcg.c 	ret = regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns);
ns                 47 drivers/clk/qcom/clk-rcg.c 	ns = ns_to_src(&rcg->s, ns);
ns                 49 drivers/clk/qcom/clk-rcg.c 		if (ns == rcg->s.parent_map[i].cfg)
ns                 68 drivers/clk/qcom/clk-rcg.c 	u32 ns, reg;
ns                 79 drivers/clk/qcom/clk-rcg.c 	ret = regmap_read(rcg->clkr.regmap, rcg->ns_reg[bank], &ns);
ns                 82 drivers/clk/qcom/clk-rcg.c 	ns = ns_to_src(s, ns);
ns                 85 drivers/clk/qcom/clk-rcg.c 		if (ns == s->parent_map[i].cfg)
ns                 97 drivers/clk/qcom/clk-rcg.c 	u32 ns;
ns                 99 drivers/clk/qcom/clk-rcg.c 	regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns);
ns                100 drivers/clk/qcom/clk-rcg.c 	ns = src_to_ns(&rcg->s, rcg->s.parent_map[index].cfg, ns);
ns                101 drivers/clk/qcom/clk-rcg.c 	regmap_write(rcg->clkr.regmap, rcg->ns_reg, ns);
ns                113 drivers/clk/qcom/clk-rcg.c static u32 ns_to_pre_div(struct pre_div *p, u32 ns)
ns                115 drivers/clk/qcom/clk-rcg.c 	ns >>= p->pre_div_shift;
ns                116 drivers/clk/qcom/clk-rcg.c 	ns &= BIT(p->pre_div_width) - 1;
ns                117 drivers/clk/qcom/clk-rcg.c 	return ns;
ns                120 drivers/clk/qcom/clk-rcg.c static u32 pre_div_to_ns(struct pre_div *p, u8 pre_div, u32 ns)
ns                126 drivers/clk/qcom/clk-rcg.c 	ns &= ~mask;
ns                128 drivers/clk/qcom/clk-rcg.c 	ns |= pre_div << p->pre_div_shift;
ns                129 drivers/clk/qcom/clk-rcg.c 	return ns;
ns                149 drivers/clk/qcom/clk-rcg.c static u32 ns_m_to_n(struct mn *mn, u32 ns, u32 m)
ns                151 drivers/clk/qcom/clk-rcg.c 	ns = ~ns >> mn->n_val_shift;
ns                152 drivers/clk/qcom/clk-rcg.c 	ns &= BIT(mn->width) - 1;
ns                153 drivers/clk/qcom/clk-rcg.c 	return ns + m;
ns                163 drivers/clk/qcom/clk-rcg.c static u32 mn_to_ns(struct mn *mn, u32 m, u32 n, u32 ns)
ns                169 drivers/clk/qcom/clk-rcg.c 	ns &= ~mask;
ns                176 drivers/clk/qcom/clk-rcg.c 		ns |= n;
ns                179 drivers/clk/qcom/clk-rcg.c 	return ns;
ns                200 drivers/clk/qcom/clk-rcg.c 	u32 ns, md, reg;
ns                220 drivers/clk/qcom/clk-rcg.c 	ret = regmap_read(rcg->clkr.regmap, ns_reg, &ns);
ns                228 drivers/clk/qcom/clk-rcg.c 		ns |= BIT(mn->mnctr_reset_bit);
ns                229 drivers/clk/qcom/clk-rcg.c 		ret = regmap_write(rcg->clkr.regmap, ns_reg, ns);
ns                240 drivers/clk/qcom/clk-rcg.c 		ns = mn_to_ns(mn, f->m, f->n, ns);
ns                241 drivers/clk/qcom/clk-rcg.c 		ret = regmap_write(rcg->clkr.regmap, ns_reg, ns);
ns                247 drivers/clk/qcom/clk-rcg.c 			ns = mn_to_reg(mn, f->m, f->n, ns);
ns                248 drivers/clk/qcom/clk-rcg.c 			ret = regmap_write(rcg->clkr.regmap, ns_reg, ns);
ns                259 drivers/clk/qcom/clk-rcg.c 		ns &= ~BIT(mn->mnctr_reset_bit);
ns                260 drivers/clk/qcom/clk-rcg.c 		ret = regmap_write(rcg->clkr.regmap, ns_reg, ns);
ns                267 drivers/clk/qcom/clk-rcg.c 		ns = pre_div_to_ns(p, f->pre_div - 1, ns);
ns                274 drivers/clk/qcom/clk-rcg.c 	ns = src_to_ns(s, s->parent_map[index].cfg, ns);
ns                275 drivers/clk/qcom/clk-rcg.c 	ret = regmap_write(rcg->clkr.regmap, ns_reg, ns);
ns                294 drivers/clk/qcom/clk-rcg.c 	u32 ns, md, reg;
ns                303 drivers/clk/qcom/clk-rcg.c 	regmap_read(rcg->clkr.regmap, rcg->ns_reg[bank], &ns);
ns                308 drivers/clk/qcom/clk-rcg.c 		f.n = ns_m_to_n(&rcg->mn[bank], ns, f.m);
ns                312 drivers/clk/qcom/clk-rcg.c 		f.pre_div = ns_to_pre_div(&rcg->p[bank], ns) + 1;
ns                345 drivers/clk/qcom/clk-rcg.c 	u32 pre_div, m = 0, n = 0, ns, md, mode = 0;
ns                348 drivers/clk/qcom/clk-rcg.c 	regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns);
ns                349 drivers/clk/qcom/clk-rcg.c 	pre_div = ns_to_pre_div(&rcg->p, ns);
ns                354 drivers/clk/qcom/clk-rcg.c 		n = ns_m_to_n(mn, ns, m);
ns                359 drivers/clk/qcom/clk-rcg.c 			mode = ns;
ns                370 drivers/clk/qcom/clk-rcg.c 	u32 m, n, pre_div, ns, md, mode, reg;
ns                379 drivers/clk/qcom/clk-rcg.c 	regmap_read(rcg->clkr.regmap, rcg->ns_reg[bank], &ns);
ns                386 drivers/clk/qcom/clk-rcg.c 		n = ns_m_to_n(mn, ns, m);
ns                389 drivers/clk/qcom/clk-rcg.c 			reg = ns;
ns                394 drivers/clk/qcom/clk-rcg.c 		pre_div = ns_to_pre_div(&rcg->p[bank], ns);
ns                476 drivers/clk/qcom/clk-rcg.c 	u32 ns, md, ctl;
ns                494 drivers/clk/qcom/clk-rcg.c 		regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns);
ns                501 drivers/clk/qcom/clk-rcg.c 			ns = mn_to_reg(mn, f->m, f->n, ns);
ns                503 drivers/clk/qcom/clk-rcg.c 		ns = mn_to_ns(mn, f->m, f->n, ns);
ns                505 drivers/clk/qcom/clk-rcg.c 		regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns);
ns                508 drivers/clk/qcom/clk-rcg.c 	ns = pre_div_to_ns(&rcg->p, f->pre_div - 1, ns);
ns                509 drivers/clk/qcom/clk-rcg.c 	regmap_write(rcg->clkr.regmap, rcg->ns_reg, ns);
ns                554 drivers/clk/qcom/clk-rcg.c 	u32 ns, src;
ns                557 drivers/clk/qcom/clk-rcg.c 	ret = regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns);
ns                561 drivers/clk/qcom/clk-rcg.c 	src = ns_to_src(&rcg->s, ns);
ns                562 drivers/clk/qcom/clk-rcg.c 	f.pre_div = ns_to_pre_div(&rcg->p, ns) + 1;
ns                625 drivers/clk/qcom/clk-rcg.c 	u32 ns, src;
ns                628 drivers/clk/qcom/clk-rcg.c 	ret = regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns);
ns                632 drivers/clk/qcom/clk-rcg.c 	src = ns_to_src(&rcg->s, ns);
ns                698 drivers/clk/qcom/clk-rcg.c 	u32 ns;
ns                704 drivers/clk/qcom/clk-rcg.c 	ret = regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns);
ns                708 drivers/clk/qcom/clk-rcg.c 	ns = ns_to_src(&rcg->s, ns);
ns                711 drivers/clk/qcom/clk-rcg.c 		if (ns == rcg->s.parent_map[i].cfg) {
ns                 65 drivers/clk/qcom/clk-spmi-pmic-div.c 	unsigned int ns = clkdiv->cxo_period_ns;
ns                 74 drivers/clk/qcom/clk-spmi-pmic-div.c 		ndelay((2 + 3 * div) * ns);
ns                 76 drivers/clk/qcom/clk-spmi-pmic-div.c 		ndelay(3 * div * ns);
ns                564 drivers/clk/st/clkgen-fsyn.c 	unsigned long ns;
ns                575 drivers/clk/st/clkgen-fsyn.c 	ns = (fs->nsdiv == 1) ? 1 : 3;
ns                577 drivers/clk/st/clkgen-fsyn.c 	res = (P20 * (32 + fs->mdiv) + 32 * fs->pe) * s * ns;
ns                122 drivers/cpufreq/sa1110-cpufreq.c static inline u_int ns_to_cycles(u_int ns, u_int khz)
ns                124 drivers/cpufreq/sa1110-cpufreq.c 	return (ns * khz + 999999) / 1000000;
ns                224 drivers/dma/ipu/ipu_idmac.c 	u32	ns:10;
ns                836 drivers/dma/pl330.c 	unsigned ns;
ns                844 drivers/dma/pl330.c 	unsigned ns = arg->ns;
ns                850 drivers/dma/pl330.c 	buf[0] |= (ns << 1);
ns                999 drivers/dma/pl330.c 	unsigned ns;
ns               1028 drivers/dma/pl330.c 	ns = desc->rqcfg.nonsecure ? 1 : 0;
ns               1031 drivers/dma/pl330.c 	if (_manager_ns(thrd) && !ns)
ns               1037 drivers/dma/pl330.c 	go.ns = ns;
ns                419 drivers/firmware/efi/test/efi_test.c 	unsigned long name_size, prev_name_size = 0, *ns = NULL;
ns                435 drivers/firmware/efi/test/efi_test.c 		ns = &name_size;
ns                471 drivers/firmware/efi/test/efi_test.c 	status = efi.get_next_variable(ns, name, vd);
ns                480 drivers/firmware/efi/test/efi_test.c 			if (ns && put_user(*ns,
ns                498 drivers/firmware/efi/test/efi_test.c 	if (ns) {
ns                499 drivers/firmware/efi/test/efi_test.c 		if (put_user(*ns, getnextvariablename.variable_name_size)) {
ns                412 drivers/fsi/fsi-core.c 	unsigned int len, na, ns;
ns                417 drivers/fsi/fsi-core.c 	ns = of_n_size_cells(np);
ns                419 drivers/fsi/fsi-core.c 	if (na != 1 || ns != 1)
ns                648 drivers/fsi/fsi-core.c 	unsigned int len, na, ns;
ns                652 drivers/fsi/fsi-core.c 	ns = of_n_size_cells(np);
ns                657 drivers/fsi/fsi-core.c 	if (na != 2 || ns != 0)
ns                395 drivers/gpu/drm/i915/display/dvo_ns2501.c 	struct ns2501_priv *ns = dvo->dev_priv;
ns                423 drivers/gpu/drm/i915/display/dvo_ns2501.c 	if (!ns->quiet) {
ns                440 drivers/gpu/drm/i915/display/dvo_ns2501.c 	struct ns2501_priv *ns = dvo->dev_priv;
ns                458 drivers/gpu/drm/i915/display/dvo_ns2501.c 	if (!ns->quiet) {
ns                476 drivers/gpu/drm/i915/display/dvo_ns2501.c 	struct ns2501_priv *ns;
ns                479 drivers/gpu/drm/i915/display/dvo_ns2501.c 	ns = kzalloc(sizeof(struct ns2501_priv), GFP_KERNEL);
ns                480 drivers/gpu/drm/i915/display/dvo_ns2501.c 	if (ns == NULL)
ns                484 drivers/gpu/drm/i915/display/dvo_ns2501.c 	dvo->dev_priv = ns;
ns                485 drivers/gpu/drm/i915/display/dvo_ns2501.c 	ns->quiet = true;
ns                504 drivers/gpu/drm/i915/display/dvo_ns2501.c 	ns->quiet = false;
ns                511 drivers/gpu/drm/i915/display/dvo_ns2501.c 	kfree(ns);
ns                554 drivers/gpu/drm/i915/display/dvo_ns2501.c 	struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
ns                611 drivers/gpu/drm/i915/display/dvo_ns2501.c 	ns->conf = conf;
ns                658 drivers/gpu/drm/i915/display/dvo_ns2501.c 	struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
ns                663 drivers/gpu/drm/i915/display/dvo_ns2501.c 		ns2501_writeb(dvo, NS2501_REGC0, ns->conf->sync | 0x08);
ns                665 drivers/gpu/drm/i915/display/dvo_ns2501.c 		ns2501_writeb(dvo, NS2501_REG41, ns->conf->syncb);
ns                671 drivers/gpu/drm/i915/display/dvo_ns2501.c 				ns->conf->conf | NS2501_8_BPAS);
ns                672 drivers/gpu/drm/i915/display/dvo_ns2501.c 		if (!(ns->conf->conf & NS2501_8_BPAS))
ns                673 drivers/gpu/drm/i915/display/dvo_ns2501.c 			ns2501_writeb(dvo, NS2501_REG8, ns->conf->conf);
ns                679 drivers/gpu/drm/i915/display/dvo_ns2501.c 		ns2501_writeb(dvo, NS2501_REGC0, ns->conf->sync);
ns                694 drivers/gpu/drm/i915/display/dvo_ns2501.c 	struct ns2501_priv *ns = dvo->dev_priv;
ns                696 drivers/gpu/drm/i915/display/dvo_ns2501.c 	if (ns) {
ns                697 drivers/gpu/drm/i915/display/dvo_ns2501.c 		kfree(ns);
ns               1728 drivers/gpu/drm/omapdrm/dss/dsi.c static inline unsigned int ns2ddr(struct dsi_data *dsi, unsigned int ns)
ns               1733 drivers/gpu/drm/omapdrm/dss/dsi.c 	return (ns * (ddr_clk / 1000 / 1000) + 999) / 1000;
ns                344 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c static inline unsigned int ns2bc(struct dw_mipi_dsi_rockchip *dsi, int ns)
ns                346 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c 	return DIV_ROUND_UP(ns * dsi->lane_mbps / 8, 1000);
ns                352 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c static inline unsigned int ns2ui(struct dw_mipi_dsi_rockchip *dsi, int ns)
ns                354 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c 	return DIV_ROUND_UP(ns * dsi->lane_mbps, 1000);
ns                732 drivers/gpu/drm/vc4/vc4_dsi.c dsi_hs_timing(u32 ui_ns, u32 ns, u32 ui)
ns                737 drivers/gpu/drm/vc4/vc4_dsi.c 	return roundup(ui + DIV_ROUND_UP(ns, ui_ns), 8);
ns                744 drivers/gpu/drm/vc4/vc4_dsi.c dsi_esc_timing(u32 ns)
ns                746 drivers/gpu/drm/vc4/vc4_dsi.c 	return DIV_ROUND_UP(ns, ESC_TIME_NS);
ns                171 drivers/i2c/busses/i2c-axxia.c static u32 ns_to_clk(u64 ns, u32 clk_mhz)
ns                173 drivers/i2c/busses/i2c-axxia.c 	return div_u64(ns * clk_mhz, 1000);
ns                352 drivers/i2c/busses/i2c-nomadik.c 	u32 ns;
ns                375 drivers/i2c/busses/i2c-nomadik.c 	ns = DIV_ROUND_UP_ULL(1000000000ULL, i2c_clk);
ns                379 drivers/i2c/busses/i2c-nomadik.c 		slsu = DIV_ROUND_UP(100, ns); /* Fast */
ns                382 drivers/i2c/busses/i2c-nomadik.c 		slsu = DIV_ROUND_UP(10, ns); /* High */
ns                386 drivers/i2c/busses/i2c-nomadik.c 		slsu = DIV_ROUND_UP(250, ns); /* Standard */
ns               1199 drivers/idle/intel_idle.c 	unsigned long long ns;
ns               1204 drivers/idle/intel_idle.c 	ns = irtl_ns_units[(irtl >> 10) & 0x7];
ns               1206 drivers/idle/intel_idle.c 	return div64_u64((irtl & 0x3FF) * ns, 1000);
ns               1054 drivers/iio/adc/at91-sama5d2_adc.c 	s64 ns = iio_get_time_ns(indio_dev);
ns               1072 drivers/iio/adc/at91-sama5d2_adc.c 	interval = div_s64((ns - st->dma_st.dma_ts), sample_count);
ns                125 drivers/iio/light/max44009.c 	s64 ns;
ns                127 drivers/iio/light/max44009.c 	ns = val * NSEC_PER_SEC + val2;
ns                129 drivers/iio/light/max44009.c 			ns,
ns               11726 drivers/infiniband/hw/hfi1/chip.c u32 ns_to_cclock(struct hfi1_devdata *dd, u32 ns)
ns               11731 drivers/infiniband/hw/hfi1/chip.c 		cclocks = (ns * 1000) / FPGA_CCLOCK_PS;
ns               11733 drivers/infiniband/hw/hfi1/chip.c 		cclocks = (ns * 1000) / ASIC_CCLOCK_PS;
ns               11734 drivers/infiniband/hw/hfi1/chip.c 	if (ns && !cclocks)	/* if ns nonzero, must be at least 1 */
ns               11745 drivers/infiniband/hw/hfi1/chip.c 	u32 ns;
ns               11748 drivers/infiniband/hw/hfi1/chip.c 		ns = (cclocks * FPGA_CCLOCK_PS) / 1000;
ns               11750 drivers/infiniband/hw/hfi1/chip.c 		ns = (cclocks * ASIC_CCLOCK_PS) / 1000;
ns               11751 drivers/infiniband/hw/hfi1/chip.c 	if (cclocks && !ns)
ns               11752 drivers/infiniband/hw/hfi1/chip.c 		ns = 1;
ns               11753 drivers/infiniband/hw/hfi1/chip.c 	return ns;
ns                799 drivers/infiniband/hw/hfi1/chip.h u32 ns_to_cclock(struct hfi1_devdata *dd, u32 ns);
ns               3237 drivers/infiniband/hw/mlx5/main.c static struct mlx5_ib_flow_prio *_get_prio(struct mlx5_flow_namespace *ns,
ns               3245 drivers/infiniband/hw/mlx5/main.c 	ft = mlx5_create_auto_grouped_flow_table(ns, priority,
ns               3262 drivers/infiniband/hw/mlx5/main.c 	struct mlx5_flow_namespace *ns = NULL;
ns               3305 drivers/infiniband/hw/mlx5/main.c 		ns = mlx5_get_flow_namespace(dev->mdev, fn_type);
ns               3310 drivers/infiniband/hw/mlx5/main.c 		ns = mlx5_get_flow_namespace(dev->mdev,
ns               3321 drivers/infiniband/hw/mlx5/main.c 		ns = mlx5_get_flow_namespace(dev->mdev, ft_type == MLX5_IB_FT_RX ?
ns               3331 drivers/infiniband/hw/mlx5/main.c 	if (!ns)
ns               3338 drivers/infiniband/hw/mlx5/main.c 		return _get_prio(ns, prio, priority, max_table_size, num_groups,
ns               3933 drivers/infiniband/hw/mlx5/main.c 	struct mlx5_flow_namespace *ns = NULL;
ns               3979 drivers/infiniband/hw/mlx5/main.c 	ns = mlx5_get_flow_namespace(dev->mdev, fs_matcher->ns_type);
ns               3980 drivers/infiniband/hw/mlx5/main.c 	if (!ns)
ns               3998 drivers/infiniband/hw/mlx5/main.c 	return _get_prio(ns, prio, priority, max_table_size,
ns               5180 drivers/infiniband/hw/mlx5/main.c 	struct mlx5_flow_namespace *ns = mlx5_get_flow_namespace(mdev,
ns               5185 drivers/infiniband/hw/mlx5/main.c 	if (!ns || !mlx5_lag_is_roce(mdev))
ns               5192 drivers/infiniband/hw/mlx5/main.c 	ft = mlx5_create_lag_demux_flow_table(ns, 0, 0);
ns                582 drivers/isdn/capi/capiutil.c 		size_t ns = 2 * cdb->size;
ns                585 drivers/isdn/capi/capiutil.c 		while ((ns - cdb->pos) <= n)
ns                586 drivers/isdn/capi/capiutil.c 			ns *= 2;
ns                587 drivers/isdn/capi/capiutil.c 		nb = kmalloc(ns, GFP_ATOMIC);
ns                597 drivers/isdn/capi/capiutil.c 		cdb->size = ns;
ns               1280 drivers/isdn/mISDN/layer2.c 	u_int		ns, nr;
ns               1285 drivers/isdn/mISDN/layer2.c 		ns = skb->data[i] >> 1;
ns               1289 drivers/isdn/mISDN/layer2.c 		ns = (skb->data[i] >> 1) & 0x7;
ns               1297 drivers/isdn/mISDN/layer2.c 		if (l2->vr == ns) {
ns                139 drivers/media/i2c/cx25840/cx25840-ir.c static inline u16 ns_to_clock_divider(unsigned int ns)
ns                142 drivers/media/i2c/cx25840/cx25840-ir.c 		DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000));
ns                193 drivers/media/i2c/cx25840/cx25840-ir.c static inline u16 ns_to_lpf_count(unsigned int ns)
ns                196 drivers/media/i2c/cx25840/cx25840-ir.c 		DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000));
ns                244 drivers/media/i2c/cx25840/cx25840-ir.c static u16 ns_to_pulse_width_count(u32 ns, u16 divider)
ns                254 drivers/media/i2c/cx25840/cx25840-ir.c 	n = ((u64) ns) * CX25840_IR_REFCLK_FREQ / 1000000; /* millicycles */
ns                292 drivers/media/i2c/cx25840/cx25840-ir.c static u64 ns_to_pulse_clocks(u32 ns)
ns                296 drivers/media/i2c/cx25840/cx25840-ir.c 	clocks = CX25840_IR_REFCLK_FREQ / 1000000 * (u64) ns; /* millicycles  */
ns                429 drivers/media/i2c/cx25840/cx25840-ir.c static u32 txclk_tx_s_max_pulse_width(struct i2c_client *c, u32 ns,
ns                434 drivers/media/i2c/cx25840/cx25840-ir.c 	if (ns > IR_MAX_DURATION)
ns                435 drivers/media/i2c/cx25840/cx25840-ir.c 		ns = IR_MAX_DURATION;
ns                436 drivers/media/i2c/cx25840/cx25840-ir.c 	pulse_clocks = ns_to_pulse_clocks(ns);
ns                442 drivers/media/i2c/cx25840/cx25840-ir.c static u32 rxclk_rx_s_max_pulse_width(struct i2c_client *c, u32 ns,
ns                447 drivers/media/i2c/cx25840/cx25840-ir.c 	if (ns > IR_MAX_DURATION)
ns                448 drivers/media/i2c/cx25840/cx25840-ir.c 		ns = IR_MAX_DURATION;
ns                449 drivers/media/i2c/cx25840/cx25840-ir.c 	pulse_clocks = ns_to_pulse_clocks(ns);
ns                171 drivers/media/i2c/mt9m032.c 	u32 ns;
ns                174 drivers/media/i2c/mt9m032.c 	ns = div_u64(1000000000ULL * effective_width, sensor->pix_clock);
ns                175 drivers/media/i2c/mt9m032.c 	dev_dbg(to_dev(sensor),	"MT9M032 line time: %u ns\n", ns);
ns                176 drivers/media/i2c/mt9m032.c 	return ns;
ns                178 drivers/media/pci/cx23885/cx23888-ir.c static inline u16 ns_to_clock_divider(unsigned int ns)
ns                181 drivers/media/pci/cx23885/cx23888-ir.c 		DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000));
ns                232 drivers/media/pci/cx23885/cx23888-ir.c static inline u16 ns_to_lpf_count(unsigned int ns)
ns                235 drivers/media/pci/cx23885/cx23888-ir.c 		DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000));
ns                305 drivers/media/pci/cx23885/cx23888-ir.c static u64 ns_to_pulse_clocks(u32 ns)
ns                309 drivers/media/pci/cx23885/cx23888-ir.c 	clocks = CX23888_IR_REFCLK_FREQ / 1000000 * (u64) ns; /* millicycles  */
ns                449 drivers/media/pci/cx23885/cx23888-ir.c static u32 txclk_tx_s_max_pulse_width(struct cx23885_dev *dev, u32 ns,
ns                454 drivers/media/pci/cx23885/cx23888-ir.c 	if (ns > IR_MAX_DURATION)
ns                455 drivers/media/pci/cx23885/cx23888-ir.c 		ns = IR_MAX_DURATION;
ns                456 drivers/media/pci/cx23885/cx23888-ir.c 	pulse_clocks = ns_to_pulse_clocks(ns);
ns                462 drivers/media/pci/cx23885/cx23888-ir.c static u32 rxclk_rx_s_max_pulse_width(struct cx23885_dev *dev, u32 ns,
ns                467 drivers/media/pci/cx23885/cx23888-ir.c 	if (ns > IR_MAX_DURATION)
ns                468 drivers/media/pci/cx23885/cx23888-ir.c 		ns = IR_MAX_DURATION;
ns                469 drivers/media/pci/cx23885/cx23888-ir.c 	pulse_clocks = ns_to_pulse_clocks(ns);
ns                549 drivers/media/pci/intel/ipu3/ipu3-cio2.c 	u64 ns = ktime_get_ns();
ns                574 drivers/media/pci/intel/ipu3/ipu3-cio2.c 			b->vbb.vb2_buf.timestamp = ns;
ns                 72 drivers/media/rc/ir-rx51.c 		u64 ns;
ns                 84 drivers/media/rc/ir-rx51.c 		ns = US_TO_NS(ir_rx51->wbuf[ir_rx51->wbuf_index]);
ns                 85 drivers/media/rc/ir-rx51.c 		hrtimer_add_expires_ns(timer, ns);
ns                846 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	v4l2_std_id ns;
ns                847 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	ns = hdw->std_mask_avail;
ns                848 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	ns = (ns & ~m) | (v & m);
ns                849 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	if (ns == hdw->std_mask_avail) return 0;
ns                850 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	hdw->std_mask_avail = ns;
ns                885 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	v4l2_std_id ns;
ns                886 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	ns = hdw->std_mask_cur;
ns                887 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	ns = (ns & ~m) | (v & m);
ns                888 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	if (ns == hdw->std_mask_cur) return 0;
ns                889 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	hdw->std_mask_cur = ns;
ns               1243 drivers/media/usb/uvc/uvc_video.c 	    length + sizeof(meta->ns) + sizeof(meta->sof)) {
ns               1273 drivers/media/usb/uvc/uvc_video.c 	put_unaligned(ktime_to_ns(time), &meta->ns);
ns               1280 drivers/media/usb/uvc/uvc_video.c 	meta_buf->bytesused += length + sizeof(meta->ns) + sizeof(meta->sof);
ns                151 drivers/memory/jz4780-nemc.c static uint32_t jz4780_nemc_ns_to_cycles(struct jz4780_nemc *nemc, uint32_t ns)
ns                153 drivers/memory/jz4780-nemc.c 	return ((ns * 1000) + nemc->clk_period - 1) / nemc->clk_period;
ns                511 drivers/mmc/core/mmc_test.c 	uint64_t ns;
ns                513 drivers/mmc/core/mmc_test.c 	ns = timespec64_to_ns(ts);
ns                516 drivers/mmc/core/mmc_test.c 	while (ns > UINT_MAX) {
ns                518 drivers/mmc/core/mmc_test.c 		ns >>= 1;
ns                521 drivers/mmc/core/mmc_test.c 	if (!ns)
ns                524 drivers/mmc/core/mmc_test.c 	do_div(bytes, (uint32_t)ns);
ns                716 drivers/mmc/host/atmel-mci.c 					unsigned int ns)
ns                722 drivers/mmc/host/atmel-mci.c 	unsigned int us = DIV_ROUND_UP(ns, 1000);
ns                236 drivers/mmc/host/cavium.c static void set_wdog(struct cvm_mmc_slot *slot, unsigned int ns)
ns                243 drivers/mmc/host/cavium.c 	if (ns)
ns                244 drivers/mmc/host/cavium.c 		timeout = (slot->clock * ns) / NSEC_PER_SEC;
ns                703 drivers/mmc/host/mtk-sd.c static void msdc_set_timeout(struct msdc_host *host, u32 ns, u32 clks)
ns                708 drivers/mmc/host/mtk-sd.c 	host->timeout_ns = ns;
ns                714 drivers/mmc/host/mtk-sd.c 		timeout = (ns + clk_ns - 1) / clk_ns + clks;
ns                328 drivers/mmc/host/mxs-mmc.c static unsigned short mxs_ns_to_ssp_ticks(unsigned clock_rate, unsigned ns)
ns                336 drivers/mmc/host/mxs-mmc.c 	const unsigned int ms = ns / 1000;
ns                 38 drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c static inline u8 bcm47xxnflash_ops_bcm4706_ns_to_cycle(u16 ns, u16 clock)
ns                 40 drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c 	return ((ns * 1000 * clock) / 1000000) + 1;
ns                483 drivers/mtd/nand/raw/marvell_nand.c static void cond_delay(unsigned int ns)
ns                485 drivers/mtd/nand/raw/marvell_nand.c 	if (!ns)
ns                488 drivers/mtd/nand/raw/marvell_nand.c 	if (ns < 10000)
ns                489 drivers/mtd/nand/raw/marvell_nand.c 		ndelay(ns);
ns                491 drivers/mtd/nand/raw/marvell_nand.c 		udelay(DIV_ROUND_UP(ns, 1000));
ns                190 drivers/mtd/nand/raw/nandsim.c #define NS_IS_INITIALIZED(ns) ((ns)->geom.totsz != 0)
ns                193 drivers/mtd/nand/raw/nandsim.c #define NS_STATUS_OK(ns) (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0)))
ns                196 drivers/mtd/nand/raw/nandsim.c #define NS_STATUS_FAILED(ns) (NAND_STATUS_FAIL | NS_STATUS_OK(ns))
ns                199 drivers/mtd/nand/raw/nandsim.c #define NS_RAW_OFFSET(ns) \
ns                200 drivers/mtd/nand/raw/nandsim.c 	(((ns)->regs.row * (ns)->geom.pgszoob) + (ns)->regs.column)
ns                203 drivers/mtd/nand/raw/nandsim.c #define NS_RAW_OFFSET_OOB(ns) (NS_RAW_OFFSET(ns) + ns->geom.pgsz)
ns                527 drivers/mtd/nand/raw/nandsim.c static int __init alloc_device(struct nandsim *ns)
ns                546 drivers/mtd/nand/raw/nandsim.c 		ns->pages_written =
ns                548 drivers/mtd/nand/raw/nandsim.c 					   BITS_TO_LONGS(ns->geom.pgnum)));
ns                549 drivers/mtd/nand/raw/nandsim.c 		if (!ns->pages_written) {
ns                554 drivers/mtd/nand/raw/nandsim.c 		ns->file_buf = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
ns                555 drivers/mtd/nand/raw/nandsim.c 		if (!ns->file_buf) {
ns                560 drivers/mtd/nand/raw/nandsim.c 		ns->cfile = cfile;
ns                564 drivers/mtd/nand/raw/nandsim.c 	ns->pages = vmalloc(array_size(sizeof(union ns_mem), ns->geom.pgnum));
ns                565 drivers/mtd/nand/raw/nandsim.c 	if (!ns->pages) {
ns                569 drivers/mtd/nand/raw/nandsim.c 	for (i = 0; i < ns->geom.pgnum; i++) {
ns                570 drivers/mtd/nand/raw/nandsim.c 		ns->pages[i].byte = NULL;
ns                572 drivers/mtd/nand/raw/nandsim.c 	ns->nand_pages_slab = kmem_cache_create("nandsim",
ns                573 drivers/mtd/nand/raw/nandsim.c 						ns->geom.pgszoob, 0, 0, NULL);
ns                574 drivers/mtd/nand/raw/nandsim.c 	if (!ns->nand_pages_slab) {
ns                582 drivers/mtd/nand/raw/nandsim.c 	vfree(ns->pages_written);
ns                591 drivers/mtd/nand/raw/nandsim.c static void free_device(struct nandsim *ns)
ns                595 drivers/mtd/nand/raw/nandsim.c 	if (ns->cfile) {
ns                596 drivers/mtd/nand/raw/nandsim.c 		kfree(ns->file_buf);
ns                597 drivers/mtd/nand/raw/nandsim.c 		vfree(ns->pages_written);
ns                598 drivers/mtd/nand/raw/nandsim.c 		filp_close(ns->cfile, NULL);
ns                602 drivers/mtd/nand/raw/nandsim.c 	if (ns->pages) {
ns                603 drivers/mtd/nand/raw/nandsim.c 		for (i = 0; i < ns->geom.pgnum; i++) {
ns                604 drivers/mtd/nand/raw/nandsim.c 			if (ns->pages[i].byte)
ns                605 drivers/mtd/nand/raw/nandsim.c 				kmem_cache_free(ns->nand_pages_slab,
ns                606 drivers/mtd/nand/raw/nandsim.c 						ns->pages[i].byte);
ns                608 drivers/mtd/nand/raw/nandsim.c 		kmem_cache_destroy(ns->nand_pages_slab);
ns                609 drivers/mtd/nand/raw/nandsim.c 		vfree(ns->pages);
ns                626 drivers/mtd/nand/raw/nandsim.c 	struct nandsim   *ns   = nand_get_controller_data(chip);
ns                631 drivers/mtd/nand/raw/nandsim.c 	if (NS_IS_INITIALIZED(ns)) {
ns                637 drivers/mtd/nand/raw/nandsim.c 	ns->busw = chip->options & NAND_BUSWIDTH_16 ? 16 : 8;
ns                638 drivers/mtd/nand/raw/nandsim.c 	ns->geom.totsz    = mtd->size;
ns                639 drivers/mtd/nand/raw/nandsim.c 	ns->geom.pgsz     = mtd->writesize;
ns                640 drivers/mtd/nand/raw/nandsim.c 	ns->geom.oobsz    = mtd->oobsize;
ns                641 drivers/mtd/nand/raw/nandsim.c 	ns->geom.secsz    = mtd->erasesize;
ns                642 drivers/mtd/nand/raw/nandsim.c 	ns->geom.pgszoob  = ns->geom.pgsz + ns->geom.oobsz;
ns                643 drivers/mtd/nand/raw/nandsim.c 	ns->geom.pgnum    = div_u64(ns->geom.totsz, ns->geom.pgsz);
ns                644 drivers/mtd/nand/raw/nandsim.c 	ns->geom.totszoob = ns->geom.totsz + (uint64_t)ns->geom.pgnum * ns->geom.oobsz;
ns                645 drivers/mtd/nand/raw/nandsim.c 	ns->geom.secshift = ffs(ns->geom.secsz) - 1;
ns                646 drivers/mtd/nand/raw/nandsim.c 	ns->geom.pgshift  = chip->page_shift;
ns                647 drivers/mtd/nand/raw/nandsim.c 	ns->geom.pgsec    = ns->geom.secsz / ns->geom.pgsz;
ns                648 drivers/mtd/nand/raw/nandsim.c 	ns->geom.secszoob = ns->geom.secsz + ns->geom.oobsz * ns->geom.pgsec;
ns                649 drivers/mtd/nand/raw/nandsim.c 	ns->options = 0;
ns                651 drivers/mtd/nand/raw/nandsim.c 	if (ns->geom.pgsz == 512) {
ns                652 drivers/mtd/nand/raw/nandsim.c 		ns->options |= OPT_PAGE512;
ns                653 drivers/mtd/nand/raw/nandsim.c 		if (ns->busw == 8)
ns                654 drivers/mtd/nand/raw/nandsim.c 			ns->options |= OPT_PAGE512_8BIT;
ns                655 drivers/mtd/nand/raw/nandsim.c 	} else if (ns->geom.pgsz == 2048) {
ns                656 drivers/mtd/nand/raw/nandsim.c 		ns->options |= OPT_PAGE2048;
ns                657 drivers/mtd/nand/raw/nandsim.c 	} else if (ns->geom.pgsz == 4096) {
ns                658 drivers/mtd/nand/raw/nandsim.c 		ns->options |= OPT_PAGE4096;
ns                660 drivers/mtd/nand/raw/nandsim.c 		NS_ERR("init_nandsim: unknown page size %u\n", ns->geom.pgsz);
ns                664 drivers/mtd/nand/raw/nandsim.c 	if (ns->options & OPT_SMALLPAGE) {
ns                665 drivers/mtd/nand/raw/nandsim.c 		if (ns->geom.totsz <= (32 << 20)) {
ns                666 drivers/mtd/nand/raw/nandsim.c 			ns->geom.pgaddrbytes  = 3;
ns                667 drivers/mtd/nand/raw/nandsim.c 			ns->geom.secaddrbytes = 2;
ns                669 drivers/mtd/nand/raw/nandsim.c 			ns->geom.pgaddrbytes  = 4;
ns                670 drivers/mtd/nand/raw/nandsim.c 			ns->geom.secaddrbytes = 3;
ns                673 drivers/mtd/nand/raw/nandsim.c 		if (ns->geom.totsz <= (128 << 20)) {
ns                674 drivers/mtd/nand/raw/nandsim.c 			ns->geom.pgaddrbytes  = 4;
ns                675 drivers/mtd/nand/raw/nandsim.c 			ns->geom.secaddrbytes = 2;
ns                677 drivers/mtd/nand/raw/nandsim.c 			ns->geom.pgaddrbytes  = 5;
ns                678 drivers/mtd/nand/raw/nandsim.c 			ns->geom.secaddrbytes = 3;
ns                683 drivers/mtd/nand/raw/nandsim.c 	if (parts_num > ARRAY_SIZE(ns->partitions)) {
ns                687 drivers/mtd/nand/raw/nandsim.c 	remains = ns->geom.totsz;
ns                690 drivers/mtd/nand/raw/nandsim.c 		uint64_t part_sz = (uint64_t)parts[i] * ns->geom.secsz;
ns                696 drivers/mtd/nand/raw/nandsim.c 		ns->partitions[i].name   = get_partition_name(i);
ns                697 drivers/mtd/nand/raw/nandsim.c 		if (!ns->partitions[i].name) {
ns                701 drivers/mtd/nand/raw/nandsim.c 		ns->partitions[i].offset = next_offset;
ns                702 drivers/mtd/nand/raw/nandsim.c 		ns->partitions[i].size   = part_sz;
ns                703 drivers/mtd/nand/raw/nandsim.c 		next_offset += ns->partitions[i].size;
ns                704 drivers/mtd/nand/raw/nandsim.c 		remains -= ns->partitions[i].size;
ns                706 drivers/mtd/nand/raw/nandsim.c 	ns->nbparts = parts_num;
ns                708 drivers/mtd/nand/raw/nandsim.c 		if (parts_num + 1 > ARRAY_SIZE(ns->partitions)) {
ns                712 drivers/mtd/nand/raw/nandsim.c 		ns->partitions[i].name   = get_partition_name(i);
ns                713 drivers/mtd/nand/raw/nandsim.c 		if (!ns->partitions[i].name) {
ns                717 drivers/mtd/nand/raw/nandsim.c 		ns->partitions[i].offset = next_offset;
ns                718 drivers/mtd/nand/raw/nandsim.c 		ns->partitions[i].size   = remains;
ns                719 drivers/mtd/nand/raw/nandsim.c 		ns->nbparts += 1;
ns                722 drivers/mtd/nand/raw/nandsim.c 	if (ns->busw == 16)
ns                726 drivers/mtd/nand/raw/nandsim.c 			(unsigned long long)ns->geom.totsz >> 20);
ns                727 drivers/mtd/nand/raw/nandsim.c 	printk("page size: %u bytes\n",         ns->geom.pgsz);
ns                728 drivers/mtd/nand/raw/nandsim.c 	printk("OOB area size: %u bytes\n",     ns->geom.oobsz);
ns                729 drivers/mtd/nand/raw/nandsim.c 	printk("sector size: %u KiB\n",         ns->geom.secsz >> 10);
ns                730 drivers/mtd/nand/raw/nandsim.c 	printk("pages number: %u\n",            ns->geom.pgnum);
ns                731 drivers/mtd/nand/raw/nandsim.c 	printk("pages per sector: %u\n",        ns->geom.pgsec);
ns                732 drivers/mtd/nand/raw/nandsim.c 	printk("bus width: %u\n",               ns->busw);
ns                733 drivers/mtd/nand/raw/nandsim.c 	printk("bits in sector size: %u\n",     ns->geom.secshift);
ns                734 drivers/mtd/nand/raw/nandsim.c 	printk("bits in page size: %u\n",       ns->geom.pgshift);
ns                735 drivers/mtd/nand/raw/nandsim.c 	printk("bits in OOB size: %u\n",	ffs(ns->geom.oobsz) - 1);
ns                737 drivers/mtd/nand/raw/nandsim.c 			(unsigned long long)ns->geom.totszoob >> 10);
ns                738 drivers/mtd/nand/raw/nandsim.c 	printk("page address bytes: %u\n",      ns->geom.pgaddrbytes);
ns                739 drivers/mtd/nand/raw/nandsim.c 	printk("sector address bytes: %u\n",    ns->geom.secaddrbytes);
ns                740 drivers/mtd/nand/raw/nandsim.c 	printk("options: %#x\n",                ns->options);
ns                742 drivers/mtd/nand/raw/nandsim.c 	if ((ret = alloc_device(ns)) != 0)
ns                746 drivers/mtd/nand/raw/nandsim.c 	ns->buf.byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
ns                747 drivers/mtd/nand/raw/nandsim.c 	if (!ns->buf.byte) {
ns                749 drivers/mtd/nand/raw/nandsim.c 			ns->geom.pgszoob);
ns                752 drivers/mtd/nand/raw/nandsim.c 	memset(ns->buf.byte, 0xFF, ns->geom.pgszoob);
ns                760 drivers/mtd/nand/raw/nandsim.c static void free_nandsim(struct nandsim *ns)
ns                762 drivers/mtd/nand/raw/nandsim.c 	kfree(ns->buf.byte);
ns                763 drivers/mtd/nand/raw/nandsim.c 	free_device(ns);
ns                768 drivers/mtd/nand/raw/nandsim.c static int parse_badblocks(struct nandsim *ns, struct mtd_info *mtd)
ns                785 drivers/mtd/nand/raw/nandsim.c 		offset = (loff_t)erase_block_no * ns->geom.secsz;
ns               1129 drivers/mtd/nand/raw/nandsim.c static inline void accept_addr_byte(struct nandsim *ns, u_char bt)
ns               1133 drivers/mtd/nand/raw/nandsim.c 	if (ns->regs.count < (ns->geom.pgaddrbytes - ns->geom.secaddrbytes))
ns               1134 drivers/mtd/nand/raw/nandsim.c 		ns->regs.column |= (byte << 8 * ns->regs.count);
ns               1136 drivers/mtd/nand/raw/nandsim.c 		ns->regs.row |= (byte << 8 * (ns->regs.count -
ns               1137 drivers/mtd/nand/raw/nandsim.c 						ns->geom.pgaddrbytes +
ns               1138 drivers/mtd/nand/raw/nandsim.c 						ns->geom.secaddrbytes));
ns               1147 drivers/mtd/nand/raw/nandsim.c static inline void switch_to_ready_state(struct nandsim *ns, u_char status)
ns               1151 drivers/mtd/nand/raw/nandsim.c 	ns->state       = STATE_READY;
ns               1152 drivers/mtd/nand/raw/nandsim.c 	ns->nxstate     = STATE_UNKNOWN;
ns               1153 drivers/mtd/nand/raw/nandsim.c 	ns->op          = NULL;
ns               1154 drivers/mtd/nand/raw/nandsim.c 	ns->npstates    = 0;
ns               1155 drivers/mtd/nand/raw/nandsim.c 	ns->stateidx    = 0;
ns               1156 drivers/mtd/nand/raw/nandsim.c 	ns->regs.num    = 0;
ns               1157 drivers/mtd/nand/raw/nandsim.c 	ns->regs.count  = 0;
ns               1158 drivers/mtd/nand/raw/nandsim.c 	ns->regs.off    = 0;
ns               1159 drivers/mtd/nand/raw/nandsim.c 	ns->regs.row    = 0;
ns               1160 drivers/mtd/nand/raw/nandsim.c 	ns->regs.column = 0;
ns               1161 drivers/mtd/nand/raw/nandsim.c 	ns->regs.status = status;
ns               1206 drivers/mtd/nand/raw/nandsim.c static int find_operation(struct nandsim *ns, uint32_t flag)
ns               1215 drivers/mtd/nand/raw/nandsim.c 		if (!(ns->options & ops[i].reqopts))
ns               1220 drivers/mtd/nand/raw/nandsim.c 			if (!(ops[i].states[ns->npstates] & STATE_ADDR_MASK))
ns               1223 drivers/mtd/nand/raw/nandsim.c 			if (NS_STATE(ns->state) != NS_STATE(ops[i].states[ns->npstates]))
ns               1227 drivers/mtd/nand/raw/nandsim.c 		for (j = 0; j < ns->npstates; j++)
ns               1228 drivers/mtd/nand/raw/nandsim.c 			if (NS_STATE(ops[i].states[j]) != NS_STATE(ns->pstates[j])
ns               1229 drivers/mtd/nand/raw/nandsim.c 				&& (ns->options & ops[idx].reqopts)) {
ns               1242 drivers/mtd/nand/raw/nandsim.c 		ns->op = &ops[idx].states[0];
ns               1251 drivers/mtd/nand/raw/nandsim.c 			ns->stateidx = ns->npstates - 1;
ns               1253 drivers/mtd/nand/raw/nandsim.c 			ns->stateidx = ns->npstates;
ns               1255 drivers/mtd/nand/raw/nandsim.c 		ns->npstates = 0;
ns               1256 drivers/mtd/nand/raw/nandsim.c 		ns->state = ns->op[ns->stateidx];
ns               1257 drivers/mtd/nand/raw/nandsim.c 		ns->nxstate = ns->op[ns->stateidx + 1];
ns               1259 drivers/mtd/nand/raw/nandsim.c 				idx, get_state_name(ns->state), get_state_name(ns->nxstate));
ns               1265 drivers/mtd/nand/raw/nandsim.c 		if (ns->npstates != 0) {
ns               1267 drivers/mtd/nand/raw/nandsim.c 					get_state_name(ns->state));
ns               1268 drivers/mtd/nand/raw/nandsim.c 			ns->npstates = 0;
ns               1269 drivers/mtd/nand/raw/nandsim.c 			return find_operation(ns, 0);
ns               1273 drivers/mtd/nand/raw/nandsim.c 		switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               1285 drivers/mtd/nand/raw/nandsim.c 	ns->pstates[ns->npstates++] = ns->state;
ns               1290 drivers/mtd/nand/raw/nandsim.c static void put_pages(struct nandsim *ns)
ns               1294 drivers/mtd/nand/raw/nandsim.c 	for (i = 0; i < ns->held_cnt; i++)
ns               1295 drivers/mtd/nand/raw/nandsim.c 		put_page(ns->held_pages[i]);
ns               1299 drivers/mtd/nand/raw/nandsim.c static int get_pages(struct nandsim *ns, struct file *file, size_t count, loff_t pos)
ns               1309 drivers/mtd/nand/raw/nandsim.c 	ns->held_cnt = 0;
ns               1319 drivers/mtd/nand/raw/nandsim.c 				put_pages(ns);
ns               1324 drivers/mtd/nand/raw/nandsim.c 		ns->held_pages[ns->held_cnt++] = page;
ns               1329 drivers/mtd/nand/raw/nandsim.c static ssize_t read_file(struct nandsim *ns, struct file *file, void *buf, size_t count, loff_t pos)
ns               1335 drivers/mtd/nand/raw/nandsim.c 	err = get_pages(ns, file, count, pos);
ns               1341 drivers/mtd/nand/raw/nandsim.c 	put_pages(ns);
ns               1345 drivers/mtd/nand/raw/nandsim.c static ssize_t write_file(struct nandsim *ns, struct file *file, void *buf, size_t count, loff_t pos)
ns               1351 drivers/mtd/nand/raw/nandsim.c 	err = get_pages(ns, file, count, pos);
ns               1357 drivers/mtd/nand/raw/nandsim.c 	put_pages(ns);
ns               1364 drivers/mtd/nand/raw/nandsim.c static inline union ns_mem *NS_GET_PAGE(struct nandsim *ns)
ns               1366 drivers/mtd/nand/raw/nandsim.c 	return &(ns->pages[ns->regs.row]);
ns               1372 drivers/mtd/nand/raw/nandsim.c static inline u_char *NS_PAGE_BYTE_OFF(struct nandsim *ns)
ns               1374 drivers/mtd/nand/raw/nandsim.c 	return NS_GET_PAGE(ns)->byte + ns->regs.column + ns->regs.off;
ns               1377 drivers/mtd/nand/raw/nandsim.c static int do_read_error(struct nandsim *ns, int num)
ns               1379 drivers/mtd/nand/raw/nandsim.c 	unsigned int page_no = ns->regs.row;
ns               1382 drivers/mtd/nand/raw/nandsim.c 		prandom_bytes(ns->buf.byte, num);
ns               1389 drivers/mtd/nand/raw/nandsim.c static void do_bit_flips(struct nandsim *ns, int num)
ns               1397 drivers/mtd/nand/raw/nandsim.c 			ns->buf.byte[pos / 8] ^= (1 << (pos % 8));
ns               1400 drivers/mtd/nand/raw/nandsim.c 				pos, ns->regs.row, ns->regs.column + ns->regs.off,
ns               1409 drivers/mtd/nand/raw/nandsim.c static void read_page(struct nandsim *ns, int num)
ns               1413 drivers/mtd/nand/raw/nandsim.c 	if (ns->cfile) {
ns               1414 drivers/mtd/nand/raw/nandsim.c 		if (!test_bit(ns->regs.row, ns->pages_written)) {
ns               1415 drivers/mtd/nand/raw/nandsim.c 			NS_DBG("read_page: page %d not written\n", ns->regs.row);
ns               1416 drivers/mtd/nand/raw/nandsim.c 			memset(ns->buf.byte, 0xFF, num);
ns               1422 drivers/mtd/nand/raw/nandsim.c 				ns->regs.row, ns->regs.column + ns->regs.off);
ns               1423 drivers/mtd/nand/raw/nandsim.c 			if (do_read_error(ns, num))
ns               1425 drivers/mtd/nand/raw/nandsim.c 			pos = (loff_t)NS_RAW_OFFSET(ns) + ns->regs.off;
ns               1426 drivers/mtd/nand/raw/nandsim.c 			tx = read_file(ns, ns->cfile, ns->buf.byte, num, pos);
ns               1428 drivers/mtd/nand/raw/nandsim.c 				NS_ERR("read_page: read error for page %d ret %ld\n", ns->regs.row, (long)tx);
ns               1431 drivers/mtd/nand/raw/nandsim.c 			do_bit_flips(ns, num);
ns               1436 drivers/mtd/nand/raw/nandsim.c 	mypage = NS_GET_PAGE(ns);
ns               1438 drivers/mtd/nand/raw/nandsim.c 		NS_DBG("read_page: page %d not allocated\n", ns->regs.row);
ns               1439 drivers/mtd/nand/raw/nandsim.c 		memset(ns->buf.byte, 0xFF, num);
ns               1442 drivers/mtd/nand/raw/nandsim.c 			ns->regs.row, ns->regs.column + ns->regs.off);
ns               1443 drivers/mtd/nand/raw/nandsim.c 		if (do_read_error(ns, num))
ns               1445 drivers/mtd/nand/raw/nandsim.c 		memcpy(ns->buf.byte, NS_PAGE_BYTE_OFF(ns), num);
ns               1446 drivers/mtd/nand/raw/nandsim.c 		do_bit_flips(ns, num);
ns               1453 drivers/mtd/nand/raw/nandsim.c static void erase_sector(struct nandsim *ns)
ns               1458 drivers/mtd/nand/raw/nandsim.c 	if (ns->cfile) {
ns               1459 drivers/mtd/nand/raw/nandsim.c 		for (i = 0; i < ns->geom.pgsec; i++)
ns               1460 drivers/mtd/nand/raw/nandsim.c 			if (__test_and_clear_bit(ns->regs.row + i,
ns               1461 drivers/mtd/nand/raw/nandsim.c 						 ns->pages_written)) {
ns               1462 drivers/mtd/nand/raw/nandsim.c 				NS_DBG("erase_sector: freeing page %d\n", ns->regs.row + i);
ns               1467 drivers/mtd/nand/raw/nandsim.c 	mypage = NS_GET_PAGE(ns);
ns               1468 drivers/mtd/nand/raw/nandsim.c 	for (i = 0; i < ns->geom.pgsec; i++) {
ns               1470 drivers/mtd/nand/raw/nandsim.c 			NS_DBG("erase_sector: freeing page %d\n", ns->regs.row+i);
ns               1471 drivers/mtd/nand/raw/nandsim.c 			kmem_cache_free(ns->nand_pages_slab, mypage->byte);
ns               1481 drivers/mtd/nand/raw/nandsim.c static int prog_page(struct nandsim *ns, int num)
ns               1487 drivers/mtd/nand/raw/nandsim.c 	if (ns->cfile) {
ns               1492 drivers/mtd/nand/raw/nandsim.c 		NS_DBG("prog_page: writing page %d\n", ns->regs.row);
ns               1493 drivers/mtd/nand/raw/nandsim.c 		pg_off = ns->file_buf + ns->regs.column + ns->regs.off;
ns               1494 drivers/mtd/nand/raw/nandsim.c 		off = (loff_t)NS_RAW_OFFSET(ns) + ns->regs.off;
ns               1495 drivers/mtd/nand/raw/nandsim.c 		if (!test_bit(ns->regs.row, ns->pages_written)) {
ns               1497 drivers/mtd/nand/raw/nandsim.c 			memset(ns->file_buf, 0xff, ns->geom.pgszoob);
ns               1500 drivers/mtd/nand/raw/nandsim.c 			tx = read_file(ns, ns->cfile, pg_off, num, off);
ns               1502 drivers/mtd/nand/raw/nandsim.c 				NS_ERR("prog_page: read error for page %d ret %ld\n", ns->regs.row, (long)tx);
ns               1507 drivers/mtd/nand/raw/nandsim.c 			pg_off[i] &= ns->buf.byte[i];
ns               1509 drivers/mtd/nand/raw/nandsim.c 			loff_t pos = (loff_t)ns->regs.row * ns->geom.pgszoob;
ns               1510 drivers/mtd/nand/raw/nandsim.c 			tx = write_file(ns, ns->cfile, ns->file_buf, ns->geom.pgszoob, pos);
ns               1511 drivers/mtd/nand/raw/nandsim.c 			if (tx != ns->geom.pgszoob) {
ns               1512 drivers/mtd/nand/raw/nandsim.c 				NS_ERR("prog_page: write error for page %d ret %ld\n", ns->regs.row, (long)tx);
ns               1515 drivers/mtd/nand/raw/nandsim.c 			__set_bit(ns->regs.row, ns->pages_written);
ns               1517 drivers/mtd/nand/raw/nandsim.c 			tx = write_file(ns, ns->cfile, pg_off, num, off);
ns               1519 drivers/mtd/nand/raw/nandsim.c 				NS_ERR("prog_page: write error for page %d ret %ld\n", ns->regs.row, (long)tx);
ns               1526 drivers/mtd/nand/raw/nandsim.c 	mypage = NS_GET_PAGE(ns);
ns               1528 drivers/mtd/nand/raw/nandsim.c 		NS_DBG("prog_page: allocating page %d\n", ns->regs.row);
ns               1535 drivers/mtd/nand/raw/nandsim.c 		mypage->byte = kmem_cache_alloc(ns->nand_pages_slab, GFP_NOFS);
ns               1537 drivers/mtd/nand/raw/nandsim.c 			NS_ERR("prog_page: error allocating memory for page %d\n", ns->regs.row);
ns               1540 drivers/mtd/nand/raw/nandsim.c 		memset(mypage->byte, 0xFF, ns->geom.pgszoob);
ns               1543 drivers/mtd/nand/raw/nandsim.c 	pg_off = NS_PAGE_BYTE_OFF(ns);
ns               1545 drivers/mtd/nand/raw/nandsim.c 		pg_off[i] &= ns->buf.byte[i];
ns               1555 drivers/mtd/nand/raw/nandsim.c static int do_state_action(struct nandsim *ns, uint32_t action)
ns               1558 drivers/mtd/nand/raw/nandsim.c 	int busdiv = ns->busw == 8 ? 1 : 2;
ns               1564 drivers/mtd/nand/raw/nandsim.c 	if (action != ACTION_SECERASE && ns->regs.row >= ns->geom.pgnum) {
ns               1565 drivers/mtd/nand/raw/nandsim.c 		NS_WARN("do_state_action: wrong page number (%#x)\n", ns->regs.row);
ns               1577 drivers/mtd/nand/raw/nandsim.c 		if (ns->regs.column >= (ns->geom.pgszoob - ns->regs.off)) {
ns               1581 drivers/mtd/nand/raw/nandsim.c 		num = ns->geom.pgszoob - ns->regs.off - ns->regs.column;
ns               1582 drivers/mtd/nand/raw/nandsim.c 		read_page(ns, num);
ns               1585 drivers/mtd/nand/raw/nandsim.c 			num, NS_RAW_OFFSET(ns) + ns->regs.off);
ns               1587 drivers/mtd/nand/raw/nandsim.c 		if (ns->regs.off == 0)
ns               1588 drivers/mtd/nand/raw/nandsim.c 			NS_LOG("read page %d\n", ns->regs.row);
ns               1589 drivers/mtd/nand/raw/nandsim.c 		else if (ns->regs.off < ns->geom.pgsz)
ns               1590 drivers/mtd/nand/raw/nandsim.c 			NS_LOG("read page %d (second half)\n", ns->regs.row);
ns               1592 drivers/mtd/nand/raw/nandsim.c 			NS_LOG("read OOB of page %d\n", ns->regs.row);
ns               1595 drivers/mtd/nand/raw/nandsim.c 		NS_UDELAY(input_cycle * ns->geom.pgsz / 1000 / busdiv);
ns               1604 drivers/mtd/nand/raw/nandsim.c 		if (ns->lines.wp) {
ns               1609 drivers/mtd/nand/raw/nandsim.c 		if (ns->regs.row >= ns->geom.pgnum - ns->geom.pgsec
ns               1610 drivers/mtd/nand/raw/nandsim.c 			|| (ns->regs.row & ~(ns->geom.secsz - 1))) {
ns               1611 drivers/mtd/nand/raw/nandsim.c 			NS_ERR("do_state_action: wrong sector address (%#x)\n", ns->regs.row);
ns               1615 drivers/mtd/nand/raw/nandsim.c 		ns->regs.row = (ns->regs.row <<
ns               1616 drivers/mtd/nand/raw/nandsim.c 				8 * (ns->geom.pgaddrbytes - ns->geom.secaddrbytes)) | ns->regs.column;
ns               1617 drivers/mtd/nand/raw/nandsim.c 		ns->regs.column = 0;
ns               1619 drivers/mtd/nand/raw/nandsim.c 		erase_block_no = ns->regs.row >> (ns->geom.secshift - ns->geom.pgshift);
ns               1622 drivers/mtd/nand/raw/nandsim.c 				ns->regs.row, NS_RAW_OFFSET(ns));
ns               1625 drivers/mtd/nand/raw/nandsim.c 		erase_sector(ns);
ns               1644 drivers/mtd/nand/raw/nandsim.c 		if (ns->lines.wp) {
ns               1649 drivers/mtd/nand/raw/nandsim.c 		num = ns->geom.pgszoob - ns->regs.off - ns->regs.column;
ns               1650 drivers/mtd/nand/raw/nandsim.c 		if (num != ns->regs.count) {
ns               1652 drivers/mtd/nand/raw/nandsim.c 					ns->regs.count, num);
ns               1656 drivers/mtd/nand/raw/nandsim.c 		if (prog_page(ns, num) == -1)
ns               1659 drivers/mtd/nand/raw/nandsim.c 		page_no = ns->regs.row;
ns               1662 drivers/mtd/nand/raw/nandsim.c 			num, ns->regs.row, ns->regs.column, NS_RAW_OFFSET(ns) + ns->regs.off);
ns               1663 drivers/mtd/nand/raw/nandsim.c 		NS_LOG("programm page %d\n", ns->regs.row);
ns               1666 drivers/mtd/nand/raw/nandsim.c 		NS_UDELAY(output_cycle * ns->geom.pgsz / 1000 / busdiv);
ns               1677 drivers/mtd/nand/raw/nandsim.c 		ns->regs.off = 0;
ns               1681 drivers/mtd/nand/raw/nandsim.c 		if (!(ns->options & OPT_PAGE512_8BIT)) {
ns               1686 drivers/mtd/nand/raw/nandsim.c 		NS_DBG("do_state_action: set internal offset to %d\n", ns->geom.pgsz/2);
ns               1687 drivers/mtd/nand/raw/nandsim.c 		ns->regs.off = ns->geom.pgsz/2;
ns               1691 drivers/mtd/nand/raw/nandsim.c 		NS_DBG("do_state_action: set internal offset to %d\n", ns->geom.pgsz);
ns               1692 drivers/mtd/nand/raw/nandsim.c 		ns->regs.off = ns->geom.pgsz;
ns               1705 drivers/mtd/nand/raw/nandsim.c static void switch_state(struct nandsim *ns)
ns               1707 drivers/mtd/nand/raw/nandsim.c 	if (ns->op) {
ns               1713 drivers/mtd/nand/raw/nandsim.c 		ns->stateidx += 1;
ns               1714 drivers/mtd/nand/raw/nandsim.c 		ns->state = ns->nxstate;
ns               1715 drivers/mtd/nand/raw/nandsim.c 		ns->nxstate = ns->op[ns->stateidx + 1];
ns               1719 drivers/mtd/nand/raw/nandsim.c 			get_state_name(ns->state), get_state_name(ns->nxstate));
ns               1722 drivers/mtd/nand/raw/nandsim.c 		if ((ns->state & ACTION_MASK) && do_state_action(ns, ns->state) < 0) {
ns               1723 drivers/mtd/nand/raw/nandsim.c 			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               1737 drivers/mtd/nand/raw/nandsim.c 		ns->state = get_state_by_command(ns->regs.command);
ns               1741 drivers/mtd/nand/raw/nandsim.c 		if (find_operation(ns, 0) != 0)
ns               1744 drivers/mtd/nand/raw/nandsim.c 		if ((ns->state & ACTION_MASK) && do_state_action(ns, ns->state) < 0) {
ns               1745 drivers/mtd/nand/raw/nandsim.c 			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               1751 drivers/mtd/nand/raw/nandsim.c 	if ((ns->nxstate & STATE_ADDR_MASK) && ns->busw == 16) {
ns               1753 drivers/mtd/nand/raw/nandsim.c 		ns->regs.column <<= 1;
ns               1756 drivers/mtd/nand/raw/nandsim.c 	if (NS_STATE(ns->nxstate) == STATE_READY) {
ns               1761 drivers/mtd/nand/raw/nandsim.c 		u_char status = NS_STATUS_OK(ns);
ns               1764 drivers/mtd/nand/raw/nandsim.c 		if ((ns->state & (STATE_DATAIN_MASK | STATE_DATAOUT_MASK))
ns               1765 drivers/mtd/nand/raw/nandsim.c 			&& ns->regs.count != ns->regs.num) {
ns               1767 drivers/mtd/nand/raw/nandsim.c 					ns->regs.num - ns->regs.count);
ns               1768 drivers/mtd/nand/raw/nandsim.c 			status = NS_STATUS_FAILED(ns);
ns               1773 drivers/mtd/nand/raw/nandsim.c 		switch_to_ready_state(ns, status);
ns               1776 drivers/mtd/nand/raw/nandsim.c 	} else if (ns->nxstate & (STATE_DATAIN_MASK | STATE_DATAOUT_MASK)) {
ns               1781 drivers/mtd/nand/raw/nandsim.c 		ns->state      = ns->nxstate;
ns               1782 drivers/mtd/nand/raw/nandsim.c 		ns->nxstate    = ns->op[++ns->stateidx + 1];
ns               1783 drivers/mtd/nand/raw/nandsim.c 		ns->regs.num   = ns->regs.count = 0;
ns               1787 drivers/mtd/nand/raw/nandsim.c 			get_state_name(ns->state), get_state_name(ns->nxstate));
ns               1793 drivers/mtd/nand/raw/nandsim.c 		switch (NS_STATE(ns->state)) {
ns               1796 drivers/mtd/nand/raw/nandsim.c 				ns->regs.num = ns->geom.pgszoob - ns->regs.off - ns->regs.column;
ns               1800 drivers/mtd/nand/raw/nandsim.c 				ns->regs.num = ns->geom.idbytes;
ns               1804 drivers/mtd/nand/raw/nandsim.c 				ns->regs.count = ns->regs.num = 0;
ns               1811 drivers/mtd/nand/raw/nandsim.c 	} else if (ns->nxstate & STATE_ADDR_MASK) {
ns               1817 drivers/mtd/nand/raw/nandsim.c 		ns->regs.count = 0;
ns               1819 drivers/mtd/nand/raw/nandsim.c 		switch (NS_STATE(ns->nxstate)) {
ns               1821 drivers/mtd/nand/raw/nandsim.c 				ns->regs.num = ns->geom.pgaddrbytes;
ns               1825 drivers/mtd/nand/raw/nandsim.c 				ns->regs.num = ns->geom.secaddrbytes;
ns               1829 drivers/mtd/nand/raw/nandsim.c 				ns->regs.num = 1;
ns               1834 drivers/mtd/nand/raw/nandsim.c 				ns->regs.num = ns->geom.pgaddrbytes - ns->geom.secaddrbytes;
ns               1845 drivers/mtd/nand/raw/nandsim.c 		ns->regs.num = 0;
ns               1846 drivers/mtd/nand/raw/nandsim.c 		ns->regs.count = 0;
ns               1852 drivers/mtd/nand/raw/nandsim.c 	struct nandsim *ns = nand_get_controller_data(chip);
ns               1856 drivers/mtd/nand/raw/nandsim.c 	if (!ns->lines.ce) {
ns               1860 drivers/mtd/nand/raw/nandsim.c 	if (ns->lines.ale || ns->lines.cle) {
ns               1864 drivers/mtd/nand/raw/nandsim.c 	if (!(ns->state & STATE_DATAOUT_MASK)) {
ns               1866 drivers/mtd/nand/raw/nandsim.c 			"return %#x\n", get_state_name(ns->state), (uint)outb);
ns               1871 drivers/mtd/nand/raw/nandsim.c 	if (NS_STATE(ns->state) == STATE_DATAOUT_STATUS) {
ns               1872 drivers/mtd/nand/raw/nandsim.c 		NS_DBG("read_byte: return %#x status\n", ns->regs.status);
ns               1873 drivers/mtd/nand/raw/nandsim.c 		return ns->regs.status;
ns               1877 drivers/mtd/nand/raw/nandsim.c 	if (ns->regs.count == ns->regs.num) {
ns               1882 drivers/mtd/nand/raw/nandsim.c 	switch (NS_STATE(ns->state)) {
ns               1884 drivers/mtd/nand/raw/nandsim.c 			if (ns->busw == 8) {
ns               1885 drivers/mtd/nand/raw/nandsim.c 				outb = ns->buf.byte[ns->regs.count];
ns               1886 drivers/mtd/nand/raw/nandsim.c 				ns->regs.count += 1;
ns               1888 drivers/mtd/nand/raw/nandsim.c 				outb = (u_char)cpu_to_le16(ns->buf.word[ns->regs.count >> 1]);
ns               1889 drivers/mtd/nand/raw/nandsim.c 				ns->regs.count += 2;
ns               1893 drivers/mtd/nand/raw/nandsim.c 			NS_DBG("read_byte: read ID byte %d, total = %d\n", ns->regs.count, ns->regs.num);
ns               1894 drivers/mtd/nand/raw/nandsim.c 			outb = ns->ids[ns->regs.count];
ns               1895 drivers/mtd/nand/raw/nandsim.c 			ns->regs.count += 1;
ns               1901 drivers/mtd/nand/raw/nandsim.c 	if (ns->regs.count == ns->regs.num) {
ns               1904 drivers/mtd/nand/raw/nandsim.c 		if (NS_STATE(ns->nxstate) == STATE_READY)
ns               1905 drivers/mtd/nand/raw/nandsim.c 			switch_state(ns);
ns               1913 drivers/mtd/nand/raw/nandsim.c 	struct nandsim *ns = nand_get_controller_data(chip);
ns               1916 drivers/mtd/nand/raw/nandsim.c 	if (!ns->lines.ce) {
ns               1920 drivers/mtd/nand/raw/nandsim.c 	if (ns->lines.ale && ns->lines.cle) {
ns               1925 drivers/mtd/nand/raw/nandsim.c 	if (ns->lines.cle == 1) {
ns               1932 drivers/mtd/nand/raw/nandsim.c 			switch_to_ready_state(ns, NS_STATUS_OK(ns));
ns               1942 drivers/mtd/nand/raw/nandsim.c 		if (NS_STATE(ns->state) == STATE_DATAOUT_STATUS
ns               1943 drivers/mtd/nand/raw/nandsim.c 			|| NS_STATE(ns->state) == STATE_DATAOUT) {
ns               1944 drivers/mtd/nand/raw/nandsim.c 			int row = ns->regs.row;
ns               1946 drivers/mtd/nand/raw/nandsim.c 			switch_state(ns);
ns               1948 drivers/mtd/nand/raw/nandsim.c 				ns->regs.row = row;
ns               1952 drivers/mtd/nand/raw/nandsim.c 		if (NS_STATE(ns->nxstate) != STATE_UNKNOWN && !(ns->nxstate & STATE_CMD_MASK)) {
ns               1954 drivers/mtd/nand/raw/nandsim.c 			if (!(ns->regs.command == NAND_CMD_READID &&
ns               1955 drivers/mtd/nand/raw/nandsim.c 			    NS_STATE(ns->state) == STATE_DATAOUT_ID && ns->regs.count == 2)) {
ns               1962 drivers/mtd/nand/raw/nandsim.c 					"ignore previous states\n", (uint)byte, get_state_name(ns->nxstate));
ns               1964 drivers/mtd/nand/raw/nandsim.c 			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               1969 drivers/mtd/nand/raw/nandsim.c 		ns->regs.command = byte;
ns               1970 drivers/mtd/nand/raw/nandsim.c 		switch_state(ns);
ns               1972 drivers/mtd/nand/raw/nandsim.c 	} else if (ns->lines.ale == 1) {
ns               1977 drivers/mtd/nand/raw/nandsim.c 		if (NS_STATE(ns->nxstate) == STATE_UNKNOWN) {
ns               1981 drivers/mtd/nand/raw/nandsim.c 			if (find_operation(ns, 1) < 0)
ns               1984 drivers/mtd/nand/raw/nandsim.c 			if ((ns->state & ACTION_MASK) && do_state_action(ns, ns->state) < 0) {
ns               1985 drivers/mtd/nand/raw/nandsim.c 				switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               1989 drivers/mtd/nand/raw/nandsim.c 			ns->regs.count = 0;
ns               1990 drivers/mtd/nand/raw/nandsim.c 			switch (NS_STATE(ns->nxstate)) {
ns               1992 drivers/mtd/nand/raw/nandsim.c 					ns->regs.num = ns->geom.pgaddrbytes;
ns               1995 drivers/mtd/nand/raw/nandsim.c 					ns->regs.num = ns->geom.secaddrbytes;
ns               1998 drivers/mtd/nand/raw/nandsim.c 					ns->regs.num = 1;
ns               2006 drivers/mtd/nand/raw/nandsim.c 		if (!(ns->nxstate & STATE_ADDR_MASK)) {
ns               2008 drivers/mtd/nand/raw/nandsim.c 				"switch to STATE_READY\n", (uint)byte, get_state_name(ns->nxstate));
ns               2009 drivers/mtd/nand/raw/nandsim.c 			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               2014 drivers/mtd/nand/raw/nandsim.c 		if (ns->regs.count == ns->regs.num) {
ns               2016 drivers/mtd/nand/raw/nandsim.c 			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               2020 drivers/mtd/nand/raw/nandsim.c 		accept_addr_byte(ns, byte);
ns               2022 drivers/mtd/nand/raw/nandsim.c 		ns->regs.count += 1;
ns               2025 drivers/mtd/nand/raw/nandsim.c 				(uint)byte, ns->regs.count, ns->regs.num);
ns               2027 drivers/mtd/nand/raw/nandsim.c 		if (ns->regs.count == ns->regs.num) {
ns               2028 drivers/mtd/nand/raw/nandsim.c 			NS_DBG("address (%#x, %#x) is accepted\n", ns->regs.row, ns->regs.column);
ns               2029 drivers/mtd/nand/raw/nandsim.c 			switch_state(ns);
ns               2038 drivers/mtd/nand/raw/nandsim.c 		if (!(ns->state & STATE_DATAIN_MASK)) {
ns               2041 drivers/mtd/nand/raw/nandsim.c 				get_state_name(ns->state), get_state_name(STATE_READY));
ns               2042 drivers/mtd/nand/raw/nandsim.c 			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               2047 drivers/mtd/nand/raw/nandsim.c 		if (ns->regs.count == ns->regs.num) {
ns               2049 drivers/mtd/nand/raw/nandsim.c 					ns->regs.num);
ns               2053 drivers/mtd/nand/raw/nandsim.c 		if (ns->busw == 8) {
ns               2054 drivers/mtd/nand/raw/nandsim.c 			ns->buf.byte[ns->regs.count] = byte;
ns               2055 drivers/mtd/nand/raw/nandsim.c 			ns->regs.count += 1;
ns               2057 drivers/mtd/nand/raw/nandsim.c 			ns->buf.word[ns->regs.count >> 1] = cpu_to_le16((uint16_t)byte);
ns               2058 drivers/mtd/nand/raw/nandsim.c 			ns->regs.count += 2;
ns               2068 drivers/mtd/nand/raw/nandsim.c 	struct nandsim *ns = nand_get_controller_data(chip);
ns               2071 drivers/mtd/nand/raw/nandsim.c 	if (!(ns->state & STATE_DATAIN_MASK)) {
ns               2073 drivers/mtd/nand/raw/nandsim.c 			"switch to STATE_READY\n", get_state_name(ns->state));
ns               2074 drivers/mtd/nand/raw/nandsim.c 		switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               2079 drivers/mtd/nand/raw/nandsim.c 	if (ns->regs.count + len > ns->regs.num) {
ns               2081 drivers/mtd/nand/raw/nandsim.c 		switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               2085 drivers/mtd/nand/raw/nandsim.c 	memcpy(ns->buf.byte + ns->regs.count, buf, len);
ns               2086 drivers/mtd/nand/raw/nandsim.c 	ns->regs.count += len;
ns               2088 drivers/mtd/nand/raw/nandsim.c 	if (ns->regs.count == ns->regs.num) {
ns               2089 drivers/mtd/nand/raw/nandsim.c 		NS_DBG("write_buf: %d bytes were written\n", ns->regs.count);
ns               2095 drivers/mtd/nand/raw/nandsim.c 	struct nandsim *ns = nand_get_controller_data(chip);
ns               2098 drivers/mtd/nand/raw/nandsim.c 	if (!ns->lines.ce) {
ns               2102 drivers/mtd/nand/raw/nandsim.c 	if (ns->lines.ale || ns->lines.cle) {
ns               2106 drivers/mtd/nand/raw/nandsim.c 	if (!(ns->state & STATE_DATAOUT_MASK)) {
ns               2108 drivers/mtd/nand/raw/nandsim.c 			get_state_name(ns->state));
ns               2112 drivers/mtd/nand/raw/nandsim.c 	if (NS_STATE(ns->state) != STATE_DATAOUT) {
ns               2122 drivers/mtd/nand/raw/nandsim.c 	if (ns->regs.count + len > ns->regs.num) {
ns               2124 drivers/mtd/nand/raw/nandsim.c 		switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
ns               2128 drivers/mtd/nand/raw/nandsim.c 	memcpy(buf, ns->buf.byte + ns->regs.count, len);
ns               2129 drivers/mtd/nand/raw/nandsim.c 	ns->regs.count += len;
ns               2131 drivers/mtd/nand/raw/nandsim.c 	if (ns->regs.count == ns->regs.num) {
ns               2132 drivers/mtd/nand/raw/nandsim.c 		if (NS_STATE(ns->nxstate) == STATE_READY)
ns               2133 drivers/mtd/nand/raw/nandsim.c 			switch_state(ns);
ns               2145 drivers/mtd/nand/raw/nandsim.c 	struct nandsim *ns = nand_get_controller_data(chip);
ns               2147 drivers/mtd/nand/raw/nandsim.c 	ns->lines.ce = 1;
ns               2151 drivers/mtd/nand/raw/nandsim.c 		ns->lines.cle = 0;
ns               2152 drivers/mtd/nand/raw/nandsim.c 		ns->lines.ale = 0;
ns               2156 drivers/mtd/nand/raw/nandsim.c 			ns->lines.cle = 1;
ns               2160 drivers/mtd/nand/raw/nandsim.c 			ns->lines.ale = 1;
ns               2228 drivers/mtd/nand/raw/nandsim.c 	struct nandsim *ns;
ns               2236 drivers/mtd/nand/raw/nandsim.c 	ns = kzalloc(sizeof(struct nandsim), GFP_KERNEL);
ns               2237 drivers/mtd/nand/raw/nandsim.c 	if (!ns) {
ns               2241 drivers/mtd/nand/raw/nandsim.c 	chip	    = &ns->chip;
ns               2243 drivers/mtd/nand/raw/nandsim.c 	nand_set_controller_data(chip, (void *)ns);
ns               2270 drivers/mtd/nand/raw/nandsim.c 		ns->geom.idbytes = 8;
ns               2272 drivers/mtd/nand/raw/nandsim.c 		ns->geom.idbytes = 6;
ns               2274 drivers/mtd/nand/raw/nandsim.c 		ns->geom.idbytes = 4;
ns               2276 drivers/mtd/nand/raw/nandsim.c 		ns->geom.idbytes = 2;
ns               2277 drivers/mtd/nand/raw/nandsim.c 	ns->regs.status = NS_STATUS_OK(ns);
ns               2278 drivers/mtd/nand/raw/nandsim.c 	ns->nxstate = STATE_UNKNOWN;
ns               2279 drivers/mtd/nand/raw/nandsim.c 	ns->options |= OPT_PAGE512; /* temporary value */
ns               2280 drivers/mtd/nand/raw/nandsim.c 	memcpy(ns->ids, id_bytes, sizeof(ns->ids));
ns               2282 drivers/mtd/nand/raw/nandsim.c 		ns->busw = 16;
ns               2297 drivers/mtd/nand/raw/nandsim.c 	nand_controller_init(&ns->base);
ns               2298 drivers/mtd/nand/raw/nandsim.c 	ns->base.ops = &ns_controller_ops;
ns               2299 drivers/mtd/nand/raw/nandsim.c 	chip->controller = &ns->base;
ns               2337 drivers/mtd/nand/raw/nandsim.c 	if ((retval = parse_badblocks(ns, nsmtd)) != 0)
ns               2341 drivers/mtd/nand/raw/nandsim.c 	retval = mtd_device_register(nsmtd, &ns->partitions[0],
ns               2342 drivers/mtd/nand/raw/nandsim.c 				     ns->nbparts);
ns               2346 drivers/mtd/nand/raw/nandsim.c 	if ((retval = nandsim_debugfs_create(ns)) != 0)
ns               2352 drivers/mtd/nand/raw/nandsim.c 	free_nandsim(ns);
ns               2354 drivers/mtd/nand/raw/nandsim.c 	for (i = 0;i < ARRAY_SIZE(ns->partitions); ++i)
ns               2355 drivers/mtd/nand/raw/nandsim.c 		kfree(ns->partitions[i].name);
ns               2357 drivers/mtd/nand/raw/nandsim.c 	kfree(ns);
ns               2371 drivers/mtd/nand/raw/nandsim.c 	struct nandsim *ns = nand_get_controller_data(chip);
ns               2374 drivers/mtd/nand/raw/nandsim.c 	free_nandsim(ns);    /* Free nandsim private resources */
ns               2376 drivers/mtd/nand/raw/nandsim.c 	for (i = 0;i < ARRAY_SIZE(ns->partitions); ++i)
ns               2377 drivers/mtd/nand/raw/nandsim.c 		kfree(ns->partitions[i].name);
ns               2378 drivers/mtd/nand/raw/nandsim.c 	kfree(ns);        /* Free other structures */
ns                249 drivers/mtd/nand/raw/txx9ndfmc.c #define TXX9NDFMC_NS_TO_CYC(gbusclk, ns) \
ns                250 drivers/mtd/nand/raw/txx9ndfmc.c 	DIV_ROUND_UP((ns) * DIV_ROUND_UP(gbusclk, 1000), 1000000)
ns                 84 drivers/net/dsa/lantiq_pce.h #define MC_ENTRY(val, msk, ns, out, len, type, flags, ipv4_len) \
ns                 85 drivers/net/dsa/lantiq_pce.h 	{ val, msk, ((ns) << 10 | (out) << 4 | (len) >> 1),\
ns                294 drivers/net/dsa/mv88e6xxx/hwtstamp.c 	u64 ns, timelo, timehi;
ns                328 drivers/net/dsa/mv88e6xxx/hwtstamp.c 			ns = timehi << 16 | timelo;
ns                331 drivers/net/dsa/mv88e6xxx/hwtstamp.c 			ns = timecounter_cyc2time(&chip->tstamp_tc, ns);
ns                335 drivers/net/dsa/mv88e6xxx/hwtstamp.c 			shwt->hwtstamp = ns_to_ktime(ns);
ns                403 drivers/net/dsa/mv88e6xxx/hwtstamp.c 	u64 ns;
ns                451 drivers/net/dsa/mv88e6xxx/hwtstamp.c 	ns = timecounter_cyc2time(&chip->tstamp_tc, time_raw);
ns                453 drivers/net/dsa/mv88e6xxx/hwtstamp.c 	shhwtstamps.hwtstamp = ns_to_ktime(ns);
ns                242 drivers/net/dsa/mv88e6xxx/ptp.c 	u64 ns;
ns                245 drivers/net/dsa/mv88e6xxx/ptp.c 	ns = timecounter_read(&chip->tstamp_tc);
ns                248 drivers/net/dsa/mv88e6xxx/ptp.c 	*ts = ns_to_timespec64(ns);
ns                257 drivers/net/dsa/mv88e6xxx/ptp.c 	u64 ns;
ns                259 drivers/net/dsa/mv88e6xxx/ptp.c 	ns = timespec64_to_ns(ts);
ns                262 drivers/net/dsa/mv88e6xxx/ptp.c 	timecounter_init(&chip->tstamp_tc, &chip->tstamp_cc, ns);
ns                243 drivers/net/dsa/sja1105/sja1105_ptp.c 	u64 ns;
ns                246 drivers/net/dsa/sja1105/sja1105_ptp.c 	ns = timecounter_read(&priv->tstamp_tc);
ns                249 drivers/net/dsa/sja1105/sja1105_ptp.c 	*ts = ns_to_timespec64(ns);
ns                258 drivers/net/dsa/sja1105/sja1105_ptp.c 	u64 ns = timespec64_to_ns(ts);
ns                261 drivers/net/dsa/sja1105/sja1105_ptp.c 	timecounter_init(&priv->tstamp_tc, &priv->tstamp_cc, ns);
ns                 16 drivers/net/dsa/sja1105/sja1105_tas.c static s64 ns_to_sja1105_delta(s64 ns)
ns                 18 drivers/net/dsa/sja1105/sja1105_tas.c 	return div_s64(ns, 200);
ns               13876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	u64 ns;
ns               13884 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	ns = timecounter_read(&bp->timecounter);
ns               13886 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	DP(BNX2X_MSG_PTP, "PTP gettime called, ns = %llu\n", ns);
ns               13888 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	*ts = ns_to_timespec64(ns);
ns               13897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	u64 ns;
ns               13905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	ns = timespec64_to_ns(ts);
ns               13907 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	DP(BNX2X_MSG_PTP, "PTP settime called, ns = %llu\n", ns);
ns               13910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	timecounter_init(&bp->timecounter, &bp->cyclecounter, ns);
ns               15230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	u64 timestamp, ns;
ns               15259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 		ns = timecounter_cyc2time(&bp->timecounter, timestamp);
ns               15262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 		shhwtstamps.hwtstamp = ns_to_ktime(ns);
ns               15266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 		   timestamp, ns);
ns               15281 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	u64 timestamp, ns;
ns               15293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	ns = timecounter_cyc2time(&bp->timecounter, timestamp);
ns               15295 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	skb_hwtstamps(skb)->hwtstamp = ns_to_ktime(ns);
ns               15298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 	   timestamp, ns);
ns               6245 drivers/net/ethernet/broadcom/tg3.c 	u64 ns;
ns               6249 drivers/net/ethernet/broadcom/tg3.c 	ns = tg3_refclk_read(tp, sts);
ns               6250 drivers/net/ethernet/broadcom/tg3.c 	ns += tp->ptp_adjust;
ns               6253 drivers/net/ethernet/broadcom/tg3.c 	*ts = ns_to_timespec64(ns);
ns               6261 drivers/net/ethernet/broadcom/tg3.c 	u64 ns;
ns               6264 drivers/net/ethernet/broadcom/tg3.c 	ns = timespec64_to_ns(ts);
ns               6267 drivers/net/ethernet/broadcom/tg3.c 	tg3_refclk_write(tp, ns);
ns               1105 drivers/net/ethernet/cadence/macb.h 	u32 ns;
ns                 77 drivers/net/ethernet/cadence/macb_ptp.c 	u32 ns, sech, secl;
ns                 81 drivers/net/ethernet/cadence/macb_ptp.c 	ns = ts->tv_nsec;
ns                 90 drivers/net/ethernet/cadence/macb_ptp.c 	gem_writel(bp, TN, ns);
ns                111 drivers/net/ethernet/cadence/macb_ptp.c 	gem_writel(bp, TI, GEM_BF(NSINCR, incr_spec->ns));
ns                132 drivers/net/ethernet/cadence/macb_ptp.c 	incr_spec.ns = bp->tsu_incr.ns;
ns                135 drivers/net/ethernet/cadence/macb_ptp.c 	word = ((u64)incr_spec.ns << GEM_SUBNSINCR_SIZE) + incr_spec.sub_ns;
ns                145 drivers/net/ethernet/cadence/macb_ptp.c 	incr_spec.ns = (adj >> GEM_SUBNSINCR_SIZE)
ns                205 drivers/net/ethernet/cadence/macb_ptp.c 	bp->tsu_incr.ns = div_u64_rem(NSEC_PER_SEC, bp->tsu_rate, &rem);
ns                234 drivers/net/ethernet/cadence/macb_ptp.c 	bp->tsu_incr.ns = 0;
ns                582 drivers/net/ethernet/cavium/liquidio/lio_core.c 	u64 ns;
ns                638 drivers/net/ethernet/cavium/liquidio/lio_core.c 					memcpy(&ns, (skb->data + r_dh_off),
ns                639 drivers/net/ethernet/cavium/liquidio/lio_core.c 					       sizeof(ns));
ns                643 drivers/net/ethernet/cavium/liquidio/lio_core.c 						ns_to_ktime(ns +
ns               1617 drivers/net/ethernet/cavium/liquidio/lio_main.c 	u64 ns;
ns               1623 drivers/net/ethernet/cavium/liquidio/lio_main.c 	ns = lio_pci_readq(oct, CN6XXX_MIO_PTP_CLOCK_HI);
ns               1624 drivers/net/ethernet/cavium/liquidio/lio_main.c 	ns += lio->ptp_adjust;
ns               1627 drivers/net/ethernet/cavium/liquidio/lio_main.c 	*ts = ns_to_timespec64(ns);
ns               1640 drivers/net/ethernet/cavium/liquidio/lio_main.c 	u64 ns;
ns               1645 drivers/net/ethernet/cavium/liquidio/lio_main.c 	ns = timespec64_to_ns(ts);
ns               1648 drivers/net/ethernet/cavium/liquidio/lio_main.c 	lio_pci_writeq(oct, ns, CN6XXX_MIO_PTP_CLOCK_HI);
ns               2242 drivers/net/ethernet/cavium/liquidio/lio_main.c 		u64 ns = resp->timestamp;
ns               2246 drivers/net/ethernet/cavium/liquidio/lio_main.c 			   skb, (unsigned long long)ns);
ns               2247 drivers/net/ethernet/cavium/liquidio/lio_main.c 		ts.hwtstamp = ns_to_ktime(ns + lio->ptp_adjust);
ns               1331 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c 		u64 ns = resp->timestamp;
ns               1335 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c 			   skb, (unsigned long long)ns);
ns               1336 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c 		ts.hwtstamp = ns_to_ktime(ns + lio->ptp_adjust);
ns                292 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c 			u64 ns;
ns                296 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c 			ns = cvmx_read_csr(CVMX_MIXX_TSTAMP(p->port));
ns                300 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c 			ts.hwtstamp = ns_to_ktime(ns);
ns                407 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c 			u64 ns = *(u64 *)skb->data;
ns                410 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c 			ts->hwtstamp = ns_to_ktime(ns);
ns                625 drivers/net/ethernet/cavium/thunder/nicvf_main.c 	u64 ns;
ns                646 drivers/net/ethernet/cavium/thunder/nicvf_main.c 	ns = cavium_ptp_tstamp2time(nic->ptp_clock, cqe_tx->ptp_timestamp);
ns                647 drivers/net/ethernet/cavium/thunder/nicvf_main.c 	ts.hwtstamp = ns_to_ktime(ns);
ns                760 drivers/net/ethernet/cavium/thunder/nicvf_main.c 	u64 ns;
ns                766 drivers/net/ethernet/cavium/thunder/nicvf_main.c 	ns = cavium_ptp_tstamp2time(nic->ptp_clock,
ns                768 drivers/net/ethernet/cavium/thunder/nicvf_main.c 	skb_hwtstamps(skb)->hwtstamp = ns_to_ktime(ns);
ns                295 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	struct net_device_stats *ns = &dev->stats;
ns                302 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->tx_packets = pstats->TxUnicastFramesOK +
ns                305 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_packets = pstats->RxUnicastFramesOK +
ns                308 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->tx_bytes = pstats->TxOctetsOK;
ns                309 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_bytes = pstats->RxOctetsOK;
ns                311 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->tx_errors = pstats->TxLateCollisions + pstats->TxLengthErrors +
ns                313 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_errors = pstats->RxDataErrors + pstats->RxJabberErrors +
ns                318 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->multicast  = pstats->RxMulticastFramesOK;
ns                319 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->collisions = pstats->TxTotalCollisions;
ns                322 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_length_errors = pstats->RxFrameTooLongErrors +
ns                324 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_over_errors   = 0;
ns                325 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_crc_errors    = pstats->RxFCSErrors;
ns                326 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_frame_errors  = pstats->RxAlignErrors;
ns                327 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_fifo_errors   = 0;
ns                328 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->rx_missed_errors = 0;
ns                331 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->tx_aborted_errors   = pstats->TxFramesAbortedDueToXSCollisions;
ns                332 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->tx_carrier_errors   = 0;
ns                333 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->tx_fifo_errors      = pstats->TxUnderrun;
ns                334 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->tx_heartbeat_errors = 0;
ns                335 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	ns->tx_window_errors    = pstats->TxLateCollisions;
ns                336 drivers/net/ethernet/chelsio/cxgb/cxgb2.c 	return ns;
ns               1492 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	struct net_device_stats *ns = &dev->stats;
ns               1499 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->tx_bytes = pstats->tx_octets;
ns               1500 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->tx_packets = pstats->tx_frames;
ns               1501 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_bytes = pstats->rx_octets;
ns               1502 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_packets = pstats->rx_frames;
ns               1503 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->multicast = pstats->rx_mcast_frames;
ns               1505 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->tx_errors = pstats->tx_underrun;
ns               1506 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_errors = pstats->rx_symbol_errs + pstats->rx_fcs_errs +
ns               1511 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_length_errors = pstats->rx_jabber + pstats->rx_too_long;
ns               1512 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_over_errors = 0;
ns               1513 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_crc_errors = pstats->rx_fcs_errs;
ns               1514 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_frame_errors = pstats->rx_symbol_errs;
ns               1515 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_fifo_errors = pstats->rx_fifo_ovfl;
ns               1516 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->rx_missed_errors = pstats->rx_cong_drops;
ns               1519 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->tx_aborted_errors = 0;
ns               1520 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->tx_carrier_errors = 0;
ns               1521 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->tx_fifo_errors = pstats->tx_underrun;
ns               1522 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->tx_heartbeat_errors = 0;
ns               1523 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	ns->tx_window_errors = 0;
ns               1524 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	return ns;
ns               2567 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 			   struct rtnl_link_stats64 *ns)
ns               2586 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->tx_bytes   = stats.tx_octets;
ns               2587 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->tx_packets = stats.tx_frames;
ns               2588 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_bytes   = stats.rx_octets;
ns               2589 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_packets = stats.rx_frames;
ns               2590 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->multicast  = stats.rx_mcast_frames;
ns               2593 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_length_errors = stats.rx_jabber + stats.rx_too_long +
ns               2595 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_over_errors   = 0;
ns               2596 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_crc_errors    = stats.rx_fcs_err;
ns               2597 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_frame_errors  = stats.rx_symbol_err;
ns               2598 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_dropped	     = stats.rx_ovflow0 + stats.rx_ovflow1 +
ns               2602 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_missed_errors = 0;
ns               2605 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->tx_aborted_errors   = 0;
ns               2606 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->tx_carrier_errors   = 0;
ns               2607 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->tx_fifo_errors      = 0;
ns               2608 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->tx_heartbeat_errors = 0;
ns               2609 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->tx_window_errors    = 0;
ns               2611 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->tx_errors = stats.tx_error_frames;
ns               2612 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	ns->rx_errors = stats.rx_symbol_err + stats.rx_fcs_err +
ns               2613 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 		ns->rx_length_errors + stats.rx_len_err + ns->rx_fifo_errors;
ns                316 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c 	u64 ns;
ns                318 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c 	ns = t4_read_reg(adapter, T5_PORT_REG(0, MAC_PORT_PTP_SUM_LO_A));
ns                319 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c 	ns |= (u64)t4_read_reg(adapter,
ns                323 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c 	*ts = ns_to_timespec64(ns);
ns                341 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c 	u64 ns;
ns                352 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c 	ns = timespec64_to_ns(ts);
ns                353 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c 	c.u.ts.tm = cpu_to_be64(ns);
ns               2730 drivers/net/ethernet/chelsio/cxgb4/sge.c 	u64 ns;
ns               2733 drivers/net/ethernet/chelsio/cxgb4/sge.c 	ns = div_u64(tmp, adap->params.vpd.cclk);
ns               2736 drivers/net/ethernet/chelsio/cxgb4/sge.c 	hwtstamps->hwtstamp = ns_to_ktime(ns);
ns                911 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	struct net_device_stats *ns = &dev->stats;
ns                918 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	memset(ns, 0, sizeof(*ns));
ns                920 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 		return ns;
ns                922 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	ns->tx_bytes = (stats.tx_bcast_bytes + stats.tx_mcast_bytes +
ns                924 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	ns->tx_packets = (stats.tx_bcast_frames + stats.tx_mcast_frames +
ns                926 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	ns->rx_bytes = (stats.rx_bcast_bytes + stats.rx_mcast_bytes +
ns                928 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	ns->rx_packets = (stats.rx_bcast_frames + stats.rx_mcast_frames +
ns                930 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	ns->multicast = stats.rx_mcast_frames;
ns                931 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	ns->tx_errors = stats.tx_drop_frames;
ns                932 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	ns->rx_errors = stats.rx_err_frames;
ns                934 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 	return ns;
ns               1620 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c 	u64 ns;
ns               1658 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c 					  &ns)) {
ns               1659 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c 			shhwtstamps.hwtstamp = ns_to_ktime(ns);
ns               2273 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c 	u64 ns;
ns               2342 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c 		if (!fman_port_get_tstamp(priv->mac_dev->port[RX], vaddr, &ns))
ns               2343 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c 			shhwtstamps->hwtstamp = ns_to_ktime(ns);
ns                418 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		u64 ns;
ns                422 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		ns = DPAA2_PTP_CLK_PERIOD_NS * le64_to_cpup(ts);
ns                423 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		shhwtstamps->hwtstamp = ns_to_ktime(ns);
ns                732 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		u64 ns;
ns                736 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		ns = DPAA2_PTP_CLK_PERIOD_NS * le64_to_cpup(ts);
ns                737 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		shhwtstamps.hwtstamp = ns_to_ktime(ns);
ns                768 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		struct sk_buff *ns;
ns                770 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		ns = skb_realloc_headroom(skb, needed_headroom);
ns                771 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		if (unlikely(!ns)) {
ns                778 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 			skb_set_owner_w(ns, skb->sk);
ns                781 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 		skb = ns;
ns               1231 drivers/net/ethernet/freescale/fec_main.c 	u64 ns;
ns               1234 drivers/net/ethernet/freescale/fec_main.c 	ns = timecounter_cyc2time(&fep->tc, ts);
ns               1238 drivers/net/ethernet/freescale/fec_main.c 	hwtstamps->hwtstamp = ns_to_ktime(ns);
ns                103 drivers/net/ethernet/freescale/fec_ptp.c 	u64 ns;
ns                150 drivers/net/ethernet/freescale/fec_ptp.c 		ns = timecounter_cyc2time(&fep->tc, tempval);
ns                151 drivers/net/ethernet/freescale/fec_ptp.c 		ts = ns_to_timespec64(ns);
ns                382 drivers/net/ethernet/freescale/fec_ptp.c 	u64 ns;
ns                386 drivers/net/ethernet/freescale/fec_ptp.c 	ns = timecounter_read(&adapter->tc);
ns                389 drivers/net/ethernet/freescale/fec_ptp.c 	*ts = ns_to_timespec64(ns);
ns                408 drivers/net/ethernet/freescale/fec_ptp.c 	u64 ns;
ns                419 drivers/net/ethernet/freescale/fec_ptp.c 	ns = timespec64_to_ns(ts);
ns                423 drivers/net/ethernet/freescale/fec_ptp.c 	counter = ns & fep->cc.mask;
ns                427 drivers/net/ethernet/freescale/fec_ptp.c 	timecounter_init(&fep->tc, &fep->cc, ns);
ns                518 drivers/net/ethernet/freescale/fec_ptp.c 	u64 ns;
ns                524 drivers/net/ethernet/freescale/fec_ptp.c 		ns = timecounter_read(&fep->tc);
ns               2243 drivers/net/ethernet/freescale/gianfar.c 			u64 *ns = (u64 *)(((uintptr_t)skb->data + 0x10) &
ns               2247 drivers/net/ethernet/freescale/gianfar.c 			shhwtstamps.hwtstamp = ns_to_ktime(be64_to_cpu(*ns));
ns               2503 drivers/net/ethernet/freescale/gianfar.c 		u64 *ns = (u64 *) skb->data;
ns               2506 drivers/net/ethernet/freescale/gianfar.c 		shhwtstamps->hwtstamp = ns_to_ktime(be64_to_cpu(*ns));
ns                498 drivers/net/ethernet/hisilicon/hip04_eth.c 	unsigned long ns = priv->tx_coalesce_usecs * NSEC_PER_USEC / 2;
ns                501 drivers/net/ethernet/hisilicon/hip04_eth.c 	hrtimer_start_range_ns(&priv->tx_coalesce_timer, ns_to_ktime(ns),
ns                502 drivers/net/ethernet/hisilicon/hip04_eth.c 			       ns, HRTIMER_MODE_REL);
ns               1607 drivers/net/ethernet/intel/e100.c 	struct net_device_stats *ns = &dev->stats;
ns               1621 drivers/net/ethernet/intel/e100.c 		ns->tx_aborted_errors += le32_to_cpu(s->tx_max_collisions);
ns               1622 drivers/net/ethernet/intel/e100.c 		ns->tx_window_errors += le32_to_cpu(s->tx_late_collisions);
ns               1623 drivers/net/ethernet/intel/e100.c 		ns->tx_carrier_errors += le32_to_cpu(s->tx_lost_crs);
ns               1624 drivers/net/ethernet/intel/e100.c 		ns->tx_fifo_errors += le32_to_cpu(s->tx_underruns);
ns               1625 drivers/net/ethernet/intel/e100.c 		ns->collisions += nic->tx_collisions;
ns               1626 drivers/net/ethernet/intel/e100.c 		ns->tx_errors += le32_to_cpu(s->tx_max_collisions) +
ns               1630 drivers/net/ethernet/intel/e100.c 		ns->rx_length_errors = nic->rx_short_frame_errors +
ns               1632 drivers/net/ethernet/intel/e100.c 		ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors);
ns               1633 drivers/net/ethernet/intel/e100.c 		ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors);
ns               1634 drivers/net/ethernet/intel/e100.c 		ns->rx_over_errors += le32_to_cpu(s->rx_overrun_errors);
ns               1635 drivers/net/ethernet/intel/e100.c 		ns->rx_fifo_errors += le32_to_cpu(s->rx_overrun_errors);
ns               1636 drivers/net/ethernet/intel/e100.c 		ns->rx_missed_errors += le32_to_cpu(s->rx_resource_errors);
ns               1637 drivers/net/ethernet/intel/e100.c 		ns->rx_errors += le32_to_cpu(s->rx_crc_errors) +
ns                498 drivers/net/ethernet/intel/e1000e/netdev.c 	u64 ns;
ns                502 drivers/net/ethernet/intel/e1000e/netdev.c 	ns = timecounter_cyc2time(&adapter->tc, systim);
ns                506 drivers/net/ethernet/intel/e1000e/netdev.c 	hwtstamps->hwtstamp = ns_to_ktime(ns);
ns                180 drivers/net/ethernet/intel/e1000e/ptp.c 	u64 cycles, ns;
ns                186 drivers/net/ethernet/intel/e1000e/ptp.c 	ns = timecounter_cyc2time(&adapter->tc, cycles);
ns                190 drivers/net/ethernet/intel/e1000e/ptp.c 	*ts = ns_to_timespec64(ns);
ns                209 drivers/net/ethernet/intel/e1000e/ptp.c 	u64 ns;
ns                211 drivers/net/ethernet/intel/e1000e/ptp.c 	ns = timespec64_to_ns(ts);
ns                215 drivers/net/ethernet/intel/e1000e/ptp.c 	timecounter_init(&adapter->tc, &adapter->cc, ns);
ns                243 drivers/net/ethernet/intel/e1000e/ptp.c 	u64 ns;
ns                246 drivers/net/ethernet/intel/e1000e/ptp.c 	ns = timecounter_read(&adapter->tc);
ns                248 drivers/net/ethernet/intel/e1000e/ptp.c 	ts = ns_to_timespec64(ns);
ns                494 drivers/net/ethernet/intel/i40e/i40e_main.c 	struct rtnl_link_stats64 *ns;
ns                500 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns = i40e_get_vsi_stats_struct(vsi);
ns                501 drivers/net/ethernet/intel/i40e/i40e_main.c 	memset(ns, 0, sizeof(*ns));
ns                774 drivers/net/ethernet/intel/i40e/i40e_main.c 	struct rtnl_link_stats64 *ns;   /* netdev stats */
ns                792 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns = i40e_get_vsi_stats_struct(vsi);
ns                842 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns->rx_packets = rx_p;
ns                843 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns->rx_bytes = rx_b;
ns                844 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns->tx_packets = tx_p;
ns                845 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns->tx_bytes = tx_b;
ns                850 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns->tx_errors = es->tx_errors;
ns                852 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns->multicast = es->rx_multicast;
ns                854 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns->rx_dropped = es->rx_discards;
ns                856 drivers/net/ethernet/intel/i40e/i40e_main.c 	ns->tx_dropped = es->tx_discards;
ns                860 drivers/net/ethernet/intel/i40e/i40e_main.c 		ns->rx_crc_errors = pf->stats.crc_errors;
ns                861 drivers/net/ethernet/intel/i40e/i40e_main.c 		ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes;
ns                862 drivers/net/ethernet/intel/i40e/i40e_main.c 		ns->rx_length_errors = pf->stats.rx_length_errors;
ns                 42 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	u64 ns;
ns                 50 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	ns = (((u64)hi) << 32) | lo;
ns                 52 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	*ts = ns_to_timespec64(ns);
ns                 67 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	u64 ns = timespec64_to_ns(ts);
ns                 72 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	wr32(hw, I40E_PRTTSYN_TIME_L, ns & 0xFFFFFFFF);
ns                 73 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	wr32(hw, I40E_PRTTSYN_TIME_H, ns >> 32);
ns                368 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	u64 ns;
ns                380 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	ns = (((u64)hi) << 32) | lo;
ns                381 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	i40e_ptp_convert_to_hwtstamp(&shhwtstamps, ns);
ns                412 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	u64 ns;
ns                441 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	ns = (((u64)hi) << 32) | lo;
ns                443 drivers/net/ethernet/intel/i40e/i40e_ptp.c 	i40e_ptp_convert_to_hwtstamp(skb_hwtstamps(skb), ns);
ns                165 drivers/net/ethernet/intel/igb/igb_ptp.c 	u64 ns;
ns                174 drivers/net/ethernet/intel/igb/igb_ptp.c 		ns = timecounter_cyc2time(&adapter->tc, systim);
ns                179 drivers/net/ethernet/intel/igb/igb_ptp.c 		hwtstamps->hwtstamp = ns_to_ktime(ns);
ns                289 drivers/net/ethernet/intel/igb/igb_ptp.c 	u64 ns;
ns                298 drivers/net/ethernet/intel/igb/igb_ptp.c 	ns = timecounter_cyc2time(&igb->tc, ((u64)hi << 32) | lo);
ns                302 drivers/net/ethernet/intel/igb/igb_ptp.c 	*ts = ns_to_timespec64(ns);
ns                316 drivers/net/ethernet/intel/igb/igb_ptp.c 	u64 ns;
ns                326 drivers/net/ethernet/intel/igb/igb_ptp.c 	ns = timecounter_cyc2time(&igb->tc, ((u64)hi << 32) | lo);
ns                330 drivers/net/ethernet/intel/igb/igb_ptp.c 	*ts = ns_to_timespec64(ns);
ns                363 drivers/net/ethernet/intel/igb/igb_ptp.c 	u64 ns;
ns                365 drivers/net/ethernet/intel/igb/igb_ptp.c 	ns = timespec64_to_ns(ts);
ns                369 drivers/net/ethernet/intel/igb/igb_ptp.c 	timecounter_init(&igb->tc, &igb->cc, ns);
ns                520 drivers/net/ethernet/intel/igb/igb_ptp.c 	s64 ns;
ns                579 drivers/net/ethernet/intel/igb/igb_ptp.c 		ns = timespec64_to_ns(&ts);
ns                580 drivers/net/ethernet/intel/igb/igb_ptp.c 		ns = ns >> 1;
ns                581 drivers/net/ethernet/intel/igb/igb_ptp.c 		if (on && ((ns <= 70000000LL) || (ns == 125000000LL) ||
ns                582 drivers/net/ethernet/intel/igb/igb_ptp.c 			   (ns == 250000000LL) || (ns == 500000000LL))) {
ns                583 drivers/net/ethernet/intel/igb/igb_ptp.c 			if (ns < 8LL)
ns                587 drivers/net/ethernet/intel/igb/igb_ptp.c 		ts = ns_to_timespec64(ns);
ns                631 drivers/net/ethernet/intel/igb/igb_ptp.c 				wr32(freqout, ns);
ns                720 drivers/net/ethernet/intel/igb/igb_ptp.c 	u64 ns;
ns                723 drivers/net/ethernet/intel/igb/igb_ptp.c 	ns = timecounter_read(&igb->tc);
ns                725 drivers/net/ethernet/intel/igb/igb_ptp.c 	ts = ns_to_timespec64(ns);
ns                162 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	u64 ns = 0, clock_edge = 0, clock_period;
ns                196 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	ns = timecounter_read(&adapter->hw_tc);
ns                201 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	div_u64_rem(ns, NS_PER_SEC, &rem);
ns                241 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	u64 ns = 0, clock_edge = 0;
ns                279 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	ns = timecounter_read(&adapter->hw_tc);
ns                284 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	div_u64_rem(ns, NS_PER_SEC, &rem);
ns                399 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	u64 ns;
ns                430 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	ns = timecounter_cyc2time(&adapter->hw_tc, timestamp);
ns                433 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	hwtstamp->hwtstamp = ns_to_ktime(ns);
ns                564 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	u64 ns, stamp;
ns                592 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	ns = timecounter_cyc2time(&adapter->hw_tc, stamp);
ns                596 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	*ts = ns_to_timespec64(ns);
ns                615 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	u64 ns = timespec64_to_ns(ts);
ns                619 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 	timecounter_init(&adapter->hw_tc, &adapter->hw_cc, ns);
ns                181 drivers/net/ethernet/mellanox/mlx4/en_clock.c 	u64 ns;
ns                184 drivers/net/ethernet/mellanox/mlx4/en_clock.c 	ns = timecounter_read(&mdev->clock);
ns                187 drivers/net/ethernet/mellanox/mlx4/en_clock.c 	*ts = ns_to_timespec64(ns);
ns                205 drivers/net/ethernet/mellanox/mlx4/en_clock.c 	u64 ns = timespec64_to_ns(ts);
ns                210 drivers/net/ethernet/mellanox/mlx4/en_clock.c 	timecounter_init(&mdev->clock, &mdev->cycles, ns);
ns                214 drivers/net/ethernet/mellanox/mlx5/core/en/fs.h 	struct mlx5_flow_namespace      *ns;
ns                323 drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c 	ft->t = mlx5_create_flow_table(priv->fs.ns, &ft_attr);
ns               1146 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c 	ft->t = mlx5_create_flow_table(priv->fs.ns, &params->ft_attr);
ns               1192 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c 	ft->t = mlx5_create_flow_table(priv->fs.ns, &params->ft_attr);
ns               1365 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c 	ft->t = mlx5_create_flow_table(priv->fs.ns, &ft_attr);
ns               1486 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c 	ft->t = mlx5_create_flow_table(priv->fs.ns, &ft_attr);
ns               1527 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c 	priv->fs.ns = mlx5_get_flow_namespace(priv->mdev,
ns               1530 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c 	if (!priv->fs.ns)
ns                 62 drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c 	struct mlx5_flow_namespace *ns;
ns                 97 drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c 	ns = mlx5_get_flow_namespace(priv->mdev,
ns                 99 drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c 	if (!ns)
ns                105 drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c 	ft = mlx5_create_auto_grouped_flow_table(ns, prio,
ns               1520 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c 	priv->fs.ns = mlx5_get_flow_namespace(priv->mdev,
ns                969 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 			mlx5_create_auto_grouped_flow_table(priv->fs.ns,
ns                156 drivers/net/ethernet/mellanox/mlx5/core/eswitch.h 			struct mlx5_flow_namespace *ns;
ns                894 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 		       struct mlx5_flow_namespace *ns,
ns                906 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	fdb = mlx5_create_auto_grouped_flow_table(ns,
ns                926 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	struct mlx5_flow_namespace *ns;
ns                944 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	ns = mlx5_get_fdb_sub_ns(dev, chain);
ns                945 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	if (!ns) {
ns                966 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 		fdb = create_next_size_table(esw, ns, table_prio, l, flags);
ns               1070 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	esw->fdb_table.offloads.ns = root_ns;
ns               1238 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	mlx5_flow_namespace_set_mode(esw->fdb_table.offloads.ns,
ns               1247 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	struct mlx5_flow_namespace *ns;
ns               1250 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_OFFLOADS);
ns               1251 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	if (!ns) {
ns               1258 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	ft_offloads = mlx5_create_flow_table(ns, &ft_attr);
ns               1642 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	struct mlx5_flow_root_namespace *ns;
ns               1646 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 	ns = esw->dev->priv.steering->fdb_root_ns;
ns               1649 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 		err = mlx5_flow_namespace_set_peer(ns, peer_ns);
ns               1653 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 		err = mlx5_flow_namespace_set_peer(peer_ns, ns);
ns               1655 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 			mlx5_flow_namespace_set_peer(ns, NULL);
ns               1659 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 		mlx5_flow_namespace_set_peer(ns, NULL);
ns                995 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c static int fpga_ipsec_fs_create_flow_group(struct mlx5_flow_root_namespace *ns,
ns               1001 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	int (*create_flow_group)(struct mlx5_flow_root_namespace *ns,
ns               1007 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	struct mlx5_core_dev *dev = ns->dev;
ns               1014 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 		return create_flow_group(ns, ft, in, fg);
ns               1021 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 		return create_flow_group(ns, ft, in, fg);
ns               1030 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	ret = create_flow_group(ns, ft, in, fg);
ns               1038 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c static int fpga_ipsec_fs_create_fte(struct mlx5_flow_root_namespace *ns,
ns               1044 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	int (*create_fte)(struct mlx5_flow_root_namespace *ns,
ns               1049 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	struct mlx5_core_dev *dev = ns->dev;
ns               1061 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 		return create_fte(ns, ft, fg, fte);
ns               1078 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	ret = create_fte(ns, ft, fg, fte);
ns               1089 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c static int fpga_ipsec_fs_update_fte(struct mlx5_flow_root_namespace *ns,
ns               1096 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	int (*update_fte)(struct mlx5_flow_root_namespace *ns,
ns               1102 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	struct mlx5_core_dev *dev = ns->dev;
ns               1111 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 		return update_fte(ns, ft, fg, modify_mask, fte);
ns               1114 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	ret = update_fte(ns, ft, fg, modify_mask, fte);
ns               1120 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c static int fpga_ipsec_fs_delete_fte(struct mlx5_flow_root_namespace *ns,
ns               1125 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	int (*delete_fte)(struct mlx5_flow_root_namespace *ns,
ns               1129 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	struct mlx5_core_dev *dev = ns->dev;
ns               1141 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 		return delete_fte(ns, ft, fte);
ns               1151 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	ret = delete_fte(ns, ft, fte);
ns               1158 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c mlx5_fpga_ipsec_fs_create_flow_group_egress(struct mlx5_flow_root_namespace *ns,
ns               1163 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	return fpga_ipsec_fs_create_flow_group(ns, ft, in, fg, true);
ns               1167 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c mlx5_fpga_ipsec_fs_create_fte_egress(struct mlx5_flow_root_namespace *ns,
ns               1172 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	return fpga_ipsec_fs_create_fte(ns, ft, fg, fte, true);
ns               1176 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c mlx5_fpga_ipsec_fs_update_fte_egress(struct mlx5_flow_root_namespace *ns,
ns               1182 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	return fpga_ipsec_fs_update_fte(ns, ft, fg, modify_mask, fte,
ns               1187 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c mlx5_fpga_ipsec_fs_delete_fte_egress(struct mlx5_flow_root_namespace *ns,
ns               1191 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	return fpga_ipsec_fs_delete_fte(ns, ft, fte, true);
ns               1195 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c mlx5_fpga_ipsec_fs_create_flow_group_ingress(struct mlx5_flow_root_namespace *ns,
ns               1200 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	return fpga_ipsec_fs_create_flow_group(ns, ft, in, fg, false);
ns               1204 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c mlx5_fpga_ipsec_fs_create_fte_ingress(struct mlx5_flow_root_namespace *ns,
ns               1209 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	return fpga_ipsec_fs_create_fte(ns, ft, fg, fte, false);
ns               1213 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c mlx5_fpga_ipsec_fs_update_fte_ingress(struct mlx5_flow_root_namespace *ns,
ns               1219 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	return fpga_ipsec_fs_update_fte(ns, ft, fg, modify_mask, fte,
ns               1224 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c mlx5_fpga_ipsec_fs_delete_fte_ingress(struct mlx5_flow_root_namespace *ns,
ns               1228 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c 	return fpga_ipsec_fs_delete_fte(ns, ft, fte, false);
ns                 42 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_update_root_ft(struct mlx5_flow_root_namespace *ns,
ns                 50 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_create_flow_table(struct mlx5_flow_root_namespace *ns,
ns                 58 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_destroy_flow_table(struct mlx5_flow_root_namespace *ns,
ns                 64 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_modify_flow_table(struct mlx5_flow_root_namespace *ns,
ns                 71 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_create_flow_group(struct mlx5_flow_root_namespace *ns,
ns                 79 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_destroy_flow_group(struct mlx5_flow_root_namespace *ns,
ns                 86 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_create_fte(struct mlx5_flow_root_namespace *ns,
ns                 94 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_update_fte(struct mlx5_flow_root_namespace *ns,
ns                103 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_delete_fte(struct mlx5_flow_root_namespace *ns,
ns                110 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_packet_reformat_alloc(struct mlx5_flow_root_namespace *ns,
ns                120 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static void mlx5_cmd_stub_packet_reformat_dealloc(struct mlx5_flow_root_namespace *ns,
ns                125 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_modify_header_alloc(struct mlx5_flow_root_namespace *ns,
ns                133 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static void mlx5_cmd_stub_modify_header_dealloc(struct mlx5_flow_root_namespace *ns,
ns                138 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_set_peer(struct mlx5_flow_root_namespace *ns,
ns                144 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_create_ns(struct mlx5_flow_root_namespace *ns)
ns                149 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_stub_destroy_ns(struct mlx5_flow_root_namespace *ns)
ns                154 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_update_root_ft(struct mlx5_flow_root_namespace *ns,
ns                160 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                187 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_create_flow_table(struct mlx5_flow_root_namespace *ns,
ns                197 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                249 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_destroy_flow_table(struct mlx5_flow_root_namespace *ns,
ns                254 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                268 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_modify_flow_table(struct mlx5_flow_root_namespace *ns,
ns                274 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                316 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_create_flow_group(struct mlx5_flow_root_namespace *ns,
ns                323 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                342 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_destroy_flow_group(struct mlx5_flow_root_namespace *ns,
ns                348 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                567 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_create_fte(struct mlx5_flow_root_namespace *ns,
ns                572 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                578 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_update_fte(struct mlx5_flow_root_namespace *ns,
ns                585 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                596 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_delete_fte(struct mlx5_flow_root_namespace *ns,
ns                602 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                693 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_packet_reformat_alloc(struct mlx5_flow_root_namespace *ns,
ns                701 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                750 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static void mlx5_cmd_packet_reformat_dealloc(struct mlx5_flow_root_namespace *ns,
ns                755 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                766 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static int mlx5_cmd_modify_header_alloc(struct mlx5_flow_root_namespace *ns,
ns                773 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                829 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c static void mlx5_cmd_modify_header_dealloc(struct mlx5_flow_root_namespace *ns,
ns                834 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c 	struct mlx5_core_dev *dev = ns->dev;
ns                 39 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*create_flow_table)(struct mlx5_flow_root_namespace *ns,
ns                 43 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*destroy_flow_table)(struct mlx5_flow_root_namespace *ns,
ns                 46 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*modify_flow_table)(struct mlx5_flow_root_namespace *ns,
ns                 50 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*create_flow_group)(struct mlx5_flow_root_namespace *ns,
ns                 55 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*destroy_flow_group)(struct mlx5_flow_root_namespace *ns,
ns                 59 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*create_fte)(struct mlx5_flow_root_namespace *ns,
ns                 64 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*update_fte)(struct mlx5_flow_root_namespace *ns,
ns                 70 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*delete_fte)(struct mlx5_flow_root_namespace *ns,
ns                 74 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*update_root_ft)(struct mlx5_flow_root_namespace *ns,
ns                 79 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*packet_reformat_alloc)(struct mlx5_flow_root_namespace *ns,
ns                 86 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	void (*packet_reformat_dealloc)(struct mlx5_flow_root_namespace *ns,
ns                 89 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*modify_header_alloc)(struct mlx5_flow_root_namespace *ns,
ns                 94 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	void (*modify_header_dealloc)(struct mlx5_flow_root_namespace *ns,
ns                 97 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*set_peer)(struct mlx5_flow_root_namespace *ns,
ns                100 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*create_ns)(struct mlx5_flow_root_namespace *ns);
ns                101 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h 	int (*destroy_ns)(struct mlx5_flow_root_namespace *ns);
ns                353 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c static struct fs_prio *find_prio(struct mlx5_flow_namespace *ns,
ns                358 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	fs_for_each_prio(iter_prio, ns) {
ns                382 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace *ns;
ns                391 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ns = container_of(root, struct mlx5_flow_namespace, node);
ns                392 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return container_of(ns, struct mlx5_flow_root_namespace, ns);
ns               1003 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespace *ns,
ns               1008 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_root_namespace *root = find_root(&ns->node);
ns               1021 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	fs_prio = find_prio(ns, ft_attr->prio);
ns               1047 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ft->def_miss_action = ns->def_miss_action;
ns               1073 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c struct mlx5_flow_table *mlx5_create_flow_table(struct mlx5_flow_namespace *ns,
ns               1076 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return __mlx5_create_flow_table(ns, ft_attr, FS_FT_OP_MOD_NORMAL, 0);
ns               1079 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c struct mlx5_flow_table *mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns,
ns               1089 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return __mlx5_create_flow_table(ns, &ft_attr, FS_FT_OP_MOD_NORMAL, vport);
ns               1093 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c mlx5_create_lag_demux_flow_table(struct mlx5_flow_namespace *ns,
ns               1100 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return __mlx5_create_flow_table(ns, &ft_attr, FS_FT_OP_MOD_LAG_DEMUX, 0);
ns               1105 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns,
ns               1123 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ft = mlx5_create_flow_table(ns, &ft_attr);
ns               2076 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace *ns;
ns               2084 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			return &steering->fdb_root_ns->ns;
ns               2088 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			return &steering->sniffer_rx_root_ns->ns;
ns               2092 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			return &steering->sniffer_tx_root_ns->ns;
ns               2114 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	fs_prio = find_prio(&root_ns->ns, prio);
ns               2118 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ns = list_first_entry(&fs_prio->node.children,
ns               2119 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			      typeof(*ns),
ns               2122 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return ns;
ns               2139 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			return &steering->esw_egress_root_ns[vport]->ns;
ns               2145 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			return &steering->esw_ingress_root_ns[vport]->ns;
ns               2153 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c static struct fs_prio *_fs_create_prio(struct mlx5_flow_namespace *ns,
ns               2166 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	tree_add_node(&fs_prio->node, &ns->node);
ns               2169 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	list_add_tail(&fs_prio->node.list, &ns->node.children);
ns               2174 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c static struct fs_prio *fs_create_prio_chained(struct mlx5_flow_namespace *ns,
ns               2178 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return _fs_create_prio(ns, prio, num_levels, FS_TYPE_PRIO_CHAINS);
ns               2181 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c static struct fs_prio *fs_create_prio(struct mlx5_flow_namespace *ns,
ns               2184 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return _fs_create_prio(ns, prio, num_levels, FS_TYPE_PRIO);
ns               2188 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 						     *ns)
ns               2190 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ns->node.type = FS_TYPE_NAMESPACE;
ns               2192 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return ns;
ns               2198 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace	*ns;
ns               2200 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ns = kzalloc(sizeof(*ns), GFP_KERNEL);
ns               2201 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	if (!ns)
ns               2204 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	fs_init_namespace(ns);
ns               2205 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ns->def_miss_action = def_miss_act;
ns               2206 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	tree_init_node(&ns->node, NULL, del_sw_ns);
ns               2207 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	tree_add_node(&ns->node, &prio->node);
ns               2208 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	list_add_tail(&ns->node.list, &prio->node.children);
ns               2210 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return ns;
ns               2213 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c static int create_leaf_prios(struct mlx5_flow_namespace *ns, int prio,
ns               2220 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 		fs_prio = fs_create_prio(ns, prio++, prio_metadata->num_levels);
ns               2319 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace *ns;
ns               2336 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ns = &root_ns->ns;
ns               2337 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	fs_init_namespace(ns);
ns               2339 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	tree_init_node(&ns->node, NULL, NULL);
ns               2340 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	tree_add_node(&ns->node, NULL);
ns               2347 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c static int set_prio_attrs_in_ns(struct mlx5_flow_namespace *ns, int acc_level)
ns               2351 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	fs_for_each_prio(prio, ns) {
ns               2361 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace *ns;
ns               2365 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	fs_for_each_ns(ns, prio)
ns               2367 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 		acc_level_ns = set_prio_attrs_in_ns(ns, acc_level);
ns               2375 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace *ns = &root_ns->ns;
ns               2379 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	fs_for_each_prio(prio, ns) {
ns               2390 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace *ns = NULL;
ns               2394 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ns = mlx5_get_flow_namespace(steering->dev, MLX5_FLOW_NAMESPACE_ANCHOR);
ns               2395 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	if (WARN_ON(!ns))
ns               2402 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	ft = mlx5_create_flow_table(ns, &ft_attr);
ns               2418 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	err = init_root_tree(steering, &root_fs, &steering->root_ns->ns.node);
ns               2454 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	clean_tree(&root_ns->ns.node);
ns               2517 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	prio = fs_create_prio(&steering->sniffer_tx_root_ns->ns, 0, 1);
ns               2530 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	prio = fs_create_prio(&steering->sniffer_rx_root_ns->ns, 0, 1);
ns               2543 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			     &steering->rdma_rx_root_ns->ns.node);
ns               2558 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace *ns;
ns               2575 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	maj_prio = fs_create_prio(&steering->fdb_root_ns->ns, FDB_BYPASS_PATH,
ns               2583 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	maj_prio = fs_create_prio_chained(&steering->fdb_root_ns->ns,
ns               2592 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 		ns = fs_create_namespace(maj_prio, MLX5_FLOW_TABLE_MISS_ACTION_DEF);
ns               2593 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 		if (IS_ERR(ns)) {
ns               2594 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			err = PTR_ERR(ns);
ns               2599 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			min_prio = fs_create_prio(ns, prio, 2);
ns               2606 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 		steering->fdb_sub_ns[chain] = ns;
ns               2609 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	maj_prio = fs_create_prio(&steering->fdb_root_ns->ns, FDB_SLOW_PATH, 1);
ns               2635 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	prio = fs_create_prio(&steering->esw_egress_root_ns[vport]->ns, 0, 1);
ns               2648 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	prio = fs_create_prio(&steering->esw_ingress_root_ns[vport]->ns, 0, 1);
ns               2722 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 			     &steering->egress_root_ns->ns.node);
ns               2899 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	struct mlx5_flow_namespace *ns;
ns               2903 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 		ns = mlx5_get_flow_vport_acl_namespace(dev, ns_type, 0);
ns               2905 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 		ns = mlx5_get_flow_namespace(dev, ns_type);
ns               2906 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	if (!ns)
ns               2909 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return find_root(&ns->node);
ns               2998 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c int mlx5_flow_namespace_set_peer(struct mlx5_flow_root_namespace *ns,
ns               3001 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	if (peer_ns && ns->mode != peer_ns->mode) {
ns               3002 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 		mlx5_core_err(ns->dev,
ns               3007 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	return ns->cmds->set_peer(ns, peer_ns);
ns               3014 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c int mlx5_flow_namespace_set_mode(struct mlx5_flow_namespace *ns,
ns               3021 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	root = find_root(&ns->node);
ns               3022 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 	if (&root->ns != ns)
ns                244 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h 	struct mlx5_flow_namespace	ns;
ns                266 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h int mlx5_flow_namespace_set_peer(struct mlx5_flow_root_namespace *ns,
ns                269 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h int mlx5_flow_namespace_set_mode(struct mlx5_flow_namespace *ns,
ns                289 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h #define fs_for_each_prio(pos, ns)			\
ns                290 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h 	fs_list_for_each_entry(pos, &(ns)->node.children)
ns                308 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c 	priv->fs.ns = mlx5_get_flow_namespace(priv->mdev,
ns                311 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c 	if (!priv->fs.ns)
ns                148 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	u64 ns = timespec64_to_ns(ts);
ns                152 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	timecounter_init(&clock->tc, &clock->cycles, ns);
ns                167 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	u64 cycles, ns;
ns                171 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	ns = timecounter_cyc2time(&clock->tc, cycles);
ns                174 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	*ts = ns_to_timespec64(ns);
ns                301 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	s64 ns;
ns                323 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 		ns = timespec64_to_ns(&ts);
ns                325 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 		if ((ns >> 1) != 500000000LL)
ns                330 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 		ns = timespec64_to_ns(&ts);
ns                334 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 		nsec_delta = ns - nsec_now;
ns                471 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	u64 nsec_now, nsec_delta, ns;
ns                497 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 		ns = timespec64_to_ns(&ts);
ns                500 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 		nsec_delta = ns - nsec_now;
ns                519 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	u64 ns;
ns                550 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	ns = cyclecounter_cyc2ns(&clock->cycles, overflow_cycles,
ns                552 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	do_div(ns, NSEC_PER_SEC / HZ);
ns                553 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 	clock->overflow_period = ns;
ns                 28 drivers/net/ethernet/mellanox/mlx5/core/rdma.c 	struct mlx5_flow_namespace *ns = NULL;
ns                 51 drivers/net/ethernet/mellanox/mlx5/core/rdma.c 	ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_RDMA_RX_KERNEL);
ns                 52 drivers/net/ethernet/mellanox/mlx5/core/rdma.c 	if (!ns) {
ns                 59 drivers/net/ethernet/mellanox/mlx5/core/rdma.c 	ft = mlx5_create_flow_table(ns, &ft_attr);
ns                 18 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_update_root_ft(struct mlx5_flow_root_namespace *ns,
ns                 23 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	return mlx5_fs_cmd_get_fw_cmds()->update_root_ft(ns, ft, underlay_qpn,
ns                 27 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int set_miss_action(struct mlx5_flow_root_namespace *ns,
ns                 48 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 			mlx5_core_err(ns->dev, "Failed to destroy action (%d)\n",
ns                 56 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 			mlx5_core_err(ns->dev, "Failed to destroy action (%d)\n",
ns                 63 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_create_flow_table(struct mlx5_flow_root_namespace *ns,
ns                 72 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		return mlx5_fs_cmd_get_fw_cmds()->create_flow_table(ns, ft,
ns                 76 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	tbl = mlx5dr_table_create(ns->fs_dr_domain.dr_domain,
ns                 79 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		mlx5_core_err(ns->dev, "Failed creating dr flow_table\n");
ns                 87 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		err = set_miss_action(ns, ft, next_ft);
ns                 98 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_destroy_flow_table(struct mlx5_flow_root_namespace *ns,
ns                105 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		return mlx5_fs_cmd_get_fw_cmds()->destroy_flow_table(ns, ft);
ns                109 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		mlx5_core_err(ns->dev, "Failed to destroy flow_table (%d)\n",
ns                116 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 			mlx5_core_err(ns->dev, "Failed to destroy action(%d)\n",
ns                125 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_modify_flow_table(struct mlx5_flow_root_namespace *ns,
ns                129 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	return set_miss_action(ns, ft, next_ft);
ns                132 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_create_flow_group(struct mlx5_flow_root_namespace *ns,
ns                146 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		return mlx5_fs_cmd_get_fw_cmds()->create_flow_group(ns, ft, in,
ns                158 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		mlx5_core_err(ns->dev, "Failed creating matcher\n");
ns                166 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_destroy_flow_group(struct mlx5_flow_root_namespace *ns,
ns                171 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		return mlx5_fs_cmd_get_fw_cmds()->destroy_flow_group(ns, ft, fg);
ns                210 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_create_fte(struct mlx5_flow_root_namespace *ns,
ns                215 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	struct mlx5dr_domain *domain = ns->fs_dr_domain.dr_domain;
ns                218 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	struct mlx5_core_dev *dev = ns->dev;
ns                232 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		return mlx5_fs_cmd_get_fw_cmds()->create_fte(ns, ft, group, fte);
ns                449 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_packet_reformat_alloc(struct mlx5_flow_root_namespace *ns,
ns                456 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	struct mlx5dr_domain *dr_domain = ns->fs_dr_domain.dr_domain;
ns                473 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		mlx5_core_err(ns->dev, "Packet-reformat not supported(%d)\n",
ns                483 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		mlx5_core_err(ns->dev, "Failed allocating packet-reformat action\n");
ns                492 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static void mlx5_cmd_dr_packet_reformat_dealloc(struct mlx5_flow_root_namespace *ns,
ns                498 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_modify_header_alloc(struct mlx5_flow_root_namespace *ns,
ns                503 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	struct mlx5dr_domain *dr_domain = ns->fs_dr_domain.dr_domain;
ns                513 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		mlx5_core_err(ns->dev, "Failed allocating modify-header action\n");
ns                522 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static void mlx5_cmd_dr_modify_header_dealloc(struct mlx5_flow_root_namespace *ns,
ns                528 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_update_fte(struct mlx5_flow_root_namespace *ns,
ns                537 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_delete_fte(struct mlx5_flow_root_namespace *ns,
ns                546 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		return mlx5_fs_cmd_get_fw_cmds()->delete_fte(ns, ft, fte);
ns                560 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_set_peer(struct mlx5_flow_root_namespace *ns,
ns                567 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	mlx5dr_domain_set_peer(ns->fs_dr_domain.dr_domain,
ns                572 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_create_ns(struct mlx5_flow_root_namespace *ns)
ns                574 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	ns->fs_dr_domain.dr_domain =
ns                575 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		mlx5dr_domain_create(ns->dev,
ns                577 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	if (!ns->fs_dr_domain.dr_domain) {
ns                578 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 		mlx5_core_err(ns->dev, "Failed to create dr flow namespace\n");
ns                584 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c static int mlx5_cmd_dr_destroy_ns(struct mlx5_flow_root_namespace *ns)
ns                586 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c 	return mlx5dr_domain_destroy(ns->fs_dr_domain.dr_domain);
ns               1820 drivers/net/ethernet/mscc/ocelot.c 	s64 ns;
ns               1832 drivers/net/ethernet/mscc/ocelot.c 	ns = ocelot_read_rix(ocelot, PTP_PIN_TOD_NSEC, TOD_ACC_PIN);
ns               1837 drivers/net/ethernet/mscc/ocelot.c 	if (ns >= 0x3ffffff0 && ns <= 0x3fffffff) {
ns               1839 drivers/net/ethernet/mscc/ocelot.c 		ns &= 0xf;
ns               1840 drivers/net/ethernet/mscc/ocelot.c 		ns += 999999984;
ns               1843 drivers/net/ethernet/mscc/ocelot.c 	set_normalized_timespec64(ts, s, ns);
ns                502 drivers/net/ethernet/neterion/vxge/vxge-main.c 			u32 ns = *(u32 *)(skb->head + pkt_length);
ns                505 drivers/net/ethernet/neterion/vxge/vxge-main.c 			skb_hwts->hwtstamp = ns_to_ktime(ns);
ns                136 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c 	u64 ns;
ns                160 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c 	ns = pch_rx_snap_read(pdev);
ns                164 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c 	shhwtstamps->hwtstamp = ns_to_ktime(ns);
ns                175 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c 	u64 ns;
ns                201 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c 	ns = pch_tx_snap_read(pdev);
ns                204 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c 	shhwtstamps.hwtstamp = ns_to_ktime(ns);
ns                740 drivers/net/ethernet/pensando/ionic/ionic_lif.c 			      struct rtnl_link_stats64 *ns)
ns                745 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	memset(ns, 0, sizeof(*ns));
ns                748 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->rx_packets = le64_to_cpu(ls->rx_ucast_packets) +
ns                752 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->tx_packets = le64_to_cpu(ls->tx_ucast_packets) +
ns                756 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->rx_bytes = le64_to_cpu(ls->rx_ucast_bytes) +
ns                760 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->tx_bytes = le64_to_cpu(ls->tx_ucast_bytes) +
ns                764 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->rx_dropped = le64_to_cpu(ls->rx_ucast_drop_packets) +
ns                768 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->tx_dropped = le64_to_cpu(ls->tx_ucast_drop_packets) +
ns                772 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->multicast = le64_to_cpu(ls->rx_mcast_packets);
ns                774 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->rx_over_errors = le64_to_cpu(ls->rx_queue_empty);
ns                776 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->rx_missed_errors = le64_to_cpu(ls->rx_dma_error) +
ns                781 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->tx_aborted_errors = le64_to_cpu(ls->tx_dma_error) +
ns                786 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->rx_errors = ns->rx_over_errors +
ns                787 drivers/net/ethernet/pensando/ionic/ionic_lif.c 			ns->rx_missed_errors;
ns                789 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	ns->tx_errors = ns->tx_aborted_errors;
ns                105 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	u64 ns;
ns                111 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	ns = timecounter_read(&ptp->tc);
ns                114 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	DP_VERBOSE(edev, QED_MSG_DEBUG, "PTP gettime called, ns = %llu\n", ns);
ns                116 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	*ts = ns_to_timespec64(ns);
ns                126 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	u64 ns;
ns                131 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	ns = timespec64_to_ns(ts);
ns                133 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	DP_VERBOSE(edev, QED_MSG_DEBUG, "PTP settime called, ns = %llu\n", ns);
ns                137 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	timecounter_init(&ptp->tc, &ptp->cc, ns);
ns                164 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	u64 timestamp, ns;
ns                192 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	ns = timecounter_cyc2time(&ptp->tc, timestamp);
ns                194 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	shhwtstamps.hwtstamp = ns_to_ktime(ns);
ns                202 drivers/net/ethernet/qlogic/qede/qede_ptp.c 		   timestamp, ns);
ns                560 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	u64 timestamp, ns;
ns                575 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	ns = timecounter_cyc2time(&ptp->tc, timestamp);
ns                577 drivers/net/ethernet/qlogic/qede/qede_ptp.c 	skb_hwtstamps(skb)->hwtstamp = ns_to_ktime(ns);
ns                580 drivers/net/ethernet/qlogic/qede/qede_ptp.c 		   timestamp, ns);
ns                 65 drivers/net/ethernet/renesas/ravb_ptp.c static int ravb_ptp_update_compare(struct ravb_private *priv, u32 ns)
ns                 76 drivers/net/ethernet/renesas/ravb_ptp.c 	if (ns < gti_ns_plus_1)
ns                 77 drivers/net/ethernet/renesas/ravb_ptp.c 		ns = gti_ns_plus_1;
ns                 78 drivers/net/ethernet/renesas/ravb_ptp.c 	else if (ns > 0 - gti_ns_plus_1)
ns                 79 drivers/net/ethernet/renesas/ravb_ptp.c 		ns = 0 - gti_ns_plus_1;
ns                 84 drivers/net/ethernet/renesas/ravb_ptp.c 	ravb_write(ndev, ns, GPTC);
ns                465 drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c 	u64 ns;
ns                467 drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c 	ns = p->tstamp_lo;
ns                468 drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c 	ns |= ((u64)p->tstamp_hi) << 32;
ns                470 drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c 	return ns;
ns               2088 drivers/net/ethernet/sfc/ef10.c 		unsigned int ns = usecs * 1000;
ns               2092 drivers/net/ethernet/sfc/ef10.c 		MCDI_SET_DWORD(inbuf, SET_EVQ_TMR_IN_TMR_LOAD_REQ_NS, ns);
ns               2093 drivers/net/ethernet/sfc/ef10.c 		MCDI_SET_DWORD(inbuf, SET_EVQ_TMR_IN_TMR_RELOAD_REQ_NS, ns);
ns                298 drivers/net/ethernet/sfc/ptp.c 	void (*ns_to_nic_time)(s64 ns, u32 *nic_major, u32 *nic_minor);
ns                441 drivers/net/ethernet/sfc/ptp.c static void efx_ptp_ns_to_s_ns(s64 ns, u32 *nic_major, u32 *nic_minor)
ns                443 drivers/net/ethernet/sfc/ptp.c 	struct timespec64 ts = ns_to_timespec64(ns);
ns                471 drivers/net/ethernet/sfc/ptp.c static void efx_ptp_ns_to_s27(s64 ns, u32 *nic_major, u32 *nic_minor)
ns                473 drivers/net/ethernet/sfc/ptp.c 	struct timespec64 ts = ns_to_timespec64(ns);
ns                492 drivers/net/ethernet/sfc/ptp.c 	u32 ns = (u32)(((u64)nic_minor * NSEC_PER_SEC +
ns                494 drivers/net/ethernet/sfc/ptp.c 	return ktime_set(nic_major, ns);
ns                514 drivers/net/ethernet/sfc/ptp.c static void efx_ptp_ns_to_s_qns(s64 ns, u32 *nic_major, u32 *nic_minor)
ns                516 drivers/net/ethernet/sfc/ptp.c 	struct timespec64 ts = ns_to_timespec64(ns);
ns                470 drivers/net/ethernet/smsc/smc91c92_cs.c 	if ((parse.version_1.ns > 3) && (cvt_ascii_address(dev, buf) == 0))
ns                229 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c 	u64 ns;
ns                231 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c 	ns = le32_to_cpu(p->des0);
ns                233 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c 	ns += le32_to_cpu(p->des1) * 1000000000ULL;
ns                235 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c 	*ts = ns;
ns                 88 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c 	u64 ns = 0;
ns                 90 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c 	ns += le32_to_cpu(p->des1) * 1000000000ULL;
ns                 91 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c 	ns += le32_to_cpu(p->des0);
ns                 93 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c 	*ts = ns;
ns                387 drivers/net/ethernet/stmicro/stmmac/enh_desc.c 	u64 ns;
ns                391 drivers/net/ethernet/stmicro/stmmac/enh_desc.c 		ns = le32_to_cpu(p->des6);
ns                393 drivers/net/ethernet/stmicro/stmmac/enh_desc.c 		ns += le32_to_cpu(p->des7) * 1000000000ULL;
ns                396 drivers/net/ethernet/stmicro/stmmac/enh_desc.c 		ns = le32_to_cpu(p->des2);
ns                397 drivers/net/ethernet/stmicro/stmmac/enh_desc.c 		ns += le32_to_cpu(p->des3) * 1000000000ULL;
ns                400 drivers/net/ethernet/stmicro/stmmac/enh_desc.c 	*ts = ns;
ns                251 drivers/net/ethernet/stmicro/stmmac/norm_desc.c 	u64 ns;
ns                253 drivers/net/ethernet/stmicro/stmmac/norm_desc.c 	ns = le32_to_cpu(p->des2);
ns                255 drivers/net/ethernet/stmicro/stmmac/norm_desc.c 	ns += le32_to_cpu(p->des3) * 1000000000ULL;
ns                257 drivers/net/ethernet/stmicro/stmmac/norm_desc.c 	*ts = ns;
ns                152 drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c 	u64 ns;
ns                155 drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c 	ns = readl(ioaddr + PTP_STNSR);
ns                157 drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c 	ns += readl(ioaddr + PTP_STSR) * 1000000000ULL;
ns                160 drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c 		*systime = ns;
ns                437 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u64 ns = 0;
ns                448 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_get_timestamp(priv, p, priv->adv_ts, &ns);
ns                450 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	} else if (!stmmac_get_mac_tx_timestamp(priv, priv->hw, &ns)) {
ns                456 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		shhwtstamp.hwtstamp = ns_to_ktime(ns);
ns                458 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		netdev_dbg(priv->dev, "get valid TX hw timestamp %llu\n", ns);
ns                478 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u64 ns = 0;
ns                488 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_get_timestamp(priv, desc, priv->adv_ts, &ns);
ns                489 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		netdev_dbg(priv->dev, "get valid RX hw timestamp %llu\n", ns);
ns                492 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		shhwtstamp->hwtstamp = ns_to_ktime(ns);
ns                 98 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c 	u64 ns = 0;
ns                101 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c 	stmmac_get_systime(priv, priv->ptpaddr, &ns);
ns                104 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c 	*ts = ns_to_timespec64(ns);
ns                115 drivers/net/ethernet/ti/cpts.c 			u64 ns = timecounter_cyc2time(&cpts->tc, event->low);
ns                118 drivers/net/ethernet/ti/cpts.c 			ssh.hwtstamp = ns_to_ktime(ns);
ns                258 drivers/net/ethernet/ti/cpts.c 	u64 ns;
ns                263 drivers/net/ethernet/ti/cpts.c 	ns = timecounter_read(&cpts->tc);
ns                266 drivers/net/ethernet/ti/cpts.c 	*ts = ns_to_timespec64(ns);
ns                274 drivers/net/ethernet/ti/cpts.c 	u64 ns;
ns                278 drivers/net/ethernet/ti/cpts.c 	ns = timespec64_to_ns(ts);
ns                281 drivers/net/ethernet/ti/cpts.c 	timecounter_init(&cpts->tc, &cpts->cc, ns);
ns                369 drivers/net/ethernet/ti/cpts.c 	u64 ns = 0;
ns                393 drivers/net/ethernet/ti/cpts.c 			ns = timecounter_cyc2time(&cpts->tc, event->low);
ns                400 drivers/net/ethernet/ti/cpts.c 	if (ev_type == CPTS_EV_TX && !ns) {
ns                414 drivers/net/ethernet/ti/cpts.c 	return ns;
ns                419 drivers/net/ethernet/ti/cpts.c 	u64 ns;
ns                422 drivers/net/ethernet/ti/cpts.c 	ns = cpts_find_ts(cpts, skb, CPTS_EV_RX);
ns                423 drivers/net/ethernet/ti/cpts.c 	if (!ns)
ns                427 drivers/net/ethernet/ti/cpts.c 	ssh->hwtstamp = ns_to_ktime(ns);
ns                433 drivers/net/ethernet/ti/cpts.c 	u64 ns;
ns                438 drivers/net/ethernet/ti/cpts.c 	ns = cpts_find_ts(cpts, skb, CPTS_EV_TX);
ns                439 drivers/net/ethernet/ti/cpts.c 	if (!ns)
ns                442 drivers/net/ethernet/ti/cpts.c 	ssh.hwtstamp = ns_to_ktime(ns);
ns                501 drivers/net/ethernet/ti/cpts.c 	u64 frac, maxsec, ns;
ns                529 drivers/net/ethernet/ti/cpts.c 	ns = cyclecounter_cyc2ns(&cpts->cc, freq, cpts->cc.mask, &frac);
ns                533 drivers/net/ethernet/ti/cpts.c 		 freq, cpts->cc.mult, cpts->cc.shift, (ns - NSEC_PER_SEC));
ns                284 drivers/net/ethernet/xscale/ixp4xx_eth.c 	u64 ns;
ns                311 drivers/net/ethernet/xscale/ixp4xx_eth.c 	ns = ((u64) hi) << 32;
ns                312 drivers/net/ethernet/xscale/ixp4xx_eth.c 	ns |= lo;
ns                313 drivers/net/ethernet/xscale/ixp4xx_eth.c 	ns <<= TICKS_NS_SHIFT;
ns                317 drivers/net/ethernet/xscale/ixp4xx_eth.c 	shhwtstamps->hwtstamp = ns_to_ktime(ns);
ns                327 drivers/net/ethernet/xscale/ixp4xx_eth.c 	u64 ns;
ns                357 drivers/net/ethernet/xscale/ixp4xx_eth.c 	ns = ((u64) hi) << 32;
ns                358 drivers/net/ethernet/xscale/ixp4xx_eth.c 	ns |= lo;
ns                359 drivers/net/ethernet/xscale/ixp4xx_eth.c 	ns <<= TICKS_NS_SHIFT;
ns                362 drivers/net/ethernet/xscale/ixp4xx_eth.c 	shhwtstamps.hwtstamp = ns_to_ktime(ns);
ns                 41 drivers/net/netdevsim/bpf.c 	struct netdevsim *ns;
ns                 82 drivers/net/netdevsim/bpf.c static bool nsim_xdp_offload_active(struct netdevsim *ns)
ns                 84 drivers/net/netdevsim/bpf.c 	return ns->xdp_hw.prog;
ns                 99 drivers/net/netdevsim/bpf.c nsim_bpf_offload(struct netdevsim *ns, struct bpf_prog *prog, bool oldprog)
ns                101 drivers/net/netdevsim/bpf.c 	nsim_prog_set_loaded(ns->bpf_offloaded, false);
ns                103 drivers/net/netdevsim/bpf.c 	WARN(!!ns->bpf_offloaded != oldprog,
ns                106 drivers/net/netdevsim/bpf.c 	ns->bpf_offloaded = prog;
ns                107 drivers/net/netdevsim/bpf.c 	ns->bpf_offloaded_id = prog ? prog->aux->id : 0;
ns                118 drivers/net/netdevsim/bpf.c 	struct netdevsim *ns = cb_priv;
ns                127 drivers/net/netdevsim/bpf.c 	if (!tc_cls_can_offload_and_chain0(ns->netdev, &cls_bpf->common))
ns                136 drivers/net/netdevsim/bpf.c 	if (!ns->bpf_tc_accept) {
ns                142 drivers/net/netdevsim/bpf.c 	if (prog && !prog->aux->offload && !ns->bpf_tc_non_bound_accept) {
ns                154 drivers/net/netdevsim/bpf.c 	if (ns->bpf_offloaded != oldprog) {
ns                158 drivers/net/netdevsim/bpf.c 		if (ns->bpf_offloaded) {
ns                165 drivers/net/netdevsim/bpf.c 	return nsim_bpf_offload(ns, cls_bpf->prog, oldprog);
ns                168 drivers/net/netdevsim/bpf.c int nsim_bpf_disable_tc(struct netdevsim *ns)
ns                170 drivers/net/netdevsim/bpf.c 	if (ns->bpf_offloaded && !nsim_xdp_offload_active(ns))
ns                175 drivers/net/netdevsim/bpf.c static int nsim_xdp_offload_prog(struct netdevsim *ns, struct netdev_bpf *bpf)
ns                177 drivers/net/netdevsim/bpf.c 	if (!nsim_xdp_offload_active(ns) && !bpf->prog)
ns                179 drivers/net/netdevsim/bpf.c 	if (!nsim_xdp_offload_active(ns) && bpf->prog && ns->bpf_offloaded) {
ns                184 drivers/net/netdevsim/bpf.c 	return nsim_bpf_offload(ns, bpf->prog, nsim_xdp_offload_active(ns));
ns                188 drivers/net/netdevsim/bpf.c nsim_xdp_set_prog(struct netdevsim *ns, struct netdev_bpf *bpf,
ns                196 drivers/net/netdevsim/bpf.c 	if (bpf->command == XDP_SETUP_PROG && !ns->bpf_xdpdrv_accept) {
ns                200 drivers/net/netdevsim/bpf.c 	if (bpf->command == XDP_SETUP_PROG_HW && !ns->bpf_xdpoffload_accept) {
ns                206 drivers/net/netdevsim/bpf.c 		err = nsim_xdp_offload_prog(ns, bpf);
ns                289 drivers/net/netdevsim/bpf.c static int nsim_setup_prog_checks(struct netdevsim *ns, struct netdev_bpf *bpf)
ns                295 drivers/net/netdevsim/bpf.c 	if (ns->netdev->mtu > NSIM_XDP_MAX_MTU) {
ns                303 drivers/net/netdevsim/bpf.c nsim_setup_prog_hw_checks(struct netdevsim *ns, struct netdev_bpf *bpf)
ns                314 drivers/net/netdevsim/bpf.c 	if (!bpf_offload_dev_match(bpf->prog, ns->netdev)) {
ns                482 drivers/net/netdevsim/bpf.c nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap)
ns                500 drivers/net/netdevsim/bpf.c 	nmap->ns = ns;
ns                517 drivers/net/netdevsim/bpf.c 	list_add_tail(&nmap->l, &ns->nsim_dev->bpf_bound_maps);
ns                546 drivers/net/netdevsim/bpf.c 	struct netdevsim *ns = netdev_priv(dev);
ns                553 drivers/net/netdevsim/bpf.c 		return xdp_attachment_query(&ns->xdp, bpf);
ns                555 drivers/net/netdevsim/bpf.c 		return xdp_attachment_query(&ns->xdp_hw, bpf);
ns                557 drivers/net/netdevsim/bpf.c 		err = nsim_setup_prog_checks(ns, bpf);
ns                561 drivers/net/netdevsim/bpf.c 		return nsim_xdp_set_prog(ns, bpf, &ns->xdp);
ns                563 drivers/net/netdevsim/bpf.c 		err = nsim_setup_prog_hw_checks(ns, bpf);
ns                567 drivers/net/netdevsim/bpf.c 		return nsim_xdp_set_prog(ns, bpf, &ns->xdp_hw);
ns                569 drivers/net/netdevsim/bpf.c 		if (!ns->bpf_map_accept)
ns                572 drivers/net/netdevsim/bpf.c 		return nsim_bpf_map_alloc(ns, bpf->offmap);
ns                613 drivers/net/netdevsim/bpf.c int nsim_bpf_init(struct netdevsim *ns)
ns                615 drivers/net/netdevsim/bpf.c 	struct dentry *ddir = ns->nsim_dev_port->ddir;
ns                618 drivers/net/netdevsim/bpf.c 	err = bpf_offload_dev_netdev_register(ns->nsim_dev->bpf_dev,
ns                619 drivers/net/netdevsim/bpf.c 					      ns->netdev);
ns                624 drivers/net/netdevsim/bpf.c 			   &ns->bpf_offloaded_id);
ns                626 drivers/net/netdevsim/bpf.c 	ns->bpf_tc_accept = true;
ns                628 drivers/net/netdevsim/bpf.c 			    &ns->bpf_tc_accept);
ns                630 drivers/net/netdevsim/bpf.c 			    &ns->bpf_tc_non_bound_accept);
ns                631 drivers/net/netdevsim/bpf.c 	ns->bpf_xdpdrv_accept = true;
ns                633 drivers/net/netdevsim/bpf.c 			    &ns->bpf_xdpdrv_accept);
ns                634 drivers/net/netdevsim/bpf.c 	ns->bpf_xdpoffload_accept = true;
ns                636 drivers/net/netdevsim/bpf.c 			    &ns->bpf_xdpoffload_accept);
ns                638 drivers/net/netdevsim/bpf.c 	ns->bpf_map_accept = true;
ns                640 drivers/net/netdevsim/bpf.c 			    &ns->bpf_map_accept);
ns                645 drivers/net/netdevsim/bpf.c void nsim_bpf_uninit(struct netdevsim *ns)
ns                647 drivers/net/netdevsim/bpf.c 	WARN_ON(ns->xdp.prog);
ns                648 drivers/net/netdevsim/bpf.c 	WARN_ON(ns->xdp_hw.prog);
ns                649 drivers/net/netdevsim/bpf.c 	WARN_ON(ns->bpf_offloaded);
ns                650 drivers/net/netdevsim/bpf.c 	bpf_offload_dev_netdev_unregister(ns->nsim_dev->bpf_dev, ns->netdev);
ns                408 drivers/net/netdevsim/dev.c 	struct nsim_dev *nsim_dev = nsim_dev_port->ns->nsim_dev;
ns                427 drivers/net/netdevsim/dev.c 		skb->dev = nsim_dev_port->ns->netdev;
ns                460 drivers/net/netdevsim/dev.c 		if (!netif_running(nsim_dev_port->ns->netdev))
ns                775 drivers/net/netdevsim/dev.c 	nsim_dev_port->ns = nsim_create(nsim_dev, nsim_dev_port);
ns                776 drivers/net/netdevsim/dev.c 	if (IS_ERR(nsim_dev_port->ns)) {
ns                777 drivers/net/netdevsim/dev.c 		err = PTR_ERR(nsim_dev_port->ns);
ns                781 drivers/net/netdevsim/dev.c 	devlink_port_type_eth_set(devlink_port, nsim_dev_port->ns->netdev);
ns                801 drivers/net/netdevsim/dev.c 	nsim_destroy(nsim_dev_port->ns);
ns                 16 drivers/net/netdevsim/ipsec.c 	struct netdevsim *ns = filp->private_data;
ns                 17 drivers/net/netdevsim/ipsec.c 	struct nsim_ipsec *ipsec = &ns->ipsec;
ns                132 drivers/net/netdevsim/ipsec.c 	struct netdevsim *ns;
ns                138 drivers/net/netdevsim/ipsec.c 	ns = netdev_priv(dev);
ns                139 drivers/net/netdevsim/ipsec.c 	ipsec = &ns->ipsec;
ns                197 drivers/net/netdevsim/ipsec.c 	struct netdevsim *ns = netdev_priv(xs->xso.dev);
ns                198 drivers/net/netdevsim/ipsec.c 	struct nsim_ipsec *ipsec = &ns->ipsec;
ns                203 drivers/net/netdevsim/ipsec.c 		netdev_err(ns->netdev, "Invalid SA for delete sa_idx=%d\n",
ns                214 drivers/net/netdevsim/ipsec.c 	struct netdevsim *ns = netdev_priv(xs->xso.dev);
ns                215 drivers/net/netdevsim/ipsec.c 	struct nsim_ipsec *ipsec = &ns->ipsec;
ns                228 drivers/net/netdevsim/ipsec.c bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb)
ns                231 drivers/net/netdevsim/ipsec.c 	struct nsim_ipsec *ipsec = &ns->ipsec;
ns                241 drivers/net/netdevsim/ipsec.c 		netdev_err(ns->netdev, "no xfrm state len = %d\n",
ns                248 drivers/net/netdevsim/ipsec.c 		netdev_err(ns->netdev, "no xfrm_input_state() xs = %p\n", xs);
ns                254 drivers/net/netdevsim/ipsec.c 		netdev_err(ns->netdev, "bad sa_idx=%d max=%d\n",
ns                261 drivers/net/netdevsim/ipsec.c 		netdev_err(ns->netdev, "unused sa_idx=%d\n", sa_idx);
ns                266 drivers/net/netdevsim/ipsec.c 		netdev_err(ns->netdev, "unexpected proto=%d\n", xs->id.proto);
ns                275 drivers/net/netdevsim/ipsec.c void nsim_ipsec_init(struct netdevsim *ns)
ns                277 drivers/net/netdevsim/ipsec.c 	ns->netdev->xfrmdev_ops = &nsim_xfrmdev_ops;
ns                283 drivers/net/netdevsim/ipsec.c 	ns->netdev->features |= NSIM_ESP_FEATURES;
ns                284 drivers/net/netdevsim/ipsec.c 	ns->netdev->hw_enc_features |= NSIM_ESP_FEATURES;
ns                286 drivers/net/netdevsim/ipsec.c 	ns->ipsec.pfile = debugfs_create_file("ipsec", 0400,
ns                287 drivers/net/netdevsim/ipsec.c 					      ns->nsim_dev_port->ddir, ns,
ns                291 drivers/net/netdevsim/ipsec.c void nsim_ipsec_teardown(struct netdevsim *ns)
ns                293 drivers/net/netdevsim/ipsec.c 	struct nsim_ipsec *ipsec = &ns->ipsec;
ns                296 drivers/net/netdevsim/ipsec.c 		netdev_err(ns->netdev, "tearing down IPsec offload with %d SAs left\n",
ns                 30 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                 32 drivers/net/netdevsim/netdev.c 	if (!nsim_ipsec_tx(ns, skb))
ns                 35 drivers/net/netdevsim/netdev.c 	u64_stats_update_begin(&ns->syncp);
ns                 36 drivers/net/netdevsim/netdev.c 	ns->tx_packets++;
ns                 37 drivers/net/netdevsim/netdev.c 	ns->tx_bytes += skb->len;
ns                 38 drivers/net/netdevsim/netdev.c 	u64_stats_update_end(&ns->syncp);
ns                 52 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                 54 drivers/net/netdevsim/netdev.c 	if (ns->xdp.prog && new_mtu > NSIM_XDP_MAX_MTU)
ns                 65 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                 69 drivers/net/netdevsim/netdev.c 		start = u64_stats_fetch_begin(&ns->syncp);
ns                 70 drivers/net/netdevsim/netdev.c 		stats->tx_bytes = ns->tx_bytes;
ns                 71 drivers/net/netdevsim/netdev.c 		stats->tx_packets = ns->tx_packets;
ns                 72 drivers/net/netdevsim/netdev.c 	} while (u64_stats_fetch_retry(&ns->syncp, start));
ns                 83 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                 84 drivers/net/netdevsim/netdev.c 	struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev;
ns                 97 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                 98 drivers/net/netdevsim/netdev.c 	struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev;
ns                112 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                113 drivers/net/netdevsim/netdev.c 	struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev;
ns                126 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                127 drivers/net/netdevsim/netdev.c 	struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev;
ns                138 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                139 drivers/net/netdevsim/netdev.c 	struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev;
ns                150 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                151 drivers/net/netdevsim/netdev.c 	struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev;
ns                163 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                164 drivers/net/netdevsim/netdev.c 	struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev;
ns                186 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                187 drivers/net/netdevsim/netdev.c 	struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev;
ns                211 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                218 drivers/net/netdevsim/netdev.c 						  ns, ns, true);
ns                227 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                230 drivers/net/netdevsim/netdev.c 		return nsim_bpf_disable_tc(ns);
ns                237 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns = netdev_priv(dev);
ns                239 drivers/net/netdevsim/netdev.c 	return &ns->nsim_dev_port->devlink_port;
ns                286 drivers/net/netdevsim/netdev.c 	struct netdevsim *ns;
ns                289 drivers/net/netdevsim/netdev.c 	dev = alloc_netdev(sizeof(*ns), "eth%d", NET_NAME_UNKNOWN, nsim_setup);
ns                293 drivers/net/netdevsim/netdev.c 	ns = netdev_priv(dev);
ns                294 drivers/net/netdevsim/netdev.c 	ns->netdev = dev;
ns                295 drivers/net/netdevsim/netdev.c 	ns->nsim_dev = nsim_dev;
ns                296 drivers/net/netdevsim/netdev.c 	ns->nsim_dev_port = nsim_dev_port;
ns                297 drivers/net/netdevsim/netdev.c 	ns->nsim_bus_dev = nsim_dev->nsim_bus_dev;
ns                298 drivers/net/netdevsim/netdev.c 	SET_NETDEV_DEV(dev, &ns->nsim_bus_dev->dev);
ns                302 drivers/net/netdevsim/netdev.c 	err = nsim_bpf_init(ns);
ns                306 drivers/net/netdevsim/netdev.c 	nsim_ipsec_init(ns);
ns                313 drivers/net/netdevsim/netdev.c 	return ns;
ns                316 drivers/net/netdevsim/netdev.c 	nsim_ipsec_teardown(ns);
ns                317 drivers/net/netdevsim/netdev.c 	nsim_bpf_uninit(ns);
ns                324 drivers/net/netdevsim/netdev.c void nsim_destroy(struct netdevsim *ns)
ns                326 drivers/net/netdevsim/netdev.c 	struct net_device *dev = ns->netdev;
ns                330 drivers/net/netdevsim/netdev.c 	nsim_ipsec_teardown(ns);
ns                331 drivers/net/netdevsim/netdev.c 	nsim_bpf_uninit(ns);
ns                 79 drivers/net/netdevsim/netdevsim.h void nsim_destroy(struct netdevsim *ns);
ns                 84 drivers/net/netdevsim/netdevsim.h int nsim_bpf_init(struct netdevsim *ns);
ns                 85 drivers/net/netdevsim/netdevsim.h void nsim_bpf_uninit(struct netdevsim *ns);
ns                 87 drivers/net/netdevsim/netdevsim.h int nsim_bpf_disable_tc(struct netdevsim *ns);
ns                100 drivers/net/netdevsim/netdevsim.h static inline int nsim_bpf_init(struct netdevsim *ns)
ns                105 drivers/net/netdevsim/netdevsim.h static inline void nsim_bpf_uninit(struct netdevsim *ns)
ns                114 drivers/net/netdevsim/netdevsim.h static inline int nsim_bpf_disable_tc(struct netdevsim *ns)
ns                142 drivers/net/netdevsim/netdevsim.h 	struct netdevsim *ns;
ns                183 drivers/net/netdevsim/netdevsim.h void nsim_ipsec_init(struct netdevsim *ns);
ns                184 drivers/net/netdevsim/netdevsim.h void nsim_ipsec_teardown(struct netdevsim *ns);
ns                185 drivers/net/netdevsim/netdevsim.h bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb);
ns                187 drivers/net/netdevsim/netdevsim.h static inline void nsim_ipsec_init(struct netdevsim *ns)
ns                191 drivers/net/netdevsim/netdevsim.h static inline void nsim_ipsec_teardown(struct netdevsim *ns)
ns                195 drivers/net/netdevsim/netdevsim.h static inline bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb)
ns                 89 drivers/net/phy/dp83640.c 	u64 ns;
ns                270 drivers/net/phy/dp83640.c 	rxts->ns = p->ns_lo;
ns                271 drivers/net/phy/dp83640.c 	rxts->ns |= (p->ns_hi & 0x3fff) << 16;
ns                272 drivers/net/phy/dp83640.c 	rxts->ns += ((u64)sec) * 1000000000ULL;
ns                281 drivers/net/phy/dp83640.c 	u64 ns;
ns                287 drivers/net/phy/dp83640.c 	ns = p->ns_lo;
ns                288 drivers/net/phy/dp83640.c 	ns |= (p->ns_hi & 0x3fff) << 16;
ns                289 drivers/net/phy/dp83640.c 	ns += ((u64)sec) * 1000000000ULL;
ns                291 drivers/net/phy/dp83640.c 	return ns;
ns                884 drivers/net/phy/dp83640.c 			shhwtstamps->hwtstamp = ns_to_ktime(rxts->ns);
ns                907 drivers/net/phy/dp83640.c 	u64 ns;
ns                932 drivers/net/phy/dp83640.c 	ns = phy2txts(phy_txts);
ns                934 drivers/net/phy/dp83640.c 	shhwtstamps.hwtstamp = ns_to_ktime(ns);
ns               1460 drivers/net/phy/dp83640.c 			shhwtstamps->hwtstamp = ns_to_ktime(rxts->ns);
ns               2098 drivers/net/ppp/ppp_generic.c 	struct sk_buff *ns;
ns               2125 drivers/net/ppp/ppp_generic.c 			ns = dev_alloc_skb(skb->len + 128);
ns               2126 drivers/net/ppp/ppp_generic.c 			if (!ns) {
ns               2131 drivers/net/ppp/ppp_generic.c 			skb_reserve(ns, 2);
ns               2132 drivers/net/ppp/ppp_generic.c 			skb_copy_bits(skb, 0, skb_put(ns, skb->len), skb->len);
ns               2134 drivers/net/ppp/ppp_generic.c 			skb = ns;
ns               2243 drivers/net/ppp/ppp_generic.c 	struct sk_buff *ns;
ns               2264 drivers/net/ppp/ppp_generic.c 		ns = dev_alloc_skb(obuff_size);
ns               2265 drivers/net/ppp/ppp_generic.c 		if (!ns) {
ns               2272 drivers/net/ppp/ppp_generic.c 				skb->len + 2, ns->data, obuff_size);
ns               2278 drivers/net/ppp/ppp_generic.c 			kfree_skb(ns);
ns               2283 drivers/net/ppp/ppp_generic.c 		skb = ns;
ns                743 drivers/net/sb1000.c 	int ioaddr, ns;
ns                768 drivers/net/sb1000.c 	for (ns = 0; ns < NPIDS; ns++) {
ns                769 drivers/net/sb1000.c 		session_id = lp->rx_session_id[ns];
ns                770 drivers/net/sb1000.c 		frame_id = lp->rx_frame_id[ns];
ns                791 drivers/net/sb1000.c 	skb = lp->rx_skb[ns];
ns                802 drivers/net/sb1000.c 	lp->rx_frame_id[ns] = 0x30 | ((st[1] + 1) & 0x0f);
ns                829 drivers/net/sb1000.c 		lp->rx_dlen[ns] = dlen;
ns                845 drivers/net/sb1000.c 		lp->rx_skb[ns] = skb;
ns                858 drivers/net/sb1000.c 		skb = lp->rx_skb[ns];
ns                861 drivers/net/sb1000.c 		dlen = lp->rx_dlen[ns];
ns                864 drivers/net/sb1000.c 		lp->rx_session_id[ns] &= ~0x40;
ns                873 drivers/net/sb1000.c 	lp->rx_skb[ns] = NULL;
ns                874 drivers/net/sb1000.c 	lp->rx_session_id[ns] |= 0x40;
ns                888 drivers/net/sb1000.c 	if (ns < NPIDS) {
ns                889 drivers/net/sb1000.c 		if ((skb = lp->rx_skb[ns])) {
ns                891 drivers/net/sb1000.c 			lp->rx_skb[ns] = NULL;
ns                893 drivers/net/sb1000.c 		lp->rx_session_id[ns] |= 0x40;
ns               3074 drivers/net/tun.c 		return open_related_ns(&net->ns, get_net_ns);
ns               3347 drivers/net/tun.c 		ret = open_related_ns(&net->ns, get_net_ns);
ns               1899 drivers/net/vxlan.c 	struct nd_msg *ns, *na;
ns               1921 drivers/net/vxlan.c 	ns = (struct nd_msg *)(ipv6_hdr(request) + 1);
ns               1925 drivers/net/vxlan.c 		sizeof(struct ipv6hdr) - sizeof(*ns);
ns               1926 drivers/net/vxlan.c 	for (i = 0; i < ns_olen-1; i += (ns->opt[i+1]<<3)) {
ns               1927 drivers/net/vxlan.c 		if (!ns->opt[i + 1]) {
ns               1931 drivers/net/vxlan.c 		if (ns->opt[i] == ND_OPT_SOURCE_LL_ADDR) {
ns               1932 drivers/net/vxlan.c 			daddr = ns->opt + i + sizeof(struct nd_opt_hdr);
ns               1967 drivers/net/vxlan.c 	na->target = ns->target;
ns                120 drivers/net/wireless/marvell/mwifiex/wmm.c 	u64 ns;
ns                125 drivers/net/wireless/marvell/mwifiex/wmm.c 	ns = ktime_get_ns();
ns                126 drivers/net/wireless/marvell/mwifiex/wmm.c 	ns += (ns >> 32) + (ns >> 16);
ns                128 drivers/net/wireless/marvell/mwifiex/wmm.c 	return ((u8)ns % BA_SETUP_MAX_PACKET_THRESHOLD) + BA_SETUP_PACKET_OFFSET;
ns                 98 drivers/nvme/host/core.c static void nvme_set_queue_dying(struct nvme_ns *ns)
ns                104 drivers/nvme/host/core.c 	if (!ns->disk || test_and_set_bit(NVME_NS_DEAD, &ns->flags))
ns                106 drivers/nvme/host/core.c 	blk_set_queue_dying(ns->queue);
ns                108 drivers/nvme/host/core.c 	blk_mq_unquiesce_queue(ns->queue);
ns                112 drivers/nvme/host/core.c 	revalidate_disk(ns->disk);
ns                213 drivers/nvme/host/core.c static inline bool nvme_ns_has_pi(struct nvme_ns *ns)
ns                215 drivers/nvme/host/core.c 	return ns->pi_type && ns->ms == sizeof(struct t10_pi_tuple);
ns                267 drivers/nvme/host/core.c 	struct nvme_ns *ns = req->q->queuedata;
ns                273 drivers/nvme/host/core.c 	if (ns && crd)
ns                274 drivers/nvme/host/core.c 		delay = ns->ctrl->crdt[crd - 1] * 100;
ns                454 drivers/nvme/host/core.c 	struct nvme_ns *ns = container_of(kref, struct nvme_ns, kref);
ns                456 drivers/nvme/host/core.c 	if (ns->ndev)
ns                457 drivers/nvme/host/core.c 		nvme_nvm_unregister(ns);
ns                459 drivers/nvme/host/core.c 	put_disk(ns->disk);
ns                460 drivers/nvme/host/core.c 	nvme_put_ns_head(ns->head);
ns                461 drivers/nvme/host/core.c 	nvme_put_ctrl(ns->ctrl);
ns                462 drivers/nvme/host/core.c 	kfree(ns);
ns                465 drivers/nvme/host/core.c static void nvme_put_ns(struct nvme_ns *ns)
ns                467 drivers/nvme/host/core.c 	kref_put(&ns->kref, nvme_free_ns);
ns                601 drivers/nvme/host/core.c static inline void nvme_setup_flush(struct nvme_ns *ns,
ns                605 drivers/nvme/host/core.c 	cmnd->common.nsid = cpu_to_le32(ns->head->ns_id);
ns                608 drivers/nvme/host/core.c static blk_status_t nvme_setup_discard(struct nvme_ns *ns, struct request *req,
ns                629 drivers/nvme/host/core.c 		if (test_and_set_bit_lock(0, &ns->ctrl->discard_page_busy))
ns                632 drivers/nvme/host/core.c 		range = page_address(ns->ctrl->discard_page);
ns                636 drivers/nvme/host/core.c 		u64 slba = nvme_block_nr(ns, bio->bi_iter.bi_sector);
ns                637 drivers/nvme/host/core.c 		u32 nlb = bio->bi_iter.bi_size >> ns->lba_shift;
ns                648 drivers/nvme/host/core.c 		if (virt_to_page(range) == ns->ctrl->discard_page)
ns                649 drivers/nvme/host/core.c 			clear_bit_unlock(0, &ns->ctrl->discard_page_busy);
ns                656 drivers/nvme/host/core.c 	cmnd->dsm.nsid = cpu_to_le32(ns->head->ns_id);
ns                668 drivers/nvme/host/core.c static inline blk_status_t nvme_setup_write_zeroes(struct nvme_ns *ns,
ns                671 drivers/nvme/host/core.c 	if (ns->ctrl->quirks & NVME_QUIRK_DEALLOCATE_ZEROES)
ns                672 drivers/nvme/host/core.c 		return nvme_setup_discard(ns, req, cmnd);
ns                675 drivers/nvme/host/core.c 	cmnd->write_zeroes.nsid = cpu_to_le32(ns->head->ns_id);
ns                677 drivers/nvme/host/core.c 		cpu_to_le64(nvme_block_nr(ns, blk_rq_pos(req)));
ns                679 drivers/nvme/host/core.c 		cpu_to_le16((blk_rq_bytes(req) >> ns->lba_shift) - 1);
ns                684 drivers/nvme/host/core.c static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns,
ns                687 drivers/nvme/host/core.c 	struct nvme_ctrl *ctrl = ns->ctrl;
ns                700 drivers/nvme/host/core.c 	cmnd->rw.nsid = cpu_to_le32(ns->head->ns_id);
ns                701 drivers/nvme/host/core.c 	cmnd->rw.slba = cpu_to_le64(nvme_block_nr(ns, blk_rq_pos(req)));
ns                702 drivers/nvme/host/core.c 	cmnd->rw.length = cpu_to_le16((blk_rq_bytes(req) >> ns->lba_shift) - 1);
ns                707 drivers/nvme/host/core.c 	if (ns->ms) {
ns                715 drivers/nvme/host/core.c 			if (WARN_ON_ONCE(!nvme_ns_has_pi(ns)))
ns                720 drivers/nvme/host/core.c 		switch (ns->pi_type) {
ns                741 drivers/nvme/host/core.c 		struct nvme_ns *ns = req->rq_disk->private_data;
ns                744 drivers/nvme/host/core.c 		if (page == ns->ctrl->discard_page)
ns                745 drivers/nvme/host/core.c 			clear_bit_unlock(0, &ns->ctrl->discard_page_busy);
ns                752 drivers/nvme/host/core.c blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req,
ns                766 drivers/nvme/host/core.c 		nvme_setup_flush(ns, cmd);
ns                769 drivers/nvme/host/core.c 		ret = nvme_setup_write_zeroes(ns, req, cmd);
ns                772 drivers/nvme/host/core.c 		ret = nvme_setup_discard(ns, req, cmd);
ns                776 drivers/nvme/host/core.c 		ret = nvme_setup_rw(ns, req, cmd);
ns                902 drivers/nvme/host/core.c 	struct nvme_ns *ns = q->queuedata;
ns                903 drivers/nvme/host/core.c 	struct gendisk *disk = ns ? ns->disk : NULL;
ns               1269 drivers/nvme/host/core.c static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
ns               1290 drivers/nvme/host/core.c 	length = (io.nblocks + 1) << ns->lba_shift;
ns               1291 drivers/nvme/host/core.c 	meta_len = (io.nblocks + 1) * ns->ms;
ns               1294 drivers/nvme/host/core.c 	if (ns->ext) {
ns               1305 drivers/nvme/host/core.c 	c.rw.nsid = cpu_to_le32(ns->head->ns_id);
ns               1314 drivers/nvme/host/core.c 	return nvme_submit_user_cmd(ns->queue, &c,
ns               1333 drivers/nvme/host/core.c static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
ns               1338 drivers/nvme/host/core.c 	if (ns) {
ns               1369 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               1372 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns               1373 drivers/nvme/host/core.c 		if (ns->disk && nvme_revalidate_disk(ns->disk))
ns               1374 drivers/nvme/host/core.c 			nvme_set_queue_dying(ns);
ns               1400 drivers/nvme/host/core.c static int nvme_user_cmd(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
ns               1433 drivers/nvme/host/core.c 	effects = nvme_passthru_start(ctrl, ns, cmd.opcode);
ns               1434 drivers/nvme/host/core.c 	status = nvme_submit_user_cmd(ns ? ns->queue : ctrl->admin_q, &c,
ns               1448 drivers/nvme/host/core.c static int nvme_user_cmd64(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
ns               1480 drivers/nvme/host/core.c 	effects = nvme_passthru_start(ctrl, ns, cmd.opcode);
ns               1481 drivers/nvme/host/core.c 	status = nvme_submit_user_cmd(ns ? ns->queue : ctrl->admin_q, &c,
ns               1504 drivers/nvme/host/core.c 		struct nvme_ns *ns;
ns               1508 drivers/nvme/host/core.c 		ns = nvme_find_path(*head);
ns               1509 drivers/nvme/host/core.c 		if (!ns)
ns               1511 drivers/nvme/host/core.c 		return ns;
ns               1534 drivers/nvme/host/core.c static int nvme_handle_ctrl_ioctl(struct nvme_ns *ns, unsigned int cmd,
ns               1539 drivers/nvme/host/core.c 	struct nvme_ctrl *ctrl = ns->ctrl;
ns               1542 drivers/nvme/host/core.c 	nvme_get_ctrl(ns->ctrl);
ns               1565 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               1568 drivers/nvme/host/core.c 	ns = nvme_get_ns_from_disk(bdev->bd_disk, &head, &srcu_idx);
ns               1569 drivers/nvme/host/core.c 	if (unlikely(!ns))
ns               1578 drivers/nvme/host/core.c 		return nvme_handle_ctrl_ioctl(ns, cmd, argp, head, srcu_idx);
ns               1583 drivers/nvme/host/core.c 		ret = ns->head->ns_id;
ns               1586 drivers/nvme/host/core.c 		ret = nvme_user_cmd(ns->ctrl, ns, argp);
ns               1589 drivers/nvme/host/core.c 		ret = nvme_submit_io(ns, argp);
ns               1592 drivers/nvme/host/core.c 		ret = nvme_user_cmd64(ns->ctrl, ns, argp);
ns               1595 drivers/nvme/host/core.c 		if (ns->ndev)
ns               1596 drivers/nvme/host/core.c 			ret = nvme_nvm_ioctl(ns, cmd, arg);
ns               1607 drivers/nvme/host/core.c 	struct nvme_ns *ns = bdev->bd_disk->private_data;
ns               1611 drivers/nvme/host/core.c 	if (WARN_ON_ONCE(ns->head->disk))
ns               1614 drivers/nvme/host/core.c 	if (!kref_get_unless_zero(&ns->kref))
ns               1616 drivers/nvme/host/core.c 	if (!try_module_get(ns->ctrl->ops->module))
ns               1622 drivers/nvme/host/core.c 	nvme_put_ns(ns);
ns               1629 drivers/nvme/host/core.c 	struct nvme_ns *ns = disk->private_data;
ns               1631 drivers/nvme/host/core.c 	module_put(ns->ctrl->ops->module);
ns               1632 drivers/nvme/host/core.c 	nvme_put_ns(ns);
ns               1676 drivers/nvme/host/core.c static void nvme_set_chunk_size(struct nvme_ns *ns)
ns               1678 drivers/nvme/host/core.c 	u32 chunk_size = (((u32)ns->noiob) << (ns->lba_shift - 9));
ns               1679 drivers/nvme/host/core.c 	blk_queue_chunk_sectors(ns->queue, rounddown_pow_of_two(chunk_size));
ns               1682 drivers/nvme/host/core.c static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns)
ns               1684 drivers/nvme/host/core.c 	struct nvme_ctrl *ctrl = ns->ctrl;
ns               1693 drivers/nvme/host/core.c 	if (ctrl->nr_streams && ns->sws && ns->sgs)
ns               1694 drivers/nvme/host/core.c 		size *= ns->sws * ns->sgs;
ns               1713 drivers/nvme/host/core.c static void nvme_config_write_zeroes(struct gendisk *disk, struct nvme_ns *ns)
ns               1716 drivers/nvme/host/core.c 	unsigned short bs = 1 << ns->lba_shift;
ns               1718 drivers/nvme/host/core.c 	if (!(ns->ctrl->oncs & NVME_CTRL_ONCS_WRITE_ZEROES) ||
ns               1719 drivers/nvme/host/core.c 	    (ns->ctrl->quirks & NVME_QUIRK_DISABLE_WRITE_ZEROES))
ns               1731 drivers/nvme/host/core.c 	if (ns->ctrl->max_hw_sectors == UINT_MAX)
ns               1734 drivers/nvme/host/core.c 		max_sectors = ((u32)(ns->ctrl->max_hw_sectors + 1) * bs) >> 9;
ns               1768 drivers/nvme/host/core.c 		struct nvme_ns *ns, struct nvme_id_ns *id)
ns               1770 drivers/nvme/host/core.c 	sector_t capacity = le64_to_cpu(id->nsze) << (ns->lba_shift - 9);
ns               1771 drivers/nvme/host/core.c 	unsigned short bs = 1 << ns->lba_shift;
ns               1774 drivers/nvme/host/core.c 	if (ns->lba_shift > PAGE_SHIFT) {
ns               1790 drivers/nvme/host/core.c 			atomic_bs = (1 + ns->ctrl->subsys->awupf) * bs;
ns               1813 drivers/nvme/host/core.c 	if (ns->ms && !ns->ext &&
ns               1814 drivers/nvme/host/core.c 	    (ns->ctrl->ops->flags & NVME_F_METADATA_SUPPORTED))
ns               1815 drivers/nvme/host/core.c 		nvme_init_integrity(disk, ns->ms, ns->pi_type);
ns               1816 drivers/nvme/host/core.c 	if ((ns->ms && !nvme_ns_has_pi(ns) && !blk_get_integrity(disk)) ||
ns               1817 drivers/nvme/host/core.c 	    ns->lba_shift > PAGE_SHIFT)
ns               1822 drivers/nvme/host/core.c 	nvme_config_discard(disk, ns);
ns               1823 drivers/nvme/host/core.c 	nvme_config_write_zeroes(disk, ns);
ns               1835 drivers/nvme/host/core.c 	struct nvme_ns *ns = disk->private_data;
ns               1841 drivers/nvme/host/core.c 	ns->lba_shift = id->lbaf[id->flbas & NVME_NS_FLBAS_LBA_MASK].ds;
ns               1842 drivers/nvme/host/core.c 	if (ns->lba_shift == 0)
ns               1843 drivers/nvme/host/core.c 		ns->lba_shift = 9;
ns               1844 drivers/nvme/host/core.c 	ns->noiob = le16_to_cpu(id->noiob);
ns               1845 drivers/nvme/host/core.c 	ns->ms = le16_to_cpu(id->lbaf[id->flbas & NVME_NS_FLBAS_LBA_MASK].ms);
ns               1846 drivers/nvme/host/core.c 	ns->ext = ns->ms && (id->flbas & NVME_NS_FLBAS_META_EXT);
ns               1848 drivers/nvme/host/core.c 	if (ns->ms == sizeof(struct t10_pi_tuple))
ns               1849 drivers/nvme/host/core.c 		ns->pi_type = id->dps & NVME_NS_DPS_PI_MASK;
ns               1851 drivers/nvme/host/core.c 		ns->pi_type = 0;
ns               1853 drivers/nvme/host/core.c 	if (ns->noiob)
ns               1854 drivers/nvme/host/core.c 		nvme_set_chunk_size(ns);
ns               1855 drivers/nvme/host/core.c 	nvme_update_disk_info(disk, ns, id);
ns               1857 drivers/nvme/host/core.c 	if (ns->head->disk) {
ns               1858 drivers/nvme/host/core.c 		nvme_update_disk_info(ns->head->disk, ns, id);
ns               1859 drivers/nvme/host/core.c 		blk_queue_stack_limits(ns->head->disk->queue, ns->queue);
ns               1860 drivers/nvme/host/core.c 		revalidate_disk(ns->head->disk);
ns               1867 drivers/nvme/host/core.c 	struct nvme_ns *ns = disk->private_data;
ns               1868 drivers/nvme/host/core.c 	struct nvme_ctrl *ctrl = ns->ctrl;
ns               1873 drivers/nvme/host/core.c 	if (test_bit(NVME_NS_DEAD, &ns->flags)) {
ns               1878 drivers/nvme/host/core.c 	ret = nvme_identify_ns(ctrl, ns->head->ns_id, &id);
ns               1888 drivers/nvme/host/core.c 	ret = nvme_report_ns_ids(ctrl, ns->head->ns_id, id, &ids);
ns               1892 drivers/nvme/host/core.c 	if (!nvme_ns_ids_equal(&ns->head->ids, &ids)) {
ns               1894 drivers/nvme/host/core.c 			"identifiers changed for nsid %d\n", ns->head->ns_id);
ns               1936 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               1941 drivers/nvme/host/core.c 	ns = nvme_get_ns_from_disk(bdev->bd_disk, &head, &srcu_idx);
ns               1942 drivers/nvme/host/core.c 	if (unlikely(!ns))
ns               1950 drivers/nvme/host/core.c 	c.common.nsid = cpu_to_le32(ns->head->ns_id);
ns               1953 drivers/nvme/host/core.c 	ret = nvme_submit_sync_cmd(ns->queue, &c, data, 16);
ns               2935 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               2944 drivers/nvme/host/core.c 	ns = list_first_entry(&ctrl->namespaces, struct nvme_ns, list);
ns               2945 drivers/nvme/host/core.c 	if (ns != list_last_entry(&ctrl->namespaces, struct nvme_ns, list)) {
ns               2954 drivers/nvme/host/core.c 	kref_get(&ns->kref);
ns               2957 drivers/nvme/host/core.c 	ret = nvme_user_cmd(ctrl, ns, argp);
ns               2958 drivers/nvme/host/core.c 	nvme_put_ns(ns);
ns               3384 drivers/nvme/host/core.c static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid,
ns               3387 drivers/nvme/host/core.c 	struct nvme_ctrl *ctrl = ns->ctrl;
ns               3417 drivers/nvme/host/core.c 	list_add_tail(&ns->siblings, &head->list);
ns               3418 drivers/nvme/host/core.c 	ns->head = head;
ns               3437 drivers/nvme/host/core.c 	struct nvme_ns *ns, *ret = NULL;
ns               3440 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list) {
ns               3441 drivers/nvme/host/core.c 		if (ns->head->ns_id == nsid) {
ns               3442 drivers/nvme/host/core.c 			if (!kref_get_unless_zero(&ns->kref))
ns               3444 drivers/nvme/host/core.c 			ret = ns;
ns               3447 drivers/nvme/host/core.c 		if (ns->head->ns_id > nsid)
ns               3454 drivers/nvme/host/core.c static int nvme_setup_streams_ns(struct nvme_ctrl *ctrl, struct nvme_ns *ns)
ns               3462 drivers/nvme/host/core.c 	ret = nvme_get_stream_params(ctrl, &s, ns->head->ns_id);
ns               3466 drivers/nvme/host/core.c 	ns->sws = le32_to_cpu(s.sws);
ns               3467 drivers/nvme/host/core.c 	ns->sgs = le16_to_cpu(s.sgs);
ns               3469 drivers/nvme/host/core.c 	if (ns->sws) {
ns               3470 drivers/nvme/host/core.c 		unsigned int bs = 1 << ns->lba_shift;
ns               3472 drivers/nvme/host/core.c 		blk_queue_io_min(ns->queue, bs * ns->sws);
ns               3473 drivers/nvme/host/core.c 		if (ns->sgs)
ns               3474 drivers/nvme/host/core.c 			blk_queue_io_opt(ns->queue, bs * ns->sws * ns->sgs);
ns               3482 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               3488 drivers/nvme/host/core.c 	ns = kzalloc_node(sizeof(*ns), GFP_KERNEL, node);
ns               3489 drivers/nvme/host/core.c 	if (!ns)
ns               3492 drivers/nvme/host/core.c 	ns->queue = blk_mq_init_queue(ctrl->tagset);
ns               3493 drivers/nvme/host/core.c 	if (IS_ERR(ns->queue)) {
ns               3494 drivers/nvme/host/core.c 		ret = PTR_ERR(ns->queue);
ns               3499 drivers/nvme/host/core.c 		ns->queue->backing_dev_info->capabilities
ns               3502 drivers/nvme/host/core.c 	blk_queue_flag_set(QUEUE_FLAG_NONROT, ns->queue);
ns               3504 drivers/nvme/host/core.c 		blk_queue_flag_set(QUEUE_FLAG_PCI_P2PDMA, ns->queue);
ns               3506 drivers/nvme/host/core.c 	ns->queue->queuedata = ns;
ns               3507 drivers/nvme/host/core.c 	ns->ctrl = ctrl;
ns               3509 drivers/nvme/host/core.c 	kref_init(&ns->kref);
ns               3510 drivers/nvme/host/core.c 	ns->lba_shift = 9; /* set to a default value for 512 until disk is validated */
ns               3512 drivers/nvme/host/core.c 	blk_queue_logical_block_size(ns->queue, 1 << ns->lba_shift);
ns               3513 drivers/nvme/host/core.c 	nvme_set_queue_limits(ctrl, ns->queue);
ns               3524 drivers/nvme/host/core.c 	ret = nvme_init_ns_head(ns, nsid, id);
ns               3527 drivers/nvme/host/core.c 	nvme_setup_streams_ns(ctrl, ns);
ns               3528 drivers/nvme/host/core.c 	nvme_set_disk_name(disk_name, ns, ctrl, &flags);
ns               3537 drivers/nvme/host/core.c 	disk->private_data = ns;
ns               3538 drivers/nvme/host/core.c 	disk->queue = ns->queue;
ns               3541 drivers/nvme/host/core.c 	ns->disk = disk;
ns               3546 drivers/nvme/host/core.c 		ret = nvme_nvm_register(ns, disk_name, node);
ns               3554 drivers/nvme/host/core.c 	list_add_tail(&ns->list, &ctrl->namespaces);
ns               3559 drivers/nvme/host/core.c 	device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups);
ns               3561 drivers/nvme/host/core.c 	nvme_mpath_add_disk(ns, id);
ns               3562 drivers/nvme/host/core.c 	nvme_fault_inject_init(&ns->fault_inject, ns->disk->disk_name);
ns               3568 drivers/nvme/host/core.c 	ns->disk->queue = NULL;
ns               3569 drivers/nvme/host/core.c 	put_disk(ns->disk);
ns               3572 drivers/nvme/host/core.c 	list_del_rcu(&ns->siblings);
ns               3574 drivers/nvme/host/core.c 	nvme_put_ns_head(ns->head);
ns               3578 drivers/nvme/host/core.c 	blk_cleanup_queue(ns->queue);
ns               3580 drivers/nvme/host/core.c 	kfree(ns);
ns               3586 drivers/nvme/host/core.c static void nvme_ns_remove(struct nvme_ns *ns)
ns               3588 drivers/nvme/host/core.c 	if (test_and_set_bit(NVME_NS_REMOVING, &ns->flags))
ns               3591 drivers/nvme/host/core.c 	nvme_fault_inject_fini(&ns->fault_inject);
ns               3593 drivers/nvme/host/core.c 	mutex_lock(&ns->ctrl->subsys->lock);
ns               3594 drivers/nvme/host/core.c 	list_del_rcu(&ns->siblings);
ns               3595 drivers/nvme/host/core.c 	mutex_unlock(&ns->ctrl->subsys->lock);
ns               3597 drivers/nvme/host/core.c 	nvme_mpath_clear_current_path(ns);
ns               3598 drivers/nvme/host/core.c 	synchronize_srcu(&ns->head->srcu); /* wait for concurrent submissions */
ns               3600 drivers/nvme/host/core.c 	if (ns->disk && ns->disk->flags & GENHD_FL_UP) {
ns               3601 drivers/nvme/host/core.c 		del_gendisk(ns->disk);
ns               3602 drivers/nvme/host/core.c 		blk_cleanup_queue(ns->queue);
ns               3603 drivers/nvme/host/core.c 		if (blk_get_integrity(ns->disk))
ns               3604 drivers/nvme/host/core.c 			blk_integrity_unregister(ns->disk);
ns               3607 drivers/nvme/host/core.c 	down_write(&ns->ctrl->namespaces_rwsem);
ns               3608 drivers/nvme/host/core.c 	list_del_init(&ns->list);
ns               3609 drivers/nvme/host/core.c 	up_write(&ns->ctrl->namespaces_rwsem);
ns               3611 drivers/nvme/host/core.c 	nvme_mpath_check_last_path(ns);
ns               3612 drivers/nvme/host/core.c 	nvme_put_ns(ns);
ns               3617 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               3619 drivers/nvme/host/core.c 	ns = nvme_find_get_ns(ctrl, nsid);
ns               3620 drivers/nvme/host/core.c 	if (ns) {
ns               3621 drivers/nvme/host/core.c 		if (ns->disk && revalidate_disk(ns->disk))
ns               3622 drivers/nvme/host/core.c 			nvme_ns_remove(ns);
ns               3623 drivers/nvme/host/core.c 		nvme_put_ns(ns);
ns               3631 drivers/nvme/host/core.c 	struct nvme_ns *ns, *next;
ns               3635 drivers/nvme/host/core.c 	list_for_each_entry_safe(ns, next, &ctrl->namespaces, list) {
ns               3636 drivers/nvme/host/core.c 		if (ns->head->ns_id > nsid || test_bit(NVME_NS_DEAD, &ns->flags))
ns               3637 drivers/nvme/host/core.c 			list_move_tail(&ns->list, &rm_list);
ns               3641 drivers/nvme/host/core.c 	list_for_each_entry_safe(ns, next, &rm_list, list)
ns               3642 drivers/nvme/host/core.c 		nvme_ns_remove(ns);
ns               3648 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               3671 drivers/nvme/host/core.c 				ns = nvme_find_get_ns(ctrl, prev);
ns               3672 drivers/nvme/host/core.c 				if (ns) {
ns               3673 drivers/nvme/host/core.c 					nvme_ns_remove(ns);
ns               3674 drivers/nvme/host/core.c 					nvme_put_ns(ns);
ns               3764 drivers/nvme/host/core.c 	struct nvme_ns *ns, *next;
ns               3790 drivers/nvme/host/core.c 	list_for_each_entry_safe(ns, next, &ns_list, list)
ns               3791 drivers/nvme/host/core.c 		nvme_ns_remove(ns);
ns               4116 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               4124 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns               4125 drivers/nvme/host/core.c 		nvme_set_queue_dying(ns);
ns               4133 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               4136 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns               4137 drivers/nvme/host/core.c 		blk_mq_unfreeze_queue(ns->queue);
ns               4144 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               4147 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list) {
ns               4148 drivers/nvme/host/core.c 		timeout = blk_mq_freeze_queue_wait_timeout(ns->queue, timeout);
ns               4158 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               4161 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns               4162 drivers/nvme/host/core.c 		blk_mq_freeze_queue_wait(ns->queue);
ns               4169 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               4172 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns               4173 drivers/nvme/host/core.c 		blk_freeze_queue_start(ns->queue);
ns               4180 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               4183 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns               4184 drivers/nvme/host/core.c 		blk_mq_quiesce_queue(ns->queue);
ns               4191 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               4194 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns               4195 drivers/nvme/host/core.c 		blk_mq_unquiesce_queue(ns->queue);
ns               4203 drivers/nvme/host/core.c 	struct nvme_ns *ns;
ns               4206 drivers/nvme/host/core.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns               4207 drivers/nvme/host/core.c 		blk_sync_queue(ns->queue);
ns                 64 drivers/nvme/host/fault_inject.c 		struct nvme_ns *ns = disk->private_data;
ns                 66 drivers/nvme/host/fault_inject.c 		if (ns)
ns                 67 drivers/nvme/host/fault_inject.c 			fault_inject = &ns->fault_inject;
ns               2324 drivers/nvme/host/fc.c 	struct nvme_ns *ns = hctx->queue->queuedata;
ns               2340 drivers/nvme/host/fc.c 	ret = nvme_setup_cmd(ns, rq, sqe);
ns                433 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = nvmdev->q->queuedata;
ns                439 drivers/nvme/host/lightnvm.c 	c.identity.nsid = cpu_to_le32(ns->head->ns_id);
ns                445 drivers/nvme/host/lightnvm.c 	ret = nvme_submit_sync_cmd(ns->ctrl->admin_q, (struct nvme_command *)&c,
ns                465 drivers/nvme/host/lightnvm.c 		dev_err(ns->ctrl->device, "OCSSD revision not supported (%d)\n",
ns                480 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = q->queuedata;
ns                481 drivers/nvme/host/lightnvm.c 	struct nvme_ctrl *ctrl = ns->ctrl;
ns                489 drivers/nvme/host/lightnvm.c 	c.get_bb.nsid = cpu_to_le32(ns->head->ns_id);
ns                534 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = nvmdev->q->queuedata;
ns                539 drivers/nvme/host/lightnvm.c 	c.set_bb.nsid = cpu_to_le32(ns->head->ns_id);
ns                544 drivers/nvme/host/lightnvm.c 	ret = nvme_submit_sync_cmd(ns->ctrl->admin_q, (struct nvme_command *)&c,
ns                547 drivers/nvme/host/lightnvm.c 		dev_err(ns->ctrl->device, "set bad block table failed (%d)\n",
ns                560 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = ndev->q->queuedata;
ns                561 drivers/nvme/host/lightnvm.c 	struct nvme_ctrl *ctrl = ns->ctrl;
ns                595 drivers/nvme/host/lightnvm.c 		ret = nvme_get_log(ctrl, ns->head->ns_id,
ns                624 drivers/nvme/host/lightnvm.c static inline void nvme_nvm_rqtocmd(struct nvm_rq *rqd, struct nvme_ns *ns,
ns                628 drivers/nvme/host/lightnvm.c 	c->ph_rw.nsid = cpu_to_le32(ns->head->ns_id);
ns                651 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = q->queuedata;
ns                654 drivers/nvme/host/lightnvm.c 	nvme_nvm_rqtocmd(rqd, ns, cmd);
ns                710 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = nvmdev->q->queuedata;
ns                712 drivers/nvme/host/lightnvm.c 	return dma_pool_create(name, ns->ctrl->dev, size, PAGE_SIZE, 0);
ns                751 drivers/nvme/host/lightnvm.c 				struct nvme_ns *ns,
ns                759 drivers/nvme/host/lightnvm.c 	struct nvm_dev *dev = ns->ndev;
ns                760 drivers/nvme/host/lightnvm.c 	struct gendisk *disk = ns->disk;
ns                853 drivers/nvme/host/lightnvm.c static int nvme_nvm_submit_vio(struct nvme_ns *ns,
ns                868 drivers/nvme/host/lightnvm.c 	c.ph_rw.nsid = cpu_to_le32(ns->head->ns_id);
ns                872 drivers/nvme/host/lightnvm.c 	length = (vio.nppas + 1) << ns->lba_shift;
ns                874 drivers/nvme/host/lightnvm.c 	ret = nvme_nvm_submit_user_cmd(ns->queue, ns, &c,
ns                887 drivers/nvme/host/lightnvm.c static int nvme_nvm_user_vcmd(struct nvme_ns *ns, int admin,
ns                905 drivers/nvme/host/lightnvm.c 	c.common.nsid = cpu_to_le32(ns->head->ns_id);
ns                918 drivers/nvme/host/lightnvm.c 	q = admin ? ns->ctrl->admin_q : ns->queue;
ns                920 drivers/nvme/host/lightnvm.c 	ret = nvme_nvm_submit_user_cmd(q, ns,
ns                934 drivers/nvme/host/lightnvm.c int nvme_nvm_ioctl(struct nvme_ns *ns, unsigned int cmd, unsigned long arg)
ns                938 drivers/nvme/host/lightnvm.c 		return nvme_nvm_user_vcmd(ns, 1, (void __user *)arg);
ns                940 drivers/nvme/host/lightnvm.c 		return nvme_nvm_user_vcmd(ns, 0, (void __user *)arg);
ns                942 drivers/nvme/host/lightnvm.c 		return nvme_nvm_submit_vio(ns, (void __user *)arg);
ns                948 drivers/nvme/host/lightnvm.c int nvme_nvm_register(struct nvme_ns *ns, char *disk_name, int node)
ns                950 drivers/nvme/host/lightnvm.c 	struct request_queue *q = ns->queue;
ns                962 drivers/nvme/host/lightnvm.c 	geo->csecs = 1 << ns->lba_shift;
ns                963 drivers/nvme/host/lightnvm.c 	geo->sos = ns->ms;
ns                964 drivers/nvme/host/lightnvm.c 	geo->ext = ns->ext;
ns                965 drivers/nvme/host/lightnvm.c 	geo->mdts = ns->ctrl->max_hw_sectors;
ns                970 drivers/nvme/host/lightnvm.c 	dev->private_data = ns;
ns                971 drivers/nvme/host/lightnvm.c 	ns->ndev = dev;
ns                976 drivers/nvme/host/lightnvm.c void nvme_nvm_unregister(struct nvme_ns *ns)
ns                978 drivers/nvme/host/lightnvm.c 	nvm_unregister(ns->ndev);
ns                984 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = nvme_get_ns_from_dev(dev);
ns                985 drivers/nvme/host/lightnvm.c 	struct nvm_dev *ndev = ns->ndev;
ns               1031 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = nvme_get_ns_from_dev(dev);
ns               1032 drivers/nvme/host/lightnvm.c 	struct nvm_dev *ndev = ns->ndev;
ns               1094 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = nvme_get_ns_from_dev(dev);
ns               1095 drivers/nvme/host/lightnvm.c 	struct nvm_dev *ndev = ns->ndev;
ns               1243 drivers/nvme/host/lightnvm.c 	struct nvme_ns *ns = disk->private_data;
ns               1244 drivers/nvme/host/lightnvm.c 	struct nvm_dev *ndev = ns->ndev;
ns                 52 drivers/nvme/host/multipath.c void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns,
ns                 56 drivers/nvme/host/multipath.c 		sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance);
ns                 57 drivers/nvme/host/multipath.c 	} else if (ns->head->disk) {
ns                 59 drivers/nvme/host/multipath.c 				ctrl->instance, ns->head->instance);
ns                 63 drivers/nvme/host/multipath.c 				ns->head->instance);
ns                 69 drivers/nvme/host/multipath.c 	struct nvme_ns *ns = req->q->queuedata;
ns                 73 drivers/nvme/host/multipath.c 	spin_lock_irqsave(&ns->head->requeue_lock, flags);
ns                 74 drivers/nvme/host/multipath.c 	blk_steal_bios(&ns->head->requeue_list, req);
ns                 75 drivers/nvme/host/multipath.c 	spin_unlock_irqrestore(&ns->head->requeue_lock, flags);
ns                 91 drivers/nvme/host/multipath.c 		nvme_mpath_clear_current_path(ns);
ns                 92 drivers/nvme/host/multipath.c 		if (ns->ctrl->ana_log_buf) {
ns                 93 drivers/nvme/host/multipath.c 			set_bit(NVME_NS_ANA_PENDING, &ns->flags);
ns                 94 drivers/nvme/host/multipath.c 			queue_work(nvme_wq, &ns->ctrl->ana_work);
ns                103 drivers/nvme/host/multipath.c 		nvme_mpath_clear_current_path(ns);
ns                110 drivers/nvme/host/multipath.c 		nvme_reset_ctrl(ns->ctrl);
ns                114 drivers/nvme/host/multipath.c 	kblockd_schedule_work(&ns->head->requeue_work);
ns                119 drivers/nvme/host/multipath.c 	struct nvme_ns *ns;
ns                122 drivers/nvme/host/multipath.c 	list_for_each_entry(ns, &ctrl->namespaces, list) {
ns                123 drivers/nvme/host/multipath.c 		if (ns->head->disk)
ns                124 drivers/nvme/host/multipath.c 			kblockd_schedule_work(&ns->head->requeue_work);
ns                138 drivers/nvme/host/multipath.c bool nvme_mpath_clear_current_path(struct nvme_ns *ns)
ns                140 drivers/nvme/host/multipath.c 	struct nvme_ns_head *head = ns->head;
ns                148 drivers/nvme/host/multipath.c 		if (ns == rcu_access_pointer(head->current_path[node])) {
ns                159 drivers/nvme/host/multipath.c 	struct nvme_ns *ns;
ns                163 drivers/nvme/host/multipath.c 	list_for_each_entry(ns, &ctrl->namespaces, list)
ns                164 drivers/nvme/host/multipath.c 		if (nvme_mpath_clear_current_path(ns))
ns                165 drivers/nvme/host/multipath.c 			kblockd_schedule_work(&ns->head->requeue_work);
ns                170 drivers/nvme/host/multipath.c static bool nvme_path_is_disabled(struct nvme_ns *ns)
ns                172 drivers/nvme/host/multipath.c 	return ns->ctrl->state != NVME_CTRL_LIVE ||
ns                173 drivers/nvme/host/multipath.c 		test_bit(NVME_NS_ANA_PENDING, &ns->flags) ||
ns                174 drivers/nvme/host/multipath.c 		test_bit(NVME_NS_REMOVING, &ns->flags);
ns                180 drivers/nvme/host/multipath.c 	struct nvme_ns *found = NULL, *fallback = NULL, *ns;
ns                182 drivers/nvme/host/multipath.c 	list_for_each_entry_rcu(ns, &head->list, siblings) {
ns                183 drivers/nvme/host/multipath.c 		if (nvme_path_is_disabled(ns))
ns                187 drivers/nvme/host/multipath.c 			distance = node_distance(node, ns->ctrl->numa_node);
ns                191 drivers/nvme/host/multipath.c 		switch (ns->ana_state) {
ns                195 drivers/nvme/host/multipath.c 				found = ns;
ns                201 drivers/nvme/host/multipath.c 				fallback = ns;
ns                217 drivers/nvme/host/multipath.c 		struct nvme_ns *ns)
ns                219 drivers/nvme/host/multipath.c 	ns = list_next_or_null_rcu(&head->list, &ns->siblings, struct nvme_ns,
ns                221 drivers/nvme/host/multipath.c 	if (ns)
ns                222 drivers/nvme/host/multipath.c 		return ns;
ns                229 drivers/nvme/host/multipath.c 	struct nvme_ns *ns, *found, *fallback = NULL;
ns                237 drivers/nvme/host/multipath.c 	for (ns = nvme_next_ns(head, old);
ns                238 drivers/nvme/host/multipath.c 	     ns != old;
ns                239 drivers/nvme/host/multipath.c 	     ns = nvme_next_ns(head, ns)) {
ns                240 drivers/nvme/host/multipath.c 		if (nvme_path_is_disabled(ns))
ns                243 drivers/nvme/host/multipath.c 		if (ns->ana_state == NVME_ANA_OPTIMIZED) {
ns                244 drivers/nvme/host/multipath.c 			found = ns;
ns                247 drivers/nvme/host/multipath.c 		if (ns->ana_state == NVME_ANA_NONOPTIMIZED)
ns                248 drivers/nvme/host/multipath.c 			fallback = ns;
ns                259 drivers/nvme/host/multipath.c static inline bool nvme_path_is_optimized(struct nvme_ns *ns)
ns                261 drivers/nvme/host/multipath.c 	return ns->ctrl->state == NVME_CTRL_LIVE &&
ns                262 drivers/nvme/host/multipath.c 		ns->ana_state == NVME_ANA_OPTIMIZED;
ns                268 drivers/nvme/host/multipath.c 	struct nvme_ns *ns;
ns                270 drivers/nvme/host/multipath.c 	ns = srcu_dereference(head->current_path[node], &head->srcu);
ns                271 drivers/nvme/host/multipath.c 	if (READ_ONCE(head->subsys->iopolicy) == NVME_IOPOLICY_RR && ns)
ns                272 drivers/nvme/host/multipath.c 		ns = nvme_round_robin_path(head, node, ns);
ns                273 drivers/nvme/host/multipath.c 	if (unlikely(!ns || !nvme_path_is_optimized(ns)))
ns                274 drivers/nvme/host/multipath.c 		ns = __nvme_find_path(head, node);
ns                275 drivers/nvme/host/multipath.c 	return ns;
ns                280 drivers/nvme/host/multipath.c 	struct nvme_ns *ns;
ns                282 drivers/nvme/host/multipath.c 	list_for_each_entry_rcu(ns, &head->list, siblings) {
ns                283 drivers/nvme/host/multipath.c 		switch (ns->ctrl->state) {
ns                301 drivers/nvme/host/multipath.c 	struct nvme_ns *ns;
ns                314 drivers/nvme/host/multipath.c 	ns = nvme_find_path(head);
ns                315 drivers/nvme/host/multipath.c 	if (likely(ns)) {
ns                316 drivers/nvme/host/multipath.c 		bio->bi_disk = ns->disk;
ns                319 drivers/nvme/host/multipath.c 				      disk_devt(ns->head->disk),
ns                412 drivers/nvme/host/multipath.c static void nvme_mpath_set_live(struct nvme_ns *ns)
ns                414 drivers/nvme/host/multipath.c 	struct nvme_ns_head *head = ns->head;
ns                416 drivers/nvme/host/multipath.c 	lockdep_assert_held(&ns->head->lock);
ns                425 drivers/nvme/host/multipath.c 	if (nvme_path_is_optimized(ns)) {
ns                434 drivers/nvme/host/multipath.c 	synchronize_srcu(&ns->head->srcu);
ns                435 drivers/nvme/host/multipath.c 	kblockd_schedule_work(&ns->head->requeue_work);
ns                484 drivers/nvme/host/multipath.c 		struct nvme_ns *ns)
ns                486 drivers/nvme/host/multipath.c 	mutex_lock(&ns->head->lock);
ns                487 drivers/nvme/host/multipath.c 	ns->ana_grpid = le32_to_cpu(desc->grpid);
ns                488 drivers/nvme/host/multipath.c 	ns->ana_state = desc->state;
ns                489 drivers/nvme/host/multipath.c 	clear_bit(NVME_NS_ANA_PENDING, &ns->flags);
ns                491 drivers/nvme/host/multipath.c 	if (nvme_state_is_live(ns->ana_state))
ns                492 drivers/nvme/host/multipath.c 		nvme_mpath_set_live(ns);
ns                493 drivers/nvme/host/multipath.c 	mutex_unlock(&ns->head->lock);
ns                501 drivers/nvme/host/multipath.c 	struct nvme_ns *ns;
ns                514 drivers/nvme/host/multipath.c 	list_for_each_entry(ns, &ctrl->namespaces, list) {
ns                517 drivers/nvme/host/multipath.c 		if (ns->head->ns_id < nsid)
ns                519 drivers/nvme/host/multipath.c 		if (ns->head->ns_id == nsid)
ns                520 drivers/nvme/host/multipath.c 			nvme_update_ns_ana_state(desc, ns);
ns                637 drivers/nvme/host/multipath.c 	struct nvme_ns *ns = nvme_get_ns_from_dev(dev);
ns                639 drivers/nvme/host/multipath.c 	return sprintf(buf, "%s\n", nvme_ana_state_names[ns->ana_state]);
ns                646 drivers/nvme/host/multipath.c 	struct nvme_ns *ns = data;
ns                648 drivers/nvme/host/multipath.c 	if (ns->ana_grpid == le32_to_cpu(desc->grpid)) {
ns                649 drivers/nvme/host/multipath.c 		nvme_update_ns_ana_state(desc, ns);
ns                656 drivers/nvme/host/multipath.c void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id)
ns                658 drivers/nvme/host/multipath.c 	if (nvme_ctrl_use_ana(ns->ctrl)) {
ns                659 drivers/nvme/host/multipath.c 		mutex_lock(&ns->ctrl->ana_lock);
ns                660 drivers/nvme/host/multipath.c 		ns->ana_grpid = le32_to_cpu(id->anagrpid);
ns                661 drivers/nvme/host/multipath.c 		nvme_parse_ana_log(ns->ctrl, ns, nvme_set_ns_ana_state);
ns                662 drivers/nvme/host/multipath.c 		mutex_unlock(&ns->ctrl->ana_lock);
ns                664 drivers/nvme/host/multipath.c 		mutex_lock(&ns->head->lock);
ns                665 drivers/nvme/host/multipath.c 		ns->ana_state = NVME_ANA_OPTIMIZED; 
ns                666 drivers/nvme/host/multipath.c 		nvme_mpath_set_live(ns);
ns                667 drivers/nvme/host/multipath.c 		mutex_unlock(&ns->head->lock);
ns                422 drivers/nvme/host/nvme.h static inline u64 nvme_block_nr(struct nvme_ns *ns, sector_t sector)
ns                424 drivers/nvme/host/nvme.h 	return (sector >> (ns->lba_shift - 9));
ns                486 drivers/nvme/host/nvme.h blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req,
ns                522 drivers/nvme/host/nvme.h void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns,
ns                527 drivers/nvme/host/nvme.h void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id);
ns                532 drivers/nvme/host/nvme.h bool nvme_mpath_clear_current_path(struct nvme_ns *ns);
ns                536 drivers/nvme/host/nvme.h static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
ns                538 drivers/nvme/host/nvme.h 	struct nvme_ns_head *head = ns->head;
ns                547 drivers/nvme/host/nvme.h 	struct nvme_ns *ns = req->q->queuedata;
ns                550 drivers/nvme/host/nvme.h 		trace_block_bio_complete(ns->head->disk->queue,
ns                567 drivers/nvme/host/nvme.h static inline void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns,
ns                570 drivers/nvme/host/nvme.h 	sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance);
ns                584 drivers/nvme/host/nvme.h static inline void nvme_mpath_add_disk(struct nvme_ns *ns,
ns                591 drivers/nvme/host/nvme.h static inline bool nvme_mpath_clear_current_path(struct nvme_ns *ns)
ns                598 drivers/nvme/host/nvme.h static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
ns                631 drivers/nvme/host/nvme.h int nvme_nvm_register(struct nvme_ns *ns, char *disk_name, int node);
ns                632 drivers/nvme/host/nvme.h void nvme_nvm_unregister(struct nvme_ns *ns);
ns                634 drivers/nvme/host/nvme.h int nvme_nvm_ioctl(struct nvme_ns *ns, unsigned int cmd, unsigned long arg);
ns                636 drivers/nvme/host/nvme.h static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name,
ns                642 drivers/nvme/host/nvme.h static inline void nvme_nvm_unregister(struct nvme_ns *ns) {};
ns                643 drivers/nvme/host/nvme.h static inline int nvme_nvm_ioctl(struct nvme_ns *ns, unsigned int cmd,
ns                865 drivers/nvme/host/pci.c 	struct nvme_ns *ns = hctx->queue->queuedata;
ns                884 drivers/nvme/host/pci.c 	ret = nvme_setup_cmd(ns, req, &cmnd);
ns               1735 drivers/nvme/host/rdma.c 	struct nvme_ns *ns = hctx->queue->queuedata;
ns               1763 drivers/nvme/host/rdma.c 	ret = nvme_setup_cmd(ns, rq, c);
ns               2102 drivers/nvme/host/tcp.c static blk_status_t nvme_tcp_setup_cmd_pdu(struct nvme_ns *ns,
ns               2111 drivers/nvme/host/tcp.c 	ret = nvme_setup_cmd(ns, rq, &pdu->cmd);
ns               2157 drivers/nvme/host/tcp.c 	struct nvme_ns *ns = hctx->queue->queuedata;
ns               2167 drivers/nvme/host/tcp.c 	ret = nvme_tcp_setup_cmd_pdu(ns, rq);
ns                 66 drivers/nvme/target/admin-cmd.c 	struct nvmet_ns *ns;
ns                 69 drivers/nvme/target/admin-cmd.c 	ns = nvmet_find_namespace(req->sq->ctrl, req->cmd->get_log_page.nsid);
ns                 70 drivers/nvme/target/admin-cmd.c 	if (!ns) {
ns                 78 drivers/nvme/target/admin-cmd.c 	if (!ns->bdev)
ns                 81 drivers/nvme/target/admin-cmd.c 	host_reads = part_stat_read(ns->bdev->bd_part, ios[READ]);
ns                 82 drivers/nvme/target/admin-cmd.c 	data_units_read = DIV_ROUND_UP(part_stat_read(ns->bdev->bd_part,
ns                 84 drivers/nvme/target/admin-cmd.c 	host_writes = part_stat_read(ns->bdev->bd_part, ios[WRITE]);
ns                 85 drivers/nvme/target/admin-cmd.c 	data_units_written = DIV_ROUND_UP(part_stat_read(ns->bdev->bd_part,
ns                 93 drivers/nvme/target/admin-cmd.c 	nvmet_put_namespace(ns);
ns                103 drivers/nvme/target/admin-cmd.c 	struct nvmet_ns *ns;
ns                109 drivers/nvme/target/admin-cmd.c 	list_for_each_entry_rcu(ns, &ctrl->subsys->namespaces, dev_link) {
ns                111 drivers/nvme/target/admin-cmd.c 		if (!ns->bdev)
ns                113 drivers/nvme/target/admin-cmd.c 		host_reads += part_stat_read(ns->bdev->bd_part, ios[READ]);
ns                115 drivers/nvme/target/admin-cmd.c 			part_stat_read(ns->bdev->bd_part, sectors[READ]), 1000);
ns                116 drivers/nvme/target/admin-cmd.c 		host_writes += part_stat_read(ns->bdev->bd_part, ios[WRITE]);
ns                118 drivers/nvme/target/admin-cmd.c 			part_stat_read(ns->bdev->bd_part, sectors[WRITE]), 1000);
ns                221 drivers/nvme/target/admin-cmd.c 	struct nvmet_ns *ns;
ns                226 drivers/nvme/target/admin-cmd.c 		list_for_each_entry_rcu(ns, &ctrl->subsys->namespaces, dev_link)
ns                227 drivers/nvme/target/admin-cmd.c 			if (ns->anagrpid == grpid)
ns                228 drivers/nvme/target/admin-cmd.c 				desc->nsids[count++] = cpu_to_le32(ns->nsid);
ns                410 drivers/nvme/target/admin-cmd.c 	struct nvmet_ns *ns;
ns                427 drivers/nvme/target/admin-cmd.c 	ns = nvmet_find_namespace(req->sq->ctrl, req->cmd->identify.nsid);
ns                428 drivers/nvme/target/admin-cmd.c 	if (!ns)
ns                435 drivers/nvme/target/admin-cmd.c 	id->ncap = id->nsze = cpu_to_le64(ns->size >> ns->blksize_shift);
ns                436 drivers/nvme/target/admin-cmd.c 	switch (req->port->ana_state[ns->anagrpid]) {
ns                445 drivers/nvme/target/admin-cmd.c 	if (ns->bdev)
ns                446 drivers/nvme/target/admin-cmd.c 		nvmet_bdev_set_limits(ns->bdev, id);
ns                460 drivers/nvme/target/admin-cmd.c 	id->anagrpid = cpu_to_le32(ns->anagrpid);
ns                462 drivers/nvme/target/admin-cmd.c 	memcpy(&id->nguid, &ns->nguid, sizeof(id->nguid));
ns                464 drivers/nvme/target/admin-cmd.c 	id->lbaf[0].ds = ns->blksize_shift;
ns                466 drivers/nvme/target/admin-cmd.c 	if (ns->readonly)
ns                468 drivers/nvme/target/admin-cmd.c 	nvmet_put_namespace(ns);
ns                480 drivers/nvme/target/admin-cmd.c 	struct nvmet_ns *ns;
ns                493 drivers/nvme/target/admin-cmd.c 	list_for_each_entry_rcu(ns, &ctrl->subsys->namespaces, dev_link) {
ns                494 drivers/nvme/target/admin-cmd.c 		if (ns->nsid <= min_nsid)
ns                496 drivers/nvme/target/admin-cmd.c 		list[i++] = cpu_to_le32(ns->nsid);
ns                533 drivers/nvme/target/admin-cmd.c 	struct nvmet_ns *ns;
ns                537 drivers/nvme/target/admin-cmd.c 	ns = nvmet_find_namespace(req->sq->ctrl, req->cmd->identify.nsid);
ns                538 drivers/nvme/target/admin-cmd.c 	if (!ns) {
ns                544 drivers/nvme/target/admin-cmd.c 	if (memchr_inv(&ns->uuid, 0, sizeof(ns->uuid))) {
ns                547 drivers/nvme/target/admin-cmd.c 						  &ns->uuid, &off);
ns                551 drivers/nvme/target/admin-cmd.c 	if (memchr_inv(ns->nguid, 0, sizeof(ns->nguid))) {
ns                554 drivers/nvme/target/admin-cmd.c 						  &ns->nguid, &off);
ns                563 drivers/nvme/target/admin-cmd.c 	nvmet_put_namespace(ns);
ns                585 drivers/nvme/target/admin-cmd.c 	if (req->ns->file)
ns                591 drivers/nvme/target/admin-cmd.c 		pr_err("write protect flush failed nsid: %u\n", req->ns->nsid);
ns                601 drivers/nvme/target/admin-cmd.c 	req->ns = nvmet_find_namespace(req->sq->ctrl, req->cmd->rw.nsid);
ns                602 drivers/nvme/target/admin-cmd.c 	if (unlikely(!req->ns)) {
ns                610 drivers/nvme/target/admin-cmd.c 		req->ns->readonly = true;
ns                613 drivers/nvme/target/admin-cmd.c 			req->ns->readonly = false;
ns                616 drivers/nvme/target/admin-cmd.c 		req->ns->readonly = false;
ns                624 drivers/nvme/target/admin-cmd.c 		nvmet_ns_changed(subsys, req->ns->nsid);
ns                692 drivers/nvme/target/admin-cmd.c 	req->ns = nvmet_find_namespace(req->sq->ctrl, req->cmd->common.nsid);
ns                693 drivers/nvme/target/admin-cmd.c 	if (!req->ns)  {
ns                698 drivers/nvme/target/admin-cmd.c 	if (req->ns->readonly == true)
ns                313 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                314 drivers/nvme/target/configfs.c 	struct nvmet_subsys *subsys = ns->subsys;
ns                320 drivers/nvme/target/configfs.c 	if (ns->enabled)
ns                328 drivers/nvme/target/configfs.c 	kfree(ns->device_path);
ns                330 drivers/nvme/target/configfs.c 	ns->device_path = kstrndup(page, len, GFP_KERNEL);
ns                331 drivers/nvme/target/configfs.c 	if (!ns->device_path)
ns                347 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                349 drivers/nvme/target/configfs.c 	return pci_p2pdma_enable_show(page, ns->p2p_dev, ns->use_p2pmem);
ns                355 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                361 drivers/nvme/target/configfs.c 	mutex_lock(&ns->subsys->lock);
ns                362 drivers/nvme/target/configfs.c 	if (ns->enabled) {
ns                373 drivers/nvme/target/configfs.c 	ns->use_p2pmem = use_p2pmem;
ns                374 drivers/nvme/target/configfs.c 	pci_dev_put(ns->p2p_dev);
ns                375 drivers/nvme/target/configfs.c 	ns->p2p_dev = p2p_dev;
ns                378 drivers/nvme/target/configfs.c 	mutex_unlock(&ns->subsys->lock);
ns                394 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                395 drivers/nvme/target/configfs.c 	struct nvmet_subsys *subsys = ns->subsys;
ns                400 drivers/nvme/target/configfs.c 	if (ns->enabled) {
ns                406 drivers/nvme/target/configfs.c 	if (uuid_parse(page, &ns->uuid))
ns                424 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                425 drivers/nvme/target/configfs.c 	struct nvmet_subsys *subsys = ns->subsys;
ns                432 drivers/nvme/target/configfs.c 	if (ns->enabled) {
ns                454 drivers/nvme/target/configfs.c 	memcpy(&ns->nguid, nguid, sizeof(nguid));
ns                470 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                482 drivers/nvme/target/configfs.c 	oldgrpid = ns->anagrpid;
ns                484 drivers/nvme/target/configfs.c 	ns->anagrpid = newgrpid;
ns                489 drivers/nvme/target/configfs.c 	nvmet_send_ana_event(ns->subsys, NULL);
ns                503 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                511 drivers/nvme/target/configfs.c 		ret = nvmet_ns_enable(ns);
ns                513 drivers/nvme/target/configfs.c 		nvmet_ns_disable(ns);
ns                528 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                534 drivers/nvme/target/configfs.c 	mutex_lock(&ns->subsys->lock);
ns                535 drivers/nvme/target/configfs.c 	if (ns->enabled) {
ns                537 drivers/nvme/target/configfs.c 		mutex_unlock(&ns->subsys->lock);
ns                541 drivers/nvme/target/configfs.c 	ns->buffered_io = val;
ns                542 drivers/nvme/target/configfs.c 	mutex_unlock(&ns->subsys->lock);
ns                563 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns = to_nvmet_ns(item);
ns                565 drivers/nvme/target/configfs.c 	nvmet_ns_free(ns);
ns                582 drivers/nvme/target/configfs.c 	struct nvmet_ns *ns;
ns                597 drivers/nvme/target/configfs.c 	ns = nvmet_ns_alloc(subsys, nsid);
ns                598 drivers/nvme/target/configfs.c 	if (!ns)
ns                600 drivers/nvme/target/configfs.c 	config_group_init_type_name(&ns->group, name, &nvmet_ns_type);
ns                604 drivers/nvme/target/configfs.c 	return &ns->group;
ns                118 drivers/nvme/target/core.c 	struct nvmet_ns *ns;
ns                123 drivers/nvme/target/core.c 	ns = list_last_entry(&subsys->namespaces, struct nvmet_ns, dev_link);
ns                124 drivers/nvme/target/core.c 	return ns->nsid;
ns                389 drivers/nvme/target/core.c 	struct nvmet_ns *ns;
ns                391 drivers/nvme/target/core.c 	list_for_each_entry_rcu(ns, &ctrl->subsys->namespaces, dev_link) {
ns                392 drivers/nvme/target/core.c 		if (ns->nsid == le32_to_cpu(nsid))
ns                393 drivers/nvme/target/core.c 			return ns;
ns                401 drivers/nvme/target/core.c 	struct nvmet_ns *ns;
ns                404 drivers/nvme/target/core.c 	ns = __nvmet_find_namespace(ctrl, nsid);
ns                405 drivers/nvme/target/core.c 	if (ns)
ns                406 drivers/nvme/target/core.c 		percpu_ref_get(&ns->ref);
ns                409 drivers/nvme/target/core.c 	return ns;
ns                414 drivers/nvme/target/core.c 	struct nvmet_ns *ns = container_of(ref, struct nvmet_ns, ref);
ns                416 drivers/nvme/target/core.c 	complete(&ns->disable_done);
ns                419 drivers/nvme/target/core.c void nvmet_put_namespace(struct nvmet_ns *ns)
ns                421 drivers/nvme/target/core.c 	percpu_ref_put(&ns->ref);
ns                424 drivers/nvme/target/core.c static void nvmet_ns_dev_disable(struct nvmet_ns *ns)
ns                426 drivers/nvme/target/core.c 	nvmet_bdev_ns_disable(ns);
ns                427 drivers/nvme/target/core.c 	nvmet_file_ns_disable(ns);
ns                430 drivers/nvme/target/core.c static int nvmet_p2pmem_ns_enable(struct nvmet_ns *ns)
ns                435 drivers/nvme/target/core.c 	if (!ns->use_p2pmem)
ns                438 drivers/nvme/target/core.c 	if (!ns->bdev) {
ns                443 drivers/nvme/target/core.c 	if (!blk_queue_pci_p2pdma(ns->bdev->bd_queue)) {
ns                445 drivers/nvme/target/core.c 		       ns->device_path);
ns                449 drivers/nvme/target/core.c 	if (ns->p2p_dev) {
ns                450 drivers/nvme/target/core.c 		ret = pci_p2pdma_distance(ns->p2p_dev, nvmet_ns_dev(ns), true);
ns                461 drivers/nvme/target/core.c 		p2p_dev = pci_p2pmem_find(nvmet_ns_dev(ns));
ns                464 drivers/nvme/target/core.c 			       ns->device_path);
ns                478 drivers/nvme/target/core.c 				    struct nvmet_ns *ns)
ns                484 drivers/nvme/target/core.c 	if (!ctrl->p2p_client || !ns->use_p2pmem)
ns                487 drivers/nvme/target/core.c 	if (ns->p2p_dev) {
ns                488 drivers/nvme/target/core.c 		ret = pci_p2pdma_distance(ns->p2p_dev, ctrl->p2p_client, true);
ns                492 drivers/nvme/target/core.c 		p2p_dev = pci_dev_get(ns->p2p_dev);
ns                495 drivers/nvme/target/core.c 		clients[1] = nvmet_ns_dev(ns);
ns                500 drivers/nvme/target/core.c 			       dev_name(ctrl->p2p_client), ns->device_path);
ns                505 drivers/nvme/target/core.c 	ret = radix_tree_insert(&ctrl->p2p_ns_map, ns->nsid, p2p_dev);
ns                510 drivers/nvme/target/core.c 		ns->nsid);
ns                513 drivers/nvme/target/core.c int nvmet_ns_enable(struct nvmet_ns *ns)
ns                515 drivers/nvme/target/core.c 	struct nvmet_subsys *subsys = ns->subsys;
ns                521 drivers/nvme/target/core.c 	if (ns->enabled)
ns                528 drivers/nvme/target/core.c 	ret = nvmet_bdev_ns_enable(ns);
ns                530 drivers/nvme/target/core.c 		ret = nvmet_file_ns_enable(ns);
ns                534 drivers/nvme/target/core.c 	ret = nvmet_p2pmem_ns_enable(ns);
ns                539 drivers/nvme/target/core.c 		nvmet_p2pmem_ns_add_p2p(ctrl, ns);
ns                541 drivers/nvme/target/core.c 	ret = percpu_ref_init(&ns->ref, nvmet_destroy_namespace,
ns                546 drivers/nvme/target/core.c 	if (ns->nsid > subsys->max_nsid)
ns                547 drivers/nvme/target/core.c 		subsys->max_nsid = ns->nsid;
ns                554 drivers/nvme/target/core.c 		list_add_tail_rcu(&ns->dev_link, &subsys->namespaces);
ns                560 drivers/nvme/target/core.c 			BUG_ON(ns->nsid == old->nsid);
ns                561 drivers/nvme/target/core.c 			if (ns->nsid < old->nsid)
ns                565 drivers/nvme/target/core.c 		list_add_tail_rcu(&ns->dev_link, &old->dev_link);
ns                569 drivers/nvme/target/core.c 	nvmet_ns_changed(subsys, ns->nsid);
ns                570 drivers/nvme/target/core.c 	ns->enabled = true;
ns                577 drivers/nvme/target/core.c 		pci_dev_put(radix_tree_delete(&ctrl->p2p_ns_map, ns->nsid));
ns                579 drivers/nvme/target/core.c 	nvmet_ns_dev_disable(ns);
ns                583 drivers/nvme/target/core.c void nvmet_ns_disable(struct nvmet_ns *ns)
ns                585 drivers/nvme/target/core.c 	struct nvmet_subsys *subsys = ns->subsys;
ns                589 drivers/nvme/target/core.c 	if (!ns->enabled)
ns                592 drivers/nvme/target/core.c 	ns->enabled = false;
ns                593 drivers/nvme/target/core.c 	list_del_rcu(&ns->dev_link);
ns                594 drivers/nvme/target/core.c 	if (ns->nsid == subsys->max_nsid)
ns                598 drivers/nvme/target/core.c 		pci_dev_put(radix_tree_delete(&ctrl->p2p_ns_map, ns->nsid));
ns                610 drivers/nvme/target/core.c 	percpu_ref_kill(&ns->ref);
ns                612 drivers/nvme/target/core.c 	wait_for_completion(&ns->disable_done);
ns                613 drivers/nvme/target/core.c 	percpu_ref_exit(&ns->ref);
ns                618 drivers/nvme/target/core.c 	nvmet_ns_changed(subsys, ns->nsid);
ns                619 drivers/nvme/target/core.c 	nvmet_ns_dev_disable(ns);
ns                624 drivers/nvme/target/core.c void nvmet_ns_free(struct nvmet_ns *ns)
ns                626 drivers/nvme/target/core.c 	nvmet_ns_disable(ns);
ns                629 drivers/nvme/target/core.c 	nvmet_ana_group_enabled[ns->anagrpid]--;
ns                632 drivers/nvme/target/core.c 	kfree(ns->device_path);
ns                633 drivers/nvme/target/core.c 	kfree(ns);
ns                638 drivers/nvme/target/core.c 	struct nvmet_ns *ns;
ns                640 drivers/nvme/target/core.c 	ns = kzalloc(sizeof(*ns), GFP_KERNEL);
ns                641 drivers/nvme/target/core.c 	if (!ns)
ns                644 drivers/nvme/target/core.c 	INIT_LIST_HEAD(&ns->dev_link);
ns                645 drivers/nvme/target/core.c 	init_completion(&ns->disable_done);
ns                647 drivers/nvme/target/core.c 	ns->nsid = nsid;
ns                648 drivers/nvme/target/core.c 	ns->subsys = subsys;
ns                651 drivers/nvme/target/core.c 	ns->anagrpid = NVMET_DEFAULT_ANA_GRPID;
ns                652 drivers/nvme/target/core.c 	nvmet_ana_group_enabled[ns->anagrpid]++;
ns                655 drivers/nvme/target/core.c 	uuid_gen(&ns->uuid);
ns                656 drivers/nvme/target/core.c 	ns->buffered_io = false;
ns                658 drivers/nvme/target/core.c 	return ns;
ns                716 drivers/nvme/target/core.c 	if (req->ns)
ns                717 drivers/nvme/target/core.c 		nvmet_put_namespace(req->ns);
ns                798 drivers/nvme/target/core.c 		struct nvmet_ns *ns)
ns                800 drivers/nvme/target/core.c 	enum nvme_ana_state state = port->ana_state[ns->anagrpid];
ns                813 drivers/nvme/target/core.c 	if (unlikely(req->ns->readonly)) {
ns                835 drivers/nvme/target/core.c 	req->ns = nvmet_find_namespace(req->sq->ctrl, cmd->rw.nsid);
ns                836 drivers/nvme/target/core.c 	if (unlikely(!req->ns)) {
ns                840 drivers/nvme/target/core.c 	ret = nvmet_check_ana_state(req->port, req->ns);
ns                851 drivers/nvme/target/core.c 	if (req->ns->file)
ns                871 drivers/nvme/target/core.c 	req->ns = NULL;
ns                929 drivers/nvme/target/core.c 	if (req->ns)
ns                930 drivers/nvme/target/core.c 		nvmet_put_namespace(req->ns);
ns                949 drivers/nvme/target/core.c 		if (req->sq->ctrl && req->ns)
ns                951 drivers/nvme/target/core.c 						    req->ns->nsid);
ns               1171 drivers/nvme/target/core.c 	struct nvmet_ns *ns;
ns               1178 drivers/nvme/target/core.c 	list_for_each_entry_rcu(ns, &ctrl->subsys->namespaces, dev_link,
ns               1180 drivers/nvme/target/core.c 		nvmet_p2pmem_ns_add_p2p(ctrl, ns);
ns                 50 drivers/nvme/target/io-cmd-bdev.c int nvmet_bdev_ns_enable(struct nvmet_ns *ns)
ns                 54 drivers/nvme/target/io-cmd-bdev.c 	ns->bdev = blkdev_get_by_path(ns->device_path,
ns                 56 drivers/nvme/target/io-cmd-bdev.c 	if (IS_ERR(ns->bdev)) {
ns                 57 drivers/nvme/target/io-cmd-bdev.c 		ret = PTR_ERR(ns->bdev);
ns                 60 drivers/nvme/target/io-cmd-bdev.c 					ns->device_path, PTR_ERR(ns->bdev));
ns                 62 drivers/nvme/target/io-cmd-bdev.c 		ns->bdev = NULL;
ns                 65 drivers/nvme/target/io-cmd-bdev.c 	ns->size = i_size_read(ns->bdev->bd_inode);
ns                 66 drivers/nvme/target/io-cmd-bdev.c 	ns->blksize_shift = blksize_bits(bdev_logical_block_size(ns->bdev));
ns                 70 drivers/nvme/target/io-cmd-bdev.c void nvmet_bdev_ns_disable(struct nvmet_ns *ns)
ns                 72 drivers/nvme/target/io-cmd-bdev.c 	if (ns->bdev) {
ns                 73 drivers/nvme/target/io-cmd-bdev.c 		blkdev_put(ns->bdev, FMODE_WRITE | FMODE_READ);
ns                 74 drivers/nvme/target/io-cmd-bdev.c 		ns->bdev = NULL;
ns                171 drivers/nvme/target/io-cmd-bdev.c 	sector <<= (req->ns->blksize_shift - 9);
ns                179 drivers/nvme/target/io-cmd-bdev.c 	bio_set_dev(bio, req->ns->bdev);
ns                191 drivers/nvme/target/io-cmd-bdev.c 			bio_set_dev(bio, req->ns->bdev);
ns                211 drivers/nvme/target/io-cmd-bdev.c 	bio_set_dev(bio, req->ns->bdev);
ns                221 drivers/nvme/target/io-cmd-bdev.c 	if (blkdev_issue_flush(req->ns->bdev, GFP_KERNEL, NULL))
ns                229 drivers/nvme/target/io-cmd-bdev.c 	struct nvmet_ns *ns = req->ns;
ns                232 drivers/nvme/target/io-cmd-bdev.c 	ret = __blkdev_issue_discard(ns->bdev,
ns                233 drivers/nvme/target/io-cmd-bdev.c 			le64_to_cpu(range->slba) << (ns->blksize_shift - 9),
ns                234 drivers/nvme/target/io-cmd-bdev.c 			le32_to_cpu(range->nlb) << (ns->blksize_shift - 9),
ns                299 drivers/nvme/target/io-cmd-bdev.c 		(req->ns->blksize_shift - 9);
ns                301 drivers/nvme/target/io-cmd-bdev.c 		(req->ns->blksize_shift - 9));
ns                303 drivers/nvme/target/io-cmd-bdev.c 	ret = __blkdev_issue_zeroout(req->ns->bdev, sector, nr_sector,
ns                 16 drivers/nvme/target/io-cmd-file.c void nvmet_file_ns_disable(struct nvmet_ns *ns)
ns                 18 drivers/nvme/target/io-cmd-file.c 	if (ns->file) {
ns                 19 drivers/nvme/target/io-cmd-file.c 		if (ns->buffered_io)
ns                 21 drivers/nvme/target/io-cmd-file.c 		mempool_destroy(ns->bvec_pool);
ns                 22 drivers/nvme/target/io-cmd-file.c 		ns->bvec_pool = NULL;
ns                 23 drivers/nvme/target/io-cmd-file.c 		kmem_cache_destroy(ns->bvec_cache);
ns                 24 drivers/nvme/target/io-cmd-file.c 		ns->bvec_cache = NULL;
ns                 25 drivers/nvme/target/io-cmd-file.c 		fput(ns->file);
ns                 26 drivers/nvme/target/io-cmd-file.c 		ns->file = NULL;
ns                 30 drivers/nvme/target/io-cmd-file.c int nvmet_file_ns_enable(struct nvmet_ns *ns)
ns                 36 drivers/nvme/target/io-cmd-file.c 	if (!ns->buffered_io)
ns                 39 drivers/nvme/target/io-cmd-file.c 	ns->file = filp_open(ns->device_path, flags, 0);
ns                 40 drivers/nvme/target/io-cmd-file.c 	if (IS_ERR(ns->file)) {
ns                 42 drivers/nvme/target/io-cmd-file.c 				ns->device_path, PTR_ERR(ns->file));
ns                 43 drivers/nvme/target/io-cmd-file.c 		return PTR_ERR(ns->file);
ns                 46 drivers/nvme/target/io-cmd-file.c 	ret = vfs_getattr(&ns->file->f_path,
ns                 51 drivers/nvme/target/io-cmd-file.c 	ns->size = stat.size;
ns                 56 drivers/nvme/target/io-cmd-file.c 	ns->blksize_shift = min_t(u8,
ns                 57 drivers/nvme/target/io-cmd-file.c 			file_inode(ns->file)->i_blkbits, 12);
ns                 59 drivers/nvme/target/io-cmd-file.c 	ns->bvec_cache = kmem_cache_create("nvmet-bvec",
ns                 62 drivers/nvme/target/io-cmd-file.c 	if (!ns->bvec_cache) {
ns                 67 drivers/nvme/target/io-cmd-file.c 	ns->bvec_pool = mempool_create(NVMET_MIN_MPOOL_OBJ, mempool_alloc_slab,
ns                 68 drivers/nvme/target/io-cmd-file.c 			mempool_free_slab, ns->bvec_cache);
ns                 70 drivers/nvme/target/io-cmd-file.c 	if (!ns->bvec_pool) {
ns                 77 drivers/nvme/target/io-cmd-file.c 	ns->size = 0;
ns                 78 drivers/nvme/target/io-cmd-file.c 	ns->blksize_shift = 0;
ns                 79 drivers/nvme/target/io-cmd-file.c 	nvmet_file_ns_disable(ns);
ns                101 drivers/nvme/target/io-cmd-file.c 		call_iter = req->ns->file->f_op->write_iter;
ns                104 drivers/nvme/target/io-cmd-file.c 		call_iter = req->ns->file->f_op->read_iter;
ns                111 drivers/nvme/target/io-cmd-file.c 	iocb->ki_filp = req->ns->file;
ns                112 drivers/nvme/target/io-cmd-file.c 	iocb->ki_flags = ki_flags | iocb_flags(req->ns->file);
ns                126 drivers/nvme/target/io-cmd-file.c 			mempool_free(req->f.bvec, req->ns->bvec_pool);
ns                148 drivers/nvme/target/io-cmd-file.c 	pos = le64_to_cpu(req->cmd->rw.slba) << req->ns->blksize_shift;
ns                149 drivers/nvme/target/io-cmd-file.c 	if (unlikely(pos + req->data_len > req->ns->size)) {
ns                248 drivers/nvme/target/io-cmd-file.c 		req->f.bvec = mempool_alloc(req->ns->bvec_pool, GFP_KERNEL);
ns                253 drivers/nvme/target/io-cmd-file.c 	if (req->ns->buffered_io) {
ns                264 drivers/nvme/target/io-cmd-file.c 	return errno_to_nvme_status(req, vfs_fsync(req->ns->file, 1));
ns                295 drivers/nvme/target/io-cmd-file.c 		offset = le64_to_cpu(range.slba) << req->ns->blksize_shift;
ns                297 drivers/nvme/target/io-cmd-file.c 		len <<= req->ns->blksize_shift;
ns                298 drivers/nvme/target/io-cmd-file.c 		if (offset + len > req->ns->size) {
ns                304 drivers/nvme/target/io-cmd-file.c 		ret = vfs_fallocate(req->ns->file, mode, offset, len);
ns                347 drivers/nvme/target/io-cmd-file.c 	offset = le64_to_cpu(write_zeroes->slba) << req->ns->blksize_shift;
ns                349 drivers/nvme/target/io-cmd-file.c 			req->ns->blksize_shift);
ns                351 drivers/nvme/target/io-cmd-file.c 	if (unlikely(offset + len > req->ns->size)) {
ns                356 drivers/nvme/target/io-cmd-file.c 	ret = vfs_fallocate(req->ns->file, mode, offset, len);
ns                135 drivers/nvme/target/loop.c 	struct nvme_ns *ns = hctx->queue->queuedata;
ns                145 drivers/nvme/target/loop.c 	ret = nvme_setup_cmd(ns, req, &iod->cmd);
ns                 86 drivers/nvme/target/nvmet.h static inline struct device *nvmet_ns_dev(struct nvmet_ns *ns)
ns                 88 drivers/nvme/target/nvmet.h 	return ns->bdev ? disk_to_dev(ns->bdev->bd_disk) : NULL;
ns                292 drivers/nvme/target/nvmet.h 	struct nvmet_ns		*ns;
ns                408 drivers/nvme/target/nvmet.h void nvmet_put_namespace(struct nvmet_ns *ns);
ns                409 drivers/nvme/target/nvmet.h int nvmet_ns_enable(struct nvmet_ns *ns);
ns                410 drivers/nvme/target/nvmet.h void nvmet_ns_disable(struct nvmet_ns *ns);
ns                412 drivers/nvme/target/nvmet.h void nvmet_ns_free(struct nvmet_ns *ns);
ns                484 drivers/nvme/target/nvmet.h int nvmet_bdev_ns_enable(struct nvmet_ns *ns);
ns                485 drivers/nvme/target/nvmet.h int nvmet_file_ns_enable(struct nvmet_ns *ns);
ns                486 drivers/nvme/target/nvmet.h void nvmet_bdev_ns_disable(struct nvmet_ns *ns);
ns                487 drivers/nvme/target/nvmet.h void nvmet_file_ns_disable(struct nvmet_ns *ns);
ns                495 drivers/nvme/target/nvmet.h 			req->ns->blksize_shift;
ns                 53 drivers/nvme/target/trace.h 	struct nvmet_ns *ns;
ns                 56 drivers/nvme/target/trace.h 		ns = nvmet_find_namespace(ctrl, req->cmd->rw.nsid);
ns                 57 drivers/nvme/target/trace.h 		strncpy(name, ns->device_path, DISK_NAME_LEN);
ns                 20 drivers/of/address.c #define OF_CHECK_COUNTS(na, ns)	(OF_CHECK_ADDR_COUNT(na) && (ns) > 0)
ns                 48 drivers/of/address.c 				int na, int ns, int pna);
ns                 67 drivers/of/address.c 		int na, int ns, int pna)
ns                 72 drivers/of/address.c 	s  = of_read_number(range + na + pna, ns);
ns                145 drivers/of/address.c static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns,
ns                160 drivers/of/address.c 	s  = of_read_number(range + na + pna, ns);
ns                184 drivers/of/address.c 	int onesize, i, na, ns;
ns                195 drivers/of/address.c 	bus->count_cells(dev, &na, &ns);
ns                206 drivers/of/address.c 	onesize = na + ns;
ns                211 drivers/of/address.c 				*size = of_read_number(prop + na, ns);
ns                238 drivers/of/address.c 	const int na = 3, ns = 2;
ns                243 drivers/of/address.c 	parser->np = parser->pna + na + ns;
ns                271 drivers/of/address.c 	const int na = 3, ns = 2;
ns                281 drivers/of/address.c 	range->pci_addr = of_read_number(parser->range + 1, ns);
ns                284 drivers/of/address.c 	range->size = of_read_number(parser->range + parser->pna + na, ns);
ns                294 drivers/of/address.c 		pci_addr = of_read_number(parser->range + 1, ns);
ns                297 drivers/of/address.c 		size = of_read_number(parser->range + parser->pna + na, ns);
ns                386 drivers/of/address.c static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns,
ns                397 drivers/of/address.c 	s  = of_read_number(range + na + pna, ns);
ns                498 drivers/of/address.c 			    int na, int ns, int pna, const char *rprop)
ns                537 drivers/of/address.c 	rone = na + pna + ns;
ns                539 drivers/of/address.c 		offset = bus->map(addr, ranges, na, ns, pna);
ns                579 drivers/of/address.c 	int na, ns, pna, pns;
ns                595 drivers/of/address.c 	bus->count_cells(dev, &na, &ns);
ns                596 drivers/of/address.c 	if (!OF_CHECK_COUNTS(na, ns)) {
ns                603 drivers/of/address.c 	    bus->name, na, ns, parent);
ns                647 drivers/of/address.c 		if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop))
ns                652 drivers/of/address.c 		ns = pns;
ns                722 drivers/of/address.c 	int onesize, i, na, ns;
ns                729 drivers/of/address.c 	bus->count_cells(dev, &na, &ns);
ns                740 drivers/of/address.c 	onesize = na + ns;
ns                744 drivers/of/address.c 				*size = of_read_number(prop + na, ns);
ns                 22 drivers/of/fdt_address.c #define OF_CHECK_COUNTS(na, ns)	((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
ns                 23 drivers/of/fdt_address.c 			(ns) > 0)
ns                 43 drivers/of/fdt_address.c 				int na, int ns, int pna);
ns                 71 drivers/of/fdt_address.c 				      int na, int ns, int pna)
ns                 76 drivers/of/fdt_address.c 	s  = of_read_number(range + na + pna, ns);
ns                112 drivers/of/fdt_address.c 				    int na, int ns, int pna, const char *rprop)
ns                133 drivers/of/fdt_address.c 	rone = na + pna + ns;
ns                135 drivers/of/fdt_address.c 		offset = bus->map(addr, ranges, na, ns, pna);
ns                169 drivers/of/fdt_address.c 	int na, ns, pna, pns;
ns                189 drivers/of/fdt_address.c 	bus->count_cells(blob, parent, &na, &ns);
ns                190 drivers/of/fdt_address.c 	if (!OF_CHECK_COUNTS(na, ns)) {
ns                198 drivers/of/fdt_address.c 		 na, ns, fdt_get_name(blob, parent, NULL));
ns                228 drivers/of/fdt_address.c 					addr, na, ns, pna, "ranges"))
ns                233 drivers/of/fdt_address.c 		ns = pns;
ns                732 drivers/pci/controller/pci-mvebu.c 	const int na = 3, ns = 2;
ns                744 drivers/pci/controller/pci-mvebu.c 	rangesz = pna + na + ns;
ns                121 drivers/pci/xen-pcifront.c 	s64 ns, ns_timeout;
ns                146 drivers/pci/xen-pcifront.c 		ns = ktime_get_ns();
ns                147 drivers/pci/xen-pcifront.c 		if (ns > ns_timeout) {
ns                763 drivers/pcmcia/cistpl.c 	int i, j, ns;
ns                767 drivers/pcmcia/cistpl.c 	ns = 0; j = 0;
ns                772 drivers/pcmcia/cistpl.c 		ns++;
ns                784 drivers/pcmcia/cistpl.c 		*found = ns;
ns                788 drivers/pcmcia/cistpl.c 	return (ns == max) ? 0 : -EINVAL;
ns                805 drivers/pcmcia/cistpl.c 			vers_1->str, vers_1->ofs, &vers_1->ns);
ns                817 drivers/pcmcia/cistpl.c 			altstr->str, altstr->ofs, &altstr->ns);
ns                457 drivers/pcmcia/ds.c 		for (i = 0; i < min_t(unsigned int, 4, vers1->ns); i++) {
ns                285 drivers/pcmcia/i82092.c static int to_cycles(int ns)
ns                288 drivers/pcmcia/i82092.c 		return ns/cycle_time;
ns                448 drivers/pcmcia/i82365.c static u_int __init set_bridge_opts(u_short s, u_short ns)
ns                454 drivers/pcmcia/i82365.c     for (i = s; i < s+ns; i++) {
ns                565 drivers/pcmcia/i82365.c static int to_cycles(int ns)
ns                567 drivers/pcmcia/i82365.c     return ns/cycle_time;
ns                673 drivers/pcmcia/i82365.c static void __init add_pcic(int ns, int type)
ns                677 drivers/pcmcia/i82365.c     struct i82365_socket *t = &socket[sockets-ns];
ns                679 drivers/pcmcia/i82365.c     base = sockets-ns;
ns                684 drivers/pcmcia/i82365.c     printk(", %d socket%s\n", ns, ((ns > 1) ? "s" : ""));
ns                692 drivers/pcmcia/i82365.c     mask &= I365_MASK & set_bridge_opts(base, ns);
ns                727 drivers/pcmcia/i82365.c     for (i = 0; i < ns; i++) {
ns                755 drivers/pcmcia/i82365.c     int i, j, sock, k, ns, id;
ns                811 drivers/pcmcia/i82365.c 	    for (j = ns = 0; j < 2; j++) {
ns                822 drivers/pcmcia/i82365.c 		add_socket(port, sock+j, id); ns++;
ns                824 drivers/pcmcia/i82365.c 	    if (ns != 0) add_pcic(ns, id);
ns                 37 drivers/pcmcia/pd6729.c #define to_cycles(ns)	((ns)/120)
ns                190 drivers/pcmcia/tcic.c static int to_cycles(int ns)
ns                192 drivers/pcmcia/tcic.c     if (ns < 14)
ns                195 drivers/pcmcia/tcic.c 	return 2*(ns-14)/cycle_time;
ns                 61 drivers/pcmcia/yenta_socket.c #define to_cycles(ns)	((ns)/120)
ns                501 drivers/ps3/ps3av_cmd.c static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid)
ns                542 drivers/ps3/ps3av_cmd.c 	*ns++ = ns_val & 0x000000FF;
ns                543 drivers/ps3/ps3av_cmd.c 	*ns++ = (ns_val & 0x0000FF00) >> 8;
ns                544 drivers/ps3/ps3av_cmd.c 	*ns = (ns_val & 0x00FF0000) >> 16;
ns                637 drivers/ps3/ps3av_cmd.c 	ps3av_cnv_ns(param->ns, audio_mode->audio_fs, video_vid);
ns                 62 drivers/ptp/ptp_dte.c static void dte_write_nco(void __iomem *regs, s64 ns)
ns                 66 drivers/ptp/ptp_dte.c 	sum2 = (u32)((ns >> DTE_NCO_SUM2_SHIFT) & DTE_NCO_SUM2_MASK);
ns                 72 drivers/ptp/ptp_dte.c 	sum3 = (u32)(((ns >> DTE_NCO_SUM3_SHIFT) & DTE_NCO_SUM3_MASK) <<
ns                 83 drivers/ptp/ptp_dte.c 	s64 ns;
ns                 91 drivers/ptp/ptp_dte.c 	ns = ((s64)sum3 << DTE_NCO_SUM3_SHIFT) |
ns                 94 drivers/ptp/ptp_dte.c 	return ns;
ns                 99 drivers/ptp/ptp_dte.c 	s64 ns;
ns                101 drivers/ptp/ptp_dte.c 	ns = dte_read_nco(ptp_dte->regs);
ns                104 drivers/ptp/ptp_dte.c 	if ((delta < 0) && (abs(delta) > ns)) {
ns                106 drivers/ptp/ptp_dte.c 			ns += DTE_NCO_MAX_NS + delta;
ns                109 drivers/ptp/ptp_dte.c 			ns = 0;
ns                112 drivers/ptp/ptp_dte.c 		ns += delta;
ns                113 drivers/ptp/ptp_dte.c 		if (ns > DTE_NCO_MAX_NS) {
ns                115 drivers/ptp/ptp_dte.c 			ns -= DTE_NCO_MAX_NS;
ns                119 drivers/ptp/ptp_dte.c 	dte_write_nco(ptp_dte->regs, ns);
ns                121 drivers/ptp/ptp_dte.c 	ptp_dte->ts_ovf_last = (ns >> DTE_NCO_TS_WRAP_LSHIFT) &
ns                128 drivers/ptp/ptp_dte.c 	s64 ns = 0;
ns                130 drivers/ptp/ptp_dte.c 	ns = dte_read_nco(ptp_dte->regs);
ns                133 drivers/ptp/ptp_dte.c 	ts_ovf = (ns >> DTE_NCO_TS_WRAP_LSHIFT) & DTE_NCO_TS_WRAP_MASK;
ns                142 drivers/ptp/ptp_dte.c 	ns += (s64)(BIT_ULL(DTE_WRAP_AROUND_NSEC_SHIFT) * ptp_dte->ts_wrap_cnt);
ns                144 drivers/ptp/ptp_dte.c 	return ns;
ns                 43 drivers/ptp/ptp_ixp46x.c 	u64 ns;
ns                 49 drivers/ptp/ptp_ixp46x.c 	ns = ((u64) hi) << 32;
ns                 50 drivers/ptp/ptp_ixp46x.c 	ns |= lo;
ns                 51 drivers/ptp/ptp_ixp46x.c 	ns <<= TICKS_NS_SHIFT;
ns                 53 drivers/ptp/ptp_ixp46x.c 	return ns;
ns                 56 drivers/ptp/ptp_ixp46x.c static void ixp_systime_write(struct ixp46x_ts_regs *regs, u64 ns)
ns                 60 drivers/ptp/ptp_ixp46x.c 	ns >>= TICKS_NS_SHIFT;
ns                 61 drivers/ptp/ptp_ixp46x.c 	hi = ns >> 32;
ns                 62 drivers/ptp/ptp_ixp46x.c 	lo = ns & 0xffffffff;
ns                167 drivers/ptp/ptp_ixp46x.c 	u64 ns;
ns                174 drivers/ptp/ptp_ixp46x.c 	ns = ixp_systime_read(regs);
ns                178 drivers/ptp/ptp_ixp46x.c 	*ts = ns_to_timespec64(ns);
ns                185 drivers/ptp/ptp_ixp46x.c 	u64 ns;
ns                190 drivers/ptp/ptp_ixp46x.c 	ns = timespec64_to_ns(ts);
ns                194 drivers/ptp/ptp_ixp46x.c 	ixp_systime_write(regs, ns);
ns                147 drivers/ptp/ptp_pch.c 	u64 ns;
ns                153 drivers/ptp/ptp_pch.c 	ns = ((u64) hi) << 32;
ns                154 drivers/ptp/ptp_pch.c 	ns |= lo;
ns                155 drivers/ptp/ptp_pch.c 	ns <<= TICKS_NS_SHIFT;
ns                157 drivers/ptp/ptp_pch.c 	return ns;
ns                160 drivers/ptp/ptp_pch.c static void pch_systime_write(struct pch_ts_regs __iomem *regs, u64 ns)
ns                164 drivers/ptp/ptp_pch.c 	ns >>= TICKS_NS_SHIFT;
ns                165 drivers/ptp/ptp_pch.c 	hi = ns >> 32;
ns                166 drivers/ptp/ptp_pch.c 	lo = ns & 0xffffffff;
ns                245 drivers/ptp/ptp_pch.c 	u64 ns;
ns                251 drivers/ptp/ptp_pch.c 	ns = ((u64) hi) << 32;
ns                252 drivers/ptp/ptp_pch.c 	ns |= lo;
ns                253 drivers/ptp/ptp_pch.c 	ns <<= TICKS_NS_SHIFT;
ns                255 drivers/ptp/ptp_pch.c 	return ns;
ns                262 drivers/ptp/ptp_pch.c 	u64 ns;
ns                268 drivers/ptp/ptp_pch.c 	ns = ((u64) hi) << 32;
ns                269 drivers/ptp/ptp_pch.c 	ns |= lo;
ns                270 drivers/ptp/ptp_pch.c 	ns <<= TICKS_NS_SHIFT;
ns                272 drivers/ptp/ptp_pch.c 	return ns;
ns                442 drivers/ptp/ptp_pch.c 	u64 ns;
ns                448 drivers/ptp/ptp_pch.c 	ns = pch_systime_read(regs);
ns                451 drivers/ptp/ptp_pch.c 	*ts = ns_to_timespec64(ns);
ns                458 drivers/ptp/ptp_pch.c 	u64 ns;
ns                463 drivers/ptp/ptp_pch.c 	ns = timespec64_to_ns(ts);
ns                466 drivers/ptp/ptp_pch.c 	pch_systime_write(regs, ns);
ns                 30 drivers/ptp/ptp_qoriq.c 	u64 ns;
ns                 35 drivers/ptp/ptp_qoriq.c 	ns = ((u64) hi) << 32;
ns                 36 drivers/ptp/ptp_qoriq.c 	ns |= lo;
ns                 37 drivers/ptp/ptp_qoriq.c 	return ns;
ns                 41 drivers/ptp/ptp_qoriq.c static void tmr_cnt_write(struct ptp_qoriq *ptp_qoriq, u64 ns)
ns                 44 drivers/ptp/ptp_qoriq.c 	u32 hi = ns >> 32;
ns                 45 drivers/ptp/ptp_qoriq.c 	u32 lo = ns & 0xffffffff;
ns                 55 drivers/ptp/ptp_qoriq.c 	u64 ns;
ns                 58 drivers/ptp/ptp_qoriq.c 	ns = tmr_cnt_read(ptp_qoriq) + 1500000000ULL;
ns                 59 drivers/ptp/ptp_qoriq.c 	ns = div_u64(ns, 1000000000UL) * 1000000000ULL;
ns                 60 drivers/ptp/ptp_qoriq.c 	ns -= ptp_qoriq->tclk_period;
ns                 61 drivers/ptp/ptp_qoriq.c 	hi = ns >> 32;
ns                 62 drivers/ptp/ptp_qoriq.c 	lo = ns & 0xffffffff;
ns                129 drivers/ptp/ptp_qoriq.c 	u64 ns;
ns                160 drivers/ptp/ptp_qoriq.c 			ns = ptp_qoriq->alarm_value + ptp_qoriq->alarm_interval;
ns                161 drivers/ptp/ptp_qoriq.c 			hi = ns >> 32;
ns                162 drivers/ptp/ptp_qoriq.c 			lo = ns & 0xffffffff;
ns                165 drivers/ptp/ptp_qoriq.c 			ptp_qoriq->alarm_value = ns;
ns                246 drivers/ptp/ptp_qoriq.c 	u64 ns;
ns                252 drivers/ptp/ptp_qoriq.c 	ns = tmr_cnt_read(ptp_qoriq);
ns                256 drivers/ptp/ptp_qoriq.c 	*ts = ns_to_timespec64(ns);
ns                265 drivers/ptp/ptp_qoriq.c 	u64 ns;
ns                269 drivers/ptp/ptp_qoriq.c 	ns = timespec64_to_ns(ts);
ns                273 drivers/ptp/ptp_qoriq.c 	tmr_cnt_write(ptp_qoriq, ns);
ns                 48 drivers/pwm/pwm-omap-dmtimer.c static u32 pwm_omap_dmtimer_get_clock_cycles(unsigned long clk_rate, int ns)
ns                 50 drivers/pwm/pwm-omap-dmtimer.c 	return DIV_ROUND_CLOSEST_ULL((u64)clk_rate * ns, NSEC_PER_SEC);
ns                444 drivers/scsi/arm/fas216.c static int fas216_syncperiod(FAS216_Info *info, int ns)
ns                446 drivers/scsi/arm/fas216.c 	int value = (info->ifcfg.clockrate * ns) / 1000;
ns                106 drivers/scsi/bfa/bfa_fcs.h 	struct bfa_fcs_lport_ns_s ns;	/*  NS component of port */
ns                155 drivers/scsi/bfa/bfa_fcs.h #define BFA_FCS_GET_NS_FROM_PORT(port)  (&port->port_topo.pfab.ns)
ns               3658 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_offline(struct bfa_fcs_lport_ns_s *ns,
ns               3660 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_plogi_sending(struct bfa_fcs_lport_ns_s *ns,
ns               3662 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_plogi(struct bfa_fcs_lport_ns_s *ns,
ns               3664 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_plogi_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3667 drivers/scsi/bfa/bfa_fcs_lport.c 					struct bfa_fcs_lport_ns_s *ns,
ns               3669 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rspn_id(struct bfa_fcs_lport_ns_s *ns,
ns               3671 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rspn_id_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3674 drivers/scsi/bfa/bfa_fcs_lport.c 					struct bfa_fcs_lport_ns_s *ns,
ns               3676 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rft_id_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3678 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rft_id(struct bfa_fcs_lport_ns_s *ns,
ns               3681 drivers/scsi/bfa/bfa_fcs_lport.c 					struct bfa_fcs_lport_ns_s *ns,
ns               3683 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rff_id_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3685 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rff_id(struct bfa_fcs_lport_ns_s *ns,
ns               3688 drivers/scsi/bfa/bfa_fcs_lport.c 					struct bfa_fcs_lport_ns_s *ns,
ns               3690 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_gid_ft(struct bfa_fcs_lport_ns_s *ns,
ns               3692 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_gid_ft_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3694 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_online(struct bfa_fcs_lport_ns_s *ns,
ns               3697 drivers/scsi/bfa/bfa_fcs_lport.c 					struct bfa_fcs_lport_ns_s *ns,
ns               3699 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rnn_id(struct bfa_fcs_lport_ns_s *ns,
ns               3701 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rnn_id_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3704 drivers/scsi/bfa/bfa_fcs_lport.c 					struct bfa_fcs_lport_ns_s *ns,
ns               3706 drivers/scsi/bfa/bfa_fcs_lport.c static void     bfa_fcs_lport_ns_sm_rsnn_nn(struct bfa_fcs_lport_ns_s *ns,
ns               3709 drivers/scsi/bfa/bfa_fcs_lport.c 					struct bfa_fcs_lport_ns_s *ns,
ns               3715 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_offline(struct bfa_fcs_lport_ns_s *ns,
ns               3718 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3719 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3723 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_plogi_sending);
ns               3724 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_plogi(ns, NULL);
ns               3731 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3736 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_plogi_sending(struct bfa_fcs_lport_ns_s *ns,
ns               3739 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3740 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3744 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_plogi);
ns               3748 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3749 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               3750 drivers/scsi/bfa/bfa_fcs_lport.c 					   &ns->fcxp_wqe);
ns               3754 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3759 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_plogi(struct bfa_fcs_lport_ns_s *ns,
ns               3762 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3763 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3770 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_plogi_retry);
ns               3771 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->port->stats.ns_retries++;
ns               3772 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               3773 drivers/scsi/bfa/bfa_fcs_lport.c 				    &ns->timer, bfa_fcs_lport_ns_timeout, ns,
ns               3778 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rnn_id);
ns               3779 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->num_rnnid_retries = 0;
ns               3780 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rnn_id(ns, NULL);
ns               3784 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3785 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_discard(ns->fcxp);
ns               3789 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3794 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_plogi_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3797 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3798 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3805 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_plogi_sending);
ns               3806 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_plogi(ns, NULL);
ns               3810 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3811 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_stop(&ns->timer);
ns               3815 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3820 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_sending_rnn_id(struct bfa_fcs_lport_ns_s *ns,
ns               3823 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3824 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3828 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rnn_id);
ns               3832 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3833 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               3834 drivers/scsi/bfa/bfa_fcs_lport.c 						&ns->fcxp_wqe);
ns               3837 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3842 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rnn_id(struct bfa_fcs_lport_ns_s *ns,
ns               3845 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3846 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3850 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rsnn_nn);
ns               3851 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->num_rnnid_retries = 0;
ns               3852 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->num_rsnn_nn_retries = 0;
ns               3853 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rsnn_nn(ns, NULL);
ns               3857 drivers/scsi/bfa/bfa_fcs_lport.c 		if (ns->num_rnnid_retries < BFA_FCS_MAX_NS_RETRIES) {
ns               3858 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rnn_id_retry);
ns               3859 drivers/scsi/bfa/bfa_fcs_lport.c 			ns->port->stats.ns_retries++;
ns               3860 drivers/scsi/bfa/bfa_fcs_lport.c 			ns->num_rnnid_retries++;
ns               3861 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               3862 drivers/scsi/bfa/bfa_fcs_lport.c 				&ns->timer, bfa_fcs_lport_ns_timeout, ns,
ns               3865 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_set_state(ns,
ns               3867 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_fcs_lport_ns_send_rspn_id(ns, NULL);
ns               3872 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_discard(ns->fcxp);
ns               3873 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3877 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3882 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rnn_id_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3885 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3886 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3890 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rnn_id);
ns               3891 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rnn_id(ns, NULL);
ns               3895 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3896 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_stop(&ns->timer);
ns               3900 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3905 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_sending_rsnn_nn(struct bfa_fcs_lport_ns_s *ns,
ns               3908 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3909 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3913 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rsnn_nn);
ns               3917 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3918 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               3919 drivers/scsi/bfa/bfa_fcs_lport.c 			&ns->fcxp_wqe);
ns               3923 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3928 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rsnn_nn(struct bfa_fcs_lport_ns_s *ns,
ns               3931 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3932 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3936 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rspn_id);
ns               3937 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->num_rsnn_nn_retries = 0;
ns               3938 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rspn_id(ns, NULL);
ns               3942 drivers/scsi/bfa/bfa_fcs_lport.c 		if (ns->num_rsnn_nn_retries < BFA_FCS_MAX_NS_RETRIES) {
ns               3943 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rsnn_nn_retry);
ns               3944 drivers/scsi/bfa/bfa_fcs_lport.c 			ns->port->stats.ns_retries++;
ns               3945 drivers/scsi/bfa/bfa_fcs_lport.c 			ns->num_rsnn_nn_retries++;
ns               3946 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               3947 drivers/scsi/bfa/bfa_fcs_lport.c 					&ns->timer, bfa_fcs_lport_ns_timeout,
ns               3948 drivers/scsi/bfa/bfa_fcs_lport.c 					ns, BFA_FCS_RETRY_TIMEOUT);
ns               3950 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_set_state(ns,
ns               3952 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_fcs_lport_ns_send_rspn_id(ns, NULL);
ns               3957 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3958 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_discard(ns->fcxp);
ns               3962 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3967 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rsnn_nn_retry(struct bfa_fcs_lport_ns_s *ns,
ns               3970 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3971 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3975 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rsnn_nn);
ns               3976 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rsnn_nn(ns, NULL);
ns               3980 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               3981 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_stop(&ns->timer);
ns               3985 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               3990 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_sending_rspn_id(struct bfa_fcs_lport_ns_s *ns,
ns               3993 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               3994 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               3998 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rspn_id);
ns               4002 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4003 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               4004 drivers/scsi/bfa/bfa_fcs_lport.c 					   &ns->fcxp_wqe);
ns               4008 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4013 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rspn_id(struct bfa_fcs_lport_ns_s *ns,
ns               4016 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4017 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4024 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rspn_id_retry);
ns               4025 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->port->stats.ns_retries++;
ns               4026 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               4027 drivers/scsi/bfa/bfa_fcs_lport.c 				    &ns->timer, bfa_fcs_lport_ns_timeout, ns,
ns               4032 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rft_id);
ns               4033 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rft_id(ns, NULL);
ns               4037 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_discard(ns->fcxp);
ns               4038 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4042 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4047 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rspn_id_retry(struct bfa_fcs_lport_ns_s *ns,
ns               4050 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4051 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4058 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rspn_id);
ns               4059 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rspn_id(ns, NULL);
ns               4063 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4064 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_stop(&ns->timer);
ns               4068 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4073 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_sending_rft_id(struct bfa_fcs_lport_ns_s *ns,
ns               4076 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4077 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4081 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rft_id);
ns               4085 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4086 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               4087 drivers/scsi/bfa/bfa_fcs_lport.c 					   &ns->fcxp_wqe);
ns               4091 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4096 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rft_id(struct bfa_fcs_lport_ns_s *ns,
ns               4099 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4100 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4105 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rff_id);
ns               4106 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rff_id(ns, NULL);
ns               4113 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rft_id_retry);
ns               4114 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->port->stats.ns_retries++;
ns               4115 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               4116 drivers/scsi/bfa/bfa_fcs_lport.c 				    &ns->timer, bfa_fcs_lport_ns_timeout, ns,
ns               4121 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4122 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_discard(ns->fcxp);
ns               4126 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4131 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rft_id_retry(struct bfa_fcs_lport_ns_s *ns,
ns               4134 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4135 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4139 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rft_id);
ns               4140 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rft_id(ns, NULL);
ns               4144 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4145 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_stop(&ns->timer);
ns               4149 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4154 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_sending_rff_id(struct bfa_fcs_lport_ns_s *ns,
ns               4157 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4158 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4162 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rff_id);
ns               4166 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4167 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               4168 drivers/scsi/bfa/bfa_fcs_lport.c 					   &ns->fcxp_wqe);
ns               4172 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4177 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rff_id(struct bfa_fcs_lport_ns_s *ns,
ns               4180 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4181 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4191 drivers/scsi/bfa/bfa_fcs_lport.c 		if (__fcs_min_cfg(ns->port->fcs)) {
ns               4192 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_fcs_lport_ns_boot_target_disc(ns->port);
ns               4193 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_online);
ns               4201 drivers/scsi/bfa/bfa_fcs_lport.c 		if (BFA_FCS_VPORT_IS_INITIATOR_MODE(ns->port)) {
ns               4202 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_set_state(ns,
ns               4204 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_fcs_lport_ns_send_gid_ft(ns, NULL);
ns               4209 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ms_online(ns->port);
ns               4216 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_rff_id_retry);
ns               4217 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->port->stats.ns_retries++;
ns               4218 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               4219 drivers/scsi/bfa/bfa_fcs_lport.c 				    &ns->timer, bfa_fcs_lport_ns_timeout, ns,
ns               4224 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4225 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_discard(ns->fcxp);
ns               4229 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4234 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_rff_id_retry(struct bfa_fcs_lport_ns_s *ns,
ns               4237 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4238 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4242 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_rff_id);
ns               4243 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_rff_id(ns, NULL);
ns               4247 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4248 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_stop(&ns->timer);
ns               4252 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4256 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_sending_gid_ft(struct bfa_fcs_lport_ns_s *ns,
ns               4259 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4260 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4264 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_gid_ft);
ns               4268 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4269 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               4270 drivers/scsi/bfa/bfa_fcs_lport.c 					   &ns->fcxp_wqe);
ns               4274 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4279 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_gid_ft(struct bfa_fcs_lport_ns_s *ns,
ns               4282 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4283 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4287 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_online);
ns               4297 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_gid_ft_retry);
ns               4298 drivers/scsi/bfa/bfa_fcs_lport.c 		ns->port->stats.ns_retries++;
ns               4299 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port),
ns               4300 drivers/scsi/bfa/bfa_fcs_lport.c 				    &ns->timer, bfa_fcs_lport_ns_timeout, ns,
ns               4305 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4306 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcxp_discard(ns->fcxp);
ns               4313 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4318 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_gid_ft_retry(struct bfa_fcs_lport_ns_s *ns,
ns               4321 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4322 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4326 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_sending_gid_ft);
ns               4327 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_lport_ns_send_gid_ft(ns, NULL);
ns               4331 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4332 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_timer_stop(&ns->timer);
ns               4336 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4341 drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_lport_ns_sm_online(struct bfa_fcs_lport_ns_s *ns,
ns               4344 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn);
ns               4345 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_trc(ns->port->fcs, event);
ns               4349 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               4357 drivers/scsi/bfa/bfa_fcs_lport.c 		if (BFA_FCS_VPORT_IS_INITIATOR_MODE(ns->port)) {
ns               4358 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_set_state(ns,
ns               4360 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_fcs_lport_ns_send_gid_ft(ns, NULL);
ns               4365 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_fault(ns->port->fcs, event);
ns               4378 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = ns_cbarg;
ns               4379 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4390 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe,
ns               4391 drivers/scsi/bfa/bfa_fcs_lport.c 				bfa_fcs_lport_ns_send_plogi, ns, BFA_TRUE);
ns               4394 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->fcxp = fcxp;
ns               4405 drivers/scsi/bfa/bfa_fcs_lport.c 			  bfa_fcs_lport_ns_plogi_response, (void *)ns,
ns               4409 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_PLOGI_SENT);
ns               4417 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = (struct bfa_fcs_lport_ns_s *) cbarg;
ns               4418 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4432 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4444 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4448 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4459 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4465 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4475 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = ns_cbarg;
ns               4476 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4487 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe,
ns               4488 drivers/scsi/bfa/bfa_fcs_lport.c 				bfa_fcs_lport_ns_send_rnn_id, ns, BFA_TRUE);
ns               4492 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->fcxp = fcxp;
ns               4501 drivers/scsi/bfa/bfa_fcs_lport.c 			  bfa_fcs_lport_ns_rnn_id_response, (void *)ns,
ns               4505 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RNNID_SENT);
ns               4515 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = (struct bfa_fcs_lport_ns_s *) cbarg;
ns               4516 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4527 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4536 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4543 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4552 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = ns_cbarg;
ns               4553 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4565 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe,
ns               4566 drivers/scsi/bfa/bfa_fcs_lport.c 				bfa_fcs_lport_ns_send_rsnn_nn, ns, BFA_TRUE);
ns               4569 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->fcxp = fcxp;
ns               4580 drivers/scsi/bfa/bfa_fcs_lport.c 			  bfa_fcs_lport_ns_rsnn_nn_response, (void *)ns,
ns               4585 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RSNN_NN_SENT);
ns               4594 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = (struct bfa_fcs_lport_ns_s *) cbarg;
ns               4595 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4606 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4615 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4622 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4631 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = ns_cbarg;
ns               4632 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4647 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe,
ns               4648 drivers/scsi/bfa/bfa_fcs_lport.c 				bfa_fcs_lport_ns_send_rspn_id, ns, BFA_TRUE);
ns               4651 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->fcxp = fcxp;
ns               4678 drivers/scsi/bfa/bfa_fcs_lport.c 			  bfa_fcs_lport_ns_rspn_id_response, (void *)ns,
ns               4683 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RSPNID_SENT);
ns               4692 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = (struct bfa_fcs_lport_ns_s *) cbarg;
ns               4693 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4704 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4713 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4720 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4729 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = ns_cbarg;
ns               4730 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4741 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe,
ns               4742 drivers/scsi/bfa/bfa_fcs_lport.c 				bfa_fcs_lport_ns_send_rft_id, ns, BFA_TRUE);
ns               4745 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->fcxp = fcxp;
ns               4752 drivers/scsi/bfa/bfa_fcs_lport.c 			  bfa_fcs_lport_ns_rft_id_response, (void *)ns,
ns               4756 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RFTID_SENT);
ns               4765 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = (struct bfa_fcs_lport_ns_s *) cbarg;
ns               4766 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4777 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4786 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4793 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4802 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = ns_cbarg;
ns               4803 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4815 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe,
ns               4816 drivers/scsi/bfa/bfa_fcs_lport.c 				bfa_fcs_lport_ns_send_rff_id, ns, BFA_TRUE);
ns               4819 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->fcxp = fcxp;
ns               4821 drivers/scsi/bfa/bfa_fcs_lport.c 	if (BFA_FCS_VPORT_IS_INITIATOR_MODE(ns->port))
ns               4830 drivers/scsi/bfa/bfa_fcs_lport.c 			  bfa_fcs_lport_ns_rff_id_response, (void *)ns,
ns               4834 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_RFFID_SENT);
ns               4843 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = (struct bfa_fcs_lport_ns_s *) cbarg;
ns               4844 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4855 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4864 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4874 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4876 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4887 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = ns_cbarg;
ns               4888 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4899 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe,
ns               4900 drivers/scsi/bfa/bfa_fcs_lport.c 				bfa_fcs_lport_ns_send_gid_ft, ns, BFA_TRUE);
ns               4903 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->fcxp = fcxp;
ns               4909 drivers/scsi/bfa/bfa_fcs_lport.c 			      ns->port->pid, FC_TYPE_FCP);
ns               4913 drivers/scsi/bfa/bfa_fcs_lport.c 			  bfa_fcs_lport_ns_gid_ft_response, (void *)ns,
ns               4918 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_GIDFT_SENT);
ns               4927 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = (struct bfa_fcs_lport_ns_s *) cbarg;
ns               4928 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               4940 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4967 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4983 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_send_event(ns, NSSM_EVENT_RSP_OK);
ns               4988 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               4995 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_RSP_ERROR);
ns               5014 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = (struct bfa_fcs_lport_ns_s *) arg;
ns               5016 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->port->stats.ns_timeouts++;
ns               5017 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_TIMEOUT);
ns               5101 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = BFA_FCS_GET_NS_FROM_PORT(port);
ns               5103 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->port = port;
ns               5104 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_set_state(ns, bfa_fcs_lport_ns_sm_offline);
ns               5110 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = BFA_FCS_GET_NS_FROM_PORT(port);
ns               5112 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->port = port;
ns               5113 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_PORT_OFFLINE);
ns               5119 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = BFA_FCS_GET_NS_FROM_PORT(port);
ns               5121 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->port = port;
ns               5122 drivers/scsi/bfa/bfa_fcs_lport.c 	bfa_sm_send_event(ns, NSSM_EVENT_PORT_ONLINE);
ns               5128 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = BFA_FCS_GET_NS_FROM_PORT(port);
ns               5131 drivers/scsi/bfa/bfa_fcs_lport.c 	if (bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_online))
ns               5132 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_sm_send_event(ns, NSSM_EVENT_NS_QUERY);
ns               5155 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_ns_s *ns = cbarg;
ns               5156 drivers/scsi/bfa/bfa_fcs_lport.c 	struct bfa_fcs_lport_s *port = ns->port;
ns               5163 drivers/scsi/bfa/bfa_fcs_lport.c 	if (bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_offline) ||
ns               5164 drivers/scsi/bfa/bfa_fcs_lport.c 	    bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_plogi_sending) ||
ns               5165 drivers/scsi/bfa/bfa_fcs_lport.c 	    bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_plogi) ||
ns               5166 drivers/scsi/bfa/bfa_fcs_lport.c 	    bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_plogi_retry) ||
ns               5167 drivers/scsi/bfa/bfa_fcs_lport.c 	    bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_rspn_id_retry))
ns               5177 drivers/scsi/bfa/bfa_fcs_lport.c 		bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe,
ns               5178 drivers/scsi/bfa/bfa_fcs_lport.c 			bfa_fcs_lport_ns_util_send_rspn_id, ns, BFA_FALSE);
ns               5182 drivers/scsi/bfa/bfa_fcs_lport.c 	ns->fcxp = fcxp;
ns                100 drivers/scsi/qla2xxx/tcm_qla2xxx.c static int tcm_qla2xxx_npiv_extract_wwn(const char *ns, u64 *nm)
ns                111 drivers/scsi/qla2xxx/tcm_qla2xxx.c 		value = hex_to_bin(*ns++);
ns               1808 drivers/scsi/scsi_transport_fc.c fc_parse_wwn(const char *ns, u64 *nm)
ns               1819 drivers/scsi/scsi_transport_fc.c 		value = hex_to_bin(*ns++);
ns                 60 drivers/spi/spi-bitbang.c 	unsigned		ns,
ns                 74 drivers/spi/spi-bitbang.c 		word = txrx_word(spi, ns, word, bits, flags);
ns                 88 drivers/spi/spi-bitbang.c 	unsigned		ns,
ns                102 drivers/spi/spi-bitbang.c 		word = txrx_word(spi, ns, word, bits, flags);
ns                116 drivers/spi/spi-bitbang.c 	unsigned		ns,
ns                130 drivers/spi/spi-bitbang.c 		word = txrx_word(spi, ns, word, bits, flags);
ns               1093 drivers/spi/spi.c static void _spi_transfer_delay_ns(u32 ns)
ns               1095 drivers/spi/spi.c 	if (!ns)
ns               1097 drivers/spi/spi.c 	if (ns <= 1000) {
ns               1098 drivers/spi/spi.c 		ndelay(ns);
ns               1100 drivers/spi/spi.c 		u32 us = DIV_ROUND_UP(ns, 1000);
ns                435 drivers/ssb/driver_chipcommon.c 			    unsigned long ns)
ns                443 drivers/ssb/driver_chipcommon.c 	tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT;		/* Waitcount-3 = 10ns */
ns                444 drivers/ssb/driver_chipcommon.c 	tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT;	/* Waitcount-1 = 40ns */
ns                445 drivers/ssb/driver_chipcommon.c 	tmp |= DIV_ROUND_UP(240, ns);				/* Waitcount-0 = 240ns */
ns                449 drivers/ssb/driver_chipcommon.c 	tmp = DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_3_SHIFT;	/* Waitcount-3 = 10nS */
ns                450 drivers/ssb/driver_chipcommon.c 	tmp |= DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_1_SHIFT;	/* Waitcount-1 = 10nS */
ns                451 drivers/ssb/driver_chipcommon.c 	tmp |= DIV_ROUND_UP(120, ns);				/* Waitcount-0 = 120nS */
ns                462 drivers/ssb/driver_chipcommon.c 		tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT;	  /* Waitcount-3 = 10ns */
ns                463 drivers/ssb/driver_chipcommon.c 		tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT;  /* Waitcount-2 = 20ns */
ns                464 drivers/ssb/driver_chipcommon.c 		tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */
ns                465 drivers/ssb/driver_chipcommon.c 		tmp |= DIV_ROUND_UP(120, ns);			  /* Waitcount-0 = 120ns */
ns                 86 drivers/ssb/driver_extif.c void ssb_extif_timing_init(struct ssb_extif *extif, unsigned long ns)
ns                 94 drivers/ssb/driver_extif.c 	tmp  = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT;
ns                 95 drivers/ssb/driver_extif.c 	tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT;
ns                 96 drivers/ssb/driver_extif.c 	tmp |= DIV_ROUND_UP(120, ns);
ns                100 drivers/ssb/driver_extif.c 	tmp  = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT;
ns                101 drivers/ssb/driver_extif.c 	tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT;
ns                102 drivers/ssb/driver_extif.c 	tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT;
ns                103 drivers/ssb/driver_extif.c 	tmp |= DIV_ROUND_UP(120, ns);
ns                297 drivers/ssb/driver_mipscore.c 	unsigned long hz, ns;
ns                309 drivers/ssb/driver_mipscore.c 	ns = 1000000000 / hz;
ns                312 drivers/ssb/driver_mipscore.c 		ssb_extif_timing_init(&bus->extif, ns);
ns                314 drivers/ssb/driver_mipscore.c 		ssb_chipco_timing_init(&bus->chipco, ns);
ns                270 drivers/staging/comedi/drivers/addi_apci_3120.c 					 unsigned int ns,
ns                280 drivers/staging/comedi/drivers/addi_apci_3120.c 		divisor = DIV_ROUND_UP(ns, timer_base);
ns                283 drivers/staging/comedi/drivers/addi_apci_3120.c 		divisor = ns / timer_base;
ns                287 drivers/staging/comedi/drivers/addi_apci_3120.c 		divisor = DIV_ROUND_CLOSEST(ns, timer_base);
ns                461 drivers/staging/comedi/drivers/addi_apci_3xxx.c 				   unsigned int *ns, unsigned int flags)
ns                490 drivers/staging/comedi/drivers/addi_apci_3xxx.c 			timer = DIV_ROUND_CLOSEST(*ns, base);
ns                493 drivers/staging/comedi/drivers/addi_apci_3xxx.c 			timer = *ns / base;
ns                496 drivers/staging/comedi/drivers/addi_apci_3xxx.c 			timer = DIV_ROUND_UP(*ns, base);
ns                503 drivers/staging/comedi/drivers/addi_apci_3xxx.c 			*ns = timer * time_base;
ns                177 drivers/staging/comedi/drivers/adv_pci1760.c static int pci1760_pwm_ns_to_div(unsigned int flags, unsigned int ns)
ns                183 drivers/staging/comedi/drivers/adv_pci1760.c 		divisor = DIV_ROUND_CLOSEST(ns, PCI1760_PWM_TIMEBASE);
ns                186 drivers/staging/comedi/drivers/adv_pci1760.c 		divisor = DIV_ROUND_UP(ns, PCI1760_PWM_TIMEBASE);
ns                189 drivers/staging/comedi/drivers/adv_pci1760.c 		divisor = ns / PCI1760_PWM_TIMEBASE;
ns                633 drivers/staging/comedi/drivers/amplc_pci230.c static unsigned int pci230_divide_ns(u64 ns, unsigned int timebase,
ns                639 drivers/staging/comedi/drivers/amplc_pci230.c 	div = ns;
ns                659 drivers/staging/comedi/drivers/amplc_pci230.c static unsigned int pci230_choose_clk_count(u64 ns, unsigned int *count,
ns                665 drivers/staging/comedi/drivers/amplc_pci230.c 		cnt = pci230_divide_ns(ns, pci230_timebase[clk_src], flags);
ns                673 drivers/staging/comedi/drivers/amplc_pci230.c static void pci230_ns_to_single_timer(unsigned int *ns, unsigned int flags)
ns                678 drivers/staging/comedi/drivers/amplc_pci230.c 	clk_src = pci230_choose_clk_count(*ns, &count, flags);
ns                679 drivers/staging/comedi/drivers/amplc_pci230.c 	*ns = count * pci230_timebase[clk_src];
ns                683 drivers/staging/comedi/drivers/amplc_pci230.c 				    unsigned int mode, u64 ns,
ns                692 drivers/staging/comedi/drivers/amplc_pci230.c 	clk_src = pci230_choose_clk_count(ns, &count, flags);
ns               1992 drivers/staging/comedi/drivers/cb_pcidas64.c static unsigned int get_divisor(unsigned int ns, unsigned int flags)
ns               1998 drivers/staging/comedi/drivers/cb_pcidas64.c 		divisor = DIV_ROUND_UP(ns, TIMER_BASE);
ns               2001 drivers/staging/comedi/drivers/cb_pcidas64.c 		divisor = ns / TIMER_BASE;
ns               2005 drivers/staging/comedi/drivers/cb_pcidas64.c 		divisor = DIV_ROUND_CLOSEST(ns, TIMER_BASE);
ns               3192 drivers/staging/comedi/drivers/cb_pcidas64.c static unsigned int get_ao_divisor(unsigned int ns, unsigned int flags)
ns               3194 drivers/staging/comedi/drivers/cb_pcidas64.c 	return get_divisor(ns, flags) - 2;
ns                367 drivers/staging/comedi/drivers/comedi_8254.c 	unsigned int ns;
ns                389 drivers/staging/comedi/drivers/comedi_8254.c 			ns = i8254->osc_base * d1 * d2;
ns                390 drivers/staging/comedi/drivers/comedi_8254.c 			if (ns <= *nanosec && ns > ns_glb) {
ns                391 drivers/staging/comedi/drivers/comedi_8254.c 				ns_glb = ns;
ns                395 drivers/staging/comedi/drivers/comedi_8254.c 			if (ns >= *nanosec && ns < ns_lub) {
ns                396 drivers/staging/comedi/drivers/comedi_8254.c 				ns_lub = ns;
ns                685 drivers/staging/comedi/drivers/das16.c static unsigned int das16_set_pacer(struct comedi_device *dev, unsigned int ns,
ns                688 drivers/staging/comedi/drivers/das16.c 	comedi_8254_cascade_ns_to_timer(dev->pacer, &ns, flags);
ns                692 drivers/staging/comedi/drivers/das16.c 	return ns;
ns                748 drivers/staging/comedi/drivers/das1800.c 					     unsigned int ns)
ns                760 drivers/staging/comedi/drivers/das1800.c 			samples = ns / cmd->convert_arg;
ns                763 drivers/staging/comedi/drivers/das1800.c 		samples = ns / (cmd->scan_begin_arg * cmd->chanlist_len);
ns                310 drivers/staging/comedi/drivers/dt2811.c 	unsigned long long ns;
ns                336 drivers/staging/comedi/drivers/dt2811.c 			ns = divider * DT2811_OSC_BASE;
ns                337 drivers/staging/comedi/drivers/dt2811.c 			if (ns > COMEDI_MIN_SPEED)
ns                341 drivers/staging/comedi/drivers/dt2811.c 			if (ns <= *nanosec && ns > ns_hi) {
ns                342 drivers/staging/comedi/drivers/dt2811.c 				ns_hi = ns;
ns                346 drivers/staging/comedi/drivers/dt2811.c 			if (ns >= *nanosec && ns < ns_lo) {
ns                347 drivers/staging/comedi/drivers/dt2811.c 				ns_lo = ns;
ns                 94 drivers/staging/comedi/drivers/dt2814.c static int dt2814_ns_to_timer(unsigned int *ns, unsigned int flags)
ns                103 drivers/staging/comedi/drivers/dt2814.c 		if ((2 * (*ns)) < (f * 11))
ns                108 drivers/staging/comedi/drivers/dt2814.c 	*ns = f;
ns                366 drivers/staging/comedi/drivers/dt282x.c static unsigned int dt282x_ns_to_timer(unsigned int *ns, unsigned int flags)
ns                377 drivers/staging/comedi/drivers/dt282x.c 			divider = DIV_ROUND_CLOSEST(*ns, base);
ns                380 drivers/staging/comedi/drivers/dt282x.c 			divider = (*ns) / base;
ns                383 drivers/staging/comedi/drivers/dt282x.c 			divider = DIV_ROUND_UP(*ns, base);
ns                394 drivers/staging/comedi/drivers/dt282x.c 	*ns = divider * base;
ns                294 drivers/staging/comedi/drivers/ni_labpc_common.c 					enum scan_mode mode, unsigned int ns)
ns                301 drivers/staging/comedi/drivers/ni_labpc_common.c 		cmd->scan_begin_arg = ns;
ns                305 drivers/staging/comedi/drivers/ni_labpc_common.c 		cmd->convert_arg = ns;
ns                322 drivers/staging/comedi/drivers/ni_labpc_common.c 				     enum scan_mode mode, unsigned int ns)
ns                330 drivers/staging/comedi/drivers/ni_labpc_common.c 	cmd->scan_begin_arg = ns;
ns                354 drivers/staging/comedi/drivers/quatech_daqp_cs.c static int daqp_ns_to_timer(unsigned int *ns, unsigned int flags)
ns                358 drivers/staging/comedi/drivers/quatech_daqp_cs.c 	timer = *ns / 200;
ns                359 drivers/staging/comedi/drivers/quatech_daqp_cs.c 	*ns = timer * 200;
ns                408 drivers/staging/comedi/drivers/rtd520.c static int rtd_ns_to_timer(unsigned int *ns, unsigned int flags)
ns                410 drivers/staging/comedi/drivers/rtd520.c 	return rtd_ns_to_timer_base(ns, flags, RTD_CLOCK_BASE);
ns                228 drivers/staging/gdm724x/gdm_lte.c 	struct neighbour_solicitation *ns;
ns                278 drivers/staging/gdm724x/gdm_lte.c 		ns = (struct neighbour_solicitation *)
ns                281 drivers/staging/gdm724x/gdm_lte.c 		memcpy(&na.target_address, ns->target_address, 16);
ns                509 drivers/staging/media/ipu3/ipu3.c 		u64 ns = ktime_get_ns();
ns                548 drivers/staging/media/ipu3/ipu3.c 			buf->vid_buf.vbb.vb2_buf.timestamp = ns;
ns               1846 drivers/video/fbdev/omap2/omapfb/dss/dsi.c static inline unsigned ns2ddr(struct platform_device *dsidev, unsigned ns)
ns               1852 drivers/video/fbdev/omap2/omapfb/dss/dsi.c 	return (ns * (ddr_clk / 1000 / 1000) + 999) / 1000;
ns                253 drivers/video/fbdev/riva/riva_hw.c     long ns;
ns                273 drivers/video/fbdev/riva/riva_hw.c             ns = 1000000 * ainfo->vburst_size/(state->memory_width/8)/state->mclk_khz;
ns                274 drivers/video/fbdev/riva/riva_hw.c             vfsize = ns * ainfo->vdrain_rate / 1000000;
ns                285 drivers/video/fbdev/riva/riva_hw.c             ns = 1000000 * (ainfo->gburst_size/(state->memory_width/8))/state->mclk_khz;
ns                286 drivers/video/fbdev/riva/riva_hw.c             gfsize = (ns * (long) ainfo->gdrain_rate)/1000000;
ns                340 drivers/video/fbdev/riva/riva_hw.c                     ns =  1000000 * (vmisses*state->mem_page_miss + state->mem_latency)/state->mclk_khz; 
ns                341 drivers/video/fbdev/riva/riva_hw.c                     vlwm = ns * ainfo->vdrain_rate/ 1000000;
ns                344 drivers/video/fbdev/riva/riva_hw.c                 ns = 1000000*(misses*state->mem_page_miss + ainfo->vburst_size)/(state->memory_width/8)/state->mclk_khz;
ns                345 drivers/video/fbdev/riva/riva_hw.c                 ainfo->vocc = ainfo->vocc + ainfo->vburst_size - ns*ainfo->vdrain_rate/1000000;
ns                346 drivers/video/fbdev/riva/riva_hw.c                 ainfo->gocc = ainfo->gocc - ns*ainfo->gdrain_rate/1000000;
ns                347 drivers/video/fbdev/riva/riva_hw.c                 ainfo->mocc = ainfo->mocc - ns*ainfo->mdrain_rate/1000000;
ns                356 drivers/video/fbdev/riva/riva_hw.c                     ns = 1000000*(gmisses*state->mem_page_miss + state->mem_latency)/state->mclk_khz ;
ns                357 drivers/video/fbdev/riva/riva_hw.c                     glwm = ns * ainfo->gdrain_rate/1000000;
ns                360 drivers/video/fbdev/riva/riva_hw.c                 ns = 1000000*(misses*state->mem_page_miss + ainfo->gburst_size/(state->memory_width/8))/state->mclk_khz;
ns                361 drivers/video/fbdev/riva/riva_hw.c                 ainfo->vocc = ainfo->vocc + 0 - ns*ainfo->vdrain_rate/1000000;
ns                362 drivers/video/fbdev/riva/riva_hw.c                 ainfo->gocc = ainfo->gocc + ainfo->gburst_size - ns*ainfo->gdrain_rate/1000000;
ns                363 drivers/video/fbdev/riva/riva_hw.c                 ainfo->mocc = ainfo->mocc + 0 - ns*ainfo->mdrain_rate/1000000;
ns                370 drivers/video/fbdev/riva/riva_hw.c                 ns = 1000000*(misses*state->mem_page_miss + mburst_size/(state->memory_width/8))/state->mclk_khz;
ns                371 drivers/video/fbdev/riva/riva_hw.c                 ainfo->vocc = ainfo->vocc + 0 - ns*ainfo->vdrain_rate/1000000;
ns                372 drivers/video/fbdev/riva/riva_hw.c                 ainfo->gocc = ainfo->gocc + 0 - ns*ainfo->gdrain_rate/1000000;
ns                373 drivers/video/fbdev/riva/riva_hw.c                 ainfo->mocc = ainfo->mocc + mburst_size - ns*ainfo->mdrain_rate/1000000;
ns                381 drivers/video/fbdev/riva/riva_hw.c         ns = 1000000*ainfo->gburst_size/(state->memory_width/8)/state->mclk_khz;
ns                382 drivers/video/fbdev/riva/riva_hw.c         tmp = ns * ainfo->gdrain_rate/1000000;
ns                388 drivers/video/fbdev/riva/riva_hw.c         ns = 1000000*ainfo->vburst_size/(state->memory_width/8)/state->mclk_khz;
ns                389 drivers/video/fbdev/riva/riva_hw.c         tmp = ns * ainfo->vdrain_rate/1000000;
ns                184 fs/ceph/xattr.c 	struct ceph_string *ns = ceph_try_get_string(ci->i_layout.pool_ns);
ns                186 fs/ceph/xattr.c 	if (ns) {
ns                187 fs/ceph/xattr.c 		ret = ns->len;
ns                189 fs/ceph/xattr.c 			memcpy(val, ns->str, ret);
ns                190 fs/ceph/xattr.c 		ceph_put_string(ns);
ns               3531 fs/f2fs/segment.c 			struct f2fs_summary *ns = &sum->entries[0];
ns               3533 fs/f2fs/segment.c 			for (i = 0; i < sbi->blocks_per_seg; i++, ns++) {
ns               3534 fs/f2fs/segment.c 				ns->version = 0;
ns               3535 fs/f2fs/segment.c 				ns->ofs_in_node = 0;
ns               2081 fs/inode.c     	struct user_namespace *ns;
ns               2086 fs/inode.c     	ns = current_user_ns();
ns               2087 fs/inode.c     	if (kuid_has_mapping(ns, inode->i_uid) && ns_capable(ns, CAP_FOWNER))
ns               4065 fs/jfs/jfs_dtree.c 	int xssi, ns, nd;
ns               4086 fs/jfs/jfs_dtree.c 	ns = nd = 0;
ns               4094 fs/jfs/jfs_dtree.c 			slv->length = ns;
ns               4106 fs/jfs/jfs_dtree.c 			ns = 0;
ns               4154 fs/jfs/jfs_dtree.c 		ns++;
ns               4166 fs/jfs/jfs_dtree.c 				slv->length = ns;
ns               4180 fs/jfs/jfs_dtree.c 				ns = 0;
ns               4192 fs/jfs/jfs_dtree.c 			ns++;
ns               4221 fs/jfs/jfs_dtree.c 	slv->length = ns;
ns                299 fs/kernfs/dir.c static unsigned int kernfs_name_hash(const char *name, const void *ns)
ns                301 fs/kernfs/dir.c 	unsigned long hash = init_name_hash(ns);
ns                316 fs/kernfs/dir.c 			       const void *ns, const struct kernfs_node *kn)
ns                322 fs/kernfs/dir.c 	if (ns < kn->ns)
ns                324 fs/kernfs/dir.c 	if (ns > kn->ns)
ns                332 fs/kernfs/dir.c 	return kernfs_name_compare(left->hash, left->name, left->ns, right);
ns                583 fs/kernfs/dir.c 	    kernfs_info(dentry->d_sb)->ns != kn->ns)
ns                777 fs/kernfs/dir.c 	if (WARN(has_ns != (bool)kn->ns, KERN_WARNING "kernfs: ns %s in '%s' for '%s'\n",
ns                791 fs/kernfs/dir.c 	kn->hash = kernfs_name_hash(kn->name, kn->ns);
ns                833 fs/kernfs/dir.c 					  const void *ns)
ns                841 fs/kernfs/dir.c 	if (has_ns != (bool)ns) {
ns                847 fs/kernfs/dir.c 	hash = kernfs_name_hash(name, ns);
ns                853 fs/kernfs/dir.c 		result = kernfs_name_compare(hash, name, ns, kn);
ns                866 fs/kernfs/dir.c 					  const void *ns)
ns                888 fs/kernfs/dir.c 		parent = kernfs_find_ns(parent, name, ns);
ns                907 fs/kernfs/dir.c 					   const char *name, const void *ns)
ns                912 fs/kernfs/dir.c 	kn = kernfs_find_ns(parent, name, ns);
ns                931 fs/kernfs/dir.c 					   const char *path, const void *ns)
ns                936 fs/kernfs/dir.c 	kn = kernfs_walk_ns(parent, path, ns);
ns               1016 fs/kernfs/dir.c 					 void *priv, const void *ns)
ns               1028 fs/kernfs/dir.c 	kn->ns = ns;
ns               1061 fs/kernfs/dir.c 	kn->ns = NULL;
ns               1081 fs/kernfs/dir.c 	const void *ns = NULL;
ns               1086 fs/kernfs/dir.c 		ns = kernfs_info(dir->i_sb)->ns;
ns               1088 fs/kernfs/dir.c 	kn = kernfs_find_ns(parent, dentry->d_name.name, ns);
ns               1498 fs/kernfs/dir.c 			     const void *ns)
ns               1510 fs/kernfs/dir.c 	kn = kernfs_find_ns(parent, name, ns);
ns               1548 fs/kernfs/dir.c 	if ((kn->parent == new_parent) && (kn->ns == new_ns) &&
ns               1578 fs/kernfs/dir.c 	kn->ns = new_ns;
ns               1586 fs/kernfs/dir.c 	kn->hash = kernfs_name_hash(kn->name, kn->ns);
ns               1610 fs/kernfs/dir.c static struct kernfs_node *kernfs_dir_pos(const void *ns,
ns               1634 fs/kernfs/dir.c 	while (pos && (!kernfs_active(pos) || pos->ns != ns)) {
ns               1644 fs/kernfs/dir.c static struct kernfs_node *kernfs_dir_next_pos(const void *ns,
ns               1647 fs/kernfs/dir.c 	pos = kernfs_dir_pos(ns, parent, ino, pos);
ns               1655 fs/kernfs/dir.c 		} while (pos && (!kernfs_active(pos) || pos->ns != ns));
ns               1665 fs/kernfs/dir.c 	const void *ns = NULL;
ns               1672 fs/kernfs/dir.c 		ns = kernfs_info(dentry->d_sb)->ns;
ns               1674 fs/kernfs/dir.c 	for (pos = kernfs_dir_pos(ns, parent, ctx->pos, pos);
ns               1676 fs/kernfs/dir.c 	     pos = kernfs_dir_next_pos(ns, parent, ctx->pos, pos)) {
ns                992 fs/kernfs/file.c 					 void *priv, const void *ns,
ns               1008 fs/kernfs/file.c 	kn->ns = ns;
ns                 68 fs/kernfs/kernfs-internal.h 	const void		*ns;
ns                259 fs/kernfs/mount.c 	return sb_info->root == info->root && sb_info->ns == info->ns;
ns                280 fs/kernfs/mount.c 	return info->ns;
ns                304 fs/kernfs/mount.c 	info->ns = kfc->ns_tag;
ns                 45 fs/kernfs/symlink.c 		kn->ns = target->ns;
ns                591 fs/lockd/host.c 			net->ns.inum);
ns                593 fs/lockd/host.c 			net->ns.inum);
ns                606 fs/lockd/host.c 			host->h_inuse, host->h_expires, host->net->ns.inum);
ns                620 fs/lockd/host.c 		net ? net->ns.inum : 0);
ns                661 fs/lockd/host.c 		net ? net->ns.inum : 0);
ns                679 fs/lockd/host.c 				host->net->ns.inum);
ns                115 fs/lockd/mon.c 			host->net->ns.inum);
ns                265 fs/lockd/mon.c 	s64 ns;
ns                267 fs/lockd/mon.c 	ns = ktime_get_ns();
ns                268 fs/lockd/mon.c 	put_unaligned(ns, p);
ns                271 fs/lockd/svc.c 	dprintk("%s: per-net data created; net=%x\n", __func__, net->ns.inum);
ns                290 fs/lockd/svc.c 				__func__, net->ns.inum);
ns                294 fs/lockd/svc.c 			__func__, nlmsvc_task, net->ns.inum);
ns                704 fs/lockd/svc.c 		  net->ns.inum, __func__);
ns                707 fs/lockd/svc.c 		  net->ns.inum, __func__);
ns                710 fs/lockd/svc.c 		  net->ns.inum, __func__);
ns                374 fs/lockd/svcsubs.c 	dprintk("lockd: %s for net %x\n", __func__, net ? net->ns.inum : 0);
ns               2287 fs/locks.c     static pid_t locks_translate_pid(struct file_lock *fl, struct pid_namespace *ns)
ns               2301 fs/locks.c     	if (ns == &init_pid_ns)
ns               2306 fs/locks.c     	vnr = pid_nr_ns(pid, ns);
ns                 10 fs/mount.h     	struct ns_common	ns;
ns                115 fs/mount.h     static inline void get_mnt_ns(struct mnt_namespace *ns)
ns                117 fs/mount.h     	atomic_inc(&ns->count);
ns                133 fs/mount.h     	struct mnt_namespace *ns;
ns                152 fs/mount.h     static inline bool is_anon_ns(struct mnt_namespace *ns)
ns                154 fs/mount.h     	return ns->seq == 0;
ns                668 fs/namespace.c 	struct mnt_namespace *ns = current->nsproxy->mnt_ns;
ns                676 fs/namespace.c 	list_for_each_entry(mnt, &ns->list, mnt_list) {
ns                782 fs/namespace.c static void touch_mnt_namespace(struct mnt_namespace *ns)
ns                784 fs/namespace.c 	if (ns) {
ns                785 fs/namespace.c 		ns->event = ++event;
ns                786 fs/namespace.c 		wake_up_interruptible(&ns->poll);
ns                793 fs/namespace.c static void __touch_mnt_namespace(struct mnt_namespace *ns)
ns                795 fs/namespace.c 	if (ns && ns->event != event) {
ns                796 fs/namespace.c 		ns->event = event;
ns                797 fs/namespace.c 		wake_up_interruptible(&ns->poll);
ns               1254 fs/namespace.c 	if (p->cached_event == p->ns->event) {
ns               1259 fs/namespace.c 			v = seq_list_next(v, &p->ns->list, &p->cached_index);
ns               1264 fs/namespace.c 	p->cached_event = p->ns->event;
ns               1265 fs/namespace.c 	p->cached_mount = seq_list_start(&p->ns->list, *pos);
ns               1274 fs/namespace.c 	p->cached_mount = seq_list_next(v, &p->ns->list, pos);
ns               1451 fs/namespace.c 		struct mnt_namespace *ns;
ns               1456 fs/namespace.c 		ns = p->mnt_ns;
ns               1457 fs/namespace.c 		if (ns) {
ns               1458 fs/namespace.c 			ns->mounts--;
ns               1459 fs/namespace.c 			__touch_mnt_namespace(ns);
ns               1731 fs/namespace.c struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
ns               1733 fs/namespace.c 	return container_of(ns, struct mnt_namespace, ns);
ns               1836 fs/namespace.c 	struct mnt_namespace *ns;
ns               1839 fs/namespace.c 	ns = real_mount(mnt)->mnt_ns;
ns               1840 fs/namespace.c 	if (ns) {
ns               1841 fs/namespace.c 		if (is_anon_ns(ns))
ns               1844 fs/namespace.c 			ns = NULL;
ns               1848 fs/namespace.c 	if (ns)
ns               1849 fs/namespace.c 		free_mnt_ns(ns);
ns               1955 fs/namespace.c int count_mounts(struct mnt_namespace *ns, struct mount *mnt)
ns               1964 fs/namespace.c 	old = ns->mounts;
ns               1965 fs/namespace.c 	pending = ns->pending_mounts;
ns               1973 fs/namespace.c 	ns->pending_mounts = pending + mounts;
ns               2047 fs/namespace.c 	struct mnt_namespace *ns = dest_mnt->mnt_ns;
ns               2062 fs/namespace.c 		err = count_mounts(ns, source_mnt);
ns               2120 fs/namespace.c 	ns->pending_mounts = 0;
ns               2323 fs/namespace.c 	struct mnt_namespace *ns = alloc_mnt_ns(user_ns, true);
ns               2327 fs/namespace.c 	if (IS_ERR(ns))
ns               2328 fs/namespace.c 		return ERR_CAST(ns);
ns               2334 fs/namespace.c 		free_mnt_ns(ns);
ns               2340 fs/namespace.c 		p->mnt_ns = ns;
ns               2341 fs/namespace.c 		ns->mounts++;
ns               2343 fs/namespace.c 	ns->root = mnt;
ns               2344 fs/namespace.c 	list_add_tail(&ns->list, &mnt->mnt_list);
ns               2600 fs/namespace.c 	struct mnt_namespace *ns;
ns               2617 fs/namespace.c 	ns = old->mnt_ns;
ns               2629 fs/namespace.c 	if (!(attached ? check_mnt(old) : is_anon_ns(ns)))
ns               2675 fs/namespace.c 			free_mnt_ns(ns);
ns               3149 fs/namespace.c static struct ucounts *inc_mnt_namespaces(struct user_namespace *ns)
ns               3151 fs/namespace.c 	return inc_ucount(ns, current_euid(), UCOUNT_MNT_NAMESPACES);
ns               3159 fs/namespace.c static void free_mnt_ns(struct mnt_namespace *ns)
ns               3161 fs/namespace.c 	if (!is_anon_ns(ns))
ns               3162 fs/namespace.c 		ns_free_inum(&ns->ns);
ns               3163 fs/namespace.c 	dec_mnt_namespaces(ns->ucounts);
ns               3164 fs/namespace.c 	put_user_ns(ns->user_ns);
ns               3165 fs/namespace.c 	kfree(ns);
ns               3193 fs/namespace.c 		ret = ns_alloc_inum(&new_ns->ns);
ns               3200 fs/namespace.c 	new_ns->ns.ops = &mntns_operations;
ns               3212 fs/namespace.c struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns,
ns               3222 fs/namespace.c 	BUG_ON(!ns);
ns               3225 fs/namespace.c 		get_mnt_ns(ns);
ns               3226 fs/namespace.c 		return ns;
ns               3229 fs/namespace.c 	old = ns->root;
ns               3238 fs/namespace.c 	if (user_ns != ns->user_ns)
ns               3246 fs/namespace.c 	if (user_ns != ns->user_ns) {
ns               3294 fs/namespace.c 	struct mnt_namespace *ns;
ns               3299 fs/namespace.c 	ns = alloc_mnt_ns(&init_user_ns, true);
ns               3300 fs/namespace.c 	if (IS_ERR(ns)) {
ns               3302 fs/namespace.c 		return ERR_CAST(ns);
ns               3304 fs/namespace.c 	mnt->mnt_ns = ns;
ns               3305 fs/namespace.c 	ns->root = mnt;
ns               3306 fs/namespace.c 	ns->mounts++;
ns               3307 fs/namespace.c 	list_add(&mnt->mnt_list, &ns->list);
ns               3312 fs/namespace.c 	put_mnt_ns(ns);
ns               3375 fs/namespace.c 	struct mnt_namespace *ns;
ns               3470 fs/namespace.c 	ns = alloc_mnt_ns(current->nsproxy->mnt_ns->user_ns, true);
ns               3471 fs/namespace.c 	if (IS_ERR(ns)) {
ns               3472 fs/namespace.c 		ret = PTR_ERR(ns);
ns               3476 fs/namespace.c 	mnt->mnt_ns = ns;
ns               3477 fs/namespace.c 	ns->root = mnt;
ns               3478 fs/namespace.c 	ns->mounts = 1;
ns               3479 fs/namespace.c 	list_add(&mnt->mnt_list, &ns->list);
ns               3719 fs/namespace.c 	struct mnt_namespace *ns;
ns               3726 fs/namespace.c 	ns = alloc_mnt_ns(&init_user_ns, false);
ns               3727 fs/namespace.c 	if (IS_ERR(ns))
ns               3730 fs/namespace.c 	m->mnt_ns = ns;
ns               3731 fs/namespace.c 	ns->root = m;
ns               3732 fs/namespace.c 	ns->mounts = 1;
ns               3733 fs/namespace.c 	list_add(&m->mnt_list, &ns->list);
ns               3734 fs/namespace.c 	init_task.nsproxy->mnt_ns = ns;
ns               3735 fs/namespace.c 	get_mnt_ns(ns);
ns               3780 fs/namespace.c void put_mnt_ns(struct mnt_namespace *ns)
ns               3782 fs/namespace.c 	if (!atomic_dec_and_test(&ns->count))
ns               3784 fs/namespace.c 	drop_collected_mounts(&ns->root->mnt);
ns               3785 fs/namespace.c 	free_mnt_ns(ns);
ns               3843 fs/namespace.c static bool mnt_already_visible(struct mnt_namespace *ns,
ns               3852 fs/namespace.c 	list_for_each_entry(mnt, &ns->list, mnt_list) {
ns               3910 fs/namespace.c 	struct mnt_namespace *ns = current->nsproxy->mnt_ns;
ns               3913 fs/namespace.c 	if (ns->user_ns == &init_user_ns)
ns               3927 fs/namespace.c 	return !mnt_already_visible(ns, sb, new_mnt_flags);
ns               3945 fs/namespace.c 	struct ns_common *ns = NULL;
ns               3951 fs/namespace.c 		ns = &nsproxy->mnt_ns->ns;
ns               3952 fs/namespace.c 		get_mnt_ns(to_mnt_ns(ns));
ns               3956 fs/namespace.c 	return ns;
ns               3959 fs/namespace.c static void mntns_put(struct ns_common *ns)
ns               3961 fs/namespace.c 	put_mnt_ns(to_mnt_ns(ns));
ns               3964 fs/namespace.c static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)
ns               3967 fs/namespace.c 	struct mnt_namespace *mnt_ns = to_mnt_ns(ns), *old_mnt_ns;
ns               4006 fs/namespace.c static struct user_namespace *mntns_owner(struct ns_common *ns)
ns               4008 fs/namespace.c 	return to_mnt_ns(ns)->user_ns;
ns                 55 fs/nfs/callback.c 		nn->nfs_callback_tcpport, PF_INET, net->ns.inum);
ns                 63 fs/nfs/callback.c 			nn->nfs_callback_tcpport6, PF_INET6, net->ns.inum);
ns                191 fs/nfs/callback.c 	dprintk("NFS: destroy per-net callback data; net=%x\n", net->ns.inum);
ns                204 fs/nfs/callback.c 	dprintk("NFS: create per-net callback data; net=%x\n", net->ns.inum);
ns                231 fs/nfs/callback.c 			"net = %x\n", ret, net->ns.inum);
ns               5924 fs/nfs/nfs4proc.c 		u64 ns = ktime_to_ns(nn->boot_time);
ns               5926 fs/nfs/nfs4proc.c 		verf[0] = cpu_to_be32(ns >> 32);
ns               5927 fs/nfs/nfs4proc.c 		verf[1] = cpu_to_be32(ns);
ns                 38 fs/nfs_common/grace.c 		     net->ns.inum, (net == &init_net) ? "(init_net)" : "");
ns                114 fs/nfs_common/grace.c 		  net->ns.inum, __func__);
ns               1249 fs/nfsd/export.c 	dprintk("nfsd: initializing export module (net: %x).\n", net->ns.inum);
ns               1297 fs/nfsd/export.c 	dprintk("nfsd: shutting down export module (net: %x).\n", net->ns.inum);
ns               1305 fs/nfsd/export.c 	dprintk("nfsd: export shutdown complete (net: %x).\n", net->ns.inum);
ns               2070 fs/nfsd/nfs4state.c 				clp->net->ns.inum);
ns               6318 fs/nfsd/nfs4state.c 	struct nfs4_stid *ns = NULL;
ns               6332 fs/nfsd/nfs4state.c 	ns = nfs4_alloc_stid(clp, stateid_slab, nfs4_free_lock_stateid);
ns               6333 fs/nfsd/nfs4state.c 	if (ns == NULL)
ns               6336 fs/nfsd/nfs4state.c 	lst = init_lock_stateid(openlockstateid(ns), lo, fi, inode, ost);
ns               6337 fs/nfsd/nfs4state.c 	if (lst == openlockstateid(ns))
ns               6340 fs/nfsd/nfs4state.c 		nfs4_put_stid(ns);
ns               7716 fs/nfsd/nfs4state.c 	       nn->nfsd4_grace, net->ns.inum);
ns               7722 fs/nfsd/nfs4state.c 			net->ns.inum);
ns               2028 fs/nfsd/nfs4xdr.c 	u32 ns;
ns               2030 fs/nfsd/nfs4xdr.c 	ns = max_t(u32, NSEC_PER_SEC/HZ, inode->i_sb->s_time_gran);
ns               2031 fs/nfsd/nfs4xdr.c 	ts = ns_to_timespec(ns);
ns                 44 fs/notify/inotify/inotify.h 	return inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_INOTIFY_WATCHES);
ns                 36 fs/nsfs.c      		struct ns_common *ns = inode->i_private;
ns                 37 fs/nsfs.c      		atomic_long_set(&ns->stashed, 0);
ns                 50 fs/nsfs.c      	struct ns_common *ns = inode->i_private;
ns                 52 fs/nsfs.c      	ns->ops->put(ns);
ns                 55 fs/nsfs.c      static void *__ns_get_path(struct path *path, struct ns_common *ns)
ns                 63 fs/nsfs.c      	d = atomic_long_read(&ns->stashed);
ns                 70 fs/nsfs.c      	ns->ops->put(ns);
ns                 79 fs/nsfs.c      		ns->ops->put(ns);
ns                 82 fs/nsfs.c      	inode->i_ino = ns->inum;
ns                 87 fs/nsfs.c      	inode->i_private = ns;
ns                 95 fs/nsfs.c      	dentry->d_fsdata = (void *)ns->ops;
ns                 96 fs/nsfs.c      	d = atomic_long_cmpxchg(&ns->stashed, 0, (unsigned long)dentry);
ns                112 fs/nsfs.c      		struct ns_common *ns = ns_get_cb(private_data);
ns                113 fs/nsfs.c      		if (!ns)
ns                116 fs/nsfs.c      		ret = __ns_get_path(path, ns);
ns                145 fs/nsfs.c      int open_related_ns(struct ns_common *ns,
ns                146 fs/nsfs.c      		   struct ns_common *(*get_ns)(struct ns_common *ns))
ns                160 fs/nsfs.c      		relative = get_ns(ns);
ns                190 fs/nsfs.c      	struct ns_common *ns = get_proc_ns(file_inode(filp));
ns                196 fs/nsfs.c      		return open_related_ns(ns, ns_get_owner);
ns                198 fs/nsfs.c      		if (!ns->ops->get_parent)
ns                200 fs/nsfs.c      		return open_related_ns(ns, ns->ops->get_parent);
ns                202 fs/nsfs.c      		return ns->ops->type;
ns                204 fs/nsfs.c      		if (ns->ops->type != CLONE_NEWUSER)
ns                206 fs/nsfs.c      		user_ns = container_of(ns, struct user_namespace, ns);
ns                218 fs/nsfs.c      	struct ns_common *ns;
ns                221 fs/nsfs.c      	ns = ns_ops->get(task);
ns                222 fs/nsfs.c      	if (ns) {
ns                224 fs/nsfs.c      		res = snprintf(buf, size, "%s:[%u]", name, ns->inum);
ns                225 fs/nsfs.c      		ns_ops->put(ns);
ns                326 fs/ntfs/unistr.c 	unsigned char *ns;
ns                331 fs/ntfs/unistr.c 		ns = *outs;
ns                333 fs/ntfs/unistr.c 		if (ns && !ns_len) {
ns                337 fs/ntfs/unistr.c 		if (!ns) {
ns                339 fs/ntfs/unistr.c 			ns = kmalloc(ns_len + 1, GFP_NOFS);
ns                340 fs/ntfs/unistr.c 			if (!ns)
ns                344 fs/ntfs/unistr.c retry:			wc = nls->uni2char(le16_to_cpu(ins[i]), ns + o,
ns                351 fs/ntfs/unistr.c 			else if (wc == -ENAMETOOLONG && ns != *outs) {
ns                357 fs/ntfs/unistr.c 					memcpy(tc, ns, ns_len);
ns                359 fs/ntfs/unistr.c 					kfree(ns);
ns                360 fs/ntfs/unistr.c 					ns = tc;
ns                366 fs/ntfs/unistr.c 		ns[o] = 0;
ns                367 fs/ntfs/unistr.c 		*outs = ns;
ns                376 fs/ntfs/unistr.c 	if (ns != *outs)
ns                377 fs/ntfs/unistr.c 		kfree(ns);
ns                691 fs/ocfs2/cluster/nodemanager.c 	struct o2nm_node_group *ns = NULL;
ns                700 fs/ocfs2/cluster/nodemanager.c 	ns = kzalloc(sizeof(struct o2nm_node_group), GFP_KERNEL);
ns                702 fs/ocfs2/cluster/nodemanager.c 	if (cluster == NULL || ns == NULL || o2hb_group == NULL)
ns                707 fs/ocfs2/cluster/nodemanager.c 	configfs_add_default_group(&ns->ns_group, &cluster->cl_group);
ns                709 fs/ocfs2/cluster/nodemanager.c 	config_group_init_type_name(&ns->ns_group, "node",
ns                726 fs/ocfs2/cluster/nodemanager.c 		kfree(ns);
ns                 38 fs/pnode.c     					 struct mnt_namespace *ns,
ns                 45 fs/pnode.c     		if (m->mnt_ns == ns && is_path_reachable(m, m->mnt.mnt_root, root))
ns                 55 fs/pnode.h     int count_mounts(struct mnt_namespace *ns, struct mount *mnt);
ns                152 fs/proc/array.c static inline void task_state(struct seq_file *m, struct pid_namespace *ns,
ns                165 fs/proc/array.c 		task_tgid_nr_ns(rcu_dereference(p->real_parent), ns) : 0;
ns                169 fs/proc/array.c 		tpid = task_pid_nr_ns(tracer, ns);
ns                171 fs/proc/array.c 	tgid = task_tgid_nr_ns(p, ns);
ns                190 fs/proc/array.c 	seq_put_decimal_ull(m, "\nPid:\t", pid_nr_ns(pid, ns));
ns                214 fs/proc/array.c 	for (g = ns->level; g <= pid->level; g++)
ns                215 fs/proc/array.c 		seq_put_decimal_ull(m, "\t", task_tgid_nr_ns(p, pid->numbers[g].ns));
ns                217 fs/proc/array.c 	for (g = ns->level; g <= pid->level; g++)
ns                218 fs/proc/array.c 		seq_put_decimal_ull(m, "\t", task_pid_nr_ns(p, pid->numbers[g].ns));
ns                220 fs/proc/array.c 	for (g = ns->level; g <= pid->level; g++)
ns                221 fs/proc/array.c 		seq_put_decimal_ull(m, "\t", task_pgrp_nr_ns(p, pid->numbers[g].ns));
ns                223 fs/proc/array.c 	for (g = ns->level; g <= pid->level; g++)
ns                224 fs/proc/array.c 		seq_put_decimal_ull(m, "\t", task_session_nr_ns(p, pid->numbers[g].ns));
ns                404 fs/proc/array.c int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
ns                413 fs/proc/array.c 	task_state(m, ns, pid, task);
ns                430 fs/proc/array.c static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
ns                484 fs/proc/array.c 			tty_pgrp = pid_nr_ns(pgrp, ns);
ns                514 fs/proc/array.c 		sid = task_session_nr_ns(task, ns);
ns                515 fs/proc/array.c 		ppid = task_tgid_nr_ns(task->real_parent, ns);
ns                516 fs/proc/array.c 		pgid = task_pgrp_nr_ns(task, ns);
ns                538 fs/proc/array.c 	seq_put_decimal_ull(m, "", pid_nr_ns(pid, ns));
ns                623 fs/proc/array.c int proc_tid_stat(struct seq_file *m, struct pid_namespace *ns,
ns                626 fs/proc/array.c 	return do_task_stat(m, ns, pid, task, 0);
ns                629 fs/proc/array.c int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns,
ns                632 fs/proc/array.c 	return do_task_stat(m, ns, pid, task, 1);
ns                635 fs/proc/array.c int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
ns                383 fs/proc/base.c static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns,
ns                425 fs/proc/base.c static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns,
ns                473 fs/proc/base.c static int proc_pid_schedstat(struct seq_file *m, struct pid_namespace *ns,
ns                547 fs/proc/base.c static int proc_oom_score(struct seq_file *m, struct pid_namespace *ns,
ns                584 fs/proc/base.c static int proc_pid_limits(struct seq_file *m, struct pid_namespace *ns,
ns                628 fs/proc/base.c static int proc_pid_syscall(struct seq_file *m, struct pid_namespace *ns,
ns                747 fs/proc/base.c 	struct pid_namespace *ns = proc_pid_ns(inode);
ns                756 fs/proc/base.c 	ret = PROC_I(inode)->op.proc_show(m, ns, pid, task);
ns               1416 fs/proc/base.c 	struct pid_namespace *ns = proc_pid_ns(inode);
ns               1422 fs/proc/base.c 	proc_sched_show_task(p, ns, m);
ns               2264 fs/proc/base.c 	struct pid_namespace *ns;
ns               2325 fs/proc/base.c 		   pid_nr_ns(timer->it_pid, tp->ns));
ns               2348 fs/proc/base.c 	tp->ns = proc_pid_ns(inode);
ns               2813 fs/proc/base.c static int proc_tid_io_accounting(struct seq_file *m, struct pid_namespace *ns,
ns               2819 fs/proc/base.c static int proc_tgid_io_accounting(struct seq_file *m, struct pid_namespace *ns,
ns               2830 fs/proc/base.c 	struct user_namespace *ns = NULL;
ns               2838 fs/proc/base.c 		ns = get_user_ns(task_cred_xxx(task, user_ns));
ns               2842 fs/proc/base.c 	if (!ns)
ns               2850 fs/proc/base.c 	seq->private = ns;
ns               2854 fs/proc/base.c 	put_user_ns(ns);
ns               2862 fs/proc/base.c 	struct user_namespace *ns = seq->private;
ns               2863 fs/proc/base.c 	put_user_ns(ns);
ns               2908 fs/proc/base.c 	struct user_namespace *ns = NULL;
ns               2916 fs/proc/base.c 		ns = get_user_ns(task_cred_xxx(task, user_ns));
ns               2920 fs/proc/base.c 	if (!ns)
ns               2925 fs/proc/base.c 		if (!ns_capable(ns, CAP_SYS_ADMIN))
ns               2929 fs/proc/base.c 	ret = single_open(file, &proc_setgroups_show, ns);
ns               2935 fs/proc/base.c 	put_user_ns(ns);
ns               2943 fs/proc/base.c 	struct user_namespace *ns = seq->private;
ns               2945 fs/proc/base.c 	put_user_ns(ns);
ns               2958 fs/proc/base.c static int proc_pid_personality(struct seq_file *m, struct pid_namespace *ns,
ns               2970 fs/proc/base.c static int proc_pid_patch_state(struct seq_file *m, struct pid_namespace *ns,
ns               2979 fs/proc/base.c static int proc_stack_depth(struct seq_file *m, struct pid_namespace *ns,
ns               3217 fs/proc/base.c 		proc_flush_task_mnt(upid->ns->proc_mnt, upid->nr,
ns               3246 fs/proc/base.c 	struct pid_namespace *ns;
ns               3253 fs/proc/base.c 	ns = dentry->d_sb->s_fs_info;
ns               3255 fs/proc/base.c 	task = find_task_by_pid_ns(tgid, ns);
ns               3276 fs/proc/base.c static struct tgid_iter next_tgid(struct pid_namespace *ns, struct tgid_iter iter)
ns               3285 fs/proc/base.c 	pid = find_ge_pid(iter.tgid, ns);
ns               3287 fs/proc/base.c 		iter.tgid = pid_nr_ns(pid, ns);
ns               3317 fs/proc/base.c 	struct pid_namespace *ns = proc_pid_ns(file_inode(file));
ns               3324 fs/proc/base.c 		struct inode *inode = d_inode(ns->proc_self);
ns               3330 fs/proc/base.c 		struct inode *inode = d_inode(ns->proc_thread_self);
ns               3337 fs/proc/base.c 	for (iter = next_tgid(ns, iter);
ns               3339 fs/proc/base.c 	     iter.tgid += 1, iter = next_tgid(ns, iter)) {
ns               3344 fs/proc/base.c 		if (!has_pid_permissions(ns, iter.task, HIDEPID_INVISIBLE))
ns               3541 fs/proc/base.c 	struct pid_namespace *ns;
ns               3551 fs/proc/base.c 	ns = dentry->d_sb->s_fs_info;
ns               3553 fs/proc/base.c 	task = find_task_by_pid_ns(tid, ns);
ns               3584 fs/proc/base.c 					struct pid_namespace *ns)
ns               3599 fs/proc/base.c 		pos = find_task_by_pid_ns(tid, ns);
ns               3653 fs/proc/base.c 	struct pid_namespace *ns;
ns               3665 fs/proc/base.c 	ns = proc_pid_ns(inode);
ns               3668 fs/proc/base.c 	for (task = first_tid(proc_pid(inode), tid, ctx->pos - 2, ns);
ns               3673 fs/proc/base.c 		tid = task_pid_nr_ns(task, ns);
ns                 79 fs/proc/internal.h 		struct pid_namespace *ns, struct pid *pid,
ns                257 fs/proc/proc_net.c 	struct nsproxy *ns;
ns                264 fs/proc/proc_net.c 		ns = task->nsproxy;
ns                265 fs/proc/proc_net.c 		if (ns != NULL)
ns                266 fs/proc/proc_net.c 			net = get_net(ns->net_ns);
ns                196 fs/proc/root.c 	struct pid_namespace *ns;
ns                198 fs/proc/root.c 	ns = (struct pid_namespace *)sb->s_fs_info;
ns                199 fs/proc/root.c 	if (ns->proc_self)
ns                200 fs/proc/root.c 		dput(ns->proc_self);
ns                201 fs/proc/root.c 	if (ns->proc_thread_self)
ns                202 fs/proc/root.c 		dput(ns->proc_thread_self);
ns                204 fs/proc/root.c 	put_pid_ns(ns);
ns                301 fs/proc/root.c int pid_ns_prepare_proc(struct pid_namespace *ns)
ns                311 fs/proc/root.c 	if (fc->user_ns != ns->user_ns) {
ns                313 fs/proc/root.c 		fc->user_ns = get_user_ns(ns->user_ns);
ns                317 fs/proc/root.c 	if (ctx->pid_ns != ns) {
ns                319 fs/proc/root.c 		get_pid_ns(ns);
ns                320 fs/proc/root.c 		ctx->pid_ns = ns;
ns                328 fs/proc/root.c 	ns->proc_mnt = mnt;
ns                332 fs/proc/root.c void pid_ns_release_proc(struct pid_namespace *ns)
ns                334 fs/proc/root.c 	kern_unmount(ns->proc_mnt);
ns                 15 fs/proc/self.c 	struct pid_namespace *ns = proc_pid_ns(inode);
ns                 16 fs/proc/self.c 	pid_t tgid = task_tgid_nr_ns(current, ns);
ns                 39 fs/proc/self.c 	struct pid_namespace *ns = proc_pid_ns(root_inode);
ns                 65 fs/proc/self.c 		ns->proc_self = self;
ns                 15 fs/proc/thread_self.c 	struct pid_namespace *ns = proc_pid_ns(inode);
ns                 16 fs/proc/thread_self.c 	pid_t tgid = task_tgid_nr_ns(current, ns);
ns                 17 fs/proc/thread_self.c 	pid_t pid = task_pid_nr_ns(current, ns);
ns                 39 fs/proc/thread_self.c 	struct pid_namespace *ns = proc_pid_ns(root_inode);
ns                 65 fs/proc/thread_self.c 		ns->proc_thread_self = thread_self;
ns                 25 fs/proc_namespace.c 	struct mnt_namespace *ns = p->ns;
ns                 29 fs/proc_namespace.c 	poll_wait(file, &p->ns->poll, wait);
ns                 31 fs/proc_namespace.c 	event = READ_ONCE(ns->event);
ns                243 fs/proc_namespace.c 	struct mnt_namespace *ns = NULL;
ns                259 fs/proc_namespace.c 	ns = nsp->mnt_ns;
ns                260 fs/proc_namespace.c 	get_mnt_ns(ns);
ns                276 fs/proc_namespace.c 	m->poll_event = ns->event;
ns                279 fs/proc_namespace.c 	p->ns = ns;
ns                289 fs/proc_namespace.c 	put_mnt_ns(ns);
ns                299 fs/proc_namespace.c 	put_mnt_ns(p->ns);
ns                 40 fs/sysfs/dir.c int sysfs_create_dir_ns(struct kobject *kobj, const void *ns)
ns                 61 fs/sysfs/dir.c 				  kobj, ns);
ns                247 fs/sysfs/file.c 			   umode_t mode, kuid_t uid, kgid_t gid, const void *ns)
ns                306 fs/sysfs/file.c 				  size, ops, (void *)attr, ns, key);
ns                322 fs/sysfs/file.c 			 const void *ns)
ns                332 fs/sysfs/file.c 				      uid, gid, ns);
ns                465 fs/sysfs/file.c 			  const void *ns)
ns                469 fs/sysfs/file.c 	kernfs_remove_by_name_ns(parent, attr->name, ns);
ns                 84 fs/sysfs/mount.c 	void *ns = (void *)kernfs_super_ns(sb);
ns                 87 fs/sysfs/mount.c 	kobj_ns_drop(KOBJ_NS_TYPE_NET, ns);
ns                124 fs/sysfs/symlink.c 	const void *ns = NULL;
ns                133 fs/sysfs/symlink.c 		ns = targ->sd->ns;
ns                135 fs/sysfs/symlink.c 	kernfs_remove_by_name_ns(kobj->sd, name, ns);
ns                179 fs/sysfs/symlink.c 		old_ns = targ->sd->ns;
ns                 33 fs/sysfs/sysfs.h 			   const void *ns);
ns                 31 include/linux/acct.h #define acct_exit_ns(ns)	do { } while (0)
ns                206 include/linux/capability.h 			      struct user_namespace *ns, int cap);
ns                209 include/linux/capability.h 				      struct user_namespace *ns, int cap);
ns                211 include/linux/capability.h extern bool ns_capable(struct user_namespace *ns, int cap);
ns                212 include/linux/capability.h extern bool ns_capable_noaudit(struct user_namespace *ns, int cap);
ns                213 include/linux/capability.h extern bool ns_capable_setid(struct user_namespace *ns, int cap);
ns                220 include/linux/capability.h 			      struct user_namespace *ns, int cap)
ns                229 include/linux/capability.h 				      struct user_namespace *ns, int cap)
ns                237 include/linux/capability.h static inline bool ns_capable(struct user_namespace *ns, int cap)
ns                241 include/linux/capability.h static inline bool ns_capable_noaudit(struct user_namespace *ns, int cap)
ns                245 include/linux/capability.h static inline bool ns_capable_setid(struct user_namespace *ns, int cap)
ns                250 include/linux/capability.h extern bool privileged_wrt_inode_uidgid(struct user_namespace *ns, const struct inode *inode);
ns                252 include/linux/capability.h extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap);
ns                253 include/linux/capability.h extern bool ptracer_capable(struct task_struct *tsk, struct user_namespace *ns);
ns                121 include/linux/cgroup.h int proc_cgroup_show(struct seq_file *m, struct pid_namespace *ns,
ns                856 include/linux/cgroup.h 	struct ns_common	ns;
ns                866 include/linux/cgroup.h void free_cgroup_ns(struct cgroup_namespace *ns);
ns                873 include/linux/cgroup.h 		   struct cgroup_namespace *ns);
ns                877 include/linux/cgroup.h static inline void free_cgroup_ns(struct cgroup_namespace *ns) { }
ns                887 include/linux/cgroup.h static inline void get_cgroup_ns(struct cgroup_namespace *ns)
ns                889 include/linux/cgroup.h 	if (ns)
ns                890 include/linux/cgroup.h 		refcount_inc(&ns->count);
ns                893 include/linux/cgroup.h static inline void put_cgroup_ns(struct cgroup_namespace *ns)
ns                895 include/linux/cgroup.h 	if (ns && refcount_dec_and_test(&ns->count))
ns                896 include/linux/cgroup.h 		free_cgroup_ns(ns);
ns                101 include/linux/cpuset.h extern int proc_cpuset_show(struct seq_file *m, struct pid_namespace *ns,
ns                727 include/linux/device.h 					     const void *ns);
ns                730 include/linux/device.h 				 const void *ns);
ns                 97 include/linux/export.h #define ___EXPORT_SYMBOL_NS(sym,sec,ns)	__GENKSYMS_EXPORT_SYMBOL(sym)
ns                109 include/linux/export.h #define ___EXPORT_SYMBOL_NS(sym, sec, ns)				\
ns                113 include/linux/export.h 	= #ns;								\
ns                129 include/linux/export.h #define __EXPORT_SYMBOL_NS(sym, sec, ns)
ns                156 include/linux/export.h #define __EXPORT_SYMBOL_NS(sym, sec, ns)				\
ns                158 include/linux/export.h 	__cond_export_ns_sym(sym, sec, ns, __is_defined(__KSYM_##sym))
ns                159 include/linux/export.h #define __cond_export_ns_sym(sym, sec, ns, conf)			\
ns                160 include/linux/export.h 	___cond_export_ns_sym(sym, sec, ns, conf)
ns                161 include/linux/export.h #define ___cond_export_ns_sym(sym, sec, ns, enabled)			\
ns                162 include/linux/export.h 	__cond_export_ns_sym_##enabled(sym, sec, ns)
ns                163 include/linux/export.h #define __cond_export_ns_sym_1(sym, sec, ns) ___EXPORT_SYMBOL_NS(sym, sec, ns)
ns                164 include/linux/export.h #define __cond_export_ns_sym_0(sym, sec, ns) /* nothing */
ns                168 include/linux/export.h #define __EXPORT_SYMBOL_NS(sym,sec,ns)	___EXPORT_SYMBOL_NS(sym,sec,ns)
ns                182 include/linux/export.h #define EXPORT_SYMBOL_NS(sym, ns)	__EXPORT_SYMBOL_NS(sym, "", ns)
ns                183 include/linux/export.h #define EXPORT_SYMBOL_NS_GPL(sym, ns)	__EXPORT_SYMBOL_NS(sym, "_gpl", ns)
ns                269 include/linux/hrtimer.h static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns)
ns                271 include/linux/hrtimer.h 	timer->node.expires = ktime_add_ns(timer->node.expires, ns);
ns                272 include/linux/hrtimer.h 	timer->_softexpires = ktime_add_ns(timer->_softexpires, ns);
ns                 71 include/linux/ipc_namespace.h 	struct ns_common ns;
ns                 78 include/linux/ipc_namespace.h extern void shm_destroy_orphaned(struct ipc_namespace *ns);
ns                 80 include/linux/ipc_namespace.h static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {}
ns                 84 include/linux/ipc_namespace.h extern int mq_init_ns(struct ipc_namespace *ns);
ns                119 include/linux/ipc_namespace.h static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
ns                124 include/linux/ipc_namespace.h 	struct user_namespace *user_ns, struct ipc_namespace *ns);
ns                126 include/linux/ipc_namespace.h static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
ns                128 include/linux/ipc_namespace.h 	if (ns)
ns                129 include/linux/ipc_namespace.h 		refcount_inc(&ns->count);
ns                130 include/linux/ipc_namespace.h 	return ns;
ns                133 include/linux/ipc_namespace.h extern void put_ipc_ns(struct ipc_namespace *ns);
ns                136 include/linux/ipc_namespace.h 	struct user_namespace *user_ns, struct ipc_namespace *ns)
ns                141 include/linux/ipc_namespace.h 	return ns;
ns                144 include/linux/ipc_namespace.h static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
ns                146 include/linux/ipc_namespace.h 	return ns;
ns                149 include/linux/ipc_namespace.h static inline void put_ipc_ns(struct ipc_namespace *ns)
ns                148 include/linux/kernfs.h 	const void		*ns;	/* namespace tag */
ns                328 include/linux/kernfs.h 					   const char *name, const void *ns);
ns                330 include/linux/kernfs.h 					   const char *path, const void *ns);
ns                347 include/linux/kernfs.h 					 void *priv, const void *ns);
ns                355 include/linux/kernfs.h 					 void *priv, const void *ns,
ns                366 include/linux/kernfs.h 			     const void *ns);
ns                414 include/linux/kernfs.h 		       const void *ns)
ns                418 include/linux/kernfs.h 		       const void *ns)
ns                444 include/linux/kernfs.h 		     void *priv, const void *ns)
ns                451 include/linux/kernfs.h 		     void *priv, const void *ns, struct lock_class_key *key)
ns                467 include/linux/kernfs.h 					   const char *name, const void *ns)
ns                545 include/linux/kernfs.h 		      void *priv, const void *ns)
ns                553 include/linux/kernfs.h 				    size, ops, priv, ns, key);
ns                495 include/linux/key.h #define key_free_user_ns(ns)		do { } while(0)
ns                 57 include/linux/kobject_ns.h void kobj_ns_drop(enum kobj_ns_type type, void *ns);
ns                155 include/linux/ktime.h 		s64 ns = kt;
ns                156 include/linux/ktime.h 		u64 tmp = ns < 0 ? -ns : ns;
ns                159 include/linux/ktime.h 		return ns < 0 ? -tmp : tmp;
ns                265 include/linux/ktime.h static inline ktime_t ns_to_ktime(u64 ns)
ns                267 include/linux/ktime.h 	return ns;
ns               1478 include/linux/lsm_hooks.h 			struct user_namespace *ns,
ns                148 include/linux/mlx5/fs.h mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns,
ns                163 include/linux/mlx5/fs.h mlx5_create_flow_table(struct mlx5_flow_namespace *ns,
ns                167 include/linux/mlx5/fs.h mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns,
ns                172 include/linux/mlx5/fs.h 					       struct mlx5_flow_namespace *ns,
ns                 12 include/linux/mnt_namespace.h extern void put_mnt_ns(struct mnt_namespace *ns);
ns                276 include/linux/module.h #define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, #ns)
ns                627 include/linux/mtd/rawnand.h #define NAND_OP_CMD(id, ns)						\
ns                631 include/linux/mtd/rawnand.h 		.delay_ns = ns,						\
ns                634 include/linux/mtd/rawnand.h #define NAND_OP_ADDR(ncycles, cycles, ns)				\
ns                641 include/linux/mtd/rawnand.h 		.delay_ns = ns,						\
ns                644 include/linux/mtd/rawnand.h #define NAND_OP_DATA_IN(l, b, ns)					\
ns                652 include/linux/mtd/rawnand.h 		.delay_ns = ns,						\
ns                655 include/linux/mtd/rawnand.h #define NAND_OP_DATA_OUT(l, b, ns)					\
ns                663 include/linux/mtd/rawnand.h 		.delay_ns = ns,						\
ns                666 include/linux/mtd/rawnand.h #define NAND_OP_8BIT_DATA_IN(l, b, ns)					\
ns                674 include/linux/mtd/rawnand.h 		.delay_ns = ns,						\
ns                677 include/linux/mtd/rawnand.h #define NAND_OP_8BIT_DATA_OUT(l, b, ns)					\
ns                685 include/linux/mtd/rawnand.h 		.delay_ns = ns,						\
ns                688 include/linux/mtd/rawnand.h #define NAND_OP_WAIT_RDY(tout_ms, ns)					\
ns                692 include/linux/mtd/rawnand.h 		.delay_ns = ns,						\
ns               4441 include/linux/netdevice.h 				const void *ns);
ns               4443 include/linux/netdevice.h 				 const void *ns);
ns                246 include/linux/netlink.h 			  struct user_namespace *ns, int cap);
ns                248 include/linux/netlink.h 			struct user_namespace *ns, int cap);
ns                 71 include/linux/nsproxy.h void free_nsproxy(struct nsproxy *ns);
ns                 76 include/linux/nsproxy.h static inline void put_nsproxy(struct nsproxy *ns)
ns                 78 include/linux/nsproxy.h 	if (atomic_dec_and_test(&ns->count)) {
ns                 79 include/linux/nsproxy.h 		free_nsproxy(ns);
ns                 83 include/linux/nsproxy.h static inline void get_nsproxy(struct nsproxy *ns)
ns                 85 include/linux/nsproxy.h 	atomic_inc(&ns->count);
ns                701 include/linux/perf_event.h 	struct pid_namespace		*ns;
ns                 56 include/linux/pid.h 	struct pid_namespace *ns;
ns                114 include/linux/pid.h extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
ns                123 include/linux/pid.h extern struct pid *alloc_pid(struct pid_namespace *ns);
ns                125 include/linux/pid.h extern void disable_pid_allocation(struct pid_namespace *ns);
ns                139 include/linux/pid.h 	struct pid_namespace *ns = NULL;
ns                141 include/linux/pid.h 		ns = pid->numbers[pid->level].ns;
ns                142 include/linux/pid.h 	return ns;
ns                175 include/linux/pid.h pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns);
ns                 47 include/linux/pid_namespace.h 	struct ns_common ns;
ns                 55 include/linux/pid_namespace.h static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
ns                 57 include/linux/pid_namespace.h 	if (ns != &init_pid_ns)
ns                 58 include/linux/pid_namespace.h 		kref_get(&ns->kref);
ns                 59 include/linux/pid_namespace.h 	return ns;
ns                 63 include/linux/pid_namespace.h 	struct user_namespace *user_ns, struct pid_namespace *ns);
ns                 66 include/linux/pid_namespace.h extern void put_pid_ns(struct pid_namespace *ns);
ns                 71 include/linux/pid_namespace.h static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
ns                 73 include/linux/pid_namespace.h 	return ns;
ns                 77 include/linux/pid_namespace.h 	struct user_namespace *user_ns, struct pid_namespace *ns)
ns                 80 include/linux/pid_namespace.h 		ns = ERR_PTR(-EINVAL);
ns                 81 include/linux/pid_namespace.h 	return ns;
ns                 84 include/linux/pid_namespace.h static inline void put_pid_ns(struct pid_namespace *ns)
ns                 88 include/linux/pid_namespace.h static inline void zap_pid_ns_processes(struct pid_namespace *ns)
ns                 83 include/linux/proc_fs.h int proc_pid_arch_status(struct seq_file *m, struct pid_namespace *ns,
ns                143 include/linux/proc_fs.h int open_related_ns(struct ns_common *ns,
ns                144 include/linux/proc_fs.h 		   struct ns_common *(*get_ns)(struct ns_common *ns));
ns                 21 include/linux/proc_ns.h 	void (*put)(struct ns_common *ns);
ns                 22 include/linux/proc_ns.h 	int (*install)(struct nsproxy *nsproxy, struct ns_common *ns);
ns                 23 include/linux/proc_ns.h 	struct user_namespace *(*owner)(struct ns_common *ns);
ns                 24 include/linux/proc_ns.h 	struct ns_common *(*get_parent)(struct ns_common *ns);
ns                 50 include/linux/proc_ns.h extern int pid_ns_prepare_proc(struct pid_namespace *ns);
ns                 51 include/linux/proc_ns.h extern void pid_ns_release_proc(struct pid_namespace *ns);
ns                 57 include/linux/proc_ns.h static inline int pid_ns_prepare_proc(struct pid_namespace *ns) { return 0; }
ns                 58 include/linux/proc_ns.h static inline void pid_ns_release_proc(struct pid_namespace *ns) {}
ns                 69 include/linux/proc_ns.h static inline int ns_alloc_inum(struct ns_common *ns)
ns                 71 include/linux/proc_ns.h 	atomic_long_set(&ns->stashed, 0);
ns                 72 include/linux/proc_ns.h 	return proc_alloc_inum(&ns->inum);
ns                 75 include/linux/proc_ns.h #define ns_free_inum(ns) proc_free_inum((ns)->inum)
ns                 58 include/linux/projid.h static inline bool kprojid_has_mapping(struct user_namespace *ns, kprojid_t projid)
ns                 60 include/linux/projid.h 	return from_kprojid(ns, projid) != (projid_t)-1;
ns                 83 include/linux/projid.h static inline bool kprojid_has_mapping(struct user_namespace *ns, kprojid_t projid)
ns                187 include/linux/ptrace.h 	struct pid_namespace *ns;
ns                190 include/linux/ptrace.h 	ns = task_active_pid_ns(rcu_dereference(current->parent));
ns                191 include/linux/ptrace.h 	if (ns)
ns                192 include/linux/ptrace.h 		message = pid_nr_ns(pid, ns);
ns                187 include/linux/quota.h static inline bool qid_has_mapping(struct user_namespace *ns, struct kqid qid)
ns                189 include/linux/quota.h 	return from_kqid(ns, qid) != (qid_t) -1;
ns                 56 include/linux/regulator/fixed.h #define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \
ns                 57 include/linux/regulator/fixed.h 						"fixed-dummy", s, ns, 0)
ns               1304 include/linux/sched.h pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, struct pid_namespace *ns);
ns               1311 include/linux/sched.h static inline pid_t task_pid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
ns               1313 include/linux/sched.h 	return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns);
ns               1342 include/linux/sched.h static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
ns               1344 include/linux/sched.h 	return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns);
ns               1353 include/linux/sched.h static inline pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
ns               1355 include/linux/sched.h 	return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns);
ns               1363 include/linux/sched.h static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
ns               1365 include/linux/sched.h 	return __task_pid_nr_ns(tsk, PIDTYPE_TGID, ns);
ns               1373 include/linux/sched.h static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns)
ns               1379 include/linux/sched.h 		pid = task_tgid_nr_ns(rcu_dereference(tsk->real_parent), ns);
ns               1666 include/linux/sched.h extern struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns);
ns                170 include/linux/sched/cputime.h 					      unsigned long long ns)
ns                177 include/linux/sched/cputime.h 	atomic64_add(ns, &cputimer->cputime_atomic.sum_exec_runtime);
ns                 40 include/linux/sched/debug.h 				 struct pid_namespace *ns, struct seq_file *m);
ns                132 include/linux/security.h extern int cap_capable(const struct cred *cred, struct user_namespace *ns,
ns                270 include/linux/security.h 		       struct user_namespace *ns,
ns                537 include/linux/security.h 				   struct user_namespace *ns,
ns                541 include/linux/security.h 	return cap_capable(cred, ns, cap, opts);
ns                410 include/linux/socket.h extern struct ns_common *get_net_ns(struct ns_common *ns);
ns                175 include/linux/ssb/ssb_driver_extif.h 				  unsigned long ns);
ns                210 include/linux/ssb/ssb_driver_extif.h void ssb_extif_timing_init(struct ssb_extif *extif, unsigned long ns)
ns                230 include/linux/sysfs.h int __must_check sysfs_create_dir_ns(struct kobject *kobj, const void *ns);
ns                244 include/linux/sysfs.h 				      const void *ns);
ns                253 include/linux/sysfs.h 			  const void *ns);
ns                315 include/linux/sysfs.h static inline int sysfs_create_dir_ns(struct kobject *kobj, const void *ns)
ns                350 include/linux/sysfs.h 				       const void *ns)
ns                380 include/linux/sysfs.h 					const void *ns)
ns                425 include/linux/sysfs.h 				       const char *new_name, const void *ns)
ns                171 include/linux/time32.h static __always_inline void timespec_add_ns(struct timespec *a, u64 ns)
ns                173 include/linux/time32.h 	a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns);
ns                174 include/linux/time32.h 	a->tv_nsec = ns;
ns                154 include/linux/time64.h static __always_inline void timespec64_add_ns(struct timespec64 *a, u64 ns)
ns                156 include/linux/time64.h 	a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns);
ns                157 include/linux/time64.h 	a->tv_nsec = ns;
ns                 73 include/linux/timecounter.h 	u64 ns = (u64) cycles;
ns                 75 include/linux/timecounter.h 	ns = (ns * cc->mult) + *frac;
ns                 76 include/linux/timecounter.h 	*frac = ns & mask;
ns                 77 include/linux/timecounter.h 	return ns >> cc->shift;
ns                131 include/linux/uidgid.h static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid)
ns                133 include/linux/uidgid.h 	return from_kuid(ns, uid) != (uid_t) -1;
ns                136 include/linux/uidgid.h static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid)
ns                138 include/linux/uidgid.h 	return from_kgid(ns, gid) != (gid_t) -1;
ns                179 include/linux/uidgid.h static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid)
ns                184 include/linux/uidgid.h static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid)
ns                621 include/linux/usb/hcd.h #define NS_TO_US(ns)	DIV_ROUND_UP(ns, 1000L)
ns                 64 include/linux/user_namespace.h 	struct ns_common	ns;
ns                 93 include/linux/user_namespace.h 	struct user_namespace *ns;
ns                101 include/linux/user_namespace.h bool setup_userns_sysctls(struct user_namespace *ns);
ns                102 include/linux/user_namespace.h void retire_userns_sysctls(struct user_namespace *ns);
ns                103 include/linux/user_namespace.h struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
ns                108 include/linux/user_namespace.h static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
ns                110 include/linux/user_namespace.h 	if (ns)
ns                111 include/linux/user_namespace.h 		atomic_inc(&ns->count);
ns                112 include/linux/user_namespace.h 	return ns;
ns                117 include/linux/user_namespace.h extern void __put_user_ns(struct user_namespace *ns);
ns                119 include/linux/user_namespace.h static inline void put_user_ns(struct user_namespace *ns)
ns                121 include/linux/user_namespace.h 	if (ns && atomic_dec_and_test(&ns->count))
ns                122 include/linux/user_namespace.h 		__put_user_ns(ns);
ns                134 include/linux/user_namespace.h extern bool userns_may_setgroups(const struct user_namespace *ns);
ns                138 include/linux/user_namespace.h struct ns_common *ns_get_owner(struct ns_common *ns);
ns                141 include/linux/user_namespace.h static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
ns                159 include/linux/user_namespace.h static inline void put_user_ns(struct user_namespace *ns)
ns                163 include/linux/user_namespace.h static inline bool userns_may_setgroups(const struct user_namespace *ns)
ns                179 include/linux/user_namespace.h static inline struct ns_common *ns_get_owner(struct ns_common *ns)
ns                 29 include/linux/utsname.h 	struct ns_common ns;
ns                 34 include/linux/utsname.h static inline void get_uts_ns(struct uts_namespace *ns)
ns                 36 include/linux/utsname.h 	kref_get(&ns->kref);
ns                 43 include/linux/utsname.h static inline void put_uts_ns(struct uts_namespace *ns)
ns                 45 include/linux/utsname.h 	kref_put(&ns->kref, free_uts_ns);
ns                 50 include/linux/utsname.h static inline void get_uts_ns(struct uts_namespace *ns)
ns                 54 include/linux/utsname.h static inline void put_uts_ns(struct uts_namespace *ns)
ns               5081 include/net/cfg80211.h 	const struct ieee80211_radiotap_namespace *ns;
ns                 69 include/net/codel.h 	u64 ns = ktime_get_ns();
ns                 71 include/net/codel.h 	return ns >> CODEL_SHIFT;
ns                 74 include/net/lapb.h 	unsigned short		nr, ns;		/* N(R), N(S)		*/
ns                417 include/net/llc_pdu.h void llc_pdu_init_as_i_cmd(struct sk_buff *skb, u8 p_bit, u8 ns, u8 nr);
ns                 90 include/net/net_namespace.h 	struct ns_common	ns;
ns                 85 include/pcmcia/cistpl.h     u_char	ns;
ns                126 include/pcmcia/cistpl.h     u_char	ns;
ns                 44 include/trace/events/kvm.h 	    TP_PROTO(__u64 ns, bool waited, bool valid),
ns                 45 include/trace/events/kvm.h 	    TP_ARGS(ns, waited, valid),
ns                 48 include/trace/events/kvm.h 		__field(	__u64,		ns		)
ns                 54 include/trace/events/kvm.h 		__entry->ns		= ns;
ns                 61 include/trace/events/kvm.h 		  __entry->ns,
ns                 92 include/uapi/linux/uvcvideo.h 	__u64 ns;
ns                152 include/xen/interface/platform.h 				uint32_t ns;
ns                 38 init/version.c 	.ns.inum = PROC_UTS_INIT_INO,
ns                 40 init/version.c 	.ns.ops = &utsns_operations,
ns                 51 ipc/ipc_sysctl.c 	struct ipc_namespace *ns = current->nsproxy->ipc_ns;
ns                 56 ipc/ipc_sysctl.c 	if (ns->shm_rmid_forced)
ns                 57 ipc/ipc_sysctl.c 		shm_destroy_orphaned(ns);
ns                 91 ipc/ipc_sysctl.c 	struct ipc_namespace *ns = current->nsproxy->ipc_ns;
ns                 93 ipc/ipc_sysctl.c 	semmni = ns->sem_ctls[3];
ns                103 ipc/ipc_sysctl.c 		ns->sem_ctls[3] = semmni;
ns                123 ipc/mqueue.c   	struct ipc_namespace *ns;
ns                126 ipc/mqueue.c   	ns = __get_ns_from_inode(inode);
ns                128 ipc/mqueue.c   	return ns;
ns                346 ipc/mqueue.c   	struct ipc_namespace *ns = sb->s_fs_info;
ns                354 ipc/mqueue.c   	inode = mqueue_get_inode(sb, ns, S_IFDIR | S_ISVTX | S_IRWXUGO, NULL);
ns                395 ipc/mqueue.c   static struct vfsmount *mq_create_mount(struct ipc_namespace *ns)
ns                407 ipc/mqueue.c   	ctx->ipc_ns = get_ipc_ns(ns);
ns               1605 ipc/mqueue.c   int mq_init_ns(struct ipc_namespace *ns)
ns               1609 ipc/mqueue.c   	ns->mq_queues_count  = 0;
ns               1610 ipc/mqueue.c   	ns->mq_queues_max    = DFLT_QUEUESMAX;
ns               1611 ipc/mqueue.c   	ns->mq_msg_max       = DFLT_MSGMAX;
ns               1612 ipc/mqueue.c   	ns->mq_msgsize_max   = DFLT_MSGSIZEMAX;
ns               1613 ipc/mqueue.c   	ns->mq_msg_default   = DFLT_MSG;
ns               1614 ipc/mqueue.c   	ns->mq_msgsize_default  = DFLT_MSGSIZE;
ns               1616 ipc/mqueue.c   	m = mq_create_mount(ns);
ns               1619 ipc/mqueue.c   	ns->mq_mnt = m;
ns               1623 ipc/mqueue.c   void mq_clear_sbinfo(struct ipc_namespace *ns)
ns               1625 ipc/mqueue.c   	ns->mq_mnt->mnt_sb->s_fs_info = NULL;
ns               1628 ipc/mqueue.c   void mq_put_mnt(struct ipc_namespace *ns)
ns               1630 ipc/mqueue.c   	kern_unmount(ns->mq_mnt);
ns                 89 ipc/msg.c      #define msg_ids(ns)	((ns)->ids[IPC_MSG_IDS])
ns                 91 ipc/msg.c      static inline struct msg_queue *msq_obtain_object(struct ipc_namespace *ns, int id)
ns                 93 ipc/msg.c      	struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&msg_ids(ns), id);
ns                101 ipc/msg.c      static inline struct msg_queue *msq_obtain_object_check(struct ipc_namespace *ns,
ns                104 ipc/msg.c      	struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&msg_ids(ns), id);
ns                112 ipc/msg.c      static inline void msg_rmid(struct ipc_namespace *ns, struct msg_queue *s)
ns                114 ipc/msg.c      	ipc_rmid(&msg_ids(ns), &s->q_perm);
ns                133 ipc/msg.c      static int newque(struct ipc_namespace *ns, struct ipc_params *params)
ns                157 ipc/msg.c      	msq->q_qbytes = ns->msg_ctlmnb;
ns                164 ipc/msg.c      	retval = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni);
ns                253 ipc/msg.c      static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
ns                261 ipc/msg.c      	msg_rmid(ns, msq);
ns                267 ipc/msg.c      		atomic_dec(&ns->msg_hdrs);
ns                270 ipc/msg.c      	atomic_sub(msq->q_cbytes, &ns->msg_bytes);
ns                278 ipc/msg.c      	struct ipc_namespace *ns;
ns                285 ipc/msg.c      	ns = current->nsproxy->ipc_ns;
ns                290 ipc/msg.c      	return ipcget(ns, &msg_ids(ns), &msg_ops, &msg_params);
ns                379 ipc/msg.c      static int msgctl_down(struct ipc_namespace *ns, int msqid, int cmd,
ns                386 ipc/msg.c      	down_write(&msg_ids(ns).rwsem);
ns                389 ipc/msg.c      	ipcp = ipcctl_obtain_check(ns, &msg_ids(ns), msqid, cmd,
ns                406 ipc/msg.c      		freeque(ns, ipcp);
ns                412 ipc/msg.c      		if (msg_qbytes > ns->msg_ctlmnb &&
ns                451 ipc/msg.c      	up_write(&msg_ids(ns).rwsem);
ns                455 ipc/msg.c      static int msgctl_info(struct ipc_namespace *ns, int msqid,
ns                471 ipc/msg.c      	msginfo->msgmni = ns->msg_ctlmni;
ns                472 ipc/msg.c      	msginfo->msgmax = ns->msg_ctlmax;
ns                473 ipc/msg.c      	msginfo->msgmnb = ns->msg_ctlmnb;
ns                476 ipc/msg.c      	down_read(&msg_ids(ns).rwsem);
ns                478 ipc/msg.c      		msginfo->msgpool = msg_ids(ns).in_use;
ns                479 ipc/msg.c      		msginfo->msgmap = atomic_read(&ns->msg_hdrs);
ns                480 ipc/msg.c      		msginfo->msgtql = atomic_read(&ns->msg_bytes);
ns                486 ipc/msg.c      	max_idx = ipc_get_maxidx(&msg_ids(ns));
ns                487 ipc/msg.c      	up_read(&msg_ids(ns).rwsem);
ns                491 ipc/msg.c      static int msgctl_stat(struct ipc_namespace *ns, int msqid,
ns                501 ipc/msg.c      		msq = msq_obtain_object(ns, msqid);
ns                507 ipc/msg.c      		msq = msq_obtain_object_check(ns, msqid);
ns                519 ipc/msg.c      		if (ipcperms(ns, &msq->q_perm, S_IRUGO))
ns                572 ipc/msg.c      	struct ipc_namespace *ns;
ns                579 ipc/msg.c      	ns = current->nsproxy->ipc_ns;
ns                585 ipc/msg.c      		err = msgctl_info(ns, msqid, cmd, &msginfo);
ns                595 ipc/msg.c      		err = msgctl_stat(ns, msqid, cmd, &msqid64);
ns                604 ipc/msg.c      		return msgctl_down(ns, msqid, cmd, &msqid64.msg_perm,
ns                607 ipc/msg.c      		return msgctl_down(ns, msqid, cmd, NULL, 0);
ns                707 ipc/msg.c      	struct ipc_namespace *ns;
ns                711 ipc/msg.c      	ns = current->nsproxy->ipc_ns;
ns                720 ipc/msg.c      		err = msgctl_info(ns, msqid, cmd, &msginfo);
ns                730 ipc/msg.c      		err = msgctl_stat(ns, msqid, cmd, &msqid64);
ns                739 ipc/msg.c      		return msgctl_down(ns, msqid, cmd, &msqid64.msg_perm, msqid64.msg_qbytes);
ns                741 ipc/msg.c      		return msgctl_down(ns, msqid, cmd, NULL, 0);
ns                823 ipc/msg.c      	struct ipc_namespace *ns;
ns                826 ipc/msg.c      	ns = current->nsproxy->ipc_ns;
ns                828 ipc/msg.c      	if (msgsz > ns->msg_ctlmax || (long) msgsz < 0 || msqid < 0)
ns                841 ipc/msg.c      	msq = msq_obtain_object_check(ns, msqid);
ns                853 ipc/msg.c      		if (ipcperms(ns, &msq->q_perm, S_IWUGO))
ns                913 ipc/msg.c      		atomic_add(msgsz, &ns->msg_bytes);
ns                914 ipc/msg.c      		atomic_inc(&ns->msg_hdrs);
ns               1072 ipc/msg.c      	struct ipc_namespace *ns;
ns               1076 ipc/msg.c      	ns = current->nsproxy->ipc_ns;
ns               1084 ipc/msg.c      		copy = prepare_copy(buf, min_t(size_t, bufsz, ns->msg_ctlmax));
ns               1091 ipc/msg.c      	msq = msq_obtain_object_check(ns, msqid);
ns               1102 ipc/msg.c      		if (ipcperms(ns, &msq->q_perm, S_IRUGO))
ns               1137 ipc/msg.c      			atomic_sub(msg->m_ts, &ns->msg_bytes);
ns               1138 ipc/msg.c      			atomic_dec(&ns->msg_hdrs);
ns               1267 ipc/msg.c      void msg_init_ns(struct ipc_namespace *ns)
ns               1269 ipc/msg.c      	ns->msg_ctlmax = MSGMAX;
ns               1270 ipc/msg.c      	ns->msg_ctlmnb = MSGMNB;
ns               1271 ipc/msg.c      	ns->msg_ctlmni = MSGMNI;
ns               1273 ipc/msg.c      	atomic_set(&ns->msg_bytes, 0);
ns               1274 ipc/msg.c      	atomic_set(&ns->msg_hdrs, 0);
ns               1275 ipc/msg.c      	ipc_init_ids(&ns->ids[IPC_MSG_IDS]);
ns               1279 ipc/msg.c      void msg_exit_ns(struct ipc_namespace *ns)
ns               1281 ipc/msg.c      	free_ipcs(ns, &msg_ids(ns), freeque);
ns               1282 ipc/msg.c      	idr_destroy(&ns->ids[IPC_MSG_IDS].ipcs_idr);
ns               1283 ipc/msg.c      	rhashtable_destroy(&ns->ids[IPC_MSG_IDS].key_ht);
ns                 31 ipc/msgutil.c  	.ns.inum = PROC_IPC_INIT_INO,
ns                 33 ipc/msgutil.c  	.ns.ops = &ipcns_operations,
ns                 22 ipc/namespace.c static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns)
ns                 24 ipc/namespace.c 	return inc_ucount(ns, current_euid(), UCOUNT_IPC_NAMESPACES);
ns                 35 ipc/namespace.c 	struct ipc_namespace *ns;
ns                 45 ipc/namespace.c 	ns = kzalloc(sizeof(struct ipc_namespace), GFP_KERNEL);
ns                 46 ipc/namespace.c 	if (ns == NULL)
ns                 49 ipc/namespace.c 	err = ns_alloc_inum(&ns->ns);
ns                 52 ipc/namespace.c 	ns->ns.ops = &ipcns_operations;
ns                 54 ipc/namespace.c 	refcount_set(&ns->count, 1);
ns                 55 ipc/namespace.c 	ns->user_ns = get_user_ns(user_ns);
ns                 56 ipc/namespace.c 	ns->ucounts = ucounts;
ns                 58 ipc/namespace.c 	err = mq_init_ns(ns);
ns                 62 ipc/namespace.c 	sem_init_ns(ns);
ns                 63 ipc/namespace.c 	msg_init_ns(ns);
ns                 64 ipc/namespace.c 	shm_init_ns(ns);
ns                 66 ipc/namespace.c 	return ns;
ns                 69 ipc/namespace.c 	put_user_ns(ns->user_ns);
ns                 70 ipc/namespace.c 	ns_free_inum(&ns->ns);
ns                 72 ipc/namespace.c 	kfree(ns);
ns                 80 ipc/namespace.c 	struct user_namespace *user_ns, struct ipc_namespace *ns)
ns                 83 ipc/namespace.c 		return get_ipc_ns(ns);
ns                 84 ipc/namespace.c 	return create_ipc_ns(user_ns, ns);
ns                 95 ipc/namespace.c void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
ns                112 ipc/namespace.c 		free(ns, perm);
ns                118 ipc/namespace.c static void free_ipc_ns(struct ipc_namespace *ns)
ns                120 ipc/namespace.c 	sem_exit_ns(ns);
ns                121 ipc/namespace.c 	msg_exit_ns(ns);
ns                122 ipc/namespace.c 	shm_exit_ns(ns);
ns                124 ipc/namespace.c 	dec_ipc_namespaces(ns->ucounts);
ns                125 ipc/namespace.c 	put_user_ns(ns->user_ns);
ns                126 ipc/namespace.c 	ns_free_inum(&ns->ns);
ns                127 ipc/namespace.c 	kfree(ns);
ns                146 ipc/namespace.c void put_ipc_ns(struct ipc_namespace *ns)
ns                148 ipc/namespace.c 	if (refcount_dec_and_lock(&ns->count, &mq_lock)) {
ns                149 ipc/namespace.c 		mq_clear_sbinfo(ns);
ns                151 ipc/namespace.c 		mq_put_mnt(ns);
ns                152 ipc/namespace.c 		free_ipc_ns(ns);
ns                156 ipc/namespace.c static inline struct ipc_namespace *to_ipc_ns(struct ns_common *ns)
ns                158 ipc/namespace.c 	return container_of(ns, struct ipc_namespace, ns);
ns                163 ipc/namespace.c 	struct ipc_namespace *ns = NULL;
ns                169 ipc/namespace.c 		ns = get_ipc_ns(nsproxy->ipc_ns);
ns                172 ipc/namespace.c 	return ns ? &ns->ns : NULL;
ns                175 ipc/namespace.c static void ipcns_put(struct ns_common *ns)
ns                177 ipc/namespace.c 	return put_ipc_ns(to_ipc_ns(ns));
ns                182 ipc/namespace.c 	struct ipc_namespace *ns = to_ipc_ns(new);
ns                183 ipc/namespace.c 	if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) ||
ns                190 ipc/namespace.c 	nsproxy->ipc_ns = get_ipc_ns(ns);
ns                194 ipc/namespace.c static struct user_namespace *ipcns_owner(struct ns_common *ns)
ns                196 ipc/namespace.c 	return to_ipc_ns(ns)->user_ns;
ns                169 ipc/sem.c      #define sem_ids(ns)	((ns)->ids[IPC_SEM_IDS])
ns                224 ipc/sem.c      void sem_init_ns(struct ipc_namespace *ns)
ns                226 ipc/sem.c      	ns->sc_semmsl = SEMMSL;
ns                227 ipc/sem.c      	ns->sc_semmns = SEMMNS;
ns                228 ipc/sem.c      	ns->sc_semopm = SEMOPM;
ns                229 ipc/sem.c      	ns->sc_semmni = SEMMNI;
ns                230 ipc/sem.c      	ns->used_sems = 0;
ns                231 ipc/sem.c      	ipc_init_ids(&ns->ids[IPC_SEM_IDS]);
ns                235 ipc/sem.c      void sem_exit_ns(struct ipc_namespace *ns)
ns                237 ipc/sem.c      	free_ipcs(ns, &sem_ids(ns), freeary);
ns                238 ipc/sem.c      	idr_destroy(&ns->ids[IPC_SEM_IDS].ipcs_idr);
ns                239 ipc/sem.c      	rhashtable_destroy(&ns->ids[IPC_SEM_IDS].key_ht);
ns                456 ipc/sem.c      static inline struct sem_array *sem_obtain_object(struct ipc_namespace *ns, int id)
ns                458 ipc/sem.c      	struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&sem_ids(ns), id);
ns                466 ipc/sem.c      static inline struct sem_array *sem_obtain_object_check(struct ipc_namespace *ns,
ns                469 ipc/sem.c      	struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&sem_ids(ns), id);
ns                483 ipc/sem.c      static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)
ns                485 ipc/sem.c      	ipc_rmid(&sem_ids(ns), &s->sem_perm);
ns                509 ipc/sem.c      static int newary(struct ipc_namespace *ns, struct ipc_params *params)
ns                520 ipc/sem.c      	if (ns->used_sems + nsems > ns->sc_semmns)
ns                552 ipc/sem.c      	retval = ipc_addid(&sem_ids(ns), &sma->sem_perm, ns->sc_semmni);
ns                557 ipc/sem.c      	ns->used_sems += nsems;
ns                583 ipc/sem.c      	struct ipc_namespace *ns;
ns                591 ipc/sem.c      	ns = current->nsproxy->ipc_ns;
ns                593 ipc/sem.c      	if (nsems < 0 || nsems > ns->sc_semmsl)
ns                600 ipc/sem.c      	return ipcget(ns, &sem_ids(ns), &sem_ops, &sem_params);
ns               1124 ipc/sem.c      static void freeary(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
ns               1167 ipc/sem.c      	sem_rmid(ns, sma);
ns               1172 ipc/sem.c      	ns->used_sems -= sma->sem_nsems;
ns               1215 ipc/sem.c      static int semctl_stat(struct ipc_namespace *ns, int semid,
ns               1226 ipc/sem.c      		sma = sem_obtain_object(ns, semid);
ns               1232 ipc/sem.c      		sma = sem_obtain_object_check(ns, semid);
ns               1244 ipc/sem.c      		if (ipcperms(ns, &sma->sem_perm, S_IRUGO))
ns               1289 ipc/sem.c      static int semctl_info(struct ipc_namespace *ns, int semid,
ns               1301 ipc/sem.c      	seminfo.semmni = ns->sc_semmni;
ns               1302 ipc/sem.c      	seminfo.semmns = ns->sc_semmns;
ns               1303 ipc/sem.c      	seminfo.semmsl = ns->sc_semmsl;
ns               1304 ipc/sem.c      	seminfo.semopm = ns->sc_semopm;
ns               1309 ipc/sem.c      	down_read(&sem_ids(ns).rwsem);
ns               1311 ipc/sem.c      		seminfo.semusz = sem_ids(ns).in_use;
ns               1312 ipc/sem.c      		seminfo.semaem = ns->used_sems;
ns               1317 ipc/sem.c      	max_idx = ipc_get_maxidx(&sem_ids(ns));
ns               1318 ipc/sem.c      	up_read(&sem_ids(ns).rwsem);
ns               1324 ipc/sem.c      static int semctl_setval(struct ipc_namespace *ns, int semid, int semnum,
ns               1337 ipc/sem.c      	sma = sem_obtain_object_check(ns, semid);
ns               1349 ipc/sem.c      	if (ipcperms(ns, &sma->sem_perm, S_IWUGO)) {
ns               1386 ipc/sem.c      static int semctl_main(struct ipc_namespace *ns, int semid, int semnum,
ns               1397 ipc/sem.c      	sma = sem_obtain_object_check(ns, semid);
ns               1406 ipc/sem.c      	if (ipcperms(ns, &sma->sem_perm, cmd == SETALL ? S_IWUGO : S_IRUGO))
ns               1583 ipc/sem.c      static int semctl_down(struct ipc_namespace *ns, int semid,
ns               1590 ipc/sem.c      	down_write(&sem_ids(ns).rwsem);
ns               1593 ipc/sem.c      	ipcp = ipcctl_obtain_check(ns, &sem_ids(ns), semid, cmd,
ns               1610 ipc/sem.c      		freeary(ns, ipcp);
ns               1629 ipc/sem.c      	up_write(&sem_ids(ns).rwsem);
ns               1635 ipc/sem.c      	struct ipc_namespace *ns;
ns               1643 ipc/sem.c      	ns = current->nsproxy->ipc_ns;
ns               1648 ipc/sem.c      		return semctl_info(ns, semid, cmd, p);
ns               1652 ipc/sem.c      		err = semctl_stat(ns, semid, cmd, &semid64);
ns               1664 ipc/sem.c      		return semctl_main(ns, semid, semnum, cmd, p);
ns               1674 ipc/sem.c      		return semctl_setval(ns, semid, semnum, val);
ns               1681 ipc/sem.c      		return semctl_down(ns, semid, cmd, &semid64);
ns               1759 ipc/sem.c      	struct ipc_namespace *ns;
ns               1763 ipc/sem.c      	ns = current->nsproxy->ipc_ns;
ns               1771 ipc/sem.c      		return semctl_info(ns, semid, cmd, p);
ns               1775 ipc/sem.c      		err = semctl_stat(ns, semid, cmd, &semid64);
ns               1787 ipc/sem.c      		return semctl_main(ns, semid, semnum, cmd, p);
ns               1789 ipc/sem.c      		return semctl_setval(ns, semid, semnum, arg);
ns               1795 ipc/sem.c      		return semctl_down(ns, semid, cmd, &semid64);
ns               1888 ipc/sem.c      static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
ns               1908 ipc/sem.c      	sma = sem_obtain_object_check(ns, semid);
ns               1978 ipc/sem.c      	struct ipc_namespace *ns;
ns               1980 ipc/sem.c      	ns = current->nsproxy->ipc_ns;
ns               1984 ipc/sem.c      	if (nsops > ns->sc_semopm)
ns               2031 ipc/sem.c      		un = find_alloc_undo(ns, semid);
ns               2041 ipc/sem.c      	sma = sem_obtain_object_check(ns, semid);
ns               2055 ipc/sem.c      	if (ipcperms(ns, &sma->sem_perm, alter ? S_IWUGO : S_IRUGO)) {
ns                 76 ipc/shm.c      	struct ipc_namespace *ns;
ns                 86 ipc/shm.c      #define shm_ids(ns)	((ns)->ids[IPC_SHM_IDS])
ns                 94 ipc/shm.c      static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp);
ns                 99 ipc/shm.c      void shm_init_ns(struct ipc_namespace *ns)
ns                101 ipc/shm.c      	ns->shm_ctlmax = SHMMAX;
ns                102 ipc/shm.c      	ns->shm_ctlall = SHMALL;
ns                103 ipc/shm.c      	ns->shm_ctlmni = SHMMNI;
ns                104 ipc/shm.c      	ns->shm_rmid_forced = 0;
ns                105 ipc/shm.c      	ns->shm_tot = 0;
ns                106 ipc/shm.c      	ipc_init_ids(&shm_ids(ns));
ns                113 ipc/shm.c      static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
ns                122 ipc/shm.c      		ipc_set_key_private(&shm_ids(ns), &shp->shm_perm);
ns                125 ipc/shm.c      		shm_destroy(ns, shp);
ns                129 ipc/shm.c      void shm_exit_ns(struct ipc_namespace *ns)
ns                131 ipc/shm.c      	free_ipcs(ns, &shm_ids(ns), do_shm_rmid);
ns                132 ipc/shm.c      	idr_destroy(&ns->ids[IPC_SHM_IDS].ipcs_idr);
ns                133 ipc/shm.c      	rhashtable_destroy(&ns->ids[IPC_SHM_IDS].key_ht);
ns                156 ipc/shm.c      static inline struct shmid_kernel *shm_obtain_object(struct ipc_namespace *ns, int id)
ns                158 ipc/shm.c      	struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
ns                166 ipc/shm.c      static inline struct shmid_kernel *shm_obtain_object_check(struct ipc_namespace *ns, int id)
ns                168 ipc/shm.c      	struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&shm_ids(ns), id);
ns                180 ipc/shm.c      static inline struct shmid_kernel *shm_lock(struct ipc_namespace *ns, int id)
ns                185 ipc/shm.c      	ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
ns                228 ipc/shm.c      static inline void shm_rmid(struct ipc_namespace *ns, struct shmid_kernel *s)
ns                231 ipc/shm.c      	ipc_rmid(&shm_ids(ns), &s->shm_perm);
ns                241 ipc/shm.c      	shp = shm_lock(sfd->ns, sfd->id);
ns                279 ipc/shm.c      static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
ns                285 ipc/shm.c      	ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT;
ns                286 ipc/shm.c      	shm_rmid(ns, shp);
ns                309 ipc/shm.c      static bool shm_may_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
ns                312 ipc/shm.c      	       (ns->shm_rmid_forced ||
ns                327 ipc/shm.c      	struct ipc_namespace *ns = sfd->ns;
ns                329 ipc/shm.c      	down_write(&shm_ids(ns).rwsem);
ns                331 ipc/shm.c      	shp = shm_lock(ns, sfd->id);
ns                343 ipc/shm.c      	if (shm_may_destroy(ns, shp))
ns                344 ipc/shm.c      		shm_destroy(ns, shp);
ns                348 ipc/shm.c      	up_write(&shm_ids(ns).rwsem);
ns                354 ipc/shm.c      	struct ipc_namespace *ns = data;
ns                367 ipc/shm.c      	if (shm_may_destroy(ns, shp)) {
ns                369 ipc/shm.c      		shm_destroy(ns, shp);
ns                374 ipc/shm.c      void shm_destroy_orphaned(struct ipc_namespace *ns)
ns                376 ipc/shm.c      	down_write(&shm_ids(ns).rwsem);
ns                377 ipc/shm.c      	if (shm_ids(ns).in_use)
ns                378 ipc/shm.c      		idr_for_each(&shm_ids(ns).ipcs_idr, &shm_try_destroy_orphaned, ns);
ns                379 ipc/shm.c      	up_write(&shm_ids(ns).rwsem);
ns                385 ipc/shm.c      	struct ipc_namespace *ns = task->nsproxy->ipc_ns;
ns                396 ipc/shm.c      	if (!ns->shm_rmid_forced) {
ns                397 ipc/shm.c      		down_read(&shm_ids(ns).rwsem);
ns                405 ipc/shm.c      		up_read(&shm_ids(ns).rwsem);
ns                414 ipc/shm.c      	down_write(&shm_ids(ns).rwsem);
ns                418 ipc/shm.c      		if (shm_may_destroy(ns, shp)) {
ns                420 ipc/shm.c      			shm_destroy(ns, shp);
ns                426 ipc/shm.c      	up_write(&shm_ids(ns).rwsem);
ns                518 ipc/shm.c      	put_ipc_ns(sfd->ns);
ns                600 ipc/shm.c      static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
ns                612 ipc/shm.c      	if (size < SHMMIN || size > ns->shm_ctlmax)
ns                618 ipc/shm.c      	if (ns->shm_tot + numpages < ns->shm_tot ||
ns                619 ipc/shm.c      			ns->shm_tot + numpages > ns->shm_ctlall)
ns                679 ipc/shm.c      	error = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
ns                691 ipc/shm.c      	ns->shm_tot += numpages;
ns                728 ipc/shm.c      	struct ipc_namespace *ns;
ns                736 ipc/shm.c      	ns = current->nsproxy->ipc_ns;
ns                742 ipc/shm.c      	return ipcget(ns, &shm_ids(ns), &shm_ops, &shm_params);
ns                860 ipc/shm.c      static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss,
ns                869 ipc/shm.c      	in_use = shm_ids(ns).in_use;
ns                875 ipc/shm.c      		ipc = idr_find(&shm_ids(ns).ipcs_idr, next_id);
ns                891 ipc/shm.c      static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd,
ns                898 ipc/shm.c      	down_write(&shm_ids(ns).rwsem);
ns                901 ipc/shm.c      	ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd,
ns                918 ipc/shm.c      		do_shm_rmid(ns, ipcp);
ns                937 ipc/shm.c      	up_write(&shm_ids(ns).rwsem);
ns                941 ipc/shm.c      static int shmctl_ipc_info(struct ipc_namespace *ns,
ns                947 ipc/shm.c      		shminfo->shmmni = shminfo->shmseg = ns->shm_ctlmni;
ns                948 ipc/shm.c      		shminfo->shmmax = ns->shm_ctlmax;
ns                949 ipc/shm.c      		shminfo->shmall = ns->shm_ctlall;
ns                951 ipc/shm.c      		down_read(&shm_ids(ns).rwsem);
ns                952 ipc/shm.c      		err = ipc_get_maxidx(&shm_ids(ns));
ns                953 ipc/shm.c      		up_read(&shm_ids(ns).rwsem);
ns                960 ipc/shm.c      static int shmctl_shm_info(struct ipc_namespace *ns,
ns                966 ipc/shm.c      		down_read(&shm_ids(ns).rwsem);
ns                967 ipc/shm.c      		shm_info->used_ids = shm_ids(ns).in_use;
ns                968 ipc/shm.c      		shm_get_stat(ns, &shm_info->shm_rss, &shm_info->shm_swp);
ns                969 ipc/shm.c      		shm_info->shm_tot = ns->shm_tot;
ns                972 ipc/shm.c      		err = ipc_get_maxidx(&shm_ids(ns));
ns                973 ipc/shm.c      		up_read(&shm_ids(ns).rwsem);
ns                980 ipc/shm.c      static int shmctl_stat(struct ipc_namespace *ns, int shmid,
ns                990 ipc/shm.c      		shp = shm_obtain_object(ns, shmid);
ns                996 ipc/shm.c      		shp = shm_obtain_object_check(ns, shmid);
ns               1014 ipc/shm.c      		if (ipcperms(ns, &shp->shm_perm, S_IRUGO))
ns               1064 ipc/shm.c      static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd)
ns               1071 ipc/shm.c      	shp = shm_obtain_object_check(ns, shmid);
ns               1090 ipc/shm.c      	if (!ns_capable(ns->user_ns, CAP_IPC_LOCK)) {
ns               1143 ipc/shm.c      	struct ipc_namespace *ns;
ns               1149 ipc/shm.c      	ns = current->nsproxy->ipc_ns;
ns               1154 ipc/shm.c      		err = shmctl_ipc_info(ns, &shminfo);
ns               1163 ipc/shm.c      		err = shmctl_shm_info(ns, &shm_info);
ns               1173 ipc/shm.c      		err = shmctl_stat(ns, shmid, cmd, &sem64);
ns               1185 ipc/shm.c      		return shmctl_down(ns, shmid, cmd, &sem64);
ns               1188 ipc/shm.c      		return shmctl_do_lock(ns, shmid, cmd);
ns               1337 ipc/shm.c      	struct ipc_namespace *ns;
ns               1341 ipc/shm.c      	ns = current->nsproxy->ipc_ns;
ns               1349 ipc/shm.c      		err = shmctl_ipc_info(ns, &shminfo);
ns               1358 ipc/shm.c      		err = shmctl_shm_info(ns, &shm_info);
ns               1368 ipc/shm.c      		err = shmctl_stat(ns, shmid, cmd, &sem64);
ns               1380 ipc/shm.c      		return shmctl_down(ns, shmid, cmd, &sem64);
ns               1383 ipc/shm.c      		return shmctl_do_lock(ns, shmid, cmd);
ns               1429 ipc/shm.c      	struct ipc_namespace *ns;
ns               1479 ipc/shm.c      	ns = current->nsproxy->ipc_ns;
ns               1481 ipc/shm.c      	shp = shm_obtain_object_check(ns, shmid);
ns               1488 ipc/shm.c      	if (ipcperms(ns, &shp->shm_perm, acc_mode))
ns               1538 ipc/shm.c      	sfd->ns = get_ipc_ns(ns);
ns               1575 ipc/shm.c      	down_write(&shm_ids(ns).rwsem);
ns               1576 ipc/shm.c      	shp = shm_lock(ns, shmid);
ns               1578 ipc/shm.c      	if (shm_may_destroy(ns, shp))
ns               1579 ipc/shm.c      		shm_destroy(ns, shp);
ns               1582 ipc/shm.c      	up_write(&shm_ids(ns).rwsem);
ns                338 ipc/util.c     static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids,
ns                344 ipc/util.c     	err = ops->getnew(ns, params);
ns                364 ipc/util.c     static int ipc_check_perms(struct ipc_namespace *ns,
ns                371 ipc/util.c     	if (ipcperms(ns, ipcp, params->flg))
ns                396 ipc/util.c     static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids,
ns                414 ipc/util.c     			err = ops->getnew(ns, params);
ns                429 ipc/util.c     				err = ipc_check_perms(ns, ipcp, ops, params);
ns                519 ipc/util.c     int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag)
ns                534 ipc/util.c     	    !ns_capable(ns->user_ns, CAP_IPC_OWNER))
ns                639 ipc/util.c     int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids,
ns                643 ipc/util.c     		return ipcget_new(ns, ids, ops, params);
ns                645 ipc/util.c     		return ipcget_public(ns, ids, ops, params);
ns                688 ipc/util.c     struct kern_ipc_perm *ipcctl_obtain_check(struct ipc_namespace *ns,
ns                709 ipc/util.c     	    ns_capable(ns->user_ns, CAP_SYS_ADMIN))
ns                740 ipc/util.c     	struct ipc_namespace *ns;
ns                794 ipc/util.c     	return sysvipc_find_ipc(&iter->ns->ids[iface->ids], *pos, pos);
ns                807 ipc/util.c     	ids = &iter->ns->ids[iface->ids];
ns                838 ipc/util.c     	ids = &iter->ns->ids[iface->ids];
ns                872 ipc/util.c     	iter->ns    = get_ipc_ns(current->nsproxy->ipc_ns);
ns                882 ipc/util.c     	put_ipc_ns(iter->ns);
ns                 58 ipc/util.h     extern void mq_clear_sbinfo(struct ipc_namespace *ns);
ns                 59 ipc/util.h     extern void mq_put_mnt(struct ipc_namespace *ns);
ns                 61 ipc/util.h     static inline void mq_clear_sbinfo(struct ipc_namespace *ns) { }
ns                 62 ipc/util.h     static inline void mq_put_mnt(struct ipc_namespace *ns) { }
ns                 66 ipc/util.h     void sem_init_ns(struct ipc_namespace *ns);
ns                 67 ipc/util.h     void msg_init_ns(struct ipc_namespace *ns);
ns                 68 ipc/util.h     void shm_init_ns(struct ipc_namespace *ns);
ns                 70 ipc/util.h     void sem_exit_ns(struct ipc_namespace *ns);
ns                 71 ipc/util.h     void msg_exit_ns(struct ipc_namespace *ns);
ns                 72 ipc/util.h     void shm_exit_ns(struct ipc_namespace *ns);
ns                 74 ipc/util.h     static inline void sem_init_ns(struct ipc_namespace *ns) { }
ns                 75 ipc/util.h     static inline void msg_init_ns(struct ipc_namespace *ns) { }
ns                 76 ipc/util.h     static inline void shm_init_ns(struct ipc_namespace *ns) { }
ns                 78 ipc/util.h     static inline void sem_exit_ns(struct ipc_namespace *ns) { }
ns                 79 ipc/util.h     static inline void msg_exit_ns(struct ipc_namespace *ns) { }
ns                 80 ipc/util.h     static inline void shm_exit_ns(struct ipc_namespace *ns) { }
ns                142 ipc/util.h     int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flg);
ns                179 ipc/util.h     struct kern_ipc_perm *ipcctl_obtain_check(struct ipc_namespace *ns,
ns                241 ipc/util.h     int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids,
ns                243 ipc/util.h     void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
ns                246 ipc/util.h     static inline int sem_check_semmni(struct ipc_namespace *ns) {
ns                251 ipc/util.h     	return ((ns->sem_ctls[3] < 0) || (ns->sem_ctls[3] > ipc_mni))
ns                 91 kernel/acct.c  	struct pid_namespace	*ns;
ns                144 kernel/acct.c  static struct bsd_acct_struct *acct_get(struct pid_namespace *ns)
ns                150 kernel/acct.c  	res = to_acct(READ_ONCE(ns->bacct));
ns                162 kernel/acct.c  	if (res != to_acct(READ_ONCE(ns->bacct))) {
ns                177 kernel/acct.c  	cmpxchg(&acct->ns->bacct, pin, NULL);
ns                197 kernel/acct.c  	struct pid_namespace *ns = task_active_pid_ns(current);
ns                244 kernel/acct.c  	acct->ns = ns;
ns                252 kernel/acct.c  	old = xchg(&ns->bacct, &acct->pin);
ns                297 kernel/acct.c  void acct_exit_ns(struct pid_namespace *ns)
ns                300 kernel/acct.c  	pin_kill(ns->bacct);
ns                504 kernel/acct.c  		struct pid_namespace *ns = acct->ns;
ns                506 kernel/acct.c  		ac.ac_pid = task_tgid_nr_ns(current, ns);
ns                509 kernel/acct.c  					     ns);
ns                574 kernel/acct.c  static void slow_acct_process(struct pid_namespace *ns)
ns                576 kernel/acct.c  	for ( ; ns; ns = ns->parent) {
ns                577 kernel/acct.c  		struct bsd_acct_struct *acct = acct_get(ns);
ns                593 kernel/acct.c  	struct pid_namespace *ns;
ns                600 kernel/acct.c  	for (ns = task_active_pid_ns(current); ns != NULL; ns = ns->parent) {
ns                601 kernel/acct.c  		if (ns->bacct)
ns                604 kernel/acct.c  	if (unlikely(ns))
ns                605 kernel/acct.c  		slow_acct_process(ns);
ns                272 kernel/bpf/offload.c 	struct ns_common *ns;
ns                282 kernel/bpf/offload.c 		ns = &net->ns;
ns                285 kernel/bpf/offload.c 		ns = NULL;
ns                291 kernel/bpf/offload.c 	return ns;
ns                499 kernel/bpf/offload.c 	struct ns_common *ns;
ns                509 kernel/bpf/offload.c 		ns = &net->ns;
ns                512 kernel/bpf/offload.c 		ns = NULL;
ns                518 kernel/bpf/offload.c 	return ns;
ns                295 kernel/capability.c 		       struct user_namespace *ns, int cap)
ns                300 kernel/capability.c 	ret = security_capable(__task_cred(t), ns, cap, CAP_OPT_NONE);
ns                336 kernel/capability.c 			       struct user_namespace *ns, int cap)
ns                341 kernel/capability.c 	ret = security_capable(__task_cred(t), ns, cap, CAP_OPT_NOAUDIT);
ns                364 kernel/capability.c static bool ns_capable_common(struct user_namespace *ns,
ns                375 kernel/capability.c 	capable = security_capable(current_cred(), ns, cap, opts);
ns                394 kernel/capability.c bool ns_capable(struct user_namespace *ns, int cap)
ns                396 kernel/capability.c 	return ns_capable_common(ns, cap, CAP_OPT_NONE);
ns                412 kernel/capability.c bool ns_capable_noaudit(struct user_namespace *ns, int cap)
ns                414 kernel/capability.c 	return ns_capable_common(ns, cap, CAP_OPT_NOAUDIT);
ns                431 kernel/capability.c bool ns_capable_setid(struct user_namespace *ns, int cap)
ns                433 kernel/capability.c 	return ns_capable_common(ns, cap, CAP_OPT_INSETID);
ns                466 kernel/capability.c bool file_ns_capable(const struct file *file, struct user_namespace *ns,
ns                473 kernel/capability.c 	if (security_capable(file->f_cred, ns, cap, CAP_OPT_NONE) == 0)
ns                487 kernel/capability.c bool privileged_wrt_inode_uidgid(struct user_namespace *ns, const struct inode *inode)
ns                489 kernel/capability.c 	return kuid_has_mapping(ns, inode->i_uid) &&
ns                490 kernel/capability.c 		kgid_has_mapping(ns, inode->i_gid);
ns                504 kernel/capability.c 	struct user_namespace *ns = current_user_ns();
ns                506 kernel/capability.c 	return ns_capable(ns, cap) && privileged_wrt_inode_uidgid(ns, inode);
ns                518 kernel/capability.c bool ptracer_capable(struct task_struct *tsk, struct user_namespace *ns)
ns                526 kernel/capability.c 		ret = security_capable(cred, ns, CAP_SYS_PTRACE,
ns                 49 kernel/cgroup/cgroup-internal.h 	struct cgroup_namespace	*ns;
ns                216 kernel/cgroup/cgroup-internal.h 			  struct cgroup_namespace *ns);
ns                183 kernel/cgroup/cgroup-v1.c 	struct { enum cgroup_filetype type; struct pid_namespace *ns; } key;
ns                229 kernel/cgroup/cgroup-v1.c 		put_pid_ns(l->key.ns);
ns                286 kernel/cgroup/cgroup-v1.c 	struct pid_namespace *ns = task_active_pid_ns(current);
ns                291 kernel/cgroup/cgroup-v1.c 		if (l->key.type == type && l->key.ns == ns)
ns                321 kernel/cgroup/cgroup-v1.c 	l->key.ns = get_pid_ns(task_active_pid_ns(current));
ns               1186 kernel/cgroup/cgroup-v1.c 	if (ctx->ns != &init_cgroup_ns)
ns               1208 kernel/cgroup/cgroup-v1.c 	if (!ns_capable(ctx->ns->user_ns, CAP_SYS_ADMIN))
ns                208 kernel/cgroup/cgroup.c 	.ns.ops		= &cgroupns_operations,
ns                209 kernel/cgroup/cgroup.c 	.ns.inum	= PROC_CGROUP_INIT_INO,
ns               2107 kernel/cgroup/cgroup.c 	if (!ret && ctx->ns != &init_cgroup_ns) {
ns               2115 kernel/cgroup/cgroup.c 		cgrp = cset_cgroup_from_root(ctx->ns->root_cset, ctx->root);
ns               2145 kernel/cgroup/cgroup.c 	put_cgroup_ns(ctx->ns);
ns               2198 kernel/cgroup/cgroup.c 	ctx->ns = current->nsproxy->cgroup_ns;
ns               2199 kernel/cgroup/cgroup.c 	get_cgroup_ns(ctx->ns);
ns               2206 kernel/cgroup/cgroup.c 	fc->user_ns = get_user_ns(ctx->ns->user_ns);
ns               2291 kernel/cgroup/cgroup.c 			  struct cgroup_namespace *ns)
ns               2293 kernel/cgroup/cgroup.c 	struct cgroup *root = cset_cgroup_from_root(ns->root_cset, cgrp->root);
ns               2299 kernel/cgroup/cgroup.c 		   struct cgroup_namespace *ns)
ns               2306 kernel/cgroup/cgroup.c 	ret = cgroup_path_ns_locked(cgrp, buf, buflen, ns);
ns               3738 kernel/cgroup/cgroup.c 	struct cgroup_namespace *ns = current->nsproxy->cgroup_ns;
ns               3752 kernel/cgroup/cgroup.c 	    ns != &init_cgroup_ns && ns->root_cset->dfl_cgrp == cgrp)
ns               4733 kernel/cgroup/cgroup.c 	struct cgroup_namespace *ns = current->nsproxy->cgroup_ns;
ns               4759 kernel/cgroup/cgroup.c 	    (!cgroup_is_descendant(src_cgrp, ns->root_cset->dfl_cgrp) ||
ns               4760 kernel/cgroup/cgroup.c 	     !cgroup_is_descendant(dst_cgrp, ns->root_cset->dfl_cgrp)))
ns               5870 kernel/cgroup/cgroup.c int proc_cgroup_show(struct seq_file *m, struct pid_namespace *ns,
ns               3584 kernel/cgroup/cpuset.c int proc_cpuset_show(struct seq_file *m, struct pid_namespace *ns,
ns                 12 kernel/cgroup/namespace.c static struct ucounts *inc_cgroup_namespaces(struct user_namespace *ns)
ns                 14 kernel/cgroup/namespace.c 	return inc_ucount(ns, current_euid(), UCOUNT_CGROUP_NAMESPACES);
ns                 30 kernel/cgroup/namespace.c 	ret = ns_alloc_inum(&new_ns->ns);
ns                 36 kernel/cgroup/namespace.c 	new_ns->ns.ops = &cgroupns_operations;
ns                 40 kernel/cgroup/namespace.c void free_cgroup_ns(struct cgroup_namespace *ns)
ns                 42 kernel/cgroup/namespace.c 	put_css_set(ns->root_cset);
ns                 43 kernel/cgroup/namespace.c 	dec_cgroup_namespaces(ns->ucounts);
ns                 44 kernel/cgroup/namespace.c 	put_user_ns(ns->user_ns);
ns                 45 kernel/cgroup/namespace.c 	ns_free_inum(&ns->ns);
ns                 46 kernel/cgroup/namespace.c 	kfree(ns);
ns                 93 kernel/cgroup/namespace.c static inline struct cgroup_namespace *to_cg_ns(struct ns_common *ns)
ns                 95 kernel/cgroup/namespace.c 	return container_of(ns, struct cgroup_namespace, ns);
ns                 98 kernel/cgroup/namespace.c static int cgroupns_install(struct nsproxy *nsproxy, struct ns_common *ns)
ns                100 kernel/cgroup/namespace.c 	struct cgroup_namespace *cgroup_ns = to_cg_ns(ns);
ns                119 kernel/cgroup/namespace.c 	struct cgroup_namespace *ns = NULL;
ns                125 kernel/cgroup/namespace.c 		ns = nsproxy->cgroup_ns;
ns                126 kernel/cgroup/namespace.c 		get_cgroup_ns(ns);
ns                130 kernel/cgroup/namespace.c 	return ns ? &ns->ns : NULL;
ns                133 kernel/cgroup/namespace.c static void cgroupns_put(struct ns_common *ns)
ns                135 kernel/cgroup/namespace.c 	put_cgroup_ns(to_cg_ns(ns));
ns                138 kernel/cgroup/namespace.c static struct user_namespace *cgroupns_owner(struct ns_common *ns)
ns                140 kernel/cgroup/namespace.c 	return to_cg_ns(ns)->user_ns;
ns                 48 kernel/delayacct.c 	s64 ns = ktime_get_ns() - *start;
ns                 51 kernel/delayacct.c 	if (ns > 0) {
ns                 53 kernel/delayacct.c 		*total += ns;
ns               1335 kernel/events/core.c 	nr = __task_pid_nr_ns(p, type, event->ns);
ns               4328 kernel/events/core.c 	if (event->ns)
ns               4329 kernel/events/core.c 		put_pid_ns(event->ns);
ns               10477 kernel/events/core.c 	event->ns		= get_pid_ns(task_active_pid_ns(current));
ns               10631 kernel/events/core.c 	if (event->ns)
ns               10632 kernel/events/core.c 		put_pid_ns(event->ns);
ns               1696 kernel/fork.c  	struct pid_namespace *ns = proc_pid_ns(file_inode(m->file));
ns               1699 kernel/fork.c  	seq_put_decimal_ull(m, "Pid:\t", pid_nr_ns(pid, ns));
ns                169 kernel/nsproxy.c void free_nsproxy(struct nsproxy *ns)
ns                171 kernel/nsproxy.c 	if (ns->mnt_ns)
ns                172 kernel/nsproxy.c 		put_mnt_ns(ns->mnt_ns);
ns                173 kernel/nsproxy.c 	if (ns->uts_ns)
ns                174 kernel/nsproxy.c 		put_uts_ns(ns->uts_ns);
ns                175 kernel/nsproxy.c 	if (ns->ipc_ns)
ns                176 kernel/nsproxy.c 		put_ipc_ns(ns->ipc_ns);
ns                177 kernel/nsproxy.c 	if (ns->pid_ns_for_children)
ns                178 kernel/nsproxy.c 		put_pid_ns(ns->pid_ns_for_children);
ns                179 kernel/nsproxy.c 	put_cgroup_ns(ns->cgroup_ns);
ns                180 kernel/nsproxy.c 	put_net(ns->net_ns);
ns                181 kernel/nsproxy.c 	kmem_cache_free(nsproxy_cachep, ns);
ns                215 kernel/nsproxy.c 	struct nsproxy *ns;
ns                220 kernel/nsproxy.c 	ns = p->nsproxy;
ns                224 kernel/nsproxy.c 	if (ns && atomic_dec_and_test(&ns->count))
ns                225 kernel/nsproxy.c 		free_nsproxy(ns);
ns                238 kernel/nsproxy.c 	struct ns_common *ns;
ns                246 kernel/nsproxy.c 	ns = get_proc_ns(file_inode(file));
ns                247 kernel/nsproxy.c 	if (nstype && (ns->ops->type != nstype))
ns                256 kernel/nsproxy.c 	err = ns->ops->install(new_nsproxy, ns);
ns                 56 kernel/pid.c   		.ns		= &init_pid_ns,
ns                 80 kernel/pid.c   	.ns.inum = PROC_PID_INIT_INO,
ns                 82 kernel/pid.c   	.ns.ops = &pidns_operations,
ns                105 kernel/pid.c   	struct pid_namespace *ns;
ns                110 kernel/pid.c   	ns = pid->numbers[pid->level].ns;
ns                112 kernel/pid.c   		kmem_cache_free(ns->pid_cachep, pid);
ns                113 kernel/pid.c   		put_pid_ns(ns);
ns                133 kernel/pid.c   		struct pid_namespace *ns = upid->ns;
ns                134 kernel/pid.c   		switch (--ns->pid_allocated) {
ns                141 kernel/pid.c   			wake_up_process(ns->child_reaper);
ns                145 kernel/pid.c   			WARN_ON(ns->child_reaper);
ns                146 kernel/pid.c   			ns->pid_allocated = 0;
ns                149 kernel/pid.c   			schedule_work(&ns->proc_work);
ns                153 kernel/pid.c   		idr_remove(&ns->idr, upid->nr);
ns                160 kernel/pid.c   struct pid *alloc_pid(struct pid_namespace *ns)
ns                169 kernel/pid.c   	pid = kmem_cache_alloc(ns->pid_cachep, GFP_KERNEL);
ns                173 kernel/pid.c   	tmp = ns;
ns                174 kernel/pid.c   	pid->level = ns->level;
ns                176 kernel/pid.c   	for (i = ns->level; i >= 0; i--) {
ns                204 kernel/pid.c   		pid->numbers[i].ns = tmp;
ns                209 kernel/pid.c   		if (pid_ns_prepare_proc(ns))
ns                213 kernel/pid.c   	get_pid_ns(ns);
ns                220 kernel/pid.c   	upid = pid->numbers + ns->level;
ns                222 kernel/pid.c   	if (!(ns->pid_allocated & PIDNS_ADDING))
ns                226 kernel/pid.c   		idr_replace(&upid->ns->idr, pid, upid->nr);
ns                227 kernel/pid.c   		upid->ns->pid_allocated++;
ns                235 kernel/pid.c   	put_pid_ns(ns);
ns                239 kernel/pid.c   	while (++i <= ns->level) {
ns                241 kernel/pid.c   		idr_remove(&upid->ns->idr, upid->nr);
ns                245 kernel/pid.c   	if (ns->pid_allocated == PIDNS_ADDING)
ns                246 kernel/pid.c   		idr_set_cursor(&ns->idr, 0);
ns                250 kernel/pid.c   	kmem_cache_free(ns->pid_cachep, pid);
ns                254 kernel/pid.c   void disable_pid_allocation(struct pid_namespace *ns)
ns                257 kernel/pid.c   	ns->pid_allocated &= ~PIDNS_ADDING;
ns                261 kernel/pid.c   struct pid *find_pid_ns(int nr, struct pid_namespace *ns)
ns                263 kernel/pid.c   	return idr_find(&ns->idr, nr);
ns                346 kernel/pid.c   struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
ns                350 kernel/pid.c   	return pid_task(find_pid_ns(nr, ns), PIDTYPE_PID);
ns                405 kernel/pid.c   pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns)
ns                410 kernel/pid.c   	if (pid && ns->level <= pid->level) {
ns                411 kernel/pid.c   		upid = &pid->numbers[ns->level];
ns                412 kernel/pid.c   		if (upid->ns == ns)
ns                426 kernel/pid.c   			struct pid_namespace *ns)
ns                431 kernel/pid.c   	if (!ns)
ns                432 kernel/pid.c   		ns = task_active_pid_ns(current);
ns                434 kernel/pid.c   		nr = pid_nr_ns(rcu_dereference(*task_pid_ptr(task, type)), ns);
ns                452 kernel/pid.c   struct pid *find_ge_pid(int nr, struct pid_namespace *ns)
ns                454 kernel/pid.c   	return idr_get_next(&ns->idr, &nr);
ns                 64 kernel/pid_namespace.c 	struct pid_namespace *ns = container_of(work, struct pid_namespace, proc_work);
ns                 65 kernel/pid_namespace.c 	pid_ns_release_proc(ns);
ns                 68 kernel/pid_namespace.c static struct ucounts *inc_pid_namespaces(struct user_namespace *ns)
ns                 70 kernel/pid_namespace.c 	return inc_ucount(ns, current_euid(), UCOUNT_PID_NAMESPACES);
ns                 81 kernel/pid_namespace.c 	struct pid_namespace *ns;
ns                 98 kernel/pid_namespace.c 	ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL);
ns                 99 kernel/pid_namespace.c 	if (ns == NULL)
ns                102 kernel/pid_namespace.c 	idr_init(&ns->idr);
ns                104 kernel/pid_namespace.c 	ns->pid_cachep = create_pid_cachep(level);
ns                105 kernel/pid_namespace.c 	if (ns->pid_cachep == NULL)
ns                108 kernel/pid_namespace.c 	err = ns_alloc_inum(&ns->ns);
ns                111 kernel/pid_namespace.c 	ns->ns.ops = &pidns_operations;
ns                113 kernel/pid_namespace.c 	kref_init(&ns->kref);
ns                114 kernel/pid_namespace.c 	ns->level = level;
ns                115 kernel/pid_namespace.c 	ns->parent = get_pid_ns(parent_pid_ns);
ns                116 kernel/pid_namespace.c 	ns->user_ns = get_user_ns(user_ns);
ns                117 kernel/pid_namespace.c 	ns->ucounts = ucounts;
ns                118 kernel/pid_namespace.c 	ns->pid_allocated = PIDNS_ADDING;
ns                119 kernel/pid_namespace.c 	INIT_WORK(&ns->proc_work, proc_cleanup_work);
ns                121 kernel/pid_namespace.c 	return ns;
ns                124 kernel/pid_namespace.c 	idr_destroy(&ns->idr);
ns                125 kernel/pid_namespace.c 	kmem_cache_free(pid_ns_cachep, ns);
ns                134 kernel/pid_namespace.c 	struct pid_namespace *ns = container_of(p, struct pid_namespace, rcu);
ns                136 kernel/pid_namespace.c 	dec_pid_namespaces(ns->ucounts);
ns                137 kernel/pid_namespace.c 	put_user_ns(ns->user_ns);
ns                139 kernel/pid_namespace.c 	kmem_cache_free(pid_ns_cachep, ns);
ns                142 kernel/pid_namespace.c static void destroy_pid_namespace(struct pid_namespace *ns)
ns                144 kernel/pid_namespace.c 	ns_free_inum(&ns->ns);
ns                146 kernel/pid_namespace.c 	idr_destroy(&ns->idr);
ns                147 kernel/pid_namespace.c 	call_rcu(&ns->rcu, delayed_free_pidns);
ns                162 kernel/pid_namespace.c 	struct pid_namespace *ns;
ns                164 kernel/pid_namespace.c 	ns = container_of(kref, struct pid_namespace, kref);
ns                165 kernel/pid_namespace.c 	destroy_pid_namespace(ns);
ns                168 kernel/pid_namespace.c void put_pid_ns(struct pid_namespace *ns)
ns                172 kernel/pid_namespace.c 	while (ns != &init_pid_ns) {
ns                173 kernel/pid_namespace.c 		parent = ns->parent;
ns                174 kernel/pid_namespace.c 		if (!kref_put(&ns->kref, free_pid_ns))
ns                176 kernel/pid_namespace.c 		ns = parent;
ns                337 kernel/pid_namespace.c static inline struct pid_namespace *to_pid_ns(struct ns_common *ns)
ns                339 kernel/pid_namespace.c 	return container_of(ns, struct pid_namespace, ns);
ns                344 kernel/pid_namespace.c 	struct pid_namespace *ns;
ns                347 kernel/pid_namespace.c 	ns = task_active_pid_ns(task);
ns                348 kernel/pid_namespace.c 	if (ns)
ns                349 kernel/pid_namespace.c 		get_pid_ns(ns);
ns                352 kernel/pid_namespace.c 	return ns ? &ns->ns : NULL;
ns                357 kernel/pid_namespace.c 	struct pid_namespace *ns = NULL;
ns                361 kernel/pid_namespace.c 		ns = task->nsproxy->pid_ns_for_children;
ns                362 kernel/pid_namespace.c 		get_pid_ns(ns);
ns                366 kernel/pid_namespace.c 	if (ns) {
ns                368 kernel/pid_namespace.c 		if (!ns->child_reaper) {
ns                369 kernel/pid_namespace.c 			put_pid_ns(ns);
ns                370 kernel/pid_namespace.c 			ns = NULL;
ns                375 kernel/pid_namespace.c 	return ns ? &ns->ns : NULL;
ns                378 kernel/pid_namespace.c static void pidns_put(struct ns_common *ns)
ns                380 kernel/pid_namespace.c 	put_pid_ns(to_pid_ns(ns));
ns                383 kernel/pid_namespace.c static int pidns_install(struct nsproxy *nsproxy, struct ns_common *ns)
ns                386 kernel/pid_namespace.c 	struct pid_namespace *ancestor, *new = to_pid_ns(ns);
ns                414 kernel/pid_namespace.c static struct ns_common *pidns_get_parent(struct ns_common *ns)
ns                420 kernel/pid_namespace.c 	pid_ns = p = to_pid_ns(ns)->parent;
ns                429 kernel/pid_namespace.c 	return &get_pid_ns(pid_ns)->ns;
ns                432 kernel/pid_namespace.c static struct user_namespace *pidns_owner(struct ns_common *ns)
ns                434 kernel/pid_namespace.c 	return to_pid_ns(ns)->user_ns;
ns                267 kernel/ptrace.c static bool ptrace_has_cap(const struct cred *cred, struct user_namespace *ns,
ns                273 kernel/ptrace.c 		ret = security_capable(cred, ns, CAP_SYS_PTRACE, CAP_OPT_NOAUDIT);
ns                275 kernel/ptrace.c 		ret = security_capable(cred, ns, CAP_SYS_PTRACE, CAP_OPT_NONE);
ns               3546 kernel/sched/core.c 	u64 ns;
ns               3575 kernel/sched/core.c 	ns = p->se.sum_exec_runtime;
ns               3578 kernel/sched/core.c 	return ns;
ns                277 kernel/sched/cputime.c 	u64 ns;
ns                282 kernel/sched/cputime.c 	ns = t->se.sum_exec_runtime;
ns                285 kernel/sched/cputime.c 	return ns;
ns                856 kernel/sched/debug.c void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
ns                861 kernel/sched/debug.c 	SEQ_printf(m, "%s (%d, #threads: %d)\n", p->comm, task_pid_nr_ns(p, ns),
ns               1490 kernel/sched/fair.c static void update_numa_stats(struct numa_stats *ns, int nid)
ns               1494 kernel/sched/fair.c 	memset(ns, 0, sizeof(*ns));
ns               1498 kernel/sched/fair.c 		ns->load += cpu_runnable_load(rq);
ns               1499 kernel/sched/fair.c 		ns->compute_capacity += capacity_of(cpu);
ns                352 kernel/sys.c   	struct user_namespace *ns = current_user_ns();
ns                358 kernel/sys.c   	krgid = make_kgid(ns, rgid);
ns                359 kernel/sys.c   	kegid = make_kgid(ns, egid);
ns                414 kernel/sys.c   	struct user_namespace *ns = current_user_ns();
ns                420 kernel/sys.c   	kgid = make_kgid(ns, gid);
ns                495 kernel/sys.c   	struct user_namespace *ns = current_user_ns();
ns                501 kernel/sys.c   	kruid = make_kuid(ns, ruid);
ns                502 kernel/sys.c   	keuid = make_kuid(ns, euid);
ns                571 kernel/sys.c   	struct user_namespace *ns = current_user_ns();
ns                577 kernel/sys.c   	kuid = make_kuid(ns, uid);
ns                623 kernel/sys.c   	struct user_namespace *ns = current_user_ns();
ns                629 kernel/sys.c   	kruid = make_kuid(ns, ruid);
ns                630 kernel/sys.c   	keuid = make_kuid(ns, euid);
ns                631 kernel/sys.c   	ksuid = make_kuid(ns, suid);
ns                715 kernel/sys.c   	struct user_namespace *ns = current_user_ns();
ns                721 kernel/sys.c   	krgid = make_kgid(ns, rgid);
ns                722 kernel/sys.c   	kegid = make_kgid(ns, egid);
ns                723 kernel/sys.c   	ksgid = make_kgid(ns, sgid);
ns                145 kernel/time/sched_clock.c 	u64 ns;
ns                151 kernel/time/sched_clock.c 	ns = rd.epoch_ns + cyc_to_ns((cyc - rd.epoch_cyc) & rd.sched_clock_mask, rd.mult, rd.shift);
ns                153 kernel/time/sched_clock.c 	rd.epoch_ns = ns;
ns                170 kernel/time/sched_clock.c 	u64 res, wrap, new_mask, new_epoch, cyc, ns;
ns                196 kernel/time/sched_clock.c 	ns = rd.epoch_ns + cyc_to_ns((cyc - rd.epoch_cyc) & rd.sched_clock_mask, rd.mult, rd.shift);
ns                204 kernel/time/sched_clock.c 	rd.epoch_ns		= ns;
ns                 72 kernel/time/timecounter.c 	u64 ns = (u64) cycles;
ns                 74 kernel/time/timecounter.c 	ns = ((ns * cc->mult) - frac) >> cc->shift;
ns                 76 kernel/time/timecounter.c 	return ns;
ns                 15 kernel/ucount.c #define ucounts_hashfn(ns, uid)						\
ns                 16 kernel/ucount.c 	hash_long((unsigned long)__kuid_val(uid) + (unsigned long)(ns), \
ns                 18 kernel/ucount.c #define ucounts_hashentry(ns, uid)	\
ns                 19 kernel/ucount.c 	(ucounts_hashtable + ucounts_hashfn(ns, uid))
ns                 80 kernel/ucount.c bool setup_userns_sysctls(struct user_namespace *ns)
ns                 84 kernel/ucount.c 	setup_sysctl_set(&ns->set, &set_root, set_is_seen);
ns                 89 kernel/ucount.c 			tbl[i].data = &ns->ucount_max[i];
ns                 91 kernel/ucount.c 		ns->sysctls = __register_sysctl_table(&ns->set, "user", tbl);
ns                 93 kernel/ucount.c 	if (!ns->sysctls) {
ns                 95 kernel/ucount.c 		retire_sysctl_set(&ns->set);
ns                102 kernel/ucount.c void retire_userns_sysctls(struct user_namespace *ns)
ns                107 kernel/ucount.c 	tbl = ns->sysctls->ctl_table_arg;
ns                108 kernel/ucount.c 	unregister_sysctl_table(ns->sysctls);
ns                109 kernel/ucount.c 	retire_sysctl_set(&ns->set);
ns                114 kernel/ucount.c static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashent)
ns                119 kernel/ucount.c 		if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns))
ns                125 kernel/ucount.c static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid)
ns                127 kernel/ucount.c 	struct hlist_head *hashent = ucounts_hashentry(ns, uid);
ns                131 kernel/ucount.c 	ucounts = find_ucounts(ns, uid, hashent);
ns                139 kernel/ucount.c 		new->ns = ns;
ns                144 kernel/ucount.c 		ucounts = find_ucounts(ns, uid, hashent);
ns                189 kernel/ucount.c struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid,
ns                194 kernel/ucount.c 	ucounts = get_ucounts(ns, uid);
ns                197 kernel/ucount.c 		tns = iter->ns;
ns                205 kernel/ucount.c 	for (iter = ucounts; iter != bad; iter = iter->ns->ucounts)
ns                215 kernel/ucount.c 	for (iter = ucounts; iter; iter = iter->ns->ucounts) {
ns                 61 kernel/user.c  	.ns.inum = PROC_USER_INIT_INO,
ns                 63 kernel/user.c  	.ns.ops = &userns_operations,
ns                 28 kernel/user_namespace.c 				struct user_namespace *ns, int cap_setid,
ns                 32 kernel/user_namespace.c static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid)
ns                 34 kernel/user_namespace.c 	return inc_ucount(ns, uid, UCOUNT_USER_NAMESPACES);
ns                 71 kernel/user_namespace.c 	struct user_namespace *ns, *parent_ns = new->user_ns;
ns                105 kernel/user_namespace.c 	ns = kmem_cache_zalloc(user_ns_cachep, GFP_KERNEL);
ns                106 kernel/user_namespace.c 	if (!ns)
ns                109 kernel/user_namespace.c 	ret = ns_alloc_inum(&ns->ns);
ns                112 kernel/user_namespace.c 	ns->ns.ops = &userns_operations;
ns                114 kernel/user_namespace.c 	atomic_set(&ns->count, 1);
ns                116 kernel/user_namespace.c 	ns->parent = parent_ns;
ns                117 kernel/user_namespace.c 	ns->level = parent_ns->level + 1;
ns                118 kernel/user_namespace.c 	ns->owner = owner;
ns                119 kernel/user_namespace.c 	ns->group = group;
ns                120 kernel/user_namespace.c 	INIT_WORK(&ns->work, free_user_ns);
ns                122 kernel/user_namespace.c 		ns->ucount_max[i] = INT_MAX;
ns                124 kernel/user_namespace.c 	ns->ucounts = ucounts;
ns                128 kernel/user_namespace.c 	ns->flags = parent_ns->flags;
ns                132 kernel/user_namespace.c 	INIT_LIST_HEAD(&ns->keyring_name_list);
ns                133 kernel/user_namespace.c 	init_rwsem(&ns->keyring_sem);
ns                136 kernel/user_namespace.c 	if (!setup_userns_sysctls(ns))
ns                139 kernel/user_namespace.c 	set_cred_user_ns(new, ns);
ns                143 kernel/user_namespace.c 	key_put(ns->persistent_keyring_register);
ns                145 kernel/user_namespace.c 	ns_free_inum(&ns->ns);
ns                147 kernel/user_namespace.c 	kmem_cache_free(user_ns_cachep, ns);
ns                176 kernel/user_namespace.c 	struct user_namespace *parent, *ns =
ns                180 kernel/user_namespace.c 		struct ucounts *ucounts = ns->ucounts;
ns                181 kernel/user_namespace.c 		parent = ns->parent;
ns                182 kernel/user_namespace.c 		if (ns->gid_map.nr_extents > UID_GID_MAP_MAX_BASE_EXTENTS) {
ns                183 kernel/user_namespace.c 			kfree(ns->gid_map.forward);
ns                184 kernel/user_namespace.c 			kfree(ns->gid_map.reverse);
ns                186 kernel/user_namespace.c 		if (ns->uid_map.nr_extents > UID_GID_MAP_MAX_BASE_EXTENTS) {
ns                187 kernel/user_namespace.c 			kfree(ns->uid_map.forward);
ns                188 kernel/user_namespace.c 			kfree(ns->uid_map.reverse);
ns                190 kernel/user_namespace.c 		if (ns->projid_map.nr_extents > UID_GID_MAP_MAX_BASE_EXTENTS) {
ns                191 kernel/user_namespace.c 			kfree(ns->projid_map.forward);
ns                192 kernel/user_namespace.c 			kfree(ns->projid_map.reverse);
ns                194 kernel/user_namespace.c 		retire_userns_sysctls(ns);
ns                195 kernel/user_namespace.c 		key_free_user_ns(ns);
ns                196 kernel/user_namespace.c 		ns_free_inum(&ns->ns);
ns                197 kernel/user_namespace.c 		kmem_cache_free(user_ns_cachep, ns);
ns                199 kernel/user_namespace.c 		ns = parent;
ns                203 kernel/user_namespace.c void __put_user_ns(struct user_namespace *ns)
ns                205 kernel/user_namespace.c 	schedule_work(&ns->work);
ns                386 kernel/user_namespace.c kuid_t make_kuid(struct user_namespace *ns, uid_t uid)
ns                389 kernel/user_namespace.c 	return KUIDT_INIT(map_id_down(&ns->uid_map, uid));
ns                454 kernel/user_namespace.c kgid_t make_kgid(struct user_namespace *ns, gid_t gid)
ns                457 kernel/user_namespace.c 	return KGIDT_INIT(map_id_down(&ns->gid_map, gid));
ns                521 kernel/user_namespace.c kprojid_t make_kprojid(struct user_namespace *ns, projid_t projid)
ns                524 kernel/user_namespace.c 	return KPROJIDT_INIT(map_id_down(&ns->projid_map, projid));
ns                579 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns                585 kernel/user_namespace.c 	if ((lower_ns == ns) && lower_ns->parent)
ns                600 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns                606 kernel/user_namespace.c 	if ((lower_ns == ns) && lower_ns->parent)
ns                621 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns                627 kernel/user_namespace.c 	if ((lower_ns == ns) && lower_ns->parent)
ns                658 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns                660 kernel/user_namespace.c 	return m_start(seq, ppos, &ns->uid_map);
ns                665 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns                667 kernel/user_namespace.c 	return m_start(seq, ppos, &ns->gid_map);
ns                672 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns                674 kernel/user_namespace.c 	return m_start(seq, ppos, &ns->projid_map);
ns                851 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns                898 kernel/user_namespace.c 	if (cap_valid(cap_setid) && !file_ns_capable(file, ns, CAP_SYS_ADMIN))
ns                968 kernel/user_namespace.c 	if (!new_idmap_permitted(file, ns, cap_setid, &new_map))
ns               1036 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns               1039 kernel/user_namespace.c 	if (!ns->parent)
ns               1042 kernel/user_namespace.c 	if ((seq_ns != ns) && (seq_ns != ns->parent))
ns               1046 kernel/user_namespace.c 			 &ns->uid_map, &ns->parent->uid_map);
ns               1053 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns               1056 kernel/user_namespace.c 	if (!ns->parent)
ns               1059 kernel/user_namespace.c 	if ((seq_ns != ns) && (seq_ns != ns->parent))
ns               1063 kernel/user_namespace.c 			 &ns->gid_map, &ns->parent->gid_map);
ns               1070 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns               1073 kernel/user_namespace.c 	if (!ns->parent)
ns               1076 kernel/user_namespace.c 	if ((seq_ns != ns) && (seq_ns != ns->parent))
ns               1081 kernel/user_namespace.c 			 &ns->projid_map, &ns->parent->projid_map);
ns               1085 kernel/user_namespace.c 				struct user_namespace *ns, int cap_setid,
ns               1093 kernel/user_namespace.c 	    uid_eq(ns->owner, cred->euid)) {
ns               1096 kernel/user_namespace.c 			kuid_t uid = make_kuid(ns->parent, id);
ns               1100 kernel/user_namespace.c 			kgid_t gid = make_kgid(ns->parent, id);
ns               1101 kernel/user_namespace.c 			if (!(ns->flags & USERNS_SETGROUPS_ALLOWED) &&
ns               1115 kernel/user_namespace.c 	if (ns_capable(ns->parent, cap_setid) &&
ns               1116 kernel/user_namespace.c 	    file_ns_capable(file, ns->parent, cap_setid))
ns               1124 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns               1125 kernel/user_namespace.c 	unsigned long userns_flags = READ_ONCE(ns->flags);
ns               1137 kernel/user_namespace.c 	struct user_namespace *ns = seq->private;
ns               1178 kernel/user_namespace.c 		if (!(ns->flags & USERNS_SETGROUPS_ALLOWED))
ns               1184 kernel/user_namespace.c 		if (ns->gid_map.nr_extents != 0)
ns               1186 kernel/user_namespace.c 		ns->flags &= ~USERNS_SETGROUPS_ALLOWED;
ns               1200 kernel/user_namespace.c bool userns_may_setgroups(const struct user_namespace *ns)
ns               1208 kernel/user_namespace.c 	allowed = ns->gid_map.nr_extents != 0;
ns               1210 kernel/user_namespace.c 	allowed = allowed && (ns->flags & USERNS_SETGROUPS_ALLOWED);
ns               1223 kernel/user_namespace.c 	const struct user_namespace *ns;
ns               1224 kernel/user_namespace.c 	for (ns = child; ns->level > ancestor->level; ns = ns->parent)
ns               1226 kernel/user_namespace.c 	return (ns == ancestor);
ns               1235 kernel/user_namespace.c static inline struct user_namespace *to_user_ns(struct ns_common *ns)
ns               1237 kernel/user_namespace.c 	return container_of(ns, struct user_namespace, ns);
ns               1248 kernel/user_namespace.c 	return user_ns ? &user_ns->ns : NULL;
ns               1251 kernel/user_namespace.c static void userns_put(struct ns_common *ns)
ns               1253 kernel/user_namespace.c 	put_user_ns(to_user_ns(ns));
ns               1256 kernel/user_namespace.c static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns)
ns               1258 kernel/user_namespace.c 	struct user_namespace *user_ns = to_user_ns(ns);
ns               1287 kernel/user_namespace.c struct ns_common *ns_get_owner(struct ns_common *ns)
ns               1293 kernel/user_namespace.c 	owner = p = ns->ops->owner(ns);
ns               1302 kernel/user_namespace.c 	return &get_user_ns(owner)->ns;
ns               1305 kernel/user_namespace.c static struct user_namespace *userns_owner(struct ns_common *ns)
ns               1307 kernel/user_namespace.c 	return to_user_ns(ns)->parent;
ns                 20 kernel/utsname.c static struct ucounts *inc_uts_namespaces(struct user_namespace *ns)
ns                 22 kernel/utsname.c 	return inc_ucount(ns, current_euid(), UCOUNT_UTS_NAMESPACES);
ns                 48 kernel/utsname.c 	struct uts_namespace *ns;
ns                 58 kernel/utsname.c 	ns = create_uts_ns();
ns                 59 kernel/utsname.c 	if (!ns)
ns                 62 kernel/utsname.c 	err = ns_alloc_inum(&ns->ns);
ns                 66 kernel/utsname.c 	ns->ucounts = ucounts;
ns                 67 kernel/utsname.c 	ns->ns.ops = &utsns_operations;
ns                 70 kernel/utsname.c 	memcpy(&ns->name, &old_ns->name, sizeof(ns->name));
ns                 71 kernel/utsname.c 	ns->user_ns = get_user_ns(user_ns);
ns                 73 kernel/utsname.c 	return ns;
ns                 76 kernel/utsname.c 	kmem_cache_free(uts_ns_cache, ns);
ns                108 kernel/utsname.c 	struct uts_namespace *ns;
ns                110 kernel/utsname.c 	ns = container_of(kref, struct uts_namespace, kref);
ns                111 kernel/utsname.c 	dec_uts_namespaces(ns->ucounts);
ns                112 kernel/utsname.c 	put_user_ns(ns->user_ns);
ns                113 kernel/utsname.c 	ns_free_inum(&ns->ns);
ns                114 kernel/utsname.c 	kmem_cache_free(uts_ns_cache, ns);
ns                117 kernel/utsname.c static inline struct uts_namespace *to_uts_ns(struct ns_common *ns)
ns                119 kernel/utsname.c 	return container_of(ns, struct uts_namespace, ns);
ns                124 kernel/utsname.c 	struct uts_namespace *ns = NULL;
ns                130 kernel/utsname.c 		ns = nsproxy->uts_ns;
ns                131 kernel/utsname.c 		get_uts_ns(ns);
ns                135 kernel/utsname.c 	return ns ? &ns->ns : NULL;
ns                138 kernel/utsname.c static void utsns_put(struct ns_common *ns)
ns                140 kernel/utsname.c 	put_uts_ns(to_uts_ns(ns));
ns                145 kernel/utsname.c 	struct uts_namespace *ns = to_uts_ns(new);
ns                147 kernel/utsname.c 	if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) ||
ns                151 kernel/utsname.c 	get_uts_ns(ns);
ns                153 kernel/utsname.c 	nsproxy->uts_ns = ns;
ns                157 kernel/utsname.c static struct user_namespace *utsns_owner(struct ns_common *ns)
ns                159 kernel/utsname.c 	return to_uts_ns(ns)->user_ns;
ns               1083 lib/kobject.c  	void *ns = NULL;
ns               1088 lib/kobject.c  		ns = kobj_ns_ops_tbl[type]->grab_current_ns();
ns               1091 lib/kobject.c  	return ns;
ns               1097 lib/kobject.c  	const void *ns = NULL;
ns               1102 lib/kobject.c  		ns = kobj_ns_ops_tbl[type]->netlink_ns(sk);
ns               1105 lib/kobject.c  	return ns;
ns               1110 lib/kobject.c  	const void *ns = NULL;
ns               1115 lib/kobject.c  		ns = kobj_ns_ops_tbl[type]->initial_ns();
ns               1118 lib/kobject.c  	return ns;
ns               1121 lib/kobject.c  void kobj_ns_drop(enum kobj_ns_type type, void *ns)
ns               1126 lib/kobject.c  		kobj_ns_ops_tbl[type]->drop_ns(ns);
ns                242 lib/kobject_uevent.c 		const void *init_ns, *ns;
ns                244 lib/kobject_uevent.c 		ns = kobj->ktype->namespace(kobj);
ns                246 lib/kobject_uevent.c 		return ns != init_ns;
ns                 45 lib/vdso/gettimeofday.c 	u64 cycles, last, sec, ns;
ns                 51 lib/vdso/gettimeofday.c 		ns = vdso_ts->nsec;
ns                 56 lib/vdso/gettimeofday.c 		ns += vdso_calc_delta(cycles, last, vd->mask, vd->mult);
ns                 57 lib/vdso/gettimeofday.c 		ns >>= vd->shift;
ns                 65 lib/vdso/gettimeofday.c 	ts->tv_sec = sec + __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
ns                 66 lib/vdso/gettimeofday.c 	ts->tv_nsec = ns;
ns                186 lib/vdso/gettimeofday.c 	u64 ns;
ns                202 lib/vdso/gettimeofday.c 		ns = hrtimer_res;
ns                207 lib/vdso/gettimeofday.c 		ns = LOW_RES_NSEC;
ns                212 lib/vdso/gettimeofday.c 		ns = hrtimer_res;
ns                219 lib/vdso/gettimeofday.c 		res->tv_nsec = ns;
ns                783 net/atm/clip.c 	struct neigh_seq_state ns;
ns                839 net/atm/clip.c 	state->ns.neigh_sub_iter = clip_seq_sub_iter;
ns                145 net/ax25/ax25_ds_in.c static int ax25_ds_state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type)
ns                238 net/ax25/ax25_ds_in.c 		if (ns == ax25->vr) {
ns                242 net/ax25/ax25_ds_in.c 				ax25->vr = ns;	/* ax25->vr - 1 */
ns                281 net/ax25/ax25_ds_in.c 	int queued = 0, frametype, ns, nr, pf;
ns                283 net/ax25/ax25_ds_in.c 	frametype = ax25_decode(ax25, skb, &ns, &nr, &pf);
ns                293 net/ax25/ax25_ds_in.c 		queued = ax25_ds_state3_machine(ax25, skb, frametype, ns, nr, pf, type);
ns                141 net/ax25/ax25_std_in.c static int ax25_std_state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type)
ns                223 net/ax25/ax25_std_in.c 		if (ns == ax25->vr) {
ns                227 net/ax25/ax25_std_in.c 				ax25->vr = ns;	/* ax25->vr - 1 */
ns                266 net/ax25/ax25_std_in.c static int ax25_std_state4_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type)
ns                378 net/ax25/ax25_std_in.c 		if (ns == ax25->vr) {
ns                382 net/ax25/ax25_std_in.c 				ax25->vr = ns;	/* ax25->vr - 1 */
ns                421 net/ax25/ax25_std_in.c 	int queued = 0, frametype, ns, nr, pf;
ns                423 net/ax25/ax25_std_in.c 	frametype = ax25_decode(ax25, skb, &ns, &nr, &pf);
ns                433 net/ax25/ax25_std_in.c 		queued = ax25_std_state3_machine(ax25, skb, frametype, ns, nr, pf, type);
ns                436 net/ax25/ax25_std_in.c 		queued = ax25_std_state4_machine(ax25, skb, frametype, ns, nr, pf, type);
ns                 97 net/ax25/ax25_subr.c int ax25_decode(ax25_cb *ax25, struct sk_buff *skb, int *ns, int *nr, int *pf)
ns                103 net/ax25/ax25_subr.c 	*ns = *nr = *pf = 0;
ns                108 net/ax25/ax25_subr.c 			*ns = (frame[0] >> 1) & 0x07;
ns                123 net/ax25/ax25_subr.c 			*ns = (frame[0] >> 1) & 0x7F;
ns                244 net/bridge/br_arp_nd_proxy.c 		       __be16 vlan_proto, u16 vlan_tci, struct nd_msg *ns)
ns                277 net/bridge/br_arp_nd_proxy.c 				  sizeof(struct ipv6hdr)) - sizeof(*ns);
ns                278 net/bridge/br_arp_nd_proxy.c 	for (i = 0; i < ns_olen - 1; i += (ns->opt[i + 1] << 3)) {
ns                279 net/bridge/br_arp_nd_proxy.c 		if (!ns->opt[i + 1]) {
ns                283 net/bridge/br_arp_nd_proxy.c 		if (ns->opt[i] == ND_OPT_SOURCE_LL_ADDR) {
ns                284 net/bridge/br_arp_nd_proxy.c 			daddr = ns->opt + i + sizeof(struct nd_opt_hdr);
ns                320 net/bridge/br_arp_nd_proxy.c 	na->target = ns->target;
ns                892 net/core/net-sysfs.c 	const void *ns = NULL;
ns                895 net/core/net-sysfs.c 		ns = dev->class->namespace(dev);
ns                897 net/core/net-sysfs.c 	return ns;
ns               1435 net/core/net-sysfs.c 	const void *ns = NULL;
ns               1438 net/core/net-sysfs.c 		ns = dev->class->namespace(dev);
ns               1440 net/core/net-sysfs.c 	return ns;
ns               1582 net/core/net-sysfs.c 	struct net *ns = current->nsproxy->net_ns;
ns               1584 net/core/net-sysfs.c 	if (ns)
ns               1585 net/core/net-sysfs.c 		refcount_inc(&ns->passive);
ns               1587 net/core/net-sysfs.c 	return ns;
ns               1771 net/core/net-sysfs.c 				const void *ns)
ns               1773 net/core/net-sysfs.c 	return class_create_file_ns(&net_class, class_attr, ns);
ns               1778 net/core/net-sysfs.c 				 const void *ns)
ns               1780 net/core/net-sysfs.c 	class_remove_file_ns(&net_class, class_attr, ns);
ns                389 net/core/net_namespace.c static struct ucounts *inc_net_namespaces(struct user_namespace *ns)
ns                391 net/core/net_namespace.c 	return inc_ucount(ns, current_euid(), UCOUNT_NET_NAMESPACES);
ns                444 net/core/net_namespace.c 	struct net *ns = p;
ns                445 net/core/net_namespace.c 	if (ns && refcount_dec_and_test(&ns->passive))
ns                446 net/core/net_namespace.c 		net_free(ns);
ns                649 net/core/net_namespace.c 	struct ns_common *ns;
ns                656 net/core/net_namespace.c 	ns = get_proc_ns(file_inode(file));
ns                657 net/core/net_namespace.c 	if (ns->ops == &netns_operations)
ns                658 net/core/net_namespace.c 		net = get_net(container_of(ns, struct net, ns));
ns                699 net/core/net_namespace.c 	net->ns.ops = &netns_operations;
ns                701 net/core/net_namespace.c 	return ns_alloc_inum(&net->ns);
ns                706 net/core/net_namespace.c 	ns_free_inum(&net->ns);
ns               1345 net/core/net_namespace.c 	return net ? &net->ns : NULL;
ns               1348 net/core/net_namespace.c static inline struct net *to_net_ns(struct ns_common *ns)
ns               1350 net/core/net_namespace.c 	return container_of(ns, struct net, ns);
ns               1353 net/core/net_namespace.c static void netns_put(struct ns_common *ns)
ns               1355 net/core/net_namespace.c 	put_net(to_net_ns(ns));
ns               1358 net/core/net_namespace.c static int netns_install(struct nsproxy *nsproxy, struct ns_common *ns)
ns               1360 net/core/net_namespace.c 	struct net *net = to_net_ns(ns);
ns               1371 net/core/net_namespace.c static struct user_namespace *netns_owner(struct ns_common *ns)
ns               1373 net/core/net_namespace.c 	return to_net_ns(ns)->user_ns;
ns               2300 net/ipv4/tcp.c 	int ns = next & TCP_STATE_MASK;
ns               2302 net/ipv4/tcp.c 	tcp_set_state(sk, ns);
ns                 91 net/l2tp/l2tp_core.c 	u32			ns;
ns                369 net/l2tp/l2tp_core.c 	u32 ns = L2TP_SKB_CB(skb)->ns;
ns                373 net/l2tp/l2tp_core.c 		if (L2TP_SKB_CB(skbp)->ns > ns) {
ns                377 net/l2tp/l2tp_core.c 				 session->name, ns, L2TP_SKB_CB(skbp)->ns,
ns                443 net/l2tp/l2tp_core.c 				 session->name, L2TP_SKB_CB(skb)->ns,
ns                457 net/l2tp/l2tp_core.c 					 L2TP_SKB_CB(skb)->ns);
ns                459 net/l2tp/l2tp_core.c 				session->nr = L2TP_SKB_CB(skb)->ns;
ns                461 net/l2tp/l2tp_core.c 			if (L2TP_SKB_CB(skb)->ns != session->nr) {
ns                464 net/l2tp/l2tp_core.c 					 session->name, L2TP_SKB_CB(skb)->ns,
ns                501 net/l2tp/l2tp_core.c 	if (!l2tp_seq_check_rx_window(session, L2TP_SKB_CB(skb)->ns)) {
ns                507 net/l2tp/l2tp_core.c 			 session->name, L2TP_SKB_CB(skb)->ns,
ns                525 net/l2tp/l2tp_core.c 	if (L2TP_SKB_CB(skb)->ns == session->nr) {
ns                528 net/l2tp/l2tp_core.c 		u32 nr_oos = L2TP_SKB_CB(skb)->ns;
ns                547 net/l2tp/l2tp_core.c 				 session->name, L2TP_SKB_CB(skb)->ns,
ns                627 net/l2tp/l2tp_core.c 	u32 ns, nr;
ns                649 net/l2tp/l2tp_core.c 	ns = nr = 0;
ns                653 net/l2tp/l2tp_core.c 			ns = ntohs(*(__be16 *) ptr);
ns                659 net/l2tp/l2tp_core.c 			L2TP_SKB_CB(skb)->ns = ns;
ns                664 net/l2tp/l2tp_core.c 				 session->name, ns, nr, session->nr);
ns                670 net/l2tp/l2tp_core.c 			ns = l2h & 0x00ffffff;
ns                673 net/l2tp/l2tp_core.c 			L2TP_SKB_CB(skb)->ns = ns;
ns                678 net/l2tp/l2tp_core.c 				 session->name, ns, session->nr);
ns                954 net/l2tp/l2tp_core.c 		*bufp++ = htons(session->ns);
ns                956 net/l2tp/l2tp_core.c 		session->ns++;
ns                957 net/l2tp/l2tp_core.c 		session->ns &= 0xffff;
ns                959 net/l2tp/l2tp_core.c 			 session->name, session->ns);
ns                992 net/l2tp/l2tp_core.c 			l2h = 0x40000000 | session->ns;
ns                993 net/l2tp/l2tp_core.c 			session->ns++;
ns                994 net/l2tp/l2tp_core.c 			session->ns &= 0xffffff;
ns                997 net/l2tp/l2tp_core.c 				 session->name, session->ns);
ns               1017 net/l2tp/l2tp_core.c 			 session->name, data_len, session->ns - 1);
ns                 87 net/l2tp/l2tp_core.h 	u32			ns;		/* session NR state (send) */
ns                187 net/l2tp/l2tp_debugfs.c 		seq_printf(m, "   nr %hu, ns %hu\n", session->nr, session->ns);
ns                219 net/l2tp/l2tp_debugfs.c 		   session->nr, session->ns,
ns               1582 net/l2tp/l2tp_ppp.c 		   session->nr, session->ns,
ns                383 net/lapb/lapb_in.c 			 lapb->dev, frame->pf, frame->ns, frame->nr);
ns                400 net/lapb/lapb_in.c 		if (frame->ns == lapb->vr) {
ns                155 net/lapb/lapb_subr.c 			frame->ns         = (skb->data[0] >> 1) & 0x7F;
ns                189 net/lapb/lapb_subr.c 			frame->ns   = (skb->data[0] >> 1) & 0x07;
ns                 59 net/llc/llc_c_ev.c static u16 llc_util_ns_inside_rx_window(u8 ns, u8 vr, u8 rw)
ns                 61 net/llc/llc_c_ev.c 	return !llc_circular_between(vr, ns,
ns                201 net/llc/llc_c_ev.c 	const u8 ns = LLC_I_GET_NS(pdu);
ns                204 net/llc/llc_c_ev.c 	       LLC_I_PF_IS_0(pdu) && ns != vr &&
ns                205 net/llc/llc_c_ev.c 	       !llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
ns                213 net/llc/llc_c_ev.c 	const u8 ns = LLC_I_GET_NS(pdu);
ns                216 net/llc/llc_c_ev.c 	       LLC_I_PF_IS_1(pdu) && ns != vr &&
ns                217 net/llc/llc_c_ev.c 	       !llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
ns                225 net/llc/llc_c_ev.c 	const u8 ns = LLC_I_GET_NS(pdu);
ns                227 net/llc/llc_c_ev.c 		ns != vr &&
ns                228 net/llc/llc_c_ev.c 		 llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
ns                231 net/llc/llc_c_ev.c 			__func__, llc_sk(sk)->state, ns, vr);
ns                268 net/llc/llc_c_ev.c 	const u8 ns = LLC_I_GET_NS(pdu);
ns                271 net/llc/llc_c_ev.c 	       LLC_I_PF_IS_0(pdu) && ns != vr &&
ns                272 net/llc/llc_c_ev.c 	       !llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
ns                280 net/llc/llc_c_ev.c 	const u8 ns = LLC_I_GET_NS(pdu);
ns                283 net/llc/llc_c_ev.c 	       LLC_I_PF_IS_1(pdu) && ns != vr &&
ns                284 net/llc/llc_c_ev.c 	       !llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
ns                292 net/llc/llc_c_ev.c 	const u8 ns = LLC_I_GET_NS(pdu);
ns                294 net/llc/llc_c_ev.c 	return LLC_PDU_IS_RSP(pdu) && LLC_PDU_TYPE_IS_I(pdu) && ns != vr &&
ns                295 net/llc/llc_c_ev.c 	       !llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
ns                303 net/llc/llc_c_ev.c 	const u8 ns = LLC_I_GET_NS(pdu);
ns                305 net/llc/llc_c_ev.c 		ns != vr &&
ns                306 net/llc/llc_c_ev.c 		 llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
ns                309 net/llc/llc_c_ev.c 			__func__, llc_sk(sk)->state, ns, vr);
ns                107 net/llc/llc_pdu.c void llc_pdu_init_as_i_cmd(struct sk_buff *skb, u8 p_bit, u8 ns, u8 nr)
ns                114 net/llc/llc_pdu.c 	pdu->ctrl_1 |= (ns << 1) & 0xFE;   /* set N(S) in bits 2..8 */
ns                978 net/netfilter/nf_tables_api.c 	struct nft_set *set, *ns;
ns                992 net/netfilter/nf_tables_api.c 	list_for_each_entry_safe(set, ns, &ctx->table->sets, list) {
ns               7695 net/netfilter/nf_tables_api.c 	struct nft_set *set, *ns;
ns               7721 net/netfilter/nf_tables_api.c 		list_for_each_entry_safe(set, ns, &table->sets, list) {
ns                152 net/netrom/nr_in.c 	unsigned short nr, ns;
ns                156 net/netrom/nr_in.c 	ns = skb->data[17];
ns                234 net/netrom/nr_in.c 				ns = skbn->data[17];
ns                235 net/netrom/nr_in.c 				if (ns == nrom->vr) {
ns                242 net/netrom/nr_in.c 				} else if (nr_in_rx_window(sk, ns)) {
ns                101 net/netrom/nr_subr.c int nr_in_rx_window(struct sock *sk, unsigned short ns)
ns                108 net/netrom/nr_subr.c 		if (ns == vc) return 1;
ns                 49 net/nfc/hci/llc_shdlc.c 	int ns;				/* next seq num for send */
ns                224 net/nfc/hci/llc_shdlc.c 				  struct sk_buff *skb, int ns, int nr)
ns                226 net/nfc/hci/llc_shdlc.c 	int x_ns = ns;
ns                229 net/nfc/hci/llc_shdlc.c 	pr_debug("recvd I-frame %d, remote waiting frame %d\n", ns, nr);
ns                253 net/nfc/hci/llc_shdlc.c 	if (llc_shdlc_x_lt_y_lteq_z(shdlc->dnr, y_nr, shdlc->ns)) {
ns                267 net/nfc/hci/llc_shdlc.c 	if (llc_shdlc_x_lt_y_lteq_z(shdlc->dnr, y_nr, shdlc->ns)) {
ns                283 net/nfc/hci/llc_shdlc.c 	shdlc->ns = shdlc->dnr;
ns                292 net/nfc/hci/llc_shdlc.c 	if (llc_shdlc_x_lteq_y_lt_z(shdlc->dnr, y_nr, shdlc->ns)) {
ns                350 net/nfc/hci/llc_shdlc.c 		shdlc->ns = 0;
ns                464 net/nfc/hci/llc_shdlc.c 	int ns;
ns                480 net/nfc/hci/llc_shdlc.c 			ns = (control & SHDLC_CONTROL_NS_MASK) >> 3;
ns                482 net/nfc/hci/llc_shdlc.c 			llc_shdlc_rcv_i_frame(shdlc, skb, ns, nr);
ns                505 net/nfc/hci/llc_shdlc.c static int llc_shdlc_w_used(int ns, int dnr)
ns                509 net/nfc/hci/llc_shdlc.c 	if (dnr <= ns)
ns                510 net/nfc/hci/llc_shdlc.c 		unack_count = ns - dnr;
ns                512 net/nfc/hci/llc_shdlc.c 		unack_count = 8 - dnr + ns;
ns                527 net/nfc/hci/llc_shdlc.c 		     shdlc->send_q.qlen, shdlc->ns, shdlc->dnr,
ns                529 net/nfc/hci/llc_shdlc.c 		     shdlc->w - llc_shdlc_w_used(shdlc->ns, shdlc->dnr),
ns                543 net/nfc/hci/llc_shdlc.c 		*(u8 *)skb_push(skb, 1) = SHDLC_CONTROL_HEAD_I | (shdlc->ns << 3) |
ns                546 net/nfc/hci/llc_shdlc.c 		pr_debug("Sending I-Frame %d, waiting to rcv %d\n", shdlc->ns,
ns                556 net/nfc/hci/llc_shdlc.c 		shdlc->ns = (shdlc->ns + 1) % 8;
ns               1032 net/nfc/llcp_core.c 	u8 dsap, ssap, ptype, ns, nr;
ns               1037 net/nfc/llcp_core.c 	ns = nfc_llcp_ns(skb);
ns               1040 net/nfc/llcp_core.c 	pr_debug("%d %d R %d S %d\n", dsap, ssap, nr, ns);
ns               1059 net/nfc/llcp_core.c 		if (ns == llcp_sock->recv_n)
ns                101 net/rose/rose_in.c static int rose_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr, int q, int d, int m)
ns                162 net/rose/rose_in.c 		if (ns == rose->vr) {
ns                265 net/rose/rose_in.c 	int queued = 0, frametype, ns, nr, q, d, m;
ns                270 net/rose/rose_in.c 	frametype = rose_decode(skb, &ns, &nr, &q, &d, &m);
ns                280 net/rose/rose_in.c 		queued = rose_state3_machine(sk, skb, frametype, ns, nr, q, d, m);
ns                201 net/rose/rose_subr.c int rose_decode(struct sk_buff *skb, int *ns, int *nr, int *q, int *d, int *m)
ns                207 net/rose/rose_subr.c 	*ns = *nr = *q = *d = *m = 0;
ns                232 net/rose/rose_subr.c 		*ns = (frame[2] >> 1) & 0x07;
ns               1081 net/socket.c   struct ns_common *get_net_ns(struct ns_common *ns)
ns               1083 net/socket.c   	return &get_net(container_of(ns, struct net, ns))->ns;
ns               1166 net/socket.c   			err = open_related_ns(&net->ns, get_net_ns);
ns               1385 net/sunrpc/rpc_pipe.c 		net->ns.inum, NET_NAME(net));
ns               1453 net/sunrpc/rpc_pipe.c 		net->ns.inum, NET_NAME(net));
ns                222 net/sunrpc/rpcb_clnt.c 		net->ns.inum, (net == &init_net) ? " (init_net)" : "");
ns                290 net/tipc/name_table.c 	struct tipc_name_seq ns;
ns                295 net/tipc/name_table.c 	ns.type = tipc_sub_read(sb, seq.type);
ns                296 net/tipc/name_table.c 	ns.lower = tipc_sub_read(sb, seq.lower);
ns                297 net/tipc/name_table.c 	ns.upper = tipc_sub_read(sb, seq.upper);
ns                307 net/tipc/name_table.c 		if (sr->lower > ns.upper)
ns                309 net/tipc/name_table.c 		if (!tipc_sub_check_overlap(&ns, sr->lower, sr->upper))
ns                362 net/tipc/trace.h 	TP_PROTO(const char *name, u32 os, u32 ns, int evt),
ns                364 net/tipc/trace.h 	TP_ARGS(name, os, ns, evt),
ns                369 net/tipc/trace.h 		__field(u32, ns)
ns                376 net/tipc/trace.h 		__entry->ns = ns;
ns                382 net/tipc/trace.h 		  state_sym(__entry->ns))
ns                387 net/tipc/trace.h 	TP_PROTO(const char *name, u32 os, u32 ns, int evt), \
ns                388 net/tipc/trace.h 	TP_ARGS(name, os, ns, evt))
ns                177 net/wireless/radiotap.c 		if (iterator->_vns->ns[i].oui != oui)
ns                179 net/wireless/radiotap.c 		if (iterator->_vns->ns[i].subns != subns)
ns                182 net/wireless/radiotap.c 		iterator->current_namespace = &iterator->_vns->ns[i];
ns                208 net/x25/x25_in.c static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr, int q, int d, int m)
ns                261 net/x25/x25_in.c 			if ((ns != x25->vr) || !x25_validate_nr(sk, nr)) {
ns                274 net/x25/x25_in.c 			if (ns == x25->vr) {
ns                389 net/x25/x25_in.c 	int queued = 0, frametype, ns, nr, q, d, m;
ns                394 net/x25/x25_in.c 	frametype = x25_decode(sk, skb, &ns, &nr, &q, &d, &m);
ns                404 net/x25/x25_in.c 		queued = x25_state3_machine(sk, skb, frametype, ns, nr, q, d, m);
ns                260 net/x25/x25_subr.c int x25_decode(struct sock *sk, struct sk_buff *skb, int *ns, int *nr, int *q,
ns                270 net/x25/x25_subr.c 	*ns = *nr = *q = *d = *m = 0;
ns                319 net/x25/x25_subr.c 			*ns = (frame[2] >> 1) & 0x7F;
ns                328 net/x25/x25_subr.c 			*ns = (frame[2] >> 1) & 0x07;
ns                154 scripts/genksyms/genksyms.c struct symbol *find_symbol(const char *name, enum symbol_type ns, int exact)
ns                160 scripts/genksyms/genksyms.c 		if (map_to_ns(sym->type) == map_to_ns(ns) &&
ns                165 scripts/genksyms/genksyms.c 	if (exact && sym && sym->type != ns)
ns                 53 scripts/genksyms/genksyms.h struct symbol *find_symbol(const char *name, enum symbol_type ns, int exact);
ns               2533 scripts/mod/modpost.c 	struct namespace_list *ns;
ns               2544 scripts/mod/modpost.c 		for (ns = mod->required_namespaces; ns; ns = ns->next)
ns               2545 scripts/mod/modpost.c 			buf_printf(&ns_deps_buf, "%s\n", ns->namespace);
ns                414 security/apparmor/apparmorfs.c 			     loff_t *pos, struct aa_ns *ns)
ns                425 security/apparmor/apparmorfs.c 	error = aa_may_manage_policy(label, ns, mask);
ns                432 security/apparmor/apparmorfs.c 		error = aa_replace_profiles(ns, label, mask, data);
ns                445 security/apparmor/apparmorfs.c 	struct aa_ns *ns = aa_get_ns(f->f_inode->i_private);
ns                446 security/apparmor/apparmorfs.c 	int error = policy_update(AA_MAY_LOAD_POLICY, buf, size, pos, ns);
ns                448 security/apparmor/apparmorfs.c 	aa_put_ns(ns);
ns                462 security/apparmor/apparmorfs.c 	struct aa_ns *ns = aa_get_ns(f->f_inode->i_private);
ns                464 security/apparmor/apparmorfs.c 				  buf, size, pos, ns);
ns                465 security/apparmor/apparmorfs.c 	aa_put_ns(ns);
ns                482 security/apparmor/apparmorfs.c 	struct aa_ns *ns = aa_get_ns(f->f_inode->i_private);
ns                488 security/apparmor/apparmorfs.c 	error = aa_may_manage_policy(label, ns, AA_MAY_REMOVE_POLICY);
ns                501 security/apparmor/apparmorfs.c 		error = aa_remove_profiles(ns, label, data->data, size);
ns                506 security/apparmor/apparmorfs.c 	aa_put_ns(ns);
ns                516 security/apparmor/apparmorfs.c 	struct aa_ns *ns;
ns                526 security/apparmor/apparmorfs.c 		aa_put_ns(rev->ns);
ns                541 security/apparmor/apparmorfs.c 	mutex_lock_nested(&rev->ns->lock, rev->ns->level);
ns                543 security/apparmor/apparmorfs.c 	if (last_read == rev->ns->revision) {
ns                544 security/apparmor/apparmorfs.c 		mutex_unlock(&rev->ns->lock);
ns                547 security/apparmor/apparmorfs.c 		if (wait_event_interruptible(rev->ns->wait,
ns                549 security/apparmor/apparmorfs.c 					     READ_ONCE(rev->ns->revision)))
ns                551 security/apparmor/apparmorfs.c 		mutex_lock_nested(&rev->ns->lock, rev->ns->level);
ns                554 security/apparmor/apparmorfs.c 	avail = sprintf(buffer, "%ld\n", rev->ns->revision);
ns                556 security/apparmor/apparmorfs.c 		rev->last_read = rev->ns->revision;
ns                559 security/apparmor/apparmorfs.c 	mutex_unlock(&rev->ns->lock);
ns                571 security/apparmor/apparmorfs.c 	rev->ns = aa_get_ns(inode->i_private);
ns                572 security/apparmor/apparmorfs.c 	if (!rev->ns)
ns                573 security/apparmor/apparmorfs.c 		rev->ns = aa_get_current_ns();
ns                585 security/apparmor/apparmorfs.c 		mutex_lock_nested(&rev->ns->lock, rev->ns->level);
ns                586 security/apparmor/apparmorfs.c 		poll_wait(file, &rev->ns->wait, pt);
ns                587 security/apparmor/apparmorfs.c 		if (rev->last_read < rev->ns->revision)
ns                589 security/apparmor/apparmorfs.c 		mutex_unlock(&rev->ns->lock);
ns                595 security/apparmor/apparmorfs.c void __aa_bump_ns_revision(struct aa_ns *ns)
ns                597 security/apparmor/apparmorfs.c 	WRITE_ONCE(ns->revision, ns->revision + 1);
ns                598 security/apparmor/apparmorfs.c 	wake_up_interruptible(&ns->wait);
ns               1168 security/apparmor/apparmorfs.c 			if (profile->ns != labels_ns(label)) {
ns               1338 security/apparmor/apparmorfs.c 	AA_BUG(rawdata->ns && !mutex_is_locked(&rawdata->ns->lock));
ns               1340 security/apparmor/apparmorfs.c 	if (rawdata->ns) {
ns               1343 security/apparmor/apparmorfs.c 		aa_put_ns(rawdata->ns);
ns               1344 security/apparmor/apparmorfs.c 		rawdata->ns = NULL;
ns               1348 security/apparmor/apparmorfs.c int __aa_fs_create_rawdata(struct aa_ns *ns, struct aa_loaddata *rawdata)
ns               1352 security/apparmor/apparmorfs.c 	AA_BUG(!ns);
ns               1354 security/apparmor/apparmorfs.c 	AA_BUG(!mutex_is_locked(&ns->lock));
ns               1355 security/apparmor/apparmorfs.c 	AA_BUG(!ns_subdata_dir(ns));
ns               1362 security/apparmor/apparmorfs.c 	rawdata->name = kasprintf(GFP_KERNEL, "%ld", ns->revision);
ns               1366 security/apparmor/apparmorfs.c 	dir = aafs_create_dir(rawdata->name, ns_subdata_dir(ns));
ns               1399 security/apparmor/apparmorfs.c 	rawdata->ns = aa_get_ns(ns);
ns               1400 security/apparmor/apparmorfs.c 	list_add(&rawdata->list, &ns->rawdata_list);
ns               1604 security/apparmor/apparmorfs.c 		id_len = snprintf(NULL, 0, ".%ld", profile->ns->uniq_id);
ns               1613 security/apparmor/apparmorfs.c 		sprintf(profile->dirname + len, ".%ld", profile->ns->uniq_id++);
ns               1692 security/apparmor/apparmorfs.c 	struct aa_ns *ns, *parent;
ns               1721 security/apparmor/apparmorfs.c 	ns = __aa_find_or_create_ns(parent, READ_ONCE(dentry->d_name.name),
ns               1723 security/apparmor/apparmorfs.c 	if (IS_ERR(ns)) {
ns               1724 security/apparmor/apparmorfs.c 		error = PTR_ERR(ns);
ns               1725 security/apparmor/apparmorfs.c 		ns = NULL;
ns               1728 security/apparmor/apparmorfs.c 	aa_put_ns(ns);		/* list ref remains */
ns               1741 security/apparmor/apparmorfs.c 	struct aa_ns *ns, *parent;
ns               1761 security/apparmor/apparmorfs.c 	ns = aa_get_ns(__aa_findn_ns(&parent->sub_ns, dentry->d_name.name,
ns               1763 security/apparmor/apparmorfs.c 	if (!ns) {
ns               1767 security/apparmor/apparmorfs.c 	AA_BUG(ns_dir(ns) != dentry);
ns               1769 security/apparmor/apparmorfs.c 	__aa_remove_ns(ns);
ns               1770 security/apparmor/apparmorfs.c 	aa_put_ns(ns);
ns               1787 security/apparmor/apparmorfs.c static void __aa_fs_list_remove_rawdata(struct aa_ns *ns)
ns               1791 security/apparmor/apparmorfs.c 	AA_BUG(!mutex_is_locked(&ns->lock));
ns               1793 security/apparmor/apparmorfs.c 	list_for_each_entry_safe(ent, tmp, &ns->rawdata_list, list)
ns               1801 security/apparmor/apparmorfs.c void __aafs_ns_rmdir(struct aa_ns *ns)
ns               1807 security/apparmor/apparmorfs.c 	if (!ns)
ns               1809 security/apparmor/apparmorfs.c 	AA_BUG(!mutex_is_locked(&ns->lock));
ns               1811 security/apparmor/apparmorfs.c 	list_for_each_entry(child, &ns->base.profiles, base.list)
ns               1814 security/apparmor/apparmorfs.c 	list_for_each_entry(sub, &ns->sub_ns, base.list) {
ns               1820 security/apparmor/apparmorfs.c 	__aa_fs_list_remove_rawdata(ns);
ns               1822 security/apparmor/apparmorfs.c 	if (ns_subns_dir(ns)) {
ns               1823 security/apparmor/apparmorfs.c 		sub = d_inode(ns_subns_dir(ns))->i_private;
ns               1826 security/apparmor/apparmorfs.c 	if (ns_subload(ns)) {
ns               1827 security/apparmor/apparmorfs.c 		sub = d_inode(ns_subload(ns))->i_private;
ns               1830 security/apparmor/apparmorfs.c 	if (ns_subreplace(ns)) {
ns               1831 security/apparmor/apparmorfs.c 		sub = d_inode(ns_subreplace(ns))->i_private;
ns               1834 security/apparmor/apparmorfs.c 	if (ns_subremove(ns)) {
ns               1835 security/apparmor/apparmorfs.c 		sub = d_inode(ns_subremove(ns))->i_private;
ns               1838 security/apparmor/apparmorfs.c 	if (ns_subrevision(ns)) {
ns               1839 security/apparmor/apparmorfs.c 		sub = d_inode(ns_subrevision(ns))->i_private;
ns               1844 security/apparmor/apparmorfs.c 		aafs_remove(ns->dents[i]);
ns               1845 security/apparmor/apparmorfs.c 		ns->dents[i] = NULL;
ns               1850 security/apparmor/apparmorfs.c static int __aafs_ns_mkdir_entries(struct aa_ns *ns, struct dentry *dir)
ns               1854 security/apparmor/apparmorfs.c 	AA_BUG(!ns);
ns               1860 security/apparmor/apparmorfs.c 	ns_subprofs_dir(ns) = dent;
ns               1865 security/apparmor/apparmorfs.c 	ns_subdata_dir(ns) = dent;
ns               1867 security/apparmor/apparmorfs.c 	dent = aafs_create_file("revision", 0444, dir, ns,
ns               1871 security/apparmor/apparmorfs.c 	aa_get_ns(ns);
ns               1872 security/apparmor/apparmorfs.c 	ns_subrevision(ns) = dent;
ns               1874 security/apparmor/apparmorfs.c 	dent = aafs_create_file(".load", 0640, dir, ns,
ns               1878 security/apparmor/apparmorfs.c 	aa_get_ns(ns);
ns               1879 security/apparmor/apparmorfs.c 	ns_subload(ns) = dent;
ns               1881 security/apparmor/apparmorfs.c 	dent = aafs_create_file(".replace", 0640, dir, ns,
ns               1885 security/apparmor/apparmorfs.c 	aa_get_ns(ns);
ns               1886 security/apparmor/apparmorfs.c 	ns_subreplace(ns) = dent;
ns               1888 security/apparmor/apparmorfs.c 	dent = aafs_create_file(".remove", 0640, dir, ns,
ns               1892 security/apparmor/apparmorfs.c 	aa_get_ns(ns);
ns               1893 security/apparmor/apparmorfs.c 	ns_subremove(ns) = dent;
ns               1896 security/apparmor/apparmorfs.c 	dent = aafs_create("namespaces", S_IFDIR | 0755, dir, ns, NULL, NULL,
ns               1900 security/apparmor/apparmorfs.c 	aa_get_ns(ns);
ns               1901 security/apparmor/apparmorfs.c 	ns_subns_dir(ns) = dent;
ns               1909 security/apparmor/apparmorfs.c int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name,
ns               1917 security/apparmor/apparmorfs.c 	AA_BUG(!ns);
ns               1919 security/apparmor/apparmorfs.c 	AA_BUG(!mutex_is_locked(&ns->lock));
ns               1922 security/apparmor/apparmorfs.c 		name = ns->base.name;
ns               1931 security/apparmor/apparmorfs.c 	ns_dir(ns) = dir = dent;
ns               1932 security/apparmor/apparmorfs.c 	error = __aafs_ns_mkdir_entries(ns, dir);
ns               1937 security/apparmor/apparmorfs.c 	list_for_each_entry(child, &ns->base.profiles, base.list) {
ns               1938 security/apparmor/apparmorfs.c 		error = __aafs_profile_mkdir(child, ns_subprofs_dir(ns));
ns               1944 security/apparmor/apparmorfs.c 	list_for_each_entry(sub, &ns->sub_ns, base.list) {
ns               1946 security/apparmor/apparmorfs.c 		error = __aafs_ns_mkdir(sub, ns_subns_dir(ns), NULL, NULL);
ns               1958 security/apparmor/apparmorfs.c 	__aafs_ns_rmdir(ns);
ns               1978 security/apparmor/apparmorfs.c static struct aa_ns *__next_ns(struct aa_ns *root, struct aa_ns *ns)
ns               1983 security/apparmor/apparmorfs.c 	AA_BUG(!ns);
ns               1984 security/apparmor/apparmorfs.c 	AA_BUG(ns != root && !mutex_is_locked(&ns->parent->lock));
ns               1987 security/apparmor/apparmorfs.c 	if (!list_empty(&ns->sub_ns)) {
ns               1988 security/apparmor/apparmorfs.c 		next = list_first_entry(&ns->sub_ns, typeof(*ns), base.list);
ns               1994 security/apparmor/apparmorfs.c 	parent = ns->parent;
ns               1995 security/apparmor/apparmorfs.c 	while (ns != root) {
ns               1996 security/apparmor/apparmorfs.c 		mutex_unlock(&ns->lock);
ns               1997 security/apparmor/apparmorfs.c 		next = list_next_entry(ns, base.list);
ns               2002 security/apparmor/apparmorfs.c 		ns = parent;
ns               2018 security/apparmor/apparmorfs.c 					  struct aa_ns *ns)
ns               2021 security/apparmor/apparmorfs.c 	AA_BUG(ns && !mutex_is_locked(&ns->lock));
ns               2023 security/apparmor/apparmorfs.c 	for (; ns; ns = __next_ns(root, ns)) {
ns               2024 security/apparmor/apparmorfs.c 		if (!list_empty(&ns->base.profiles))
ns               2025 security/apparmor/apparmorfs.c 			return list_first_entry(&ns->base.profiles,
ns               2043 security/apparmor/apparmorfs.c 	struct aa_ns *ns = p->ns;
ns               2054 security/apparmor/apparmorfs.c 					   mutex_is_locked(&p->ns->lock));
ns               2061 security/apparmor/apparmorfs.c 					    mutex_is_locked(&parent->ns->lock));
ns               2066 security/apparmor/apparmorfs.c 	if (!list_entry_is_head(p, &ns->base.profiles, base.list))
ns               2087 security/apparmor/apparmorfs.c 	return __first_profile(root, __next_ns(root, profile->ns));
ns               2130 security/apparmor/apparmorfs.c 	struct aa_ns *ns = f->private;
ns               2133 security/apparmor/apparmorfs.c 	return next_profile(ns, profile);
ns               2146 security/apparmor/apparmorfs.c 	struct aa_ns *root = f->private, *ns;
ns               2149 security/apparmor/apparmorfs.c 		for (ns = profile->ns; ns && ns != root; ns = ns->parent)
ns               2150 security/apparmor/apparmorfs.c 			mutex_unlock(&ns->lock);
ns               2457 security/apparmor/apparmorfs.c 	struct aa_ns *ns;
ns               2462 security/apparmor/apparmorfs.c 	ns = aa_get_current_ns();
ns               2464 security/apparmor/apparmorfs.c 	path.dentry = dget(ns_dir(ns));
ns               2466 security/apparmor/apparmorfs.c 	aa_put_ns(ns);
ns                 82 security/apparmor/audit.c 			if (profile->ns != root_ns) {
ns                 85 security/apparmor/audit.c 						       profile->ns->base.hname);
ns                105 security/apparmor/domain.c 	if (profile->ns == tp->ns)
ns                109 security/apparmor/domain.c 	ns_name = aa_ns_name(profile->ns, tp->ns, true);
ns                143 security/apparmor/domain.c 		if (!aa_ns_visible(profile->ns, tp->ns, subns))
ns                157 security/apparmor/domain.c 		if (!aa_ns_visible(profile->ns, tp->ns, subns))
ns                205 security/apparmor/domain.c 		if (!aa_ns_visible(profile->ns, tp->ns, subns))
ns                221 security/apparmor/domain.c 		if (!aa_ns_visible(profile->ns, tp->ns, subns))
ns                382 security/apparmor/domain.c 				    struct aa_ns *ns, struct list_head *head,
ns                396 security/apparmor/domain.c 		    &profile->label == ns_unconfined(profile->ns))
ns                425 security/apparmor/domain.c 					long rev = READ_ONCE(ns->revision);
ns                435 security/apparmor/domain.c 					    READ_ONCE(ns->revision))
ns                557 security/apparmor/domain.c 	struct aa_ns *ns = profile->ns;
ns                579 security/apparmor/domain.c 			new = find_attach(bprm, ns, &profile->base.profiles,
ns                583 security/apparmor/domain.c 			new = find_attach(bprm, ns, &ns->base.profiles,
ns                598 security/apparmor/domain.c 			new = aa_get_newest_label(ns_unconfined(profile->ns));
ns                649 security/apparmor/domain.c 		new = find_attach(bprm, profile->ns,
ns                650 security/apparmor/domain.c 				  &profile->ns->base.profiles, name, &info);
ns                107 security/apparmor/include/apparmorfs.h void __aa_bump_ns_revision(struct aa_ns *ns);
ns                112 security/apparmor/include/apparmorfs.h void __aafs_ns_rmdir(struct aa_ns *ns);
ns                113 security/apparmor/include/apparmorfs.h int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name,
ns                118 security/apparmor/include/apparmorfs.h int __aa_fs_create_rawdata(struct aa_ns *ns, struct aa_loaddata *rawdata);
ns                143 security/apparmor/include/audit.h 			const char *ns;
ns                179 security/apparmor/include/cred.h 	struct aa_ns *ns;
ns                182 security/apparmor/include/cred.h 	ns = aa_get_ns(labels_ns(label));
ns                185 security/apparmor/include/cred.h 	return ns;
ns                 52 security/apparmor/include/label.h #define vec_ns(VEC, SIZE) (vec_last((VEC), (SIZE))->ns)
ns                209 security/apparmor/include/label.h 	while ((L)->vec[___i] && (L)->vec[___i]->ns != (NS))		\
ns                276 security/apparmor/include/label.h void __aa_labelset_update_subtree(struct aa_ns *ns);
ns                303 security/apparmor/include/label.h bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp);
ns                312 security/apparmor/include/label.h int aa_label_asxprint(char **strp, struct aa_ns *ns, struct aa_label *label,
ns                314 security/apparmor/include/label.h int aa_label_acntsxprint(char __counted **strp, struct aa_ns *ns,
ns                316 security/apparmor/include/label.h void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns,
ns                318 security/apparmor/include/label.h void aa_label_seq_xprint(struct seq_file *f, struct aa_ns *ns,
ns                320 security/apparmor/include/label.h void aa_label_xprintk(struct aa_ns *ns, struct aa_label *label, int flags,
ns                275 security/apparmor/include/lib.h 	if ((P)->ns != (NS))						\
ns                110 security/apparmor/include/perms.h 	if (P1->ns == P2->ns)					\
ns                133 security/apparmor/include/policy.h 	struct aa_ns *ns;
ns                171 security/apparmor/include/policy.h #define profiles_ns(P) ((P)->ns)
ns                185 security/apparmor/include/policy.h struct aa_profile *aa_lookupn_profile(struct aa_ns *ns, const char *hname,
ns                187 security/apparmor/include/policy.h struct aa_profile *aa_lookup_profile(struct aa_ns *ns, const char *name);
ns                190 security/apparmor/include/policy.h struct aa_profile *aa_match_profile(struct aa_ns *ns, const char *name);
ns                304 security/apparmor/include/policy.h bool policy_view_capable(struct aa_ns *ns);
ns                305 security/apparmor/include/policy.h bool policy_admin_capable(struct aa_ns *ns);
ns                306 security/apparmor/include/policy.h int aa_may_manage_policy(struct aa_label *label, struct aa_ns *ns,
ns                 85 security/apparmor/include/policy_ns.h void aa_free_ns(struct aa_ns *ns);
ns                 97 security/apparmor/include/policy_ns.h void __aa_remove_ns(struct aa_ns *ns);
ns                102 security/apparmor/include/policy_ns.h 					 mutex_is_locked(&p->ns->lock));
ns                112 security/apparmor/include/policy_ns.h static inline struct aa_ns *aa_get_ns(struct aa_ns *ns)
ns                114 security/apparmor/include/policy_ns.h 	if (ns)
ns                115 security/apparmor/include/policy_ns.h 		aa_get_profile(ns->unconfined);
ns                117 security/apparmor/include/policy_ns.h 	return ns;
ns                126 security/apparmor/include/policy_ns.h static inline void aa_put_ns(struct aa_ns *ns)
ns                128 security/apparmor/include/policy_ns.h 	if (ns)
ns                129 security/apparmor/include/policy_ns.h 		aa_put_profile(ns->unconfined);
ns                 62 security/apparmor/include/policy_unpack.h 	struct aa_ns *ns;
ns                 72 security/apparmor/include/policy_unpack.h int aa_unpack(struct aa_loaddata *udata, struct list_head *lh, const char **ns);
ns                141 security/apparmor/label.c 	AA_BUG(!a->ns);
ns                142 security/apparmor/label.c 	AA_BUG(!b->ns);
ns                148 security/apparmor/label.c 	res = ns_cmp(a->ns, b->ns);
ns                375 security/apparmor/label.c 	struct aa_ns *ns = labels_ns(label);
ns                377 security/apparmor/label.c 	if (!ns) {
ns               1233 security/apparmor/label.c 	return aa_ns_visible(profile->ns, labels_ns(label), true);
ns               1247 security/apparmor/label.c 	if (profile->ns == tp->ns)
ns               1251 security/apparmor/label.c 	ns_name = aa_ns_name(profile->ns, tp->ns, true);
ns               1283 security/apparmor/label.c 		if (!aa_ns_visible(profile->ns, tp->ns, subns))
ns               1297 security/apparmor/label.c 		if (!aa_ns_visible(profile->ns, tp->ns, subns))
ns               1343 security/apparmor/label.c 		if (!aa_ns_visible(profile->ns, tp->ns, subns))
ns               1359 security/apparmor/label.c 		if (!aa_ns_visible(profile->ns, tp->ns, subns))
ns               1416 security/apparmor/label.c bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp)
ns               1423 security/apparmor/label.c 	AA_BUG(!ns);
ns               1426 security/apparmor/label.c 	if (label->hname || labels_ns(label) != ns)
ns               1429 security/apparmor/label.c 	if (aa_label_acntsxprint(&name, ns, label, FLAGS_NONE, gfp) == -1)
ns               1448 security/apparmor/label.c static inline bool use_label_hname(struct aa_ns *ns, struct aa_label *label,
ns               1451 security/apparmor/label.c 	if (label->hname && (!ns || labels_ns(label) == ns) &&
ns               1496 security/apparmor/label.c 	if (view != profile->ns &&
ns               1497 security/apparmor/label.c 	    (!prev_ns || (*prev_ns != profile->ns))) {
ns               1499 security/apparmor/label.c 			*prev_ns = profile->ns;
ns               1500 security/apparmor/label.c 		ns_name = aa_ns_name(view, profile->ns,
ns               1509 security/apparmor/label.c 	if ((flags & FLAG_SHOW_MODE) && profile != profile->ns->unconfined) {
ns               1525 security/apparmor/label.c static const char *label_modename(struct aa_ns *ns, struct aa_label *label,
ns               1533 security/apparmor/label.c 		if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) {
ns               1558 security/apparmor/label.c static inline bool display_mode(struct aa_ns *ns, struct aa_label *label,
ns               1566 security/apparmor/label.c 			if (aa_ns_visible(ns, profile->ns,
ns               1568 security/apparmor/label.c 			    profile != profile->ns->unconfined)
ns               1595 security/apparmor/label.c int aa_label_snxprint(char *str, size_t size, struct aa_ns *ns,
ns               1608 security/apparmor/label.c 		ns = root_ns;
ns               1611 security/apparmor/label.c 	} else if (!ns) {
ns               1612 security/apparmor/label.c 		ns = labels_ns(label);
ns               1616 security/apparmor/label.c 		if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) {
ns               1621 security/apparmor/label.c 			len = aa_profile_snxprint(str, size, ns, profile,
ns               1638 security/apparmor/label.c 	if (display_mode(ns, label, flags)) {
ns               1640 security/apparmor/label.c 			       label_modename(ns, label, flags));
ns               1659 security/apparmor/label.c int aa_label_asxprint(char **strp, struct aa_ns *ns, struct aa_label *label,
ns               1667 security/apparmor/label.c 	size = aa_label_snxprint(NULL, 0, ns, label, flags);
ns               1674 security/apparmor/label.c 	return aa_label_snxprint(*strp, size + 1, ns, label, flags);
ns               1688 security/apparmor/label.c int aa_label_acntsxprint(char __counted **strp, struct aa_ns *ns,
ns               1696 security/apparmor/label.c 	size = aa_label_snxprint(NULL, 0, ns, label, flags);
ns               1703 security/apparmor/label.c 	return aa_label_snxprint(*strp, size + 1, ns, label, flags);
ns               1707 security/apparmor/label.c void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns,
ns               1717 security/apparmor/label.c 	if (!use_label_hname(ns, label, flags) ||
ns               1718 security/apparmor/label.c 	    display_mode(ns, label, flags)) {
ns               1719 security/apparmor/label.c 		len  = aa_label_asxprint(&name, ns, label, flags, gfp);
ns               1737 security/apparmor/label.c void aa_label_seq_xprint(struct seq_file *f, struct aa_ns *ns,
ns               1743 security/apparmor/label.c 	if (!use_label_hname(ns, label, flags)) {
ns               1747 security/apparmor/label.c 		len = aa_label_asxprint(&str, ns, label, flags, gfp);
ns               1754 security/apparmor/label.c 	} else if (display_mode(ns, label, flags))
ns               1756 security/apparmor/label.c 			   label_modename(ns, label, flags));
ns               1761 security/apparmor/label.c void aa_label_xprintk(struct aa_ns *ns, struct aa_label *label, int flags,
ns               1766 security/apparmor/label.c 	if (!use_label_hname(ns, label, flags)) {
ns               1770 security/apparmor/label.c 		len = aa_label_asxprint(&str, ns, label, flags, gfp);
ns               1777 security/apparmor/label.c 	} else if (display_mode(ns, label, flags))
ns               1779 security/apparmor/label.c 		       label_modename(ns, label, flags));
ns               1786 security/apparmor/label.c 	struct aa_ns *ns = aa_get_current_ns();
ns               1788 security/apparmor/label.c 	aa_label_xaudit(ab, ns, label, FLAG_VIEW_SUBNS, gfp);
ns               1789 security/apparmor/label.c 	aa_put_ns(ns);
ns               1794 security/apparmor/label.c 	struct aa_ns *ns = aa_get_current_ns();
ns               1796 security/apparmor/label.c 	aa_label_seq_xprint(f, ns, label, FLAG_VIEW_SUBNS, gfp);
ns               1797 security/apparmor/label.c 	aa_put_ns(ns);
ns               1802 security/apparmor/label.c 	struct aa_ns *ns = aa_get_current_ns();
ns               1804 security/apparmor/label.c 	aa_label_xprintk(ns, label, FLAG_VIEW_SUBNS, gfp);
ns               1805 security/apparmor/label.c 	aa_put_ns(ns);
ns               1899 security/apparmor/label.c 		if (vec[i]->ns != labels_ns(currbase))
ns               2093 security/apparmor/label.c static void __labelset_update(struct aa_ns *ns)
ns               2097 security/apparmor/label.c 	AA_BUG(!ns);
ns               2098 security/apparmor/label.c 	AA_BUG(!mutex_is_locked(&ns->lock));
ns               2101 security/apparmor/label.c 		label = labelset_next_stale(&ns->labels);
ns               2119 security/apparmor/label.c void __aa_labelset_update_subtree(struct aa_ns *ns)
ns               2123 security/apparmor/label.c 	AA_BUG(!ns);
ns               2124 security/apparmor/label.c 	AA_BUG(!mutex_is_locked(&ns->lock));
ns               2126 security/apparmor/label.c 	__labelset_update(ns);
ns               2128 security/apparmor/label.c 	list_for_each_entry(child, &ns->sub_ns, base.list) {
ns                170 security/apparmor/lsm.c static int apparmor_capable(const struct cred *cred, struct user_namespace *ns,
ns                835 security/apparmor/lsm.c 		struct aa_ns *ns = aa_get_current_ns();
ns                837 security/apparmor/lsm.c 		label = aa_get_label(ns_unconfined(ns));
ns                838 security/apparmor/lsm.c 		aa_put_ns(ns);
ns                115 security/apparmor/policy.c 	AA_BUG(!profile->ns);
ns                116 security/apparmor/policy.c 	AA_BUG(!mutex_is_locked(&profile->ns->lock));
ns                121 security/apparmor/policy.c 	l = aa_label_insert(&profile->ns->labels, &profile->label);
ns                141 security/apparmor/policy.c 	AA_BUG(!profile->ns);
ns                142 security/apparmor/policy.c 	AA_BUG(!mutex_is_locked(&profile->ns->lock));
ns                157 security/apparmor/policy.c 	AA_BUG(!profile->ns);
ns                158 security/apparmor/policy.c 	AA_BUG(!mutex_is_locked(&profile->ns->lock));
ns                219 security/apparmor/policy.c 	aa_put_ns(profile->ns);
ns                360 security/apparmor/policy.c static struct aa_policy *__lookup_parent(struct aa_ns *ns,
ns                367 security/apparmor/policy.c 	policy = &ns->base;
ns                379 security/apparmor/policy.c 		return &ns->base;
ns                432 security/apparmor/policy.c struct aa_profile *aa_lookupn_profile(struct aa_ns *ns, const char *hname,
ns                439 security/apparmor/policy.c 		profile = __lookupn_profile(&ns->base, hname, n);
ns                445 security/apparmor/policy.c 		profile = aa_get_newest_profile(ns->unconfined);
ns                451 security/apparmor/policy.c struct aa_profile *aa_lookup_profile(struct aa_ns *ns, const char *hname)
ns                453 security/apparmor/policy.c 	return aa_lookupn_profile(ns, hname, strlen(hname));
ns                460 security/apparmor/policy.c 	struct aa_ns *ns;
ns                466 security/apparmor/policy.c 		ns = aa_lookupn_ns(labels_ns(base), ns_name, ns_len);
ns                467 security/apparmor/policy.c 		if (!ns)
ns                470 security/apparmor/policy.c 		ns = aa_get_ns(labels_ns(base));
ns                473 security/apparmor/policy.c 		profile = aa_lookupn_profile(ns, name, n - (name - fqname));
ns                474 security/apparmor/policy.c 	else if (ns)
ns                476 security/apparmor/policy.c 		profile = aa_get_newest_profile(ns->unconfined);
ns                479 security/apparmor/policy.c 	aa_put_ns(ns);
ns                525 security/apparmor/policy.c 		atomic_inc_return(&parent->ns->uniq_null));
ns                546 security/apparmor/policy.c 	profile->ns = aa_get_ns(parent->ns);
ns                550 security/apparmor/policy.c 	mutex_lock_nested(&profile->ns->lock, profile->ns->level);
ns                558 security/apparmor/policy.c 	mutex_unlock(&profile->ns->lock);
ns                600 security/apparmor/policy.c 	if (aad(sa)->iface.ns) {
ns                602 security/apparmor/policy.c 		audit_log_untrustedstring(ab, aad(sa)->iface.ns);
ns                623 security/apparmor/policy.c 	aad(&sa)->iface.ns = ns_name;
ns                642 security/apparmor/policy.c bool policy_view_capable(struct aa_ns *ns)
ns                649 security/apparmor/policy.c 	if (!ns)
ns                650 security/apparmor/policy.c 		ns = view_ns;
ns                652 security/apparmor/policy.c 	if (root_in_user_ns && aa_ns_visible(view_ns, ns, true) &&
ns                662 security/apparmor/policy.c bool policy_admin_capable(struct aa_ns *ns)
ns                670 security/apparmor/policy.c 	return policy_view_capable(ns) && capable && !aa_g_lock_policy;
ns                680 security/apparmor/policy.c int aa_may_manage_policy(struct aa_label *label, struct aa_ns *ns, u32 mask)
ns                696 security/apparmor/policy.c 	if (!policy_admin_capable(ns))
ns                796 security/apparmor/policy.c static int __lookup_replace(struct aa_ns *ns, const char *hname,
ns                800 security/apparmor/policy.c 	*p = aa_get_profile(__lookup_profile(&ns->base, hname));
ns                829 security/apparmor/policy.c 					   mutex_is_locked(&new->ns->lock));
ns                860 security/apparmor/policy.c 	struct aa_ns *ns = NULL;
ns                899 security/apparmor/policy.c 		ns = aa_prepare_ns(policy_ns ? policy_ns : labels_ns(label),
ns                901 security/apparmor/policy.c 		if (IS_ERR(ns)) {
ns                904 security/apparmor/policy.c 			error = PTR_ERR(ns);
ns                905 security/apparmor/policy.c 			ns = NULL;
ns                910 security/apparmor/policy.c 		ns = aa_get_ns(policy_ns ? policy_ns : labels_ns(label));
ns                912 security/apparmor/policy.c 	mutex_lock_nested(&ns->lock, ns->level);
ns                914 security/apparmor/policy.c 	list_for_each_entry(rawdata_ent, &ns->rawdata_list, list) {
ns                932 security/apparmor/policy.c 		error = __lookup_replace(ns, ent->new->base.hname,
ns                939 security/apparmor/policy.c 			error = __lookup_replace(ns, ent->new->rename,
ns                947 security/apparmor/policy.c 		ent->new->ns = aa_get_ns(ns);
ns                953 security/apparmor/policy.c 		policy = __lookup_parent(ns, ent->new->base.hname);
ns                963 security/apparmor/policy.c 		} else if (policy != &ns->base) {
ns                972 security/apparmor/policy.c 		error = __aa_fs_create_rawdata(ns, udata);
ns                987 security/apparmor/policy.c 				parent = ns_subprofs_dir(ent->new->ns);
ns                998 security/apparmor/policy.c 	__aa_bump_ns_revision(ns);
ns                999 security/apparmor/policy.c 	__aa_loaddata_update(udata, ns->revision);
ns               1034 security/apparmor/policy.c 				lh = &ns->base.profiles;
ns               1040 security/apparmor/policy.c 	__aa_labelset_update_subtree(ns);
ns               1041 security/apparmor/policy.c 	mutex_unlock(&ns->lock);
ns               1044 security/apparmor/policy.c 	aa_put_ns(ns);
ns               1052 security/apparmor/policy.c 	mutex_unlock(&ns->lock);
ns               1096 security/apparmor/policy.c 	struct aa_ns *ns = NULL;
ns               1113 security/apparmor/policy.c 		ns = aa_lookupn_ns(policy_ns ? policy_ns : labels_ns(subj),
ns               1115 security/apparmor/policy.c 		if (!ns) {
ns               1122 security/apparmor/policy.c 		ns = aa_get_ns(policy_ns ? policy_ns : labels_ns(subj));
ns               1126 security/apparmor/policy.c 		mutex_lock_nested(&ns->parent->lock, ns->level);
ns               1127 security/apparmor/policy.c 		__aa_bump_ns_revision(ns);
ns               1128 security/apparmor/policy.c 		__aa_remove_ns(ns);
ns               1129 security/apparmor/policy.c 		mutex_unlock(&ns->parent->lock);
ns               1132 security/apparmor/policy.c 		mutex_lock_nested(&ns->lock, ns->level);
ns               1133 security/apparmor/policy.c 		profile = aa_get_profile(__lookup_profile(&ns->base, name));
ns               1140 security/apparmor/policy.c 		__aa_bump_ns_revision(ns);
ns               1142 security/apparmor/policy.c 		__aa_labelset_update_subtree(ns);
ns               1143 security/apparmor/policy.c 		mutex_unlock(&ns->lock);
ns               1149 security/apparmor/policy.c 	aa_put_ns(ns);
ns               1154 security/apparmor/policy.c 	mutex_unlock(&ns->lock);
ns               1155 security/apparmor/policy.c 	aa_put_ns(ns);
ns                 89 security/apparmor/policy_ns.c 	struct aa_ns *ns;
ns                 91 security/apparmor/policy_ns.c 	ns = kzalloc(sizeof(*ns), GFP_KERNEL);
ns                 92 security/apparmor/policy_ns.c 	AA_DEBUG("%s(%p)\n", __func__, ns);
ns                 93 security/apparmor/policy_ns.c 	if (!ns)
ns                 95 security/apparmor/policy_ns.c 	if (!aa_policy_init(&ns->base, prefix, name, GFP_KERNEL))
ns                 98 security/apparmor/policy_ns.c 	INIT_LIST_HEAD(&ns->sub_ns);
ns                 99 security/apparmor/policy_ns.c 	INIT_LIST_HEAD(&ns->rawdata_list);
ns                100 security/apparmor/policy_ns.c 	mutex_init(&ns->lock);
ns                101 security/apparmor/policy_ns.c 	init_waitqueue_head(&ns->wait);
ns                104 security/apparmor/policy_ns.c 	ns->unconfined = aa_alloc_profile("unconfined", NULL, GFP_KERNEL);
ns                105 security/apparmor/policy_ns.c 	if (!ns->unconfined)
ns                108 security/apparmor/policy_ns.c 	ns->unconfined->label.flags |= FLAG_IX_ON_NAME_ERROR |
ns                110 security/apparmor/policy_ns.c 	ns->unconfined->mode = APPARMOR_UNCONFINED;
ns                111 security/apparmor/policy_ns.c 	ns->unconfined->file.dfa = aa_get_dfa(nulldfa);
ns                112 security/apparmor/policy_ns.c 	ns->unconfined->policy.dfa = aa_get_dfa(nulldfa);
ns                115 security/apparmor/policy_ns.c 	ns->unconfined->ns = ns;
ns                117 security/apparmor/policy_ns.c 	atomic_set(&ns->uniq_null, 0);
ns                119 security/apparmor/policy_ns.c 	aa_labelset_init(&ns->labels);
ns                121 security/apparmor/policy_ns.c 	return ns;
ns                124 security/apparmor/policy_ns.c 	kzfree(ns->base.hname);
ns                126 security/apparmor/policy_ns.c 	kzfree(ns);
ns                137 security/apparmor/policy_ns.c void aa_free_ns(struct aa_ns *ns)
ns                139 security/apparmor/policy_ns.c 	if (!ns)
ns                142 security/apparmor/policy_ns.c 	aa_policy_destroy(&ns->base);
ns                143 security/apparmor/policy_ns.c 	aa_labelset_destroy(&ns->labels);
ns                144 security/apparmor/policy_ns.c 	aa_put_ns(ns->parent);
ns                146 security/apparmor/policy_ns.c 	ns->unconfined->ns = NULL;
ns                147 security/apparmor/policy_ns.c 	aa_free_profile(ns->unconfined);
ns                148 security/apparmor/policy_ns.c 	kzfree(ns);
ns                164 security/apparmor/policy_ns.c 	struct aa_ns *ns = NULL;
ns                167 security/apparmor/policy_ns.c 	ns = aa_get_ns(__aa_findn_ns(&root->sub_ns, name, n));
ns                170 security/apparmor/policy_ns.c 	return ns;
ns                202 security/apparmor/policy_ns.c 	struct aa_ns *ns = view;
ns                207 security/apparmor/policy_ns.c 		ns = __aa_findn_ns(&ns->sub_ns, hname, split - hname);
ns                208 security/apparmor/policy_ns.c 		if (!ns)
ns                216 security/apparmor/policy_ns.c 		return __aa_findn_ns(&ns->sub_ns, hname, n);
ns                233 security/apparmor/policy_ns.c 	struct aa_ns *ns = NULL;
ns                236 security/apparmor/policy_ns.c 	ns = aa_get_ns(__aa_lookupn_ns(view, name, n));
ns                239 security/apparmor/policy_ns.c 	return ns;
ns                245 security/apparmor/policy_ns.c 	struct aa_ns *ns;
ns                252 security/apparmor/policy_ns.c 	ns = alloc_ns(parent->base.hname, name);
ns                253 security/apparmor/policy_ns.c 	if (!ns)
ns                255 security/apparmor/policy_ns.c 	ns->level = parent->level + 1;
ns                256 security/apparmor/policy_ns.c 	mutex_lock_nested(&ns->lock, ns->level);
ns                257 security/apparmor/policy_ns.c 	error = __aafs_ns_mkdir(ns, ns_subns_dir(parent), name, dir);
ns                260 security/apparmor/policy_ns.c 			 ns->base.name);
ns                261 security/apparmor/policy_ns.c 		mutex_unlock(&ns->lock);
ns                262 security/apparmor/policy_ns.c 		aa_free_ns(ns);
ns                265 security/apparmor/policy_ns.c 	ns->parent = aa_get_ns(parent);
ns                266 security/apparmor/policy_ns.c 	list_add_rcu(&ns->base.list, &parent->sub_ns);
ns                268 security/apparmor/policy_ns.c 	aa_get_ns(ns);
ns                269 security/apparmor/policy_ns.c 	mutex_unlock(&ns->lock);
ns                271 security/apparmor/policy_ns.c 	return ns;
ns                285 security/apparmor/policy_ns.c 	struct aa_ns *ns;
ns                291 security/apparmor/policy_ns.c 	ns = aa_get_ns(__aa_find_ns(&parent->sub_ns, name));
ns                292 security/apparmor/policy_ns.c 	if (!ns)
ns                293 security/apparmor/policy_ns.c 		ns = __aa_create_ns(parent, name, dir);
ns                295 security/apparmor/policy_ns.c 		ns = ERR_PTR(-EEXIST);
ns                298 security/apparmor/policy_ns.c 	return ns;
ns                310 security/apparmor/policy_ns.c 	struct aa_ns *ns;
ns                315 security/apparmor/policy_ns.c 	ns = aa_get_ns(__aa_find_ns(&parent->sub_ns, name));
ns                316 security/apparmor/policy_ns.c 	if (!ns)
ns                317 security/apparmor/policy_ns.c 		ns = __aa_create_ns(parent, name, NULL);
ns                321 security/apparmor/policy_ns.c 	return ns;
ns                330 security/apparmor/policy_ns.c static void destroy_ns(struct aa_ns *ns)
ns                332 security/apparmor/policy_ns.c 	if (!ns)
ns                335 security/apparmor/policy_ns.c 	mutex_lock_nested(&ns->lock, ns->level);
ns                337 security/apparmor/policy_ns.c 	__aa_profile_list_release(&ns->base.profiles);
ns                340 security/apparmor/policy_ns.c 	__ns_list_release(&ns->sub_ns);
ns                342 security/apparmor/policy_ns.c 	if (ns->parent) {
ns                345 security/apparmor/policy_ns.c 		write_lock_irqsave(&ns->labels.lock, flags);
ns                346 security/apparmor/policy_ns.c 		__aa_proxy_redirect(ns_unconfined(ns),
ns                347 security/apparmor/policy_ns.c 				    ns_unconfined(ns->parent));
ns                348 security/apparmor/policy_ns.c 		write_unlock_irqrestore(&ns->labels.lock, flags);
ns                350 security/apparmor/policy_ns.c 	__aafs_ns_rmdir(ns);
ns                351 security/apparmor/policy_ns.c 	mutex_unlock(&ns->lock);
ns                360 security/apparmor/policy_ns.c void __aa_remove_ns(struct aa_ns *ns)
ns                363 security/apparmor/policy_ns.c 	list_del_rcu(&ns->base.list);
ns                364 security/apparmor/policy_ns.c 	destroy_ns(ns);
ns                365 security/apparmor/policy_ns.c 	aa_put_ns(ns);
ns                376 security/apparmor/policy_ns.c 	struct aa_ns *ns, *tmp;
ns                378 security/apparmor/policy_ns.c 	list_for_each_entry_safe(ns, tmp, head, base.list)
ns                379 security/apparmor/policy_ns.c 		__aa_remove_ns(ns);
ns                404 security/apparmor/policy_ns.c 	 struct aa_ns *ns = root_ns;
ns                408 security/apparmor/policy_ns.c 	 destroy_ns(ns);
ns                409 security/apparmor/policy_ns.c 	 aa_put_ns(ns);
ns                 81 security/apparmor/policy_unpack.c 	if (aad(sa)->iface.ns) {
ns                 83 security/apparmor/policy_unpack.c 		audit_log_untrustedstring(ab, aad(sa)->iface.ns);
ns                112 security/apparmor/policy_unpack.c 	aad(&sa)->iface.ns = ns_name;
ns                126 security/apparmor/policy_unpack.c 	AA_BUG(!data->ns);
ns                128 security/apparmor/policy_unpack.c 	AA_BUG(!mutex_is_locked(&data->ns->lock));
ns                154 security/apparmor/policy_unpack.c 	struct aa_ns *ns = aa_get_ns(d->ns);
ns                156 security/apparmor/policy_unpack.c 	if (ns) {
ns                157 security/apparmor/policy_unpack.c 		mutex_lock_nested(&ns->lock, ns->level);
ns                159 security/apparmor/policy_unpack.c 		mutex_unlock(&ns->lock);
ns                160 security/apparmor/policy_unpack.c 		aa_put_ns(ns);
ns                939 security/apparmor/policy_unpack.c static int verify_header(struct aa_ext *e, int required, const char **ns)
ns                943 security/apparmor/policy_unpack.c 	*ns = NULL;
ns                971 security/apparmor/policy_unpack.c 		if (*ns && strcmp(*ns, name))
ns                974 security/apparmor/policy_unpack.c 		else if (!*ns)
ns                975 security/apparmor/policy_unpack.c 			*ns = name;
ns               1055 security/apparmor/policy_unpack.c 	      const char **ns)
ns               1066 security/apparmor/policy_unpack.c 	*ns = NULL;
ns               1070 security/apparmor/policy_unpack.c 		error = verify_header(&e, e.pos == e.start, ns);
ns                 35 security/apparmor/procattr.c 	struct aa_ns *ns = labels_ns(label);
ns                 39 security/apparmor/procattr.c 	if (!aa_ns_visible(current_ns, ns, true)) {
ns                 68 security/commoncap.c 	struct user_namespace *ns = targ_ns;
ns                 76 security/commoncap.c 		if (ns == cred->user_ns)
ns                 83 security/commoncap.c 		if (ns->level <= cred->user_ns->level)
ns                 90 security/commoncap.c 		if ((ns->parent == cred->user_ns) && uid_eq(ns->owner, cred->euid))
ns                 97 security/commoncap.c 		ns = ns->parent;
ns                324 security/commoncap.c 	struct user_namespace *ns;
ns                329 security/commoncap.c 	for (ns = current_user_ns(); ; ns = ns->parent) {
ns                330 security/commoncap.c 		if (from_kuid(ns, kroot) == 0)
ns                332 security/commoncap.c 		if (ns == &init_user_ns)
ns                 57 security/keys/keyring.c void key_free_user_ns(struct user_namespace *ns)
ns                 60 security/keys/keyring.c 	list_del_init(&ns->keyring_name_list);
ns                 63 security/keys/keyring.c 	key_put(ns->user_keyring_register);
ns                 65 security/keys/keyring.c 	key_put(ns->persistent_keyring_register);
ns                109 security/keys/keyring.c 	struct user_namespace *ns = current_user_ns();
ns                115 security/keys/keyring.c 		list_add_tail(&keyring->name_link, &ns->keyring_name_list);
ns               1141 security/keys/keyring.c 	struct user_namespace *ns = current_user_ns();
ns               1152 security/keys/keyring.c 	list_for_each_entry(keyring, &ns->keyring_name_list, name_link) {
ns               1153 security/keys/keyring.c 		if (!kuid_has_mapping(ns, keyring->user->uid))
ns                 20 security/keys/persistent.c static int key_create_persistent_register(struct user_namespace *ns)
ns                 31 security/keys/persistent.c 	ns->persistent_keyring_register = reg;
ns                 40 security/keys/persistent.c static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid,
ns                 46 security/keys/persistent.c 	if (!ns->persistent_keyring_register) {
ns                 47 security/keys/persistent.c 		long err = key_create_persistent_register(ns);
ns                 51 security/keys/persistent.c 		reg_ref = make_key_ref(ns->persistent_keyring_register, true);
ns                 62 security/keys/persistent.c 				   ns->persistent_keyring_register);
ns                 73 security/keys/persistent.c static long key_get_persistent(struct user_namespace *ns, kuid_t uid,
ns                 86 security/keys/persistent.c 	index_key.desc_len = sprintf(buf, "_persistent.%u", from_kuid(ns, uid));
ns                 89 security/keys/persistent.c 	if (ns->persistent_keyring_register) {
ns                 90 security/keys/persistent.c 		reg_ref = make_key_ref(ns->persistent_keyring_register, true);
ns                 91 security/keys/persistent.c 		down_read(&ns->keyring_sem);
ns                 93 security/keys/persistent.c 		up_read(&ns->keyring_sem);
ns                102 security/keys/persistent.c 	down_write(&ns->keyring_sem);
ns                103 security/keys/persistent.c 	persistent_ref = key_create_persistent(ns, uid, &index_key);
ns                104 security/keys/persistent.c 	up_write(&ns->keyring_sem);
ns                131 security/keys/persistent.c 	struct user_namespace *ns = current_user_ns();
ns                140 security/keys/persistent.c 		uid = make_kuid(ns, _uid);
ns                149 security/keys/persistent.c 		    !ns_capable(ns, CAP_SETUID))
ns                162 security/keys/persistent.c 	ret = key_get_persistent(ns, uid, dest_ref);
ns                 64 security/safesetid/lsm.c 				      struct user_namespace *ns,
ns                725 security/security.c 		     struct user_namespace *ns,
ns                729 security/security.c 	return call_int_hook(capable, 0, cred, ns, cap, opts);
ns               2175 security/selinux/hooks.c static int selinux_capable(const struct cred *cred, struct user_namespace *ns,
ns               2178 security/selinux/hooks.c 	return cred_has_capability(cred, cap, opts, ns == &init_user_ns);
ns               4933 security/selinux/hooks.c static int selinux_inet_sys_rcv_skb(struct net *ns, int ifindex,
ns               4941 security/selinux/hooks.c 	err = sel_netif_sid(ns, ifindex, &if_sid);
ns                 21 security/selinux/include/netif.h int sel_netif_sid(struct net *ns, int ifindex, u32 *sid);
ns                 85 security/selinux/include/objsec.h 	struct net *ns;			/* network namespace */
ns                 53 security/selinux/netif.c static inline u32 sel_netif_hashfn(const struct net *ns, int ifindex)
ns                 55 security/selinux/netif.c 	return (((uintptr_t)ns + ifindex) & (SEL_NETIF_HASH_SIZE - 1));
ns                 68 security/selinux/netif.c static inline struct sel_netif *sel_netif_find(const struct net *ns,
ns                 71 security/selinux/netif.c 	int idx = sel_netif_hashfn(ns, ifindex);
ns                 75 security/selinux/netif.c 		if (net_eq(netif->nsec.ns, ns) &&
ns                 98 security/selinux/netif.c 	idx = sel_netif_hashfn(netif->nsec.ns, netif->nsec.ifindex);
ns                133 security/selinux/netif.c static int sel_netif_sid_slow(struct net *ns, int ifindex, u32 *sid)
ns                143 security/selinux/netif.c 	dev = dev_get_by_index(ns, ifindex);
ns                151 security/selinux/netif.c 	netif = sel_netif_find(ns, ifindex);
ns                162 security/selinux/netif.c 		new->nsec.ns = ns;
ns                192 security/selinux/netif.c int sel_netif_sid(struct net *ns, int ifindex, u32 *sid)
ns                197 security/selinux/netif.c 	netif = sel_netif_find(ns, ifindex);
ns                205 security/selinux/netif.c 	return sel_netif_sid_slow(ns, ifindex, sid);
ns                218 security/selinux/netif.c static void sel_netif_kill(const struct net *ns, int ifindex)
ns                224 security/selinux/netif.c 	netif = sel_netif_find(ns, ifindex);
ns                327 security/tomoyo/audit.c static bool tomoyo_get_audit(const struct tomoyo_policy_namespace *ns,
ns                339 security/tomoyo/audit.c 	p = tomoyo_profile(ns, profile);
ns                372 security/tomoyo/audit.c 	if (!tomoyo_get_audit(r->domain->ns, r->profile, r->type,
ns                347 security/tomoyo/common.c void tomoyo_init_policy_namespace(struct tomoyo_policy_namespace *ns)
ns                352 security/tomoyo/common.c 		INIT_LIST_HEAD(&ns->acl_group[idx]);
ns                354 security/tomoyo/common.c 		INIT_LIST_HEAD(&ns->group_list[idx]);
ns                356 security/tomoyo/common.c 		INIT_LIST_HEAD(&ns->policy_list[idx]);
ns                357 security/tomoyo/common.c 	ns->profile_version = 20150505;
ns                359 security/tomoyo/common.c 	list_add_tail_rcu(&ns->namespace_list, &tomoyo_namespace_list);
ns                374 security/tomoyo/common.c 			  container_of(head->r.ns,
ns                491 security/tomoyo/common.c (struct tomoyo_policy_namespace *ns, const unsigned int profile)
ns                498 security/tomoyo/common.c 	ptr = ns->profile_ptr[profile];
ns                504 security/tomoyo/common.c 	ptr = ns->profile_ptr[profile];
ns                517 security/tomoyo/common.c 		ns->profile_ptr[profile] = ptr;
ns                534 security/tomoyo/common.c struct tomoyo_profile *tomoyo_profile(const struct tomoyo_policy_namespace *ns,
ns                538 security/tomoyo/common.c 	struct tomoyo_profile *ptr = ns->profile_ptr[profile];
ns                681 security/tomoyo/common.c 	if (sscanf(data, "PROFILE_VERSION=%u", &head->w.ns->profile_version)
ns                688 security/tomoyo/common.c 	profile = tomoyo_assign_profile(head->w.ns, i);
ns                747 security/tomoyo/common.c 	struct tomoyo_policy_namespace *ns =
ns                748 security/tomoyo/common.c 		container_of(head->r.ns, typeof(*ns), namespace_list);
ns                755 security/tomoyo/common.c 	profile = ns->profile_ptr[index];
ns                760 security/tomoyo/common.c 				 ns->profile_version);
ns                766 security/tomoyo/common.c 			if (ns->profile_ptr[head->r.index])
ns               1126 security/tomoyo/common.c static int tomoyo_write_domain2(struct tomoyo_policy_namespace *ns,
ns               1131 security/tomoyo/common.c 		.ns = ns,
ns               1175 security/tomoyo/common.c 	struct tomoyo_policy_namespace *ns;
ns               1196 security/tomoyo/common.c 	ns = domain->ns;
ns               1199 security/tomoyo/common.c 		if (!tomoyo_policy_loaded || ns->profile_ptr[idx])
ns               1220 security/tomoyo/common.c 	return tomoyo_write_domain2(ns, &domain->acl_info_list, data,
ns               1760 security/tomoyo/common.c 		.ns = head->w.ns,
ns               1781 security/tomoyo/common.c 				(head->w.ns, &head->w.ns->acl_group[group],
ns               1799 security/tomoyo/common.c 	struct tomoyo_policy_namespace *ns =
ns               1800 security/tomoyo/common.c 		container_of(head->r.ns, typeof(*ns), namespace_list);
ns               1801 security/tomoyo/common.c 	struct list_head *list = &ns->group_list[idx];
ns               1858 security/tomoyo/common.c 	struct tomoyo_policy_namespace *ns =
ns               1859 security/tomoyo/common.c 		container_of(head->r.ns, typeof(*ns), namespace_list);
ns               1860 security/tomoyo/common.c 	struct list_head *list = &ns->policy_list[idx];
ns               1918 security/tomoyo/common.c 	struct tomoyo_policy_namespace *ns =
ns               1919 security/tomoyo/common.c 		container_of(head->r.ns, typeof(*ns), namespace_list);
ns               1937 security/tomoyo/common.c 		if (!tomoyo_read_domain2(head, &ns->acl_group
ns               2042 security/tomoyo/common.c 	if (!tomoyo_write_domain2(domain->ns, &domain->acl_info_list, buffer,
ns               2542 security/tomoyo/common.c 	struct list_head *ns;
ns               2551 security/tomoyo/common.c 	ns = head->r.ns;
ns               2552 security/tomoyo/common.c 	if (!ns || (head->r.eof && ns->next != &tomoyo_namespace_list)) {
ns               2555 security/tomoyo/common.c 		head->r.ns = ns ? ns->next : tomoyo_namespace_list.next;
ns               2570 security/tomoyo/common.c 		head->r.ns->next != &tomoyo_namespace_list;
ns               2632 security/tomoyo/common.c 				head->w.ns = tomoyo_assign_namespace(line);
ns               2635 security/tomoyo/common.c 				head->w.ns = NULL;
ns               2637 security/tomoyo/common.c 			head->w.ns = &tomoyo_kernel_namespace;
ns               2639 security/tomoyo/common.c 		if (!head->w.ns)
ns               2702 security/tomoyo/common.c 			head->w.ns = &tomoyo_kernel_namespace;
ns               2783 security/tomoyo/common.c 		struct tomoyo_policy_namespace *ns = domain->ns;
ns               2785 security/tomoyo/common.c 		if (ns->profile_version == 20110903) {
ns               2788 security/tomoyo/common.c 			ns->profile_version = 20150505;
ns               2790 security/tomoyo/common.c 		if (ns->profile_version != 20150505)
ns               2792 security/tomoyo/common.c 			       ns->profile_version);
ns               2793 security/tomoyo/common.c 		else if (!ns->profile_ptr[profile])
ns                686 security/tomoyo/common.h 	struct tomoyo_policy_namespace *ns;
ns                783 security/tomoyo/common.h 	struct tomoyo_policy_namespace *ns;
ns                802 security/tomoyo/common.h 		struct list_head *ns;
ns                822 security/tomoyo/common.h 		struct tomoyo_policy_namespace *ns;
ns                977 security/tomoyo/common.h int tomoyo_get_mode(const struct tomoyo_policy_namespace *ns, const u8 profile,
ns               1039 security/tomoyo/common.h struct tomoyo_profile *tomoyo_profile(const struct tomoyo_policy_namespace *ns,
ns               1055 security/tomoyo/common.h void tomoyo_init_policy_namespace(struct tomoyo_policy_namespace *ns);
ns               1277 security/tomoyo/common.h 	return tomoyo_domain()->ns;
ns                186 security/tomoyo/domain.c 		list = &domain->ns->acl_group[i++];
ns                275 security/tomoyo/domain.c 	param->list = &param->ns->policy_list[TOMOYO_ID_TRANSITION_CONTROL];
ns                344 security/tomoyo/domain.c (const struct tomoyo_policy_namespace *ns,
ns                353 security/tomoyo/domain.c 			&ns->policy_list[TOMOYO_ID_TRANSITION_CONTROL];
ns                418 security/tomoyo/domain.c 	param->list = &param->ns->policy_list[TOMOYO_ID_AGGREGATOR];
ns                441 security/tomoyo/domain.c 	struct tomoyo_policy_namespace *ns;
ns                443 security/tomoyo/domain.c 	list_for_each_entry(ns, &tomoyo_namespace_list, namespace_list) {
ns                444 security/tomoyo/domain.c 		if (strncmp(name, ns->name, len) ||
ns                447 security/tomoyo/domain.c 		return ns;
ns                540 security/tomoyo/domain.c 			    !entry->ns->profile_ptr[entry->profile])
ns                557 security/tomoyo/domain.c 	e.ns = tomoyo_assign_namespace(domainname);
ns                558 security/tomoyo/domain.c 	if (!e.ns)
ns                631 security/tomoyo/domain.c 	ee->r.mode = tomoyo_get_mode(r->domain->ns, ee->r.profile,
ns                738 security/tomoyo/domain.c 			&old_domain->ns->policy_list[TOMOYO_ID_AGGREGATOR];
ns                805 security/tomoyo/domain.c 	switch (tomoyo_transition_type(old_domain->ns, old_domain->domainname,
ns                822 security/tomoyo/domain.c 			 old_domain->ns->name, candidate->name);
ns                579 security/tomoyo/file.c 	r->mode = tomoyo_get_mode(r->domain->ns, r->profile, r->type);
ns                611 security/tomoyo/file.c 	r->mode = tomoyo_get_mode(r->domain->ns, r->profile, r->type);
ns                528 security/tomoyo/gc.c 	struct tomoyo_policy_namespace *ns;
ns                543 security/tomoyo/gc.c 	list_for_each_entry(ns, &tomoyo_namespace_list, namespace_list) {
ns                545 security/tomoyo/gc.c 			tomoyo_collect_member(id, &ns->policy_list[id]);
ns                547 security/tomoyo/gc.c 			tomoyo_collect_acl(&ns->acl_group[i]);
ns                561 security/tomoyo/gc.c 	list_for_each_entry(ns, &tomoyo_namespace_list, namespace_list) {
ns                563 security/tomoyo/gc.c 			struct list_head *list = &ns->group_list[i];
ns                111 security/tomoyo/memory.c 	list = &param->ns->group_list[idx];
ns                203 security/tomoyo/memory.c 	tomoyo_kernel_domain.ns = &tomoyo_kernel_namespace;
ns                970 security/tomoyo/util.c int tomoyo_get_mode(const struct tomoyo_policy_namespace *ns, const u8 profile,
ns                978 security/tomoyo/util.c 	p = tomoyo_profile(ns, profile);
ns               1009 security/tomoyo/util.c 	r->mode = tomoyo_get_mode(domain->ns, profile, index);
ns               1074 security/tomoyo/util.c 	if (count < tomoyo_profile(domain->ns, domain->profile)->
ns                 47 sound/drivers/pcsp/pcsp_lib.c 	u64 ns;
ns                 83 sound/drivers/pcsp/pcsp_lib.c 	ns = (chip->thalf ? PCSP_CALC_NS(timer_cnt) : chip->ns_rem);
ns                 84 sound/drivers/pcsp/pcsp_lib.c 	chip->ns_rem -= ns;
ns                 85 sound/drivers/pcsp/pcsp_lib.c 	return ns;
ns                133 sound/drivers/pcsp/pcsp_lib.c 	u64 ns;
ns                139 sound/drivers/pcsp/pcsp_lib.c 	ns = pcsp_timer_update(chip);
ns                140 sound/drivers/pcsp/pcsp_lib.c 	if (!ns) {
ns                148 sound/drivers/pcsp/pcsp_lib.c 	hrtimer_forward(handle, hrtimer_get_expires(handle), ns_to_ktime(ns));
ns                277 tools/perf/util/arm-spe-pkt-decoder.c 	int ret, ns, el, idx = packet->index;
ns                423 tools/perf/util/arm-spe-pkt-decoder.c 		case 1: ns = !!(packet->payload & NS_FLAG);
ns                427 tools/perf/util/arm-spe-pkt-decoder.c 				        (idx == 1) ? "TGT" : "PC", payload, el, ns);
ns                429 tools/perf/util/arm-spe-pkt-decoder.c 		case 3:	ns = !!(packet->payload & NS_FLAG);
ns                432 tools/perf/util/arm-spe-pkt-decoder.c 					payload, ns);
ns                683 tools/perf/util/hist.c 	struct namespaces *ns = thread__namespaces(al->thread);
ns                688 tools/perf/util/hist.c 			.dev = ns ? ns->link_info[CGROUP_NS_INDEX].dev : 0,
ns                689 tools/perf/util/hist.c 			.ino = ns ? ns->link_info[CGROUP_NS_INDEX].ino : 0,
ns                839 tools/perf/util/intel-pt.c static u64 intel_pt_ns_to_ticks(const struct intel_pt *pt, u64 ns)
ns                843 tools/perf/util/intel-pt.c 	quot = ns / pt->tc.time_mult;
ns                844 tools/perf/util/intel-pt.c 	rem  = ns % pt->tc.time_mult;
ns               2951 tools/perf/util/intel-pt.c static u64 intel_pt_tsc_start(u64 ns, struct intel_pt *pt)
ns               2955 tools/perf/util/intel-pt.c 	tsc = perf_time_to_tsc(ns, &pt->tc);
ns               2959 tools/perf/util/intel-pt.c 		if (tm < ns)
ns               2964 tools/perf/util/intel-pt.c 	while (tm < ns)
ns               2971 tools/perf/util/intel-pt.c static u64 intel_pt_tsc_end(u64 ns, struct intel_pt *pt)
ns               2975 tools/perf/util/intel-pt.c 	tsc = perf_time_to_tsc(ns, &pt->tc);
ns               2979 tools/perf/util/intel-pt.c 		if (tm > ns)
ns               2984 tools/perf/util/intel-pt.c 	while (tm > ns)
ns                347 tools/perf/util/scripting-engines/trace-event-perl.c 	unsigned long s, ns;
ns                372 tools/perf/util/scripting-engines/trace-event-perl.c 	ns = nsecs - s * NSEC_PER_SEC;
ns                385 tools/perf/util/scripting-engines/trace-event-perl.c 	XPUSHs(sv_2mortal(newSVuv(ns)));
ns                801 tools/perf/util/scripting-engines/trace-event-python.c 	unsigned long s, ns;
ns                839 tools/perf/util/scripting-engines/trace-event-python.c 	ns = nsecs - s * NSEC_PER_SEC;
ns                857 tools/perf/util/scripting-engines/trace-event-python.c 		PyTuple_SetItem(t, n++, _PyLong_FromLong(ns));
ns                864 tools/perf/util/scripting-engines/trace-event-python.c 		pydict_set_item_string_decref(dict, "common_ns", _PyLong_FromLong(ns));
ns                678 tools/perf/util/session.c 		struct perf_ns_link_info *ns = &event->namespaces.link_info[i];
ns                680 tools/perf/util/session.c 		ns->dev = bswap_64(ns->dev);
ns                681 tools/perf/util/session.c 		ns->ino = bswap_64(ns->ino);
ns                191 tools/perf/util/synthetic-events.c static void perf_event__get_ns_link_info(pid_t pid, const char *ns,
ns                197 tools/perf/util/synthetic-events.c 	sprintf(proc_ns, "/proc/%u/ns/%s", pid, ns);
ns                162 tools/perf/util/thread.c 	struct namespaces *ns;
ns                165 tools/perf/util/thread.c 	ns = __thread__namespaces(thread);
ns                168 tools/perf/util/thread.c 	return ns;
ns                  7 tools/perf/util/tsc.c u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc)
ns                 11 tools/perf/util/tsc.c 	t = ns - tc->time_zero;
ns                 18 tools/perf/util/tsc.h u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc);
ns                 28 tools/testing/selftests/nsfs/owner.c 	int pfd[2], ns, uns, init_uns;
ns                 56 tools/testing/selftests/nsfs/owner.c 	ns = open(path, O_RDONLY);
ns                 57 tools/testing/selftests/nsfs/owner.c 	if (ns < 0)
ns                 60 tools/testing/selftests/nsfs/owner.c 	uns = ioctl(ns, NS_GET_USERNS);
ns                 84 tools/testing/selftests/nsfs/owner.c 	if (ioctl(ns, NS_GET_USERNS) >= 0 || errno != EPERM)
ns                 47 tools/testing/selftests/nsfs/pidns.c 	int ns, pns, i;
ns                 56 tools/testing/selftests/nsfs/pidns.c 		ns = open(path, O_RDONLY);
ns                 57 tools/testing/selftests/nsfs/pidns.c 		if (ns < 0)
ns                 60 tools/testing/selftests/nsfs/pidns.c 		pns = ioctl(ns, NS_GET_PARENT);
ns                 49 tools/testing/selftests/timers/adjtick.c struct timespec nsec_to_ts(long long ns)
ns                 53 tools/testing/selftests/timers/adjtick.c 	ts.tv_sec = ns/NSEC_PER_SEC;
ns                 54 tools/testing/selftests/timers/adjtick.c 	ts.tv_nsec = ns%NSEC_PER_SEC;
ns                 71 tools/testing/selftests/timers/leap-a-day.c struct timespec timespec_add(struct timespec ts, unsigned long long ns)
ns                 73 tools/testing/selftests/timers/leap-a-day.c 	ts.tv_nsec += ns;
ns                 48 tools/testing/selftests/timers/mqueue-lat.c struct timespec timespec_add(struct timespec ts, unsigned long long ns)
ns                 50 tools/testing/selftests/timers/mqueue-lat.c 	ts.tv_nsec += ns;
ns                 91 tools/testing/selftests/timers/nanosleep.c struct timespec timespec_add(struct timespec ts, unsigned long long ns)
ns                 93 tools/testing/selftests/timers/nanosleep.c 	ts.tv_nsec += ns;
ns                101 tools/testing/selftests/timers/nanosleep.c int nanosleep_test(int clockid, long long ns)
ns                108 tools/testing/selftests/timers/nanosleep.c 	target = timespec_add(now, ns);
ns                121 tools/testing/selftests/timers/nanosleep.c 	rel = timespec_add(rel, ns);
ns                122 tools/testing/selftests/timers/nanosleep.c 	target = timespec_add(now, ns);
ns                 79 tools/testing/selftests/timers/nsleep-lat.c struct timespec timespec_add(struct timespec ts, unsigned long long ns)
ns                 81 tools/testing/selftests/timers/nsleep-lat.c 	ts.tv_nsec += ns;
ns                 98 tools/testing/selftests/timers/nsleep-lat.c int nanosleep_lat_test(int clockid, long long ns)
ns                104 tools/testing/selftests/timers/nsleep-lat.c 	target.tv_sec = ns/NSEC_PER_SEC;
ns                105 tools/testing/selftests/timers/nsleep-lat.c 	target.tv_nsec = ns%NSEC_PER_SEC;
ns                120 tools/testing/selftests/timers/nsleep-lat.c 	if (((timespec_sub(start, end)/count)-ns) > UNRESONABLE_LATENCY) {
ns                121 tools/testing/selftests/timers/nsleep-lat.c 		printf("Large rel latency: %lld ns :", (timespec_sub(start, end)/count)-ns);
ns                128 tools/testing/selftests/timers/nsleep-lat.c 		target = timespec_add(start, ns);
ns                 51 tools/testing/selftests/timers/raw_skew.c struct timespec nsec_to_ts(long long ns)
ns                 55 tools/testing/selftests/timers/raw_skew.c 	ts.tv_sec = ns/NSEC_PER_SEC;
ns                 56 tools/testing/selftests/timers/raw_skew.c 	ts.tv_nsec = ns%NSEC_PER_SEC;
ns                 80 virt/kvm/arm/arch_timer.c static void soft_timer_start(struct hrtimer *hrt, u64 ns)
ns                 82 virt/kvm/arm/arch_timer.c 	hrtimer_start(hrt, ktime_add_ns(ktime_get(), ns),
ns                131 virt/kvm/arm/arch_timer.c 		u64 ns;
ns                133 virt/kvm/arm/arch_timer.c 		ns = cyclecounter_cyc2ns(timecounter->cc,
ns                137 virt/kvm/arm/arch_timer.c 		return ns;
ns                179 virt/kvm/arm/arch_timer.c 	u64 ns;
ns                189 virt/kvm/arm/arch_timer.c 	ns = kvm_timer_earliest_exp(vcpu);
ns                190 virt/kvm/arm/arch_timer.c 	if (unlikely(ns)) {
ns                191 virt/kvm/arm/arch_timer.c 		hrtimer_forward_now(hrt, ns_to_ktime(ns));
ns                203 virt/kvm/arm/arch_timer.c 	u64 ns;
ns                215 virt/kvm/arm/arch_timer.c 	ns = kvm_timer_compute_delta(ctx);
ns                216 virt/kvm/arm/arch_timer.c 	if (unlikely(ns)) {
ns                217 virt/kvm/arm/arch_timer.c 		hrtimer_forward_now(hrt, ns_to_ktime(ns));