Ignore:
Timestamp:
2016-01-07T13:41:38Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f4582c6
Parents:
7254df6
Message:

sparc64: TSB needs to be naturally aligned

The ITSB and DTSB on sun4u and the TSB on sun4v are mapped by a single
64K page, so they need to be aligned to 64K. Moreover, the TSB pointer
contruction demands the natural alignment: 32K for ITSB/DTSB on sun4u
and 64K for the unified TSB on sun4v.

The code was also streamlined and made more beautiful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/arch/mm/sun4v/tsb.h

    r7254df6 re08162b  
    4444 * in TLBs - only one TLB entry will do.
    4545 */
    46 #define TSB_SIZE                        3       /* when changing this, change
    47                                                  * as.c as well */
    48 #define TSB_ENTRY_COUNT                 (512 * (1 << TSB_SIZE))
     46#define TSB_ENTRY_COUNT                 4096
     47#define TSB_ENTRY_MASK                  (TSB_ENTRY_COUNT - 1)
     48#define TSB_SIZE                        (TSB_ENTRY_COUNT * sizeof(tsb_entry_t))
     49#define TSB_FRAMES                      SIZE2FRAMES(TSB_SIZE)
    4950
    5051#ifndef __ASM__
Note: See TracChangeset for help on using the changeset viewer.