diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/highmem.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/mm/highmem.c b/mm/highmem.c index 55885f64af40..9b274fdf9d08 100644 --- a/mm/highmem.c +++ b/mm/highmem.c | |||
@@ -74,8 +74,7 @@ static void flush_all_zero_pkmaps(void) | |||
74 | pkmap_count[i] = 0; | 74 | pkmap_count[i] = 0; |
75 | 75 | ||
76 | /* sanity check */ | 76 | /* sanity check */ |
77 | if (pte_none(pkmap_page_table[i])) | 77 | BUG_ON(pte_none(pkmap_page_table[i])); |
78 | BUG(); | ||
79 | 78 | ||
80 | /* | 79 | /* |
81 | * Don't need an atomic fetch-and-clear op here; | 80 | * Don't need an atomic fetch-and-clear op here; |
@@ -158,8 +157,7 @@ void fastcall *kmap_high(struct page *page) | |||
158 | if (!vaddr) | 157 | if (!vaddr) |
159 | vaddr = map_new_virtual(page); | 158 | vaddr = map_new_virtual(page); |
160 | pkmap_count[PKMAP_NR(vaddr)]++; | 159 | pkmap_count[PKMAP_NR(vaddr)]++; |
161 | if (pkmap_count[PKMAP_NR(vaddr)] < 2) | 160 | BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 2); |
162 | BUG(); | ||
163 | spin_unlock(&kmap_lock); | 161 | spin_unlock(&kmap_lock); |
164 | return (void*) vaddr; | 162 | return (void*) vaddr; |
165 | } | 163 | } |
@@ -174,8 +172,7 @@ void fastcall kunmap_high(struct page *page) | |||
174 | 172 | ||
175 | spin_lock(&kmap_lock); | 173 | spin_lock(&kmap_lock); |
176 | vaddr = (unsigned long)page_address(page); | 174 | vaddr = (unsigned long)page_address(page); |
177 | if (!vaddr) | 175 | BUG_ON(!vaddr); |
178 | BUG(); | ||
179 | nr = PKMAP_NR(vaddr); | 176 | nr = PKMAP_NR(vaddr); |
180 | 177 | ||
181 | /* | 178 | /* |
@@ -220,8 +217,7 @@ static __init int init_emergency_pool(void) | |||
220 | return 0; | 217 | return 0; |
221 | 218 | ||
222 | page_pool = mempool_create_page_pool(POOL_SIZE, 0); | 219 | page_pool = mempool_create_page_pool(POOL_SIZE, 0); |
223 | if (!page_pool) | 220 | BUG_ON(!page_pool); |
224 | BUG(); | ||
225 | printk("highmem bounce pool size: %d pages\n", POOL_SIZE); | 221 | printk("highmem bounce pool size: %d pages\n", POOL_SIZE); |
226 | 222 | ||
227 | return 0; | 223 | return 0; |
@@ -264,8 +260,7 @@ int init_emergency_isa_pool(void) | |||
264 | 260 | ||
265 | isa_page_pool = mempool_create(ISA_POOL_SIZE, mempool_alloc_pages_isa, | 261 | isa_page_pool = mempool_create(ISA_POOL_SIZE, mempool_alloc_pages_isa, |
266 | mempool_free_pages, (void *) 0); | 262 | mempool_free_pages, (void *) 0); |
267 | if (!isa_page_pool) | 263 | BUG_ON(!isa_page_pool); |
268 | BUG(); | ||
269 | 264 | ||
270 | printk("isa bounce pool size: %d pages\n", ISA_POOL_SIZE); | 265 | printk("isa bounce pool size: %d pages\n", ISA_POOL_SIZE); |
271 | return 0; | 266 | return 0; |