AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090202135308.3ca486b6@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:exch1.onstor.net
NSV:
SSH:
R:<larry.scheer@onstor.com>,<Bill.Fisher@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	2779531E7C760D4491C96305019FEEB51851A8515E@exch1.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Mon, 2 Feb 2009 13:58:16 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: Larry Scheer <larry.scheer@onstor.com>
Cc: Bill Fisher <Bill.Fisher@onstor.com>
Subject: Re: compiling acpu and ncpu code for the kernel
Message-ID: <20090202135816.4356f8a3@ripper.onstor.net>
In-Reply-To: <2779531E7C760D4491C96305019FEEB51851A8515E@exch1.onstor.net>
References: <49874C29.4060807@onstor.com>
	<2779531E7C760D4491C96305019FEEB51851A8515E@exch1.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Ah, good catch.  __KERNEL__ and KERNEL and __KERNEL all have to be
defined, I believe.

On Mon, 2 Feb 2009 12:21:16 -0800 Larry Scheer
<larry.scheer@onstor.com> wrote:

> Bill,
>   Check the kernel configuration and header files carefully to see if
> there is something that needs to be defined or undefined. These types
> of errors typically indicate you are taking the wrong path through
> the header files. I spoke with Andy and he said you should not be
> including header files from /usr/mispel-linux-gnu/include if you are
> building kernel space code. 
> 
> Larry
> 
> -----Original Message-----
> From: Bill Fisher 
> Sent: Monday, February 02, 2009 11:40 AM
> To: Andy Sharp; Larry Scheer
> Cc: Bill Fisher
> Subject: compiling acpu and ncpu code for the kernel
> 
> Guys:
> 
> There are still some serious header conflicts trying to get the
> modified code compiled for the kernel in the present
> nfx-tree. I am using the following special hacks
> to defs.mk and things are "still" pulling in the user level header
> files.
> 
> Hence I'm be moving the code to fs/onstor under the kernel tree
> to avoid this mess. Unless you strongly object that is the plan.
> 
> /usr/bin/mipsel-linux-gnu-gcc-4.1 
> -I../../../linux/kernel/linux-mips-2.6/include 
> -I../../../linux/kernel/linux-mips-2.6/include/linux 
> -I.\./../../linux/kernel/linux-mips-2.6/include/sys 
> -I../../../linux/kernel/linux-mips-2.6/include/net 
> -I../../../linux/kernel/linux-mips-2.6/i\nclude/asm-mips 
> -I../../../linux/kernel/linux-mips-2.6/include/asm-mips/mach-generic 
> -I/usr/mipsel-linux-gnu/include -include 
> ../../../linu\x/kernel/linux-mips-2.6/include/linux/autoconf.h 
> -I../../Includes -I. -I../../Build/cg/dbg -fno-builtin-printf 
> -fno-builtin-abort -DSIBYTE \-DSB1250 -DR4000 -D__long64 -DTUXRX 
> -DLANGUAGE_C   -O2   -nostdlib -nostdinc -DNETEEE_FRAGMENT 
> -DEEE_ALLOC_USE_TAILQ -DEEE_VALIDATE -DREQ_T\RACING 
> -DNFS_DONT_FREE_REQUESTS -DRECYCLE_REQUESTS -DCIFS_DONT_FREE_REQUESTS 
> -DRECYCLE_REQUESTS -DDCACHE_VERIFY_CACHE_LIST_AFTER_INSERTION 
> \-DDCACHE_SAVE_REQ_RESP -DDCACHE_DEBUG_ENABLE -DDCACHE_DEBUG_ASSERT 
> -DBASIC_STATS -DDETAIL_STATS -DPKT_ALLOC_USE_TAILQ -DFS_RPC_USE_TAILQ 
> -D\VS_VALIDATE_REFCNT_FREQ=10000 -DREF_TRACKING -DFCB_STATS 
> -DVS_VALIDATE_REFCNT -DPKT_ALLOC_USE_TAILQ -DREQ_TRACING 
> -DNFS_DONT_FREE_REQUESTS \-DRECYCLE_REQUESTS
> -DCIFS_DONT_FREE_REQUESTS -DRECYCLE_REQUESTS
> -DDCACHE_VERIFY_CACHE_LIST_AFTER_INSERTION -DDCACHE_SAVE_REQ_RESP
> -DDCACHE_\DEBUG_ENABLE -DDCACHE_DEBUG_ASSERT -DBASIC_STATS
> -DDETAIL_STATS -DFS_RPC_USE_TAILQ  -G 0 -mlong64
> -DOS_INCL=\"linux.h\"  -DCOUGAR -DDEFAUL\T_VENDOR_NAME=\"ONStor\"
> -DDEFAULT_PROD_NAME=\"COUGAR\" -g -fno-reorder-blocks -DTUXRX
> -DAGILE_HARDWARE -c tpl.c
> -o ../../Build/cg/dbg/Obje\cts/TUXRX/sm-tpl/tpl.o In file included
> from ../../../linux/kernel/linux-mips-2.6/include/linux/bitops.h:9,
> from ../../../linux/kernel/linux-mips-2.6/include/linux/thread_info.h:20,
>                   from 
> ../../../linux/kernel/linux-mips-2.6/include/linux/preempt.h:9,
>                   from 
> ../../../linux/kernel/linux-mips-2.6/include/linux/spinlock.h:49,
>                   from /usr/mipsel-linux-gnu/include/asm/atomic.h:20,
>                   from 
> ../../../linux/kernel/linux-mips-2.6/include/linux/skbuff.h:22,
>                   from tpl.c:14:
> /usr/mipsel-linux-gnu/include/asm/bitops.h: In function 'set_bit':
> /usr/mipsel-linux-gnu/include/asm/bitops.h:73: error:
> 'R10000_LLSC_WAR' undeclared (first use in this function)
> /usr/mipsel-linux-gnu/include/asm/bitops.h:73: error: (Each
> undeclared identifier is reported only once
