| .. | .. |
|---|
| 57 | 57 | * Of course, readability is a subjective issue, so it will never be |
|---|
| 58 | 58 | * argued that that goal was accomplished. It was merely a goal. |
|---|
| 59 | 59 | * A key way to help make code more readable is to give good |
|---|
| 60 | | - * documentation. So, the first thing you will find is exaustive |
|---|
| 60 | + * documentation. So, the first thing you will find is exhaustive |
|---|
| 61 | 61 | * write-ups on the structure of the file, and the features of the |
|---|
| 62 | 62 | * functional subroutines. |
|---|
| 63 | 63 | * |
|---|
| .. | .. |
|---|
| 255 | 255 | |
|---|
| 256 | 256 | #include <linux/linkage.h> |
|---|
| 257 | 257 | #include <linux/init.h> |
|---|
| 258 | +#include <linux/pgtable.h> |
|---|
| 258 | 259 | #include <asm/bootinfo.h> |
|---|
| 259 | 260 | #include <asm/bootinfo-amiga.h> |
|---|
| 260 | 261 | #include <asm/bootinfo-atari.h> |
|---|
| .. | .. |
|---|
| 264 | 265 | #include <asm/bootinfo-vme.h> |
|---|
| 265 | 266 | #include <asm/setup.h> |
|---|
| 266 | 267 | #include <asm/entry.h> |
|---|
| 267 | | -#include <asm/pgtable.h> |
|---|
| 268 | 268 | #include <asm/page.h> |
|---|
| 269 | 269 | #include <asm/asm-offsets.h> |
|---|
| 270 | 270 | #ifdef CONFIG_MAC |
|---|
| .. | .. |
|---|
| 1304 | 1304 | * mmu_engage |
|---|
| 1305 | 1305 | * |
|---|
| 1306 | 1306 | * This chunk of code performs the gruesome task of engaging the MMU. |
|---|
| 1307 | | - * The reason its gruesome is because when the MMU becomes engaged it |
|---|
| 1307 | + * The reason it's gruesome is because when the MMU becomes engaged it |
|---|
| 1308 | 1308 | * maps logical addresses to physical addresses. The Program Counter |
|---|
| 1309 | 1309 | * register is then passed through the MMU before the next instruction |
|---|
| 1310 | 1310 | * is fetched (the instruction following the engage MMU instruction). |
|---|
| .. | .. |
|---|
| 1369 | 1369 | /* |
|---|
| 1370 | 1370 | * After this point no new memory is allocated and |
|---|
| 1371 | 1371 | * the start of available memory is stored in availmem. |
|---|
| 1372 | | - * (The bootmem allocator requires now the physicall address.) |
|---|
| 1372 | + * (The bootmem allocator requires now the physical address.) |
|---|
| 1373 | 1373 | */ |
|---|
| 1374 | 1374 | |
|---|
| 1375 | 1375 | movel L(memory_start),availmem |
|---|
| .. | .. |
|---|
| 1547 | 1547 | * seven bits of the logical address (LA) are used as an |
|---|
| 1548 | 1548 | * index into the "root table." Each entry in the root |
|---|
| 1549 | 1549 | * table has a bit which specifies if it's a valid pointer to a |
|---|
| 1550 | | - * pointer table. Each entry defines a 32KMeg range of memory. |
|---|
| 1550 | + * pointer table. Each entry defines a 32Meg range of memory. |
|---|
| 1551 | 1551 | * If an entry is invalid then that logical range of 32M is |
|---|
| 1552 | 1552 | * invalid and references to that range of memory (when the MMU |
|---|
| 1553 | 1553 | * is enabled) will fault. If the entry is valid, then it does |
|---|
| .. | .. |
|---|
| 1584 | 1584 | * bits 17..12 - index into the Page Table |
|---|
| 1585 | 1585 | * bits 11..0 - offset into a particular 4K page |
|---|
| 1586 | 1586 | * |
|---|
| 1587 | | - * The algorithms which follows do one thing: they abstract |
|---|
| 1587 | + * The algorithms which follow do one thing: they abstract |
|---|
| 1588 | 1588 | * the MMU hardware. For example, there are three kinds of |
|---|
| 1589 | 1589 | * cache settings that are relevant. Either, memory is |
|---|
| 1590 | 1590 | * being mapped in which case it is either Kernel Code (or |
|---|
| .. | .. |
|---|
| 2082 | 2082 | * mmu_map |
|---|
| 2083 | 2083 | * |
|---|
| 2084 | 2084 | * This routine will map a range of memory using a pointer |
|---|
| 2085 | | - * table and allocating the pages on the fly from the kernel. |
|---|
| 2085 | + * table and allocate the pages on the fly from the kernel. |
|---|
| 2086 | 2086 | * The pointer table does not have to be already linked into |
|---|
| 2087 | 2087 | * the root table, this routine will do that if necessary. |
|---|
| 2088 | 2088 | * |
|---|
| .. | .. |
|---|
| 2528 | 2528 | |
|---|
| 2529 | 2529 | /* Find the start of free memory, get_bi_record does this for us, |
|---|
| 2530 | 2530 | * as the bootinfo structure is located directly behind the kernel |
|---|
| 2531 | | - * and and we simply search for the last entry. |
|---|
| 2531 | + * we simply search for the last entry. |
|---|
| 2532 | 2532 | */ |
|---|
| 2533 | 2533 | get_bi_record BI_LAST |
|---|
| 2534 | 2534 | addw #PAGESIZE-1,%a0 |
|---|
| .. | .. |
|---|
| 2654 | 2654 | jne 2f |
|---|
| 2655 | 2655 | |
|---|
| 2656 | 2656 | /* If the page table entry doesn't exist, we allocate a complete new |
|---|
| 2657 | | - * page and use it as one continues big page table which can cover |
|---|
| 2657 | + * page and use it as one continuous big page table which can cover |
|---|
| 2658 | 2658 | * 4MB of memory, nearly almost all mappings have that alignment. |
|---|
| 2659 | 2659 | */ |
|---|
| 2660 | 2660 | get_new_page |
|---|