diff options
Diffstat (limited to 'include/asm-m68knommu')
-rw-r--r-- | include/asm-m68knommu/bitops.h | 30 | ||||
-rw-r--r-- | include/asm-m68knommu/byteorder.h | 16 | ||||
-rw-r--r-- | include/asm-m68knommu/commproc.h | 19 | ||||
-rw-r--r-- | include/asm-m68knommu/kvm.h | 6 | ||||
-rw-r--r-- | include/asm-m68knommu/namei.h | 1 | ||||
-rw-r--r-- | include/asm-m68knommu/page.h | 3 | ||||
-rw-r--r-- | include/asm-m68knommu/ptrace.h | 2 | ||||
-rw-r--r-- | include/asm-m68knommu/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-m68knommu/system.h | 11 | ||||
-rw-r--r-- | include/asm-m68knommu/thread_info.h | 4 |
10 files changed, 56 insertions, 37 deletions
diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h index c142fbf2f376..6f3685eab44c 100644 --- a/include/asm-m68knommu/bitops.h +++ b/include/asm-m68knommu/bitops.h | |||
@@ -14,8 +14,38 @@ | |||
14 | #error only <linux/bitops.h> can be included directly | 14 | #error only <linux/bitops.h> can be included directly |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #if defined (__mcfisaaplus__) || defined (__mcfisac__) | ||
18 | static inline int ffs(unsigned int val) | ||
19 | { | ||
20 | if (!val) | ||
21 | return 0; | ||
22 | |||
23 | asm volatile( | ||
24 | "bitrev %0\n\t" | ||
25 | "ff1 %0\n\t" | ||
26 | : "=d" (val) | ||
27 | : "0" (val) | ||
28 | ); | ||
29 | val++; | ||
30 | return val; | ||
31 | } | ||
32 | |||
33 | static inline int __ffs(unsigned int val) | ||
34 | { | ||
35 | asm volatile( | ||
36 | "bitrev %0\n\t" | ||
37 | "ff1 %0\n\t" | ||
38 | : "=d" (val) | ||
39 | : "0" (val) | ||
40 | ); | ||
41 | return val; | ||
42 | } | ||
43 | |||
44 | #else | ||
17 | #include <asm-generic/bitops/ffs.h> | 45 | #include <asm-generic/bitops/ffs.h> |
18 | #include <asm-generic/bitops/__ffs.h> | 46 | #include <asm-generic/bitops/__ffs.h> |
47 | #endif | ||
48 | |||
19 | #include <asm-generic/bitops/sched.h> | 49 | #include <asm-generic/bitops/sched.h> |
20 | #include <asm-generic/bitops/ffz.h> | 50 | #include <asm-generic/bitops/ffz.h> |
21 | 51 | ||
diff --git a/include/asm-m68knommu/byteorder.h b/include/asm-m68knommu/byteorder.h index 8fcde907b0f9..20bb4426b610 100644 --- a/include/asm-m68knommu/byteorder.h +++ b/include/asm-m68knommu/byteorder.h | |||
@@ -1,13 +1,27 @@ | |||
1 | #ifndef _M68KNOMMU_BYTEORDER_H | 1 | #ifndef _M68KNOMMU_BYTEORDER_H |
2 | #define _M68KNOMMU_BYTEORDER_H | 2 | #define _M68KNOMMU_BYTEORDER_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 6 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
7 | # define __BYTEORDER_HAS_U64__ | 7 | # define __BYTEORDER_HAS_U64__ |
8 | # define __SWAB_64_THRU_32__ | 8 | # define __SWAB_64_THRU_32__ |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | #if defined (__mcfisaaplus__) || defined (__mcfisac__) | ||
12 | static inline __attribute_const__ __u32 ___arch__swab32(__u32 val) | ||
13 | { | ||
14 | asm( | ||
15 | "byterev %0" | ||
16 | : "=d" (val) | ||
17 | : "0" (val) | ||
18 | ); | ||
19 | return val; | ||
20 | } | ||
21 | |||
22 | #define __arch__swab32(x) ___arch__swab32(x) | ||
23 | #endif | ||
24 | |||
11 | #include <linux/byteorder/big_endian.h> | 25 | #include <linux/byteorder/big_endian.h> |
12 | 26 | ||
13 | #endif /* _M68KNOMMU_BYTEORDER_H */ | 27 | #endif /* _M68KNOMMU_BYTEORDER_H */ |
diff --git a/include/asm-m68knommu/commproc.h b/include/asm-m68knommu/commproc.h index 36e870b468ef..edf5eb6c08d2 100644 --- a/include/asm-m68knommu/commproc.h +++ b/include/asm-m68knommu/commproc.h | |||
@@ -519,25 +519,6 @@ typedef struct scc_enet { | |||
519 | #define SICR_ENET_CLKRT ((uint)0x00002c00) | 519 | #define SICR_ENET_CLKRT ((uint)0x00002c00) |
520 | #endif | 520 | #endif |
521 | 521 | ||
522 | #ifdef CONFIG_RPXCLASSIC | ||
523 | /* Bits in parallel I/O port registers that have to be set/cleared | ||
524 | * to configure the pins for SCC1 use. | ||
525 | */ | ||
526 | #define PA_ENET_RXD ((ushort)0x0001) | ||
527 | #define PA_ENET_TXD ((ushort)0x0002) | ||
528 | #define PA_ENET_TCLK ((ushort)0x0200) | ||
529 | #define PA_ENET_RCLK ((ushort)0x0800) | ||
530 | #define PB_ENET_TENA ((uint)0x00001000) | ||
531 | #define PC_ENET_CLSN ((ushort)0x0010) | ||
532 | #define PC_ENET_RENA ((ushort)0x0020) | ||
533 | |||
534 | /* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to | ||
535 | * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero. | ||
536 | */ | ||
537 | #define SICR_ENET_MASK ((uint)0x000000ff) | ||
538 | #define SICR_ENET_CLKRT ((uint)0x0000003d) | ||
539 | #endif | ||
540 | |||
541 | /* SCC Event register as used by Ethernet. | 522 | /* SCC Event register as used by Ethernet. |
542 | */ | 523 | */ |
543 | #define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */ | 524 | #define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */ |
diff --git a/include/asm-m68knommu/kvm.h b/include/asm-m68knommu/kvm.h deleted file mode 100644 index b49d4258dabb..000000000000 --- a/include/asm-m68knommu/kvm.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __LINUX_KVM_M68KNOMMU_H | ||
2 | #define __LINUX_KVM_M68KNOMMU_H | ||
3 | |||
4 | /* m68knommu does not support KVM */ | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-m68knommu/namei.h b/include/asm-m68knommu/namei.h deleted file mode 100644 index 31a85d27b931..000000000000 --- a/include/asm-m68knommu/namei.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-m68k/namei.h> | ||
diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index 1e82ebb7d644..3a1ede4544cb 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h | |||
@@ -43,9 +43,6 @@ typedef struct page *pgtable_t; | |||
43 | #define __pgd(x) ((pgd_t) { (x) } ) | 43 | #define __pgd(x) ((pgd_t) { (x) } ) |
44 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 44 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
45 | 45 | ||
46 | /* to align the pointer to the (next) page boundary */ | ||
47 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | ||
48 | |||
49 | extern unsigned long memory_start; | 46 | extern unsigned long memory_start; |
50 | extern unsigned long memory_end; | 47 | extern unsigned long memory_end; |
51 | 48 | ||
diff --git a/include/asm-m68knommu/ptrace.h b/include/asm-m68knommu/ptrace.h index 47258e86e8c4..8c9194b98548 100644 --- a/include/asm-m68knommu/ptrace.h +++ b/include/asm-m68knommu/ptrace.h | |||
@@ -68,10 +68,8 @@ struct switch_stack { | |||
68 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | 68 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ |
69 | #define PTRACE_GETREGS 12 | 69 | #define PTRACE_GETREGS 12 |
70 | #define PTRACE_SETREGS 13 | 70 | #define PTRACE_SETREGS 13 |
71 | #ifdef CONFIG_FPU | ||
72 | #define PTRACE_GETFPREGS 14 | 71 | #define PTRACE_GETFPREGS 14 |
73 | #define PTRACE_SETFPREGS 15 | 72 | #define PTRACE_SETFPREGS 15 |
74 | #endif | ||
75 | 73 | ||
76 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
77 | 75 | ||
diff --git a/include/asm-m68knommu/semaphore.h b/include/asm-m68knommu/semaphore.h deleted file mode 100644 index d9b2034ed1d2..000000000000 --- a/include/asm-m68knommu/semaphore.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/semaphore.h> | ||
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 64c64432bbb8..40f49de69821 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h | |||
@@ -118,6 +118,8 @@ asmlinkage void resume(void); | |||
118 | #define smp_read_barrier_depends() do { } while(0) | 118 | #define smp_read_barrier_depends() do { } while(0) |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | #define read_barrier_depends() ((void)0) | ||
122 | |||
121 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 123 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
122 | 124 | ||
123 | struct __xchg_dummy { unsigned long a[100]; }; | 125 | struct __xchg_dummy { unsigned long a[100]; }; |
@@ -310,4 +312,13 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
310 | #endif | 312 | #endif |
311 | #define arch_align_stack(x) (x) | 313 | #define arch_align_stack(x) (x) |
312 | 314 | ||
315 | |||
316 | static inline int irqs_disabled_flags(unsigned long flags) | ||
317 | { | ||
318 | if (flags & 0x0700) | ||
319 | return 0; | ||
320 | else | ||
321 | return 1; | ||
322 | } | ||
323 | |||
313 | #endif /* _M68KNOMMU_SYSTEM_H */ | 324 | #endif /* _M68KNOMMU_SYSTEM_H */ |
diff --git a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h index 95996d978bed..0c9bc095f3f0 100644 --- a/include/asm-m68knommu/thread_info.h +++ b/include/asm-m68knommu/thread_info.h | |||
@@ -71,10 +71,6 @@ static inline struct thread_info *current_thread_info(void) | |||
71 | return ti; | 71 | return ti; |
72 | } | 72 | } |
73 | 73 | ||
74 | /* thread information allocation */ | ||
75 | #define alloc_thread_info(tsk) ((struct thread_info *) \ | ||
76 | __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER)) | ||
77 | #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_SIZE_ORDER) | ||
78 | #endif /* __ASSEMBLY__ */ | 74 | #endif /* __ASSEMBLY__ */ |
79 | 75 | ||
80 | #define PREEMPT_ACTIVE 0x4000000 | 76 | #define PREEMPT_ACTIVE 0x4000000 |