All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Popple <alistair@popple.id.au>
To: linuxppc-dev@lists.ozlabs.org
Cc: mikey@neuling.org, npiggin@gmail.com, aneesh.kumar@linux.ibm.com,
	Alistair Popple <alistair@popple.id.au>
Subject: [PATCH v2 3/7] powerpc/dt_cpu_ftrs: Advertise support for ISA v3.1 if selected
Date: Tue, 19 May 2020 10:31:53 +1000	[thread overview]
Message-ID: <20200519003157.31946-4-alistair@popple.id.au> (raw)
In-Reply-To: <20200519003157.31946-1-alistair@popple.id.au>

On powernv hardware support for ISAv3.1 is advertised via a cpu feature
bit in the device tree. This patch enables the associated HWCAP bit if
the device tree indicates ISAv3.1 is available.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
---
 arch/powerpc/kernel/dt_cpu_ftrs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
index 36bc0d5c4f3a..b5e21264d168 100644
--- a/arch/powerpc/kernel/dt_cpu_ftrs.c
+++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
@@ -26,6 +26,7 @@
 /* Device-tree visible constants follow */
 #define ISA_V2_07B      2070
 #define ISA_V3_0B       3000
+#define ISA_V3_1        3100
 
 #define USABLE_PR               (1U << 0)
 #define USABLE_OS               (1U << 1)
@@ -654,6 +655,11 @@ static void __init cpufeatures_setup_start(u32 isa)
 		cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_300;
 		cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_00;
 	}
+
+	if (isa >= 3100) {
+		cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_31;
+		cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_1;
+	}
 }
 
 static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f)
-- 
2.20.1


  parent reply	other threads:[~2020-05-19  0:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19  0:31 [PATCH v2 0/7] Base support for POWER10 Alistair Popple
2020-05-19  0:31 ` [PATCH v2 1/7] powerpc: Add new HWCAP bits Alistair Popple
2020-05-19  3:20   ` Michael Neuling
2020-05-19 17:48   ` Paul A. Clarke
2020-05-20  2:42   ` Michael Ellerman
2020-05-20  3:29     ` Alistair Popple
2020-05-19  0:31 ` [PATCH v2 2/7] powerpc: Add support for ISA v3.1 Alistair Popple
2020-05-19  4:04   ` Jordan Niethe
2020-05-19  5:45     ` Alistair Popple
2020-05-19  0:31 ` Alistair Popple [this message]
2020-05-19  0:31 ` [PATCH v2 4/7] powerpc/dt_cpu_ftrs: Set current thread fscr bits Alistair Popple
2020-05-19  0:31 ` [PATCH v2 5/7] powerpc/dt_cpu_ftrs: Enable Prefixed Instructions Alistair Popple
2020-05-19  0:31 ` [PATCH v2 6/7] powerpc/dt_cpu_ftrs: Add MMA feature Alistair Popple
2020-05-19 14:49   ` Paul A. Clarke
2020-05-19 15:05     ` Segher Boessenkool
2020-05-19 15:22       ` Paul A. Clarke
2020-05-19 15:28         ` Segher Boessenkool
2020-05-19 15:49           ` Paul A. Clarke
2020-05-19 17:51   ` Paul A. Clarke
2020-05-19 23:56     ` Alistair Popple
2020-05-19  0:31 ` [PATCH v2 7/7] powerpc: Add POWER10 architected mode Alistair Popple
2020-05-19  3:58   ` Jordan Niethe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200519003157.31946-4-alistair@popple.id.au \
    --to=alistair@popple.id.au \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.