Skip to content

Commit 6a32c8d

Browse files
Pengyu ZhangJonathan Corbet
authored andcommitted
Docs/mm: Fix a mistake for pfn in page_tables.rst
The documentation incorrectly calculate the pfn value as 0x3fffff, which should be 0x3ffff instead. It is obtained by right-shifting 0xffffc000 by 14 bits. This patch corrects the value to prevent any potential confusion for developers referencing this document. Signed-off-by: Pengyu Zhang <zpenya1314@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Zenghui Yu <zenghui.yu@linux.dev> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241009144135.12453-1-zpenya1314@gmail.com
1 parent 4431652 commit 6a32c8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Documentation/mm/page_tables.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ address.
2929
With a page granularity of 4KB and a address range of 32 bits, pfn 0 is at
3030
address 0x00000000, pfn 1 is at address 0x00001000, pfn 2 is at 0x00002000
3131
and so on until we reach pfn 0xfffff at 0xfffff000. With 16KB pages pfs are
32-
at 0x00004000, 0x00008000 ... 0xffffc000 and pfn goes from 0 to 0x3fffff.
32+
at 0x00004000, 0x00008000 ... 0xffffc000 and pfn goes from 0 to 0x3ffff.
3333

3434
As you can see, with 4KB pages the page base address uses bits 12-31 of the
3535
address, and this is why `PAGE_SHIFT` in this case is defined as 12 and

0 commit comments

Comments
 (0)