From owner-svn-src-all@FreeBSD.ORG Fri Aug 29 18:13:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF7AA1A9; Fri, 29 Aug 2014 18:13:53 +0000 (UTC) Received: from mail-vc0-x234.google.com (mail-vc0-x234.google.com [IPv6:2607:f8b0:400c:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 543991142; Fri, 29 Aug 2014 18:13:53 +0000 (UTC) Received: by mail-vc0-f180.google.com with SMTP id lf12so2818341vcb.25 for ; Fri, 29 Aug 2014 11:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yF0C0osERl25I5ajeI8hltOXk2RKyq2C/TW4R1Ue2S8=; b=im6sk2N/nXiPmq+uAItxyF+rqtSgt95FkLsR27TrkYjYIsSUxr2hNSS52y2E+Zznws h8mnv4HboFpFba3XN8xJQ5EEXPDFIOdhyetL3a1e6mwWBE7Alr6X/X9+xqBouZTIS4Om UzyRzYQszL0AtowLZUcRsNrgZmDx3RMPV+5TZV2NFhjtePy+2XwH30Ey7qKb+wFjnfJ9 udYq8B3W7a0zknlEz+QD679ibguiAbqFGlSBb6Hz5lt4zoqNrQ1TOcgY5G1SKgWuG4pp mtGJClJSJzLNnZ40KxqgvANtsBiLP7mzBATBix3tDYFNohr40PcGVfpHaXjC9EYbflQQ 7PkA== MIME-Version: 1.0 X-Received: by 10.52.61.136 with SMTP id p8mr9842686vdr.15.1409336032435; Fri, 29 Aug 2014 11:13:52 -0700 (PDT) Received: by 10.221.20.199 with HTTP; Fri, 29 Aug 2014 11:13:52 -0700 (PDT) In-Reply-To: References: <201408291240.s7TCe1OQ029986@svn.freebsd.org> <20140829171452.GO2737@kib.kiev.ua> Date: Fri, 29 Aug 2014 11:13:52 -0700 Message-ID: Subject: Re: svn commit: r270806 - head/sys/dev/ixl From: Jack Vogel To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "Bjoern A. Zeeb" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2014 18:13:53 -0000 OH, and I just asked the team here, and found out we explicitly do NOT support any 32 bit environment for this driver. Jack On Fri, Aug 29, 2014 at 10:49 AM, Jack Vogel wrote: > I certainly agree that it would be a bit ridiculous to do 40G in a 32bit > environment :) > > Jack > > > > On Fri, Aug 29, 2014 at 10:14 AM, Konstantin Belousov > wrote: > >> On Fri, Aug 29, 2014 at 12:40:01PM +0000, Bjoern A. Zeeb wrote: >> > Author: bz >> > Date: Fri Aug 29 12:40:01 2014 >> > New Revision: 270806 >> > URL: http://svnweb.freebsd.org/changeset/base/270806 >> > >> > Log: >> > Properly handle prefetch only for amd64 and i386 as we do elsewhere. >> > >> > In general theraven is right that we should factr this out and provide >> > a general and per-arch implementation that everything can use. >> > >> > MFC after: 3 days >> > X-MFC with: r270755 >> > >> > Modified: >> > head/sys/dev/ixl/i40e_osdep.h >> > >> > Modified: head/sys/dev/ixl/i40e_osdep.h >> > >> ============================================================================== >> > --- head/sys/dev/ixl/i40e_osdep.h Fri Aug 29 11:18:54 2014 >> (r270805) >> > +++ head/sys/dev/ixl/i40e_osdep.h Fri Aug 29 12:40:01 2014 >> (r270806) >> > @@ -137,11 +137,15 @@ struct i40e_spinlock { >> > >> > #define le16_to_cpu >> > >> > +#if defined(__amd64__) || defined(i386) >> > static __inline >> > void prefetch(void *x) >> > { >> > __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); >> > } >> This only fix the build failure, but the code is still somewhat wrong. >> >> Availability of the prefetch instruction depends on the presence of SSE. >> Althought it is probably impossible to find a machine where the intended >> hardware can operate and which does not support SSE _currently_, I am >> not sure that it is wise to hard-code SSE instructions in the i386 >> kernel. >> >> Might be, a change of the compilation test from both amd64 and i386 to >> just amd64 is due. I doubt that anybody would use 40Gb with 32bit OS, >> and even if somebody does, that the performace is at the stake in >> this case. >> >> > +#else >> > +#define prefetch(x) >> > +#endif >> > >> > struct i40e_osdep >> > { >> > >