Skip to content

Commit

Permalink
[ARM] 4494/1: iop13xx: fix up elf_hwcap compile breakage
Browse files Browse the repository at this point in the history
arch/arm/boot/compressed/misc.o: In function `valid_user_regs':
misc.c:(.text+0x74): undefined reference to `elf_hwcap'

This triggers after the various elf_hwcap cleanups in:
f884b1c
d1cbbd6

include/asm-arm/arch-iop13xx/uncompress.h calls cpu_relax while spinning on
a register value.  cpu_relax requires processor.h->ptrace.h->hwcap.h

'elf_hwcap' is defined as an extern, but since the uncompressor does not
link against arch/arm/kernel/setup.c 'elf_hwcap' remains undefined.

Fix is to open code the cpu_relax() call as barrier().

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Dan Williams authored and Russell King committed Jul 20, 2007
1 parent a8135fc commit 7dea1b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/asm-arm/arch-iop13xx/uncompress.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#include <asm/types.h>
#include <linux/serial_reg.h>
#include <asm/hardware.h>
#include <asm/processor.h>

#define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS)
#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)

static inline void putc(char c)
{
while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE)
cpu_relax();
barrier();
UART_BASE[UART_TX] = c;
}

Expand Down

0 comments on commit 7dea1b2

Please sign in to comment.