Skip to content

Commit 2feee88

Browse files
committed
Linux: typo is PGD definitions
1 parent 5c9100e commit 2feee88

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

docs/Linux.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ The **page global directory** or **pgd** looks like the following in OpenRISC:
173173

174174
```
175175
PGD (256 entries)
176-
177176
--> +-----+ PTE (2048 entries)
178177
| ptr |-------> +-----+
179178
| ptr |- | ptr |-------> PAGE
@@ -203,17 +202,19 @@ and derive the physical address as below:
203202
+-----------------> [21:24] PGD index
204203
```
205204

206-
The are defined in `page.h` and `pgtable.h` as follows:
205+
These are defined in [page.h](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/openrisc/include/asm/page.h)
206+
and [pgtable.h](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/openrisc/include/asm/pgtable.h)
207+
as follows:
207208

208-
From page.h:
209+
From **page.h**:
209210

210-
```
211+
```c
211212
#define PAGE_SHIFT 13 // 8KB
212213
```
213214

214-
From pgtable.h:
215+
From **pgtable.h**:
215216

216-
```
217+
```c
217218
#define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-2)) // 24
218219
#define PTRS_PER_PTE (1UL << (PAGE_SHIFT-2)) // 2048
219220
#define PTRS_PER_PGD (1UL << (32-PGDIR_SHIFT)) // 256

0 commit comments

Comments
 (0)