diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/acpica/tbxface.c | 17 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 11 | ||||
-rw-r--r-- | drivers/acpi/tables.c | 20 | ||||
-rw-r--r-- | drivers/firmware/iscsi_ibft.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_proc.c | 4 | ||||
-rw-r--r-- | drivers/net/ne3210.c | 3 | ||||
-rw-r--r-- | drivers/net/sfc/falcon.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/arlan-main.c | 4 | ||||
-rw-r--r-- | drivers/pci/dmar.c | 7 |
9 files changed, 62 insertions, 32 deletions
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c index c3e841f3cde9..ab0aff3c7d6a 100644 --- a/drivers/acpi/acpica/tbxface.c +++ b/drivers/acpi/acpica/tbxface.c | |||
@@ -365,7 +365,7 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id) | |||
365 | 365 | ||
366 | /******************************************************************************* | 366 | /******************************************************************************* |
367 | * | 367 | * |
368 | * FUNCTION: acpi_get_table | 368 | * FUNCTION: acpi_get_table_with_size |
369 | * | 369 | * |
370 | * PARAMETERS: Signature - ACPI signature of needed table | 370 | * PARAMETERS: Signature - ACPI signature of needed table |
371 | * Instance - Which instance (for SSDTs) | 371 | * Instance - Which instance (for SSDTs) |
@@ -377,8 +377,9 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id) | |||
377 | * | 377 | * |
378 | *****************************************************************************/ | 378 | *****************************************************************************/ |
379 | acpi_status | 379 | acpi_status |
380 | acpi_get_table(char *signature, | 380 | acpi_get_table_with_size(char *signature, |
381 | u32 instance, struct acpi_table_header **out_table) | 381 | u32 instance, struct acpi_table_header **out_table, |
382 | acpi_size *tbl_size) | ||
382 | { | 383 | { |
383 | u32 i; | 384 | u32 i; |
384 | u32 j; | 385 | u32 j; |
@@ -408,6 +409,7 @@ acpi_get_table(char *signature, | |||
408 | acpi_tb_verify_table(&acpi_gbl_root_table_list.tables[i]); | 409 | acpi_tb_verify_table(&acpi_gbl_root_table_list.tables[i]); |
409 | if (ACPI_SUCCESS(status)) { | 410 | if (ACPI_SUCCESS(status)) { |
410 | *out_table = acpi_gbl_root_table_list.tables[i].pointer; | 411 | *out_table = acpi_gbl_root_table_list.tables[i].pointer; |
412 | *tbl_size = acpi_gbl_root_table_list.tables[i].length; | ||
411 | } | 413 | } |
412 | 414 | ||
413 | if (!acpi_gbl_permanent_mmap) { | 415 | if (!acpi_gbl_permanent_mmap) { |
@@ -420,6 +422,15 @@ acpi_get_table(char *signature, | |||
420 | return (AE_NOT_FOUND); | 422 | return (AE_NOT_FOUND); |
421 | } | 423 | } |
422 | 424 | ||
425 | acpi_status | ||
426 | acpi_get_table(char *signature, | ||
427 | u32 instance, struct acpi_table_header **out_table) | ||
428 | { | ||
429 | acpi_size tbl_size; | ||
430 | |||
431 | return acpi_get_table_with_size(signature, | ||
432 | instance, out_table, &tbl_size); | ||
433 | } | ||
423 | ACPI_EXPORT_SYMBOL(acpi_get_table) | 434 | ACPI_EXPORT_SYMBOL(acpi_get_table) |
424 | 435 | ||
425 | /******************************************************************************* | 436 | /******************************************************************************* |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index b3193ec0a2ef..d1dd5160daa9 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -274,12 +274,19 @@ EXPORT_SYMBOL_GPL(acpi_os_map_memory); | |||
274 | 274 | ||
275 | void acpi_os_unmap_memory(void __iomem * virt, acpi_size size) | 275 | void acpi_os_unmap_memory(void __iomem * virt, acpi_size size) |
276 | { | 276 | { |
277 | if (acpi_gbl_permanent_mmap) { | 277 | if (acpi_gbl_permanent_mmap) |
278 | iounmap(virt); | 278 | iounmap(virt); |
279 | } | 279 | else |
280 | __acpi_unmap_table(virt, size); | ||
280 | } | 281 | } |
281 | EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); | 282 | EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); |
282 | 283 | ||
284 | void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size) | ||
285 | { | ||
286 | if (!acpi_gbl_permanent_mmap) | ||
287 | __acpi_unmap_table(virt, size); | ||
288 | } | ||
289 | |||
283 | #ifdef ACPI_FUTURE_USAGE | 290 | #ifdef ACPI_FUTURE_USAGE |
284 | acpi_status | 291 | acpi_status |
285 | acpi_os_get_physical_address(void *virt, acpi_physical_address * phys) | 292 | acpi_os_get_physical_address(void *virt, acpi_physical_address * phys) |
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index a8852952fac4..fec1ae36d431 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -181,14 +181,15 @@ acpi_table_parse_entries(char *id, | |||
181 | struct acpi_subtable_header *entry; | 181 | struct acpi_subtable_header *entry; |
182 | unsigned int count = 0; | 182 | unsigned int count = 0; |
183 | unsigned long table_end; | 183 | unsigned long table_end; |
184 | acpi_size tbl_size; | ||
184 | 185 | ||
185 | if (!handler) | 186 | if (!handler) |
186 | return -EINVAL; | 187 | return -EINVAL; |
187 | 188 | ||
188 | if (strncmp(id, ACPI_SIG_MADT, 4) == 0) | 189 | if (strncmp(id, ACPI_SIG_MADT, 4) == 0) |
189 | acpi_get_table(id, acpi_apic_instance, &table_header); | 190 | acpi_get_table_with_size(id, acpi_apic_instance, &table_header, &tbl_size); |
190 | else | 191 | else |
191 | acpi_get_table(id, 0, &table_header); | 192 | acpi_get_table_with_size(id, 0, &table_header, &tbl_size); |
192 | 193 | ||
193 | if (!table_header) { | 194 | if (!table_header) { |
194 | printk(KERN_WARNING PREFIX "%4.4s not present\n", id); | 195 | printk(KERN_WARNING PREFIX "%4.4s not present\n", id); |
@@ -206,8 +207,10 @@ acpi_table_parse_entries(char *id, | |||
206 | table_end) { | 207 | table_end) { |
207 | if (entry->type == entry_id | 208 | if (entry->type == entry_id |
208 | && (!max_entries || count++ < max_entries)) | 209 | && (!max_entries || count++ < max_entries)) |
209 | if (handler(entry, table_end)) | 210 | if (handler(entry, table_end)) { |
211 | early_acpi_os_unmap_memory((char *)table_header, tbl_size); | ||
210 | return -EINVAL; | 212 | return -EINVAL; |
213 | } | ||
211 | 214 | ||
212 | entry = (struct acpi_subtable_header *) | 215 | entry = (struct acpi_subtable_header *) |
213 | ((unsigned long)entry + entry->length); | 216 | ((unsigned long)entry + entry->length); |
@@ -217,6 +220,7 @@ acpi_table_parse_entries(char *id, | |||
217 | "%i found\n", id, entry_id, count - max_entries, count); | 220 | "%i found\n", id, entry_id, count - max_entries, count); |
218 | } | 221 | } |
219 | 222 | ||
223 | early_acpi_os_unmap_memory((char *)table_header, tbl_size); | ||
220 | return count; | 224 | return count; |
221 | } | 225 | } |
222 | 226 | ||
@@ -241,17 +245,19 @@ acpi_table_parse_madt(enum acpi_madt_type id, | |||
241 | int __init acpi_table_parse(char *id, acpi_table_handler handler) | 245 | int __init acpi_table_parse(char *id, acpi_table_handler handler) |
242 | { | 246 | { |
243 | struct acpi_table_header *table = NULL; | 247 | struct acpi_table_header *table = NULL; |
248 | acpi_size tbl_size; | ||
244 | 249 | ||
245 | if (!handler) | 250 | if (!handler) |
246 | return -EINVAL; | 251 | return -EINVAL; |
247 | 252 | ||
248 | if (strncmp(id, ACPI_SIG_MADT, 4) == 0) | 253 | if (strncmp(id, ACPI_SIG_MADT, 4) == 0) |
249 | acpi_get_table(id, acpi_apic_instance, &table); | 254 | acpi_get_table_with_size(id, acpi_apic_instance, &table, &tbl_size); |
250 | else | 255 | else |
251 | acpi_get_table(id, 0, &table); | 256 | acpi_get_table_with_size(id, 0, &table, &tbl_size); |
252 | 257 | ||
253 | if (table) { | 258 | if (table) { |
254 | handler(table); | 259 | handler(table); |
260 | early_acpi_os_unmap_memory(table, tbl_size); | ||
255 | return 0; | 261 | return 0; |
256 | } else | 262 | } else |
257 | return 1; | 263 | return 1; |
@@ -265,8 +271,9 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler) | |||
265 | static void __init check_multiple_madt(void) | 271 | static void __init check_multiple_madt(void) |
266 | { | 272 | { |
267 | struct acpi_table_header *table = NULL; | 273 | struct acpi_table_header *table = NULL; |
274 | acpi_size tbl_size; | ||
268 | 275 | ||
269 | acpi_get_table(ACPI_SIG_MADT, 2, &table); | 276 | acpi_get_table_with_size(ACPI_SIG_MADT, 2, &table, &tbl_size); |
270 | if (table) { | 277 | if (table) { |
271 | printk(KERN_WARNING PREFIX | 278 | printk(KERN_WARNING PREFIX |
272 | "BIOS bug: multiple APIC/MADT found," | 279 | "BIOS bug: multiple APIC/MADT found," |
@@ -275,6 +282,7 @@ static void __init check_multiple_madt(void) | |||
275 | "If \"acpi_apic_instance=%d\" works better, " | 282 | "If \"acpi_apic_instance=%d\" works better, " |
276 | "notify linux-acpi@vger.kernel.org\n", | 283 | "notify linux-acpi@vger.kernel.org\n", |
277 | acpi_apic_instance ? 0 : 2); | 284 | acpi_apic_instance ? 0 : 2); |
285 | early_acpi_os_unmap_memory(table, tbl_size); | ||
278 | 286 | ||
279 | } else | 287 | } else |
280 | acpi_apic_instance = 0; | 288 | acpi_apic_instance = 0; |
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index 3ab3e4a41d67..7b7ddc2d51c9 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c | |||
@@ -938,8 +938,8 @@ static int __init ibft_init(void) | |||
938 | return -ENOMEM; | 938 | return -ENOMEM; |
939 | 939 | ||
940 | if (ibft_addr) { | 940 | if (ibft_addr) { |
941 | printk(KERN_INFO "iBFT detected at 0x%lx.\n", | 941 | printk(KERN_INFO "iBFT detected at 0x%llx.\n", |
942 | virt_to_phys((void *)ibft_addr)); | 942 | (u64)virt_to_phys((void *)ibft_addr)); |
943 | 943 | ||
944 | rc = ibft_check_device(); | 944 | rc = ibft_check_device(); |
945 | if (rc) | 945 | if (rc) |
diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c index 8df849f66830..b756f043a5f4 100644 --- a/drivers/gpu/drm/drm_proc.c +++ b/drivers/gpu/drm/drm_proc.c | |||
@@ -678,9 +678,9 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request, | |||
678 | *start = &buf[offset]; | 678 | *start = &buf[offset]; |
679 | *eof = 0; | 679 | *eof = 0; |
680 | 680 | ||
681 | DRM_PROC_PRINT("vma use count: %d, high_memory = %p, 0x%08lx\n", | 681 | DRM_PROC_PRINT("vma use count: %d, high_memory = %p, 0x%llx\n", |
682 | atomic_read(&dev->vma_count), | 682 | atomic_read(&dev->vma_count), |
683 | high_memory, virt_to_phys(high_memory)); | 683 | high_memory, (u64)virt_to_phys(high_memory)); |
684 | list_for_each_entry(pt, &dev->vmalist, head) { | 684 | list_for_each_entry(pt, &dev->vmalist, head) { |
685 | if (!(vma = pt->vma)) | 685 | if (!(vma = pt->vma)) |
686 | continue; | 686 | continue; |
diff --git a/drivers/net/ne3210.c b/drivers/net/ne3210.c index fac43fd6fc87..6a843f7350ab 100644 --- a/drivers/net/ne3210.c +++ b/drivers/net/ne3210.c | |||
@@ -150,7 +150,8 @@ static int __init ne3210_eisa_probe (struct device *device) | |||
150 | if (phys_mem < virt_to_phys(high_memory)) { | 150 | if (phys_mem < virt_to_phys(high_memory)) { |
151 | printk(KERN_CRIT "ne3210.c: Card RAM overlaps with normal memory!!!\n"); | 151 | printk(KERN_CRIT "ne3210.c: Card RAM overlaps with normal memory!!!\n"); |
152 | printk(KERN_CRIT "ne3210.c: Use EISA SCU to set card memory below 1MB,\n"); | 152 | printk(KERN_CRIT "ne3210.c: Use EISA SCU to set card memory below 1MB,\n"); |
153 | printk(KERN_CRIT "ne3210.c: or to an address above 0x%lx.\n", virt_to_phys(high_memory)); | 153 | printk(KERN_CRIT "ne3210.c: or to an address above 0x%llx.\n", |
154 | (u64)virt_to_phys(high_memory)); | ||
154 | printk(KERN_CRIT "ne3210.c: Driver NOT installed.\n"); | 155 | printk(KERN_CRIT "ne3210.c: Driver NOT installed.\n"); |
155 | retval = -EINVAL; | 156 | retval = -EINVAL; |
156 | goto out3; | 157 | goto out3; |
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index d5378e60fcdd..064307c2277e 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -338,10 +338,10 @@ static int falcon_alloc_special_buffer(struct efx_nic *efx, | |||
338 | nic_data->next_buffer_table += buffer->entries; | 338 | nic_data->next_buffer_table += buffer->entries; |
339 | 339 | ||
340 | EFX_LOG(efx, "allocating special buffers %d-%d at %llx+%x " | 340 | EFX_LOG(efx, "allocating special buffers %d-%d at %llx+%x " |
341 | "(virt %p phys %lx)\n", buffer->index, | 341 | "(virt %p phys %llx)\n", buffer->index, |
342 | buffer->index + buffer->entries - 1, | 342 | buffer->index + buffer->entries - 1, |
343 | (unsigned long long)buffer->dma_addr, len, | 343 | (u64)buffer->dma_addr, len, |
344 | buffer->addr, virt_to_phys(buffer->addr)); | 344 | buffer->addr, (u64)virt_to_phys(buffer->addr)); |
345 | 345 | ||
346 | return 0; | 346 | return 0; |
347 | } | 347 | } |
@@ -353,10 +353,10 @@ static void falcon_free_special_buffer(struct efx_nic *efx, | |||
353 | return; | 353 | return; |
354 | 354 | ||
355 | EFX_LOG(efx, "deallocating special buffers %d-%d at %llx+%x " | 355 | EFX_LOG(efx, "deallocating special buffers %d-%d at %llx+%x " |
356 | "(virt %p phys %lx)\n", buffer->index, | 356 | "(virt %p phys %llx)\n", buffer->index, |
357 | buffer->index + buffer->entries - 1, | 357 | buffer->index + buffer->entries - 1, |
358 | (unsigned long long)buffer->dma_addr, buffer->len, | 358 | (u64)buffer->dma_addr, buffer->len, |
359 | buffer->addr, virt_to_phys(buffer->addr)); | 359 | buffer->addr, (u64)virt_to_phys(buffer->addr)); |
360 | 360 | ||
361 | pci_free_consistent(efx->pci_dev, buffer->len, buffer->addr, | 361 | pci_free_consistent(efx->pci_dev, buffer->len, buffer->addr, |
362 | buffer->dma_addr); | 362 | buffer->dma_addr); |
@@ -2343,10 +2343,10 @@ int falcon_probe_port(struct efx_nic *efx) | |||
2343 | FALCON_MAC_STATS_SIZE); | 2343 | FALCON_MAC_STATS_SIZE); |
2344 | if (rc) | 2344 | if (rc) |
2345 | return rc; | 2345 | return rc; |
2346 | EFX_LOG(efx, "stats buffer at %llx (virt %p phys %lx)\n", | 2346 | EFX_LOG(efx, "stats buffer at %llx (virt %p phys %llx)\n", |
2347 | (unsigned long long)efx->stats_buffer.dma_addr, | 2347 | (u64)efx->stats_buffer.dma_addr, |
2348 | efx->stats_buffer.addr, | 2348 | efx->stats_buffer.addr, |
2349 | virt_to_phys(efx->stats_buffer.addr)); | 2349 | (u64)virt_to_phys(efx->stats_buffer.addr)); |
2350 | 2350 | ||
2351 | return 0; | 2351 | return 0; |
2352 | } | 2352 | } |
@@ -2921,9 +2921,9 @@ int falcon_probe_nic(struct efx_nic *efx) | |||
2921 | goto fail4; | 2921 | goto fail4; |
2922 | BUG_ON(efx->irq_status.dma_addr & 0x0f); | 2922 | BUG_ON(efx->irq_status.dma_addr & 0x0f); |
2923 | 2923 | ||
2924 | EFX_LOG(efx, "INT_KER at %llx (virt %p phys %lx)\n", | 2924 | EFX_LOG(efx, "INT_KER at %llx (virt %p phys %llx)\n", |
2925 | (unsigned long long)efx->irq_status.dma_addr, | 2925 | (u64)efx->irq_status.dma_addr, |
2926 | efx->irq_status.addr, virt_to_phys(efx->irq_status.addr)); | 2926 | efx->irq_status.addr, (u64)virt_to_phys(efx->irq_status.addr)); |
2927 | 2927 | ||
2928 | falcon_probe_spi_devices(efx); | 2928 | falcon_probe_spi_devices(efx); |
2929 | 2929 | ||
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index bfca15da6f0f..14c11656e82c 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -1082,8 +1082,8 @@ static int __init arlan_probe_here(struct net_device *dev, | |||
1082 | if (arlan_check_fingerprint(memaddr)) | 1082 | if (arlan_check_fingerprint(memaddr)) |
1083 | return -ENODEV; | 1083 | return -ENODEV; |
1084 | 1084 | ||
1085 | printk(KERN_NOTICE "%s: Arlan found at %x, \n ", dev->name, | 1085 | printk(KERN_NOTICE "%s: Arlan found at %llx, \n ", dev->name, |
1086 | (int) virt_to_phys((void*)memaddr)); | 1086 | (u64) virt_to_phys((void*)memaddr)); |
1087 | 1087 | ||
1088 | ap->card = (void *) memaddr; | 1088 | ap->card = (void *) memaddr; |
1089 | dev->mem_start = memaddr; | 1089 | dev->mem_start = memaddr; |
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index f5a662a50acb..519f5f91e765 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -42,6 +42,7 @@ | |||
42 | LIST_HEAD(dmar_drhd_units); | 42 | LIST_HEAD(dmar_drhd_units); |
43 | 43 | ||
44 | static struct acpi_table_header * __initdata dmar_tbl; | 44 | static struct acpi_table_header * __initdata dmar_tbl; |
45 | static acpi_size dmar_tbl_size; | ||
45 | 46 | ||
46 | static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) | 47 | static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) |
47 | { | 48 | { |
@@ -288,8 +289,9 @@ static int __init dmar_table_detect(void) | |||
288 | acpi_status status = AE_OK; | 289 | acpi_status status = AE_OK; |
289 | 290 | ||
290 | /* if we could find DMAR table, then there are DMAR devices */ | 291 | /* if we could find DMAR table, then there are DMAR devices */ |
291 | status = acpi_get_table(ACPI_SIG_DMAR, 0, | 292 | status = acpi_get_table_with_size(ACPI_SIG_DMAR, 0, |
292 | (struct acpi_table_header **)&dmar_tbl); | 293 | (struct acpi_table_header **)&dmar_tbl, |
294 | &dmar_tbl_size); | ||
293 | 295 | ||
294 | if (ACPI_SUCCESS(status) && !dmar_tbl) { | 296 | if (ACPI_SUCCESS(status) && !dmar_tbl) { |
295 | printk (KERN_WARNING PREFIX "Unable to map DMAR\n"); | 297 | printk (KERN_WARNING PREFIX "Unable to map DMAR\n"); |
@@ -481,6 +483,7 @@ void __init detect_intel_iommu(void) | |||
481 | iommu_detected = 1; | 483 | iommu_detected = 1; |
482 | #endif | 484 | #endif |
483 | } | 485 | } |
486 | early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size); | ||
484 | dmar_tbl = NULL; | 487 | dmar_tbl = NULL; |
485 | } | 488 | } |
486 | 489 | ||