Re: [PATCH] various sibyte 2.6.x bugfixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 22 Jun 2005 djohnson+linuxmips@xxxxxxxxxxxxxxxxxxxxxx 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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux