mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
Cc: linux-kernel@vger.kernel.org, Christoph Lameter <clameter@engr.sgi.com>
Subject: Re: 2.6.12-rc2-mm1
Date: Wed, 6 Apr 2005 15:07:03 -0700	[thread overview]
Message-ID: <20050406150703.409dba1c.akpm@osdl.org> (raw)
In-Reply-To: <d2to03$t0t$1@sea.gmane.org>

Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz> wrote:
>
> oes not compile on AthlonXP. For mmx_clear_page, only the prototype was
> changed, but the implementation is still the same. I guess that part of
> the patch slipped out somehow.
> 
> -extern void mmx_clear_page(void *page);
> 
> +extern void mmx_clear_page(void *page, int order);

I guess this will fix it...


diff -puN arch/i386/lib/mmx.c~add-a-clear_pages-function-to-clear-pages-of-higher-fix arch/i386/lib/mmx.c
--- 25/arch/i386/lib/mmx.c~add-a-clear_pages-function-to-clear-pages-of-higher-fix	Wed Apr  6 15:00:54 2005
+++ 25-akpm/arch/i386/lib/mmx.c	Wed Apr  6 15:06:09 2005
@@ -128,9 +128,10 @@ void *_mmx_memcpy(void *to, const void *
  *	other MMX using processors do not.
  */
 
-static void fast_clear_page(void *page)
+static void fast_clear_page(void *page, int order)
 {
 	int i;
+	int chunks = (4096 << order) / 64;
 
 	kernel_fpu_begin();
 	
@@ -138,8 +139,7 @@ static void fast_clear_page(void *page)
 		"  pxor %%mm0, %%mm0\n" : :
 	);
 
-	for(i=0;i<4096/64;i++)
-	{
+	for (i = 0; i < chunks; i++) {
 		__asm__ __volatile__ (
 		"  movntq %%mm0, (%0)\n"
 		"  movntq %%mm0, 8(%0)\n"
@@ -257,18 +257,18 @@ static void fast_copy_page(void *to, voi
  *	Generic MMX implementation without K7 specific streaming
  */
  
-static void fast_clear_page(void *page)
+static void fast_clear_page(void *page, int order)
 {
 	int i;
-	
+	int chunks = (4096 << order) / 128;
+
 	kernel_fpu_begin();
 	
 	__asm__ __volatile__ (
 		"  pxor %%mm0, %%mm0\n" : :
 	);
 
-	for(i=0;i<4096/128;i++)
-	{
+	for (i = 0; i < chunks; i++) {
 		__asm__ __volatile__ (
 		"  movq %%mm0, (%0)\n"
 		"  movq %%mm0, 8(%0)\n"
@@ -359,23 +359,23 @@ static void fast_copy_page(void *to, voi
  *	Favour MMX for page clear and copy. 
  */
 
-static void slow_zero_page(void * page)
+static void slow_zero_page(void *page, int order)
 {
 	int d0, d1;
 	__asm__ __volatile__( \
 		"cld\n\t" \
 		"rep ; stosl" \
 		: "=&c" (d0), "=&D" (d1)
-		:"a" (0),"1" (page),"0" (1024)
+		:"a" (0),"1" (page),"0" (1024 << order)
 		:"memory");
 }
  
-void mmx_clear_page(void * page)
+void mmx_clear_page(void *page, int order)
 {
 	if(unlikely(in_interrupt()))
-		slow_zero_page(page);
+		slow_zero_page(page, order);
 	else
-		fast_clear_page(page);
+		fast_clear_page(page, order);
 }
 
 static void slow_copy_page(void *to, void *from)
_


  reply	other threads:[~2005-04-06 22:07 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-05  7:05 2.6.12-rc2-mm1 Andrew Morton
2005-04-05  7:21 ` 2.6.12-rc2-mm1 Dave Airlie
2005-04-05  7:33 ` 2.6.12-rc2-mm1 Nick Piggin
2005-04-05  7:59   ` 2.6.12-rc2-mm1 Ingo Molnar
2005-04-05 18:51   ` 2.6.12-rc2-mm1 Siddha, Suresh B
2005-04-05 23:42     ` 2.6.12-rc2-mm1 Nick Piggin
2005-04-06 17:11     ` 2.6.12-rc2-mm1 Nick Piggin
2005-04-08  1:08       ` 2.6.12-rc2-mm1 Siddha, Suresh B
2005-04-08  2:28         ` 2.6.12-rc2-mm1 Nick Piggin
2005-04-05  7:39 ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05  7:45   ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-05  7:59     ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05  8:05       ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-07 17:00     ` 2.6.12-rc2-mm1 - printk timing broken Damir Perisa
2005-04-05  8:30   ` 2.6.12-rc2-mm1 Ingo Molnar
2005-04-05  8:40     ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05 18:34       ` 2.6.12-rc2-mm1 Ingo Molnar
2005-04-06  9:09         ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05  7:44 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05  9:07   ` 2.6.12-rc2-mm1 Dave Airlie
2005-04-05  9:20     ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05  9:25       ` 2.6.12-rc2-mm1 Dave Airlie
2005-04-05  9:30       ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05  9:44         ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05  9:45           ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05  9:51             ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05  9:54               ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05  9:58                 ` 2.6.12-rc2-mm1 Dave Airlie
2005-04-05 10:03                   ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05  9:58                 ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05  9:33       ` 2.6.12-rc2-mm1 Arjan van de Ven
2005-04-05  9:11   ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05  9:12     ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05  9:35       ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05  9:36         ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05  7:45 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05  7:51   ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-05 16:48   ` 2.6.12-rc2-mm1 David Woodhouse
2005-04-05  8:18 ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05  8:46 ` 2.6.12-rc2-mm1 Rafael J. Wysocki
2005-04-05 10:08 ` 2.6.12-rc2-mm1 Jindrich Makovicka
2005-04-06 22:07   ` Andrew Morton [this message]
2005-04-05 10:18 ` 2.6.12-rc2-mm1 Andrey Panin
2005-04-05 12:21 ` [-mm patch] Makefile: fix spaces instead of tab Adrian Bunk
2005-04-05 13:19   ` Sam Ravnborg
2005-04-05 12:40 ` 2.6.12-rc2-mm1 Borislav Petkov
2005-04-05 13:44 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-05 14:14   ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-05 22:03     ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-06  0:56     ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-06  7:19       ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-06 12:59       ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-06 21:27         ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-07  3:06           ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-07  6:55             ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-08 10:33             ` 2.6.12-rc2-mm1 Pavel Machek
2005-04-10 21:18               ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-10 21:27                 ` 2.6.12-rc2-mm1 Pavel Machek
2005-04-10 22:57                   ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-10 23:00                     ` 2.6.12-rc2-mm1 Pavel Machek
2005-04-11  4:31                       ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-11 10:57                         ` swsusp vs. xfs [was Re: 2.6.12-rc2-mm1] Pavel Machek
2005-04-11 23:12                           ` [xfs-masters] " Nathan Scott
2005-04-11 23:51                             ` Pavel Machek
2005-04-12  0:26                               ` Nathan Scott
2005-04-12 11:04                                 ` Pavel Machek
2005-04-12 11:50                                   ` Barry K. Nathan
2005-04-12 12:47                               ` Rafael J. Wysocki
2005-04-11  7:38                     ` 2.6.12-rc2-mm1 Stefan Seyfried
2005-04-05 14:24 ` [-mm patch] drivers/infiniband/hw/mthca/mthca_main.c: remove an unused label Adrian Bunk
2005-04-05 14:37   ` Hal Rosenstock
2005-04-05 16:53   ` Roland Dreier
2005-04-05 15:45 ` 2.6.12-rc2-mm1 Jan Dittmer
2005-04-05 21:38   ` 2.6.12-rc2-mm1 Sam Ravnborg
2005-04-05 17:11 ` 2.6.12-rc2-mm1 Christophe Saout
2005-04-06  1:44 ` 2.6.12-rc2-mm1 Neil Brown
2005-04-06 22:19   ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-07  0:40 ` 2.6.12-rc2-mm1 Ed Tomlinson
2005-04-07  7:14 ` 2.6.12-rc2-mm1 Mickael Marchand
2005-04-08 18:13   ` [-mm patch] x86_64: kill obsolete check_nmi_watchdog prototype Adrian Bunk
2005-04-08 18:21     ` Mickael Marchand
     [not found] <fa.gcqu6i7.1o6qrhn@ifi.uio.no>
2005-04-05  8:34 ` 2.6.12-rc2-mm1 Reuben Farrelly
2005-04-05 12:14   ` 2.6.12-rc2-mm1 Adrian Bunk
2005-04-05 12:32     ` 2.6.12-rc2-mm1 Reuben Farrelly

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=20050406150703.409dba1c.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=makovick@kmlinux.fjfi.cvut.cz \
    /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

all inboxes | Powered by JetHome®