LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ankita Garg <ankita@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: maneesh@in.ibm.com, fernando@oss.ntt.co.jp, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Linux Kernel Dump Test Module
Date: Tue, 12 Sep 2006 08:30:29 +0530	[thread overview]
Message-ID: <20060912030029.GD24676@in.ibm.com> (raw)
In-Reply-To: <20060908004244.6ef7deb7.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

On Fri, Sep 08, 2006 at 12:42:44AM -0700, Andrew Morton wrote:
> On Thu, 7 Sep 2006 19:23:29 +0530
> Ankita Garg <ankita@in.ibm.com> wrote:
> 
> > +#include<linux/ide.h>
> 
> s390 doesn't have this, so it breaks the build.
> 
There could be two ways to solve the build issue on s390. One is to
conditionally include the "ide.h" file depending on whether CONFIG_IDE is
defined. The second method would be to make LKDTM dependent on IDE. But this
approach is not right as it would prevent usage of the module on s390
completely.

> And #include is followed by a space, please.

Done.

Thanks,
Ankita

[-- Attachment #2: lkdtm-s390.patch --]
[-- Type: text/plain, Size: 1803 bytes --]

o This patch enables lkdtm to be built on s390

Signed-off-by: Ankita Garg <ankita@in.ibm.com>
--
 lkdtm.c |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

Index: linux-2.6.18-rc6-mm1/drivers/misc/lkdtm.c
===================================================================
--- linux-2.6.18-rc6-mm1.orig/drivers/misc/lkdtm.c	2006-09-11 20:58:53.000000000 +0530
+++ linux-2.6.18-rc6-mm1/drivers/misc/lkdtm.c	2006-09-11 21:06:43.000000000 +0530
@@ -43,15 +43,18 @@
  *		  to trigger an action. The default is 10.
  */
 
-#include<linux/kernel.h>
-#include<linux/module.h>
-#include<linux/kprobes.h>
-#include<linux/kallsyms.h>
-#include<linux/init.h>
-#include<linux/irq.h>
-#include<linux/ide.h>
-#include<linux/interrupt.h>
-#include<scsi/scsi_cmnd.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/kprobes.h>
+#include <linux/kallsyms.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <scsi/scsi_cmnd.h>
+
+#ifdef CONFIG_IDE
+#include <linux/ide.h>
+#endif
 
 #define NUM_CPOINTS 8
 #define NUM_CPOINT_TYPES 5
@@ -176,6 +179,7 @@
 	return 0;
 }
 
+#ifdef CONFIG_IDE
 int jp_generic_ide_ioctl(ide_drive_t *drive, struct file *file,
 			struct block_device *bdev, unsigned int cmd,
 			unsigned long arg)
@@ -184,7 +188,7 @@
 	jprobe_return();
 	return 0;
 }
-
+#endif
 
 static int lkdtm_parse_commandline(void)
 {
@@ -304,8 +308,12 @@
 		lkdtm.entry = (kprobe_opcode_t*) jp_scsi_dispatch_cmd;
 		break;
 	case IDE_CORE_CP:
+#ifdef CONFIG_IDE
 		lkdtm.kp.symbol_name = "generic_ide_ioctl";
 		lkdtm.entry = (kprobe_opcode_t*) jp_generic_ide_ioctl;
+#else
+		printk(KERN_INFO "lkdtm : Crash point not available\n");
+#endif
 		break;
 	default:
 		printk(KERN_INFO "lkdtm : Invalid Crash Point\n");

      parent reply	other threads:[~2006-09-12  3:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07 13:53 Ankita Garg
2006-09-07 20:48 ` Andrew Morton
2006-09-07 21:05   ` Maneesh Soni
2006-09-10 13:36 ` fernando
     [not found] ` <20060908004244.6ef7deb7.akpm@osdl.org>
2006-09-12  3:00   ` Ankita Garg [this message]

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=20060912030029.GD24676@in.ibm.com \
    --to=ankita@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=fernando@oss.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maneesh@in.ibm.com \
    --subject='Re: [RFC] Linux Kernel Dump Test Module' \
    /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

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).