Commit 82924e54 authored by Khalid Aziz's avatar Khalid Aziz Committed by David S. Miller

sparc64: Add ADI capability to cpu capabilities

Add ADI (Application Data Integrity) capability to cpu capabilities list.
ADI capability allows virtual addresses to be encoded with a tag in
bits 63-60. This tag serves as an access control key for the regions
of virtual address with ADI enabled and a key set on them. Hypervisor
encodes this capability as "adp" in "hwcap-list" property in machine
description.
Signed-off-by: default avatarKhalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01fd3c27
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
* really available. So we simply advertise only "crypto" support. * really available. So we simply advertise only "crypto" support.
*/ */
#define HWCAP_SPARC_CRYPTO 0x04000000 /* CRYPTO insns available */ #define HWCAP_SPARC_CRYPTO 0x04000000 /* CRYPTO insns available */
#define HWCAP_SPARC_ADI 0x08000000 /* ADI available */
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
......
...@@ -380,7 +380,8 @@ static const char *hwcaps[] = { ...@@ -380,7 +380,8 @@ static const char *hwcaps[] = {
*/ */
"mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2", "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2",
"ASIBlkInit", "fmaf", "vis3", "hpc", "random", "trans", "fjfmau", "ASIBlkInit", "fmaf", "vis3", "hpc", "random", "trans", "fjfmau",
"ima", "cspare", "pause", "cbcond", "ima", "cspare", "pause", "cbcond", NULL /*reserved for crypto */,
"adp",
}; };
static const char *crypto_hwcaps[] = { static const char *crypto_hwcaps[] = {
...@@ -396,7 +397,7 @@ void cpucap_info(struct seq_file *m) ...@@ -396,7 +397,7 @@ void cpucap_info(struct seq_file *m)
seq_puts(m, "cpucaps\t\t: "); seq_puts(m, "cpucaps\t\t: ");
for (i = 0; i < ARRAY_SIZE(hwcaps); i++) { for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
unsigned long bit = 1UL << i; unsigned long bit = 1UL << i;
if (caps & bit) { if (hwcaps[i] && (caps & bit)) {
seq_printf(m, "%s%s", seq_printf(m, "%s%s",
printed ? "," : "", hwcaps[i]); printed ? "," : "", hwcaps[i]);
printed++; printed++;
...@@ -450,7 +451,7 @@ static void __init report_hwcaps(unsigned long caps) ...@@ -450,7 +451,7 @@ static void __init report_hwcaps(unsigned long caps)
for (i = 0; i < ARRAY_SIZE(hwcaps); i++) { for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
unsigned long bit = 1UL << i; unsigned long bit = 1UL << i;
if (caps & bit) if (hwcaps[i] && (caps & bit))
report_one_hwcap(&printed, hwcaps[i]); report_one_hwcap(&printed, hwcaps[i]);
} }
if (caps & HWCAP_SPARC_CRYPTO) if (caps & HWCAP_SPARC_CRYPTO)
...@@ -485,7 +486,7 @@ static unsigned long __init mdesc_cpu_hwcap_list(void) ...@@ -485,7 +486,7 @@ static unsigned long __init mdesc_cpu_hwcap_list(void)
for (i = 0; i < ARRAY_SIZE(hwcaps); i++) { for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
unsigned long bit = 1UL << i; unsigned long bit = 1UL << i;
if (!strcmp(prop, hwcaps[i])) { if (hwcaps[i] && !strcmp(prop, hwcaps[i])) {
caps |= bit; caps |= bit;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment