Ignore:
Timestamp:
Jul 15, 2015, 6:17:41 PM (9 years ago)
Author:
bellefin
Message:

Introduce mmc distributed lock
The locks are distributed in the kernel heaps (one lock in each cluster) and there is a global table in the kernel data segment which contains the addresses of all the locks.
The _mmc_boot_mode variable is defined in boot.c and kernel_init.c and defines which kind of lock is used.
The distributed locks are initialized inside the kernel_init() function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_kernel/kernel_init.c

    r592 r615  
    113113unsigned int   _tty0_boot_mode = 0;
    114114
     115// Kernel uses distributed locks to protect MMC   
     116__attribute__((section(".kdata")))
     117unsigned int   _mmc_boot_mode = 0;
     118
    115119// Kernel uses sqt_lock to protect command allocator in HBA       
    116120__attribute__((section(".kdata")))
     
    161165#if GIET_DEBUG_INIT
    162166_nolock_printf("\n[DEBUG KINIT] P[%d,%d,%d] completes kernel heap init\n", x, y, p );
     167#endif
     168        //////  distributed lock for MMC
     169        _mmc_init_locks();
     170
     171#if GIET_DEBUG_INIT
     172_nolock_printf("\n[DEBUG KINIT] P[%d,%d,%d] completes MMC distributed lock init\n", x , y , p );
    163173#endif
    164174        //////  distributed lock for TTY0
Note: See TracChangeset for help on using the changeset viewer.