All of lore.kernel.org
 help / color / mirror / Atom feed
From: gdavis@mvista.com (gdavis at mvista.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC/PATCH v3 5/7] ARM: Move get_thread_info macro definition to <asm/assembler.h>
Date: Fri,  7 Oct 2011 12:26:38 -0400	[thread overview]
Message-ID: <1318004800-6525-6-git-send-email-gdavis@mvista.com> (raw)
In-Reply-To: <1318004800-6525-1-git-send-email-gdavis@mvista.com>

From: George G. Davis <gdavis@mvista.com>

The get_thread_info assembler macro is currently defined in
arch/arm/kernel/entry-header.S and used in the following
files:

	arch/arm/kernel/entry-armv.S
	arch/arm/kernel/entry-common.S
	arch/arm/vfp/vfphw.S
	arch/arm/vfp/entry.S

The first two cases above use #include "entry-header.S" while
the later two cases use #include "../kernel/entry-header.S"
to obtain the get_thread_info assembler macro definition.

Move the get_thread_info assembler macro definition into
arch/arm/include/asm/assember.h and clean up inclusion
of this macro definition to use #include <asm/assember.h>.

This change facilitates use of the get_thread_info assembler
macro in other assembler functions without more of the same
path relative include directives.

Signed-off-by: George G. Davis <gdavis@mvista.com>
---
 arch/arm/include/asm/assembler.h |   13 +++++++++++++
 arch/arm/kernel/entry-header.S   |   11 -----------
 arch/arm/vfp/entry.S             |    5 ++++-
 arch/arm/vfp/vfphw.S             |    5 ++++-
 4 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 29035e8..78397d0 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -23,6 +23,19 @@
 #include <asm/ptrace.h>
 #include <asm/domain.h>
 
+#ifndef CONFIG_THUMB2_KERNEL
+	.macro	get_thread_info, rd
+	mov	\rd, sp, lsr #13
+	mov	\rd, \rd, lsl #13
+	.endm
+#else   /* CONFIG_THUMB2_KERNEL */
+	.macro	get_thread_info, rd
+	mov	\rd, sp
+	lsr	\rd, \rd, #13
+	mov	\rd, \rd, lsl #13
+	.endm
+#endif  /* !CONFIG_THUMB2_KERNEL */
+
 /*
  * Endian independent macros for shifting bytes within registers.
  */
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index 9a8531e..d03b6a9 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -108,11 +108,6 @@
 	movs	pc, lr				@ return & move spsr_svc into cpsr
 	.endm
 
-	.macro	get_thread_info, rd
-	mov	\rd, sp, lsr #13
-	mov	\rd, \rd, lsl #13
-	.endm
-
 	@
 	@ 32-bit wide "mov pc, reg"
 	@
@@ -148,12 +143,6 @@
 	movs	pc, lr				@ return & move spsr_svc into cpsr
 	.endm
 
-	.macro	get_thread_info, rd
-	mov	\rd, sp
-	lsr	\rd, \rd, #13
-	mov	\rd, \rd, lsl #13
-	.endm
-
 	@
 	@ 32-bit wide "mov pc, reg"
 	@
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index 4fa9903..e475a5a 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -15,9 +15,12 @@
  *  r10 = thread_info structure
  *  lr  = failure return
  */
+#include <linux/init.h>
+#include <linux/linkage.h>
 #include <asm/thread_info.h>
 #include <asm/vfpmacros.h>
-#include "../kernel/entry-header.S"
+#include <asm/assembler.h>
+#include <asm/asm-offsets.h>
 
 ENTRY(do_vfp)
 #ifdef CONFIG_PREEMPT
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index 2d30c7f..68ca5af 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -14,9 +14,12 @@
  * r10 points at the start of the private FP workspace in the thread structure
  * sp points to a struct pt_regs (as defined in include/asm/proc/ptrace.h)
  */
+#include <linux/init.h>
+#include <linux/linkage.h>
 #include <asm/thread_info.h>
 #include <asm/vfpmacros.h>
-#include "../kernel/entry-header.S"
+#include <asm/assembler.h>
+#include <asm/asm-offsets.h>
 
 	.macro	DBGSTR, str
 #ifdef DEBUG
