# 2.4.19-gentoo-r3 kernel problems

## phraktle

after installing the new gentoo kernel (2.4.19-gentoo-r3) with preemtption enabled i get lots of kernel msgs, like below:

```

rc[13] exited with preempt_count 9

mount[18] exited with preempt_count 4

rc[17] exited with preempt_count 7

cat[19] exited with preempt_count 3

mount[24] exited with preempt_count 1

devfsd[26] exited with preempt_count 481

mount[31] exited with preempt_count 2

ls[56] exited with preempt_count 13

depscan.sh[55] exited with preempt_count 3

ls[278] exited with preempt_count 1

```

any ideas what causes this, and how can i fix it?

i've seen a post by Robert Love ( http://www.geocrawler.com/mail/msg.php3?msg_id=8266691&list=35 ) - according to him the latest XFS drivers would fix this - but aren't those the one's applied to the latest gentoo kernel?

thx  :Smile: 

----------

## mellofone

I have different errors during compile time:

setup.c: In function `setup_arch':

setup.c:1071: `acpi_mp_config' undeclared (first use in this function)

setup.c:1071: (Each undeclared identifier is reported only once

setup.c:1071: for each function it appears in.)

make[1]: *** [setup.o] Error 1

make[1]: Leaving directory `/usr/src/linux-2.4.19-gentoo-r3/arch/i386/kernel'

make: *** [_dir_arch/i386/kernel] Error 2

----------

## AutoBot

If you take a look in your /usr/src directory you will probably find more that one kernel source, also you linux symlink is probably pointing to your old kernel. What I would do in unmerge all the kerenels you have and then go remove the directorys and symlink in /usr/src/linux then re-emerge gentoo-sources.

----------

## mellofone

Same exact thing. I have nothing else in my /usr/src dir...

root@manic src # ls -al

drwxr-xr-x    5 root     root         4096 May  7 11:47 .

drwxr-xr-x   15 root     root         4096 Apr 23 15:06 ..

-rw-r--r--    1 root     root            0 Apr 23 15:06 .keep

lrwxrwxrwx    1 root     root           24 May  7 11:47 linux -> ./linux-2.4.19-gentoo-r3

drwxr-xr-x   15 root     root         4096 May  7 12:01 linux-2.4.19-gentoo-r3

root@manic src #

----------

## rphillips

It probably deals with the options that you selected when running make menuconfig.

I had to enable ACPI to get the kernel to actually compile, but I have not got it to actually boot yet.

----------

## Guest

 *rphillips wrote:*   

> It probably deals with the options that you selected when running make menuconfig.
> 
> I had to enable ACPI to get the kernel to actually compile, but I have not got it to actually boot yet.

 

Nuts. I already have it disabled...

----------

## phraktle

um, i guess i'll downgrade my kernel... 

i've seen this a couple of times now, and i don't think it means anything good  :Smile: 

```

Delalloc page c1321da0 removed from inode

kernel BUG at filemap.c:130!

invalid operand: 0000

CPU:    0

EIP:    0010:[<c01286c0>]    Tainted: P 

EFLAGS: 00010286

eax: 0000002a   ebx: c24e4000   ecx: ffffffd3   edx: c24e4000

esi: c1321da0   edi: 00000000   ebp: 00000000   esp: c24e5cfc

ds: 0018   es: 0018   ss: 0018

Process a.out (pid: 4350, stackpage=c24e5000)

Stack: c0291b00 c1321da0 c24e4000 00000000 c0128754 c1321da0 c1321da0 c012890f 

       c1321da0 c1321da0 c0128a86 c1321da0 00000000 c24e5d68 00000000 ce6e37b4 

       c24e4000 00000000 00000001 c24e5d68 00000000 ce6e37b4 c0128b1b 00000000 

Call Trace: [<c0128754>] [<c012890f>] [<c0128a86>] [<c0128b1b>] [<c01d89da>] 

   [<c01dbacb>] [<c01b85ff>] [<c01cf121>] [<c01de8cf>] [<c014e9cc>] [<c0137669>] 

   [<c01de72d>] [<c0144544>] [<c01384ab>] [<c0138817>] [<c01088ab>] 

Code: 0f 0b 82 00 da 1a 29 c0 83 c4 08 8b 46 18 a8 10 74 08 0f 0b 

 <3>a.out[4350] exited with preempt_count 2

```

----------

## AutoBot

Hum I had that same error and did what I posted above to fix it, you could just download the regular sources and patch them with xfs if needed.

----------

## mellofone

I have the new kernel sources downloaded and get the same errors, even on a different system:

gcc -D__KERNEL__ -I/usr/src/linux-2.4.19-gentoo-r3/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686   -nostdinc -I /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/include -DKBUILD_BASENAME=setup  -c -o setup.o setup.c

setup.c: In function `setup_arch':

setup.c:1071: `acpi_mp_config' undeclared (first use in this function)

setup.c:1071: (Each undeclared identifier is reported only once

setup.c:1071: for each function it appears in.)

make[1]: *** [setup.o] Error 1

make[1]: Leaving directory `/usr/src/linux-2.4.19-gentoo-r3/arch/i386/kernel'

make: *** [_dir_arch/i386/kernel] Error 2

----------

## LinuxDude

i had problems compiling this kernel too.. but finally i unmereged and deleted all the src and modules of the kernel and emerged them again. I then reconfigured the kernel (with preemptive, no xfs) and it works like a dream... this is the best kernel yet!

----------

## mellofone

 *LinuxDude wrote:*   

> i had problems compiling this kernel too.. but finally i unmereged and deleted all the src and modules of the kernel and emerged them again. I then reconfigured the kernel (with preemptive, no xfs) and it works like a dream... this is the best kernel yet!

 

I finally got it working, but I had to enable acpi before it would work... But now my promise ATA100 card does not work. It boots fine with the old linux-2.4.19-r1 kernel, but not with any of the gentoo (r1 or r3 sources). I get the following error:

PDC20268: IDE controller on PCI bus 00 dev 40

PCI: Could not assign IRQ 17 to device 00:08.0

The boot then stops and will not display the drives on the card...

----------

## Da Masta

The preemption notices have begun to really peeve me off too and to date, I have found no solution to fix a compiled kernel. If you wish to recompile your kernel, there is a way to get rid of them:

emerge gentoo-sources

cd /usr/src/linux/kernel/

nano exit.c

# Now edit exit.c... search for the words "exited with preempt_count"

# It should come up with a printk() function call.

# Delete the entire statement starting with "if" and ending with "preempt_get_count());"

# Now compile the kernel...

make config

make dep bzImage modules modules_install install

This, as I've mentioned, is only a source-level solution. If anyone can tell me how to disable these messages (or relegate them to syslog) on a compiled kernel, I'd very much appreciate it.

----------

## ronmon

I had been unable to build a bootable kernel from that source. It always hung on my SCSI card, a DC390U3W that runs every drive in my box, but I could boot Gentoo from my Slackware kernel.

So I just unpacked a vanilla 2.4.18, patched it up a bit (2.4.19-pre8, mjc, i2c, lm_sensors2) and haven't had any problems at all.

----------

## mellofone

Hell, I even have a stock 2.5.17 kernel working, but I can't get the gentoo sources running...

----------

## AutoBot

 *mellofone wrote:*   

> Hell, I even have a stock 2.5.17 kernel working, but I can't get the gentoo sources running...

 

Have you tried this also:

```

make mrproper

```

----------

## mellofone

 *Quote:*   

> Have you tried this also:
> 
> ```
> 
> make mrproper
> ...

 

What exactly does it do?

----------

## brain

 *mellofone wrote:*   

>  *Quote:*   Have you tried this also:
> 
> ```
> 
> make mrproper
> ...

 

The 'mrproper' resets your kernel sources back to "clean" state (i.e. unconfigured).

----------

