aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 845187822e5c..05b5283e98fa 100644
--- a/init/main.c
+++ b/init/main.c
@@ -149,6 +149,20 @@ static int __init nosmp(char *str)
149 149
150early_param("nosmp", nosmp); 150early_param("nosmp", nosmp);
151 151
152/* this is hard limit */
153static int __init nrcpus(char *str)
154{
155 int nr_cpus;
156
157 get_option(&str, &nr_cpus);
158 if (nr_cpus > 0 && nr_cpus < nr_cpu_ids)
159 nr_cpu_ids = nr_cpus;
160
161 return 0;
162}
163
164early_param("nr_cpus", nrcpus);
165
152static int __init maxcpus(char *str) 166static int __init maxcpus(char *str)
153{ 167{
154 get_option(&str, &setup_max_cpus); 168 get_option(&str, &setup_max_cpus);