public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.19/20, 2.5 missing P4 ifdef ?
@ 2002-11-28 14:17 Margit Schubert-While
  2002-11-28 14:24 ` Dave Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Margit Schubert-While @ 2002-11-28 14:17 UTC (permalink / raw)
  To: linux-kernel

Just noticed this in "include/asm-i386/processor.h" :

--- snip ---
/* Prefetch instructions for Pentium III and AMD Athlon */
#ifdef  CONFIG_MPENTIUMIII
#define ARCH_HAS_PREFETCH
extern inline void prefetch(const void *x)
{
         __asm__ __volatile__ ("prefetchnta (%0)" : : "r"(x));
}
#elif CONFIG_X86_USE_3DNOW
--- end snip ---

The P4 has SSE and prefetch or no ?

Margit 


^ permalink raw reply	[flat|nested] 8+ messages in thread
* 2.4.19/20, 2.5 missing P4 ifdef ?
@ 2002-11-29  7:42 Margit Schubert-While
  0 siblings, 0 replies; 8+ messages in thread
From: Margit Schubert-While @ 2002-11-29  7:42 UTC (permalink / raw)
  To: linux-kernel

Here is the link to the Intel IA32 Software Developers Manual (Includes P4) :
http://developer.intel.com/design/pentium4/manuals/245470.htm

Margit 


^ permalink raw reply	[flat|nested] 8+ messages in thread
* 2.4.19/20, 2.5 missing P4 ifdef ?
@ 2002-12-03  9:01 Margit Schubert-While
  0 siblings, 0 replies; 8+ messages in thread
From: Margit Schubert-While @ 2002-12-03  9:01 UTC (permalink / raw)
  To: linux-kernel

 > I think you are mistaken. The prefetch instructions came to
 > Intel CPUs with SSE. There are no (afair) no SSE Pentium II's.

Correct.
And while we are at it, any kernel guru like to take a squint at
include/asm-i386 and arch/i386 ?
It seems to me that it should be possible to get a lot more out
of P3's and P4's.
Taking the example of the (misnamed) 3DNOW page_clear code,
for the P4(SSE2) it could be implemented as :

         __asm__ __volatile__ (
                 "  pxor %%xmm0, %%xmm0\n" : :
         );

         for(i=0;i<4096/128;i++)
         {
                 __asm__ __volatile__ (
                 "  movntdq %%xmm0, (%0)\n"
                 "  movntdq %%xmm0, 16(%0)\n"
                 "  movntdq %%xmm0, 32(%0)\n"
                 "  movntdq %%xmm0, 48(%0)\n"
                 "  movntdq %%xmm0, 64(%0)\n"
                 "  movntdq %%xmm0, 80(%0)\n"
                 "  movntdq %%xmm0, 96(%0)\n"
                 "  movntdq %%xmm0, 112(%0)\n"
                 : : "r" (page) : "memory");
                 page+=128;
         }
         /* since movntdq is weakly-ordered, a "sfence" is needed to become
          * ordered again.
          */
         __asm__ __volatile__ (
                 "  sfence \n" : :
         );

I'm quite willing to be flamed on this :-)

Margit 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-12-03  8:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-28 14:17 2.4.19/20, 2.5 missing P4 ifdef ? Margit Schubert-While
2002-11-28 14:24 ` Dave Jones
2002-11-28 17:12   ` Bill Davidsen
2002-11-29  4:51     ` GrandMasterLee
2002-11-29  0:08   ` J.A. Magallon
2002-12-02 13:24     ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2002-11-29  7:42 Margit Schubert-While
2002-12-03  9:01 Margit Schubert-While

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox