linux-mips
[Top] [All Lists]

Re: DBE table ordering

To: "Keith Owens" <kaos@ocs.com.au>
Subject: Re: DBE table ordering
From: "Mark Huang" <mhuang@broadcom.com>
Date: 17 Apr 2002 23:39:16 -0700
Cc: "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>
In-reply-to: <30922.1019102135@ocs3.intra.ocs.com.au>
References: <30922.1019102135@ocs3.intra.ocs.com.au>
Sender: owner-linux-mips@oss.sgi.com
>From the objdump output, it looks like the exception table is in order
at link time, but the DBE table is definitely out of order. What seems
to be throwing it off is the dummy call to get_dbe() in traps.c. After
sprinkling a few more calls to get_dbe() around the kernel and seeing
what happens during link, it looks like any call to get_dbe() inside an
__init section (or probably any explicitly located section) will throw
off the ordering of the table. 

I'd say just change the binary search to a linear one, or reorder the
table at __init time if O(log n) is that important. If there were 600
entries in the table, sure, but I don't really see the benefit of the
additional code to deal with only a handful, as in most cases.

> The kernel relies on several tables being correctly ordered by the
> linker, including the initialization vectors, so it is a fair bet that
> the linker is correctly appended these tables as the kernel is built.
> What is more likely is that one of the exception table entries was
> created out of order.  Please send the following output to me, not the
> list.
> 
> objdump -h vmlinux
> objdump -s -j __ex_table vmlinux
> nm -a vmlinux
> 

Attachment: traps.c.diff
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>