Please do not remove license headers.
All files must have a valid license header, also the imported ones. If we can not determine the license, we can not use the code.
* svn@openbios.org svn@openbios.org [070703 18:58]:
Author: uwe Date: 2007-07-03 18:58:16 +0200 (Tue, 03 Jul 2007) New Revision: 431
Modified: LinuxBIOSv3/HACKING LinuxBIOSv3/include/arch/x86/arch/spinlock.h LinuxBIOSv3/include/spinlock.h Log: 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
Modified: LinuxBIOSv3/HACKING
--- LinuxBIOSv3/HACKING 2007-07-02 20:57:45 UTC (rev 430) +++ LinuxBIOSv3/HACKING 2007-07-03 16:58:16 UTC (rev 431) @@ -95,6 +95,11 @@ 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: ?
Modified: LinuxBIOSv3/include/arch/x86/arch/spinlock.h
--- LinuxBIOSv3/include/arch/x86/arch/spinlock.h 2007-07-02 20:57:45 UTC (rev 430) +++ LinuxBIOSv3/include/arch/x86/arch/spinlock.h 2007-07-03 16:58:16 UTC (rev 431) @@ -1,35 +1,26 @@ /*
- This file is part of the LinuxBIOS project.
- It is based on the Linux kernel file include/asm-i386/spinlock.h.
- Modifications are:
- Copyright (C) 2001 Linux Networx
- (Written by Eric Biederman ebiederman@lnxi.com for Linux Networx)
- Copyright (C) 2007 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
*/
- (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 @@
- 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 @@
#define spin_define(spin) static struct spinlock spin = SPIN_LOCK_UNLOCKED
#endif /* ARCH_SPINLOCK_H */
Modified: LinuxBIOSv3/include/spinlock.h
--- LinuxBIOSv3/include/spinlock.h 2007-07-02 20:57:45 UTC (rev 430) +++ LinuxBIOSv3/include/spinlock.h 2007-07-03 16:58:16 UTC (rev 431) @@ -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 */
-- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios
On Wed, Jul 04, 2007 at 05:50:09PM +0200, Stefan Reinauer wrote:
Please do not remove license headers.
All files must have a valid license header, also the imported ones. If we can not determine the license, we can not use the code.
Yes, I fully agree. But we know the license, it's the GPLv2 for all Linux code except where noted otherwise (also mentioned in HACKING).
I think the "taken from Linux" mini-header should be enough, but we can also make it clearer if you want:
Method 1 (mini-header with license mentioned):
/* * This file is part of the LinuxBIOS project. * * It is based on the Linux kernel file include/asm-i386/spinlock.h, * and is thus licensed under the terms of the GNU GPL, version 2. * * 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) */
Method 2 (full header) - THIS IS WRONG!:
/* * This file is part of the LinuxBIOS project. * * It is based on the Linux kernel file include/asm-i386/spinlock.h. * * 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 */
This is _not_ correct, as we only list the copyright lines of our modifications, but not the copyright lines of the original Linux code authors (because they're not in the Linux file, and we don't know them). This looks like the file was written purely by us, which is wrong.
This is the reason why I prefer the mini-header (method 1). We just say "we took this from Linux", which is ok license-wise, as we know the code is GPL'd. But we don't have to care about finding/listing the copyright holders, if somebody wants to know we refer them to the Linux developers or git history or something...
Method 3 (full header, but only list modifications):
/* * This file is part of the LinuxBIOS project. * * It is based on the Linux kernel file include/asm-i386/spinlock.h. * * 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) * * 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 */
This is probably a good compromise. We list the license explicitly, and (only) the authors of the modifications.
I think either the current method, or method 1 or 3 are fine.
Comments?
Modified: LinuxBIOSv3/HACKING
--- LinuxBIOSv3/HACKING 2007-07-02 20:57:45 UTC (rev 430) +++ LinuxBIOSv3/HACKING 2007-07-03 16:58:16 UTC (rev 431) @@ -95,6 +95,11 @@ 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: ?
Modified: LinuxBIOSv3/include/arch/x86/arch/spinlock.h
--- LinuxBIOSv3/include/arch/x86/arch/spinlock.h 2007-07-02 20:57:45 UTC (rev 430) +++ LinuxBIOSv3/include/arch/x86/arch/spinlock.h 2007-07-03 16:58:16 UTC (rev 431) @@ -1,35 +1,26 @@ /*
- This file is part of the LinuxBIOS project.
- It is based on the Linux kernel file include/asm-i386/spinlock.h.
- Modifications are:
- Copyright (C) 2001 Linux Networx
- (Written by Eric Biederman ebiederman@lnxi.com for Linux Networx)
- Copyright (C) 2007 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
*/
- (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 @@
- 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 @@
#define spin_define(spin) static struct spinlock spin = SPIN_LOCK_UNLOCKED
#endif /* ARCH_SPINLOCK_H */
Modified: LinuxBIOSv3/include/spinlock.h
--- LinuxBIOSv3/include/spinlock.h 2007-07-02 20:57:45 UTC (rev 430) +++ LinuxBIOSv3/include/spinlock.h 2007-07-03 16:58:16 UTC (rev 431) @@ -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 */
Uwe.
* Uwe Hermann uwe@hermann-uwe.de [070704 18:14]:
Yes, I fully agree. But we know the license, it's the GPLv2 for all Linux code except where noted otherwise (also mentioned in HACKING).
We do, but do we implicitly expect this from anyone else?
I think the "taken from Linux" mini-header should be enough, but we can also make it clearer if you want:
This is probably a good compromise. We list the license explicitly, and (only) the authors of the modifications.
I think either the current method, or method 1 or 3 are fine.
I think 3 is the best one.. We are already going safe in so many places (licenses for dts files and Kconfig files), so we should maybe just do the same here.
Other opinions?
On Wed, Jul 04, 2007 at 06:31:15PM +0200, Stefan Reinauer wrote:
I think 3 is the best one.. We are already going safe in so many places (licenses for dts files and Kconfig files), so we should maybe just do the same here.
Other opinions?
Yeah, I agree. I'll send a patch later this day.
Uwe.