static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) { struct acpi_processor *pr = seq->private; unsigned int i; if (!pr) goto end; seq_printf(seq, "active state: C%zd\n" "max_cstate: C%d\n" "maximum allowed latency: %d usec\n", pr->power.state ? pr->power.state - pr->power.states : 0, max_cstate, pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY)); seq_puts(seq, "states:\n"); for (i = 1; i <= pr->power.count; i++) { seq_printf(seq, " %cC%d: ", (&pr->power.states[i] == pr->power.state ? '*' : ' '), i); if (!pr->power.states[i].valid) { seq_puts(seq, "<not supported>\n"); continue; } switch (pr->power.states[i].type) { case ACPI_STATE_C1: seq_printf(seq, "type[C1] "); break; case ACPI_STATE_C2: seq_printf(seq, "type[C2] "); break; case ACPI_STATE_C3: seq_printf(seq, "type[C3] "); break; default: seq_printf(seq, "type[--] "); break; } if (pr->power.states[i].promotion.state) seq_printf(seq, "promotion[C%zd] ", (pr->power.states[i].promotion.state - pr->power.states)); else seq_puts(seq, "promotion[--] "); if (pr->power.states[i].demotion.state) seq_printf(seq, "demotion[C%zd] ", (pr->power.states[i].demotion.state - pr->power.states)); else seq_puts(seq, "demotion[--] "); seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n", pr->power.states[i].latency, pr->power.states[i].usage, (unsigned long long)pr->power.states[i].time); } end: return 0; }
static int mdfld_dc_pipeline_b_regs_info(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *)m->private; struct drm_device *dev = node->minor->dev; int i; seq_printf(m, "DISPLAY PIPELINE B\n"); seq_printf(m, "\tPALETTE B:\n"); seq_printf(m, "\t\t reg(0xa800) = 0x%x\n", REG_READ(0xa800)); seq_printf(m, "\tPIPELINE B:\n"); for (i=0x61000; i<0x610ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tHDMI PORT CONTROL/HDCP/TV:\n"); for (i=0x61110; i<=0x61178; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tPANEL FITTING:\n"); for (i=0x61200; i<0x612ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tPIPELINE B CONTROL:\n"); for (i=0x71000; i<0x710ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); return 0; }
/* * Logic: we've got two memory sums for each process, "shared", and * "non-shared". Shared memory may get counted more than once, for * each process that owns it. Non-shared memory is counted * accurately. */ void task_mem(struct seq_file *m, struct mm_struct *mm) { struct vm_area_struct *vma; struct vm_region *region; struct rb_node *p; unsigned long bytes = 0, sbytes = 0, slack = 0, size; down_read(&mm->mmap_sem); for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) { vma = rb_entry(p, struct vm_area_struct, vm_rb); bytes += kobjsize(vma); region = vma->vm_region; if (region) { size = kobjsize(region); size += region->vm_end - region->vm_start; } else { size = vma->vm_end - vma->vm_start; } if (atomic_read(&mm->mm_count) > 1 || vma->vm_flags & VM_MAYSHARE) { sbytes += size; } else { bytes += size; if (region) slack = region->vm_end - vma->vm_end; } } if (atomic_read(&mm->mm_count) > 1) sbytes += kobjsize(mm); else bytes += kobjsize(mm); if (current->fs && current->fs->users > 1) sbytes += kobjsize(current->fs); else bytes += kobjsize(current->fs); if (current->files && atomic_read(¤t->files->count) > 1) sbytes += kobjsize(current->files); else bytes += kobjsize(current->files); if (current->sighand && atomic_read(¤t->sighand->count) > 1) sbytes += kobjsize(current->sighand); else bytes += kobjsize(current->sighand); bytes += kobjsize(current); /* includes kernel stack */ seq_printf(m, "Mem:\t%8lu bytes\n" "Slack:\t%8lu bytes\n" "Shared:\t%8lu bytes\n", bytes, slack, sbytes); up_read(&mm->mmap_sem); }
static int wandev_show(struct seq_file *m, void *v) { struct wan_device *wandev = m->private; if (wandev->magic != ROUTER_MAGIC) return 0; if (!wandev->state) { seq_puts(m, "device is not configured!\n"); return 0; } /* Update device statistics */ if (wandev->update) { int err = wandev->update(wandev); if (err == -EAGAIN) { seq_puts(m, "Device is busy!\n"); return 0; } if (err) { seq_puts(m, "Device is not configured!\n"); return 0; } } seq_printf(m, PROC_STATS_FORMAT, "total packets received", wandev->stats.rx_packets); seq_printf(m, PROC_STATS_FORMAT, "total packets transmitted", wandev->stats.tx_packets); seq_printf(m, PROC_STATS_FORMAT, "total bytes received", wandev->stats.rx_bytes); seq_printf(m, PROC_STATS_FORMAT, "total bytes transmitted", wandev->stats.tx_bytes); seq_printf(m, PROC_STATS_FORMAT, "bad packets received", wandev->stats.rx_errors); seq_printf(m, PROC_STATS_FORMAT, "packet transmit problems", wandev->stats.tx_errors); seq_printf(m, PROC_STATS_FORMAT, "received frames dropped", wandev->stats.rx_dropped); seq_printf(m, PROC_STATS_FORMAT, "transmit frames dropped", wandev->stats.tx_dropped); seq_printf(m, PROC_STATS_FORMAT, "multicast packets received", wandev->stats.multicast); seq_printf(m, PROC_STATS_FORMAT, "transmit collisions", wandev->stats.collisions); seq_printf(m, PROC_STATS_FORMAT, "receive length errors", wandev->stats.rx_length_errors); seq_printf(m, PROC_STATS_FORMAT, "receiver overrun errors", wandev->stats.rx_over_errors); seq_printf(m, PROC_STATS_FORMAT, "CRC errors", wandev->stats.rx_crc_errors); seq_printf(m, PROC_STATS_FORMAT, "frame format errors (aborts)", wandev->stats.rx_frame_errors); seq_printf(m, PROC_STATS_FORMAT, "receiver fifo overrun", wandev->stats.rx_fifo_errors); seq_printf(m, PROC_STATS_FORMAT, "receiver missed packet", wandev->stats.rx_missed_errors); seq_printf(m, PROC_STATS_FORMAT, "aborted frames transmitted", wandev->stats.tx_aborted_errors); return 0; }
static int mdfld_dc_pipeline_c_regs_info(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *)m->private; struct drm_device *dev = node->minor->dev; int i; seq_printf(m, "DISPLAY PIPELINE C\n"); seq_printf(m, "\tPALETTE C:\n"); seq_printf(m, "\t\t reg(0xac00) = 0x%x\n", REG_READ(0xac00)); seq_printf(m, "\tMIPI C:\n"); for (i=0xb800; i<0xb8ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tDSI ADAPTER:\n"); for (i=0xb904; i<=0xb938; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tPIPELINE C:\n"); for (i=0x62000; i<0x620ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tPORT CONTROL:\n"); for (i=0x62190; i<0x62194; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tPIPELINE C CONTROL:\n"); for (i=0x72000; i<0x720ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); return 0; }
/* The debugfs functions are optimized away when CONFIG_DEBUG_FS isn't set. */ static int mmc_ios_show(struct seq_file *s, void *data) { static const char *vdd_str[] = { [8] = "2.0", [9] = "2.1", [10] = "2.2", [11] = "2.3", [12] = "2.4", [13] = "2.5", [14] = "2.6", [15] = "2.7", [16] = "2.8", [17] = "2.9", [18] = "3.0", [19] = "3.1", [20] = "3.2", [21] = "3.3", [22] = "3.4", [23] = "3.5", [24] = "3.6", }; struct mmc_host *host = s->private; struct mmc_ios *ios = &host->ios; const char *str; seq_printf(s, "clock:\t\t%u Hz\n", ios->clock); seq_printf(s, "vdd:\t\t%u ", ios->vdd); if ((1 << ios->vdd) & MMC_VDD_165_195) seq_printf(s, "(1.65 - 1.95 V)\n"); else if (ios->vdd < (ARRAY_SIZE(vdd_str) - 1) && vdd_str[ios->vdd] && vdd_str[ios->vdd + 1]) seq_printf(s, "(%s ~ %s V)\n", vdd_str[ios->vdd], vdd_str[ios->vdd + 1]); else seq_printf(s, "(invalid)\n"); switch (ios->bus_mode) { case MMC_BUSMODE_OPENDRAIN: str = "open drain"; break; case MMC_BUSMODE_PUSHPULL: str = "push-pull"; break; default: str = "invalid"; break; } seq_printf(s, "bus mode:\t%u (%s)\n", ios->bus_mode, str); switch (ios->chip_select) { case MMC_CS_DONTCARE: str = "don't care"; break; case MMC_CS_HIGH: str = "active high"; break; case MMC_CS_LOW: str = "active low"; break; default: str = "invalid"; break; } seq_printf(s, "chip select:\t%u (%s)\n", ios->chip_select, str); switch (ios->power_mode) { case MMC_POWER_OFF: str = "off"; break; case MMC_POWER_UP: str = "up"; break; case MMC_POWER_ON: str = "on"; break; default: str = "invalid"; break; } seq_printf(s, "power mode:\t%u (%s)\n", ios->power_mode, str); seq_printf(s, "bus width:\t%u (%u bits)\n", ios->bus_width, 1 << ios->bus_width); switch (ios->timing) { case MMC_TIMING_LEGACY: str = "legacy"; break; case MMC_TIMING_MMC_HS: str = "mmc high-speed"; break; case MMC_TIMING_SD_HS: str = "sd high-speed"; break; default: str = "invalid"; break; } seq_printf(s, "timing spec:\t%u (%s)\n", ios->timing, str); return 0; }
static int proc_fasttimer_show(struct seq_file *m, void *v) { unsigned long flags; int i = 0; int num_to_show; struct fasttime_t tv; struct fast_timer *t, *nextt; do_gettimeofday_fast(&tv); seq_printf(m, "Fast timers added: %i\n", fast_timers_added); seq_printf(m, "Fast timers started: %i\n", fast_timers_started); seq_printf(m, "Fast timer interrupts: %i\n", fast_timer_ints); seq_printf(m, "Fast timers expired: %i\n", fast_timers_expired); seq_printf(m, "Fast timers deleted: %i\n", fast_timers_deleted); seq_printf(m, "Fast timer running: %s\n", fast_timer_running ? "yes" : "no"); seq_printf(m, "Current time: %lu.%06lu\n", (unsigned long)tv.tv_jiff, (unsigned long)tv.tv_usec); #ifdef FAST_TIMER_SANITY_CHECKS seq_printf(m, "Sanity failed: %i\n", sanity_failed); #endif seq_putc(m, '\n'); #ifdef DEBUG_LOG_INCLUDED { int end_i = debug_log_cnt; i = 0; if (debug_log_cnt_wrapped) i = debug_log_cnt; while (i != end_i || debug_log_cnt_wrapped) { seq_printf(m, debug_log_string[i], debug_log_value[i]); if (seq_has_overflowed(m)) return 0; i = (i+1) % DEBUG_LOG_MAX; } } seq_putc(m, '\n'); #endif num_to_show = (fast_timers_started < NUM_TIMER_STATS ? fast_timers_started: NUM_TIMER_STATS); seq_printf(m, "Timers started: %i\n", fast_timers_started); for (i = 0; i < num_to_show; i++) { int cur = (fast_timers_started - i - 1) % NUM_TIMER_STATS; #if 1 //ndef FAST_TIMER_LOG seq_printf(m, "div: %i freq: %i delay: %i\n", timer_div_settings[cur], timer_freq_settings[cur], timer_delay_settings[cur]); #endif #ifdef FAST_TIMER_LOG t = &timer_started_log[cur]; seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n", t->name, (unsigned long)t->tv_set.tv_jiff, (unsigned long)t->tv_set.tv_usec, (unsigned long)t->tv_expires.tv_jiff, (unsigned long)t->tv_expires.tv_usec, t->delay_us, t->data); if (seq_has_overflowed(m)) return 0; #endif } seq_putc(m, '\n'); #ifdef FAST_TIMER_LOG num_to_show = (fast_timers_added < NUM_TIMER_STATS ? fast_timers_added: NUM_TIMER_STATS); seq_printf(m, "Timers added: %i\n", fast_timers_added); for (i = 0; i < num_to_show; i++) { t = &timer_added_log[(fast_timers_added - i - 1) % NUM_TIMER_STATS]; seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n", t->name, (unsigned long)t->tv_set.tv_jiff, (unsigned long)t->tv_set.tv_usec, (unsigned long)t->tv_expires.tv_jiff, (unsigned long)t->tv_expires.tv_usec, t->delay_us, t->data); if (seq_has_overflowed(m)) return 0; } seq_putc(m, '\n'); num_to_show = (fast_timers_expired < NUM_TIMER_STATS ? fast_timers_expired: NUM_TIMER_STATS); seq_printf(m, "Timers expired: %i\n", fast_timers_expired); for (i = 0; i < num_to_show; i++) { t = &timer_expired_log[(fast_timers_expired - i - 1) % NUM_TIMER_STATS]; seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n", t->name, (unsigned long)t->tv_set.tv_jiff, (unsigned long)t->tv_set.tv_usec, (unsigned long)t->tv_expires.tv_jiff, (unsigned long)t->tv_expires.tv_usec, t->delay_us, t->data); if (seq_has_overflowed(m)) return 0; } seq_putc(m, '\n'); #endif seq_puts(m, "Active timers:\n"); local_irq_save(flags); t = fast_timer_list; while (t) { nextt = t->next; local_irq_restore(flags); seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n", t->name, (unsigned long)t->tv_set.tv_jiff, (unsigned long)t->tv_set.tv_usec, (unsigned long)t->tv_expires.tv_jiff, (unsigned long)t->tv_expires.tv_usec, t->delay_us, t->data); if (seq_has_overflowed(m)) return 0; local_irq_save(flags); if (t->next != nextt) printk(KERN_WARNING "timer removed!\n"); t = nextt; } local_irq_restore(flags); return 0; }
static int bm_proc_dummy_product_type_show(struct seq_file *file, void *ptr) { seq_printf(file, "%d\n", PRODUCT_AS2K_3200); return 0; }
static int bm_proc_dummy_board_type_show(struct seq_file *file, void *ptr) { seq_printf(file, "%d\n", PPAL_BOARD_TYPE_DUMMY); return 0; }
static int bm_proc_dummy_snmp_sys_oid_show(struct seq_file *file, void *ptr) { seq_printf(file, "%s\n", "dummy"); return 0; }
static int bm_proc_dummy_admin_passwd_show(struct seq_file *file, void *ptr) { seq_printf(file, "%s\n", "dummy_user"); return 0; }
static int bm_proc_dummy_enterprise_name_show(struct seq_file *file, void *ptr) { seq_printf(file, "%s\n", "AUTELAN"); return 0; }
static int bm_proc_dummy_software_name_show(struct seq_file *file, void *ptr) { seq_printf(file, "%s\n", "Auteware"); return 0; }
static int bm_proc_dummy_product_base_mac_addr_show(struct seq_file *file, void *ptr) { seq_printf(file, "%s\n", "000A7AFE0106"); return 0; }
static int profiling_events_show_human_readable(struct seq_file *seq_file, void *v) { #define MALI_EVENT_ID_IS_HW(event_id) (((event_id & 0x00FF0000) >= MALI_PROFILING_EVENT_CHANNEL_GP0) && ((event_id & 0x00FF0000) <= MALI_PROFILING_EVENT_CHANNEL_PP7)) static u64 start_time = 0; loff_t *spos = v; u32 index; u64 timestamp; u32 event_id; u32 data[5]; index = (u32)*spos; /* Retrieve all events */ if (_MALI_OSK_ERR_OK == _mali_internal_profiling_get_event(index, ×tamp, &event_id, data)) { seq_printf(seq_file, "%llu %u %u %u %u %u %u # ", timestamp, event_id, data[0], data[1], data[2], data[3], data[4]); if (0 == index) { start_time = timestamp; } seq_printf(seq_file, "[%06u] ", index); switch(event_id & 0x0F000000) { case MALI_PROFILING_EVENT_TYPE_SINGLE: seq_printf(seq_file, "SINGLE | "); break; case MALI_PROFILING_EVENT_TYPE_START: seq_printf(seq_file, "START | "); break; case MALI_PROFILING_EVENT_TYPE_STOP: seq_printf(seq_file, "STOP | "); break; case MALI_PROFILING_EVENT_TYPE_SUSPEND: seq_printf(seq_file, "SUSPEND | "); break; case MALI_PROFILING_EVENT_TYPE_RESUME: seq_printf(seq_file, "RESUME | "); break; default: seq_printf(seq_file, "0x%01X | ", (event_id & 0x0F000000) >> 24); break; } switch(event_id & 0x00FF0000) { case MALI_PROFILING_EVENT_CHANNEL_SOFTWARE: seq_printf(seq_file, "SW | "); break; case MALI_PROFILING_EVENT_CHANNEL_GP0: seq_printf(seq_file, "GP0 | "); break; case MALI_PROFILING_EVENT_CHANNEL_PP0: seq_printf(seq_file, "PP0 | "); break; case MALI_PROFILING_EVENT_CHANNEL_PP1: seq_printf(seq_file, "PP1 | "); break; case MALI_PROFILING_EVENT_CHANNEL_PP2: seq_printf(seq_file, "PP2 | "); break; case MALI_PROFILING_EVENT_CHANNEL_PP3: seq_printf(seq_file, "PP3 | "); break; case MALI_PROFILING_EVENT_CHANNEL_PP4: seq_printf(seq_file, "PP4 | "); break; case MALI_PROFILING_EVENT_CHANNEL_PP5: seq_printf(seq_file, "PP5 | "); break; case MALI_PROFILING_EVENT_CHANNEL_PP6: seq_printf(seq_file, "PP6 | "); break; case MALI_PROFILING_EVENT_CHANNEL_PP7: seq_printf(seq_file, "PP7 | "); break; case MALI_PROFILING_EVENT_CHANNEL_GPU: seq_printf(seq_file, "GPU | "); break; default: seq_printf(seq_file, "0x%02X | ", (event_id & 0x00FF0000) >> 16); break; } if (MALI_EVENT_ID_IS_HW(event_id)) { if (((event_id & 0x0F000000) == MALI_PROFILING_EVENT_TYPE_START) || ((event_id & 0x0F000000) == MALI_PROFILING_EVENT_TYPE_STOP)) { switch(event_id & 0x0000FFFF) { case MALI_PROFILING_EVENT_REASON_START_STOP_HW_PHYSICAL: seq_printf(seq_file, "PHYSICAL | "); break; case MALI_PROFILING_EVENT_REASON_START_STOP_HW_VIRTUAL: seq_printf(seq_file, "VIRTUAL | "); break; default: seq_printf(seq_file, "0x%04X | ", event_id & 0x0000FFFF); break; } } else { seq_printf(seq_file, "0x%04X | ", event_id & 0x0000FFFF); } } else { seq_printf(seq_file, "0x%04X | ", event_id & 0x0000FFFF); } seq_printf(seq_file, "T0 + 0x%016llX\n", timestamp - start_time); return 0; }
static int bm_proc_dummy_master_slot_id_show(struct seq_file *file, void *ptr) { seq_printf(file, "%d\n", 1); return 0; }
static int seq_proc_show(struct seq_file *s,void *v) { return seq_printf(s,"%s\n","it is a test!"); }
static int bm_proc_dummy_module_name_show(struct seq_file *file, void *ptr) { seq_printf(file, "%s\n", "dummy_module"); return 0; }
static int version_proc_show(struct seq_file *m, void *v) { seq_printf(m, "driver: %s\n", TOSHIBA_ACPI_VERSION); seq_printf(m, "proc_interface: %d\n", PROC_INTERFACE_VERSION); return 0; }
static int bm_proc_dummy_product_sn_show(struct seq_file *file, void *ptr) { seq_printf(file, "%s\n", "1000"); return 0; }
static void dccp_print_conntrack(struct seq_file *s, struct nf_conn *ct) { seq_printf(s, "%s ", dccp_state_names[ct->proto.dccp.state]); }
static void holly_show_cpuinfo(struct seq_file *m) { seq_printf(m, "vendor\t\t: IBM\n"); seq_printf(m, "machine\t\t: PPC750 GX/CL\n"); }
static int yam_seq_show(struct seq_file *seq, void *v) { struct net_device *dev = v; const struct yam_port *yp = netdev_priv(dev); seq_printf(seq, "Device %s\n", dev->name); seq_printf(seq, " Up %d\n", netif_running(dev)); seq_printf(seq, " Speed %u\n", yp->bitrate); seq_printf(seq, " IoBase 0x%x\n", yp->iobase); seq_printf(seq, " BaudRate %u\n", yp->baudrate); seq_printf(seq, " IRQ %u\n", yp->irq); seq_printf(seq, " TxState %u\n", yp->tx_state); seq_printf(seq, " Duplex %u\n", yp->dupmode); seq_printf(seq, " HoldDly %u\n", yp->holdd); seq_printf(seq, " TxDelay %u\n", yp->txd); seq_printf(seq, " TxTail %u\n", yp->txtail); seq_printf(seq, " SlotTime %u\n", yp->slot); seq_printf(seq, " Persist %u\n", yp->pers); seq_printf(seq, " TxFrames %lu\n", dev->stats.tx_packets); seq_printf(seq, " RxFrames %lu\n", dev->stats.rx_packets); seq_printf(seq, " TxInt %u\n", yp->nb_mdint); seq_printf(seq, " RxInt %u\n", yp->nb_rxint); seq_printf(seq, " RxOver %lu\n", dev->stats.rx_fifo_errors); seq_printf(seq, "\n"); return 0; }
static int proc_keys_show(struct seq_file *m, void *v) { struct rb_node *_p = v; struct key *key = rb_entry(_p, struct key, serial_node); struct timespec now; unsigned long timo; char xbuf[12]; int rc; /* check whether the current task is allowed to view the key (assuming * non-possession) */ rc = key_task_permission(make_key_ref(key, 0), current, KEY_VIEW); if (rc < 0) return 0; now = current_kernel_time(); rcu_read_lock(); /* come up with a suitable timeout value */ if (key->expiry == 0) { memcpy(xbuf, "perm", 5); } else if (now.tv_sec >= key->expiry) { memcpy(xbuf, "expd", 5); } else { timo = key->expiry - now.tv_sec; if (timo < 60) sprintf(xbuf, "%lus", timo); else if (timo < 60*60) sprintf(xbuf, "%lum", timo / 60); else if (timo < 60*60*24) sprintf(xbuf, "%luh", timo / (60*60)); else if (timo < 60*60*24*7) sprintf(xbuf, "%lud", timo / (60*60*24)); else sprintf(xbuf, "%luw", timo / (60*60*24*7)); } #define showflag(KEY, LETTER, FLAG) \ (test_bit(FLAG, &(KEY)->flags) ? LETTER : '-') seq_printf(m, "%08x %c%c%c%c%c%c %5d %4s %08x %5d %5d %-9.9s ", key->serial, showflag(key, 'I', KEY_FLAG_INSTANTIATED), showflag(key, 'R', KEY_FLAG_REVOKED), showflag(key, 'D', KEY_FLAG_DEAD), showflag(key, 'Q', KEY_FLAG_IN_QUOTA), showflag(key, 'U', KEY_FLAG_USER_CONSTRUCT), showflag(key, 'N', KEY_FLAG_NEGATIVE), atomic_read(&key->usage), xbuf, key->perm, key->uid, key->gid, key->type->name); #undef showflag if (key->type->describe) key->type->describe(key, m); seq_putc(m, '\n'); rcu_read_unlock(); return 0; }
static int mdfld_dc_pipeline_a_regs_info(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *)m->private; struct drm_device *dev = node->minor->dev; int i; seq_printf(m, "DISPLAY PIPELINE A\n"); seq_printf(m, "\tPALETTE A/B/C:\n"); seq_printf(m, "\t\t reg(0xa000) = 0x%x\n", REG_READ(0xa000)); seq_printf(m, "\tMIPI A:\n"); for (i=0xb000; i<0xb0ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tDSI ADAPTER:\n"); for (i=0xb104; i<=0xb138; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tDPLL:\n"); for (i=0xf000; i<0xffff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tPIPELINE A:\n"); for (i=0x60000; i<0x600ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tPORT CONTROL:\n"); for (i=0x61190; i<0x61194; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); seq_printf(m, "\tPIPELINE A CONTROL:\n"); for (i=0x70000; i<0x700ff; i+=4) seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i)); return 0; }
static int autofs_show_options(struct seq_file *m, struct dentry *root) { struct autofs_sb_info *sbi = autofs_sbi(root->d_sb); struct inode *root_inode = d_inode(root->d_sb->s_root); if (!sbi) return 0; seq_printf(m, ",fd=%d", sbi->pipefd); if (!uid_eq(root_inode->i_uid, GLOBAL_ROOT_UID)) seq_printf(m, ",uid=%u", from_kuid_munged(&init_user_ns, root_inode->i_uid)); if (!gid_eq(root_inode->i_gid, GLOBAL_ROOT_GID)) seq_printf(m, ",gid=%u", from_kgid_munged(&init_user_ns, root_inode->i_gid)); seq_printf(m, ",pgrp=%d", pid_vnr(sbi->oz_pgrp)); seq_printf(m, ",timeout=%lu", sbi->exp_timeout/HZ); seq_printf(m, ",minproto=%d", sbi->min_proto); seq_printf(m, ",maxproto=%d", sbi->max_proto); if (autofs_type_offset(sbi->type)) seq_printf(m, ",offset"); else if (autofs_type_direct(sbi->type)) seq_printf(m, ",direct"); else seq_printf(m, ",indirect"); #ifdef CONFIG_CHECKPOINT_RESTORE if (sbi->pipe) seq_printf(m, ",pipe_ino=%ld", file_inode(sbi->pipe)->i_ino); else seq_printf(m, ",pipe_ino=-1"); #endif return 0; }
void c2k_show_cpuinfo(struct seq_file *m) { seq_printf(m, "Vendor\t\t: GEFanuc\n"); seq_printf(m, "coherency\t: %s\n", COHERENCY_SETTING); }
static int mpc_show(struct seq_file *m, void *v) { struct mpoa_client *mpc = v; int i; in_cache_entry *in_entry; eg_cache_entry *eg_entry; struct timeval now; unsigned char ip_string[16]; if (v == SEQ_START_TOKEN) { atm_mpoa_disp_qos(m); return 0; } seq_printf(m, "\nInterface %d:\n\n", mpc->dev_num); seq_printf(m, "Ingress Entries:\nIP address State Holding time Packets fwded VPI VCI\n"); do_gettimeofday(&now); for (in_entry = mpc->in_cache; in_entry; in_entry = in_entry->next) { sprintf(ip_string, "%pI4", &in_entry->ctrl_info.in_dst_ip); seq_printf(m, "%-16s%s%-14lu%-12u", ip_string, ingress_state_string(in_entry->entry_state), in_entry->ctrl_info.holding_time - (now.tv_sec-in_entry->tv.tv_sec), in_entry->packets_fwded); if (in_entry->shortcut) seq_printf(m, " %-3d %-3d", in_entry->shortcut->vpi, in_entry->shortcut->vci); seq_printf(m, "\n"); } seq_printf(m, "\n"); seq_printf(m, "Egress Entries:\nIngress MPC ATM addr\nCache-id State Holding time Packets recvd Latest IP addr VPI VCI\n"); for (eg_entry = mpc->eg_cache; eg_entry; eg_entry = eg_entry->next) { unsigned char *p = eg_entry->ctrl_info.in_MPC_data_ATM_addr; for (i = 0; i < ATM_ESA_LEN; i++) seq_printf(m, "%02x", p[i]); seq_printf(m, "\n%-16lu%s%-14lu%-15u", (unsigned long)ntohl(eg_entry->ctrl_info.cache_id), egress_state_string(eg_entry->entry_state), (eg_entry->ctrl_info.holding_time - (now.tv_sec-eg_entry->tv.tv_sec)), eg_entry->packets_rcvd); /* */ sprintf(ip_string, "%pI4", &eg_entry->latest_ip_addr); seq_printf(m, "%-16s", ip_string); if (eg_entry->shortcut) seq_printf(m, " %-3d %-3d", eg_entry->shortcut->vpi, eg_entry->shortcut->vci); seq_printf(m, "\n"); } seq_printf(m, "\n"); return 0; }
static int rmnet_usb_data_status(struct seq_file *s, void *unused) { struct usbnet *unet = s->private; seq_printf(s, "RMNET_MODE_LLP_IP: %d\n", test_bit(RMNET_MODE_LLP_IP, &unet->data[0])); seq_printf(s, "RMNET_MODE_LLP_ETH: %d\n", test_bit(RMNET_MODE_LLP_ETH, &unet->data[0])); seq_printf(s, "RMNET_MODE_QOS: %d\n", test_bit(RMNET_MODE_QOS, &unet->data[0])); seq_printf(s, "Net MTU: %u\n", unet->net->mtu); seq_printf(s, "rx_urb_size: %u\n", unet->rx_urb_size); seq_printf(s, "rx skb q len: %u\n", unet->rxq.qlen); seq_printf(s, "rx skb done q len: %u\n", unet->done.qlen); seq_printf(s, "rx errors: %lu\n", unet->net->stats.rx_errors); seq_printf(s, "rx over errors: %lu\n", unet->net->stats.rx_over_errors); seq_printf(s, "rx length errors: %lu\n", unet->net->stats.rx_length_errors); seq_printf(s, "rx packets: %lu\n", unet->net->stats.rx_packets); seq_printf(s, "rx bytes: %lu\n", unet->net->stats.rx_bytes); seq_printf(s, "tx skb q len: %u\n", unet->txq.qlen); seq_printf(s, "tx errors: %lu\n", unet->net->stats.tx_errors); seq_printf(s, "tx packets: %lu\n", unet->net->stats.tx_packets); seq_printf(s, "tx bytes: %lu\n", unet->net->stats.tx_bytes); seq_printf(s, "suspend count: %d\n", unet->suspend_count); seq_printf(s, "EVENT_DEV_OPEN: %d\n", test_bit(EVENT_DEV_OPEN, &unet->flags)); seq_printf(s, "EVENT_TX_HALT: %d\n", test_bit(EVENT_TX_HALT, &unet->flags)); seq_printf(s, "EVENT_RX_HALT: %d\n", test_bit(EVENT_RX_HALT, &unet->flags)); seq_printf(s, "EVENT_RX_MEMORY: %d\n", test_bit(EVENT_RX_MEMORY, &unet->flags)); seq_printf(s, "EVENT_DEV_ASLEEP: %d\n", test_bit(EVENT_DEV_ASLEEP, &unet->flags)); return 0; }
/* cpu_ss_period */ static int cpu_ss_period_proc_show(struct seq_file *m, void *v) { seq_printf(m, "%d (s) %d (ns)\n", mt_cpu_ss_period_s, mt_cpu_ss_period_ns); return 0; }