aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/ds1742.h13
-rw-r--r--include/asm-mips/jmr3927/jmr3927.h6
-rw-r--r--include/asm-mips/lasat/lasat.h2
-rw-r--r--include/asm-mips/mach-atlas/mc146818rtc.h2
-rw-r--r--include/asm-mips/mach-generic/dma-coherence.h10
-rw-r--r--include/asm-mips/mach-generic/mc146818rtc.h2
-rw-r--r--include/asm-mips/mach-jmr3927/ds1742.h16
-rw-r--r--include/asm-mips/mach-jmr3927/mangle-port.h18
-rw-r--r--include/asm-mips/mach-mips/mc146818rtc.h2
-rw-r--r--include/asm-mips/mach-rm/mc146818rtc.h10
-rw-r--r--include/asm-mips/mips-boards/prom.h2
-rw-r--r--include/asm-mips/sgialib.h3
-rw-r--r--include/asm-mips/sibyte/sb1250.h2
-rw-r--r--include/asm-sparc/pci.h3
-rw-r--r--include/asm-sparc/prom.h1
-rw-r--r--include/asm-sparc64/pci.h3
-rw-r--r--include/asm-sparc64/prom.h1
-rw-r--r--include/linux/ds1742rtc.h53
-rw-r--r--include/linux/kvm.h50
-rw-r--r--include/linux/kvm_para.h73
-rw-r--r--include/linux/libata.h7
-rw-r--r--include/linux/magic.h1
-rw-r--r--include/linux/mv643xx.h2
23 files changed, 149 insertions, 133 deletions
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
240extern 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
12struct device; 12struct device;
13 13
14static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) 14static 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
19static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) 20static 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
24static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) 26static 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
29static void plat_unmap_dma_mem(dma_addr_t dma_addr) 31static 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
4extern 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
29extern char *prom_getcmdline(void); 29extern char *prom_getcmdline(void);
30extern char *prom_getenv(char *name); 30extern char *prom_getenv(char *name);
31extern void setup_prom_printf(int tty_no);
32extern void prom_printf(char *fmt, ...);
33extern void prom_init_cmdline(void); 31extern void prom_init_cmdline(void);
34extern void prom_meminit(void); 32extern void prom_meminit(void);
35extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem); 33extern 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;
33extern void prom_putchar(char c); 33extern void prom_putchar(char c);
34extern char prom_getchar(void); 34extern char prom_getchar(void);
35 35
36/* Generic printf() using ARCS console I/O. */
37extern 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
41struct prom_pmemblock { 38struct 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);
57extern void bcm1480_unmask_irq(int cpu, int irq); 57extern void bcm1480_unmask_irq(int cpu, int irq);
58extern void bcm1480_smp_finish(void); 58extern void bcm1480_smp_finish(void);
59 59
60extern 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/asm-sparc/pci.h b/include/asm-sparc/pci.h
index 38644742f011..a750c688408b 100644
--- a/include/asm-sparc/pci.h
+++ b/include/asm-sparc/pci.h
@@ -165,6 +165,9 @@ static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
165 return (dma_addr == PCI_DMA_ERROR_CODE); 165 return (dma_addr == PCI_DMA_ERROR_CODE);
166} 166}
167 167
168struct device_node;
169extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev);
170
168#endif /* __KERNEL__ */ 171#endif /* __KERNEL__ */
169 172
170/* generic pci stuff */ 173/* generic pci stuff */
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h
index 86c13dccea3d..274868d8598d 100644
--- a/include/asm-sparc/prom.h
+++ b/include/asm-sparc/prom.h
@@ -91,6 +91,7 @@ extern struct property *of_find_property(struct device_node *np,
91extern int of_device_is_compatible(struct device_node *device, const char *); 91extern int of_device_is_compatible(struct device_node *device, const char *);
92extern void *of_get_property(struct device_node *node, const char *name, 92extern void *of_get_property(struct device_node *node, const char *name,
93 int *lenp); 93 int *lenp);
94#define get_property(node,name,lenp) of_get_property(node,name,lenp)
94extern int of_set_property(struct device_node *node, const char *name, void *val, int len); 95extern int of_set_property(struct device_node *node, const char *name, void *val, int len);
95extern int of_getintprop_default(struct device_node *np, 96extern int of_getintprop_default(struct device_node *np,
96 const char *name, 97 const char *name,
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h
index ca6560288ae8..b14a725b430d 100644
--- a/include/asm-sparc64/pci.h
+++ b/include/asm-sparc64/pci.h
@@ -312,6 +312,9 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
312 return PCI_IRQ_NONE; 312 return PCI_IRQ_NONE;
313} 313}
314 314
315struct device_node;
316extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev);
317
315#endif /* __KERNEL__ */ 318#endif /* __KERNEL__ */
316 319
317#endif /* __SPARC64_PCI_H */ 320#endif /* __SPARC64_PCI_H */
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h
index 99671ed6625d..0eca2d98627f 100644
--- a/include/asm-sparc64/prom.h
+++ b/include/asm-sparc64/prom.h
@@ -99,6 +99,7 @@ extern struct property *of_find_property(struct device_node *np,
99extern int of_device_is_compatible(struct device_node *device, const char *); 99extern int of_device_is_compatible(struct device_node *device, const char *);
100extern void *of_get_property(struct device_node *node, const char *name, 100extern void *of_get_property(struct device_node *node, const char *name,
101 int *lenp); 101 int *lenp);
102#define get_property(node,name,lenp) of_get_property(node,name,lenp)
102extern int of_set_property(struct device_node *node, const char *name, void *val, int len); 103extern int of_set_property(struct device_node *node, const char *name, void *val, int len);
103extern int of_getintprop_default(struct device_node *np, 104extern int of_getintprop_default(struct device_node *np,
104 const char *name, 105 const char *name,
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/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 */
53struct kvm_run { 53struct 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 */
113struct kvm_regs { 112struct 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 */
143struct kvm_sregs { 138struct 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 */
165struct kvm_msrs { 156struct 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 {
179struct kvm_translation { 170struct 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 */
194struct kvm_interrupt { 183struct 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 */
207struct kvm_debug_guest { 195struct 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 */
19struct 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/libata.h b/include/linux/libata.h
index 045fb3a72d59..e3f32f3189b2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -403,8 +403,7 @@ struct ata_host {
403 void *private_data; 403 void *private_data;
404 const struct ata_port_operations *ops; 404 const struct ata_port_operations *ops;
405 unsigned long flags; 405 unsigned long flags;
406 int simplex_claimed; /* Keep seperate in case we 406 struct ata_port *simplex_claimed; /* channel owning the DMA */
407 ever need to do this locked */
408 struct ata_port *ports[0]; 407 struct ata_port *ports[0];
409}; 408};
410 409
@@ -719,10 +718,12 @@ extern void ata_std_ports(struct ata_ioports *ioaddr);
719extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, 718extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
720 unsigned int n_ports); 719 unsigned int n_ports);
721extern void ata_pci_remove_one (struct pci_dev *pdev); 720extern void ata_pci_remove_one (struct pci_dev *pdev);
721#ifdef CONFIG_PM
722extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); 722extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg);
723extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev); 723extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev);
724extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); 724extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
725extern int ata_pci_device_resume(struct pci_dev *pdev); 725extern int ata_pci_device_resume(struct pci_dev *pdev);
726#endif
726extern int ata_pci_clear_simplex(struct pci_dev *pdev); 727extern int ata_pci_clear_simplex(struct pci_dev *pdev);
727#endif /* CONFIG_PCI */ 728#endif /* CONFIG_PCI */
728extern int ata_device_add(const struct ata_probe_ent *ent); 729extern int ata_device_add(const struct ata_probe_ent *ent);
@@ -748,10 +749,12 @@ extern int sata_scr_write(struct ata_port *ap, int reg, u32 val);
748extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val); 749extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val);
749extern int ata_port_online(struct ata_port *ap); 750extern int ata_port_online(struct ata_port *ap);
750extern int ata_port_offline(struct ata_port *ap); 751extern int ata_port_offline(struct ata_port *ap);
752#ifdef CONFIG_PM
751extern int ata_scsi_device_resume(struct scsi_device *); 753extern int ata_scsi_device_resume(struct scsi_device *);
752extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg); 754extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg);
753extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); 755extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
754extern void ata_host_resume(struct ata_host *host); 756extern void ata_host_resume(struct ata_host *host);
757#endif
755extern int ata_ratelimit(void); 758extern int ata_ratelimit(void);
756extern int ata_busy_sleep(struct ata_port *ap, 759extern int ata_busy_sleep(struct ata_port *ap,
757 unsigned long timeout_pat, unsigned long timeout); 760 unsigned long timeout_pat, unsigned long timeout);
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/linux/mv643xx.h b/include/linux/mv643xx.h
index aff25c000abf..e7d4da1cc9fa 100644
--- a/include/linux/mv643xx.h
+++ b/include/linux/mv643xx.h
@@ -1288,7 +1288,6 @@ struct mv64xxx_i2c_pdata {
1288#define MV643XX_ETH_NAME "mv643xx_eth" 1288#define MV643XX_ETH_NAME "mv643xx_eth"
1289 1289
1290struct mv643xx_eth_platform_data { 1290struct mv643xx_eth_platform_data {
1291 char *mac_addr; /* pointer to mac address */
1292 u16 force_phy_addr; /* force override if phy_addr == 0 */ 1291 u16 force_phy_addr; /* force override if phy_addr == 0 */
1293 u16 phy_addr; 1292 u16 phy_addr;
1294 1293
@@ -1303,6 +1302,7 @@ struct mv643xx_eth_platform_data {
1303 u32 tx_sram_size; 1302 u32 tx_sram_size;
1304 u32 rx_sram_addr; 1303 u32 rx_sram_addr;
1305 u32 rx_sram_size; 1304 u32 rx_sram_size;
1305 u8 mac_addr[6]; /* mac address if non-zero*/
1306}; 1306};
1307 1307
1308#endif /* __ASM_MV643XX_H */ 1308#endif /* __ASM_MV643XX_H */