1. 18 4月, 2008 4 次提交
  2. 17 4月, 2008 9 次提交
    • K
      [POWERPC] Make Book-E debug handling SMP safe · 4eaddb4d
      Kumar Gala 提交于
      global_dbcr0 needs to be a per cpu set of save areas instead of a single
      global on all processors.
      
      Also, we switch to using DBCR0_IDM to determine if the user space app is
      being debugged as its a more consistent way.  In the future we should
      support features like hardware breakpoint and watchpoints which will
      have DBCR0_IDM set but not necessarily DBCR0_IC (single step).
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      4eaddb4d
    • K
      [POWERPC] Rework Book-E debug exception handling · eb0cd5fd
      Kumar Gala 提交于
      The architecture allows for "Book-E" style debug interrupts to either go
      to critial interrupts of their own debug interrupt level.  To allow for
      a dynamic kernel to support machines of either type we want to be able to
      compile in the interrupt handling code for both exception levels.
      
      Towards this goal we renamed the debug handling macros to specify the
      interrupt level in their name (DEBUG_CRIT_EXCEPTION/DebugCrit and
      DEBUG_DEBUG_EXCEPTION/DebugDebug).
      
      Additionally, on the Freescale Book-e parts we expanded the exception
      stacks to cover the maximum case of needing three exception stacks (normal,
      machine check and debug).
      
      There is some kernel text space optimization to be gained if a kernel is
      configured for a specific Freescale implementation but we aren't handling
      that now to allow for the single kernel image support.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      eb0cd5fd
    • M
      [POWERPC] pseries/phyp dump: Reserve a variable amount of space at boot · 37ddd5d0
      Manish Ahuja 提交于
      This changes the way we calculate how much space to reserve for the
      pHyp dump.  Currently we reserve 256MB only.  With this change, the
      code first checks to see if an amount has been specified on the boot
      command line with the "phyp_dump_reserve_size" option, and if so, uses
      that much.
      
      Otherwise it computes 5% of total ram and rounds it down to a multiple
      of 256MB, and uses the larger of that or 256MB.
      
      This is for large systems with a lot of memory (10GB or more).  The
      aim is to have more space available for the kernel on reboot on
      machines with more resources.  Although the dump will be collected
      pretty fast and the memory released really early on allowing the
      machine to have the full memory available, this alleviates any issues
      that can be caused by having way too little memory on very very large
      systems during those few minutes.
      Signed-off-by: NManish Ahuja <mahuja@us.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      37ddd5d0
    • K
      [POWERPC] Update linker script to properly set physical addresses · 366234f6
      Kumar Gala 提交于
      We can set LOAD_OFFSET and use the AT attribute on sections and the
      linker will properly set the physical address of the LOAD program
      header for us.
      
      This allows us to know how the PHYSICAL_START the user configured a
      kernel with by just looking at the resulting vmlinux ELF.
      
      This is pretty much stolen from how x86 does things in their linker
      scripts.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      366234f6
    • K
      [POWERPC] Clean up some linker and symbol usage · 4846c5de
      Kumar Gala 提交于
      * PAGE_OFFSET is not always the start of code, use _stext instead.
      * grab PAGE_SIZE and KERNELBASE from asm/page.h like ppc64 does.  Makes the
        code a bit more common and provide a single place to manipulate the
        defines for things like kdump.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4846c5de
    • K
      [POWERPC] 85xx: Cleanup TLB initialization · 0aef996b
      Kumar Gala 提交于
      * Determine the RPN we are running the kernel at runtime rather
        than using compile time constant for initial TLB
      
      * Cleanup adjust_total_lowmem() to respect memstart_addr and
        be a bit more clear on variables that are sizes vs addresses.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0aef996b
    • D
      [POWERPC] Efika: Really, don't pretend to be CHRP · 7f4392cd
      David Woodhouse 提交于
      Fedora 9 works on Efika without the separate 'device-tree supplement',
      thanks to the kernel's own fixups. With one exception -- because 'CHRP'
      still appears on the 'machine:' line in /proc/cpuinfo, the installer
      misdetects the platform and misconfigures yaboot, putting it into a PReP
      boot partition instead of in the /boot filesystem where the Efika's
      firmware could find it.
      
      The kernel's fixups for Efika already correct one instance of 'chrp', in
      the 'device_type' property. This fixes it in the 'CODEGEN,description'
      property too, since that's what's exposed to userspace in /proc/cpuinfo.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7f4392cd
    • B
      [POWERPC] Fixup softirq preempt count · e6768a4f
      Benjamin Herrenschmidt 提交于
      This fixes the handling of the preempt count when switching
      interrupt stacks so that HW interrupt properly get the softirq
      mask copied over from the previous stack.
      
      It also initializes the softirq stack preempt_count to 0 instead
      of SOFTIRQ_OFFSET, like x86, as __do_softirq() does the increment,
      and we hit some lockdep checks if we have it twice.
      
      That means we do run for a little while off the softirq stack
      with the preempt-count set to 0, which could be deadly if we
      try to take a softirq at that point, however we do so with
      interrupts disabled, so I think we are ok.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e6768a4f
    • B
      [POWERPC] Initialize paca->current earlier · 7c6352a4
      Benjamin Herrenschmidt 提交于
      Currently, we initialize the "current" pointer in the PACA (which
      is used by the "current" macro in the kernel) before calling
      setup_system(). That means that early_setup() is called with
      current still "NULL" which is -not- a good idea. It happens to
      work so far but breaks with lockdep when early code calls printk.
      
      This changes it so that all PACAs are statically initialized with
      __current pointing to the init task. For non-0 CPUs, this is fixed
      up before use.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7c6352a4
  3. 15 4月, 2008 2 次提交
  4. 14 4月, 2008 1 次提交
    • P
      [POWERPC] Fix handling of unrecoverable SLB miss interrupts · 320787c7
      Paul Mackerras 提交于
      If an SLB miss interrupt happens while the RI bit of MSR is zero, we
      can't just return, because RI being zero indicates that SRR0/SRR1
      potentially had live values in them, and the process of taking an
      interrupt overwrites them.
      
      This should never happen, but if it does, we try to print a nice oops
      message.  That doesn't work, however, because the code at unrecov_slb
      assumes that the MMU has been turned on, but we call it with the MMU
      off (and have done so since the SLB miss handler was rewritten to run
      without turning the MMU on) -- except on iSeries, where everything runs
      with the MMU on.
      
      This fixes it by adding the necessary code to turn the MMU on if
      necessary.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      320787c7
  5. 07 4月, 2008 3 次提交
  6. 03 4月, 2008 2 次提交
    • M
      [POWERPC] Fix rtas_flash procfs interface · 74848398
      Maxim Shchetynin 提交于
      Handling of the proc_dir_entry->count was changed in 2.6.24-rc5.
      After this change, the default value for pde->count is 1 and not 0 as
      before.  Therefore, if we want to check whether our procfs file is
      already opened (already in use), we have to check if pde->count is
      greater than 2 rather than 1.
      Signed-off-by: NMaxim Shchetynin <maxim@de.ibm.com>
      Signed-off-by: NJens Osterkamp <jens@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      74848398
    • B
      [POWERPC] Fix iSeries hard irq enabling regression · ff3da2e0
      Benjamin Herrenschmidt 提交于
      A subtle bug sneaked into iSeries recently.  On this platform, we must
      not normally clear MSR:EE (the hardware external interrupt enable)
      except for short periods of time.  Taking an interrupt while
      soft-disabled doesn't cause us to clear it for example.
      
      The iSeries kernel expects to mostly run with MSR:EE enabled at all
      times except in a few exception entry/exit code paths.  Thus
      local_irq_enable() doesn't check if it needs to hard-enable as it
      expects this to be unnecessary on iSeries.
      
      However, hard_irq_disable() _does_ cause MSR:EE to be cleared,
      including on iSeries.  A call to it was recently added to the
      context switch code, thus causing interrupts to become disabled
      for a long periods of time, causing the iSeries watchdog to kick
      in under some circumstances and other nasty things.
      
      This patch fixes it by making local_irq_enable() properly re-enable
      MSR:EE on iSeries.  It basically removes a return statement here
      to make iSeries use the same code path as everybody else.  That does
      mean that we might occasionally get spurious decrementer interrupts
      but I don't think that matters.
      
      Another option would have been to make hard_irq_disable() a nop
      on iSeries but I didn't like it much, in case we have good reasons
      to hard-disable.
      
      Part of the patch is fixes to make sure the hard_enabled PACA field
      is properly set on iSeries as it used not to be before, since it
      was mostly unused.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ff3da2e0
  7. 01 4月, 2008 3 次提交
  8. 28 3月, 2008 1 次提交
    • M
      [POWERPC] Fix missed hardware breakpoints across multiple threads · a2ceff5e
      Michael Ellerman 提交于
      There is a bug in the powerpc DABR (data access breakpoint) handling,
      which can result in us missing breakpoints if several threads are trying
      to break on the same address.
      
      The circumstances are that do_page_fault() calls do_dabr(), this clears
      the DABR (sets it to 0) and sets up the signal which will report to
      userspace that the DABR was hit. The do_signal() code will restore the DABR
      value on the way out to userspace.
      
      If we reschedule before calling do_signal(), __switch_to() will check the
      cached DABR value and compare it to the new thread's value, if they match
      we don't set the DABR in hardware.
      
      So if two threads have the same DABR value, and we schedule from one to
      the other after taking the interrupt for the first thread hitting the DABR,
      the second thread will run without the DABR set in hardware.
      
      The cleanest fix is to move the cache update into set_dabr(), that way we
      can't forget to do it.
      Reported-by: NJan Kratochvil <jan.kratochvil@redhat.com>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a2ceff5e
  9. 26 3月, 2008 7 次提交
  10. 20 3月, 2008 2 次提交
  11. 13 3月, 2008 3 次提交
    • T
      [POWERPC] Export empty_zero_page · 07dc42f6
      Theodore Ts'o 提交于
      Once again, this time with feeling....
      
      						- Ted
      
      >From c91cfaabc17f8a53807a2f31f067a732e34a1550 Mon Sep 17 00:00:00 2001
      From: Theodore Ts'o <tytso@mit.edu>
      Date: Wed, 12 Mar 2008 11:50:39 -0400
      Subject: Export empty_zero_page
      
      The empty_zero_page symbol is exported by most other architectures
      (s390, ia64, x86, um), and an upcoming ext4 patch needs it because
      ZERO_PAGE() references empty_zero_page, and we need it to zero out an
      unitialized extents in ext4 files.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      07dc42f6
    • B
      [POWERPC] Fix bogus test for unassigned PCI resources · 7f172890
      Benjamin Herrenschmidt 提交于
      A bogus test for unassigned resources that came from our 32-bit
      PCI code ended up being "merged" by my previous patch series,
      breaking some 64-bit setups where devices have legal resources
      ending at 0xffffffff.
      
      This fixes it by completely changing the test.  We now test for
      res->start == 0, as the generic code expects, and we also only
      do so on platforms that don't have the PPC_PCI_PROBE_ONLY flag
      set, as there are cases of pSeries and iSeries where it could
      be a valid value and those can't reassign devices.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7f172890
    • P
      [POWERPC] Add __ucmpdi2 for 64-bit comparisons in 32-bit kernels · 95ff54f5
      Paul Mackerras 提交于
      Some drivers (such as V4L2) have code that causes gcc to generate
      calls to __ucmpdi2 when compiling for 32-bit powerpc, which results
      in either a link-time error or a module that can't be loaded, as
      we don't currently have a __ucmpdi2.  This adds one so these drivers
      can be used.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      95ff54f5
  12. 07 3月, 2008 1 次提交
  13. 26 2月, 2008 1 次提交
  14. 20 2月, 2008 1 次提交