diff options
| author | Zhang, Yanmin <yanmin_zhang@linux.intel.com> | 2006-02-26 22:37:45 -0500 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2006-03-30 20:14:12 -0500 |
| commit | f19180056ea09ec6a5d32e741234451a1e6eba4d (patch) | |
| tree | 386a178dd80773e3b62e6989f4faaaddb9602aa8 /include | |
| parent | d1127e40e8d75cd3855e35424937c73d0bcec558 (diff) | |
[IA64] Export cpu cache info by sysfs
The patch exports 8 attributes of cpu cache info under
/sys/devices/system/cpu/cpuX/cache/indexX:
1) level
2) type
3) coherency_line_size
4) ways_of_associativity
5) size
6) shared_cpu_map
7) attributes
8) number_of_sets: number_of_sets=size/ways_of_associativity/coherency_line_size.
Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ia64/pal.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 4e7e6f23b08c..5d229c5953e9 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
| @@ -68,6 +68,7 @@ | |||
| 68 | #define PAL_SHUTDOWN 40 /* enter processor shutdown state */ | 68 | #define PAL_SHUTDOWN 40 /* enter processor shutdown state */ |
| 69 | #define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */ | 69 | #define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */ |
| 70 | #define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */ | 70 | #define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */ |
| 71 | #define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */ | ||
| 71 | 72 | ||
| 72 | #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ | 73 | #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ |
| 73 | #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ | 74 | #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ |
| @@ -1647,6 +1648,33 @@ ia64_pal_logical_to_phys(u64 proc_number, pal_logical_to_physical_t *mapping) | |||
| 1647 | 1648 | ||
| 1648 | return iprv.status; | 1649 | return iprv.status; |
| 1649 | } | 1650 | } |
| 1651 | |||
| 1652 | typedef struct pal_cache_shared_info_s | ||
| 1653 | { | ||
| 1654 | u64 num_shared; | ||
| 1655 | pal_proc_n_log_info1_t ppli1; | ||
| 1656 | pal_proc_n_log_info2_t ppli2; | ||
| 1657 | } pal_cache_shared_info_t; | ||
| 1658 | |||
| 1659 | /* Get information on logical to physical processor mappings. */ | ||
| 1660 | static inline s64 | ||
| 1661 | ia64_pal_cache_shared_info(u64 level, | ||
| 1662 | u64 type, | ||
| 1663 | u64 proc_number, | ||
| 1664 | pal_cache_shared_info_t *info) | ||
| 1665 | { | ||
| 1666 | struct ia64_pal_retval iprv; | ||
| 1667 | |||
| 1668 | PAL_CALL(iprv, PAL_CACHE_SHARED_INFO, level, type, proc_number); | ||
| 1669 | |||
| 1670 | if (iprv.status == PAL_STATUS_SUCCESS) { | ||
| 1671 | info->num_shared = iprv.v0; | ||
| 1672 | info->ppli1.ppli1_data = iprv.v1; | ||
| 1673 | info->ppli2.ppli2_data = iprv.v2; | ||
| 1674 | } | ||
| 1675 | |||
| 1676 | return iprv.status; | ||
| 1677 | } | ||
| 1650 | #endif /* __ASSEMBLY__ */ | 1678 | #endif /* __ASSEMBLY__ */ |
| 1651 | 1679 | ||
| 1652 | #endif /* _ASM_IA64_PAL_H */ | 1680 | #endif /* _ASM_IA64_PAL_H */ |
