summaryrefslogtreecommitdiff
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorNaveen Kumar S <nkumars@nvidia.com>2014-03-27 19:47:26 +0530
committerMatt Craighead <mcraighead@nvidia.com>2014-03-28 05:12:08 -0700
commit88e3e6066bc668a36f4c83620e37728b235665d7 (patch)
treecb09397d47059c0c90b33f6040995c42283d7163 /drivers/cpuidle
parente1cc77b87b23c9ef1028cba2fbda9e9cb0ba248e (diff)
cpuidle: denver: access only CPU0 if SMP disabled
When SMP is disabled, only CPU0 is up. But cpuidle_denver_init tries to create sysfs node for CPU1 too, which is crashing the system. Added a check to avoid accessing CPU1 when SMP is disabled. bug 1472125 Change-Id: If8e60c966bbd380ba6423e04f0f03acf357a3146 Signed-off-by: Naveen Kumar S <nkumars@nvidia.com> Reviewed-on: http://git-master/r/387811 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle-denver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle-denver.c b/drivers/cpuidle/cpuidle-denver.c
index ff2aabf68c96..9456347ca4eb 100644
--- a/drivers/cpuidle/cpuidle-denver.c
+++ b/drivers/cpuidle/cpuidle-denver.c
@@ -1,7 +1,7 @@
/*
* drivers/cpuidle/cpuidle-denver.c
*
- * Copyright (C) 2013 NVIDIA Corporation. All rights reserved.
+ * Copyright (C) 2013-2014 NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -155,6 +155,9 @@ static int __init denver_cpuidle_devices_init(void)
kfree(dev);
return -EIO;
}
+ #ifndef CONFIG_SMP
+ break;
+ #endif
}
return 0;