SMP: allow compilation with clang
Change-Id: Iec57820d150f2436cb3b7c543f662d3313197a4c
This commit is contained in:
@@ -1959,7 +1959,7 @@ do_pcibridge(int busind)
|
||||
* pci_intel_init *
|
||||
*===========================================================================*/
|
||||
static void
|
||||
pci_intel_init()
|
||||
pci_intel_init(void)
|
||||
{
|
||||
/* Try to detect a know PCI controller. Read the Vendor ID and
|
||||
* the Device ID for function 0 of device 0.
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
|
||||
#if defined(CONFIG_SMP) && defined(__GNUC__)
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
static inline void bits_fill(bitchunk_t * chunks, unsigned bits)
|
||||
{
|
||||
unsigned c, cnt;
|
||||
|
||||
@@ -84,6 +84,8 @@ OBJS.kernel+= ${UNPAGED_OBJS}
|
||||
|
||||
.ifdef CONFIG_SMP
|
||||
SRCS += arch_smp.c trampoline.S
|
||||
# trampoline.S uses .code16, which is unsupported by clang.
|
||||
AFLAGS.trampoline.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
|
||||
.endif
|
||||
|
||||
.if ${USE_ACPI} != "no"
|
||||
|
||||
@@ -19,9 +19,9 @@ typedef struct spinlock {
|
||||
#else
|
||||
|
||||
/* SMP */
|
||||
#define SPINLOCK_DEFINE(name) spinlock_t name;
|
||||
#define SPINLOCK_DEFINE(name) spinlock_t name = { .val = 0 };
|
||||
#define PRIVATE_SPINLOCK_DEFINE(name) PRIVATE SPINLOCK_DEFINE(name)
|
||||
#define SPINLOCK_DECLARE(name) extern SPINLOCK_DEFINE(name)
|
||||
#define SPINLOCK_DECLARE(name) extern spinlock_t name;
|
||||
#define spinlock_init(sl) do { (sl)->val = 0; } while (0)
|
||||
|
||||
#if CONFIG_MAX_CPUS == 1
|
||||
|
||||
Reference in New Issue
Block a user