From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: make cpu_is_v6_unaligned() and safe_usermode() independent of CONFIG_PROC_FS
Date: Mon, 12 Sep 2011 15:42:54 +0100 [thread overview]
Message-ID: <20110912144253.GC2020@arm.com> (raw)
In-Reply-To: <1315630186-29654-1-git-send-email-eric.miao@linaro.org>
On Fri, Sep 09, 2011 at 09:49:46PM -0700, eric.miao at linaro.org wrote:
> From: Eric Miao <eric.miao@linaro.org>
>
> Signed-off-by: Eric Miao <eric.miao@linaro.org>
Yes, including that function inside the #ifdef was unintentional.
The change looks sensible to me.
Reviewed-by: Dave Martin <dave.martin@linaro.org>
> ---
>
> It turned out both cpu_is_v6_unaligned and safe_usermode() could be
> referenced without CONFIG_PROC_FS being defined.
>
> arch/arm/mm/alignment.c | 20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
> index cfbcf8b..c335c76 100644
> --- a/arch/arm/mm/alignment.c
> +++ b/arch/arm/mm/alignment.c
> @@ -86,16 +86,6 @@ core_param(alignment, ai_usermode, int, 0600);
> #define UM_FIXUP (1 << 1)
> #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. */
> static bool cpu_is_v6_unaligned(void)
> {
> @@ -123,6 +113,16 @@ static int safe_usermode(int new_usermode, bool warn)
> 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)
> {
> seq_printf(m, "User:\t\t%lu\n", ai_user);
> --
> 1.7.4.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2011-09-12 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-10 4:49 [PATCH v2] ARM: make cpu_is_v6_unaligned() and safe_usermode() independent of CONFIG_PROC_FS eric.miao at linaro.org
2011-09-10 14:25 ` Nicolas Pitre
2011-09-12 14:42 ` Dave Martin [this message]
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=20110912144253.GC2020@arm.com \
--to=dave.martin@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).