Document origin of include/arch/x86/arch/spinlock.h and use proper

header. Some other minor fixes (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@431 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Uwe Hermann 2007-07-03 16:58:16 +00:00
parent b9269ea2a2
commit 4fff36c35c
3 changed files with 20 additions and 22 deletions

View file

@ -95,6 +95,11 @@ Third-party Code and License Overview
Files: include/asm-i386/processor.h, arch/i386/kernel/cpu/mtrr/state.c
Current version we use: 297d9c035edd04327fedc0d1da27c2b112b66fcc (06/2007)
* include/arch/x86/arch/spinlock.h: GPLv2
Source: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Files: include/asm-i386/spinlock.h, include/asm-i386/spinlock_types.h
Current version we use: 139ec7c416248b9ea227d21839235344edfee1e0 (12/2006)
* include/arch/x86/swab.h: GPLv2
Source: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Current version we use: ?

View file

@ -1,35 +1,26 @@
/*
* This file is part of the LinuxBIOS project.
*
* Copyright (C) 2001 Linux Networx
* Copyright (C) 2007 coresystems GmbH
* It is based on the Linux kernel file include/asm-i386/spinlock.h.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Modifications are:
* Copyright (C) 2001 Linux Networx
* (Written by Eric Biederman <ebiederman@lnxi.com> for Linux Networx)
* Copyright (C) 2007 coresystems GmbH
* (Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH)
*/
#ifndef ARCH_SPINLOCK_H
#define ARCH_SPINLOCK_H
/*
* Your basic SMP spinlocks, allowing only a single CPU anywhere
* Your basic SMP spinlocks, allowing only a single CPU anywhere.
*/
struct spinlock {
volatile unsigned int lock;
};
#define SPIN_LOCK_UNLOCKED (struct spinlock) { 1 }
/*
@ -38,7 +29,7 @@ struct spinlock {
*
* We make no fairness assumptions. They have a cost.
*/
#define barrier() __asm__ __volatile__("": : :"memory")
#define barrier() __asm__ __volatile__("": : :"memory")
#define spin_is_locked(x) (*(volatile char *)(&(x)->lock) <= 0)
#define spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x))
@ -76,5 +67,4 @@ static inline __attribute__((always_inline)) void spin_unlock(struct spinlock *l
#define spin_define(spin) static struct spinlock spin = SPIN_LOCK_UNLOCKED
#endif /* ARCH_SPINLOCK_H */

View file

@ -2,20 +2,22 @@
* This file is part of the LinuxBIOS project.
*
* Copyright (C) 2001 Linux Networx
* (Written by Eric Biederman <ebiederman@lnxi.com> for Linux Networx)
* Copyright (C) 2007 coresystems GmbH
* (Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef SPINLOCK_H
@ -32,7 +34,8 @@
#define spin_unlock_wait(lock) do {} while(0)
#define spin_lock(lock) do {} while(0)
#define spin_unlock(lock) do {} while(0)
#define spin_define(lock) /* empty */
#define spin_define(lock) /* empty */
#endif
#endif /* SPINLOCK_H */