qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 1/1] target-ppc: Support rtas_get_sysparm(PROCESSO


From: Sukadev Bhattiprolu
Subject: Re: [Qemu-ppc] [PATCH 1/1] target-ppc: Support rtas_get_sysparm(PROCESSOR_MODULE_INFO)
Date: Fri, 30 Oct 2015 09:33:36 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

Alexey Kardashevskiy address@hidden wrote:

Thanks for the review. Agree with your other comments and will address
them. 

| >+#include <string.h>
| >+#include <errno.h>
| >+
| >+/*
| >+ * TODO: <fts.h> doesn't like __USE_FILE_OFFSET64 but hopefully we don't
| 
| 
| That's ugly :-/ Google is saying there is
| http://linux.die.net/man/3/ftw which looks newer => better.

Like I say below...

| 
| 
| >+ *     need to deal with large file offsets in /proc/device-tree. If we
| >+ *     must, we should fall back to walking the tree with opendir().
| >+ *     Another alternative is nftw() but that requires us to use global
| >+ *     variables to keep the counts of chips/cores etc so we need to
| >+ *     serialize access to the globals.
| >+ */

for each file, nftw() calls the 'fn()' parameter but there is no state
info saved from one call to next. So if we find a chip and want to increment
a counter, we need a global variable and some serialization. I was trying
to keep it simple, given that device-tree files we care about are not large.
But should we add a mutex and increment global counts instead?

Sukadev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]