Changeset d0a0f12 in mainline for genarch/src/mm/asid_fifo.c


Ignore:
Timestamp:
2006-02-10T14:12:57Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0882a9a
Parents:
a3eeceb6
Message:

Make ASID FIFO for mips32 be allocated statically.
Make ASID FIFO for sparc64 and ia64 be allocated dynamically.
Fix ia64 to call asid_fifo_init().
All three architectures now call asid_fifo_init() from as_arch_init().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • genarch/src/mm/asid_fifo.c

    ra3eeceb6 rd0a0f12  
    3333#include <adt/fifo.h>
    3434
     35#define FIFO_STATIC_LIMIT       1024
     36#define FIFO_STATIC             (ASIDS_ALLOCABLE<FIFO_STATIC_LIMIT)
    3537/**
    3638 * FIFO queue containing unassigned ASIDs.
    3739 * Can be only accessed when asidlock is held.
    3840 */
    39 FIFO_INITIALIZE(free_asids, asid_t, ASIDS_ALLOCABLE);
     41#if FIFO_STATIC
     42FIFO_INITIALIZE_STATIC(free_asids, asid_t, ASIDS_ALLOCABLE);
     43#else
     44FIFO_INITIALIZE_DYNAMIC(free_asids, asid_t, ASIDS_ALLOCABLE);
     45#endif
    4046
    4147/** Initialize data structures for O(1) ASID allocation and deallocation. */
     
    4349{
    4450        int i;
    45        
     51
     52        #if (!FIFO_STATIC)
     53        fifo_create(free_asids);
     54        #endif
     55               
    4656        for (i = 0; i < ASIDS_ALLOCABLE; i++) {
    4757                fifo_push(free_asids, ASID_START + i);
Note: See TracChangeset for help on using the changeset viewer.