Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[sfrench/cifs-2.6.git] / arch / sparc64 / mm / tsb.c
index 236d02f41a01ae576a0d0ab60670ecba29656668..fe70c8a557b58ae1c96cb4312878797b8d881d49 100644 (file)
@@ -182,7 +182,9 @@ static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_idx, unsign
                break;
 
        default:
-               BUG();
+               printk(KERN_ERR "TSB[%s:%d]: Impossible TSB size %lu, killing process.\n",
+                      current->comm, current->pid, tsb_bytes);
+               do_exit(SIGSEGV);
        };
        tte |= pte_sz_bits(page_sz);
 
@@ -252,7 +254,7 @@ static const char *tsb_cache_names[8] = {
        "tsb_1MB",
 };
 
-void __init tsb_cache_init(void)
+void __init pgtable_cache_init(void)
 {
        unsigned long i;
 
@@ -262,9 +264,7 @@ void __init tsb_cache_init(void)
 
                tsb_caches[i] = kmem_cache_create(name,
                                                  size, size,
-                                                 SLAB_HWCACHE_ALIGN |
-                                                 SLAB_MUST_HWCACHE_ALIGN,
-                                                 NULL, NULL);
+                                                 0, NULL);
                if (!tsb_caches[i]) {
                        prom_printf("Could not create %s cache\n", name);
                        prom_halt();
@@ -321,7 +321,8 @@ retry_tsb_alloc:
        if (new_size > (PAGE_SIZE * 2))
                gfp_flags = __GFP_NOWARN | __GFP_NORETRY;
 
-       new_tsb = kmem_cache_alloc(tsb_caches[new_cache_index], gfp_flags);
+       new_tsb = kmem_cache_alloc_node(tsb_caches[new_cache_index],
+                                       gfp_flags, numa_node_id());
        if (unlikely(!new_tsb)) {
                /* Not being able to fork due to a high-order TSB
                 * allocation failure is very bad behavior.  Just back