Changeset 36b01bb2 in mainline


Ignore:
Timestamp:
2006-01-24T14:38:29Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fa7d9c4
Parents:
0d8d27c
Message:

ia64 ASID management code (not tested).

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • arch/ia64/Makefile.inc

    r0d8d27c r36b01bb2  
    6565        arch/$(ARCH)/src/ivt.S \
    6666        arch/$(ARCH)/src/interrupt.c \
     67        arch/$(ARCH)/src/mm/asid.c \
    6768        arch/$(ARCH)/src/mm/frame.c \
    6869        arch/$(ARCH)/src/mm/page.c \
     70        arch/$(ARCH)/src/mm/tlb.c \
    6971        arch/$(ARCH)/src/drivers/it.c
  • arch/ia64/include/mm/asid.h

    r0d8d27c r36b01bb2  
    3434typedef __u32 asid_t;
    3535
    36 /*
    37  * ASID_MAX can range from 2^18 - 1 to 2^24 - 1,
    38  * depending on architecture implementation.
     36/** Number of ia64 RIDs (Region Identifiers) per kernel ASID. */
     37#define RIDS_PER_ASID           7
     38#define RID_OVERFLOW            16777216        /* 2^24 */
     39
     40/**
     41 * The point is to have ASID_MAX_ARCH big enough
     42 * so that it is never reached and the ASID allocation
     43 * mechanism in asid_get() never resorts to stealing.
    3944 */
    40 #define ASID_MAX_ARCH   16777215        /* 2^24 - 1 */
     45#define ASID_MAX_ARCH           ((asid_t) -1)   /**< This value is never reached. */
    4146
    42 #define asid_find_free()        ASID_MAX_ARCH
     47/**
     48 * Value used to recognize the situation when all ASIDs were already allocated.
     49 */
     50#define ASID_OVERFLOW           (RID_OVERFLOW/RIDS_PER_ASID)
     51
    4352#define asid_put_arch(x)
    4453
  • genarch/src/mm/asid.c

    r0d8d27c r36b01bb2  
    126126                tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0);
    127127                tlb_shootdown_finalize();
     128                tlb_invalidate_asid(asid);
    128129                as->asid = ASID_INVALID;
    129130               
  • generic/src/mm/tlb.c

    r0d8d27c r36b01bb2  
    5555       
    5656        /*
    57          * TODO: assemble shootdown message.
     57         * TODO: wrap parameters into a message and
     58         * dispatch it to all CPUs excluding this one.
    5859         */
     60       
    5961        tlb_shootdown_ipi_send();
    6062
    61         switch (type) {
    62             case TLB_INVL_ALL:
    63                 tlb_invalidate_all();
    64                 break;
    65             case TLB_INVL_ASID:
    66                 tlb_invalidate_asid(asid);
    67                 break;
    68             case TLB_INVL_PAGES:
    69                 tlb_invalidate_pages(asid, page, cnt);
    70                 break;
    71             default:
    72                 panic("unknown tlb_invalidate_type_t value: %d\n", type);
    73                 break;
    74         }
    75        
    7663busy_wait:     
    7764        for (i = 0; i<config.cpu_count; i++)
     
    9683        spinlock_lock(&tlblock);
    9784        spinlock_unlock(&tlblock);
    98         tlb_invalidate_all();   /* TODO: use valid ASID */
     85        tlb_invalidate_all();   /* TODO: be more finer-grained in what to invalidate */
    9986        CPU->tlb_active = 1;
    10087}
Note: See TracChangeset for help on using the changeset viewer.