1. 20 3月, 2006 11 次提交
    • D
      [SPARC64]: Kill {save,restore}_alternate_globals() · 96c6e0d8
      David S. Miller 提交于
      No longer needed now that we no longer have hard-coded
      alternate global register usage.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      96c6e0d8
    • D
      b70c0fa1
    • D
      [SPARC64]: Dynamically grow TSB in response to RSS growth. · bd40791e
      David S. Miller 提交于
      As the RSS grows, grow the TSB in order to reduce the likelyhood
      of hash collisions and thus poor hit rates in the TSB.
      
      This definitely needs some serious tuning.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd40791e
    • D
      [SPARC64]: Add infrastructure for dynamic TSB sizing. · 98c5584c
      David S. Miller 提交于
      This also cleans up tsb_context_switch().  The assembler
      routine is now __tsb_context_switch() and the former is
      an inline function that picks out the bits from the mm_struct
      and passes it into the assembler code as arguments.
      
      setup_tsb_parms() computes the locked TLB entry to map the
      TSB.  Later when we support using the physical address quad
      load instructions of Cheetah+ and later, we'll simply use
      the physical address for the TSB register value and set
      the map virtual and PTE both to zero.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98c5584c
    • D
      [SPARC64]: TSB refinements. · 09f94287
      David S. Miller 提交于
      Move {init_new,destroy}_context() out of line.
      
      Do not put huge pages into the TSB, only base page size translations.
      There are some clever things we could do here, but for now let's be
      correct instead of fancy.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09f94287
    • 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]: Kill pgtable quicklists and use SLAB. · 3c936465
      David S. Miller 提交于
      Taking a nod from the powerpc port.
      
      With the per-cpu caching of both the page allocator and SLAB, the
      pgtable quicklist scheme becomes relatively silly and primitive.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c936465
    • D
      [SPARC64]: No need to D-cache color page tables any longer. · 05e28f9d
      David S. Miller 提交于
      Unlike the virtual page tables, the new TSB scheme does not
      require this ugly hack.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05e28f9d
    • 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
    • E
      [SPARC]: BUG_ON() Conversion in arch/sparc/kernel/ioport.c · 30d4d1ff
      Eric Sesterhenn 提交于
      this changes if() BUG(); constructs to BUG_ON() which is
      cleaner and can better optimized away
      Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30d4d1ff
    • B
      [SPARC64]: fix sparc_floppy_irq's auxio_register reseting · 94bbc176
      Bernhard R Link 提交于
      The patch "[SPARC64]: Get rid of fast IRQ feature"
      moved the the code from arch/sparc64/kernel/entry.S:
            lduba           [%g7] ASI_PHYS_BYPASS_EC_E, %g5
            or              %g5, AUXIO_AUX1_FTCNT, %g5
            stba            %g5, [%g7] ASI_PHYS_BYPASS_EC_E
            andn            %g5, AUXIO_AUX1_FTCNT, %g5
            stba            %g5, [%g7] ASI_PHYS_BYPASS_EC_E
      to arch/sparc64/kernel/irq.c:
                    val = readb(auxio_register);
                    val |= AUXIO_AUX1_FTCNT;
                    writeb(val, auxio_register);
                    val &= AUXIO_AUX1_FTCNT;
                    writeb(val, auxio_register);
      This looks like it it missing a bitwise not, which is reintroduced
      by this patch.
      
      Due to lack of a floppy device, I could not test it, but it looks
      evident.
      Signed-off-by: NBernhard R Link <brlink@debian.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      94bbc176
  2. 19 3月, 2006 8 次提交
  3. 17 3月, 2006 1 次提交
  4. 16 3月, 2006 14 次提交
  5. 15 3月, 2006 3 次提交
    • R
      [ARM] Fix "thead" typo · 17320a96
      Russell King 提交于
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      17320a96
    • M
      [PATCH] Plug kdump shutdown race window · 67963132
      Maneesh Soni 提交于
      lapic_shutdown() re-enables interrupts which is un-desirable for panic
      case, so use local_irq_save() and local_irq_restore() to keep the irqs
      disabled for kexec on panic case, and close a possible race window while
      kdump shutdown as shown in this stack trace
      
         -- BUG: spinlock lockup on CPU#1, bash/4396, c52781a0
         [<c01c1870>] _raw_spin_lock+0xb7/0xd2
         [<c029e148>] _spin_lock+0x6/0x8
         [<c011b33f>] scheduler_tick+0xe7/0x328
         [<c0128a7c>] update_process_times+0x51/0x5d
         [<c0114592>] smp_apic_timer_interrupt+0x4f/0x58
         [<c01141ff>] lapic_shutdown+0x76/0x7e
         [<c0104d7c>] apic_timer_interrupt+0x1c/0x30
         [<c01141ff>] lapic_shutdown+0x76/0x7e
         [<c0116659>] machine_crash_shutdown+0x83/0xaa
         [<c013cc36>] crash_kexec+0xc1/0xe3
         [<c029e148>] _spin_lock+0x6/0x8
         [<c013cc22>] crash_kexec+0xad/0xe3
         [<c0215280>] __handle_sysrq+0x84/0xfd
         [<c018d937>] write_sysrq_trigger+0x2c/0x35
         [<c015e47b>] vfs_write+0xa2/0x13b
         [<c015ea73>] sys_write+0x3b/0x64
         [<c0103c69>] syscall_call+0x7/0xb
      Signed-off-by: NManeesh Soni <maneesh@in.ibm.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      67963132
    • L
      Revert "[PATCH] x86-64: Fix up handling of non canonical user RIPs" · cbf0ec6e
      Linus Torvalds 提交于
      This reverts commit c33d4568.
      
      Andrew Clayton and Hugh Dickins report that it's broken for them and
      causes strange page table and slab corruption, and spontaneous reboots.
      
      Let's get it right next time.
      
      Cc: Andrew Clayton <andrew@rootshell.co.uk>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cbf0ec6e
  6. 14 3月, 2006 1 次提交
    • P
      powerpc: Disallow lparcfg being a module · 82dfdcae
      Paul Mackerras 提交于
      The lparcfg code needs several things which are pretty arcane internal
      details and which we don't want to export, which means that lparcfg
      doesn't work when built as a module.  This makes it a bool instead of
      a tristate in the Kconfig so that users can't try to build it as a
      module.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      82dfdcae
  7. 13 3月, 2006 2 次提交