Ticket #10279: always-set-page-dir-on-context-switch.diff

File always-set-page-dir-on-context-switch.diff, 1.1 KB (added by bonefish, 8 years ago)
  • src/system/kernel/arch/x86/arch_thread.cpp

    diff --git a/src/system/kernel/arch/x86/arch_thread.cpp b/src/system/kernel/arch/x86/arch_thread.cpp
    index e7b1298..a21744c 100644
    a b arch_thread_context_switch(Thread* from, Thread* to)  
    226226    if (toAddressSpace != NULL
    227227        && (toPagingStructures = static_cast<X86VMTranslationMap*>(
    228228                toAddressSpace->TranslationMap())->PagingStructures())
    229                     != activePagingStructures) {
     229//                  != activePagingStructures) {
     230                    != NULL) {
    230231        // update on which CPUs the address space is used
    231232        int cpu = cpuData->cpu_num;
    232233        atomic_and(&activePagingStructures->active_on_cpus,
    arch_thread_context_switch(Thread* from, Thread* to)  
    239240
    240241        // set the page directory, if it changes
    241242        addr_t newPageDirectory = toPagingStructures->pgdir_phys;
    242         if (newPageDirectory != activePagingStructures->pgdir_phys)
     243//      if (newPageDirectory != activePagingStructures->pgdir_phys)
    243244            x86_swap_pgdir(newPageDirectory);
    244245
    245246        // This CPU no longer uses the previous paging structures.