Messages in this thread | | | Date | Sun, 23 Jul 2006 22:04:05 +0200 | From | Luca <> | Subject | Re: [PATCH] gpu: Initial GPU layer addition. (03/07) |
| |
Dave Airlie <airlied@linux.ie> ha scritto: > diff --git a/drivers/video/gpu_layer.c b/drivers/video/gpu_layer.c > new file mode 100644 > index 0000000..36e7037 > --- /dev/null > +++ b/drivers/video/gpu_layer.c > @@ -0,0 +1,393 @@ > +/* > + * drivers/video/gpu_layer.c > + * > + * (C) Copyright Dave Airlie 2006 > + * > + */ > +#include <linux/device.h> > +#include <linux/list.h> > +#include <linux/mutex.h> > +#include <linux/pci.h> > +#include <linux/gpu_layer.h> > + > +/* GPUs we manage */ > +LIST_HEAD(gpu_bus_list); > + > +/* used when allocating bus numbers */ > +#define GPU_MAXBUS 16 > +struct gpu_busmap { > + unsigned long busmap [GPU_MAXBUS / (8*sizeof (unsigned long))]; > +};
16 / (8 * 4) is zero (the same with sizeof(long) == 8). When doing bit ops on that zero-sized array you are probably corrupting the BSS.
Luca -- Home: http://kronoz.cjb.net Recursion n.: See Recursion. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |