Skip to contentSkip to conversation

Maze of include files, all producing errors...

DISCUSSION Russell King 3 participants 3 messages Feb 28, 2002 – Mar 3, 2002

lore
Share & tools
lore
#0 lore raw

In 2.5.5 (Changeset 1.359.2.3), the highmem.h and pgalloc.h includes were reversed.

Previous kernels had linux/highmem.h including asm/pgalloc.h. Placing the architecture cache handling functions worked well in asm/pgalloc.h, allowing highmem.h to find them; highmem.h uses flush_dcache_page() and friends in inline functions.

In this changeset, highmem.h no longer includes pgalloc.h, but instead pgalloc.h includes highmem.h. This, unfortunately, tends to break things in a major way since the cache functions are no longer available to highmem.h.

Looking at x86, the (no-op) cache functions live in pgtable.h. However, trying to put the ARM cache handling into pgtable.h doesn't work because we need things like PG_arch_1 and struct page. pgtable.h is included by linux/mm.h before linux/mm.h declares PG_arch_1 and struct page. So obviously this can't work.

Has anyone encountered this, and has anyone found a magic working combination?

For now, I'm going to reverse the include changes in this changeset so things build again.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
#1 lore raw
Quoted 2 lines · Russell King

For now, I'm going to reverse the include changes in this changeset so things build again.

That's what I did for alpha too.

r~

#2 lore raw
In reply to Russell King
Quoted 13 lines · Russell King

In 2.5.5 (Changeset 1.359.2.3), the highmem.h and pgalloc.h includes were reversed.

Previous kernels had linux/highmem.h including asm/pgalloc.h. Placing the architecture cache handling functions worked well in asm/pgalloc.h, allowing highmem.h to find them; highmem.h uses flush_dcache_page() and friends in inline functions.

In this changeset, highmem.h no longer includes pgalloc.h, but instead pgalloc.h includes highmem.h. This, unfortunately, tends to break things in a major way since the cache functions are no longer available to highmem.h.

Quoted 8 lines

Looking at x86, the (no-op) cache functions live in pgtable.h. However, trying to put the ARM cache handling into pgtable.h doesn't work because we need things like PG_arch_1 and struct page. pgtable.h is included by linux/mm.h before linux/mm.h declares PG_arch_1 and struct page. So obviously this can't work.

Has anyone encountered this, and has anyone found a magic working combination?

I've noticed it's a mess...

I ran into a different problem yesterday. It seems mmzone.h is included before struct page is defined and therefore inlines in mmzone.h can't do arithmetic on the size of struct page. This forces code in mmzone.h to be macros instead of inlines.

Signature · 1 line
Daniel