/*
 *  include/asm-alpha/kl_mem.h
 */

#ifndef __ASM_KL_MEM_H
#define __ASM_KL_MEM_H

/* XXX - the following macros are used by functions in kl_page.c and in */
/*       function kl_virtop, they still have to be defined properly, */
/*       all the following macros have first to be set with correct values. */
/*       I don't have a clue what values to use for alpha architecture!!! */

#error "CODE REQUIRES PORT TO HOST ARCHITECTURE"

/* I filled in values from kl_page.c. Don't know if they are correct... */
#define KL_PGDIR_SHIFT        (KL_PAGE_SHIFT+(KL_PAGE_SHIFT-3)*2)
#define KL_PGDIR_SIZE         (1UL<<KL_PGDIR_SHIFT)
#define KL_PGDIR_MASK         (~(KL_PGDIR_SIZE-1))
#define KL_PMD_SHIFT          (KL_PAGE_SHIFT+(KL_PAGE_SHIFT-3)*1)
#define KL_PMD_SIZE           (1UL<<KL_PMD_SHIFT)
#define KL_PMD_MASK           (~(KL_PMD_SIZE-1))

#define KL_PTRS_PER_PGD       (1UL<<(KL_PAGE_SHIFT-3)) 
#define KL_PTRS_PER_PMD       (1UL<<(KL_PAGE_SHIFT-3))
#define KL_PTRS_PER_PTE       (1UL<<(KL_PAGE_SHIFT-3))

/* this values describe the bits of pgd/pmd/pte entries that are status bits */
/* and therefor have to be masked in order to get valid addresses */
#define KL_PMD_BASE_MASK      
#define KL_PT_BASE_MASK       
#define KL_PAGE_BASE_MASK     


/* XXX - maybe has to be adapted for this platform?
 */
#define KL_KADDR_IS_HIGHMEM(vaddr) (vaddr >= KL_HIGH_MEMORY)

#endif /* __ASM_KL_MEM_H */
