mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
To: ext Jamie Lokier <jamie@shareable.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
	ARM Linux Mailing List  <linux-arm-kernel@lists.arm.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM: copy_page.S: take into account the size of the cache line
Date: Wed, 15 Jul 2009 16:12:19 +0300	[thread overview]
Message-ID: <200907151612.20240.siarhei.siamashka@nokia.com> (raw)
In-Reply-To: <20090710235123.GE30322@shareable.org>

On Saturday 11 July 2009 02:51:23 ext Jamie Lokier wrote:
> Kirill A. Shutemov wrote:
> > From: Kirill A. Shutemov <kirill@shutemov.name>
> >
> > Optimized version of copy_page() was written with assumption that cache
> > line size is 32 bytes. On Cortex-A8 cache line size is 64 bytes.
> >
> > This patch tries to generalize copy_page() to work with any cache line
> > size if cache line size is multiple of 16 and page size is multiple of
> > two cache line size.
> >
> > Unfortunately, kernel doesn't provide a macros with correct cache size.
> > L1_CACHE_SHIFT is 5 on any ARM. So we have to define macros for this
> > propose by ourself.
>
> Why don't you fix L1_CACHE_SHIFT for Cortex-A8?

That's the plan.

Right now Kirill is on a vacation, but I think he can continue investigating
this stuff when he is back and will come up with a clean solution.

Fixing L1_CACHE_SHIFT may open a whole can of worms (fixing some old
bugs, or breaking some things that might work only when incorrectly
assuming that cache line is always 32 bytes). For example, looks like this
thing in 'arch/arm/include/asm/dma-mapping.h' may be dangerous for
ARM cores, which have cache line size different from 32:

static inline int dma_get_cache_alignment(void)
{
     return 32;
}

-- 
Best regards,
Siarhei Siamashka

  reply	other threads:[~2009-07-15 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 16:23 Kirill A. Shutemov
2009-07-10 23:51 ` Jamie Lokier
2009-07-15 13:12   ` Siarhei Siamashka [this message]
2009-07-15 13:55     ` Russell King - ARM Linux
2009-09-02 13:24 [PATCH 2/2] " Russell King - ARM Linux
2009-09-02 17:19 ` [PATCH] " Kirill A. Shutemov

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=200907151612.20240.siarhei.siamashka@nokia.com \
    --to=siarhei.siamashka@nokia.com \
    --cc=jamie@shareable.org \
    --cc=kirill@shutemov.name \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.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

Powered by JetHome