From: geoff@infradead.org (Geoff Levand)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 1/8] arm64: Fold proc-macros.S into assembler.h
Date: Tue, 27 Jan 2015 11:33:18 -0800 [thread overview]
Message-ID: <1422387198.21823.23.camel@infradead.org> (raw)
In-Reply-To: <e81815fb841db3ea40ce8e2fd18cf021ec9c6cf7.1421449714.git.geoff@infradead.org>
To allow the assembler macros defined in arch/arm64/mm/proc-macros.S to be used
outside the mm code move the contents of proc-macros.S to
arch/arm64/include/asm/assembler.h, delete proc-macros.S, and fix up all
references to proc-macros.S.
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/arm64/include/asm/assembler.h | 37 +++++++++++++++++++++++++-
arch/arm64/mm/cache.S | 2 --
arch/arm64/mm/proc-macros.S | 54 --------------------------------------
arch/arm64/mm/proc.S | 2 --
4 files changed, 36 insertions(+), 59 deletions(-)
delete mode 100644 arch/arm64/mm/proc-macros.S
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h
index 5901480..80436d3 100644
--- a/arch/arm64/include/asm/assembler.h
+++ b/arch/arm64/include/asm/assembler.h
@@ -1,5 +1,5 @@
/*
- * Based on arch/arm/include/asm/assembler.h
+ * Based on arch/arm/include/asm/assembler.h, arch/arm/mm/proc-macros.S
*
* Copyright (C) 1996-2000 Russell King
* Copyright (C) 2012 ARM Ltd.
@@ -20,6 +20,7 @@
#error "Only include this from assembly code"
#endif
+#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/thread_info.h>
@@ -155,3 +156,37 @@ lr .req x30 // link register
#endif
orr \rd, \lbits, \hbits, lsl #32
.endm
+
+/*
+ * vma_vm_mm - get mm pointer from vma pointer (vma->vm_mm)
+ */
+ .macro vma_vm_mm, rd, rn
+ ldr \rd, [\rn, #VMA_VM_MM]
+ .endm
+
+/*
+ * mmid - get context id from mm pointer (mm->context.id)
+ */
+ .macro mmid, rd, rn
+ ldr \rd, [\rn, #MM_CONTEXT_ID]
+ .endm
+
+/*
+ * dcache_line_size - get the minimum D-cache line size from the CTR register.
+ */
+ .macro dcache_line_size, reg, tmp
+ mrs \tmp, ctr_el0 // read CTR
+ ubfm \tmp, \tmp, #16, #19 // cache line size encoding
+ mov \reg, #4 // bytes per word
+ lsl \reg, \reg, \tmp // actual cache line size
+ .endm
+
+/*
+ * icache_line_size - get the minimum I-cache line size from the CTR register.
+ */
+ .macro icache_line_size, reg, tmp
+ mrs \tmp, ctr_el0 // read CTR
+ and \tmp, \tmp, #0xf // cache line size encoding
+ mov \reg, #4 // bytes per word
+ lsl \reg, \reg, \tmp // actual cache line size
+ .endm
diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S
index 2560e1e..2d7a67c 100644
--- a/arch/arm64/mm/cache.S
+++ b/arch/arm64/mm/cache.S
@@ -24,8 +24,6 @@
#include <asm/cpufeature.h>
#include <asm/alternative-asm.h>
-#include "proc-macros.S"
-
/*
* __flush_dcache_all()
*
diff --git a/arch/arm64/mm/proc-macros.S b/arch/arm64/mm/proc-macros.S
deleted file mode 100644
index 005d29e..0000000
--- a/arch/arm64/mm/proc-macros.S
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Based on arch/arm/mm/proc-macros.S
- *
- * Copyright (C) 2012 ARM Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <asm/asm-offsets.h>
-#include <asm/thread_info.h>
-
-/*
- * vma_vm_mm - get mm pointer from vma pointer (vma->vm_mm)
- */
- .macro vma_vm_mm, rd, rn
- ldr \rd, [\rn, #VMA_VM_MM]
- .endm
-
-/*
- * mmid - get context id from mm pointer (mm->context.id)
- */
- .macro mmid, rd, rn
- ldr \rd, [\rn, #MM_CONTEXT_ID]
- .endm
-
-/*
- * dcache_line_size - get the minimum D-cache line size from the CTR register.
- */
- .macro dcache_line_size, reg, tmp
- mrs \tmp, ctr_el0 // read CTR
- ubfm \tmp, \tmp, #16, #19 // cache line size encoding
- mov \reg, #4 // bytes per word
- lsl \reg, \reg, \tmp // actual cache line size
- .endm
-
-/*
- * icache_line_size - get the minimum I-cache line size from the CTR register.
- */
- .macro icache_line_size, reg, tmp
- mrs \tmp, ctr_el0 // read CTR
- and \tmp, \tmp, #0xf // cache line size encoding
- mov \reg, #4 // bytes per word
- lsl \reg, \reg, \tmp // actual cache line size
- .endm
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
index 28eebfb..fe69f6e 100644
--- a/arch/arm64/mm/proc.S
+++ b/arch/arm64/mm/proc.S
@@ -26,8 +26,6 @@
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.h>
-#include "proc-macros.S"
-
#ifdef CONFIG_ARM64_64K_PAGES
#define TCR_TG_FLAGS TCR_TG0_64K | TCR_TG1_64K
#else
--
2.1.0
next prev parent reply other threads:[~2015-01-27 19:33 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1415926876.git.geoff@infradead.orgg>
2015-01-17 0:23 ` [PATCH 0/8] arm64 kexec kernel patches V7 Geoff Levand
2015-01-17 0:23 ` [PATCH 3/8] arm64: Add new hcall HVC_CALL_FUNC Geoff Levand
2015-01-27 17:39 ` Catalin Marinas
2015-01-27 18:00 ` Mark Rutland
2015-01-30 21:52 ` Geoff Levand
2015-01-17 0:23 ` [PATCH 8/8] arm64/kexec: Enable kexec in the arm64 defconfig Geoff Levand
2015-01-17 0:23 ` [PATCH 6/8] arm64/kexec: Add pr_devel output Geoff Levand
2015-01-17 0:23 ` [PATCH 4/8] arm64: Add EL2 switch to soft_restart Geoff Levand
2015-01-26 19:02 ` Mark Rutland
2015-01-26 21:48 ` Geoff Levand
2015-01-27 16:46 ` Mark Rutland
2015-01-27 18:34 ` Geoff Levand
2015-01-27 17:57 ` Catalin Marinas
2015-01-30 21:47 ` Geoff Levand
2015-01-17 0:23 ` [PATCH 7/8] arm64/kexec: Add checks for KVM Geoff Levand
2015-01-26 19:19 ` Mark Rutland
2015-01-26 20:39 ` Christoffer Dall
2015-01-26 20:58 ` Geoff Levand
2015-01-26 21:00 ` Geoff Levand
2015-01-29 9:36 ` AKASHI Takahiro
2015-01-29 9:57 ` AKASHI Takahiro
2015-01-29 10:59 ` Marc Zyngier
2015-01-29 18:47 ` Mark Rutland
2015-01-30 6:10 ` AKASHI Takahiro
2015-01-30 12:14 ` Mark Rutland
2015-01-30 19:48 ` Geoff Levand
2015-02-02 8:18 ` AKASHI Takahiro
2015-02-06 0:11 ` Geoff Levand
2015-02-06 4:18 ` AKASHI Takahiro
2015-02-06 7:06 ` Geoff Levand
2015-01-17 0:23 ` [PATCH 1/8] arm64: Move proc-macros.S to include/asm Geoff Levand
2015-01-26 17:45 ` Catalin Marinas
2015-01-27 19:33 ` Geoff Levand [this message]
2015-01-17 0:23 ` [PATCH 2/8] arm64: Convert hcalls to use ISS field Geoff Levand
2015-01-26 18:26 ` Catalin Marinas
2015-01-30 23:31 ` Geoff Levand
2015-02-02 16:04 ` Catalin Marinas
2015-01-30 23:33 ` [PATCH v2 " Geoff Levand
2015-02-19 20:57 ` Christoffer Dall
2015-02-25 22:09 ` Geoff Levand
2015-03-02 22:13 ` Christoffer Dall
2015-03-02 23:22 ` Geoff Levand
2015-03-03 21:47 ` Christopher Covington
2015-03-03 22:35 ` Geoff Levand
2015-01-17 0:23 ` [PATCH 5/8] arm64/kexec: Add core kexec support Geoff Levand
2015-01-26 19:16 ` Mark Rutland
2015-01-26 17:44 ` [PATCH 0/8] arm64 kexec kernel patches V7 Catalin Marinas
2015-01-26 18:37 ` Grant Likely
2015-01-26 18:55 ` Mark Rutland
2015-01-26 20:57 ` Geoff Levand
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=1422387198.21823.23.camel@infradead.org \
--to=geoff@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).