From: Toshiyasu Morita <tm@netcom.com>
Subject: L68K: Hardcoded constants
To: linux-m68k@lists.linux-m68k.org
Date: Fri, 9 Jan 1998 01:39:19 -0800 (PST)
Sender: owner-linux-m68k@phil.uni-sb.de


There are a few hardcoded constants in the m68k code which cause problems
when the page size is changed for the sun3 - here are two I've found so 
far. Could the appropriate people take a look at these and fix 'em?

diff -rcpP ../linux-m68k-2.1.72/include/asm-m68k/pgtable.h ./include/asm-m68k/pgtable.h
*** ../linux-m68k-2.1.72/include/asm-m68k/pgtable.h     Sun Dec 14 21:46:57 1997
--- ./include/asm-m68k/pgtable.h        Sat Jan  3 19:59:44 1998
*************** extern inline pgd_t * pgd_offset(struct
*** 525,532 ****
        return mm->pgd + (address >> PGDIR_SHIFT);
  }

! extern pgd_t swapper_pg_dir[128];
! extern pgd_t kernel_pg_dir[128];

  extern inline pgd_t * pgd_offset_k(unsigned long address)
  {
--- 552,559 ----
        return mm->pgd + (address >> PGDIR_SHIFT);
  }

! extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
! extern pgd_t kernel_pg_dir[PTRS_PER_PGD];

  extern inline pgd_t * pgd_offset_k(unsigned long address)
  {

Also, in arch/m68k/mm/init.c there is the line:


        /*
         * pindex is the offset into the pointer table for the
         * descriptors for the current virtual address being mapped.
         */
        pindex = (virtaddr >> 18) & 0x7f;
                              ^^  this value should probably be a define
                                  but I don't know which?

Toshi



