public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: "Suzuki K. Poulose" <suzuki@in.ibm.com>
To: kumagai-atsushi@mxc.nes.nec.co.jp
Cc: kexec@lists.infradead.org
Subject: [PATCH v1 4/4] [makedumpfile][ppc] PPC44x page translation definitions
Date: Thu, 16 Feb 2012 09:07:07 +0530	[thread overview]
Message-ID: <20120216033656.7972.19596.stgit@suzukikp> (raw)
In-Reply-To: <20120216033411.7972.77705.stgit@suzukikp>

This patch defines the translation bits for PPC44x.


Signed-off-by : Suzuki K. Poulose <suzuki@in.ibm.com>
---

 arch/ppc.c     |   15 +++++++++++++++
 makedumpfile.h |    4 ++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/ppc.c b/arch/ppc.c
index 0ad2cf4..b63a617 100644
--- a/arch/ppc.c
+++ b/arch/ppc.c
@@ -37,12 +37,27 @@ struct platform {
 typedef int (*probe_func_t)(char *, struct platform *);
 
 static int probe_default_platform(char *, struct platform*);
+static int probe_ppc44x_platform(char *, struct platform*);
 
 probe_func_t probe_platforms[] = {
+	probe_ppc44x_platform,
 	probe_default_platform,		/* This should be at the end of the list */
 	NULL
 };
 
+static int probe_ppc44x_platform(char *s, struct platform *p)
+{
+	if (!strncmp(s, "ppc440", 6) || strcmp(s, "ppc470")) {
+		p->name = strdup(s);
+		p->pgdir_shift = PPC44x_PGDIR_SHIFT;
+		p->ptrs_per_pte = PPC44x_PTRS_PER_PTE;
+		p->pte_size = PPC44x_PTE_SIZE;
+
+		return TRUE;
+	}
+	return FALSE;
+}
+	
 static int probe_default_platform(char *s, struct platform *p)
 {
 	/* Accept as the default platform */
diff --git a/makedumpfile.h b/makedumpfile.h
index 3a5152c..430202b 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -543,6 +543,10 @@ do { \
 #define DEFAULT_PTRS_PER_PTE	(1024)
 #define DEFAULT_PTE_SIZE	(sizeof(unsigned long))
 
+#define PPC44x_PGDIR_SHIFT	(21)
+#define PPC44x_PTRS_PER_PTE	(512)
+#define PPC44x_PTE_SIZE 	(sizeof(unsigned long long))
+
 #define PGDIR_SHIFT		(base_platform.pgdir_shift)
 #define PTRS_PER_PTE		(base_platform.ptrs_per_pte)
 #define PTE_SIZE		(base_platform.pte_size)


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2012-02-16  3:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16  3:35 [PATCH v1 0/4][makedumpfile] vmalloc translation support for PPC32 Suzuki K. Poulose
2012-02-16  3:35 ` [PATCH v1 1/4] [makedumpfile] Add read_string routine Suzuki K. Poulose
2012-04-20  1:47   ` Atsushi Kumagai
2012-02-16  3:36 ` [PATCH v1 2/4] [makedumpfile][ppc] Generic vmalloc translation support Suzuki K. Poulose
2012-02-16  3:36 ` [PATCH v1 3/4] [makedumpfile][ppc] Define platform descriptors for page translation Suzuki K. Poulose
2012-02-16  3:37 ` Suzuki K. Poulose [this message]
2012-02-17  0:32 ` [PATCH v1 0/4][makedumpfile] vmalloc translation support for PPC32 Atsushi Kumagai
2012-02-17  5:55   ` Suzuki K. Poulose
2012-02-17  8:39     ` Benjamin Herrenschmidt
2012-02-20  9:56       ` Atsushi Kumagai
2012-02-20 10:31         ` Suzuki K. Poulose

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=20120216033656.7972.19596.stgit@suzukikp \
    --to=suzuki@in.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    /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