Changeset 5fceec7 in mainline


Ignore:
Timestamp:
2006-03-17T00:40:01Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9f52563
Parents:
93165be
Message:

Cleanup of amd64 code.

Location:
arch/amd64
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/include/mm/page.h

    r93165be r5fceec7  
    6262                return x - 0xffff800000000000;
    6363}
    64 /* Linker symbol */
    65 extern int ktext_start;
    66 extern int kdata_end;
    67 static inline __address pa2ka(__address x)
    68 {
    69         if (x >= ka2pa((__address)(&kdata_end)) || \
    70             x <= ka2pa((__address)&ktext_start))
    71                 return x + 0xffff800000000000;
    72         else
    73                 return x + 0xffffffff80000000;
    74 }
    7564# define KA2PA(x)      ka2pa((__address)x)
    76 # define PA2KA(x)      pa2ka((__address)x)
    77 # define PA2KA_IDENT(x)      (((__address) (x)) + 0xffff800000000000)
    7865# define PA2KA_CODE(x)      (((__address) (x)) + 0xffffffff80000000)
     66# define PA2KA(x)      (((__address) (x)) + 0xffff800000000000)
    7967#else
    8068# define KA2PA(x)      ((x) - 0xffffffff80000000)
    8169# define PA2KA(x)      ((x) + 0xffffffff80000000)
    82 # define PA2KA_DATA(x)      ((x) + 0xffff800000000000)
    8370#endif
    8471
  • arch/amd64/src/mm/page.c

    r93165be r5fceec7  
    8686                for (cur = 0; cur < last_frame; cur += FRAME_SIZE) {
    8787                        /* Standard identity mapping */
    88                         page_mapping_insert(AS_KERNEL, PA2KA_IDENT(cur), cur, identity_flags);
     88                        page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, identity_flags);
    8989                }
    9090                /* Upper kernel mapping
     
    129129
    130130                SET_FRAME_FLAGS_ARCH(aptl_3, PTL3_INDEX_ARCH(oldpage), PAGE_NOT_PRESENT);
    131                 if (aptl_3 == helper_ptl3)
     131                if (KA2PA(aptl_3) == KA2PA(helper_ptl3))
    132132                        SET_PTL3_FLAGS_ARCH(aptl_2, PTL2_INDEX_ARCH(oldpage), PAGE_NOT_PRESENT);
    133                 if (aptl_2 == helper_ptl2)
     133                if (KA2PA(aptl_2) == KA2PA(helper_ptl2))
    134134                        SET_PTL2_FLAGS_ARCH(aptl_1, PTL1_INDEX_ARCH(oldpage), PAGE_NOT_PRESENT);
    135                 if (aptl_1 == helper_ptl1)
     135                if (KA2PA(aptl_1) == KA2PA(helper_ptl1))
    136136                        SET_PTL1_FLAGS_ARCH(&ptl_0, PTL0_INDEX_ARCH(oldpage), PAGE_NOT_PRESENT);
    137137        }
Note: See TracChangeset for help on using the changeset viewer.