All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vegard Nossum <vegard.nossum@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>, linux-kernel@vger.kernel.org
Subject: [git pull] kmemcheck updates for -tip
Date: Tue, 1 Jul 2008 22:18:55 +0200	[thread overview]
Message-ID: <20080701201855.GA22686@damson.getinternet.no> (raw)

Hi Ingo,

Please pull the 'for-tip' branch of

    git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck.git for-tip

to receive the following changes:

Vegard Nossum (3):
      kmemcheck: fix sparse warnings
      softirq: raise the right softirq
      kmemcheck: use the proper comment style

 arch/x86/mm/kmemcheck/error.c     |    1 +
 arch/x86/mm/kmemcheck/kmemcheck.c |   26 +++++++++++++++++---------
 arch/x86/mm/kmemcheck/opcode.c    |    6 ++++--
 arch/x86/mm/kmemcheck/shadow.c    |    1 +
 arch/x86/mm/kmemcheck/string.c    |   12 ++++++++----
 include/linux/kmemcheck.h         |    1 +
 kernel/softirq.c                  |    2 +-
 7 files changed, 33 insertions(+), 16 deletions(-)


Thanks,

Vegard


diff --git a/arch/x86/mm/kmemcheck/error.c b/arch/x86/mm/kmemcheck/error.c
index 9261f9c..56410c6 100644
--- a/arch/x86/mm/kmemcheck/error.c
+++ b/arch/x86/mm/kmemcheck/error.c
@@ -6,6 +6,7 @@
 #include <linux/stacktrace.h>
 #include <linux/string.h>
 
