From: Jeff Dike <jdike@addtoit.com>
To: LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: [RFC PATCH 0/2] Fix linux/swap.h build wart
Date: Fri, 26 Oct 2007 15:25:48 -0400 [thread overview]
Message-ID: <20071026192548.GA9174@c2.user-mode-linux.org> (raw)
For some time, there has been a problem of linux/swap.h using
page_cache_release and release_pages without declaring them by
including linux/pagemap.h. pagemap.h isn't included because that
breaks the sparc build.
The full details are in the next post, but the short story is that
sparc's pgtable.h includes linux/swap.h, creating a mm.h -> mm.h
recursion. The current tree breaks that recursion by removing the
swap.h -> pagemap.h inclusion. This breaks builds on a regular basis
(references also in the next post).
These patches propose to break the recursion instead by removing the
linux/pagemap.h -> linux/highmem.h inclusion. I'd like to know
whether there are any fundamental reasons that this include should be
preserved.
The reason for choosing this include is that pagemap.h doesn't use
anything exported by highmem.h. The downside is that a bunch of
things now need to include highmem.h. These are mostly filesystems,
plus a good amount of arch code and a few drivers. I would argue that
if you use something from a header, you should include it, regardless
of whether you already get the header indirectly, so this isn't too
much of a downside as far as I'm concerned.
The one thing I'm uncertain about is whether pagemap.h and highmem.h
have some basic relationship that implies that you can assume you get
highmem when you include pagemap.
The two patches that follow do the following:
remove highmem.h from pagemap.h and add includes of highmem.h
to a number of files that now need them
include pagemap.h in swap.h
These are for comment only, not for mainline, so there's no S-o-b
right yet.
At this point, I haven't confirmed that the following files, which use
stuff from highmem.h but don't include it, still build:
./arch/x86/kernel/crash_dump_64.c
./arch/frv/mm/fault.c
./arch/frv/mm/kmap.c
./arch/h8300/mm/kmap.c
./arch/ia64/kernel/crash_dump.c
./arch/m68k/mm/kmap.c
./arch/m68knommu/mm/kmap.c
./arch/powerpc/kernel/crash_dump.c
./arch/sh/kernel/crash_dump.c
./arch/xtensa/mm/pgtable.c
./drivers/block/ps3disk.c
./drivers/infiniband/hw/ipath/ipath_verbs.h
./drivers/mmc/host/at91_mci.c
./drivers/mmc/host/mmci.h
./drivers/mmc/host/mmc_spi.c
./drivers/s390/block/xpram.c
./drivers/s390/char/tape_34xx.c
./drivers/kvm/paging_tmpl.h
./fs/hfsplus/hfsplus_fs.h
./include/asm-arm/cacheflush.h
./include/asm-frv/pgtable.h
./include/asm-x86/kexec_32.h
./include/asm-x86/kexec_64.h
./include/asm-x86/pgtable_32.h
./include/asm-m68k/motorola_pgalloc.h
./include/asm-m68k/sun3_pgalloc.h
./include/asm-m68k/sun3_pgtable.h
./include/asm-mips/cacheflush.h
./include/asm-mips/page.h
./include/asm-parisc/cacheflush.h
./include/asm-powerpc/pgtable-ppc32.h
./include/asm-ppc/pgtable.h
./include/asm-s390/kexec.h
./include/asm-sh/kexec.h
./mm/migrate.c
Jeff
--
Work email - jdike at linux dot intel dot com
next reply other threads:[~2007-10-26 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 19:25 Jeff Dike [this message]
2007-10-26 20:38 ` [RFC PATCH 0/2] Fix linux/swap.h build wart Luck, Tony
2007-10-26 21:49 ` Jeff Dike
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=20071026192548.GA9174@c2.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 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).