1. 17 5月, 2011 5 次提交
    • D
      sparc32, sun4d: Implemented SMP IPIs support for SUN4D machines · 55dd23ec
      Daniel Hellstrom 提交于
      The sun4d does not seem to have a distingstion between soft and hard
      IRQs. When generating IPIs the generated IRQ looks like a hard IRQ,
      this patch adds a "IPI check" in the sun4d irq trap handler at a
      predefined IRQ number (SUN4D_IPI_IRQ). Before generating an IPI
      a per-cpu memory structure is modified for the "IPI check" to
      successfully detect a IPI request to a specific processor, the check
      clears the IPI work requested.
      
      All three IPIs (resched, single and cpu-mask) use the same IRQ
      number.
      
      The IPI IRQ should preferrably be on a separate IRQ and definitly
      not shared with IRQ handlers requesting IRQ with IRQF_SHARED.
      Signed-off-by: NDaniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55dd23ec
    • D
      sparc32, sun4m: Implemented SMP IPIs support for SUN4M machines · ecbc42b7
      Daniel Hellstrom 提交于
      Implement the three IPIs (resched, single and cpu-mask) generation
      and interrupt handler catch. The sun4m has 15 soft-IRQs and three
      of them is used with this patch, the three IPIs was previously
      implemented with the cross-call IRQ15 which does not work with
      locking routines such as spinlocks because IRQ15 is NMI, it may
      cause deadlock.
      
      The IRQ trap handler code assumes (in the same spritit as the old
      it seems) that hard interrupts will be generated until handled
      (level), when a IRQ happens the IRQ pending register is checked
      for pending soft-IRQs. When both hard and soft IRQ happens at the
      same time only soft-IRQs are handled.
      
      The old code implemented a soft-IRQ traphandler at IRQ14 which
      called smp_reschedule_irq which in turn called set_need_resched.
      It seems to be an old relic and is replaced with the interrupt
      traphander exit code RESTORE_ALL, it calls schedule() when
      appropriate.
      Signed-off-by: NDaniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ecbc42b7
    • D
      sparc32,leon: Implemented SMP IPIs for LEON CPU · 1ca0c808
      Daniel Hellstrom 提交于
      This patch implements SMP IPIs on LEON using software generated
      IRQs to signal between CPUs.
      
      The IPI IRQ number is set by using the ipi_num property in the
      device tree, or defaults to 13. LEON SMP systems should reserve
      IRQ 13 (and IRQ 15) to Linux in order for the defaults to work.
      Signed-off-by: NDaniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ca0c808
    • D
      sparc32: implement SMP IPIs using the generic functions · d6d04819
      Daniel Hellstrom 提交于
      The current sparc32 SMP IPI generation is implemented the
      cross call function. The cross call function uses IRQ15 the
      NMI, this is has the effect that IPIs will interrupt IRQ
      critical areas and hang the system. Typically on/after
      spin_lock_irqsave calls can be aborted.
      
      The cross call functionality must still exist to flush
      cache/TLBS.
      
      This patch provides CPU models a custom way to implement
      generation of IPIs on the generic code's request. The
      typical approach is to generate an IRQ for each IPI case.
      
      After this patch each sparc32 SMP CPU model needs to
      implement IPIs in order to function properly.
      Signed-off-by: NDaniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d6d04819
    • D
      2645e721
  2. 22 4月, 2011 12 次提交
  3. 20 4月, 2011 3 次提交
    • S
      sparc32: genirq support · 6baa9b20
      Sam Ravnborg 提交于
      The conversion of sparc32 to genirq is based on original work done
      by David S. Miller.
      Daniel Hellstrom has helped in the conversion and implemented
      the shutdowm functionality.
      Marcel van Nies <morcles@gmail.com> has tested this on Sparc Station 20
      
      Test status:
      sun4c      - not tested
      sun4m,pci  - not tested
      sun4m,sbus - tested (Sparc Classic, Sparc Station 5, Sparc Station 20)
      sun4d      - not tested
      leon       - tested on various combinations of leon boards,
                   including SMP variants
      
      generic
         Introduce use of GENERIC_HARDIRQS and GENERIC_IRQ_SHOW
         Allocate 64 IRQs - which is enough even for SS2000
         Use a table of irq_bucket to maintain uses IRQs
            irq_bucket is also used to chain several irq's that
            must be called when the same intrrupt is asserted
         Use irq_link to link a interrupt source to the irq
         All plafforms must now supply their own build_device_irq method
         handler_irq rewriten to use generic irq support
      
      floppy
         Read FLOPPY_IRQ from platform device
         Use generic request_irq to register the floppy interrupt
         Rewrote sparc_floppy_irq to use the generic irq support
      
      pcic:
         Introduce irq_chip
         Store mask in chip_data for use in mask/unmask functions
         Add build_device_irq for pcic
         Use pcic_build_device_irq in pci_time_init
         allocate virtual irqs in pcic_fill_irq
      
      sun4c:
         Introduce irq_chip
         Store mask in chip_data for use in mask/unmask functions
         Add build_device_irq for sun4c
         Use sun4c_build_device_irq in sun4c_init_timers
      
      sun4m:
         Introduce irq_chip
         Introduce dedicated mask/unmask methods
         Introduce sun4m_handler_data that allow easy access to necessary
           data in the mask/unmask functions
         Add a helper method to enable profile_timer (used from smp)
         Added sun4m_build_device_irq
         Use sun4m_build_device_irq in sun4m_init_timers
      
         TODO:
            There is no replacement for smp_rotate that always scheduled
            next CPU as interrupt target upon an interrupt
      
      sun4d:
         Introduce irq_chip
         Introduce dedicated mask/unmask methods
         Introduce sun4d_handler_data that allow easy access to
         necessary data in mask/unmask fuctions
         Rewrote sun4d_handler_irq to use generic irq support
      
         TODO:
            The original implmentation of enable/disable had:
      
                if (irq < NR_IRQS)
                     return;
      
            The new implmentation does not distingush between SBUS and cpu
            interrupts.
            I am no sure what is right here. I assume we need to do
            something for the cpu interrupts.
      
            I have not succeeded booting my sun4d box (with or without this patch)
            and my understanding of this platfrom is limited.
            So I would be a bit suprised if this works.
      
      leon:
         Introduce irq_chip
         Store mask in chip_data for use in mask/unmask functions
         Add build_device_irq for leon
         Use leon_build_device_irq in leon_init_timers
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Acked-by: NDaniel Hellstrom <daniel@gaisler.com>
      Tested-by: NDaniel Hellstrom <daniel@gaisler.com>
      Tested-by: NMarcel van Nies <morcles@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6baa9b20
    • S
      sparc32: cleanup code for pci init · 06010fb5
      Sam Ravnborg 提交于
      Move the ifdeffery to a header file to make the logic more
      obvious where we decide between PCI or SBUS init
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06010fb5
    • S
      sparc32,sun4d: rename sbus_tid to board_to_cpu in irq support · db1cdd14
      Sam Ravnborg 提交于
      The new name reflects the actual usage much better.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db1cdd14
  4. 31 3月, 2011 3 次提交
  5. 30 3月, 2011 1 次提交
  6. 29 3月, 2011 4 次提交
  7. 25 3月, 2011 1 次提交
    • K
      sparc32: Fix multiple RTC detections on SUN4D · 1c833bc3
      Kjetil Oftedal 提交于
      During the preparation for testing the recent changes made to the SUN4D
      specific code in the kernel by Sam Ravnborg the following was discovered:
      
      Since the removal of of_platform_bus_type (commit: eca39301 )
      multiboard SUN4Ds have not been able to boot. The kernel crashes due to a
      zero-pointer error encountered when registering multiple M48T59 RTCs
      (There is one on each board).
      
      A patch for the was previously submitted, but the problem was not a
      serious at that time, as it would only generate warnings. Now the kernel
      will crash and stop executing before the serial console has been started.
      (Crash output can be viewed by using the -p boot flag)
      Signed-off-by: NKjetil Oftedal <oftedal@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c833bc3
  8. 19 3月, 2011 3 次提交
  9. 17 3月, 2011 8 次提交