mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 05:08:24 +00:00
x86: move arch-specific asmlinkage to <asm/linkage.h>
Commit65dd74a674
(x86: ivybridge: Implement SDRAM init) introduced x86-specific asmlinkage into arch/x86/include/asm/config.h. Commited0a2fbf14
(x86: Add a definition of asmlinkage) added the same macro define again, this time, into include/common.h. (Please do not add arch-specific stuff to include/common.h any more; it is already too cluttered.) The generic asmlinkage is defined in <linux/linkage.h>. If you want to override it with an arch-specific one, the best way is to add it to <asm/linkage.h> like Linux Kernel. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ba7b38a529
commit
e6126a5872
7 changed files with 13 additions and 4 deletions
|
@ -7,6 +7,8 @@
|
||||||
#ifndef ASM_ARCH_PEI_DATA_H
|
#ifndef ASM_ARCH_PEI_DATA_H
|
||||||
#define ASM_ARCH_PEI_DATA_H
|
#define ASM_ARCH_PEI_DATA_H
|
||||||
|
|
||||||
|
#include <linux/linkage.h>
|
||||||
|
|
||||||
struct pch_usb3_controller_settings {
|
struct pch_usb3_controller_settings {
|
||||||
/* 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto */
|
/* 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto */
|
||||||
uint16_t mode;
|
uint16_t mode;
|
||||||
|
|
|
@ -10,6 +10,5 @@
|
||||||
#define CONFIG_SYS_GENERIC_BOARD
|
#define CONFIG_SYS_GENERIC_BOARD
|
||||||
#define CONFIG_LMB
|
#define CONFIG_LMB
|
||||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||||
#define asmlinkage __attribute__((regparm(0)))
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
6
arch/x86/include/asm/linkage.h
Normal file
6
arch/x86/include/asm/linkage.h
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef _ASM_X86_LINKAGE_H
|
||||||
|
#define _ASM_X86_LINKAGE_H
|
||||||
|
|
||||||
|
#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
|
||||||
|
|
||||||
|
#endif /* _ASM_X86_LINKAGE_H */
|
|
@ -9,6 +9,7 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <bios_emul.h>
|
#include <bios_emul.h>
|
||||||
#include <vbe.h>
|
#include <vbe.h>
|
||||||
|
#include <linux/linkage.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/i8259.h>
|
#include <asm/i8259.h>
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#ifndef _X86_LIB_BIOS_H
|
#ifndef _X86_LIB_BIOS_H
|
||||||
#define _X86_LIB_BIOS_H
|
#define _X86_LIB_BIOS_H
|
||||||
|
|
||||||
|
#include <linux/linkage.h>
|
||||||
|
|
||||||
#define REALMODE_BASE 0x600
|
#define REALMODE_BASE 0x600
|
||||||
|
|
||||||
#ifdef __ASSEMBLY__
|
#ifdef __ASSEMBLY__
|
||||||
|
|
|
@ -73,9 +73,6 @@ typedef volatile unsigned char vu_char;
|
||||||
#ifdef CONFIG_ARM
|
#ifdef CONFIG_ARM
|
||||||
#define asmlinkage /* nothing */
|
#define asmlinkage /* nothing */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_X86
|
|
||||||
#define asmlinkage __attribute__((regparm(0)))
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_BLACKFIN
|
#ifdef CONFIG_BLACKFIN
|
||||||
#include <asm/blackfin.h>
|
#include <asm/blackfin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
#define CPP_ASMLINKAGE
|
#define CPP_ASMLINKAGE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef asmlinkage
|
||||||
#define asmlinkage CPP_ASMLINKAGE
|
#define asmlinkage CPP_ASMLINKAGE
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SYMBOL_NAME_STR(X) #X
|
#define SYMBOL_NAME_STR(X) #X
|
||||||
#define SYMBOL_NAME(X) X
|
#define SYMBOL_NAME(X) X
|
||||||
|
|
Loading…
Add table
Reference in a new issue