mirror of https://gitee.com/openkylin/linux.git
ARM: allow building alignment.c without PROC_FS
The two functions cpu_is_v6_unaligned and safe_usermode are only defined when CONFIG_PROC_FS is enabled, but are used outside of the #ifdef. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Dave Martin <dave.martin@linaro.org>
This commit is contained in:
parent
89bace652c
commit
ffc660c51b
|
@ -86,16 +86,6 @@ core_param(alignment, ai_usermode, int, 0600);
|
||||||
#define UM_FIXUP (1 << 1)
|
#define UM_FIXUP (1 << 1)
|
||||||
#define UM_SIGNAL (1 << 2)
|
#define UM_SIGNAL (1 << 2)
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
static const char *usermode_action[] = {
|
|
||||||
"ignored",
|
|
||||||
"warn",
|
|
||||||
"fixup",
|
|
||||||
"fixup+warn",
|
|
||||||
"signal",
|
|
||||||
"signal+warn"
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Return true if and only if the ARMv6 unaligned access model is in use. */
|
/* Return true if and only if the ARMv6 unaligned access model is in use. */
|
||||||
static bool cpu_is_v6_unaligned(void)
|
static bool cpu_is_v6_unaligned(void)
|
||||||
{
|
{
|
||||||
|
@ -123,6 +113,16 @@ static int safe_usermode(int new_usermode, bool warn)
|
||||||
return new_usermode;
|
return new_usermode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PROC_FS
|
||||||
|
static const char *usermode_action[] = {
|
||||||
|
"ignored",
|
||||||
|
"warn",
|
||||||
|
"fixup",
|
||||||
|
"fixup+warn",
|
||||||
|
"signal",
|
||||||
|
"signal+warn"
|
||||||
|
};
|
||||||
|
|
||||||
static int alignment_proc_show(struct seq_file *m, void *v)
|
static int alignment_proc_show(struct seq_file *m, void *v)
|
||||||
{
|
{
|
||||||
seq_printf(m, "User:\t\t%lu\n", ai_user);
|
seq_printf(m, "User:\t\t%lu\n", ai_user);
|
||||||
|
|
Loading…
Reference in New Issue