diff --git a/HACKING b/HACKING index b663322a8b..185d794f69 100644 --- a/HACKING +++ b/HACKING @@ -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: ? diff --git a/include/arch/x86/arch/spinlock.h b/include/arch/x86/arch/spinlock.h index f73ed7d13f..83819e0806 100644 --- a/include/arch/x86/arch/spinlock.h +++ b/include/arch/x86/arch/spinlock.h @@ -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 for Linux Networx) + * Copyright (C) 2007 coresystems GmbH + * (Written by Stefan Reinauer 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 */ diff --git a/include/spinlock.h b/include/spinlock.h index b556617d06..c475d2d72a 100644 --- a/include/spinlock.h +++ b/include/spinlock.h @@ -2,20 +2,22 @@ * This file is part of the LinuxBIOS project. * * Copyright (C) 2001 Linux Networx + * (Written by Eric Biederman for Linux Networx) * Copyright (C) 2007 coresystems GmbH + * (Written by Stefan Reinauer 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 */