1. 16 6月, 2009 1 次提交
  2. 15 4月, 2009 1 次提交
  3. 27 3月, 2009 1 次提交
    • D
      sparc64: Fix MM refcount check in smp_flush_tlb_pending(). · f9384d41
      David S. Miller 提交于
      As explained by Benjamin Herrenschmidt:
      
      > CPU 0 is running the context, task->mm == task->active_mm == your
      > context. The CPU is in userspace happily churning things.
      >
      > CPU 1 used to run it, not anymore, it's now running fancyfsd which
      > is a kernel thread, but current->active_mm still points to that
      > same context.
      >
      > Because there's only one "real" user, mm_users is 1 (but mm_count is
      > elevated, it's just that the presence on CPU 1 as active_mm has no
      > effect on mm_count().
      >
      > At this point, fancyfsd decides to invalidate a mapping currently mapped
      > by that context, for example because a networked file has changed
      > remotely or something like that, using unmap_mapping_ranges().
      >
      > So CPU 1 goes into the zapping code, which eventually ends up calling
      > flush_tlb_pending(). Your test will succeed, as current->active_mm is
      > indeed the target mm for the flush, and mm_users is indeed 1. So you
      > will -not- send an IPI to the other CPU, and CPU 0 will continue happily
      > accessing the pages that should have been unmapped.
      
      To fix this problem, check ->mm instead of ->active_mm, and this
      means:
      
      > So if you test current->mm, you effectively account for mm_users == 1,
      > so the only way the mm can be active on another processor is as a lazy
      > mm for a kernel thread. So your test should work properly as long
      > as you don't have a HW that will do speculative TLB reloads into the
      > TLB on that other CPU (and even if you do, you flush-on-switch-in should
      > get rid of any crap here).
      
      And therefore we should be OK.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9384d41
  4. 16 3月, 2009 3 次提交
  5. 07 1月, 2009 1 次提交
    • S
      sparc64: Use unsigned long long for u64. · 90181136
      Sam Ravnborg 提交于
      Andrew Morton wrote:
      
          People keep on doing
      
                  printk("%llu", some_u64);
      
          testing it only on x86_64 and this generates a warning storm on
          powerpc, sparc64, etc.  Because they use `long', not `long long'.
      
          Quite a few 64-bit architectures are using `long' for their
          s64/u64 types.  We should convert them all to `long long'.
      
      Update types.h so we use unsigned long long for u64 and
      fix all warnings in sparc64 code.
      Tested with an allnoconfig, defconfig and allmodconfig builds.
      
      This patch introduces additional warnings in several drivers.
      These will be dealt with in separate patches.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90181136
  6. 08 12月, 2008 1 次提交
  7. 05 12月, 2008 3 次提交
  8. 01 12月, 2008 1 次提交
  9. 13 10月, 2008 1 次提交
  10. 03 9月, 2008 2 次提交
  11. 10 8月, 2008 1 次提交
  12. 05 8月, 2008 11 次提交
  13. 31 7月, 2008 1 次提交
  14. 18 7月, 2008 1 次提交
  15. 26 6月, 2008 2 次提交
  16. 20 5月, 2008 1 次提交
    • D
      sparc64: Add global register dumping facility. · 93dae5b7
      David S. Miller 提交于
      When a cpu really is stuck in the kernel, it can be often
      impossible to figure out which cpu is stuck where.  The
      worst case is when the stuck cpu has interrupts disabled.
      
      Therefore, implement a global cpu state capture that uses
      SMP message interrupts which are not disabled by the
      normal IRQ enable/disable APIs of the kernel.
      
      As long as we can get a sysrq 'y' to the kernel, we can
      get a dump.  Even if the console interrupt cpu is wedged,
      we can trigger it from userspace using /proc/sysrq-trigger
      
      The output is made compact so that this facility is more
      useful on high cpu count systems, which is where this
      facility will likely find itself the most useful :)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93dae5b7
  17. 04 5月, 2008 1 次提交
  18. 29 4月, 2008 2 次提交
  19. 25 4月, 2008 1 次提交
  20. 24 4月, 2008 1 次提交
  21. 26 3月, 2008 1 次提交
  22. 22 3月, 2008 1 次提交
    • D
      [SPARC64]: Remove most limitations to kernel image size. · 64658743
      David S. Miller 提交于
      Currently kernel images are limited to 8MB in size, and this causes
      problems especially when enabling features that take up a lot of
      kernel image space such as lockdep.
      
      The code now will align the kernel image size up to 4MB and map that
      many locked TLB entries.  So, the only practical limitation is the
      number of available locked TLB entries which is 16 on Cheetah and 64
      on pre-Cheetah sparc64 cpus.  Niagara cpus don't actually have hw
      locked TLB entry support.  Rather, the hypervisor transparently
      provides support for "locked" TLB entries since it runs with physical
      addressing and does the initial TLB miss processing.
      
      Fully utilizing this change requires some help from SILO, a patch for
      which will be submitted to the maintainer.  Essentially, SILO will
      only currently map up to 8MB for the kernel image and that needs to be
      increased.
      
      Note that neither this patch nor the SILO bits will help with network
      booting.  The openfirmware code will only map up to a certain amount
      of kernel image during a network boot and there isn't much we can to
      about that other than to implemented a layered network booting
      facility.  Solaris has this, and calls it "wanboot" and we may
      implement something similar at some point.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64658743
  23. 21 2月, 2008 1 次提交