aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 14:52:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 14:52:41 -0400
commit98523d4630865c407d3787fd592e5e399488b93b (patch)
treeb32f2ef6bdaa43020d67e62d40a31720b9a5758a /arch/sparc/mm
parent8d6cea5111f2daea8acf79d7b4b384a14175ecc1 (diff)
parentaaa7e2f74f11b5f7e30483807b896d7b3369586f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (30 commits) sparc64: Update defconfig. sparc: Wire up sys_rt_tgsigqueueinfo(). openprom: Squelch useless GCC warning. sparc: replace uses of CPU_MASK_ALL_PTR sparc64: Add proper dynamic ftrace support. sparc: Simplify code using is_power_of_2() routine. sparc: move of_device common code to of_device_common sparc: remove dma-mapping_{32|64}.h sparc: use dma_map_page instead of dma_map_single sparc: add sync_single_for_device and sync_sg_for_device to struct dma_ops sparc: move the duplication in dma-mapping_{32|64}.h to dma-mapping.h p9100: use standard fields for framebuffer physical address and length leo: use standard fields for framebuffer physical address and length cg6: use standard fields for framebuffer physical address and length cg3: use standard fields for framebuffer physical address and length cg14: use standard fields for framebuffer physical address and length bw2: use standard fields for framebuffer physical address and length sparc64: fix and optimize irq distribution sparc64: Use new dynamic per-cpu allocator. sparc64: Only allocate per-cpu areas for possible cpus. ...
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/init_32.c1
-rw-r--r--arch/sparc/mm/init_64.c16
-rw-r--r--arch/sparc/mm/srmmu.c3
3 files changed, 7 insertions, 13 deletions
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index cbb282dab5a7..26bb3919ff1f 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -358,6 +358,7 @@ void __init paging_init(void)
358 protection_map[15] = PAGE_SHARED; 358 protection_map[15] = PAGE_SHARED;
359 btfixup(); 359 btfixup();
360 prom_build_devicetree(); 360 prom_build_devicetree();
361 of_fill_in_cpu_data();
361 device_scan(); 362 device_scan();
362} 363}
363 364
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index f26a352c08a0..ca92e2f54e4d 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1679,11 +1679,6 @@ pgd_t swapper_pg_dir[2048];
1679static void sun4u_pgprot_init(void); 1679static void sun4u_pgprot_init(void);
1680static void sun4v_pgprot_init(void); 1680static void sun4v_pgprot_init(void);
1681 1681
1682/* Dummy function */
1683void __init setup_per_cpu_areas(void)
1684{
1685}
1686
1687void __init paging_init(void) 1682void __init paging_init(void)
1688{ 1683{
1689 unsigned long end_pfn, shift, phys_base; 1684 unsigned long end_pfn, shift, phys_base;
@@ -1799,16 +1794,13 @@ void __init paging_init(void)
1799 if (tlb_type == hypervisor) 1794 if (tlb_type == hypervisor)
1800 sun4v_ktsb_register(); 1795 sun4v_ktsb_register();
1801 1796
1802 /* We must setup the per-cpu areas before we pull in the
1803 * PROM and the MDESC. The code there fills in cpu and
1804 * other information into per-cpu data structures.
1805 */
1806 real_setup_per_cpu_areas();
1807
1808 prom_build_devicetree(); 1797 prom_build_devicetree();
1798 of_populate_present_mask();
1809 1799
1810 if (tlb_type == hypervisor) 1800 if (tlb_type == hypervisor) {
1811 sun4v_mdesc_init(); 1801 sun4v_mdesc_init();
1802 mdesc_populate_present_mask(cpu_all_mask);
1803 }
1812 1804
1813 /* Once the OF device tree and MDESC have been setup, we know 1805 /* Once the OF device tree and MDESC have been setup, we know
1814 * the list of possible cpus. Therefore we can allocate the 1806 * the list of possible cpus. Therefore we can allocate the
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 06c9a7d98206..ade4eb373bdd 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -19,6 +19,7 @@
19#include <linux/fs.h> 19#include <linux/fs.h>
20#include <linux/seq_file.h> 20#include <linux/seq_file.h>
21#include <linux/kdebug.h> 21#include <linux/kdebug.h>
22#include <linux/log2.h>
22 23
23#include <asm/bitext.h> 24#include <asm/bitext.h>
24#include <asm/page.h> 25#include <asm/page.h>
@@ -349,7 +350,7 @@ static void srmmu_free_nocache(unsigned long vaddr, int size)
349 vaddr, srmmu_nocache_end); 350 vaddr, srmmu_nocache_end);
350 BUG(); 351 BUG();
351 } 352 }
352 if (size & (size-1)) { 353 if (!is_power_of_2(size)) {
353 printk("Size 0x%x is not a power of 2\n", size); 354 printk("Size 0x%x is not a power of 2\n", size);
354 BUG(); 355 BUG();
355 } 356 }