1. 12 5月, 2012 13 次提交
  2. 10 5月, 2012 1 次提交
    • P
      sparc: fix build fail in mm/init_64.c when NEED_MULTIPLE_NODES is off · aa6f0790
      Paul Gortmaker 提交于
      Commit 625d693e (linux-next)
      
          "sparc64: Convert over to NO_BOOTMEM."
      
      causes the following compile failure for sparc64 allnoconfig:
      
        arch/sparc/mm/init_64.c:822:16: error: unused variable 'paddr'
        arch/sparc/mm/init_64.c:1759:7: error: unused variable 'node'
        arch/sparc/mm/init_64.c:809:12: error: 'memblock_nid_range' defined but not used
      
      The paddr decl can easily be shuffled within the ifdef.  The
      memblock_nid_range is just a stub function for when NEED_MULTIPLE_NODES
      is off, but the only caller is within a NEED_MULTIPLE_NODES enabled
      section, so we can simply delete it.
      
      The unused "node" is slightly more interesting.  In the case of
      "# CONFIG_NEED_MULTIPLE_NODES is not set" we no longer get the
      definition of:
      
       #define NODE_DATA(nid)          (node_data[nid])
      
      from arch/sparc/include/asm/mmzone.h - but instead we get:
      
       #define NODE_DATA(nid)          (&contig_page_data)
      
      from include/linux/mmzone.h -- and since the arg is ignored,
      the thing really is unused.  Rather than put in a confusing
      looking __maybe_unused, simply splitting the declaration
      from the assignment seemed to me to be the least offensive.
      
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa6f0790
  3. 28 4月, 2012 1 次提交
  4. 27 4月, 2012 2 次提交
  5. 05 4月, 2012 2 次提交
  6. 29 3月, 2012 2 次提交
  7. 20 3月, 2012 1 次提交
  8. 29 2月, 2012 1 次提交
  9. 15 12月, 2011 1 次提交
  10. 09 12月, 2011 3 次提交
    • T
      sparc: Use HAVE_MEMBLOCK_NODE_MAP · 2a4814df
      Tejun Heo 提交于
      sparc doesn't access early_node_map[] directly and enabling
      HAVE_MEMBLOCK_NODE_MAP is trivial - replacing add_active_range() calls
      with memblock_set_node() and selecting HAVE_MEMBLOCK_NODE_MAP is
      enough.
      
      -v2: Use select in Kconfig instead as suggested by Sam Ravnborg.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: N"David S. Miller" <davem@davemloft.net>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: sparclinux@vger.kernel.org
      2a4814df
    • T
      memblock: s/memblock_analyze()/memblock_allow_resize()/ and update users · 1aadc056
      Tejun Heo 提交于
      The only function of memblock_analyze() is now allowing resize of
      memblock region arrays.  Rename it to memblock_allow_resize() and
      update its users.
      
      * The following users remain the same other than renaming.
      
        arm/mm/init.c::arm_memblock_init()
        microblaze/kernel/prom.c::early_init_devtree()
        powerpc/kernel/prom.c::early_init_devtree()
        openrisc/kernel/prom.c::early_init_devtree()
        sh/mm/init.c::paging_init()
        sparc/mm/init_64.c::paging_init()
        unicore32/mm/init.c::uc32_memblock_init()
      
      * In the following users, analyze was used to update total size which
        is no longer necessary.
      
        powerpc/kernel/machine_kexec.c::reserve_crashkernel()
        powerpc/kernel/prom.c::early_init_devtree()
        powerpc/mm/init_32.c::MMU_init()
        powerpc/mm/tlb_nohash.c::__early_init_mmu()  
        powerpc/platforms/ps3/mm.c::ps3_mm_add_memory()
        powerpc/platforms/embedded6xx/wii.c::wii_memory_fixups()
        sh/kernel/machine_kexec.c::reserve_crashkernel()
      
      * x86/kernel/e820.c::memblock_x86_fill() was directly setting
        memblock_can_resize before populating memblock and calling analyze
        afterwards.  Call memblock_allow_resize() before start populating.
      
      memblock_can_resize is now static inside memblock.c.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      1aadc056
    • T
      memblock: Kill memblock_init() · fe091c20
      Tejun Heo 提交于
      memblock_init() initializes arrays for regions and memblock itself;
      however, all these can be done with struct initializers and
      memblock_init() can be removed.  This patch kills memblock_init() and
      initializes memblock with struct initializer.
      
      The only difference is that the first dummy entries don't have .nid
      set to MAX_NUMNODES initially.  This doesn't cause any behavior
      difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      fe091c20
  11. 18 11月, 2011 1 次提交
  12. 03 11月, 2011 2 次提交
  13. 01 11月, 2011 3 次提交
    • P
      sparc: Add module.h to files previously implicitly using it. · f060ac54
      Paul Gortmaker 提交于
      The file mm/extable.c needs module.h for within_module_init(), and
      also for search_exception_tables [which arguably could be living somewhere
      more appropriate than module.h] - eventually causing this:
      
      arch/sparc/mm/extable.c: In function 'trim_init_extable':
      arch/sparc/mm/extable.c:74: error: dereferencing pointer to incomplete type
      arch/sparc/mm/extable.c:75: error: dereferencing pointer to incomplete type
      arch/sparc/mm/extable.c:77: error: implicit declaration of function 'within_module_init'
      arch/sparc/mm/extable.c:77: error: dereferencing pointer to incomplete type
      arch/sparc/mm/extable.c:78: error: dereferencing pointer to incomplete type
      arch/sparc/mm/extable.c:80: error: dereferencing pointer to incomplete type
      arch/sparc/mm/extable.c: In function 'search_extables_range':
      arch/sparc/mm/extable.c:93: error: implicit declaration of function 'search_exception_tables'
      
      The other instances are more straight forward uses of things
      like MODULE_* and module_*
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      f060ac54
    • P
      sparc: remove several unnecessary module.h include instances · cdd0b0ac
      Paul Gortmaker 提交于
      Building an allyesconfig doesn't reveal a hidden need
      for any of these.  Since module.h brings in the whole kitchen
      sink, it just needlessly adds 30k+ lines to the cpp burden.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      cdd0b0ac
    • P
      sparc: add export.h to arch/sparc files as required · 7b64db60
      Paul Gortmaker 提交于
      These files are only exporting symbols, so they don't need
      the full module.h header file.  Previously they were getting
      access to EXPORT_SYMBOL implicitly via overuse of module.h
      from within other .h files, but that is being cleaned up.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      7b64db60
  14. 08 10月, 2011 1 次提交
  15. 30 9月, 2011 1 次提交
    • D
      sparc64: Force the execute bit in OpenFirmware's translation entries. · f4142cba
      David S. Miller 提交于
      In the OF 'translations' property, the template TTEs in the mappings
      never specify the executable bit.  This is the case even though some
      of these mappings are for OF's code segment.
      
      Therefore, we need to force the execute bit on in every mapping.
      
      This problem can only really trigger on Niagara/sun4v machines and the
      history behind this is a little complicated.
      
      Previous to sun4v, the sun4u TTE entries lacked a hardware execute
      permission bit.  So OF didn't have to ever worry about setting
      anything to handle executable pages.  Any valid TTE loaded into the
      I-TLB would be respected by the chip.
      
      But sun4v Niagara chips have a real hardware enforced executable bit
      in their TTEs.  So it has to be set or else the I-TLB throws an
      instruction access exception with type code 6 (protection violation).
      
      We've been extremely fortunate to not get bitten by this in the past.
      
      The best I can tell is that the OF's mappings for it's executable code
      were mapped using permanent locked mappings on sun4v in the past.
      Therefore, the fact that we didn't have the exec bit set in the OF
      translations we would use did not matter in practice.
      
      Thanks to Greg Onufer for helping me track this down.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4142cba
  16. 06 8月, 2011 1 次提交
  17. 05 8月, 2011 1 次提交
  18. 26 7月, 2011 2 次提交
  19. 15 7月, 2011 1 次提交
    • T
      memblock: Don't allow archs to override memblock_nid_range() · f9b18db3
      Tejun Heo 提交于
      memblock_nid_range() is used to implement memblock_[try_]alloc_nid().
      The generic version determines the range by walking early_node_map
      with for_each_mem_pfn_range().  The generic version is defined __weak
      to allow arch override.
      
      Currently, only sparc overrides it; however, with the previous update
      to the generic implementation, there isn't much to be gained with arch
      override.  Sparc would behave exactly the same with the generic
      implementation.
      
      This patch disallows arch override for memblock_nid_range() and make
      both generic and sparc versions static.
      
      sparc is only compile tested.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Link: http://lkml.kernel.org/r/1310460395-30913-6-git-send-email-tj@kernel.org
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      f9b18db3