Ignore:
Timestamp:
2014-12-22T17:47:40Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c7d5ad
Parents:
eae91e0 (diff), 759ea0d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge the CHT pre-integration branch

This branch contains:

  • the merge of lp:~adam-hraska+lp/helenos/rcu, which brings:
  • a new preemptible kernel RCU variant called A-RCU,
  • a preemptible variant of Podzimek's non-preemptible kernel RCU and
  • a new variant of usersace RCU,
  • a new concurrent hash table (CHT) implementation based on RCU,
  • a deployment of CHT in kernel futex handling,
  • a deployment of the userspace RCU in the implementation of upgradable futexes,

all described in Adam Hraska's master thesis named Read-Copy-Update
for HelenOS, defended in 2013 at MFF UK; furthemore, the branch
fixes two synchronization bugs in condvars and waitq, respectively:

  • revid:adam.hraska+hos@gmail.com-20121116144921-3to9u1tn1sg07rg7
  • revid:adam.hraska+hos@gmail.com-20121116173623-km7gwtqixwudpe66
  • build fixes required to pass make check
  • overhaul of ia64 and sparc64 trap handling, to allow exc_dispatch() to be used now when the kernel is more picky about CPU state accounting
  • an important fix of the sparc64/sun4v preemptible trap handler
  • various other fixes of issues discovered on non-x86 architectures
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/trap/interrupt.c

    reae91e0 r235d31d  
    3636#include <arch/interrupt.h>
    3737#include <arch/trap/interrupt.h>
     38#include <arch/trap/exception.h>
     39#include <arch/trap/mmu.h>
    3840#include <arch/sparc64.h>
    3941#include <interrupt.h>
     
    4345#include <arch/asm.h>
    4446#include <arch/barrier.h>
     47#include <arch/drivers/tick.h>
    4548#include <print.h>
    4649#include <arch.h>
     
    4952#include <synch/spinlock.h>
    5053
    51 /** Register Interrupt Level Handler.
    52  *
    53  * @param n       Interrupt Level (1 - 15).
    54  * @param name    Short descriptive string.
    55  * @param handler Handler.
    56  *
    57  */
    58 void interrupt_register(unsigned int n, const char *name, iroutine_t handler)
     54void exc_arch_init(void)
    5955{
    60         ASSERT(n >= IVT_FIRST);
    61         ASSERT(n <= IVT_ITEMS);
    62        
    63         exc_register(n - IVT_FIRST, name, true, handler);
     56        exc_register(TT_INSTRUCTION_ACCESS_EXCEPTION,
     57            "instruction_access_exception", false,
     58            instruction_access_exception);
     59        exc_register(TT_INSTRUCTION_ACCESS_ERROR,
     60            "instruction_access_error", false,
     61            instruction_access_error);
     62
     63#ifdef SUN4V
     64        exc_register(TT_IAE_UNAUTH_ACCESS,
     65            "iae_unauth_access", false,
     66            instruction_access_exception);
     67        exc_register(TT_IAE_NFO_PAGE,
     68            "iae_nfo_page", false,
     69            instruction_access_exception);
     70#endif
     71
     72        exc_register(TT_ILLEGAL_INSTRUCTION,
     73            "illegal_instruction", false,
     74            illegal_instruction);
     75        exc_register(TT_PRIVILEGED_OPCODE,
     76            "privileged_opcode", false,
     77            privileged_opcode);
     78        exc_register(TT_UNIMPLEMENTED_LDD,
     79            "unimplemented_LDD", false,
     80            unimplemented_LDD);
     81        exc_register(TT_UNIMPLEMENTED_STD,
     82            "unimplemented_STD", false,
     83            unimplemented_STD);
     84
     85#ifdef SUN4V
     86        exc_register(TT_DAE_INVALID_ASI,
     87            "dae_invalid_asi", false,
     88            data_access_exception);
     89        exc_register(TT_DAE_PRIVILEGE_VIOLATION,
     90            "dae_privilege_violation", false,
     91            data_access_exception);
     92        exc_register(TT_DAE_NC_PAGE,
     93            "dae_nc_page", false,
     94            data_access_exception);
     95        exc_register(TT_DAE_NC_PAGE,
     96            "dae_nc_page", false,
     97            data_access_exception);
     98        exc_register(TT_DAE_NFO_PAGE,
     99            "dae_nfo_page", false,
     100            data_access_exception);
     101#endif
     102
     103        exc_register(TT_FP_DISABLED,
     104            "fp_disabled", true,
     105            fp_disabled);
     106        exc_register(TT_FP_EXCEPTION_IEEE_754,
     107            "fp_exception_ieee_754", false,
     108            fp_exception_ieee_754);
     109        exc_register(TT_FP_EXCEPTION_OTHER,
     110            "fp_exception_other", false,
     111            fp_exception_other);
     112        exc_register(TT_TAG_OVERFLOW,
     113            "tag_overflow", false,
     114            tag_overflow);     
     115        exc_register(TT_DIVISION_BY_ZERO,
     116            "division_by_zero", false,
     117            division_by_zero);
     118        exc_register(TT_DATA_ACCESS_EXCEPTION,
     119            "data_access_exception", false,
     120            data_access_exception);
     121        exc_register(TT_DATA_ACCESS_ERROR,
     122            "data_access_error", false,
     123            data_access_error);
     124        exc_register(TT_MEM_ADDRESS_NOT_ALIGNED,
     125            "mem_address_not_aligned", false,
     126            mem_address_not_aligned);
     127        exc_register(TT_LDDF_MEM_ADDRESS_NOT_ALIGNED,
     128            "LDDF_mem_address_not_aligned", false,
     129            LDDF_mem_address_not_aligned);
     130        exc_register(TT_STDF_MEM_ADDRESS_NOT_ALIGNED,
     131            "STDF_mem_address_not_aligned", false,
     132            STDF_mem_address_not_aligned);
     133        exc_register(TT_PRIVILEGED_ACTION,
     134            "privileged_action", false,
     135            privileged_action);
     136        exc_register(TT_LDQF_MEM_ADDRESS_NOT_ALIGNED,
     137            "LDQF_mem_address_not_aligned", false,
     138            LDQF_mem_address_not_aligned);
     139        exc_register(TT_STQF_MEM_ADDRESS_NOT_ALIGNED,
     140            "STQF_mem_address_not_aligned", false,
     141            STQF_mem_address_not_aligned);
     142
     143        exc_register(TT_INTERRUPT_LEVEL_14,
     144            "interrupt_level_14", true,
     145            tick_interrupt);
     146
     147#ifdef SUN4U
     148        exc_register(TT_INTERRUPT_VECTOR_TRAP,
     149            "interrupt_vector_trap", true,
     150            interrupt);
     151#endif
     152
     153        exc_register(TT_FAST_INSTRUCTION_ACCESS_MMU_MISS,
     154            "fast_instruction_access_mmu_miss", true,
     155            fast_instruction_access_mmu_miss);
     156        exc_register(TT_FAST_DATA_ACCESS_MMU_MISS,
     157            "fast_data_access_mmu_miss", true,
     158            fast_data_access_mmu_miss);
     159        exc_register(TT_FAST_DATA_ACCESS_PROTECTION,
     160            "fast_data_access_protection", true,
     161            fast_data_access_protection);       
     162
     163#ifdef SUN4V
     164        exc_register(TT_CPU_MONDO,
     165            "cpu_mondo", true,
     166            cpu_mondo);
     167#endif
     168
    64169}
    65170
Note: See TracChangeset for help on using the changeset viewer.