* [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1
@ 2015-04-17 14:32 Christophe Leroy
2015-08-30 10:25 ` talitos doesn't build with GCC 4.4.4 (was Re: [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1) Michael Ellerman
0 siblings, 1 reply; 5+ messages in thread
From: Christophe Leroy @ 2015-04-17 14:32 UTC (permalink / raw)
To: Kim Phillips, Herbert Xu, David S Miller
Cc: linuxppc-dev, linux-kernel, linux-crypto
This patch enhances the talitos_desc struct with fields for SEC1.
SEC1 has only one header field, and has a 'next_desc' field in
addition.
This mixed descriptor will continue to fit SEC2, and for SEC1
we will recopy hdr value into hdr1 value in talitos_submit()
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
drivers/crypto/talitos.h | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/talitos.h b/drivers/crypto/talitos.h
index 61a1405..f078da1 100644
--- a/drivers/crypto/talitos.h
+++ b/drivers/crypto/talitos.h
@@ -37,9 +37,17 @@
/* descriptor pointer entry */
struct talitos_ptr {
- __be16 len; /* length */
- u8 j_extent; /* jump to sg link table and/or extent */
- u8 eptr; /* extended address */
+ union {
+ struct { /* SEC2 format */
+ __be16 len; /* length */
+ u8 j_extent; /* jump to sg link table and/or extent*/
+ u8 eptr; /* extended address */
+ };
+ struct { /* SEC1 format */
+ __be16 res;
+ __be16 len1; /* length */
+ };
+ };
__be32 ptr; /* address */
};
@@ -53,8 +61,12 @@ static const struct talitos_ptr zero_entry = {
/* descriptor */
struct talitos_desc {
__be32 hdr; /* header high bits */
- __be32 hdr_lo; /* header low bits */
+ union {
+ __be32 hdr_lo; /* header low bits */
+ __be32 hdr1; /* header for SEC1 */
+ };
struct talitos_ptr ptr[7]; /* ptr/len pair array */
+ __be32 next_desc; /* next descriptor (SEC1) */
};
/**
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* talitos doesn't build with GCC 4.4.4 (was Re: [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1)
2015-04-17 14:32 [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1 Christophe Leroy
@ 2015-08-30 10:25 ` Michael Ellerman
2015-08-30 17:24 ` christophe leroy
0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2015-08-30 10:25 UTC (permalink / raw)
To: Christophe Leroy, Scott Wood; +Cc: Kim Phillips, linuxppc-dev
Hi guys,
Due to the recent config changes for 85xx, CRYPTO_DEV_TALITOS is now enabled
for corenet64/32_smp_defconfig:
https://git.kernel.org/cgit/linux/kernel/git/scottwood/linux.git/commit/?h=next&id=7e2ad2ef851545c9bd0b5aadc8026c6901a87c50
And so I've started seeing a build failure caused by the patch below (merged as
commit 90490752eb03 ("crypto: talitos - enhanced talitos_desc struct for
SEC1")) but only with GCC 4.4.4.
I assume you're not interested in building with such an old compiler?
The error is:
In file included from drivers/crypto/talitos.c:56:
drivers/crypto/talitos.h:56: error: unknown field 'len' specified in initializer
drivers/crypto/talitos.h:56: warning: missing braces around initializer
drivers/crypto/talitos.h:56: warning: (near initialization for 'zero_entry.<anonymous>')
drivers/crypto/talitos.h:57: error: unknown field 'j_extent' specified in initializer
drivers/crypto/talitos.h:58: error: unknown field 'eptr' specified in initializer
drivers/crypto/talitos.h:58: warning: excess elements in struct initializer
drivers/crypto/talitos.h:58: warning: (near initialization for 'zero_entry')
make[3]: *** [drivers/crypto/talitos.o] Error 1
cheers
On Fri, 2015-04-17 at 16:32 +0200, Christophe Leroy wrote:
> This patch enhances the talitos_desc struct with fields for SEC1.
> SEC1 has only one header field, and has a 'next_desc' field in
> addition.
> This mixed descriptor will continue to fit SEC2, and for SEC1
> we will recopy hdr value into hdr1 value in talitos_submit()
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> drivers/crypto/talitos.h | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/crypto/talitos.h b/drivers/crypto/talitos.h
> index 61a1405..f078da1 100644
> --- a/drivers/crypto/talitos.h
> +++ b/drivers/crypto/talitos.h
> @@ -37,9 +37,17 @@
>
> /* descriptor pointer entry */
> struct talitos_ptr {
> - __be16 len; /* length */
> - u8 j_extent; /* jump to sg link table and/or extent */
> - u8 eptr; /* extended address */
> + union {
> + struct { /* SEC2 format */
> + __be16 len; /* length */
> + u8 j_extent; /* jump to sg link table and/or extent*/
> + u8 eptr; /* extended address */
> + };
> + struct { /* SEC1 format */
> + __be16 res;
> + __be16 len1; /* length */
> + };
> + };
> __be32 ptr; /* address */
> };
>
> @@ -53,8 +61,12 @@ static const struct talitos_ptr zero_entry = {
> /* descriptor */
> struct talitos_desc {
> __be32 hdr; /* header high bits */
> - __be32 hdr_lo; /* header low bits */
> + union {
> + __be32 hdr_lo; /* header low bits */
> + __be32 hdr1; /* header for SEC1 */
> + };
> struct talitos_ptr ptr[7]; /* ptr/len pair array */
> + __be32 next_desc; /* next descriptor (SEC1) */
> };
>
> /**
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: talitos doesn't build with GCC 4.4.4 (was Re: [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1)
2015-08-30 10:25 ` talitos doesn't build with GCC 4.4.4 (was Re: [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1) Michael Ellerman
@ 2015-08-30 17:24 ` christophe leroy
2015-08-31 1:46 ` Michael Ellerman
0 siblings, 1 reply; 5+ messages in thread
From: christophe leroy @ 2015-08-30 17:24 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Scott Wood, Kim Phillips, linuxppc-dev
Hi Michael,
This should be fixed by that one:
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=76bea64c4c8d7fa911eb485c4c2b8583e813331e
Christophe
Le 30/08/2015 12:25, Michael Ellerman a écrit :
> Hi guys,
>
> Due to the recent config changes for 85xx, CRYPTO_DEV_TALITOS is now enabled
> for corenet64/32_smp_defconfig:
>
> https://git.kernel.org/cgit/linux/kernel/git/scottwood/linux.git/commit/?h=next&id=7e2ad2ef851545c9bd0b5aadc8026c6901a87c50
>
> And so I've started seeing a build failure caused by the patch below (merged as
> commit 90490752eb03 ("crypto: talitos - enhanced talitos_desc struct for
> SEC1")) but only with GCC 4.4.4.
>
> I assume you're not interested in building with such an old compiler?
>
> The error is:
>
> In file included from drivers/crypto/talitos.c:56:
> drivers/crypto/talitos.h:56: error: unknown field 'len' specified in initializer
> drivers/crypto/talitos.h:56: warning: missing braces around initializer
> drivers/crypto/talitos.h:56: warning: (near initialization for 'zero_entry.<anonymous>')
> drivers/crypto/talitos.h:57: error: unknown field 'j_extent' specified in initializer
> drivers/crypto/talitos.h:58: error: unknown field 'eptr' specified in initializer
> drivers/crypto/talitos.h:58: warning: excess elements in struct initializer
> drivers/crypto/talitos.h:58: warning: (near initialization for 'zero_entry')
> make[3]: *** [drivers/crypto/talitos.o] Error 1
>
>
> cheers
>
> On Fri, 2015-04-17 at 16:32 +0200, Christophe Leroy wrote:
>> This patch enhances the talitos_desc struct with fields for SEC1.
>> SEC1 has only one header field, and has a 'next_desc' field in
>> addition.
>> This mixed descriptor will continue to fit SEC2, and for SEC1
>> we will recopy hdr value into hdr1 value in talitos_submit()
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>> ---
>> drivers/crypto/talitos.h | 20 ++++++++++++++++----
>> 1 file changed, 16 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/crypto/talitos.h b/drivers/crypto/talitos.h
>> index 61a1405..f078da1 100644
>> --- a/drivers/crypto/talitos.h
>> +++ b/drivers/crypto/talitos.h
>> @@ -37,9 +37,17 @@
>>
>> /* descriptor pointer entry */
>> struct talitos_ptr {
>> - __be16 len; /* length */
>> - u8 j_extent; /* jump to sg link table and/or extent */
>> - u8 eptr; /* extended address */
>> + union {
>> + struct { /* SEC2 format */
>> + __be16 len; /* length */
>> + u8 j_extent; /* jump to sg link table and/or extent*/
>> + u8 eptr; /* extended address */
>> + };
>> + struct { /* SEC1 format */
>> + __be16 res;
>> + __be16 len1; /* length */
>> + };
>> + };
>> __be32 ptr; /* address */
>> };
>>
>> @@ -53,8 +61,12 @@ static const struct talitos_ptr zero_entry = {
>> /* descriptor */
>> struct talitos_desc {
>> __be32 hdr; /* header high bits */
>> - __be32 hdr_lo; /* header low bits */
>> + union {
>> + __be32 hdr_lo; /* header low bits */
>> + __be32 hdr1; /* header for SEC1 */
>> + };
>> struct talitos_ptr ptr[7]; /* ptr/len pair array */
>> + __be32 next_desc; /* next descriptor (SEC1) */
>> };
>>
>> /**
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1
@ 2015-04-17 14:24 Christophe Leroy
0 siblings, 0 replies; 5+ messages in thread
From: Christophe Leroy @ 2015-04-17 14:24 UTC (permalink / raw)
To: Kim Phillips, Herbert Xu, David S Miller
Cc: linuxppc-dev, linux-kernel, linux-crypto
This patch enhances the talitos_desc struct with fields for SEC1.
SEC1 has only one header field, and has a 'next_desc' field in
addition.
This mixed descriptor will continue to fit SEC2, and for SEC1
we will recopy hdr value into hdr1 value in talitos_submit()
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
drivers/crypto/talitos.h | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/talitos.h b/drivers/crypto/talitos.h
index 61a1405..f078da1 100644
--- a/drivers/crypto/talitos.h
+++ b/drivers/crypto/talitos.h
@@ -37,9 +37,17 @@
/* descriptor pointer entry */
struct talitos_ptr {
- __be16 len; /* length */
- u8 j_extent; /* jump to sg link table and/or extent */
- u8 eptr; /* extended address */
+ union {
+ struct { /* SEC2 format */
+ __be16 len; /* length */
+ u8 j_extent; /* jump to sg link table and/or extent*/
+ u8 eptr; /* extended address */
+ };
+ struct { /* SEC1 format */
+ __be16 res;
+ __be16 len1; /* length */
+ };
+ };
__be32 ptr; /* address */
};
@@ -53,8 +61,12 @@ static const struct talitos_ptr zero_entry = {
/* descriptor */
struct talitos_desc {
__be32 hdr; /* header high bits */
- __be32 hdr_lo; /* header low bits */
+ union {
+ __be32 hdr_lo; /* header low bits */
+ __be32 hdr1; /* header for SEC1 */
+ };
struct talitos_ptr ptr[7]; /* ptr/len pair array */
+ __be32 next_desc; /* next descriptor (SEC1) */
};
/**
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-31 1:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17 14:32 [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1 Christophe Leroy
2015-08-30 10:25 ` talitos doesn't build with GCC 4.4.4 (was Re: [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1) Michael Ellerman
2015-08-30 17:24 ` christophe leroy
2015-08-31 1:46 ` Michael Ellerman
-- strict thread matches above, loose matches on Subject: below --
2015-04-17 14:24 [PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1 Christophe Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).