1. 29 10月, 2009 1 次提交
  2. 05 12月, 2008 3 次提交
    • S
      sparc,sparc64: unify kernel/ · a88b5ba8
      Sam Ravnborg 提交于
      o Move all files from sparc64/kernel/ to sparc/kernel
        - rename as appropriate
      o Update sparc/Makefile to the changes
      o Update sparc/kernel/Makefile to include the sparc64 files
      
      NOTE: This commit changes link order on sparc64!
      
      Link order had to change for either of sparc32 and sparc64.
      And assuming sparc64 see more testing than sparc32 change link
      order on sparc64 where issues will be caught faster.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a88b5ba8
    • D
      sparc64: Make special trap return path for TRAP_NMI(). · 5565736e
      David S. Miller 提交于
      We don't want the rtrap path to try and run softirqs or
      anything like that when returning from a PIL==15 NMI.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5565736e
    • D
      sparc64: Run the kernel always in the TSO memory model. · 64f2dde3
      David S. Miller 提交于
      The fact of the matter is, all UltraSPARC-III and later chips only
      implement TSO.  They don't implement PSO and RMO memory models at all.
      
      Only the Ultra-I and Ultra-II family chips implement RMO and they are
      only helped marginally by using this setting when executing kernel
      code.
      
      The big plus to doing this is that we can eliminate all of the non-Sync
      memory barriers in the kernel except for the ones used in the optimized
      memcpy/memset code (these use block load and store operations which
      have their own memory ordering rules).
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64f2dde3
  3. 28 7月, 2008 1 次提交
  4. 22 5月, 2008 1 次提交
  5. 20 5月, 2008 1 次提交
  6. 13 5月, 2008 1 次提交
  7. 11 5月, 2008 1 次提交
    • D
      sparc: Fix debugger syscall restart interactions. · 28e61036
      David S. Miller 提交于
      So, forever, we've had this ptrace_signal_deliver implementation
      which tries to handle all of the nasties that can occur when the
      debugger looks at a process about to take a signal.  It's meant
      to address all of these issues inside of the kernel so that the
      debugger need not be mindful of such things.
      
      Problem is, this doesn't work.
      
      The idea was that we should do the syscall restart business first, so
      that the debugger captures that state.  Otherwise, if the debugger for
      example saves the child's state, makes the child execute something
      else, then restores the saved state, we won't handle the syscall
      restart properly because we lose the "we're in a syscall" state.
      
      The code here worked for most cases, but if the debugger actually
      passes the signal through to the child unaltered, it's possible that
      we would do a syscall restart when we shouldn't have.
      
      In particular this breaks the case of debugging a process under a gdb
      which is being debugged by yet another gdb.  gdb uses sigsuspend
      to wait for SIGCHLD of the inferior, but if gdb itself is being
      debugged by a top-level gdb we get a ptrace_stop().  The top-level gdb
      does a PTRACE_CONT with SIGCHLD to let the inferior gdb see the
      signal.  But ptrace_signal_deliver() assumed the debugger would cancel
      out the signal and therefore did a syscall restart, because the return
      error was ERESTARTNOHAND.
      
      Fix this by simply making ptrace_signal_deliver() a nop, and providing
      a way for the debugger to control system call restarting properly:
      
      1) Report a "in syscall" software bit in regs->{tstate,psr}.
         It is set early on in trap entry to a system call and is fully
         visible to the debugger via ptrace() and regsets.
      
      2) Test this bit right before doing a syscall restart.  We have
         to do a final recheck right after get_signal_to_deliver() in
         case the debugger cleared the bit during ptrace_stop().
      
      3) Clear the bit in trap return so we don't accidently try to set
         that bit in the real register.
      
      As a result we also get a ptrace_{is,clear}_syscall() for sparc32 just
      like sparc64 has.
      
      M68K has this same exact bug, and is now the only other user of the
      ptrace_signal_deliver hook.  It needs to be fixed in the same exact
      way as sparc.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28e61036
  8. 24 4月, 2008 1 次提交
  9. 10 12月, 2006 1 次提交
  10. 01 7月, 2006 1 次提交
  11. 20 3月, 2006 12 次提交
    • D
      [SPARC64]: Drop %gl to 0 before re-enabling PSTATE_IE in rtrap · fc504928
      David S. Miller 提交于
      If we take a window fault, on SUN4V set %gl to zero before we
      turn PSTATE_IE back on in %pstate.  Otherwise if we take an
      interrupt we'll end up with corrupt register state.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc504928
    • D
      [SPARC64]: Fix return from trap on SUN4V. · af02bec6
      David S. Miller 提交于
      We need to set the global register set _AND_ disable
      PSTATE_IE in %pstate.  The original patch sequence was
      leaving PSTATE_IE enabled when returning to kernel mode,
      oops.
      
      This fixes the random register corruption being seen
      on SUN4V.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af02bec6
    • D
      [SPARC64]: Patch up mmu context register writes for sun4v. · 8b11bd12
      David S. Miller 提交于
      sun4v uses ASI_MMU instead of ASI_DMMU
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b11bd12
    • D
    • D
      [SPARC64]: Kill all %pstate changes in context switch code. · 314981ac
      David S. Miller 提交于
      They are totally unnecessary because:
      
      1) Interrupts are already disabled when switch_to()
         runs.
      
      2) We don't use hard-coded alternate globals any longer.
      
      This found a case in rtrap, which still assumed alternate
      global %g6 was current_thread_info(), and that is fixed
      by this changeset as well.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      314981ac
    • D
      [SPARC64]: Add initial code to twiddle %gl on trap entry/exit. · 936f482a
      David S. Miller 提交于
      Instead of setting/clearing PSTATE_AG we have to change
      the %gl register value on sun4v.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      936f482a
    • D
      [SPARC64]: Refine register window trap handling. · 314ef685
      David S. Miller 提交于
      When saving and restoing trap state, do the window spill/fill
      handling inline so that we never trap deeper than 2 trap levels.
      This is important for chips like Niagara.
      
      The window fixup code is massively simplified, and many more
      improvements are now possible.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      314ef685
    • D
      [SPARC64]: Add explicit register args to trap state loading macros. · ffe483d5
      David S. Miller 提交于
      This, as well as making the code cleaner, allows a simplification in
      the TSB miss handling path.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ffe483d5
    • D
      [SPARC64]: Fix race in LOAD_PER_CPU_BASE() · 86b81868
      David S. Miller 提交于
      Since we use %g5 itself as a temporary, it can get clobbered
      if we take an interrupt mid-stream and thus cause end up with
      the final %g5 value too early as a result of rtrap processing.
      
      Set %g5 at the very end, atomically, to avoid this problem.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86b81868
    • D
      [SPARC64]: Fix bogus flush instruction usage. · 4da808c3
      David S. Miller 提交于
      Some of the trap code was still assuming that alternate
      global %g6 was hard coded with current_thread_info().
      Let's just consistently flush at KERNBASE when we need
      a pipeline synchronization.  That's locked into the TLB
      and will always work.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4da808c3
    • D
      [SPARC64]: Elminate all usage of hard-coded trap globals. · 56fb4df6
      David S. Miller 提交于
      UltraSPARC has special sets of global registers which are switched to
      for certain trap types.  There is one set for MMU related traps, one
      set of Interrupt Vector processing, and another set (called the
      Alternate globals) for all other trap types.
      
      For what seems like forever we've hard coded the values in some of
      these trap registers.  Some examples include:
      
      1) Interrupt Vector global %g6 holds current processors interrupt
         work struct where received interrupts are managed for IRQ handler
         dispatch.
      
      2) MMU global %g7 holds the base of the page tables of the currently
         active address space.
      
      3) Alternate global %g6 held the current_thread_info() value.
      
      Such hardcoding has resulted in some serious issues in many areas.
      There are some code sequences where having another register available
      would help clean up the implementation.  Taking traps such as
      cross-calls from the OBP firmware requires some trick code sequences
      wherein we have to save away and restore all of the special sets of
      global registers when we enter/exit OBP.
      
      We were also using the IMMU TSB register on SMP to hold the per-cpu
      area base address, which doesn't work any longer now that we actually
      use the TSB facility of the cpu.
      
      The implementation is pretty straight forward.  One tricky bit is
      getting the current processor ID as that is different on different cpu
      variants.  We use a stub with a fancy calling convention which we
      patch at boot time.  The calling convention is that the stub is
      branched to and the (PC - 4) to return to is in register %g1.  The cpu
      number is left in %g6.  This stub can be invoked by using the
      __GET_CPUID macro.
      
      We use an array of per-cpu trap state to store the current thread and
      physical address of the current address space's page tables.  The
      TRAP_LOAD_THREAD_REG loads %g6 with the current thread from this
      table, it uses __GET_CPUID and also clobbers %g1.
      
      TRAP_LOAD_IRQ_WORK is used by the interrupt vector processing to load
      the current processor's IRQ software state into %g6.  It also uses
      __GET_CPUID and clobbers %g1.
      
      Finally, TRAP_LOAD_PGD_PHYS loads the physical address base of the
      current address space's page tables into %g7, it clobbers %g1 and uses
      __GET_CPUID.
      
      Many refinements are possible, as well as some tuning, with this stuff
      in place.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56fb4df6
    • D
      [SPARC64]: Move away from virtual page tables, part 1. · 74bf4312
      David S. Miller 提交于
      We now use the TSB hardware assist features of the UltraSPARC
      MMUs.
      
      SMP is currently knowingly broken, we need to find another place
      to store the per-cpu base pointers.  We hid them away in the TSB
      base register, and that obviously will not work any more :-)
      
      Another known broken case is non-8KB base page size.
      
      Also noticed that flush_tlb_all() is not referenced anywhere, only
      the internal __flush_tlb_all() (local cpu only) is used by the
      sparc64 port, so we can get rid of flush_tlb_all().
      
      The kernel gets it's own 8KB TSB (swapper_tsb) and each address space
      gets it's own private 8K TSB.  Later we can add code to dynamically
      increase the size of per-process TSB as the RSS grows.  An 8KB TSB is
      good enough for up to about a 4MB RSS, after which the TSB starts to
      incur many capacity and conflict misses.
      
      We even accumulate OBP translations into the kernel TSB.
      
      Another area for refinement is large page size support.  We could use
      a secondary address space TSB to handle those.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74bf4312
  12. 19 1月, 2006 1 次提交
  13. 08 10月, 2005 1 次提交
  14. 05 10月, 2005 1 次提交
  15. 30 8月, 2005 1 次提交
  16. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4