提交 b3fcaaa8 编写于 作者: S Stephen Rothwell 提交者: Benjamin Herrenschmidt

powerpc: mman.h export fixups

Commit ef3d3246 ("powerpc/mm: Add Strong
Access Ordering support") in the powerpc/{next,master} tree caused the
following in a powerpc allmodconfig build:

usr/include/asm/mman.h requires linux/mm.h, which does not exist in exported headers

We should not use CONFIG_PPC64 in an unprotected (by __KERNEL__)
section of an exported include file and linux/mm.h is not exported.  So
protect the whole section that is CONFIG_PPC64 with __KERNEL__ and put
the two introduced includes in there as well.
Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
Acked-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 5b0504c0
......@@ -2,7 +2,6 @@ include include/asm-generic/Kbuild.asm
header-y += auxvec.h
header-y += ioctls.h
header-y += mman.h
header-y += sembuf.h
header-y += siginfo.h
header-y += stat.h
......
#ifndef _ASM_POWERPC_MMAN_H
#define _ASM_POWERPC_MMAN_H
#include <asm/cputable.h>
#include <asm-generic/mman.h>
#include <linux/mm.h>
/*
* This program is free software; you can redistribute it and/or
......@@ -28,7 +26,12 @@
#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
#ifdef __KERNEL__
#ifdef CONFIG_PPC64
#include <asm/cputable.h>
#include <linux/mm.h>
/*
* This file is included by linux/mman.h, so we can't use cacl_vm_prot_bits()
* here. How important is the optimization?
......@@ -56,4 +59,5 @@ static inline int arch_validate_prot(unsigned long prot)
#define arch_validate_prot(prot) arch_validate_prot(prot)
#endif /* CONFIG_PPC64 */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_MMAN_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册