-static int nvmap_debug_allocations_show(struct seq_file *s, void *unused)
-{
- struct nvmap_carveout_node *node = s->private;
- struct nvmap_carveout_commit *commit;
- unsigned int total = 0;
-
- spin_lock(&node->clients_lock);
- seq_printf(s, "%-18s %18s %8s %11s\n",
- "CLIENT", "PROCESS", "PID", "SIZE");
- seq_printf(s, "%-18s %18s %8s %11s %8s %6s %6s %6s %6s %8s\n",
- "", "", "BASE", "SIZE", "FLAGS", "REFS",
- "DUPES", "PINS", "SHARE", "UID");
- list_for_each_entry(commit, &node->clients, list) {
- struct nvmap_client *client =
- get_client_from_carveout_commit(node, commit);
- client_stringify(client, s);
- seq_printf(s, " %10zuK\n", K(commit->commit));
- allocations_stringify(client, s, false);
- seq_printf(s, "\n");
- total += commit->commit;
- }
- seq_printf(s, "%-18s %-18s %8s %10uK\n", "total", "", "", K(total));
- spin_unlock(&node->clients_lock);
- return 0;
-}
-
-DEBUGFS_OPEN_FOPS(allocations);
-
-static int nvmap_debug_clients_show(struct seq_file *s, void *unused)
-{
- struct nvmap_carveout_node *node = s->private;
- struct nvmap_carveout_commit *commit;
- unsigned int total = 0;
-
- spin_lock(&node->clients_lock);
- seq_printf(s, "%-18s %18s %8s %11s\n",
- "CLIENT", "PROCESS", "PID", "SIZE");
- list_for_each_entry(commit, &node->clients, list) {
- struct nvmap_client *client =
- get_client_from_carveout_commit(node, commit);
- client_stringify(client, s);
- seq_printf(s, " %10zu\n", K(commit->commit));
- total += commit->commit;
- }
- seq_printf(s, "%-18s %18s %8s %10uK\n", "total", "", "", K(total));
- spin_unlock(&node->clients_lock);
- return 0;
-}
-
-DEBUGFS_OPEN_FOPS(clients);
-
-static void nvmap_iovmm_get_total_mss(u64 *pss, u64 *non_pss, u64 *total)