Changeset a0d74fd in mainline for arch/ia64/include/mm/tlb.h


Ignore:
Timestamp:
2006-03-01T11:07:04Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ad03fe
Parents:
2c49fbbe
Message:

ia64 work.
Provide PA2KA(identity) mapping for kernel data references via Alternate Data TLB Fault handler.
Add before_thread_runs_arch() that maps kstack, if necessary.
Add easy to use dtlb_mapping_insert() for comfortable insertion of kernel data mappings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia64/include/mm/tlb.h

    r2c49fbbe ra0d74fd  
    3939#include <typedefs.h>
    4040
    41 extern void tc_mapping_insert(__address va, asid_t asid, vhpt_entry_t entry, bool dtc);
    42 extern void dtc_mapping_insert(__address va, asid_t asid, vhpt_entry_t entry);
    43 extern void itc_mapping_insert(__address va, asid_t asid, vhpt_entry_t entry);
     41/** Data and instruction Translation Register indices. */
     42#define DTR_KERNEL      0
     43#define ITR_KERNEL      0
     44#define DTR_KSTACK      1
     45
     46/** Portion of TLB insertion format data structure. */
     47union tlb_entry {
     48        __u64 word[2];
     49        struct {
     50                /* Word 0 */
     51                unsigned p : 1;                 /**< Present. */
     52                unsigned : 1;
     53                unsigned ma : 3;                /**< Memory attribute. */
     54                unsigned a : 1;                 /**< Accessed. */
     55                unsigned d : 1;                 /**< Dirty. */
     56                unsigned pl : 2;                /**< Privilege level. */
     57                unsigned ar : 3;                /**< Access rights. */
     58                unsigned long long ppn : 38;    /**< Physical Page Number, a.k.a. PFN. */
     59                unsigned : 2;
     60                unsigned ed : 1;
     61                unsigned ig1 : 11;
     62
     63                /* Word 1 */
     64                unsigned : 2;
     65                unsigned ps : 6;                /**< Page size will be 2^ps. */
     66                unsigned key : 24;              /**< Protection key, unused. */
     67                unsigned : 32;
     68        } __attribute__ ((packed));
     69} __attribute__ ((packed));
     70typedef union tlb_entry tlb_entry_t;
     71
     72extern void tc_mapping_insert(__address va, asid_t asid, tlb_entry_t entry, bool dtc);
     73extern void dtc_mapping_insert(__address va, asid_t asid, tlb_entry_t entry);
     74extern void itc_mapping_insert(__address va, asid_t asid, tlb_entry_t entry);
    4475
    4576extern void tr_mapping_insert(__address va, asid_t asid, tlb_entry_t entry, bool dtr, index_t tr);
    4677extern void dtr_mapping_insert(__address va, asid_t asid, tlb_entry_t entry, index_t tr);
    4778extern void itr_mapping_insert(__address va, asid_t asid, tlb_entry_t entry, index_t tr);
     79
     80extern void dtlb_mapping_insert(__address page, __address frame, bool dtr, index_t tr);
    4881
    4982extern void alternate_instruction_tlb_fault(__u64 vector, struct exception_regdump *pstate);
Note: See TracChangeset for help on using the changeset viewer.