All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] mm: <asm-generic/pgtable.h> must include <linux/mm_types.h>
Date: Sun, 27 Feb 2011 05:41:35 +0000	[thread overview]
Message-ID: <1298785295.3069.61.camel@localhost> (raw)

Commit e2cda322648122dc400c85ada80eaddbc612ef6a 'thp: add pmd mangling
generic functions' replaced some macros in <asm-generic/pgtable.h>
with inline functions.  If the functions are to be defined (not all
architectures need them) then struct vm_area_struct must be defined
first.  So include <linux/mm_types.h>.

Fixes a build failure seen in Debian:

  CC [M]  drivers/media/dvb/mantis/mantis_pci.o
In file included from /build/buildd-linux-2.6_2.6.38~rc6-1~experimental.1-armel-6J2ga4/linux-2.6-2.6.38~rc6/debian/build/source_armel_none/arch/arm/include/asm/pgtable.h:460,
                 from /build/buildd-linux-2.6_2.6.38~rc6-1~experimental.1-armel-6J2ga4/linux-2.6-2.6.38~rc6/debian/build/source_armel_none/drivers/media/dvb/mantis/mantis_pci.c:25:
/build/buildd-linux-2.6_2.6.38~rc6-1~experimental.1-armel-6J2ga4/linux-2.6-2.6.38~rc6/debian/build/source_armel_none/include/asm-generic/pgtable.h: In function 'ptep_test_and_clear_young':
/build/buildd-linux-2.6_2.6.38~rc6-1~experimental.1-armel-6J2ga4/linux-2.6-2.6.38~rc6/debian/build/source_armel_none/include/asm-generic/pgtable.h:29: error: dereferencing pointer to incomplete type

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 include/asm-generic/pgtable.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 31b6188..b4bfe33 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -4,6 +4,8 @@
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_MMU
 
+#include <linux/mm_types.h>
+
 #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
 extern int ptep_set_access_flags(struct vm_area_struct *vma,
 				 unsigned long address, pte_t *ptep,
-- 
1.7.4.1



WARNING: multiple messages have this Message-ID (diff)
From: Ben Hutchings <ben@decadent.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] mm: <asm-generic/pgtable.h> must include <linux/mm_types.h>
Date: Sun, 27 Feb 2011 05:41:35 +0000	[thread overview]
Message-ID: <1298785295.3069.61.camel@localhost> (raw)

Commit e2cda322648122dc400c85ada80eaddbc612ef6a 'thp: add pmd mangling
generic functions' replaced some macros in <asm-generic/pgtable.h>
with inline functions.  If the functions are to be defined (not all
architectures need them) then struct vm_area_struct must be defined
first.  So include <linux/mm_types.h>.

Fixes a build failure seen in Debian:

  CC [M]  drivers/media/dvb/mantis/mantis_pci.o
In file included from /build/buildd-linux-2.6_2.6.38~rc6-1~experimental.1-armel-6J2ga4/linux-2.6-2.6.38~rc6/debian/build/source_armel_none/arch/arm/include/asm/pgtable.h:460,
                 from /build/buildd-linux-2.6_2.6.38~rc6-1~experimental.1-armel-6J2ga4/linux-2.6-2.6.38~rc6/debian/build/source_armel_none/drivers/media/dvb/mantis/mantis_pci.c:25:
/build/buildd-linux-2.6_2.6.38~rc6-1~experimental.1-armel-6J2ga4/linux-2.6-2.6.38~rc6/debian/build/source_armel_none/include/asm-generic/pgtable.h: In function 'ptep_test_and_clear_young':
/build/buildd-linux-2.6_2.6.38~rc6-1~experimental.1-armel-6J2ga4/linux-2.6-2.6.38~rc6/debian/build/source_armel_none/include/asm-generic/pgtable.h:29: error: dereferencing pointer to incomplete type

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 include/asm-generic/pgtable.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 31b6188..b4bfe33 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -4,6 +4,8 @@
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_MMU
 
+#include <linux/mm_types.h>
+
 #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
 extern int ptep_set_access_flags(struct vm_area_struct *vma,
 				 unsigned long address, pte_t *ptep,
-- 
1.7.4.1


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2011-02-27  5:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-27  5:41 Ben Hutchings [this message]
2011-02-27  5:41 ` [PATCH] mm: <asm-generic/pgtable.h> must include <linux/mm_types.h> Ben Hutchings

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=1298785295.3069.61.camel@localhost \
    --to=ben@decadent.org.uk \
    --cc=aarcange@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@linux-foundation.org \
    /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.