public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Adrian Bunk <bunk@fs.tum.de>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.8-rc3-mm1: PROC_FS=n link errors
Date: Fri, 6 Aug 2004 13:24:14 -0700	[thread overview]
Message-ID: <20040806202414.GP17188@holomorphy.com> (raw)
In-Reply-To: <20040806195804.GC2746@fs.tum.de>

On Thu, Aug 05, 2004 at 03:19:18AM -0700, Andrew Morton wrote:
>> Changes since 2.6.8-rc2-mm2:
>> +consolidate-prof_cpu_mask.patch
>> +profile_tick.patch
>> Consolidate a lot of the kernel profiling code.
>>...

On Fri, Aug 06, 2004 at 09:58:05PM +0200, Adrian Bunk wrote:
> Theses patches cause the following link errors with CONFIG_PROC_FS=n:
> <--  snip  -->
> ...
>   LD      .tmp_vmlinux1
> arch/i386/kernel/built-in.o(.text+0x45ce): In function `init_irq_proc':
> : undefined reference to `create_prof_cpu_mask'

Ugh. Okay, here goes:

Fix up compile with CONFIG_PROC_FS=n. Accomplish this by conditionally
declaring create_prof_cpu_mask(), privatizing create_proc_profile(),
and unconditionally including profile_hit() and profile_tick().


Index: mm1-2.6.8-rc3/fs/proc/proc_misc.c
===================================================================
--- mm1-2.6.8-rc3.orig/fs/proc/proc_misc.c	2004-08-05 05:30:43.000000000 -0700
+++ mm1-2.6.8-rc3/fs/proc/proc_misc.c	2004-08-06 12:58:18.426562816 -0700
@@ -662,7 +662,6 @@
 				(size_t)high_memory - PAGE_OFFSET + PAGE_SIZE;
 	}
 #endif
-	create_proc_profile();
 #ifdef CONFIG_MAGIC_SYSRQ
 	entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL);
 	if (entry)
Index: mm1-2.6.8-rc3/include/linux/profile.h
===================================================================
--- mm1-2.6.8-rc3.orig/include/linux/profile.h	2004-08-05 05:30:43.000000000 -0700
+++ mm1-2.6.8-rc3/include/linux/profile.h	2004-08-06 12:57:46.501416176 -0700
@@ -17,10 +17,13 @@
 
 /* init basic kernel profiler */
 void __init profile_init(void);
-void create_prof_cpu_mask(struct proc_dir_entry *);
 void profile_tick(int, struct pt_regs *);
 void profile_hit(int, void *);
-void create_proc_profile(void);
+#ifdef CONFIG_PROC_FS
+void create_prof_cpu_mask(struct proc_dir_entry *);
+#else
+#define create_prof_cpu_mask(x)			do { (void)(x); } while (0)
+#endif
 
 enum profile_type {
 	EXIT_TASK,
Index: mm1-2.6.8-rc3/kernel/profile.c
===================================================================
--- mm1-2.6.8-rc3.orig/kernel/profile.c	2004-08-05 05:30:43.000000000 -0700
+++ mm1-2.6.8-rc3/kernel/profile.c	2004-08-06 13:12:19.567689928 -0700
@@ -162,11 +162,6 @@
 EXPORT_SYMBOL_GPL(profile_event_register);
 EXPORT_SYMBOL_GPL(profile_event_unregister);
 
-#ifdef CONFIG_PROC_FS
-#include <linux/proc_fs.h>
-#include <asm/uaccess.h>
-#include <asm/ptrace.h>
-
 void profile_hit(int type, void *__pc)
 {
 	unsigned long pc;
@@ -185,6 +180,11 @@
 		profile_hit(type, (void *)profile_pc(regs));
 }
 
+#ifdef CONFIG_PROC_FS
+#include <linux/proc_fs.h>
+#include <asm/uaccess.h>
+#include <asm/ptrace.h>
+
 static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
 			int count, int *eof, void *data)
 {
@@ -287,7 +287,7 @@
 	.write		= write_profile,
 };
 
-void __init create_proc_profile(void)
+static int __init create_proc_profile(void)
 {
 	struct proc_dir_entry *entry;
 
@@ -298,4 +298,5 @@
 	entry->proc_fops = &proc_profile_operations;
 	entry->size = (1+prof_len) * sizeof(unsigned int);
 }
+module_init(create_proc_profile);
 #endif /* CONFIG_PROC_FS */

  reply	other threads:[~2004-08-06 20:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-05 10:19 2.6.8-rc3-mm1 Andrew Morton
2004-08-05 11:18 ` 2.6.8-rc3-mm1: SCHEDSTATS compile error Adrian Bunk
2004-08-05 15:25   ` Martin J. Bligh
2004-08-05 16:49     ` Adrian Bunk
2004-08-05 18:17       ` Rick Lindsley
2004-08-05 18:20         ` Adrian Bunk
2004-08-05 19:15           ` Rick Lindsley
2004-08-05 19:54             ` Luiz Fernando N. Capitulino
2004-08-05 20:20             ` Adrian Bunk
2004-08-09 19:46         ` Bill Davidsen
2004-08-09 19:51           ` Rick Lindsley
2004-08-05 11:20 ` 2.6.8-rc3-mm1 Sean Neakums
2004-08-05 11:49 ` 2.6.8-rc3-mm1: ALSA: vortex_asXtalkGainsAllChan multiple definitions Adrian Bunk
2004-08-05 12:38 ` 2.6.8-rc3-mm1: ip2mainc-add-missing-pci_enable_device breaks compilation Adrian Bunk
2004-08-05 15:45   ` Bjorn Helgaas
2004-08-05 12:50 ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-05 13:03 ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-05 21:38   ` 2.6.8-rc3-mm1 Andrew Morton
2004-08-06 15:25     ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-05 13:24 ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-05 13:36 ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-05 16:13 ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-05 16:42 ` 2.6.8-rc3-mm1 Christoph Hellwig
2004-08-05 20:24   ` 2.6.8-rc3-mm1 Alan Cox
2004-08-05 16:52 ` 2.6.8-rc3-mm1 (compile stats) John Cherry
2004-08-06  3:34 ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-06  4:24   ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-06  4:39     ` 2.6.8-rc3-mm1 William Lee Irwin III
2004-08-06  5:17       ` 2.6.8-rc3-mm1 Andrew Morton
     [not found] ` <20040806075219.GW17188@holomorphy.com>
2004-08-06  8:11   ` alpha signal race fixes William Lee Irwin III
2004-08-06 12:48 ` 2.6.8-rc3-mm1 Mark Watts
2004-08-06 19:58 ` 2.6.8-rc3-mm1: sk98lin/skge.c compile error with PROC_FS=n Adrian Bunk
2004-08-06 19:58 ` 2.6.8-rc3-mm1: PROC_FS=n link errors Adrian Bunk
2004-08-06 20:24   ` William Lee Irwin III [this message]
2004-08-06 20:33     ` William Lee Irwin III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040806202414.GP17188@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=bunk@fs.tum.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox