From: Manish Ahuja <ahuja@austin.ibm.com>
To: linuxppc-dev@ozlabs.org, kexec@lists.infradead.org, paulus@samba.org
Cc: mahuja@us.ibm.com, smaneesh@in.ibm.com, linasvepstas@gmail.com,
ssant@in.ibm.com
Subject: [PATCH 2/2] pseries: phyp dump: inform kdump, phyp-dump is loaded.
Date: Fri, 21 Mar 2008 19:40:53 -0500 [thread overview]
Message-ID: <47E45595.6060509@austin.ibm.com> (raw)
Patch 2:
Addition of /sys/kernel/phyp_dump_active so that kdump init scripts may
look for it and take appropriate action if this file is found. This
file is only loaded when phyp_dump has been registered.
Signed-off-by: Manish Ahuja <mahuja@us.ibm.com>
---
arch/powerpc/platforms/pseries/phyp_dump.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
Index: 2.6.25-rc1/arch/powerpc/platforms/pseries/phyp_dump.c
===================================================================
--- 2.6.25-rc1.orig/arch/powerpc/platforms/pseries/phyp_dump.c 2008-03-22 01:07:43.000000000 -0500
+++ 2.6.25-rc1/arch/powerpc/platforms/pseries/phyp_dump.c 2008-03-22 01:08:56.000000000 -0500
@@ -182,6 +182,18 @@ static void print_dump_header(const stru
#endif
}
+static ssize_t show_phyp_dump_active(struct kobject *kobj,
+ struct kobj_attribute *attr, char *buf)
+{
+
+ /* create filesystem entry so kdump is phyp-dump aware */
+ return sprintf(buf, "%lx\n", phyp_dump_info->phyp_dump_at_boot);
+}
+
+static struct kobj_attribute pdl = __ATTR(phyp_dump_active, 0600,
+ show_phyp_dump_active,
+ NULL);
+
static void register_dump_area(struct phyp_dump_header *ph, unsigned long addr)
{
int rc;
@@ -204,7 +216,13 @@ static void register_dump_area(struct ph
printk(KERN_ERR "phyp-dump: unexpected error (%d) on "
"register\n", rc);
print_dump_header(ph);
+ return;
}
+
+ rc = sysfs_create_file(kernel_kobj, &pdl.attr);
+ if (rc)
+ printk(KERN_ERR "phyp-dump: unable to create sysfs"
+ " file (%d)\n", rc);
}
static
reply other threads:[~2008-03-22 0:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=47E45595.6060509@austin.ibm.com \
--to=ahuja@austin.ibm.com \
--cc=kexec@lists.infradead.org \
--cc=linasvepstas@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mahuja@us.ibm.com \
--cc=paulus@samba.org \
--cc=smaneesh@in.ibm.com \
--cc=ssant@in.ibm.com \
/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).