Why do we explicitly remove atomic.h from our kernel header package?>From the Fedora Core 6 kernel spec file:# glibc provides scsi headers for itself, for now rm -rf $RPM_BUILD_ROOT/usr/include/scsi rm -f $RPM_BUILD_ROOT/usr/include/asm*/atomic.h rm -f $RPM_BUILD_ROOT/usr/include/asm*/io.h rm -f $RPM_BUILD_ROOT/usr/include/asm*/irq.h
Chuck Ebbert (cebbert@redhat.com) said:> Why do we explicitly remove atomic.h from our kernel header package?IIRC, the reasoning was because the operations weren''t actually atomic when used from userspace; ergo, it was a bad idea to provide them. Bill
On Fri, 2007-06-22 at 16:41 -0400, Bill Nottingham wrote:> Chuck Ebbert (cebbert@redhat.com) said: > > Why do we explicitly remove atomic.h from our kernel header package? > > IIRC, the reasoning was because the operations weren''t actually > atomic when used from userspace; ergo, it was a bad idea to provide > them. > > Bill... Unless you define CONFIG_SMP (which in turn, defines LOCK_PREFIX) I assume that up-stream will shoot me for suggesting that... but why not just add: #ifndef __KERNEL__ #define LOCK_PREFIX "lock; " #endif ... and make atomic_xxx safe for user-land? - Gilboa
On Fri, 2007-06-22 at 16:36 -0400, Chuck Ebbert wrote:> Why do we explicitly remove atomic.h from our kernel header package?No reason any more. Once upon a time, before the cleanup of the upstream kernel''s exports was complete, we needed to remove this unwanted crap. These days, the kernel''s standard ''make headers_install'' doesn''t include it anyway, so we no longer need to strip it out for ourselves. I think the same goes for io.h and irq.h. -- dwmw2
On 06/24/2007 03:25 PM, David Woodhouse wrote:> On Fri, 2007-06-22 at 16:36 -0400, Chuck Ebbert wrote: >> Why do we explicitly remove atomic.h from our kernel header package? > > No reason any more. Once upon a time, before the cleanup of the upstream > kernel''s exports was complete, we needed to remove this unwanted crap. > > These days, the kernel''s standard ''make headers_install'' doesn''t include > it anyway, so we no longer need to strip it out for ourselves.I dug through the makefiles to try and figure out if that was true, but gave up. Where is the list of included and/or excluded files?
On Mon, 2007-06-25 at 10:17 -0400, Chuck Ebbert wrote:> On 06/24/2007 03:25 PM, David Woodhouse wrote: > > On Fri, 2007-06-22 at 16:36 -0400, Chuck Ebbert wrote: > >> Why do we explicitly remove atomic.h from our kernel header package? > > > > No reason any more. Once upon a time, before the cleanup of the upstream > > kernel''s exports was complete, we needed to remove this unwanted crap. > > > > These days, the kernel''s standard ''make headers_install'' doesn''t include > > it anyway, so we no longer need to strip it out for ourselves. > > I dug through the makefiles to try and figure out if that was true, but > gave up. Where is the list of included and/or excluded files?include/**/Kbuild (but note that include/asm-*/Kbuild all include include/asm-generic/Kbuild.asm). Or just run ''make headers_install'' and then look in usr/include/ :) -- dwmw2