Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
[PATCH] Fix 'make headers_check' for Alpha
Browse files Browse the repository at this point in the history
Alpha currently fails 'make headers_check' in the 2.6.18-rc kernels.  This
patch fixes it, by moving the existing #ifdef __KERNEL__ in asm/page.h so that
it covers everything that userspace shouldn't so, and by adding asm/compiler.h
to the list of exported files so that its use within asm/byteorder.h is
successful.

[ Note that at least with GCC 4, <linux/compiler.h> doesn't do the forced
  inlining about which there are nasty comments (and a workaround) in
  <asm/compiler.h>, unless you set CONFIG_FORCED_INLINING.  Rather than keep
  the mess you have in <asm/compiler.h> you could perhaps just make sure
  CONFIG_FORCED_INLINING=n is also honoured with GCC3, and make sure it cannot
  be set for Alpha? ]

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
dwmw2 authored and Linus Torvalds committed Sep 16, 2006
1 parent 75da736 commit 7f9d77d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/asm-alpha/Kbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include include/asm-generic/Kbuild.asm

unifdef-y += console.h fpu.h sysinfo.h
unifdef-y += console.h fpu.h sysinfo.h compiler.h

header-y += gentrap.h regdef.h pal.h reg.h
3 changes: 3 additions & 0 deletions include/asm-alpha/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
__asm__("stw %1,%0" : "=m"(mem) : "r"(val))
#endif

#ifdef __KERNEL__
/* Some idiots over in <linux/compiler.h> thought inline should imply
always_inline. This breaks stuff. We'll include this file whenever
we run into such problems. */
Expand All @@ -101,4 +102,6 @@
#undef __always_inline
#define __always_inline inline __attribute__((always_inline))

#endif /* __KERNEL__ */

#endif /* __ALPHA_COMPILER_H */
6 changes: 3 additions & 3 deletions include/asm-alpha/page.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#ifndef _ALPHA_PAGE_H
#define _ALPHA_PAGE_H

#ifdef __KERNEL__

#include <asm/pal.h>

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 13
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))

#ifdef __KERNEL__

#ifndef __ASSEMBLY__

#define STRICT_MM_TYPECHECKS
Expand Down Expand Up @@ -92,9 +92,9 @@ typedef unsigned long pgprot_t;

#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */

#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* __KERNEL__ */
#endif /* _ALPHA_PAGE_H */

0 comments on commit 7f9d77d

Please sign in to comment.