1. 14 8月, 2013 5 次提交
    • C
      tile: support CONFIG_PREEMPT · bc1a298f
      Chris Metcalf 提交于
      This change adds support for CONFIG_PREEMPT (full kernel preemption).
      In addition to the core support, this change includes a number
      of places where we fix up uses of smp_processor_id() and per-cpu
      variables.  I also eliminate the PAGE_HOME_HERE and PAGE_HOME_UNKNOWN
      values for page homing, as it turns out they weren't being used.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      bc1a298f
    • C
      tile: remove calls to arch_flush_lazy_mmu_mode() · 1182b69c
      Chris Metcalf 提交于
      Since it's a no-op on tile anyway, there's no reason to be calling
      it in tile-specific code.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      1182b69c
    • C
      tile: fix some issues in hugepage support · a0bd12d7
      Chris Metcalf 提交于
      First, in huge_pte_offset(), we were erroneously checking
      pgd_present(), which is always true, rather than pud_present(),
      which is the thing that tells us if there is a top-level (L0) PTE.
      Fixing this means we properly look up huge page entries only when
      the Present bit is actually set in the PTE.
      
      Second, use the standard pte_alloc_map() instead of the hand-rolled
      pte_alloc_hugetlb() routine that basically was written to avoid
      worrying about CONFIG_HIGHPTE.  However, we no longer plan to support
      HIGHPTE, so a separate routine was just unnecessary code duplication.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      a0bd12d7
    • C
      tile: avoid recursive backtrace faults · 3ef23111
      Chris Metcalf 提交于
      This change adds support for avoiding recursive backtracer crashes;
      we haven't seen this in practice other than when things are seriously
      corrupt, but it may help avoid losing the root cause of a crash.
      
      Also, don't abort kernel backtracers for invalid userspace PC's.
      If we do, we lose the ability to backtrace through a userspace
      call to a bad address above PAGE_OFFSET, even though that it can
      be perfectly reasonable to continue the backtrace in such a case.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      3ef23111
    • C
      tile: fast-path unaligned memory access for tilegx · 2f9ac29e
      Chris Metcalf 提交于
      This change enables unaligned userspace memory access via a kernel
      fast path on tilegx.  The kernel tracks user PC/instruction pairs
      per-thread using a direct-mapped cache in userspace.  The cache
      maps those PC/instruction pairs to JIT'ed instruction sequences that
      load or store using byte-wide load store intructions and then
      synthesize 2-, 4- or 8-byte load or store results.  Once an
      instruction has been seen to generate an unaligned access once,
      subsequent hits on that instruction typically require overhead
      of only around 50 cycles if cache and TLB is hot.
      
      We support the prctl() PR_GET_UNALIGN / PR_SET_UNALIGN sys call to
      enable or disable unaligned fixups on a per-process basis.
      
      To do this we pull some of the tilepro unaligned support out of the
      single_step.c file; tilepro uses instruction disassembly for both
      single-step and unaligned access support.  Since tilegx actually has
      hardware singlestep support, though, it's cleaner to keep the tilegx
      unaligned access code in a separate file.  While we're at it,
      properly rename the tilepro-specific types, etc., to have tilepro
      suffixes instead of generic tile suffixes.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      2f9ac29e
  2. 13 8月, 2013 5 次提交
    • C
      tile: remove unnecessary backslashes in asm-offsets.c · f10da547
      Chris Metcalf 提交于
      Pointed out by checkpatch.  A few of the DEFINE() lines were
      properly written without backslash continuation; fix the rest.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      f10da547
    • C
      tile: fix tilegx vmalloc_sync_all BUG_ON · e5f7bd43
      Chris Metcalf 提交于
      As specified, the test wasn't correct, and in any case it should
      be a BUILD_BUG_ON.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      e5f7bd43
    • C
      b63ea712
    • C
      tile: support "memmap" boot parameter · 77f8c740
      Chris Metcalf 提交于
      This change adds support for the "memmap" boot parameter similar
      to what x86 provides.  The tile version supports "memmap=1G$5G",
      for example, as a way to reserve a 1 GB range starting at PA 5GB.
      The memory is reserved via bootmem during startup, and we create a
      suitable "struct resource" marked as "Reserved" so you can see the
      range reported by /proc/iomem.  Up to 64 such regions can currently
      be reserved on the boot command line.
      
      We do not support the x86 options "memmap=nn@ss" (force some memory
      to be available at the given address) since it's pointless to try to
      have Linux use memory the Tilera hypervisor hasn't given it.  We do
      not support "memmap=nn#ss" to add an ACPI range for later processing,
      since we don't support ACPI.  We do not support "memmap=exactmap"
      since we don't support reading the e820 information from the BIOS
      like x86 does.  I did add support for "memmap=nn" (and the synonym
      "mem=nn") which cap the highest PA value at "nn"; these are both
      just a synonym for the existing tile boot option "maxmem".
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      77f8c740
    • C
      tile: various console improvements · bda0f5ba
      Chris Metcalf 提交于
      This change improves and cleans up the tile console.
      
      - We enable HVC_IRQ support on tilegx, with the addition of a new
        Tilera hypervisor API for tilegx to allow a console IPI.  If IPI
        support is not available we fall back to the previous polling mode.
      
      - We simplify the earlyprintk code to use CON_BOOT and eliminate some
        of the other supporting earlyprintk code.
      
      - A new tile_console_write() primitive is used to send output to
        the console and is factored out of the hvc_tile driver.
        This lets us support a "sim_console" boot argument to allow using
        simulator hooks to send output to the "console" as a slightly
        faster alternative to emulating the hardware more directly.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bda0f5ba
  3. 07 8月, 2013 15 次提交
  4. 06 8月, 2013 5 次提交
  5. 02 8月, 2013 2 次提交
  6. 31 7月, 2013 2 次提交
  7. 18 7月, 2013 1 次提交
  8. 11 7月, 2013 1 次提交
  9. 10 7月, 2013 1 次提交
    • J
      mm: invoke oom-killer from remaining unconverted page fault handlers · 609838cf
      Johannes Weiner 提交于
      A few remaining architectures directly kill the page faulting task in an
      out of memory situation.  This is usually not a good idea since that
      task might not even use a significant amount of memory and so may not be
      the optimal victim to resolve the situation.
      
      Since 2.6.29's 1c0fe6e3 ("mm: invoke oom-killer from page fault") there
      is a hook that architecture page fault handlers are supposed to call to
      invoke the OOM killer and let it pick the right task to kill.  Convert
      the remaining architectures over to this hook.
      
      To have the previous behavior of simply taking out the faulting task the
      vm.oom_kill_allocating_task sysctl can be set to 1.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Reviewed-by: NMichal Hocko <mhocko@suse.cz>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Acked-by: Vineet Gupta <vgupta@synopsys.com>   [arch/arc bits]
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Cc: Lennox Wu <lennox.wu@gmail.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      609838cf
  10. 05 7月, 2013 1 次提交
  11. 04 7月, 2013 2 次提交