hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/char/agp/generic.c
....@@ -42,7 +42,6 @@
4242 #ifdef CONFIG_X86
4343 #include <asm/set_memory.h>
4444 #endif
45
-#include <asm/pgtable.h>
4645 #include "agp.h"
4746
4847 __u32 *agp_gatt_table;
....@@ -207,6 +206,7 @@
207206 /**
208207 * agp_allocate_memory - allocate a group of pages of a certain type.
209208 *
209
+ * @bridge: an agp_bridge_data struct allocated for the AGP host bridge.
210210 * @page_count: size_t argument of the number of pages
211211 * @type: u32 argument of the type of memory to be allocated.
212212 *
....@@ -355,6 +355,7 @@
355355 /**
356356 * agp_copy_info - copy bridge state information
357357 *
358
+ * @bridge: an agp_bridge_data struct allocated for the AGP host bridge.
358359 * @info: agp_kern_info pointer. The caller should insure that this pointer is valid.
359360 *
360361 * This function copies information about the agp bridge device and the state of
....@@ -850,7 +851,6 @@
850851 {
851852 char *table;
852853 char *table_end;
853
- int size;
854854 int page_order;
855855 int num_entries;
856856 int i;
....@@ -864,25 +864,22 @@
864864 table = NULL;
865865 i = bridge->aperture_size_idx;
866866 temp = bridge->current_size;
867
- size = page_order = num_entries = 0;
867
+ page_order = num_entries = 0;
868868
869869 if (bridge->driver->size_type != FIXED_APER_SIZE) {
870870 do {
871871 switch (bridge->driver->size_type) {
872872 case U8_APER_SIZE:
873
- size = A_SIZE_8(temp)->size;
874873 page_order =
875874 A_SIZE_8(temp)->page_order;
876875 num_entries =
877876 A_SIZE_8(temp)->num_entries;
878877 break;
879878 case U16_APER_SIZE:
880
- size = A_SIZE_16(temp)->size;
881879 page_order = A_SIZE_16(temp)->page_order;
882880 num_entries = A_SIZE_16(temp)->num_entries;
883881 break;
884882 case U32_APER_SIZE:
885
- size = A_SIZE_32(temp)->size;
886883 page_order = A_SIZE_32(temp)->page_order;
887884 num_entries = A_SIZE_32(temp)->num_entries;
888885 break;
....@@ -890,7 +887,7 @@
890887 case FIXED_APER_SIZE:
891888 case LVL2_APER_SIZE:
892889 default:
893
- size = page_order = num_entries = 0;
890
+ page_order = num_entries = 0;
894891 break;
895892 }
896893
....@@ -920,7 +917,6 @@
920917 }
921918 } while (!table && (i < bridge->driver->num_aperture_sizes));
922919 } else {
923
- size = ((struct aper_size_info_fixed *) temp)->size;
924920 page_order = ((struct aper_size_info_fixed *) temp)->page_order;
925921 num_entries = ((struct aper_size_info_fixed *) temp)->num_entries;
926922 table = alloc_gatt_pages(page_order);
....@@ -944,7 +940,7 @@
944940
945941 bridge->gatt_table = (u32 __iomem *)table;
946942 #else
947
- bridge->gatt_table = ioremap_nocache(virt_to_phys(table),
943
+ bridge->gatt_table = ioremap(virt_to_phys(table),
948944 (PAGE_SIZE * (1 << page_order)));
949945 bridge->driver->cache_flush();
950946 #endif
....@@ -1282,6 +1278,7 @@
12821278 /**
12831279 * agp_enable - initialise the agp point-to-point connection.
12841280 *
1281
+ * @bridge: an agp_bridge_data struct allocated for the AGP host bridge.
12851282 * @mode: agp mode register value to configure with.
12861283 */
12871284 void agp_enable(struct agp_bridge_data *bridge, u32 mode)
....@@ -1311,8 +1308,7 @@
13111308
13121309 void global_cache_flush(void)
13131310 {
1314
- if (on_each_cpu(ipi_handler, NULL, 1) != 0)
1315
- panic(PFX "timed out waiting for the other CPUs!\n");
1311
+ on_each_cpu(ipi_handler, NULL, 1);
13161312 }
13171313 EXPORT_SYMBOL(global_cache_flush);
13181314