linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Joe Perches <joe@perches.com>
Cc: linux-arch <linux-arch@vger.kernel.org>,
	Anton Blanchard <anton@au1.ibm.com>,
	Russell King <linux@arm.linux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	x86@kernel.org, Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH] Remove CONFIG_DCACHE_WORD_ACCESS
Date: Wed, 12 Mar 2014 07:37:20 +1100	[thread overview]
Message-ID: <1394570240.4840.48.camel@pasglop> (raw)
In-Reply-To: <1393964591.20435.58.camel@joe-AO722>

On Tue, 2014-03-04 at 12:23 -0800, Joe Perches wrote:
> It seems to duplicate CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
> so use that instead.
> 
> This changes the !CPU_LITTLE_ENDIAN powerpc arch to use unaligned
> accesses in fs/dcache.c and fs/namei.c as
> CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is enabled for that arch.
> 
> Remove the now unused DCACHE_WORD_ACCESS defines & uses.

Interesting.. we have word-at-a-time but we never enabled
DCACHE_WORD_ACCESS, I wonder why that is. In fact, we should
probably do it for LE as well for P8 if we can make a P8
only config option...

Anton, what do you reckon here ?

Cheers,
Ben.

> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/arm/Kconfig                      | 1 -
>  arch/arm/include/asm/word-at-a-time.h | 4 ++--
>  arch/arm64/Kconfig                    | 1 -
>  arch/x86/Kconfig                      | 1 -
>  fs/Kconfig                            | 4 ----
>  fs/dcache.c                           | 2 +-
>  fs/namei.c                            | 2 +-
>  7 files changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 623a272..d5a2e60 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -12,7 +12,6 @@ config ARM
>  	select BUILDTIME_EXTABLE_SORT if MMU
>  	select CLONE_BACKWARDS
>  	select CPU_PM if (SUSPEND || CPU_IDLE)
> -	select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
>  	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
>  	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
>  	select GENERIC_IDLE_POLL_SETUP
> diff --git a/arch/arm/include/asm/word-at-a-time.h b/arch/arm/include/asm/word-at-a-time.h
> index a6d0a29..778b2ad 100644
> --- a/arch/arm/include/asm/word-at-a-time.h
> +++ b/arch/arm/include/asm/word-at-a-time.h
> @@ -54,7 +54,7 @@ static inline unsigned long find_zero(unsigned long mask)
>  #include <asm-generic/word-at-a-time.h>
>  #endif
>  
> -#ifdef CONFIG_DCACHE_WORD_ACCESS
> +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
>  
>  /*
>   * Load an unaligned word from kernel space.
> @@ -94,5 +94,5 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
>  	return ret;
>  }
>  
> -#endif	/* DCACHE_WORD_ACCESS */
> +#endif	/* HAVE_EFFICIENT_UNALIGNED_ACCESS */
>  #endif /* __ASM_ARM_WORD_AT_A_TIME_H */
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 764d682..2d6978c 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -13,7 +13,6 @@ config ARM64
>  	select CLONE_BACKWARDS
>  	select COMMON_CLK
>  	select CPU_PM if (SUSPEND || CPU_IDLE)
> -	select DCACHE_WORD_ACCESS
>  	select GENERIC_CLOCKEVENTS
>  	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
>  	select GENERIC_IOMAP
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index abb261e..60cfa073 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -98,7 +98,6 @@ config X86
>  	select CLKEVT_I8253
>  	select ARCH_HAVE_NMI_SAFE_CMPXCHG
>  	select GENERIC_IOMAP
> -	select DCACHE_WORD_ACCESS
>  	select GENERIC_SMP_IDLE_THREAD
>  	select ARCH_WANT_IPC_PARSE_VERSION if X86_32
>  	select HAVE_ARCH_SECCOMP_FILTER
> diff --git a/fs/Kconfig b/fs/Kconfig
> index 312393f..7511271 100644
> --- a/fs/Kconfig
> +++ b/fs/Kconfig
> @@ -4,10 +4,6 @@
>  
>  menu "File systems"
>  
> -# Use unaligned word dcache accesses
> -config DCACHE_WORD_ACCESS
> -       bool
> -
>  if BLOCK
>  
>  source "fs/ext2/Kconfig"
> diff --git a/fs/dcache.c b/fs/dcache.c
> index 265e0ce..4e3c195 100644
> --- a/fs/dcache.c
> +++ b/fs/dcache.c
> @@ -163,7 +163,7 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer,
>   * Compare 2 name strings, return 0 if they match, otherwise non-zero.
>   * The strings are both count bytes long, and count is non-zero.
>   */
> -#ifdef CONFIG_DCACHE_WORD_ACCESS
> +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
>  
>  #include <asm/word-at-a-time.h>
>  /*
> diff --git a/fs/namei.c b/fs/namei.c
> index 385f781..1ee33ca 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -1618,7 +1618,7 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
>   *   the final mask". Again, that could be replaced with a
>   *   efficient population count instruction or similar.
>   */
> -#ifdef CONFIG_DCACHE_WORD_ACCESS
> +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
>  
>  #include <asm/word-at-a-time.h>
>  
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arch" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-03-11 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 20:23 [RFC PATCH] Remove CONFIG_DCACHE_WORD_ACCESS Joe Perches
2014-03-11 20:37 ` Benjamin Herrenschmidt [this message]
2014-03-26  4:54   ` Joe Perches

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=1394570240.4840.48.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=anton@au1.ibm.com \
    --cc=catalin.marinas@arm.com \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.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).