Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-14 Thread Herbert Xu
On Thu, Jan 09, 2014 at 08:57:42AM -0800, Tim Chen wrote:

 From 41656afcbd63ccb92357d4937a75629499f4fd4f Mon Sep 17 00:00:00 2001
 From: Tim Chen tim.c.c...@linux.intel.com
 Date: Mon, 6 Jan 2014 07:23:52 -0800
 Subject: [PATCH] crypto: Rename aesni-intel_avx.S to indicate it only
  supports x86_64
 To: Herbert Xu herb...@gondor.apana.org.au, H. Peter Anvin h...@zytor.com
 Cc: Borislav Petkov b...@alien8.de, Andy Shevchenko 
 andriy.shevche...@linux.intel.com, linux-crypto@vger.kernel.org
 
 We rename aesni-intel_avx.S to aesni-intel_avx-x86_64.S to indicate
 that it is only used by x86_64 architecture.
 ---
  arch/x86/crypto/Makefile| 2 +-
  arch/x86/crypto/{aesni-intel_avx.S = aesni-intel_avx-x86_64.S} | 0
  2 files changed, 1 insertion(+), 1 deletion(-)
  rename arch/x86/crypto/{aesni-intel_avx.S = aesni-intel_avx-x86_64.S} (100%)
 
 Signed-off-by: Tim Chen tim.c.c...@linux.intel.com

Patch applied.
-- 
Email: Herbert Xu herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-09 Thread Herbert Xu
On Mon, Jan 06, 2014 at 03:39:06PM -0800, Tim Chen wrote:
 On Mon, 2014-01-06 at 13:21 -0800, H. Peter Anvin wrote:
  On 01/06/2014 12:26 PM, Borislav Petkov wrote:
   On Mon, Jan 06, 2014 at 10:10:55AM -0800, Tim Chen wrote:
   Yes, the code is in the file named aesni_intel_avx.S. So it should be
   clear that the code is meant for x86_64.
   
   How do you deduce aesni_intel_avx.S is meant for x86_64 only from the
   name?
   
   Shouldn't it be called aesni_intel_avx-x86_64.S, as is the naming
   convention in arch/x86/crypto/
   
  
  Quite.
  
  -hpa
  
  
 
 Will renaming the file to aesni_intel_avx-x86_64.S make things clearer
 now?
 
 Tim
 
 ---cut---here---
 
 From 41656afcbd63ccb92357d4937a75629499f4fd4f Mon Sep 17 00:00:00 2001
 From: Tim Chen tim.c.c...@linux.intel.com
 Date: Mon, 6 Jan 2014 07:23:52 -0800
 Subject: [PATCH] crypto: Rename aesni-intel_avx.S to indicate it only
  supports x86_64
 To: Herbert Xu herb...@gondor.apana.org.au, H. Peter Anvin h...@zytor.com
 Cc: Borislav Petkov b...@alien8.de, Andy Shevchenko 
 andriy.shevche...@linux.intel.com, linux-crypto@vger.kernel.org
 
 We rename aesni-intel_avx.S to aesni-intel_avx-x86_64.S to indicate
 that it is only used by x86_64 architecture.

Hmm, where is the signed-off-by line? Please resend.  Thanks.
-- 
Email: Herbert Xu herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-09 Thread Tim Chen
On Thu, 2014-01-09 at 17:03 +0800, Herbert Xu wrote:
 On Mon, Jan 06, 2014 at 03:39:06PM -0800, Tim Chen wrote:
  On Mon, 2014-01-06 at 13:21 -0800, H. Peter Anvin wrote:
   On 01/06/2014 12:26 PM, Borislav Petkov wrote:
On Mon, Jan 06, 2014 at 10:10:55AM -0800, Tim Chen wrote:
Yes, the code is in the file named aesni_intel_avx.S. So it should be
clear that the code is meant for x86_64.

How do you deduce aesni_intel_avx.S is meant for x86_64 only from the
name?

