1. 08 7月, 2010 5 次提交
  2. 30 6月, 2010 1 次提交
    • P
      powerpc, hw_breakpoint: Tell generic code we have no instruction breakpoints · d09ec738
      Paul Mackerras 提交于
      At present, hw_breakpoint_slots() returns 1 regardless of what
      type of breakpoint is specified in the type argument.  Since we
      don't define CONFIG_HAVE_MIXED_BREAKPOINTS_REGS, there are
      separate values for TYPE_INST and TYPE_DATA, and hw_breakpoint_slots()
      returns 1 for both, effectively advertising instruction breakpoint
      support which doesn't exist.
      
      This fixes it by making hw_breakpoint_slots return 1 for TYPE_DATA
      and 0 for TYPE_INST.  This moves hw_breakpoint_slots() from the
      powerpc hw_breakpoint.h to hw_breakpoint.c because the definitions
      of TYPE_INST and TYPE_DATA aren't available in <asm/hw_breakpoint.h>.
      They are defined in <linux/hw_breakpoint.h> but we can't include
      that header in <asm/hw_breakpoint.h>, and nor can we rely on
      <linux/hw_breakpoint.h> being included before <asm/hw_breakpoint.h>.
      Since hw_breakpoint_slots() is only called at boot time, there is
      no performance impact from making it a real function rather than
      a static inline.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d09ec738
  3. 23 6月, 2010 2 次提交
  4. 22 6月, 2010 4 次提交
    • K
      powerpc, hw_breakpoint: Discard extraneous interrupt due to accesses outside symbol length · e3e94084
      K.Prasad 提交于
      Many a times, the requested breakpoint length can be less than the
      fixed breakpoint length i.e. 8 bytes supported by PowerPC 64-bit
      server (Book III S) processors.  This could lead to extraneous
      interrupts resulting in false breakpoint notifications.  This
      detects and discards such interrupts for non-ptrace requests.
      We don't change ptrace behaviour to avoid breaking compatability.
      
      [Suggestion from Paul Mackerras <paulus@samba.org> to add a new flag in
      'struct arch_hw_breakpoint' to identify extraneous interrupts]
      Signed-off-by: NK.Prasad <prasad@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e3e94084
    • K
      powerpc, hw_breakpoint: Enable hw-breakpoints while handling intervening signals · 06532a67
      K.Prasad 提交于
      A signal delivered between a hw_breakpoint_handler() and the
      single_step_dabr_instruction() will not have the breakpoint active
      while the signal handler is running -- the signal delivery will
      set up a new MSR value which will not have MSR_SE set, so we
      won't get the signal step interrupt until and unless the signal
      handler returns (which it may never do).
      
      To fix this, we restore the breakpoint when delivering a signal --
      we clear the MSR_SE bit and set the DABR again.  If the signal
      handler returns, the DABR interrupt will occur again when the
      instruction that we were originally trying to single-step gets
      re-executed.
      
      [Paul Mackerras <paulus@samba.org> pointed out the need to do this.]
      Signed-off-by: NK.Prasad <prasad@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      06532a67
    • K
      powerpc, hw_breakpoint: Handle concurrent alignment interrupts · 2538c2d0
      K.Prasad 提交于
      If an alignment interrupt occurs on an instruction that is being
      single-stepped, the alignment interrupt handler currently handles
      the single-step condition by unconditionally sending a SIGTRAP to
      the process.  Other synchronous interrupts that result in the
      instruction being emulated do likewise.
      
      With hw_breakpoint support, the hw_breakpoint code needs to be able
      to intercept these single-step events as well as those where the
      instruction executes normally and a trace interrupt happens.
      
      Fix this by making emulate_single_step() use the existing
      single_step_exception() function instead of calling _exception()
      directly.  We then make single_step_exception() use the abstracted
      clear_single_step() rather than clearing bits in the MSR image
      directly so that emulate_single_step() will continue to work
      correctly on Book 3E processors.
      Signed-off-by: NK.Prasad <prasad@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      2538c2d0
    • K
      powerpc, hw_breakpoints: Implement hw_breakpoints for 64-bit server processors · 5aae8a53
      K.Prasad 提交于
      Implement perf-events based hw-breakpoint interfaces for PowerPC
      64-bit server (Book III S) processors.  This allows access to a
      given location to be used as an event that can be counted or
      profiled by the perf_events subsystem.
      
      This is done using the DABR (data breakpoint register), which can
      also be used for process debugging via ptrace.  When perf_event
      hw_breakpoint support is configured in, the perf_event subsystem
      manages the DABR and arbitrates access to it, and ptrace then
      creates a perf_event when it is requested to set a data breakpoint.
      
      [Adopted suggestions from Paul Mackerras <paulus@samba.org> to
      - emulate_step() all system-wide breakpoints and single-step only the
        per-task breakpoints
      - perform arch-specific cleanup before unregistration through
        arch_unregister_hw_breakpoint()
      ]
      Signed-off-by: NK.Prasad <prasad@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5aae8a53
  5. 15 6月, 2010 3 次提交
    • M
      powerpc: rtas_flash needs to use rtas_data_buf · bd2b64a1
      Milton Miller 提交于
      When trying to flash a machine via the update_flash command, Anton received the
      following error:
      
          Restarting system.
          FLASH: kernel bug...flash list header addr above 4GB
      
      The code in question has a comment that the flash list should be in
      the kernel data and therefore under 4GB:
      
              /* NOTE: the "first" block list is a global var with no data
               * blocks in the kernel data segment.  We do this because
               * we want to ensure this block_list addr is under 4GB.
               */
      
      Unfortunately the Kconfig option is marked tristate which means the variable
      may not be in the kernel data and could be above 4GB.
      
      Instead of relying on the data segment being below 4GB, use the static
      data buffer allocated by the kernel for use by rtas.  Since we don't
      use the header struct directly anymore, convert it to a simple pointer.
      Reported-By: NAnton Blanchard <anton@samba.org>
      Signed-Off-By: Milton Miller <miltonm@bga.com
      Tested-By: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bd2b64a1
    • C
      powerpc: Unconditionally enabled irq stacks · f1ba9a5b
      Christoph Hellwig 提交于
      Irq stacks provide an essential protection from stack overflows through
      external interrupts, at the cost of two additionals stacks per CPU.
      
      Enable them unconditionally to simplify the kernel build and prevent
      people from accidentally disabling them.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f1ba9a5b
    • M
      powerpc/kexec: Wait for online/possible CPUs only. · b636f137
      Matt Evans 提交于
      kexec_perpare_cpus_wait() iterates i through NR_CPUS to check
      paca[i].kexec_state of each to make sure they have quiesced.
      However now we have dynamic PACA allocation, paca[NR_CPUS] is not necessarily
      valid and we overrun the array;  spurious "cpu is not possible, ignoring"
      errors result.  This patch iterates for_each_online_cpu so stays
      within the bounds of paca[] -- and every CPU is now 'possible'.
      Signed-off-by: NMatt Evans <matt@ozlabs.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b636f137
  6. 12 6月, 2010 1 次提交
  7. 02 6月, 2010 1 次提交
  8. 31 5月, 2010 1 次提交
  9. 28 5月, 2010 1 次提交
  10. 25 5月, 2010 3 次提交
  11. 22 5月, 2010 3 次提交
  12. 21 5月, 2010 15 次提交