Changeset a2a46ba in mainline


Ignore:
Timestamp:
2006-03-09T22:17:01Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9faddb3
Parents:
901122b
Message:

Fix generic page hash table to align down page addresses.
This was the ia64 userspace show stopper.

File:
1 edited

Legend:

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

    r901122b ra2a46ba  
    4242#include <memstr.h>
    4343#include <adt/hash_table.h>
     44#include <align.h>
    4445
    4546static index_t hash(__native key[]);
     
    165166{
    166167        pte_t *t;
    167         __native key[2] = { (__address) as, page };
     168        __native key[2] = { (__address) as, page = ALIGN_DOWN(page, PAGE_SIZE) };
    168169       
    169170        spinlock_lock(&page_ht_lock);
     
    203204void ht_mapping_remove(as_t *as, __address page)
    204205{
    205         __native key[2] = { (__address) as, page };
     206        __native key[2] = { (__address) as, page = ALIGN_DOWN(page, PAGE_SIZE) };
    206207       
    207208        spinlock_lock(&page_ht_lock);
     
    232233        link_t *hlp;
    233234        pte_t *t = NULL;
    234         __native key[2] = { (__address) as, page };
     235        __native key[2] = { (__address) as, page = ALIGN_DOWN(page, PAGE_SIZE) };
    235236       
    236237        spinlock_lock(&page_ht_lock);
Note: See TracChangeset for help on using the changeset viewer.