linux-mips
[Top] [All Lists]

Re: [PATCH] various sibyte 2.6.x bugfixes

To: djohnson+linuxmips@sw.starentnetworks.com
Subject: Re: [PATCH] various sibyte 2.6.x bugfixes
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Wed, 22 Jun 2005 16:23:59 +0100 (BST)
Cc: linux-mips@linux-mips.org
In-reply-to: <17081.32401.574987.337795@cortez.sw.starentnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <17081.32401.574987.337795@cortez.sw.starentnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 22 Jun 2005 djohnson+linuxmips@sw.starentnetworks.com wrote:

> -     if (mask) {
> -             printk("attempted to set irq affinity for irq %d to multiple 
> CPUs\n", irq);
> +     if ((i == NR_CPUS) || (next_cpu(i, mask) != NR_CPUS)) {
> +             printk("attempted to set irq affinity for irq %d to 
> zero/multiple CPUs\n", irq);

 This printk() should be split into two lines.

>       d->sbdma_dscrtable = (sbdmadscr_t *) 
> -             kmalloc(d->sbdma_maxdescr*sizeof(sbdmadscr_t), GFP_KERNEL);
> +             kmalloc(d->sbdma_maxdescr*sizeof(sbdmadscr_t)+SMP_CACHE_BYTES, 
> GFP_KERNEL);

 Formatting!

> +     /*
> +      * The descriptor table must be aligned to at least 16 bytes or the
> +      * MAC will corrupt it. Align it to 32 bytes.
> +      */

 Why 32 bytes then?  Too much memory left?

> +     if ((unsigned long)d->sbdma_dscrtable & (SMP_CACHE_BYTES-1)) {
> +             (unsigned long)d->sbdma_dscrtable += SMP_CACHE_BYTES - 
> ((unsigned long)d->sbdma_dscrtable & (SMP_CACHE_BYTES-1));
> +     }

 Hmm, there's that generic ALIGN() macro -- you should use it...  
Besides, casts as lvalues are not allowed anymore (and they are hideous 
anyway).

  Maciej

<Prev in Thread] Current Thread [Next in Thread>