01 Nov, 2011

1 commit


10 Jun, 2011

1 commit

  • During converting per-cpu ticker to genirq layer some
    IRQ initialization code was removed by commit
    2cf9530420e446bb61f665d02afeb81070106900 ("sparc32,leon:
    per-cpu ticker use genirq per-cpu handler").

    This patch reintroduces the code at the same place it was
    removed from. IRQ12 - IRQ14 will crash on LEON SMP without
    this patch because it will run the SUN4M IRQ trap handler.

    Reported-by: Jan Andersson
    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     

03 Jun, 2011

1 commit

  • The DMA region must be accessible in order for PCI peripheral
    drivers to work, the sparc32 has DMA in the normal memory
    zone which requires the GRPCI2 to PCI target BARs so that all
    kernel low mem (192MB) can be mapped 1:1 to PCI address
    space. The GRPCI2 has resizeable target BARs, by default the
    first is made 256MB and all other BARs are disabled.

    I/O space are always located on 0x1000-0x10000, but accessed
    through the GRPCI2 PCI I/O Window memory mapped to virtual
    address space.

    Configuration space is accessed through the 64KB GRPCI2 PCI
    CFG Window using LDA bypassing the MMU.

    The GRPCI2 has a single PCI Window for prefetchable and non-
    prefetchable address space, it is up to the AHB master
    requesting PCI data to determine access type. Memory space
    is mapped 1:1.

    The GRPCI2 core can be configured in 4 different IRQ modes,
    where PCI Interrupt, Error Interrupt and DMA Interrupt are
    shared on a single IRQ line or at most 5 IRQs are used. The
    GRPCI2 can mask/unmask PCI interrupts, Err and DMA in the control
    and check status bits which tells us which IRQ really happended.
    The GENIRQ layer is used to unmask/mask each individual IRQ
    source by creating virtual IRQs and implementing a IRQ chip.

    The optional DMA functionality of the GRPCI2 is not supported
    by this patch.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     

22 Apr, 2011

8 commits


20 Apr, 2011

1 commit

  • 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 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: Sam Ravnborg
    Acked-by: Daniel Hellstrom
    Tested-by: Daniel Hellstrom
    Tested-by: Marcel van Nies
    Cc: Thomas Gleixner
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

17 Mar, 2011

2 commits


05 Jan, 2011

4 commits


30 Oct, 2010

1 commit


13 Oct, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

13 Feb, 2010

1 commit


02 Nov, 2009

1 commit


18 Aug, 2009

1 commit