Dan,
They are still not up to the task, there are a lot of things that need to be fixed in them. Good example is page.h, requires variables from the configuration file that is used to build Linux.

The best example and most noticeable is from page.h, PAGE_SHIFT is set by a variable from the configuration file used to create the kernel. Here is an unsanitized version. The same holds true with all architectures in various different files.

/*
* PAGE_SHIFT determines the page size
*/
#ifdef CONFIG_PAGE_SIZE_4KB
#define PAGE_SHIFT      12
#endif
#ifdef CONFIG_PAGE_SIZE_8KB
#define PAGE_SHIFT      13
#endif
#ifdef CONFIG_PAGE_SIZE_16KB
#define PAGE_SHIFT      14
#endif
#ifdef CONFIG_PAGE_SIZE_64KB
#define PAGE_SHIFT      16
#endif
#define PAGE_SIZE       (1UL << PAGE_SHIFT)
#define PAGE_MASK       (~((1 << PAGE_SHIFT) - 1))

Here is a santized version
#define PAGE_SIZE       (getpagesize())
static __inline__ int getpageshift()
{
   int pagesize = getpagesize();
   return (__builtin_clz(pagesize) ^ 31);
}


--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to