From: Helge Deller <deller@gmx.de>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>,
linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
linux-arch@vger.kernel.org, arnd@arndb.de,
"Eric W. Biederman" <ebiederm@xmission.com>,
Serge Hallyn <serge.hallyn@canonical.com>
Subject: Re: [RESEND PATCH] sysctl: Enable PARISC "unaligned-trap" to be used cross-arch
Date: Tue, 15 Jan 2013 23:03:14 +0100 [thread overview]
Message-ID: <50F5D222.8070208@gmx.de> (raw)
In-Reply-To: <1357196388-1247-2-git-send-email-vgupta@synopsys.com>
On 01/03/2013 07:59 AM, Vineet Gupta wrote:
> PARISC defines /proc/sys/kernel/unaligned-trap to runtime toggle
> unaligned access emulation.
>
> The exact mechanics of enablig/disabling are still arch specific, we can
> make the sysctl usable by other arches.
>
> Signed-off-by: Vineet Gupta<vgupta@synopsys.com>
> Cc: "James E.J. Bottomley"<jejb@parisc-linux.org>
> Cc: Helge Deller<deller@gmx.de>
> Cc: "Eric W. Biederman"<ebiederm@xmission.com>
> Cc: Serge Hallyn<serge.hallyn@canonical.com>
Acked-by: Helge Deller <deller@gmx.de>
Vineet, as discussed, please push it through the ARC architecture tree...
Helge
> ---
> arch/parisc/Kconfig | 1 +
> init/Kconfig | 8 ++++++++
> kernel/sysctl.c | 7 ++++++-
> 3 files changed, 15 insertions(+), 1 deletions(-)
>
> diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> index b77feff..8c76095 100644
> --- a/arch/parisc/Kconfig
> +++ b/arch/parisc/Kconfig
> @@ -20,6 +20,7 @@ config PARISC
> select ARCH_HAVE_NMI_SAFE_CMPXCHG
> select GENERIC_SMP_IDLE_THREAD
> select GENERIC_STRNCPY_FROM_USER
> + select SYSCTL_ARCH_UNALIGN_ALLOW
> select HAVE_MOD_ARCH_SPECIFIC
> select MODULES_USE_ELF_RELA
> select CLONE_BACKWARDS
> diff --git a/init/Kconfig b/init/Kconfig
> index e188f9f..e64bb18 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1240,6 +1240,14 @@ config SYSCTL_ARCH_UNALIGN_NO_WARN
> unaligned access emulation going on under the hood.
> see arch/ia64/kernel/unaligned.c for reference
>
> +config SYSCTL_ARCH_UNALIGN_ALLOW
> + bool
> + help
> + Enable support for /proc/sys/kernel/unaligned-trap
> + Allows arches to define/use @unaligned_enabled to runtime toggle
> + the unaligned access emulation.
> + see arch/parisc/kernel/unaligned.c for reference
> +
> config KALLSYMS
> bool "Load all symbols for debugging/ksymoops" if EXPERT
> default y
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 840fd5e..c4cd655 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -157,13 +157,16 @@ extern int sysctl_tsb_ratio;
>
> #ifdef __hppa__
> extern int pwrsw_enabled;
> -extern int unaligned_enabled;
> #endif
>
> #ifdef CONFIG_IA64
> extern int unaligned_dump_stack;
> #endif
>
> +#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
> +extern int unaligned_enabled;
> +#endif
> +
> #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
> extern int no_unaligned_warning;
> #endif
> @@ -548,6 +551,8 @@ static struct ctl_table kern_table[] = {
> .mode = 0644,
> .proc_handler = proc_dointvec,
> },
> +#endif
> +#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
> {
> .procname = "unaligned-trap",
> .data =&unaligned_enabled,
prev parent reply other threads:[~2013-01-15 22:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50D2B75A.3000208@synopsys.com>
[not found] ` <1356001898-2960-1-git-send-email-vgupta@synopsys.com>
2012-12-20 11:11 ` [PATCH] sysctl: convert arch specific unaligned access regulators to generic ones Vineet.Gupta1
2013-01-03 6:59 ` [RESEND PATCH] Convert PARISC sysctl to be generic Vineet Gupta
2013-01-03 6:59 ` [RESEND PATCH] sysctl: Enable PARISC "unaligned-trap" to be used cross-arch Vineet Gupta
2013-01-15 22:03 ` Helge Deller [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=50F5D222.8070208@gmx.de \
--to=deller@gmx.de \
--cc=Vineet.Gupta1@synopsys.com \
--cc=arnd@arndb.de \
--cc=ebiederm@xmission.com \
--cc=jejb@parisc-linux.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=serge.hallyn@canonical.com \
/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