qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(P


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)
Date: Tue, 10 Nov 2015 17:58:27 +1100
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/10/2015 03:46 PM, Sukadev Bhattiprolu wrote:
Alexey Kardashevskiy address@hidden wrote:
<snip>

| >| When exactly does a socket become a module? The SPAPR spec uses "sockets" 
here.
| >
| >I am trying to get the terminology too :-) Is socket a slot where a
| >module is attached?
|
| Sorry, no idea.

Ok.

|
|
| >
| >I will change the variable name 'modules' to 'sockets'.
| >|
| >|
| >| >+    modinfo->si[0].chips = chips;
| >| >+    modinfo->si[0].cores_per_chip = cores / chips;
| >|
| >|
| >| What if no "ibm,chip-id" was found and chips == 0?
| >
| >If we fail to readdir(xscom) or fail to read the 'ibm,chip-id',
| >we return an error which we check above.
|
|
| You assume that if there is /proc/device-tree, then there is always
| "xscom@" but this might not be always the case, like PR KVM on
| embedded PPC64.

For ibm,chip-id, we do try to read the file (and eliminate duplicates


No, you do not try reading "ibm,chip-id" if there is no "xscom@" under /proc/device-tree, there is "continue":

+        if (strncmp(xscom_prefix, ent->d_name, strlen(xscom_prefix))) {
+            continue;
+        }



chip ids) If we can't read the file (hash_table_add_contents()) we
return an error, but will check again.



--
Alexey



reply via email to

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