On Sat, May 14, 2016 at 04:46:09PM +0200, Hans Petter Selasky wrote:
> On 05/13/16 20:43, John Baldwin wrote:
> > On Friday, May 13, 2016 10:10:44 AM Hans Petter Selasky wrote:
> >> @@ -190,6 +258,7 @@
> >>  #define   smp_processor_id()      PCPU_GET(cpuid)
> >>  #define   num_possible_cpus()     mp_ncpus
> >>  #define   num_online_cpus()       mp_ncpus
> >> +#define   cpu_has_clflush         (1)
> >
> > This is only true on amd64.  More accurate would be:
I am not aware of guarantees that clflush is always present on amd64.
The feature was added together with SSE2, but has separate feature bit
in CPUID and Intel explicitely states that the presence of SSE2 does
not imply CLFLUSH support.

In other words, the patch below should verify CPUID_CLFSH on both
i386 and amd64.

> >
> > #ifdef __amd64__
> > #define cpu_has_clflush (1)
> > #elif defined(__i386__)
> > #define cpu_has_clflush (cpu_feature & CPUID_CLFSH)
> > #else
> > #define cpu_has_clflush clflush_not_supported
> > #endif
> >
> > Presumably you aren't planning to restrict all of OFED and drm2 to only
> > be used on amd64?
> >
> 
> I'll handle this on Monday. Thank you for your patch!
> 
> --HPS
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to