tech-kern archive

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


On Dec 23, 2010, at 1:48 PM, Frank Wille wrote:

> Hi!
> A few days ago I learned from Christos that the MI part of cpu_info, i.e.
> ci_data, should be exposed when _KMEMUSER is defined, to make vmstat
> compile again.

PowerPC is nasty since it needs three different cpu_infos.  I think I'm going
to move each variants stuff into its own structure and then add them via a
union.  Not pretty but a bit better than what's there now.

> An alternative would have been when "struct cpu_data ci_info" was the first
> entry in all cpu_info structures.

That's great when that can be done.  A few arches don't allow it yet
(alpha for instance).  

> Then I saw Matt's last changes, which defined __HAVE_CPU_DATA_FIRST for
> nearly any port, which seems to be like this is exactly what was needed?

Well, Christos started it and I ran it into the ground.

> Now I ask myself: could we use __HAVE_CPU_DATA_FIRST somehow as an
> alternative for _KMEMUSER? Or do we want to change each <cpu>/include/cpu.h
> to expose cpu_info when _KMEMUSER is defined?
> I already tried to fix powerpc/include/cpu.h, but it seems that all ports
> are affected...? Probably I'm just confused and missing some information?
> ;)

<sys/cpu.h> has never exposed things to userland before.  Now that kmem 
grovelers need to do it, we are finding issues.

Home | Main Index | Thread Index | Old Index