Skip to contentSkip to conversation

2.6-test4: mpspec.h:6:25: mach_mpspec.h: Missing file

DISCUSSION j d 1 participant 1 message Sep 5, 2003

lore
Share & tools
lore

j d

author
#0 lore raw
Quoted 14 lines

Date: Fri, 05 Sep 2003 09:25:42 -0500

From: [email protected]
Subject: 2.6-test4: mpspec.h:6:25: mach_mpspec.h:
Missing file

Hi.
I'm trying to build a (add-on) module on a machine booted from a 2.6-test4 kernel, And keep running into this error. I've included a sample program , and gcc command line.

Quoted 10 lines

I built the kernel:

make defconfig;

It is a 2W SMP (Compaq ML850)
couple minor modes like enet & SCSI device make
My general question is, should I include the

-I/work/src/<build>/include/asm-i386/mach-generic/mach_mpspec.h

Quoted 14 lines

in my gcc command line or is my build area incorrect is
some way that the correct mpspec.h file can't be found
?

Thx. JD.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Quoted 6 lines
Quoted 1 line

In file included from

/work/src/linux-2.6.0-test4/include/asm/smp.h:18,
from
/work/src/linux-2.6.0-test4/include/linux/smp.h:17,
from

/work/src/linux-2.6.0-test4/include/linux/topology.h:33,

Quoted 2 lines

from

/work/src/linux-2.6.0-test4/include/linux/mmzone.h:294,

Quoted 6 lines

from
/work/src/linux-2.6.0-test4/include/linux/gfp.h:4,
from
/work/src/linux-2.6.0-test4/include/linux/slab.h:15,

                 from test.c:8:

/work/src/linux-2.6.0-test4/include/asm/mpspec.h:6:25:

Quoted 27 lines

mach_mpspec.h: No such file or directory /work/src/linux-2.6.0-test4/include/asm/mpspec.h:8:
`MAX_MP_BUSSES' undeclared here (not in a function)

gcc -g -D__KERNEL__ -DMODULE

-I/work/src/linux-2.6.0-test4/include \
	-I/work/src/linux-2.6.0-test4/drivers/scsi -c

test.c

// -- snip sample

#include <linux/version.h> // 2.6 ++
#include <linux/config.h> // 2.6 ++
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <asm/io.h>
#include <asm/system.h>
#include <linux/slab.h>
#include <linux/interrupt.h>

#define MEMORY_TABLE_SIZE 512

void *
my_kmalloc(unsigned int size, char *id)

Quoted 14 lines
{
	char *ptr ;
	if ((ptr =
	     kmalloc(size,
		     (in_interrupt()? GFP_ATOMIC : GFP_KERNEL)))
== NULL) {
		kprintf("Cannot allocate %u bytes for %s\n", size,
id);
	}
}

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com