Shouldn't it be called aesni_intel_avx-x86_64.S, as is the naming
convention in arch/x86/crypto/

   
   Quite.
   
 -hpa
   
   
  
  Will renaming the file to aesni_intel_avx-x86_64.S make things clearer
  now?
  
  Tim
  
  ---cut---here---
  
  From 41656afcbd63ccb92357d4937a75629499f4fd4f Mon Sep 17 00:00:00 2001
  From: Tim Chen tim.c.c...@linux.intel.com
  Date: Mon, 6 Jan 2014 07:23:52 -0800
  Subject: [PATCH] crypto: Rename aesni-intel_avx.S to indicate it only
   supports x86_64
  To: Herbert Xu herb...@gondor.apana.org.au, H. Peter Anvin 
  h...@zytor.com
  Cc: Borislav Petkov b...@alien8.de, Andy Shevchenko 
  andriy.shevche...@linux.intel.com, linux-crypto@vger.kernel.org
  
  We rename aesni-intel_avx.S to aesni-intel_avx-x86_64.S to indicate
  that it is only used by x86_64 architecture.
 
 Hmm, where is the signed-off-by line? Please resend.  Thanks.

Oops, here it is again.

Tim


---cut---here---
From 41656afcbd63ccb92357d4937a75629499f4fd4f Mon Sep 17 00:00:00 2001
From: Tim Chen tim.c.c...@linux.intel.com
Date: Mon, 6 Jan 2014 07:23:52 -0800
Subject: [PATCH] crypto: Rename aesni-intel_avx.S to indicate it only
 supports x86_64
To: Herbert Xu herb...@gondor.apana.org.au, H. Peter Anvin h...@zytor.com
Cc: Borislav Petkov b...@alien8.de, Andy Shevchenko 
andriy.shevche...@linux.intel.com, linux-crypto@vger.kernel.org

We rename aesni-intel_avx.S to aesni-intel_avx-x86_64.S to indicate
that it is only used by x86_64 architecture.
---
 arch/x86/crypto/Makefile| 2 +-
 arch/x86/crypto/{aesni-intel_avx.S = aesni-intel_avx-x86_64.S} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/x86/crypto/{aesni-intel_avx.S = aesni-intel_avx-x86_64.S} (100%)

Signed-off-by: Tim Chen tim.c.c...@linux.intel.com
---
diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
index 188b993..6ba54d6 100644
--- a/arch/x86/crypto/Makefile
+++ b/arch/x86/crypto/Makefile
@@ -76,7 +76,7 @@ ifeq ($(avx2_supported),yes)
 endif
 
 aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o fpu.o
-aesni-intel-$(CONFIG_64BIT) += aesni-intel_avx.o
+aesni-intel-$(CONFIG_64BIT) += aesni-intel_avx-x86_64.o
 ghash-clmulni-intel-y := ghash-clmulni-intel_asm.o ghash-clmulni-intel_glue.o
 sha1-ssse3-y := sha1_ssse3_asm.o sha1_ssse3_glue.o
 crc32c-intel-y := crc32c-intel_glue.o
diff --git a/arch/x86/crypto/aesni-intel_avx.S 
b/arch/x86/crypto/aesni-intel_avx-x86_64.S
similarity index 100%
rename from arch/x86/crypto/aesni-intel_avx.S
rename to arch/x86/crypto/aesni-intel_avx-x86_64.S
-- 
1.7.11.7




--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread Tim Chen


On Mon, 2013-12-30 at 15:52 +0200, Andy Shevchenko wrote:
 It seems commit d764593a crypto: aesni - AVX and AVX2 version of AESNI-GCM
 encode and decode breaks a build on x86_32 since it's designed only for
 x86_64. This patch makes a compilation unit conditional to CONFIG_64BIT and
 functions usage to CONFIG_X86_64.

Thanks for catching and fixing it.

Tim
 
 Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com


--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread H. Peter Anvin
Can the code be adjusted to compile for 32 bit x86 or is that pointless?

Tim Chen tim.c.c...@linux.intel.com wrote:


On Mon, 2013-12-30 at 15:52 +0200, Andy Shevchenko wrote:
 It seems commit d764593a crypto: aesni - AVX and AVX2 version of
AESNI-GCM
 encode and decode breaks a build on x86_32 since it's designed only
for
 x86_64. This patch makes a compilation unit conditional to
CONFIG_64BIT and
 functions usage to CONFIG_X86_64.

Thanks for catching and fixing it.

Tim
 
 Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com

-- 
Sent from my mobile phone.  Please pardon brevity and lack of formatting.
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread Tim Chen
On Mon, 2014-01-06 at 09:45 -0800, H. Peter Anvin wrote:
 Can the code be adjusted to compile for 32 bit x86 or is that pointless?
 

Code was optimized for wide registers.  So it is only meant for x86_64.

Tim

 Tim Chen tim.c.c...@linux.intel.com wrote:
 
 
 On Mon, 2013-12-30 at 15:52 +0200, Andy Shevchenko wrote:
  It seems commit d764593a crypto: aesni - AVX and AVX2 version of
 AESNI-GCM
  encode and decode breaks a build on x86_32 since it's designed only
 for
  x86_64. This patch makes a compilation unit conditional to
 CONFIG_64BIT and
  functions usage to CONFIG_X86_64.
 
 Thanks for catching and fixing it.
 
 Tim
  
  Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com
 


--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread H. Peter Anvin
On 01/06/2014 09:57 AM, Tim Chen wrote:
 On Mon, 2014-01-06 at 09:45 -0800, H. Peter Anvin wrote:
 Can the code be adjusted to compile for 32 bit x86 or is that pointless?

 
 Code was optimized for wide registers.  So it is only meant for x86_64.
 

Aren't the wide registers the vector registers?  Or are you also
relying on 64-bit integer registers (in which case we should just rename
the file to make it clear it is x86-64 only.)

-hpa


--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread Tim Chen
On Mon, 2014-01-06 at 10:00 -0800, H. Peter Anvin wrote:
 On 01/06/2014 09:57 AM, Tim Chen wrote:
  On Mon, 2014-01-06 at 09:45 -0800, H. Peter Anvin wrote:
  Can the code be adjusted to compile for 32 bit x86 or is that pointless?
 
  
  Code was optimized for wide registers.  So it is only meant for x86_64.
  
 
 Aren't the wide registers the vector registers?  Or are you also
 relying on 64-bit integer registers (in which case we should just rename
 the file to make it clear it is x86-64 only.)
 
   -hpa
 
 

Yes, the code is in the file named aesni_intel_avx.S.  So it should
be clear that the code is meant for x86_64.

Tim

--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread Borislav Petkov
On Mon, Jan 06, 2014 at 10:10:55AM -0800, Tim Chen wrote:
 Yes, the code is in the file named aesni_intel_avx.S. So it should be
 clear that the code is meant for x86_64.

How do you deduce aesni_intel_avx.S is meant for x86_64 only from the
name?

Shouldn't it be called aesni_intel_avx-x86_64.S, as is the naming
convention in arch/x86/crypto/

?


-- 
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread H. Peter Anvin
On 01/06/2014 12:26 PM, Borislav Petkov wrote:
 On Mon, Jan 06, 2014 at 10:10:55AM -0800, Tim Chen wrote:
 Yes, the code is in the file named aesni_intel_avx.S. So it should be
 clear that the code is meant for x86_64.
 
 How do you deduce aesni_intel_avx.S is meant for x86_64 only from the
 name?
 
 Shouldn't it be called aesni_intel_avx-x86_64.S, as is the naming
 convention in arch/x86/crypto/
 

Quite.

-hpa


--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread Tim Chen
On Mon, 2014-01-06 at 13:21 -0800, H. Peter Anvin wrote:
 On 01/06/2014 12:26 PM, Borislav Petkov wrote:
  On Mon, Jan 06, 2014 at 10:10:55AM -0800, Tim Chen wrote:
  Yes, the code is in the file named aesni_intel_avx.S. So it should be
  clear that the code is meant for x86_64.
  
  How do you deduce aesni_intel_avx.S is meant for x86_64 only from the
  name?
  
  Shouldn't it be called aesni_intel_avx-x86_64.S, as is the naming
  convention in arch/x86/crypto/
  
 
 Quite.
 
   -hpa
 
 

