diff options
-rw-r--r-- | arch/powerpc/platforms/pseries/phyp_dump.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/phyp_dump.c b/arch/powerpc/platforms/pseries/phyp_dump.c index f80f8606c6b8..7ddd10526cea 100644 --- a/arch/powerpc/platforms/pseries/phyp_dump.c +++ b/arch/powerpc/platforms/pseries/phyp_dump.c | |||
@@ -182,6 +182,18 @@ static void print_dump_header(const struct phyp_dump_header *ph) | |||
182 | #endif | 182 | #endif |
183 | } | 183 | } |
184 | 184 | ||
185 | static ssize_t show_phyp_dump_active(struct kobject *kobj, | ||
186 | struct kobj_attribute *attr, char *buf) | ||
187 | { | ||
188 | |||
189 | /* create filesystem entry so kdump is phyp-dump aware */ | ||
190 | return sprintf(buf, "%lx\n", phyp_dump_info->phyp_dump_at_boot); | ||
191 | } | ||
192 | |||
193 | static struct kobj_attribute pdl = __ATTR(phyp_dump_active, 0600, | ||
194 | show_phyp_dump_active, | ||
195 | NULL); | ||
196 | |||
185 | static void register_dump_area(struct phyp_dump_header *ph, unsigned long addr) | 197 | static void register_dump_area(struct phyp_dump_header *ph, unsigned long addr) |
186 | { | 198 | { |
187 | int rc; | 199 | int rc; |
@@ -204,7 +216,13 @@ static void register_dump_area(struct phyp_dump_header *ph, unsigned long addr) | |||
204 | printk(KERN_ERR "phyp-dump: unexpected error (%d) on " | 216 | printk(KERN_ERR "phyp-dump: unexpected error (%d) on " |
205 | "register\n", rc); | 217 | "register\n", rc); |
206 | print_dump_header(ph); | 218 | print_dump_header(ph); |
219 | return; | ||
207 | } | 220 | } |
221 | |||
222 | rc = sysfs_create_file(kernel_kobj, &pdl.attr); | ||
223 | if (rc) | ||
224 | printk(KERN_ERR "phyp-dump: unable to create sysfs" | ||
225 | " file (%d)\n", rc); | ||
208 | } | 226 | } |
209 | 227 | ||
210 | static | 228 | static |