[PATCH 2.4.31 5/9] gcc4: fix x86_64 acpi assembly error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On x86-64 gcc4 generates a compile-time error in acpi:

{standard input}: Assembler messages:
{standard input}:334: Error: suffix or operands invalid for `pop'
{standard input}:343: Error: suffix or operands invalid for `push'
{standard input}:411: Error: suffix or operands invalid for `pop'
{standard input}:425: Error: suffix or operands invalid for `push'
make[3]: *** [bus.o] Error 1
make[3]: Leaving directory `/tmp/linux-2.4.31/drivers/acpi'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/tmp/linux-2.4.31/drivers/acpi'
make[1]: *** [_subdir_acpi] Error 2
make[1]: Leaving directory `/tmp/linux-2.4.31/drivers'
make: *** [_dir_drivers] Error 2

This is because a 32-bit operand is used where x86_64 needs a
64-bit operand, leading to syntax errors in the assembly code.

The fix (backport from 2.6) is to use long for the offending operands.

Signed-off-by: Mikael Pettersson <[email protected]>

 drivers/acpi/bus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -rupN linux-2.4.31/drivers/acpi/bus.c linux-2.4.31.gcc4-x86_64-acpi-asm-errors/drivers/acpi/bus.c
--- linux-2.4.31/drivers/acpi/bus.c	2005-01-19 18:00:53.000000000 +0100
+++ linux-2.4.31.gcc4-x86_64-acpi-asm-errors/drivers/acpi/bus.c	2005-06-12 11:45:56.000000000 +0200
@@ -623,7 +623,7 @@ acpi_bus_generate_event (
 	int			data)
 {
 	struct acpi_bus_event	*event = NULL;
-	u32			flags = 0;
+	unsigned long		flags = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_bus_generate_event");
 
@@ -656,7 +656,7 @@ int
 acpi_bus_receive_event (
 	struct acpi_bus_event	*event)
 {
-	u32			flags = 0;
+	unsigned long		flags = 0;
 	struct acpi_bus_event	*entry = NULL;
 
 	DECLARE_WAITQUEUE(wait, current);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux