1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

[ubicom32]: add 2.6.32 support

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19823 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
kaloz
2010-02-23 10:43:53 +00:00
parent 9eedef7a46
commit 250089c5e9
16 changed files with 2387 additions and 20 deletions

View File

@@ -236,7 +236,12 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
#include <asm-generic/atomic-long.h>
#else
#include <asm-generic/atomic.h>
#endif
/*
* The following is not a real function. The compiler should remove the function

View File

@@ -0,0 +1 @@
#include <asm-generic/bitsperlong.h>

View File

@@ -28,10 +28,12 @@
#ifndef _ASM_UBICOM32_PAGE_H
#define _ASM_UBICOM32_PAGE_H
#include <linux/const.h>
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1 << PAGE_SHIFT)
#define PAGE_SHIFT (12)
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#include <asm/setup.h>
@@ -99,7 +101,15 @@ extern unsigned long memory_end;
#endif /* __ASSEMBLY__ */
#ifdef __KERNEL__
#define VM_DATA_DEFAULT_FLAGS \
(VM_READ | VM_WRITE | \
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
#include <asm-generic/getorder.h>
#else
#include <asm-generic/page.h>
#endif

View File

@@ -114,11 +114,15 @@ extern inline void flush_pages_to_ram (unsigned long address, int n)
#define VMALLOC_START 0
#define VMALLOC_END 0xffffffff
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
#include <asm-generic/pgtable.h>
#else
#define arch_enter_lazy_mmu_mode() do {} while (0)
#define arch_leave_lazy_mmu_mode() do {} while (0)
#define arch_flush_lazy_mmu_mode() do {} while (0)
#define arch_enter_lazy_cpu_mode() do {} while (0)
#define arch_leave_lazy_cpu_mode() do {} while (0)
#define arch_flush_lazy_cpu_mode() do {} while (0)
#endif
#endif /* _ASM_UBICOM32_PGTABLE_H */

View File

@@ -124,7 +124,12 @@ typedef struct {
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
#include <asm-generic/signal-defs.h>
#else
#include <asm-generic/signal.h>
#endif
#ifdef __KERNEL__
struct old_sigaction {

View File

@@ -84,4 +84,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING
#define SO_PROTOCOL 38
#define SO_DOMAIN 39
#endif /* _ASM_UBICOM32_SOCKET_H */