Thread (4 messages) flat view 4 messages, 4 authors, 2012-07-03

RE: [PATCH][v2] PPC: use CURRENT_THREAD_INFO instead of open coded assembly

From: Yoder Stuart-B08248 <hidden>
Date: 2012-07-03 15:07:57

-----Original Message-----
From: Alexander Graf [mailto:agraf@suse.de]
Sent: Monday, July 02, 2012 4:16 PM
To: Yoder Stuart-B08248
Cc: benh@kernel.crashing.org; linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH][v2] PPC: use CURRENT_THREAD_INFO instead of open cod=
ed assembly
=20
=20
On 02.07.2012, at 23:14, Stuart Yoder wrote:
=20
quoted
From: Stuart Yoder <redacted>

Signed-off-by: Stuart Yoder <redacted>
---

-this patch is a pre-requisite for the idle hcall which I
am trying to get into Alex's KVM tree, so ideally would like
Ben's ack and get this applied to Alex's tree

-built/tested with a 32-bit booke kernel, built a 64-bit
booke kernel

-v2
  -moved CURRENT_THREAD_INFO under assembly only
   #ifdef

arch/powerpc/include/asm/exception-64s.h |    4 ++--
arch/powerpc/include/asm/thread_info.h   |    8 ++++++++
arch/powerpc/kernel/entry_32.S           |   24 ++++++++++++-----------=
-
quoted
arch/powerpc/kernel/entry_64.S           |   14 +++++++-------
arch/powerpc/kernel/exceptions-64e.S     |    2 +-
arch/powerpc/kernel/exceptions-64s.S     |    2 +-
arch/powerpc/kernel/head_fsl_booke.S     |    2 +-
arch/powerpc/kernel/idle_6xx.S           |    4 ++--
arch/powerpc/kernel/idle_book3e.S        |    2 +-
arch/powerpc/kernel/idle_e500.S          |    4 ++--
arch/powerpc/kernel/idle_power4.S        |    2 +-
arch/powerpc/kernel/misc_32.S            |    4 ++--
arch/powerpc/kvm/bookehv_interrupts.S    |    6 +-----
arch/powerpc/mm/hash_low_32.S            |    8 ++++----
arch/powerpc/sysdev/6xx-suspend.S        |    2 +-
15 files changed, 46 insertions(+), 42 deletions(-)
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/in=
clude/asm/exception-64s.h
quoted
index d58fc4e..5dbd00d 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -293,7 +293,7 @@ label##_hv:								\
#define RUNLATCH_ON				\
BEGIN_FTR_SECTION				\
-	clrrdi	r3,r1,THREAD_SHIFT;		\
+	CURRENT_THREAD_INFO(r3, r1)		\
	ld	r4,TI_LOCAL_FLAGS(r3);		\
	andi.	r0,r4,_TLF_RUNLATCH;		\
	beql	ppc64_runlatch_on_trampoline;	\
@@ -332,7 +332,7 @@ label##_common:							\
#ifdef CONFIG_PPC_970_NAP
#define FINISH_NAP				\
BEGIN_FTR_SECTION				\
-	clrrdi	r11,r1,THREAD_SHIFT;		\
+	CURRENT_THREAD_INFO(r11, r1)		\
	ld	r9,TI_LOCAL_FLAGS(r11);		\
	andi.	r10,r9,_TLF_NAPPING;		\
	bnel	power4_fixup_nap;		\
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/incl=
ude/asm/thread_info.h
quoted
index 68831e9..3760620 100644
--- a/arch/powerpc/include/asm/thread_info.h
+++ b/arch/powerpc/include/asm/thread_info.h
@@ -74,6 +74,14 @@ static inline struct thread_info *current_thread_inf=
o(void)
quoted
	return (struct thread_info *)(sp & ~(THREAD_SIZE-1));
}

+#else
+
+#ifndef CONFIG_PPC64
=20
Oh no! The logic is still backwards :(
Doh...somehow I missed that comment in your previous reply.  Will fix=20
that.

Stuart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help