Re: [PATCH 2/3] add dev_to_node()

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

 



On Sat, Nov 04, 2006 at 11:56:29PM +0100, Christoph Hellwig wrote:

This will break the compile for !NUMA if someone ends up doing a bisect
and lands here as a bisect point.

You introduce this nice wrapper..

 > +#ifdef CONFIG_NUMA
 > +#define dev_to_node(dev)	((dev)->numa_node)
 > +#else
 > +#define dev_to_node(dev)	(-1)
 > +#endif
 > +
 >  static inline void *
 >  dev_get_drvdata (struct device *dev)
 >  {


And then don't use it here..

 > Index: linux-2.6/drivers/base/core.c
 > ===================================================================
 > --- linux-2.6.orig/drivers/base/core.c	2006-10-23 17:21:44.000000000 +0200
 > +++ linux-2.6/drivers/base/core.c	2006-11-02 12:48:12.000000000 +0100
 > @@ -381,6 +381,7 @@
 >  	INIT_LIST_HEAD(&dev->node);
 >  	init_MUTEX(&dev->sem);
 >  	device_init_wakeup(dev, 0);
 > +	dev->numa_node = -1;
 >  }
 >  
 >  /**

and here.

 > Index: linux-2.6/drivers/pci/probe.c
 > ===================================================================
 > --- linux-2.6.orig/drivers/pci/probe.c	2006-10-23 17:21:46.000000000 +0200
 > +++ linux-2.6/drivers/pci/probe.c	2006-11-02 12:47:35.000000000 +0100
 > @@ -846,6 +846,7 @@
 >  	dev->dev.release = pci_release_dev;
 >  	pci_dev_get(dev);
 >  
 > +	dev->dev.numa_node = pcibus_to_node(bus);
 >  	dev->dev.dma_mask = &dev->dma_mask;
 >  	dev->dev.coherent_dma_mask = 0xffffffffull;


	Dave


-- 
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux