Re: [PATCH 7 of 20] ipath - misc driver support code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 > +/**
 > + * ipath_unordered_wc - indicate whether write combining is ordered
 > + *
 > + * Because our performance depends on our ability to do write combining mmio
 > + * writes in the most efficient way, we need to know if we are on an Intel
 > + * or AMD x86_64 processor.  AMD x86_64 processors flush WC buffers out in
 > + * the order completed, and so no special flushing is required to get
 > + * correct ordering.  Intel processors, however, will flush write buffers
 > + * out in "random" orders, and so explict ordering is needed at times.
 > + */
 > +int ipath_unordered_wc(void)
 > +{
 > +	return boot_cpu_data.x86_vendor == X86_VENDOR_INTEL;
 > +}

This is kind of theoritical, but it seems to me that it would be safer
to write this as

	int ipath_unordered_wc(void)
	{
		return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
	}

after all, Via is probably going to have an x86-64 CPU one of these
days, and I doubt you've checked that their WC flush is ordered.

 - R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux