lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 7 Aug 2014 13:06:57 +0800
From:	Ley Foon Tan <lftan@...era.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Linux-Arch <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	Chung-Lin Tang <cltang@...esourcery.com>
Subject: Re: [PATCH v2 20/29] nios2: Cpuinfo handling

On Fri, Jul 18, 2014 at 10:43 AM, Ley Foon Tan <lftan@...era.com> wrote:
> On Tue, Jul 15, 2014 at 5:47 PM, Arnd Bergmann <arnd@...db.de> wrote:
>> 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?
> Not.
>
>
>>> +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.
> Okay, I will look into your suggestion.
> Thanks.

I have tried this. But, it seem that we can't use
single_start/next/stop here. They are static functions to
fs/seq_file.c.

Regards
Ley Foon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists