lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Jun 2007 21:30:28 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	"Luiz Fernando N. Capitulino" <lcapitulino@...driva.com.br>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mike Galbraith <efault@....de>,
	Arjan van de Ven <arjan@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Dmitry Adamushko <dmitry.adamushko@...il.com>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>
Subject: Re: [patch] CFS scheduler, -v17


* Luiz Fernando N. Capitulino <lcapitulino@...driva.com.br> wrote:

>  Hmm, I'm getting this while compiling:
> 
> """
>   LD      .tmp_vmlinux1
> kernel/built-in.o: In function `rq_clock':
> /home/lcapitulino/src/kernels/upstream/linux-2.6-cfs/kernel/sched.c:321: undefined reference to `cpu_of'
> /home/lcapitulino/src/kernels/upstream/linux-2.6-cfs/kernel/sched.c:321: undefined reference to `cpu_of'

oops :-) That was due to !CONFIG_SMP.

>  Patch follows, only compile tested, hope it helps.

Thanks! I fixed it in a slightly different way: moved the cpu_of() thing 
outside of the #ifdef CONFIG_SMP section, as per the patch below. I've 
updated the -v17 patches with this minimal fix and have verified that 
the !CONFIG_SMP kernel boots and works fine.

	Ingo

--------------->
Index: linux-cfs-2.6.22-rc4.q/kernel/sched.c
===================================================================
--- linux-cfs-2.6.22-rc4.q.orig/kernel/sched.c
+++ linux-cfs-2.6.22-rc4.q/kernel/sched.c
@@ -248,6 +249,15 @@ static unsigned int static_prio_timeslic
 		return SCALE_PRIO(DEF_TIMESLICE, static_prio);
 }
 
+static inline int cpu_of(struct rq *rq)
+{
+#ifdef CONFIG_SMP
+	return rq->cpu;
+#else
+	return 0;
+#endif
+}
+
 #ifdef CONFIG_SMP
 /*
  * Divide a load by a sched group cpu_power : (load / sg->__cpu_power)
@@ -258,15 +268,6 @@ static inline u32 sg_div_cpu_power(const
 	return reciprocal_divide(load, sg->reciprocal_cpu_power);
 }
 
-static inline int cpu_of(struct rq *rq)
-{
-#ifdef CONFIG_SMP
-	return rq->cpu;
-#else
-	return 0;
-#endif
-}
-
 /*
  * Each time a sched group cpu_power is changed,
  * we must compute its reciprocal value
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