summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2009-05-20 16:40:28 -0700
committerBob Gilligan <gilligan@vyatta.com>2009-05-20 16:40:28 -0700
commitc6277542e164fbb9b5618f8351f3aafc0c031f99 (patch)
tree611bee907f7eb8f4d0cf21a5018165a8ebe36246 /scripts
parent3cd75711b76d4121cb1237a8ffaf127c2770e55c (diff)
downloadvyatta-cfg-c6277542e164fbb9b5618f8351f3aafc0c031f99.tar.gz
vyatta-cfg-c6277542e164fbb9b5618f8351f3aafc0c031f99.zip
Use the default_smp_affinity /proc file if it is available.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-irqaffin8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/vyatta-irqaffin b/scripts/vyatta-irqaffin
index bdbc541..1286130 100755
--- a/scripts/vyatta-irqaffin
+++ b/scripts/vyatta-irqaffin
@@ -169,8 +169,14 @@ case "$1" in
exit 1
fi
+ if [ -e /proc/irq/default_smp_affinity ]; then
+ defmask=`cat /proc/irq/default_smp_affinity`
+ else
+ defmask=$maxmaskhex
+ fi
+
for irqnum in $irqnums ; do
- echo $maxmaskhex > /proc/irq/$irqnum/smp_affinity
+ echo $defmask > /proc/irq/$irqnum/smp_affinity
if [ $? -ne 0 ]; then
echo "Couldn't assign smp_affinity for IRQ $irqnum. Exit status: $?"
exit 1