Ignore:
Timestamp:
Jun 29, 2014, 12:53:25 PM (10 years ago)
Author:
alain
Message:

Introducing two modifications regarding the locks protecting
exclusive access to BDV and TTY peripherals channels:

  • use the giet_lock_t type to have only one lock per cache line.
  • store these locks in the seg_kernel_data or in seg_kernel_uncdata, depending on the GIET_NO HARD_CC configuration parameter, to have cacheable locks when it is possible.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/ioc_driver.c

    r343 r350  
    183183    unsigned int flags;            // page protection flags
    184184    unsigned int ix2;              // page index in IOMMU PT1 page table
    185     unsigned int ppn_first;        // first physical page number for user buffer
     185    unsigned int ppn_first = 0;    // first physical page number for user buffer
    186186    unsigned int buf_xaddr = 0;    // user buffer virtual address in IO space (if IOMMU)
    187187    paddr_t      buf_paddr = 0;    // user buffer physical address (if no IOMMU),
     
    308308
    309309#if       ( USE_IOC_BDV )
    310 
    311 #if GIET_DEBUG_IOC_DRIVER
    312 _printf("\n[IOC DEBUG] Calling BDV driver\n");
    313 #endif
    314310        if (to_mem) error = _bdv_read ( mode, lba, buf_paddr, count);
    315311        else        error = _bdv_write( mode, lba, buf_paddr, count);
    316 
    317312#elif ( USE_IOC_SPI )
    318 
    319 #if GIET_DEBUG_IOC_DRIVER
    320 _printf("\n[IOC DEBUG] Calling SPI driver\n");
    321 #endif
    322313        if (to_mem) error = _sdc_read (mode, lba, buf_paddr, count);
    323314        else        error = _sdc_write(mode, lba, buf_paddr, count);
    324 
    325315#elif ( USE_IOC_HBA )
    326 
    327 #if GIET_DEBUG_IOC_DRIVER
    328 _printf("\n[IOC DEBUG] Calling HBA driver\n");
    329 #endif
    330316        if (to_mem) error = _hba_read (channel, mode, lba, buf_paddr, count);
    331317        else        error = _hba_write(channel, mode, lba, buf_paddr, count);
    332 
    333318#elif ( USE_IOC_RDK )
    334 
    335 #if GIET_DEBUG_IOC_DRIVER
    336 _printf("\n[IOC DEBUG] Calling RDK driver\n");
    337 #endif
    338319        if (to_mem) error = _rdk_read (lba, buf_vaddr, count);
    339320        else        error = _rdk_write(lba, buf_vaddr, count);
    340 
    341321#endif
    342322
Note: See TracChangeset for help on using the changeset viewer.