mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Andi Kleen <ak@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>, Mark Knecht <markknecht@gmail.com>,
	linux-kernel@vger.kernel.org, tony.luck@intel.com,
	acpi-devel@lists.sourceforge.net, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] cleanup u32 flags in acpi spin_lock calls.
Date: Thu, 6 Oct 2005 07:08:14 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0510060656490.28535@localhost.localdomain> (raw)
In-Reply-To: <200510061204.33045.ak@suse.de>


This is not an urgent issue, but was noticed in Ingo's RT kernel. There
are some places in ACPI that save flags as a u32 instead of a unsigned
long.  This is done indirectly by calling acpi_os_acquire_lock, which uses
unsigned long, but the flags returned are saved in the acpi code as a u32.

Since todays archs that use acpi, only care about the LS 32 bits of the
word, this is not really an issue.  But if there is an arch in the future
that changes that assumption, or (as RT does) some internal change in the
kernel that looks at the MSB of flags on a restore, this will be broken
for 64 bit machines.

This patch is just to make the ACPI code "clean".  That is, to use the
proper type for flags.

-- Steve

Note: You may notice that this patch has an -rt in the names, it does
      apply cleanly to 2.6.14-rc3.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>


--- linux-2.6.14-rc3-rt9/drivers/acpi/events/evgpe.c.orig	2005-10-06 04:15:40.000000000 -0400
+++ linux-2.6.14-rc3-rt9/drivers/acpi/events/evgpe.c	2005-10-06 04:15:46.000000000 -0400
@@ -377,7 +377,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_x
 	struct acpi_gpe_register_info *gpe_register_info;
 	u32 status_reg;
 	u32 enable_reg;
-	u32 flags;
+	unsigned long flags;
 	acpi_status status;
 	struct acpi_gpe_block_info *gpe_block;
 	acpi_native_uint i;
--- linux-2.6.14-rc3-rt9/drivers/acpi/events/evgpeblk.c.orig	2005-10-06 04:00:34.000000000 -0400
+++ linux-2.6.14-rc3-rt9/drivers/acpi/events/evgpeblk.c	2005-10-06 04:00:58.000000000 -0400
@@ -136,7 +136,7 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_G
 	struct acpi_gpe_block_info *gpe_block;
 	struct acpi_gpe_xrupt_info *gpe_xrupt_info;
 	acpi_status status = AE_OK;
-	u32 flags;
+	unsigned long flags;

 	ACPI_FUNCTION_TRACE("ev_walk_gpe_list");

@@ -479,7 +479,7 @@ static struct acpi_gpe_xrupt_info *acpi_
 	struct acpi_gpe_xrupt_info *next_gpe_xrupt;
 	struct acpi_gpe_xrupt_info *gpe_xrupt;
 	acpi_status status;
-	u32 flags;
+	unsigned long flags;

 	ACPI_FUNCTION_TRACE("ev_get_gpe_xrupt_block");

