From owner-svn-src-head@freebsd.org Sat May 14 16:24:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CC46B3BEA8; Sat, 14 May 2016 16:24:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D92F1959; Sat, 14 May 2016 16:24:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u4EGOd39048074 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 14 May 2016 19:24:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u4EGOd39048074 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u4EGOd2i048073; Sat, 14 May 2016 19:24:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 14 May 2016 19:24:39 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r299653 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <20160514162439.GO89104@kib.kiev.ua> References: <201605131010.u4DAAioY094617@repo.freebsd.org> <1651080.VgjHNWYnll@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2016 16:24:44 -0000 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