mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Added new RPCs to query global affinity space and physical CPU IDs from TOPO session.
This commit is contained in:
@@ -46,4 +46,14 @@ struct Genode::Topo_session_client : Rpc_client<Topo_session>
|
||||
{
|
||||
call<Rpc_reconstruct>(affinity);
|
||||
}
|
||||
|
||||
unsigned phys_id(const Affinity::Location &loc) override
|
||||
{
|
||||
return call<Rpc_phys_id>(loc);
|
||||
}
|
||||
|
||||
Affinity::Space const global_affinity_space() override
|
||||
{
|
||||
return call<Rpc_total_core_count>();
|
||||
}
|
||||
};
|
||||
@@ -50,11 +50,15 @@ struct Genode::Topo_session : Session
|
||||
virtual Topology::Numa_region node_at_id(unsigned node_id) = 0;
|
||||
virtual unsigned node_count() = 0;
|
||||
virtual void reconstruct(const Affinity) = 0;
|
||||
virtual unsigned phys_id(Affinity::Location const &) = 0;
|
||||
virtual Affinity::Space const global_affinity_space() = 0;
|
||||
|
||||
GENODE_RPC(Rpc_node_affinity, Topology::Numa_region, node_affinity_of, Affinity::Location const &);
|
||||
GENODE_RPC(Rpc_node_id, Topology::Numa_region, node_at_id, unsigned);
|
||||
GENODE_RPC(Rpc_node_count, unsigned, node_count);
|
||||
GENODE_RPC(Rpc_reconstruct, void, reconstruct, Affinity);
|
||||
GENODE_RPC(Rpc_phys_id, unsigned, phys_id, Affinity::Location const &);
|
||||
GENODE_RPC(Rpc_total_core_count, Affinity::Space const, global_affinity_space);
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_node_affinity, Rpc_node_id, Rpc_node_count, Rpc_reconstruct);
|
||||
GENODE_RPC_INTERFACE(Rpc_node_affinity, Rpc_node_id, Rpc_node_count, Rpc_reconstruct, Rpc_phys_id, Rpc_total_core_count);
|
||||
};
|
||||
Reference in New Issue
Block a user