lkml.org 
[lkml]   [2011]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [patch v2 17/35] Hexagon: Add interrupts
    Date
    On Tuesday 30 August 2011, Richard Kuo wrote:
    > Signed-off-by: Richard Kuo <rkuo@codeaurora.org>

    Acked-by: Arnd Bergmann <arnd@arndb.de>

    > +
    > +/* Number of first-level interrupts associated with the CPU core. */
    > +#define HEXAGON_CPUINTS 32
    > +
    > +/*
    > + * XXX TODO FIXME this should be pulled from a platform file!
    > + * Must define NR_IRQS before including <asm-generic/irq.h>
    > + * 64 == the two SIRC's, 176 == the two gpio's
    > + */
    > +#define NR_IRQS (HEXAGON_CPUINTS + 64 + 176)

    I disagree with that comment: NR_IRQS is a constant and should
    not be platform specific. There should be no compile-time settings
    that are strictly specific to one platform, otherwise you are not
    able to run the same kernel on multiple platforms, which is very
    valuable for testing purposes.

    Just make the constant large enough to always fit. Use sparse IRQs
    if necessary.

    > +#include <asm-generic/irq.h>
    > +
    > +extern void __init hexagon_cpu_irq_init(void);
    > +

    I don't think you actually need to declare hexagon_cpu_irq_init(), just
    rename that function to init_IRQ() and remove the wrapper.

    Arnd


    \
     
     \ /
      Last update: 2011-08-31 15:53    [W:0.021 / U:0.284 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site