public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling•org>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: Michael Neuling <mikey@neuling•org>, linuxppc-dev@lists•ozlabs.org
Subject: [PATCH 2/4] powerpc: Add POWER8 setup code
Date: Wed, 31 Oct 2012 16:34:14 +1100	[thread overview]
Message-ID: <1351661656-6986-2-git-send-email-mikey@neuling.org> (raw)
In-Reply-To: <1351661656-6986-1-git-send-email-mikey@neuling.org>

Just a copy of POWER7 for now.  Will update with new code later.

Signed-off-by: Michael Neuling <mikey@neuling•org>
---
 arch/powerpc/kernel/cpu_setup_power.S |   24 ++++++++++++++++++++++++
 arch/powerpc/kernel/cputable.c        |    2 ++
 2 files changed, 26 insertions(+)

diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S
index 76797c5..a92101d 100644
--- a/arch/powerpc/kernel/cpu_setup_power.S
+++ b/arch/powerpc/kernel/cpu_setup_power.S
@@ -44,6 +44,30 @@ _GLOBAL(__restore_cpu_power7)
 	mtlr	r11
 	blr
 
+_GLOBAL(__setup_cpu_power8)
+	mflr	r11
+	bl	__init_hvmode_206
+	mtlr	r11
+	beqlr
+	li	r0,0
+	mtspr	SPRN_LPID,r0
+	bl	__init_LPCR
+	bl	__init_TLB
+	mtlr	r11
+	blr
+
+_GLOBAL(__restore_cpu_power8)
+	mflr	r11
+	mfmsr	r3
+	rldicl.	r0,r3,4,63
+	beqlr
+	li	r0,0
+	mtspr	SPRN_LPID,r0
+	bl	__init_LPCR
+	bl	__init_TLB
+	mtlr	r11
+	blr
+
 __init_hvmode_206:
 	/* Disable CPU_FTR_HVMODE and exit if MSR:HV is not set */
 	mfmsr	r3
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 0514c21..361f6d9 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -68,6 +68,8 @@ extern void __restore_cpu_pa6t(void);
 extern void __restore_cpu_ppc970(void);
 extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
 extern void __restore_cpu_power7(void);
+extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
+extern void __restore_cpu_power8(void);
 extern void __restore_cpu_a2(void);
 #endif /* CONFIG_PPC64 */
 #if defined(CONFIG_E500)
-- 
1.7.9.5

  reply	other threads:[~2012-10-31  5:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-31  5:34 [PATCH 1/4] powerpc: make POWER7 setup code generic name Michael Neuling
2012-10-31  5:34 ` Michael Neuling [this message]
2012-10-31  5:34 ` [PATCH 3/4] powerpc: POWER8 cputable entry Michael Neuling
2012-10-31  5:34 ` [PATCH 4/4] powerpc/pseries: Update ibm, architecture.vec for PAPR 2.7/POWER8 Michael Neuling
2012-11-09  6:23   ` [PATCH] " Michael Neuling
2012-11-15  3:53     ` [PATCH] powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET for POWER8 updates Michael Neuling
2012-11-09  6:26   ` [PATCH] powerpc: Add POWER8 architected mode to cputable Michael Neuling
2012-11-09  8:47     ` Gabriel Paubert
2012-11-09  9:56       ` Michael Neuling

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=1351661656-6986-2-git-send-email-mikey@neuling.org \
    --to=mikey@neuling$(echo .)org \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox