Title: [6466] branches/2009R1/arch/blackfin: port commit 6465 to branch 09r1

Diff

Modified: branches/2009R1/arch/blackfin/include/asm/pda.h (6465 => 6466)


--- branches/2009R1/arch/blackfin/include/asm/pda.h	2009-05-25 04:27:22 UTC (rev 6465)
+++ branches/2009R1/arch/blackfin/include/asm/pda.h	2009-05-25 04:28:46 UTC (rev 6466)
@@ -64,8 +64,6 @@
 
 extern struct blackfin_pda cpu_pda[];
 
-void reserve_pda(void);
-
 #endif	/* __ASSEMBLY__ */
 
 #endif /* _ASM_BLACKFIN_PDA_H */

Modified: branches/2009R1/arch/blackfin/mach-common/smp.c (6465 => 6466)


--- branches/2009R1/arch/blackfin/mach-common/smp.c	2009-05-25 04:27:22 UTC (rev 6465)
+++ branches/2009R1/arch/blackfin/mach-common/smp.c	2009-05-25 04:28:46 UTC (rev 6466)
@@ -369,9 +369,6 @@
 	bfin_write_ILAT(ilat);
 	CSYNC();
 
-	/* Reserve the PDA space for the secondary CPU. */
-	reserve_pda();
-
 	/* Enable interrupt levels IVG7-15. IARs have been already
 	 * programmed by the boot CPU.  */
 	bfin_irq_flags |= IMASK_IVG15 |

Modified: branches/2009R1/arch/blackfin/mm/blackfin_sram.h (6465 => 6466)


--- branches/2009R1/arch/blackfin/mm/blackfin_sram.h	2009-05-25 04:27:22 UTC (rev 6465)
+++ branches/2009R1/arch/blackfin/mm/blackfin_sram.h	2009-05-25 04:28:46 UTC (rev 6466)
@@ -30,7 +30,6 @@
 #ifndef __BLACKFIN_SRAM_H__
 #define __BLACKFIN_SRAM_H__
 
-extern void bfin_sram_init(void);
 extern void *l1sram_alloc(size_t);
 
 #endif

Modified: branches/2009R1/arch/blackfin/mm/init.c (6465 => 6466)


--- branches/2009R1/arch/blackfin/mm/init.c	2009-05-25 04:27:22 UTC (rev 6465)
+++ branches/2009R1/arch/blackfin/mm/init.c	2009-05-25 04:28:46 UTC (rev 6466)
@@ -108,12 +108,6 @@
 #endif
 }
 
-void __cpuinit reserve_pda(void)
-{
-	printk(KERN_INFO "PDA for CPU%u reserved at %p\n", smp_processor_id(),
-					&cpu_pda[smp_processor_id()]);
-}
-
 void __init mem_init(void)
 {
 	unsigned int codek = 0, datak = 0, initk = 0;
@@ -155,19 +149,6 @@
 		initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10)));
 }
 
-static int __init sram_init(void)
-{
-	/* Initialize the blackfin L1 Memory. */
-	bfin_sram_init();
-
-	/* Reserve the PDA space for the boot CPU right after we
-	 * initialized the scratch memory allocator.
-	 */
-	reserve_pda();
-	return 0;
-}
-pure_initcall(sram_init);
-
 static void __init free_init_pages(const char *what, unsigned long begin, unsigned long end)
 {
 	unsigned long addr;

Modified: branches/2009R1/arch/blackfin/mm/sram-alloc.c (6465 => 6466)


--- branches/2009R1/arch/blackfin/mm/sram-alloc.c	2009-05-25 04:27:22 UTC (rev 6465)
+++ branches/2009R1/arch/blackfin/mm/sram-alloc.c	2009-05-25 04:28:46 UTC (rev 6466)
@@ -83,6 +83,14 @@
 static void __init l1sram_init(void)
 {
 	unsigned int cpu;
+	unsigned long reserve;
+
+#ifdef CONFIG_SMP
+	reserve = 0;
+#else
+	reserve = sizeof(struct l1_scratch_task_info);
+#endif
+
 	for (cpu = 0; cpu < num_possible_cpus(); ++cpu) {
 		per_cpu(free_l1_ssram_head, cpu).next =
 			kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
@@ -91,8 +99,8 @@
 			return;
 		}
 
-		per_cpu(free_l1_ssram_head, cpu).next->paddr = (void *)get_l1_scratch_start_cpu(cpu);
-		per_cpu(free_l1_ssram_head, cpu).next->size = L1_SCRATCH_LENGTH;
+		per_cpu(free_l1_ssram_head, cpu).next->paddr = (void *)get_l1_scratch_start_cpu(cpu) + reserve;
+		per_cpu(free_l1_ssram_head, cpu).next->size = L1_SCRATCH_LENGTH - reserve;
 		per_cpu(free_l1_ssram_head, cpu).next->pid = 0;
 		per_cpu(free_l1_ssram_head, cpu).next->next = NULL;
 
@@ -223,7 +231,7 @@
 	spin_lock_init(&l2_sram_lock);
 }
 
-void __init bfin_sram_init(void)
+static int __init bfin_sram_init(void)
 {
 	sram_piece_cache = kmem_cache_create("sram_piece_cache",
 				sizeof(struct sram_piece),
@@ -233,7 +241,10 @@
 	l1_data_sram_init();
 	l1_inst_sram_init();
 	l2_sram_init();
+
+	return 0;
 }
+pure_initcall(bfin_sram_init);
 
 /* SRAM allocate function */
 static void *_sram_alloc(size_t size, struct sram_piece *pfree_head,
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to