From dd2039b55b51487e6270f01d883bde67e86bba0f Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Fri, 21 Jan 2005 22:29:56 +0000 Subject: [PATCH] create/destroy the /dev/cpu/microcode on demand --- microcode_ctl.init | 12 +++++------- microcode_ctl.spec | 3 +++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/microcode_ctl.init b/microcode_ctl.init index b490dc7..8860c96 100755 --- a/microcode_ctl.init +++ b/microcode_ctl.init @@ -50,13 +50,10 @@ function start () echo -n $"Applying Intel Microcode update: " /sbin/modprobe microcode - - lt=0 - while [ ! -c /dev/cpu/microcode ]; do - lt=$[lt+1]; - [ $lt -gt 5 ] && break; - sleep 1; - done + if [ ! -d /dev/cpu ]; then + mkdir /dev/cpu + fi + /bin/mknod /dev/cpu/microcode c 10 184 daemon $PROGRAM $ARGUMENTS RETVAL=$? @@ -66,6 +63,7 @@ function start () echo $"$0: kernel does not have microcode device support" fi /sbin/rmmod microcode + rm -f /dev/cpu/microcode echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/microcode_ctl diff --git a/microcode_ctl.spec b/microcode_ctl.spec index 99c3b36..426f9fb 100644 --- a/microcode_ctl.spec +++ b/microcode_ctl.spec @@ -82,6 +82,9 @@ family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print exit 0 %changelog +* Fri Jan 21 2005 Dave Jones +- Create/remove the /dev/cpu/microcode dev node as needed. + * Fri Jan 14 2005 Dave Jones - Only enable microcode_ctl service if the CPU is capable. - Prevent microcode_ctl getting restarted multiple times on initlevel change (#141581)