mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-01 23:20:55 +00:00
parent
d989046604
commit
3bd361dfa5
@ -116,9 +116,10 @@ namespace Genode {
|
|||||||
|
|
||||||
} _state;
|
} _state;
|
||||||
|
|
||||||
Cpu_session_capability _cpu_session_cap;
|
Cpu_session_capability _cpu_session_cap;
|
||||||
Thread_capability _thread_cap;
|
Thread_capability _thread_cap;
|
||||||
Exception_handlers _exceptions;
|
Affinity::Location const _location;
|
||||||
|
Exception_handlers _exceptions;
|
||||||
|
|
||||||
addr_t _pd;
|
addr_t _pd;
|
||||||
|
|
||||||
@ -149,8 +150,6 @@ namespace Genode {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const Affinity::Location location;
|
|
||||||
|
|
||||||
Pager_object(Cpu_session_capability cpu_session_cap,
|
Pager_object(Cpu_session_capability cpu_session_cap,
|
||||||
Thread_capability thread_cap,
|
Thread_capability thread_cap,
|
||||||
unsigned long badge, Affinity::Location location,
|
unsigned long badge, Affinity::Location location,
|
||||||
@ -175,6 +174,8 @@ namespace Genode {
|
|||||||
_exception_sigh = sigh;
|
_exception_sigh = sigh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Affinity::Location location() const { return _location; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign PD selector to PD
|
* Assign PD selector to PD
|
||||||
*/
|
*/
|
||||||
|
@ -510,7 +510,8 @@ template <uint8_t EV>
|
|||||||
void Exception_handlers::register_handler(Pager_object *obj, Mtd mtd,
|
void Exception_handlers::register_handler(Pager_object *obj, Mtd mtd,
|
||||||
void (* __attribute__((regparm(1))) func)(addr_t))
|
void (* __attribute__((regparm(1))) func)(addr_t))
|
||||||
{
|
{
|
||||||
unsigned use_cpu = obj->location.xpos();
|
unsigned use_cpu = obj->location().xpos();
|
||||||
|
|
||||||
if (!kernel_hip()->is_cpu_enabled(use_cpu) || !pager_threads[use_cpu]) {
|
if (!kernel_hip()->is_cpu_enabled(use_cpu) || !pager_threads[use_cpu]) {
|
||||||
warning("invalid CPU parameter used in pager object");
|
warning("invalid CPU parameter used in pager object");
|
||||||
throw Region_map::Invalid_thread();
|
throw Region_map::Invalid_thread();
|
||||||
@ -581,8 +582,8 @@ Pager_object::Pager_object(Cpu_session_capability cpu_session_cap,
|
|||||||
_client_exc_pt_sel(cap_map()->insert(NUM_INITIAL_PT_LOG2)),
|
_client_exc_pt_sel(cap_map()->insert(NUM_INITIAL_PT_LOG2)),
|
||||||
_client_exc_vcpu(Native_thread::INVALID_INDEX),
|
_client_exc_vcpu(Native_thread::INVALID_INDEX),
|
||||||
_cpu_session_cap(cpu_session_cap), _thread_cap(thread_cap),
|
_cpu_session_cap(cpu_session_cap), _thread_cap(thread_cap),
|
||||||
_exceptions(this),
|
_location(location),
|
||||||
location(location)
|
_exceptions(this)
|
||||||
{
|
{
|
||||||
uint8_t res;
|
uint8_t res;
|
||||||
|
|
||||||
@ -870,7 +871,7 @@ void Pager_object::_oom_handler(addr_t pager_dst, addr_t pager_src,
|
|||||||
addr_t Pager_object::get_oom_portal()
|
addr_t Pager_object::get_oom_portal()
|
||||||
{
|
{
|
||||||
addr_t const pt_oom = sel_oom_portal();
|
addr_t const pt_oom = sel_oom_portal();
|
||||||
unsigned const use_cpu = location.xpos();
|
unsigned const use_cpu = _location.xpos();
|
||||||
|
|
||||||
if (kernel_hip()->is_cpu_enabled(use_cpu) && pager_threads[use_cpu]) {
|
if (kernel_hip()->is_cpu_enabled(use_cpu) && pager_threads[use_cpu]) {
|
||||||
addr_t const ec_sel = pager_threads[use_cpu]->native_thread().ec_sel;
|
addr_t const ec_sel = pager_threads[use_cpu]->native_thread().ec_sel;
|
||||||
@ -953,7 +954,7 @@ Pager_entrypoint::Pager_entrypoint(Rpc_cap_factory &cap_factory)
|
|||||||
Pager_capability Pager_entrypoint::manage(Pager_object *obj)
|
Pager_capability Pager_entrypoint::manage(Pager_object *obj)
|
||||||
{
|
{
|
||||||
/* let handle pager_object of pager thread on same CPU */
|
/* let handle pager_object of pager thread on same CPU */
|
||||||
unsigned use_cpu = obj->location.xpos();
|
unsigned use_cpu = obj->location().xpos();
|
||||||
if (!kernel_hip()->is_cpu_enabled(use_cpu) || !pager_threads[use_cpu]) {
|
if (!kernel_hip()->is_cpu_enabled(use_cpu) || !pager_threads[use_cpu]) {
|
||||||
warning("invalid CPU parameter used in pager object");
|
warning("invalid CPU parameter used in pager object");
|
||||||
return Pager_capability();
|
return Pager_capability();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user