Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[powerpc.git] / drivers / acpi / tables / tbrsdt.c
index 9e22643..abcb08c 100644 (file)
@@ -78,7 +78,7 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address)
                 */
                status = acpi_os_map_memory(address->pointer.physical,
                                            sizeof(struct rsdp_descriptor),
-                                           (void *)&rsdp);
+                                           ACPI_CAST_PTR(void, &rsdp));
                if (ACPI_FAILURE(status)) {
                        return_ACPI_STATUS(status);
                }
@@ -95,11 +95,16 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address)
                goto cleanup;
        }
 
-       /* The RSDP supplied is OK */
+       /* RSDP is ok. Init the table info */
 
        table_info.pointer = ACPI_CAST_PTR(struct acpi_table_header, rsdp);
        table_info.length = sizeof(struct rsdp_descriptor);
-       table_info.allocation = ACPI_MEM_MAPPED;
+
+       if (address->pointer_type == ACPI_PHYSICAL_POINTER) {
+               table_info.allocation = ACPI_MEM_MAPPED;
+       } else {
+               table_info.allocation = ACPI_MEM_NOT_ALLOCATED;
+       }
 
        /* Save the table pointers and allocation info */
 
@@ -196,10 +201,8 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr)
                ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20);
 
                ACPI_ERROR((AE_INFO,
-                           "RSDT/XSDT signature at %X (%p) is invalid",
-                           acpi_gbl_RSDP->rsdt_physical_address,
-                           (void *)(acpi_native_uint) acpi_gbl_RSDP->
-                           rsdt_physical_address));
+                           "RSDT/XSDT signature at %X is invalid",
+                           acpi_gbl_RSDP->rsdt_physical_address));
 
                if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
                        ACPI_ERROR((AE_INFO, "Looking for RSDT"));