lkml.org 
[lkml]   [2014]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 20/29] nios2: Cpuinfo handling
Date
On Tuesday 15 July 2014 16:45:47 Ley Foon Tan wrote:
> +static void *cpuinfo_start(struct seq_file *m, loff_t *pos)
> +{
> + unsigned long i = *pos;
> +
> + return i < num_possible_cpus() ? (void *) (i + 1) : NULL;
> +}
> +
> +static void *cpuinfo_next(struct seq_file *m, void *v, loff_t *pos)
> +{
> + ++*pos;
> + return cpuinfo_start(m, pos);
> +}

Do you actually have SMP support?

> +const struct seq_operations cpuinfo_op = {
> + .start = cpuinfo_start,
> + .next = cpuinfo_next,
> + .stop = cpuinfo_stop,
> + .show = show_cpuinfo
> +};

If not, you can use single_start/next/stop here rather than defining your own.

Arnd


\
 
 \ /
  Last update: 2014-07-15 12:21    [W:0.150 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site