@@ -553,7 +553,7 @@ static acpi_status
 acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
 {
 	acpi_status status;
-	u32 flags;
+	unsigned long flags;

 	ACPI_FUNCTION_TRACE("ev_delete_gpe_xrupt");

@@ -610,7 +610,7 @@ acpi_ev_install_gpe_block(struct acpi_gp
 	struct acpi_gpe_block_info *next_gpe_block;
 	struct acpi_gpe_xrupt_info *gpe_xrupt_block;
 	acpi_status status;
-	u32 flags;
+	unsigned long flags;

 	ACPI_FUNCTION_TRACE("ev_install_gpe_block");

@@ -663,7 +663,7 @@ acpi_ev_install_gpe_block(struct acpi_gp
 acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
 {
 	acpi_status status;
-	u32 flags;
+	unsigned long flags;

 	ACPI_FUNCTION_TRACE("ev_install_gpe_block");

--- linux-2.6.14-rc3-rt9/drivers/acpi/events/evxface.c.orig	2005-10-06 04:16:27.000000000 -0400
+++ linux-2.6.14-rc3-rt9/drivers/acpi/events/evxface.c	2005-10-06 04:16:43.000000000 -0400
@@ -562,7 +562,7 @@ acpi_install_gpe_handler(acpi_handle gpe
 	struct acpi_gpe_event_info *gpe_event_info;
 	struct acpi_handler_info *handler;
 	acpi_status status;
-	u32 flags;
+	unsigned long flags;

 	ACPI_FUNCTION_TRACE("acpi_install_gpe_handler");

@@ -653,7 +653,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_
 	struct acpi_gpe_event_info *gpe_event_info;
 	struct acpi_handler_info *handler;
 	acpi_status status;
-	u32 flags;
+	unsigned long flags;

 	ACPI_FUNCTION_TRACE("acpi_remove_gpe_handler");


  reply	other threads:[~2005-10-06 11:08 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04  8:44 2.6.14-rc3-rt2 Ingo Molnar
2005-10-04 12:51 ` 2.6.14-rc3-rt2 K.R. Foley
2005-10-04 13:00   ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-04 13:45     ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-04 14:27       ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-04 15:16         ` 2.6.14-rc3-rt2 Dinakar Guniguntala
2005-10-04 15:32           ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-04 15:50             ` 2.6.14-rc3-rt2 Dinakar Guniguntala
2005-10-04 15:46               ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-04 16:09                 ` 2.6.14-rc3-rt2 Dinakar Guniguntala
2005-10-04 15:34           ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-04 16:09           ` 2.6.14-rc3-rt2 Daniel Walker
2005-10-04 16:32             ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-04 16:46               ` 2.6.14-rc3-rt2 Daniel Walker
2005-10-04 17:58             ` 2.6.14-rc3-rt2 Dinakar Guniguntala
2005-10-04 17:54               ` 2.6.14-rc3-rt2 Daniel Walker
2005-10-04 18:11                 ` 2.6.14-rc3-rt2 Dinakar Guniguntala
2005-10-04 18:27                   ` 2.6.14-rc3-rt2 Daniel Walker
2005-10-04 20:03                     ` 2.6.14-rc3-rt2 Dinakar Guniguntala
2005-10-05  7:37                       ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-04 14:25     ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-05  7:39       ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-04 16:44     ` 2.6.14-rc3-rt2 Mark Knecht
2005-10-04 18:11       ` 2.6.14-rc3-rt2 Mark Knecht
2005-10-04 18:20         ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-04 18:58           ` 2.6.14-rc3-rt2 Mark Knecht
2005-10-04 20:45             ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-04 20:49               ` 2.6.14-rc3-rt2 Mark Knecht
2005-10-04 20:53                 ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-04 21:21                   ` 2.6.14-rc3-rt2 Mark Knecht
2005-10-05 10:56                 ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-05 17:14                   ` 2.6.14-rc3-rt2 Mark Knecht
2005-10-06  7:54                     ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-06  8:06                     ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-06  8:10                       ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-06  8:29                         ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-06  8:33                           ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-06  8:44                             ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-06 16:04                             ` 2.6.14-rc3-rt2 Mark Knecht
2005-10-06  8:37                           ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-06  8:37                         ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-06  8:49                           ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-06  9:48                             ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-06 10:04                               ` 2.6.14-rc3-rt2 Andi Kleen
2005-10-06 11:08                                 ` Steven Rostedt [this message]
2005-10-06 16:25                                 ` 2.6.14-rc3-rt2 Luck, Tony
2005-10-06 15:26                             ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-07 11:08                               ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-07 11:15                                 ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-07 12:38                                   ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-07 13:26                                     ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-11  8:01                               ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-11  9:09                                 ` 2.6.14-rc3-rt12 Steven Rostedt
2005-10-11  9:12                                   ` 2.6.14-rc3-rt12 Ingo Molnar
2005-10-06  9:48                           ` 2.6.14-rc3-rt2 Andi Kleen
2005-10-06  9:36                         ` 2.6.14-rc3-rt2 Andi Kleen
2005-10-04 20:51               ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-05  7:12               ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-05 14:50                 ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-05  7:41               ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-04 20:38           ` 2.6.14-rc3-rt2 Mark Knecht
2005-10-06 14:31           ` 2.6.14-rc3-rt2 Lee Revell
2005-10-06 15:00             ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-05 13:36 ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-05 14:29   ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-05 15:41     ` 2.6.14-rc3-rt2 Daniel Walker
2005-10-05 15:48     ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-05 15:58       ` 2.6.14-rc3-rt2 david singleton
2005-10-05 16:08         ` 2.6.14-rc3-rt2 Thomas Gleixner
2005-10-05 16:13           ` 2.6.14-rc3-rt2 david singleton
2005-10-05 15:58       ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-05 16:07         ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-07 11:05           ` 2.6.14-rc3-rt2 Steven Rostedt
2005-10-07 11:14             ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-05 14:41   ` 2.6.14-rc3-rt2 Ingo Molnar
2005-10-05 20:24 ` 2.6.14-rc3-rt2 Esben Nielsen
2005-10-06 16:47 ` 2.6.14-rc3-rt2 Todd Kneisel
2005-10-06 17:18   ` 2.6.14-rc3-rt2 david singleton

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=Pine.LNX.4.58.0510060656490.28535@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markknecht@gmail.com \
    --cc=mingo@elte.hu \
    --cc=tony.luck@intel.com \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®