Unverified Commit 85b38b51 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9948 ACPICA: Revert "ACPICA: avoid Info: mapping multiple BARs. Your kernel is fine."

parents a96cb8eb e4ae95ea
Loading
Loading
Loading
Loading
+2 −21
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ acpi_ex_system_memory_space_handler(u32 function,
	struct acpi_mem_space_context *mem_info = region_context;
	u32 length;
	acpi_size map_length;
	acpi_size page_boundary_map_length;
#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
	u32 remainder;
#endif
@@ -120,26 +119,8 @@ acpi_ex_system_memory_space_handler(u32 function,
		map_length = (acpi_size)
		    ((mem_info->address + mem_info->length) - address);

		/*
		 * If mapping the entire remaining portion of the region will cross
		 * a page boundary, just map up to the page boundary, do not cross.
		 * On some systems, crossing a page boundary while mapping regions
		 * can cause warnings if the pages have different attributes
		 * due to resource management.
		 *
		 * This has the added benefit of constraining a single mapping to
		 * one page, which is similar to the original code that used a 4k
		 * maximum window.
		 */
		page_boundary_map_length = (acpi_size)
		    (ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address);
		if (page_boundary_map_length == 0) {
			page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
		}

		if (map_length > page_boundary_map_length) {
			map_length = page_boundary_map_length;
		}
		if (map_length > ACPI_DEFAULT_PAGE_SIZE)
			map_length = ACPI_DEFAULT_PAGE_SIZE;

		/* Create a new mapping starting at the address given */