+#include "error.h"
 #include "shadow.h"
 
 enum kmemcheck_error_type {
diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c
index 0c0201b..37949c3 100644
--- a/arch/x86/mm/kmemcheck/kmemcheck.c
+++ b/arch/x86/mm/kmemcheck/kmemcheck.c
@@ -39,8 +39,10 @@ void __init kmemcheck_init(void)
 	kmemcheck_smp_init();
 
 #if defined(CONFIG_SMP) && !defined(CONFIG_KMEMCHECK_USE_SMP)
-	/* Limit SMP to use a single CPU. We rely on the fact that this code
-	* runs before SMP is set up. */
+	/*
+	 * Limit SMP to use a single CPU. We rely on the fact that this code
+	 * runs before SMP is set up.
+	 */
 	if (setup_max_cpus > 1) {
 		printk(KERN_INFO
 			"kmemcheck: Limiting number of CPUs to 1.\n");
@@ -144,8 +146,10 @@ void kmemcheck_show(struct pt_regs *regs)
 	n += kmemcheck_show_addr(data->addr1);
 	n += kmemcheck_show_addr(data->addr2);
 
-	/* None of the addresses actually belonged to kmemcheck. Note that
-	 * this is not an error. */
+	/*
+	 * None of the addresses actually belonged to kmemcheck. Note that
+	 * this is not an error.
+	 */
 	if (n == 0) {
 		kmemcheck_resume();
 		return;
@@ -348,7 +352,7 @@ enum kmemcheck_method {
 	KMEMCHECK_WRITE,
 };
 
-void kmemcheck_access(struct pt_regs *regs,
+static void kmemcheck_access(struct pt_regs *regs,
 	unsigned long fallback_address, enum kmemcheck_method fallback_method)
 {
 	const uint8_t *insn;
@@ -414,8 +418,10 @@ void kmemcheck_access(struct pt_regs *regs,
 		/* MOVS, MOVSB, MOVSW, MOVSD */
 	case 0xa4:
 	case 0xa5:
-		/* These instructions are special because they take two
-		 * addresses, but we only get one page fault. */
+		/*
+		 * These instructions are special because they take two
+		 * addresses, but we only get one page fault.
+		 */
 		kmemcheck_read(regs, regs->si, size);
 		kmemcheck_write(regs, regs->di, size);
 		data->addr1 = regs->si;
@@ -434,9 +440,11 @@ void kmemcheck_access(struct pt_regs *regs,
 		return;
 	}
 
-	/* If the opcode isn't special in any way, we use the data from the
+	/*
+	 * If the opcode isn't special in any way, we use the data from the
 	 * page fault handler to determine the address and type of memory
-	 * access. */
+	 * access.
+	 */
 	switch (fallback_method) {
 	case KMEMCHECK_READ:
 		kmemcheck_read(regs, fallback_address, size);
diff --git a/arch/x86/mm/kmemcheck/opcode.c b/arch/x86/mm/kmemcheck/opcode.c
index be0c8b7..194aeee 100644
--- a/arch/x86/mm/kmemcheck/opcode.c
+++ b/arch/x86/mm/kmemcheck/opcode.c
@@ -21,10 +21,12 @@ static bool opcode_is_rex_prefix(uint8_t b)
 	return (b & 0xf0) == 0x40;
 }
 
-/* This is a VERY crude opcode decoder. We only need to find the size of the
+/*
+ * This is a VERY crude opcode decoder. We only need to find the size of the
  * load/store that caused our #PF and this should work for all the opcodes
  * that we care about. Moreover, the ones who invented this instruction set
- * should be shot. */
+ * should be shot.
+ */
 unsigned int kmemcheck_opcode_get_size(const uint8_t *op)
 {
 	/* Default operand size */
diff --git a/arch/x86/mm/kmemcheck/shadow.c b/arch/x86/mm/kmemcheck/shadow.c
index 07ed3d6..0cb144f 100644
--- a/arch/x86/mm/kmemcheck/shadow.c
+++ b/arch/x86/mm/kmemcheck/shadow.c
@@ -1,3 +1,4 @@
+#include <linux/kmemcheck.h>
 #include <linux/mm.h>
 
 #include <asm/page.h>
diff --git a/arch/x86/mm/kmemcheck/string.c b/arch/x86/mm/kmemcheck/string.c
index 0d21d22..1a62bf0 100644
--- a/arch/x86/mm/kmemcheck/string.c
+++ b/arch/x86/mm/kmemcheck/string.c
@@ -27,8 +27,10 @@ static void memset_one_page(void *s, int c, size_t n)
 		return;
 	}
 
-	/* While we are not guarding the page in question, nobody else
-	 * should be able to change them. */
+	/*
+	 * While we are not guarding the page in question, nobody else
+	 * should be able to change them.
+	 */
 	local_irq_save(flags);
 
 	kmemcheck_pause_allbutself();
@@ -68,8 +70,10 @@ void *kmemcheck_memset(void *s, int c, size_t n)
 	end_page = (addr + n) & PAGE_MASK;
 
 	if (start_page == end_page) {
-		/* The entire area is within the same page. Good, we only
-		 * need one memset(). */
+		/*
+		 * The entire area is within the same page. Good, we only
+		 * need one memset().
+		 */
 		memset_one_page(s, c, n);
 		return s;
 	}
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h
index bc02c3f..b2d83ef 100644
--- a/include/linux/kmemcheck.h
+++ b/include/linux/kmemcheck.h
@@ -1,6 +1,7 @@
 #ifndef LINUX_KMEMCHECK_H
 #define LINUX_KMEMCHECK_H
 
+#include <linux/mm_types.h>
 #include <linux/types.h>
 
 #ifdef CONFIG_KMEMCHECK
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 44cf21f..23dc889 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -399,7 +399,7 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
 
 	t->next = __get_cpu_var(tasklet_hi_vec).head;
 	__get_cpu_var(tasklet_hi_vec).head = t;
-	__raise_softirq_irqoff(TASKLET_SOFTIRQ);
+	__raise_softirq_irqoff(HI_SOFTIRQ);
 }
 
 EXPORT_SYMBOL(__tasklet_hi_schedule_first);

             reply	other threads:[~2008-07-01 20:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 20:18 Vegard Nossum [this message]
2008-07-01 20:24 ` [git pull] kmemcheck updates for -tip Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2009-02-22 13:57 [GIT PULL] " Vegard Nossum
2009-02-22 16:44 ` Ingo Molnar
2009-02-22 17:00   ` Frederic Weisbecker
2009-02-22 17:05     ` Sitsofe Wheeler
2009-02-22 17:06     ` Vegard Nossum
2009-02-26 14:01 Vegard Nossum
2009-02-26 15:23 ` Ingo Molnar

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=20080701201855.GA22686@damson.getinternet.no \
    --to=vegard.nossum@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.