[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: where is ZONE_HIGHMEM defined?
Alternatively, you can do a "make tags" in the kernel source code
(look up Makefile, it recognize "tags" as an identifier) and the
Makefile will use ctags command to generate a "tags" file. If u then
"vi", at the highest level in the kernel directory (purely because
make "tags" currently DOES NOT generate a "tags" file in every
subdirectory), any source code, and then put the cursor at the
beginning of the technical word u want to cross-reference, and then do
a "control-]" vi will jump directly to the file and the definition of
the identifier. If there are multiple definition, just enter
":tnext" or ":tprev" to navigate inside the vi editor.
If I want to find out about ZONE_HIGHMEM, just create a file by any
name, put the word ZONE_HIGHMEM into the file, saved it, and then
"ctrl-]" at the beginning of the word, u will get to here:
include/linux/mmzone.h:
enum zone_type {
#ifdef CONFIG_ZONE_DMA
/*
* ZONE_DMA is used when there are devices that are not able
* to do DMA to all of addressable memory (ZONE_NORMAL). Then we
* carve out the portion of memory that is needed for these devices.
* The range is arch specific.
*
* used by i386 to allow the kernel to address the memory beyond
* 900MB. The kernel will set up special mappings (page
* table entries on i386) for each page that the kernel needs to
* access.
*/
ZONE_HIGHMEM,
#endif
ZONE_MOVABLE,
MAX_NR_ZONES
};
So it is just an enum :-).
On Thu, Apr 3, 2008 at 11:22 PM, Johannes Weiner <hannes@xxxxxxxxxxxx> wrote:
> Hi Robert,
>
> "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> writes:
>
> > On Thu, 3 Apr 2008, Robert P. J. Day wrote:
> >
> >>
> >> i just *know* i'm going to regret asking this, but where is the
> >> preprocessor symbol "ZONE_HIGHMEM" defined? running the obvious
> >> "grep" commands just isn't telling me what i want to know. thanks.
> >
> > argh, never mind ... just noticed that it's defined as an enum in
> > linux/mmzone.h. carry on.
>
> cscope is your friend:
>
> $ make cscope
> or
> $ cscope -bkqR
>
> to build the index and:
>
> $ cscope -p5 -d
>
> to start the interactive program.
>
> `make cscope' does not include code from !YOUR_ARCH. I don't know if it
> does with some additional flags, so I use the second version to generate
> the index myself.
>
> Hannes
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>
--
Regards,
Peter Teoh
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