lkml.org 
[lkml]   [2010]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/5] gic: prevent gic from crossing NR_IRQ
    On Wed, Jan 27, 2010 at 11:32:25AM -0800, adharmap@codeaurora.org wrote:
    > From: Abhijeet Dharmapurikar <adharmap@quicinc.com>
    >
    > The gic code tries to initialize interrupts beyond NR_IRQ. Prevent
    > code from doing that.

    NAK. This is completely the wrong approach.

    /*
    * Find out how many interrupts are supported.
    */
    max_irq = readl(base + GIC_DIST_CTR) & 0x1f;
    max_irq = (max_irq + 1) * 32;

    /*
    * The GIC only supports up to 1020 interrupt sources.
    * Limit this to either the architected maximum, or the
    * platform maximum.
    */
    if (max_irq > max(1020, NR_IRQS))
    max_irq = max(1020, NR_IRQS);
    ...
    for (i = irq_start; i < gic_data[gic_nr].irq_offset + max_irq; i++) {

    This function is broken if irq_start != 0, and needs fixing - max_irq
    needs to be limited to the _minimum_ of 1020 or NR_IRQS - irq_start.


    \
     
     \ /
      Last update: 2010-01-27 23:53    [W:0.025 / U:1.640 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site