From: js07.lee@samsung.com (이정승)
To: linux-arm-kernel@lists.infradead.org
Subject: [Q] L1_CACHE_BYTES on flush_pfn_alias function.
Date: Fri, 17 Jan 2014 18:54:42 +0900 [thread overview]
Message-ID: <00d501cf136a$24ec49c0$6ec4dd40$@samsung.com> (raw)
Hi,
Follow the mailing-list
http://comments.gmane.org/gmane.linux.ports.arm.omap/31686
>>Setting the L1 cache line size larger than it actually is should be safe.
the written code expected as L1_CACHE_BYTES should be real cache line size
has bug.
It looks like that flush_pfn_alias function should be fixed.
Anybody to have another opinion?
Cheers,
JS
-----Original Message-----
From: ??? [mailto:js07.lee at samsung.com]
Sent: Tuesday, January 14, 2014 10:43 PM
To: 'catalin.marinas at arm.com'; 'linux-arm-kernel at lists.infradead.org'
Cc: 'linux at arm.linux.org.uk'
Subject: Question on flush_pfn_alias function.
Dear Catalin,
I found below function and that clean and invalidate data cache range with
"mcrr"
The end address is end of page - L1_CACHE_BYTES (e.g. 32 , 64)
+static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) {
+ unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) <<
+PAGE_SHIFT);
+
+ set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL));
+ flush_tlb_kernel_page(to);
+
+ asm( "mcrr p15, 0, %1, %0, c14\n"
+ " mcrr p15, 0, %1, %0, c5\n"
+ :
+ : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES)
+ : "cc");
+}
However, follow the mail and current setting in vanilla kernel,
L1_CACHE_BYTES of Cortex A9 will be 64 not 32.
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/183316.html
I think that could be problem.
What is your opinion?
WARNING: multiple messages have this Message-ID (diff)
From: 이정승 <js07.lee@samsung.com>
To: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org
Cc: linux@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: [Q] L1_CACHE_BYTES on flush_pfn_alias function.
Date: Fri, 17 Jan 2014 18:54:42 +0900 [thread overview]
Message-ID: <00d501cf136a$24ec49c0$6ec4dd40$@samsung.com> (raw)
Hi,
Follow the mailing-list
http://comments.gmane.org/gmane.linux.ports.arm.omap/31686
>>Setting the L1 cache line size larger than it actually is should be safe.
the written code expected as L1_CACHE_BYTES should be real cache line size
has bug.
It looks like that flush_pfn_alias function should be fixed.
Anybody to have another opinion?
Cheers,
JS
-----Original Message-----
From: 이정승 [mailto:js07.lee@samsung.com]
Sent: Tuesday, January 14, 2014 10:43 PM
To: 'catalin.marinas@arm.com'; 'linux-arm-kernel@lists.infradead.org'
Cc: 'linux@arm.linux.org.uk'
Subject: Question on flush_pfn_alias function.
Dear Catalin,
I found below function and that clean and invalidate data cache range with
"mcrr"
The end address is end of page - L1_CACHE_BYTES (e.g. 32 , 64)
+static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) {
+ unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) <<
+PAGE_SHIFT);
+
+ set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL));
+ flush_tlb_kernel_page(to);
+
+ asm( "mcrr p15, 0, %1, %0, c14\n"
+ " mcrr p15, 0, %1, %0, c5\n"
+ :
+ : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES)
+ : "cc");
+}
However, follow the mail and current setting in vanilla kernel,
L1_CACHE_BYTES of Cortex A9 will be 64 not 32.
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/183316.html
I think that could be problem.
What is your opinion?
next reply other threads:[~2014-01-17 9:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 9:54 이정승 [this message]
2014-01-17 9:54 ` [Q] L1_CACHE_BYTES on flush_pfn_alias function 이정승
2014-01-24 15:43 ` Catalin Marinas
2014-01-24 15:43 ` Catalin Marinas
2014-01-26 5:13 ` Jungseung Lee
2014-01-26 5:13 ` Jungseung Lee
2014-01-27 16:43 ` Catalin Marinas
2014-01-27 16:43 ` Catalin Marinas
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='00d501cf136a$24ec49c0$6ec4dd40$@samsung.com' \
--to=js07.lee@samsung.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.