Re: Inconsistent "#ifdef __KERNEL__" on different architectures

Russell King - ARM Linux (linux@arm.linux.org.uk)
Sun, 27 May 2001 22:42:57 +0100


On Sun, May 27, 2001 at 11:07:38PM +0200, Adrian Bunk wrote:
> I do also explicitely send this mail to the people that seem to be
> responsible for the pieces of code I touch.
>
> I'm not sure whether the compete removal of the "#ifdef __KERNEL__"'s is
> too rude but there are already other architectures that don't have it in
> their architecture specific versions of these files.

You cannot use the kernel atomic/interrupt functions from userspace
on ARM. You cannot disable interrupts in userspace, and therefore the
kernel atomic functions do not work as you expect them to.

If it is to do with code to be included into the kernel, then why aren't
you defining __KERNEL__ ?

Therefore this change (as far as ARM goes) makes zero sense.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/