-- 
1.7.4.4

  parent reply	other threads:[~2011-10-07 16:26 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 13:43 parallel load of modules on an ARM multicore EXTERNAL Waechtler Peter (Fa. TCP, CM-AI/PJ-CF31)
2011-06-21 15:50 ` Catalin Marinas
2011-06-23 14:39   ` AW: " EXTERNAL Waechtler Peter (Fa. TCP, CM-AI/PJ-CF31)
2011-06-23 14:52     ` Catalin Marinas
2011-06-23 15:12       ` Russell King - ARM Linux
2011-06-23 15:34         ` Catalin Marinas
2011-06-23 17:02           ` Catalin Marinas
2011-06-23 15:20       ` AW: " EXTERNAL Waechtler Peter (Fa. TCP, CM-AI/PJ-CF31)
2011-07-07  4:25   ` George G. Davis
2011-10-20  4:04   ` George G. Davis
2011-09-22  7:29 ` George G. Davis
2011-09-22  8:52   ` Catalin Marinas
2011-10-06  4:29     ` George G. Davis
2011-10-06  5:08       ` [RFC/PATCH 0/7] ARM: ARM11 MPCore preemption/task migration cache coherency fixups gdavis at mvista.com
2011-10-06  5:08         ` [RFC/PATCH 1/7] ARM: ARM11 MPCore: pgd_alloc is not preempt safe gdavis at mvista.com
2011-10-06 16:35           ` Russell King - ARM Linux
2011-10-06 19:38             ` George G. Davis
2011-10-06  5:08         ` [RFC/PATCH 2/7] ARM: ARM11 MPCore: pte_alloc_one{, _kernel} are " gdavis at mvista.com
2011-10-06  5:08         ` [RFC/PATCH 3/7] ARM: ARM11 MPCore: {clean, flush}_pmd_entry " gdavis at mvista.com
2011-10-06  5:08         ` [RFC/PATCH 4/7] ARM: ARM11 MPCore: clean_dcache_area is " gdavis at mvista.com
2011-10-06  5:08         ` [RFC/PATCH 5/7] ARM: Move get_thread_info macro definition to <asm/assembler.h> gdavis at mvista.com
2011-10-06  5:08         ` [RFC/PATCH 6/7] ARM: ARM11 MPCore: DMA_CACHE_RWFO operations are not preempt safe gdavis at mvista.com
2011-10-06 16:40           ` Russell King - ARM Linux
2011-10-06 19:41             ` George G. Davis
2011-10-06  5:08         ` [RFC/PATCH 7/7] ARM: ARM11 MPCore: cpu_v6_set_pte_ext is " gdavis at mvista.com
2011-10-06  7:46           ` Russell King - ARM Linux
2011-10-06 12:35             ` George G. Davis
2011-10-07  2:38         ` [RFC/PATCH v2 0/7] ARM11 MPCore: preemption/task migration cache coherency fixups gdavis at mvista.com
2011-10-07  2:38           ` [RFC/PATCH 1/7] ARM: ARM11 MPCore: pgd_alloc is not preempt safe gdavis at mvista.com
2011-10-07  2:38           ` [RFC/PATCH 2/7] ARM: ARM11 MPCore: pte_alloc_one{, _kernel} are " gdavis at mvista.com
2011-10-07  7:47             ` [RFC/PATCH 2/7] ARM: ARM11 MPCore: pte_alloc_one{,_kernel} " Russell King - ARM Linux
2011-10-07 15:31               ` [RFC/PATCH 2/7] ARM: ARM11 MPCore: pte_alloc_one{, _kernel} " George G. Davis
2011-10-07  2:38           ` [RFC/PATCH 3/7] ARM: ARM11 MPCore: {clean, flush}_pmd_entry " gdavis at mvista.com
2011-10-11  9:53             ` [RFC/PATCH 3/7] ARM: ARM11 MPCore: {clean,flush}_pmd_entry " Catalin Marinas
2011-10-12  2:34               ` [RFC/PATCH 3/7] ARM: ARM11 MPCore: {clean, flush}_pmd_entry " George G. Davis
2011-10-13 14:31                 ` [RFC/PATCH 3/7] ARM: ARM11 MPCore: {clean,flush}_pmd_entry " Russell King - ARM Linux
2011-10-14  1:34                   ` [RFC/PATCH 3/7] ARM: ARM11 MPCore: {clean, flush}_pmd_entry " George G. Davis
2011-10-07  2:38           ` [RFC/PATCH 4/7] ARM: ARM11 MPCore: clean_dcache_area is " gdavis at mvista.com
2011-10-07  2:38           ` [RFC/PATCH 5/7] ARM: Move get_thread_info macro definition to <asm/assembler.h> gdavis at mvista.com
2011-10-11  9:56             ` Catalin Marinas
2011-10-12  6:04               ` gdavis at mvista.com
2011-10-13 14:34                 ` Russell King - ARM Linux
2011-10-13 14:49                   ` Catalin Marinas
2011-10-13 14:53                     ` Russell King - ARM Linux
2011-10-14  1:46                       ` George G. Davis
2011-10-14  1:44                     ` George G. Davis
2011-10-14  1:42                   ` George G. Davis
2011-10-14  2:54                     ` Nicolas Pitre
2011-10-14 12:56                       ` George G. Davis
2011-10-07  2:38           ` [RFC/PATCH 6/7] ARM: ARM11 MPCore: DMA_CACHE_RWFO operations are not preempt safe gdavis at mvista.com
2011-10-07  2:38           ` [RFC/PATCH 7/7] ARM: ARM11 MPCore: cpu_v6_set_pte_ext is " gdavis at mvista.com
2011-10-07 16:26           ` [RFC/PATCH v3 0/7] ARM11 MPCore: preemption/task migration cache coherency fixups gdavis at mvista.com
2011-10-07 16:26             ` [RFC/PATCH v3 1/7] ARM: ARM11 MPCore: pgd_alloc is not preempt safe gdavis at mvista.com
2011-10-07 16:26             ` [RFC/PATCH v3 2/7] ARM: ARM11 MPCore: pte_alloc_one{, _kernel} are " gdavis at mvista.com
2011-10-07 16:26             ` [RFC/PATCH v3 3/7] ARM: ARM11 MPCore: {clean, flush}_pmd_entry " gdavis at mvista.com
2011-10-07 16:26             ` [RFC/PATCH v3 4/7] ARM: ARM11 MPCore: clean_dcache_area is " gdavis at mvista.com
2011-10-07 16:26             ` gdavis at mvista.com [this message]
2011-10-07 16:26             ` [RFC/PATCH v3 6/7] ARM: ARM11 MPCore: DMA_CACHE_RWFO operations are " gdavis at mvista.com
2011-10-07 16:26             ` [RFC/PATCH v3 7/7] ARM: ARM11 MPCore: cpu_v6_set_pte_ext is " gdavis at mvista.com
2011-10-18 13:47             ` [RFC/PATCH v4 0/7] ARM11 MPCore: preemption/task migration cache coherency fixups gdavis at mvista.com
2011-10-18 13:47               ` [RFC/PATCH v4 1/7] ARM: ARM11 MPCore: pgd_alloc is not preempt safe gdavis at mvista.com
2011-10-18 13:47               ` [RFC/PATCH v4 2/7] ARM: ARM11 MPCore: pte_alloc_one{, _kernel} are " gdavis at mvista.com
2011-10-18 13:47               ` [RFC/PATCH v4 3/7] ARM: ARM11 MPCore: {clean, flush}_pmd_entry " gdavis at mvista.com
2011-10-18 13:47               ` [RFC/PATCH v4 4/7] ARM: ARM11 MPCore: clean_dcache_area is " gdavis at mvista.com
2011-10-18 17:08                 ` Tony Lindgren
2011-10-18 17:30                   ` George G. Davis
2011-10-18 17:43                     ` Tony Lindgren
2011-10-18 18:13                       ` George G. Davis
2011-10-18 13:47               ` [RFC/PATCH v4 5/7] ARM: Move get_thread_info macro definition to <asm/assembler.h> gdavis at mvista.com
2011-10-18 13:47               ` [RFC/PATCH v4 6/7] ARM: ARM11 MPCore: DMA_CACHE_RWFO operations are not preempt safe gdavis at mvista.com
2011-10-18 21:28                 ` Nicolas Pitre
2011-10-18 23:26                   ` George G. Davis
2011-10-19  1:09                     ` Nicolas Pitre
2011-10-18 13:47               ` [RFC/PATCH v4 7/7] ARM: ARM11 MPCore: cpu_v6_set_pte_ext is " gdavis at mvista.com
2011-10-18 21:52                 ` Nicolas Pitre
2011-10-18 23:29                   ` George G. Davis
2012-06-12 20:40               ` [RFC/PATCH v5 0/7] ARM11 MPCore: preemption/task migration cache coherency fixups gdavis at mvista.com
2012-06-12 20:40                 ` [RFC/PATCH v5 1/7] ARM: ARM11 MPCore: Make pgd_alloc preempt safe gdavis at mvista.com
2012-06-12 20:40                 ` [RFC/PATCH v5 2/7] ARM: ARM11 MPCore: Make pte_alloc_one{, _kernel} " gdavis at mvista.com
2012-06-12 20:40                 ` [RFC/PATCH v5 3/7] ARM: ARM11 MPCore: Make {clean, flush}_pmd_entry " gdavis at mvista.com
2012-06-12 20:40                 ` [RFC/PATCH v5 4/7] ARM: Move get_thread_info macro definition to <asm/assembler.h> gdavis at mvista.com
2012-06-12 20:40                 ` [RFC/PATCH v5 5/7] ARM: ARM11 MPCore: cpu_v6_dcache_clean_area needs RFO gdavis at mvista.com
2012-06-13  9:32                   ` Catalin Marinas
2012-06-13  9:36                     ` Russell King - ARM Linux
2012-06-13  9:41                       ` Catalin Marinas
2012-06-13  9:45                         ` Russell King - ARM Linux
2012-06-13  9:54                           ` Catalin Marinas
2012-06-13 11:36                       ` George G. Davis
2012-06-13 11:21                     ` George G. Davis
2012-06-12 20:40                 ` [RFC/PATCH v5 6/7] ARM: ARM11 MPCore: Make DMA_CACHE_RWFO operations preempt safe gdavis at mvista.com
2012-06-12 20:40                 ` [RFC/PATCH v5 7/7] ARM: ARM11 MPCore: Make cpu_v6_set_pte_ext " gdavis at mvista.com
2012-06-13  9:34                   ` Catalin Marinas
2012-06-13 11:35                     ` George G. Davis

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=1318004800-6525-6-git-send-email-gdavis@mvista.com \
    --to=gdavis@mvista.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.