patch-2.4.21 linux-2.4.21/arch/ppc64/kernel/ItLpQueue.c

Next file: linux-2.4.21/arch/ppc64/kernel/Makefile
Previous file: linux-2.4.21/arch/ppc64/defconfig
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/arch/ppc64/kernel/ItLpQueue.c linux-2.4.21/arch/ppc64/kernel/ItLpQueue.c
@@ -13,6 +13,8 @@
 #include <linux/sched.h>
 #include <asm/system.h>
 #include <asm/paca.h>
+#include <linux/random.h>
+#include <asm/time.h>
 #include <asm/iSeries/ItLpQueue.h>
 #include <asm/iSeries/HvLpEvent.h>
 #include <asm/iSeries/HvCallEvent.h>
@@ -166,5 +168,12 @@
 
 	get_paca()->lpEvent_count += numIntsProcessed;
 
+	/* Use LPEvents as a source of randomness.  Since there
+	 * Isn't an LPEvent Randomness call, pretend these are
+	 * mouse events (which is fair since we don't have mice
+	 * on the iSeries)
+	 */
+	add_mouse_randomness(get_tb());
+
 	return numIntsProcessed;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)