Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IA64] More Itanium PAL spec updates

Additional updates to conform with Rev 2.2 of Volume 2 of "Intel
Itanium Architecture Software Developer's Manual" (January 2006).

Add pal_bus_features_s bits 52 & 53 (page 2:347)
Add pal_vm_info_2_s field max_purges (page 2:2:451)
Add PAL_GET_HW_POLICY call (page 2:381)
Add PAL_SET_HW_POLICY call (page 2:439)

Sample output before:
---------------------------------------------------------------------
cobra:~ # cat /proc/pal/cpu0/vm_info
Physical Address Space : 50 bits
Virtual Address Space : 61 bits
Protection Key Registers(PKR) : 16
Implemented bits in PKR.key : 24
Hash Tag ID : 0x2
Size of RR.rid : 24
Supported memory attributes : WB, UC, UCE, WC, NaTPage
---------------------------------------------------------------------

Sample output after:
---------------------------------------------------------------------
cobra:~ # cat /proc/pal/cpu0/vm_info
Physical Address Space : 50 bits
Virtual Address Space : 61 bits
Protection Key Registers(PKR) : 16
Implemented bits in PKR.key : 24
Hash Tag ID : 0x2
Max Purges : 1
Size of RR.rid : 24
Supported memory attributes : WB, UC, UCE, WC, NaTPage
---------------------------------------------------------------------

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Russ Anderson and committed by
Tony Luck
5b4d5681 895309ff

+49 -3
+8 -1
arch/ia64/kernel/palinfo.c
··· 315 315 "Protection Key Registers(PKR) : %d\n" 316 316 "Implemented bits in PKR.key : %d\n" 317 317 "Hash Tag ID : 0x%x\n" 318 - "Size of RR.rid : %d\n", 318 + "Size of RR.rid : %d\n" 319 + "Max Purges : ", 319 320 vm_info_1.pal_vm_info_1_s.phys_add_size, 320 321 vm_info_2.pal_vm_info_2_s.impl_va_msb+1, 321 322 vm_info_1.pal_vm_info_1_s.max_pkr+1, 322 323 vm_info_1.pal_vm_info_1_s.key_size, 323 324 vm_info_1.pal_vm_info_1_s.hash_tag_id, 324 325 vm_info_2.pal_vm_info_2_s.rid_size); 326 + if (vm_info_2.pal_vm_info_2_s.max_purges == PAL_MAX_PURGES) 327 + p += sprintf(p, "unlimited\n"); 328 + else 329 + p += sprintf(p, "%d\n", 330 + vm_info_2.pal_vm_info_2_s.max_purges ? 331 + vm_info_2.pal_vm_info_2_s.max_purges : 1); 325 332 } 326 333 327 334 if (ia64_pal_mem_attrib(&attrib) == 0) {
+41 -2
include/asm-ia64/pal.h
··· 20 20 * 00/05/24 eranian Updated to latest PAL spec, fix structures bugs, added 21 21 * 00/05/25 eranian Support for stack calls, and static physical calls 22 22 * 00/06/18 eranian Support for stacked physical calls 23 + * 06/10/26 rja Support for Intel Itanium Architecture Software Developer's 24 + * Manual Rev 2.2 (Jan 2006) 23 25 */ 24 26 25 27 /* ··· 71 69 #define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */ 72 70 #define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */ 73 71 #define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */ 72 + #define PAL_GET_HW_POLICY 48 /* Get current hardware resource sharing policy */ 73 + #define PAL_SET_HW_POLICY 49 /* Set current hardware resource sharing policy */ 74 74 75 75 #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ 76 76 #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ ··· 106 102 * cache without sideeffects 107 103 * and "restrict" was 1 108 104 */ 105 + #define PAL_STATUS_REQUIRES_MEMORY (-9) /* Call requires PAL memory buffer */ 109 106 110 107 /* Processor cache level in the heirarchy */ 111 108 typedef u64 pal_cache_level_t; ··· 843 838 u64 pbf_req_bus_parking : 1; 844 839 u64 pbf_bus_lock_mask : 1; 845 840 u64 pbf_enable_half_xfer_rate : 1; 846 - u64 pbf_reserved2 : 22; 841 + u64 pbf_reserved2 : 20; 842 + u64 pbf_enable_shared_line_replace : 1; 843 + u64 pbf_enable_exclusive_line_replace : 1; 847 844 u64 pbf_disable_xaction_queueing : 1; 848 845 u64 pbf_disable_resp_err_check : 1; 849 846 u64 pbf_disable_berr_check : 1; ··· 1085 1078 *(u64 *)bus_ratio = iprv.v1; 1086 1079 if (itc_ratio) 1087 1080 *(u64 *)itc_ratio = iprv.v2; 1081 + return iprv.status; 1082 + } 1083 + 1084 + /* 1085 + * Get the current hardware resource sharing policy of the processor 1086 + */ 1087 + static inline s64 1088 + ia64_pal_get_hw_policy (u64 proc_num, u64 *cur_policy, u64 *num_impacted, 1089 + u64 *la) 1090 + { 1091 + struct ia64_pal_retval iprv; 1092 + PAL_CALL(iprv, PAL_GET_HW_POLICY, proc_num, 0, 0); 1093 + if (cur_policy) 1094 + *cur_policy = iprv.v0; 1095 + if (num_impacted) 1096 + *num_impacted = iprv.v1; 1097 + if (la) 1098 + *la = iprv.v2; 1088 1099 return iprv.status; 1089 1100 } 1090 1101 ··· 1430 1405 return iprv.status; 1431 1406 } 1432 1407 1408 + /* 1409 + * Set the current hardware resource sharing policy of the processor 1410 + */ 1411 + static inline s64 1412 + ia64_pal_set_hw_policy (u64 policy) 1413 + { 1414 + struct ia64_pal_retval iprv; 1415 + PAL_CALL(iprv, PAL_SET_HW_POLICY, policy, 0, 0); 1416 + return iprv.status; 1417 + } 1418 + 1433 1419 /* Cause the processor to enter SHUTDOWN state, where prefetching and execution are 1434 1420 * suspended, but cause cache and TLB coherency to be maintained. 1435 1421 * This is usually called in IA-32 mode. ··· 1564 1528 } pal_vm_info_1_s; 1565 1529 } pal_vm_info_1_u_t; 1566 1530 1531 + #define PAL_MAX_PURGES 0xFFFF /* all ones is means unlimited */ 1532 + 1567 1533 typedef union pal_vm_info_2_u { 1568 1534 u64 pvi2_val; 1569 1535 struct { 1570 1536 u64 impl_va_msb : 8, 1571 1537 rid_size : 8, 1572 - reserved : 48; 1538 + max_purges : 16, 1539 + reserved : 32; 1573 1540 } pal_vm_info_2_s; 1574 1541 } pal_vm_info_2_u_t; 1575 1542