diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 16:26:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 16:26:58 -0500 |
commit | 7079060f3e86ea4c1d4e9c1e356592ef9dcaaa1f (patch) | |
tree | d56af89cd433440e3b9c94a830838d34b502e446 | |
parent | 3f00d3e8fb963968a922d821a9a53b503b687e81 (diff) | |
parent | 0a1cc0b6a4abaed5f891d1be3e3d0d7b9b719287 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
-rw-r--r-- | drivers/char/agp/ali-agp.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/amd-k7-agp.c | 8 | ||||
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/ati-agp.c | 8 | ||||
-rw-r--r-- | drivers/char/agp/backend.c | 6 | ||||
-rw-r--r-- | drivers/char/agp/efficeon-agp.c | 3 | ||||
-rw-r--r-- | drivers/char/agp/frontend.c | 15 | ||||
-rw-r--r-- | drivers/char/agp/generic.c | 10 | ||||
-rw-r--r-- | drivers/char/agp/i460-agp.c | 7 | ||||
-rw-r--r-- | drivers/char/agp/intel-agp.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/nvidia-agp.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/sgi-agp.c | 2 | ||||
-rw-r--r-- | drivers/char/agp/sis-agp.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/sworks-agp.c | 29 | ||||
-rw-r--r-- | drivers/char/agp/uninorth-agp.c | 1 | ||||
-rw-r--r-- | drivers/char/agp/via-agp.c | 1 |
16 files changed, 53 insertions, 42 deletions
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c index b02fc2267159..ba54b5872578 100644 --- a/drivers/char/agp/ali-agp.c +++ b/drivers/char/agp/ali-agp.c | |||
@@ -389,6 +389,7 @@ static struct pci_device_id agp_ali_pci_table[] = { | |||
389 | MODULE_DEVICE_TABLE(pci, agp_ali_pci_table); | 389 | MODULE_DEVICE_TABLE(pci, agp_ali_pci_table); |
390 | 390 | ||
391 | static struct pci_driver agp_ali_pci_driver = { | 391 | static struct pci_driver agp_ali_pci_driver = { |
392 | .owner = THIS_MODULE, | ||
392 | .name = "agpgart-ali", | 393 | .name = "agpgart-ali", |
393 | .id_table = agp_ali_pci_table, | 394 | .id_table = agp_ali_pci_table, |
394 | .probe = agp_ali_probe, | 395 | .probe = agp_ali_probe, |
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 3a41672e4d66..40fcd88b2cea 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
@@ -94,19 +94,16 @@ static int amd_create_gatt_pages(int nr_tables) | |||
94 | int retval = 0; | 94 | int retval = 0; |
95 | int i; | 95 | int i; |
96 | 96 | ||
97 | tables = kmalloc((nr_tables + 1) * sizeof(struct amd_page_map *), | 97 | tables = kzalloc((nr_tables + 1) * sizeof(struct amd_page_map *),GFP_KERNEL); |
98 | GFP_KERNEL); | ||
99 | if (tables == NULL) | 98 | if (tables == NULL) |
100 | return -ENOMEM; | 99 | return -ENOMEM; |
101 | 100 | ||
102 | memset (tables, 0, sizeof(struct amd_page_map *) * (nr_tables + 1)); | ||
103 | for (i = 0; i < nr_tables; i++) { | 101 | for (i = 0; i < nr_tables; i++) { |
104 | entry = kmalloc(sizeof(struct amd_page_map), GFP_KERNEL); | 102 | entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL); |
105 | if (entry == NULL) { | 103 | if (entry == NULL) { |
106 | retval = -ENOMEM; | 104 | retval = -ENOMEM; |
107 | break; | 105 | break; |
108 | } | 106 | } |
109 | memset (entry, 0, sizeof(struct amd_page_map)); | ||
110 | tables[i] = entry; | 107 | tables[i] = entry; |
111 | retval = amd_create_page_map(entry); | 108 | retval = amd_create_page_map(entry); |
112 | if (retval != 0) | 109 | if (retval != 0) |
@@ -518,6 +515,7 @@ static struct pci_device_id agp_amdk7_pci_table[] = { | |||
518 | MODULE_DEVICE_TABLE(pci, agp_amdk7_pci_table); | 515 | MODULE_DEVICE_TABLE(pci, agp_amdk7_pci_table); |
519 | 516 | ||
520 | static struct pci_driver agp_amdk7_pci_driver = { | 517 | static struct pci_driver agp_amdk7_pci_driver = { |
518 | .owner = THIS_MODULE, | ||
521 | .name = "agpgart-amdk7", | 519 | .name = "agpgart-amdk7", |
522 | .id_table = agp_amdk7_pci_table, | 520 | .id_table = agp_amdk7_pci_table, |
523 | .probe = agp_amdk7_probe, | 521 | .probe = agp_amdk7_probe, |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 78ce98a69f37..8f748fddca94 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -703,6 +703,7 @@ static struct pci_device_id agp_amd64_pci_table[] = { | |||
703 | MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table); | 703 | MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table); |
704 | 704 | ||
705 | static struct pci_driver agp_amd64_pci_driver = { | 705 | static struct pci_driver agp_amd64_pci_driver = { |
706 | .owner = THIS_MODULE, | ||
706 | .name = "agpgart-amd64", | 707 | .name = "agpgart-amd64", |
707 | .id_table = agp_amd64_pci_table, | 708 | .id_table = agp_amd64_pci_table, |
708 | .probe = agp_amd64_probe, | 709 | .probe = agp_amd64_probe, |
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index 0b6e72642d6e..fbd415565463 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c | |||
@@ -118,14 +118,12 @@ static int ati_create_gatt_pages(int nr_tables) | |||
118 | int retval = 0; | 118 | int retval = 0; |
119 | int i; | 119 | int i; |
120 | 120 | ||
121 | tables = kmalloc((nr_tables + 1) * sizeof(ati_page_map *), | 121 | tables = kzalloc((nr_tables + 1) * sizeof(ati_page_map *),GFP_KERNEL); |
122 | GFP_KERNEL); | ||
123 | if (tables == NULL) | 122 | if (tables == NULL) |
124 | return -ENOMEM; | 123 | return -ENOMEM; |
125 | 124 | ||
126 | memset(tables, 0, sizeof(ati_page_map *) * (nr_tables + 1)); | ||
127 | for (i = 0; i < nr_tables; i++) { | 125 | for (i = 0; i < nr_tables; i++) { |
128 | entry = kmalloc(sizeof(ati_page_map), GFP_KERNEL); | 126 | entry = kzalloc(sizeof(ati_page_map), GFP_KERNEL); |
129 | if (entry == NULL) { | 127 | if (entry == NULL) { |
130 | while (i>0) { | 128 | while (i>0) { |
131 | kfree (tables[i-1]); | 129 | kfree (tables[i-1]); |
@@ -136,7 +134,6 @@ static int ati_create_gatt_pages(int nr_tables) | |||
136 | retval = -ENOMEM; | 134 | retval = -ENOMEM; |
137 | break; | 135 | break; |
138 | } | 136 | } |
139 | memset(entry, 0, sizeof(ati_page_map)); | ||
140 | tables[i] = entry; | 137 | tables[i] = entry; |
141 | retval = ati_create_page_map(entry); | 138 | retval = ati_create_page_map(entry); |
142 | if (retval != 0) break; | 139 | if (retval != 0) break; |
@@ -524,6 +521,7 @@ static struct pci_device_id agp_ati_pci_table[] = { | |||
524 | MODULE_DEVICE_TABLE(pci, agp_ati_pci_table); | 521 | MODULE_DEVICE_TABLE(pci, agp_ati_pci_table); |
525 | 522 | ||
526 | static struct pci_driver agp_ati_pci_driver = { | 523 | static struct pci_driver agp_ati_pci_driver = { |
524 | .owner = THIS_MODULE, | ||
527 | .name = "agpgart-ati", | 525 | .name = "agpgart-ati", |
528 | .id_table = agp_ati_pci_table, | 526 | .id_table = agp_ati_pci_table, |
529 | .probe = agp_ati_probe, | 527 | .probe = agp_ati_probe, |
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index 82b43c541c8d..73f333f491bd 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c | |||
@@ -222,12 +222,12 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge) | |||
222 | 222 | ||
223 | struct agp_bridge_data *agp_alloc_bridge(void) | 223 | struct agp_bridge_data *agp_alloc_bridge(void) |
224 | { | 224 | { |
225 | struct agp_bridge_data *bridge = kmalloc(sizeof(*bridge), GFP_KERNEL); | 225 | struct agp_bridge_data *bridge; |
226 | 226 | ||
227 | bridge = kzalloc(sizeof(*bridge), GFP_KERNEL); | ||
227 | if (!bridge) | 228 | if (!bridge) |
228 | return NULL; | 229 | return NULL; |
229 | 230 | ||
230 | memset(bridge, 0, sizeof(*bridge)); | ||
231 | atomic_set(&bridge->agp_in_use, 0); | 231 | atomic_set(&bridge->agp_in_use, 0); |
232 | atomic_set(&bridge->current_memory_agp, 0); | 232 | atomic_set(&bridge->current_memory_agp, 0); |
233 | 233 | ||
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index ac19fdcd21c1..d41e0a62e32e 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c | |||
@@ -219,7 +219,7 @@ static int efficeon_create_gatt_table(struct agp_bridge_data *bridge) | |||
219 | 219 | ||
220 | efficeon_private.l1_table[index] = page; | 220 | efficeon_private.l1_table[index] = page; |
221 | 221 | ||
222 | value = virt_to_gart(page) | pati | present | index; | 222 | value = virt_to_gart((unsigned long *)page) | pati | present | index; |
223 | 223 | ||
224 | pci_write_config_dword(agp_bridge->dev, | 224 | pci_write_config_dword(agp_bridge->dev, |
225 | EFFICEON_ATTPAGE, value); | 225 | EFFICEON_ATTPAGE, value); |
@@ -429,6 +429,7 @@ static struct pci_device_id agp_efficeon_pci_table[] = { | |||
429 | MODULE_DEVICE_TABLE(pci, agp_efficeon_pci_table); | 429 | MODULE_DEVICE_TABLE(pci, agp_efficeon_pci_table); |
430 | 430 | ||
431 | static struct pci_driver agp_efficeon_pci_driver = { | 431 | static struct pci_driver agp_efficeon_pci_driver = { |
432 | .owner = THIS_MODULE, | ||
432 | .name = "agpgart-efficeon", | 433 | .name = "agpgart-efficeon", |
433 | .id_table = agp_efficeon_pci_table, | 434 | .id_table = agp_efficeon_pci_table, |
434 | .probe = agp_efficeon_probe, | 435 | .probe = agp_efficeon_probe, |
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index 3dfb6648547b..17f520c9d471 100644 --- a/drivers/char/agp/frontend.c +++ b/drivers/char/agp/frontend.c | |||
@@ -189,13 +189,12 @@ static int agp_create_segment(struct agp_client *client, struct agp_region *regi | |||
189 | struct agp_segment *user_seg; | 189 | struct agp_segment *user_seg; |
190 | size_t i; | 190 | size_t i; |
191 | 191 | ||
192 | seg = kmalloc((sizeof(struct agp_segment_priv) * region->seg_count), GFP_KERNEL); | 192 | seg = kzalloc((sizeof(struct agp_segment_priv) * region->seg_count), GFP_KERNEL); |
193 | if (seg == NULL) { | 193 | if (seg == NULL) { |
194 | kfree(region->seg_list); | 194 | kfree(region->seg_list); |
195 | region->seg_list = NULL; | 195 | region->seg_list = NULL; |
196 | return -ENOMEM; | 196 | return -ENOMEM; |
197 | } | 197 | } |
198 | memset(seg, 0, (sizeof(struct agp_segment_priv) * region->seg_count)); | ||
199 | user_seg = region->seg_list; | 198 | user_seg = region->seg_list; |
200 | 199 | ||
201 | for (i = 0; i < region->seg_count; i++) { | 200 | for (i = 0; i < region->seg_count; i++) { |
@@ -332,14 +331,11 @@ static struct agp_controller *agp_create_controller(pid_t id) | |||
332 | { | 331 | { |
333 | struct agp_controller *controller; | 332 | struct agp_controller *controller; |
334 | 333 | ||
335 | controller = kmalloc(sizeof(struct agp_controller), GFP_KERNEL); | 334 | controller = kzalloc(sizeof(struct agp_controller), GFP_KERNEL); |
336 | |||
337 | if (controller == NULL) | 335 | if (controller == NULL) |
338 | return NULL; | 336 | return NULL; |
339 | 337 | ||
340 | memset(controller, 0, sizeof(struct agp_controller)); | ||
341 | controller->pid = id; | 338 | controller->pid = id; |
342 | |||
343 | return controller; | 339 | return controller; |
344 | } | 340 | } |
345 | 341 | ||
@@ -540,12 +536,10 @@ static struct agp_client *agp_create_client(pid_t id) | |||
540 | { | 536 | { |
541 | struct agp_client *new_client; | 537 | struct agp_client *new_client; |
542 | 538 | ||
543 | new_client = kmalloc(sizeof(struct agp_client), GFP_KERNEL); | 539 | new_client = kzalloc(sizeof(struct agp_client), GFP_KERNEL); |
544 | |||
545 | if (new_client == NULL) | 540 | if (new_client == NULL) |
546 | return NULL; | 541 | return NULL; |
547 | 542 | ||
548 | memset(new_client, 0, sizeof(struct agp_client)); | ||
549 | new_client->pid = id; | 543 | new_client->pid = id; |
550 | agp_insert_client(new_client); | 544 | agp_insert_client(new_client); |
551 | return new_client; | 545 | return new_client; |
@@ -709,11 +703,10 @@ static int agp_open(struct inode *inode, struct file *file) | |||
709 | if (minor != AGPGART_MINOR) | 703 | if (minor != AGPGART_MINOR) |
710 | goto err_out; | 704 | goto err_out; |
711 | 705 | ||
712 | priv = kmalloc(sizeof(struct agp_file_private), GFP_KERNEL); | 706 | priv = kzalloc(sizeof(struct agp_file_private), GFP_KERNEL); |
713 | if (priv == NULL) | 707 | if (priv == NULL) |
714 | goto err_out_nomem; | 708 | goto err_out_nomem; |
715 | 709 | ||
716 | memset(priv, 0, sizeof(struct agp_file_private)); | ||
717 | set_bit(AGP_FF_ALLOW_CLIENT, &priv->access_flags); | 710 | set_bit(AGP_FF_ALLOW_CLIENT, &priv->access_flags); |
718 | priv->my_pid = current->pid; | 711 | priv->my_pid = current->pid; |
719 | 712 | ||
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index ac9da0ca36b7..c4a38715c6f9 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
@@ -105,12 +105,10 @@ struct agp_memory *agp_create_memory(int scratch_pages) | |||
105 | { | 105 | { |
106 | struct agp_memory *new; | 106 | struct agp_memory *new; |
107 | 107 | ||
108 | new = kmalloc(sizeof(struct agp_memory), GFP_KERNEL); | 108 | new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL); |
109 | |||
110 | if (new == NULL) | 109 | if (new == NULL) |
111 | return NULL; | 110 | return NULL; |
112 | 111 | ||
113 | memset(new, 0, sizeof(struct agp_memory)); | ||
114 | new->key = agp_get_key(); | 112 | new->key = agp_get_key(); |
115 | 113 | ||
116 | if (new->key < 0) { | 114 | if (new->key < 0) { |
@@ -414,7 +412,8 @@ static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_ | |||
414 | u32 tmp; | 412 | u32 tmp; |
415 | 413 | ||
416 | if (*requested_mode & AGP2_RESERVED_MASK) { | 414 | if (*requested_mode & AGP2_RESERVED_MASK) { |
417 | printk(KERN_INFO PFX "reserved bits set in mode 0x%x. Fixed.\n", *requested_mode); | 415 | printk(KERN_INFO PFX "reserved bits set (%x) in mode 0x%x. Fixed.\n", |
416 | *requested_mode & AGP2_RESERVED_MASK, *requested_mode); | ||
418 | *requested_mode &= ~AGP2_RESERVED_MASK; | 417 | *requested_mode &= ~AGP2_RESERVED_MASK; |
419 | } | 418 | } |
420 | 419 | ||
@@ -492,7 +491,8 @@ static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_ | |||
492 | u32 tmp; | 491 | u32 tmp; |
493 | 492 | ||
494 | if (*requested_mode & AGP3_RESERVED_MASK) { | 493 | if (*requested_mode & AGP3_RESERVED_MASK) { |
495 | printk(KERN_INFO PFX "reserved bits set in mode 0x%x. Fixed.\n", *requested_mode); | 494 | printk(KERN_INFO PFX "reserved bits set (%x) in mode 0x%x. Fixed.\n", |
495 | *requested_mode & AGP3_RESERVED_MASK, *requested_mode); | ||
496 | *requested_mode &= ~AGP3_RESERVED_MASK; | 496 | *requested_mode &= ~AGP3_RESERVED_MASK; |
497 | } | 497 | } |
498 | 498 | ||
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c index a2d9e5e48bbe..58944cd271ea 100644 --- a/drivers/char/agp/i460-agp.c +++ b/drivers/char/agp/i460-agp.c | |||
@@ -227,10 +227,9 @@ static int i460_configure (void) | |||
227 | */ | 227 | */ |
228 | if (I460_IO_PAGE_SHIFT > PAGE_SHIFT) { | 228 | if (I460_IO_PAGE_SHIFT > PAGE_SHIFT) { |
229 | size = current_size->num_entries * sizeof(i460.lp_desc[0]); | 229 | size = current_size->num_entries * sizeof(i460.lp_desc[0]); |
230 | i460.lp_desc = kmalloc(size, GFP_KERNEL); | 230 | i460.lp_desc = kzalloc(size, GFP_KERNEL); |
231 | if (!i460.lp_desc) | 231 | if (!i460.lp_desc) |
232 | return -ENOMEM; | 232 | return -ENOMEM; |
233 | memset(i460.lp_desc, 0, size); | ||
234 | } | 233 | } |
235 | return 0; | 234 | return 0; |
236 | } | 235 | } |
@@ -366,13 +365,12 @@ static int i460_alloc_large_page (struct lp_desc *lp) | |||
366 | } | 365 | } |
367 | 366 | ||
368 | map_size = ((I460_KPAGES_PER_IOPAGE + BITS_PER_LONG - 1) & -BITS_PER_LONG)/8; | 367 | map_size = ((I460_KPAGES_PER_IOPAGE + BITS_PER_LONG - 1) & -BITS_PER_LONG)/8; |
369 | lp->alloced_map = kmalloc(map_size, GFP_KERNEL); | 368 | lp->alloced_map = kzalloc(map_size, GFP_KERNEL); |
370 | if (!lp->alloced_map) { | 369 | if (!lp->alloced_map) { |
371 | free_pages((unsigned long) lpage, order); | 370 | free_pages((unsigned long) lpage, order); |
372 | printk(KERN_ERR PFX "Out of memory, we're in trouble...\n"); | 371 | printk(KERN_ERR PFX "Out of memory, we're in trouble...\n"); |
373 | return -ENOMEM; | 372 | return -ENOMEM; |
374 | } | 373 | } |
375 | memset(lp->alloced_map, 0, map_size); | ||
376 | 374 | ||
377 | lp->paddr = virt_to_gart(lpage); | 375 | lp->paddr = virt_to_gart(lpage); |
378 | lp->refcount = 0; | 376 | lp->refcount = 0; |
@@ -619,6 +617,7 @@ static struct pci_device_id agp_intel_i460_pci_table[] = { | |||
619 | MODULE_DEVICE_TABLE(pci, agp_intel_i460_pci_table); | 617 | MODULE_DEVICE_TABLE(pci, agp_intel_i460_pci_table); |
620 | 618 | ||
621 | static struct pci_driver agp_intel_i460_pci_driver = { | 619 | static struct pci_driver agp_intel_i460_pci_driver = { |
620 | .owner = THIS_MODULE, | ||
622 | .name = "agpgart-intel-i460", | 621 | .name = "agpgart-intel-i460", |
623 | .id_table = agp_intel_i460_pci_table, | 622 | .id_table = agp_intel_i460_pci_table, |
624 | .probe = agp_intel_i460_probe, | 623 | .probe = agp_intel_i460_probe, |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 1f7d415f432c..bf4cc9ffd5b1 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -1824,6 +1824,7 @@ static struct pci_device_id agp_intel_pci_table[] = { | |||
1824 | MODULE_DEVICE_TABLE(pci, agp_intel_pci_table); | 1824 | MODULE_DEVICE_TABLE(pci, agp_intel_pci_table); |
1825 | 1825 | ||
1826 | static struct pci_driver agp_intel_pci_driver = { | 1826 | static struct pci_driver agp_intel_pci_driver = { |
1827 | .owner = THIS_MODULE, | ||
1827 | .name = "agpgart-intel", | 1828 | .name = "agpgart-intel", |
1828 | .id_table = agp_intel_pci_table, | 1829 | .id_table = agp_intel_pci_table, |
1829 | .probe = agp_intel_probe, | 1830 | .probe = agp_intel_probe, |
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index 80dafa3030bd..3aed0c5e2f92 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c | |||
@@ -398,6 +398,7 @@ static struct pci_device_id agp_nvidia_pci_table[] = { | |||
398 | MODULE_DEVICE_TABLE(pci, agp_nvidia_pci_table); | 398 | MODULE_DEVICE_TABLE(pci, agp_nvidia_pci_table); |
399 | 399 | ||
400 | static struct pci_driver agp_nvidia_pci_driver = { | 400 | static struct pci_driver agp_nvidia_pci_driver = { |
401 | .owner = THIS_MODULE, | ||
401 | .name = "agpgart-nvidia", | 402 | .name = "agpgart-nvidia", |
402 | .id_table = agp_nvidia_pci_table, | 403 | .id_table = agp_nvidia_pci_table, |
403 | .probe = agp_nvidia_probe, | 404 | .probe = agp_nvidia_probe, |
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index 7957fc91f6ad..4df7734b51c2 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c | |||
@@ -289,6 +289,8 @@ static int __devinit agp_sgi_init(void) | |||
289 | j = 0; | 289 | j = 0; |
290 | list_for_each_entry(info, &tioca_list, ca_list) { | 290 | list_for_each_entry(info, &tioca_list, ca_list) { |
291 | struct list_head *tmp; | 291 | struct list_head *tmp; |
292 | if (list_empty(info->ca_devices)) | ||
293 | continue; | ||
292 | list_for_each(tmp, info->ca_devices) { | 294 | list_for_each(tmp, info->ca_devices) { |
293 | u8 cap_ptr; | 295 | u8 cap_ptr; |
294 | pdev = pci_dev_b(tmp); | 296 | pdev = pci_dev_b(tmp); |
diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c index ebc05554045c..a701361a8890 100644 --- a/drivers/char/agp/sis-agp.c +++ b/drivers/char/agp/sis-agp.c | |||
@@ -332,6 +332,7 @@ static struct pci_device_id agp_sis_pci_table[] = { | |||
332 | MODULE_DEVICE_TABLE(pci, agp_sis_pci_table); | 332 | MODULE_DEVICE_TABLE(pci, agp_sis_pci_table); |
333 | 333 | ||
334 | static struct pci_driver agp_sis_pci_driver = { | 334 | static struct pci_driver agp_sis_pci_driver = { |
335 | .owner = THIS_MODULE, | ||
335 | .name = "agpgart-sis", | 336 | .name = "agpgart-sis", |
336 | .id_table = agp_sis_pci_table, | 337 | .id_table = agp_sis_pci_table, |
337 | .probe = agp_sis_probe, | 338 | .probe = agp_sis_probe, |
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c index 71ea59a1dbeb..5a5392dd1254 100644 --- a/drivers/char/agp/sworks-agp.c +++ b/drivers/char/agp/sworks-agp.c | |||
@@ -102,19 +102,17 @@ static int serverworks_create_gatt_pages(int nr_tables) | |||
102 | int retval = 0; | 102 | int retval = 0; |
103 | int i; | 103 | int i; |
104 | 104 | ||
105 | tables = kmalloc((nr_tables + 1) * sizeof(struct serverworks_page_map *), | 105 | tables = kzalloc((nr_tables + 1) * sizeof(struct serverworks_page_map *), |
106 | GFP_KERNEL); | 106 | GFP_KERNEL); |
107 | if (tables == NULL) { | 107 | if (tables == NULL) |
108 | return -ENOMEM; | 108 | return -ENOMEM; |
109 | } | 109 | |
110 | memset(tables, 0, sizeof(struct serverworks_page_map *) * (nr_tables + 1)); | ||
111 | for (i = 0; i < nr_tables; i++) { | 110 | for (i = 0; i < nr_tables; i++) { |
112 | entry = kmalloc(sizeof(struct serverworks_page_map), GFP_KERNEL); | 111 | entry = kzalloc(sizeof(struct serverworks_page_map), GFP_KERNEL); |
113 | if (entry == NULL) { | 112 | if (entry == NULL) { |
114 | retval = -ENOMEM; | 113 | retval = -ENOMEM; |
115 | break; | 114 | break; |
116 | } | 115 | } |
117 | memset(entry, 0, sizeof(struct serverworks_page_map)); | ||
118 | tables[i] = entry; | 116 | tables[i] = entry; |
119 | retval = serverworks_create_page_map(entry); | 117 | retval = serverworks_create_page_map(entry); |
120 | if (retval != 0) break; | 118 | if (retval != 0) break; |
@@ -244,13 +242,27 @@ static int serverworks_fetch_size(void) | |||
244 | */ | 242 | */ |
245 | static void serverworks_tlbflush(struct agp_memory *temp) | 243 | static void serverworks_tlbflush(struct agp_memory *temp) |
246 | { | 244 | { |
245 | unsigned long timeout; | ||
246 | |||
247 | writeb(1, serverworks_private.registers+SVWRKS_POSTFLUSH); | 247 | writeb(1, serverworks_private.registers+SVWRKS_POSTFLUSH); |
248 | while (readb(serverworks_private.registers+SVWRKS_POSTFLUSH) == 1) | 248 | timeout = jiffies + 3*HZ; |
249 | while (readb(serverworks_private.registers+SVWRKS_POSTFLUSH) == 1) { | ||
249 | cpu_relax(); | 250 | cpu_relax(); |
251 | if (time_after(jiffies, timeout)) { | ||
252 | printk(KERN_ERR PFX "TLB post flush took more than 3 seconds\n"); | ||
253 | break; | ||
254 | } | ||
255 | } | ||
250 | 256 | ||
251 | writel(1, serverworks_private.registers+SVWRKS_DIRFLUSH); | 257 | writel(1, serverworks_private.registers+SVWRKS_DIRFLUSH); |
252 | while(readl(serverworks_private.registers+SVWRKS_DIRFLUSH) == 1) | 258 | timeout = jiffies + 3*HZ; |
259 | while (readl(serverworks_private.registers+SVWRKS_DIRFLUSH) == 1) { | ||
253 | cpu_relax(); | 260 | cpu_relax(); |
261 | if (time_after(jiffies, timeout)) { | ||
262 | printk(KERN_ERR PFX "TLB Dir flush took more than 3 seconds\n"); | ||
263 | break; | ||
264 | } | ||
265 | } | ||
254 | } | 266 | } |
255 | 267 | ||
256 | static int serverworks_configure(void) | 268 | static int serverworks_configure(void) |
@@ -533,6 +545,7 @@ static struct pci_device_id agp_serverworks_pci_table[] = { | |||
533 | MODULE_DEVICE_TABLE(pci, agp_serverworks_pci_table); | 545 | MODULE_DEVICE_TABLE(pci, agp_serverworks_pci_table); |
534 | 546 | ||
535 | static struct pci_driver agp_serverworks_pci_driver = { | 547 | static struct pci_driver agp_serverworks_pci_driver = { |
548 | .owner = THIS_MODULE, | ||
536 | .name = "agpgart-serverworks", | 549 | .name = "agpgart-serverworks", |
537 | .id_table = agp_serverworks_pci_table, | 550 | .id_table = agp_serverworks_pci_table, |
538 | .probe = agp_serverworks_probe, | 551 | .probe = agp_serverworks_probe, |
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index c8255312b8c1..183c50acab27 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c | |||
@@ -658,6 +658,7 @@ static struct pci_device_id agp_uninorth_pci_table[] = { | |||
658 | MODULE_DEVICE_TABLE(pci, agp_uninorth_pci_table); | 658 | MODULE_DEVICE_TABLE(pci, agp_uninorth_pci_table); |
659 | 659 | ||
660 | static struct pci_driver agp_uninorth_pci_driver = { | 660 | static struct pci_driver agp_uninorth_pci_driver = { |
661 | .owner = THIS_MODULE, | ||
661 | .name = "agpgart-uninorth", | 662 | .name = "agpgart-uninorth", |
662 | .id_table = agp_uninorth_pci_table, | 663 | .id_table = agp_uninorth_pci_table, |
663 | .probe = agp_uninorth_probe, | 664 | .probe = agp_uninorth_probe, |
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index c847df575cf5..5d9a13700074 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c | |||
@@ -518,6 +518,7 @@ MODULE_DEVICE_TABLE(pci, agp_via_pci_table); | |||
518 | 518 | ||
519 | 519 | ||
520 | static struct pci_driver agp_via_pci_driver = { | 520 | static struct pci_driver agp_via_pci_driver = { |
521 | .owner = THIS_MODULE, | ||
521 | .name = "agpgart-via", | 522 | .name = "agpgart-via", |
522 | .id_table = agp_via_pci_table, | 523 | .id_table = agp_via_pci_table, |
523 | .probe = agp_via_probe, | 524 | .probe = agp_via_probe, |