public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: "George G. Davis" <ggdavisiv@gmail.com>
To: stable@vger.kernel.org
Cc: Dirk Behme <dirk.behme@gmail.com>, Lv Zheng <lv.zheng@intel.com>,
	Bob Moore <robert.moore@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"George G. Davis" <george_davis@mentor.com>
Subject: [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address.
Date: Tue, 12 May 2015 17:28:19 -0400	[thread overview]
Message-ID: <1431466102-8276-2-git-send-email-ggdavisiv@gmail.com> (raw)
In-Reply-To: <1431466102-8276-1-git-send-email-ggdavisiv@gmail.com>

From: Lv Zheng <lv.zheng@intel.com>

commit f254e3c57b9d952e987502aefa0804c177dd2503 upstream.

ACPICA commit 7d9fd64397d7c38899d3dc497525f6e6b044e0e3

OSPMs like Linux expect an acpi_physical_address returning value from
acpi_find_root_pointer(). This triggers warnings if sizeof (acpi_size) doesn't
equal to sizeof (acpi_physical_address):
  drivers/acpi/osl.c:275:3: warning: passing argument 1 of 'acpi_find_root_pointer' from incompatible pointer type [enabled by default]
  In file included from include/acpi/acpi.h:64:0,
                   from include/linux/acpi.h:36,
                   from drivers/acpi/osl.c:41:
  include/acpi/acpixf.h:433:1: note: expected 'acpi_size *' but argument is of type 'acpi_physical_address *'
This patch corrects acpi_find_root_pointer().

Link: https://github.com/acpica/acpica/commit/7d9fd643
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: George G. Davis <george_davis@mentor.com>
---
 drivers/acpi/acpica/tbxfroot.c | 7 ++++---
 include/acpi/acpixf.h          | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index e4e1468..01bf7eb 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -111,7 +111,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
  *
  ******************************************************************************/
 
-acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
+acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address)
 {
 	u8 *table_ptr;
 	u8 *mem_rover;
@@ -169,7 +169,8 @@ acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
 			physical_address +=
 			    (u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
 
-			*table_address = physical_address;
+			*table_address =
+			    (acpi_physical_address) physical_address;
 			return_ACPI_STATUS(AE_OK);
 		}
 	}
@@ -202,7 +203,7 @@ acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
 		    (ACPI_HI_RSDP_WINDOW_BASE +
 		     ACPI_PTR_DIFF(mem_rover, table_ptr));
 
-		*table_address = physical_address;
+		*table_address = (acpi_physical_address) physical_address;
 		return_ACPI_STATUS(AE_OK);
 	}
 
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index fea6773..5d51f27 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -175,7 +175,7 @@ acpi_status __init acpi_load_tables(void);
  */
 acpi_status __init acpi_reallocate_root_table(void);
 
-acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
+acpi_status __init acpi_find_root_pointer(acpi_physical_address * rsdp_address);
 
 acpi_status acpi_unload_table_id(acpi_owner_id id);
 
-- 
1.9.3


  reply	other threads:[~2015-05-12 21:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 21:28 [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings George G. Davis
2015-05-12 21:28 ` George G. Davis [this message]
2015-05-15  1:43   ` [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address Greg KH
2015-05-15 15:01     ` George G. Davis
2015-05-12 21:28 ` [PATCH 2/4] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() George G. Davis
2015-05-12 21:28 ` [PATCH 3/4] ACPICA: Utilities: Cleanup to convert physical address printing formats George G. Davis
2015-05-15 20:41   ` Greg KH
2015-05-18 19:39     ` [PATCH 3.10 v2 1/2] " George G. Davis
2015-05-18 19:39       ` [PATCH 3.10 v2 2/2] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers George G. Davis
2015-05-12 21:28 ` [PATCH 4/4] " George G. Davis
2015-05-15 20:46   ` Greg KH
2015-05-19 10:57 ` [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431466102-8276-2-git-send-email-ggdavisiv@gmail.com \
    --to=ggdavisiv@gmail.com \
    --cc=dirk.behme@gmail.com \
    --cc=george_davis@mentor.com \
    --cc=lv.zheng@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox