Rev 1903 | Rev 2009 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1903 | Rev 1987 | ||
---|---|---|---|
Line 60... | Line 60... | ||
60 | 60 | ||
61 | int as_constructor_arch(as_t *as, int flags) |
61 | int as_constructor_arch(as_t *as, int flags) |
62 | { |
62 | { |
63 | #ifdef CONFIG_TSB |
63 | #ifdef CONFIG_TSB |
64 | int order = fnzb32(((ITSB_ENTRY_COUNT+DTSB_ENTRY_COUNT)*sizeof(tsb_entry_t))>>FRAME_WIDTH); |
64 | int order = fnzb32(((ITSB_ENTRY_COUNT+DTSB_ENTRY_COUNT)*sizeof(tsb_entry_t))>>FRAME_WIDTH); |
65 | uintptr_t tsb = (uintptr_t) frame_alloc(order, flags); |
65 | uintptr_t tsb = (uintptr_t) frame_alloc(order, flags | FRAME_KA); |
66 | 66 | ||
67 | if (!tsb) |
67 | if (!tsb) |
68 | return -1; |
68 | return -1; |
69 | 69 | ||
70 | as->arch.itsb = (tsb_entry_t *) tsb; |
70 | as->arch.itsb = (tsb_entry_t *) tsb; |
Line 76... | Line 76... | ||
76 | 76 | ||
77 | int as_destructor_arch(as_t *as) |
77 | int as_destructor_arch(as_t *as) |
78 | { |
78 | { |
79 | #ifdef CONFIG_TSB |
79 | #ifdef CONFIG_TSB |
80 | count_t cnt = ((ITSB_ENTRY_COUNT+DTSB_ENTRY_COUNT)*sizeof(tsb_entry_t))>>FRAME_WIDTH; |
80 | count_t cnt = ((ITSB_ENTRY_COUNT+DTSB_ENTRY_COUNT)*sizeof(tsb_entry_t))>>FRAME_WIDTH; |
81 | frame_free((uintptr_t) as->arch.itsb); |
81 | frame_free(KA2PA((uintptr_t) as->arch.itsb)); |
82 | return cnt; |
82 | return cnt; |
83 | #else |
83 | #else |
84 | return 0; |
84 | return 0; |
85 | #endif |
85 | #endif |
86 | } |
86 | } |