diff options
Diffstat (limited to 'include')
23 files changed, 190 insertions, 162 deletions
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S index c90dff4828f7..f6967c8df323 100644 --- a/include/asm-arm/arch-omap/entry-macro.S +++ b/include/asm-arm/arch-omap/entry-macro.S | |||
@@ -61,6 +61,12 @@ | |||
61 | .macro disable_fiq | 61 | .macro disable_fiq |
62 | .endm | 62 | .endm |
63 | 63 | ||
64 | .macro get_irqnr_preamble, base, tmp | ||
65 | .endm | ||
66 | |||
67 | .macro arch_ret_to_user, tmp1, tmp2 | ||
68 | .endm | ||
69 | |||
64 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 70 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
65 | ldr \base, =VA_IC_BASE | 71 | ldr \base, =VA_IC_BASE |
66 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | 72 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ |
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h index df50dd53e1dd..48fabc493163 100644 --- a/include/asm-arm/arch-omap/memory.h +++ b/include/asm-arm/arch-omap/memory.h | |||
@@ -70,7 +70,7 @@ | |||
70 | 70 | ||
71 | #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) | 71 | #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) |
72 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) | 72 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) |
73 | #define is_lbus_device(dev) (cpu_is_omap1510() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) | 73 | #define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) |
74 | 74 | ||
75 | #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ | 75 | #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ |
76 | (dma_addr_t)virt_to_lbus(page_address(page)) : \ | 76 | (dma_addr_t)virt_to_lbus(page_address(page)) : \ |
diff --git a/include/asm-arm/arch-omap/omap-alsa.h b/include/asm-arm/arch-omap/omap-alsa.h index df4695474e3d..fcaf44c14714 100644 --- a/include/asm-arm/arch-omap/omap-alsa.h +++ b/include/asm-arm/arch-omap/omap-alsa.h | |||
@@ -65,7 +65,7 @@ struct audio_stream { | |||
65 | int period; /* current transfer period */ | 65 | int period; /* current transfer period */ |
66 | int periods; /* current count of periods registerd in the DMA engine */ | 66 | int periods; /* current count of periods registerd in the DMA engine */ |
67 | spinlock_t dma_lock; /* for locking in DMA operations */ | 67 | spinlock_t dma_lock; /* for locking in DMA operations */ |
68 | snd_pcm_substream_t *stream; /* the pcm stream */ | 68 | struct snd_pcm_substream *stream; /* the pcm stream */ |
69 | unsigned linked:1; /* dma channels linked */ | 69 | unsigned linked:1; /* dma channels linked */ |
70 | int offset; /* store start position of the last period in the alsa buffer */ | 70 | int offset; /* store start position of the last period in the alsa buffer */ |
71 | int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */ | 71 | int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */ |
@@ -76,8 +76,8 @@ struct audio_stream { | |||
76 | * Alsa card structure for aic23 | 76 | * Alsa card structure for aic23 |
77 | */ | 77 | */ |
78 | struct snd_card_omap_codec { | 78 | struct snd_card_omap_codec { |
79 | snd_card_t *card; | 79 | struct snd_card *card; |
80 | snd_pcm_t *pcm; | 80 | struct snd_pcm *pcm; |
81 | long samplerate; | 81 | long samplerate; |
82 | struct audio_stream s[2]; /* playback & capture */ | 82 | struct audio_stream s[2]; /* playback & capture */ |
83 | }; | 83 | }; |
@@ -89,9 +89,9 @@ struct snd_card_omap_codec { | |||
89 | struct omap_alsa_codec_config { | 89 | struct omap_alsa_codec_config { |
90 | char *name; | 90 | char *name; |
91 | struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa; | 91 | struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa; |
92 | snd_pcm_hw_constraint_list_t *hw_constraints_rates; | 92 | struct snd_pcm_hw_constraint_list *hw_constraints_rates; |
93 | snd_pcm_hardware_t *snd_omap_alsa_playback; | 93 | struct snd_pcm_hardware *snd_omap_alsa_playback; |
94 | snd_pcm_hardware_t *snd_omap_alsa_capture; | 94 | struct snd_pcm_hardware *snd_omap_alsa_capture; |
95 | void (*codec_configure_dev)(void); | 95 | void (*codec_configure_dev)(void); |
96 | void (*codec_set_samplerate)(long); | 96 | void (*codec_set_samplerate)(long); |
97 | void (*codec_clock_setup)(void); | 97 | void (*codec_clock_setup)(void); |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index f4386906b200..f06d8a43fdee 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -167,11 +167,25 @@ extern unsigned int user_debug; | |||
167 | : : "r" (0) : "memory") | 167 | : : "r" (0) : "memory") |
168 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | 168 | #define dmb() __asm__ __volatile__ ("" : : : "memory") |
169 | #endif | 169 | #endif |
170 | #define mb() dmb() | 170 | |
171 | #define rmb() mb() | 171 | #define mb() barrier() |
172 | #define wmb() mb() | 172 | #define rmb() barrier() |
173 | #define read_barrier_depends() do { } while(0) | 173 | #define wmb() barrier() |
174 | #define set_mb(var, value) do { var = value; mb(); } while (0) | 174 | #define read_barrier_depends() do { } while(0) |
175 | |||
176 | #ifdef CONFIG_SMP | ||
177 | #define smp_mb() dmb() | ||
178 | #define smp_rmb() dmb() | ||
179 | #define smp_wmb() dmb() | ||
180 | #define smp_read_barrier_depends() read_barrier_depends() | ||
181 | #else | ||
182 | #define smp_mb() barrier() | ||
183 | #define smp_rmb() barrier() | ||
184 | #define smp_wmb() barrier() | ||
185 | #define smp_read_barrier_depends() read_barrier_depends() | ||
186 | #endif /* CONFIG_SMP */ | ||
187 | |||
188 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) | ||
175 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | 189 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); |
176 | 190 | ||
177 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ | 191 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ |
@@ -243,22 +257,6 @@ static inline void sched_cacheflush(void) | |||
243 | { | 257 | { |
244 | } | 258 | } |
245 | 259 | ||
246 | #ifdef CONFIG_SMP | ||
247 | |||
248 | #define smp_mb() mb() | ||
249 | #define smp_rmb() rmb() | ||
250 | #define smp_wmb() wmb() | ||
251 | #define smp_read_barrier_depends() read_barrier_depends() | ||
252 | |||
253 | #else | ||
254 | |||
255 | #define smp_mb() barrier() | ||
256 | #define smp_rmb() barrier() | ||
257 | #define smp_wmb() barrier() | ||
258 | #define smp_read_barrier_depends() do { } while(0) | ||
259 | |||
260 | #endif /* CONFIG_SMP */ | ||
261 | |||
262 | #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) | 260 | #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) |
263 | /* | 261 | /* |
264 | * On the StrongARM, "swp" is terminally broken since it bypasses the | 262 | * On the StrongARM, "swp" is terminally broken since it bypasses the |
diff --git a/include/asm-mips/ds1742.h b/include/asm-mips/ds1742.h deleted file mode 100644 index c2f2c32da637..000000000000 --- a/include/asm-mips/ds1742.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
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) 2006 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | ||
8 | #ifndef _ASM_DS1742_H | ||
9 | #define _ASM_DS1742_H | ||
10 | |||
11 | #include <ds1742.h> | ||
12 | |||
13 | #endif /* _ASM_DS1742_H */ | ||
diff --git a/include/asm-mips/jmr3927/jmr3927.h b/include/asm-mips/jmr3927/jmr3927.h index baf412967afa..c50e68ffa3af 100644 --- a/include/asm-mips/jmr3927/jmr3927.h +++ b/include/asm-mips/jmr3927/jmr3927.h | |||
@@ -179,12 +179,6 @@ static inline int jmr3927_have_isac(void) | |||
179 | #define jmr3927_have_nvram() \ | 179 | #define jmr3927_have_nvram() \ |
180 | ((jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR) & JMR3927_IDT_MASK) == JMR3927_IOC_IDT) | 180 | ((jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR) & JMR3927_IDT_MASK) == JMR3927_IOC_IDT) |
181 | 181 | ||
182 | /* NVRAM macro */ | ||
183 | #define jmr3927_nvram_in(ofs) \ | ||
184 | jmr3927_ioc_reg_in(JMR3927_IOC_NVRAMB_ADDR + ((ofs) << 1)) | ||
185 | #define jmr3927_nvram_out(d, ofs) \ | ||
186 | jmr3927_ioc_reg_out(d, JMR3927_IOC_NVRAMB_ADDR + ((ofs) << 1)) | ||
187 | |||
188 | /* LED macro */ | 182 | /* LED macro */ |
189 | #define jmr3927_led_set(n/*0-16*/) jmr3927_ioc_reg_out(~(n), JMR3927_IOC_LED_ADDR) | 183 | #define jmr3927_led_set(n/*0-16*/) jmr3927_ioc_reg_out(~(n), JMR3927_IOC_LED_ADDR) |
190 | #define jmr3927_io_led_set(n/*0-3*/) jmr3927_isac_reg_out((n), JMR3927_ISAC_LED_ADDR) | 184 | #define jmr3927_io_led_set(n/*0-3*/) jmr3927_isac_reg_out((n), JMR3927_ISAC_LED_ADDR) |
diff --git a/include/asm-mips/lasat/lasat.h b/include/asm-mips/lasat/lasat.h index 181afc5c0f1d..42077e367a5b 100644 --- a/include/asm-mips/lasat/lasat.h +++ b/include/asm-mips/lasat/lasat.h | |||
@@ -237,8 +237,6 @@ static inline void lasat_ndelay(unsigned int ns) | |||
237 | __delay(ns / lasat_ndelay_divider); | 237 | __delay(ns / lasat_ndelay_divider); |
238 | } | 238 | } |
239 | 239 | ||
240 | extern void (* prom_printf)(const char *fmt, ...); | ||
241 | |||
242 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ | 240 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ |
243 | 241 | ||
244 | #define LASAT_SERVICEMODE_MAGIC_1 0xdeadbeef | 242 | #define LASAT_SERVICEMODE_MAGIC_1 0xdeadbeef |
diff --git a/include/asm-mips/mach-atlas/mc146818rtc.h b/include/asm-mips/mach-atlas/mc146818rtc.h index a73a5698420c..51d337e1bbd1 100644 --- a/include/asm-mips/mach-atlas/mc146818rtc.h +++ b/include/asm-mips/mach-atlas/mc146818rtc.h | |||
@@ -55,6 +55,6 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
55 | 55 | ||
56 | #define RTC_ALWAYS_BCD 0 | 56 | #define RTC_ALWAYS_BCD 0 |
57 | 57 | ||
58 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | 58 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) |
59 | 59 | ||
60 | #endif /* __ASM_MACH_ATLAS_MC146818RTC_H */ | 60 | #endif /* __ASM_MACH_ATLAS_MC146818RTC_H */ |
diff --git a/include/asm-mips/mach-generic/dma-coherence.h b/include/asm-mips/mach-generic/dma-coherence.h index df71822fd27b..76e04e7feb84 100644 --- a/include/asm-mips/mach-generic/dma-coherence.h +++ b/include/asm-mips/mach-generic/dma-coherence.h | |||
@@ -11,22 +11,24 @@ | |||
11 | 11 | ||
12 | struct device; | 12 | struct device; |
13 | 13 | ||
14 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | 14 | static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, |
15 | size_t size) | ||
15 | { | 16 | { |
16 | return virt_to_phys(addr); | 17 | return virt_to_phys(addr); |
17 | } | 18 | } |
18 | 19 | ||
19 | static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) | 20 | static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, |
21 | struct page *page) | ||
20 | { | 22 | { |
21 | return page_to_phys(page); | 23 | return page_to_phys(page); |
22 | } | 24 | } |
23 | 25 | ||
24 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | 26 | static inline unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) |
25 | { | 27 | { |
26 | return dma_addr; | 28 | return dma_addr; |
27 | } | 29 | } |
28 | 30 | ||
29 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | 31 | static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) |
30 | { | 32 | { |
31 | } | 33 | } |
32 | 34 | ||
diff --git a/include/asm-mips/mach-generic/mc146818rtc.h b/include/asm-mips/mach-generic/mc146818rtc.h index 90c2e6f77faa..0b9a942f079d 100644 --- a/include/asm-mips/mach-generic/mc146818rtc.h +++ b/include/asm-mips/mach-generic/mc146818rtc.h | |||
@@ -30,7 +30,7 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
30 | #define RTC_ALWAYS_BCD 1 | 30 | #define RTC_ALWAYS_BCD 1 |
31 | 31 | ||
32 | #ifndef mc146818_decode_year | 32 | #ifndef mc146818_decode_year |
33 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | 33 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #endif /* __ASM_MACH_GENERIC_MC146818RTC_H */ | 36 | #endif /* __ASM_MACH_GENERIC_MC146818RTC_H */ |
diff --git a/include/asm-mips/mach-jmr3927/ds1742.h b/include/asm-mips/mach-jmr3927/ds1742.h deleted file mode 100644 index 8a8fef6d07fa..000000000000 --- a/include/asm-mips/mach-jmr3927/ds1742.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
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) 2003, 06 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_JMR3927_DS1742_H | ||
9 | #define __ASM_MACH_JMR3927_DS1742_H | ||
10 | |||
11 | #include <asm/jmr3927/jmr3927.h> | ||
12 | |||
13 | #define rtc_read(reg) (jmr3927_nvram_in(reg)) | ||
14 | #define rtc_write(data, reg) (jmr3927_nvram_out((data),(reg))) | ||
15 | |||
16 | #endif /* __ASM_MACH_JMR3927_DS1742_H */ | ||
diff --git a/include/asm-mips/mach-jmr3927/mangle-port.h b/include/asm-mips/mach-jmr3927/mangle-port.h new file mode 100644 index 000000000000..501a202631b5 --- /dev/null +++ b/include/asm-mips/mach-jmr3927/mangle-port.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef __ASM_MACH_JMR3927_MANGLE_PORT_H | ||
2 | #define __ASM_MACH_JMR3927_MANGLE_PORT_H | ||
3 | |||
4 | extern unsigned long __swizzle_addr_b(unsigned long port); | ||
5 | #define __swizzle_addr_w(port) (port) | ||
6 | #define __swizzle_addr_l(port) (port) | ||
7 | #define __swizzle_addr_q(port) (port) | ||
8 | |||
9 | #define ioswabb(a,x) (x) | ||
10 | #define __mem_ioswabb(a,x) (x) | ||
11 | #define ioswabw(a,x) le16_to_cpu(x) | ||
12 | #define __mem_ioswabw(a,x) (x) | ||
13 | #define ioswabl(a,x) le32_to_cpu(x) | ||
14 | #define __mem_ioswabl(a,x) (x) | ||
15 | #define ioswabq(a,x) le64_to_cpu(x) | ||
16 | #define __mem_ioswabq(a,x) (x) | ||
17 | |||
18 | #endif /* __ASM_MACH_JMR3927_MANGLE_PORT_H */ | ||
diff --git a/include/asm-mips/mach-mips/mc146818rtc.h b/include/asm-mips/mach-mips/mc146818rtc.h index 6730ba066576..ea612f37f614 100644 --- a/include/asm-mips/mach-mips/mc146818rtc.h +++ b/include/asm-mips/mach-mips/mc146818rtc.h | |||
@@ -43,6 +43,6 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
43 | 43 | ||
44 | #define RTC_ALWAYS_BCD 0 | 44 | #define RTC_ALWAYS_BCD 0 |
45 | 45 | ||
46 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | 46 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) |
47 | 47 | ||
48 | #endif /* __ASM_MACH_MALTA_MC146818RTC_H */ | 48 | #endif /* __ASM_MACH_MALTA_MC146818RTC_H */ |
diff --git a/include/asm-mips/mach-rm/mc146818rtc.h b/include/asm-mips/mach-rm/mc146818rtc.h index d37ae68dc6a3..145bce096fe9 100644 --- a/include/asm-mips/mach-rm/mc146818rtc.h +++ b/include/asm-mips/mach-rm/mc146818rtc.h | |||
@@ -7,11 +7,15 @@ | |||
7 | * | 7 | * |
8 | * RTC routines for PC style attached Dallas chip with ARC epoch. | 8 | * RTC routines for PC style attached Dallas chip with ARC epoch. |
9 | */ | 9 | */ |
10 | #ifndef __ASM_MACH_RM200_MC146818RTC_H | 10 | #ifndef __ASM_MACH_RM_MC146818RTC_H |
11 | #define __ASM_MACH_RM200_MC146818RTC_H | 11 | #define __ASM_MACH_RM_MC146818RTC_H |
12 | 12 | ||
13 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
14 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) | ||
15 | #else | ||
13 | #define mc146818_decode_year(year) ((year) + 1980) | 16 | #define mc146818_decode_year(year) ((year) + 1980) |
17 | #endif | ||
14 | 18 | ||
15 | #include_next <mc146818rtc.h> | 19 | #include_next <mc146818rtc.h> |
16 | 20 | ||
17 | #endif /* __ASM_MACH_RM200_MC146818RTC_H */ | 21 | #endif /* __ASM_MACH_RM_MC146818RTC_H */ |
diff --git a/include/asm-mips/mips-boards/prom.h b/include/asm-mips/mips-boards/prom.h index 7bf6f5f6ab9c..daaf9f98fc63 100644 --- a/include/asm-mips/mips-boards/prom.h +++ b/include/asm-mips/mips-boards/prom.h | |||
@@ -28,8 +28,6 @@ | |||
28 | 28 | ||
29 | extern char *prom_getcmdline(void); | 29 | extern char *prom_getcmdline(void); |
30 | extern char *prom_getenv(char *name); | 30 | extern char *prom_getenv(char *name); |
31 | extern void setup_prom_printf(int tty_no); | ||
32 | extern void prom_printf(char *fmt, ...); | ||
33 | extern void prom_init_cmdline(void); | 31 | extern void prom_init_cmdline(void); |
34 | extern void prom_meminit(void); | 32 | extern void prom_meminit(void); |
35 | extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem); | 33 | extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem); |
diff --git a/include/asm-mips/sgialib.h b/include/asm-mips/sgialib.h index 73f097315502..bfce5c786f1c 100644 --- a/include/asm-mips/sgialib.h +++ b/include/asm-mips/sgialib.h | |||
@@ -33,9 +33,6 @@ extern int prom_flags; | |||
33 | extern void prom_putchar(char c); | 33 | extern void prom_putchar(char c); |
34 | extern char prom_getchar(void); | 34 | extern char prom_getchar(void); |
35 | 35 | ||
36 | /* Generic printf() using ARCS console I/O. */ | ||
37 | extern void prom_printf(char *fmt, ...); | ||
38 | |||
39 | /* Memory descriptor management. */ | 36 | /* Memory descriptor management. */ |
40 | #define PROM_MAX_PMEMBLOCKS 32 | 37 | #define PROM_MAX_PMEMBLOCKS 32 |
41 | struct prom_pmemblock { | 38 | struct prom_pmemblock { |
diff --git a/include/asm-mips/sibyte/sb1250.h b/include/asm-mips/sibyte/sb1250.h index 2ba6988ddc8e..dfb29e13bce0 100644 --- a/include/asm-mips/sibyte/sb1250.h +++ b/include/asm-mips/sibyte/sb1250.h | |||
@@ -57,8 +57,6 @@ extern void bcm1480_mask_irq(int cpu, int irq); | |||
57 | extern void bcm1480_unmask_irq(int cpu, int irq); | 57 | extern void bcm1480_unmask_irq(int cpu, int irq); |
58 | extern void bcm1480_smp_finish(void); | 58 | extern void bcm1480_smp_finish(void); |
59 | 59 | ||
60 | extern void prom_printf(char *fmt, ...); | ||
61 | |||
62 | #define AT_spin \ | 60 | #define AT_spin \ |
63 | __asm__ __volatile__ ( \ | 61 | __asm__ __volatile__ ( \ |
64 | ".set noat\n" \ | 62 | ".set noat\n" \ |
diff --git a/include/linux/ds1742rtc.h b/include/linux/ds1742rtc.h deleted file mode 100644 index a83cdd1cafc9..000000000000 --- a/include/linux/ds1742rtc.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * ds1742rtc.h - register definitions for the Real-Time-Clock / CMOS RAM | ||
3 | * | ||
4 | * Copyright (C) 1999-2001 Toshiba Corporation | ||
5 | * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org) | ||
6 | * | ||
7 | * Permission is hereby granted to copy, modify and redistribute this code | ||
8 | * in terms of the GNU Library General Public License, Version 2 or later, | ||
9 | * at your option. | ||
10 | */ | ||
11 | #ifndef __LINUX_DS1742RTC_H | ||
12 | #define __LINUX_DS1742RTC_H | ||
13 | |||
14 | #include <asm/ds1742.h> | ||
15 | |||
16 | #define RTC_BRAM_SIZE 0x800 | ||
17 | #define RTC_OFFSET 0x7f8 | ||
18 | |||
19 | /* | ||
20 | * Register summary | ||
21 | */ | ||
22 | #define RTC_CONTROL (RTC_OFFSET + 0) | ||
23 | #define RTC_CENTURY (RTC_OFFSET + 0) | ||
24 | #define RTC_SECONDS (RTC_OFFSET + 1) | ||
25 | #define RTC_MINUTES (RTC_OFFSET + 2) | ||
26 | #define RTC_HOURS (RTC_OFFSET + 3) | ||
27 | #define RTC_DAY (RTC_OFFSET + 4) | ||
28 | #define RTC_DATE (RTC_OFFSET + 5) | ||
29 | #define RTC_MONTH (RTC_OFFSET + 6) | ||
30 | #define RTC_YEAR (RTC_OFFSET + 7) | ||
31 | |||
32 | #define RTC_CENTURY_MASK 0x3f | ||
33 | #define RTC_SECONDS_MASK 0x7f | ||
34 | #define RTC_DAY_MASK 0x07 | ||
35 | |||
36 | /* | ||
37 | * Bits in the Control/Century register | ||
38 | */ | ||
39 | #define RTC_WRITE 0x80 | ||
40 | #define RTC_READ 0x40 | ||
41 | |||
42 | /* | ||
43 | * Bits in the Seconds register | ||
44 | */ | ||
45 | #define RTC_STOP 0x80 | ||
46 | |||
47 | /* | ||
48 | * Bits in the Day register | ||
49 | */ | ||
50 | #define RTC_BATT_FLAG 0x80 | ||
51 | #define RTC_FREQ_TEST 0x40 | ||
52 | |||
53 | #endif /* __LINUX_DS1742RTC_H */ | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 35cb38573583..d103580c72d2 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -70,15 +70,34 @@ extern void vlan_ioctl_set(int (*hook)(void __user *)); | |||
70 | * depends on completely exhausting the VLAN identifier space. Thus | 70 | * depends on completely exhausting the VLAN identifier space. Thus |
71 | * it gives constant time look-up, but in many cases it wastes memory. | 71 | * it gives constant time look-up, but in many cases it wastes memory. |
72 | */ | 72 | */ |
73 | #define VLAN_GROUP_ARRAY_LEN 4096 | 73 | #define VLAN_GROUP_ARRAY_LEN 4096 |
74 | #define VLAN_GROUP_ARRAY_SPLIT_PARTS 8 | ||
75 | #define VLAN_GROUP_ARRAY_PART_LEN (VLAN_GROUP_ARRAY_LEN/VLAN_GROUP_ARRAY_SPLIT_PARTS) | ||
74 | 76 | ||
75 | struct vlan_group { | 77 | struct vlan_group { |
76 | int real_dev_ifindex; /* The ifindex of the ethernet(like) device the vlan is attached to. */ | 78 | int real_dev_ifindex; /* The ifindex of the ethernet(like) device the vlan is attached to. */ |
77 | struct hlist_node hlist; /* linked list */ | 79 | struct hlist_node hlist; /* linked list */ |
78 | struct net_device *vlan_devices[VLAN_GROUP_ARRAY_LEN]; | 80 | struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; |
79 | struct rcu_head rcu; | 81 | struct rcu_head rcu; |
80 | }; | 82 | }; |
81 | 83 | ||
84 | static inline struct net_device *vlan_group_get_device(struct vlan_group *vg, int vlan_id) | ||
85 | { | ||
86 | struct net_device **array; | ||
87 | array = vg->vlan_devices_arrays[vlan_id / VLAN_GROUP_ARRAY_PART_LEN]; | ||
88 | return array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN]; | ||
89 | } | ||
90 | |||
91 | static inline void vlan_group_set_device(struct vlan_group *vg, int vlan_id, | ||
92 | struct net_device *dev) | ||
93 | { | ||
94 | struct net_device **array; | ||
95 | if (!vg) | ||
96 | return; | ||
97 | array = vg->vlan_devices_arrays[vlan_id / VLAN_GROUP_ARRAY_PART_LEN]; | ||
98 | array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev; | ||
99 | } | ||
100 | |||
82 | struct vlan_priority_tci_mapping { | 101 | struct vlan_priority_tci_mapping { |
83 | unsigned long priority; | 102 | unsigned long priority; |
84 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it | 103 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it |
@@ -160,7 +179,7 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, | |||
160 | return NET_RX_DROP; | 179 | return NET_RX_DROP; |
161 | } | 180 | } |
162 | 181 | ||
163 | skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; | 182 | skb->dev = vlan_group_get_device(grp, vlan_tag & VLAN_VID_MASK); |
164 | if (skb->dev == NULL) { | 183 | if (skb->dev == NULL) { |
165 | dev_kfree_skb_any(skb); | 184 | dev_kfree_skb_any(skb); |
166 | 185 | ||
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index f3604593fb76..275354ffa1cb 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/types.h> | 11 | #include <asm/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | 13 | ||
14 | #define KVM_API_VERSION 3 | 14 | #define KVM_API_VERSION 4 |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Architectural interrupt line count, and the size of the bitmap needed | 17 | * Architectural interrupt line count, and the size of the bitmap needed |
@@ -52,11 +52,10 @@ enum kvm_exit_reason { | |||
52 | /* for KVM_RUN */ | 52 | /* for KVM_RUN */ |
53 | struct kvm_run { | 53 | struct kvm_run { |
54 | /* in */ | 54 | /* in */ |
55 | __u32 vcpu; | ||
56 | __u32 emulated; /* skip current instruction */ | 55 | __u32 emulated; /* skip current instruction */ |
57 | __u32 mmio_completed; /* mmio request completed */ | 56 | __u32 mmio_completed; /* mmio request completed */ |
58 | __u8 request_interrupt_window; | 57 | __u8 request_interrupt_window; |
59 | __u8 padding1[3]; | 58 | __u8 padding1[7]; |
60 | 59 | ||
61 | /* out */ | 60 | /* out */ |
62 | __u32 exit_type; | 61 | __u32 exit_type; |
@@ -111,10 +110,6 @@ struct kvm_run { | |||
111 | 110 | ||
112 | /* for KVM_GET_REGS and KVM_SET_REGS */ | 111 | /* for KVM_GET_REGS and KVM_SET_REGS */ |
113 | struct kvm_regs { | 112 | struct kvm_regs { |
114 | /* in */ | ||
115 | __u32 vcpu; | ||
116 | __u32 padding; | ||
117 | |||
118 | /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ | 113 | /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ |
119 | __u64 rax, rbx, rcx, rdx; | 114 | __u64 rax, rbx, rcx, rdx; |
120 | __u64 rsi, rdi, rsp, rbp; | 115 | __u64 rsi, rdi, rsp, rbp; |
@@ -141,10 +136,6 @@ struct kvm_dtable { | |||
141 | 136 | ||
142 | /* for KVM_GET_SREGS and KVM_SET_SREGS */ | 137 | /* for KVM_GET_SREGS and KVM_SET_SREGS */ |
143 | struct kvm_sregs { | 138 | struct kvm_sregs { |
144 | /* in */ | ||
145 | __u32 vcpu; | ||
146 | __u32 padding; | ||
147 | |||
148 | /* out (KVM_GET_SREGS) / in (KVM_SET_SREGS) */ | 139 | /* out (KVM_GET_SREGS) / in (KVM_SET_SREGS) */ |
149 | struct kvm_segment cs, ds, es, fs, gs, ss; | 140 | struct kvm_segment cs, ds, es, fs, gs, ss; |
150 | struct kvm_segment tr, ldt; | 141 | struct kvm_segment tr, ldt; |
@@ -163,8 +154,8 @@ struct kvm_msr_entry { | |||
163 | 154 | ||
164 | /* for KVM_GET_MSRS and KVM_SET_MSRS */ | 155 | /* for KVM_GET_MSRS and KVM_SET_MSRS */ |
165 | struct kvm_msrs { | 156 | struct kvm_msrs { |
166 | __u32 vcpu; | ||
167 | __u32 nmsrs; /* number of msrs in entries */ | 157 | __u32 nmsrs; /* number of msrs in entries */ |
158 | __u32 pad; | ||
168 | 159 | ||
169 | struct kvm_msr_entry entries[0]; | 160 | struct kvm_msr_entry entries[0]; |
170 | }; | 161 | }; |
@@ -179,8 +170,6 @@ struct kvm_msr_list { | |||
179 | struct kvm_translation { | 170 | struct kvm_translation { |
180 | /* in */ | 171 | /* in */ |
181 | __u64 linear_address; | 172 | __u64 linear_address; |
182 | __u32 vcpu; | ||
183 | __u32 padding; | ||
184 | 173 | ||
185 | /* out */ | 174 | /* out */ |
186 | __u64 physical_address; | 175 | __u64 physical_address; |
@@ -193,7 +182,6 @@ struct kvm_translation { | |||
193 | /* for KVM_INTERRUPT */ | 182 | /* for KVM_INTERRUPT */ |
194 | struct kvm_interrupt { | 183 | struct kvm_interrupt { |
195 | /* in */ | 184 | /* in */ |
196 | __u32 vcpu; | ||
197 | __u32 irq; | 185 | __u32 irq; |
198 | }; | 186 | }; |
199 | 187 | ||
@@ -206,8 +194,8 @@ struct kvm_breakpoint { | |||
206 | /* for KVM_DEBUG_GUEST */ | 194 | /* for KVM_DEBUG_GUEST */ |
207 | struct kvm_debug_guest { | 195 | struct kvm_debug_guest { |
208 | /* int */ | 196 | /* int */ |
209 | __u32 vcpu; | ||
210 | __u32 enabled; | 197 | __u32 enabled; |
198 | __u32 pad; | ||
211 | struct kvm_breakpoint breakpoints[4]; | 199 | struct kvm_breakpoint breakpoints[4]; |
212 | __u32 singlestep; | 200 | __u32 singlestep; |
213 | }; | 201 | }; |
@@ -224,20 +212,36 @@ struct kvm_dirty_log { | |||
224 | 212 | ||
225 | #define KVMIO 0xAE | 213 | #define KVMIO 0xAE |
226 | 214 | ||
215 | /* | ||
216 | * ioctls for /dev/kvm fds: | ||
217 | */ | ||
227 | #define KVM_GET_API_VERSION _IO(KVMIO, 1) | 218 | #define KVM_GET_API_VERSION _IO(KVMIO, 1) |
219 | #define KVM_CREATE_VM _IO(KVMIO, 2) /* returns a VM fd */ | ||
220 | #define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 15, struct kvm_msr_list) | ||
221 | |||
222 | /* | ||
223 | * ioctls for VM fds | ||
224 | */ | ||
225 | #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 10, struct kvm_memory_region) | ||
226 | /* | ||
227 | * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns | ||
228 | * a vcpu fd. | ||
229 | */ | ||
230 | #define KVM_CREATE_VCPU _IOW(KVMIO, 11, int) | ||
231 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 12, struct kvm_dirty_log) | ||
232 | |||
233 | /* | ||
234 | * ioctls for vcpu fds | ||
235 | */ | ||
228 | #define KVM_RUN _IOWR(KVMIO, 2, struct kvm_run) | 236 | #define KVM_RUN _IOWR(KVMIO, 2, struct kvm_run) |
229 | #define KVM_GET_REGS _IOWR(KVMIO, 3, struct kvm_regs) | 237 | #define KVM_GET_REGS _IOR(KVMIO, 3, struct kvm_regs) |
230 | #define KVM_SET_REGS _IOW(KVMIO, 4, struct kvm_regs) | 238 | #define KVM_SET_REGS _IOW(KVMIO, 4, struct kvm_regs) |
231 | #define KVM_GET_SREGS _IOWR(KVMIO, 5, struct kvm_sregs) | 239 | #define KVM_GET_SREGS _IOR(KVMIO, 5, struct kvm_sregs) |
232 | #define KVM_SET_SREGS _IOW(KVMIO, 6, struct kvm_sregs) | 240 | #define KVM_SET_SREGS _IOW(KVMIO, 6, struct kvm_sregs) |
233 | #define KVM_TRANSLATE _IOWR(KVMIO, 7, struct kvm_translation) | 241 | #define KVM_TRANSLATE _IOWR(KVMIO, 7, struct kvm_translation) |
234 | #define KVM_INTERRUPT _IOW(KVMIO, 8, struct kvm_interrupt) | 242 | #define KVM_INTERRUPT _IOW(KVMIO, 8, struct kvm_interrupt) |
235 | #define KVM_DEBUG_GUEST _IOW(KVMIO, 9, struct kvm_debug_guest) | 243 | #define KVM_DEBUG_GUEST _IOW(KVMIO, 9, struct kvm_debug_guest) |
236 | #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 10, struct kvm_memory_region) | ||
237 | #define KVM_CREATE_VCPU _IOW(KVMIO, 11, int /* vcpu_slot */) | ||
238 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 12, struct kvm_dirty_log) | ||
239 | #define KVM_GET_MSRS _IOWR(KVMIO, 13, struct kvm_msrs) | 244 | #define KVM_GET_MSRS _IOWR(KVMIO, 13, struct kvm_msrs) |
240 | #define KVM_SET_MSRS _IOWR(KVMIO, 14, struct kvm_msrs) | 245 | #define KVM_SET_MSRS _IOW(KVMIO, 14, struct kvm_msrs) |
241 | #define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 15, struct kvm_msr_list) | ||
242 | 246 | ||
243 | #endif | 247 | #endif |
diff --git a/include/linux/kvm_para.h b/include/linux/kvm_para.h new file mode 100644 index 000000000000..3b292565a693 --- /dev/null +++ b/include/linux/kvm_para.h | |||
@@ -0,0 +1,73 @@ | |||
1 | #ifndef __LINUX_KVM_PARA_H | ||
2 | #define __LINUX_KVM_PARA_H | ||
3 | |||
4 | /* | ||
5 | * Guest OS interface for KVM paravirtualization | ||
6 | * | ||
7 | * Note: this interface is totally experimental, and is certain to change | ||
8 | * as we make progress. | ||
9 | */ | ||
10 | |||
11 | /* | ||
12 | * Per-VCPU descriptor area shared between guest and host. Writable to | ||
13 | * both guest and host. Registered with the host by the guest when | ||
14 | * a guest acknowledges paravirtual mode. | ||
15 | * | ||
16 | * NOTE: all addresses are guest-physical addresses (gpa), to make it | ||
17 | * easier for the hypervisor to map between the various addresses. | ||
18 | */ | ||
19 | struct kvm_vcpu_para_state { | ||
20 | /* | ||
21 | * API version information for compatibility. If there's any support | ||
22 | * mismatch (too old host trying to execute too new guest) then | ||
23 | * the host will deny entry into paravirtual mode. Any other | ||
24 | * combination (new host + old guest and new host + new guest) | ||
25 | * is supposed to work - new host versions will support all old | ||
26 | * guest API versions. | ||
27 | */ | ||
28 | u32 guest_version; | ||
29 | u32 host_version; | ||
30 | u32 size; | ||
31 | u32 ret; | ||
32 | |||
33 | /* | ||
34 | * The address of the vm exit instruction (VMCALL or VMMCALL), | ||
35 | * which the host will patch according to the CPU model the | ||
36 | * VM runs on: | ||
37 | */ | ||
38 | u64 hypercall_gpa; | ||
39 | |||
40 | } __attribute__ ((aligned(PAGE_SIZE))); | ||
41 | |||
42 | #define KVM_PARA_API_VERSION 1 | ||
43 | |||
44 | /* | ||
45 | * This is used for an RDMSR's ECX parameter to probe for a KVM host. | ||
46 | * Hopefully no CPU vendor will use up this number. This is placed well | ||
47 | * out of way of the typical space occupied by CPU vendors' MSR indices, | ||
48 | * and we think (or at least hope) it wont be occupied in the future | ||
49 | * either. | ||
50 | */ | ||
51 | #define MSR_KVM_API_MAGIC 0x87655678 | ||
52 | |||
53 | #define KVM_EINVAL 1 | ||
54 | |||
55 | /* | ||
56 | * Hypercall calling convention: | ||
57 | * | ||
58 | * Each hypercall may have 0-6 parameters. | ||
59 | * | ||
60 | * 64-bit hypercall index is in RAX, goes from 0 to __NR_hypercalls-1 | ||
61 | * | ||
62 | * 64-bit parameters 1-6 are in the standard gcc x86_64 calling convention | ||
63 | * order: RDI, RSI, RDX, RCX, R8, R9. | ||
64 | * | ||
65 | * 32-bit index is EBX, parameters are: EAX, ECX, EDX, ESI, EDI, EBP. | ||
66 | * (the first 3 are according to the gcc regparm calling convention) | ||
67 | * | ||
68 | * No registers are clobbered by the hypercall, except that the | ||
69 | * return value is in RAX. | ||
70 | */ | ||
71 | #define __NR_hypercalls 0 | ||
72 | |||
73 | #endif | ||
diff --git a/include/linux/magic.h b/include/linux/magic.h index b32c8a97fcec..a9c6567fe70c 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define HPFS_SUPER_MAGIC 0xf995e849 | 13 | #define HPFS_SUPER_MAGIC 0xf995e849 |
14 | #define ISOFS_SUPER_MAGIC 0x9660 | 14 | #define ISOFS_SUPER_MAGIC 0x9660 |
15 | #define JFFS2_SUPER_MAGIC 0x72b6 | 15 | #define JFFS2_SUPER_MAGIC 0x72b6 |
16 | #define KVMFS_SUPER_MAGIC 0x19700426 | ||
16 | 17 | ||
17 | #define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ | 18 | #define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ |
18 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ | 19 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ |
diff --git a/include/net/sock.h b/include/net/sock.h index 2c7d60ca3548..849c7df23181 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -426,7 +426,7 @@ static inline void sk_acceptq_added(struct sock *sk) | |||
426 | 426 | ||
427 | static inline int sk_acceptq_is_full(struct sock *sk) | 427 | static inline int sk_acceptq_is_full(struct sock *sk) |
428 | { | 428 | { |
429 | return sk->sk_ack_backlog > sk->sk_max_ack_backlog; | 429 | return sk->sk_ack_backlog >= sk->sk_max_ack_backlog; |
430 | } | 430 | } |
431 | 431 | ||
432 | /* | 432 | /* |