Re: pgd_init() Patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 28 Jan 2002, Phil Thompson wrote:
> - USER_PTRS_PER_PGD is defined as TASK_SIZE/PGDIR_SIZE. However,
> because, TASK_SIZE is actually defined as one less that the maximum task
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> size there is a rounding error that means that USER_PTRS_PER_PGD works
  ^^^^
> out at 511 rather than 512. This means that entries 511 and 1023 of
> swapper_pg_dir don't get initialised.
> 
> The corresponding mips64 code has only the first call to pgd_init() and
> each implementation of pgd_init() initialises PTRS_PER_PGD entries,
> where PTRS_PER_PGD is simple defined as 1024.
> 
> The attached patch applies the mips64 approach to the mips code.
> 
> Should USER_PTRS_PER_PGD be defined as (TASK_SIZE/PGDIR_SIZE) + 1?

You mean ((TASK_SIZE)+1)/PGDIR_SIZE?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux