diff options
| -rw-r--r-- | drivers/char/agp/agp.h | 6 | ||||
| -rw-r--r-- | drivers/char/agp/alpha-agp.c | 4 | ||||
| -rw-r--r-- | drivers/char/agp/amd-k7-agp.c | 4 | ||||
| -rw-r--r-- | drivers/char/agp/amd64-agp.c | 4 | ||||
| -rw-r--r-- | drivers/char/agp/ati-agp.c | 4 | ||||
| -rw-r--r-- | drivers/char/agp/efficeon-agp.c | 6 | ||||
| -rw-r--r-- | drivers/char/agp/generic.c | 24 | ||||
| -rw-r--r-- | drivers/char/agp/hp-agp.c | 6 | ||||
| -rw-r--r-- | drivers/char/agp/i460-agp.c | 2 | ||||
| -rw-r--r-- | drivers/char/agp/intel-agp.c | 10 | ||||
| -rw-r--r-- | drivers/char/agp/nvidia-agp.c | 4 | ||||
| -rw-r--r-- | drivers/char/agp/parisc-agp.c | 6 | ||||
| -rw-r--r-- | drivers/char/agp/sgi-agp.c | 8 | ||||
| -rw-r--r-- | drivers/char/agp/sworks-agp.c | 6 | ||||
| -rw-r--r-- | drivers/char/agp/uninorth-agp.c | 10 | ||||
| -rw-r--r-- | include/linux/agp_backend.h | 14 |
16 files changed, 55 insertions, 63 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h index 99e6a406efb4..81e14bea54bd 100644 --- a/drivers/char/agp/agp.h +++ b/drivers/char/agp/agp.h | |||
| @@ -99,8 +99,8 @@ struct agp_bridge_driver { | |||
| 99 | const void *aperture_sizes; | 99 | const void *aperture_sizes; |
| 100 | int num_aperture_sizes; | 100 | int num_aperture_sizes; |
| 101 | enum aper_size_type size_type; | 101 | enum aper_size_type size_type; |
| 102 | int cant_use_aperture; | 102 | bool cant_use_aperture; |
| 103 | int needs_scratch_page; | 103 | bool needs_scratch_page; |
| 104 | const struct gatt_mask *masks; | 104 | const struct gatt_mask *masks; |
| 105 | int (*fetch_size)(void); | 105 | int (*fetch_size)(void); |
| 106 | int (*configure)(void); | 106 | int (*configure)(void); |
| @@ -278,7 +278,7 @@ void agp_generic_destroy_page(void *addr, int flags); | |||
| 278 | void agp_free_key(int key); | 278 | void agp_free_key(int key); |
| 279 | int agp_num_entries(void); | 279 | int agp_num_entries(void); |
| 280 | u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command); | 280 | u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command); |
| 281 | void agp_device_command(u32 command, int agp_v3); | 281 | void agp_device_command(u32 command, bool agp_v3); |
| 282 | int agp_3_5_enable(struct agp_bridge_data *bridge); | 282 | int agp_3_5_enable(struct agp_bridge_data *bridge); |
| 283 | void global_cache_flush(void); | 283 | void global_cache_flush(void); |
| 284 | void get_agp_version(struct agp_bridge_data *bridge); | 284 | void get_agp_version(struct agp_bridge_data *bridge); |
diff --git a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c index e77c17838c8a..5da89f6c6c25 100644 --- a/drivers/char/agp/alpha-agp.c +++ b/drivers/char/agp/alpha-agp.c | |||
| @@ -80,7 +80,7 @@ static void alpha_core_agp_enable(struct agp_bridge_data *bridge, u32 mode) | |||
| 80 | agp->mode.bits.enable = 1; | 80 | agp->mode.bits.enable = 1; |
| 81 | agp->ops->configure(agp); | 81 | agp->ops->configure(agp); |
| 82 | 82 | ||
| 83 | agp_device_command(agp->mode.lw, 0); | 83 | agp_device_command(agp->mode.lw, false); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start, | 86 | static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start, |
| @@ -126,7 +126,7 @@ struct agp_bridge_driver alpha_core_agp_driver = { | |||
| 126 | .aperture_sizes = alpha_core_agp_sizes, | 126 | .aperture_sizes = alpha_core_agp_sizes, |
| 127 | .num_aperture_sizes = 1, | 127 | .num_aperture_sizes = 1, |
| 128 | .size_type = FIXED_APER_SIZE, | 128 | .size_type = FIXED_APER_SIZE, |
| 129 | .cant_use_aperture = 1, | 129 | .cant_use_aperture = true, |
| 130 | .masks = NULL, | 130 | .masks = NULL, |
| 131 | 131 | ||
| 132 | .fetch_size = alpha_core_agp_fetch_size, | 132 | .fetch_size = alpha_core_agp_fetch_size, |
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 96bdb9296b07..39a0718bc616 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
| @@ -314,9 +314,9 @@ static int amd_insert_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
| 314 | j++; | 314 | j++; |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | if (mem->is_flushed == FALSE) { | 317 | if (!mem->is_flushed) { |
| 318 | global_cache_flush(); | 318 | global_cache_flush(); |
| 319 | mem->is_flushed = TRUE; | 319 | mem->is_flushed = true; |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 322 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index d8200ac8f8cb..13665db363d6 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
| @@ -90,9 +90,9 @@ static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
| 90 | j++; | 90 | j++; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | if (mem->is_flushed == FALSE) { | 93 | if (!mem->is_flushed) { |
| 94 | global_cache_flush(); | 94 | global_cache_flush(); |
| 95 | mem->is_flushed = TRUE; | 95 | mem->is_flushed = true; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 98 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index 07b4d8ff56e5..3a4566c0d84f 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c | |||
| @@ -287,10 +287,10 @@ static int ati_insert_memory(struct agp_memory * mem, | |||
| 287 | j++; | 287 | j++; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | if (mem->is_flushed == FALSE) { | 290 | if (!mem->is_flushed) { |
| 291 | /*CACHE_FLUSH(); */ | 291 | /*CACHE_FLUSH(); */ |
| 292 | global_cache_flush(); | 292 | global_cache_flush(); |
| 293 | mem->is_flushed = TRUE; | 293 | mem->is_flushed = true; |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 296 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index cac0009cebc1..8ca6f262ef85 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c | |||
| @@ -249,9 +249,9 @@ static int efficeon_insert_memory(struct agp_memory * mem, off_t pg_start, int t | |||
| 249 | if (type != 0 || mem->type != 0) | 249 | if (type != 0 || mem->type != 0) |
| 250 | return -EINVAL; | 250 | return -EINVAL; |
| 251 | 251 | ||
| 252 | if (mem->is_flushed == FALSE) { | 252 | if (!mem->is_flushed) { |
| 253 | global_cache_flush(); | 253 | global_cache_flush(); |
| 254 | mem->is_flushed = TRUE; | 254 | mem->is_flushed = true; |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | last_page = NULL; | 257 | last_page = NULL; |
| @@ -329,7 +329,7 @@ static const struct agp_bridge_driver efficeon_driver = { | |||
| 329 | .free_gatt_table = efficeon_free_gatt_table, | 329 | .free_gatt_table = efficeon_free_gatt_table, |
| 330 | .insert_memory = efficeon_insert_memory, | 330 | .insert_memory = efficeon_insert_memory, |
| 331 | .remove_memory = efficeon_remove_memory, | 331 | .remove_memory = efficeon_remove_memory, |
| 332 | .cant_use_aperture = 0, // 1 might be faster? | 332 | .cant_use_aperture = false, // true might be faster? |
| 333 | 333 | ||
| 334 | // Generic | 334 | // Generic |
| 335 | .alloc_by_type = agp_generic_alloc_by_type, | 335 | .alloc_by_type = agp_generic_alloc_by_type, |
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index b6650a63197d..3e3625affdd1 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
| @@ -188,7 +188,7 @@ void agp_free_memory(struct agp_memory *curr) | |||
| 188 | if (curr == NULL) | 188 | if (curr == NULL) |
| 189 | return; | 189 | return; |
| 190 | 190 | ||
| 191 | if (curr->is_bound == TRUE) | 191 | if (curr->is_bound) |
| 192 | agp_unbind_memory(curr); | 192 | agp_unbind_memory(curr); |
| 193 | 193 | ||
| 194 | if (curr->type >= AGP_USER_TYPES) { | 194 | if (curr->type >= AGP_USER_TYPES) { |
| @@ -414,20 +414,20 @@ int agp_bind_memory(struct agp_memory *curr, off_t pg_start) | |||
| 414 | if (curr == NULL) | 414 | if (curr == NULL) |
| 415 | return -EINVAL; | 415 | return -EINVAL; |
| 416 | 416 | ||
| 417 | if (curr->is_bound == TRUE) { | 417 | if (curr->is_bound) { |
| 418 | printk(KERN_INFO PFX "memory %p is already bound!\n", curr); | 418 | printk(KERN_INFO PFX "memory %p is already bound!\n", curr); |
| 419 | return -EINVAL; | 419 | return -EINVAL; |
| 420 | } | 420 | } |
| 421 | if (curr->is_flushed == FALSE) { | 421 | if (!curr->is_flushed) { |
| 422 | curr->bridge->driver->cache_flush(); | 422 | curr->bridge->driver->cache_flush(); |
| 423 | curr->is_flushed = TRUE; | 423 | curr->is_flushed = true; |
| 424 | } | 424 | } |
| 425 | ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type); | 425 | ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type); |
| 426 | 426 | ||
| 427 | if (ret_val != 0) | 427 | if (ret_val != 0) |
| 428 | return ret_val; | 428 | return ret_val; |
| 429 | 429 | ||
| 430 | curr->is_bound = TRUE; | 430 | curr->is_bound = true; |
| 431 | curr->pg_start = pg_start; | 431 | curr->pg_start = pg_start; |
| 432 | return 0; | 432 | return 0; |
| 433 | } | 433 | } |
| @@ -449,7 +449,7 @@ int agp_unbind_memory(struct agp_memory *curr) | |||
| 449 | if (curr == NULL) | 449 | if (curr == NULL) |
| 450 | return -EINVAL; | 450 | return -EINVAL; |
| 451 | 451 | ||
| 452 | if (curr->is_bound != TRUE) { | 452 | if (!curr->is_bound) { |
| 453 | printk(KERN_INFO PFX "memory %p was not bound!\n", curr); | 453 | printk(KERN_INFO PFX "memory %p was not bound!\n", curr); |
| 454 | return -EINVAL; | 454 | return -EINVAL; |
| 455 | } | 455 | } |
| @@ -459,7 +459,7 @@ int agp_unbind_memory(struct agp_memory *curr) | |||
| 459 | if (ret_val != 0) | 459 | if (ret_val != 0) |
| 460 | return ret_val; | 460 | return ret_val; |
| 461 | 461 | ||
| 462 | curr->is_bound = FALSE; | 462 | curr->is_bound = false; |
| 463 | curr->pg_start = 0; | 463 | curr->pg_start = 0; |
| 464 | return 0; | 464 | return 0; |
| 465 | } | 465 | } |
| @@ -757,7 +757,7 @@ u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode | |||
| 757 | EXPORT_SYMBOL(agp_collect_device_status); | 757 | EXPORT_SYMBOL(agp_collect_device_status); |
| 758 | 758 | ||
| 759 | 759 | ||
| 760 | void agp_device_command(u32 bridge_agpstat, int agp_v3) | 760 | void agp_device_command(u32 bridge_agpstat, bool agp_v3) |
| 761 | { | 761 | { |
| 762 | struct pci_dev *device = NULL; | 762 | struct pci_dev *device = NULL; |
| 763 | int mode; | 763 | int mode; |
| @@ -821,7 +821,7 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode) | |||
| 821 | /* If we have 3.5, we can do the isoch stuff. */ | 821 | /* If we have 3.5, we can do the isoch stuff. */ |
| 822 | if (bridge->minor_version >= 5) | 822 | if (bridge->minor_version >= 5) |
| 823 | agp_3_5_enable(bridge); | 823 | agp_3_5_enable(bridge); |
| 824 | agp_device_command(bridge_agpstat, TRUE); | 824 | agp_device_command(bridge_agpstat, true); |
| 825 | return; | 825 | return; |
| 826 | } else { | 826 | } else { |
| 827 | /* Disable calibration cycle in RX91<1> when not in AGP3.0 mode of operation.*/ | 827 | /* Disable calibration cycle in RX91<1> when not in AGP3.0 mode of operation.*/ |
| @@ -838,7 +838,7 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode) | |||
| 838 | } | 838 | } |
| 839 | 839 | ||
| 840 | /* AGP v<3 */ | 840 | /* AGP v<3 */ |
| 841 | agp_device_command(bridge_agpstat, FALSE); | 841 | agp_device_command(bridge_agpstat, false); |
| 842 | } | 842 | } |
| 843 | EXPORT_SYMBOL(agp_generic_enable); | 843 | EXPORT_SYMBOL(agp_generic_enable); |
| 844 | 844 | ||
| @@ -1086,9 +1086,9 @@ int agp_generic_insert_memory(struct agp_memory * mem, off_t pg_start, int type) | |||
| 1086 | j++; | 1086 | j++; |
| 1087 | } | 1087 | } |
| 1088 | 1088 | ||
| 1089 | if (mem->is_flushed == FALSE) { | 1089 | if (!mem->is_flushed) { |
| 1090 | bridge->driver->cache_flush(); | 1090 | bridge->driver->cache_flush(); |
| 1091 | mem->is_flushed = TRUE; | 1091 | mem->is_flushed = true; |
| 1092 | } | 1092 | } |
| 1093 | 1093 | ||
| 1094 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 1094 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c index cbb0444467ba..80d7317f85c9 100644 --- a/drivers/char/agp/hp-agp.c +++ b/drivers/char/agp/hp-agp.c | |||
| @@ -353,9 +353,9 @@ hp_zx1_insert_memory (struct agp_memory *mem, off_t pg_start, int type) | |||
| 353 | j++; | 353 | j++; |
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | if (mem->is_flushed == FALSE) { | 356 | if (!mem->is_flushed) { |
| 357 | global_cache_flush(); | 357 | global_cache_flush(); |
| 358 | mem->is_flushed = TRUE; | 358 | mem->is_flushed = true; |
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | for (i = 0, j = io_pg_start; i < mem->page_count; i++) { | 361 | for (i = 0, j = io_pg_start; i < mem->page_count; i++) { |
| @@ -437,7 +437,7 @@ const struct agp_bridge_driver hp_zx1_driver = { | |||
| 437 | .agp_alloc_page = agp_generic_alloc_page, | 437 | .agp_alloc_page = agp_generic_alloc_page, |
| 438 | .agp_destroy_page = agp_generic_destroy_page, | 438 | .agp_destroy_page = agp_generic_destroy_page, |
| 439 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 439 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 440 | .cant_use_aperture = 1, | 440 | .cant_use_aperture = true, |
| 441 | }; | 441 | }; |
| 442 | 442 | ||
| 443 | static int __init | 443 | static int __init |
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c index 76f581c85a7d..e587eebebc67 100644 --- a/drivers/char/agp/i460-agp.c +++ b/drivers/char/agp/i460-agp.c | |||
| @@ -580,7 +580,7 @@ const struct agp_bridge_driver intel_i460_driver = { | |||
| 580 | .alloc_by_type = agp_generic_alloc_by_type, | 580 | .alloc_by_type = agp_generic_alloc_by_type, |
| 581 | .free_by_type = agp_generic_free_by_type, | 581 | .free_by_type = agp_generic_free_by_type, |
| 582 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 582 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 583 | .cant_use_aperture = 1, | 583 | .cant_use_aperture = true, |
| 584 | }; | 584 | }; |
| 585 | 585 | ||
| 586 | static int __devinit agp_intel_i460_probe(struct pci_dev *pdev, | 586 | static int __devinit agp_intel_i460_probe(struct pci_dev *pdev, |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 01b03402ea92..6800b7e5b6f5 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
| @@ -1658,7 +1658,7 @@ static const struct agp_bridge_driver intel_810_driver = { | |||
| 1658 | .aperture_sizes = intel_i810_sizes, | 1658 | .aperture_sizes = intel_i810_sizes, |
| 1659 | .size_type = FIXED_APER_SIZE, | 1659 | .size_type = FIXED_APER_SIZE, |
| 1660 | .num_aperture_sizes = 2, | 1660 | .num_aperture_sizes = 2, |
| 1661 | .needs_scratch_page = TRUE, | 1661 | .needs_scratch_page = true, |
| 1662 | .configure = intel_i810_configure, | 1662 | .configure = intel_i810_configure, |
| 1663 | .fetch_size = intel_i810_fetch_size, | 1663 | .fetch_size = intel_i810_fetch_size, |
| 1664 | .cleanup = intel_i810_cleanup, | 1664 | .cleanup = intel_i810_cleanup, |
| @@ -1707,7 +1707,7 @@ static const struct agp_bridge_driver intel_830_driver = { | |||
| 1707 | .aperture_sizes = intel_i830_sizes, | 1707 | .aperture_sizes = intel_i830_sizes, |
| 1708 | .size_type = FIXED_APER_SIZE, | 1708 | .size_type = FIXED_APER_SIZE, |
| 1709 | .num_aperture_sizes = 4, | 1709 | .num_aperture_sizes = 4, |
| 1710 | .needs_scratch_page = TRUE, | 1710 | .needs_scratch_page = true, |
| 1711 | .configure = intel_i830_configure, | 1711 | .configure = intel_i830_configure, |
| 1712 | .fetch_size = intel_i830_fetch_size, | 1712 | .fetch_size = intel_i830_fetch_size, |
| 1713 | .cleanup = intel_i830_cleanup, | 1713 | .cleanup = intel_i830_cleanup, |
| @@ -1878,7 +1878,7 @@ static const struct agp_bridge_driver intel_915_driver = { | |||
| 1878 | .aperture_sizes = intel_i830_sizes, | 1878 | .aperture_sizes = intel_i830_sizes, |
| 1879 | .size_type = FIXED_APER_SIZE, | 1879 | .size_type = FIXED_APER_SIZE, |
| 1880 | .num_aperture_sizes = 4, | 1880 | .num_aperture_sizes = 4, |
| 1881 | .needs_scratch_page = TRUE, | 1881 | .needs_scratch_page = true, |
| 1882 | .configure = intel_i915_configure, | 1882 | .configure = intel_i915_configure, |
| 1883 | .fetch_size = intel_i9xx_fetch_size, | 1883 | .fetch_size = intel_i9xx_fetch_size, |
| 1884 | .cleanup = intel_i915_cleanup, | 1884 | .cleanup = intel_i915_cleanup, |
| @@ -1904,7 +1904,7 @@ static const struct agp_bridge_driver intel_i965_driver = { | |||
| 1904 | .aperture_sizes = intel_i830_sizes, | 1904 | .aperture_sizes = intel_i830_sizes, |
| 1905 | .size_type = FIXED_APER_SIZE, | 1905 | .size_type = FIXED_APER_SIZE, |
| 1906 | .num_aperture_sizes = 4, | 1906 | .num_aperture_sizes = 4, |
| 1907 | .needs_scratch_page = TRUE, | 1907 | .needs_scratch_page = true, |
| 1908 | .configure = intel_i915_configure, | 1908 | .configure = intel_i915_configure, |
| 1909 | .fetch_size = intel_i9xx_fetch_size, | 1909 | .fetch_size = intel_i9xx_fetch_size, |
| 1910 | .cleanup = intel_i915_cleanup, | 1910 | .cleanup = intel_i915_cleanup, |
| @@ -1954,7 +1954,7 @@ static const struct agp_bridge_driver intel_g33_driver = { | |||
| 1954 | .aperture_sizes = intel_i830_sizes, | 1954 | .aperture_sizes = intel_i830_sizes, |
| 1955 | .size_type = FIXED_APER_SIZE, | 1955 | .size_type = FIXED_APER_SIZE, |
| 1956 | .num_aperture_sizes = 4, | 1956 | .num_aperture_sizes = 4, |
| 1957 | .needs_scratch_page = TRUE, | 1957 | .needs_scratch_page = true, |
| 1958 | .configure = intel_i915_configure, | 1958 | .configure = intel_i915_configure, |
| 1959 | .fetch_size = intel_i9xx_fetch_size, | 1959 | .fetch_size = intel_i9xx_fetch_size, |
| 1960 | .cleanup = intel_i915_cleanup, | 1960 | .cleanup = intel_i915_cleanup, |
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index 225ed2a53d45..eaceb61ba2dc 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c | |||
| @@ -214,9 +214,9 @@ static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type | |||
| 214 | return -EBUSY; | 214 | return -EBUSY; |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | if (mem->is_flushed == FALSE) { | 217 | if (!mem->is_flushed) { |
| 218 | global_cache_flush(); | 218 | global_cache_flush(); |
| 219 | mem->is_flushed = TRUE; | 219 | mem->is_flushed = true; |
| 220 | } | 220 | } |
| 221 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 221 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
| 222 | writel(agp_bridge->driver->mask_memory(agp_bridge, | 222 | writel(agp_bridge->driver->mask_memory(agp_bridge, |
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c index 2939e3570f9d..8c42dcc5958c 100644 --- a/drivers/char/agp/parisc-agp.c +++ b/drivers/char/agp/parisc-agp.c | |||
| @@ -141,9 +141,9 @@ parisc_agp_insert_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
| 141 | j++; | 141 | j++; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | if (mem->is_flushed == FALSE) { | 144 | if (!mem->is_flushed) { |
| 145 | global_cache_flush(); | 145 | global_cache_flush(); |
| 146 | mem->is_flushed = TRUE; | 146 | mem->is_flushed = true; |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | for (i = 0, j = io_pg_start; i < mem->page_count; i++) { | 149 | for (i = 0, j = io_pg_start; i < mem->page_count; i++) { |
| @@ -226,7 +226,7 @@ static const struct agp_bridge_driver parisc_agp_driver = { | |||
| 226 | .agp_alloc_page = agp_generic_alloc_page, | 226 | .agp_alloc_page = agp_generic_alloc_page, |
| 227 | .agp_destroy_page = agp_generic_destroy_page, | 227 | .agp_destroy_page = agp_generic_destroy_page, |
| 228 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 228 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 229 | .cant_use_aperture = 1, | 229 | .cant_use_aperture = true, |
| 230 | }; | 230 | }; |
| 231 | 231 | ||
| 232 | static int __init | 232 | static int __init |
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index 98cf8abb3e57..b972d83bb1b2 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c | |||
| @@ -182,9 +182,9 @@ static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start, | |||
| 182 | j++; | 182 | j++; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | if (mem->is_flushed == FALSE) { | 185 | if (!mem->is_flushed) { |
| 186 | bridge->driver->cache_flush(); | 186 | bridge->driver->cache_flush(); |
| 187 | mem->is_flushed = TRUE; | 187 | mem->is_flushed = true; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 190 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
| @@ -264,8 +264,8 @@ const struct agp_bridge_driver sgi_tioca_driver = { | |||
| 264 | .agp_alloc_page = sgi_tioca_alloc_page, | 264 | .agp_alloc_page = sgi_tioca_alloc_page, |
| 265 | .agp_destroy_page = agp_generic_destroy_page, | 265 | .agp_destroy_page = agp_generic_destroy_page, |
| 266 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 266 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 267 | .cant_use_aperture = 1, | 267 | .cant_use_aperture = true, |
| 268 | .needs_scratch_page = 0, | 268 | .needs_scratch_page = false, |
| 269 | .num_aperture_sizes = 1, | 269 | .num_aperture_sizes = 1, |
| 270 | }; | 270 | }; |
| 271 | 271 | ||
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c index e08934e58f32..0e054c134490 100644 --- a/drivers/char/agp/sworks-agp.c +++ b/drivers/char/agp/sworks-agp.c | |||
| @@ -339,9 +339,9 @@ static int serverworks_insert_memory(struct agp_memory *mem, | |||
| 339 | j++; | 339 | j++; |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | if (mem->is_flushed == FALSE) { | 342 | if (!mem->is_flushed) { |
| 343 | global_cache_flush(); | 343 | global_cache_flush(); |
| 344 | mem->is_flushed = TRUE; | 344 | mem->is_flushed = true; |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 347 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
| @@ -412,7 +412,7 @@ static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode) | |||
| 412 | bridge->capndx + PCI_AGP_COMMAND, | 412 | bridge->capndx + PCI_AGP_COMMAND, |
| 413 | command); | 413 | command); |
| 414 | 414 | ||
| 415 | agp_device_command(command, 0); | 415 | agp_device_command(command, false); |
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | static const struct agp_bridge_driver sworks_driver = { | 418 | static const struct agp_bridge_driver sworks_driver = { |
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 42c0a600b1ac..d2fa3cfca02a 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c | |||
| @@ -281,10 +281,10 @@ static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode) | |||
| 281 | 281 | ||
| 282 | if (uninorth_rev >= 0x30) { | 282 | if (uninorth_rev >= 0x30) { |
| 283 | /* This is an AGP V3 */ | 283 | /* This is an AGP V3 */ |
| 284 | agp_device_command(command, (status & AGPSTAT_MODE_3_0)); | 284 | agp_device_command(command, (status & AGPSTAT_MODE_3_0) != 0); |
| 285 | } else { | 285 | } else { |
| 286 | /* AGP V2 */ | 286 | /* AGP V2 */ |
| 287 | agp_device_command(command, 0); | 287 | agp_device_command(command, false); |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | uninorth_tlbflush(NULL); | 290 | uninorth_tlbflush(NULL); |
| @@ -511,7 +511,7 @@ const struct agp_bridge_driver uninorth_agp_driver = { | |||
| 511 | .agp_alloc_page = agp_generic_alloc_page, | 511 | .agp_alloc_page = agp_generic_alloc_page, |
| 512 | .agp_destroy_page = agp_generic_destroy_page, | 512 | .agp_destroy_page = agp_generic_destroy_page, |
| 513 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 513 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 514 | .cant_use_aperture = 1, | 514 | .cant_use_aperture = true, |
| 515 | }; | 515 | }; |
| 516 | 516 | ||
| 517 | const struct agp_bridge_driver u3_agp_driver = { | 517 | const struct agp_bridge_driver u3_agp_driver = { |
| @@ -536,8 +536,8 @@ const struct agp_bridge_driver u3_agp_driver = { | |||
| 536 | .agp_alloc_page = agp_generic_alloc_page, | 536 | .agp_alloc_page = agp_generic_alloc_page, |
| 537 | .agp_destroy_page = agp_generic_destroy_page, | 537 | .agp_destroy_page = agp_generic_destroy_page, |
| 538 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 538 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 539 | .cant_use_aperture = 1, | 539 | .cant_use_aperture = true, |
| 540 | .needs_scratch_page = 1, | 540 | .needs_scratch_page = true, |
| 541 | }; | 541 | }; |
| 542 | 542 | ||
| 543 | static struct agp_device_ids uninorth_agp_device_ids[] __devinitdata = { | 543 | static struct agp_device_ids uninorth_agp_device_ids[] __devinitdata = { |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 661d90d6cf7c..09b4478ffacd 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
| @@ -30,14 +30,6 @@ | |||
| 30 | #ifndef _AGP_BACKEND_H | 30 | #ifndef _AGP_BACKEND_H |
| 31 | #define _AGP_BACKEND_H 1 | 31 | #define _AGP_BACKEND_H 1 |
| 32 | 32 | ||
| 33 | #ifndef TRUE | ||
| 34 | #define TRUE 1 | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #ifndef FALSE | ||
| 38 | #define FALSE 0 | ||
| 39 | #endif | ||
| 40 | |||
| 41 | enum chipset_type { | 33 | enum chipset_type { |
| 42 | NOT_SUPPORTED, | 34 | NOT_SUPPORTED, |
| 43 | SUPPORTED, | 35 | SUPPORTED, |
| @@ -57,7 +49,7 @@ struct agp_kern_info { | |||
| 57 | size_t aper_size; | 49 | size_t aper_size; |
| 58 | int max_memory; /* In pages */ | 50 | int max_memory; /* In pages */ |
| 59 | int current_memory; | 51 | int current_memory; |
| 60 | int cant_use_aperture; | 52 | bool cant_use_aperture; |
| 61 | unsigned long page_mask; | 53 | unsigned long page_mask; |
| 62 | struct vm_operations_struct *vm_ops; | 54 | struct vm_operations_struct *vm_ops; |
| 63 | }; | 55 | }; |
| @@ -83,8 +75,8 @@ struct agp_memory { | |||
| 83 | off_t pg_start; | 75 | off_t pg_start; |
| 84 | u32 type; | 76 | u32 type; |
| 85 | u32 physical; | 77 | u32 physical; |
| 86 | u8 is_bound; | 78 | bool is_bound; |
| 87 | u8 is_flushed; | 79 | bool is_flushed; |
| 88 | u8 vmalloc_flag; | 80 | u8 vmalloc_flag; |
| 89 | }; | 81 | }; |
| 90 | 82 | ||
