From patchwork Tue May 18 18:07:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 100574 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4IIQ0sI016873 for ; Tue, 18 May 2010 18:26:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753260Ab0ERS0A (ORCPT ); Tue, 18 May 2010 14:26:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4610 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424Ab0ERSZ7 (ORCPT ); Tue, 18 May 2010 14:25:59 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4IIPtiX008222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 May 2010 14:25:56 -0400 Received: from cavan.codon.org.uk (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4IIPs23005641 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 18 May 2010 14:25:55 -0400 Received: from [66.187.234.200] (helo=localhost.localdomain) by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OERD9-0007oY-PJ; Tue, 18 May 2010 19:08:11 +0100 From: Matthew Garrett To: linux-acpi@vger.kernel.org Cc: robert.moore@intel.com, lenb@kernel.org, Matthew Garrett Subject: [PATCH] ACPI: Ignore the upper bits of SystemIO addresses Date: Tue, 18 May 2010 14:07:15 -0400 Message-Id: <1274206035-10571-1-git-send-email-mjg@redhat.com> X-SA-Do-Not-Run: Yes X-SA-Exim-Connect-IP: 66.187.234.200 X-SA-Exim-Mail-From: mjg@redhat.com X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 18 May 2010 18:26:01 +0000 (UTC) diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c index e26c17d..ddfb4f1 100644 --- a/drivers/acpi/acpica/hwvalid.c +++ b/drivers/acpi/acpica/hwvalid.c @@ -146,15 +146,6 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width) last_address), byte_width)); - /* Maximum 16-bit address in I/O space */ - - if (last_address > ACPI_UINT16_MAX) { - ACPI_ERROR((AE_INFO, - "Illegal I/O port address/length above 64K: 0x%p/%X", - ACPI_CAST_PTR(void, address), byte_width)); - return_ACPI_STATUS(AE_LIMIT); - } - /* Exit if requested address is not within the protected port table */ if (address > acpi_protected_ports[ACPI_PORT_INFO_ENTRIES - 1].end) { @@ -222,6 +213,10 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width) u32 one_byte; u32 i; + /* Windows only uses the lower 16 bits of an address. Emulate that */ + + address &= 0xffff; + /* Validate the entire request and perform the I/O */ status = acpi_hw_validate_io_request(address, width); @@ -279,6 +274,10 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width) acpi_status status; u32 i; + /* Windows only uses the lower 16 bits of an address. Emulate that */ + + address &= 0xffff; + /* Validate the entire request and perform the I/O */ status = acpi_hw_validate_io_request(address, width);