diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/m32r/include/asm | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/m32r/include/asm')
-rw-r--r-- | arch/m32r/include/asm/bitops.h | 3 | ||||
-rw-r--r-- | arch/m32r/include/asm/ioctls.h | 83 | ||||
-rw-r--r-- | arch/m32r/include/asm/irqflags.h | 104 | ||||
-rw-r--r-- | arch/m32r/include/asm/m32104ut/m32104ut_pld.h | 2 | ||||
-rw-r--r-- | arch/m32r/include/asm/m32700ut/m32700ut_pld.h | 2 | ||||
-rw-r--r-- | arch/m32r/include/asm/mmzone.h | 8 | ||||
-rw-r--r-- | arch/m32r/include/asm/opsput/opsput_pld.h | 2 | ||||
-rw-r--r-- | arch/m32r/include/asm/pgtable-2level.h | 2 | ||||
-rw-r--r-- | arch/m32r/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/m32r/include/asm/smp.h | 6 | ||||
-rw-r--r-- | arch/m32r/include/asm/system.h | 66 | ||||
-rw-r--r-- | arch/m32r/include/asm/thread_info.h | 13 | ||||
-rw-r--r-- | arch/m32r/include/asm/types.h | 9 | ||||
-rw-r--r-- | arch/m32r/include/asm/unistd.h | 3 |
14 files changed, 120 insertions, 185 deletions
diff --git a/arch/m32r/include/asm/bitops.h b/arch/m32r/include/asm/bitops.h index aaddf0d57603..6300f22cdbdb 100644 --- a/arch/m32r/include/asm/bitops.h +++ b/arch/m32r/include/asm/bitops.h | |||
@@ -266,9 +266,8 @@ static __inline__ int test_and_change_bit(int nr, volatile void * addr) | |||
266 | 266 | ||
267 | #ifdef __KERNEL__ | 267 | #ifdef __KERNEL__ |
268 | 268 | ||
269 | #include <asm-generic/bitops/ext2-non-atomic.h> | 269 | #include <asm-generic/bitops/le.h> |
270 | #include <asm-generic/bitops/ext2-atomic.h> | 270 | #include <asm-generic/bitops/ext2-atomic.h> |
271 | #include <asm-generic/bitops/minix.h> | ||
272 | 271 | ||
273 | #endif /* __KERNEL__ */ | 272 | #endif /* __KERNEL__ */ |
274 | 273 | ||
diff --git a/arch/m32r/include/asm/ioctls.h b/arch/m32r/include/asm/ioctls.h index 66288063a4c0..349bf87bfbd0 100644 --- a/arch/m32r/include/asm/ioctls.h +++ b/arch/m32r/include/asm/ioctls.h | |||
@@ -1,87 +1,6 @@ | |||
1 | #ifndef __ARCH_M32R_IOCTLS_H__ | 1 | #ifndef __ARCH_M32R_IOCTLS_H__ |
2 | #define __ARCH_M32R_IOCTLS_H__ | 2 | #define __ARCH_M32R_IOCTLS_H__ |
3 | 3 | ||
4 | #include <asm/ioctl.h> | 4 | #include <asm-generic/ioctls.h> |
5 | |||
6 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
7 | |||
8 | #define TCGETS 0x5401 | ||
9 | #define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */ | ||
10 | #define TCSETSW 0x5403 | ||
11 | #define TCSETSF 0x5404 | ||
12 | #define TCGETA 0x5405 | ||
13 | #define TCSETA 0x5406 | ||
14 | #define TCSETAW 0x5407 | ||
15 | #define TCSETAF 0x5408 | ||
16 | #define TCSBRK 0x5409 | ||
17 | #define TCXONC 0x540A | ||
18 | #define TCFLSH 0x540B | ||
19 | #define TIOCEXCL 0x540C | ||
20 | #define TIOCNXCL 0x540D | ||
21 | #define TIOCSCTTY 0x540E | ||
22 | #define TIOCGPGRP 0x540F | ||
23 | #define TIOCSPGRP 0x5410 | ||
24 | #define TIOCOUTQ 0x5411 | ||
25 | #define TIOCSTI 0x5412 | ||
26 | #define TIOCGWINSZ 0x5413 | ||
27 | #define TIOCSWINSZ 0x5414 | ||
28 | #define TIOCMGET 0x5415 | ||
29 | #define TIOCMBIS 0x5416 | ||
30 | #define TIOCMBIC 0x5417 | ||
31 | #define TIOCMSET 0x5418 | ||
32 | #define TIOCGSOFTCAR 0x5419 | ||
33 | #define TIOCSSOFTCAR 0x541A | ||
34 | #define FIONREAD 0x541B | ||
35 | #define TIOCINQ FIONREAD | ||
36 | #define TIOCLINUX 0x541C | ||
37 | #define TIOCCONS 0x541D | ||
38 | #define TIOCGSERIAL 0x541E | ||
39 | #define TIOCSSERIAL 0x541F | ||
40 | #define TIOCPKT 0x5420 | ||
41 | #define FIONBIO 0x5421 | ||
42 | #define TIOCNOTTY 0x5422 | ||
43 | #define TIOCSETD 0x5423 | ||
44 | #define TIOCGETD 0x5424 | ||
45 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
46 | /* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */ | ||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
50 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
51 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
52 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | ||
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | ||
56 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
57 | |||
58 | #define FIONCLEX 0x5450 | ||
59 | #define FIOCLEX 0x5451 | ||
60 | #define FIOASYNC 0x5452 | ||
61 | #define TIOCSERCONFIG 0x5453 | ||
62 | #define TIOCSERGWILD 0x5454 | ||
63 | #define TIOCSERSWILD 0x5455 | ||
64 | #define TIOCGLCKTRMIOS 0x5456 | ||
65 | #define TIOCSLCKTRMIOS 0x5457 | ||
66 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
67 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
68 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
69 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
70 | |||
71 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
72 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
73 | #define FIOQSIZE 0x5460 | ||
74 | |||
75 | /* Used for packet mode */ | ||
76 | #define TIOCPKT_DATA 0 | ||
77 | #define TIOCPKT_FLUSHREAD 1 | ||
78 | #define TIOCPKT_FLUSHWRITE 2 | ||
79 | #define TIOCPKT_STOP 4 | ||
80 | #define TIOCPKT_START 8 | ||
81 | #define TIOCPKT_NOSTOP 16 | ||
82 | #define TIOCPKT_DOSTOP 32 | ||
83 | #define TIOCPKT_IOCTL 64 | ||
84 | |||
85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
86 | 5 | ||
87 | #endif /* __ARCH_M32R_IOCTLS_H__ */ | 6 | #endif /* __ARCH_M32R_IOCTLS_H__ */ |
diff --git a/arch/m32r/include/asm/irqflags.h b/arch/m32r/include/asm/irqflags.h new file mode 100644 index 000000000000..1f92d29982ae --- /dev/null +++ b/arch/m32r/include/asm/irqflags.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2001 Hiroyuki Kondo, Hirokazu Takata, and Hitoshi Yamamoto | ||
7 | * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org> | ||
8 | */ | ||
9 | |||
10 | #ifndef _ASM_M32R_IRQFLAGS_H | ||
11 | #define _ASM_M32R_IRQFLAGS_H | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | |||
15 | static inline unsigned long arch_local_save_flags(void) | ||
16 | { | ||
17 | unsigned long flags; | ||
18 | asm volatile("mvfc %0,psw" : "=r"(flags)); | ||
19 | return flags; | ||
20 | } | ||
21 | |||
22 | static inline void arch_local_irq_disable(void) | ||
23 | { | ||
24 | #if !defined(CONFIG_CHIP_M32102) && !defined(CONFIG_CHIP_M32104) | ||
25 | asm volatile ( | ||
26 | "clrpsw #0x40 -> nop" | ||
27 | : : : "memory"); | ||
28 | #else | ||
29 | unsigned long tmpreg0, tmpreg1; | ||
30 | asm volatile ( | ||
31 | "ld24 %0, #0 ; Use 32-bit insn. \n\t" | ||
32 | "mvfc %1, psw ; No interrupt can be accepted here. \n\t" | ||
33 | "mvtc %0, psw \n\t" | ||
34 | "and3 %0, %1, #0xffbf \n\t" | ||
35 | "mvtc %0, psw \n\t" | ||
36 | : "=&r" (tmpreg0), "=&r" (tmpreg1) | ||
37 | : | ||
38 | : "cbit", "memory"); | ||
39 | #endif | ||
40 | } | ||
41 | |||
42 | static inline void arch_local_irq_enable(void) | ||
43 | { | ||
44 | #if !defined(CONFIG_CHIP_M32102) && !defined(CONFIG_CHIP_M32104) | ||
45 | asm volatile ( | ||
46 | "setpsw #0x40 -> nop" | ||
47 | : : : "memory"); | ||
48 | #else | ||
49 | unsigned long tmpreg; | ||
50 | asm volatile ( | ||
51 | "mvfc %0, psw; \n\t" | ||
52 | "or3 %0, %0, #0x0040; \n\t" | ||
53 | "mvtc %0, psw; \n\t" | ||
54 | : "=&r" (tmpreg) | ||
55 | : | ||
56 | : "cbit", "memory"); | ||
57 | #endif | ||
58 | } | ||
59 | |||
60 | static inline unsigned long arch_local_irq_save(void) | ||
61 | { | ||
62 | unsigned long flags; | ||
63 | |||
64 | #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104)) | ||
65 | asm volatile ( | ||
66 | "mvfc %0, psw; \n\t" | ||
67 | "clrpsw #0x40 -> nop; \n\t" | ||
68 | : "=r" (flags) | ||
69 | : | ||
70 | : "memory"); | ||
71 | #else | ||
72 | unsigned long tmpreg; | ||
73 | asm volatile ( | ||
74 | "ld24 %1, #0 \n\t" | ||
75 | "mvfc %0, psw \n\t" | ||
76 | "mvtc %1, psw \n\t" | ||
77 | "and3 %1, %0, #0xffbf \n\t" | ||
78 | "mvtc %1, psw \n\t" | ||
79 | : "=r" (flags), "=&r" (tmpreg) | ||
80 | : | ||
81 | : "cbit", "memory"); | ||
82 | #endif | ||
83 | return flags; | ||
84 | } | ||
85 | |||
86 | static inline void arch_local_irq_restore(unsigned long flags) | ||
87 | { | ||
88 | asm volatile("mvtc %0,psw" | ||
89 | : | ||
90 | : "r" (flags) | ||
91 | : "cbit", "memory"); | ||
92 | } | ||
93 | |||
94 | static inline bool arch_irqs_disabled_flags(unsigned long flags) | ||
95 | { | ||
96 | return !(flags & 0x40); | ||
97 | } | ||
98 | |||
99 | static inline bool arch_irqs_disabled(void) | ||
100 | { | ||
101 | return arch_irqs_disabled_flags(arch_local_save_flags()); | ||
102 | } | ||
103 | |||
104 | #endif /* _ASM_M32R_IRQFLAGS_H */ | ||
diff --git a/arch/m32r/include/asm/m32104ut/m32104ut_pld.h b/arch/m32r/include/asm/m32104ut/m32104ut_pld.h index 2dc89d68b6d9..1feae9709f24 100644 --- a/arch/m32r/include/asm/m32104ut/m32104ut_pld.h +++ b/arch/m32r/include/asm/m32104ut/m32104ut_pld.h | |||
@@ -4,7 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * include/asm-m32r/m32104ut/m32104ut_pld.h | 5 | * include/asm-m32r/m32104ut/m32104ut_pld.h |
6 | * | 6 | * |
7 | * Definitions for Programable Logic Device(PLD) on M32104UT board. | 7 | * Definitions for Programmable Logic Device(PLD) on M32104UT board. |
8 | * Based on m32700ut_pld.h | 8 | * Based on m32700ut_pld.h |
9 | * | 9 | * |
10 | * Copyright (c) 2002 Takeo Takahashi | 10 | * Copyright (c) 2002 Takeo Takahashi |
diff --git a/arch/m32r/include/asm/m32700ut/m32700ut_pld.h b/arch/m32r/include/asm/m32700ut/m32700ut_pld.h index 57623beb44cb..35294670b187 100644 --- a/arch/m32r/include/asm/m32700ut/m32700ut_pld.h +++ b/arch/m32r/include/asm/m32700ut/m32700ut_pld.h | |||
@@ -4,7 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * include/asm-m32r/m32700ut/m32700ut_pld.h | 5 | * include/asm-m32r/m32700ut/m32700ut_pld.h |
6 | * | 6 | * |
7 | * Definitions for Programable Logic Device(PLD) on M32700UT board. | 7 | * Definitions for Programmable Logic Device(PLD) on M32700UT board. |
8 | * | 8 | * |
9 | * Copyright (c) 2002 Takeo Takahashi | 9 | * Copyright (c) 2002 Takeo Takahashi |
10 | * | 10 | * |
diff --git a/arch/m32r/include/asm/mmzone.h b/arch/m32r/include/asm/mmzone.h index 9f3b5accda88..115ced33febd 100644 --- a/arch/m32r/include/asm/mmzone.h +++ b/arch/m32r/include/asm/mmzone.h | |||
@@ -14,12 +14,6 @@ extern struct pglist_data *node_data[]; | |||
14 | #define NODE_DATA(nid) (node_data[nid]) | 14 | #define NODE_DATA(nid) (node_data[nid]) |
15 | 15 | ||
16 | #define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn) | 16 | #define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn) |
17 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | ||
18 | #define node_end_pfn(nid) \ | ||
19 | ({ \ | ||
20 | pg_data_t *__pgdat = NODE_DATA(nid); \ | ||
21 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1; \ | ||
22 | }) | ||
23 | 17 | ||
24 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | 18 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) |
25 | /* | 19 | /* |
@@ -44,7 +38,7 @@ static __inline__ int pfn_to_nid(unsigned long pfn) | |||
44 | int node; | 38 | int node; |
45 | 39 | ||
46 | for (node = 0 ; node < MAX_NUMNODES ; node++) | 40 | for (node = 0 ; node < MAX_NUMNODES ; node++) |
47 | if (pfn >= node_start_pfn(node) && pfn <= node_end_pfn(node)) | 41 | if (pfn >= node_start_pfn(node) && pfn < node_end_pfn(node)) |
48 | break; | 42 | break; |
49 | 43 | ||
50 | return node; | 44 | return node; |
diff --git a/arch/m32r/include/asm/opsput/opsput_pld.h b/arch/m32r/include/asm/opsput/opsput_pld.h index 3f11ea1aac2d..6901401fe9eb 100644 --- a/arch/m32r/include/asm/opsput/opsput_pld.h +++ b/arch/m32r/include/asm/opsput/opsput_pld.h | |||
@@ -4,7 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * include/asm-m32r/opsput/opsput_pld.h | 5 | * include/asm-m32r/opsput/opsput_pld.h |
6 | * | 6 | * |
7 | * Definitions for Programable Logic Device(PLD) on OPSPUT board. | 7 | * Definitions for Programmable Logic Device(PLD) on OPSPUT board. |
8 | * | 8 | * |
9 | * Copyright (c) 2002 Takeo Takahashi | 9 | * Copyright (c) 2002 Takeo Takahashi |
10 | * | 10 | * |
diff --git a/arch/m32r/include/asm/pgtable-2level.h b/arch/m32r/include/asm/pgtable-2level.h index bca3475f9595..9cdaf7350ef6 100644 --- a/arch/m32r/include/asm/pgtable-2level.h +++ b/arch/m32r/include/asm/pgtable-2level.h | |||
@@ -44,7 +44,7 @@ static inline int pgd_present(pgd_t pgd) { return 1; } | |||
44 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | 44 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * (pmds are folded into pgds so this doesnt get actually called, | 47 | * (pmds are folded into pgds so this doesn't get actually called, |
48 | * but the define is needed for a generic inline function.) | 48 | * but the define is needed for a generic inline function.) |
49 | */ | 49 | */ |
50 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) | 50 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) |
diff --git a/arch/m32r/include/asm/pgtable.h b/arch/m32r/include/asm/pgtable.h index e6359c566b50..8a28cfea2729 100644 --- a/arch/m32r/include/asm/pgtable.h +++ b/arch/m32r/include/asm/pgtable.h | |||
@@ -332,9 +332,7 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) | |||
332 | ((pte_t *)pmd_page_vaddr(*(dir)) + pte_index(address)) | 332 | ((pte_t *)pmd_page_vaddr(*(dir)) + pte_index(address)) |
333 | #define pte_offset_map(dir, address) \ | 333 | #define pte_offset_map(dir, address) \ |
334 | ((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address)) | 334 | ((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address)) |
335 | #define pte_offset_map_nested(dir, address) pte_offset_map(dir, address) | ||
336 | #define pte_unmap(pte) do { } while (0) | 335 | #define pte_unmap(pte) do { } while (0) |
337 | #define pte_unmap_nested(pte) do { } while (0) | ||
338 | 336 | ||
339 | /* Encode and de-code a swap entry */ | 337 | /* Encode and de-code a swap entry */ |
340 | #define __swp_type(x) (((x).val >> 2) & 0x1f) | 338 | #define __swp_type(x) (((x).val >> 2) & 0x1f) |
diff --git a/arch/m32r/include/asm/smp.h b/arch/m32r/include/asm/smp.h index e67ded1aab91..cf7829a61551 100644 --- a/arch/m32r/include/asm/smp.h +++ b/arch/m32r/include/asm/smp.h | |||
@@ -81,11 +81,11 @@ static __inline__ int cpu_number_map(int cpu) | |||
81 | 81 | ||
82 | static __inline__ unsigned int num_booting_cpus(void) | 82 | static __inline__ unsigned int num_booting_cpus(void) |
83 | { | 83 | { |
84 | return cpus_weight(cpu_callout_map); | 84 | return cpumask_weight(&cpu_callout_map); |
85 | } | 85 | } |
86 | 86 | ||
87 | extern void smp_send_timer(void); | 87 | extern void smp_send_timer(void); |
88 | extern unsigned long send_IPI_mask_phys(cpumask_t, int, int); | 88 | extern unsigned long send_IPI_mask_phys(const cpumask_t*, int, int); |
89 | 89 | ||
90 | extern void arch_send_call_function_single_ipi(int cpu); | 90 | extern void arch_send_call_function_single_ipi(int cpu); |
91 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); | 91 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
@@ -94,8 +94,6 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); | |||
94 | 94 | ||
95 | #define NO_PROC_ID (0xff) /* No processor magic marker */ | 95 | #define NO_PROC_ID (0xff) /* No processor magic marker */ |
96 | 96 | ||
97 | #define PROC_CHANGE_PENALTY (15) /* Schedule penalty */ | ||
98 | |||
99 | /* | 97 | /* |
100 | * M32R-mp IPI | 98 | * M32R-mp IPI |
101 | */ | 99 | */ |
diff --git a/arch/m32r/include/asm/system.h b/arch/m32r/include/asm/system.h index c980f5ba8de7..13c46794ccb1 100644 --- a/arch/m32r/include/asm/system.h +++ b/arch/m32r/include/asm/system.h | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
14 | #include <linux/irqflags.h> | ||
14 | #include <asm/assembler.h> | 15 | #include <asm/assembler.h> |
15 | 16 | ||
16 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
@@ -54,71 +55,6 @@ | |||
54 | ); \ | 55 | ); \ |
55 | } while(0) | 56 | } while(0) |
56 | 57 | ||
57 | /* Interrupt Control */ | ||
58 | #if !defined(CONFIG_CHIP_M32102) && !defined(CONFIG_CHIP_M32104) | ||
59 | #define local_irq_enable() \ | ||
60 | __asm__ __volatile__ ("setpsw #0x40 -> nop": : :"memory") | ||
61 | #define local_irq_disable() \ | ||
62 | __asm__ __volatile__ ("clrpsw #0x40 -> nop": : :"memory") | ||
63 | #else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ | ||
64 | static inline void local_irq_enable(void) | ||
65 | { | ||
66 | unsigned long tmpreg; | ||
67 | __asm__ __volatile__( | ||
68 | "mvfc %0, psw; \n\t" | ||
69 | "or3 %0, %0, #0x0040; \n\t" | ||
70 | "mvtc %0, psw; \n\t" | ||
71 | : "=&r" (tmpreg) : : "cbit", "memory"); | ||
72 | } | ||
73 | |||
74 | static inline void local_irq_disable(void) | ||
75 | { | ||
76 | unsigned long tmpreg0, tmpreg1; | ||
77 | __asm__ __volatile__( | ||
78 | "ld24 %0, #0 ; Use 32-bit insn. \n\t" | ||
79 | "mvfc %1, psw ; No interrupt can be accepted here. \n\t" | ||
80 | "mvtc %0, psw \n\t" | ||
81 | "and3 %0, %1, #0xffbf \n\t" | ||
82 | "mvtc %0, psw \n\t" | ||
83 | : "=&r" (tmpreg0), "=&r" (tmpreg1) : : "cbit", "memory"); | ||
84 | } | ||
85 | #endif /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ | ||
86 | |||
87 | #define local_save_flags(x) \ | ||
88 | __asm__ __volatile__("mvfc %0,psw" : "=r"(x) : /* no input */) | ||
89 | |||
90 | #define local_irq_restore(x) \ | ||
91 | __asm__ __volatile__("mvtc %0,psw" : /* no outputs */ \ | ||
92 | : "r" (x) : "cbit", "memory") | ||
93 | |||
94 | #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104)) | ||
95 | #define local_irq_save(x) \ | ||
96 | __asm__ __volatile__( \ | ||
97 | "mvfc %0, psw; \n\t" \ | ||
98 | "clrpsw #0x40 -> nop; \n\t" \ | ||
99 | : "=r" (x) : /* no input */ : "memory") | ||
100 | #else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ | ||
101 | #define local_irq_save(x) \ | ||
102 | ({ \ | ||
103 | unsigned long tmpreg; \ | ||
104 | __asm__ __volatile__( \ | ||
105 | "ld24 %1, #0 \n\t" \ | ||
106 | "mvfc %0, psw \n\t" \ | ||
107 | "mvtc %1, psw \n\t" \ | ||
108 | "and3 %1, %0, #0xffbf \n\t" \ | ||
109 | "mvtc %1, psw \n\t" \ | ||
110 | : "=r" (x), "=&r" (tmpreg) \ | ||
111 | : : "cbit", "memory"); \ | ||
112 | }) | ||
113 | #endif /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ | ||
114 | |||
115 | #define irqs_disabled() \ | ||
116 | ({ \ | ||
117 | unsigned long flags; \ | ||
118 | local_save_flags(flags); \ | ||
119 | !(flags & 0x40); \ | ||
120 | }) | ||
121 | |||
122 | #define nop() __asm__ __volatile__ ("nop" : : ) | 58 | #define nop() __asm__ __volatile__ ("nop" : : ) |
123 | 59 | ||
124 | #define xchg(ptr, x) \ | 60 | #define xchg(ptr, x) \ |
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h index 71faff5bcc27..0227dba44068 100644 --- a/arch/m32r/include/asm/thread_info.h +++ b/arch/m32r/include/asm/thread_info.h | |||
@@ -96,16 +96,11 @@ static inline struct thread_info *current_thread_info(void) | |||
96 | 96 | ||
97 | /* thread information allocation */ | 97 | /* thread information allocation */ |
98 | #ifdef CONFIG_DEBUG_STACK_USAGE | 98 | #ifdef CONFIG_DEBUG_STACK_USAGE |
99 | #define alloc_thread_info(tsk) \ | 99 | #define alloc_thread_info_node(tsk, node) \ |
100 | ({ \ | 100 | kzalloc_node(THREAD_SIZE, GFP_KERNEL, node) |
101 | struct thread_info *ret; \ | ||
102 | \ | ||
103 | ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \ | ||
104 | \ | ||
105 | ret; \ | ||
106 | }) | ||
107 | #else | 101 | #else |
108 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) | 102 | #define alloc_thread_info_node(tsk, node) \ |
103 | kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
109 | #endif | 104 | #endif |
110 | 105 | ||
111 | #define free_thread_info(info) kfree(info) | 106 | #define free_thread_info(info) kfree(info) |
diff --git a/arch/m32r/include/asm/types.h b/arch/m32r/include/asm/types.h index bc9f7fff0ac3..bd0035597b3b 100644 --- a/arch/m32r/include/asm/types.h +++ b/arch/m32r/include/asm/types.h | |||
@@ -16,15 +16,6 @@ typedef unsigned short umode_t; | |||
16 | 16 | ||
17 | #define BITS_PER_LONG 32 | 17 | #define BITS_PER_LONG 32 |
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | ||
20 | |||
21 | /* DMA addresses are 32-bits wide. */ | ||
22 | |||
23 | typedef u32 dma_addr_t; | ||
24 | typedef u64 dma64_addr_t; | ||
25 | |||
26 | #endif /* __ASSEMBLY__ */ | ||
27 | |||
28 | #endif /* __KERNEL__ */ | 19 | #endif /* __KERNEL__ */ |
29 | 20 | ||
30 | #endif /* _ASM_M32R_TYPES_H */ | 21 | #endif /* _ASM_M32R_TYPES_H */ |
diff --git a/arch/m32r/include/asm/unistd.h b/arch/m32r/include/asm/unistd.h index c70545689da8..3e1db561aacc 100644 --- a/arch/m32r/include/asm/unistd.h +++ b/arch/m32r/include/asm/unistd.h | |||
@@ -330,10 +330,11 @@ | |||
330 | /* #define __NR_timerfd 322 removed */ | 330 | /* #define __NR_timerfd 322 removed */ |
331 | #define __NR_eventfd 323 | 331 | #define __NR_eventfd 323 |
332 | #define __NR_fallocate 324 | 332 | #define __NR_fallocate 324 |
333 | #define __NR_setns 325 | ||
333 | 334 | ||
334 | #ifdef __KERNEL__ | 335 | #ifdef __KERNEL__ |
335 | 336 | ||
336 | #define NR_syscalls 325 | 337 | #define NR_syscalls 326 |
337 | 338 | ||
338 | #define __ARCH_WANT_IPC_PARSE_VERSION | 339 | #define __ARCH_WANT_IPC_PARSE_VERSION |
339 | #define __ARCH_WANT_STAT64 | 340 | #define __ARCH_WANT_STAT64 |