Lines Matching +full:tsc +full:- +full:irq
1 /*-
2 * SPDX-License-Identifier: BSD-4-Clause
4 * Copyright (c) 2000 Dag-Erling Smørgrav
6 * Copyright (c) 1993 Jan-Simon Pendry
11 * Jan-Simon Pendry.
126 #define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */
127 #define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000)
140 * This character array is used with ki_stati-1 as an index and tries to
166 swapfree = swaptotal - swapused; in linprocfs_domeminfo()
209 * We default the flags to include all non-conflicting flags, in linprocfs_docpuinfo()
214 /* 4 */ "tsc", "msr", "pae", "mce", in linprocfs_docpuinfo()
415 /* XXX per-cpu vendor / class / model / id? */ in linprocfs_docpuinfo()
422 /* ARM64TODO: implement non-stubbed linprocfs_docpuinfo */
457 *mntfrom = sp->f_mntfromname; in _mtab_helper()
460 *mntto = sp->f_mntonname; in _mtab_helper()
463 *fstype = sp->f_fstypename; in _mtab_helper()
464 if (strcmp(*fstype, pn->pn_info->pi_name) == 0) in _mtab_helper()
471 * FreeBSD uses eg "map -hosts", whereas Linux in _mtab_helper()
472 * expects just "-hosts". in _mtab_helper()
529 vp = pwd->pwd_adir; in linprocfs_domtab()
543 for (sp = buf; count > 0; sp++, count--) { in linprocfs_domtab()
555 _sbuf_mntoptions_helper(sb, sp->f_flags); in linprocfs_domtab()
583 vp = pwd->pwd_adir; in linprocfs_doprocmountinfo()
596 for (sp = buf; count > 0; sp++, count--) { in linprocfs_doprocmountinfo()
618 * (2) parent mount id -- we don't have this cheaply, so in linprocfs_doprocmountinfo()
621 * (3) major:minor -- ditto in linprocfs_doprocmountinfo()
623 * (4) root filesystem mount -- probably a namespaces thing in linprocfs_doprocmountinfo()
628 sp->f_fsid.val[0] ^ sp->f_fsid.val[1], mntto); in linprocfs_doprocmountinfo()
630 _sbuf_mntoptions_helper(sb, sp->f_flags); in linprocfs_doprocmountinfo()
632 * (7) zero or more optional fields -- again, namespace related in linprocfs_doprocmountinfo()
634 * (8) End of variable length fields separator ("-") in linprocfs_doprocmountinfo()
640 * (11) "superblock" options -- like (6), but different in linprocfs_doprocmountinfo()
643 sbuf_printf(sb, " - %s %s %s\n", fstype, mntfrom, in linprocfs_doprocmountinfo()
644 (sp->f_flags & MNT_RDONLY) ? "ro" : "rw"); in linprocfs_doprocmountinfo()
670 if (strcmp(cp->name, "DISK") == 0 || in linprocfs_dopartitions()
671 strcmp(cp->name, "PART") == 0) in linprocfs_dopartitions()
672 LIST_FOREACH(gp, &cp->geom, geom) { in linprocfs_dopartitions()
673 LIST_FOREACH(pp, &gp->provider, provider) { in linprocfs_dopartitions()
675 pp->name, &major, &minor) != 0) { in linprocfs_dopartitions()
683 (long long)pp->mediasize, pp->name, in linprocfs_dopartitions()
704 * user nice system idle iowait irq softirq steal
706 * user nice system idle iowait irq softirq steal guest
708 * user nice system idle iowait irq softirq steal guest guest_nice
754 cp = pcpu->pc_cp_time; in linprocfs_dostat()
803 sbuf_printf(sb, "/dev/%-34s unknown\t\t%jd\t%jd\t-1\n", in linprocfs_doswaps()
930 if ((p->p_flag & P_CONTROLT) == 0) in linprocfs_get_tty_nr()
931 return (-1); in linprocfs_get_tty_nr()
933 sp = p->p_pgrp->pg_session; in linprocfs_get_tty_nr()
935 return (-1); in linprocfs_get_tty_nr()
937 ttyname = devtoname(sp->s_ttyp->t_dev); in linprocfs_get_tty_nr()
940 return (-1); in linprocfs_get_tty_nr()
965 if (p->p_vmspace) { in linprocfs_doprocstat()
966 startcode = (vm_offset_t)p->p_vmspace->vm_taddr; in linprocfs_doprocstat()
967 startdata = (vm_offset_t)p->p_vmspace->vm_daddr; in linprocfs_doprocstat()
972 sbuf_printf(sb, "%d", p->p_pid); in linprocfs_doprocstat()
974 PS_ADD("comm", "(%s)", p->p_comm); in linprocfs_doprocstat()
984 state = linux_state[kp.ki_stat - 1]; in linprocfs_doprocstat()
986 PS_ADD("ppid", "%d", p->p_pptr ? p->p_pptr->p_pid : 0); in linprocfs_doprocstat()
987 PS_ADD("pgrp", "%d", p->p_pgid); in linprocfs_doprocstat()
988 PS_ADD("session", "%d", p->p_session->s_sid); in linprocfs_doprocstat()
1002 PS_ADD("nice", "%d", kp.ki_nice); /* 19 (nicest) to -19 */ in linprocfs_doprocstat()
1005 PS_ADD("starttime", "%lu", TV2J(&kp.ki_start) - TV2J(&boottime)); in linprocfs_doprocstat()
1056 lsize = B2P(kp.ki_size) - kp.ki_dsize - in linprocfs_doprocstatm()
1057 kp.ki_ssize - kp.ki_tsize - 1; in linprocfs_doprocstatm()
1085 switch(p->p_state) { in linprocfs_doprocstatus()
1090 if (p->p_flag & P_WEXIT) { in linprocfs_doprocstatus()
1119 sbuf_printf(sb, "Name:\t%s\n", p->p_comm); /* XXX escape */ in linprocfs_doprocstatus()
1125 sbuf_printf(sb, "Tgid:\t%d\n", p->p_pid); in linprocfs_doprocstatus()
1126 sbuf_printf(sb, "Pid:\t%d\n", p->p_pid); in linprocfs_doprocstatus()
1129 sbuf_printf(sb, "Uid:\t%d\t%d\t%d\t%d\n", p->p_ucred->cr_ruid, in linprocfs_doprocstatus()
1130 p->p_ucred->cr_uid, in linprocfs_doprocstatus()
1131 p->p_ucred->cr_svuid, in linprocfs_doprocstatus()
1133 p->p_ucred->cr_uid); in linprocfs_doprocstatus()
1134 sbuf_printf(sb, "Gid:\t%d\t%d\t%d\t%d\n", p->p_ucred->cr_rgid, in linprocfs_doprocstatus()
1135 p->p_ucred->cr_gid, in linprocfs_doprocstatus()
1136 p->p_ucred->cr_svgid, in linprocfs_doprocstatus()
1138 p->p_ucred->cr_gid); in linprocfs_doprocstatus()
1140 for (i = 0; i < p->p_ucred->cr_ngroups; i++) in linprocfs_doprocstatus()
1141 sbuf_printf(sb, "%d ", p->p_ucred->cr_groups[i]); in linprocfs_doprocstatus()
1162 lsize = B2P(kp.ki_size) - kp.ki_dsize - in linprocfs_doprocstatus()
1163 kp.ki_ssize - kp.ki_tsize - 1; in linprocfs_doprocstatus()
1170 bsd_to_linux_sigset(&p->p_siglist, &siglist); in linprocfs_doprocstatus()
1171 ps = p->p_sigacts; in linprocfs_doprocstatus()
1172 mtx_lock(&ps->ps_mtx); in linprocfs_doprocstatus()
1173 bsd_to_linux_sigset(&ps->ps_sigignore, &sigignore); in linprocfs_doprocstatus()
1174 bsd_to_linux_sigset(&ps->ps_sigcatch, &sigcatch); in linprocfs_doprocstatus()
1175 mtx_unlock(&ps->ps_mtx); in linprocfs_doprocstatus()
1180 * XXX. SigBlk - target thread's signal mask, td_sigmask. in linprocfs_doprocstatus()
1210 vn_fullpath(pwd->pwd_cdir, &fullpath, &freepath); in linprocfs_doproccwd()
1230 vp = jailed(p->p_ucred) ? pwd->pwd_jdir : pwd->pwd_rdir; in linprocfs_doprocroot()
1257 if (p->p_vmspace == &vmspace0) { in linprocfs_doproccmdline()
1261 if (p->p_args != NULL) { in linprocfs_doproccmdline()
1262 sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length); in linprocfs_doproccmdline()
1267 if ((p->p_flag & P_SYSTEM) != 0) { in linprocfs_doproccmdline()
1289 if (p->p_vmspace == &vmspace0) in linprocfs_doprocenviron()
1295 static char l32_map_str[] = "%08lx-%08lx %s%s%s%s %08lx %02x:%02x %lu%s%s\n";
1296 static char l64_map_str[] = "%016lx-%016lx %s%s%s%s %08lx %02x:%02x %lu%s%s\n";
1328 if (uio->uio_rw != UIO_READ) in linprocfs_doprocmaps()
1340 map = &vm->vm_map; in linprocfs_doprocmaps()
1351 if ((entry->eflags & (MAP_ENTRY_IS_SUB_MAP | MAP_ENTRY_GUARD)) != 0) in linprocfs_doprocmaps()
1353 e_prot = entry->protection; in linprocfs_doprocmaps()
1354 e_start = entry->start; in linprocfs_doprocmaps()
1355 e_end = entry->end; in linprocfs_doprocmaps()
1356 obj = entry->object.vm_object; in linprocfs_doprocmaps()
1357 off = entry->offset; in linprocfs_doprocmaps()
1359 lobj = tobj, tobj = tobj->backing_object) { in linprocfs_doprocmaps()
1361 off += lobj->backing_object_offset; in linprocfs_doprocmaps()
1365 private = (entry->eflags & MAP_ENTRY_COW) != 0 || obj == NULL || in linprocfs_doprocmaps()
1366 (obj->flags & OBJ_ANON) != 0; in linprocfs_doprocmaps()
1367 last_timestamp = map->timestamp; in linprocfs_doprocmaps()
1380 VOP_GETATTR(vp, &vat, td->td_ucred); in linprocfs_doprocmaps()
1389 if (e_start == p->p_sysent->sv_shared_page_base + in linprocfs_doprocmaps()
1392 if (e_end == p->p_sysent->sv_usrstack) in linprocfs_doprocmaps()
1403 (e_prot & VM_PROT_READ)?"r":"-", in linprocfs_doprocmaps()
1404 (e_prot & VM_PROT_WRITE)?"w":"-", in linprocfs_doprocmaps()
1405 (e_prot & VM_PROT_EXECUTE)?"x":"-", in linprocfs_doprocmaps()
1417 if (error == -1) { in linprocfs_doprocmaps()
1421 if (last_timestamp != map->timestamp) { in linprocfs_doprocmaps()
1427 vm_map_lookup_entry(map, e_end - 1, &tmp_entry); in linprocfs_doprocmaps()
1446 resid = uio->uio_resid; in linprocfs_doprocmem()
1449 if (uio->uio_rw == UIO_READ && resid != uio->uio_resid) in linprocfs_doprocmem()
1484 /* XXX-BZ rx only? */ in linprocfs_donetdev_cb()
1507 "Inter-", " Receive", " Transmit", in linprocfs_donetdev()
1545 if (ifname_bsd_to_linux_ifp(nh->nh_ifp, ifname, sizeof(ifname)) <= 0) in linux_route_print()
1548 gw = (nh->nh_flags & NHF_GATEWAY) in linux_route_print()
1549 ? nh->gw4_sa.sin_addr.s_addr : 0; in linux_route_print()
1554 sbuf_printf(w->sb, in linux_route_print()
1562 mask.s_addr, nh->nh_mtu, 0, 0); in linux_route_print()
1564 sbuf_printf(w->sb, "\n\n"); in linux_route_print()
1579 uint32_t fibnum = curthread->td_proc->p_fibnum; in linprocfs_donetroute()
1581 sbuf_printf(w.sb, "%-127s\n", "Iface\tDestination\tGateway " in linprocfs_donetroute()
1822 if (vfsp->vfc_flags & VFCF_SYNTHETIC) in linprocfs_dofilesystems()
1824 sbuf_printf(sb, "\t%s\n", vfsp->vfc_name); in linprocfs_dofilesystems()
1840 sbuf_printf(sb, "%-20s%8lu%4d\n", lf->filename, in linprocfs_domodules()
1841 (unsigned long)lf->size, lf->refs); in linprocfs_domodules()
1900 limp = lim_hold(p->p_limit); in linprocfs_doproclimits()
1903 sbuf_printf(sb, "%-26s%-21s%-21s%-21s\n", "Limit", "Soft Limit", in linprocfs_doproclimits()
1905 for (li = linux_rlimits_ident; li->desc != NULL; ++li) { in linprocfs_doproclimits()
1906 switch (li->rlim_id) in linprocfs_doproclimits()
1937 rl = limp->pl_rlimit[li->rlim_id]; in linprocfs_doproclimits()
1941 sbuf_printf(sb, "%-26s%-21s%-21s%-10s\n", in linprocfs_doproclimits()
1942 li->desc, "unlimited", "unlimited", li->unit); in linprocfs_doproclimits()
1944 sbuf_printf(sb, "%-26s%-21llu%-21llu%-10s\n", in linprocfs_doproclimits()
1945 li->desc, (unsigned long long)rl.rlim_cur, in linprocfs_doproclimits()
1946 (unsigned long long)rl.rlim_max, li->unit); in linprocfs_doproclimits()
1961 vap->va_nlink = 3; in linprocfs_dotaskattr()
2021 if (p->p_vmspace == &vmspace0) in linprocfs_doauxv()
2024 if (uio->uio_resid == 0) in linprocfs_doauxv()
2026 if (uio->uio_offset < 0 || uio->uio_resid < 0) in linprocfs_doauxv()
2036 resid = sbuf_len(asb) - uio->uio_offset; in linprocfs_doauxv()
2037 if (resid > uio->uio_resid) in linprocfs_doauxv()
2038 buflen = uio->uio_resid; in linprocfs_doauxv()
2049 error = uiomove(sbuf_data(asb) + uio->uio_offset, buflen, uio); in linprocfs_doauxv()
2066 if (uio->uio_rw == UIO_READ) { in linprocfs_do_oom_score_adj()
2067 sbuf_printf(sb, "%d\n", pem->oom_score_adj); in linprocfs_do_oom_score_adj()
2075 pem->oom_score_adj = oom; in linprocfs_do_oom_score_adj()
2324 root = pi->pi_root; in linprocfs_init()