On 31.01.18 16:54, Julien Grall wrote:

On 31/01/18 11:32, Volodymyr Babchuk wrote:
I thought about vpsci.h, but basically you will have only 2 functions in it and
the number of PSCI calls. That's it.

IsĀ  this really a problem? It is quite natural to find declarations for something.c in something.h. By moving declaration into different file, you are hiding it from anyone who does not carry sacred knowledge (or use grep/cscope, yes). And then, when people decide to extend something.c they continue to put declarations into inappropriate.h. Just look at processor.h as a good example. All functions it define are implemented either in traps.c or domain.c. But functions from processor.c are defined in procinfo.h.
I can tell for sure, that this confuses newbies.


So it is not going to help to update because the header will unlikely need to
change when adding new PSCI call.

Yes. But at least we can put comment above switch(fid):

/* Please don't forget to update call count in (v)psci.h */

See my answer on my own e-mail I sent few minutes ago. I said I will create a the vpsci.h.


I can't find it anywhere. I even tried Markmail. Would you please point it to me?

I wrote it somewhere and thought I sent but I can't find it :/. Sorry for that.

Ah, I see. It is okay.

I was saying after some thought, I will create a header vpsic.h with number in it.

I will also add a comment as you suggested.

Thanks. I'm fine with this.



--
Volodymyr Babchuk

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to