diff options
author | Sanjay Singh Rawat <sanjay.rawat@linaro.org> | 2013-10-22 14:00:18 +0530 |
---|---|---|
committer | Sanjay Singh Rawat <sanjay.rawat@linaro.org> | 2013-11-22 13:48:00 +0530 |
commit | 8516f5dc3aa597345c23409f64fba0e6aa25c797 (patch) | |
tree | 2405b3afd5827dea6e0c6a0993089a00dfbbce55 | |
parent | 6368b5e7c128f229ab8bbebc7b75141e8f6ccd89 (diff) |
cpuhotplug: wait for udevadm to start
- on calxeda we are missing some events because udevadm needs
sometime to launch
- bug : https://bugs.launchpad.net/bugs/1230403
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
-rwxr-xr-x | cpuhotplug/cpuhotplug_07.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpuhotplug/cpuhotplug_07.sh b/cpuhotplug/cpuhotplug_07.sh index d9d8706..95ec52f 100755 --- a/cpuhotplug/cpuhotplug_07.sh +++ b/cpuhotplug/cpuhotplug_07.sh @@ -28,6 +28,15 @@ source ../include/functions.sh TMPFILE=cpuhotplug_07.tmp +waitfor_udevadm() { + while [ 1 ]; do + lsof | grep udevadm | grep sock > /dev/null + if [ $? -eq 0 ]; then + return 0 + fi + done +} + check_notification() { local cpu=$1 local cpuid=${cpu:3} @@ -43,6 +52,7 @@ check_notification() { rm -f $TMPFILE udevadm monitor --kernel --subsystem-match=cpu > $TMPFILE & pid=$! + waitfor_udevadm set_offline $cpu set_online $cpu |