public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, Lee.Schermerhorn@hp.com,
	cl@linux-foundation.org, mingo@elte.hu, adobriyan@gmail.com,
	tglx@linutronix.de, hpa@zytor.com, yi.zhu@intel.com,
	reinette.chatre@intel.com, ilw@linux.intel.com
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/4] x86: don't include slab.h from arch/x86/include/asm/pgtable_32.h
Date: Wed, 24 Mar 2010 17:48:55 +0900	[thread overview]
Message-ID: <1269420538-18039-2-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1269420538-18039-1-git-send-email-tj@kernel.org>

Including slab.h from x86 pgtable_32.h creates a troublesome
dependency chain w/ ftrace enabled.  The following chain leads to
inclusion of pgtable_32.h from define_trace.h.

 trace/define_trace.h
 trace/ftrace.h
 linux/ftrace_event.h
 linux/ring_buffer.h
 linux/mm.h
 asm/pgtable.h
 asm/pgtable_32.h

And when slab.h itself defines trace hooks via

 linux/sl[aou]b_def.h
 linux/kmemtrace.h
 trace/events/kmem.h

If slab.h is not included before define_trace.h is included, this
leads to duplicate definitions of kmemtrace hooks or other include
dependency problems.

pgtable_32.h doesn't need slab.h to begin with.  Don't include it from
there.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/include/asm/pgtable_32.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
index 47339a1..2984a25 100644
--- a/arch/x86/include/asm/pgtable_32.h
+++ b/arch/x86/include/asm/pgtable_32.h
@@ -19,7 +19,6 @@
 #include <asm/paravirt.h>
 
 #include <linux/bitops.h>
-#include <linux/slab.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
 
-- 
1.6.4.2


  reply	other threads:[~2010-03-24  8:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24  8:48 [PATCHSET] remove implicit slab.h inclusion from from percpu.h Tejun Heo
2010-03-24  8:48 ` Tejun Heo [this message]
2010-03-24 10:58   ` [PATCH 1/4] x86: don't include slab.h from arch/x86/include/asm/pgtable_32.h Pekka Enberg
2010-03-24 19:43     ` Christoph Lameter
2010-03-24  8:48 ` [PATCH 2/4] iwlwifi: don't include iwl-dev.h from iwl-devtrace.h Tejun Heo
2010-03-24 17:55   ` reinette chatre
2010-03-24  8:48 ` [PATCH 3/4] include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h Tejun Heo
2010-03-24 11:00   ` Pekka Enberg
2010-03-24 11:57     ` Alexey Dobriyan
2010-03-24 13:33       ` Tejun Heo
2010-03-24 19:42   ` Christoph Lameter
2010-03-30 14:30   ` Lee Schermerhorn
2010-03-31  2:41     ` Tejun Heo
2010-03-24  8:48 ` [PATCH 4/4] percpu: don't implicitly include slab.h " Tejun Heo
2010-03-24 19:23   ` Christoph Lameter
2010-03-29  0:50 ` [PATCHSET] remove implicit slab.h inclusion from " Tejun Heo

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=1269420538-18039-2-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=ilw@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=yi.zhu@intel.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