lkml.org 
[lkml]   [2006]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2006-07-23 22:07    [W:0.261 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site