Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc64: Reclaim trap_block[]->hdesc

This really isn't necessary at all, a local variable suits the
job just fine.

This frees up 8 bytes in the trap_block[] that we can use later
to store the per-cpu base addresses.

Signed-off-by: David S. Miller <davem@davemloft.net>

+7 -9
+1 -1
arch/sparc/include/asm/cpudata_64.h
··· 80 80 unsigned int dev_mondo_qmask; 81 81 unsigned int resum_qmask; 82 82 unsigned int nonresum_qmask; 83 - void *hdesc; 83 + unsigned long __unused; 84 84 } __attribute__((aligned(64))); 85 85 extern struct trap_per_cpu trap_block[NR_CPUS]; 86 86 extern void init_cur_cpu_trap(struct thread_info *);
+6 -8
arch/sparc/kernel/smp_64.c
··· 278 278 return kern_base + (val - KERNBASE); 279 279 } 280 280 281 - static void __cpuinit ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg) 281 + static void __cpuinit ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg, void **descrp) 282 282 { 283 283 extern unsigned long sparc64_ttable_tl0; 284 284 extern unsigned long kern_locked_tte_data; ··· 298 298 "hvtramp_descr.\n"); 299 299 return; 300 300 } 301 + *descrp = hdesc; 301 302 302 303 hdesc->cpu = cpu; 303 304 hdesc->num_mappings = num_kernel_image_mappings; 304 305 305 306 tb = &trap_block[cpu]; 306 - tb->hdesc = hdesc; 307 307 308 308 hdesc->fault_info_va = (unsigned long) &tb->fault_info; 309 309 hdesc->fault_info_pa = kimage_addr_to_ra(&tb->fault_info); ··· 341 341 342 342 static int __cpuinit smp_boot_one_cpu(unsigned int cpu) 343 343 { 344 - struct trap_per_cpu *tb = &trap_block[cpu]; 345 344 unsigned long entry = 346 345 (unsigned long)(&sparc64_cpu_startup); 347 346 unsigned long cookie = 348 347 (unsigned long)(&cpu_new_thread); 349 348 struct task_struct *p; 349 + void *descr = NULL; 350 350 int timeout, ret; 351 351 352 352 p = fork_idle(cpu); ··· 359 359 #if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU) 360 360 if (ldom_domaining_enabled) 361 361 ldom_startcpu_cpuid(cpu, 362 - (unsigned long) cpu_new_thread); 362 + (unsigned long) cpu_new_thread, 363 + &descr); 363 364 else 364 365 #endif 365 366 prom_startcpu_cpuid(cpu, entry, cookie); ··· 384 383 } 385 384 cpu_new_thread = NULL; 386 385 387 - if (tb->hdesc) { 388 - kfree(tb->hdesc); 389 - tb->hdesc = NULL; 390 - } 386 + kfree(descr); 391 387 392 388 return ret; 393 389 }