Message ID | 55762581.6070809@roeck-us.net (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Am Monday 08 June 2015, 16:30:09 schrieb Guenter Roeck: Hi Guenter, > >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 ? Then it may be the optimization issue as well that Peter indicated. May I ask you for testing purposes (I do not have an OpenRISC) to remove the following line from crypto/Makefile: CFLAGS_jitterentropy.o = -O0 Note, that should just serve for testing. I will post a patch later that will replace the -O0 statement with a pragma. Thanks a lot. > >Thanks, >Guenter Ciao Stephan -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 06/08/2015 04:33 PM, Stephan Mueller wrote: > Am Monday 08 June 2015, 16:30:09 schrieb Guenter Roeck: > > Hi Guenter, > >> >> 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 ? > > Then it may be the optimization issue as well that Peter indicated. May I ask > you for testing purposes (I do not have an OpenRISC) to remove the following > line from crypto/Makefile: > > CFLAGS_jitterentropy.o = -O0 > Yes, that fixes the problem (after I also removed the associated #error from jitterentropy.c). Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Am Monday 08 June 2015, 16:51:24 schrieb Guenter Roeck: Hi Guenter, > >Yes, that fixes the problem (after I also removed the associated #error from >jitterentropy.c). Thank you for the confirmation. The patch will come tonight on this issue as I tested the cryptographic impact already. Thanks a lot for your help. Ciao Stephan -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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));