[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55762581.6070809@roeck-us.net>
Date: Mon, 08 Jun 2015 16:30:09 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Stephan Mueller <smueller@...onox.de>
CC: Andy Shevchenko <andy.shevchenko@...il.com>,
Jim Davis <jim.epost@...il.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next <linux-next@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
linux-crypto <linux-crypto@...r.kernel.org>
Subject: Re: randconfig build error with next-20150529, in crypto/jitterentropy.c
On 06/08/2015 03:36 PM, Stephan Mueller wrote:
> Am Monday 08 June 2015, 12:54:12 schrieb Guenter Roeck:
>
> Hi Guenter,
>
> Thanks for the note.
>
> ...
>>
>> ---
>>
>> openrisc:defconfig:
>>
>> In file included from ./arch/openrisc/include/asm/timex.h:23:0,
>> ...
>> from crypto/jitterentropy.c:52:
>> ./arch/openrisc/include/asm/spr.h: In function 'jent_loop_shuffle':
>> ./arch/openrisc/include/asm/spr.h:30:2: warning: asm operand 1 probably
>> doesn't match constraints
>> ./arch/openrisc/include/asm/spr.h:30:2: error: impossible constraint in 'asm'
>
> I received this one also before. But that seems to be an error on the OpenRISC
> platform as the random_get_entropy() function or the get_cycles function is
> not implemented as defined.
>
> The crypto code uses the following which triggers the issue:
>
> __u64 tmp = 0;
>
> tmp = random_get_entropy();
>
> That one seems to be an appropriate use of random_get_entropy() which on
> almost all arches is an alias for get_cycles().
Yes and no. I suspect it may have something to do with the compiler options.
The code compiles with the following patch applied.
---
diff --git a/arch/openrisc/include/asm/spr.h b/arch/openrisc/include/asm/spr.h
index 1cccb42dd477..373532cc41f4 100644
--- a/arch/openrisc/include/asm/spr.h
+++ b/arch/openrisc/include/asm/spr.h
@@ -24,7 +24,7 @@
"l.mtspr %0,%1,%2" \
: : "r" (_off), "r" (_val), "K" (_spr))
-static inline unsigned long mfspr(unsigned long add)
+static inline unsigned long mfspr(const unsigned long add)
{
unsigned long ret;
__asm__ __volatile__ ("l.mfspr %0,r0,%1" : "=r" (ret) : "K" (add));
---
get_cycles is implemented as static inline which executes mfspr(SPR_TTCR).
SPR_TTCR is a constant. Normally that information seems to be passed on,
but not when get_cycles() is compiled through jitterentropy.
Any idea what might cause this ?
Thanks,
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists