1. 09 5月, 2007 1 次提交
    • B
      [POWERPC] Introduce address space "slices" · d0f13e3c
      Benjamin Herrenschmidt 提交于
      The basic issue is to be able to do what hugetlbfs does but with
      different page sizes for some other special filesystems; more
      specifically, my need is:
      
       - Huge pages
      
       - SPE local store mappings using 64K pages on a 4K base page size
      kernel on Cell
      
       - Some special 4K segments in 64K-page kernels for mapping a dodgy
      type of powerpc-specific infiniband hardware that requires 4K MMU
      mappings for various reasons I won't explain here.
      
      The main issues are:
      
       - To maintain/keep track of the page size per "segment" (as we can
      only have one page size per segment on powerpc, which are 256MB
      divisions of the address space).
      
       - To make sure special mappings stay within their allotted
      "segments" (including MAP_FIXED crap)
      
       - To make sure everybody else doesn't mmap/brk/grow_stack into a
      "segment" that is used for a special mapping
      
      Some of the necessary mechanisms to handle that were present in the
      hugetlbfs code, but mostly in ways not suitable for anything else.
      
      The patch relies on some changes to the generic get_unmapped_area()
      that just got merged.  It still hijacks hugetlb callbacks here or
      there as the generic code hasn't been entirely cleaned up yet but
      that shouldn't be a problem.
      
      So what is a slice ?  Well, I re-used the mechanism used formerly by our
      hugetlbfs implementation which divides the address space in
      "meta-segments" which I called "slices".  The division is done using
      256MB slices below 4G, and 1T slices above.  Thus the address space is
      divided currently into 16 "low" slices and 16 "high" slices.  (Special
      case: high slice 0 is the area between 4G and 1T).
      
      Doing so simplifies significantly the tracking of segments and avoids
      having to keep track of all the 256MB segments in the address space.
      
      While I used the "concepts" of hugetlbfs, I mostly re-implemented
      everything in a more generic way and "ported" hugetlbfs to it.
      
      Slices can have an associated page size, which is encoded in the mmu
      context and used by the SLB miss handler to set the segment sizes.  The
      hash code currently doesn't care, it has a specific check for hugepages,
      though I might add a mechanism to provide per-slice hash mapping
      functions in the future.
      
      The slice code provide a pair of "generic" get_unmapped_area() (bottomup
      and topdown) functions that should work with any slice size.  There is
      some trickiness here so I would appreciate people to have a look at the
      implementation of these and let me know if I got something wrong.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d0f13e3c
  2. 04 12月, 2006 1 次提交
    • A
      [POWERPC] ps3: multiplatform build fixes · e22ba7e3
      Arnd Bergmann 提交于
      A few code paths need to check whether or not they are running
      on the PS3's LV1 hypervisor before making hcalls. This introduces
      a new firmware feature bit for this, FW_FEATURE_PS3_LV1.
      
      Now when both PS3 and IBM_CELL_BLADE are enabled, but not PSERIES,
      FW_FEATURE_PS3_LV1 and FW_FEATURE_LPAR get enabled at compile time,
      which is a bug. The same problem can also happen for (PPC_ISERIES &&
      !PPC_PSERIES && PPC_SOMETHING_ELSE). In order to solve this, I
      introduce a new CONFIG_PPC_NATIVE option that is set when at least
      one platform is selected that can run without a hypervisor and then
      turns the firmware feature check into a run-time option.
      
      The new cell oprofile support that was recently merged does not
      work on hypervisor based platforms like the PS3, therefore make
      it depend on PPC_CELL_NATIVE instead of PPC_CELL. This may change
      if we get oprofile support for PS3.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      e22ba7e3
  3. 20 10月, 2005 1 次提交
  4. 12 10月, 2005 1 次提交
    • S
      powerpc: make iSeries boot again · 3a5f8c5f
      Stephen Rothwell 提交于
      On ARCH=ppc64 we were getting htab_hash_mask recalculated
      to the correct value for our particular machine by accident.
      In the merge tree, that code was commented out, so htab_hash_mask
      was being corrupted.
      
      We now set ppc64_pft_size instead which gets htab_has_mask
      calculated correctly for us later.  We should put an
      ibm,pft-size property in the device tree at some point.
      
      Also set -mno-minimal-toc in some makefiles.
      Allow iSeries to configure PROC_DEVICETREE.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      3a5f8c5f
  5. 10 10月, 2005 2 次提交
  6. 06 10月, 2005 1 次提交
    • P
      powerpc: Merge lmb.c and make MM initialization use it. · 7c8c6b97
      Paul Mackerras 提交于
      This also creates merged versions of do_init_bootmem, paging_init
      and mem_init and moves them to arch/powerpc/mm/mem.c.  It gets rid
      of the mem_pieces stuff.
      
      I made memory_limit a parameter to lmb_enforce_memory_limit rather
      than a global referenced by that function.  This will require some
      small changes to ppc64 if we want to continue building ARCH=ppc64
      using the merged lmb.c.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7c8c6b97
  7. 26 9月, 2005 1 次提交
    • P
      powerpc: Merge enough to start building in arch/powerpc. · 14cf11af
      Paul Mackerras 提交于
      This creates the directory structure under arch/powerpc and a bunch
      of Kconfig files.  It does a first-cut merge of arch/powerpc/mm,
      arch/powerpc/lib and arch/powerpc/platforms/powermac.  This is enough
      to build a 32-bit powermac kernel with ARCH=powerpc.
      
      For now we are getting some unmerged files from arch/ppc/kernel and
      arch/ppc/syslib, or arch/ppc64/kernel.  This makes some minor changes
      to files in those directories and files outside arch/powerpc.
      
      The boot directory is still not merged.  That's going to be interesting.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      14cf11af