Will renaming the file to aesni_intel_avx-x86_64.S make things clearer
now?

Tim

---cut---here---

From 41656afcbd63ccb92357d4937a75629499f4fd4f Mon Sep 17 00:00:00 2001
From: Tim Chen tim.c.c...@linux.intel.com
Date: Mon, 6 Jan 2014 07:23:52 -0800
Subject: [PATCH] crypto: Rename aesni-intel_avx.S to indicate it only
 supports x86_64
To: Herbert Xu herb...@gondor.apana.org.au, H. Peter Anvin h...@zytor.com
Cc: Borislav Petkov b...@alien8.de, Andy Shevchenko 
andriy.shevche...@linux.intel.com, linux-crypto@vger.kernel.org

We rename aesni-intel_avx.S to aesni-intel_avx-x86_64.S to indicate
that it is only used by x86_64 architecture.
---
 arch/x86/crypto/Makefile| 2 +-
 arch/x86/crypto/{aesni-intel_avx.S = aesni-intel_avx-x86_64.S} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/x86/crypto/{aesni-intel_avx.S = aesni-intel_avx-x86_64.S} (100%)

diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
index 188b993..6ba54d6 100644
--- a/arch/x86/crypto/Makefile
+++ b/arch/x86/crypto/Makefile
@@ -76,7 +76,7 @@ ifeq ($(avx2_supported),yes)
 endif
 
 aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o fpu.o
-aesni-intel-$(CONFIG_64BIT) += aesni-intel_avx.o
+aesni-intel-$(CONFIG_64BIT) += aesni-intel_avx-x86_64.o
 ghash-clmulni-intel-y := ghash-clmulni-intel_asm.o ghash-clmulni-intel_glue.o
 sha1-ssse3-y := sha1_ssse3_asm.o sha1_ssse3_glue.o
 crc32c-intel-y := crc32c-intel_glue.o
diff --git a/arch/x86/crypto/aesni-intel_avx.S 
b/arch/x86/crypto/aesni-intel_avx-x86_64.S
similarity index 100%
rename from arch/x86/crypto/aesni-intel_avx.S
rename to arch/x86/crypto/aesni-intel_avx-x86_64.S
-- 
1.7.11.7



--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread H. Peter Anvin
On 01/06/2014 03:39 PM, Tim Chen wrote:
 
 Will renaming the file to aesni_intel_avx-x86_64.S make things clearer
 now?
 
 Tim

Yes.

Acked-by: H. Peter Anvin h...@linux.intel.com

Herbert, can you pick it up?

-hpa

--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2014-01-06 Thread Herbert Xu
On Mon, Jan 06, 2014 at 03:41:51PM -0800, H. Peter Anvin wrote:
 On 01/06/2014 03:39 PM, Tim Chen wrote:
  
  Will renaming the file to aesni_intel_avx-x86_64.S make things clearer
  now?
  
  Tim
 
 Yes.
 
 Acked-by: H. Peter Anvin h...@linux.intel.com
 
 Herbert, can you pick it up?

Sure I'll apply this patch.

Thanks!
-- 
Email: Herbert Xu herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1] crypto: aesni - fix build on x86 (32bit)

2013-12-31 Thread Herbert Xu
On Mon, Dec 30, 2013 at 03:52:24PM +0200, Andy Shevchenko wrote:
 It seems commit d764593a crypto: aesni - AVX and AVX2 version of AESNI-GCM
 encode and decode breaks a build on x86_32 since it's designed only for
 x86_64. This patch makes a compilation unit conditional to CONFIG_64BIT and
 functions usage to CONFIG_X86_64.
 
 Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com

Patch applied.  Thanks a lot!
-- 
Email: Herbert Xu herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html