linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hao <haokexin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc <linuxppc-dev@lists.ozlabs.org>
Subject: [PATCH 3/4] powerpc: s/kdump/exception/ for the exception trampoline functions
Date: Wed, 19 Jun 2013 17:20:03 +0800	[thread overview]
Message-ID: <1371633604-4491-4-git-send-email-haokexin@gmail.com> (raw)
In-Reply-To: <1371633604-4491-1-git-send-email-haokexin@gmail.com>

These functions are not just kdump specific. Replace the 'kdump' with
the 'exception' to make them more general.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
 arch/powerpc/include/asm/exception_trampoline.h | 20 ++++++++++----------
 arch/powerpc/kernel/exception_trampoline.c      | 14 +++++++-------
 arch/powerpc/kernel/prom.c                      |  2 +-
 arch/powerpc/kernel/setup_32.c                  |  2 +-
 arch/powerpc/kernel/setup_64.c                  |  2 +-
 5 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/arch/powerpc/include/asm/exception_trampoline.h b/arch/powerpc/include/asm/exception_trampoline.h
index 707ad6c..88281c9 100644
--- a/arch/powerpc/include/asm/exception_trampoline.h
+++ b/arch/powerpc/include/asm/exception_trampoline.h
@@ -1,10 +1,10 @@
 #ifndef _EXCEPTION_TRAMPOLINE_H
 #define _EXCEPTION_TRAMPOLINE_H
 
-/* How many bytes to reserve at zero for kdump. The reserve limit should
+/* How many bytes to reserve at zero for exception. The reserve limit should
  * be greater or equal to the trampoline's end address.
  * Reserve to the end of the FWNMI area, see head_64.S */
-#define KDUMP_RESERVE_LIMIT	0x10000 /* 64K */
+#define EXCEPTION_RESERVE_LIMIT	0x10000 /* 64K */
 
 /*
  * On PPC64 translation is disabled during trampoline setup, so we use
@@ -13,22 +13,22 @@
  * branches, so we can just add the PAGE_OFFSET and don't worry about it.
  */
 #ifdef __powerpc64__
-#define KDUMP_TRAMPOLINE_START	0x0100
-#define KDUMP_TRAMPOLINE_END	0x3000
+#define EXCEPTION_TRAMPOLINE_START	0x0100
+#define EXCEPTION_TRAMPOLINE_END	0x3000
 #else
-#define KDUMP_TRAMPOLINE_START	(0x0100 + PAGE_OFFSET)
-#define KDUMP_TRAMPOLINE_END	(0x3000 + PAGE_OFFSET)
+#define EXCEPTION_TRAMPOLINE_START	(0x0100 + PAGE_OFFSET)
+#define EXCEPTION_TRAMPOLINE_END	(0x3000 + PAGE_OFFSET)
 #endif /* __powerpc64__ */
 
 #ifndef __ASSEMBLY__
 
 #if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_NONSTATIC_KERNEL)
-extern void reserve_kdump_trampoline(void);
-extern void setup_kdump_trampoline(void);
+extern void reserve_exception_trampoline(void);
+extern void setup_exception_trampoline(void);
 #else
 /* !CRASH_DUMP || !NONSTATIC_KERNEL */
-static inline void reserve_kdump_trampoline(void) { ; }
-static inline void setup_kdump_trampoline(void) { ; }
+static inline void reserve_exception_trampoline(void) { ; }
+static inline void setup_exception_trampoline(void) { ; }
 #endif
 
 #endif /* __ASSEMBLY__ */
diff --git a/arch/powerpc/kernel/exception_trampoline.c b/arch/powerpc/kernel/exception_trampoline.c
index 71f4b72..b725116 100644
--- a/arch/powerpc/kernel/exception_trampoline.c
+++ b/arch/powerpc/kernel/exception_trampoline.c
@@ -15,7 +15,7 @@
 #include <linux/bootmem.h>
 #include <linux/memblock.h>
 #include <asm/code-patching.h>
-#include <asm/kdump.h>
+#include <asm/exception_trampoline.h>
 #include <asm/prom.h>
 #include <asm/firmware.h>
 #include <asm/uaccess.h>
@@ -29,9 +29,9 @@
 #endif
 
 #ifndef CONFIG_NONSTATIC_KERNEL
-void __init reserve_kdump_trampoline(void)
+void __init reserve_exception_trampoline(void)
 {
-	memblock_reserve(0, KDUMP_RESERVE_LIMIT);
+	memblock_reserve(0, EXCEPTION_RESERVE_LIMIT);
 }
 
 static void __init create_trampoline(unsigned long addr)
@@ -50,13 +50,13 @@ static void __init create_trampoline(unsigned long addr)
 	patch_branch(++p, addr + PHYSICAL_START, 0);
 }
 
-void __init setup_kdump_trampoline(void)
+void __init setup_exception_trampoline(void)
 {
 	unsigned long i;
 
-	DBG(" -> setup_kdump_trampoline()\n");
+	DBG(" -> setup_exception_trampoline()\n");
 
-	for (i = KDUMP_TRAMPOLINE_START; i < KDUMP_TRAMPOLINE_END; i += 8) {
+	for (i = EXCEPTION_TRAMPOLINE_START; i < EXCEPTION_TRAMPOLINE_END; i += 8) {
 		create_trampoline(i);
 	}
 
@@ -65,6 +65,6 @@ void __init setup_kdump_trampoline(void)
 	create_trampoline(__pa(machine_check_fwnmi) - PHYSICAL_START);
 #endif /* CONFIG_PPC_PSERIES */
 
-	DBG(" <- setup_kdump_trampoline()\n");
+	DBG(" <- setup_exception_trampoline()\n");
 }
 #endif /* CONFIG_NONSTATIC_KERNEL */
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 4a13ac5..57214ee 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -669,7 +669,7 @@ void __init early_init_devtree(void *params)
 	/* If relocatable, reserve first 32k for interrupt vectors etc. */
 	if (PHYSICAL_START > MEMORY_START)
 		memblock_reserve(MEMORY_START, 0x8000);
-	reserve_kdump_trampoline();
+	reserve_exception_trampoline();
 #ifdef CONFIG_FA_DUMP
 	/*
 	 * If we fail to reserve memory for firmware-assisted dump then
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 9f3aa43..e040bb2 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -133,7 +133,7 @@ notrace void __init machine_init(u64 dt_ptr)
 
 	probe_machine();
 
-	setup_kdump_trampoline();
+	setup_exception_trampoline();
 
 #ifdef CONFIG_6xx
 	if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 06b8562..b077847 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -222,7 +222,7 @@ void __init early_setup(unsigned long dt_ptr)
 	/* Probe the machine type */
 	probe_machine();
 
-	setup_kdump_trampoline();
+	setup_exception_trampoline();
 
 	DBG("Found, Initializing memory management...\n");
 
-- 
1.8.1.4

  parent reply	other threads:[~2013-06-19  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  9:20 [PATCH 0/4] powerpc: enable relocatable support for 6xx Kevin Hao
2013-06-19  9:20 ` [PATCH 1/4] " Kevin Hao
2013-06-19  9:20 ` [PATCH 2/4] powerpc: move the exception trampoline helper functions to a separate file Kevin Hao
2013-06-19  9:20 ` Kevin Hao [this message]
2013-06-19  9:20 ` [PATCH 4/4] powerpc: make the kernel bootable from non 0 address for 6xx Kevin Hao

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=1371633604-4491-4-git-send-email-haokexin@gmail.com \
    --to=haokexin@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.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).