diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:16 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:16 -0400 |
commit | 875999c5539999f61a45620aae0c3e5fb1d2b035 (patch) | |
tree | 4535032a8a10f5782c0aef6a620b1a624ea9f863 /include | |
parent | 79072f38909e3d9883317238887460c39ddcc4cb (diff) | |
parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) |
Merge branch 'upstream'
Diffstat (limited to 'include')
244 files changed, 4223 insertions, 2018 deletions
diff --git a/include/asm-alpha/numnodes.h b/include/asm-alpha/numnodes.h deleted file mode 100644 index cd425827e4f3..000000000000 --- a/include/asm-alpha/numnodes.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _ASM_MAX_NUMNODES_H | ||
2 | #define _ASM_MAX_NUMNODES_H | ||
3 | |||
4 | /* Max 128 Nodes - Marvel */ | ||
5 | #define NODES_SHIFT 7 | ||
6 | |||
7 | #endif /* _ASM_MAX_NUMNODES_H */ | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_mci.h b/include/asm-arm/arch-at91rm9200/at91rm9200_mci.h new file mode 100644 index 000000000000..f28636d61e39 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_mci.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_mci.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * MultiMedia Card Interface (MCI) registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91RM9200_MCI_H | ||
17 | #define AT91RM9200_MCI_H | ||
18 | |||
19 | #define AT91_MCI_CR 0x00 /* Control Register */ | ||
20 | #define AT91_MCI_MCIEN (1 << 0) /* Multi-Media Interface Enable */ | ||
21 | #define AT91_MCI_MCIDIS (1 << 1) /* Multi-Media Interface Disable */ | ||
22 | #define AT91_MCI_PWSEN (1 << 2) /* Power Save Mode Enable */ | ||
23 | #define AT91_MCI_PWSDIS (1 << 3) /* Power Save Mode Disable */ | ||
24 | #define AT91_MCI_SWRST (1 << 7) /* Software Reset */ | ||
25 | |||
26 | #define AT91_MCI_MR 0x04 /* Mode Register */ | ||
27 | #define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */ | ||
28 | #define AT91_MCI_PWSDIV (3 << 8) /* Power Saving Divider */ | ||
29 | #define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */ | ||
30 | #define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */ | ||
31 | #define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */ | ||
32 | |||
33 | #define AT91_MCI_DTOR 0x08 /* Data Timeout Register */ | ||
34 | #define AT91_MCI_DTOCYC (0xf << 0) /* Data Timeout Cycle Number */ | ||
35 | #define AT91_MCI_DTOMUL (7 << 4) /* Data Timeout Multiplier */ | ||
36 | #define AT91_MCI_DTOMUL_1 (0 << 4) | ||
37 | #define AT91_MCI_DTOMUL_16 (1 << 4) | ||
38 | #define AT91_MCI_DTOMUL_128 (2 << 4) | ||
39 | #define AT91_MCI_DTOMUL_256 (3 << 4) | ||
40 | #define AT91_MCI_DTOMUL_1K (4 << 4) | ||
41 | #define AT91_MCI_DTOMUL_4K (5 << 4) | ||
42 | #define AT91_MCI_DTOMUL_64K (6 << 4) | ||
43 | #define AT91_MCI_DTOMUL_1M (7 << 4) | ||
44 | |||
45 | #define AT91_MCI_SDCR 0x0c /* SD Card Register */ | ||
46 | #define AT91_MCI_SDCSEL (0xf << 0) /* SD Card Selector */ | ||
47 | #define AT91_MCI_SDCBUS (1 << 7) /* 1-bit or 4-bit bus */ | ||
48 | |||
49 | #define AT91_MCI_ARGR 0x10 /* Argument Register */ | ||
50 | |||
51 | #define AT91_MCI_CMDR 0x14 /* Command Register */ | ||
52 | #define AT91_MCI_CMDNB (0x3f << 0) /* Command Number */ | ||
53 | #define AT91_MCI_RSPTYP (3 << 6) /* Response Type */ | ||
54 | #define AT91_MCI_RSPTYP_NONE (0 << 6) | ||
55 | #define AT91_MCI_RSPTYP_48 (1 << 6) | ||
56 | #define AT91_MCI_RSPTYP_136 (2 << 6) | ||
57 | #define AT91_MCI_SPCMD (7 << 8) /* Special Command */ | ||
58 | #define AT91_MCI_SPCMD_NONE (0 << 8) | ||
59 | #define AT91_MCI_SPCMD_INIT (1 << 8) | ||
60 | #define AT91_MCI_SPCMD_SYNC (2 << 8) | ||
61 | #define AT91_MCI_SPCMD_ICMD (4 << 8) | ||
62 | #define AT91_MCI_SPCMD_IRESP (5 << 8) | ||
63 | #define AT91_MCI_OPDCMD (1 << 11) /* Open Drain Command */ | ||
64 | #define AT91_MCI_MAXLAT (1 << 12) /* Max Latency for Command to Response */ | ||
65 | #define AT91_MCI_TRCMD (3 << 16) /* Transfer Command */ | ||
66 | #define AT91_MCI_TRCMD_NONE (0 << 16) | ||
67 | #define AT91_MCI_TRCMD_START (1 << 16) | ||
68 | #define AT91_MCI_TRCMD_STOP (2 << 16) | ||
69 | #define AT91_MCI_TRDIR (1 << 18) /* Transfer Direction */ | ||
70 | #define AT91_MCI_TRTYP (3 << 19) /* Transfer Type */ | ||
71 | #define AT91_MCI_TRTYP_BLOCK (0 << 19) | ||
72 | #define AT91_MCI_TRTYP_MULTIPLE (1 << 19) | ||
73 | #define AT91_MCI_TRTYP_STREAM (2 << 19) | ||
74 | |||
75 | #define AT91_MCI_RSPR(n) (0x20 + ((n) * 4)) /* Response Registers 0-3 */ | ||
76 | #define AT91_MCR_RDR 0x30 /* Receive Data Register */ | ||
77 | #define AT91_MCR_TDR 0x34 /* Transmit Data Register */ | ||
78 | |||
79 | #define AT91_MCI_SR 0x40 /* Status Register */ | ||
80 | #define AT91_MCI_CMDRDY (1 << 0) /* Command Ready */ | ||
81 | #define AT91_MCI_RXRDY (1 << 1) /* Receiver Ready */ | ||
82 | #define AT91_MCI_TXRDY (1 << 2) /* Transmit Ready */ | ||
83 | #define AT91_MCI_BLKE (1 << 3) /* Data Block Ended */ | ||
84 | #define AT91_MCI_DTIP (1 << 4) /* Data Transfer in Progress */ | ||
85 | #define AT91_MCI_NOTBUSY (1 << 5) /* Data Not Busy */ | ||
86 | #define AT91_MCI_ENDRX (1 << 6) /* End of RX Buffer */ | ||
87 | #define AT91_MCI_ENDTX (1 << 7) /* End fo TX Buffer */ | ||
88 | #define AT91_MCI_RXBUFF (1 << 14) /* RX Buffer Full */ | ||
89 | #define AT91_MCI_TXBUFE (1 << 15) /* TX Buffer Empty */ | ||
90 | #define AT91_MCI_RINDE (1 << 16) /* Response Index Error */ | ||
91 | #define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */ | ||
92 | #define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */ | ||
93 | #define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */ | ||
94 | #define AT91_MCI_RTOE (1 << 20) /* Reponse Time-out Error */ | ||
95 | #define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */ | ||
96 | #define AT91_MCI_DTOE (1 << 22) /* Data Time-out Error */ | ||
97 | #define AT91_MCI_OVRE (1 << 30) /* Overrun */ | ||
98 | #define AT91_MCI_UNRE (1 << 31) /* Underrun */ | ||
99 | |||
100 | #define AT91_MCI_IER 0x44 /* Interrupt Enable Register */ | ||
101 | #define AT91_MCI_IDR 0x48 /* Interrupt Disable Register */ | ||
102 | #define AT91_MCI_IMR 0x4c /* Interrupt Mask Register */ | ||
103 | |||
104 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h index 2e7d1139a799..4fdef13d01d4 100644 --- a/include/asm-arm/arch-at91rm9200/board.h +++ b/include/asm-arm/arch-at91rm9200/board.h | |||
@@ -38,6 +38,8 @@ extern unsigned long at91_master_clock; | |||
38 | extern int at91_serial_map[AT91_NR_UART]; | 38 | extern int at91_serial_map[AT91_NR_UART]; |
39 | extern int at91_console_port; | 39 | extern int at91_console_port; |
40 | 40 | ||
41 | #include <linux/mtd/partitions.h> | ||
42 | |||
41 | /* USB Device */ | 43 | /* USB Device */ |
42 | struct at91_udc_data { | 44 | struct at91_udc_data { |
43 | u8 vbus_pin; /* high == host powering us */ | 45 | u8 vbus_pin; /* high == host powering us */ |
@@ -77,4 +79,26 @@ struct at91_usbh_data { | |||
77 | }; | 79 | }; |
78 | extern void __init at91_add_device_usbh(struct at91_usbh_data *data); | 80 | extern void __init at91_add_device_usbh(struct at91_usbh_data *data); |
79 | 81 | ||
82 | /* NAND / SmartMedia */ | ||
83 | struct at91_nand_data { | ||
84 | u8 enable_pin; /* chip enable */ | ||
85 | u8 det_pin; /* card detect */ | ||
86 | u8 rdy_pin; /* ready/busy */ | ||
87 | u8 ale; /* address line number connected to ALE */ | ||
88 | u8 cle; /* address line number connected to CLE */ | ||
89 | struct mtd_partition* (*partition_info)(int, int*); | ||
90 | }; | ||
91 | extern void __init at91_add_device_nand(struct at91_nand_data *data); | ||
92 | |||
93 | /* I2C*/ | ||
94 | void __init at91_add_device_i2c(void); | ||
95 | |||
96 | /* RTC */ | ||
97 | void __init at91_add_device_rtc(void); | ||
98 | |||
99 | /* LEDs */ | ||
100 | extern u8 at91_leds_cpu; | ||
101 | extern u8 at91_leds_timer; | ||
102 | extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); | ||
103 | |||
80 | #endif | 104 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h index 2646c01f8e97..59e6f44d3a0d 100644 --- a/include/asm-arm/arch-at91rm9200/hardware.h +++ b/include/asm-arm/arch-at91rm9200/hardware.h | |||
@@ -65,6 +65,9 @@ | |||
65 | /* SmartMedia */ | 65 | /* SmartMedia */ |
66 | #define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */ | 66 | #define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */ |
67 | 67 | ||
68 | /* Compact Flash */ | ||
69 | #define AT91_CF_BASE 0x50000000 /* NCS4-NCS6: Compact Flash physical base address */ | ||
70 | |||
68 | /* Multi-Master Memory controller */ | 71 | /* Multi-Master Memory controller */ |
69 | #define AT91_UHP_BASE 0x00300000 /* USB Host controller */ | 72 | #define AT91_UHP_BASE 0x00300000 /* USB Host controller */ |
70 | 73 | ||
diff --git a/include/asm-arm/arch-cl7500/hardware.h b/include/asm-arm/arch-cl7500/hardware.h index 2339b764f69f..1adfd18e6154 100644 --- a/include/asm-arm/arch-cl7500/hardware.h +++ b/include/asm-arm/arch-cl7500/hardware.h | |||
@@ -53,16 +53,12 @@ | |||
53 | #define SCREEN_END 0xdfc00000 | 53 | #define SCREEN_END 0xdfc00000 |
54 | #define SCREEN_BASE 0xdf800000 | 54 | #define SCREEN_BASE 0xdf800000 |
55 | 55 | ||
56 | #define FLUSH_BASE 0xdf000000 | ||
57 | |||
58 | #define VIDC_BASE (void __iomem *)0xe0400000 | 56 | #define VIDC_BASE (void __iomem *)0xe0400000 |
59 | #define IOMD_BASE IOMEM(0xe0200000) | 57 | #define IOMD_BASE IOMEM(0xe0200000) |
60 | #define IOC_BASE IOMEM(0xe0200000) | 58 | #define IOC_BASE IOMEM(0xe0200000) |
61 | #define FLOPPYDMA_BASE IOMEM(0xe002a000) | 59 | #define FLOPPYDMA_BASE IOMEM(0xe002a000) |
62 | #define PCIO_BASE IOMEM(0xe0010000) | 60 | #define PCIO_BASE IOMEM(0xe0010000) |
63 | 61 | ||
64 | #define FLUSH_BASE_PHYS 0x00000000 /* ROM */ | ||
65 | |||
66 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) | 62 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) |
67 | 63 | ||
68 | /* in/out bias for the ISA slot region */ | 64 | /* in/out bias for the ISA slot region */ |
diff --git a/include/asm-arm/arch-cl7500/memory.h b/include/asm-arm/arch-cl7500/memory.h index 34f40a6cec30..3178140e24ca 100644 --- a/include/asm-arm/arch-cl7500/memory.h +++ b/include/asm-arm/arch-cl7500/memory.h | |||
@@ -26,4 +26,10 @@ | |||
26 | #define __virt_to_bus(x) __virt_to_phys(x) | 26 | #define __virt_to_bus(x) __virt_to_phys(x) |
27 | #define __bus_to_virt(x) __phys_to_virt(x) | 27 | #define __bus_to_virt(x) __phys_to_virt(x) |
28 | 28 | ||
29 | /* | ||
30 | * Cache flushing area - ROM | ||
31 | */ | ||
32 | #define FLUSH_BASE_PHYS 0x00000000 | ||
33 | #define FLUSH_BASE 0xdf000000 | ||
34 | |||
29 | #endif | 35 | #endif |
diff --git a/include/asm-arm/arch-ebsa110/debug-macro.S b/include/asm-arm/arch-ebsa110/debug-macro.S index f61cadabe0ec..9213bfe4831d 100644 --- a/include/asm-arm/arch-ebsa110/debug-macro.S +++ b/include/asm-arm/arch-ebsa110/debug-macro.S | |||
@@ -18,4 +18,4 @@ | |||
18 | 18 | ||
19 | #define UART_SHIFT 2 | 19 | #define UART_SHIFT 2 |
20 | #define FLOW_CONTROL | 20 | #define FLOW_CONTROL |
21 | #include <asm/hardware/debug-8250.h> | 21 | #include <asm/hardware/debug-8250.S> |
diff --git a/include/asm-arm/arch-ebsa110/hardware.h b/include/asm-arm/arch-ebsa110/hardware.h index 4e41c2358f4e..3ce864def41e 100644 --- a/include/asm-arm/arch-ebsa110/hardware.h +++ b/include/asm-arm/arch-ebsa110/hardware.h | |||
@@ -57,9 +57,6 @@ | |||
57 | /* | 57 | /* |
58 | * RAM definitions | 58 | * RAM definitions |
59 | */ | 59 | */ |
60 | #define FLUSH_BASE_PHYS 0x40000000 | ||
61 | #define FLUSH_BASE 0xdf000000 | ||
62 | |||
63 | #define UNCACHEABLE_ADDR 0xff000000 /* IRQ_STAT */ | 60 | #define UNCACHEABLE_ADDR 0xff000000 /* IRQ_STAT */ |
64 | 61 | ||
65 | #endif | 62 | #endif |
diff --git a/include/asm-arm/arch-ebsa110/memory.h b/include/asm-arm/arch-ebsa110/memory.h index 02f144520c10..c7c500e176d0 100644 --- a/include/asm-arm/arch-ebsa110/memory.h +++ b/include/asm-arm/arch-ebsa110/memory.h | |||
@@ -28,4 +28,10 @@ | |||
28 | #define __virt_to_bus(x) (x) | 28 | #define __virt_to_bus(x) (x) |
29 | #define __bus_to_virt(x) (x) | 29 | #define __bus_to_virt(x) (x) |
30 | 30 | ||
31 | /* | ||
32 | * Cache flushing area - SRAM | ||
33 | */ | ||
34 | #define FLUSH_BASE_PHYS 0x40000000 | ||
35 | #define FLUSH_BASE 0xdf000000 | ||
36 | |||
31 | #endif | 37 | #endif |
diff --git a/include/asm-arm/arch-ebsa110/uncompress.h b/include/asm-arm/arch-ebsa110/uncompress.h index 66b19c7fd908..ae5b775eb0b7 100644 --- a/include/asm-arm/arch-ebsa110/uncompress.h +++ b/include/asm-arm/arch-ebsa110/uncompress.h | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/serial_reg.h> | 11 | #include <linux/serial_reg.h> |
12 | 12 | ||
13 | #define SERIAL_BASE ((unsigned char *)0xfe000be0) | 13 | #define SERIAL_BASE ((unsigned char *)0xf0000be0) |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * This does not append a newline | 16 | * This does not append a newline |
diff --git a/include/asm-arm/arch-ebsa285/hardware.h b/include/asm-arm/arch-ebsa285/hardware.h index 2ef2200f108c..ec51fe92483b 100644 --- a/include/asm-arm/arch-ebsa285/hardware.h +++ b/include/asm-arm/arch-ebsa285/hardware.h | |||
@@ -48,9 +48,6 @@ | |||
48 | #define PCICFG0_SIZE 0x01000000 | 48 | #define PCICFG0_SIZE 0x01000000 |
49 | #define PCICFG0_BASE 0xfa000000 | 49 | #define PCICFG0_BASE 0xfa000000 |
50 | 50 | ||
51 | #define FLUSH_SIZE 0x00100000 | ||
52 | #define FLUSH_BASE 0xf9000000 | ||
53 | |||
54 | #define PCIMEM_SIZE 0x01000000 | 51 | #define PCIMEM_SIZE 0x01000000 |
55 | #define PCIMEM_BASE 0xf0000000 | 52 | #define PCIMEM_BASE 0xf0000000 |
56 | 53 | ||
@@ -61,9 +58,6 @@ | |||
61 | #define PCIMEM_SIZE 0x80000000 | 58 | #define PCIMEM_SIZE 0x80000000 |
62 | #define PCIMEM_BASE 0x80000000 | 59 | #define PCIMEM_BASE 0x80000000 |
63 | 60 | ||
64 | #define FLUSH_SIZE 0x00100000 | ||
65 | #define FLUSH_BASE 0x7e000000 | ||
66 | |||
67 | #define WFLUSH_SIZE 0x01000000 | 61 | #define WFLUSH_SIZE 0x01000000 |
68 | #define WFLUSH_BASE 0x7d000000 | 62 | #define WFLUSH_BASE 0x7d000000 |
69 | 63 | ||
@@ -94,7 +88,6 @@ | |||
94 | #define XBUS_SWITCH_J17_11 ((*XBUS_SWITCH) & (1 << 5)) | 88 | #define XBUS_SWITCH_J17_11 ((*XBUS_SWITCH) & (1 << 5)) |
95 | #define XBUS_SWITCH_J17_9 ((*XBUS_SWITCH) & (1 << 6)) | 89 | #define XBUS_SWITCH_J17_9 ((*XBUS_SWITCH) & (1 << 6)) |
96 | 90 | ||
97 | #define FLUSH_BASE_PHYS 0x50000000 | ||
98 | #define UNCACHEABLE_ADDR (ARMCSR_BASE + 0x108) | 91 | #define UNCACHEABLE_ADDR (ARMCSR_BASE + 0x108) |
99 | 92 | ||
100 | 93 | ||
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h index 09e335cd687d..99181ffc7e27 100644 --- a/include/asm-arm/arch-ebsa285/memory.h +++ b/include/asm-arm/arch-ebsa285/memory.h | |||
@@ -49,12 +49,22 @@ extern unsigned long __bus_to_virt(unsigned long); | |||
49 | #define TASK_SIZE UL(0xbf000000) | 49 | #define TASK_SIZE UL(0xbf000000) |
50 | #define PAGE_OFFSET UL(0xc0000000) | 50 | #define PAGE_OFFSET UL(0xc0000000) |
51 | 51 | ||
52 | /* | ||
53 | * Cache flushing area. | ||
54 | */ | ||
55 | #define FLUSH_BASE 0xf9000000 | ||
56 | |||
52 | #elif defined(CONFIG_ARCH_CO285) | 57 | #elif defined(CONFIG_ARCH_CO285) |
53 | 58 | ||
54 | /* Task size and page offset at 1.5GB */ | 59 | /* Task size and page offset at 1.5GB */ |
55 | #define TASK_SIZE UL(0x5f000000) | 60 | #define TASK_SIZE UL(0x5f000000) |
56 | #define PAGE_OFFSET UL(0x60000000) | 61 | #define PAGE_OFFSET UL(0x60000000) |
57 | 62 | ||
63 | /* | ||
64 | * Cache flushing area. | ||
65 | */ | ||
66 | #define FLUSH_BASE 0x7e000000 | ||
67 | |||
58 | #else | 68 | #else |
59 | 69 | ||
60 | #error "Undefined footbridge architecture" | 70 | #error "Undefined footbridge architecture" |
@@ -72,4 +82,6 @@ extern unsigned long __bus_to_virt(unsigned long); | |||
72 | */ | 82 | */ |
73 | #define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3) | 83 | #define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3) |
74 | 84 | ||
85 | #define FLUSH_BASE_PHYS 0x50000000 | ||
86 | |||
75 | #endif | 87 | #endif |
diff --git a/include/asm-arm/arch-ep93xx/ts72xx.h b/include/asm-arm/arch-ep93xx/ts72xx.h index 412215e77f44..a94f63ff0535 100644 --- a/include/asm-arm/arch-ep93xx/ts72xx.h +++ b/include/asm-arm/arch-ep93xx/ts72xx.h | |||
@@ -12,6 +12,8 @@ | |||
12 | * febfc000 [67]0000000 4K NAND data register | 12 | * febfc000 [67]0000000 4K NAND data register |
13 | * febfb000 [67]0400000 4K NAND control register | 13 | * febfb000 [67]0400000 4K NAND control register |
14 | * febfa000 [67]0800000 4K NAND busy register | 14 | * febfa000 [67]0800000 4K NAND busy register |
15 | * febf9000 10800000 4K TS-5620 RTC index register | ||
16 | * febf8000 11700000 4K TS-5620 RTC data register | ||
15 | */ | 17 | */ |
16 | 18 | ||
17 | #define TS72XX_MODEL_PHYS_BASE 0x22000000 | 19 | #define TS72XX_MODEL_PHYS_BASE 0x22000000 |
@@ -58,6 +60,15 @@ | |||
58 | #define TS72XX_NAND_BUSY_SIZE 0x00001000 | 60 | #define TS72XX_NAND_BUSY_SIZE 0x00001000 |
59 | 61 | ||
60 | 62 | ||
63 | #define TS72XX_RTC_INDEX_VIRT_BASE 0xfebf9000 | ||
64 | #define TS72XX_RTC_INDEX_PHYS_BASE 0x10800000 | ||
65 | #define TS72XX_RTC_INDEX_SIZE 0x00001000 | ||
66 | |||
67 | #define TS72XX_RTC_DATA_VIRT_BASE 0xfebf8000 | ||
68 | #define TS72XX_RTC_DATA_PHYS_BASE 0x11700000 | ||
69 | #define TS72XX_RTC_DATA_SIZE 0x00001000 | ||
70 | |||
71 | |||
61 | #ifndef __ASSEMBLY__ | 72 | #ifndef __ASSEMBLY__ |
62 | #include <asm/io.h> | 73 | #include <asm/io.h> |
63 | 74 | ||
diff --git a/include/asm-arm/arch-imx/dma.h b/include/asm-arm/arch-imx/dma.h index b45fa367d71e..621ff2c730f2 100644 --- a/include/asm-arm/arch-imx/dma.h +++ b/include/asm-arm/arch-imx/dma.h | |||
@@ -17,27 +17,16 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | |||
20 | #ifndef __ASM_ARCH_DMA_H | 21 | #ifndef __ASM_ARCH_DMA_H |
21 | #define __ASM_ARCH_DMA_H | 22 | #define __ASM_ARCH_DMA_H |
22 | 23 | ||
23 | /* | ||
24 | * DMA registration | ||
25 | */ | ||
26 | |||
27 | typedef enum { | 24 | typedef enum { |
28 | DMA_PRIO_HIGH = 0, | 25 | DMA_PRIO_HIGH = 0, |
29 | DMA_PRIO_MEDIUM = 3, | 26 | DMA_PRIO_MEDIUM = 1, |
30 | DMA_PRIO_LOW = 6 | 27 | DMA_PRIO_LOW = 2 |
31 | } imx_dma_prio; | 28 | } imx_dma_prio; |
32 | 29 | ||
33 | int imx_request_dma(char *name, imx_dma_prio prio, | ||
34 | void (*irq_handler) (int, void *, struct pt_regs *), | ||
35 | void (*err_handler) (int, void *, struct pt_regs *), | ||
36 | void *data); | ||
37 | |||
38 | void imx_free_dma(int dma_ch); | ||
39 | |||
40 | |||
41 | #define DMA_REQ_UART3_T 2 | 30 | #define DMA_REQ_UART3_T 2 |
42 | #define DMA_REQ_UART3_R 3 | 31 | #define DMA_REQ_UART3_R 3 |
43 | #define DMA_REQ_SSI2_T 4 | 32 | #define DMA_REQ_SSI2_T 4 |
diff --git a/include/asm-arm/arch-imx/imx-dma.h b/include/asm-arm/arch-imx/imx-dma.h new file mode 100644 index 000000000000..f2063c1d610d --- /dev/null +++ b/include/asm-arm/arch-imx/imx-dma.h | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/imxads/dma.h | ||
3 | * | ||
4 | * Copyright (C) 1997,1998 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <asm/dma.h> | ||
22 | |||
23 | #ifndef __ASM_ARCH_IMX_DMA_H | ||
24 | #define __ASM_ARCH_IMX_DMA_H | ||
25 | |||
26 | #define IMX_DMA_CHANNELS 11 | ||
27 | |||
28 | /* | ||
29 | * struct imx_dma_channel - i.MX specific DMA extension | ||
30 | * @name: name specified by DMA client | ||
31 | * @irq_handler: client callback for end of transfer | ||
32 | * @err_handler: client callback for error condition | ||
33 | * @data: clients context data for callbacks | ||
34 | * @dma_mode: direction of the transfer %DMA_MODE_READ or %DMA_MODE_WRITE | ||
35 | * @sg: pointer to the actual read/written chunk for scatter-gather emulation | ||
36 | * @sgbc: counter of processed bytes in the actual read/written chunk | ||
37 | * @resbytes: total residual number of bytes to transfer | ||
38 | * (it can be lower or same as sum of SG mapped chunk sizes) | ||
39 | * @sgcount: number of chunks to be read/written | ||
40 | * | ||
41 | * Structure is used for IMX DMA processing. It would be probably good | ||
42 | * @struct dma_struct in the future for external interfacing and use | ||
43 | * @struct imx_dma_channel only as extension to it. | ||
44 | */ | ||
45 | |||
46 | struct imx_dma_channel { | ||
47 | const char *name; | ||
48 | void (*irq_handler) (int, void *, struct pt_regs *); | ||
49 | void (*err_handler) (int, void *, struct pt_regs *); | ||
50 | void *data; | ||
51 | dmamode_t dma_mode; | ||
52 | struct scatterlist *sg; | ||
53 | unsigned int sgbc; | ||
54 | unsigned int sgcount; | ||
55 | unsigned int resbytes; | ||
56 | int dma_num; | ||
57 | }; | ||
58 | |||
59 | extern struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; | ||
60 | |||
61 | |||
62 | /* The type to distinguish channel numbers parameter from ordinal int type */ | ||
63 | typedef int imx_dmach_t; | ||
64 | |||
65 | int | ||
66 | imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address, | ||
67 | unsigned int dma_length, unsigned int dev_addr, dmamode_t dmamode); | ||
68 | |||
69 | int | ||
70 | imx_dma_setup_sg(imx_dmach_t dma_ch, | ||
71 | struct scatterlist *sg, unsigned int sgcount, unsigned int dma_length, | ||
72 | unsigned int dev_addr, dmamode_t dmamode); | ||
73 | |||
74 | int | ||
75 | imx_dma_setup_handlers(imx_dmach_t dma_ch, | ||
76 | void (*irq_handler) (int, void *, struct pt_regs *), | ||
77 | void (*err_handler) (int, void *, struct pt_regs *), void *data); | ||
78 | |||
79 | void imx_dma_enable(imx_dmach_t dma_ch); | ||
80 | |||
81 | void imx_dma_disable(imx_dmach_t dma_ch); | ||
82 | |||
83 | int imx_dma_request(imx_dmach_t dma_ch, const char *name); | ||
84 | |||
85 | void imx_dma_free(imx_dmach_t dma_ch); | ||
86 | |||
87 | int imx_dma_request_by_prio(imx_dmach_t *pdma_ch, const char *name, imx_dma_prio prio); | ||
88 | |||
89 | |||
90 | #endif /* _ASM_ARCH_IMX_DMA_H */ | ||
diff --git a/include/asm-arm/arch-imx/mmc.h b/include/asm-arm/arch-imx/mmc.h new file mode 100644 index 000000000000..1937151665c7 --- /dev/null +++ b/include/asm-arm/arch-imx/mmc.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef ASMARM_ARCH_MMC_H | ||
2 | #define ASMARM_ARCH_MMC_H | ||
3 | |||
4 | #include <linux/mmc/protocol.h> | ||
5 | |||
6 | struct imxmmc_platform_data { | ||
7 | int (*card_present)(void); | ||
8 | }; | ||
9 | |||
10 | extern void imx_set_mmc_info(struct imxmmc_platform_data *info); | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/debug-macro.S b/include/asm-arm/arch-ixp23xx/debug-macro.S index eb99fd69fd24..2b25e640247d 100644 --- a/include/asm-arm/arch-ixp23xx/debug-macro.S +++ b/include/asm-arm/arch-ixp23xx/debug-macro.S | |||
@@ -17,6 +17,9 @@ | |||
17 | tst \rx, #1 @ mmu enabled? | 17 | tst \rx, #1 @ mmu enabled? |
18 | ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical | 18 | ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical |
19 | ldrne \rx, =IXP23XX_PERIPHERAL_VIRT @ virtual | 19 | ldrne \rx, =IXP23XX_PERIPHERAL_VIRT @ virtual |
20 | #ifdef __ARMEB__ | ||
21 | orr \rx, \rx, #0x00000003 | ||
22 | #endif | ||
20 | .endm | 23 | .endm |
21 | 24 | ||
22 | #define UART_SHIFT 2 | 25 | #define UART_SHIFT 2 |
diff --git a/include/asm-arm/arch-ixp23xx/memory.h b/include/asm-arm/arch-ixp23xx/memory.h index bebcf0aa0d72..6e19f46d54d1 100644 --- a/include/asm-arm/arch-ixp23xx/memory.h +++ b/include/asm-arm/arch-ixp23xx/memory.h | |||
@@ -28,6 +28,7 @@ | |||
28 | * to an address that the kernel can use. | 28 | * to an address that the kernel can use. |
29 | */ | 29 | */ |
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
31 | #include <asm/mach-types.h> | ||
31 | 32 | ||
32 | #define __virt_to_bus(v) \ | 33 | #define __virt_to_bus(v) \ |
33 | ({ unsigned int ret; \ | 34 | ({ unsigned int ret; \ |
@@ -40,6 +41,22 @@ | |||
40 | data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR); \ | 41 | data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR); \ |
41 | __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); }) | 42 | __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); }) |
42 | 43 | ||
44 | /* | ||
45 | * Coherency support. Only supported on A2 CPUs or on A1 | ||
46 | * systems that have the cache coherency workaround. | ||
47 | */ | ||
48 | static inline int __ixp23xx_arch_is_coherent(void) | ||
49 | { | ||
50 | extern unsigned int processor_id; | ||
51 | |||
52 | if (((processor_id & 15) >= 2) || machine_is_roadrunner()) | ||
53 | return 1; | ||
54 | |||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | #define arch_is_coherent() __ixp23xx_arch_is_coherent() | ||
59 | |||
43 | #endif | 60 | #endif |
44 | 61 | ||
45 | 62 | ||
diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h index f85b4685a491..e4d99060a049 100644 --- a/include/asm-arm/arch-ixp23xx/platform.h +++ b/include/asm-arm/arch-ixp23xx/platform.h | |||
@@ -22,6 +22,7 @@ void ixp23xx_sys_init(void); | |||
22 | int ixp23xx_pci_setup(int, struct pci_sys_data *); | 22 | int ixp23xx_pci_setup(int, struct pci_sys_data *); |
23 | void ixp23xx_pci_preinit(void); | 23 | void ixp23xx_pci_preinit(void); |
24 | struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); | 24 | struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); |
25 | void ixp23xx_pci_slave_init(void); | ||
25 | 26 | ||
26 | extern struct sys_timer ixp23xx_timer; | 27 | extern struct sys_timer ixp23xx_timer; |
27 | 28 | ||
diff --git a/include/asm-arm/arch-ixp23xx/uncompress.h b/include/asm-arm/arch-ixp23xx/uncompress.h index 62623fa9b2f7..013575e6a9a1 100644 --- a/include/asm-arm/arch-ixp23xx/uncompress.h +++ b/include/asm-arm/arch-ixp23xx/uncompress.h | |||
@@ -16,26 +16,21 @@ | |||
16 | 16 | ||
17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) | 17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) |
18 | 18 | ||
19 | static __inline__ void putc(char c) | 19 | static inline void putc(char c) |
20 | { | 20 | { |
21 | int j; | 21 | int j; |
22 | 22 | ||
23 | for (j = 0; j < 0x1000; j++) { | 23 | for (j = 0; j < 0x1000; j++) { |
24 | if (UART_BASE[UART_LSR] & UART_LSR_THRE) | 24 | if (UART_BASE[UART_LSR] & UART_LSR_THRE) |
25 | break; | 25 | break; |
26 | barrier(); | ||
26 | } | 27 | } |
27 | 28 | ||
28 | UART_BASE[UART_TX] = c; | 29 | UART_BASE[UART_TX] = c; |
29 | } | 30 | } |
30 | 31 | ||
31 | static void putstr(const char *s) | 32 | static inline void flush(void) |
32 | { | 33 | { |
33 | while (*s) { | ||
34 | putc(*s); | ||
35 | if (*s == '\n') | ||
36 | putc('\r'); | ||
37 | s++; | ||
38 | } | ||
39 | } | 34 | } |
40 | 35 | ||
41 | #define arch_decomp_setup() | 36 | #define arch_decomp_setup() |
diff --git a/include/asm-arm/arch-l7200/hardware.h b/include/asm-arm/arch-l7200/hardware.h index b755079befab..2ab43f3a4a8d 100644 --- a/include/asm-arm/arch-l7200/hardware.h +++ b/include/asm-arm/arch-l7200/hardware.h | |||
@@ -52,9 +52,6 @@ | |||
52 | #define ISA_SIZE 0x20000000 | 52 | #define ISA_SIZE 0x20000000 |
53 | #define ISA_BASE 0xe0000000 | 53 | #define ISA_BASE 0xe0000000 |
54 | 54 | ||
55 | #define FLUSH_BASE_PHYS 0x40000000 /* ROM */ | ||
56 | #define FLUSH_BASE 0xdf000000 | ||
57 | |||
58 | #define PCIO_BASE IO_BASE | 55 | #define PCIO_BASE IO_BASE |
59 | 56 | ||
60 | #endif | 57 | #endif |
diff --git a/include/asm-arm/arch-l7200/memory.h b/include/asm-arm/arch-l7200/memory.h index 9e50a171f78a..402df637e740 100644 --- a/include/asm-arm/arch-l7200/memory.h +++ b/include/asm-arm/arch-l7200/memory.h | |||
@@ -20,4 +20,10 @@ | |||
20 | #define __virt_to_bus(x) __virt_to_phys(x) | 20 | #define __virt_to_bus(x) __virt_to_phys(x) |
21 | #define __bus_to_virt(x) __phys_to_virt(x) | 21 | #define __bus_to_virt(x) __phys_to_virt(x) |
22 | 22 | ||
23 | /* | ||
24 | * Cache flushing area - ROM | ||
25 | */ | ||
26 | #define FLUSH_BASE_PHYS 0x40000000 | ||
27 | #define FLUSH_BASE 0xdf000000 | ||
28 | |||
23 | #endif | 29 | #endif |
diff --git a/include/asm-arm/arch-lh7a40x/memory.h b/include/asm-arm/arch-lh7a40x/memory.h index c92bcb837629..9f1a58cbf407 100644 --- a/include/asm-arm/arch-lh7a40x/memory.h +++ b/include/asm-arm/arch-lh7a40x/memory.h | |||
@@ -31,8 +31,6 @@ | |||
31 | 31 | ||
32 | #ifdef CONFIG_DISCONTIGMEM | 32 | #ifdef CONFIG_DISCONTIGMEM |
33 | 33 | ||
34 | #define NODES_SHIFT 4 /* Up to 16 nodes */ | ||
35 | |||
36 | /* | 34 | /* |
37 | * Given a kernel address, find the home node of the underlying memory. | 35 | * Given a kernel address, find the home node of the underlying memory. |
38 | */ | 36 | */ |
diff --git a/include/asm-arm/arch-omap/aic23.h b/include/asm-arm/arch-omap/aic23.h index 590bac25b7c4..6513065941d0 100644 --- a/include/asm-arm/arch-omap/aic23.h +++ b/include/asm-arm/arch-omap/aic23.h | |||
@@ -57,6 +57,7 @@ | |||
57 | #define LHV_MIN 0x0000 | 57 | #define LHV_MIN 0x0000 |
58 | 58 | ||
59 | // Analog audio path control register | 59 | // Analog audio path control register |
60 | #define STA_REG(x) ((x)<<6) | ||
60 | #define STE_ENABLED 0x0020 | 61 | #define STE_ENABLED 0x0020 |
61 | #define DAC_SELECTED 0x0010 | 62 | #define DAC_SELECTED 0x0010 |
62 | #define BYPASS_ON 0x0008 | 63 | #define BYPASS_ON 0x0008 |
@@ -109,4 +110,7 @@ | |||
109 | #define TLV320AIC23ID1 (0x1a) // cs low | 110 | #define TLV320AIC23ID1 (0x1a) // cs low |
110 | #define TLV320AIC23ID2 (0x1b) // cs high | 111 | #define TLV320AIC23ID2 (0x1b) // cs high |
111 | 112 | ||
113 | void tlv320aic23_power_up(void); | ||
114 | void tlv320aic23_power_down(void); | ||
115 | |||
112 | #endif /* __ASM_ARCH_AIC23_H */ | 116 | #endif /* __ASM_ARCH_AIC23_H */ |
diff --git a/include/asm-arm/arch-omap/board-ams-delta.h b/include/asm-arm/arch-omap/board-ams-delta.h new file mode 100644 index 000000000000..0070f6d3b75c --- /dev/null +++ b/include/asm-arm/arch-omap/board-ams-delta.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/board-ams-delta.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
12 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
13 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
14 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
15 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
16 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
17 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
18 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
19 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
20 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License along | ||
23 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
24 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | */ | ||
26 | #ifndef __ASM_ARCH_OMAP_AMS_DELTA_H | ||
27 | #define __ASM_ARCH_OMAP_AMS_DELTA_H | ||
28 | |||
29 | #if defined (CONFIG_MACH_AMS_DELTA) | ||
30 | |||
31 | #define AMS_DELTA_LATCH1_PHYS 0x01000000 | ||
32 | #define AMS_DELTA_LATCH1_VIRT 0xEA000000 | ||
33 | #define AMS_DELTA_MODEM_PHYS 0x04000000 | ||
34 | #define AMS_DELTA_MODEM_VIRT 0xEB000000 | ||
35 | #define AMS_DELTA_LATCH2_PHYS 0x08000000 | ||
36 | #define AMS_DELTA_LATCH2_VIRT 0xEC000000 | ||
37 | |||
38 | #define AMS_DELTA_LATCH1_LED_CAMERA 0x01 | ||
39 | #define AMS_DELTA_LATCH1_LED_ADVERT 0x02 | ||
40 | #define AMS_DELTA_LATCH1_LED_EMAIL 0x04 | ||
41 | #define AMS_DELTA_LATCH1_LED_HANDSFREE 0x08 | ||
42 | #define AMS_DELTA_LATCH1_LED_VOICEMAIL 0x10 | ||
43 | #define AMS_DELTA_LATCH1_LED_VOICE 0x20 | ||
44 | |||
45 | #define AMS_DELTA_LATCH2_LCD_VBLEN 0x0001 | ||
46 | #define AMS_DELTA_LATCH2_LCD_NDISP 0x0002 | ||
47 | #define AMS_DELTA_LATCH2_NAND_NCE 0x0004 | ||
48 | #define AMS_DELTA_LATCH2_NAND_NRE 0x0008 | ||
49 | #define AMS_DELTA_LATCH2_NAND_NWP 0x0010 | ||
50 | #define AMS_DELTA_LATCH2_NAND_NWE 0x0020 | ||
51 | #define AMS_DELTA_LATCH2_NAND_ALE 0x0040 | ||
52 | #define AMS_DELTA_LATCH2_NAND_CLE 0x0080 | ||
53 | #define AMS_DELTA_LATCH2_MODEM_NRESET 0x1000 | ||
54 | #define AMS_DELTA_LATCH2_MODEM_CODEC 0x2000 | ||
55 | |||
56 | #define AMS_DELTA_GPIO_PIN_NAND_RB 12 | ||
57 | |||
58 | #ifndef __ASSEMBLY__ | ||
59 | void ams_delta_latch1_write(u8 mask, u8 value); | ||
60 | void ams_delta_latch2_write(u16 mask, u16 value); | ||
61 | #endif | ||
62 | |||
63 | #endif /* CONFIG_MACH_AMS_DELTA */ | ||
64 | |||
65 | #endif /* __ASM_ARCH_OMAP_AMS_DELTA_H */ | ||
diff --git a/include/asm-arm/arch-omap/board-apollon.h b/include/asm-arm/arch-omap/board-apollon.h new file mode 100644 index 000000000000..de0c5b792c58 --- /dev/null +++ b/include/asm-arm/arch-omap/board-apollon.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/board-apollon.h | ||
3 | * | ||
4 | * Hardware definitions for Samsung OMAP24XX Apollon board. | ||
5 | * | ||
6 | * Initial creation by Kyungmin Park <kyungmin.park@samsung.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
16 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
17 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
18 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
19 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License along | ||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
26 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
27 | */ | ||
28 | |||
29 | #ifndef __ASM_ARCH_OMAP_APOLLON_H | ||
30 | #define __ASM_ARCH_OMAP_APOLLON_H | ||
31 | |||
32 | /* Placeholder for APOLLON specific defines */ | ||
33 | /* GPMC CS0 */ | ||
34 | #define APOLLON_CS0_BASE 0x00000000 | ||
35 | /* GPMC CS1 */ | ||
36 | #define APOLLON_CS1_BASE 0x08000000 | ||
37 | #define APOLLON_ETHR_START (APOLLON_CS1_BASE + 0x300) | ||
38 | #define APOLLON_ETHR_GPIO_IRQ 74 | ||
39 | /* GPMC CS2 - reserved for OneNAND */ | ||
40 | #define APOLLON_CS2_BASE 0x10000000 | ||
41 | /* GPMC CS3 - reserved for NOR or NAND */ | ||
42 | #define APOLLON_CS3_BASE 0x18000000 | ||
43 | |||
44 | #endif /* __ASM_ARCH_OMAP_APOLLON_H */ | ||
45 | |||
diff --git a/include/asm-arm/arch-omap/board-h2.h b/include/asm-arm/arch-omap/board-h2.h index 39ca5a31aeea..b2888ef9e9b4 100644 --- a/include/asm-arm/arch-omap/board-h2.h +++ b/include/asm-arm/arch-omap/board-h2.h | |||
@@ -34,9 +34,5 @@ | |||
34 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ | 34 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ |
35 | #define OMAP1610_ETHR_START 0x04000300 | 35 | #define OMAP1610_ETHR_START 0x04000300 |
36 | 36 | ||
37 | /* Samsung NAND flash at CS2B or CS3(NAND Boot) */ | ||
38 | #define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ | ||
39 | #define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ | ||
40 | |||
41 | #endif /* __ASM_ARCH_OMAP_H2_H */ | 37 | #endif /* __ASM_ARCH_OMAP_H2_H */ |
42 | 38 | ||
diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h index 1b12c1dcc2fa..761ea0a17897 100644 --- a/include/asm-arm/arch-omap/board-h3.h +++ b/include/asm-arm/arch-omap/board-h3.h | |||
@@ -30,10 +30,6 @@ | |||
30 | /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ | 30 | /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ |
31 | #define OMAP1710_ETHR_START 0x04000300 | 31 | #define OMAP1710_ETHR_START 0x04000300 |
32 | 32 | ||
33 | /* Samsung NAND flash at CS2B or CS3(NAND Boot) */ | ||
34 | #define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ | ||
35 | #define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ | ||
36 | |||
37 | #define MAXIRQNUM (IH_BOARD_BASE) | 33 | #define MAXIRQNUM (IH_BOARD_BASE) |
38 | #define MAXFIQNUM MAXIRQNUM | 34 | #define MAXFIQNUM MAXIRQNUM |
39 | #define MAXSWINUM MAXIRQNUM | 35 | #define MAXSWINUM MAXIRQNUM |
diff --git a/include/asm-arm/arch-omap/board-h4.h b/include/asm-arm/arch-omap/board-h4.h index 33ea29a41654..7ef664bc9e33 100644 --- a/include/asm-arm/arch-omap/board-h4.h +++ b/include/asm-arm/arch-omap/board-h4.h | |||
@@ -33,12 +33,6 @@ | |||
33 | /* GPMC CS1 */ | 33 | /* GPMC CS1 */ |
34 | #define OMAP24XX_ETHR_START 0x08000300 | 34 | #define OMAP24XX_ETHR_START 0x08000300 |
35 | #define OMAP24XX_ETHR_GPIO_IRQ 92 | 35 | #define OMAP24XX_ETHR_GPIO_IRQ 92 |
36 | 36 | #define H4_CS0_BASE 0x04000000 | |
37 | #define H4_CS0_BASE 0x04000000 | ||
38 | |||
39 | #define H4_CS0_BASE 0x04000000 | ||
40 | |||
41 | #define H4_CS0_BASE 0x04000000 | ||
42 | |||
43 | #endif /* __ASM_ARCH_OMAP_H4_H */ | 37 | #endif /* __ASM_ARCH_OMAP_H4_H */ |
44 | 38 | ||
diff --git a/include/asm-arm/arch-omap/board-netstar.h b/include/asm-arm/arch-omap/board-netstar.h deleted file mode 100644 index 77cc0fb54d54..000000000000 --- a/include/asm-arm/arch-omap/board-netstar.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004 2N Telekomunikace, Ladislav Michl <michl@2n.cz> | ||
3 | * | ||
4 | * Hardware definitions for OMAP5910 based NetStar board. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_NETSTAR_H | ||
12 | #define __ASM_ARCH_NETSTAR_H | ||
13 | |||
14 | #include <asm/arch/tc.h> | ||
15 | |||
16 | #define OMAP_NAND_FLASH_START1 OMAP_CS1_PHYS + (1 << 23) | ||
17 | #define OMAP_NAND_FLASH_START2 OMAP_CS1_PHYS + (2 << 23) | ||
18 | |||
19 | #endif /* __ASM_ARCH_NETSTAR_H */ | ||
diff --git a/include/asm-arm/arch-omap/board-nokia.h b/include/asm-arm/arch-omap/board-nokia.h new file mode 100644 index 000000000000..72deea203493 --- /dev/null +++ b/include/asm-arm/arch-omap/board-nokia.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/board-nokia.h | ||
3 | * | ||
4 | * Information structures for Nokia-specific board config data | ||
5 | * | ||
6 | * Copyright (C) 2005 Nokia Corporation | ||
7 | */ | ||
8 | |||
9 | #ifndef _OMAP_BOARD_NOKIA_H | ||
10 | #define _OMAP_BOARD_NOKIA_H | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | |||
14 | #define OMAP_TAG_NOKIA_BT 0x4e01 | ||
15 | #define OMAP_TAG_WLAN_CX3110X 0x4e02 | ||
16 | #define OMAP_TAG_CBUS 0x4e03 | ||
17 | #define OMAP_TAG_EM_ASIC_BB5 0x4e04 | ||
18 | |||
19 | |||
20 | #define BT_CHIP_CSR 1 | ||
21 | #define BT_CHIP_TI 2 | ||
22 | |||
23 | #define BT_SYSCLK_12 1 | ||
24 | #define BT_SYSCLK_38_4 2 | ||
25 | |||
26 | struct omap_bluetooth_config { | ||
27 | u8 chip_type; | ||
28 | u8 bt_wakeup_gpio; | ||
29 | u8 host_wakeup_gpio; | ||
30 | u8 reset_gpio; | ||
31 | u8 bt_uart; | ||
32 | u8 bd_addr[6]; | ||
33 | u8 bt_sysclk; | ||
34 | }; | ||
35 | |||
36 | struct omap_wlan_cx3110x_config { | ||
37 | u8 chip_type; | ||
38 | s16 power_gpio; | ||
39 | s16 irq_gpio; | ||
40 | s16 spi_cs_gpio; | ||
41 | }; | ||
42 | |||
43 | struct omap_cbus_config { | ||
44 | s16 clk_gpio; | ||
45 | s16 dat_gpio; | ||
46 | s16 sel_gpio; | ||
47 | }; | ||
48 | |||
49 | struct omap_em_asic_bb5_config { | ||
50 | s16 retu_irq_gpio; | ||
51 | s16 tahvo_irq_gpio; | ||
52 | }; | ||
53 | |||
54 | #endif | ||
diff --git a/include/asm-arm/arch-omap/board-perseus2.h b/include/asm-arm/arch-omap/board-perseus2.h index 691e52a52b43..eb74420cb439 100644 --- a/include/asm-arm/arch-omap/board-perseus2.h +++ b/include/asm-arm/arch-omap/board-perseus2.h | |||
@@ -42,8 +42,4 @@ | |||
42 | 42 | ||
43 | #define NR_IRQS (MAXIRQNUM + 1) | 43 | #define NR_IRQS (MAXIRQNUM + 1) |
44 | 44 | ||
45 | /* Samsung NAND flash at CS2B or CS3(NAND Boot) */ | ||
46 | #define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ | ||
47 | #define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ | ||
48 | |||
49 | #endif | 45 | #endif |
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index a0040cd86639..6d6240a4681c 100644 --- a/include/asm-arm/arch-omap/board.h +++ b/include/asm-arm/arch-omap/board.h | |||
@@ -21,9 +21,12 @@ | |||
21 | #define OMAP_TAG_LCD 0x4f05 | 21 | #define OMAP_TAG_LCD 0x4f05 |
22 | #define OMAP_TAG_GPIO_SWITCH 0x4f06 | 22 | #define OMAP_TAG_GPIO_SWITCH 0x4f06 |
23 | #define OMAP_TAG_UART 0x4f07 | 23 | #define OMAP_TAG_UART 0x4f07 |
24 | #define OMAP_TAG_FBMEM 0x4f08 | ||
25 | #define OMAP_TAG_STI_CONSOLE 0x4f09 | ||
24 | 26 | ||
25 | #define OMAP_TAG_BOOT_REASON 0x4f80 | 27 | #define OMAP_TAG_BOOT_REASON 0x4f80 |
26 | #define OMAP_TAG_FLASH_PART 0x4f81 | 28 | #define OMAP_TAG_FLASH_PART 0x4f81 |
29 | #define OMAP_TAG_VERSION_STR 0x4f82 | ||
27 | 30 | ||
28 | struct omap_clock_config { | 31 | struct omap_clock_config { |
29 | /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */ | 32 | /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */ |
@@ -54,6 +57,11 @@ struct omap_serial_console_config { | |||
54 | u32 console_speed; | 57 | u32 console_speed; |
55 | }; | 58 | }; |
56 | 59 | ||
60 | struct omap_sti_console_config { | ||
61 | unsigned enable:1; | ||
62 | u8 channel; | ||
63 | }; | ||
64 | |||
57 | struct omap_usb_config { | 65 | struct omap_usb_config { |
58 | /* Configure drivers according to the connectors on your board: | 66 | /* Configure drivers according to the connectors on your board: |
59 | * - "A" connector (rectagular) | 67 | * - "A" connector (rectagular) |
@@ -87,6 +95,13 @@ struct omap_lcd_config { | |||
87 | char ctrl_name[16]; | 95 | char ctrl_name[16]; |
88 | }; | 96 | }; |
89 | 97 | ||
98 | struct omap_fbmem_config { | ||
99 | u32 fb_sram_start; | ||
100 | u32 fb_sram_size; | ||
101 | u32 fb_sdram_start; | ||
102 | u32 fb_sdram_size; | ||
103 | }; | ||
104 | |||
90 | /* Cover: | 105 | /* Cover: |
91 | * high -> closed | 106 | * high -> closed |
92 | * low -> open | 107 | * low -> open |
@@ -106,6 +121,12 @@ struct omap_gpio_switch_config { | |||
106 | int key_code:24; /* Linux key code */ | 121 | int key_code:24; /* Linux key code */ |
107 | }; | 122 | }; |
108 | 123 | ||
124 | struct omap_uart_config { | ||
125 | /* Bit field of UARTs present; bit 0 --> UART1 */ | ||
126 | unsigned int enabled_uarts; | ||
127 | }; | ||
128 | |||
129 | |||
109 | struct omap_flash_part_config { | 130 | struct omap_flash_part_config { |
110 | char part_table[0]; | 131 | char part_table[0]; |
111 | }; | 132 | }; |
@@ -114,11 +135,14 @@ struct omap_boot_reason_config { | |||
114 | char reason_str[12]; | 135 | char reason_str[12]; |
115 | }; | 136 | }; |
116 | 137 | ||
117 | struct omap_uart_config { | 138 | struct omap_version_config { |
118 | /* Bit field of UARTs present; bit 0 --> UART1 */ | 139 | char component[12]; |
119 | unsigned int enabled_uarts; | 140 | char version[12]; |
120 | }; | 141 | }; |
121 | 142 | ||
143 | |||
144 | #include <asm-arm/arch-omap/board-nokia.h> | ||
145 | |||
122 | struct omap_board_config_entry { | 146 | struct omap_board_config_entry { |
123 | u16 tag; | 147 | u16 tag; |
124 | u16 len; | 148 | u16 len; |
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h index 46a0402696de..3c4eb9fbe48a 100644 --- a/include/asm-arm/arch-omap/clock.h +++ b/include/asm-arm/arch-omap/clock.h | |||
@@ -19,6 +19,7 @@ struct clk { | |||
19 | struct list_head node; | 19 | struct list_head node; |
20 | struct module *owner; | 20 | struct module *owner; |
21 | const char *name; | 21 | const char *name; |
22 | int id; | ||
22 | struct clk *parent; | 23 | struct clk *parent; |
23 | unsigned long rate; | 24 | unsigned long rate; |
24 | __u32 flags; | 25 | __u32 flags; |
@@ -57,6 +58,7 @@ extern void propagate_rate(struct clk *clk); | |||
57 | extern void followparent_recalc(struct clk * clk); | 58 | extern void followparent_recalc(struct clk * clk); |
58 | extern void clk_allow_idle(struct clk *clk); | 59 | extern void clk_allow_idle(struct clk *clk); |
59 | extern void clk_deny_idle(struct clk *clk); | 60 | extern void clk_deny_idle(struct clk *clk); |
61 | extern int clk_get_usecount(struct clk *clk); | ||
60 | 62 | ||
61 | /* Clock flags */ | 63 | /* Clock flags */ |
62 | #define RATE_CKCTL (1 << 0) /* Main fixed ratio clocks */ | 64 | #define RATE_CKCTL (1 << 0) /* Main fixed ratio clocks */ |
@@ -80,10 +82,11 @@ extern void clk_deny_idle(struct clk *clk); | |||
80 | #define CM_PLL_SEL1 (1 << 18) | 82 | #define CM_PLL_SEL1 (1 << 18) |
81 | #define CM_PLL_SEL2 (1 << 19) | 83 | #define CM_PLL_SEL2 (1 << 19) |
82 | #define CM_SYSCLKOUT_SEL1 (1 << 20) | 84 | #define CM_SYSCLKOUT_SEL1 (1 << 20) |
83 | #define CLOCK_IN_OMAP730 (1 << 21) | 85 | #define CLOCK_IN_OMAP310 (1 << 21) |
84 | #define CLOCK_IN_OMAP1510 (1 << 22) | 86 | #define CLOCK_IN_OMAP730 (1 << 22) |
85 | #define CLOCK_IN_OMAP16XX (1 << 23) | 87 | #define CLOCK_IN_OMAP1510 (1 << 23) |
86 | #define CLOCK_IN_OMAP242X (1 << 24) | 88 | #define CLOCK_IN_OMAP16XX (1 << 24) |
87 | #define CLOCK_IN_OMAP243X (1 << 25) | 89 | #define CLOCK_IN_OMAP242X (1 << 25) |
90 | #define CLOCK_IN_OMAP243X (1 << 26) | ||
88 | 91 | ||
89 | #endif | 92 | #endif |
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h index d4e73efcb816..ca1202312a45 100644 --- a/include/asm-arm/arch-omap/dma.h +++ b/include/asm-arm/arch-omap/dma.h | |||
@@ -404,6 +404,7 @@ extern void omap_free_lcd_dma(void); | |||
404 | extern void omap_setup_lcd_dma(void); | 404 | extern void omap_setup_lcd_dma(void); |
405 | extern void omap_enable_lcd_dma(void); | 405 | extern void omap_enable_lcd_dma(void); |
406 | extern void omap_stop_lcd_dma(void); | 406 | extern void omap_stop_lcd_dma(void); |
407 | extern int omap_lcd_dma_ext_running(void); | ||
407 | extern void omap_set_lcd_dma_ext_controller(int external); | 408 | extern void omap_set_lcd_dma_ext_controller(int external); |
408 | extern void omap_set_lcd_dma_single_transfer(int single); | 409 | extern void omap_set_lcd_dma_single_transfer(int single); |
409 | extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, | 410 | extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, |
diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h index 11772c792f3e..e6522e6a3834 100644 --- a/include/asm-arm/arch-omap/dmtimer.h +++ b/include/asm-arm/arch-omap/dmtimer.h | |||
@@ -88,5 +88,6 @@ unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); | |||
88 | void omap_dm_timer_reset_counter(struct omap_dm_timer *timer); | 88 | void omap_dm_timer_reset_counter(struct omap_dm_timer *timer); |
89 | 89 | ||
90 | int omap_dm_timers_active(void); | 90 | int omap_dm_timers_active(void); |
91 | u32 omap_dm_timer_modify_idlect_mask(u32 inputmask); | ||
91 | 92 | ||
92 | #endif /* __ASM_ARCH_TIMER_H */ | 93 | #endif /* __ASM_ARCH_TIMER_H */ |
diff --git a/include/asm-arm/arch-omap/dsp.h b/include/asm-arm/arch-omap/dsp.h index 57bf4f39ca58..06dad83dd41f 100644 --- a/include/asm-arm/arch-omap/dsp.h +++ b/include/asm-arm/arch-omap/dsp.h | |||
@@ -181,10 +181,16 @@ struct omap_dsp_varinfo { | |||
181 | #define OMAP_DSP_MBCMD_PM_ENABLE 0x01 | 181 | #define OMAP_DSP_MBCMD_PM_ENABLE 0x01 |
182 | 182 | ||
183 | #define OMAP_DSP_MBCMD_KFUNC_FBCTL 0x00 | 183 | #define OMAP_DSP_MBCMD_KFUNC_FBCTL 0x00 |
184 | #define OMAP_DSP_MBCMD_KFUNC_AUDIO_PWR 0x01 | ||
184 | 185 | ||
186 | #define OMAP_DSP_MBCMD_FBCTL_UPD 0x0000 | ||
185 | #define OMAP_DSP_MBCMD_FBCTL_ENABLE 0x0002 | 187 | #define OMAP_DSP_MBCMD_FBCTL_ENABLE 0x0002 |
186 | #define OMAP_DSP_MBCMD_FBCTL_DISABLE 0x0003 | 188 | #define OMAP_DSP_MBCMD_FBCTL_DISABLE 0x0003 |
187 | 189 | ||
190 | #define OMAP_DSP_MBCMD_AUDIO_PWR_UP 0x0000 | ||
191 | #define OMAP_DSP_MBCMD_AUDIO_PWR_DOWN1 0x0001 | ||
192 | #define OMAP_DSP_MBCMD_AUDIO_PWR_DOWN2 0x0002 | ||
193 | |||
188 | #define OMAP_DSP_MBCMD_TDEL_SAFE 0x0000 | 194 | #define OMAP_DSP_MBCMD_TDEL_SAFE 0x0000 |
189 | #define OMAP_DSP_MBCMD_TDEL_KILL 0x0001 | 195 | #define OMAP_DSP_MBCMD_TDEL_KILL 0x0001 |
190 | 196 | ||
diff --git a/include/asm-arm/arch-omap/dsp_common.h b/include/asm-arm/arch-omap/dsp_common.h index 4fcce6944056..16a459dfa714 100644 --- a/include/asm-arm/arch-omap/dsp_common.h +++ b/include/asm-arm/arch-omap/dsp_common.h | |||
@@ -27,11 +27,12 @@ | |||
27 | #ifndef ASM_ARCH_DSP_COMMON_H | 27 | #ifndef ASM_ARCH_DSP_COMMON_H |
28 | #define ASM_ARCH_DSP_COMMON_H | 28 | #define ASM_ARCH_DSP_COMMON_H |
29 | 29 | ||
30 | void omap_dsp_pm_suspend(void); | 30 | extern void omap_dsp_request_mpui(void); |
31 | void omap_dsp_pm_resume(void); | 31 | extern void omap_dsp_release_mpui(void); |
32 | void omap_dsp_request_mpui(void); | 32 | extern int omap_dsp_request_mem(void); |
33 | void omap_dsp_release_mpui(void); | 33 | extern int omap_dsp_release_mem(void); |
34 | int omap_dsp_request_mem(void); | 34 | |
35 | int omap_dsp_release_mem(void); | 35 | extern void (*omap_dsp_audio_pwr_up_request)(int stage); |
36 | extern void (*omap_dsp_audio_pwr_down_request)(int stage); | ||
36 | 37 | ||
37 | #endif /* ASM_ARCH_DSP_COMMON_H */ | 38 | #endif /* ASM_ARCH_DSP_COMMON_H */ |
diff --git a/include/asm-arm/arch-omap/gpioexpander.h b/include/asm-arm/arch-omap/gpioexpander.h new file mode 100644 index 000000000000..7a43b0a912e4 --- /dev/null +++ b/include/asm-arm/arch-omap/gpioexpander.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/gpioexpander.h | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2004 Texas Instruments, Inc. | ||
6 | * | ||
7 | * This package is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | ||
12 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | ||
13 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_OMAP_GPIOEXPANDER_H | ||
17 | #define __ASM_ARCH_OMAP_GPIOEXPANDER_H | ||
18 | |||
19 | /* Function Prototypes for GPIO Expander functions */ | ||
20 | |||
21 | int read_gpio_expa(u8 *, int); | ||
22 | int write_gpio_expa(u8 , int); | ||
23 | |||
24 | #endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */ | ||
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index 5406b875c422..7909b729826c 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h | |||
@@ -306,6 +306,10 @@ | |||
306 | #include "board-h4.h" | 306 | #include "board-h4.h" |
307 | #endif | 307 | #endif |
308 | 308 | ||
309 | #ifdef CONFIG_MACH_OMAP_APOLLON | ||
310 | #include "board-apollon.h" | ||
311 | #endif | ||
312 | |||
309 | #ifdef CONFIG_MACH_OMAP_OSK | 313 | #ifdef CONFIG_MACH_OMAP_OSK |
310 | #include "board-osk.h" | 314 | #include "board-osk.h" |
311 | #endif | 315 | #endif |
@@ -314,10 +318,6 @@ | |||
314 | #include "board-voiceblue.h" | 318 | #include "board-voiceblue.h" |
315 | #endif | 319 | #endif |
316 | 320 | ||
317 | #ifdef CONFIG_MACH_NETSTAR | ||
318 | #include "board-netstar.h" | ||
319 | #endif | ||
320 | |||
321 | #endif /* !__ASSEMBLER__ */ | 321 | #endif /* !__ASSEMBLER__ */ |
322 | 322 | ||
323 | #endif /* __ASM_ARCH_OMAP_HARDWARE_H */ | 323 | #endif /* __ASM_ARCH_OMAP_HARDWARE_H */ |
diff --git a/include/asm-arm/arch-omap/irda.h b/include/asm-arm/arch-omap/irda.h new file mode 100644 index 000000000000..805ae3575e44 --- /dev/null +++ b/include/asm-arm/arch-omap/irda.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/irda.h | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 Komal Shah <komal_shah802003@yahoo.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef ASMARM_ARCH_IRDA_H | ||
11 | #define ASMARM_ARCH_IRDA_H | ||
12 | |||
13 | /* board specific transceiver capabilities */ | ||
14 | |||
15 | #define IR_SEL 1 /* Selects IrDA */ | ||
16 | #define IR_SIRMODE 2 | ||
17 | #define IR_FIRMODE 4 | ||
18 | #define IR_MIRMODE 8 | ||
19 | |||
20 | struct omap_irda_config { | ||
21 | int transceiver_cap; | ||
22 | int (*transceiver_mode)(struct device *dev, int mode); | ||
23 | int (*select_irda)(struct device *dev, int state); | ||
24 | /* Very specific to the needs of some platforms (h3,h4) | ||
25 | * having calls which can sleep in irda_set_speed. | ||
26 | */ | ||
27 | struct work_struct gpio_expa; | ||
28 | int rx_channel; | ||
29 | int tx_channel; | ||
30 | unsigned long dest_start; | ||
31 | unsigned long src_start; | ||
32 | int tx_trigger; | ||
33 | int rx_trigger; | ||
34 | }; | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h index 4ffce1d77759..42098d99f302 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h | |||
@@ -242,6 +242,11 @@ | |||
242 | #define INT_24XX_GPIO_BANK2 30 | 242 | #define INT_24XX_GPIO_BANK2 30 |
243 | #define INT_24XX_GPIO_BANK3 31 | 243 | #define INT_24XX_GPIO_BANK3 31 |
244 | #define INT_24XX_GPIO_BANK4 32 | 244 | #define INT_24XX_GPIO_BANK4 32 |
245 | #define INT_24XX_MCBSP1_IRQ_TX 59 | ||
246 | #define INT_24XX_MCBSP1_IRQ_RX 60 | ||
247 | #define INT_24XX_MCBSP2_IRQ_TX 62 | ||
248 | #define INT_24XX_MCBSP2_IRQ_RX 63 | ||
249 | #define INT_24XX_UART3_IRQ 74 | ||
245 | 250 | ||
246 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and | 251 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and |
247 | * 16 MPUIO lines */ | 252 | * 16 MPUIO lines */ |
diff --git a/include/asm-arm/arch-omap/keypad.h b/include/asm-arm/arch-omap/keypad.h new file mode 100644 index 000000000000..8a023a984acb --- /dev/null +++ b/include/asm-arm/arch-omap/keypad.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/keypad.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Komal Shah <komal_shah802003@yahoo.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef ASMARM_ARCH_KEYPAD_H | ||
11 | #define ASMARM_ARCH_KEYPAD_H | ||
12 | |||
13 | struct omap_kp_platform_data { | ||
14 | int rows; | ||
15 | int cols; | ||
16 | int *keymap; | ||
17 | unsigned int rep:1; | ||
18 | /* specific to OMAP242x*/ | ||
19 | unsigned int *row_gpios; | ||
20 | unsigned int *col_gpios; | ||
21 | }; | ||
22 | |||
23 | /* Group (0..3) -- when multiple keys are pressed, only the | ||
24 | * keys pressed in the same group are considered as pressed. This is | ||
25 | * in order to workaround certain crappy HW designs that produce ghost | ||
26 | * keypresses. */ | ||
27 | #define GROUP_0 (0 << 16) | ||
28 | #define GROUP_1 (1 << 16) | ||
29 | #define GROUP_2 (2 << 16) | ||
30 | #define GROUP_3 (3 << 16) | ||
31 | #define GROUP_MASK GROUP_3 | ||
32 | |||
33 | #define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val)) | ||
34 | |||
35 | #endif | ||
36 | |||
diff --git a/include/asm-arm/arch-omap/lcd_lph8923.h b/include/asm-arm/arch-omap/lcd_lph8923.h new file mode 100644 index 000000000000..004e67e22ca7 --- /dev/null +++ b/include/asm-arm/arch-omap/lcd_lph8923.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef __LCD_LPH8923_H | ||
2 | #define __LCD_LPH8923_H | ||
3 | |||
4 | enum lcd_lph8923_test_num { | ||
5 | LCD_LPH8923_TEST_RGB_LINES, | ||
6 | }; | ||
7 | |||
8 | enum lcd_lph8923_test_result { | ||
9 | LCD_LPH8923_TEST_SUCCESS, | ||
10 | LCD_LPH8923_TEST_INVALID, | ||
11 | LCD_LPH8923_TEST_FAILED, | ||
12 | }; | ||
13 | |||
14 | #endif | ||
diff --git a/include/asm-arm/arch-omap/mcbsp.h b/include/asm-arm/arch-omap/mcbsp.h index e79d98ab2ab6..ed0dde4f7219 100644 --- a/include/asm-arm/arch-omap/mcbsp.h +++ b/include/asm-arm/arch-omap/mcbsp.h | |||
@@ -37,6 +37,11 @@ | |||
37 | #define OMAP1610_MCBSP2_BASE 0xfffb1000 | 37 | #define OMAP1610_MCBSP2_BASE 0xfffb1000 |
38 | #define OMAP1610_MCBSP3_BASE 0xe1017000 | 38 | #define OMAP1610_MCBSP3_BASE 0xe1017000 |
39 | 39 | ||
40 | #define OMAP24XX_MCBSP1_BASE 0x48074000 | ||
41 | #define OMAP24XX_MCBSP2_BASE 0x48076000 | ||
42 | |||
43 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) | ||
44 | |||
40 | #define OMAP_MCBSP_REG_DRR2 0x00 | 45 | #define OMAP_MCBSP_REG_DRR2 0x00 |
41 | #define OMAP_MCBSP_REG_DRR1 0x02 | 46 | #define OMAP_MCBSP_REG_DRR1 0x02 |
42 | #define OMAP_MCBSP_REG_DXR2 0x04 | 47 | #define OMAP_MCBSP_REG_DXR2 0x04 |
@@ -71,9 +76,62 @@ | |||
71 | 76 | ||
72 | #define OMAP_MAX_MCBSP_COUNT 3 | 77 | #define OMAP_MAX_MCBSP_COUNT 3 |
73 | 78 | ||
79 | #define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1) | ||
80 | #define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1) | ||
81 | |||
82 | #define AUDIO_MCBSP OMAP_MCBSP1 | ||
83 | #define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX | ||
84 | #define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX | ||
85 | |||
86 | #elif defined(CONFIG_ARCH_OMAP24XX) | ||
87 | |||
88 | #define OMAP_MCBSP_REG_DRR2 0x00 | ||
89 | #define OMAP_MCBSP_REG_DRR1 0x04 | ||
90 | #define OMAP_MCBSP_REG_DXR2 0x08 | ||
91 | #define OMAP_MCBSP_REG_DXR1 0x0C | ||
92 | #define OMAP_MCBSP_REG_SPCR2 0x10 | ||
93 | #define OMAP_MCBSP_REG_SPCR1 0x14 | ||
94 | #define OMAP_MCBSP_REG_RCR2 0x18 | ||
95 | #define OMAP_MCBSP_REG_RCR1 0x1C | ||
96 | #define OMAP_MCBSP_REG_XCR2 0x20 | ||
97 | #define OMAP_MCBSP_REG_XCR1 0x24 | ||
98 | #define OMAP_MCBSP_REG_SRGR2 0x28 | ||
99 | #define OMAP_MCBSP_REG_SRGR1 0x2C | ||
100 | #define OMAP_MCBSP_REG_MCR2 0x30 | ||
101 | #define OMAP_MCBSP_REG_MCR1 0x34 | ||
102 | #define OMAP_MCBSP_REG_RCERA 0x38 | ||
103 | #define OMAP_MCBSP_REG_RCERB 0x3C | ||
104 | #define OMAP_MCBSP_REG_XCERA 0x40 | ||
105 | #define OMAP_MCBSP_REG_XCERB 0x44 | ||
106 | #define OMAP_MCBSP_REG_PCR0 0x48 | ||
107 | #define OMAP_MCBSP_REG_RCERC 0x4C | ||
108 | #define OMAP_MCBSP_REG_RCERD 0x50 | ||
109 | #define OMAP_MCBSP_REG_XCERC 0x54 | ||
110 | #define OMAP_MCBSP_REG_XCERD 0x58 | ||
111 | #define OMAP_MCBSP_REG_RCERE 0x5C | ||
112 | #define OMAP_MCBSP_REG_RCERF 0x60 | ||
113 | #define OMAP_MCBSP_REG_XCERE 0x64 | ||
114 | #define OMAP_MCBSP_REG_XCERF 0x68 | ||
115 | #define OMAP_MCBSP_REG_RCERG 0x6C | ||
116 | #define OMAP_MCBSP_REG_RCERH 0x70 | ||
117 | #define OMAP_MCBSP_REG_XCERG 0x74 | ||
118 | #define OMAP_MCBSP_REG_XCERH 0x78 | ||
119 | |||
120 | #define OMAP_MAX_MCBSP_COUNT 2 | ||
121 | |||
122 | #define AUDIO_MCBSP_DATAWRITE (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1) | ||
123 | #define AUDIO_MCBSP_DATAREAD (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1) | ||
124 | |||
125 | #define AUDIO_MCBSP OMAP_MCBSP2 | ||
126 | #define AUDIO_DMA_TX OMAP24XX_DMA_MCBSP2_TX | ||
127 | #define AUDIO_DMA_RX OMAP24XX_DMA_MCBSP2_RX | ||
128 | |||
129 | #endif | ||
130 | |||
74 | #define OMAP_MCBSP_READ(base, reg) __raw_readw((base) + OMAP_MCBSP_REG_##reg) | 131 | #define OMAP_MCBSP_READ(base, reg) __raw_readw((base) + OMAP_MCBSP_REG_##reg) |
75 | #define OMAP_MCBSP_WRITE(base, reg, val) __raw_writew((val), (base) + OMAP_MCBSP_REG_##reg) | 132 | #define OMAP_MCBSP_WRITE(base, reg, val) __raw_writew((val), (base) + OMAP_MCBSP_REG_##reg) |
76 | 133 | ||
134 | |||
77 | /************************** McBSP SPCR1 bit definitions ***********************/ | 135 | /************************** McBSP SPCR1 bit definitions ***********************/ |
78 | #define RRST 0x0001 | 136 | #define RRST 0x0001 |
79 | #define RRDY 0x0002 | 137 | #define RRDY 0x0002 |
@@ -195,6 +253,10 @@ typedef enum { | |||
195 | OMAP_MCBSP3, | 253 | OMAP_MCBSP3, |
196 | } omap_mcbsp_id; | 254 | } omap_mcbsp_id; |
197 | 255 | ||
256 | typedef int __bitwise omap_mcbsp_io_type_t; | ||
257 | #define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1) | ||
258 | #define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2) | ||
259 | |||
198 | typedef enum { | 260 | typedef enum { |
199 | OMAP_MCBSP_WORD_8 = 0, | 261 | OMAP_MCBSP_WORD_8 = 0, |
200 | OMAP_MCBSP_WORD_12, | 262 | OMAP_MCBSP_WORD_12, |
@@ -246,6 +308,9 @@ u32 omap_mcbsp_recv_word(unsigned int id); | |||
246 | 308 | ||
247 | int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length); | 309 | int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length); |
248 | int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length); | 310 | int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length); |
311 | int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word); | ||
312 | int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word); | ||
313 | |||
249 | 314 | ||
250 | /* SPI specific API */ | 315 | /* SPI specific API */ |
251 | void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg); | 316 | void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg); |
diff --git a/include/asm-arm/arch-omap/mcspi.h b/include/asm-arm/arch-omap/mcspi.h new file mode 100644 index 000000000000..9e7f40a88e1b --- /dev/null +++ b/include/asm-arm/arch-omap/mcspi.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef _OMAP2_MCSPI_H | ||
2 | #define _OMAP2_MCSPI_H | ||
3 | |||
4 | struct omap2_mcspi_platform_config { | ||
5 | unsigned long base; | ||
6 | unsigned short num_cs; | ||
7 | }; | ||
8 | |||
9 | struct omap2_mcspi_device_config { | ||
10 | unsigned turbo_mode:1; | ||
11 | |||
12 | /* Do we want one channel enabled at the same time? */ | ||
13 | unsigned single_channel:1; | ||
14 | }; | ||
15 | |||
16 | #endif | ||
diff --git a/include/asm-arm/arch-omap/menelaus.h b/include/asm-arm/arch-omap/menelaus.h index 46be8b8d6346..88cd4c87f0de 100644 --- a/include/asm-arm/arch-omap/menelaus.h +++ b/include/asm-arm/arch-omap/menelaus.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #ifndef __ASM_ARCH_MENELAUS_H | 7 | #ifndef __ASM_ARCH_MENELAUS_H |
8 | #define __ASM_ARCH_MENELAUS_H | 8 | #define __ASM_ARCH_MENELAUS_H |
9 | 9 | ||
10 | extern void menelaus_mmc_register(void (*callback)(u8 card_mask), | 10 | extern void menelaus_mmc_register(void (*callback)(unsigned long data, u8 card_mask), |
11 | unsigned long data); | 11 | unsigned long data); |
12 | extern void menelaus_mmc_remove(void); | 12 | extern void menelaus_mmc_remove(void); |
13 | extern void menelaus_mmc_opendrain(int enable); | 13 | extern void menelaus_mmc_opendrain(int enable); |
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h index 13415a9aab06..0dc24d4ba59c 100644 --- a/include/asm-arm/arch-omap/mux.h +++ b/include/asm-arm/arch-omap/mux.h | |||
@@ -112,14 +112,13 @@ | |||
112 | * as mux config | 112 | * as mux config |
113 | */ | 113 | */ |
114 | #define MUX_CFG_730(desc, mux_reg, mode_offset, mode, \ | 114 | #define MUX_CFG_730(desc, mux_reg, mode_offset, mode, \ |
115 | pull_reg, pull_bit, pull_status, \ | 115 | pull_bit, pull_status, debug_status)\ |
116 | pu_pd_reg, pu_pd_status, debug_status)\ | ||
117 | { \ | 116 | { \ |
118 | .name = desc, \ | 117 | .name = desc, \ |
119 | .debug = debug_status, \ | 118 | .debug = debug_status, \ |
120 | MUX_REG_730(mux_reg, mode_offset, mode) \ | 119 | MUX_REG_730(mux_reg, mode_offset, mode) \ |
121 | PULL_REG_730(mux_reg, pull_bit, pull_status) \ | 120 | PULL_REG_730(mux_reg, pull_bit, pull_status) \ |
122 | PU_PD_REG(pu_pd_reg, pu_pd_status) \ | 121 | PU_PD_REG(NA, 0) \ |
123 | }, | 122 | }, |
124 | 123 | ||
125 | #define MUX_CFG_24XX(desc, reg_offset, mode, \ | 124 | #define MUX_CFG_24XX(desc, reg_offset, mode, \ |
@@ -172,6 +171,11 @@ enum omap730_index { | |||
172 | E4_730_KBC2, | 171 | E4_730_KBC2, |
173 | F4_730_KBC3, | 172 | F4_730_KBC3, |
174 | E3_730_KBC4, | 173 | E3_730_KBC4, |
174 | |||
175 | /* USB */ | ||
176 | AA17_730_USB_DM, | ||
177 | W16_730_USB_PU_EN, | ||
178 | W17_730_USB_VBUSI, | ||
175 | }; | 179 | }; |
176 | 180 | ||
177 | enum omap1xxx_index { | 181 | enum omap1xxx_index { |
@@ -403,9 +407,53 @@ enum omap24xx_index { | |||
403 | /* 24xx Menelaus interrupt */ | 407 | /* 24xx Menelaus interrupt */ |
404 | W19_24XX_SYS_NIRQ, | 408 | W19_24XX_SYS_NIRQ, |
405 | 409 | ||
410 | /* 24xx clock */ | ||
411 | W14_24XX_SYS_CLKOUT, | ||
412 | |||
413 | /* 242X McBSP */ | ||
414 | Y15_24XX_MCBSP2_CLKX, | ||
415 | R14_24XX_MCBSP2_FSX, | ||
416 | W15_24XX_MCBSP2_DR, | ||
417 | V15_24XX_MCBSP2_DX, | ||
418 | |||
406 | /* 24xx GPIO */ | 419 | /* 24xx GPIO */ |
420 | M21_242X_GPIO11, | ||
421 | AA10_242X_GPIO13, | ||
422 | AA6_242X_GPIO14, | ||
423 | AA4_242X_GPIO15, | ||
424 | Y11_242X_GPIO16, | ||
425 | AA12_242X_GPIO17, | ||
426 | AA8_242X_GPIO58, | ||
407 | Y20_24XX_GPIO60, | 427 | Y20_24XX_GPIO60, |
428 | W4__24XX_GPIO74, | ||
408 | M15_24XX_GPIO92, | 429 | M15_24XX_GPIO92, |
430 | V14_24XX_GPIO117, | ||
431 | |||
432 | P20_24XX_TSC_IRQ, | ||
433 | |||
434 | /* UART3 */ | ||
435 | K15_24XX_UART3_TX, | ||
436 | K14_24XX_UART3_RX, | ||
437 | |||
438 | /* Keypad GPIO*/ | ||
439 | T19_24XX_KBR0, | ||
440 | R19_24XX_KBR1, | ||
441 | V18_24XX_KBR2, | ||
442 | M21_24XX_KBR3, | ||
443 | E5__24XX_KBR4, | ||
444 | M18_24XX_KBR5, | ||
445 | R20_24XX_KBC0, | ||
446 | M14_24XX_KBC1, | ||
447 | H19_24XX_KBC2, | ||
448 | V17_24XX_KBC3, | ||
449 | P21_24XX_KBC4, | ||
450 | L14_24XX_KBC5, | ||
451 | N19_24XX_KBC6, | ||
452 | |||
453 | /* 24xx Menelaus Keypad GPIO */ | ||
454 | B3__24XX_KBR5, | ||
455 | AA4_24XX_KBC2, | ||
456 | B13_24XX_KBC6, | ||
409 | }; | 457 | }; |
410 | 458 | ||
411 | #ifdef CONFIG_OMAP_MUX | 459 | #ifdef CONFIG_OMAP_MUX |
diff --git a/include/asm-arm/arch-omap/omap-alsa.h b/include/asm-arm/arch-omap/omap-alsa.h new file mode 100644 index 000000000000..df4695474e3d --- /dev/null +++ b/include/asm-arm/arch-omap/omap-alsa.h | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/omap-alsa.h | ||
3 | * | ||
4 | * Alsa Driver for AIC23 and TSC2101 codecs on OMAP platform boards. | ||
5 | * | ||
6 | * Copyright (C) 2006 Mika Laitio <lamikr@cc.jyu.fi> | ||
7 | * | ||
8 | * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil | ||
9 | * Written by Daniel Petrini, David Cohen, Anderson Briglia | ||
10 | * {daniel.petrini, david.cohen, anderson.briglia}@indt.org.br | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | * | ||
17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
20 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
23 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
24 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
27 | * | ||
28 | * You should have received a copy of the GNU General Public License along | ||
29 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
30 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
31 | * | ||
32 | * History | ||
33 | * ------- | ||
34 | * | ||
35 | * 2005/07/25 INdT-10LE Kernel Team - Alsa driver for omap osk, | ||
36 | * original version based in sa1100 driver | ||
37 | * and omap oss driver. | ||
38 | */ | ||
39 | |||
40 | #ifndef __OMAP_ALSA_H | ||
41 | #define __OMAP_ALSA_H | ||
42 | |||
43 | #include <sound/driver.h> | ||
44 | #include <asm/arch/dma.h> | ||
45 | #include <sound/core.h> | ||
46 | #include <sound/pcm.h> | ||
47 | #include <asm/arch/mcbsp.h> | ||
48 | #include <linux/platform_device.h> | ||
49 | |||
50 | #define DMA_BUF_SIZE (1024 * 8) | ||
51 | |||
52 | /* | ||
53 | * Buffer management for alsa and dma | ||
54 | */ | ||
55 | struct audio_stream { | ||
56 | char *id; /* identification string */ | ||
57 | int stream_id; /* numeric identification */ | ||
58 | int dma_dev; /* dma number of that device */ | ||
59 | int *lch; /* Chain of channels this stream is linked to */ | ||
60 | char started; /* to store if the chain was started or not */ | ||
61 | int dma_q_head; /* DMA Channel Q Head */ | ||
62 | int dma_q_tail; /* DMA Channel Q Tail */ | ||
63 | char dma_q_count; /* DMA Channel Q Count */ | ||
64 | int active:1; /* we are using this stream for transfer now */ | ||
65 | int period; /* current transfer period */ | ||
66 | int periods; /* current count of periods registerd in the DMA engine */ | ||
67 | spinlock_t dma_lock; /* for locking in DMA operations */ | ||
68 | snd_pcm_substream_t *stream; /* the pcm stream */ | ||
69 | unsigned linked:1; /* dma channels linked */ | ||
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 */ | ||
72 | int (*hw_stop)(void); /* interface to stop HW interface, e.g. McBSP */ | ||
73 | }; | ||
74 | |||
75 | /* | ||
76 | * Alsa card structure for aic23 | ||
77 | */ | ||
78 | struct snd_card_omap_codec { | ||
79 | snd_card_t *card; | ||
80 | snd_pcm_t *pcm; | ||
81 | long samplerate; | ||
82 | struct audio_stream s[2]; /* playback & capture */ | ||
83 | }; | ||
84 | |||
85 | /* Codec specific information and function pointers. | ||
86 | * Codec (omap-alsa-aic23.c and omap-alsa-tsc2101.c) | ||
87 | * are responsible for defining the function pointers. | ||
88 | */ | ||
89 | struct omap_alsa_codec_config { | ||
90 | char *name; | ||
91 | struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa; | ||
92 | snd_pcm_hw_constraint_list_t *hw_constraints_rates; | ||
93 | snd_pcm_hardware_t *snd_omap_alsa_playback; | ||
94 | snd_pcm_hardware_t *snd_omap_alsa_capture; | ||
95 | void (*codec_configure_dev)(void); | ||
96 | void (*codec_set_samplerate)(long); | ||
97 | void (*codec_clock_setup)(void); | ||
98 | int (*codec_clock_on)(void); | ||
99 | int (*codec_clock_off)(void); | ||
100 | int (*get_default_samplerate)(void); | ||
101 | }; | ||
102 | |||
103 | /*********** Mixer function prototypes *************************/ | ||
104 | int snd_omap_mixer(struct snd_card_omap_codec *); | ||
105 | void snd_omap_init_mixer(void); | ||
106 | |||
107 | #ifdef CONFIG_PM | ||
108 | void snd_omap_suspend_mixer(void); | ||
109 | void snd_omap_resume_mixer(void); | ||
110 | #endif | ||
111 | |||
112 | int snd_omap_alsa_post_probe(struct platform_device *pdev, struct omap_alsa_codec_config *config); | ||
113 | int snd_omap_alsa_remove(struct platform_device *pdev); | ||
114 | #ifdef CONFIG_PM | ||
115 | int snd_omap_alsa_suspend(struct platform_device *pdev, pm_message_t state); | ||
116 | int snd_omap_alsa_resume(struct platform_device *pdev); | ||
117 | #else | ||
118 | #define snd_omap_alsa_suspend NULL | ||
119 | #define snd_omap_alsa_resume NULL | ||
120 | #endif | ||
121 | |||
122 | void callback_omap_alsa_sound_dma(void *); | ||
123 | |||
124 | #endif | ||
diff --git a/include/asm-arm/arch-omap/omapfb.h b/include/asm-arm/arch-omap/omapfb.h index 4ba2622cc142..fccdb3db025f 100644 --- a/include/asm-arm/arch-omap/omapfb.h +++ b/include/asm-arm/arch-omap/omapfb.h | |||
@@ -34,9 +34,10 @@ | |||
34 | #define OMAPFB_MIRROR OMAP_IOW(31, int) | 34 | #define OMAPFB_MIRROR OMAP_IOW(31, int) |
35 | #define OMAPFB_SYNC_GFX OMAP_IO(37) | 35 | #define OMAPFB_SYNC_GFX OMAP_IO(37) |
36 | #define OMAPFB_VSYNC OMAP_IO(38) | 36 | #define OMAPFB_VSYNC OMAP_IO(38) |
37 | #define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, enum omapfb_update_mode) | 37 | #define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) |
38 | #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(41, struct omapfb_update_window_old) | ||
38 | #define OMAPFB_GET_CAPS OMAP_IOR(42, unsigned long) | 39 | #define OMAPFB_GET_CAPS OMAP_IOR(42, unsigned long) |
39 | #define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, enum omapfb_update_mode) | 40 | #define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) |
40 | #define OMAPFB_LCD_TEST OMAP_IOW(45, int) | 41 | #define OMAPFB_LCD_TEST OMAP_IOW(45, int) |
41 | #define OMAPFB_CTRL_TEST OMAP_IOW(46, int) | 42 | #define OMAPFB_CTRL_TEST OMAP_IOW(46, int) |
42 | #define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window) | 43 | #define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window) |
@@ -66,9 +67,14 @@ enum omapfb_color_format { | |||
66 | }; | 67 | }; |
67 | 68 | ||
68 | struct omapfb_update_window { | 69 | struct omapfb_update_window { |
69 | u32 x, y; | 70 | __u32 x, y; |
70 | u32 width, height; | 71 | __u32 width, height; |
71 | u32 format; | 72 | __u32 format; |
73 | }; | ||
74 | |||
75 | struct omapfb_update_window_old { | ||
76 | __u32 x, y; | ||
77 | __u32 width, height; | ||
72 | }; | 78 | }; |
73 | 79 | ||
74 | enum omapfb_plane { | 80 | enum omapfb_plane { |
@@ -83,17 +89,17 @@ enum omapfb_channel_out { | |||
83 | }; | 89 | }; |
84 | 90 | ||
85 | struct omapfb_setup_plane { | 91 | struct omapfb_setup_plane { |
86 | u8 plane; | 92 | __u8 plane; |
87 | u8 channel_out; | 93 | __u8 channel_out; |
88 | u32 offset; | 94 | __u32 offset; |
89 | u32 pos_x, pos_y; | 95 | __u32 pos_x, pos_y; |
90 | u32 width, height; | 96 | __u32 width, height; |
91 | u32 color_mode; | 97 | __u32 color_mode; |
92 | }; | 98 | }; |
93 | 99 | ||
94 | struct omapfb_enable_plane { | 100 | struct omapfb_enable_plane { |
95 | u8 plane; | 101 | __u8 plane; |
96 | u8 enable; | 102 | __u8 enable; |
97 | }; | 103 | }; |
98 | 104 | ||
99 | enum omapfb_color_key_type { | 105 | enum omapfb_color_key_type { |
@@ -103,10 +109,10 @@ enum omapfb_color_key_type { | |||
103 | }; | 109 | }; |
104 | 110 | ||
105 | struct omapfb_color_key { | 111 | struct omapfb_color_key { |
106 | u8 channel_out; | 112 | __u8 channel_out; |
107 | u32 background; | 113 | __u32 background; |
108 | u32 trans_key; | 114 | __u32 trans_key; |
109 | u8 key_type; | 115 | __u8 key_type; |
110 | }; | 116 | }; |
111 | 117 | ||
112 | enum omapfb_update_mode { | 118 | enum omapfb_update_mode { |
@@ -120,6 +126,9 @@ enum omapfb_update_mode { | |||
120 | #include <linux/completion.h> | 126 | #include <linux/completion.h> |
121 | #include <linux/interrupt.h> | 127 | #include <linux/interrupt.h> |
122 | #include <linux/fb.h> | 128 | #include <linux/fb.h> |
129 | #include <linux/mutex.h> | ||
130 | |||
131 | #include <asm/arch/board.h> | ||
123 | 132 | ||
124 | #define OMAP_LCDC_INV_VSYNC 0x0001 | 133 | #define OMAP_LCDC_INV_VSYNC 0x0001 |
125 | #define OMAP_LCDC_INV_HSYNC 0x0002 | 134 | #define OMAP_LCDC_INV_HSYNC 0x0002 |
@@ -184,19 +193,38 @@ struct extif_timings { | |||
184 | int re_cycle_time; | 193 | int re_cycle_time; |
185 | int cs_pulse_width; | 194 | int cs_pulse_width; |
186 | int access_time; | 195 | int access_time; |
196 | |||
197 | int clk_div; | ||
198 | |||
199 | u32 tim[5]; /* set by extif->convert_timings */ | ||
200 | |||
201 | int converted; | ||
187 | }; | 202 | }; |
188 | 203 | ||
189 | struct lcd_ctrl_extif { | 204 | struct lcd_ctrl_extif { |
190 | int (*init) (void); | 205 | int (*init) (void); |
191 | void (*cleanup) (void); | 206 | void (*cleanup) (void); |
207 | void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div); | ||
208 | int (*convert_timings) (struct extif_timings *timings); | ||
192 | void (*set_timings) (const struct extif_timings *timings); | 209 | void (*set_timings) (const struct extif_timings *timings); |
193 | void (*write_command) (u32 cmd); | 210 | void (*set_bits_per_cycle)(int bpc); |
194 | u32 (*read_data) (void); | 211 | void (*write_command) (const void *buf, unsigned int len); |
195 | void (*write_data) (u32 data); | 212 | void (*read_data) (void *buf, unsigned int len); |
213 | void (*write_data) (const void *buf, unsigned int len); | ||
196 | void (*transfer_area) (int width, int height, | 214 | void (*transfer_area) (int width, int height, |
197 | void (callback)(void * data), void *data); | 215 | void (callback)(void * data), void *data); |
216 | unsigned long max_transmit_size; | ||
198 | }; | 217 | }; |
199 | 218 | ||
219 | struct omapfb_notifier_block { | ||
220 | struct notifier_block nb; | ||
221 | void *data; | ||
222 | }; | ||
223 | |||
224 | typedef int (*omapfb_notifier_callback_t)(struct omapfb_notifier_block *, | ||
225 | unsigned long event, | ||
226 | struct omapfb_device *fbdev); | ||
227 | |||
200 | struct lcd_ctrl { | 228 | struct lcd_ctrl { |
201 | const char *name; | 229 | const char *name; |
202 | void *data; | 230 | void *data; |
@@ -204,9 +232,11 @@ struct lcd_ctrl { | |||
204 | int (*init) (struct omapfb_device *fbdev, | 232 | int (*init) (struct omapfb_device *fbdev, |
205 | int ext_mode, int req_vram_size); | 233 | int ext_mode, int req_vram_size); |
206 | void (*cleanup) (void); | 234 | void (*cleanup) (void); |
235 | void (*bind_client) (struct omapfb_notifier_block *nb); | ||
207 | void (*get_vram_layout)(unsigned long *size, | 236 | void (*get_vram_layout)(unsigned long *size, |
208 | void **virt_base, | 237 | void **virt_base, |
209 | dma_addr_t *phys_base); | 238 | dma_addr_t *phys_base); |
239 | int (*mmap) (struct vm_area_struct *vma); | ||
210 | unsigned long (*get_caps) (void); | 240 | unsigned long (*get_caps) (void); |
211 | int (*set_update_mode)(enum omapfb_update_mode mode); | 241 | int (*set_update_mode)(enum omapfb_update_mode mode); |
212 | enum omapfb_update_mode (*get_update_mode)(void); | 242 | enum omapfb_update_mode (*get_update_mode)(void); |
@@ -240,7 +270,7 @@ struct omapfb_device { | |||
240 | int state; | 270 | int state; |
241 | int ext_lcdc; /* Using external | 271 | int ext_lcdc; /* Using external |
242 | LCD controller */ | 272 | LCD controller */ |
243 | struct semaphore rqueue_sema; | 273 | struct mutex rqueue_mutex; |
244 | 274 | ||
245 | void *vram_virt_base; | 275 | void *vram_virt_base; |
246 | dma_addr_t vram_phys_base; | 276 | dma_addr_t vram_phys_base; |
@@ -261,12 +291,13 @@ struct omapfb_device { | |||
261 | struct device *dev; | 291 | struct device *dev; |
262 | }; | 292 | }; |
263 | 293 | ||
264 | extern struct lcd_panel h3_panel; | 294 | struct omapfb_platform_data { |
265 | extern struct lcd_panel h2_panel; | 295 | struct omap_lcd_config lcd; |
266 | extern struct lcd_panel p2_panel; | 296 | struct omap_fbmem_config fbmem; |
267 | extern struct lcd_panel osk_panel; | 297 | }; |
268 | extern struct lcd_panel innovator1610_panel; | 298 | |
269 | extern struct lcd_panel innovator1510_panel; | 299 | #define OMAPFB_EVENT_READY 1 |
300 | #define OMAPFB_EVENT_DISABLED 2 | ||
270 | 301 | ||
271 | #ifdef CONFIG_ARCH_OMAP1 | 302 | #ifdef CONFIG_ARCH_OMAP1 |
272 | extern struct lcd_ctrl omap1_lcd_ctrl; | 303 | extern struct lcd_ctrl omap1_lcd_ctrl; |
@@ -274,7 +305,20 @@ extern struct lcd_ctrl omap1_lcd_ctrl; | |||
274 | extern struct lcd_ctrl omap2_disp_ctrl; | 305 | extern struct lcd_ctrl omap2_disp_ctrl; |
275 | #endif | 306 | #endif |
276 | 307 | ||
308 | extern void omapfb_register_panel(struct lcd_panel *panel); | ||
277 | extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval); | 309 | extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval); |
310 | extern void omapfb_notify_clients(struct omapfb_device *fbdev, | ||
311 | unsigned long event); | ||
312 | extern int omapfb_register_client(struct omapfb_notifier_block *nb, | ||
313 | omapfb_notifier_callback_t callback, | ||
314 | void *callback_data); | ||
315 | extern int omapfb_unregister_client(struct omapfb_notifier_block *nb); | ||
316 | extern int omapfb_update_window_async(struct omapfb_update_window *win, | ||
317 | void (*callback)(void *), | ||
318 | void *callback_data); | ||
319 | |||
320 | /* in arch/arm/plat-omap/devices.c */ | ||
321 | extern void omapfb_reserve_mem(void); | ||
278 | 322 | ||
279 | #endif /* __KERNEL__ */ | 323 | #endif /* __KERNEL__ */ |
280 | 324 | ||
diff --git a/include/asm-arm/arch-omap/param.h b/include/asm-arm/arch-omap/param.h new file mode 100644 index 000000000000..face9ad41e97 --- /dev/null +++ b/include/asm-arm/arch-omap/param.h | |||
@@ -0,0 +1,8 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/param.h | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #ifdef CONFIG_OMAP_32K_TIMER_HZ | ||
7 | #define HZ CONFIG_OMAP_32K_TIMER_HZ | ||
8 | #endif | ||
diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h index 7c790425e363..05b003f3a94c 100644 --- a/include/asm-arm/arch-omap/pm.h +++ b/include/asm-arm/arch-omap/pm.h | |||
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | /* | 50 | /* |
51 | * ---------------------------------------------------------------------------- | 51 | * ---------------------------------------------------------------------------- |
52 | * Powermanagement bitmasks | 52 | * Power management bitmasks |
53 | * ---------------------------------------------------------------------------- | 53 | * ---------------------------------------------------------------------------- |
54 | */ | 54 | */ |
55 | #define IDLE_WAIT_CYCLES 0x00000fff | 55 | #define IDLE_WAIT_CYCLES 0x00000fff |
@@ -112,32 +112,59 @@ | |||
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | #ifndef __ASSEMBLER__ | 114 | #ifndef __ASSEMBLER__ |
115 | |||
116 | #include <linux/clk.h> | ||
117 | |||
118 | extern void prevent_idle_sleep(void); | ||
119 | extern void allow_idle_sleep(void); | ||
120 | |||
121 | /** | ||
122 | * clk_deny_idle - Prevents the clock from being idled during MPU idle | ||
123 | * @clk: clock signal handle | ||
124 | */ | ||
125 | void clk_deny_idle(struct clk *clk); | ||
126 | |||
127 | /** | ||
128 | * clk_allow_idle - Counters previous clk_deny_idle | ||
129 | * @clk: clock signal handle | ||
130 | */ | ||
131 | void clk_deny_idle(struct clk *clk); | ||
132 | |||
115 | extern void omap_pm_idle(void); | 133 | extern void omap_pm_idle(void); |
116 | extern void omap_pm_suspend(void); | 134 | extern void omap_pm_suspend(void); |
117 | extern void omap730_cpu_suspend(unsigned short, unsigned short); | 135 | extern void omap730_cpu_suspend(unsigned short, unsigned short); |
118 | extern void omap1510_cpu_suspend(unsigned short, unsigned short); | 136 | extern void omap1510_cpu_suspend(unsigned short, unsigned short); |
119 | extern void omap1610_cpu_suspend(unsigned short, unsigned short); | 137 | extern void omap1610_cpu_suspend(unsigned short, unsigned short); |
138 | extern void omap24xx_cpu_suspend(u32 dll_ctrl, u32 cpu_revision); | ||
120 | extern void omap730_idle_loop_suspend(void); | 139 | extern void omap730_idle_loop_suspend(void); |
121 | extern void omap1510_idle_loop_suspend(void); | 140 | extern void omap1510_idle_loop_suspend(void); |
122 | extern void omap1610_idle_loop_suspend(void); | 141 | extern void omap1610_idle_loop_suspend(void); |
142 | extern void omap24xx_idle_loop_suspend(void); | ||
143 | |||
144 | extern unsigned int omap730_cpu_suspend_sz; | ||
145 | extern unsigned int omap1510_cpu_suspend_sz; | ||
146 | extern unsigned int omap1610_cpu_suspend_sz; | ||
147 | extern unsigned int omap24xx_cpu_suspend_sz; | ||
148 | extern unsigned int omap730_idle_loop_suspend_sz; | ||
149 | extern unsigned int omap1510_idle_loop_suspend_sz; | ||
150 | extern unsigned int omap1610_idle_loop_suspend_sz; | ||
151 | extern unsigned int omap24xx_idle_loop_suspend_sz; | ||
123 | 152 | ||
124 | #ifdef CONFIG_OMAP_SERIAL_WAKE | 153 | #ifdef CONFIG_OMAP_SERIAL_WAKE |
125 | extern void omap_serial_wake_trigger(int enable); | 154 | extern void omap_serial_wake_trigger(int enable); |
126 | #else | 155 | #else |
156 | #define omap_serial_wakeup_init() {} | ||
127 | #define omap_serial_wake_trigger(x) {} | 157 | #define omap_serial_wake_trigger(x) {} |
128 | #endif /* CONFIG_OMAP_SERIAL_WAKE */ | 158 | #endif /* CONFIG_OMAP_SERIAL_WAKE */ |
129 | 159 | ||
130 | extern unsigned int omap730_cpu_suspend_sz; | ||
131 | extern unsigned int omap730_idle_loop_suspend_sz; | ||
132 | extern unsigned int omap1510_cpu_suspend_sz; | ||
133 | extern unsigned int omap1510_idle_loop_suspend_sz; | ||
134 | extern unsigned int omap1610_cpu_suspend_sz; | ||
135 | extern unsigned int omap1610_idle_loop_suspend_sz; | ||
136 | |||
137 | #define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readl(x) | 160 | #define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readl(x) |
138 | #define ARM_RESTORE(x) omap_writel((arm_sleep_save[ARM_SLEEP_SAVE_##x]), (x)) | 161 | #define ARM_RESTORE(x) omap_writel((arm_sleep_save[ARM_SLEEP_SAVE_##x]), (x)) |
139 | #define ARM_SHOW(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] | 162 | #define ARM_SHOW(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] |
140 | 163 | ||
164 | #define DSP_SAVE(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x] = __raw_readw(x) | ||
165 | #define DSP_RESTORE(x) __raw_writew((dsp_sleep_save[DSP_SLEEP_SAVE_##x]), (x)) | ||
166 | #define DSP_SHOW(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x] | ||
167 | |||
141 | #define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x) | 168 | #define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x) |
142 | #define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x)) | 169 | #define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x)) |
143 | #define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] | 170 | #define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] |
@@ -154,6 +181,10 @@ extern unsigned int omap1610_idle_loop_suspend_sz; | |||
154 | #define MPUI1610_RESTORE(x) omap_writel((mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]), (x)) | 181 | #define MPUI1610_RESTORE(x) omap_writel((mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]), (x)) |
155 | #define MPUI1610_SHOW(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x] | 182 | #define MPUI1610_SHOW(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x] |
156 | 183 | ||
184 | #define OMAP24XX_SAVE(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] = x | ||
185 | #define OMAP24XX_RESTORE(x) x = omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] | ||
186 | #define OMAP24XX_SHOW(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] | ||
187 | |||
157 | /* | 188 | /* |
158 | * List of global OMAP registers to preserve. | 189 | * List of global OMAP registers to preserve. |
159 | * More ones like CP and general purpose register values are preserved | 190 | * More ones like CP and general purpose register values are preserved |
@@ -176,6 +207,15 @@ enum arm_save_state { | |||
176 | ARM_SLEEP_SAVE_SIZE | 207 | ARM_SLEEP_SAVE_SIZE |
177 | }; | 208 | }; |
178 | 209 | ||
210 | enum dsp_save_state { | ||
211 | DSP_SLEEP_SAVE_START = 0, | ||
212 | /* | ||
213 | * DSP registers 16 bits | ||
214 | */ | ||
215 | DSP_SLEEP_SAVE_DSP_IDLECT2, | ||
216 | DSP_SLEEP_SAVE_SIZE | ||
217 | }; | ||
218 | |||
179 | enum ulpd_save_state { | 219 | enum ulpd_save_state { |
180 | ULPD_SLEEP_SAVE_START = 0, | 220 | ULPD_SLEEP_SAVE_START = 0, |
181 | /* | 221 | /* |
@@ -254,5 +294,30 @@ enum mpui1610_save_state { | |||
254 | #endif | 294 | #endif |
255 | }; | 295 | }; |
256 | 296 | ||
297 | enum omap24xx_save_state { | ||
298 | OMAP24XX_SLEEP_SAVE_START = 0, | ||
299 | OMAP24XX_SLEEP_SAVE_INTC_MIR0, | ||
300 | OMAP24XX_SLEEP_SAVE_INTC_MIR1, | ||
301 | OMAP24XX_SLEEP_SAVE_INTC_MIR2, | ||
302 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE, | ||
303 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE, | ||
304 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE, | ||
305 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE, | ||
306 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE, | ||
307 | OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1, | ||
308 | OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1, | ||
309 | OMAP24XX_SLEEP_SAVE_GPIO3_IRQENABLE1, | ||
310 | OMAP24XX_SLEEP_SAVE_GPIO4_IRQENABLE1, | ||
311 | OMAP24XX_SLEEP_SAVE_GPIO3_OE, | ||
312 | OMAP24XX_SLEEP_SAVE_GPIO4_OE, | ||
313 | OMAP24XX_SLEEP_SAVE_GPIO3_RISINGDETECT, | ||
314 | OMAP24XX_SLEEP_SAVE_GPIO3_FALLINGDETECT, | ||
315 | OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SPI1_NCS2, | ||
316 | OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_MCBSP1_DX, | ||
317 | OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SSI1_FLAG_TX, | ||
318 | OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SYS_NIRQW0, | ||
319 | OMAP24XX_SLEEP_SAVE_SIZE | ||
320 | }; | ||
321 | |||
257 | #endif /* ASSEMBLER */ | 322 | #endif /* ASSEMBLER */ |
258 | #endif /* __ASM_ARCH_OMAP_PM_H */ | 323 | #endif /* __ASM_ARCH_OMAP_PM_H */ |
diff --git a/include/asm-arm/arch-omap/prcm.h b/include/asm-arm/arch-omap/prcm.h index 7b48a5cbb15f..7bcaf94bde9f 100644 --- a/include/asm-arm/arch-omap/prcm.h +++ b/include/asm-arm/arch-omap/prcm.h | |||
@@ -1,5 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * prcm.h - Access definations for use in OMAP24XX clock and power management | 2 | * linux/include/asm-arm/arch-omap/prcm.h |
3 | * | ||
4 | * Access definations for use in OMAP24XX clock and power management | ||
3 | * | 5 | * |
4 | * Copyright (C) 2005 Texas Instruments, Inc. | 6 | * Copyright (C) 2005 Texas Instruments, Inc. |
5 | * | 7 | * |
@@ -21,405 +23,7 @@ | |||
21 | #ifndef __ASM_ARM_ARCH_DPM_PRCM_H | 23 | #ifndef __ASM_ARM_ARCH_DPM_PRCM_H |
22 | #define __ASM_ARM_ARCH_DPM_PRCM_H | 24 | #define __ASM_ARM_ARCH_DPM_PRCM_H |
23 | 25 | ||
24 | /* SET_PERFORMANCE_LEVEL PARAMETERS */ | 26 | u32 omap_prcm_get_reset_sources(void); |
25 | #define PRCM_HALF_SPEED 1 | ||
26 | #define PRCM_FULL_SPEED 2 | ||
27 | |||
28 | #ifndef __ASSEMBLER__ | ||
29 | |||
30 | #define PRCM_REG32(offset) __REG32(OMAP24XX_PRCM_BASE + (offset)) | ||
31 | |||
32 | #define PRCM_REVISION PRCM_REG32(0x000) | ||
33 | #define PRCM_SYSCONFIG PRCM_REG32(0x010) | ||
34 | #define PRCM_IRQSTATUS_MPU PRCM_REG32(0x018) | ||
35 | #define PRCM_IRQENABLE_MPU PRCM_REG32(0x01C) | ||
36 | #define PRCM_VOLTCTRL PRCM_REG32(0x050) | ||
37 | #define PRCM_VOLTST PRCM_REG32(0x054) | ||
38 | #define PRCM_CLKSRC_CTRL PRCM_REG32(0x060) | ||
39 | #define PRCM_CLKOUT_CTRL PRCM_REG32(0x070) | ||
40 | #define PRCM_CLKEMUL_CTRL PRCM_REG32(0x078) | ||
41 | #define PRCM_CLKCFG_CTRL PRCM_REG32(0x080) | ||
42 | #define PRCM_CLKCFG_STATUS PRCM_REG32(0x084) | ||
43 | #define PRCM_VOLTSETUP PRCM_REG32(0x090) | ||
44 | #define PRCM_CLKSSETUP PRCM_REG32(0x094) | ||
45 | #define PRCM_POLCTRL PRCM_REG32(0x098) | ||
46 | |||
47 | /* GENERAL PURPOSE */ | ||
48 | #define GENERAL_PURPOSE1 PRCM_REG32(0x0B0) | ||
49 | #define GENERAL_PURPOSE2 PRCM_REG32(0x0B4) | ||
50 | #define GENERAL_PURPOSE3 PRCM_REG32(0x0B8) | ||
51 | #define GENERAL_PURPOSE4 PRCM_REG32(0x0BC) | ||
52 | #define GENERAL_PURPOSE5 PRCM_REG32(0x0C0) | ||
53 | #define GENERAL_PURPOSE6 PRCM_REG32(0x0C4) | ||
54 | #define GENERAL_PURPOSE7 PRCM_REG32(0x0C8) | ||
55 | #define GENERAL_PURPOSE8 PRCM_REG32(0x0CC) | ||
56 | #define GENERAL_PURPOSE9 PRCM_REG32(0x0D0) | ||
57 | #define GENERAL_PURPOSE10 PRCM_REG32(0x0D4) | ||
58 | #define GENERAL_PURPOSE11 PRCM_REG32(0x0D8) | ||
59 | #define GENERAL_PURPOSE12 PRCM_REG32(0x0DC) | ||
60 | #define GENERAL_PURPOSE13 PRCM_REG32(0x0E0) | ||
61 | #define GENERAL_PURPOSE14 PRCM_REG32(0x0E4) | ||
62 | #define GENERAL_PURPOSE15 PRCM_REG32(0x0E8) | ||
63 | #define GENERAL_PURPOSE16 PRCM_REG32(0x0EC) | ||
64 | #define GENERAL_PURPOSE17 PRCM_REG32(0x0F0) | ||
65 | #define GENERAL_PURPOSE18 PRCM_REG32(0x0F4) | ||
66 | #define GENERAL_PURPOSE19 PRCM_REG32(0x0F8) | ||
67 | #define GENERAL_PURPOSE20 PRCM_REG32(0x0FC) | ||
68 | |||
69 | /* MPU */ | ||
70 | #define CM_CLKSEL_MPU PRCM_REG32(0x140) | ||
71 | #define CM_CLKSTCTRL_MPU PRCM_REG32(0x148) | ||
72 | #define RM_RSTST_MPU PRCM_REG32(0x158) | ||
73 | #define PM_WKDEP_MPU PRCM_REG32(0x1C8) | ||
74 | #define PM_EVGENCTRL_MPU PRCM_REG32(0x1D4) | ||
75 | #define PM_EVEGENONTIM_MPU PRCM_REG32(0x1D8) | ||
76 | #define PM_EVEGENOFFTIM_MPU PRCM_REG32(0x1DC) | ||
77 | #define PM_PWSTCTRL_MPU PRCM_REG32(0x1E0) | ||
78 | #define PM_PWSTST_MPU PRCM_REG32(0x1E4) | ||
79 | |||
80 | /* CORE */ | ||
81 | #define CM_FCLKEN1_CORE PRCM_REG32(0x200) | ||
82 | #define CM_FCLKEN2_CORE PRCM_REG32(0x204) | ||
83 | #define CM_FCLKEN3_CORE PRCM_REG32(0x208) | ||
84 | #define CM_ICLKEN1_CORE PRCM_REG32(0x210) | ||
85 | #define CM_ICLKEN2_CORE PRCM_REG32(0x214) | ||
86 | #define CM_ICLKEN3_CORE PRCM_REG32(0x218) | ||
87 | #define CM_ICLKEN4_CORE PRCM_REG32(0x21C) | ||
88 | #define CM_IDLEST1_CORE PRCM_REG32(0x220) | ||
89 | #define CM_IDLEST2_CORE PRCM_REG32(0x224) | ||
90 | #define CM_IDLEST3_CORE PRCM_REG32(0x228) | ||
91 | #define CM_IDLEST4_CORE PRCM_REG32(0x22C) | ||
92 | #define CM_AUTOIDLE1_CORE PRCM_REG32(0x230) | ||
93 | #define CM_AUTOIDLE2_CORE PRCM_REG32(0x234) | ||
94 | #define CM_AUTOIDLE3_CORE PRCM_REG32(0x238) | ||
95 | #define CM_AUTOIDLE4_CORE PRCM_REG32(0x23C) | ||
96 | #define CM_CLKSEL1_CORE PRCM_REG32(0x240) | ||
97 | #define CM_CLKSEL2_CORE PRCM_REG32(0x244) | ||
98 | #define CM_CLKSTCTRL_CORE PRCM_REG32(0x248) | ||
99 | #define PM_WKEN1_CORE PRCM_REG32(0x2A0) | ||
100 | #define PM_WKEN2_CORE PRCM_REG32(0x2A4) | ||
101 | #define PM_WKST1_CORE PRCM_REG32(0x2B0) | ||
102 | #define PM_WKST2_CORE PRCM_REG32(0x2B4) | ||
103 | #define PM_WKDEP_CORE PRCM_REG32(0x2C8) | ||
104 | #define PM_PWSTCTRL_CORE PRCM_REG32(0x2E0) | ||
105 | #define PM_PWSTST_CORE PRCM_REG32(0x2E4) | ||
106 | |||
107 | /* GFX */ | ||
108 | #define CM_FCLKEN_GFX PRCM_REG32(0x300) | ||
109 | #define CM_ICLKEN_GFX PRCM_REG32(0x310) | ||
110 | #define CM_IDLEST_GFX PRCM_REG32(0x320) | ||
111 | #define CM_CLKSEL_GFX PRCM_REG32(0x340) | ||
112 | #define CM_CLKSTCTRL_GFX PRCM_REG32(0x348) | ||
113 | #define RM_RSTCTRL_GFX PRCM_REG32(0x350) | ||
114 | #define RM_RSTST_GFX PRCM_REG32(0x358) | ||
115 | #define PM_WKDEP_GFX PRCM_REG32(0x3C8) | ||
116 | #define PM_PWSTCTRL_GFX PRCM_REG32(0x3E0) | ||
117 | #define PM_PWSTST_GFX PRCM_REG32(0x3E4) | ||
118 | |||
119 | /* WAKE-UP */ | ||
120 | #define CM_FCLKEN_WKUP PRCM_REG32(0x400) | ||
121 | #define CM_ICLKEN_WKUP PRCM_REG32(0x410) | ||
122 | #define CM_IDLEST_WKUP PRCM_REG32(0x420) | ||
123 | #define CM_AUTOIDLE_WKUP PRCM_REG32(0x430) | ||
124 | #define CM_CLKSEL_WKUP PRCM_REG32(0x440) | ||
125 | #define RM_RSTCTRL_WKUP PRCM_REG32(0x450) | ||
126 | #define RM_RSTTIME_WKUP PRCM_REG32(0x454) | ||
127 | #define RM_RSTST_WKUP PRCM_REG32(0x458) | ||
128 | #define PM_WKEN_WKUP PRCM_REG32(0x4A0) | ||
129 | #define PM_WKST_WKUP PRCM_REG32(0x4B0) | ||
130 | |||
131 | /* CLOCKS */ | ||
132 | #define CM_CLKEN_PLL PRCM_REG32(0x500) | ||
133 | #define CM_IDLEST_CKGEN PRCM_REG32(0x520) | ||
134 | #define CM_AUTOIDLE_PLL PRCM_REG32(0x530) | ||
135 | #define CM_CLKSEL1_PLL PRCM_REG32(0x540) | ||
136 | #define CM_CLKSEL2_PLL PRCM_REG32(0x544) | ||
137 | |||
138 | /* DSP */ | ||
139 | #define CM_FCLKEN_DSP PRCM_REG32(0x800) | ||
140 | #define CM_ICLKEN_DSP PRCM_REG32(0x810) | ||
141 | #define CM_IDLEST_DSP PRCM_REG32(0x820) | ||
142 | #define CM_AUTOIDLE_DSP PRCM_REG32(0x830) | ||
143 | #define CM_CLKSEL_DSP PRCM_REG32(0x840) | ||
144 | #define CM_CLKSTCTRL_DSP PRCM_REG32(0x848) | ||
145 | #define RM_RSTCTRL_DSP PRCM_REG32(0x850) | ||
146 | #define RM_RSTST_DSP PRCM_REG32(0x858) | ||
147 | #define PM_WKEN_DSP PRCM_REG32(0x8A0) | ||
148 | #define PM_WKDEP_DSP PRCM_REG32(0x8C8) | ||
149 | #define PM_PWSTCTRL_DSP PRCM_REG32(0x8E0) | ||
150 | #define PM_PWSTST_DSP PRCM_REG32(0x8E4) | ||
151 | #define PRCM_IRQSTATUS_DSP PRCM_REG32(0x8F0) | ||
152 | #define PRCM_IRQENABLE_DSP PRCM_REG32(0x8F4) | ||
153 | |||
154 | /* IVA */ | ||
155 | #define PRCM_IRQSTATUS_IVA PRCM_REG32(0x8F8) | ||
156 | #define PRCM_IRQENABLE_IVA PRCM_REG32(0x8FC) | ||
157 | |||
158 | /* Modem on 2430 */ | ||
159 | #define CM_FCLKEN_MDM PRCM_REG32(0xC00) | ||
160 | #define CM_ICLKEN_MDM PRCM_REG32(0xC10) | ||
161 | #define CM_IDLEST_MDM PRCM_REG32(0xC20) | ||
162 | #define CM_CLKSEL_MDM PRCM_REG32(0xC40) | ||
163 | |||
164 | /* FIXME: Move to header for 2430 */ | ||
165 | #define DISP_BASE (OMAP24XX_L4_IO_BASE+0x50000) | ||
166 | #define DISP_REG32(offset) __REG32(DISP_BASE + (offset)) | ||
167 | |||
168 | #define OMAP24XX_GPMC_BASE (L3_24XX_BASE + 0xa000) | ||
169 | #define GPMC_BASE (OMAP24XX_GPMC_BASE) | ||
170 | #define GPMC_REG32(offset) __REG32(GPMC_BASE + (offset)) | ||
171 | |||
172 | #define GPT1_BASE (OMAP24XX_GPT1) | ||
173 | #define GPT1_REG32(offset) __REG32(GPT1_BASE + (offset)) | ||
174 | |||
175 | /* Misc sysconfig */ | ||
176 | #define DISPC_SYSCONFIG DISP_REG32(0x410) | ||
177 | #define SPI_BASE (OMAP24XX_L4_IO_BASE+0x98000) | ||
178 | #define MCSPI1_SYSCONFIG __REG32(SPI_BASE + 0x10) | ||
179 | #define MCSPI2_SYSCONFIG __REG32(SPI_BASE+0x2000 + 0x10) | ||
180 | |||
181 | //#define DSP_MMU_SYSCONFIG 0x5A000010 | ||
182 | #define CAMERA_MMU_SYSCONFIG __REG32(DISP_BASE+0x2C10) | ||
183 | //#define IVA_MMU_SYSCONFIG 0x5D000010 | ||
184 | //#define DSP_DMA_SYSCONFIG 0x00FCC02C | ||
185 | #define CAMERA_DMA_SYSCONFIG __REG32(DISP_BASE+0x282C) | ||
186 | #define SYSTEM_DMA_SYSCONFIG __REG32(DISP_BASE+0x602C) | ||
187 | #define GPMC_SYSCONFIG GPMC_REG32(0x010) | ||
188 | #define MAILBOXES_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE+0x94010) | ||
189 | #define UART1_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE+0x6A054) | ||
190 | #define UART2_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE+0x6C054) | ||
191 | #define UART3_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE+0x6E054) | ||
192 | //#define IVA_SYSCONFIG 0x5C060010 | ||
193 | #define SDRC_SYSCONFIG __REG32(OMAP24XX_SDRC_BASE+0x10) | ||
194 | #define SMS_SYSCONFIG __REG32(OMAP24XX_SMS_BASE+0x10) | ||
195 | #define SSI_SYSCONFIG __REG32(DISP_BASE+0x8010) | ||
196 | //#define VLYNQ_SYSCONFIG 0x67FFFE10 | ||
197 | |||
198 | /* rkw - good cannidates for PM_ to start what nm was trying */ | ||
199 | #define OMAP24XX_GPT2 (OMAP24XX_L4_IO_BASE+0x2A000) | ||
200 | #define OMAP24XX_GPT3 (OMAP24XX_L4_IO_BASE+0x78000) | ||
201 | #define OMAP24XX_GPT4 (OMAP24XX_L4_IO_BASE+0x7A000) | ||
202 | #define OMAP24XX_GPT5 (OMAP24XX_L4_IO_BASE+0x7C000) | ||
203 | #define OMAP24XX_GPT6 (OMAP24XX_L4_IO_BASE+0x7E000) | ||
204 | #define OMAP24XX_GPT7 (OMAP24XX_L4_IO_BASE+0x80000) | ||
205 | #define OMAP24XX_GPT8 (OMAP24XX_L4_IO_BASE+0x82000) | ||
206 | #define OMAP24XX_GPT9 (OMAP24XX_L4_IO_BASE+0x84000) | ||
207 | #define OMAP24XX_GPT10 (OMAP24XX_L4_IO_BASE+0x86000) | ||
208 | #define OMAP24XX_GPT11 (OMAP24XX_L4_IO_BASE+0x88000) | ||
209 | #define OMAP24XX_GPT12 (OMAP24XX_L4_IO_BASE+0x8A000) | ||
210 | |||
211 | #define GPTIMER1_SYSCONFIG GPT1_REG32(0x010) | ||
212 | #define GPTIMER2_SYSCONFIG __REG32(OMAP24XX_GPT2 + 0x10) | ||
213 | #define GPTIMER3_SYSCONFIG __REG32(OMAP24XX_GPT3 + 0x10) | ||
214 | #define GPTIMER4_SYSCONFIG __REG32(OMAP24XX_GPT4 + 0x10) | ||
215 | #define GPTIMER5_SYSCONFIG __REG32(OMAP24XX_GPT5 + 0x10) | ||
216 | #define GPTIMER6_SYSCONFIG __REG32(OMAP24XX_GPT6 + 0x10) | ||
217 | #define GPTIMER7_SYSCONFIG __REG32(OMAP24XX_GPT7 + 0x10) | ||
218 | #define GPTIMER8_SYSCONFIG __REG32(OMAP24XX_GPT8 + 0x10) | ||
219 | #define GPTIMER9_SYSCONFIG __REG32(OMAP24XX_GPT9 + 0x10) | ||
220 | #define GPTIMER10_SYSCONFIG __REG32(OMAP24XX_GPT10 + 0x10) | ||
221 | #define GPTIMER11_SYSCONFIG __REG32(OMAP24XX_GPT11 + 0x10) | ||
222 | #define GPTIMER12_SYSCONFIG __REG32(OMAP24XX_GPT12 + 0x10) | ||
223 | |||
224 | #define GPIOX_BASE(X) (OMAP24XX_GPIO_BASE+(0x2000*((X)-1))) | ||
225 | |||
226 | #define GPIO1_SYSCONFIG __REG32((GPIOX_BASE(1)+0x10)) | ||
227 | #define GPIO2_SYSCONFIG __REG32((GPIOX_BASE(2)+0x10)) | ||
228 | #define GPIO3_SYSCONFIG __REG32((GPIOX_BASE(3)+0x10)) | ||
229 | #define GPIO4_SYSCONFIG __REG32((GPIOX_BASE(4)+0x10)) | ||
230 | |||
231 | /* GP TIMER 1 */ | ||
232 | #define GPTIMER1_TISTAT GPT1_REG32(0x014) | ||
233 | #define GPTIMER1_TISR GPT1_REG32(0x018) | ||
234 | #define GPTIMER1_TIER GPT1_REG32(0x01C) | ||
235 | #define GPTIMER1_TWER GPT1_REG32(0x020) | ||
236 | #define GPTIMER1_TCLR GPT1_REG32(0x024) | ||
237 | #define GPTIMER1_TCRR GPT1_REG32(0x028) | ||
238 | #define GPTIMER1_TLDR GPT1_REG32(0x02C) | ||
239 | #define GPTIMER1_TTGR GPT1_REG32(0x030) | ||
240 | #define GPTIMER1_TWPS GPT1_REG32(0x034) | ||
241 | #define GPTIMER1_TMAR GPT1_REG32(0x038) | ||
242 | #define GPTIMER1_TCAR1 GPT1_REG32(0x03C) | ||
243 | #define GPTIMER1_TSICR GPT1_REG32(0x040) | ||
244 | #define GPTIMER1_TCAR2 GPT1_REG32(0x044) | ||
245 | |||
246 | /* rkw -- base fix up please... */ | ||
247 | #define GPTIMER3_TISR __REG32(OMAP24XX_L4_IO_BASE+0x78018) | ||
248 | |||
249 | /* SDRC */ | ||
250 | #define SDRC_DLLA_CTRL __REG32(OMAP24XX_SDRC_BASE+0x060) | ||
251 | #define SDRC_DLLA_STATUS __REG32(OMAP24XX_SDRC_BASE+0x064) | ||
252 | #define SDRC_DLLB_CTRL __REG32(OMAP24XX_SDRC_BASE+0x068) | ||
253 | #define SDRC_DLLB_STATUS __REG32(OMAP24XX_SDRC_BASE+0x06C) | ||
254 | #define SDRC_POWER __REG32(OMAP24XX_SDRC_BASE+0x070) | ||
255 | #define SDRC_MR_0 __REG32(OMAP24XX_SDRC_BASE+0x084) | ||
256 | |||
257 | /* GPIO 1 */ | ||
258 | #define GPIO1_BASE GPIOX_BASE(1) | ||
259 | #define GPIO1_REG32(offset) __REG32(GPIO1_BASE + (offset)) | ||
260 | #define GPIO1_IRQENABLE1 GPIO1_REG32(0x01C) | ||
261 | #define GPIO1_IRQSTATUS1 GPIO1_REG32(0x018) | ||
262 | #define GPIO1_IRQENABLE2 GPIO1_REG32(0x02C) | ||
263 | #define GPIO1_IRQSTATUS2 GPIO1_REG32(0x028) | ||
264 | #define GPIO1_WAKEUPENABLE GPIO1_REG32(0x020) | ||
265 | #define GPIO1_RISINGDETECT GPIO1_REG32(0x048) | ||
266 | #define GPIO1_DATAIN GPIO1_REG32(0x038) | ||
267 | #define GPIO1_OE GPIO1_REG32(0x034) | ||
268 | #define GPIO1_DATAOUT GPIO1_REG32(0x03C) | ||
269 | |||
270 | /* GPIO2 */ | ||
271 | #define GPIO2_BASE GPIOX_BASE(2) | ||
272 | #define GPIO2_REG32(offset) __REG32(GPIO2_BASE + (offset)) | ||
273 | #define GPIO2_IRQENABLE1 GPIO2_REG32(0x01C) | ||
274 | #define GPIO2_IRQSTATUS1 GPIO2_REG32(0x018) | ||
275 | #define GPIO2_IRQENABLE2 GPIO2_REG32(0x02C) | ||
276 | #define GPIO2_IRQSTATUS2 GPIO2_REG32(0x028) | ||
277 | #define GPIO2_WAKEUPENABLE GPIO2_REG32(0x020) | ||
278 | #define GPIO2_RISINGDETECT GPIO2_REG32(0x048) | ||
279 | #define GPIO2_DATAIN GPIO2_REG32(0x038) | ||
280 | #define GPIO2_OE GPIO2_REG32(0x034) | ||
281 | #define GPIO2_DATAOUT GPIO2_REG32(0x03C) | ||
282 | |||
283 | /* GPIO 3 */ | ||
284 | #define GPIO3_BASE GPIOX_BASE(3) | ||
285 | #define GPIO3_REG32(offset) __REG32(GPIO3_BASE + (offset)) | ||
286 | #define GPIO3_IRQENABLE1 GPIO3_REG32(0x01C) | ||
287 | #define GPIO3_IRQSTATUS1 GPIO3_REG32(0x018) | ||
288 | #define GPIO3_IRQENABLE2 GPIO3_REG32(0x02C) | ||
289 | #define GPIO3_IRQSTATUS2 GPIO3_REG32(0x028) | ||
290 | #define GPIO3_WAKEUPENABLE GPIO3_REG32(0x020) | ||
291 | #define GPIO3_RISINGDETECT GPIO3_REG32(0x048) | ||
292 | #define GPIO3_FALLINGDETECT GPIO3_REG32(0x04C) | ||
293 | #define GPIO3_DATAIN GPIO3_REG32(0x038) | ||
294 | #define GPIO3_OE GPIO3_REG32(0x034) | ||
295 | #define GPIO3_DATAOUT GPIO3_REG32(0x03C) | ||
296 | #define GPIO3_DEBOUNCENABLE GPIO3_REG32(0x050) | ||
297 | #define GPIO3_DEBOUNCINGTIME GPIO3_REG32(0x054) | ||
298 | |||
299 | /* GPIO 4 */ | ||
300 | #define GPIO4_BASE GPIOX_BASE(4) | ||
301 | #define GPIO4_REG32(offset) __REG32(GPIO4_BASE + (offset)) | ||
302 | #define GPIO4_IRQENABLE1 GPIO4_REG32(0x01C) | ||
303 | #define GPIO4_IRQSTATUS1 GPIO4_REG32(0x018) | ||
304 | #define GPIO4_IRQENABLE2 GPIO4_REG32(0x02C) | ||
305 | #define GPIO4_IRQSTATUS2 GPIO4_REG32(0x028) | ||
306 | #define GPIO4_WAKEUPENABLE GPIO4_REG32(0x020) | ||
307 | #define GPIO4_RISINGDETECT GPIO4_REG32(0x048) | ||
308 | #define GPIO4_FALLINGDETECT GPIO4_REG32(0x04C) | ||
309 | #define GPIO4_DATAIN GPIO4_REG32(0x038) | ||
310 | #define GPIO4_OE GPIO4_REG32(0x034) | ||
311 | #define GPIO4_DATAOUT GPIO4_REG32(0x03C) | ||
312 | #define GPIO4_DEBOUNCENABLE GPIO4_REG32(0x050) | ||
313 | #define GPIO4_DEBOUNCINGTIME GPIO4_REG32(0x054) | ||
314 | |||
315 | |||
316 | /* IO CONFIG */ | ||
317 | #define CONTROL_BASE (OMAP24XX_CTRL_BASE) | ||
318 | #define CONTROL_REG32(offset) __REG32(CONTROL_BASE + (offset)) | ||
319 | |||
320 | #define CONTROL_PADCONF_SPI1_NCS2 CONTROL_REG32(0x104) | ||
321 | #define CONTROL_PADCONF_SYS_XTALOUT CONTROL_REG32(0x134) | ||
322 | #define CONTROL_PADCONF_UART1_RX CONTROL_REG32(0x0C8) | ||
323 | #define CONTROL_PADCONF_MCBSP1_DX CONTROL_REG32(0x10C) | ||
324 | #define CONTROL_PADCONF_GPMC_NCS4 CONTROL_REG32(0x090) | ||
325 | #define CONTROL_PADCONF_DSS_D5 CONTROL_REG32(0x0B8) | ||
326 | #define CONTROL_PADCONF_DSS_D9 CONTROL_REG32(0x0BC) | ||
327 | #define CONTROL_PADCONF_DSS_D13 CONTROL_REG32(0x0C0) | ||
328 | #define CONTROL_PADCONF_DSS_VSYNC CONTROL_REG32(0x0CC) | ||
329 | |||
330 | /* CONTROL */ | ||
331 | #define CONTROL_DEVCONF CONTROL_REG32(0x274) | ||
332 | |||
333 | /* INTERRUPT CONTROLLER */ | ||
334 | #define INTC_BASE (OMAP24XX_L4_IO_BASE+0xfe000) | ||
335 | #define INTC_REG32(offset) __REG32(INTC_BASE + (offset)) | ||
336 | |||
337 | #define INTC1_U_BASE INTC_REG32(0x000) | ||
338 | #define INTC_MIR0 INTC_REG32(0x084) | ||
339 | #define INTC_MIR_SET0 INTC_REG32(0x08C) | ||
340 | #define INTC_MIR_CLEAR0 INTC_REG32(0x088) | ||
341 | #define INTC_ISR_CLEAR0 INTC_REG32(0x094) | ||
342 | #define INTC_MIR1 INTC_REG32(0x0A4) | ||
343 | #define INTC_MIR_SET1 INTC_REG32(0x0AC) | ||
344 | #define INTC_MIR_CLEAR1 INTC_REG32(0x0A8) | ||
345 | #define INTC_ISR_CLEAR1 INTC_REG32(0x0B4) | ||
346 | #define INTC_MIR2 INTC_REG32(0x0C4) | ||
347 | #define INTC_MIR_SET2 INTC_REG32(0x0CC) | ||
348 | #define INTC_MIR_CLEAR2 INTC_REG32(0x0C8) | ||
349 | #define INTC_ISR_CLEAR2 INTC_REG32(0x0D4) | ||
350 | #define INTC_SIR_IRQ INTC_REG32(0x040) | ||
351 | #define INTC_CONTROL INTC_REG32(0x048) | ||
352 | #define INTC_ILR11 INTC_REG32(0x12C) | ||
353 | #define INTC_ILR32 INTC_REG32(0x180) | ||
354 | #define INTC_ILR37 INTC_REG32(0x194) | ||
355 | #define INTC_SYSCONFIG INTC_REG32(0x010) | ||
356 | |||
357 | /* RAM FIREWALL */ | ||
358 | #define RAMFW_BASE (0x68005000) | ||
359 | #define RAMFW_REG32(offset) __REG32(RAMFW_BASE + (offset)) | ||
360 | |||
361 | #define RAMFW_REQINFOPERM0 RAMFW_REG32(0x048) | ||
362 | #define RAMFW_READPERM0 RAMFW_REG32(0x050) | ||
363 | #define RAMFW_WRITEPERM0 RAMFW_REG32(0x058) | ||
364 | |||
365 | /* GPMC CS1 FPGA ON USER INTERFACE MODULE */ | ||
366 | //#define DEBUG_BOARD_LED_REGISTER 0x04000014 | ||
367 | |||
368 | /* GPMC CS0 */ | ||
369 | #define GPMC_CONFIG1_0 GPMC_REG32(0x060) | ||
370 | #define GPMC_CONFIG2_0 GPMC_REG32(0x064) | ||
371 | #define GPMC_CONFIG3_0 GPMC_REG32(0x068) | ||
372 | #define GPMC_CONFIG4_0 GPMC_REG32(0x06C) | ||
373 | #define GPMC_CONFIG5_0 GPMC_REG32(0x070) | ||
374 | #define GPMC_CONFIG6_0 GPMC_REG32(0x074) | ||
375 | #define GPMC_CONFIG7_0 GPMC_REG32(0x078) | ||
376 | |||
377 | /* GPMC CS1 */ | ||
378 | #define GPMC_CONFIG1_1 GPMC_REG32(0x090) | ||
379 | #define GPMC_CONFIG2_1 GPMC_REG32(0x094) | ||
380 | #define GPMC_CONFIG3_1 GPMC_REG32(0x098) | ||
381 | #define GPMC_CONFIG4_1 GPMC_REG32(0x09C) | ||
382 | #define GPMC_CONFIG5_1 GPMC_REG32(0x0a0) | ||
383 | #define GPMC_CONFIG6_1 GPMC_REG32(0x0a4) | ||
384 | #define GPMC_CONFIG7_1 GPMC_REG32(0x0a8) | ||
385 | |||
386 | /* DSS */ | ||
387 | #define DSS_CONTROL DISP_REG32(0x040) | ||
388 | #define DISPC_CONTROL DISP_REG32(0x440) | ||
389 | #define DISPC_SYSSTATUS DISP_REG32(0x414) | ||
390 | #define DISPC_IRQSTATUS DISP_REG32(0x418) | ||
391 | #define DISPC_IRQENABLE DISP_REG32(0x41C) | ||
392 | #define DISPC_CONFIG DISP_REG32(0x444) | ||
393 | #define DISPC_DEFAULT_COLOR0 DISP_REG32(0x44C) | ||
394 | #define DISPC_DEFAULT_COLOR1 DISP_REG32(0x450) | ||
395 | #define DISPC_TRANS_COLOR0 DISP_REG32(0x454) | ||
396 | #define DISPC_TRANS_COLOR1 DISP_REG32(0x458) | ||
397 | #define DISPC_LINE_NUMBER DISP_REG32(0x460) | ||
398 | #define DISPC_TIMING_H DISP_REG32(0x464) | ||
399 | #define DISPC_TIMING_V DISP_REG32(0x468) | ||
400 | #define DISPC_POL_FREQ DISP_REG32(0x46C) | ||
401 | #define DISPC_DIVISOR DISP_REG32(0x470) | ||
402 | #define DISPC_SIZE_DIG DISP_REG32(0x478) | ||
403 | #define DISPC_SIZE_LCD DISP_REG32(0x47C) | ||
404 | #define DISPC_GFX_BA0 DISP_REG32(0x480) | ||
405 | #define DISPC_GFX_BA1 DISP_REG32(0x484) | ||
406 | #define DISPC_GFX_POSITION DISP_REG32(0x488) | ||
407 | #define DISPC_GFX_SIZE DISP_REG32(0x48C) | ||
408 | #define DISPC_GFX_ATTRIBUTES DISP_REG32(0x4A0) | ||
409 | #define DISPC_GFX_FIFO_THRESHOLD DISP_REG32(0x4A4) | ||
410 | #define DISPC_GFX_ROW_INC DISP_REG32(0x4AC) | ||
411 | #define DISPC_GFX_PIXEL_INC DISP_REG32(0x4B0) | ||
412 | #define DISPC_GFX_WINDOW_SKIP DISP_REG32(0x4B4) | ||
413 | #define DISPC_GFX_TABLE_BA DISP_REG32(0x4B8) | ||
414 | #define DISPC_DATA_CYCLE1 DISP_REG32(0x5D4) | ||
415 | #define DISPC_DATA_CYCLE2 DISP_REG32(0x5D8) | ||
416 | #define DISPC_DATA_CYCLE3 DISP_REG32(0x5DC) | ||
417 | |||
418 | /* Wake up define for board */ | ||
419 | #define GPIO97 (1 << 1) | ||
420 | #define GPIO88 (1 << 24) | ||
421 | |||
422 | #endif /* __ASSEMBLER__ */ | ||
423 | 27 | ||
424 | #endif | 28 | #endif |
425 | 29 | ||
diff --git a/include/asm-arm/arch-omap/sram.h b/include/asm-arm/arch-omap/sram.h index e72ccbf0fe06..6fc0dd57b7c3 100644 --- a/include/asm-arm/arch-omap/sram.h +++ b/include/asm-arm/arch-omap/sram.h | |||
@@ -20,6 +20,8 @@ extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | |||
20 | u32 mem_type); | 20 | u32 mem_type); |
21 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); | 21 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); |
22 | 22 | ||
23 | extern unsigned long omap_fb_sram_start; | ||
24 | extern unsigned long omap_fb_sram_size; | ||
23 | 25 | ||
24 | /* Do not use these */ | 26 | /* Do not use these */ |
25 | extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl); | 27 | extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl); |
diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h index 6724a81bd10b..67970d1a2020 100644 --- a/include/asm-arm/arch-omap/system.h +++ b/include/asm-arm/arch-omap/system.h | |||
@@ -9,12 +9,13 @@ | |||
9 | 9 | ||
10 | #include <asm/mach-types.h> | 10 | #include <asm/mach-types.h> |
11 | #include <asm/hardware.h> | 11 | #include <asm/hardware.h> |
12 | #include <asm/arch/prcm.h> | ||
13 | 12 | ||
14 | #ifndef CONFIG_MACH_VOICEBLUE | 13 | #ifndef CONFIG_MACH_VOICEBLUE |
15 | #define voiceblue_reset() do {} while (0) | 14 | #define voiceblue_reset() do {} while (0) |
16 | #endif | 15 | #endif |
17 | 16 | ||
17 | extern void omap_prcm_arch_reset(char mode); | ||
18 | |||
18 | static inline void arch_idle(void) | 19 | static inline void arch_idle(void) |
19 | { | 20 | { |
20 | cpu_do_idle(); | 21 | cpu_do_idle(); |
@@ -38,24 +39,12 @@ static inline void omap1_arch_reset(char mode) | |||
38 | omap_writew(1, ARM_RSTCT1); | 39 | omap_writew(1, ARM_RSTCT1); |
39 | } | 40 | } |
40 | 41 | ||
41 | static inline void omap2_arch_reset(char mode) | ||
42 | { | ||
43 | u32 rate; | ||
44 | struct clk *vclk, *sclk; | ||
45 | |||
46 | vclk = clk_get(NULL, "virt_prcm_set"); | ||
47 | sclk = clk_get(NULL, "sys_ck"); | ||
48 | rate = clk_get_rate(sclk); | ||
49 | clk_set_rate(vclk, rate); /* go to bypass for OMAP limitation */ | ||
50 | RM_RSTCTRL_WKUP |= 2; | ||
51 | } | ||
52 | |||
53 | static inline void arch_reset(char mode) | 42 | static inline void arch_reset(char mode) |
54 | { | 43 | { |
55 | if (!cpu_is_omap24xx()) | 44 | if (!cpu_is_omap24xx()) |
56 | omap1_arch_reset(mode); | 45 | omap1_arch_reset(mode); |
57 | else | 46 | else |
58 | omap2_arch_reset(mode); | 47 | omap_prcm_arch_reset(mode); |
59 | } | 48 | } |
60 | 49 | ||
61 | #endif | 50 | #endif |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 1409c5bd703f..c8f53a71c076 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -485,7 +485,7 @@ | |||
485 | #define SACR1_ENLBF (1 << 5) /* Enable Loopback */ | 485 | #define SACR1_ENLBF (1 << 5) /* Enable Loopback */ |
486 | #define SACR1_DRPL (1 << 4) /* Disable Replaying Function */ | 486 | #define SACR1_DRPL (1 << 4) /* Disable Replaying Function */ |
487 | #define SACR1_DREC (1 << 3) /* Disable Recording Function */ | 487 | #define SACR1_DREC (1 << 3) /* Disable Recording Function */ |
488 | #define SACR1_AMSL (1 << 1) /* Specify Alternate Mode */ | 488 | #define SACR1_AMSL (1 << 0) /* Specify Alternate Mode */ |
489 | 489 | ||
490 | #define SASR0_I2SOFF (1 << 7) /* Controller Status */ | 490 | #define SASR0_I2SOFF (1 << 7) /* Controller Status */ |
491 | #define SASR0_ROR (1 << 6) /* Rx FIFO Overrun */ | 491 | #define SASR0_ROR (1 << 6) /* Rx FIFO Overrun */ |
diff --git a/include/asm-arm/arch-pxa/sharpsl.h b/include/asm-arm/arch-pxa/sharpsl.h index 0b43495d24b4..94cb4982af82 100644 --- a/include/asm-arm/arch-pxa/sharpsl.h +++ b/include/asm-arm/arch-pxa/sharpsl.h | |||
@@ -27,6 +27,8 @@ struct corgits_machinfo { | |||
27 | */ | 27 | */ |
28 | struct corgibl_machinfo { | 28 | struct corgibl_machinfo { |
29 | int max_intensity; | 29 | int max_intensity; |
30 | int default_intensity; | ||
31 | int limit_mask; | ||
30 | void (*set_bl_intensity)(int intensity); | 32 | void (*set_bl_intensity)(int intensity); |
31 | }; | 33 | }; |
32 | extern void corgibl_limit_intensity(int limit); | 34 | extern void corgibl_limit_intensity(int limit); |
diff --git a/include/asm-arm/arch-rpc/hardware.h b/include/asm-arm/arch-rpc/hardware.h index 9d7f87375aa7..7480f4e8d974 100644 --- a/include/asm-arm/arch-rpc/hardware.h +++ b/include/asm-arm/arch-rpc/hardware.h | |||
@@ -46,7 +46,6 @@ | |||
46 | #define SCREEN_END 0xdfc00000 | 46 | #define SCREEN_END 0xdfc00000 |
47 | #define SCREEN_BASE 0xdf800000 | 47 | #define SCREEN_BASE 0xdf800000 |
48 | 48 | ||
49 | #define FLUSH_BASE 0xdf000000 | ||
50 | #define UNCACHEABLE_ADDR 0xdf010000 | 49 | #define UNCACHEABLE_ADDR 0xdf010000 |
51 | 50 | ||
52 | /* | 51 | /* |
@@ -59,8 +58,6 @@ | |||
59 | #define PCIO_BASE IOMEM(0xe0010000) | 58 | #define PCIO_BASE IOMEM(0xe0010000) |
60 | #define FLOPPYDMA_BASE IOMEM(0xe002a000) | 59 | #define FLOPPYDMA_BASE IOMEM(0xe002a000) |
61 | 60 | ||
62 | #define FLUSH_BASE_PHYS 0x00000000 /* ROM */ | ||
63 | |||
64 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) | 61 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) |
65 | 62 | ||
66 | #define IO_EC_EASI_BASE 0x81400000 | 63 | #define IO_EC_EASI_BASE 0x81400000 |
diff --git a/include/asm-arm/arch-rpc/memory.h b/include/asm-arm/arch-rpc/memory.h index 0592cb3f0c74..303c424ce673 100644 --- a/include/asm-arm/arch-rpc/memory.h +++ b/include/asm-arm/arch-rpc/memory.h | |||
@@ -30,4 +30,10 @@ | |||
30 | #define __virt_to_bus(x) __virt_to_phys(x) | 30 | #define __virt_to_bus(x) __virt_to_phys(x) |
31 | #define __bus_to_virt(x) __phys_to_virt(x) | 31 | #define __bus_to_virt(x) __phys_to_virt(x) |
32 | 32 | ||
33 | /* | ||
34 | * Cache flushing area - ROM | ||
35 | */ | ||
36 | #define FLUSH_BASE_PHYS 0x00000000 | ||
37 | #define FLUSH_BASE 0xdf000000 | ||
38 | |||
33 | #endif | 39 | #endif |
diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S index cc06b1bd37b2..894c35cf3b1e 100644 --- a/include/asm-arm/arch-s3c2410/entry-macro.S +++ b/include/asm-arm/arch-s3c2410/entry-macro.S | |||
@@ -6,116 +6,83 @@ | |||
6 | * This file is licensed under the terms of the GNU General Public | 6 | * This file is licensed under the terms of the GNU General Public |
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | ||
10 | |||
11 | /* We have a problem that the INTOFFSET register does not always | ||
12 | * show one interrupt. Occasionally we get two interrupts through | ||
13 | * the prioritiser, and this causes the INTOFFSET register to show | ||
14 | * what looks like the logical-or of the two interrupt numbers. | ||
15 | * | ||
16 | * Thanks to Klaus, Shannon, et al for helping to debug this problem | ||
17 | */ | ||
18 | |||
19 | #define INTPND (0x10) | ||
20 | #define INTOFFSET (0x14) | ||
21 | #define EXTINTPEND (0xa8) | ||
22 | #define EXTINTMASK (0xa4) | ||
9 | 23 | ||
10 | * Modifications: | ||
11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
12 | */ | ||
13 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
14 | #include <asm/arch/irqs.h> | 25 | #include <asm/arch/irqs.h> |
15 | 26 | ||
16 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
18 | 28 | ||
19 | mov \tmp, #S3C24XX_VA_IRQ | 29 | mov \base, #S3C24XX_VA_IRQ |
20 | ldr \irqnr, [ \tmp, #0x14 ] @ get irq no | 30 | |
21 | 30000: | 31 | ldr \irqstat, [ \base, #INTPND] |
22 | teq \irqnr, #4 | 32 | bics \irqnr, \irqstat, #3<<4 @@ only an GPIO IRQ |
23 | teqne \irqnr, #5 | 33 | beq 2000f |
24 | beq 1002f @ external irq reg | 34 | |
25 | 35 | @@ try the interrupt offset register, since it is there | |
26 | @ debug check to see if interrupt reported is the same | 36 | |
27 | @ as the offset.... | 37 | ldr \irqnr, [ \base, #INTOFFSET ] |
28 | 38 | mov \tmp, #1 | |
29 | teq \irqnr, #0 | 39 | tst \irqstat, \tmp, lsl \irqnr |
30 | beq 20002f | 40 | addne \irqnr, \irqnr, #IRQ_EINT0 |
31 | ldr \irqstat, [ \tmp, #0x10 ] @ INTPND | 41 | bne 1001f |
32 | mov \irqstat, \irqstat, lsr \irqnr | 42 | |
33 | tst \irqstat, #1 | 43 | @@ the number specified is not a valid irq, so try |
34 | bne 20002f | 44 | @@ and work it out for ourselves |
35 | 45 | ||
36 | /* debug/warning if we get an invalud response from the | 46 | mov \irqnr, #IRQ_EINT0 @@ start here |
37 | * INTOFFSET register */ | 47 | b 3000f |
38 | #if 1 | 48 | |
39 | stmfd r13!, { r0 - r4 , r8-r12, r14 } | 49 | 2000: |
40 | ldr r1, [ \tmp, #0x14 ] @ INTOFFSET | 50 | @@ load the GPIO interrupt register, and check it |
41 | ldr r2, [ \tmp, #0x10 ] @ INTPND | 51 | |
42 | ldr r3, [ \tmp, #0x00 ] @ SRCPND | 52 | add \tmp, \base, #S3C24XX_VA_GPIO - S3C24XX_VA_IRQ |
43 | adr r0, 20003f | 53 | ldr \irqstat, [ \tmp, # EXTINTPEND ] |
44 | bl printk | 54 | ldr \irqnr, [ \tmp, # EXTINTMASK ] |
45 | b 20004f | 55 | bics \irqstat, \irqstat, \irqnr |
46 | 56 | beq 1001f | |
47 | 20003: | 57 | |
48 | .ascii "<7>irq: err - bad offset %d, intpnd=%08x, srcpnd=%08x\n" | 58 | mov \irqnr, #(IRQ_EINT4 - 4) |
49 | .byte 0 | 59 | |
50 | .align 4 | 60 | @@ work out which irq (if any) we got |
51 | 20004: | 61 | 3000: |
52 | mov r1, #1 | 62 | movs \tmp, \irqstat, lsl#16 |
53 | mov \tmp, #S3C24XX_VA_IRQ | 63 | addeq \irqnr, \irqnr, #16 |
54 | ldmfd r13!, { r0 - r4 , r8-r12, r14 } | 64 | moveq \irqstat, \irqstat, lsr#16 |
55 | #endif | 65 | tst \irqstat, #0xff |
56 | 66 | addeq \irqnr, \irqnr, #8 | |
57 | @ try working out interrupt number for ourselves | 67 | moveq \irqstat, \irqstat, lsr#8 |
58 | mov \irqnr, #0 | 68 | tst \irqstat, #0xf |
59 | ldr \irqstat, [ \tmp, #0x10 ] @ INTPND | 69 | addeq \irqnr, \irqnr, #4 |
60 | 10021: | 70 | moveq \irqstat, \irqstat, lsr#4 |
61 | movs \irqstat, \irqstat, lsr#1 | 71 | tst \irqstat, #0x3 |
62 | bcs 30000b @ try and re-start the proccess | 72 | addeq \irqnr, \irqnr, #2 |
63 | add \irqnr, \irqnr, #1 | 73 | moveq \irqstat, \irqstat, lsr#2 |
64 | cmp \irqnr, #32 | 74 | tst \irqstat, #0x1 |
65 | ble 10021b | 75 | addeq \irqnr, \irqnr, #1 |
66 | 76 | ||
67 | @ found no interrupt, set Z flag and leave | 77 | @@ we have the value |
68 | movs \irqnr, #0 | 78 | movs \irqnr, \irqnr |
69 | b 1001f | 79 | |
70 | |||
71 | 20005: | ||
72 | 20002: @ exit | ||
73 | @ we base the s3c2410x interrupts at 16 and above to allow | ||
74 | @ isa peripherals to have their standard interrupts, also | ||
75 | @ ensure that Z flag is un-set on exit | ||
76 | |||
77 | @ note, we cannot be sure if we get IRQ_EINT0 (0) that | ||
78 | @ there is simply no interrupt pending, so in all other | ||
79 | @ cases we jump to say we have found something, otherwise | ||
80 | @ we check to see if the interrupt really is assrted | ||
81 | adds \irqnr, \irqnr, #IRQ_EINT0 | ||
82 | teq \irqnr, #IRQ_EINT0 | ||
83 | bne 1001f @ exit | ||
84 | ldr \irqstat, [ \tmp, #0x10 ] @ INTPND | ||
85 | teq \irqstat, #0 | ||
86 | moveq \irqnr, #0 | ||
87 | b 1001f | ||
88 | |||
89 | @ we get here from no main or external interrupts pending | ||
90 | 1002: | ||
91 | add \tmp, \tmp, #S3C24XX_VA_GPIO - S3C24XX_VA_IRQ | ||
92 | ldr \irqstat, [ \tmp, # 0xa8 ] @ EXTINTPEND | ||
93 | ldr \irqnr, [ \tmp, # 0xa4 ] @ EXTINTMASK | ||
94 | |||
95 | bic \irqstat, \irqstat, \irqnr @ clear masked irqs | ||
96 | |||
97 | mov \irqnr, #IRQ_EINT4 @ start extint nos | ||
98 | mov \irqstat, \irqstat, lsr#4 @ ignore bottom 4 bits | ||
99 | 10021: | ||
100 | movs \irqstat, \irqstat, lsr#1 | ||
101 | bcs 1004f | ||
102 | add \irqnr, \irqnr, #1 | ||
103 | cmp \irqnr, #IRQ_EINT23 | ||
104 | ble 10021b | ||
105 | |||
106 | @ found no interrupt, set Z flag and leave | ||
107 | movs \irqnr, #0 | ||
108 | |||
109 | 1004: @ ensure Z flag clear in case our MOVS shifted out the last bit | ||
110 | teq \irqnr, #0 | ||
111 | 1001: | 80 | 1001: |
112 | @ exit irq routine | 81 | @@ exit here, Z flag unset if IRQ |
113 | .endm | ||
114 | 82 | ||
83 | .endm | ||
115 | 84 | ||
116 | /* currently don't need an disable_fiq macro */ | 85 | /* currently don't need an disable_fiq macro */ |
117 | 86 | ||
118 | .macro disable_fiq | 87 | .macro disable_fiq |
119 | .endm | 88 | .endm |
120 | |||
121 | |||
diff --git a/include/asm-arm/arch-s3c2410/leds-gpio.h b/include/asm-arm/arch-s3c2410/leds-gpio.h new file mode 100644 index 000000000000..f07ed040622b --- /dev/null +++ b/include/asm-arm/arch-s3c2410/leds-gpio.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/leds-gpio.h | ||
2 | * | ||
3 | * (c) 2006 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C24XX - LEDs GPIO connector | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_LEDSGPIO_H | ||
15 | #define __ASM_ARCH_LEDSGPIO_H "leds-gpio.h" | ||
16 | |||
17 | #define S3C24XX_LEDF_ACTLOW (1<<0) /* LED is on when GPIO low */ | ||
18 | #define S3C24XX_LEDF_TRISTATE (1<<1) /* tristate to turn off */ | ||
19 | |||
20 | struct s3c24xx_led_platdata { | ||
21 | unsigned int gpio; | ||
22 | unsigned int flags; | ||
23 | |||
24 | char *name; | ||
25 | char *def_trigger; | ||
26 | }; | ||
27 | |||
28 | #endif /* __ASM_ARCH_LEDSGPIO_H */ | ||
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h index 28711aaa4968..ee008a5484f3 100644 --- a/include/asm-arm/arch-sa1100/hardware.h +++ b/include/asm-arm/arch-sa1100/hardware.h | |||
@@ -14,10 +14,6 @@ | |||
14 | 14 | ||
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | 16 | ||
17 | /* Flushing areas */ | ||
18 | #define FLUSH_BASE_PHYS 0xe0000000 /* SA1100 zero bank */ | ||
19 | #define FLUSH_BASE 0xf5000000 | ||
20 | #define FLUSH_BASE_MINICACHE 0xf5800000 | ||
21 | #define UNCACHEABLE_ADDR 0xfa050000 | 17 | #define UNCACHEABLE_ADDR 0xfa050000 |
22 | 18 | ||
23 | 19 | ||
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h index 018a9f0e3986..a29fac1387ca 100644 --- a/include/asm-arm/arch-sa1100/memory.h +++ b/include/asm-arm/arch-sa1100/memory.h | |||
@@ -91,4 +91,11 @@ void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes); | |||
91 | 91 | ||
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | /* | ||
95 | * Cache flushing area - SA1100 zero bank | ||
96 | */ | ||
97 | #define FLUSH_BASE_PHYS 0xe0000000 | ||
98 | #define FLUSH_BASE 0xf5000000 | ||
99 | #define FLUSH_BASE_MINICACHE 0xf5100000 | ||
100 | |||
94 | #endif | 101 | #endif |
diff --git a/include/asm-arm/arch-shark/hardware.h b/include/asm-arm/arch-shark/hardware.h index 4d35f8c154c3..ecba45260898 100644 --- a/include/asm-arm/arch-shark/hardware.h +++ b/include/asm-arm/arch-shark/hardware.h | |||
@@ -17,11 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | #define IO_BASE 0xe0000000 | 18 | #define IO_BASE 0xe0000000 |
19 | 19 | ||
20 | /* | ||
21 | * RAM definitions | ||
22 | */ | ||
23 | #define FLUSH_BASE_PHYS 0x80000000 | ||
24 | |||
25 | #else | 20 | #else |
26 | 21 | ||
27 | #define IO_BASE 0 | 22 | #define IO_BASE 0 |
@@ -33,7 +28,6 @@ | |||
33 | #define ROMCARD_SIZE 0x08000000 | 28 | #define ROMCARD_SIZE 0x08000000 |
34 | #define ROMCARD_START 0x10000000 | 29 | #define ROMCARD_START 0x10000000 |
35 | 30 | ||
36 | #define FLUSH_BASE 0xdf000000 | ||
37 | #define PCIO_BASE 0xe0000000 | 31 | #define PCIO_BASE 0xe0000000 |
38 | 32 | ||
39 | 33 | ||
diff --git a/include/asm-arm/arch-shark/memory.h b/include/asm-arm/arch-shark/memory.h index 95a29b4bc5d0..6968d6103ea0 100644 --- a/include/asm-arm/arch-shark/memory.h +++ b/include/asm-arm/arch-shark/memory.h | |||
@@ -39,4 +39,10 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig | |||
39 | #define __virt_to_bus(x) __virt_to_phys(x) | 39 | #define __virt_to_bus(x) __virt_to_phys(x) |
40 | #define __bus_to_virt(x) __phys_to_virt(x) | 40 | #define __bus_to_virt(x) __phys_to_virt(x) |
41 | 41 | ||
42 | /* | ||
43 | * Cache flushing area | ||
44 | */ | ||
45 | #define FLUSH_BASE_PHYS 0x80000000 | ||
46 | #define FLUSH_BASE 0xdf000000 | ||
47 | |||
42 | #endif | 48 | #endif |
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h index e3e8541ee63b..63ca7412a462 100644 --- a/include/asm-arm/dma-mapping.h +++ b/include/asm-arm/dma-mapping.h | |||
@@ -47,7 +47,7 @@ static inline int dma_get_cache_alignment(void) | |||
47 | 47 | ||
48 | static inline int dma_is_consistent(dma_addr_t handle) | 48 | static inline int dma_is_consistent(dma_addr_t handle) |
49 | { | 49 | { |
50 | return 0; | 50 | return !!arch_is_coherent(); |
51 | } | 51 | } |
52 | 52 | ||
53 | /* | 53 | /* |
@@ -145,7 +145,9 @@ static inline dma_addr_t | |||
145 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | 145 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, |
146 | enum dma_data_direction dir) | 146 | enum dma_data_direction dir) |
147 | { | 147 | { |
148 | consistent_sync(cpu_addr, size, dir); | 148 | if (!arch_is_coherent()) |
149 | consistent_sync(cpu_addr, size, dir); | ||
150 | |||
149 | return virt_to_dma(dev, (unsigned long)cpu_addr); | 151 | return virt_to_dma(dev, (unsigned long)cpu_addr); |
150 | } | 152 | } |
151 | #else | 153 | #else |
@@ -255,7 +257,9 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
255 | 257 | ||
256 | sg->dma_address = page_to_dma(dev, sg->page) + sg->offset; | 258 | sg->dma_address = page_to_dma(dev, sg->page) + sg->offset; |
257 | virt = page_address(sg->page) + sg->offset; | 259 | virt = page_address(sg->page) + sg->offset; |
258 | consistent_sync(virt, sg->length, dir); | 260 | |
261 | if (!arch_is_coherent()) | ||
262 | consistent_sync(virt, sg->length, dir); | ||
259 | } | 263 | } |
260 | 264 | ||
261 | return nents; | 265 | return nents; |
@@ -310,14 +314,16 @@ static inline void | |||
310 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, | 314 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, |
311 | enum dma_data_direction dir) | 315 | enum dma_data_direction dir) |
312 | { | 316 | { |
313 | consistent_sync((void *)dma_to_virt(dev, handle), size, dir); | 317 | if (!arch_is_coherent()) |
318 | consistent_sync((void *)dma_to_virt(dev, handle), size, dir); | ||
314 | } | 319 | } |
315 | 320 | ||
316 | static inline void | 321 | static inline void |
317 | dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, | 322 | dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, |
318 | enum dma_data_direction dir) | 323 | enum dma_data_direction dir) |
319 | { | 324 | { |
320 | consistent_sync((void *)dma_to_virt(dev, handle), size, dir); | 325 | if (!arch_is_coherent()) |
326 | consistent_sync((void *)dma_to_virt(dev, handle), size, dir); | ||
321 | } | 327 | } |
322 | #else | 328 | #else |
323 | extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction); | 329 | extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction); |
@@ -347,7 +353,8 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, | |||
347 | 353 | ||
348 | for (i = 0; i < nents; i++, sg++) { | 354 | for (i = 0; i < nents; i++, sg++) { |
349 | char *virt = page_address(sg->page) + sg->offset; | 355 | char *virt = page_address(sg->page) + sg->offset; |
350 | consistent_sync(virt, sg->length, dir); | 356 | if (!arch_is_coherent()) |
357 | consistent_sync(virt, sg->length, dir); | ||
351 | } | 358 | } |
352 | } | 359 | } |
353 | 360 | ||
@@ -359,7 +366,8 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, | |||
359 | 366 | ||
360 | for (i = 0; i < nents; i++, sg++) { | 367 | for (i = 0; i < nents; i++, sg++) { |
361 | char *virt = page_address(sg->page) + sg->offset; | 368 | char *virt = page_address(sg->page) + sg->offset; |
362 | consistent_sync(virt, sg->length, dir); | 369 | if (!arch_is_coherent()) |
370 | consistent_sync(virt, sg->length, dir); | ||
363 | } | 371 | } |
364 | } | 372 | } |
365 | #else | 373 | #else |
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index 6246bf83627d..52bae088a185 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h | |||
@@ -26,7 +26,9 @@ | |||
26 | 26 | ||
27 | struct vfp_hard_struct { | 27 | struct vfp_hard_struct { |
28 | __u64 fpregs[16]; | 28 | __u64 fpregs[16]; |
29 | #if __LINUX_ARM_ARCH__ < 6 | ||
29 | __u32 fpmx_state; | 30 | __u32 fpmx_state; |
31 | #endif | ||
30 | __u32 fpexc; | 32 | __u32 fpexc; |
31 | __u32 fpscr; | 33 | __u32 fpscr; |
32 | /* | 34 | /* |
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index afa5c3ea077c..209289407595 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -172,10 +172,10 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
172 | * virt_addr_valid(k) indicates whether a virtual address is valid | 172 | * virt_addr_valid(k) indicates whether a virtual address is valid |
173 | */ | 173 | */ |
174 | #ifndef CONFIG_DISCONTIGMEM | 174 | #ifndef CONFIG_DISCONTIGMEM |
175 | #define ARCH_PFN_OFFSET (PHYS_PFN_OFFSET) | 175 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET |
176 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) | 176 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) |
177 | 177 | ||
178 | #define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)) | 178 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
179 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) | 179 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) |
180 | 180 | ||
181 | #define PHYS_TO_NID(addr) (0) | 181 | #define PHYS_TO_NID(addr) (0) |
@@ -187,8 +187,8 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
187 | * around in memory. | 187 | * around in memory. |
188 | */ | 188 | */ |
189 | #include <linux/numa.h> | 189 | #include <linux/numa.h> |
190 | #define arch_pfn_to_nid(pfn) (PFN_TO_NID(pfn)) | 190 | #define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn) |
191 | #define arch_local_page_offset(pfn, nid) (LOCAL_MAP_NR((pfn) << PAGE_OFFSET)) | 191 | #define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT) |
192 | 192 | ||
193 | #define pfn_valid(pfn) \ | 193 | #define pfn_valid(pfn) \ |
194 | ({ \ | 194 | ({ \ |
@@ -234,6 +234,14 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
234 | #define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr)) | 234 | #define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr)) |
235 | #endif | 235 | #endif |
236 | 236 | ||
237 | /* | ||
238 | * Optional coherency support. Currently used only by selected | ||
239 | * Intel XSC3-based systems. | ||
240 | */ | ||
241 | #ifndef arch_is_coherent | ||
242 | #define arch_is_coherent() 0 | ||
243 | #endif | ||
244 | |||
237 | #endif | 245 | #endif |
238 | 246 | ||
239 | #include <asm-generic/memory_model.h> | 247 | #include <asm-generic/memory_model.h> |
diff --git a/include/asm-arm/numnodes.h b/include/asm-arm/numnodes.h deleted file mode 100644 index 8df36818ebc9..000000000000 --- a/include/asm-arm/numnodes.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/numnodes.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | /* This declaration for the size of the NUMA (CONFIG_DISCONTIGMEM) | ||
12 | * memory node table is the default. | ||
13 | * | ||
14 | * A good place to override this value is include/asm/arch/memory.h. | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARM_NUMNODES_H | ||
18 | #define __ASM_ARM_NUMNODES_H | ||
19 | |||
20 | #include <asm/memory.h> | ||
21 | |||
22 | #ifndef NODES_SHIFT | ||
23 | # define NODES_SHIFT 2 /* Normally, Max 4 Nodes */ | ||
24 | #endif | ||
25 | |||
26 | #endif | ||
diff --git a/include/asm-arm/pgtable-hwdef.h b/include/asm-arm/pgtable-hwdef.h index 1d033495cc75..1bc1f997bda2 100644 --- a/include/asm-arm/pgtable-hwdef.h +++ b/include/asm-arm/pgtable-hwdef.h | |||
@@ -73,6 +73,7 @@ | |||
73 | #define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0) | 73 | #define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0) |
74 | #define PTE_EXT_TEX(x) ((x) << 6) /* v5 */ | 74 | #define PTE_EXT_TEX(x) ((x) << 6) /* v5 */ |
75 | #define PTE_EXT_APX (1 << 9) /* v6 */ | 75 | #define PTE_EXT_APX (1 << 9) /* v6 */ |
76 | #define PTE_EXT_COHERENT (1 << 9) /* XScale3 */ | ||
76 | #define PTE_EXT_SHARED (1 << 10) /* v6 */ | 77 | #define PTE_EXT_SHARED (1 << 10) /* v6 */ |
77 | #define PTE_EXT_NG (1 << 11) /* v6 */ | 78 | #define PTE_EXT_NG (1 << 11) /* v6 */ |
78 | 79 | ||
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index e595ae24efe2..e85c08d78dda 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -156,6 +156,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
156 | #define L_PTE_WRITE (1 << 5) | 156 | #define L_PTE_WRITE (1 << 5) |
157 | #define L_PTE_EXEC (1 << 6) | 157 | #define L_PTE_EXEC (1 << 6) |
158 | #define L_PTE_DIRTY (1 << 7) | 158 | #define L_PTE_DIRTY (1 << 7) |
159 | #define L_PTE_COHERENT (1 << 9) /* I/O coherent (xsc3) */ | ||
159 | #define L_PTE_SHARED (1 << 10) /* shared between CPUs (v6) */ | 160 | #define L_PTE_SHARED (1 << 10) /* shared between CPUs (v6) */ |
160 | #define L_PTE_ASID (1 << 11) /* non-global (use ASID, v6) */ | 161 | #define L_PTE_ASID (1 << 11) /* non-global (use ASID, v6) */ |
161 | 162 | ||
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 8f331bbd39a8..65ac305c2d45 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -308,8 +308,6 @@ | |||
308 | #define __NR_mq_notify (__NR_SYSCALL_BASE+278) | 308 | #define __NR_mq_notify (__NR_SYSCALL_BASE+278) |
309 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) | 309 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) |
310 | #define __NR_waitid (__NR_SYSCALL_BASE+280) | 310 | #define __NR_waitid (__NR_SYSCALL_BASE+280) |
311 | |||
312 | #if defined(__ARM_EABI__) /* reserve these for un-muxing socketcall */ | ||
313 | #define __NR_socket (__NR_SYSCALL_BASE+281) | 311 | #define __NR_socket (__NR_SYSCALL_BASE+281) |
314 | #define __NR_bind (__NR_SYSCALL_BASE+282) | 312 | #define __NR_bind (__NR_SYSCALL_BASE+282) |
315 | #define __NR_connect (__NR_SYSCALL_BASE+283) | 313 | #define __NR_connect (__NR_SYSCALL_BASE+283) |
@@ -327,9 +325,6 @@ | |||
327 | #define __NR_getsockopt (__NR_SYSCALL_BASE+295) | 325 | #define __NR_getsockopt (__NR_SYSCALL_BASE+295) |
328 | #define __NR_sendmsg (__NR_SYSCALL_BASE+296) | 326 | #define __NR_sendmsg (__NR_SYSCALL_BASE+296) |
329 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) | 327 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) |
330 | #endif | ||
331 | |||
332 | #if defined(__ARM_EABI__) /* reserve these for un-muxing ipc */ | ||
333 | #define __NR_semop (__NR_SYSCALL_BASE+298) | 328 | #define __NR_semop (__NR_SYSCALL_BASE+298) |
334 | #define __NR_semget (__NR_SYSCALL_BASE+299) | 329 | #define __NR_semget (__NR_SYSCALL_BASE+299) |
335 | #define __NR_semctl (__NR_SYSCALL_BASE+300) | 330 | #define __NR_semctl (__NR_SYSCALL_BASE+300) |
@@ -341,16 +336,10 @@ | |||
341 | #define __NR_shmdt (__NR_SYSCALL_BASE+306) | 336 | #define __NR_shmdt (__NR_SYSCALL_BASE+306) |
342 | #define __NR_shmget (__NR_SYSCALL_BASE+307) | 337 | #define __NR_shmget (__NR_SYSCALL_BASE+307) |
343 | #define __NR_shmctl (__NR_SYSCALL_BASE+308) | 338 | #define __NR_shmctl (__NR_SYSCALL_BASE+308) |
344 | #endif | ||
345 | |||
346 | #define __NR_add_key (__NR_SYSCALL_BASE+309) | 339 | #define __NR_add_key (__NR_SYSCALL_BASE+309) |
347 | #define __NR_request_key (__NR_SYSCALL_BASE+310) | 340 | #define __NR_request_key (__NR_SYSCALL_BASE+310) |
348 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) | 341 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) |
349 | |||
350 | #if defined(__ARM_EABI__) /* reserved for un-muxing ipc */ | ||
351 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) | 342 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) |
352 | #endif | ||
353 | |||
354 | #define __NR_vserver (__NR_SYSCALL_BASE+313) | 343 | #define __NR_vserver (__NR_SYSCALL_BASE+313) |
355 | #define __NR_ioprio_set (__NR_SYSCALL_BASE+314) | 344 | #define __NR_ioprio_set (__NR_SYSCALL_BASE+314) |
356 | #define __NR_ioprio_get (__NR_SYSCALL_BASE+315) | 345 | #define __NR_ioprio_get (__NR_SYSCALL_BASE+315) |
diff --git a/include/asm-arm/vfpmacros.h b/include/asm-arm/vfpmacros.h index 15bd6e74c9cf..27fe028b4e72 100644 --- a/include/asm-arm/vfpmacros.h +++ b/include/asm-arm/vfpmacros.h | |||
@@ -16,10 +16,18 @@ | |||
16 | 16 | ||
17 | @ read all the working registers back into the VFP | 17 | @ read all the working registers back into the VFP |
18 | .macro VFPFLDMIA, base | 18 | .macro VFPFLDMIA, base |
19 | #if __LINUX_ARM_ARCH__ < 6 | ||
19 | LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15} | 20 | LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15} |
21 | #else | ||
22 | LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15} | ||
23 | #endif | ||
20 | .endm | 24 | .endm |
21 | 25 | ||
22 | @ write all the working registers out of the VFP | 26 | @ write all the working registers out of the VFP |
23 | .macro VFPFSTMIA, base | 27 | .macro VFPFSTMIA, base |
28 | #if __LINUX_ARM_ARCH__ < 6 | ||
24 | STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} | 29 | STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} |
30 | #else | ||
31 | STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15} | ||
32 | #endif | ||
25 | .endm | 33 | .endm |
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index 1d63c2aa8ec2..b1c593b6dbff 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h | |||
@@ -8,7 +8,6 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int); | 10 | extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int); |
11 | #define prepare_to_switch() do { } while(0) | ||
12 | #define switch_to(prev,next,last) last = resume(prev,next, \ | 11 | #define switch_to(prev,next,last) last = resume(prev,next, \ |
13 | (int)&((struct task_struct *)0)->thread) | 12 | (int)&((struct task_struct *)0)->thread) |
14 | 13 | ||
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h index 2627bbdf8a11..bb2dfe480213 100644 --- a/include/asm-cris/unistd.h +++ b/include/asm-cris/unistd.h | |||
@@ -288,7 +288,7 @@ | |||
288 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 288 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
289 | #define __NR_mq_notify (__NR_mq_open+4) | 289 | #define __NR_mq_notify (__NR_mq_open+4) |
290 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 290 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
291 | #define __NR_sys_kexec_load 283 | 291 | #define __NR_kexec_load 283 |
292 | #define __NR_waitid 284 | 292 | #define __NR_waitid 284 |
293 | /* #define __NR_sys_setaltroot 285 */ | 293 | /* #define __NR_sys_setaltroot 285 */ |
294 | #define __NR_add_key 286 | 294 | #define __NR_add_key 286 |
diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index f72ff0c4dc0b..1734ed91bcdc 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h | |||
@@ -18,8 +18,6 @@ | |||
18 | 18 | ||
19 | struct thread_struct; | 19 | struct thread_struct; |
20 | 20 | ||
21 | #define prepare_to_switch() do { } while(0) | ||
22 | |||
23 | /* | 21 | /* |
24 | * switch_to(prev, next) should switch from task `prev' to `next' | 22 | * switch_to(prev, next) should switch from task `prev' to `next' |
25 | * `prev' will never be the same as `next'. | 23 | * `prev' will never be the same as `next'. |
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index 322531caa484..2662a3e12dc4 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -289,7 +289,7 @@ | |||
289 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 289 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
290 | #define __NR_mq_notify (__NR_mq_open+4) | 290 | #define __NR_mq_notify (__NR_mq_open+4) |
291 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 291 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
292 | #define __NR_sys_kexec_load 283 | 292 | #define __NR_kexec_load 283 |
293 | #define __NR_waitid 284 | 293 | #define __NR_waitid 284 |
294 | /* #define __NR_sys_setaltroot 285 */ | 294 | /* #define __NR_sys_setaltroot 285 */ |
295 | #define __NR_add_key 286 | 295 | #define __NR_add_key 286 |
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index de4614840c2c..9291c24f5819 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h | |||
@@ -7,8 +7,15 @@ | |||
7 | #include <asm/atomic.h> | 7 | #include <asm/atomic.h> |
8 | #include <asm/types.h> | 8 | #include <asm/types.h> |
9 | 9 | ||
10 | /* An unsigned long type for operations which are atomic for a single | 10 | /* |
11 | * CPU. Usually used in combination with per-cpu variables. */ | 11 | * A signed long type for operations which are atomic for a single CPU. |
12 | * Usually used in combination with per-cpu variables. | ||
13 | * | ||
14 | * This is the default implementation, which uses atomic_long_t. Which is | ||
15 | * rather pointless. The whole point behind local_t is that some processors | ||
16 | * can perform atomic adds and subtracts in a manner which is atomic wrt IRQs | ||
17 | * running on this CPU. local_t allows exploitation of such capabilities. | ||
18 | */ | ||
12 | 19 | ||
13 | /* Implement in terms of atomics. */ | 20 | /* Implement in terms of atomics. */ |
14 | 21 | ||
@@ -20,7 +27,7 @@ typedef struct | |||
20 | 27 | ||
21 | #define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) } | 28 | #define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) } |
22 | 29 | ||
23 | #define local_read(l) ((unsigned long)atomic_long_read(&(l)->a)) | 30 | #define local_read(l) atomic_long_read(&(l)->a) |
24 | #define local_set(l,i) atomic_long_set((&(l)->a),(i)) | 31 | #define local_set(l,i) atomic_long_set((&(l)->a),(i)) |
25 | #define local_inc(l) atomic_long_inc(&(l)->a) | 32 | #define local_inc(l) atomic_long_inc(&(l)->a) |
26 | #define local_dec(l) atomic_long_dec(&(l)->a) | 33 | #define local_dec(l) atomic_long_dec(&(l)->a) |
diff --git a/include/asm-generic/mutex-dec.h b/include/asm-generic/mutex-dec.h index 40c6d1f86598..29c6ac34e236 100644 --- a/include/asm-generic/mutex-dec.h +++ b/include/asm-generic/mutex-dec.h | |||
@@ -17,13 +17,14 @@ | |||
17 | * it wasn't 1 originally. This function MUST leave the value lower than | 17 | * it wasn't 1 originally. This function MUST leave the value lower than |
18 | * 1 even when the "1" assertion wasn't true. | 18 | * 1 even when the "1" assertion wasn't true. |
19 | */ | 19 | */ |
20 | #define __mutex_fastpath_lock(count, fail_fn) \ | 20 | static inline void |
21 | do { \ | 21 | __mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
22 | if (unlikely(atomic_dec_return(count) < 0)) \ | 22 | { |
23 | fail_fn(count); \ | 23 | if (unlikely(atomic_dec_return(count) < 0)) |
24 | else \ | 24 | fail_fn(count); |
25 | smp_mb(); \ | 25 | else |
26 | } while (0) | 26 | smp_mb(); |
27 | } | ||
27 | 28 | ||
28 | /** | 29 | /** |
29 | * __mutex_fastpath_lock_retval - try to take the lock by moving the count | 30 | * __mutex_fastpath_lock_retval - try to take the lock by moving the count |
@@ -36,7 +37,7 @@ do { \ | |||
36 | * or anything the slow path function returns. | 37 | * or anything the slow path function returns. |
37 | */ | 38 | */ |
38 | static inline int | 39 | static inline int |
39 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) | 40 | __mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t *)) |
40 | { | 41 | { |
41 | if (unlikely(atomic_dec_return(count) < 0)) | 42 | if (unlikely(atomic_dec_return(count) < 0)) |
42 | return fail_fn(count); | 43 | return fail_fn(count); |
@@ -59,12 +60,13 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) | |||
59 | * __mutex_slowpath_needs_to_unlock() macro needs to return 1, it needs | 60 | * __mutex_slowpath_needs_to_unlock() macro needs to return 1, it needs |
60 | * to return 0 otherwise. | 61 | * to return 0 otherwise. |
61 | */ | 62 | */ |
62 | #define __mutex_fastpath_unlock(count, fail_fn) \ | 63 | static inline void |
63 | do { \ | 64 | __mutex_fastpath_unlock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
64 | smp_mb(); \ | 65 | { |
65 | if (unlikely(atomic_inc_return(count) <= 0)) \ | 66 | smp_mb(); |
66 | fail_fn(count); \ | 67 | if (unlikely(atomic_inc_return(count) <= 0)) |
67 | } while (0) | 68 | fail_fn(count); |
69 | } | ||
68 | 70 | ||
69 | #define __mutex_slowpath_needs_to_unlock() 1 | 71 | #define __mutex_slowpath_needs_to_unlock() 1 |
70 | 72 | ||
diff --git a/include/asm-generic/mutex-xchg.h b/include/asm-generic/mutex-xchg.h index 1d24f47e6c48..32a2100c1aeb 100644 --- a/include/asm-generic/mutex-xchg.h +++ b/include/asm-generic/mutex-xchg.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Generic implementation of the mutex fastpath, based on xchg(). | 4 | * Generic implementation of the mutex fastpath, based on xchg(). |
5 | * | 5 | * |
6 | * NOTE: An xchg based implementation is less optimal than an atomic | 6 | * NOTE: An xchg based implementation might be less optimal than an atomic |
7 | * decrement/increment based implementation. If your architecture | 7 | * decrement/increment based implementation. If your architecture |
8 | * has a reasonable atomic dec/inc then you should probably use | 8 | * has a reasonable atomic dec/inc then you should probably use |
9 | * asm-generic/mutex-dec.h instead, or you could open-code an | 9 | * asm-generic/mutex-dec.h instead, or you could open-code an |
@@ -22,14 +22,14 @@ | |||
22 | * wasn't 1 originally. This function MUST leave the value lower than 1 | 22 | * wasn't 1 originally. This function MUST leave the value lower than 1 |
23 | * even when the "1" assertion wasn't true. | 23 | * even when the "1" assertion wasn't true. |
24 | */ | 24 | */ |
25 | #define __mutex_fastpath_lock(count, fail_fn) \ | 25 | static inline void |
26 | do { \ | 26 | __mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
27 | if (unlikely(atomic_xchg(count, 0) != 1)) \ | 27 | { |
28 | fail_fn(count); \ | 28 | if (unlikely(atomic_xchg(count, 0) != 1)) |
29 | else \ | 29 | fail_fn(count); |
30 | smp_mb(); \ | 30 | else |
31 | } while (0) | 31 | smp_mb(); |
32 | 32 | } | |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * __mutex_fastpath_lock_retval - try to take the lock by moving the count | 35 | * __mutex_fastpath_lock_retval - try to take the lock by moving the count |
@@ -42,7 +42,7 @@ do { \ | |||
42 | * or anything the slow path function returns | 42 | * or anything the slow path function returns |
43 | */ | 43 | */ |
44 | static inline int | 44 | static inline int |
45 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) | 45 | __mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t *)) |
46 | { | 46 | { |
47 | if (unlikely(atomic_xchg(count, 0) != 1)) | 47 | if (unlikely(atomic_xchg(count, 0) != 1)) |
48 | return fail_fn(count); | 48 | return fail_fn(count); |
@@ -64,12 +64,13 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) | |||
64 | * __mutex_slowpath_needs_to_unlock() macro needs to return 1, it needs | 64 | * __mutex_slowpath_needs_to_unlock() macro needs to return 1, it needs |
65 | * to return 0 otherwise. | 65 | * to return 0 otherwise. |
66 | */ | 66 | */ |
67 | #define __mutex_fastpath_unlock(count, fail_fn) \ | 67 | static inline void |
68 | do { \ | 68 | __mutex_fastpath_unlock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
69 | smp_mb(); \ | 69 | { |
70 | if (unlikely(atomic_xchg(count, 1) != 0)) \ | 70 | smp_mb(); |
71 | fail_fn(count); \ | 71 | if (unlikely(atomic_xchg(count, 1) != 0)) |
72 | } while (0) | 72 | fail_fn(count); |
73 | } | ||
73 | 74 | ||
74 | #define __mutex_slowpath_needs_to_unlock() 0 | 75 | #define __mutex_slowpath_needs_to_unlock() 0 |
75 | 76 | ||
diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h index dfe96c7121cf..8e81cf665e75 100644 --- a/include/asm-h8300/system.h +++ b/include/asm-h8300/system.h | |||
@@ -4,8 +4,6 @@ | |||
4 | #include <linux/config.h> /* get configuration macros */ | 4 | #include <linux/config.h> /* get configuration macros */ |
5 | #include <linux/linkage.h> | 5 | #include <linux/linkage.h> |
6 | 6 | ||
7 | #define prepare_to_switch() do { } while(0) | ||
8 | |||
9 | /* | 7 | /* |
10 | * switch_to(n) should switch tasks to task ptr, first checking that | 8 | * switch_to(n) should switch tasks to task ptr, first checking that |
11 | * ptr isn't the current task, in which case it does nothing. This | 9 | * ptr isn't the current task, in which case it does nothing. This |
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h index 56a4a5686c88..adb05159379b 100644 --- a/include/asm-h8300/unistd.h +++ b/include/asm-h8300/unistd.h | |||
@@ -285,7 +285,7 @@ | |||
285 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 285 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
286 | #define __NR_mq_notify (__NR_mq_open+4) | 286 | #define __NR_mq_notify (__NR_mq_open+4) |
287 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 287 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
288 | #define __NR_sys_kexec_load 283 | 288 | #define __NR_kexec_load 283 |
289 | #define __NR_waitid 284 | 289 | #define __NR_waitid 284 |
290 | /* #define __NR_sys_setaltroot 285 */ | 290 | /* #define __NR_sys_setaltroot 285 */ |
291 | #define __NR_add_key 286 | 291 | #define __NR_add_key 286 |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index ff9ac8d19eb2..288233fd77d7 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -139,6 +139,8 @@ void switch_ipi_to_APIC_timer(void *cpumask); | |||
139 | 139 | ||
140 | extern int timer_over_8254; | 140 | extern int timer_over_8254; |
141 | 141 | ||
142 | extern int modern_apic(void); | ||
143 | |||
142 | #else /* !CONFIG_X86_LOCAL_APIC */ | 144 | #else /* !CONFIG_X86_LOCAL_APIC */ |
143 | static inline void lapic_shutdown(void) { } | 145 | static inline void lapic_shutdown(void) { } |
144 | 146 | ||
diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h index 03185cef8e0a..5e4a35af2921 100644 --- a/include/asm-i386/apicdef.h +++ b/include/asm-i386/apicdef.h | |||
@@ -37,6 +37,7 @@ | |||
37 | #define APIC_SPIV_FOCUS_DISABLED (1<<9) | 37 | #define APIC_SPIV_FOCUS_DISABLED (1<<9) |
38 | #define APIC_SPIV_APIC_ENABLED (1<<8) | 38 | #define APIC_SPIV_APIC_ENABLED (1<<8) |
39 | #define APIC_ISR 0x100 | 39 | #define APIC_ISR 0x100 |
40 | #define APIC_ISR_NR 0x8 /* Number of 32 bit ISR registers. */ | ||
40 | #define APIC_TMR 0x180 | 41 | #define APIC_TMR 0x180 |
41 | #define APIC_IRR 0x200 | 42 | #define APIC_IRR 0x200 |
42 | #define APIC_ESR 0x280 | 43 | #define APIC_ESR 0x280 |
diff --git a/include/asm-i386/e820.h b/include/asm-i386/e820.h index edf65be21a92..ca82acb8cb1f 100644 --- a/include/asm-i386/e820.h +++ b/include/asm-i386/e820.h | |||
@@ -35,6 +35,10 @@ struct e820map { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | extern struct e820map e820; | 37 | extern struct e820map e820; |
38 | |||
39 | extern int e820_all_mapped(unsigned long start, unsigned long end, | ||
40 | unsigned type); | ||
41 | |||
38 | #endif/*!__ASSEMBLY__*/ | 42 | #endif/*!__ASSEMBLY__*/ |
39 | 43 | ||
40 | #endif/*__E820_HEADER*/ | 44 | #endif/*__E820_HEADER*/ |
diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h index 79727afb94c9..03403045c182 100644 --- a/include/asm-i386/floppy.h +++ b/include/asm-i386/floppy.h | |||
@@ -56,7 +56,6 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) | |||
56 | register unsigned char st; | 56 | register unsigned char st; |
57 | 57 | ||
58 | #undef TRACE_FLPY_INT | 58 | #undef TRACE_FLPY_INT |
59 | #define NO_FLOPPY_ASSEMBLER | ||
60 | 59 | ||
61 | #ifdef TRACE_FLPY_INT | 60 | #ifdef TRACE_FLPY_INT |
62 | static int calls=0; | 61 | static int calls=0; |
@@ -71,38 +70,6 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) | |||
71 | bytes = virtual_dma_count; | 70 | bytes = virtual_dma_count; |
72 | #endif | 71 | #endif |
73 | 72 | ||
74 | #ifndef NO_FLOPPY_ASSEMBLER | ||
75 | __asm__ ( | ||
76 | "testl %1,%1" | ||
77 | "je 3f" | ||
78 | "1: inb %w4,%b0" | ||
79 | "andb $160,%b0" | ||
80 | "cmpb $160,%b0" | ||
81 | "jne 2f" | ||
82 | "incw %w4" | ||
83 | "testl %3,%3" | ||
84 | "jne 4f" | ||
85 | "inb %w4,%b0" | ||
86 | "movb %0,(%2)" | ||
87 | "jmp 5f" | ||
88 | "4: movb (%2),%0" | ||
89 | "outb %b0,%w4" | ||
90 | "5: decw %w4" | ||
91 | "outb %0,$0x80" | ||
92 | "decl %1" | ||
93 | "incl %2" | ||
94 | "testl %1,%1" | ||
95 | "jne 1b" | ||
96 | "3: inb %w4,%b0" | ||
97 | "2: " | ||
98 | : "=a" ((char) st), | ||
99 | "=c" ((long) virtual_dma_count), | ||
100 | "=S" ((long) virtual_dma_addr) | ||
101 | : "b" ((long) virtual_dma_mode), | ||
102 | "d" ((short) virtual_dma_port+4), | ||
103 | "1" ((long) virtual_dma_count), | ||
104 | "2" ((long) virtual_dma_addr)); | ||
105 | #else | ||
106 | { | 73 | { |
107 | register int lcount; | 74 | register int lcount; |
108 | register char *lptr; | 75 | register char *lptr; |
@@ -122,7 +89,6 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) | |||
122 | virtual_dma_addr = lptr; | 89 | virtual_dma_addr = lptr; |
123 | st = inb(virtual_dma_port+4); | 90 | st = inb(virtual_dma_port+4); |
124 | } | 91 | } |
125 | #endif | ||
126 | 92 | ||
127 | #ifdef TRACE_FLPY_INT | 93 | #ifdef TRACE_FLPY_INT |
128 | calls++; | 94 | calls++; |
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h index 16ef9f996e3f..7f1a8a6ee32f 100644 --- a/include/asm-i386/hpet.h +++ b/include/asm-i386/hpet.h | |||
@@ -89,6 +89,7 @@ | |||
89 | * then 32 bit HPET counter wrapsaround in less than 0.5 sec. | 89 | * then 32 bit HPET counter wrapsaround in less than 0.5 sec. |
90 | */ | 90 | */ |
91 | #define HPET_MIN_PERIOD (100000UL) | 91 | #define HPET_MIN_PERIOD (100000UL) |
92 | #define HPET_TICK_RATE (HZ * 100000UL) | ||
92 | 93 | ||
93 | extern unsigned long hpet_tick; /* hpet clks count per tick */ | 94 | extern unsigned long hpet_tick; /* hpet clks count per tick */ |
94 | extern unsigned long hpet_address; /* hpet memory map physical address */ | 95 | extern unsigned long hpet_address; /* hpet memory map physical address */ |
diff --git a/include/asm-i386/local.h b/include/asm-i386/local.h index 0177da80dde3..e67fa08260fe 100644 --- a/include/asm-i386/local.h +++ b/include/asm-i386/local.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | typedef struct | 6 | typedef struct |
7 | { | 7 | { |
8 | volatile unsigned long counter; | 8 | volatile long counter; |
9 | } local_t; | 9 | } local_t; |
10 | 10 | ||
11 | #define LOCAL_INIT(i) { (i) } | 11 | #define LOCAL_INIT(i) { (i) } |
@@ -29,7 +29,7 @@ static __inline__ void local_dec(local_t *v) | |||
29 | :"m" (v->counter)); | 29 | :"m" (v->counter)); |
30 | } | 30 | } |
31 | 31 | ||
32 | static __inline__ void local_add(unsigned long i, local_t *v) | 32 | static __inline__ void local_add(long i, local_t *v) |
33 | { | 33 | { |
34 | __asm__ __volatile__( | 34 | __asm__ __volatile__( |
35 | "addl %1,%0" | 35 | "addl %1,%0" |
@@ -37,7 +37,7 @@ static __inline__ void local_add(unsigned long i, local_t *v) | |||
37 | :"ir" (i), "m" (v->counter)); | 37 | :"ir" (i), "m" (v->counter)); |
38 | } | 38 | } |
39 | 39 | ||
40 | static __inline__ void local_sub(unsigned long i, local_t *v) | 40 | static __inline__ void local_sub(long i, local_t *v) |
41 | { | 41 | { |
42 | __asm__ __volatile__( | 42 | __asm__ __volatile__( |
43 | "subl %1,%0" | 43 | "subl %1,%0" |
diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h index 62113d3bfdc2..770bf6da8c3d 100644 --- a/include/asm-i386/mpspec.h +++ b/include/asm-i386/mpspec.h | |||
@@ -18,7 +18,6 @@ extern void find_smp_config (void); | |||
18 | extern void get_smp_config (void); | 18 | extern void get_smp_config (void); |
19 | extern int nr_ioapics; | 19 | extern int nr_ioapics; |
20 | extern int apic_version [MAX_APICS]; | 20 | extern int apic_version [MAX_APICS]; |
21 | extern int mp_bus_id_to_type [MAX_MP_BUSSES]; | ||
22 | extern int mp_irq_entries; | 21 | extern int mp_irq_entries; |
23 | extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES]; | 22 | extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES]; |
24 | extern int mpc_default_type; | 23 | extern int mpc_default_type; |
diff --git a/include/asm-i386/numnodes.h b/include/asm-i386/numnodes.h deleted file mode 100644 index a61f38c8176f..000000000000 --- a/include/asm-i386/numnodes.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _ASM_MAX_NUMNODES_H | ||
2 | #define _ASM_MAX_NUMNODES_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #ifdef CONFIG_X86_NUMAQ | ||
7 | |||
8 | /* Max 16 Nodes */ | ||
9 | #define NODES_SHIFT 4 | ||
10 | |||
11 | #elif defined(CONFIG_ACPI_SRAT) | ||
12 | |||
13 | /* Max 8 Nodes */ | ||
14 | #define NODES_SHIFT 3 | ||
15 | |||
16 | #endif /* CONFIG_X86_NUMAQ */ | ||
17 | |||
18 | #endif /* _ASM_MAX_NUMNODES_H */ | ||
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 014e3562895b..6a8dd83c350f 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -288,7 +288,7 @@ | |||
288 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 288 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
289 | #define __NR_mq_notify (__NR_mq_open+4) | 289 | #define __NR_mq_notify (__NR_mq_open+4) |
290 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 290 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
291 | #define __NR_sys_kexec_load 283 | 291 | #define __NR_kexec_load 283 |
292 | #define __NR_waitid 284 | 292 | #define __NR_waitid 284 |
293 | /* #define __NR_sys_setaltroot 285 */ | 293 | /* #define __NR_sys_setaltroot 285 */ |
294 | #define __NR_add_key 286 | 294 | #define __NR_add_key 286 |
@@ -318,8 +318,10 @@ | |||
318 | #define __NR_unshare 310 | 318 | #define __NR_unshare 310 |
319 | #define __NR_set_robust_list 311 | 319 | #define __NR_set_robust_list 311 |
320 | #define __NR_get_robust_list 312 | 320 | #define __NR_get_robust_list 312 |
321 | #define __NR_splice 313 | ||
322 | #define __NR_sync_file_range 314 | ||
321 | 323 | ||
322 | #define NR_syscalls 313 | 324 | #define NR_syscalls 315 |
323 | 325 | ||
324 | /* | 326 | /* |
325 | * user-visible error numbers are in the range -1 - -128: see | 327 | * user-visible error numbers are in the range -1 - -128: see |
diff --git a/include/asm-ia64/acpi-ext.h b/include/asm-ia64/acpi-ext.h index 56d2ddc97b30..734d137dda6e 100644 --- a/include/asm-ia64/acpi-ext.h +++ b/include/asm-ia64/acpi-ext.h | |||
@@ -1,12 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * ia64/platform/hp/common/hp_acpi.h | 2 | * (c) Copyright 2003, 2006 Hewlett-Packard Development Company, L.P. |
3 | * Alex Williamson <alex.williamson@hp.com> | ||
4 | * Bjorn Helgaas <bjorn.helgaas@hp.com> | ||
3 | * | 5 | * |
4 | * Copyright (C) 2003 Hewlett-Packard | 6 | * This program is free software; you can redistribute it and/or modify |
5 | * Copyright (C) Alex Williamson | 7 | * it under the terms of the GNU General Public License version 2 as |
6 | * Copyright (C) Bjorn Helgaas | 8 | * published by the Free Software Foundation. |
7 | * | 9 | * |
8 | * Vendor specific extensions to ACPI. | 10 | * Vendor specific extensions to ACPI. |
9 | */ | 11 | */ |
12 | |||
10 | #ifndef _ASM_IA64_ACPI_EXT_H | 13 | #ifndef _ASM_IA64_ACPI_EXT_H |
11 | #define _ASM_IA64_ACPI_EXT_H | 14 | #define _ASM_IA64_ACPI_EXT_H |
12 | 15 | ||
diff --git a/include/asm-ia64/asmmacro.h b/include/asm-ia64/asmmacro.h index d4cec32083d8..edf2cebb2969 100644 --- a/include/asm-ia64/asmmacro.h +++ b/include/asm-ia64/asmmacro.h | |||
@@ -38,6 +38,10 @@ name: | |||
38 | 38 | ||
39 | /* | 39 | /* |
40 | * Helper macros for accessing user memory. | 40 | * Helper macros for accessing user memory. |
41 | * | ||
42 | * When adding any new .section/.previous entries here, make sure to | ||
43 | * also add it to the DISCARD section in arch/ia64/kernel/gate.lds.S or | ||
44 | * unpleasant things will happen. | ||
41 | */ | 45 | */ |
42 | 46 | ||
43 | .section "__ex_table", "a" // declare section & section attributes | 47 | .section "__ex_table", "a" // declare section & section attributes |
diff --git a/include/asm-ia64/kdebug.h b/include/asm-ia64/kdebug.h index 218c458ab60c..c195a9ad1255 100644 --- a/include/asm-ia64/kdebug.h +++ b/include/asm-ia64/kdebug.h | |||
@@ -58,6 +58,8 @@ enum die_val { | |||
58 | DIE_MCA_RENDZVOUS_ENTER, | 58 | DIE_MCA_RENDZVOUS_ENTER, |
59 | DIE_MCA_RENDZVOUS_PROCESS, | 59 | DIE_MCA_RENDZVOUS_PROCESS, |
60 | DIE_MCA_RENDZVOUS_LEAVE, | 60 | DIE_MCA_RENDZVOUS_LEAVE, |
61 | DIE_MCA_NEW_TIMEOUT, | ||
62 | DIE_INIT_ENTER, | ||
61 | DIE_INIT_MONARCH_ENTER, | 63 | DIE_INIT_MONARCH_ENTER, |
62 | DIE_INIT_MONARCH_PROCESS, | 64 | DIE_INIT_MONARCH_PROCESS, |
63 | DIE_INIT_MONARCH_LEAVE, | 65 | DIE_INIT_MONARCH_LEAVE, |
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index bfbbb8da79c7..9c5389b7e623 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h | |||
@@ -148,6 +148,11 @@ extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *) | |||
148 | extern void ia64_unreg_MCA_extension(void); | 148 | extern void ia64_unreg_MCA_extension(void); |
149 | extern u64 ia64_get_rnat(u64 *); | 149 | extern u64 ia64_get_rnat(u64 *); |
150 | 150 | ||
151 | struct ia64_mca_notify_die { | ||
152 | struct ia64_sal_os_state *sos; | ||
153 | int *monarch_cpu; | ||
154 | }; | ||
155 | |||
151 | #else /* __ASSEMBLY__ */ | 156 | #else /* __ASSEMBLY__ */ |
152 | 157 | ||
153 | #define IA64_MCA_CORRECTED 0x0 /* Error has been corrected by OS_MCA */ | 158 | #define IA64_MCA_CORRECTED 0x0 /* Error has been corrected by OS_MCA */ |
diff --git a/include/asm-ia64/mutex.h b/include/asm-ia64/mutex.h index 5a3224f6af38..bed73a643a56 100644 --- a/include/asm-ia64/mutex.h +++ b/include/asm-ia64/mutex.h | |||
@@ -84,7 +84,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) | |||
84 | static inline int | 84 | static inline int |
85 | __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) | 85 | __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) |
86 | { | 86 | { |
87 | if (likely(cmpxchg_acq(count, 1, 0)) == 1) | 87 | if (cmpxchg_acq(count, 1, 0) == 1) |
88 | return 1; | 88 | return 1; |
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
diff --git a/include/asm-ia64/numnodes.h b/include/asm-ia64/numnodes.h deleted file mode 100644 index e9d356f549d9..000000000000 --- a/include/asm-ia64/numnodes.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef _ASM_MAX_NUMNODES_H | ||
2 | #define _ASM_MAX_NUMNODES_H | ||
3 | |||
4 | #ifdef CONFIG_IA64_DIG | ||
5 | /* Max 8 Nodes */ | ||
6 | # define NODES_SHIFT 3 | ||
7 | #elif defined(CONFIG_IA64_HP_ZX1) || defined(CONFIG_IA64_HP_ZX1_SWIOTLB) | ||
8 | /* Max 32 Nodes */ | ||
9 | # define NODES_SHIFT 5 | ||
10 | #elif defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_GENERIC) | ||
11 | # if CONFIG_IA64_NR_NODES == 256 | ||
12 | # define NODES_SHIFT 8 | ||
13 | # elif CONFIG_IA64_NR_NODES <= 512 | ||
14 | # define NODES_SHIFT 9 | ||
15 | # elif CONFIG_IA64_NR_NODES <= 1024 | ||
16 | # define NODES_SHIFT 10 | ||
17 | # endif | ||
18 | #endif | ||
19 | |||
20 | #endif /* _ASM_MAX_NUMNODES_H */ | ||
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 4e7e6f23b08c..37e52a2836b0 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -68,6 +68,7 @@ | |||
68 | #define PAL_SHUTDOWN 40 /* enter processor shutdown state */ | 68 | #define PAL_SHUTDOWN 40 /* enter processor shutdown state */ |
69 | #define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */ | 69 | #define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */ |
70 | #define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */ | 70 | #define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */ |
71 | #define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */ | ||
71 | 72 | ||
72 | #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ | 73 | #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ |
73 | #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ | 74 | #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ |
@@ -130,7 +131,7 @@ typedef u64 pal_cache_line_state_t; | |||
130 | #define PAL_CACHE_LINE_STATE_MODIFIED 3 /* Modified */ | 131 | #define PAL_CACHE_LINE_STATE_MODIFIED 3 /* Modified */ |
131 | 132 | ||
132 | typedef struct pal_freq_ratio { | 133 | typedef struct pal_freq_ratio { |
133 | u64 den : 32, num : 32; /* numerator & denominator */ | 134 | u32 den, num; /* numerator & denominator */ |
134 | } itc_ratio, proc_ratio; | 135 | } itc_ratio, proc_ratio; |
135 | 136 | ||
136 | typedef union pal_cache_config_info_1_s { | 137 | typedef union pal_cache_config_info_1_s { |
@@ -151,10 +152,10 @@ typedef union pal_cache_config_info_1_s { | |||
151 | 152 | ||
152 | typedef union pal_cache_config_info_2_s { | 153 | typedef union pal_cache_config_info_2_s { |
153 | struct { | 154 | struct { |
154 | u64 cache_size : 32, /*cache size in bytes*/ | 155 | u32 cache_size; /*cache size in bytes*/ |
155 | 156 | ||
156 | 157 | ||
157 | alias_boundary : 8, /* 39-32 aliased addr | 158 | u32 alias_boundary : 8, /* 39-32 aliased addr |
158 | * separation for max | 159 | * separation for max |
159 | * performance. | 160 | * performance. |
160 | */ | 161 | */ |
@@ -1647,6 +1648,33 @@ ia64_pal_logical_to_phys(u64 proc_number, pal_logical_to_physical_t *mapping) | |||
1647 | 1648 | ||
1648 | return iprv.status; | 1649 | return iprv.status; |
1649 | } | 1650 | } |
1651 | |||
1652 | typedef struct pal_cache_shared_info_s | ||
1653 | { | ||
1654 | u64 num_shared; | ||
1655 | pal_proc_n_log_info1_t ppli1; | ||
1656 | pal_proc_n_log_info2_t ppli2; | ||
1657 | } pal_cache_shared_info_t; | ||
1658 | |||
1659 | /* Get information on logical to physical processor mappings. */ | ||
1660 | static inline s64 | ||
1661 | ia64_pal_cache_shared_info(u64 level, | ||
1662 | u64 type, | ||
1663 | u64 proc_number, | ||
1664 | pal_cache_shared_info_t *info) | ||
1665 | { | ||
1666 | struct ia64_pal_retval iprv; | ||
1667 | |||
1668 | PAL_CALL(iprv, PAL_CACHE_SHARED_INFO, level, type, proc_number); | ||
1669 | |||
1670 | if (iprv.status == PAL_STATUS_SUCCESS) { | ||
1671 | info->num_shared = iprv.v0; | ||
1672 | info->ppli1.ppli1_data = iprv.v1; | ||
1673 | info->ppli2.ppli2_data = iprv.v2; | ||
1674 | } | ||
1675 | |||
1676 | return iprv.status; | ||
1677 | } | ||
1650 | #endif /* __ASSEMBLY__ */ | 1678 | #endif /* __ASSEMBLY__ */ |
1651 | 1679 | ||
1652 | #endif /* _ASM_IA64_PAL_H */ | 1680 | #endif /* _ASM_IA64_PAL_H */ |
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 019956c613e4..1c749acca021 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -285,12 +285,16 @@ | |||
285 | #define __NR_faccessat 1293 | 285 | #define __NR_faccessat 1293 |
286 | /* 1294, 1295 reserved for pselect/ppoll */ | 286 | /* 1294, 1295 reserved for pselect/ppoll */ |
287 | #define __NR_unshare 1296 | 287 | #define __NR_unshare 1296 |
288 | #define __NR_splice 1297 | ||
289 | #define __NR_set_robust_list 1298 | ||
290 | #define __NR_get_robust_list 1299 | ||
291 | #define __NR_sync_file_range 1300 | ||
288 | 292 | ||
289 | #ifdef __KERNEL__ | 293 | #ifdef __KERNEL__ |
290 | 294 | ||
291 | #include <linux/config.h> | 295 | #include <linux/config.h> |
292 | 296 | ||
293 | #define NR_syscalls 273 /* length of syscall table */ | 297 | #define NR_syscalls 277 /* length of syscall table */ |
294 | 298 | ||
295 | #define __ARCH_WANT_SYS_RT_SIGACTION | 299 | #define __ARCH_WANT_SYS_RT_SIGACTION |
296 | 300 | ||
diff --git a/include/asm-ia64/vga.h b/include/asm-ia64/vga.h index bc3349ffc505..091177cda223 100644 --- a/include/asm-ia64/vga.h +++ b/include/asm-ia64/vga.h | |||
@@ -17,7 +17,7 @@ | |||
17 | extern unsigned long vga_console_iobase; | 17 | extern unsigned long vga_console_iobase; |
18 | extern unsigned long vga_console_membase; | 18 | extern unsigned long vga_console_membase; |
19 | 19 | ||
20 | #define VGA_MAP_MEM(x) ((unsigned long) ioremap(vga_console_membase + (x), 0)) | 20 | #define VGA_MAP_MEM(x) ((unsigned long) ioremap_nocache(vga_console_membase + (x), 0)) |
21 | 21 | ||
22 | #define vga_readb(x) (*(x)) | 22 | #define vga_readb(x) (*(x)) |
23 | #define vga_writeb(x,y) (*(y) = (x)) | 23 | #define vga_writeb(x,y) (*(y) = (x)) |
diff --git a/include/asm-m32r/numnodes.h b/include/asm-m32r/numnodes.h deleted file mode 100644 index 479a39d49f83..000000000000 --- a/include/asm-m32r/numnodes.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _ASM_NUMNODES_H_ | ||
2 | #define _ASM_NUMNODES_H_ | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #ifdef CONFIG_DISCONTIGMEM | ||
7 | |||
8 | #if defined(CONFIG_CHIP_M32700) | ||
9 | #define NODES_SHIFT 1 /* Max 2 Nodes */ | ||
10 | #endif /* CONFIG_CHIP_M32700 */ | ||
11 | |||
12 | #endif /* CONFIG_DISCONTIGMEM */ | ||
13 | |||
14 | #endif /* _ASM_NUMNODES_H_ */ | ||
15 | |||
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h index 7885b7df84a2..1184293e5712 100644 --- a/include/asm-m32r/smp.h +++ b/include/asm-m32r/smp.h | |||
@@ -67,7 +67,8 @@ extern volatile int cpu_2_physid[NR_CPUS]; | |||
67 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 67 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
68 | 68 | ||
69 | extern cpumask_t cpu_callout_map; | 69 | extern cpumask_t cpu_callout_map; |
70 | #define cpu_possible_map cpu_callout_map | 70 | extern cpumask_t cpu_possible_map; |
71 | extern cpumask_t cpu_present_map; | ||
71 | 72 | ||
72 | static __inline__ int hard_smp_processor_id(void) | 73 | static __inline__ int hard_smp_processor_id(void) |
73 | { | 74 | { |
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index d6a2c613be68..c5ab5da56d21 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -22,10 +22,6 @@ | |||
22 | * `next' and `prev' should be struct task_struct, but it isn't always defined | 22 | * `next' and `prev' should be struct task_struct, but it isn't always defined |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef CONFIG_SMP | ||
26 | #define prepare_to_switch() do { } while(0) | ||
27 | #endif /* not CONFIG_SMP */ | ||
28 | |||
29 | #define switch_to(prev, next, last) do { \ | 25 | #define switch_to(prev, next, last) do { \ |
30 | register unsigned long arg0 __asm__ ("r0") = (unsigned long)prev; \ | 26 | register unsigned long arg0 __asm__ ("r0") = (unsigned long)prev; \ |
31 | register unsigned long arg1 __asm__ ("r1") = (unsigned long)next; \ | 27 | register unsigned long arg1 __asm__ ("r1") = (unsigned long)next; \ |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index e8ae61956a51..819cc28a94f7 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -5,17 +5,9 @@ | |||
5 | * linux/include/asm-m32r/uaccess.h | 5 | * linux/include/asm-m32r/uaccess.h |
6 | * | 6 | * |
7 | * M32R version. | 7 | * M32R version. |
8 | * Copyright (C) 2004 Hirokazu Takata <takata at linux-m32r.org> | 8 | * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #undef UACCESS_DEBUG | ||
12 | |||
13 | #ifdef UACCESS_DEBUG | ||
14 | #define UAPRINTK(args...) printk(args) | ||
15 | #else | ||
16 | #define UAPRINTK(args...) | ||
17 | #endif /* UACCESS_DEBUG */ | ||
18 | |||
19 | /* | 11 | /* |
20 | * User space memory access functions | 12 | * User space memory access functions |
21 | */ | 13 | */ |
@@ -38,27 +30,29 @@ | |||
38 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | 30 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) |
39 | 31 | ||
40 | #ifdef CONFIG_MMU | 32 | #ifdef CONFIG_MMU |
33 | |||
41 | #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) | 34 | #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) |
42 | #define USER_DS MAKE_MM_SEG(PAGE_OFFSET) | 35 | #define USER_DS MAKE_MM_SEG(PAGE_OFFSET) |
43 | #else | ||
44 | #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) | ||
45 | #define USER_DS MAKE_MM_SEG(0xFFFFFFFF) | ||
46 | #endif /* CONFIG_MMU */ | ||
47 | |||
48 | #define get_ds() (KERNEL_DS) | 36 | #define get_ds() (KERNEL_DS) |
49 | #ifdef CONFIG_MMU | ||
50 | #define get_fs() (current_thread_info()->addr_limit) | 37 | #define get_fs() (current_thread_info()->addr_limit) |
51 | #define set_fs(x) (current_thread_info()->addr_limit = (x)) | 38 | #define set_fs(x) (current_thread_info()->addr_limit = (x)) |
52 | #else | 39 | |
40 | #else /* not CONFIG_MMU */ | ||
41 | |||
42 | #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) | ||
43 | #define USER_DS MAKE_MM_SEG(0xFFFFFFFF) | ||
44 | #define get_ds() (KERNEL_DS) | ||
45 | |||
53 | static inline mm_segment_t get_fs(void) | 46 | static inline mm_segment_t get_fs(void) |
54 | { | 47 | { |
55 | return USER_DS; | 48 | return USER_DS; |
56 | } | 49 | } |
57 | 50 | ||
58 | static inline void set_fs(mm_segment_t s) | 51 | static inline void set_fs(mm_segment_t s) |
59 | { | 52 | { |
60 | } | 53 | } |
61 | #endif /* CONFIG_MMU */ | 54 | |
55 | #endif /* not CONFIG_MMU */ | ||
62 | 56 | ||
63 | #define segment_eq(a,b) ((a).seg == (b).seg) | 57 | #define segment_eq(a,b) ((a).seg == (b).seg) |
64 | 58 | ||
@@ -83,9 +77,9 @@ static inline void set_fs(mm_segment_t s) | |||
83 | " subx %0, %0\n" \ | 77 | " subx %0, %0\n" \ |
84 | " cmpu %4, %1\n" \ | 78 | " cmpu %4, %1\n" \ |
85 | " subx %0, %5\n" \ | 79 | " subx %0, %5\n" \ |
86 | : "=&r"(flag), "=r"(sum) \ | 80 | : "=&r" (flag), "=r" (sum) \ |
87 | : "1"(addr), "r"((int)(size)), \ | 81 | : "1" (addr), "r" ((int)(size)), \ |
88 | "r"(current_thread_info()->addr_limit.seg), "r"(0) \ | 82 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ |
89 | : "cbit" ); \ | 83 | : "cbit" ); \ |
90 | flag; }) | 84 | flag; }) |
91 | 85 | ||
@@ -113,10 +107,10 @@ static inline void set_fs(mm_segment_t s) | |||
113 | #else | 107 | #else |
114 | static inline int access_ok(int type, const void *addr, unsigned long size) | 108 | static inline int access_ok(int type, const void *addr, unsigned long size) |
115 | { | 109 | { |
116 | extern unsigned long memory_start, memory_end; | 110 | extern unsigned long memory_start, memory_end; |
117 | unsigned long val = (unsigned long)addr; | 111 | unsigned long val = (unsigned long)addr; |
118 | 112 | ||
119 | return ((val >= memory_start) && ((val + size) < memory_end)); | 113 | return ((val >= memory_start) && ((val + size) < memory_end)); |
120 | } | 114 | } |
121 | #endif /* CONFIG_MMU */ | 115 | #endif /* CONFIG_MMU */ |
122 | 116 | ||
@@ -155,39 +149,6 @@ extern int fixup_exception(struct pt_regs *regs); | |||
155 | * accesses to the same area of user memory). | 149 | * accesses to the same area of user memory). |
156 | */ | 150 | */ |
157 | 151 | ||
158 | extern void __get_user_1(void); | ||
159 | extern void __get_user_2(void); | ||
160 | extern void __get_user_4(void); | ||
161 | |||
162 | #ifndef MODULE | ||
163 | #define __get_user_x(size,ret,x,ptr) \ | ||
164 | __asm__ __volatile__( \ | ||
165 | " mv r0, %0\n" \ | ||
166 | " mv r1, %1\n" \ | ||
167 | " bl __get_user_" #size "\n" \ | ||
168 | " mv %0, r0\n" \ | ||
169 | " mv %1, r1\n" \ | ||
170 | : "=r"(ret), "=r"(x) \ | ||
171 | : "0"(ptr) \ | ||
172 | : "r0", "r1", "r14" ) | ||
173 | #else /* MODULE */ | ||
174 | /* | ||
175 | * Use "jl" instead of "bl" for MODULE | ||
176 | */ | ||
177 | #define __get_user_x(size,ret,x,ptr) \ | ||
178 | __asm__ __volatile__( \ | ||
179 | " mv r0, %0\n" \ | ||
180 | " mv r1, %1\n" \ | ||
181 | " seth lr, #high(__get_user_" #size ")\n" \ | ||
182 | " or3 lr, lr, #low(__get_user_" #size ")\n" \ | ||
183 | " jl lr\n" \ | ||
184 | " mv %0, r0\n" \ | ||
185 | " mv %1, r1\n" \ | ||
186 | : "=r"(ret), "=r"(x) \ | ||
187 | : "0"(ptr) \ | ||
188 | : "r0", "r1", "r14" ) | ||
189 | #endif | ||
190 | |||
191 | /* Careful: we have to cast the result to the type of the pointer for sign | 152 | /* Careful: we have to cast the result to the type of the pointer for sign |
192 | reasons */ | 153 | reasons */ |
193 | /** | 154 | /** |
@@ -208,20 +169,7 @@ extern void __get_user_4(void); | |||
208 | * On error, the variable @x is set to zero. | 169 | * On error, the variable @x is set to zero. |
209 | */ | 170 | */ |
210 | #define get_user(x,ptr) \ | 171 | #define get_user(x,ptr) \ |
211 | ({ int __ret_gu; \ | 172 | __get_user_check((x),(ptr),sizeof(*(ptr))) |
212 | unsigned long __val_gu; \ | ||
213 | __chk_user_ptr(ptr); \ | ||
214 | switch(sizeof (*(ptr))) { \ | ||
215 | case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \ | ||
216 | case 2: __get_user_x(2,__ret_gu,__val_gu,ptr); break; \ | ||
217 | case 4: __get_user_x(4,__ret_gu,__val_gu,ptr); break; \ | ||
218 | default: __get_user_x(X,__ret_gu,__val_gu,ptr); break; \ | ||
219 | } \ | ||
220 | (x) = (__typeof__(*(ptr)))__val_gu; \ | ||
221 | __ret_gu; \ | ||
222 | }) | ||
223 | |||
224 | extern void __put_user_bad(void); | ||
225 | 173 | ||
226 | /** | 174 | /** |
227 | * put_user: - Write a simple value into user space. | 175 | * put_user: - Write a simple value into user space. |
@@ -240,8 +188,7 @@ extern void __put_user_bad(void); | |||
240 | * Returns zero on success, or -EFAULT on error. | 188 | * Returns zero on success, or -EFAULT on error. |
241 | */ | 189 | */ |
242 | #define put_user(x,ptr) \ | 190 | #define put_user(x,ptr) \ |
243 | __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) | 191 | __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) |
244 | |||
245 | 192 | ||
246 | /** | 193 | /** |
247 | * __get_user: - Get a simple variable from user space, with less checking. | 194 | * __get_user: - Get a simple variable from user space, with less checking. |
@@ -264,8 +211,64 @@ extern void __put_user_bad(void); | |||
264 | * On error, the variable @x is set to zero. | 211 | * On error, the variable @x is set to zero. |
265 | */ | 212 | */ |
266 | #define __get_user(x,ptr) \ | 213 | #define __get_user(x,ptr) \ |
267 | __get_user_nocheck((x),(ptr),sizeof(*(ptr))) | 214 | __get_user_nocheck((x),(ptr),sizeof(*(ptr))) |
268 | 215 | ||
216 | #define __get_user_nocheck(x,ptr,size) \ | ||
217 | ({ \ | ||
218 | long __gu_err = 0; \ | ||
219 | unsigned long __gu_val; \ | ||
220 | might_sleep(); \ | ||
221 | __get_user_size(__gu_val,(ptr),(size),__gu_err); \ | ||
222 | (x) = (__typeof__(*(ptr)))__gu_val; \ | ||
223 | __gu_err; \ | ||
224 | }) | ||
225 | |||
226 | #define __get_user_check(x,ptr,size) \ | ||
227 | ({ \ | ||
228 | long __gu_err = -EFAULT; \ | ||
229 | unsigned long __gu_val = 0; \ | ||
230 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ | ||
231 | might_sleep(); \ | ||
232 | if (access_ok(VERIFY_READ,__gu_addr,size)) \ | ||
233 | __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \ | ||
234 | (x) = (__typeof__(*(ptr)))__gu_val; \ | ||
235 | __gu_err; \ | ||
236 | }) | ||
237 | |||
238 | extern long __get_user_bad(void); | ||
239 | |||
240 | #define __get_user_size(x,ptr,size,retval) \ | ||
241 | do { \ | ||
242 | retval = 0; \ | ||
243 | __chk_user_ptr(ptr); \ | ||
244 | switch (size) { \ | ||
245 | case 1: __get_user_asm(x,ptr,retval,"ub"); break; \ | ||
246 | case 2: __get_user_asm(x,ptr,retval,"uh"); break; \ | ||
247 | case 4: __get_user_asm(x,ptr,retval,""); break; \ | ||
248 | default: (x) = __get_user_bad(); \ | ||
249 | } \ | ||
250 | } while (0) | ||
251 | |||
252 | #define __get_user_asm(x, addr, err, itype) \ | ||
253 | __asm__ __volatile__( \ | ||
254 | " .fillinsn\n" \ | ||
255 | "1: ld"itype" %1,@%2\n" \ | ||
256 | " .fillinsn\n" \ | ||
257 | "2:\n" \ | ||
258 | ".section .fixup,\"ax\"\n" \ | ||
259 | " .balign 4\n" \ | ||
260 | "3: ldi %0,%3\n" \ | ||
261 | " seth r14,#high(2b)\n" \ | ||
262 | " or3 r14,r14,#low(2b)\n" \ | ||
263 | " jmp r14\n" \ | ||
264 | ".previous\n" \ | ||
265 | ".section __ex_table,\"a\"\n" \ | ||
266 | " .balign 4\n" \ | ||
267 | " .long 1b,3b\n" \ | ||
268 | ".previous" \ | ||
269 | : "=&r" (err), "=&r" (x) \ | ||
270 | : "r" (addr), "i" (-EFAULT), "0" (err) \ | ||
271 | : "r14", "memory") | ||
269 | 272 | ||
270 | /** | 273 | /** |
271 | * __put_user: - Write a simple value into user space, with less checking. | 274 | * __put_user: - Write a simple value into user space, with less checking. |
@@ -287,11 +290,13 @@ extern void __put_user_bad(void); | |||
287 | * Returns zero on success, or -EFAULT on error. | 290 | * Returns zero on success, or -EFAULT on error. |
288 | */ | 291 | */ |
289 | #define __put_user(x,ptr) \ | 292 | #define __put_user(x,ptr) \ |
290 | __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) | 293 | __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) |
294 | |||
291 | 295 | ||
292 | #define __put_user_nocheck(x,ptr,size) \ | 296 | #define __put_user_nocheck(x,ptr,size) \ |
293 | ({ \ | 297 | ({ \ |
294 | long __pu_err; \ | 298 | long __pu_err; \ |
299 | might_sleep(); \ | ||
295 | __put_user_size((x),(ptr),(size),__pu_err); \ | 300 | __put_user_size((x),(ptr),(size),__pu_err); \ |
296 | __pu_err; \ | 301 | __pu_err; \ |
297 | }) | 302 | }) |
@@ -308,28 +313,28 @@ extern void __put_user_bad(void); | |||
308 | }) | 313 | }) |
309 | 314 | ||
310 | #if defined(__LITTLE_ENDIAN__) | 315 | #if defined(__LITTLE_ENDIAN__) |
311 | #define __put_user_u64(x, addr, err) \ | 316 | #define __put_user_u64(x, addr, err) \ |
312 | __asm__ __volatile__( \ | 317 | __asm__ __volatile__( \ |
313 | " .fillinsn\n" \ | 318 | " .fillinsn\n" \ |
314 | "1: st %L1,@%2\n" \ | 319 | "1: st %L1,@%2\n" \ |
315 | " .fillinsn\n" \ | 320 | " .fillinsn\n" \ |
316 | "2: st %H1,@(4,%2)\n" \ | 321 | "2: st %H1,@(4,%2)\n" \ |
317 | " .fillinsn\n" \ | 322 | " .fillinsn\n" \ |
318 | "3:\n" \ | 323 | "3:\n" \ |
319 | ".section .fixup,\"ax\"\n" \ | 324 | ".section .fixup,\"ax\"\n" \ |
320 | " .balign 4\n" \ | 325 | " .balign 4\n" \ |
321 | "4: ldi %0,%3\n" \ | 326 | "4: ldi %0,%3\n" \ |
322 | " seth r14,#high(3b)\n" \ | 327 | " seth r14,#high(3b)\n" \ |
323 | " or3 r14,r14,#low(3b)\n" \ | 328 | " or3 r14,r14,#low(3b)\n" \ |
324 | " jmp r14\n" \ | 329 | " jmp r14\n" \ |
325 | ".previous\n" \ | 330 | ".previous\n" \ |
326 | ".section __ex_table,\"a\"\n" \ | 331 | ".section __ex_table,\"a\"\n" \ |
327 | " .balign 4\n" \ | 332 | " .balign 4\n" \ |
328 | " .long 1b,4b\n" \ | 333 | " .long 1b,4b\n" \ |
329 | " .long 2b,4b\n" \ | 334 | " .long 2b,4b\n" \ |
330 | ".previous" \ | 335 | ".previous" \ |
331 | : "=&r"(err) \ | 336 | : "=&r" (err) \ |
332 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ | 337 | : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \ |
333 | : "r14", "memory") | 338 | : "r14", "memory") |
334 | 339 | ||
335 | #elif defined(__BIG_ENDIAN__) | 340 | #elif defined(__BIG_ENDIAN__) |
@@ -353,13 +358,15 @@ extern void __put_user_bad(void); | |||
353 | " .long 1b,4b\n" \ | 358 | " .long 1b,4b\n" \ |
354 | " .long 2b,4b\n" \ | 359 | " .long 2b,4b\n" \ |
355 | ".previous" \ | 360 | ".previous" \ |
356 | : "=&r"(err) \ | 361 | : "=&r" (err) \ |
357 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ | 362 | : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \ |
358 | : "r14", "memory") | 363 | : "r14", "memory") |
359 | #else | 364 | #else |
360 | #error no endian defined | 365 | #error no endian defined |
361 | #endif | 366 | #endif |
362 | 367 | ||
368 | extern void __put_user_bad(void); | ||
369 | |||
363 | #define __put_user_size(x,ptr,size,retval) \ | 370 | #define __put_user_size(x,ptr,size,retval) \ |
364 | do { \ | 371 | do { \ |
365 | retval = 0; \ | 372 | retval = 0; \ |
@@ -398,52 +405,8 @@ struct __large_struct { unsigned long buf[100]; }; | |||
398 | " .balign 4\n" \ | 405 | " .balign 4\n" \ |
399 | " .long 1b,3b\n" \ | 406 | " .long 1b,3b\n" \ |
400 | ".previous" \ | 407 | ".previous" \ |
401 | : "=&r"(err) \ | 408 | : "=&r" (err) \ |
402 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ | 409 | : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \ |
403 | : "r14", "memory") | ||
404 | |||
405 | #define __get_user_nocheck(x,ptr,size) \ | ||
406 | ({ \ | ||
407 | long __gu_err; \ | ||
408 | unsigned long __gu_val; \ | ||
409 | __get_user_size(__gu_val,(ptr),(size),__gu_err); \ | ||
410 | (x) = (__typeof__(*(ptr)))__gu_val; \ | ||
411 | __gu_err; \ | ||
412 | }) | ||
413 | |||
414 | extern long __get_user_bad(void); | ||
415 | |||
416 | #define __get_user_size(x,ptr,size,retval) \ | ||
417 | do { \ | ||
418 | retval = 0; \ | ||
419 | __chk_user_ptr(ptr); \ | ||
420 | switch (size) { \ | ||
421 | case 1: __get_user_asm(x,ptr,retval,"ub"); break; \ | ||
422 | case 2: __get_user_asm(x,ptr,retval,"uh"); break; \ | ||
423 | case 4: __get_user_asm(x,ptr,retval,""); break; \ | ||
424 | default: (x) = __get_user_bad(); \ | ||
425 | } \ | ||
426 | } while (0) | ||
427 | |||
428 | #define __get_user_asm(x, addr, err, itype) \ | ||
429 | __asm__ __volatile__( \ | ||
430 | " .fillinsn\n" \ | ||
431 | "1: ld"itype" %1,@%2\n" \ | ||
432 | " .fillinsn\n" \ | ||
433 | "2:\n" \ | ||
434 | ".section .fixup,\"ax\"\n" \ | ||
435 | " .balign 4\n" \ | ||
436 | "3: ldi %0,%3\n" \ | ||
437 | " seth r14,#high(2b)\n" \ | ||
438 | " or3 r14,r14,#low(2b)\n" \ | ||
439 | " jmp r14\n" \ | ||
440 | ".previous\n" \ | ||
441 | ".section __ex_table,\"a\"\n" \ | ||
442 | " .balign 4\n" \ | ||
443 | " .long 1b,3b\n" \ | ||
444 | ".previous" \ | ||
445 | : "=&r"(err), "=&r"(x) \ | ||
446 | : "r"(addr), "i"(-EFAULT), "0"(err) \ | ||
447 | : "r14", "memory") | 410 | : "r14", "memory") |
448 | 411 | ||
449 | /* | 412 | /* |
@@ -453,7 +416,6 @@ do { \ | |||
453 | * anything, so this is accurate. | 416 | * anything, so this is accurate. |
454 | */ | 417 | */ |
455 | 418 | ||
456 | |||
457 | /* | 419 | /* |
458 | * Copy To/From Userspace | 420 | * Copy To/From Userspace |
459 | */ | 421 | */ |
@@ -511,8 +473,9 @@ do { \ | |||
511 | " .long 2b,9b\n" \ | 473 | " .long 2b,9b\n" \ |
512 | " .long 3b,9b\n" \ | 474 | " .long 3b,9b\n" \ |
513 | ".previous\n" \ | 475 | ".previous\n" \ |
514 | : "=&r"(__dst), "=&r"(__src), "=&r"(size), "=&r"(__c) \ | 476 | : "=&r" (__dst), "=&r" (__src), "=&r" (size), \ |
515 | : "0"(to), "1"(from), "2"(size), "3"(size / 4) \ | 477 | "=&r" (__c) \ |
478 | : "0" (to), "1" (from), "2" (size), "3" (size / 4) \ | ||
516 | : "r14", "memory"); \ | 479 | : "r14", "memory"); \ |
517 | } while (0) | 480 | } while (0) |
518 | 481 | ||
@@ -573,8 +536,9 @@ do { \ | |||
573 | " .long 2b,7b\n" \ | 536 | " .long 2b,7b\n" \ |
574 | " .long 3b,7b\n" \ | 537 | " .long 3b,7b\n" \ |
575 | ".previous\n" \ | 538 | ".previous\n" \ |
576 | : "=&r"(__dst), "=&r"(__src), "=&r"(size), "=&r"(__c) \ | 539 | : "=&r" (__dst), "=&r" (__src), "=&r" (size), \ |
577 | : "0"(to), "1"(from), "2"(size), "3"(size / 4) \ | 540 | "=&r" (__c) \ |
541 | : "0" (to), "1" (from), "2" (size), "3" (size / 4) \ | ||
578 | : "r14", "memory"); \ | 542 | : "r14", "memory"); \ |
579 | } while (0) | 543 | } while (0) |
580 | 544 | ||
@@ -676,7 +640,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon | |||
676 | #define copy_from_user(to,from,n) \ | 640 | #define copy_from_user(to,from,n) \ |
677 | ({ \ | 641 | ({ \ |
678 | might_sleep(); \ | 642 | might_sleep(); \ |
679 | __generic_copy_from_user((to),(from),(n)); \ | 643 | __generic_copy_from_user((to),(from),(n)); \ |
680 | }) | 644 | }) |
681 | 645 | ||
682 | long __must_check strncpy_from_user(char *dst, const char __user *src, | 646 | long __must_check strncpy_from_user(char *dst, const char __user *src, |
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index 39be87ca2a5a..be0eb014c3b0 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h | |||
@@ -292,7 +292,7 @@ | |||
292 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 292 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
293 | #define __NR_mq_notify (__NR_mq_open+4) | 293 | #define __NR_mq_notify (__NR_mq_open+4) |
294 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 294 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
295 | #define __NR_sys_kexec_load 283 | 295 | #define __NR_kexec_load 283 |
296 | #define __NR_waitid 284 | 296 | #define __NR_waitid 284 |
297 | 297 | ||
298 | #define NR_syscalls 285 | 298 | #define NR_syscalls 285 |
diff --git a/include/asm-mips/numnodes.h b/include/asm-mips/numnodes.h deleted file mode 100644 index 4f00c16ceeb0..000000000000 --- a/include/asm-mips/numnodes.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _ASM_MAX_NUMNODES_H | ||
2 | #define _ASM_MAX_NUMNODES_H | ||
3 | |||
4 | /* Max 128 Nodes */ | ||
5 | #define NODES_SHIFT 6 | ||
6 | |||
7 | #endif /* _ASM_MAX_NUMNODES_H */ | ||
diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h index 4dc7253ff5d0..403ea97316cf 100644 --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h | |||
@@ -210,6 +210,8 @@ static __inline__ int atomic_read(const atomic_t *v) | |||
210 | 210 | ||
211 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) | 211 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) |
212 | 212 | ||
213 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0) | ||
214 | |||
213 | #define ATOMIC_INIT(i) ((atomic_t) { (i) }) | 215 | #define ATOMIC_INIT(i) ((atomic_t) { (i) }) |
214 | 216 | ||
215 | #define smp_mb__before_atomic_dec() smp_mb() | 217 | #define smp_mb__before_atomic_dec() smp_mb() |
@@ -267,6 +269,7 @@ atomic64_read(const atomic64_t *v) | |||
267 | 269 | ||
268 | #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) | 270 | #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) |
269 | #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) | 271 | #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) |
272 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i),(v)) == 0) | ||
270 | 273 | ||
271 | #endif /* __LP64__ */ | 274 | #endif /* __LP64__ */ |
272 | 275 | ||
diff --git a/include/asm-parisc/cache.h b/include/asm-parisc/cache.h index ae50f8e12eed..c831665473cb 100644 --- a/include/asm-parisc/cache.h +++ b/include/asm-parisc/cache.h | |||
@@ -48,7 +48,7 @@ extern void flush_user_icache_range_asm(unsigned long, unsigned long); | |||
48 | extern void flush_kernel_icache_range_asm(unsigned long, unsigned long); | 48 | extern void flush_kernel_icache_range_asm(unsigned long, unsigned long); |
49 | extern void flush_user_dcache_range_asm(unsigned long, unsigned long); | 49 | extern void flush_user_dcache_range_asm(unsigned long, unsigned long); |
50 | extern void flush_kernel_dcache_range_asm(unsigned long, unsigned long); | 50 | extern void flush_kernel_dcache_range_asm(unsigned long, unsigned long); |
51 | extern void flush_kernel_dcache_page(void *); | 51 | extern void flush_kernel_dcache_page_asm(void *); |
52 | extern void flush_kernel_icache_page(void *); | 52 | extern void flush_kernel_icache_page(void *); |
53 | extern void disable_sr_hashing(void); /* turns off space register hashing */ | 53 | extern void disable_sr_hashing(void); /* turns off space register hashing */ |
54 | extern void disable_sr_hashing_asm(int); /* low level support for above */ | 54 | extern void disable_sr_hashing_asm(int); /* low level support for above */ |
diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index c53af9ff41b5..76b6b7d6046a 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h | |||
@@ -62,7 +62,7 @@ extern void flush_dcache_page(struct page *page); | |||
62 | #define flush_dcache_mmap_unlock(mapping) \ | 62 | #define flush_dcache_mmap_unlock(mapping) \ |
63 | write_unlock_irq(&(mapping)->tree_lock) | 63 | write_unlock_irq(&(mapping)->tree_lock) |
64 | 64 | ||
65 | #define flush_icache_page(vma,page) do { flush_kernel_dcache_page(page_address(page)); flush_kernel_icache_page(page_address(page)); } while (0) | 65 | #define flush_icache_page(vma,page) do { flush_kernel_dcache_page(page); flush_kernel_icache_page(page_address(page)); } while (0) |
66 | 66 | ||
67 | #define flush_icache_range(s,e) do { flush_kernel_dcache_range_asm(s,e); flush_kernel_icache_range_asm(s,e); } while (0) | 67 | #define flush_icache_range(s,e) do { flush_kernel_dcache_range_asm(s,e); flush_kernel_icache_range_asm(s,e); } while (0) |
68 | 68 | ||
@@ -184,6 +184,21 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long | |||
184 | 184 | ||
185 | } | 185 | } |
186 | 186 | ||
187 | static inline void | ||
188 | flush_anon_page(struct page *page, unsigned long vmaddr) | ||
189 | { | ||
190 | if (PageAnon(page)) | ||
191 | flush_user_dcache_page(vmaddr); | ||
192 | } | ||
193 | #define ARCH_HAS_FLUSH_ANON_PAGE | ||
194 | |||
195 | static inline void | ||
196 | flush_kernel_dcache_page(struct page *page) | ||
197 | { | ||
198 | flush_kernel_dcache_page_asm(page_address(page)); | ||
199 | } | ||
200 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE | ||
201 | |||
187 | #ifdef CONFIG_DEBUG_RODATA | 202 | #ifdef CONFIG_DEBUG_RODATA |
188 | void mark_rodata_ro(void); | 203 | void mark_rodata_ro(void); |
189 | #endif | 204 | #endif |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index be0c7234a6da..29da31194b91 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -25,35 +25,11 @@ extern unsigned long parisc_vmerge_max_size; | |||
25 | * eg dev->hpa or 0xfee00000. | 25 | * eg dev->hpa or 0xfee00000. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifdef CONFIG_DEBUG_IOREMAP | ||
29 | #ifdef CONFIG_64BIT | ||
30 | #define NYBBLE_SHIFT 60 | ||
31 | #else | ||
32 | #define NYBBLE_SHIFT 28 | ||
33 | #endif | ||
34 | extern void gsc_bad_addr(unsigned long addr); | ||
35 | extern void __raw_bad_addr(const volatile void __iomem *addr); | ||
36 | #define gsc_check_addr(addr) \ | ||
37 | if ((addr >> NYBBLE_SHIFT) != 0xf) { \ | ||
38 | gsc_bad_addr(addr); \ | ||
39 | addr |= 0xfUL << NYBBLE_SHIFT; \ | ||
40 | } | ||
41 | #define __raw_check_addr(addr) \ | ||
42 | if (((unsigned long)addr >> NYBBLE_SHIFT) != 0xe) \ | ||
43 | __raw_bad_addr(addr); \ | ||
44 | addr = (void __iomem *)((unsigned long)addr | (0xfUL << NYBBLE_SHIFT)); | ||
45 | #else | ||
46 | #define gsc_check_addr(addr) | ||
47 | #define __raw_check_addr(addr) | ||
48 | #endif | ||
49 | |||
50 | static inline unsigned char gsc_readb(unsigned long addr) | 28 | static inline unsigned char gsc_readb(unsigned long addr) |
51 | { | 29 | { |
52 | long flags; | 30 | long flags; |
53 | unsigned char ret; | 31 | unsigned char ret; |
54 | 32 | ||
55 | gsc_check_addr(addr); | ||
56 | |||
57 | __asm__ __volatile__( | 33 | __asm__ __volatile__( |
58 | " rsm 2,%0\n" | 34 | " rsm 2,%0\n" |
59 | " ldbx 0(%2),%1\n" | 35 | " ldbx 0(%2),%1\n" |
@@ -68,8 +44,6 @@ static inline unsigned short gsc_readw(unsigned long addr) | |||
68 | long flags; | 44 | long flags; |
69 | unsigned short ret; | 45 | unsigned short ret; |
70 | 46 | ||
71 | gsc_check_addr(addr); | ||
72 | |||
73 | __asm__ __volatile__( | 47 | __asm__ __volatile__( |
74 | " rsm 2,%0\n" | 48 | " rsm 2,%0\n" |
75 | " ldhx 0(%2),%1\n" | 49 | " ldhx 0(%2),%1\n" |
@@ -83,8 +57,6 @@ static inline unsigned int gsc_readl(unsigned long addr) | |||
83 | { | 57 | { |
84 | u32 ret; | 58 | u32 ret; |
85 | 59 | ||
86 | gsc_check_addr(addr); | ||
87 | |||
88 | __asm__ __volatile__( | 60 | __asm__ __volatile__( |
89 | " ldwax 0(%1),%0\n" | 61 | " ldwax 0(%1),%0\n" |
90 | : "=r" (ret) : "r" (addr) ); | 62 | : "=r" (ret) : "r" (addr) ); |
@@ -95,7 +67,6 @@ static inline unsigned int gsc_readl(unsigned long addr) | |||
95 | static inline unsigned long long gsc_readq(unsigned long addr) | 67 | static inline unsigned long long gsc_readq(unsigned long addr) |
96 | { | 68 | { |
97 | unsigned long long ret; | 69 | unsigned long long ret; |
98 | gsc_check_addr(addr); | ||
99 | 70 | ||
100 | #ifdef __LP64__ | 71 | #ifdef __LP64__ |
101 | __asm__ __volatile__( | 72 | __asm__ __volatile__( |
@@ -112,8 +83,6 @@ static inline unsigned long long gsc_readq(unsigned long addr) | |||
112 | static inline void gsc_writeb(unsigned char val, unsigned long addr) | 83 | static inline void gsc_writeb(unsigned char val, unsigned long addr) |
113 | { | 84 | { |
114 | long flags; | 85 | long flags; |
115 | gsc_check_addr(addr); | ||
116 | |||
117 | __asm__ __volatile__( | 86 | __asm__ __volatile__( |
118 | " rsm 2,%0\n" | 87 | " rsm 2,%0\n" |
119 | " stbs %1,0(%2)\n" | 88 | " stbs %1,0(%2)\n" |
@@ -124,8 +93,6 @@ static inline void gsc_writeb(unsigned char val, unsigned long addr) | |||
124 | static inline void gsc_writew(unsigned short val, unsigned long addr) | 93 | static inline void gsc_writew(unsigned short val, unsigned long addr) |
125 | { | 94 | { |
126 | long flags; | 95 | long flags; |
127 | gsc_check_addr(addr); | ||
128 | |||
129 | __asm__ __volatile__( | 96 | __asm__ __volatile__( |
130 | " rsm 2,%0\n" | 97 | " rsm 2,%0\n" |
131 | " sths %1,0(%2)\n" | 98 | " sths %1,0(%2)\n" |
@@ -135,8 +102,6 @@ static inline void gsc_writew(unsigned short val, unsigned long addr) | |||
135 | 102 | ||
136 | static inline void gsc_writel(unsigned int val, unsigned long addr) | 103 | static inline void gsc_writel(unsigned int val, unsigned long addr) |
137 | { | 104 | { |
138 | gsc_check_addr(addr); | ||
139 | |||
140 | __asm__ __volatile__( | 105 | __asm__ __volatile__( |
141 | " stwas %0,0(%1)\n" | 106 | " stwas %0,0(%1)\n" |
142 | : : "r" (val), "r" (addr) ); | 107 | : : "r" (val), "r" (addr) ); |
@@ -144,8 +109,6 @@ static inline void gsc_writel(unsigned int val, unsigned long addr) | |||
144 | 109 | ||
145 | static inline void gsc_writeq(unsigned long long val, unsigned long addr) | 110 | static inline void gsc_writeq(unsigned long long val, unsigned long addr) |
146 | { | 111 | { |
147 | gsc_check_addr(addr); | ||
148 | |||
149 | #ifdef __LP64__ | 112 | #ifdef __LP64__ |
150 | __asm__ __volatile__( | 113 | __asm__ __volatile__( |
151 | " stda %0,0(%1)\n" | 114 | " stda %0,0(%1)\n" |
@@ -180,14 +143,7 @@ extern inline void * ioremap_nocache(unsigned long offset, unsigned long size) | |||
180 | 143 | ||
181 | extern void iounmap(void __iomem *addr); | 144 | extern void iounmap(void __iomem *addr); |
182 | 145 | ||
183 | /* | ||
184 | * USE_HPPA_IOREMAP is the magic flag to enable or disable real ioremap() | ||
185 | * functionality. It's currently disabled because it may not work on some | ||
186 | * machines. | ||
187 | */ | ||
188 | #define USE_HPPA_IOREMAP 0 | ||
189 | 146 | ||
190 | #if USE_HPPA_IOREMAP | ||
191 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) | 147 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) |
192 | { | 148 | { |
193 | return (*(volatile unsigned char __force *) (addr)); | 149 | return (*(volatile unsigned char __force *) (addr)); |
@@ -221,57 +177,6 @@ static inline void __raw_writeq(unsigned long long b, volatile void __iomem *add | |||
221 | { | 177 | { |
222 | *(volatile unsigned long long __force *) addr = b; | 178 | *(volatile unsigned long long __force *) addr = b; |
223 | } | 179 | } |
224 | #else /* !USE_HPPA_IOREMAP */ | ||
225 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) | ||
226 | { | ||
227 | __raw_check_addr(addr); | ||
228 | |||
229 | return gsc_readb((unsigned long) addr); | ||
230 | } | ||
231 | static inline unsigned short __raw_readw(const volatile void __iomem *addr) | ||
232 | { | ||
233 | __raw_check_addr(addr); | ||
234 | |||
235 | return gsc_readw((unsigned long) addr); | ||
236 | } | ||
237 | static inline unsigned int __raw_readl(const volatile void __iomem *addr) | ||
238 | { | ||
239 | __raw_check_addr(addr); | ||
240 | |||
241 | return gsc_readl((unsigned long) addr); | ||
242 | } | ||
243 | static inline unsigned long long __raw_readq(const volatile void __iomem *addr) | ||
244 | { | ||
245 | __raw_check_addr(addr); | ||
246 | |||
247 | return gsc_readq((unsigned long) addr); | ||
248 | } | ||
249 | |||
250 | static inline void __raw_writeb(unsigned char b, volatile void __iomem *addr) | ||
251 | { | ||
252 | __raw_check_addr(addr); | ||
253 | |||
254 | gsc_writeb(b, (unsigned long) addr); | ||
255 | } | ||
256 | static inline void __raw_writew(unsigned short b, volatile void __iomem *addr) | ||
257 | { | ||
258 | __raw_check_addr(addr); | ||
259 | |||
260 | gsc_writew(b, (unsigned long) addr); | ||
261 | } | ||
262 | static inline void __raw_writel(unsigned int b, volatile void __iomem *addr) | ||
263 | { | ||
264 | __raw_check_addr(addr); | ||
265 | |||
266 | gsc_writel(b, (unsigned long) addr); | ||
267 | } | ||
268 | static inline void __raw_writeq(unsigned long long b, volatile void __iomem *addr) | ||
269 | { | ||
270 | __raw_check_addr(addr); | ||
271 | |||
272 | gsc_writeq(b, (unsigned long) addr); | ||
273 | } | ||
274 | #endif /* !USE_HPPA_IOREMAP */ | ||
275 | 180 | ||
276 | /* readb can never be const, so use __fswab instead of le*_to_cpu */ | 181 | /* readb can never be const, so use __fswab instead of le*_to_cpu */ |
277 | #define readb(addr) __raw_readb(addr) | 182 | #define readb(addr) __raw_readb(addr) |
diff --git a/include/asm-parisc/local.h b/include/asm-parisc/local.h index 892b3b2c4962..d0f550912755 100644 --- a/include/asm-parisc/local.h +++ b/include/asm-parisc/local.h | |||
@@ -4,16 +4,16 @@ | |||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | #include <asm/atomic.h> | 5 | #include <asm/atomic.h> |
6 | 6 | ||
7 | typedef atomic_t local_t; | 7 | typedef atomic_long_t local_t; |
8 | 8 | ||
9 | #define LOCAL_INIT(i) ATOMIC_INIT(i) | 9 | #define LOCAL_INIT(i) ATOMIC_LONG_INIT(i) |
10 | #define local_read(v) atomic_read(v) | 10 | #define local_read(v) atomic_long_read(v) |
11 | #define local_set(v,i) atomic_set(v,i) | 11 | #define local_set(v,i) atomic_long_set(v,i) |
12 | 12 | ||
13 | #define local_inc(v) atomic_inc(v) | 13 | #define local_inc(v) atomic_long_inc(v) |
14 | #define local_dec(v) atomic_dec(v) | 14 | #define local_dec(v) atomic_long_dec(v) |
15 | #define local_add(i, v) atomic_add(i, v) | 15 | #define local_add(i, v) atomic_long_add(i, v) |
16 | #define local_sub(i, v) atomic_sub(i, v) | 16 | #define local_sub(i, v) atomic_long_sub(i, v) |
17 | 17 | ||
18 | #define __local_inc(v) ((v)->counter++) | 18 | #define __local_inc(v) ((v)->counter++) |
19 | #define __local_dec(v) ((v)->counter--) | 19 | #define __local_dec(v) ((v)->counter--) |
diff --git a/include/asm-parisc/numnodes.h b/include/asm-parisc/numnodes.h deleted file mode 100644 index 6c67651efd1c..000000000000 --- a/include/asm-parisc/numnodes.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _ASM_MAX_NUMNODES_H | ||
2 | #define _ASM_MAX_NUMNODES_H | ||
3 | |||
4 | /* Max 8 Nodes */ | ||
5 | #define NODES_SHIFT 3 | ||
6 | |||
7 | #endif /* _ASM_MAX_NUMNODES_H */ | ||
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 9f303c0c3cd7..45e02aa5bf4b 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -26,7 +26,7 @@ static inline void | |||
26 | copy_user_page(void *vto, void *vfrom, unsigned long vaddr, struct page *pg) | 26 | copy_user_page(void *vto, void *vfrom, unsigned long vaddr, struct page *pg) |
27 | { | 27 | { |
28 | copy_user_page_asm(vto, vfrom); | 28 | copy_user_page_asm(vto, vfrom); |
29 | flush_kernel_dcache_page(vto); | 29 | flush_kernel_dcache_page_asm(vto); |
30 | /* XXX: ppc flushes icache too, should we? */ | 30 | /* XXX: ppc flushes icache too, should we? */ |
31 | } | 31 | } |
32 | 32 | ||
@@ -40,14 +40,19 @@ clear_user_page(void *page, unsigned long vaddr, struct page *pg) | |||
40 | /* | 40 | /* |
41 | * These are used to make use of C type-checking.. | 41 | * These are used to make use of C type-checking.. |
42 | */ | 42 | */ |
43 | #ifdef __LP64__ | 43 | #define STRICT_MM_TYPECHECKS |
44 | typedef struct { unsigned long pte; } pte_t; | 44 | #ifdef STRICT_MM_TYPECHECKS |
45 | #else | 45 | typedef struct { unsigned long pte; |
46 | typedef struct { | 46 | #if !defined(CONFIG_64BIT) |
47 | unsigned long pte; | 47 | unsigned long future_flags; |
48 | unsigned long flags; | 48 | /* XXX: it's possible to remove future_flags and change BITS_PER_PTE_ENTRY |
49 | } pte_t; | 49 | to 2, but then strangely the identical 32bit kernel boots on a |
50 | c3000(pa20), but not any longer on a 715(pa11). | ||
51 | Still investigating... HelgeD. | ||
52 | */ | ||
50 | #endif | 53 | #endif |
54 | } pte_t; /* either 32 or 64bit */ | ||
55 | |||
51 | /* NOTE: even on 64 bits, these entries are __u32 because we allocate | 56 | /* NOTE: even on 64 bits, these entries are __u32 because we allocate |
52 | * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */ | 57 | * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */ |
53 | typedef struct { __u32 pmd; } pmd_t; | 58 | typedef struct { __u32 pmd; } pmd_t; |
@@ -55,25 +60,44 @@ typedef struct { __u32 pgd; } pgd_t; | |||
55 | typedef struct { unsigned long pgprot; } pgprot_t; | 60 | typedef struct { unsigned long pgprot; } pgprot_t; |
56 | 61 | ||
57 | #define pte_val(x) ((x).pte) | 62 | #define pte_val(x) ((x).pte) |
58 | #ifdef __LP64__ | ||
59 | #define pte_flags(x) (*(__u32 *)&((x).pte)) | ||
60 | #else | ||
61 | #define pte_flags(x) ((x).flags) | ||
62 | #endif | ||
63 | |||
64 | /* These do not work lvalues, so make sure we don't use them as such. */ | 63 | /* These do not work lvalues, so make sure we don't use them as such. */ |
65 | #define pmd_val(x) ((x).pmd + 0) | 64 | #define pmd_val(x) ((x).pmd + 0) |
66 | #define pgd_val(x) ((x).pgd + 0) | 65 | #define pgd_val(x) ((x).pgd + 0) |
67 | #define pgprot_val(x) ((x).pgprot) | 66 | #define pgprot_val(x) ((x).pgprot) |
68 | 67 | ||
69 | #define __pmd_val_set(x,n) (x).pmd = (n) | ||
70 | #define __pgd_val_set(x,n) (x).pgd = (n) | ||
71 | |||
72 | #define __pte(x) ((pte_t) { (x) } ) | 68 | #define __pte(x) ((pte_t) { (x) } ) |
73 | #define __pmd(x) ((pmd_t) { (x) } ) | 69 | #define __pmd(x) ((pmd_t) { (x) } ) |
74 | #define __pgd(x) ((pgd_t) { (x) } ) | 70 | #define __pgd(x) ((pgd_t) { (x) } ) |
75 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 71 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
76 | 72 | ||
73 | #define __pmd_val_set(x,n) (x).pmd = (n) | ||
74 | #define __pgd_val_set(x,n) (x).pgd = (n) | ||
75 | |||
76 | #else | ||
77 | /* | ||
78 | * .. while these make it easier on the compiler | ||
79 | */ | ||
80 | typedef unsigned long pte_t; | ||
81 | typedef __u32 pmd_t; | ||
82 | typedef __u32 pgd_t; | ||
83 | typedef unsigned long pgprot_t; | ||
84 | |||
85 | #define pte_val(x) (x) | ||
86 | #define pmd_val(x) (x) | ||
87 | #define pgd_val(x) (x) | ||
88 | #define pgprot_val(x) (x) | ||
89 | |||
90 | #define __pte(x) (x) | ||
91 | #define __pmd(x) (x) | ||
92 | #define __pgd(x) (x) | ||
93 | #define __pgprot(x) (x) | ||
94 | |||
95 | #define __pmd_val_set(x,n) (x) = (n) | ||
96 | #define __pgd_val_set(x,n) (x) = (n) | ||
97 | |||
98 | #endif /* STRICT_MM_TYPECHECKS */ | ||
99 | |||
100 | |||
77 | typedef struct __physmem_range { | 101 | typedef struct __physmem_range { |
78 | unsigned long start_pfn; | 102 | unsigned long start_pfn; |
79 | unsigned long pages; /* PAGE_SIZE pages */ | 103 | unsigned long pages; /* PAGE_SIZE pages */ |
diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index fe7f6a2f5aa7..77bbafb7f73e 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h | |||
@@ -289,4 +289,9 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |||
289 | { | 289 | { |
290 | } | 290 | } |
291 | 291 | ||
292 | static inline void pcibios_penalize_isa_irq(int irq, int active) | ||
293 | { | ||
294 | /* We don't need to penalize isa irq's */ | ||
295 | } | ||
296 | |||
292 | #endif /* __ASM_PARISC_PCI_H */ | 297 | #endif /* __ASM_PARISC_PCI_H */ |
diff --git a/include/asm-parisc/pdc_chassis.h b/include/asm-parisc/pdc_chassis.h index adac9ac2743f..a609273dc6bf 100644 --- a/include/asm-parisc/pdc_chassis.h +++ b/include/asm-parisc/pdc_chassis.h | |||
@@ -6,9 +6,8 @@ | |||
6 | * | 6 | * |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License, version 2, as |
10 | * the Free Software Foundation; either version 2, or (at your option) | 10 | * published by the Free Software Foundation. |
11 | * any later version. | ||
12 | * | 11 | * |
13 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
diff --git a/include/asm-parisc/spinlock.h b/include/asm-parisc/spinlock.h index 16c2ac075fc5..a93960e232cf 100644 --- a/include/asm-parisc/spinlock.h +++ b/include/asm-parisc/spinlock.h | |||
@@ -134,14 +134,22 @@ static __inline__ int __raw_write_trylock(raw_rwlock_t *rw) | |||
134 | return 1; | 134 | return 1; |
135 | } | 135 | } |
136 | 136 | ||
137 | static __inline__ int __raw_is_read_locked(raw_rwlock_t *rw) | 137 | /* |
138 | * read_can_lock - would read_trylock() succeed? | ||
139 | * @lock: the rwlock in question. | ||
140 | */ | ||
141 | static __inline__ int __raw_read_can_lock(raw_rwlock_t *rw) | ||
138 | { | 142 | { |
139 | return rw->counter > 0; | 143 | return rw->counter >= 0; |
140 | } | 144 | } |
141 | 145 | ||
142 | static __inline__ int __raw_is_write_locked(raw_rwlock_t *rw) | 146 | /* |
147 | * write_can_lock - would write_trylock() succeed? | ||
148 | * @lock: the rwlock in question. | ||
149 | */ | ||
150 | static __inline__ int __raw_write_can_lock(raw_rwlock_t *rw) | ||
143 | { | 151 | { |
144 | return rw->counter < 0; | 152 | return !rw->counter; |
145 | } | 153 | } |
146 | 154 | ||
147 | #endif /* __ASM_SPINLOCK_H */ | 155 | #endif /* __ASM_SPINLOCK_H */ |
diff --git a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h index ac32f140b83a..f2f83b04cd8b 100644 --- a/include/asm-parisc/thread_info.h +++ b/include/asm-parisc/thread_info.h | |||
@@ -49,7 +49,8 @@ struct thread_info { | |||
49 | 49 | ||
50 | #endif /* !__ASSEMBLY */ | 50 | #endif /* !__ASSEMBLY */ |
51 | 51 | ||
52 | #define PREEMPT_ACTIVE 0x10000000 | 52 | #define PREEMPT_ACTIVE_BIT 28 |
53 | #define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT) | ||
53 | 54 | ||
54 | /* | 55 | /* |
55 | * thread information flags | 56 | * thread information flags |
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index 5207758a6dd9..868c7139dbff 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h | |||
@@ -60,24 +60,10 @@ void __init pci_addr_cache_build(void); | |||
60 | * device (including config space i/o). Call eeh_add_device_late | 60 | * device (including config space i/o). Call eeh_add_device_late |
61 | * to finish the eeh setup for this device. | 61 | * to finish the eeh setup for this device. |
62 | */ | 62 | */ |
63 | void eeh_add_device_early(struct device_node *); | ||
64 | void eeh_add_device_late(struct pci_dev *dev); | ||
65 | void eeh_add_device_tree_early(struct device_node *); | 63 | void eeh_add_device_tree_early(struct device_node *); |
66 | void eeh_add_device_tree_late(struct pci_bus *); | 64 | void eeh_add_device_tree_late(struct pci_bus *); |
67 | 65 | ||
68 | /** | 66 | /** |
69 | * eeh_remove_device - undo EEH setup for the indicated pci device | ||
70 | * @dev: pci device to be removed | ||
71 | * | ||
72 | * This routine should be called when a device is removed from | ||
73 | * a running system (e.g. by hotplug or dlpar). It unregisters | ||
74 | * the PCI device from the EEH subsystem. I/O errors affecting | ||
75 | * this device will no longer be detected after this call; thus, | ||
76 | * i/o errors affecting this slot may leave this device unusable. | ||
77 | */ | ||
78 | void eeh_remove_device(struct pci_dev *); | ||
79 | |||
80 | /** | ||
81 | * eeh_remove_device_recursive - undo EEH for device & children. | 67 | * eeh_remove_device_recursive - undo EEH for device & children. |
82 | * @dev: pci device to be removed | 68 | * @dev: pci device to be removed |
83 | * | 69 | * |
@@ -116,12 +102,6 @@ static inline int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *d | |||
116 | 102 | ||
117 | static inline void pci_addr_cache_build(void) { } | 103 | static inline void pci_addr_cache_build(void) { } |
118 | 104 | ||
119 | static inline void eeh_add_device_early(struct device_node *dn) { } | ||
120 | |||
121 | static inline void eeh_add_device_late(struct pci_dev *dev) { } | ||
122 | |||
123 | static inline void eeh_remove_device(struct pci_dev *dev) { } | ||
124 | |||
125 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } | 105 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } |
126 | 106 | ||
127 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } | 107 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } |
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index b72c04f3f551..6cc7e1fb7bfd 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
@@ -4,47 +4,88 @@ | |||
4 | 4 | ||
5 | #define HVSC .long 0x44000022 | 5 | #define HVSC .long 0x44000022 |
6 | 6 | ||
7 | #define H_Success 0 | 7 | #define H_SUCCESS 0 |
8 | #define H_Busy 1 /* Hardware busy -- retry later */ | 8 | #define H_BUSY 1 /* Hardware busy -- retry later */ |
9 | #define H_Closed 2 /* Resource closed */ | 9 | #define H_CLOSED 2 /* Resource closed */ |
10 | #define H_Constrained 4 /* Resource request constrained to max allowed */ | 10 | #define H_NOT_AVAILABLE 3 |
11 | #define H_InProgress 14 /* Kind of like busy */ | 11 | #define H_CONSTRAINED 4 /* Resource request constrained to max allowed */ |
12 | #define H_Pending 17 /* returned from H_POLL_PENDING */ | 12 | #define H_PARTIAL 5 |
13 | #define H_Continue 18 /* Returned from H_Join on success */ | 13 | #define H_IN_PROGRESS 14 /* Kind of like busy */ |
14 | #define H_LongBusyStartRange 9900 /* Start of long busy range */ | 14 | #define H_PAGE_REGISTERED 15 |
15 | #define H_LongBusyOrder1msec 9900 /* Long busy, hint that 1msec is a good time to retry */ | 15 | #define H_PARTIAL_STORE 16 |
16 | #define H_LongBusyOrder10msec 9901 /* Long busy, hint that 10msec is a good time to retry */ | 16 | #define H_PENDING 17 /* returned from H_POLL_PENDING */ |
17 | #define H_LongBusyOrder100msec 9902 /* Long busy, hint that 100msec is a good time to retry */ | 17 | #define H_CONTINUE 18 /* Returned from H_Join on success */ |
18 | #define H_LongBusyOrder1sec 9903 /* Long busy, hint that 1sec is a good time to retry */ | 18 | #define H_LONG_BUSY_START_RANGE 9900 /* Start of long busy range */ |
19 | #define H_LongBusyOrder10sec 9904 /* Long busy, hint that 10sec is a good time to retry */ | 19 | #define H_LONG_BUSY_ORDER_1_MSEC 9900 /* Long busy, hint that 1msec \ |
20 | #define H_LongBusyOrder100sec 9905 /* Long busy, hint that 100sec is a good time to retry */ | 20 | is a good time to retry */ |
21 | #define H_LongBusyEndRange 9905 /* End of long busy range */ | 21 | #define H_LONG_BUSY_ORDER_10_MSEC 9901 /* Long busy, hint that 10msec \ |
22 | #define H_Hardware -1 /* Hardware error */ | 22 | is a good time to retry */ |
23 | #define H_Function -2 /* Function not supported */ | 23 | #define H_LONG_BUSY_ORDER_100_MSEC 9902 /* Long busy, hint that 100msec \ |
24 | #define H_Privilege -3 /* Caller not privileged */ | 24 | is a good time to retry */ |
25 | #define H_Parameter -4 /* Parameter invalid, out-of-range or conflicting */ | 25 | #define H_LONG_BUSY_ORDER_1_SEC 9903 /* Long busy, hint that 1sec \ |
26 | #define H_Bad_Mode -5 /* Illegal msr value */ | 26 | is a good time to retry */ |
27 | #define H_PTEG_Full -6 /* PTEG is full */ | 27 | #define H_LONG_BUSY_ORDER_10_SEC 9904 /* Long busy, hint that 10sec \ |
28 | #define H_Not_Found -7 /* PTE was not found" */ | 28 | is a good time to retry */ |
29 | #define H_Reserved_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ | 29 | #define H_LONG_BUSY_ORDER_100_SEC 9905 /* Long busy, hint that 100sec \ |
30 | #define H_NoMem -9 | 30 | is a good time to retry */ |
31 | #define H_Authority -10 | 31 | #define H_LONG_BUSY_END_RANGE 9905 /* End of long busy range */ |
32 | #define H_Permission -11 | 32 | #define H_HARDWARE -1 /* Hardware error */ |
33 | #define H_Dropped -12 | 33 | #define H_FUNCTION -2 /* Function not supported */ |
34 | #define H_SourceParm -13 | 34 | #define H_PRIVILEGE -3 /* Caller not privileged */ |
35 | #define H_DestParm -14 | 35 | #define H_PARAMETER -4 /* Parameter invalid, out-of-range or conflicting */ |
36 | #define H_RemoteParm -15 | 36 | #define H_BAD_MODE -5 /* Illegal msr value */ |
37 | #define H_Resource -16 | 37 | #define H_PTEG_FULL -6 /* PTEG is full */ |
38 | #define H_NOT_FOUND -7 /* PTE was not found" */ | ||
39 | #define H_RESERVED_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ | ||
40 | #define H_NO_MEM -9 | ||
41 | #define H_AUTHORITY -10 | ||
42 | #define H_PERMISSION -11 | ||
43 | #define H_DROPPED -12 | ||
44 | #define H_SOURCE_PARM -13 | ||
45 | #define H_DEST_PARM -14 | ||
46 | #define H_REMOTE_PARM -15 | ||
47 | #define H_RESOURCE -16 | ||
48 | #define H_ADAPTER_PARM -17 | ||
49 | #define H_RH_PARM -18 | ||
50 | #define H_RCQ_PARM -19 | ||
51 | #define H_SCQ_PARM -20 | ||
52 | #define H_EQ_PARM -21 | ||
53 | #define H_RT_PARM -22 | ||
54 | #define H_ST_PARM -23 | ||
55 | #define H_SIGT_PARM -24 | ||
56 | #define H_TOKEN_PARM -25 | ||
57 | #define H_MLENGTH_PARM -27 | ||
58 | #define H_MEM_PARM -28 | ||
59 | #define H_MEM_ACCESS_PARM -29 | ||
60 | #define H_ATTR_PARM -30 | ||
61 | #define H_PORT_PARM -31 | ||
62 | #define H_MCG_PARM -32 | ||
63 | #define H_VL_PARM -33 | ||
64 | #define H_TSIZE_PARM -34 | ||
65 | #define H_TRACE_PARM -35 | ||
66 | |||
67 | #define H_MASK_PARM -37 | ||
68 | #define H_MCG_FULL -38 | ||
69 | #define H_ALIAS_EXIST -39 | ||
70 | #define H_P_COUNTER -40 | ||
71 | #define H_TABLE_FULL -41 | ||
72 | #define H_ALT_TABLE -42 | ||
73 | #define H_MR_CONDITION -43 | ||
74 | #define H_NOT_ENOUGH_RESOURCES -44 | ||
75 | #define H_R_STATE -45 | ||
76 | #define H_RESCINDEND -46 | ||
77 | |||
38 | 78 | ||
39 | /* Long Busy is a condition that can be returned by the firmware | 79 | /* Long Busy is a condition that can be returned by the firmware |
40 | * when a call cannot be completed now, but the identical call | 80 | * when a call cannot be completed now, but the identical call |
41 | * should be retried later. This prevents calls blocking in the | 81 | * should be retried later. This prevents calls blocking in the |
42 | * firmware for long periods of time. Annoyingly the firmware can return | 82 | * firmware for long periods of time. Annoyingly the firmware can return |
43 | * a range of return codes, hinting at how long we should wait before | 83 | * a range of return codes, hinting at how long we should wait before |
44 | * retrying. If you don't care for the hint, the macro below is a good | 84 | * retrying. If you don't care for the hint, the macro below is a good |
45 | * way to check for the long_busy return codes | 85 | * way to check for the long_busy return codes |
46 | */ | 86 | */ |
47 | #define H_isLongBusy(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange)) | 87 | #define H_IS_LONG_BUSY(x) ((x >= H_LONG_BUSY_START_RANGE) \ |
88 | && (x <= H_LONG_BUSY_END_RANGE)) | ||
48 | 89 | ||
49 | /* Flags */ | 90 | /* Flags */ |
50 | #define H_LARGE_PAGE (1UL<<(63-16)) | 91 | #define H_LARGE_PAGE (1UL<<(63-16)) |
@@ -66,6 +107,9 @@ | |||
66 | #define H_DABRX_KERNEL (1UL<<(63-62)) | 107 | #define H_DABRX_KERNEL (1UL<<(63-62)) |
67 | #define H_DABRX_USER (1UL<<(63-63)) | 108 | #define H_DABRX_USER (1UL<<(63-63)) |
68 | 109 | ||
110 | /* Each control block has to be on a 4K bondary */ | ||
111 | #define H_CB_ALIGNMENT 4096 | ||
112 | |||
69 | /* pSeries hypervisor opcodes */ | 113 | /* pSeries hypervisor opcodes */ |
70 | #define H_REMOVE 0x04 | 114 | #define H_REMOVE 0x04 |
71 | #define H_ENTER 0x08 | 115 | #define H_ENTER 0x08 |
@@ -99,25 +143,52 @@ | |||
99 | #define H_PERFMON 0x7c | 143 | #define H_PERFMON 0x7c |
100 | #define H_MIGRATE_DMA 0x78 | 144 | #define H_MIGRATE_DMA 0x78 |
101 | #define H_REGISTER_VPA 0xDC | 145 | #define H_REGISTER_VPA 0xDC |
102 | #define H_CEDE 0xE0 | 146 | #define H_CEDE 0xE0 |
103 | #define H_CONFER 0xE4 | 147 | #define H_CONFER 0xE4 |
104 | #define H_PROD 0xE8 | 148 | #define H_PROD 0xE8 |
105 | #define H_GET_PPP 0xEC | 149 | #define H_GET_PPP 0xEC |
106 | #define H_SET_PPP 0xF0 | 150 | #define H_SET_PPP 0xF0 |
107 | #define H_PURR 0xF4 | 151 | #define H_PURR 0xF4 |
108 | #define H_PIC 0xF8 | 152 | #define H_PIC 0xF8 |
109 | #define H_REG_CRQ 0xFC | 153 | #define H_REG_CRQ 0xFC |
110 | #define H_FREE_CRQ 0x100 | 154 | #define H_FREE_CRQ 0x100 |
111 | #define H_VIO_SIGNAL 0x104 | 155 | #define H_VIO_SIGNAL 0x104 |
112 | #define H_SEND_CRQ 0x108 | 156 | #define H_SEND_CRQ 0x108 |
113 | #define H_COPY_RDMA 0x110 | 157 | #define H_COPY_RDMA 0x110 |
114 | #define H_SET_XDABR 0x134 | 158 | #define H_SET_XDABR 0x134 |
115 | #define H_STUFF_TCE 0x138 | 159 | #define H_STUFF_TCE 0x138 |
116 | #define H_PUT_TCE_INDIRECT 0x13C | 160 | #define H_PUT_TCE_INDIRECT 0x13C |
117 | #define H_VTERM_PARTNER_INFO 0x150 | 161 | #define H_VTERM_PARTNER_INFO 0x150 |
118 | #define H_REGISTER_VTERM 0x154 | 162 | #define H_REGISTER_VTERM 0x154 |
119 | #define H_FREE_VTERM 0x158 | 163 | #define H_FREE_VTERM 0x158 |
120 | #define H_POLL_PENDING 0x1D8 | 164 | #define H_RESET_EVENTS 0x15C |
165 | #define H_ALLOC_RESOURCE 0x160 | ||
166 | #define H_FREE_RESOURCE 0x164 | ||
167 | #define H_MODIFY_QP 0x168 | ||
168 | #define H_QUERY_QP 0x16C | ||
169 | #define H_REREGISTER_PMR 0x170 | ||
170 | #define H_REGISTER_SMR 0x174 | ||
171 | #define H_QUERY_MR 0x178 | ||
172 | #define H_QUERY_MW 0x17C | ||
173 | #define H_QUERY_HCA 0x180 | ||
174 | #define H_QUERY_PORT 0x184 | ||
175 | #define H_MODIFY_PORT 0x188 | ||
176 | #define H_DEFINE_AQP1 0x18C | ||
177 | #define H_GET_TRACE_BUFFER 0x190 | ||
178 | #define H_DEFINE_AQP0 0x194 | ||
179 | #define H_RESIZE_MR 0x198 | ||
180 | #define H_ATTACH_MCQP 0x19C | ||
181 | #define H_DETACH_MCQP 0x1A0 | ||
182 | #define H_CREATE_RPT 0x1A4 | ||
183 | #define H_REMOVE_RPT 0x1A8 | ||
184 | #define H_REGISTER_RPAGES 0x1AC | ||
185 | #define H_DISABLE_AND_GETC 0x1B0 | ||
186 | #define H_ERROR_DATA 0x1B4 | ||
187 | #define H_GET_HCA_INFO 0x1B8 | ||
188 | #define H_GET_PERF_COUNT 0x1BC | ||
189 | #define H_MANAGE_TRACE 0x1C0 | ||
190 | #define H_QUERY_INT_STATE 0x1E4 | ||
191 | #define H_POLL_PENDING 0x1D8 | ||
121 | #define H_JOIN 0x298 | 192 | #define H_JOIN 0x298 |
122 | #define H_ENABLE_CRQ 0x2B0 | 193 | #define H_ENABLE_CRQ 0x2B0 |
123 | 194 | ||
@@ -152,7 +223,7 @@ long plpar_hcall_norets(unsigned long opcode, ...); | |||
152 | */ | 223 | */ |
153 | long plpar_hcall_8arg_2ret(unsigned long opcode, | 224 | long plpar_hcall_8arg_2ret(unsigned long opcode, |
154 | unsigned long arg1, | 225 | unsigned long arg1, |
155 | unsigned long arg2, | 226 | unsigned long arg2, |
156 | unsigned long arg3, | 227 | unsigned long arg3, |
157 | unsigned long arg4, | 228 | unsigned long arg4, |
158 | unsigned long arg5, | 229 | unsigned long arg5, |
@@ -176,6 +247,42 @@ long plpar_hcall_4out(unsigned long opcode, | |||
176 | unsigned long *out3, | 247 | unsigned long *out3, |
177 | unsigned long *out4); | 248 | unsigned long *out4); |
178 | 249 | ||
250 | long plpar_hcall_7arg_7ret(unsigned long opcode, | ||
251 | unsigned long arg1, | ||
252 | unsigned long arg2, | ||
253 | unsigned long arg3, | ||
254 | unsigned long arg4, | ||
255 | unsigned long arg5, | ||
256 | unsigned long arg6, | ||
257 | unsigned long arg7, | ||
258 | unsigned long *out1, | ||
259 | unsigned long *out2, | ||
260 | unsigned long *out3, | ||
261 | unsigned long *out4, | ||
262 | unsigned long *out5, | ||
263 | unsigned long *out6, | ||
264 | unsigned long *out7); | ||
265 | |||
266 | long plpar_hcall_9arg_9ret(unsigned long opcode, | ||
267 | unsigned long arg1, | ||
268 | unsigned long arg2, | ||
269 | unsigned long arg3, | ||
270 | unsigned long arg4, | ||
271 | unsigned long arg5, | ||
272 | unsigned long arg6, | ||
273 | unsigned long arg7, | ||
274 | unsigned long arg8, | ||
275 | unsigned long arg9, | ||
276 | unsigned long *out1, | ||
277 | unsigned long *out2, | ||
278 | unsigned long *out3, | ||
279 | unsigned long *out4, | ||
280 | unsigned long *out5, | ||
281 | unsigned long *out6, | ||
282 | unsigned long *out7, | ||
283 | unsigned long *out8, | ||
284 | unsigned long *out9); | ||
285 | |||
179 | #endif /* __ASSEMBLY__ */ | 286 | #endif /* __ASSEMBLY__ */ |
180 | #endif /* __KERNEL__ */ | 287 | #endif /* __KERNEL__ */ |
181 | #endif /* _ASM_POWERPC_HVCALL_H */ | 288 | #endif /* _ASM_POWERPC_HVCALL_H */ |
diff --git a/include/asm-powerpc/numnodes.h b/include/asm-powerpc/numnodes.h deleted file mode 100644 index e138edae09dd..000000000000 --- a/include/asm-powerpc/numnodes.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _ASM_POWERPC_MAX_NUMNODES_H | ||
2 | #define _ASM_POWERPC_MAX_NUMNODES_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | /* Max 16 Nodes */ | ||
6 | #define NODES_SHIFT 4 | ||
7 | |||
8 | #endif /* __KERNEL__ */ | ||
9 | #endif /* _ASM_POWERPC_MAX_NUMNODES_H */ | ||
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 65f5a7b2646b..d075725bf444 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -365,8 +365,11 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, | |||
365 | * powers of 2 writes until it reaches sufficient alignment). | 365 | * powers of 2 writes until it reaches sufficient alignment). |
366 | * | 366 | * |
367 | * Based on this we disable the IP header alignment in network drivers. | 367 | * Based on this we disable the IP header alignment in network drivers. |
368 | * We also modify NET_SKB_PAD to be a cacheline in size, thus maintaining | ||
369 | * cacheline alignment of buffers. | ||
368 | */ | 370 | */ |
369 | #define NET_IP_ALIGN 0 | 371 | #define NET_IP_ALIGN 0 |
372 | #define NET_SKB_PAD L1_CACHE_BYTES | ||
370 | #endif | 373 | #endif |
371 | 374 | ||
372 | #define arch_align_stack(x) (x) | 375 | #define arch_align_stack(x) (x) |
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index 1e990747dce7..536ba0873052 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -301,8 +301,9 @@ | |||
301 | #define __NR_pselect6 280 | 301 | #define __NR_pselect6 280 |
302 | #define __NR_ppoll 281 | 302 | #define __NR_ppoll 281 |
303 | #define __NR_unshare 282 | 303 | #define __NR_unshare 282 |
304 | #define __NR_splice 283 | ||
304 | 305 | ||
305 | #define __NR_syscalls 283 | 306 | #define __NR_syscalls 284 |
306 | 307 | ||
307 | #ifdef __KERNEL__ | 308 | #ifdef __KERNEL__ |
308 | #define __NR__exit __NR_exit | 309 | #define __NR__exit __NR_exit |
diff --git a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h index de1d9926aa60..399bf02894dd 100644 --- a/include/asm-s390/atomic.h +++ b/include/asm-s390/atomic.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ARCH_S390_ATOMIC__ | 1 | #ifndef __ARCH_S390_ATOMIC__ |
2 | #define __ARCH_S390_ATOMIC__ | 2 | #define __ARCH_S390_ATOMIC__ |
3 | 3 | ||
4 | #include <linux/compiler.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * include/asm-s390/atomic.h | 7 | * include/asm-s390/atomic.h |
6 | * | 8 | * |
diff --git a/include/asm-s390/ebcdic.h b/include/asm-s390/ebcdic.h index 4cbc336e4d60..15fd2eda6c90 100644 --- a/include/asm-s390/ebcdic.h +++ b/include/asm-s390/ebcdic.h | |||
@@ -14,12 +14,12 @@ | |||
14 | #include <types.h> | 14 | #include <types.h> |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | extern __u8 _ascebc_500[]; /* ASCII -> EBCDIC 500 conversion table */ | 17 | extern __u8 _ascebc_500[256]; /* ASCII -> EBCDIC 500 conversion table */ |
18 | extern __u8 _ebcasc_500[]; /* EBCDIC 500 -> ASCII conversion table */ | 18 | extern __u8 _ebcasc_500[256]; /* EBCDIC 500 -> ASCII conversion table */ |
19 | extern __u8 _ascebc[]; /* ASCII -> EBCDIC conversion table */ | 19 | extern __u8 _ascebc[256]; /* ASCII -> EBCDIC conversion table */ |
20 | extern __u8 _ebcasc[]; /* EBCDIC -> ASCII conversion table */ | 20 | extern __u8 _ebcasc[256]; /* EBCDIC -> ASCII conversion table */ |
21 | extern __u8 _ebc_tolower[]; /* EBCDIC -> lowercase */ | 21 | extern __u8 _ebc_tolower[256]; /* EBCDIC -> lowercase */ |
22 | extern __u8 _ebc_toupper[]; /* EBCDIC -> uppercase */ | 22 | extern __u8 _ebc_toupper[256]; /* EBCDIC -> uppercase */ |
23 | 23 | ||
24 | static inline void | 24 | static inline void |
25 | codepage_convert(const __u8 *codepage, volatile __u8 * addr, unsigned long nr) | 25 | codepage_convert(const __u8 *codepage, volatile __u8 * addr, unsigned long nr) |
diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h index e10ed87094f0..436d216601e5 100644 --- a/include/asm-s390/percpu.h +++ b/include/asm-s390/percpu.h | |||
@@ -46,7 +46,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
46 | #define percpu_modcopy(pcpudst, src, size) \ | 46 | #define percpu_modcopy(pcpudst, src, size) \ |
47 | do { \ | 47 | do { \ |
48 | unsigned int __i; \ | 48 | unsigned int __i; \ |
49 | for_each_cpu(__i) \ | 49 | for_each_possible_cpu(__i) \ |
50 | memcpy((pcpudst)+__per_cpu_offset[__i], \ | 50 | memcpy((pcpudst)+__per_cpu_offset[__i], \ |
51 | (src), (size)); \ | 51 | (src), (size)); \ |
52 | } while (0) | 52 | } while (0) |
diff --git a/include/asm-sh/numnodes.h b/include/asm-sh/numnodes.h deleted file mode 100644 index f73e85b72ecb..000000000000 --- a/include/asm-sh/numnodes.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _ASM_MAX_NUMNODES_H | ||
2 | #define _ASM_MAX_NUMNODES_H | ||
3 | |||
4 | /* Max 2 Nodes */ | ||
5 | #define NODES_SHIFT 1 | ||
6 | |||
7 | #endif /* _ASM_MAX_NUMNODES_H */ | ||
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index f2c8e14d1fd9..05520cebda12 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h | |||
@@ -290,7 +290,7 @@ | |||
290 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 290 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
291 | #define __NR_mq_notify (__NR_mq_open+4) | 291 | #define __NR_mq_notify (__NR_mq_open+4) |
292 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 292 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
293 | #define __NR_sys_kexec_load 283 | 293 | #define __NR_kexec_load 283 |
294 | #define __NR_waitid 284 | 294 | #define __NR_waitid 284 |
295 | #define __NR_add_key 285 | 295 | #define __NR_add_key 285 |
296 | #define __NR_request_key 286 | 296 | #define __NR_request_key 286 |
diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h index 2a1cfa404ea4..1f8f394ae371 100644 --- a/include/asm-sh64/unistd.h +++ b/include/asm-sh64/unistd.h | |||
@@ -333,7 +333,7 @@ | |||
333 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 333 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
334 | #define __NR_mq_notify (__NR_mq_open+4) | 334 | #define __NR_mq_notify (__NR_mq_open+4) |
335 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 335 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
336 | #define __NR_sys_kexec_load 311 | 336 | #define __NR_kexec_load 311 |
337 | #define __NR_waitid 312 | 337 | #define __NR_waitid 312 |
338 | #define __NR_add_key 313 | 338 | #define __NR_add_key 313 |
339 | #define __NR_request_key 314 | 339 | #define __NR_request_key 314 |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 64ec640a40ee..264f0ebeaedc 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -180,7 +180,7 @@ | |||
180 | #define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ | 180 | #define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ |
181 | #define __NR_getdomainname 162 /* SunOS Specific */ | 181 | #define __NR_getdomainname 162 /* SunOS Specific */ |
182 | #define __NR_setdomainname 163 /* Common */ | 182 | #define __NR_setdomainname 163 /* Common */ |
183 | /* #define __NR_ni_syscall 164 ENOSYS under SunOS */ | 183 | /* #define __NR_utrap_install 164 Linux sparc64 specific */ |
184 | #define __NR_quotactl 165 /* Common */ | 184 | #define __NR_quotactl 165 /* Common */ |
185 | #define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ | 185 | #define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ |
186 | #define __NR_mount 167 /* Common */ | 186 | #define __NR_mount 167 /* Common */ |
@@ -248,7 +248,7 @@ | |||
248 | #define __NR_setfsgid 229 /* Linux Specific */ | 248 | #define __NR_setfsgid 229 /* Linux Specific */ |
249 | #define __NR__newselect 230 /* Linux Specific */ | 249 | #define __NR__newselect 230 /* Linux Specific */ |
250 | #define __NR_time 231 /* Linux Specific */ | 250 | #define __NR_time 231 /* Linux Specific */ |
251 | /* #define __NR_oldstat 232 Linux Specific */ | 251 | #define __NR_sys_splice 232 /* Linux Specific */ |
252 | #define __NR_stime 233 /* Linux Specific */ | 252 | #define __NR_stime 233 /* Linux Specific */ |
253 | #define __NR_statfs64 234 /* Linux Specific */ | 253 | #define __NR_statfs64 234 /* Linux Specific */ |
254 | #define __NR_fstatfs64 235 /* Linux Specific */ | 254 | #define __NR_fstatfs64 235 /* Linux Specific */ |
@@ -271,7 +271,7 @@ | |||
271 | #define __NR_getsid 252 | 271 | #define __NR_getsid 252 |
272 | #define __NR_fdatasync 253 | 272 | #define __NR_fdatasync 253 |
273 | #define __NR_nfsservctl 254 | 273 | #define __NR_nfsservctl 254 |
274 | #define __NR_aplib 255 | 274 | #define __NR_sys_sync_file_range 255 |
275 | #define __NR_clock_settime 256 | 275 | #define __NR_clock_settime 256 |
276 | #define __NR_clock_gettime 257 | 276 | #define __NR_clock_gettime 257 |
277 | #define __NR_clock_getres 258 | 277 | #define __NR_clock_getres 258 |
diff --git a/include/asm-sparc/vga.h b/include/asm-sparc/vga.h new file mode 100644 index 000000000000..c69d5b2ba19a --- /dev/null +++ b/include/asm-sparc/vga.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Access to VGA videoram | ||
3 | * | ||
4 | * (c) 1998 Martin Mares <mj@ucw.cz> | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_ASM_VGA_H_ | ||
8 | #define _LINUX_ASM_VGA_H_ | ||
9 | |||
10 | #include <asm/types.h> | ||
11 | |||
12 | #define VT_BUF_HAVE_RW | ||
13 | |||
14 | #undef scr_writew | ||
15 | #undef scr_readw | ||
16 | |||
17 | static inline void scr_writew(u16 val, u16 *addr) | ||
18 | { | ||
19 | BUG_ON((long) addr >= 0); | ||
20 | |||
21 | *addr = val; | ||
22 | } | ||
23 | |||
24 | static inline u16 scr_readw(const u16 *addr) | ||
25 | { | ||
26 | BUG_ON((long) addr >= 0); | ||
27 | |||
28 | return *addr; | ||
29 | } | ||
30 | |||
31 | #define VGA_MAP_MEM(x,s) (x) | ||
32 | |||
33 | #endif | ||
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h index 82032e159a76..baef13b58952 100644 --- a/include/asm-sparc64/percpu.h +++ b/include/asm-sparc64/percpu.h | |||
@@ -26,7 +26,7 @@ register unsigned long __local_per_cpu_offset asm("g5"); | |||
26 | #define percpu_modcopy(pcpudst, src, size) \ | 26 | #define percpu_modcopy(pcpudst, src, size) \ |
27 | do { \ | 27 | do { \ |
28 | unsigned int __i; \ | 28 | unsigned int __i; \ |
29 | for_each_cpu(__i) \ | 29 | for_each_possible_cpu(__i) \ |
30 | memcpy((pcpudst)+__per_cpu_offset(__i), \ | 30 | memcpy((pcpudst)+__per_cpu_offset(__i), \ |
31 | (src), (size)); \ | 31 | (src), (size)); \ |
32 | } while (0) | 32 | } while (0) |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index a284986b1541..d0544b4f47b7 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -250,7 +250,7 @@ | |||
250 | #ifdef __KERNEL__ | 250 | #ifdef __KERNEL__ |
251 | #define __NR_time 231 /* Linux sparc32 */ | 251 | #define __NR_time 231 /* Linux sparc32 */ |
252 | #endif | 252 | #endif |
253 | /* #define __NR_oldstat 232 Linux Specific */ | 253 | #define __NR_sys_splice 232 /* Linux Specific */ |
254 | #define __NR_stime 233 /* Linux Specific */ | 254 | #define __NR_stime 233 /* Linux Specific */ |
255 | #define __NR_statfs64 234 /* Linux Specific */ | 255 | #define __NR_statfs64 234 /* Linux Specific */ |
256 | #define __NR_fstatfs64 235 /* Linux Specific */ | 256 | #define __NR_fstatfs64 235 /* Linux Specific */ |
@@ -273,7 +273,7 @@ | |||
273 | #define __NR_getsid 252 | 273 | #define __NR_getsid 252 |
274 | #define __NR_fdatasync 253 | 274 | #define __NR_fdatasync 253 |
275 | #define __NR_nfsservctl 254 | 275 | #define __NR_nfsservctl 254 |
276 | #define __NR_aplib 255 | 276 | #define __NR_sys_sync_file_range 255 |
277 | #define __NR_clock_settime 256 | 277 | #define __NR_clock_settime 256 |
278 | #define __NR_clock_gettime 257 | 278 | #define __NR_clock_gettime 257 |
279 | #define __NR_clock_getres 258 | 279 | #define __NR_clock_getres 258 |
diff --git a/include/asm-um/desc.h b/include/asm-um/desc.h index ac1d2a20d178..4ec34a51b62c 100644 --- a/include/asm-um/desc.h +++ b/include/asm-um/desc.h | |||
@@ -1,6 +1,16 @@ | |||
1 | #ifndef __UM_DESC_H | 1 | #ifndef __UM_DESC_H |
2 | #define __UM_DESC_H | 2 | #define __UM_DESC_H |
3 | 3 | ||
4 | #include "asm/arch/desc.h" | 4 | /* Taken from asm-i386/desc.h, it's the only thing we need. The rest wouldn't |
5 | * compile, and has never been used. */ | ||
6 | #define LDT_empty(info) (\ | ||
7 | (info)->base_addr == 0 && \ | ||
8 | (info)->limit == 0 && \ | ||
9 | (info)->contents == 0 && \ | ||
10 | (info)->read_exec_only == 1 && \ | ||
11 | (info)->seg_32bit == 0 && \ | ||
12 | (info)->limit_in_pages == 0 && \ | ||
13 | (info)->seg_not_present == 1 && \ | ||
14 | (info)->useable == 0 ) | ||
5 | 15 | ||
6 | #endif | 16 | #endif |
diff --git a/include/asm-um/host_ldt-i386.h b/include/asm-um/host_ldt-i386.h new file mode 100644 index 000000000000..b27cb0a9dd30 --- /dev/null +++ b/include/asm-um/host_ldt-i386.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef __ASM_HOST_LDT_I386_H | ||
2 | #define __ASM_HOST_LDT_I386_H | ||
3 | |||
4 | #include "asm/arch/ldt.h" | ||
5 | |||
6 | /* | ||
7 | * macros stolen from include/asm-i386/desc.h | ||
8 | */ | ||
9 | #define LDT_entry_a(info) \ | ||
10 | ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) | ||
11 | |||
12 | #define LDT_entry_b(info) \ | ||
13 | (((info)->base_addr & 0xff000000) | \ | ||
14 | (((info)->base_addr & 0x00ff0000) >> 16) | \ | ||
15 | ((info)->limit & 0xf0000) | \ | ||
16 | (((info)->read_exec_only ^ 1) << 9) | \ | ||
17 | ((info)->contents << 10) | \ | ||
18 | (((info)->seg_not_present ^ 1) << 15) | \ | ||
19 | ((info)->seg_32bit << 22) | \ | ||
20 | ((info)->limit_in_pages << 23) | \ | ||
21 | ((info)->useable << 20) | \ | ||
22 | 0x7000) | ||
23 | |||
24 | #define LDT_empty(info) (\ | ||
25 | (info)->base_addr == 0 && \ | ||
26 | (info)->limit == 0 && \ | ||
27 | (info)->contents == 0 && \ | ||
28 | (info)->read_exec_only == 1 && \ | ||
29 | (info)->seg_32bit == 0 && \ | ||
30 | (info)->limit_in_pages == 0 && \ | ||
31 | (info)->seg_not_present == 1 && \ | ||
32 | (info)->useable == 0 ) | ||
33 | |||
34 | #endif | ||
diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/host_ldt-x86_64.h index 96b35aada79a..74a63f7d9a90 100644 --- a/include/asm-um/ldt-x86_64.h +++ b/include/asm-um/host_ldt-x86_64.h | |||
@@ -1,43 +1,8 @@ | |||
1 | /* | 1 | #ifndef __ASM_HOST_LDT_X86_64_H |
2 | * Copyright (C) 2004 Fujitsu Siemens Computers GmbH | 2 | #define __ASM_HOST_LDT_X86_64_H |
3 | * Licensed under the GPL | ||
4 | * | ||
5 | * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> | ||
6 | */ | ||
7 | 3 | ||
8 | #ifndef __ASM_LDT_X86_64_H | ||
9 | #define __ASM_LDT_X86_64_H | ||
10 | |||
11 | #include "asm/semaphore.h" | ||
12 | #include "asm/arch/ldt.h" | 4 | #include "asm/arch/ldt.h" |
13 | 5 | ||
14 | struct mmu_context_skas; | ||
15 | extern void ldt_host_info(void); | ||
16 | extern long init_new_ldt(struct mmu_context_skas * to_mm, | ||
17 | struct mmu_context_skas * from_mm); | ||
18 | extern void free_ldt(struct mmu_context_skas * mm); | ||
19 | |||
20 | #define LDT_PAGES_MAX \ | ||
21 | ((LDT_ENTRIES * LDT_ENTRY_SIZE)/PAGE_SIZE) | ||
22 | #define LDT_ENTRIES_PER_PAGE \ | ||
23 | (PAGE_SIZE/LDT_ENTRY_SIZE) | ||
24 | #define LDT_DIRECT_ENTRIES \ | ||
25 | ((LDT_PAGES_MAX*sizeof(void *))/LDT_ENTRY_SIZE) | ||
26 | |||
27 | struct ldt_entry { | ||
28 | __u32 a; | ||
29 | __u32 b; | ||
30 | }; | ||
31 | |||
32 | typedef struct uml_ldt { | ||
33 | int entry_count; | ||
34 | struct semaphore semaphore; | ||
35 | union { | ||
36 | struct ldt_entry * pages[LDT_PAGES_MAX]; | ||
37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; | ||
38 | } u; | ||
39 | } uml_ldt_t; | ||
40 | |||
41 | /* | 6 | /* |
42 | * macros stolen from include/asm-x86_64/desc.h | 7 | * macros stolen from include/asm-x86_64/desc.h |
43 | */ | 8 | */ |
diff --git a/include/asm-um/ldt-i386.h b/include/asm-um/ldt-i386.h deleted file mode 100644 index 175722a91164..000000000000 --- a/include/asm-um/ldt-i386.h +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004 Fujitsu Siemens Computers GmbH | ||
3 | * Licensed under the GPL | ||
4 | * | ||
5 | * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> | ||
6 | */ | ||
7 | |||
8 | #ifndef __ASM_LDT_I386_H | ||
9 | #define __ASM_LDT_I386_H | ||
10 | |||
11 | #include "asm/semaphore.h" | ||
12 | #include "asm/arch/ldt.h" | ||
13 | |||
14 | struct mmu_context_skas; | ||
15 | extern void ldt_host_info(void); | ||
16 | extern long init_new_ldt(struct mmu_context_skas * to_mm, | ||
17 | struct mmu_context_skas * from_mm); | ||
18 | extern void free_ldt(struct mmu_context_skas * mm); | ||
19 | |||
20 | #define LDT_PAGES_MAX \ | ||
21 | ((LDT_ENTRIES * LDT_ENTRY_SIZE)/PAGE_SIZE) | ||
22 | #define LDT_ENTRIES_PER_PAGE \ | ||
23 | (PAGE_SIZE/LDT_ENTRY_SIZE) | ||
24 | #define LDT_DIRECT_ENTRIES \ | ||
25 | ((LDT_PAGES_MAX*sizeof(void *))/LDT_ENTRY_SIZE) | ||
26 | |||
27 | struct ldt_entry { | ||
28 | __u32 a; | ||
29 | __u32 b; | ||
30 | }; | ||
31 | |||
32 | typedef struct uml_ldt { | ||
33 | int entry_count; | ||
34 | struct semaphore semaphore; | ||
35 | union { | ||
36 | struct ldt_entry * pages[LDT_PAGES_MAX]; | ||
37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; | ||
38 | } u; | ||
39 | } uml_ldt_t; | ||
40 | |||
41 | /* | ||
42 | * macros stolen from include/asm-i386/desc.h | ||
43 | */ | ||
44 | #define LDT_entry_a(info) \ | ||
45 | ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) | ||
46 | |||
47 | #define LDT_entry_b(info) \ | ||
48 | (((info)->base_addr & 0xff000000) | \ | ||
49 | (((info)->base_addr & 0x00ff0000) >> 16) | \ | ||
50 | ((info)->limit & 0xf0000) | \ | ||
51 | (((info)->read_exec_only ^ 1) << 9) | \ | ||
52 | ((info)->contents << 10) | \ | ||
53 | (((info)->seg_not_present ^ 1) << 15) | \ | ||
54 | ((info)->seg_32bit << 22) | \ | ||
55 | ((info)->limit_in_pages << 23) | \ | ||
56 | ((info)->useable << 20) | \ | ||
57 | 0x7000) | ||
58 | |||
59 | #define LDT_empty(info) (\ | ||
60 | (info)->base_addr == 0 && \ | ||
61 | (info)->limit == 0 && \ | ||
62 | (info)->contents == 0 && \ | ||
63 | (info)->read_exec_only == 1 && \ | ||
64 | (info)->seg_32bit == 0 && \ | ||
65 | (info)->limit_in_pages == 0 && \ | ||
66 | (info)->seg_not_present == 1 && \ | ||
67 | (info)->useable == 0 ) | ||
68 | |||
69 | #endif | ||
diff --git a/include/asm-um/ldt.h b/include/asm-um/ldt.h new file mode 100644 index 000000000000..96f82a456ce6 --- /dev/null +++ b/include/asm-um/ldt.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004 Fujitsu Siemens Computers GmbH | ||
3 | * Licensed under the GPL | ||
4 | * | ||
5 | * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> | ||
6 | */ | ||
7 | |||
8 | #ifndef __ASM_LDT_H | ||
9 | #define __ASM_LDT_H | ||
10 | |||
11 | #include "asm/semaphore.h" | ||
12 | #include "asm/host_ldt.h" | ||
13 | |||
14 | struct mmu_context_skas; | ||
15 | extern void ldt_host_info(void); | ||
16 | extern long init_new_ldt(struct mmu_context_skas * to_mm, | ||
17 | struct mmu_context_skas * from_mm); | ||
18 | extern void free_ldt(struct mmu_context_skas * mm); | ||
19 | |||
20 | #define LDT_PAGES_MAX \ | ||
21 | ((LDT_ENTRIES * LDT_ENTRY_SIZE)/PAGE_SIZE) | ||
22 | #define LDT_ENTRIES_PER_PAGE \ | ||
23 | (PAGE_SIZE/LDT_ENTRY_SIZE) | ||
24 | #define LDT_DIRECT_ENTRIES \ | ||
25 | ((LDT_PAGES_MAX*sizeof(void *))/LDT_ENTRY_SIZE) | ||
26 | |||
27 | struct ldt_entry { | ||
28 | __u32 a; | ||
29 | __u32 b; | ||
30 | }; | ||
31 | |||
32 | typedef struct uml_ldt { | ||
33 | int entry_count; | ||
34 | struct semaphore semaphore; | ||
35 | union { | ||
36 | struct ldt_entry * pages[LDT_PAGES_MAX]; | ||
37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; | ||
38 | } u; | ||
39 | } uml_ldt_t; | ||
40 | |||
41 | #endif | ||
diff --git a/include/asm-um/processor-i386.h b/include/asm-um/processor-i386.h index 4108a579eb92..595f1c3e1e40 100644 --- a/include/asm-um/processor-i386.h +++ b/include/asm-um/processor-i386.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -6,21 +6,48 @@ | |||
6 | #ifndef __UM_PROCESSOR_I386_H | 6 | #ifndef __UM_PROCESSOR_I386_H |
7 | #define __UM_PROCESSOR_I386_H | 7 | #define __UM_PROCESSOR_I386_H |
8 | 8 | ||
9 | #include "linux/string.h" | ||
10 | #include "asm/host_ldt.h" | ||
11 | #include "asm/segment.h" | ||
12 | |||
9 | extern int host_has_xmm; | 13 | extern int host_has_xmm; |
10 | extern int host_has_cmov; | 14 | extern int host_has_cmov; |
11 | 15 | ||
12 | /* include faultinfo structure */ | 16 | /* include faultinfo structure */ |
13 | #include "sysdep/faultinfo.h" | 17 | #include "sysdep/faultinfo.h" |
14 | 18 | ||
19 | struct uml_tls_struct { | ||
20 | struct user_desc tls; | ||
21 | unsigned flushed:1; | ||
22 | unsigned present:1; | ||
23 | }; | ||
24 | |||
15 | struct arch_thread { | 25 | struct arch_thread { |
26 | struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES]; | ||
16 | unsigned long debugregs[8]; | 27 | unsigned long debugregs[8]; |
17 | int debugregs_seq; | 28 | int debugregs_seq; |
18 | struct faultinfo faultinfo; | 29 | struct faultinfo faultinfo; |
19 | }; | 30 | }; |
20 | 31 | ||
21 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ | 32 | #define INIT_ARCH_THREAD { \ |
22 | .debugregs_seq = 0, \ | 33 | .tls_array = { [ 0 ... GDT_ENTRY_TLS_ENTRIES - 1 ] = \ |
23 | .faultinfo = { 0, 0, 0 } } | 34 | { .present = 0, .flushed = 0 } }, \ |
35 | .debugregs = { [ 0 ... 7 ] = 0 }, \ | ||
36 | .debugregs_seq = 0, \ | ||
37 | .faultinfo = { 0, 0, 0 } \ | ||
38 | } | ||
39 | |||
40 | static inline void arch_flush_thread(struct arch_thread *thread) | ||
41 | { | ||
42 | /* Clear any TLS still hanging */ | ||
43 | memset(&thread->tls_array, 0, sizeof(thread->tls_array)); | ||
44 | } | ||
45 | |||
46 | static inline void arch_copy_thread(struct arch_thread *from, | ||
47 | struct arch_thread *to) | ||
48 | { | ||
49 | memcpy(&to->tls_array, &from->tls_array, sizeof(from->tls_array)); | ||
50 | } | ||
24 | 51 | ||
25 | #include "asm/arch/user.h" | 52 | #include "asm/arch/user.h" |
26 | 53 | ||
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index e1e1255a1d36..10609af376c0 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h | |||
@@ -28,6 +28,15 @@ extern inline void rep_nop(void) | |||
28 | .debugregs_seq = 0, \ | 28 | .debugregs_seq = 0, \ |
29 | .faultinfo = { 0, 0, 0 } } | 29 | .faultinfo = { 0, 0, 0 } } |
30 | 30 | ||
31 | static inline void arch_flush_thread(struct arch_thread *thread) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | static inline void arch_copy_thread(struct arch_thread *from, | ||
36 | struct arch_thread *to) | ||
37 | { | ||
38 | } | ||
39 | |||
31 | #include "asm/arch/user.h" | 40 | #include "asm/arch/user.h" |
32 | 41 | ||
33 | #define current_text_addr() \ | 42 | #define current_text_addr() \ |
diff --git a/include/asm-um/ptrace-generic.h b/include/asm-um/ptrace-generic.h index 46599ac44037..503484305e67 100644 --- a/include/asm-um/ptrace-generic.h +++ b/include/asm-um/ptrace-generic.h | |||
@@ -28,7 +28,7 @@ struct pt_regs { | |||
28 | union uml_pt_regs regs; | 28 | union uml_pt_regs regs; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | #define EMPTY_REGS { regs : EMPTY_UML_PT_REGS } | 31 | #define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS } |
32 | 32 | ||
33 | #define PT_REGS_IP(r) UPT_IP(&(r)->regs) | 33 | #define PT_REGS_IP(r) UPT_IP(&(r)->regs) |
34 | #define PT_REGS_SP(r) UPT_SP(&(r)->regs) | 34 | #define PT_REGS_SP(r) UPT_SP(&(r)->regs) |
@@ -60,17 +60,9 @@ extern void show_regs(struct pt_regs *regs); | |||
60 | extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs, | 60 | extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs, |
61 | int error_code); | 61 | int error_code); |
62 | 62 | ||
63 | #endif | 63 | extern int arch_copy_tls(struct task_struct *new); |
64 | extern void clear_flushed_tls(struct task_struct *task); | ||
64 | 65 | ||
65 | #endif | 66 | #endif |
66 | 67 | ||
67 | /* | 68 | #endif |
68 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
69 | * Emacs will notice this stuff at the end of the file and automatically | ||
70 | * adjust the settings for this buffer only. This must remain at the end | ||
71 | * of the file. | ||
72 | * --------------------------------------------------------------------------- | ||
73 | * Local variables: | ||
74 | * c-file-style: "linux" | ||
75 | * End: | ||
76 | */ | ||
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h index fe882b9d917e..6e2528bb0083 100644 --- a/include/asm-um/ptrace-i386.h +++ b/include/asm-um/ptrace-i386.h | |||
@@ -8,8 +8,11 @@ | |||
8 | 8 | ||
9 | #define HOST_AUDIT_ARCH AUDIT_ARCH_I386 | 9 | #define HOST_AUDIT_ARCH AUDIT_ARCH_I386 |
10 | 10 | ||
11 | #include "linux/compiler.h" | ||
11 | #include "sysdep/ptrace.h" | 12 | #include "sysdep/ptrace.h" |
12 | #include "asm/ptrace-generic.h" | 13 | #include "asm/ptrace-generic.h" |
14 | #include "asm/host_ldt.h" | ||
15 | #include "choose-mode.h" | ||
13 | 16 | ||
14 | #define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) | 17 | #define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) |
15 | #define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) | 18 | #define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) |
@@ -38,15 +41,34 @@ | |||
38 | 41 | ||
39 | #define user_mode(r) UPT_IS_USER(&(r)->regs) | 42 | #define user_mode(r) UPT_IS_USER(&(r)->regs) |
40 | 43 | ||
41 | #endif | 44 | extern int ptrace_get_thread_area(struct task_struct *child, int idx, |
45 | struct user_desc __user *user_desc); | ||
42 | 46 | ||
43 | /* | 47 | extern int ptrace_set_thread_area(struct task_struct *child, int idx, |
44 | * Overrides for Emacs so that we follow Linus's tabbing style. | 48 | struct user_desc __user *user_desc); |
45 | * Emacs will notice this stuff at the end of the file and automatically | 49 | |
46 | * adjust the settings for this buffer only. This must remain at the end | 50 | extern int do_set_thread_area_skas(struct user_desc *info); |
47 | * of the file. | 51 | extern int do_get_thread_area_skas(struct user_desc *info); |
48 | * --------------------------------------------------------------------------- | 52 | |
49 | * Local variables: | 53 | extern int do_set_thread_area_tt(struct user_desc *info); |
50 | * c-file-style: "linux" | 54 | extern int do_get_thread_area_tt(struct user_desc *info); |
51 | * End: | 55 | |
52 | */ | 56 | extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to); |
57 | extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to); | ||
58 | |||
59 | extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); | ||
60 | extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); | ||
61 | |||
62 | static inline int do_get_thread_area(struct user_desc *info) | ||
63 | { | ||
64 | return CHOOSE_MODE_PROC(do_get_thread_area_tt, do_get_thread_area_skas, info); | ||
65 | } | ||
66 | |||
67 | static inline int do_set_thread_area(struct user_desc *info) | ||
68 | { | ||
69 | return CHOOSE_MODE_PROC(do_set_thread_area_tt, do_set_thread_area_skas, info); | ||
70 | } | ||
71 | |||
72 | struct task_struct; | ||
73 | |||
74 | #endif | ||
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h index be51219a8ffe..c894e68b1f96 100644 --- a/include/asm-um/ptrace-x86_64.h +++ b/include/asm-um/ptrace-x86_64.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #define __UM_PTRACE_X86_64_H | 8 | #define __UM_PTRACE_X86_64_H |
9 | 9 | ||
10 | #include "linux/compiler.h" | 10 | #include "linux/compiler.h" |
11 | #include "asm/errno.h" | ||
12 | #include "asm/host_ldt.h" | ||
11 | 13 | ||
12 | #define signal_fault signal_fault_x86_64 | 14 | #define signal_fault signal_fault_x86_64 |
13 | #define __FRAME_OFFSETS /* Needed to get the R* macros */ | 15 | #define __FRAME_OFFSETS /* Needed to get the R* macros */ |
@@ -63,15 +65,26 @@ void signal_fault(struct pt_regs_subarch *regs, void *frame, char *where); | |||
63 | 65 | ||
64 | #define profile_pc(regs) PT_REGS_IP(regs) | 66 | #define profile_pc(regs) PT_REGS_IP(regs) |
65 | 67 | ||
66 | #endif | 68 | static inline int ptrace_get_thread_area(struct task_struct *child, int idx, |
69 | struct user_desc __user *user_desc) | ||
70 | { | ||
71 | return -ENOSYS; | ||
72 | } | ||
67 | 73 | ||
68 | /* | 74 | static inline int ptrace_set_thread_area(struct task_struct *child, int idx, |
69 | * Overrides for Emacs so that we follow Linus's tabbing style. | 75 | struct user_desc __user *user_desc) |
70 | * Emacs will notice this stuff at the end of the file and automatically | 76 | { |
71 | * adjust the settings for this buffer only. This must remain at the end | 77 | return -ENOSYS; |
72 | * of the file. | 78 | } |
73 | * --------------------------------------------------------------------------- | 79 | |
74 | * Local variables: | 80 | static inline void arch_switch_to_tt(struct task_struct *from, |
75 | * c-file-style: "linux" | 81 | struct task_struct *to) |
76 | * End: | 82 | { |
77 | */ | 83 | } |
84 | |||
85 | static inline void arch_switch_to_skas(struct task_struct *from, | ||
86 | struct task_struct *to) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | #endif | ||
diff --git a/include/asm-um/segment.h b/include/asm-um/segment.h index 55e40301f625..45183fcd10b6 100644 --- a/include/asm-um/segment.h +++ b/include/asm-um/segment.h | |||
@@ -1,4 +1,10 @@ | |||
1 | #ifndef __UM_SEGMENT_H | 1 | #ifndef __UM_SEGMENT_H |
2 | #define __UM_SEGMENT_H | 2 | #define __UM_SEGMENT_H |
3 | 3 | ||
4 | extern int host_gdt_entry_tls_min; | ||
5 | |||
6 | #define GDT_ENTRY_TLS_ENTRIES 3 | ||
7 | #define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min | ||
8 | #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1) | ||
9 | |||
4 | #endif | 10 | #endif |
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index 17b6b07c4332..f166b9837c6a 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h | |||
@@ -27,14 +27,14 @@ struct thread_info { | |||
27 | 27 | ||
28 | #define INIT_THREAD_INFO(tsk) \ | 28 | #define INIT_THREAD_INFO(tsk) \ |
29 | { \ | 29 | { \ |
30 | task: &tsk, \ | 30 | .task = &tsk, \ |
31 | exec_domain: &default_exec_domain, \ | 31 | .exec_domain = &default_exec_domain, \ |
32 | flags: 0, \ | 32 | .flags = 0, \ |
33 | cpu: 0, \ | 33 | .cpu = 0, \ |
34 | preempt_count: 1, \ | 34 | .preempt_count = 1, \ |
35 | addr_limit: KERNEL_DS, \ | 35 | .addr_limit = KERNEL_DS, \ |
36 | restart_block: { \ | 36 | .restart_block = { \ |
37 | fn: do_no_restart_syscall, \ | 37 | .fn = do_no_restart_syscall, \ |
38 | }, \ | 38 | }, \ |
39 | } | 39 | } |
40 | 40 | ||
diff --git a/include/asm-um/uaccess.h b/include/asm-um/uaccess.h index 4e460d6f5ac8..bea5a015f667 100644 --- a/include/asm-um/uaccess.h +++ b/include/asm-um/uaccess.h | |||
@@ -57,7 +57,7 @@ | |||
57 | ({ \ | 57 | ({ \ |
58 | const __typeof__((*(ptr))) __user *private_ptr = (ptr); \ | 58 | const __typeof__((*(ptr))) __user *private_ptr = (ptr); \ |
59 | (access_ok(VERIFY_READ, private_ptr, sizeof(*private_ptr)) ? \ | 59 | (access_ok(VERIFY_READ, private_ptr, sizeof(*private_ptr)) ? \ |
60 | __get_user(x, private_ptr) : ((x) = 0, -EFAULT)); \ | 60 | __get_user(x, private_ptr) : ((x) = (__typeof__(*ptr))0, -EFAULT)); \ |
61 | }) | 61 | }) |
62 | 62 | ||
63 | #define __put_user(x, ptr) \ | 63 | #define __put_user(x, ptr) \ |
diff --git a/include/asm-v850/system.h b/include/asm-v850/system.h index 107decbd6e6c..7091af4b7866 100644 --- a/include/asm-v850/system.h +++ b/include/asm-v850/system.h | |||
@@ -18,8 +18,6 @@ | |||
18 | #include <asm/ptrace.h> | 18 | #include <asm/ptrace.h> |
19 | 19 | ||
20 | 20 | ||
21 | #define prepare_to_switch() do { } while (0) | ||
22 | |||
23 | /* | 21 | /* |
24 | * switch_to(n) should switch tasks to task ptr, first checking that | 22 | * switch_to(n) should switch tasks to task ptr, first checking that |
25 | * ptr isn't the current task, in which case it does nothing. | 23 | * ptr isn't the current task, in which case it does nothing. |
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h index 8dcc32665240..93b51df51687 100644 --- a/include/asm-x86_64/e820.h +++ b/include/asm-x86_64/e820.h | |||
@@ -47,7 +47,8 @@ extern void contig_e820_setup(void); | |||
47 | extern unsigned long e820_end_of_ram(void); | 47 | extern unsigned long e820_end_of_ram(void); |
48 | extern void e820_reserve_resources(void); | 48 | extern void e820_reserve_resources(void); |
49 | extern void e820_print_map(char *who); | 49 | extern void e820_print_map(char *who); |
50 | extern int e820_mapped(unsigned long start, unsigned long end, unsigned type); | 50 | extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type); |
51 | extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type); | ||
51 | 52 | ||
52 | extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end); | 53 | extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end); |
53 | extern void e820_setup_gap(void); | 54 | extern void e820_setup_gap(void); |
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h index 08b75c15269a..18ff7ee9e774 100644 --- a/include/asm-x86_64/hpet.h +++ b/include/asm-x86_64/hpet.h | |||
@@ -51,6 +51,8 @@ | |||
51 | 51 | ||
52 | #define HPET_TN_ROUTE_SHIFT 9 | 52 | #define HPET_TN_ROUTE_SHIFT 9 |
53 | 53 | ||
54 | #define HPET_TICK_RATE (HZ * 100000UL) | ||
55 | |||
54 | extern int is_hpet_enabled(void); | 56 | extern int is_hpet_enabled(void); |
55 | extern int hpet_rtc_timer_init(void); | 57 | extern int hpet_rtc_timer_init(void); |
56 | extern int oem_force_hpet_timer(void); | 58 | extern int oem_force_hpet_timer(void); |
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index eeb2bcd635de..b4f4b172b15a 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h | |||
@@ -317,6 +317,4 @@ | |||
317 | #define __NR_ia32_ppoll 309 | 317 | #define __NR_ia32_ppoll 309 |
318 | #define __NR_ia32_unshare 310 | 318 | #define __NR_ia32_unshare 310 |
319 | 319 | ||
320 | #define IA32_NR_syscalls 315 /* must be > than biggest syscall! */ | ||
321 | |||
322 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ | 320 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index cafdfb37f0d8..a05da8a50bfd 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
@@ -177,7 +177,7 @@ static inline __u16 __readw(const volatile void __iomem *addr) | |||
177 | { | 177 | { |
178 | return *(__force volatile __u16 *)addr; | 178 | return *(__force volatile __u16 *)addr; |
179 | } | 179 | } |
180 | static inline __u32 __readl(const volatile void __iomem *addr) | 180 | static __always_inline __u32 __readl(const volatile void __iomem *addr) |
181 | { | 181 | { |
182 | return *(__force volatile __u32 *)addr; | 182 | return *(__force volatile __u32 *)addr; |
183 | } | 183 | } |
diff --git a/include/asm-x86_64/local.h b/include/asm-x86_64/local.h index bf148037d4e5..cd17945bf218 100644 --- a/include/asm-x86_64/local.h +++ b/include/asm-x86_64/local.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | typedef struct | 6 | typedef struct |
7 | { | 7 | { |
8 | volatile unsigned long counter; | 8 | volatile long counter; |
9 | } local_t; | 9 | } local_t; |
10 | 10 | ||
11 | #define LOCAL_INIT(i) { (i) } | 11 | #define LOCAL_INIT(i) { (i) } |
@@ -13,7 +13,7 @@ typedef struct | |||
13 | #define local_read(v) ((v)->counter) | 13 | #define local_read(v) ((v)->counter) |
14 | #define local_set(v,i) (((v)->counter) = (i)) | 14 | #define local_set(v,i) (((v)->counter) = (i)) |
15 | 15 | ||
16 | static __inline__ void local_inc(local_t *v) | 16 | static inline void local_inc(local_t *v) |
17 | { | 17 | { |
18 | __asm__ __volatile__( | 18 | __asm__ __volatile__( |
19 | "incq %0" | 19 | "incq %0" |
@@ -21,7 +21,7 @@ static __inline__ void local_inc(local_t *v) | |||
21 | :"m" (v->counter)); | 21 | :"m" (v->counter)); |
22 | } | 22 | } |
23 | 23 | ||
24 | static __inline__ void local_dec(local_t *v) | 24 | static inline void local_dec(local_t *v) |
25 | { | 25 | { |
26 | __asm__ __volatile__( | 26 | __asm__ __volatile__( |
27 | "decq %0" | 27 | "decq %0" |
@@ -29,7 +29,7 @@ static __inline__ void local_dec(local_t *v) | |||
29 | :"m" (v->counter)); | 29 | :"m" (v->counter)); |
30 | } | 30 | } |
31 | 31 | ||
32 | static __inline__ void local_add(unsigned int i, local_t *v) | 32 | static inline void local_add(long i, local_t *v) |
33 | { | 33 | { |
34 | __asm__ __volatile__( | 34 | __asm__ __volatile__( |
35 | "addq %1,%0" | 35 | "addq %1,%0" |
@@ -37,7 +37,7 @@ static __inline__ void local_add(unsigned int i, local_t *v) | |||
37 | :"ir" (i), "m" (v->counter)); | 37 | :"ir" (i), "m" (v->counter)); |
38 | } | 38 | } |
39 | 39 | ||
40 | static __inline__ void local_sub(unsigned int i, local_t *v) | 40 | static inline void local_sub(long i, local_t *v) |
41 | { | 41 | { |
42 | __asm__ __volatile__( | 42 | __asm__ __volatile__( |
43 | "subq %1,%0" | 43 | "subq %1,%0" |
diff --git a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h index 5d298b799a9f..7229785094e3 100644 --- a/include/asm-x86_64/mce.h +++ b/include/asm-x86_64/mce.h | |||
@@ -70,6 +70,9 @@ struct mce_log { | |||
70 | #define MCE_THRESHOLD_BASE MCE_EXTENDED_BANK + 1 /* MCE_AMD */ | 70 | #define MCE_THRESHOLD_BASE MCE_EXTENDED_BANK + 1 /* MCE_AMD */ |
71 | #define MCE_THRESHOLD_DRAM_ECC MCE_THRESHOLD_BASE + 4 | 71 | #define MCE_THRESHOLD_DRAM_ECC MCE_THRESHOLD_BASE + 4 |
72 | 72 | ||
73 | #ifdef __KERNEL__ | ||
74 | #include <asm/atomic.h> | ||
75 | |||
73 | void mce_log(struct mce *m); | 76 | void mce_log(struct mce *m); |
74 | #ifdef CONFIG_X86_MCE_INTEL | 77 | #ifdef CONFIG_X86_MCE_INTEL |
75 | void mce_intel_feature_init(struct cpuinfo_x86 *c); | 78 | void mce_intel_feature_init(struct cpuinfo_x86 *c); |
@@ -87,4 +90,8 @@ static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) | |||
87 | } | 90 | } |
88 | #endif | 91 | #endif |
89 | 92 | ||
93 | extern atomic_t mce_entry; | ||
94 | |||
95 | #endif | ||
96 | |||
90 | #endif | 97 | #endif |
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h index f6cbb4cbb5a3..1cc92fe02503 100644 --- a/include/asm-x86_64/numa.h +++ b/include/asm-x86_64/numa.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_X8664_NUMA_H 1 | 2 | #define _ASM_X8664_NUMA_H 1 |
3 | 3 | ||
4 | #include <linux/nodemask.h> | 4 | #include <linux/nodemask.h> |
5 | #include <asm/numnodes.h> | ||
6 | 5 | ||
7 | struct bootnode { | 6 | struct bootnode { |
8 | u64 start,end; | 7 | u64 start,end; |
@@ -18,6 +17,8 @@ extern void numa_init_array(void); | |||
18 | extern int numa_off; | 17 | extern int numa_off; |
19 | 18 | ||
20 | extern void numa_set_node(int cpu, int node); | 19 | extern void numa_set_node(int cpu, int node); |
20 | extern void srat_reserve_add_area(int nodeid); | ||
21 | extern int hotadd_percent; | ||
21 | 22 | ||
22 | extern unsigned char apicid_to_node[256]; | 23 | extern unsigned char apicid_to_node[256]; |
23 | #ifdef CONFIG_NUMA | 24 | #ifdef CONFIG_NUMA |
diff --git a/include/asm-x86_64/numnodes.h b/include/asm-x86_64/numnodes.h deleted file mode 100644 index 32be16b8ae96..000000000000 --- a/include/asm-x86_64/numnodes.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_X8664_NUMNODES_H | ||
2 | #define _ASM_X8664_NUMNODES_H 1 | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #ifdef CONFIG_NUMA | ||
7 | #define NODES_SHIFT 6 | ||
8 | #else | ||
9 | #define NODES_SHIFT 0 | ||
10 | #endif | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h index f18443fcdf04..b9e5320b7625 100644 --- a/include/asm-x86_64/timex.h +++ b/include/asm-x86_64/timex.h | |||
@@ -33,7 +33,7 @@ static __always_inline cycles_t get_cycles_sync(void) | |||
33 | unsigned eax; | 33 | unsigned eax; |
34 | /* Don't do an additional sync on CPUs where we know | 34 | /* Don't do an additional sync on CPUs where we know |
35 | RDTSC is already synchronous. */ | 35 | RDTSC is already synchronous. */ |
36 | alternative_io(ASM_NOP2, "cpuid", X86_FEATURE_SYNC_RDTSC, | 36 | alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC, |
37 | "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); | 37 | "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); |
38 | rdtscll(ret); | 38 | rdtscll(ret); |
39 | return ret; | 39 | return ret; |
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index fcc516353087..f21ff2c1e960 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -609,8 +609,10 @@ __SYSCALL(__NR_unshare, sys_unshare) | |||
609 | __SYSCALL(__NR_set_robust_list, sys_set_robust_list) | 609 | __SYSCALL(__NR_set_robust_list, sys_set_robust_list) |
610 | #define __NR_get_robust_list 274 | 610 | #define __NR_get_robust_list 274 |
611 | __SYSCALL(__NR_get_robust_list, sys_get_robust_list) | 611 | __SYSCALL(__NR_get_robust_list, sys_get_robust_list) |
612 | #define __NR_splice 275 | ||
613 | __SYSCALL(__NR_splice, sys_splice) | ||
612 | 614 | ||
613 | #define __NR_syscall_max __NR_get_robust_list | 615 | #define __NR_syscall_max __NR_splice |
614 | 616 | ||
615 | #ifndef __NO_STUBS | 617 | #ifndef __NO_STUBS |
616 | 618 | ||
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index 9284867f1cb9..b29f7ae6a08a 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h | |||
@@ -111,8 +111,6 @@ extern void *_switch_to(void *last, void *next); | |||
111 | 111 | ||
112 | #endif /* __ASSEMBLY__ */ | 112 | #endif /* __ASSEMBLY__ */ |
113 | 113 | ||
114 | #define prepare_to_switch() do { } while(0) | ||
115 | |||
116 | #define switch_to(prev,next,last) \ | 114 | #define switch_to(prev,next,last) \ |
117 | do { \ | 115 | do { \ |
118 | clear_cpenable(); \ | 116 | clear_cpenable(); \ |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index bb9e54322322..75e91f5b6a04 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -19,20 +19,25 @@ struct fb_info; | |||
19 | struct backlight_properties { | 19 | struct backlight_properties { |
20 | /* Owner module */ | 20 | /* Owner module */ |
21 | struct module *owner; | 21 | struct module *owner; |
22 | /* Get the backlight power status (0: full on, 1..3: power saving | 22 | |
23 | modes; 4: full off), see FB_BLANK_XXX */ | 23 | /* Notify the backlight driver some property has changed */ |
24 | int (*get_power)(struct backlight_device *); | 24 | int (*update_status)(struct backlight_device *); |
25 | /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ | 25 | /* Return the current backlight brightness (accounting for power, |
26 | int (*set_power)(struct backlight_device *, int power); | 26 | fb_blank etc.) */ |
27 | /* Maximal value for brightness (read-only) */ | ||
28 | int max_brightness; | ||
29 | /* Get current backlight brightness */ | ||
30 | int (*get_brightness)(struct backlight_device *); | 27 | int (*get_brightness)(struct backlight_device *); |
31 | /* Set backlight brightness (0..max_brightness) */ | ||
32 | int (*set_brightness)(struct backlight_device *, int brightness); | ||
33 | /* Check if given framebuffer device is the one bound to this backlight; | 28 | /* Check if given framebuffer device is the one bound to this backlight; |
34 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ | 29 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ |
35 | int (*check_fb)(struct fb_info *); | 30 | int (*check_fb)(struct fb_info *); |
31 | |||
32 | /* Current User requested brightness (0 - max_brightness) */ | ||
33 | int brightness; | ||
34 | /* Maximal value for brightness (read-only) */ | ||
35 | int max_brightness; | ||
36 | /* Current FB Power mode (0: full on, 1..3: power saving | ||
37 | modes; 4: full off), see FB_BLANK_XXX */ | ||
38 | int power; | ||
39 | /* FB Blanking active? (values as for power) */ | ||
40 | int fb_blank; | ||
36 | }; | 41 | }; |
37 | 42 | ||
38 | struct backlight_device { | 43 | struct backlight_device { |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index de3eb8d8ae26..da2d107fe2cf 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -45,6 +45,7 @@ extern unsigned long __init bootmem_bootmap_pages (unsigned long); | |||
45 | extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); | 45 | extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); |
46 | extern void __init free_bootmem (unsigned long addr, unsigned long size); | 46 | extern void __init free_bootmem (unsigned long addr, unsigned long size); |
47 | extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal); | 47 | extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal); |
48 | extern void * __init __alloc_bootmem_nopanic (unsigned long size, unsigned long align, unsigned long goal); | ||
48 | extern void * __init __alloc_bootmem_low(unsigned long size, | 49 | extern void * __init __alloc_bootmem_low(unsigned long size, |
49 | unsigned long align, | 50 | unsigned long align, |
50 | unsigned long goal); | 51 | unsigned long goal); |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index d10bd30c337e..836325ee0931 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -275,6 +275,7 @@ extern void d_move(struct dentry *, struct dentry *); | |||
275 | /* appendix may either be NULL or be used for transname suffixes */ | 275 | /* appendix may either be NULL or be used for transname suffixes */ |
276 | extern struct dentry * d_lookup(struct dentry *, struct qstr *); | 276 | extern struct dentry * d_lookup(struct dentry *, struct qstr *); |
277 | extern struct dentry * __d_lookup(struct dentry *, struct qstr *); | 277 | extern struct dentry * __d_lookup(struct dentry *, struct qstr *); |
278 | extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *); | ||
278 | 279 | ||
279 | /* validate "insecure" dentry pointer */ | 280 | /* validate "insecure" dentry pointer */ |
280 | extern int d_validate(struct dentry *, struct dentry *); | 281 | extern int d_validate(struct dentry *, struct dentry *); |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 9b4751aecc23..ff61817082fa 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -21,7 +21,7 @@ enum dma_data_direction { | |||
21 | #define DMA_30BIT_MASK 0x000000003fffffffULL | 21 | #define DMA_30BIT_MASK 0x000000003fffffffULL |
22 | #define DMA_29BIT_MASK 0x000000001fffffffULL | 22 | #define DMA_29BIT_MASK 0x000000001fffffffULL |
23 | #define DMA_28BIT_MASK 0x000000000fffffffULL | 23 | #define DMA_28BIT_MASK 0x000000000fffffffULL |
24 | #define DMA_24BIT_MASK 0x0000000000ffffffULL | 24 | #define DMA_24BIT_MASK 0x0000000000ffffffULL |
25 | 25 | ||
26 | #include <asm/dma-mapping.h> | 26 | #include <asm/dma-mapping.h> |
27 | 27 | ||
diff --git a/include/linux/fadvise.h b/include/linux/fadvise.h index b2913bba35d8..e8e747139b9a 100644 --- a/include/linux/fadvise.h +++ b/include/linux/fadvise.h | |||
@@ -18,10 +18,4 @@ | |||
18 | #define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ | 18 | #define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | /* | ||
22 | * Linux-specific fadvise() extensions: | ||
23 | */ | ||
24 | #define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range */ | ||
25 | #define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range */ | ||
26 | |||
27 | #endif /* FADVISE_H_INCLUDED */ | 21 | #endif /* FADVISE_H_INCLUDED */ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index d03fadfcafe3..315d89740ddf 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -839,12 +839,10 @@ struct fb_info { | |||
839 | #define FB_LEFT_POS(bpp) (32 - bpp) | 839 | #define FB_LEFT_POS(bpp) (32 - bpp) |
840 | #define FB_SHIFT_HIGH(val, bits) ((val) >> (bits)) | 840 | #define FB_SHIFT_HIGH(val, bits) ((val) >> (bits)) |
841 | #define FB_SHIFT_LOW(val, bits) ((val) << (bits)) | 841 | #define FB_SHIFT_LOW(val, bits) ((val) << (bits)) |
842 | #define FB_BIT_NR(b) (7 - (b)) | ||
843 | #else | 842 | #else |
844 | #define FB_LEFT_POS(bpp) (0) | 843 | #define FB_LEFT_POS(bpp) (0) |
845 | #define FB_SHIFT_HIGH(val, bits) ((val) << (bits)) | 844 | #define FB_SHIFT_HIGH(val, bits) ((val) << (bits)) |
846 | #define FB_SHIFT_LOW(val, bits) ((val) >> (bits)) | 845 | #define FB_SHIFT_LOW(val, bits) ((val) >> (bits)) |
847 | #define FB_BIT_NR(b) (b) | ||
848 | #endif | 846 | #endif |
849 | 847 | ||
850 | /* | 848 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 408fe89498f4..162c6e57307a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -757,6 +757,13 @@ extern void send_sigio(struct fown_struct *fown, int fd, int band); | |||
757 | extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); | 757 | extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); |
758 | extern int fcntl_getlease(struct file *filp); | 758 | extern int fcntl_getlease(struct file *filp); |
759 | 759 | ||
760 | /* fs/sync.c */ | ||
761 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 | ||
762 | #define SYNC_FILE_RANGE_WRITE 2 | ||
763 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | ||
764 | extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, | ||
765 | unsigned int flags); | ||
766 | |||
760 | /* fs/locks.c */ | 767 | /* fs/locks.c */ |
761 | extern void locks_init_lock(struct file_lock *); | 768 | extern void locks_init_lock(struct file_lock *); |
762 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); | 769 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); |
@@ -857,7 +864,7 @@ struct super_block { | |||
857 | */ | 864 | */ |
858 | struct mutex s_vfs_rename_mutex; /* Kludge */ | 865 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
859 | 866 | ||
860 | /* Granuality of c/m/atime in ns. | 867 | /* Granularity of c/m/atime in ns. |
861 | Cannot be worse than a second */ | 868 | Cannot be worse than a second */ |
862 | u32 s_time_gran; | 869 | u32 s_time_gran; |
863 | }; | 870 | }; |
@@ -1032,6 +1039,8 @@ struct file_operations { | |||
1032 | int (*check_flags)(int); | 1039 | int (*check_flags)(int); |
1033 | int (*dir_notify)(struct file *filp, unsigned long arg); | 1040 | int (*dir_notify)(struct file *filp, unsigned long arg); |
1034 | int (*flock) (struct file *, int, struct file_lock *); | 1041 | int (*flock) (struct file *, int, struct file_lock *); |
1042 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); | ||
1043 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); | ||
1035 | }; | 1044 | }; |
1036 | 1045 | ||
1037 | struct inode_operations { | 1046 | struct inode_operations { |
@@ -1411,6 +1420,7 @@ extern void bd_release_from_disk(struct block_device *, struct gendisk *); | |||
1411 | #endif | 1420 | #endif |
1412 | 1421 | ||
1413 | /* fs/char_dev.c */ | 1422 | /* fs/char_dev.c */ |
1423 | #define CHRDEV_MAJOR_HASH_SIZE 255 | ||
1414 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); | 1424 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); |
1415 | extern int register_chrdev_region(dev_t, unsigned, const char *); | 1425 | extern int register_chrdev_region(dev_t, unsigned, const char *); |
1416 | extern int register_chrdev(unsigned int, const char *, | 1426 | extern int register_chrdev(unsigned int, const char *, |
@@ -1418,25 +1428,17 @@ extern int register_chrdev(unsigned int, const char *, | |||
1418 | extern int unregister_chrdev(unsigned int, const char *); | 1428 | extern int unregister_chrdev(unsigned int, const char *); |
1419 | extern void unregister_chrdev_region(dev_t, unsigned); | 1429 | extern void unregister_chrdev_region(dev_t, unsigned); |
1420 | extern int chrdev_open(struct inode *, struct file *); | 1430 | extern int chrdev_open(struct inode *, struct file *); |
1421 | extern int get_chrdev_list(char *); | 1431 | extern void chrdev_show(struct seq_file *,off_t); |
1422 | extern void *acquire_chrdev_list(void); | ||
1423 | extern int count_chrdev_list(void); | ||
1424 | extern void *get_next_chrdev(void *); | ||
1425 | extern int get_chrdev_info(void *, int *, char **); | ||
1426 | extern void release_chrdev_list(void *); | ||
1427 | 1432 | ||
1428 | /* fs/block_dev.c */ | 1433 | /* fs/block_dev.c */ |
1434 | #define BLKDEV_MAJOR_HASH_SIZE 255 | ||
1429 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ | 1435 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ |
1430 | extern const char *__bdevname(dev_t, char *buffer); | 1436 | extern const char *__bdevname(dev_t, char *buffer); |
1431 | extern const char *bdevname(struct block_device *bdev, char *buffer); | 1437 | extern const char *bdevname(struct block_device *bdev, char *buffer); |
1432 | extern struct block_device *lookup_bdev(const char *); | 1438 | extern struct block_device *lookup_bdev(const char *); |
1433 | extern struct block_device *open_bdev_excl(const char *, int, void *); | 1439 | extern struct block_device *open_bdev_excl(const char *, int, void *); |
1434 | extern void close_bdev_excl(struct block_device *); | 1440 | extern void close_bdev_excl(struct block_device *); |
1435 | extern void *acquire_blkdev_list(void); | 1441 | extern void blkdev_show(struct seq_file *,off_t); |
1436 | extern int count_blkdev_list(void); | ||
1437 | extern void *get_next_blkdev(void *); | ||
1438 | extern int get_blkdev_info(void *, int *, char **); | ||
1439 | extern void release_blkdev_list(void *); | ||
1440 | 1442 | ||
1441 | extern void init_special_inode(struct inode *, umode_t, dev_t); | 1443 | extern void init_special_inode(struct inode *, umode_t, dev_t); |
1442 | 1444 | ||
@@ -1609,6 +1611,17 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor | |||
1609 | extern void do_generic_mapping_read(struct address_space *mapping, | 1611 | extern void do_generic_mapping_read(struct address_space *mapping, |
1610 | struct file_ra_state *, struct file *, | 1612 | struct file_ra_state *, struct file *, |
1611 | loff_t *, read_descriptor_t *, read_actor_t); | 1613 | loff_t *, read_descriptor_t *, read_actor_t); |
1614 | |||
1615 | /* fs/splice.c */ | ||
1616 | extern ssize_t generic_file_splice_read(struct file *, | ||
1617 | struct pipe_inode_info *, size_t, unsigned int); | ||
1618 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, | ||
1619 | struct file *, size_t, unsigned int); | ||
1620 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | ||
1621 | struct file *out, size_t len, unsigned int flags); | ||
1622 | extern long do_splice_direct(struct file *in, struct file *out, | ||
1623 | size_t len, unsigned int flags); | ||
1624 | |||
1612 | extern void | 1625 | extern void |
1613 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 1626 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
1614 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, | 1627 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 9c8e6da2393b..71e7b2847cb3 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/mutex.h> | ||
14 | #include <linux/device.h> | 15 | #include <linux/device.h> |
15 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
16 | 17 | ||
@@ -40,7 +41,7 @@ struct gameport { | |||
40 | struct gameport *parent, *child; | 41 | struct gameport *parent, *child; |
41 | 42 | ||
42 | struct gameport_driver *drv; | 43 | struct gameport_driver *drv; |
43 | struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ | 44 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ |
44 | 45 | ||
45 | struct device dev; | 46 | struct device dev; |
46 | unsigned int registered; /* port has been fully registered with driver core */ | 47 | unsigned int registered; /* port has been fully registered with driver core */ |
@@ -137,12 +138,12 @@ static inline void gameport_set_drvdata(struct gameport *gameport, void *data) | |||
137 | */ | 138 | */ |
138 | static inline int gameport_pin_driver(struct gameport *gameport) | 139 | static inline int gameport_pin_driver(struct gameport *gameport) |
139 | { | 140 | { |
140 | return down_interruptible(&gameport->drv_sem); | 141 | return mutex_lock_interruptible(&gameport->drv_mutex); |
141 | } | 142 | } |
142 | 143 | ||
143 | static inline void gameport_unpin_driver(struct gameport *gameport) | 144 | static inline void gameport_unpin_driver(struct gameport *gameport) |
144 | { | 145 | { |
145 | up(&gameport->drv_sem); | 146 | mutex_unlock(&gameport->drv_mutex); |
146 | } | 147 | } |
147 | 148 | ||
148 | void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); | 149 | void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 7851e6b520cf..3ac452945a7d 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -57,6 +57,8 @@ struct vm_area_struct; | |||
57 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ | 57 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ |
58 | __GFP_NOMEMALLOC|__GFP_HARDWALL) | 58 | __GFP_NOMEMALLOC|__GFP_HARDWALL) |
59 | 59 | ||
60 | /* This equals 0, but use constants in case they ever change */ | ||
61 | #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) | ||
60 | /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ | 62 | /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ |
61 | #define GFP_ATOMIC (__GFP_HIGH) | 63 | #define GFP_ATOMIC (__GFP_HIGH) |
62 | #define GFP_NOIO (__GFP_WAIT) | 64 | #define GFP_NOIO (__GFP_WAIT) |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 93830158348e..306acf1dc6d5 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -58,6 +58,19 @@ struct hrtimer { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * struct hrtimer_sleeper - simple sleeper structure | ||
62 | * | ||
63 | * @timer: embedded timer structure | ||
64 | * @task: task to wake up | ||
65 | * | ||
66 | * task is set to NULL, when the timer expires. | ||
67 | */ | ||
68 | struct hrtimer_sleeper { | ||
69 | struct hrtimer timer; | ||
70 | struct task_struct *task; | ||
71 | }; | ||
72 | |||
73 | /** | ||
61 | * struct hrtimer_base - the timer base for a specific clock | 74 | * struct hrtimer_base - the timer base for a specific clock |
62 | * | 75 | * |
63 | * @index: clock type index for per_cpu support when moving a timer | 76 | * @index: clock type index for per_cpu support when moving a timer |
@@ -67,7 +80,7 @@ struct hrtimer { | |||
67 | * @first: pointer to the timer node which expires first | 80 | * @first: pointer to the timer node which expires first |
68 | * @resolution: the resolution of the clock, in nanoseconds | 81 | * @resolution: the resolution of the clock, in nanoseconds |
69 | * @get_time: function to retrieve the current time of the clock | 82 | * @get_time: function to retrieve the current time of the clock |
70 | * @get_sofirq_time: function to retrieve the current time from the softirq | 83 | * @get_softirq_time: function to retrieve the current time from the softirq |
71 | * @curr_timer: the timer which is executing a callback right now | 84 | * @curr_timer: the timer which is executing a callback right now |
72 | * @softirq_time: the time when running the hrtimer queue in the softirq | 85 | * @softirq_time: the time when running the hrtimer queue in the softirq |
73 | */ | 86 | */ |
@@ -127,6 +140,9 @@ extern long hrtimer_nanosleep(struct timespec *rqtp, | |||
127 | const enum hrtimer_mode mode, | 140 | const enum hrtimer_mode mode, |
128 | const clockid_t clockid); | 141 | const clockid_t clockid); |
129 | 142 | ||
143 | extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, | ||
144 | struct task_struct *tsk); | ||
145 | |||
130 | /* Soft interrupt function to run the hrtimer queues: */ | 146 | /* Soft interrupt function to run the hrtimer queues: */ |
131 | extern void hrtimer_run_queues(void); | 147 | extern void hrtimer_run_queues(void); |
132 | 148 | ||
diff --git a/include/linux/init.h b/include/linux/init.h index ed0ac7c39fdc..93dcbe1abb4c 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -245,7 +245,8 @@ void __init parse_early_param(void); | |||
245 | #define __cpuexitdata __exitdata | 245 | #define __cpuexitdata __exitdata |
246 | #endif | 246 | #endif |
247 | 247 | ||
248 | #ifdef CONFIG_MEMORY_HOTPLUG | 248 | #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \ |
249 | || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE) | ||
249 | #define __meminit | 250 | #define __meminit |
250 | #define __meminitdata | 251 | #define __meminitdata |
251 | #define __memexit | 252 | #define __memexit |
diff --git a/include/linux/input.h b/include/linux/input.h index 1d4e341b72e6..b0e612dda0cf 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -421,7 +421,7 @@ struct input_absinfo { | |||
421 | #define BTN_GEAR_UP 0x151 | 421 | #define BTN_GEAR_UP 0x151 |
422 | 422 | ||
423 | #define KEY_OK 0x160 | 423 | #define KEY_OK 0x160 |
424 | #define KEY_SELECT 0x161 | 424 | #define KEY_SELECT 0x161 |
425 | #define KEY_GOTO 0x162 | 425 | #define KEY_GOTO 0x162 |
426 | #define KEY_CLEAR 0x163 | 426 | #define KEY_CLEAR 0x163 |
427 | #define KEY_POWER2 0x164 | 427 | #define KEY_POWER2 0x164 |
@@ -512,6 +512,15 @@ struct input_absinfo { | |||
512 | #define KEY_FN_S 0x1e3 | 512 | #define KEY_FN_S 0x1e3 |
513 | #define KEY_FN_B 0x1e4 | 513 | #define KEY_FN_B 0x1e4 |
514 | 514 | ||
515 | #define KEY_BRL_DOT1 0x1f1 | ||
516 | #define KEY_BRL_DOT2 0x1f2 | ||
517 | #define KEY_BRL_DOT3 0x1f3 | ||
518 | #define KEY_BRL_DOT4 0x1f4 | ||
519 | #define KEY_BRL_DOT5 0x1f5 | ||
520 | #define KEY_BRL_DOT6 0x1f6 | ||
521 | #define KEY_BRL_DOT7 0x1f7 | ||
522 | #define KEY_BRL_DOT8 0x1f8 | ||
523 | |||
515 | /* We avoid low common keys in module aliases so they don't get huge. */ | 524 | /* We avoid low common keys in module aliases so they don't get huge. */ |
516 | #define KEY_MIN_INTERESTING KEY_MUTE | 525 | #define KEY_MIN_INTERESTING KEY_MUTE |
517 | #define KEY_MAX 0x1ff | 526 | #define KEY_MAX 0x1ff |
@@ -929,7 +938,7 @@ struct input_dev { | |||
929 | 938 | ||
930 | struct input_handle *grab; | 939 | struct input_handle *grab; |
931 | 940 | ||
932 | struct semaphore sem; /* serializes open and close operations */ | 941 | struct mutex mutex; /* serializes open and close operations */ |
933 | unsigned int users; | 942 | unsigned int users; |
934 | 943 | ||
935 | struct class_device cdev; | 944 | struct class_device cdev; |
@@ -995,11 +1004,6 @@ static inline void init_input_dev(struct input_dev *dev) | |||
995 | 1004 | ||
996 | struct input_dev *input_allocate_device(void); | 1005 | struct input_dev *input_allocate_device(void); |
997 | 1006 | ||
998 | static inline void input_free_device(struct input_dev *dev) | ||
999 | { | ||
1000 | kfree(dev); | ||
1001 | } | ||
1002 | |||
1003 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 1007 | static inline struct input_dev *input_get_device(struct input_dev *dev) |
1004 | { | 1008 | { |
1005 | return to_input_dev(class_device_get(&dev->cdev)); | 1009 | return to_input_dev(class_device_get(&dev->cdev)); |
@@ -1010,6 +1014,11 @@ static inline void input_put_device(struct input_dev *dev) | |||
1010 | class_device_put(&dev->cdev); | 1014 | class_device_put(&dev->cdev); |
1011 | } | 1015 | } |
1012 | 1016 | ||
1017 | static inline void input_free_device(struct input_dev *dev) | ||
1018 | { | ||
1019 | input_put_device(dev); | ||
1020 | } | ||
1021 | |||
1013 | int input_register_device(struct input_dev *); | 1022 | int input_register_device(struct input_dev *); |
1014 | void input_unregister_device(struct input_dev *); | 1023 | void input_unregister_device(struct input_dev *); |
1015 | 1024 | ||
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 53571288a9fc..6d9c7e4da472 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
@@ -82,6 +82,13 @@ struct ipmi_smi_handlers | |||
82 | { | 82 | { |
83 | struct module *owner; | 83 | struct module *owner; |
84 | 84 | ||
85 | /* The low-level interface cannot start sending messages to | ||
86 | the upper layer until this function is called. This may | ||
87 | not be NULL, the lower layer must take the interface from | ||
88 | this call. */ | ||
89 | int (*start_processing)(void *send_info, | ||
90 | ipmi_smi_t new_intf); | ||
91 | |||
85 | /* Called to enqueue an SMI message to be sent. This | 92 | /* Called to enqueue an SMI message to be sent. This |
86 | operation is not allowed to fail. If an error occurs, it | 93 | operation is not allowed to fail. If an error occurs, it |
87 | should report back the error in a received message. It may | 94 | should report back the error in a received message. It may |
@@ -157,13 +164,16 @@ static inline void ipmi_demangle_device_id(unsigned char *data, | |||
157 | } | 164 | } |
158 | 165 | ||
159 | /* Add a low-level interface to the IPMI driver. Note that if the | 166 | /* Add a low-level interface to the IPMI driver. Note that if the |
160 | interface doesn't know its slave address, it should pass in zero. */ | 167 | interface doesn't know its slave address, it should pass in zero. |
168 | The low-level interface should not deliver any messages to the | ||
169 | upper layer until the start_processing() function in the handlers | ||
170 | is called, and the lower layer must get the interface from that | ||
171 | call. */ | ||
161 | int ipmi_register_smi(struct ipmi_smi_handlers *handlers, | 172 | int ipmi_register_smi(struct ipmi_smi_handlers *handlers, |
162 | void *send_info, | 173 | void *send_info, |
163 | struct ipmi_device_id *device_id, | 174 | struct ipmi_device_id *device_id, |
164 | struct device *dev, | 175 | struct device *dev, |
165 | unsigned char slave_addr, | 176 | unsigned char slave_addr); |
166 | ipmi_smi_t *intf); | ||
167 | 177 | ||
168 | /* | 178 | /* |
169 | * Remove a low-level interface from the IPMI driver. This will | 179 | * Remove a low-level interface from the IPMI driver. This will |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 99905e180532..043376920f51 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -36,6 +36,8 @@ | |||
36 | /* LATCH is used in the interval timer and ftape setup. */ | 36 | /* LATCH is used in the interval timer and ftape setup. */ |
37 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | 37 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
38 | 38 | ||
39 | #define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ) | ||
40 | |||
39 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can | 41 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can |
40 | * improve accuracy by shifting LSH bits, hence calculating: | 42 | * improve accuracy by shifting LSH bits, hence calculating: |
41 | * (NOM << LSH) / DEN | 43 | * (NOM << LSH) / DEN |
@@ -51,9 +53,13 @@ | |||
51 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ | 53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ |
52 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) | 54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) |
53 | 55 | ||
56 | #define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8)) | ||
57 | |||
54 | /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ | 58 | /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ |
55 | #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) | 59 | #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) |
56 | 60 | ||
61 | #define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8)) | ||
62 | |||
57 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ | 63 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ |
58 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) | 64 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) |
59 | 65 | ||
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index e87c32a5c86a..4eb851ece080 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -135,6 +135,8 @@ static inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag) | |||
135 | 135 | ||
136 | #define U(x) ((x) ^ 0xf000) | 136 | #define U(x) ((x) ^ 0xf000) |
137 | 137 | ||
138 | #define BRL_UC_ROW 0x2800 | ||
139 | |||
138 | /* keyboard.c */ | 140 | /* keyboard.c */ |
139 | 141 | ||
140 | struct console; | 142 | struct console; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a3720f973ea5..e1bd0842f6a1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -176,7 +176,7 @@ static inline void console_verbose(void) | |||
176 | 176 | ||
177 | extern void bust_spinlocks(int yes); | 177 | extern void bust_spinlocks(int yes); |
178 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 178 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
179 | extern __deprecated_for_modules int panic_timeout; | 179 | extern int panic_timeout; |
180 | extern int panic_on_oops; | 180 | extern int panic_on_oops; |
181 | extern int tainted; | 181 | extern int tainted; |
182 | extern const char *print_tainted(void); | 182 | extern const char *print_tainted(void); |
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index 08488042d74a..de76843bbe8a 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h | |||
@@ -44,6 +44,7 @@ extern unsigned short plain_map[NR_KEYS]; | |||
44 | #define KT_ASCII 9 | 44 | #define KT_ASCII 9 |
45 | #define KT_LOCK 10 | 45 | #define KT_LOCK 10 |
46 | #define KT_SLOCK 12 | 46 | #define KT_SLOCK 12 |
47 | #define KT_BRL 14 | ||
47 | 48 | ||
48 | #define K(t,v) (((t)<<8)|(v)) | 49 | #define K(t,v) (((t)<<8)|(v)) |
49 | #define KTYP(x) ((x) >> 8) | 50 | #define KTYP(x) ((x) >> 8) |
@@ -427,5 +428,17 @@ extern unsigned short plain_map[NR_KEYS]; | |||
427 | 428 | ||
428 | #define NR_LOCK 8 | 429 | #define NR_LOCK 8 |
429 | 430 | ||
431 | #define K_BRL_BLANK K(KT_BRL, 0) | ||
432 | #define K_BRL_DOT1 K(KT_BRL, 1) | ||
433 | #define K_BRL_DOT2 K(KT_BRL, 2) | ||
434 | #define K_BRL_DOT3 K(KT_BRL, 3) | ||
435 | #define K_BRL_DOT4 K(KT_BRL, 4) | ||
436 | #define K_BRL_DOT5 K(KT_BRL, 5) | ||
437 | #define K_BRL_DOT6 K(KT_BRL, 6) | ||
438 | #define K_BRL_DOT7 K(KT_BRL, 7) | ||
439 | #define K_BRL_DOT8 K(KT_BRL, 8) | ||
440 | |||
441 | #define NR_BRL 9 | ||
442 | |||
430 | #define MAX_DIACR 256 | 443 | #define MAX_DIACR 256 |
431 | #endif | 444 | #endif |
diff --git a/include/linux/leds.h b/include/linux/leds.h new file mode 100644 index 000000000000..dc23c7c639f3 --- /dev/null +++ b/include/linux/leds.h | |||
@@ -0,0 +1,110 @@ | |||
1 | /* | ||
2 | * Driver model for leds and led triggers | ||
3 | * | ||
4 | * Copyright (C) 2005 John Lenz <lenz@cs.wisc.edu> | ||
5 | * Copyright (C) 2005 Richard Purdie <rpurdie@openedhand.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | #ifndef __LINUX_LEDS_H_INCLUDED | ||
13 | #define __LINUX_LEDS_H_INCLUDED | ||
14 | |||
15 | struct device; | ||
16 | struct class_device; | ||
17 | /* | ||
18 | * LED Core | ||
19 | */ | ||
20 | |||
21 | enum led_brightness { | ||
22 | LED_OFF = 0, | ||
23 | LED_HALF = 127, | ||
24 | LED_FULL = 255, | ||
25 | }; | ||
26 | |||
27 | struct led_classdev { | ||
28 | const char *name; | ||
29 | int brightness; | ||
30 | int flags; | ||
31 | |||
32 | #define LED_SUSPENDED (1 << 0) | ||
33 | |||
34 | /* Set LED brightness level */ | ||
35 | void (*brightness_set)(struct led_classdev *led_cdev, | ||
36 | enum led_brightness brightness); | ||
37 | |||
38 | struct class_device *class_dev; | ||
39 | struct list_head node; /* LED Device list */ | ||
40 | char *default_trigger; /* Trigger to use */ | ||
41 | |||
42 | #ifdef CONFIG_LEDS_TRIGGERS | ||
43 | /* Protects the trigger data below */ | ||
44 | rwlock_t trigger_lock; | ||
45 | |||
46 | struct led_trigger *trigger; | ||
47 | struct list_head trig_list; | ||
48 | void *trigger_data; | ||
49 | #endif | ||
50 | }; | ||
51 | |||
52 | extern int led_classdev_register(struct device *parent, | ||
53 | struct led_classdev *led_cdev); | ||
54 | extern void led_classdev_unregister(struct led_classdev *led_cdev); | ||
55 | extern void led_classdev_suspend(struct led_classdev *led_cdev); | ||
56 | extern void led_classdev_resume(struct led_classdev *led_cdev); | ||
57 | |||
58 | /* | ||
59 | * LED Triggers | ||
60 | */ | ||
61 | #ifdef CONFIG_LEDS_TRIGGERS | ||
62 | |||
63 | #define TRIG_NAME_MAX 50 | ||
64 | |||
65 | struct led_trigger { | ||
66 | /* Trigger Properties */ | ||
67 | const char *name; | ||
68 | void (*activate)(struct led_classdev *led_cdev); | ||
69 | void (*deactivate)(struct led_classdev *led_cdev); | ||
70 | |||
71 | /* LEDs under control by this trigger (for simple triggers) */ | ||
72 | rwlock_t leddev_list_lock; | ||
73 | struct list_head led_cdevs; | ||
74 | |||
75 | /* Link to next registered trigger */ | ||
76 | struct list_head next_trig; | ||
77 | }; | ||
78 | |||
79 | /* Registration functions for complex triggers */ | ||
80 | extern int led_trigger_register(struct led_trigger *trigger); | ||
81 | extern void led_trigger_unregister(struct led_trigger *trigger); | ||
82 | |||
83 | /* Registration functions for simple triggers */ | ||
84 | #define DEFINE_LED_TRIGGER(x) static struct led_trigger *x; | ||
85 | #define DEFINE_LED_TRIGGER_GLOBAL(x) struct led_trigger *x; | ||
86 | extern void led_trigger_register_simple(const char *name, | ||
87 | struct led_trigger **trigger); | ||
88 | extern void led_trigger_unregister_simple(struct led_trigger *trigger); | ||
89 | extern void led_trigger_event(struct led_trigger *trigger, | ||
90 | enum led_brightness event); | ||
91 | |||
92 | #else | ||
93 | |||
94 | /* Triggers aren't active - null macros */ | ||
95 | #define DEFINE_LED_TRIGGER(x) | ||
96 | #define DEFINE_LED_TRIGGER_GLOBAL(x) | ||
97 | #define led_trigger_register_simple(x, y) do {} while(0) | ||
98 | #define led_trigger_unregister_simple(x) do {} while(0) | ||
99 | #define led_trigger_event(x, y) do {} while(0) | ||
100 | |||
101 | #endif | ||
102 | |||
103 | /* Trigger specific functions */ | ||
104 | #ifdef CONFIG_LEDS_TRIGGER_IDE_DISK | ||
105 | extern void ledtrig_ide_activity(void); | ||
106 | #else | ||
107 | #define ledtrig_ide_activity() do {} while(0) | ||
108 | #endif | ||
109 | |||
110 | #endif /* __LINUX_LEDS_H_INCLUDED */ | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index c2215469a101..11d9febc0078 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/io.h> | 33 | #include <asm/io.h> |
34 | #include <linux/ata.h> | 34 | #include <linux/ata.h> |
35 | #include <linux/workqueue.h> | 35 | #include <linux/workqueue.h> |
36 | #include <scsi/scsi_host.h> | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * compile-time options: to be removed as soon as all the drivers are | 39 | * compile-time options: to be removed as soon as all the drivers are |
@@ -44,7 +45,6 @@ | |||
44 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 45 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
45 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some | 46 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some |
46 | * low-level drivers */ | 47 | * low-level drivers */ |
47 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ | ||
48 | 48 | ||
49 | 49 | ||
50 | /* note: prints function name for you */ | 50 | /* note: prints function name for you */ |
@@ -121,9 +121,11 @@ enum { | |||
121 | ATA_SHT_USE_CLUSTERING = 1, | 121 | ATA_SHT_USE_CLUSTERING = 1, |
122 | 122 | ||
123 | /* struct ata_device stuff */ | 123 | /* struct ata_device stuff */ |
124 | ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ | 124 | ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */ |
125 | ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ | 125 | ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */ |
126 | ATA_DFLAG_LBA = (1 << 2), /* device supports LBA */ | 126 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, |
127 | |||
128 | ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ | ||
127 | 129 | ||
128 | ATA_DEV_UNKNOWN = 0, /* unknown device */ | 130 | ATA_DEV_UNKNOWN = 0, /* unknown device */ |
129 | ATA_DEV_ATA = 1, /* ATA device */ | 131 | ATA_DEV_ATA = 1, /* ATA device */ |
@@ -133,33 +135,35 @@ enum { | |||
133 | ATA_DEV_NONE = 5, /* no device */ | 135 | ATA_DEV_NONE = 5, /* no device */ |
134 | 136 | ||
135 | /* struct ata_port flags */ | 137 | /* struct ata_port flags */ |
136 | ATA_FLAG_SLAVE_POSS = (1 << 1), /* host supports slave dev */ | 138 | ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ |
137 | /* (doesn't imply presence) */ | 139 | /* (doesn't imply presence) */ |
138 | ATA_FLAG_PORT_DISABLED = (1 << 2), /* port is disabled, ignore it */ | 140 | ATA_FLAG_SATA = (1 << 1), |
139 | ATA_FLAG_SATA = (1 << 3), | 141 | ATA_FLAG_NO_LEGACY = (1 << 2), /* no legacy mode check */ |
140 | ATA_FLAG_NO_LEGACY = (1 << 4), /* no legacy mode check */ | 142 | ATA_FLAG_MMIO = (1 << 3), /* use MMIO, not PIO */ |
141 | ATA_FLAG_SRST = (1 << 5), /* (obsolete) use ATA SRST, not E.D.D. */ | 143 | ATA_FLAG_SRST = (1 << 4), /* (obsolete) use ATA SRST, not E.D.D. */ |
142 | ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */ | 144 | ATA_FLAG_SATA_RESET = (1 << 5), /* (obsolete) use COMRESET */ |
143 | ATA_FLAG_SATA_RESET = (1 << 7), /* (obsolete) use COMRESET */ | 145 | ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */ |
144 | ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */ | 146 | ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ |
145 | ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once | 147 | ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */ |
146 | * proper HSM is in place. */ | 148 | ATA_FLAG_IRQ_MASK = (1 << 9), /* Mask IRQ in PIO xfers */ |
147 | ATA_FLAG_DEBUGMSG = (1 << 10), | 149 | |
148 | ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */ | 150 | ATA_FLAG_NOINTR = (1 << 16), /* FIXME: Remove this once |
149 | 151 | * proper HSM is in place. */ | |
150 | ATA_FLAG_SUSPENDED = (1 << 12), /* port is suspended */ | 152 | ATA_FLAG_DEBUGMSG = (1 << 17), |
151 | 153 | ATA_FLAG_FLUSH_PORT_TASK = (1 << 18), /* flush port task */ | |
152 | ATA_FLAG_PIO_LBA48 = (1 << 13), /* Host DMA engine is LBA28 only */ | 154 | |
153 | ATA_FLAG_IRQ_MASK = (1 << 14), /* Mask IRQ in PIO xfers */ | 155 | ATA_FLAG_DISABLED = (1 << 19), /* port is disabled, ignore it */ |
154 | 156 | ATA_FLAG_SUSPENDED = (1 << 20), /* port is suspended */ | |
155 | ATA_FLAG_FLUSH_PORT_TASK = (1 << 15), /* Flush port task */ | 157 | |
156 | ATA_FLAG_IN_EH = (1 << 16), /* EH in progress */ | 158 | /* bits 24:31 of ap->flags are reserved for LLDD specific flags */ |
157 | 159 | ||
158 | ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ | 160 | /* struct ata_queued_cmd flags */ |
159 | ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ | 161 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ |
160 | ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */ | 162 | ATA_QCFLAG_SG = (1 << 1), /* have s/g table? */ |
163 | ATA_QCFLAG_SINGLE = (1 << 2), /* no s/g, just a single buffer */ | ||
161 | ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE, | 164 | ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE, |
162 | ATA_QCFLAG_EH_SCHEDULED = (1 << 5), /* EH scheduled */ | 165 | ATA_QCFLAG_IO = (1 << 3), /* standard IO command */ |
166 | ATA_QCFLAG_EH_SCHEDULED = (1 << 4), /* EH scheduled */ | ||
163 | 167 | ||
164 | /* host set flags */ | 168 | /* host set flags */ |
165 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ | 169 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ |
@@ -208,10 +212,13 @@ enum { | |||
208 | /* size of buffer to pad xfers ending on unaligned boundaries */ | 212 | /* size of buffer to pad xfers ending on unaligned boundaries */ |
209 | ATA_DMA_PAD_SZ = 4, | 213 | ATA_DMA_PAD_SZ = 4, |
210 | ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, | 214 | ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, |
211 | 215 | ||
212 | /* Masks for port functions */ | 216 | /* masks for port functions */ |
213 | ATA_PORT_PRIMARY = (1 << 0), | 217 | ATA_PORT_PRIMARY = (1 << 0), |
214 | ATA_PORT_SECONDARY = (1 << 1), | 218 | ATA_PORT_SECONDARY = (1 << 1), |
219 | |||
220 | /* how hard are we gonna try to probe/recover devices */ | ||
221 | ATA_PROBE_MAX_TRIES = 3, | ||
215 | }; | 222 | }; |
216 | 223 | ||
217 | enum hsm_task_states { | 224 | enum hsm_task_states { |
@@ -246,7 +253,7 @@ struct ata_queued_cmd; | |||
246 | /* typedefs */ | 253 | /* typedefs */ |
247 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); | 254 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); |
248 | typedef void (*ata_probeinit_fn_t)(struct ata_port *); | 255 | typedef void (*ata_probeinit_fn_t)(struct ata_port *); |
249 | typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *); | 256 | typedef int (*ata_reset_fn_t)(struct ata_port *, unsigned int *); |
250 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); | 257 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); |
251 | 258 | ||
252 | struct ata_ioports { | 259 | struct ata_ioports { |
@@ -398,6 +405,7 @@ struct ata_port { | |||
398 | unsigned int mwdma_mask; | 405 | unsigned int mwdma_mask; |
399 | unsigned int udma_mask; | 406 | unsigned int udma_mask; |
400 | unsigned int cbl; /* cable type; ATA_CBL_xxx */ | 407 | unsigned int cbl; /* cable type; ATA_CBL_xxx */ |
408 | unsigned int sata_spd_limit; /* SATA PHY speed limit */ | ||
401 | 409 | ||
402 | struct ata_device device[ATA_MAX_DEVICES]; | 410 | struct ata_device device[ATA_MAX_DEVICES]; |
403 | 411 | ||
@@ -497,15 +505,14 @@ extern void ata_port_probe(struct ata_port *); | |||
497 | extern void __sata_phy_reset(struct ata_port *ap); | 505 | extern void __sata_phy_reset(struct ata_port *ap); |
498 | extern void sata_phy_reset(struct ata_port *ap); | 506 | extern void sata_phy_reset(struct ata_port *ap); |
499 | extern void ata_bus_reset(struct ata_port *ap); | 507 | extern void ata_bus_reset(struct ata_port *ap); |
508 | extern int ata_set_sata_spd(struct ata_port *ap); | ||
500 | extern int ata_drive_probe_reset(struct ata_port *ap, | 509 | extern int ata_drive_probe_reset(struct ata_port *ap, |
501 | ata_probeinit_fn_t probeinit, | 510 | ata_probeinit_fn_t probeinit, |
502 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 511 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |
503 | ata_postreset_fn_t postreset, unsigned int *classes); | 512 | ata_postreset_fn_t postreset, unsigned int *classes); |
504 | extern void ata_std_probeinit(struct ata_port *ap); | 513 | extern void ata_std_probeinit(struct ata_port *ap); |
505 | extern int ata_std_softreset(struct ata_port *ap, int verbose, | 514 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); |
506 | unsigned int *classes); | 515 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); |
507 | extern int sata_std_hardreset(struct ata_port *ap, int verbose, | ||
508 | unsigned int *class); | ||
509 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); | 516 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); |
510 | extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, | 517 | extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, |
511 | int post_reset); | 518 | int post_reset); |
@@ -524,7 +531,6 @@ extern void ata_host_set_remove(struct ata_host_set *host_set); | |||
524 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 531 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
525 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 532 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
526 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 533 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
527 | extern int ata_scsi_error(struct Scsi_Host *host); | ||
528 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 534 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
529 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 535 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
530 | extern int ata_scsi_release(struct Scsi_Host *host); | 536 | extern int ata_scsi_release(struct Scsi_Host *host); |
@@ -539,6 +545,9 @@ extern unsigned int ata_busy_sleep(struct ata_port *ap, | |||
539 | unsigned long timeout); | 545 | unsigned long timeout); |
540 | extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), | 546 | extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), |
541 | void *data, unsigned long delay); | 547 | void *data, unsigned long delay); |
548 | extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, | ||
549 | unsigned long interval_msec, | ||
550 | unsigned long timeout_msec); | ||
542 | 551 | ||
543 | /* | 552 | /* |
544 | * Default driver ops implementations | 553 | * Default driver ops implementations |
@@ -575,7 +584,6 @@ extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | |||
575 | extern u8 ata_bmdma_status(struct ata_port *ap); | 584 | extern u8 ata_bmdma_status(struct ata_port *ap); |
576 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 585 | extern void ata_bmdma_irq_clear(struct ata_port *ap); |
577 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); | 586 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); |
578 | extern void ata_eng_timeout(struct ata_port *ap); | ||
579 | extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, | 587 | extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, |
580 | struct scsi_cmnd *cmd, | 588 | struct scsi_cmnd *cmd, |
581 | void (*done)(struct scsi_cmnd *)); | 589 | void (*done)(struct scsi_cmnd *)); |
@@ -630,6 +638,13 @@ extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bit | |||
630 | extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_device *, unsigned long); | 638 | extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_device *, unsigned long); |
631 | #endif /* CONFIG_PCI */ | 639 | #endif /* CONFIG_PCI */ |
632 | 640 | ||
641 | /* | ||
642 | * EH | ||
643 | */ | ||
644 | extern void ata_eng_timeout(struct ata_port *ap); | ||
645 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | ||
646 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | ||
647 | |||
633 | 648 | ||
634 | static inline int | 649 | static inline int |
635 | ata_sg_is_last(struct scatterlist *sg, struct ata_queued_cmd *qc) | 650 | ata_sg_is_last(struct scatterlist *sg, struct ata_queued_cmd *qc) |
@@ -673,14 +688,34 @@ static inline unsigned int ata_tag_valid(unsigned int tag) | |||
673 | return (tag < ATA_MAX_QUEUE) ? 1 : 0; | 688 | return (tag < ATA_MAX_QUEUE) ? 1 : 0; |
674 | } | 689 | } |
675 | 690 | ||
676 | static inline unsigned int ata_class_present(unsigned int class) | 691 | static inline unsigned int ata_class_enabled(unsigned int class) |
677 | { | 692 | { |
678 | return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; | 693 | return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; |
679 | } | 694 | } |
680 | 695 | ||
681 | static inline unsigned int ata_dev_present(const struct ata_device *dev) | 696 | static inline unsigned int ata_class_disabled(unsigned int class) |
697 | { | ||
698 | return class == ATA_DEV_ATA_UNSUP || class == ATA_DEV_ATAPI_UNSUP; | ||
699 | } | ||
700 | |||
701 | static inline unsigned int ata_class_absent(unsigned int class) | ||
702 | { | ||
703 | return !ata_class_enabled(class) && !ata_class_disabled(class); | ||
704 | } | ||
705 | |||
706 | static inline unsigned int ata_dev_enabled(const struct ata_device *dev) | ||
707 | { | ||
708 | return ata_class_enabled(dev->class); | ||
709 | } | ||
710 | |||
711 | static inline unsigned int ata_dev_disabled(const struct ata_device *dev) | ||
682 | { | 712 | { |
683 | return ata_class_present(dev->class); | 713 | return ata_class_disabled(dev->class); |
714 | } | ||
715 | |||
716 | static inline unsigned int ata_dev_absent(const struct ata_device *dev) | ||
717 | { | ||
718 | return ata_class_absent(dev->class); | ||
684 | } | 719 | } |
685 | 720 | ||
686 | static inline u8 ata_chk_status(struct ata_port *ap) | 721 | static inline u8 ata_chk_status(struct ata_port *ap) |
@@ -946,4 +981,9 @@ static inline void ata_pad_free(struct ata_port *ap, struct device *dev) | |||
946 | dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); | 981 | dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); |
947 | } | 982 | } |
948 | 983 | ||
984 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | ||
985 | { | ||
986 | return (struct ata_port *) &host->hostdata[0]; | ||
987 | } | ||
988 | |||
949 | #endif /* __LINUX_LIBATA_H__ */ | 989 | #endif /* __LINUX_LIBATA_H__ */ |
diff --git a/include/linux/libps2.h b/include/linux/libps2.h index a710bddda4eb..08a450a9dbf7 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h | |||
@@ -28,7 +28,7 @@ struct ps2dev { | |||
28 | struct serio *serio; | 28 | struct serio *serio; |
29 | 29 | ||
30 | /* Ensures that only one command is executing at a time */ | 30 | /* Ensures that only one command is executing at a time */ |
31 | struct semaphore cmd_sem; | 31 | struct mutex cmd_mutex; |
32 | 32 | ||
33 | /* Used to signal completion from interrupt handler */ | 33 | /* Used to signal completion from interrupt handler */ |
34 | wait_queue_head_t wait; | 34 | wait_queue_head_t wait; |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 968b1aa3732c..4ca3e6ad03ec 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -58,8 +58,6 @@ extern int add_one_highpage(struct page *page, int pfn, int bad_ppro); | |||
58 | /* need some defines for these for archs that don't support it */ | 58 | /* need some defines for these for archs that don't support it */ |
59 | extern void online_page(struct page *page); | 59 | extern void online_page(struct page *page); |
60 | /* VM interface that may be used by firmware interface */ | 60 | /* VM interface that may be used by firmware interface */ |
61 | extern int add_memory(u64 start, u64 size); | ||
62 | extern int remove_memory(u64 start, u64 size); | ||
63 | extern int online_pages(unsigned long, unsigned long); | 61 | extern int online_pages(unsigned long, unsigned long); |
64 | 62 | ||
65 | /* reasonably generic interface to expand the physical pages in a zone */ | 63 | /* reasonably generic interface to expand the physical pages in a zone */ |
@@ -92,11 +90,6 @@ static inline int mhp_notimplemented(const char *func) | |||
92 | return -ENOSYS; | 90 | return -ENOSYS; |
93 | } | 91 | } |
94 | 92 | ||
95 | static inline int __add_pages(struct zone *zone, unsigned long start_pfn, | ||
96 | unsigned long nr_pages) | ||
97 | { | ||
98 | return mhp_notimplemented(__FUNCTION__); | ||
99 | } | ||
100 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 93 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
101 | static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, | 94 | static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, |
102 | unsigned long nr_pages) | 95 | unsigned long nr_pages) |
@@ -105,4 +98,11 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, | |||
105 | dump_stack(); | 98 | dump_stack(); |
106 | return -ENOSYS; | 99 | return -ENOSYS; |
107 | } | 100 | } |
101 | |||
102 | #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \ | ||
103 | || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE) | ||
104 | extern int add_memory(u64 start, u64 size); | ||
105 | extern int remove_memory(u64 start, u64 size); | ||
106 | #endif | ||
107 | |||
108 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ | 108 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 7d09962c3c0b..ff0a64073ebc 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -12,7 +12,7 @@ extern void migrate_page_copy(struct page *, struct page *); | |||
12 | extern int migrate_page_remove_references(struct page *, struct page *, int); | 12 | extern int migrate_page_remove_references(struct page *, struct page *, int); |
13 | extern int migrate_pages(struct list_head *l, struct list_head *t, | 13 | extern int migrate_pages(struct list_head *l, struct list_head *t, |
14 | struct list_head *moved, struct list_head *failed); | 14 | struct list_head *moved, struct list_head *failed); |
15 | int migrate_pages_to(struct list_head *pagelist, | 15 | extern int migrate_pages_to(struct list_head *pagelist, |
16 | struct vm_area_struct *vma, int dest); | 16 | struct vm_area_struct *vma, int dest); |
17 | extern int fail_migrate_page(struct page *, struct page *); | 17 | extern int fail_migrate_page(struct page *, struct page *); |
18 | 18 | ||
@@ -26,6 +26,9 @@ static inline int putback_lru_pages(struct list_head *l) { return 0; } | |||
26 | static inline int migrate_pages(struct list_head *l, struct list_head *t, | 26 | static inline int migrate_pages(struct list_head *l, struct list_head *t, |
27 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } | 27 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } |
28 | 28 | ||
29 | static inline int migrate_pages_to(struct list_head *pagelist, | ||
30 | struct vm_area_struct *vma, int dest) { return 0; } | ||
31 | |||
29 | static inline int migrate_prep(void) { return -ENOSYS; } | 32 | static inline int migrate_prep(void) { return -ENOSYS; } |
30 | 33 | ||
31 | /* Possible settings for the migrate_page() method in address_operations */ | 34 | /* Possible settings for the migrate_page() method in address_operations */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 6aa016f1d3ae..1154684209a4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -229,10 +229,9 @@ struct page { | |||
229 | unsigned long private; /* Mapping-private opaque data: | 229 | unsigned long private; /* Mapping-private opaque data: |
230 | * usually used for buffer_heads | 230 | * usually used for buffer_heads |
231 | * if PagePrivate set; used for | 231 | * if PagePrivate set; used for |
232 | * swp_entry_t if PageSwapCache. | 232 | * swp_entry_t if PageSwapCache; |
233 | * When page is free, this | ||
234 | * indicates order in the buddy | 233 | * indicates order in the buddy |
235 | * system. | 234 | * system if PG_buddy is set. |
236 | */ | 235 | */ |
237 | struct address_space *mapping; /* If low bit clear, points to | 236 | struct address_space *mapping; /* If low bit clear, points to |
238 | * inode address_space, or NULL. | 237 | * inode address_space, or NULL. |
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h index f46afec6fbf8..72fc68c5ee96 100644 --- a/include/linux/mtd/blktrans.h +++ b/include/linux/mtd/blktrans.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #ifndef __MTD_TRANS_H__ | 10 | #ifndef __MTD_TRANS_H__ |
11 | #define __MTD_TRANS_H__ | 11 | #define __MTD_TRANS_H__ |
12 | 12 | ||
13 | #include <asm/semaphore.h> | 13 | #include <linux/mutex.h> |
14 | 14 | ||
15 | struct hd_geometry; | 15 | struct hd_geometry; |
16 | struct mtd_info; | 16 | struct mtd_info; |
@@ -22,7 +22,7 @@ struct mtd_blktrans_dev { | |||
22 | struct mtd_blktrans_ops *tr; | 22 | struct mtd_blktrans_ops *tr; |
23 | struct list_head list; | 23 | struct list_head list; |
24 | struct mtd_info *mtd; | 24 | struct mtd_info *mtd; |
25 | struct semaphore sem; | 25 | struct mutex lock; |
26 | int devnum; | 26 | int devnum; |
27 | int blksize; | 27 | int blksize; |
28 | unsigned long size; | 28 | unsigned long size; |
diff --git a/include/linux/mtd/doc2000.h b/include/linux/mtd/doc2000.h index 386a52cf8b1b..9addd073bf15 100644 --- a/include/linux/mtd/doc2000.h +++ b/include/linux/mtd/doc2000.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #define __MTD_DOC2000_H__ | 15 | #define __MTD_DOC2000_H__ |
16 | 16 | ||
17 | #include <linux/mtd/mtd.h> | 17 | #include <linux/mtd/mtd.h> |
18 | #include <asm/semaphore.h> | 18 | #include <linux/mutex.h> |
19 | 19 | ||
20 | #define DoC_Sig1 0 | 20 | #define DoC_Sig1 0 |
21 | #define DoC_Sig2 1 | 21 | #define DoC_Sig2 1 |
@@ -187,7 +187,7 @@ struct DiskOnChip { | |||
187 | int numchips; | 187 | int numchips; |
188 | struct Nand *chips; | 188 | struct Nand *chips; |
189 | struct mtd_info *nextdoc; | 189 | struct mtd_info *nextdoc; |
190 | struct semaphore lock; | 190 | struct mutex lock; |
191 | }; | 191 | }; |
192 | 192 | ||
193 | int doc_decode_ecc(unsigned char sector[512], unsigned char ecc1[6]); | 193 | int doc_decode_ecc(unsigned char sector[512], unsigned char ecc1[6]); |
diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h index 0268125a6271..d7eaa40e5ab0 100644 --- a/include/linux/mtd/inftl.h +++ b/include/linux/mtd/inftl.h | |||
@@ -52,6 +52,11 @@ struct INFTLrecord { | |||
52 | int INFTL_mount(struct INFTLrecord *s); | 52 | int INFTL_mount(struct INFTLrecord *s); |
53 | int INFTL_formatblock(struct INFTLrecord *s, int block); | 53 | int INFTL_formatblock(struct INFTLrecord *s, int block); |
54 | 54 | ||
55 | extern char inftlmountrev[]; | ||
56 | |||
57 | void INFTL_dumptables(struct INFTLrecord *s); | ||
58 | void INFTL_dumpVUchains(struct INFTLrecord *s); | ||
59 | |||
55 | #endif /* __KERNEL__ */ | 60 | #endif /* __KERNEL__ */ |
56 | 61 | ||
57 | #endif /* __MTD_INFTL_H__ */ | 62 | #endif /* __MTD_INFTL_H__ */ |
diff --git a/include/linux/namei.h b/include/linux/namei.h index e6698013e4d0..58cb3d3d44b4 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -75,7 +75,6 @@ extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); | |||
75 | extern void release_open_intent(struct nameidata *); | 75 | extern void release_open_intent(struct nameidata *); |
76 | 76 | ||
77 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); | 77 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); |
78 | extern __deprecated_for_modules struct dentry * lookup_hash(struct nameidata *); | ||
79 | 78 | ||
80 | extern int follow_down(struct vfsmount **, struct dentry **); | 79 | extern int follow_down(struct vfsmount **, struct dentry **); |
81 | extern int follow_up(struct vfsmount **, struct dentry **); | 80 | extern int follow_up(struct vfsmount **, struct dentry **); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 950dc55e5192..40ccf8cc4239 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -598,20 +598,7 @@ DECLARE_PER_CPU(struct softnet_data,softnet_data); | |||
598 | 598 | ||
599 | #define HAVE_NETIF_QUEUE | 599 | #define HAVE_NETIF_QUEUE |
600 | 600 | ||
601 | static inline void __netif_schedule(struct net_device *dev) | 601 | extern void __netif_schedule(struct net_device *dev); |
602 | { | ||
603 | if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) { | ||
604 | unsigned long flags; | ||
605 | struct softnet_data *sd; | ||
606 | |||
607 | local_irq_save(flags); | ||
608 | sd = &__get_cpu_var(softnet_data); | ||
609 | dev->next_sched = sd->output_queue; | ||
610 | sd->output_queue = dev; | ||
611 | raise_softirq_irqoff(NET_TX_SOFTIRQ); | ||
612 | local_irq_restore(flags); | ||
613 | } | ||
614 | } | ||
615 | 602 | ||
616 | static inline void netif_schedule(struct net_device *dev) | 603 | static inline void netif_schedule(struct net_device *dev) |
617 | { | 604 | { |
@@ -675,13 +662,7 @@ static inline void dev_kfree_skb_irq(struct sk_buff *skb) | |||
675 | /* Use this variant in places where it could be invoked | 662 | /* Use this variant in places where it could be invoked |
676 | * either from interrupt or non-interrupt context. | 663 | * either from interrupt or non-interrupt context. |
677 | */ | 664 | */ |
678 | static inline void dev_kfree_skb_any(struct sk_buff *skb) | 665 | extern void dev_kfree_skb_any(struct sk_buff *skb); |
679 | { | ||
680 | if (in_irq() || irqs_disabled()) | ||
681 | dev_kfree_skb_irq(skb); | ||
682 | else | ||
683 | dev_kfree_skb(skb); | ||
684 | } | ||
685 | 666 | ||
686 | #define HAVE_NETIF_RX 1 | 667 | #define HAVE_NETIF_RX 1 |
687 | extern int netif_rx(struct sk_buff *skb); | 668 | extern int netif_rx(struct sk_buff *skb); |
@@ -768,22 +749,9 @@ static inline int netif_device_present(struct net_device *dev) | |||
768 | return test_bit(__LINK_STATE_PRESENT, &dev->state); | 749 | return test_bit(__LINK_STATE_PRESENT, &dev->state); |
769 | } | 750 | } |
770 | 751 | ||
771 | static inline void netif_device_detach(struct net_device *dev) | 752 | extern void netif_device_detach(struct net_device *dev); |
772 | { | ||
773 | if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) && | ||
774 | netif_running(dev)) { | ||
775 | netif_stop_queue(dev); | ||
776 | } | ||
777 | } | ||
778 | 753 | ||
779 | static inline void netif_device_attach(struct net_device *dev) | 754 | extern void netif_device_attach(struct net_device *dev); |
780 | { | ||
781 | if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) && | ||
782 | netif_running(dev)) { | ||
783 | netif_wake_queue(dev); | ||
784 | __netdev_watchdog_up(dev); | ||
785 | } | ||
786 | } | ||
787 | 755 | ||
788 | /* | 756 | /* |
789 | * Network interface message level settings | 757 | * Network interface message level settings |
@@ -851,20 +819,7 @@ static inline int netif_rx_schedule_prep(struct net_device *dev) | |||
851 | * already been called and returned 1. | 819 | * already been called and returned 1. |
852 | */ | 820 | */ |
853 | 821 | ||
854 | static inline void __netif_rx_schedule(struct net_device *dev) | 822 | extern void __netif_rx_schedule(struct net_device *dev); |
855 | { | ||
856 | unsigned long flags; | ||
857 | |||
858 | local_irq_save(flags); | ||
859 | dev_hold(dev); | ||
860 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); | ||
861 | if (dev->quota < 0) | ||
862 | dev->quota += dev->weight; | ||
863 | else | ||
864 | dev->quota = dev->weight; | ||
865 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
866 | local_irq_restore(flags); | ||
867 | } | ||
868 | 823 | ||
869 | /* Try to reschedule poll. Called by irq handler. */ | 824 | /* Try to reschedule poll. Called by irq handler. */ |
870 | 825 | ||
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 412e52ca9720..b31a9bca9361 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -110,6 +110,8 @@ struct nf_info | |||
110 | /* Function to register/unregister hook points. */ | 110 | /* Function to register/unregister hook points. */ |
111 | int nf_register_hook(struct nf_hook_ops *reg); | 111 | int nf_register_hook(struct nf_hook_ops *reg); |
112 | void nf_unregister_hook(struct nf_hook_ops *reg); | 112 | void nf_unregister_hook(struct nf_hook_ops *reg); |
113 | int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n); | ||
114 | void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n); | ||
113 | 115 | ||
114 | /* Functions to register get/setsockopt ranges (non-inclusive). You | 116 | /* Functions to register get/setsockopt ranges (non-inclusive). You |
115 | need to check permissions yourself! */ | 117 | need to check permissions yourself! */ |
@@ -281,16 +283,42 @@ extern void nf_invalidate_cache(int pf); | |||
281 | Returns true or false. */ | 283 | Returns true or false. */ |
282 | extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); | 284 | extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); |
283 | 285 | ||
284 | struct nf_queue_rerouter { | 286 | struct nf_afinfo { |
285 | void (*save)(const struct sk_buff *skb, struct nf_info *info); | 287 | unsigned short family; |
286 | int (*reroute)(struct sk_buff **skb, const struct nf_info *info); | 288 | unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook, |
287 | int rer_size; | 289 | unsigned int dataoff, u_int8_t protocol); |
290 | void (*saveroute)(const struct sk_buff *skb, | ||
291 | struct nf_info *info); | ||
292 | int (*reroute)(struct sk_buff **skb, | ||
293 | const struct nf_info *info); | ||
294 | int route_key_size; | ||
288 | }; | 295 | }; |
289 | 296 | ||
290 | #define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info)) | 297 | extern struct nf_afinfo *nf_afinfo[]; |
298 | static inline struct nf_afinfo *nf_get_afinfo(unsigned short family) | ||
299 | { | ||
300 | return rcu_dereference(nf_afinfo[family]); | ||
301 | } | ||
302 | |||
303 | static inline unsigned int | ||
304 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, | ||
305 | u_int8_t protocol, unsigned short family) | ||
306 | { | ||
307 | struct nf_afinfo *afinfo; | ||
308 | unsigned int csum = 0; | ||
309 | |||
310 | rcu_read_lock(); | ||
311 | afinfo = nf_get_afinfo(family); | ||
312 | if (afinfo) | ||
313 | csum = afinfo->checksum(skb, hook, dataoff, protocol); | ||
314 | rcu_read_unlock(); | ||
315 | return csum; | ||
316 | } | ||
291 | 317 | ||
292 | extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer); | 318 | extern int nf_register_afinfo(struct nf_afinfo *afinfo); |
293 | extern int nf_unregister_queue_rerouter(int pf); | 319 | extern void nf_unregister_afinfo(struct nf_afinfo *afinfo); |
320 | |||
321 | #define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info)) | ||
294 | 322 | ||
295 | #include <net/flow.h> | 323 | #include <net/flow.h> |
296 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); | 324 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 1350e47b0234..f6bdef82a322 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -142,6 +142,12 @@ struct xt_counters_info | |||
142 | #define ASSERT_WRITE_LOCK(x) | 142 | #define ASSERT_WRITE_LOCK(x) |
143 | #include <linux/netfilter_ipv4/listhelp.h> | 143 | #include <linux/netfilter_ipv4/listhelp.h> |
144 | 144 | ||
145 | #ifdef CONFIG_COMPAT | ||
146 | #define COMPAT_TO_USER 1 | ||
147 | #define COMPAT_FROM_USER -1 | ||
148 | #define COMPAT_CALC_SIZE 0 | ||
149 | #endif | ||
150 | |||
145 | struct xt_match | 151 | struct xt_match |
146 | { | 152 | { |
147 | struct list_head list; | 153 | struct list_head list; |
@@ -175,6 +181,9 @@ struct xt_match | |||
175 | void (*destroy)(const struct xt_match *match, void *matchinfo, | 181 | void (*destroy)(const struct xt_match *match, void *matchinfo, |
176 | unsigned int matchinfosize); | 182 | unsigned int matchinfosize); |
177 | 183 | ||
184 | /* Called when userspace align differs from kernel space one */ | ||
185 | int (*compat)(void *match, void **dstptr, int *size, int convert); | ||
186 | |||
178 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 187 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
179 | struct module *me; | 188 | struct module *me; |
180 | 189 | ||
@@ -220,6 +229,9 @@ struct xt_target | |||
220 | void (*destroy)(const struct xt_target *target, void *targinfo, | 229 | void (*destroy)(const struct xt_target *target, void *targinfo, |
221 | unsigned int targinfosize); | 230 | unsigned int targinfosize); |
222 | 231 | ||
232 | /* Called when userspace align differs from kernel space one */ | ||
233 | int (*compat)(void *target, void **dstptr, int *size, int convert); | ||
234 | |||
223 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 235 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
224 | struct module *me; | 236 | struct module *me; |
225 | 237 | ||
@@ -314,6 +326,61 @@ extern void xt_proto_fini(int af); | |||
314 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 326 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
315 | extern void xt_free_table_info(struct xt_table_info *info); | 327 | extern void xt_free_table_info(struct xt_table_info *info); |
316 | 328 | ||
329 | #ifdef CONFIG_COMPAT | ||
330 | #include <net/compat.h> | ||
331 | |||
332 | struct compat_xt_entry_match | ||
333 | { | ||
334 | union { | ||
335 | struct { | ||
336 | u_int16_t match_size; | ||
337 | char name[XT_FUNCTION_MAXNAMELEN - 1]; | ||
338 | u_int8_t revision; | ||
339 | } user; | ||
340 | u_int16_t match_size; | ||
341 | } u; | ||
342 | unsigned char data[0]; | ||
343 | }; | ||
344 | |||
345 | struct compat_xt_entry_target | ||
346 | { | ||
347 | union { | ||
348 | struct { | ||
349 | u_int16_t target_size; | ||
350 | char name[XT_FUNCTION_MAXNAMELEN - 1]; | ||
351 | u_int8_t revision; | ||
352 | } user; | ||
353 | u_int16_t target_size; | ||
354 | } u; | ||
355 | unsigned char data[0]; | ||
356 | }; | ||
357 | |||
358 | /* FIXME: this works only on 32 bit tasks | ||
359 | * need to change whole approach in order to calculate align as function of | ||
360 | * current task alignment */ | ||
361 | |||
362 | struct compat_xt_counters | ||
363 | { | ||
364 | u_int32_t cnt[4]; | ||
365 | }; | ||
366 | |||
367 | struct compat_xt_counters_info | ||
368 | { | ||
369 | char name[XT_TABLE_MAXNAMELEN]; | ||
370 | compat_uint_t num_counters; | ||
371 | struct compat_xt_counters counters[0]; | ||
372 | }; | ||
373 | |||
374 | #define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \ | ||
375 | & ~(__alignof__(struct compat_xt_counters)-1)) | ||
376 | |||
377 | extern void xt_compat_lock(int af); | ||
378 | extern void xt_compat_unlock(int af); | ||
379 | extern int xt_compat_match(void *match, void **dstptr, int *size, int convert); | ||
380 | extern int xt_compat_target(void *target, void **dstptr, int *size, | ||
381 | int convert); | ||
382 | |||
383 | #endif /* CONFIG_COMPAT */ | ||
317 | #endif /* __KERNEL__ */ | 384 | #endif /* __KERNEL__ */ |
318 | 385 | ||
319 | #endif /* _X_TABLES_H */ | 386 | #endif /* _X_TABLES_H */ |
diff --git a/include/linux/netfilter/xt_esp.h b/include/linux/netfilter/xt_esp.h new file mode 100644 index 000000000000..9380fb1c27da --- /dev/null +++ b/include/linux/netfilter/xt_esp.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _XT_ESP_H | ||
2 | #define _XT_ESP_H | ||
3 | |||
4 | struct xt_esp | ||
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | |||
10 | /* Values for "invflags" field in struct xt_esp. */ | ||
11 | #define XT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
12 | #define XT_ESP_INV_MASK 0x01 /* All possible flags. */ | ||
13 | |||
14 | #endif /*_XT_ESP_H*/ | ||
diff --git a/include/linux/netfilter/xt_multiport.h b/include/linux/netfilter/xt_multiport.h new file mode 100644 index 000000000000..d49ee4183710 --- /dev/null +++ b/include/linux/netfilter/xt_multiport.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef _XT_MULTIPORT_H | ||
2 | #define _XT_MULTIPORT_H | ||
3 | |||
4 | enum xt_multiport_flags | ||
5 | { | ||
6 | XT_MULTIPORT_SOURCE, | ||
7 | XT_MULTIPORT_DESTINATION, | ||
8 | XT_MULTIPORT_EITHER | ||
9 | }; | ||
10 | |||
11 | #define XT_MULTI_PORTS 15 | ||
12 | |||
13 | /* Must fit inside union xt_matchinfo: 16 bytes */ | ||
14 | struct xt_multiport | ||
15 | { | ||
16 | u_int8_t flags; /* Type of comparison */ | ||
17 | u_int8_t count; /* Number of ports */ | ||
18 | u_int16_t ports[XT_MULTI_PORTS]; /* Ports */ | ||
19 | }; | ||
20 | |||
21 | struct xt_multiport_v1 | ||
22 | { | ||
23 | u_int8_t flags; /* Type of comparison */ | ||
24 | u_int8_t count; /* Number of ports */ | ||
25 | u_int16_t ports[XT_MULTI_PORTS]; /* Ports */ | ||
26 | u_int8_t pflags[XT_MULTI_PORTS]; /* Port flags */ | ||
27 | u_int8_t invert; /* Invert flag */ | ||
28 | }; | ||
29 | |||
30 | #endif /*_XT_MULTIPORT_H*/ | ||
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 43c09d790b83..85301c5e8d24 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -80,6 +80,8 @@ enum nf_ip_hook_priorities { | |||
80 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
81 | extern int ip_route_me_harder(struct sk_buff **pskb); | 81 | extern int ip_route_me_harder(struct sk_buff **pskb); |
82 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); | 82 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); |
83 | extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook, | ||
84 | unsigned int dataoff, u_int8_t protocol); | ||
83 | #endif /*__KERNEL__*/ | 85 | #endif /*__KERNEL__*/ |
84 | 86 | ||
85 | #endif /*__LINUX_IP_NETFILTER_H*/ | 87 | #endif /*__LINUX_IP_NETFILTER_H*/ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_h323.h b/include/linux/netfilter_ipv4/ip_conntrack_h323.h index 0987cea53840..eace86bd2adb 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_h323.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_h323.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h> | ||
7 | |||
6 | #define RAS_PORT 1719 | 8 | #define RAS_PORT 1719 |
7 | #define Q931_PORT 1720 | 9 | #define Q931_PORT 1720 |
8 | #define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ | 10 | #define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ |
@@ -25,6 +27,56 @@ struct ip_ct_h323_master { | |||
25 | }; | 27 | }; |
26 | }; | 28 | }; |
27 | 29 | ||
30 | struct ip_conntrack_expect; | ||
31 | |||
32 | extern int get_h225_addr(unsigned char *data, TransportAddress * addr, | ||
33 | u_int32_t * ip, u_int16_t * port); | ||
34 | extern void ip_conntrack_h245_expect(struct ip_conntrack *new, | ||
35 | struct ip_conntrack_expect *this); | ||
36 | extern void ip_conntrack_q931_expect(struct ip_conntrack *new, | ||
37 | struct ip_conntrack_expect *this); | ||
38 | extern int (*set_h245_addr_hook) (struct sk_buff ** pskb, | ||
39 | unsigned char **data, int dataoff, | ||
40 | H245_TransportAddress * addr, | ||
41 | u_int32_t ip, u_int16_t port); | ||
42 | extern int (*set_h225_addr_hook) (struct sk_buff ** pskb, | ||
43 | unsigned char **data, int dataoff, | ||
44 | TransportAddress * addr, | ||
45 | u_int32_t ip, u_int16_t port); | ||
46 | extern int (*set_sig_addr_hook) (struct sk_buff ** pskb, | ||
47 | struct ip_conntrack * ct, | ||
48 | enum ip_conntrack_info ctinfo, | ||
49 | unsigned char **data, | ||
50 | TransportAddress * addr, int count); | ||
51 | extern int (*set_ras_addr_hook) (struct sk_buff ** pskb, | ||
52 | struct ip_conntrack * ct, | ||
53 | enum ip_conntrack_info ctinfo, | ||
54 | unsigned char **data, | ||
55 | TransportAddress * addr, int count); | ||
56 | extern int (*nat_rtp_rtcp_hook) (struct sk_buff ** pskb, | ||
57 | struct ip_conntrack * ct, | ||
58 | enum ip_conntrack_info ctinfo, | ||
59 | unsigned char **data, int dataoff, | ||
60 | H245_TransportAddress * addr, | ||
61 | u_int16_t port, u_int16_t rtp_port, | ||
62 | struct ip_conntrack_expect * rtp_exp, | ||
63 | struct ip_conntrack_expect * rtcp_exp); | ||
64 | extern int (*nat_t120_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
65 | enum ip_conntrack_info ctinfo, | ||
66 | unsigned char **data, int dataoff, | ||
67 | H245_TransportAddress * addr, u_int16_t port, | ||
68 | struct ip_conntrack_expect * exp); | ||
69 | extern int (*nat_h245_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
70 | enum ip_conntrack_info ctinfo, | ||
71 | unsigned char **data, int dataoff, | ||
72 | TransportAddress * addr, u_int16_t port, | ||
73 | struct ip_conntrack_expect * exp); | ||
74 | extern int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
75 | enum ip_conntrack_info ctinfo, | ||
76 | unsigned char **data, TransportAddress * addr, | ||
77 | int idx, u_int16_t port, | ||
78 | struct ip_conntrack_expect * exp); | ||
79 | |||
28 | #endif | 80 | #endif |
29 | 81 | ||
30 | #endif | 82 | #endif |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h new file mode 100644 index 000000000000..0bd828081c0c --- /dev/null +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h | |||
@@ -0,0 +1,98 @@ | |||
1 | /**************************************************************************** | ||
2 | * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323 | ||
3 | * conntrack/NAT module. | ||
4 | * | ||
5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@hotmail.com> | ||
6 | * | ||
7 | * This source code is licensed under General Public License version 2. | ||
8 | * | ||
9 | * | ||
10 | * This library is based on H.225 version 4, H.235 version 2 and H.245 | ||
11 | * version 7. It is extremely optimized to decode only the absolutely | ||
12 | * necessary objects in a signal for Linux kernel NAT module use, so don't | ||
13 | * expect it to be a full ASN.1 library. | ||
14 | * | ||
15 | * Features: | ||
16 | * | ||
17 | * 1. Small. The total size of code plus data is less than 20 KB (IA32). | ||
18 | * 2. Fast. Decoding Netmeeting's Setup signal 1 million times on a PIII 866 | ||
19 | * takes only 3.9 seconds. | ||
20 | * 3. No memory allocation. It uses a static object. No need to initialize or | ||
21 | * cleanup. | ||
22 | * 4. Thread safe. | ||
23 | * 5. Support embedded architectures that has no misaligned memory access | ||
24 | * support. | ||
25 | * | ||
26 | * Limitations: | ||
27 | * | ||
28 | * 1. At most 30 faststart entries. Actually this is limited by ethernet's MTU. | ||
29 | * If a Setup signal contains more than 30 faststart, the packet size will | ||
30 | * very likely exceed the MTU size, then the TPKT will be fragmented. I | ||
31 | * don't know how to handle this in a Netfilter module. Anybody can help? | ||
32 | * Although I think 30 is enough for most of the cases. | ||
33 | * 2. IPv4 addresses only. | ||
34 | * | ||
35 | ****************************************************************************/ | ||
36 | |||
37 | #ifndef _IP_CONNTRACK_HELPER_H323_ASN1_H_ | ||
38 | #define _IP_CONNTRACK_HELPER_H323_ASN1_H_ | ||
39 | |||
40 | /***************************************************************************** | ||
41 | * H.323 Types | ||
42 | ****************************************************************************/ | ||
43 | #include "ip_conntrack_helper_h323_types.h" | ||
44 | |||
45 | typedef struct { | ||
46 | enum { | ||
47 | Q931_NationalEscape = 0x00, | ||
48 | Q931_Alerting = 0x01, | ||
49 | Q931_CallProceeding = 0x02, | ||
50 | Q931_Connect = 0x07, | ||
51 | Q931_ConnectAck = 0x0F, | ||
52 | Q931_Progress = 0x03, | ||
53 | Q931_Setup = 0x05, | ||
54 | Q931_SetupAck = 0x0D, | ||
55 | Q931_Resume = 0x26, | ||
56 | Q931_ResumeAck = 0x2E, | ||
57 | Q931_ResumeReject = 0x22, | ||
58 | Q931_Suspend = 0x25, | ||
59 | Q931_SuspendAck = 0x2D, | ||
60 | Q931_SuspendReject = 0x21, | ||
61 | Q931_UserInformation = 0x20, | ||
62 | Q931_Disconnect = 0x45, | ||
63 | Q931_Release = 0x4D, | ||
64 | Q931_ReleaseComplete = 0x5A, | ||
65 | Q931_Restart = 0x46, | ||
66 | Q931_RestartAck = 0x4E, | ||
67 | Q931_Segment = 0x60, | ||
68 | Q931_CongestionCtrl = 0x79, | ||
69 | Q931_Information = 0x7B, | ||
70 | Q931_Notify = 0x6E, | ||
71 | Q931_Status = 0x7D, | ||
72 | Q931_StatusEnquiry = 0x75, | ||
73 | Q931_Facility = 0x62 | ||
74 | } MessageType; | ||
75 | H323_UserInformation UUIE; | ||
76 | } Q931; | ||
77 | |||
78 | /***************************************************************************** | ||
79 | * Decode Functions Return Codes | ||
80 | ****************************************************************************/ | ||
81 | |||
82 | #define H323_ERROR_NONE 0 /* Decoded successfully */ | ||
83 | #define H323_ERROR_STOP 1 /* Decoding stopped, not really an error */ | ||
84 | #define H323_ERROR_BOUND -1 | ||
85 | #define H323_ERROR_RANGE -2 | ||
86 | |||
87 | |||
88 | /***************************************************************************** | ||
89 | * Decode Functions | ||
90 | ****************************************************************************/ | ||
91 | |||
92 | int DecodeRasMessage(unsigned char *buf, size_t sz, RasMessage * ras); | ||
93 | int DecodeQ931(unsigned char *buf, size_t sz, Q931 * q931); | ||
94 | int DecodeMultimediaSystemControlMessage(unsigned char *buf, size_t sz, | ||
95 | MultimediaSystemControlMessage * | ||
96 | mscm); | ||
97 | |||
98 | #endif | ||
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h new file mode 100644 index 000000000000..cc98f7aa5abe --- /dev/null +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h | |||
@@ -0,0 +1,938 @@ | |||
1 | /* Generated by Jing Min Zhao's ASN.1 parser, Mar 15 2006 | ||
2 | * | ||
3 | * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> | ||
4 | * | ||
5 | * This source code is licensed under General Public License version 2. | ||
6 | */ | ||
7 | |||
8 | typedef struct TransportAddress_ipAddress { /* SEQUENCE */ | ||
9 | int options; /* No use */ | ||
10 | unsigned ip; | ||
11 | } TransportAddress_ipAddress; | ||
12 | |||
13 | typedef struct TransportAddress { /* CHOICE */ | ||
14 | enum { | ||
15 | eTransportAddress_ipAddress, | ||
16 | eTransportAddress_ipSourceRoute, | ||
17 | eTransportAddress_ipxAddress, | ||
18 | eTransportAddress_ip6Address, | ||
19 | eTransportAddress_netBios, | ||
20 | eTransportAddress_nsap, | ||
21 | eTransportAddress_nonStandardAddress, | ||
22 | } choice; | ||
23 | union { | ||
24 | TransportAddress_ipAddress ipAddress; | ||
25 | }; | ||
26 | } TransportAddress; | ||
27 | |||
28 | typedef struct DataProtocolCapability { /* CHOICE */ | ||
29 | enum { | ||
30 | eDataProtocolCapability_nonStandard, | ||
31 | eDataProtocolCapability_v14buffered, | ||
32 | eDataProtocolCapability_v42lapm, | ||
33 | eDataProtocolCapability_hdlcFrameTunnelling, | ||
34 | eDataProtocolCapability_h310SeparateVCStack, | ||
35 | eDataProtocolCapability_h310SingleVCStack, | ||
36 | eDataProtocolCapability_transparent, | ||
37 | eDataProtocolCapability_segmentationAndReassembly, | ||
38 | eDataProtocolCapability_hdlcFrameTunnelingwSAR, | ||
39 | eDataProtocolCapability_v120, | ||
40 | eDataProtocolCapability_separateLANStack, | ||
41 | eDataProtocolCapability_v76wCompression, | ||
42 | eDataProtocolCapability_tcp, | ||
43 | eDataProtocolCapability_udp, | ||
44 | } choice; | ||
45 | } DataProtocolCapability; | ||
46 | |||
47 | typedef struct DataApplicationCapability_application { /* CHOICE */ | ||
48 | enum { | ||
49 | eDataApplicationCapability_application_nonStandard, | ||
50 | eDataApplicationCapability_application_t120, | ||
51 | eDataApplicationCapability_application_dsm_cc, | ||
52 | eDataApplicationCapability_application_userData, | ||
53 | eDataApplicationCapability_application_t84, | ||
54 | eDataApplicationCapability_application_t434, | ||
55 | eDataApplicationCapability_application_h224, | ||
56 | eDataApplicationCapability_application_nlpid, | ||
57 | eDataApplicationCapability_application_dsvdControl, | ||
58 | eDataApplicationCapability_application_h222DataPartitioning, | ||
59 | eDataApplicationCapability_application_t30fax, | ||
60 | eDataApplicationCapability_application_t140, | ||
61 | eDataApplicationCapability_application_t38fax, | ||
62 | eDataApplicationCapability_application_genericDataCapability, | ||
63 | } choice; | ||
64 | union { | ||
65 | DataProtocolCapability t120; | ||
66 | }; | ||
67 | } DataApplicationCapability_application; | ||
68 | |||
69 | typedef struct DataApplicationCapability { /* SEQUENCE */ | ||
70 | int options; /* No use */ | ||
71 | DataApplicationCapability_application application; | ||
72 | } DataApplicationCapability; | ||
73 | |||
74 | typedef struct DataType { /* CHOICE */ | ||
75 | enum { | ||
76 | eDataType_nonStandard, | ||
77 | eDataType_nullData, | ||
78 | eDataType_videoData, | ||
79 | eDataType_audioData, | ||
80 | eDataType_data, | ||
81 | eDataType_encryptionData, | ||
82 | eDataType_h235Control, | ||
83 | eDataType_h235Media, | ||
84 | eDataType_multiplexedStream, | ||
85 | } choice; | ||
86 | union { | ||
87 | DataApplicationCapability data; | ||
88 | }; | ||
89 | } DataType; | ||
90 | |||
91 | typedef struct UnicastAddress_iPAddress { /* SEQUENCE */ | ||
92 | int options; /* No use */ | ||
93 | unsigned network; | ||
94 | } UnicastAddress_iPAddress; | ||
95 | |||
96 | typedef struct UnicastAddress { /* CHOICE */ | ||
97 | enum { | ||
98 | eUnicastAddress_iPAddress, | ||
99 | eUnicastAddress_iPXAddress, | ||
100 | eUnicastAddress_iP6Address, | ||
101 | eUnicastAddress_netBios, | ||
102 | eUnicastAddress_iPSourceRouteAddress, | ||
103 | eUnicastAddress_nsap, | ||
104 | eUnicastAddress_nonStandardAddress, | ||
105 | } choice; | ||
106 | union { | ||
107 | UnicastAddress_iPAddress iPAddress; | ||
108 | }; | ||
109 | } UnicastAddress; | ||
110 | |||
111 | typedef struct H245_TransportAddress { /* CHOICE */ | ||
112 | enum { | ||
113 | eH245_TransportAddress_unicastAddress, | ||
114 | eH245_TransportAddress_multicastAddress, | ||
115 | } choice; | ||
116 | union { | ||
117 | UnicastAddress unicastAddress; | ||
118 | }; | ||
119 | } H245_TransportAddress; | ||
120 | |||
121 | typedef struct H2250LogicalChannelParameters { /* SEQUENCE */ | ||
122 | enum { | ||
123 | eH2250LogicalChannelParameters_nonStandard = (1 << 31), | ||
124 | eH2250LogicalChannelParameters_associatedSessionID = | ||
125 | (1 << 30), | ||
126 | eH2250LogicalChannelParameters_mediaChannel = (1 << 29), | ||
127 | eH2250LogicalChannelParameters_mediaGuaranteedDelivery = | ||
128 | (1 << 28), | ||
129 | eH2250LogicalChannelParameters_mediaControlChannel = | ||
130 | (1 << 27), | ||
131 | eH2250LogicalChannelParameters_mediaControlGuaranteedDelivery | ||
132 | = (1 << 26), | ||
133 | eH2250LogicalChannelParameters_silenceSuppression = (1 << 25), | ||
134 | eH2250LogicalChannelParameters_destination = (1 << 24), | ||
135 | eH2250LogicalChannelParameters_dynamicRTPPayloadType = | ||
136 | (1 << 23), | ||
137 | eH2250LogicalChannelParameters_mediaPacketization = (1 << 22), | ||
138 | eH2250LogicalChannelParameters_transportCapability = | ||
139 | (1 << 21), | ||
140 | eH2250LogicalChannelParameters_redundancyEncoding = (1 << 20), | ||
141 | eH2250LogicalChannelParameters_source = (1 << 19), | ||
142 | } options; | ||
143 | H245_TransportAddress mediaChannel; | ||
144 | H245_TransportAddress mediaControlChannel; | ||
145 | } H2250LogicalChannelParameters; | ||
146 | |||
147 | typedef struct OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters { /* CHOICE */ | ||
148 | enum { | ||
149 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h222LogicalChannelParameters, | ||
150 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h223LogicalChannelParameters, | ||
151 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_v76LogicalChannelParameters, | ||
152 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters, | ||
153 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_none, | ||
154 | } choice; | ||
155 | union { | ||
156 | H2250LogicalChannelParameters h2250LogicalChannelParameters; | ||
157 | }; | ||
158 | } OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters; | ||
159 | |||
160 | typedef struct OpenLogicalChannel_forwardLogicalChannelParameters { /* SEQUENCE */ | ||
161 | enum { | ||
162 | eOpenLogicalChannel_forwardLogicalChannelParameters_portNumber | ||
163 | = (1 << 31), | ||
164 | eOpenLogicalChannel_forwardLogicalChannelParameters_forwardLogicalChannelDependency | ||
165 | = (1 << 30), | ||
166 | eOpenLogicalChannel_forwardLogicalChannelParameters_replacementFor | ||
167 | = (1 << 29), | ||
168 | } options; | ||
169 | DataType dataType; | ||
170 | OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters | ||
171 | multiplexParameters; | ||
172 | } OpenLogicalChannel_forwardLogicalChannelParameters; | ||
173 | |||
174 | typedef struct OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters { /* CHOICE */ | ||
175 | enum { | ||
176 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h223LogicalChannelParameters, | ||
177 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_v76LogicalChannelParameters, | ||
178 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters, | ||
179 | } choice; | ||
180 | union { | ||
181 | H2250LogicalChannelParameters h2250LogicalChannelParameters; | ||
182 | }; | ||
183 | } OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters; | ||
184 | |||
185 | typedef struct OpenLogicalChannel_reverseLogicalChannelParameters { /* SEQUENCE */ | ||
186 | enum { | ||
187 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters | ||
188 | = (1 << 31), | ||
189 | eOpenLogicalChannel_reverseLogicalChannelParameters_reverseLogicalChannelDependency | ||
190 | = (1 << 30), | ||
191 | eOpenLogicalChannel_reverseLogicalChannelParameters_replacementFor | ||
192 | = (1 << 29), | ||
193 | } options; | ||
194 | OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters | ||
195 | multiplexParameters; | ||
196 | } OpenLogicalChannel_reverseLogicalChannelParameters; | ||
197 | |||
198 | typedef struct NetworkAccessParameters_networkAddress { /* CHOICE */ | ||
199 | enum { | ||
200 | eNetworkAccessParameters_networkAddress_q2931Address, | ||
201 | eNetworkAccessParameters_networkAddress_e164Address, | ||
202 | eNetworkAccessParameters_networkAddress_localAreaAddress, | ||
203 | } choice; | ||
204 | union { | ||
205 | H245_TransportAddress localAreaAddress; | ||
206 | }; | ||
207 | } NetworkAccessParameters_networkAddress; | ||
208 | |||
209 | typedef struct NetworkAccessParameters { /* SEQUENCE */ | ||
210 | enum { | ||
211 | eNetworkAccessParameters_distribution = (1 << 31), | ||
212 | eNetworkAccessParameters_externalReference = (1 << 30), | ||
213 | eNetworkAccessParameters_t120SetupProcedure = (1 << 29), | ||
214 | } options; | ||
215 | NetworkAccessParameters_networkAddress networkAddress; | ||
216 | } NetworkAccessParameters; | ||
217 | |||
218 | typedef struct OpenLogicalChannel { /* SEQUENCE */ | ||
219 | enum { | ||
220 | eOpenLogicalChannel_reverseLogicalChannelParameters = | ||
221 | (1 << 31), | ||
222 | eOpenLogicalChannel_separateStack = (1 << 30), | ||
223 | eOpenLogicalChannel_encryptionSync = (1 << 29), | ||
224 | } options; | ||
225 | OpenLogicalChannel_forwardLogicalChannelParameters | ||
226 | forwardLogicalChannelParameters; | ||
227 | OpenLogicalChannel_reverseLogicalChannelParameters | ||
228 | reverseLogicalChannelParameters; | ||
229 | NetworkAccessParameters separateStack; | ||
230 | } OpenLogicalChannel; | ||
231 | |||
232 | typedef struct Setup_UUIE_fastStart { /* SEQUENCE OF */ | ||
233 | int count; | ||
234 | OpenLogicalChannel item[30]; | ||
235 | } Setup_UUIE_fastStart; | ||
236 | |||
237 | typedef struct Setup_UUIE { /* SEQUENCE */ | ||
238 | enum { | ||
239 | eSetup_UUIE_h245Address = (1 << 31), | ||
240 | eSetup_UUIE_sourceAddress = (1 << 30), | ||
241 | eSetup_UUIE_destinationAddress = (1 << 29), | ||
242 | eSetup_UUIE_destCallSignalAddress = (1 << 28), | ||
243 | eSetup_UUIE_destExtraCallInfo = (1 << 27), | ||
244 | eSetup_UUIE_destExtraCRV = (1 << 26), | ||
245 | eSetup_UUIE_callServices = (1 << 25), | ||
246 | eSetup_UUIE_sourceCallSignalAddress = (1 << 24), | ||
247 | eSetup_UUIE_remoteExtensionAddress = (1 << 23), | ||
248 | eSetup_UUIE_callIdentifier = (1 << 22), | ||
249 | eSetup_UUIE_h245SecurityCapability = (1 << 21), | ||
250 | eSetup_UUIE_tokens = (1 << 20), | ||
251 | eSetup_UUIE_cryptoTokens = (1 << 19), | ||
252 | eSetup_UUIE_fastStart = (1 << 18), | ||
253 | eSetup_UUIE_mediaWaitForConnect = (1 << 17), | ||
254 | eSetup_UUIE_canOverlapSend = (1 << 16), | ||
255 | eSetup_UUIE_endpointIdentifier = (1 << 15), | ||
256 | eSetup_UUIE_multipleCalls = (1 << 14), | ||
257 | eSetup_UUIE_maintainConnection = (1 << 13), | ||
258 | eSetup_UUIE_connectionParameters = (1 << 12), | ||
259 | eSetup_UUIE_language = (1 << 11), | ||
260 | eSetup_UUIE_presentationIndicator = (1 << 10), | ||
261 | eSetup_UUIE_screeningIndicator = (1 << 9), | ||
262 | eSetup_UUIE_serviceControl = (1 << 8), | ||
263 | eSetup_UUIE_symmetricOperationRequired = (1 << 7), | ||
264 | eSetup_UUIE_capacity = (1 << 6), | ||
265 | eSetup_UUIE_circuitInfo = (1 << 5), | ||
266 | eSetup_UUIE_desiredProtocols = (1 << 4), | ||
267 | eSetup_UUIE_neededFeatures = (1 << 3), | ||
268 | eSetup_UUIE_desiredFeatures = (1 << 2), | ||
269 | eSetup_UUIE_supportedFeatures = (1 << 1), | ||
270 | eSetup_UUIE_parallelH245Control = (1 << 0), | ||
271 | } options; | ||
272 | TransportAddress h245Address; | ||
273 | TransportAddress destCallSignalAddress; | ||
274 | TransportAddress sourceCallSignalAddress; | ||
275 | Setup_UUIE_fastStart fastStart; | ||
276 | } Setup_UUIE; | ||
277 | |||
278 | typedef struct CallProceeding_UUIE_fastStart { /* SEQUENCE OF */ | ||
279 | int count; | ||
280 | OpenLogicalChannel item[30]; | ||
281 | } CallProceeding_UUIE_fastStart; | ||
282 | |||
283 | typedef struct CallProceeding_UUIE { /* SEQUENCE */ | ||
284 | enum { | ||
285 | eCallProceeding_UUIE_h245Address = (1 << 31), | ||
286 | eCallProceeding_UUIE_callIdentifier = (1 << 30), | ||
287 | eCallProceeding_UUIE_h245SecurityMode = (1 << 29), | ||
288 | eCallProceeding_UUIE_tokens = (1 << 28), | ||
289 | eCallProceeding_UUIE_cryptoTokens = (1 << 27), | ||
290 | eCallProceeding_UUIE_fastStart = (1 << 26), | ||
291 | eCallProceeding_UUIE_multipleCalls = (1 << 25), | ||
292 | eCallProceeding_UUIE_maintainConnection = (1 << 24), | ||
293 | eCallProceeding_UUIE_fastConnectRefused = (1 << 23), | ||
294 | eCallProceeding_UUIE_featureSet = (1 << 22), | ||
295 | } options; | ||
296 | TransportAddress h245Address; | ||
297 | CallProceeding_UUIE_fastStart fastStart; | ||
298 | } CallProceeding_UUIE; | ||
299 | |||
300 | typedef struct Connect_UUIE_fastStart { /* SEQUENCE OF */ | ||
301 | int count; | ||
302 | OpenLogicalChannel item[30]; | ||
303 | } Connect_UUIE_fastStart; | ||
304 | |||
305 | typedef struct Connect_UUIE { /* SEQUENCE */ | ||
306 | enum { | ||
307 | eConnect_UUIE_h245Address = (1 << 31), | ||
308 | eConnect_UUIE_callIdentifier = (1 << 30), | ||
309 | eConnect_UUIE_h245SecurityMode = (1 << 29), | ||
310 | eConnect_UUIE_tokens = (1 << 28), | ||
311 | eConnect_UUIE_cryptoTokens = (1 << 27), | ||
312 | eConnect_UUIE_fastStart = (1 << 26), | ||
313 | eConnect_UUIE_multipleCalls = (1 << 25), | ||
314 | eConnect_UUIE_maintainConnection = (1 << 24), | ||
315 | eConnect_UUIE_language = (1 << 23), | ||
316 | eConnect_UUIE_connectedAddress = (1 << 22), | ||
317 | eConnect_UUIE_presentationIndicator = (1 << 21), | ||
318 | eConnect_UUIE_screeningIndicator = (1 << 20), | ||
319 | eConnect_UUIE_fastConnectRefused = (1 << 19), | ||
320 | eConnect_UUIE_serviceControl = (1 << 18), | ||
321 | eConnect_UUIE_capacity = (1 << 17), | ||
322 | eConnect_UUIE_featureSet = (1 << 16), | ||
323 | } options; | ||
324 | TransportAddress h245Address; | ||
325 | Connect_UUIE_fastStart fastStart; | ||
326 | } Connect_UUIE; | ||
327 | |||
328 | typedef struct Alerting_UUIE_fastStart { /* SEQUENCE OF */ | ||
329 | int count; | ||
330 | OpenLogicalChannel item[30]; | ||
331 | } Alerting_UUIE_fastStart; | ||
332 | |||
333 | typedef struct Alerting_UUIE { /* SEQUENCE */ | ||
334 | enum { | ||
335 | eAlerting_UUIE_h245Address = (1 << 31), | ||
336 | eAlerting_UUIE_callIdentifier = (1 << 30), | ||
337 | eAlerting_UUIE_h245SecurityMode = (1 << 29), | ||
338 | eAlerting_UUIE_tokens = (1 << 28), | ||
339 | eAlerting_UUIE_cryptoTokens = (1 << 27), | ||
340 | eAlerting_UUIE_fastStart = (1 << 26), | ||
341 | eAlerting_UUIE_multipleCalls = (1 << 25), | ||
342 | eAlerting_UUIE_maintainConnection = (1 << 24), | ||
343 | eAlerting_UUIE_alertingAddress = (1 << 23), | ||
344 | eAlerting_UUIE_presentationIndicator = (1 << 22), | ||
345 | eAlerting_UUIE_screeningIndicator = (1 << 21), | ||
346 | eAlerting_UUIE_fastConnectRefused = (1 << 20), | ||
347 | eAlerting_UUIE_serviceControl = (1 << 19), | ||
348 | eAlerting_UUIE_capacity = (1 << 18), | ||
349 | eAlerting_UUIE_featureSet = (1 << 17), | ||
350 | } options; | ||
351 | TransportAddress h245Address; | ||
352 | Alerting_UUIE_fastStart fastStart; | ||
353 | } Alerting_UUIE; | ||
354 | |||
355 | typedef struct Information_UUIE_fastStart { /* SEQUENCE OF */ | ||
356 | int count; | ||
357 | OpenLogicalChannel item[30]; | ||
358 | } Information_UUIE_fastStart; | ||
359 | |||
360 | typedef struct Information_UUIE { /* SEQUENCE */ | ||
361 | enum { | ||
362 | eInformation_UUIE_callIdentifier = (1 << 31), | ||
363 | eInformation_UUIE_tokens = (1 << 30), | ||
364 | eInformation_UUIE_cryptoTokens = (1 << 29), | ||
365 | eInformation_UUIE_fastStart = (1 << 28), | ||
366 | eInformation_UUIE_fastConnectRefused = (1 << 27), | ||
367 | eInformation_UUIE_circuitInfo = (1 << 26), | ||
368 | } options; | ||
369 | Information_UUIE_fastStart fastStart; | ||
370 | } Information_UUIE; | ||
371 | |||
372 | typedef struct FacilityReason { /* CHOICE */ | ||
373 | enum { | ||
374 | eFacilityReason_routeCallToGatekeeper, | ||
375 | eFacilityReason_callForwarded, | ||
376 | eFacilityReason_routeCallToMC, | ||
377 | eFacilityReason_undefinedReason, | ||
378 | eFacilityReason_conferenceListChoice, | ||
379 | eFacilityReason_startH245, | ||
380 | eFacilityReason_noH245, | ||
381 | eFacilityReason_newTokens, | ||
382 | eFacilityReason_featureSetUpdate, | ||
383 | eFacilityReason_forwardedElements, | ||
384 | eFacilityReason_transportedInformation, | ||
385 | } choice; | ||
386 | } FacilityReason; | ||
387 | |||
388 | typedef struct Facility_UUIE_fastStart { /* SEQUENCE OF */ | ||
389 | int count; | ||
390 | OpenLogicalChannel item[30]; | ||
391 | } Facility_UUIE_fastStart; | ||
392 | |||
393 | typedef struct Facility_UUIE { /* SEQUENCE */ | ||
394 | enum { | ||
395 | eFacility_UUIE_alternativeAddress = (1 << 31), | ||
396 | eFacility_UUIE_alternativeAliasAddress = (1 << 30), | ||
397 | eFacility_UUIE_conferenceID = (1 << 29), | ||
398 | eFacility_UUIE_callIdentifier = (1 << 28), | ||
399 | eFacility_UUIE_destExtraCallInfo = (1 << 27), | ||
400 | eFacility_UUIE_remoteExtensionAddress = (1 << 26), | ||
401 | eFacility_UUIE_tokens = (1 << 25), | ||
402 | eFacility_UUIE_cryptoTokens = (1 << 24), | ||
403 | eFacility_UUIE_conferences = (1 << 23), | ||
404 | eFacility_UUIE_h245Address = (1 << 22), | ||
405 | eFacility_UUIE_fastStart = (1 << 21), | ||
406 | eFacility_UUIE_multipleCalls = (1 << 20), | ||
407 | eFacility_UUIE_maintainConnection = (1 << 19), | ||
408 | eFacility_UUIE_fastConnectRefused = (1 << 18), | ||
409 | eFacility_UUIE_serviceControl = (1 << 17), | ||
410 | eFacility_UUIE_circuitInfo = (1 << 16), | ||
411 | eFacility_UUIE_featureSet = (1 << 15), | ||
412 | eFacility_UUIE_destinationInfo = (1 << 14), | ||
413 | eFacility_UUIE_h245SecurityMode = (1 << 13), | ||
414 | } options; | ||
415 | FacilityReason reason; | ||
416 | TransportAddress h245Address; | ||
417 | Facility_UUIE_fastStart fastStart; | ||
418 | } Facility_UUIE; | ||
419 | |||
420 | typedef struct Progress_UUIE_fastStart { /* SEQUENCE OF */ | ||
421 | int count; | ||
422 | OpenLogicalChannel item[30]; | ||
423 | } Progress_UUIE_fastStart; | ||
424 | |||
425 | typedef struct Progress_UUIE { /* SEQUENCE */ | ||
426 | enum { | ||
427 | eProgress_UUIE_h245Address = (1 << 31), | ||
428 | eProgress_UUIE_h245SecurityMode = (1 << 30), | ||
429 | eProgress_UUIE_tokens = (1 << 29), | ||
430 | eProgress_UUIE_cryptoTokens = (1 << 28), | ||
431 | eProgress_UUIE_fastStart = (1 << 27), | ||
432 | eProgress_UUIE_multipleCalls = (1 << 26), | ||
433 | eProgress_UUIE_maintainConnection = (1 << 25), | ||
434 | eProgress_UUIE_fastConnectRefused = (1 << 24), | ||
435 | } options; | ||
436 | TransportAddress h245Address; | ||
437 | Progress_UUIE_fastStart fastStart; | ||
438 | } Progress_UUIE; | ||
439 | |||
440 | typedef struct H323_UU_PDU_h323_message_body { /* CHOICE */ | ||
441 | enum { | ||
442 | eH323_UU_PDU_h323_message_body_setup, | ||
443 | eH323_UU_PDU_h323_message_body_callProceeding, | ||
444 | eH323_UU_PDU_h323_message_body_connect, | ||
445 | eH323_UU_PDU_h323_message_body_alerting, | ||
446 | eH323_UU_PDU_h323_message_body_information, | ||
447 | eH323_UU_PDU_h323_message_body_releaseComplete, | ||
448 | eH323_UU_PDU_h323_message_body_facility, | ||
449 | eH323_UU_PDU_h323_message_body_progress, | ||
450 | eH323_UU_PDU_h323_message_body_empty, | ||
451 | eH323_UU_PDU_h323_message_body_status, | ||
452 | eH323_UU_PDU_h323_message_body_statusInquiry, | ||
453 | eH323_UU_PDU_h323_message_body_setupAcknowledge, | ||
454 | eH323_UU_PDU_h323_message_body_notify, | ||
455 | } choice; | ||
456 | union { | ||
457 | Setup_UUIE setup; | ||
458 | CallProceeding_UUIE callProceeding; | ||
459 | Connect_UUIE connect; | ||
460 | Alerting_UUIE alerting; | ||
461 | Information_UUIE information; | ||
462 | Facility_UUIE facility; | ||
463 | Progress_UUIE progress; | ||
464 | }; | ||
465 | } H323_UU_PDU_h323_message_body; | ||
466 | |||
467 | typedef struct RequestMessage { /* CHOICE */ | ||
468 | enum { | ||
469 | eRequestMessage_nonStandard, | ||
470 | eRequestMessage_masterSlaveDetermination, | ||
471 | eRequestMessage_terminalCapabilitySet, | ||
472 | eRequestMessage_openLogicalChannel, | ||
473 | eRequestMessage_closeLogicalChannel, | ||
474 | eRequestMessage_requestChannelClose, | ||
475 | eRequestMessage_multiplexEntrySend, | ||
476 | eRequestMessage_requestMultiplexEntry, | ||
477 | eRequestMessage_requestMode, | ||
478 | eRequestMessage_roundTripDelayRequest, | ||
479 | eRequestMessage_maintenanceLoopRequest, | ||
480 | eRequestMessage_communicationModeRequest, | ||
481 | eRequestMessage_conferenceRequest, | ||
482 | eRequestMessage_multilinkRequest, | ||
483 | eRequestMessage_logicalChannelRateRequest, | ||
484 | } choice; | ||
485 | union { | ||
486 | OpenLogicalChannel openLogicalChannel; | ||
487 | }; | ||
488 | } RequestMessage; | ||
489 | |||
490 | typedef struct OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters { /* CHOICE */ | ||
491 | enum { | ||
492 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h222LogicalChannelParameters, | ||
493 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters, | ||
494 | } choice; | ||
495 | union { | ||
496 | H2250LogicalChannelParameters h2250LogicalChannelParameters; | ||
497 | }; | ||
498 | } OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters; | ||
499 | |||
500 | typedef struct OpenLogicalChannelAck_reverseLogicalChannelParameters { /* SEQUENCE */ | ||
501 | enum { | ||
502 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_portNumber | ||
503 | = (1 << 31), | ||
504 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters | ||
505 | = (1 << 30), | ||
506 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_replacementFor | ||
507 | = (1 << 29), | ||
508 | } options; | ||
509 | OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters | ||
510 | multiplexParameters; | ||
511 | } OpenLogicalChannelAck_reverseLogicalChannelParameters; | ||
512 | |||
513 | typedef struct H2250LogicalChannelAckParameters { /* SEQUENCE */ | ||
514 | enum { | ||
515 | eH2250LogicalChannelAckParameters_nonStandard = (1 << 31), | ||
516 | eH2250LogicalChannelAckParameters_sessionID = (1 << 30), | ||
517 | eH2250LogicalChannelAckParameters_mediaChannel = (1 << 29), | ||
518 | eH2250LogicalChannelAckParameters_mediaControlChannel = | ||
519 | (1 << 28), | ||
520 | eH2250LogicalChannelAckParameters_dynamicRTPPayloadType = | ||
521 | (1 << 27), | ||
522 | eH2250LogicalChannelAckParameters_flowControlToZero = | ||
523 | (1 << 26), | ||
524 | eH2250LogicalChannelAckParameters_portNumber = (1 << 25), | ||
525 | } options; | ||
526 | H245_TransportAddress mediaChannel; | ||
527 | H245_TransportAddress mediaControlChannel; | ||
528 | } H2250LogicalChannelAckParameters; | ||
529 | |||
530 | typedef struct OpenLogicalChannelAck_forwardMultiplexAckParameters { /* CHOICE */ | ||
531 | enum { | ||
532 | eOpenLogicalChannelAck_forwardMultiplexAckParameters_h2250LogicalChannelAckParameters, | ||
533 | } choice; | ||
534 | union { | ||
535 | H2250LogicalChannelAckParameters | ||
536 | h2250LogicalChannelAckParameters; | ||
537 | }; | ||
538 | } OpenLogicalChannelAck_forwardMultiplexAckParameters; | ||
539 | |||
540 | typedef struct OpenLogicalChannelAck { /* SEQUENCE */ | ||
541 | enum { | ||
542 | eOpenLogicalChannelAck_reverseLogicalChannelParameters = | ||
543 | (1 << 31), | ||
544 | eOpenLogicalChannelAck_separateStack = (1 << 30), | ||
545 | eOpenLogicalChannelAck_forwardMultiplexAckParameters = | ||
546 | (1 << 29), | ||
547 | eOpenLogicalChannelAck_encryptionSync = (1 << 28), | ||
548 | } options; | ||
549 | OpenLogicalChannelAck_reverseLogicalChannelParameters | ||
550 | reverseLogicalChannelParameters; | ||
551 | OpenLogicalChannelAck_forwardMultiplexAckParameters | ||
552 | forwardMultiplexAckParameters; | ||
553 | } OpenLogicalChannelAck; | ||
554 | |||
555 | typedef struct ResponseMessage { /* CHOICE */ | ||
556 | enum { | ||
557 | eResponseMessage_nonStandard, | ||
558 | eResponseMessage_masterSlaveDeterminationAck, | ||
559 | eResponseMessage_masterSlaveDeterminationReject, | ||
560 | eResponseMessage_terminalCapabilitySetAck, | ||
561 | eResponseMessage_terminalCapabilitySetReject, | ||
562 | eResponseMessage_openLogicalChannelAck, | ||
563 | eResponseMessage_openLogicalChannelReject, | ||
564 | eResponseMessage_closeLogicalChannelAck, | ||
565 | eResponseMessage_requestChannelCloseAck, | ||
566 | eResponseMessage_requestChannelCloseReject, | ||
567 | eResponseMessage_multiplexEntrySendAck, | ||
568 | eResponseMessage_multiplexEntrySendReject, | ||
569 | eResponseMessage_requestMultiplexEntryAck, | ||
570 | eResponseMessage_requestMultiplexEntryReject, | ||
571 | eResponseMessage_requestModeAck, | ||
572 | eResponseMessage_requestModeReject, | ||
573 | eResponseMessage_roundTripDelayResponse, | ||
574 | eResponseMessage_maintenanceLoopAck, | ||
575 | eResponseMessage_maintenanceLoopReject, | ||
576 | eResponseMessage_communicationModeResponse, | ||
577 | eResponseMessage_conferenceResponse, | ||
578 | eResponseMessage_multilinkResponse, | ||
579 | eResponseMessage_logicalChannelRateAcknowledge, | ||
580 | eResponseMessage_logicalChannelRateReject, | ||
581 | } choice; | ||
582 | union { | ||
583 | OpenLogicalChannelAck openLogicalChannelAck; | ||
584 | }; | ||
585 | } ResponseMessage; | ||
586 | |||
587 | typedef struct MultimediaSystemControlMessage { /* CHOICE */ | ||
588 | enum { | ||
589 | eMultimediaSystemControlMessage_request, | ||
590 | eMultimediaSystemControlMessage_response, | ||
591 | eMultimediaSystemControlMessage_command, | ||
592 | eMultimediaSystemControlMessage_indication, | ||
593 | } choice; | ||
594 | union { | ||
595 | RequestMessage request; | ||
596 | ResponseMessage response; | ||
597 | }; | ||
598 | } MultimediaSystemControlMessage; | ||
599 | |||
600 | typedef struct H323_UU_PDU_h245Control { /* SEQUENCE OF */ | ||
601 | int count; | ||
602 | MultimediaSystemControlMessage item[4]; | ||
603 | } H323_UU_PDU_h245Control; | ||
604 | |||
605 | typedef struct H323_UU_PDU { /* SEQUENCE */ | ||
606 | enum { | ||
607 | eH323_UU_PDU_nonStandardData = (1 << 31), | ||
608 | eH323_UU_PDU_h4501SupplementaryService = (1 << 30), | ||
609 | eH323_UU_PDU_h245Tunneling = (1 << 29), | ||
610 | eH323_UU_PDU_h245Control = (1 << 28), | ||
611 | eH323_UU_PDU_nonStandardControl = (1 << 27), | ||
612 | eH323_UU_PDU_callLinkage = (1 << 26), | ||
613 | eH323_UU_PDU_tunnelledSignallingMessage = (1 << 25), | ||
614 | eH323_UU_PDU_provisionalRespToH245Tunneling = (1 << 24), | ||
615 | eH323_UU_PDU_stimulusControl = (1 << 23), | ||
616 | eH323_UU_PDU_genericData = (1 << 22), | ||
617 | } options; | ||
618 | H323_UU_PDU_h323_message_body h323_message_body; | ||
619 | H323_UU_PDU_h245Control h245Control; | ||
620 | } H323_UU_PDU; | ||
621 | |||
622 | typedef struct H323_UserInformation { /* SEQUENCE */ | ||
623 | enum { | ||
624 | eH323_UserInformation_user_data = (1 << 31), | ||
625 | } options; | ||
626 | H323_UU_PDU h323_uu_pdu; | ||
627 | } H323_UserInformation; | ||
628 | |||
629 | typedef struct GatekeeperRequest { /* SEQUENCE */ | ||
630 | enum { | ||
631 | eGatekeeperRequest_nonStandardData = (1 << 31), | ||
632 | eGatekeeperRequest_gatekeeperIdentifier = (1 << 30), | ||
633 | eGatekeeperRequest_callServices = (1 << 29), | ||
634 | eGatekeeperRequest_endpointAlias = (1 << 28), | ||
635 | eGatekeeperRequest_alternateEndpoints = (1 << 27), | ||
636 | eGatekeeperRequest_tokens = (1 << 26), | ||
637 | eGatekeeperRequest_cryptoTokens = (1 << 25), | ||
638 | eGatekeeperRequest_authenticationCapability = (1 << 24), | ||
639 | eGatekeeperRequest_algorithmOIDs = (1 << 23), | ||
640 | eGatekeeperRequest_integrity = (1 << 22), | ||
641 | eGatekeeperRequest_integrityCheckValue = (1 << 21), | ||
642 | eGatekeeperRequest_supportsAltGK = (1 << 20), | ||
643 | eGatekeeperRequest_featureSet = (1 << 19), | ||
644 | eGatekeeperRequest_genericData = (1 << 18), | ||
645 | } options; | ||
646 | TransportAddress rasAddress; | ||
647 | } GatekeeperRequest; | ||
648 | |||
649 | typedef struct GatekeeperConfirm { /* SEQUENCE */ | ||
650 | enum { | ||
651 | eGatekeeperConfirm_nonStandardData = (1 << 31), | ||
652 | eGatekeeperConfirm_gatekeeperIdentifier = (1 << 30), | ||
653 | eGatekeeperConfirm_alternateGatekeeper = (1 << 29), | ||
654 | eGatekeeperConfirm_authenticationMode = (1 << 28), | ||
655 | eGatekeeperConfirm_tokens = (1 << 27), | ||
656 | eGatekeeperConfirm_cryptoTokens = (1 << 26), | ||
657 | eGatekeeperConfirm_algorithmOID = (1 << 25), | ||
658 | eGatekeeperConfirm_integrity = (1 << 24), | ||
659 | eGatekeeperConfirm_integrityCheckValue = (1 << 23), | ||
660 | eGatekeeperConfirm_featureSet = (1 << 22), | ||
661 | eGatekeeperConfirm_genericData = (1 << 21), | ||
662 | } options; | ||
663 | TransportAddress rasAddress; | ||
664 | } GatekeeperConfirm; | ||
665 | |||
666 | typedef struct RegistrationRequest_callSignalAddress { /* SEQUENCE OF */ | ||
667 | int count; | ||
668 | TransportAddress item[10]; | ||
669 | } RegistrationRequest_callSignalAddress; | ||
670 | |||
671 | typedef struct RegistrationRequest_rasAddress { /* SEQUENCE OF */ | ||
672 | int count; | ||
673 | TransportAddress item[10]; | ||
674 | } RegistrationRequest_rasAddress; | ||
675 | |||
676 | typedef struct RegistrationRequest { /* SEQUENCE */ | ||
677 | enum { | ||
678 | eRegistrationRequest_nonStandardData = (1 << 31), | ||
679 | eRegistrationRequest_terminalAlias = (1 << 30), | ||
680 | eRegistrationRequest_gatekeeperIdentifier = (1 << 29), | ||
681 | eRegistrationRequest_alternateEndpoints = (1 << 28), | ||
682 | eRegistrationRequest_timeToLive = (1 << 27), | ||
683 | eRegistrationRequest_tokens = (1 << 26), | ||
684 | eRegistrationRequest_cryptoTokens = (1 << 25), | ||
685 | eRegistrationRequest_integrityCheckValue = (1 << 24), | ||
686 | eRegistrationRequest_keepAlive = (1 << 23), | ||
687 | eRegistrationRequest_endpointIdentifier = (1 << 22), | ||
688 | eRegistrationRequest_willSupplyUUIEs = (1 << 21), | ||
689 | eRegistrationRequest_maintainConnection = (1 << 20), | ||
690 | eRegistrationRequest_alternateTransportAddresses = (1 << 19), | ||
691 | eRegistrationRequest_additiveRegistration = (1 << 18), | ||
692 | eRegistrationRequest_terminalAliasPattern = (1 << 17), | ||
693 | eRegistrationRequest_supportsAltGK = (1 << 16), | ||
694 | eRegistrationRequest_usageReportingCapability = (1 << 15), | ||
695 | eRegistrationRequest_multipleCalls = (1 << 14), | ||
696 | eRegistrationRequest_supportedH248Packages = (1 << 13), | ||
697 | eRegistrationRequest_callCreditCapability = (1 << 12), | ||
698 | eRegistrationRequest_capacityReportingCapability = (1 << 11), | ||
699 | eRegistrationRequest_capacity = (1 << 10), | ||
700 | eRegistrationRequest_featureSet = (1 << 9), | ||
701 | eRegistrationRequest_genericData = (1 << 8), | ||
702 | } options; | ||
703 | RegistrationRequest_callSignalAddress callSignalAddress; | ||
704 | RegistrationRequest_rasAddress rasAddress; | ||
705 | unsigned timeToLive; | ||
706 | } RegistrationRequest; | ||
707 | |||
708 | typedef struct RegistrationConfirm_callSignalAddress { /* SEQUENCE OF */ | ||
709 | int count; | ||
710 | TransportAddress item[10]; | ||
711 | } RegistrationConfirm_callSignalAddress; | ||
712 | |||
713 | typedef struct RegistrationConfirm { /* SEQUENCE */ | ||
714 | enum { | ||
715 | eRegistrationConfirm_nonStandardData = (1 << 31), | ||
716 | eRegistrationConfirm_terminalAlias = (1 << 30), | ||
717 | eRegistrationConfirm_gatekeeperIdentifier = (1 << 29), | ||
718 | eRegistrationConfirm_alternateGatekeeper = (1 << 28), | ||
719 | eRegistrationConfirm_timeToLive = (1 << 27), | ||
720 | eRegistrationConfirm_tokens = (1 << 26), | ||
721 | eRegistrationConfirm_cryptoTokens = (1 << 25), | ||
722 | eRegistrationConfirm_integrityCheckValue = (1 << 24), | ||
723 | eRegistrationConfirm_willRespondToIRR = (1 << 23), | ||
724 | eRegistrationConfirm_preGrantedARQ = (1 << 22), | ||
725 | eRegistrationConfirm_maintainConnection = (1 << 21), | ||
726 | eRegistrationConfirm_serviceControl = (1 << 20), | ||
727 | eRegistrationConfirm_supportsAdditiveRegistration = (1 << 19), | ||
728 | eRegistrationConfirm_terminalAliasPattern = (1 << 18), | ||
729 | eRegistrationConfirm_supportedPrefixes = (1 << 17), | ||
730 | eRegistrationConfirm_usageSpec = (1 << 16), | ||
731 | eRegistrationConfirm_featureServerAlias = (1 << 15), | ||
732 | eRegistrationConfirm_capacityReportingSpec = (1 << 14), | ||
733 | eRegistrationConfirm_featureSet = (1 << 13), | ||
734 | eRegistrationConfirm_genericData = (1 << 12), | ||
735 | } options; | ||
736 | RegistrationConfirm_callSignalAddress callSignalAddress; | ||
737 | unsigned timeToLive; | ||
738 | } RegistrationConfirm; | ||
739 | |||
740 | typedef struct UnregistrationRequest_callSignalAddress { /* SEQUENCE OF */ | ||
741 | int count; | ||
742 | TransportAddress item[10]; | ||
743 | } UnregistrationRequest_callSignalAddress; | ||
744 | |||
745 | typedef struct UnregistrationRequest { /* SEQUENCE */ | ||
746 | enum { | ||
747 | eUnregistrationRequest_endpointAlias = (1 << 31), | ||
748 | eUnregistrationRequest_nonStandardData = (1 << 30), | ||
749 | eUnregistrationRequest_endpointIdentifier = (1 << 29), | ||
750 | eUnregistrationRequest_alternateEndpoints = (1 << 28), | ||
751 | eUnregistrationRequest_gatekeeperIdentifier = (1 << 27), | ||
752 | eUnregistrationRequest_tokens = (1 << 26), | ||
753 | eUnregistrationRequest_cryptoTokens = (1 << 25), | ||
754 | eUnregistrationRequest_integrityCheckValue = (1 << 24), | ||
755 | eUnregistrationRequest_reason = (1 << 23), | ||
756 | eUnregistrationRequest_endpointAliasPattern = (1 << 22), | ||
757 | eUnregistrationRequest_supportedPrefixes = (1 << 21), | ||
758 | eUnregistrationRequest_alternateGatekeeper = (1 << 20), | ||
759 | eUnregistrationRequest_genericData = (1 << 19), | ||
760 | } options; | ||
761 | UnregistrationRequest_callSignalAddress callSignalAddress; | ||
762 | } UnregistrationRequest; | ||
763 | |||
764 | typedef struct AdmissionRequest { /* SEQUENCE */ | ||
765 | enum { | ||
766 | eAdmissionRequest_callModel = (1 << 31), | ||
767 | eAdmissionRequest_destinationInfo = (1 << 30), | ||
768 | eAdmissionRequest_destCallSignalAddress = (1 << 29), | ||
769 | eAdmissionRequest_destExtraCallInfo = (1 << 28), | ||
770 | eAdmissionRequest_srcCallSignalAddress = (1 << 27), | ||
771 | eAdmissionRequest_nonStandardData = (1 << 26), | ||
772 | eAdmissionRequest_callServices = (1 << 25), | ||
773 | eAdmissionRequest_canMapAlias = (1 << 24), | ||
774 | eAdmissionRequest_callIdentifier = (1 << 23), | ||
775 | eAdmissionRequest_srcAlternatives = (1 << 22), | ||
776 | eAdmissionRequest_destAlternatives = (1 << 21), | ||
777 | eAdmissionRequest_gatekeeperIdentifier = (1 << 20), | ||
778 | eAdmissionRequest_tokens = (1 << 19), | ||
779 | eAdmissionRequest_cryptoTokens = (1 << 18), | ||
780 | eAdmissionRequest_integrityCheckValue = (1 << 17), | ||
781 | eAdmissionRequest_transportQOS = (1 << 16), | ||
782 | eAdmissionRequest_willSupplyUUIEs = (1 << 15), | ||
783 | eAdmissionRequest_callLinkage = (1 << 14), | ||
784 | eAdmissionRequest_gatewayDataRate = (1 << 13), | ||
785 | eAdmissionRequest_capacity = (1 << 12), | ||
786 | eAdmissionRequest_circuitInfo = (1 << 11), | ||
787 | eAdmissionRequest_desiredProtocols = (1 << 10), | ||
788 | eAdmissionRequest_desiredTunnelledProtocol = (1 << 9), | ||
789 | eAdmissionRequest_featureSet = (1 << 8), | ||
790 | eAdmissionRequest_genericData = (1 << 7), | ||
791 | } options; | ||
792 | TransportAddress destCallSignalAddress; | ||
793 | TransportAddress srcCallSignalAddress; | ||
794 | } AdmissionRequest; | ||
795 | |||
796 | typedef struct AdmissionConfirm { /* SEQUENCE */ | ||
797 | enum { | ||
798 | eAdmissionConfirm_irrFrequency = (1 << 31), | ||
799 | eAdmissionConfirm_nonStandardData = (1 << 30), | ||
800 | eAdmissionConfirm_destinationInfo = (1 << 29), | ||
801 | eAdmissionConfirm_destExtraCallInfo = (1 << 28), | ||
802 | eAdmissionConfirm_destinationType = (1 << 27), | ||
803 | eAdmissionConfirm_remoteExtensionAddress = (1 << 26), | ||
804 | eAdmissionConfirm_alternateEndpoints = (1 << 25), | ||
805 | eAdmissionConfirm_tokens = (1 << 24), | ||
806 | eAdmissionConfirm_cryptoTokens = (1 << 23), | ||
807 | eAdmissionConfirm_integrityCheckValue = (1 << 22), | ||
808 | eAdmissionConfirm_transportQOS = (1 << 21), | ||
809 | eAdmissionConfirm_willRespondToIRR = (1 << 20), | ||
810 | eAdmissionConfirm_uuiesRequested = (1 << 19), | ||
811 | eAdmissionConfirm_language = (1 << 18), | ||
812 | eAdmissionConfirm_alternateTransportAddresses = (1 << 17), | ||
813 | eAdmissionConfirm_useSpecifiedTransport = (1 << 16), | ||
814 | eAdmissionConfirm_circuitInfo = (1 << 15), | ||
815 | eAdmissionConfirm_usageSpec = (1 << 14), | ||
816 | eAdmissionConfirm_supportedProtocols = (1 << 13), | ||
817 | eAdmissionConfirm_serviceControl = (1 << 12), | ||
818 | eAdmissionConfirm_multipleCalls = (1 << 11), | ||
819 | eAdmissionConfirm_featureSet = (1 << 10), | ||
820 | eAdmissionConfirm_genericData = (1 << 9), | ||
821 | } options; | ||
822 | TransportAddress destCallSignalAddress; | ||
823 | } AdmissionConfirm; | ||
824 | |||
825 | typedef struct LocationRequest { /* SEQUENCE */ | ||
826 | enum { | ||
827 | eLocationRequest_endpointIdentifier = (1 << 31), | ||
828 | eLocationRequest_nonStandardData = (1 << 30), | ||
829 | eLocationRequest_sourceInfo = (1 << 29), | ||
830 | eLocationRequest_canMapAlias = (1 << 28), | ||
831 | eLocationRequest_gatekeeperIdentifier = (1 << 27), | ||
832 | eLocationRequest_tokens = (1 << 26), | ||
833 | eLocationRequest_cryptoTokens = (1 << 25), | ||
834 | eLocationRequest_integrityCheckValue = (1 << 24), | ||
835 | eLocationRequest_desiredProtocols = (1 << 23), | ||
836 | eLocationRequest_desiredTunnelledProtocol = (1 << 22), | ||
837 | eLocationRequest_featureSet = (1 << 21), | ||
838 | eLocationRequest_genericData = (1 << 20), | ||
839 | eLocationRequest_hopCount = (1 << 19), | ||
840 | eLocationRequest_circuitInfo = (1 << 18), | ||
841 | } options; | ||
842 | TransportAddress replyAddress; | ||
843 | } LocationRequest; | ||
844 | |||
845 | typedef struct LocationConfirm { /* SEQUENCE */ | ||
846 | enum { | ||
847 | eLocationConfirm_nonStandardData = (1 << 31), | ||
848 | eLocationConfirm_destinationInfo = (1 << 30), | ||
849 | eLocationConfirm_destExtraCallInfo = (1 << 29), | ||
850 | eLocationConfirm_destinationType = (1 << 28), | ||
851 | eLocationConfirm_remoteExtensionAddress = (1 << 27), | ||
852 | eLocationConfirm_alternateEndpoints = (1 << 26), | ||
853 | eLocationConfirm_tokens = (1 << 25), | ||
854 | eLocationConfirm_cryptoTokens = (1 << 24), | ||
855 | eLocationConfirm_integrityCheckValue = (1 << 23), | ||
856 | eLocationConfirm_alternateTransportAddresses = (1 << 22), | ||
857 | eLocationConfirm_supportedProtocols = (1 << 21), | ||
858 | eLocationConfirm_multipleCalls = (1 << 20), | ||
859 | eLocationConfirm_featureSet = (1 << 19), | ||
860 | eLocationConfirm_genericData = (1 << 18), | ||
861 | eLocationConfirm_circuitInfo = (1 << 17), | ||
862 | eLocationConfirm_serviceControl = (1 << 16), | ||
863 | } options; | ||
864 | TransportAddress callSignalAddress; | ||
865 | TransportAddress rasAddress; | ||
866 | } LocationConfirm; | ||
867 | |||
868 | typedef struct InfoRequestResponse_callSignalAddress { /* SEQUENCE OF */ | ||
869 | int count; | ||
870 | TransportAddress item[10]; | ||
871 | } InfoRequestResponse_callSignalAddress; | ||
872 | |||
873 | typedef struct InfoRequestResponse { /* SEQUENCE */ | ||
874 | enum { | ||
875 | eInfoRequestResponse_nonStandardData = (1 << 31), | ||
876 | eInfoRequestResponse_endpointAlias = (1 << 30), | ||
877 | eInfoRequestResponse_perCallInfo = (1 << 29), | ||
878 | eInfoRequestResponse_tokens = (1 << 28), | ||
879 | eInfoRequestResponse_cryptoTokens = (1 << 27), | ||
880 | eInfoRequestResponse_integrityCheckValue = (1 << 26), | ||
881 | eInfoRequestResponse_needResponse = (1 << 25), | ||
882 | eInfoRequestResponse_capacity = (1 << 24), | ||
883 | eInfoRequestResponse_irrStatus = (1 << 23), | ||
884 | eInfoRequestResponse_unsolicited = (1 << 22), | ||
885 | eInfoRequestResponse_genericData = (1 << 21), | ||
886 | } options; | ||
887 | TransportAddress rasAddress; | ||
888 | InfoRequestResponse_callSignalAddress callSignalAddress; | ||
889 | } InfoRequestResponse; | ||
890 | |||
891 | typedef struct RasMessage { /* CHOICE */ | ||
892 | enum { | ||
893 | eRasMessage_gatekeeperRequest, | ||
894 | eRasMessage_gatekeeperConfirm, | ||
895 | eRasMessage_gatekeeperReject, | ||
896 | eRasMessage_registrationRequest, | ||
897 | eRasMessage_registrationConfirm, | ||
898 | eRasMessage_registrationReject, | ||
899 | eRasMessage_unregistrationRequest, | ||
900 | eRasMessage_unregistrationConfirm, | ||
901 | eRasMessage_unregistrationReject, | ||
902 | eRasMessage_admissionRequest, | ||
903 | eRasMessage_admissionConfirm, | ||
904 | eRasMessage_admissionReject, | ||
905 | eRasMessage_bandwidthRequest, | ||
906 | eRasMessage_bandwidthConfirm, | ||
907 | eRasMessage_bandwidthReject, | ||
908 | eRasMessage_disengageRequest, | ||
909 | eRasMessage_disengageConfirm, | ||
910 | eRasMessage_disengageReject, | ||
911 | eRasMessage_locationRequest, | ||
912 | eRasMessage_locationConfirm, | ||
913 | eRasMessage_locationReject, | ||
914 | eRasMessage_infoRequest, | ||
915 | eRasMessage_infoRequestResponse, | ||
916 | eRasMessage_nonStandardMessage, | ||
917 | eRasMessage_unknownMessageResponse, | ||
918 | eRasMessage_requestInProgress, | ||
919 | eRasMessage_resourcesAvailableIndicate, | ||
920 | eRasMessage_resourcesAvailableConfirm, | ||
921 | eRasMessage_infoRequestAck, | ||
922 | eRasMessage_infoRequestNak, | ||
923 | eRasMessage_serviceControlIndication, | ||
924 | eRasMessage_serviceControlResponse, | ||
925 | } choice; | ||
926 | union { | ||
927 | GatekeeperRequest gatekeeperRequest; | ||
928 | GatekeeperConfirm gatekeeperConfirm; | ||
929 | RegistrationRequest registrationRequest; | ||
930 | RegistrationConfirm registrationConfirm; | ||
931 | UnregistrationRequest unregistrationRequest; | ||
932 | AdmissionRequest admissionRequest; | ||
933 | AdmissionConfirm admissionConfirm; | ||
934 | LocationRequest locationRequest; | ||
935 | LocationConfirm locationConfirm; | ||
936 | InfoRequestResponse infoRequestResponse; | ||
937 | }; | ||
938 | } RasMessage; | ||
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index d5b8c0d6a12b..c0dac16e1902 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -316,5 +316,23 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb, | |||
316 | void *userdata); | 316 | void *userdata); |
317 | 317 | ||
318 | #define IPT_ALIGN(s) XT_ALIGN(s) | 318 | #define IPT_ALIGN(s) XT_ALIGN(s) |
319 | |||
320 | #ifdef CONFIG_COMPAT | ||
321 | #include <net/compat.h> | ||
322 | |||
323 | struct compat_ipt_entry | ||
324 | { | ||
325 | struct ipt_ip ip; | ||
326 | compat_uint_t nfcache; | ||
327 | u_int16_t target_offset; | ||
328 | u_int16_t next_offset; | ||
329 | compat_uint_t comefrom; | ||
330 | struct compat_xt_counters counters; | ||
331 | unsigned char elems[0]; | ||
332 | }; | ||
333 | |||
334 | #define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s) | ||
335 | |||
336 | #endif /* CONFIG_COMPAT */ | ||
319 | #endif /*__KERNEL__*/ | 337 | #endif /*__KERNEL__*/ |
320 | #endif /* _IPTABLES_H */ | 338 | #endif /* _IPTABLES_H */ |
diff --git a/include/linux/netfilter_ipv4/ipt_esp.h b/include/linux/netfilter_ipv4/ipt_esp.h index c782a83e53e0..78296e7eeff9 100644 --- a/include/linux/netfilter_ipv4/ipt_esp.h +++ b/include/linux/netfilter_ipv4/ipt_esp.h | |||
@@ -1,16 +1,10 @@ | |||
1 | #ifndef _IPT_ESP_H | 1 | #ifndef _IPT_ESP_H |
2 | #define _IPT_ESP_H | 2 | #define _IPT_ESP_H |
3 | 3 | ||
4 | struct ipt_esp | 4 | #include <linux/netfilter/xt_esp.h> |
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | 5 | ||
10 | 6 | #define ipt_esp xt_esp | |
11 | 7 | #define IPT_ESP_INV_SPI XT_ESP_INV_SPI | |
12 | /* Values for "invflags" field in struct ipt_esp. */ | 8 | #define IPT_ESP_INV_MASK XT_ESP_INV_MASK |
13 | #define IPT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
14 | #define IPT_ESP_INV_MASK 0x01 /* All possible flags. */ | ||
15 | 9 | ||
16 | #endif /*_IPT_ESP_H*/ | 10 | #endif /*_IPT_ESP_H*/ |
diff --git a/include/linux/netfilter_ipv4/ipt_multiport.h b/include/linux/netfilter_ipv4/ipt_multiport.h index e6b6fff811df..55fe85eca88c 100644 --- a/include/linux/netfilter_ipv4/ipt_multiport.h +++ b/include/linux/netfilter_ipv4/ipt_multiport.h | |||
@@ -1,30 +1,15 @@ | |||
1 | #ifndef _IPT_MULTIPORT_H | 1 | #ifndef _IPT_MULTIPORT_H |
2 | #define _IPT_MULTIPORT_H | 2 | #define _IPT_MULTIPORT_H |
3 | #include <linux/netfilter_ipv4/ip_tables.h> | ||
4 | 3 | ||
5 | enum ipt_multiport_flags | 4 | #include <linux/netfilter/xt_multiport.h> |
6 | { | ||
7 | IPT_MULTIPORT_SOURCE, | ||
8 | IPT_MULTIPORT_DESTINATION, | ||
9 | IPT_MULTIPORT_EITHER | ||
10 | }; | ||
11 | 5 | ||
12 | #define IPT_MULTI_PORTS 15 | 6 | #define IPT_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE |
7 | #define IPT_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION | ||
8 | #define IPT_MULTIPORT_EITHER XT_MULTIPORT_EITHER | ||
13 | 9 | ||
14 | /* Must fit inside union ipt_matchinfo: 16 bytes */ | 10 | #define IPT_MULTI_PORTS XT_MULTI_PORTS |
15 | struct ipt_multiport | 11 | |
16 | { | 12 | #define ipt_multiport xt_multiport |
17 | u_int8_t flags; /* Type of comparison */ | 13 | #define ipt_multiport_v1 xt_multiport_v1 |
18 | u_int8_t count; /* Number of ports */ | ||
19 | u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */ | ||
20 | }; | ||
21 | 14 | ||
22 | struct ipt_multiport_v1 | ||
23 | { | ||
24 | u_int8_t flags; /* Type of comparison */ | ||
25 | u_int8_t count; /* Number of ports */ | ||
26 | u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */ | ||
27 | u_int8_t pflags[IPT_MULTI_PORTS]; /* Port flags */ | ||
28 | u_int8_t invert; /* Invert flag */ | ||
29 | }; | ||
30 | #endif /*_IPT_MULTIPORT_H*/ | 15 | #endif /*_IPT_MULTIPORT_H*/ |
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 14f2bd010884..52a7b9e76428 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
@@ -73,6 +73,9 @@ enum nf_ip6_hook_priorities { | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | #ifdef CONFIG_NETFILTER | 75 | #ifdef CONFIG_NETFILTER |
76 | extern unsigned int nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | ||
77 | unsigned int dataoff, u_int8_t protocol); | ||
78 | |||
76 | extern int ipv6_netfilter_init(void); | 79 | extern int ipv6_netfilter_init(void); |
77 | extern void ipv6_netfilter_fini(void); | 80 | extern void ipv6_netfilter_fini(void); |
78 | #else /* CONFIG_NETFILTER */ | 81 | #else /* CONFIG_NETFILTER */ |
diff --git a/include/linux/netfilter_ipv6/ip6t_esp.h b/include/linux/netfilter_ipv6/ip6t_esp.h index a91b6abc8079..f62eaf53c16c 100644 --- a/include/linux/netfilter_ipv6/ip6t_esp.h +++ b/include/linux/netfilter_ipv6/ip6t_esp.h | |||
@@ -1,14 +1,10 @@ | |||
1 | #ifndef _IP6T_ESP_H | 1 | #ifndef _IP6T_ESP_H |
2 | #define _IP6T_ESP_H | 2 | #define _IP6T_ESP_H |
3 | 3 | ||
4 | struct ip6t_esp | 4 | #include <linux/netfilter/xt_esp.h> |
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | 5 | ||
10 | /* Values for "invflags" field in struct ip6t_esp. */ | 6 | #define ip6t_esp xt_esp |
11 | #define IP6T_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | 7 | #define IP6T_ESP_INV_SPI XT_ESP_INV_SPI |
12 | #define IP6T_ESP_INV_MASK 0x01 /* All possible flags. */ | 8 | #define IP6T_ESP_INV_MASK XT_ESP_INV_MASK |
13 | 9 | ||
14 | #endif /*_IP6T_ESP_H*/ | 10 | #endif /*_IP6T_ESP_H*/ |
diff --git a/include/linux/netfilter_ipv6/ip6t_multiport.h b/include/linux/netfilter_ipv6/ip6t_multiport.h index efe4954a8681..042c92661cee 100644 --- a/include/linux/netfilter_ipv6/ip6t_multiport.h +++ b/include/linux/netfilter_ipv6/ip6t_multiport.h | |||
@@ -1,21 +1,14 @@ | |||
1 | #ifndef _IP6T_MULTIPORT_H | 1 | #ifndef _IP6T_MULTIPORT_H |
2 | #define _IP6T_MULTIPORT_H | 2 | #define _IP6T_MULTIPORT_H |
3 | #include <linux/netfilter_ipv6/ip6_tables.h> | ||
4 | 3 | ||
5 | enum ip6t_multiport_flags | 4 | #include <linux/netfilter/xt_multiport.h> |
6 | { | ||
7 | IP6T_MULTIPORT_SOURCE, | ||
8 | IP6T_MULTIPORT_DESTINATION, | ||
9 | IP6T_MULTIPORT_EITHER | ||
10 | }; | ||
11 | 5 | ||
12 | #define IP6T_MULTI_PORTS 15 | 6 | #define IP6T_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE |
7 | #define IP6T_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION | ||
8 | #define IP6T_MULTIPORT_EITHER XT_MULTIPORT_EITHER | ||
13 | 9 | ||
14 | /* Must fit inside union ip6t_matchinfo: 16 bytes */ | 10 | #define IP6T_MULTI_PORTS XT_MULTI_PORTS |
15 | struct ip6t_multiport | 11 | |
16 | { | 12 | #define ip6t_multiport xt_multiport |
17 | u_int8_t flags; /* Type of comparison */ | 13 | |
18 | u_int8_t count; /* Number of ports */ | 14 | #endif /*_IP6T_MULTIPORT_H*/ |
19 | u_int16_t ports[IP6T_MULTI_PORTS]; /* Ports */ | ||
20 | }; | ||
21 | #endif /*_IPT_MULTIPORT_H*/ | ||
diff --git a/include/linux/numa.h b/include/linux/numa.h index f0c539bd3cfc..e481feb1bfd8 100644 --- a/include/linux/numa.h +++ b/include/linux/numa.h | |||
@@ -3,11 +3,9 @@ | |||
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | #ifndef CONFIG_FLATMEM | 6 | #ifdef CONFIG_NODES_SHIFT |
7 | #include <asm/numnodes.h> | 7 | #define NODES_SHIFT CONFIG_NODES_SHIFT |
8 | #endif | 8 | #else |
9 | |||
10 | #ifndef NODES_SHIFT | ||
11 | #define NODES_SHIFT 0 | 9 | #define NODES_SHIFT 0 |
12 | #endif | 10 | #endif |
13 | 11 | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 9ea629c02a4b..d276a4e2f825 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -48,8 +48,20 @@ | |||
48 | 48 | ||
49 | /* | 49 | /* |
50 | * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break | 50 | * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break |
51 | * locked- and dirty-page accounting. The top eight bits of page->flags are | 51 | * locked- and dirty-page accounting. |
52 | * used for page->zone, so putting flag bits there doesn't work. | 52 | * |
53 | * The page flags field is split into two parts, the main flags area | ||
54 | * which extends from the low bits upwards, and the fields area which | ||
55 | * extends from the high bits downwards. | ||
56 | * | ||
57 | * | FIELD | ... | FLAGS | | ||
58 | * N-1 ^ 0 | ||
59 | * (N-FLAGS_RESERVED) | ||
60 | * | ||
61 | * The fields area is reserved for fields mapping zone, node and SPARSEMEM | ||
62 | * section. The boundry between these two areas is defined by | ||
63 | * FLAGS_RESERVED which defines the width of the fields section | ||
64 | * (see linux/mmzone.h). New flags must _not_ overlap with this area. | ||
53 | */ | 65 | */ |
54 | #define PG_locked 0 /* Page is locked. Don't touch. */ | 66 | #define PG_locked 0 /* Page is locked. Don't touch. */ |
55 | #define PG_error 1 | 67 | #define PG_error 1 |
@@ -74,7 +86,9 @@ | |||
74 | #define PG_mappedtodisk 16 /* Has blocks allocated on-disk */ | 86 | #define PG_mappedtodisk 16 /* Has blocks allocated on-disk */ |
75 | #define PG_reclaim 17 /* To be reclaimed asap */ | 87 | #define PG_reclaim 17 /* To be reclaimed asap */ |
76 | #define PG_nosave_free 18 /* Free, should not be written */ | 88 | #define PG_nosave_free 18 /* Free, should not be written */ |
77 | #define PG_uncached 19 /* Page has been mapped as uncached */ | 89 | #define PG_buddy 19 /* Page is free, on buddy lists */ |
90 | |||
91 | #define PG_uncached 20 /* Page has been mapped as uncached */ | ||
78 | 92 | ||
79 | /* | 93 | /* |
80 | * Global page accounting. One instance per CPU. Only unsigned longs are | 94 | * Global page accounting. One instance per CPU. Only unsigned longs are |
@@ -317,6 +331,10 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta); | |||
317 | #define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags) | 331 | #define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags) |
318 | #define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags) | 332 | #define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags) |
319 | 333 | ||
334 | #define PageBuddy(page) test_bit(PG_buddy, &(page)->flags) | ||
335 | #define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags) | ||
336 | #define __ClearPageBuddy(page) __clear_bit(PG_buddy, &(page)->flags) | ||
337 | |||
320 | #define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags) | 338 | #define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags) |
321 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) | 339 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) |
322 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) | 340 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 839f0b3c23aa..9539efd4f7e6 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -72,8 +72,8 @@ extern struct page * find_get_page(struct address_space *mapping, | |||
72 | unsigned long index); | 72 | unsigned long index); |
73 | extern struct page * find_lock_page(struct address_space *mapping, | 73 | extern struct page * find_lock_page(struct address_space *mapping, |
74 | unsigned long index); | 74 | unsigned long index); |
75 | extern struct page * find_trylock_page(struct address_space *mapping, | 75 | extern __deprecated_for_modules struct page * find_trylock_page( |
76 | unsigned long index); | 76 | struct address_space *mapping, unsigned long index); |
77 | extern struct page * find_or_create_page(struct address_space *mapping, | 77 | extern struct page * find_or_create_page(struct address_space *mapping, |
78 | unsigned long index, gfp_t gfp_mask); | 78 | unsigned long index, gfp_t gfp_mask); |
79 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 79 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 5b9082cc600f..29960b03bef7 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_PID_H | 1 | #ifndef _LINUX_PID_H |
2 | #define _LINUX_PID_H | 2 | #define _LINUX_PID_H |
3 | 3 | ||
4 | #include <linux/rcupdate.h> | ||
5 | |||
4 | enum pid_type | 6 | enum pid_type |
5 | { | 7 | { |
6 | PIDTYPE_PID, | 8 | PIDTYPE_PID, |
@@ -9,45 +11,109 @@ enum pid_type | |||
9 | PIDTYPE_MAX | 11 | PIDTYPE_MAX |
10 | }; | 12 | }; |
11 | 13 | ||
14 | /* | ||
15 | * What is struct pid? | ||
16 | * | ||
17 | * A struct pid is the kernel's internal notion of a process identifier. | ||
18 | * It refers to individual tasks, process groups, and sessions. While | ||
19 | * there are processes attached to it the struct pid lives in a hash | ||
20 | * table, so it and then the processes that it refers to can be found | ||
21 | * quickly from the numeric pid value. The attached processes may be | ||
22 | * quickly accessed by following pointers from struct pid. | ||
23 | * | ||
24 | * Storing pid_t values in the kernel and refering to them later has a | ||
25 | * problem. The process originally with that pid may have exited and the | ||
26 | * pid allocator wrapped, and another process could have come along | ||
27 | * and been assigned that pid. | ||
28 | * | ||
29 | * Referring to user space processes by holding a reference to struct | ||
30 | * task_struct has a problem. When the user space process exits | ||
31 | * the now useless task_struct is still kept. A task_struct plus a | ||
32 | * stack consumes around 10K of low kernel memory. More precisely | ||
33 | * this is THREAD_SIZE + sizeof(struct task_struct). By comparison | ||
34 | * a struct pid is about 64 bytes. | ||
35 | * | ||
36 | * Holding a reference to struct pid solves both of these problems. | ||
37 | * It is small so holding a reference does not consume a lot of | ||
38 | * resources, and since a new struct pid is allocated when the numeric | ||
39 | * pid value is reused we don't mistakenly refer to new processes. | ||
40 | */ | ||
41 | |||
12 | struct pid | 42 | struct pid |
13 | { | 43 | { |
44 | atomic_t count; | ||
14 | /* Try to keep pid_chain in the same cacheline as nr for find_pid */ | 45 | /* Try to keep pid_chain in the same cacheline as nr for find_pid */ |
15 | int nr; | 46 | int nr; |
16 | struct hlist_node pid_chain; | 47 | struct hlist_node pid_chain; |
17 | /* list of pids with the same nr, only one of them is in the hash */ | 48 | /* lists of tasks that use this pid */ |
18 | struct list_head pid_list; | 49 | struct hlist_head tasks[PIDTYPE_MAX]; |
50 | struct rcu_head rcu; | ||
19 | }; | 51 | }; |
20 | 52 | ||
21 | #define pid_task(elem, type) \ | 53 | struct pid_link |
22 | list_entry(elem, struct task_struct, pids[type].pid_list) | 54 | { |
55 | struct hlist_node node; | ||
56 | struct pid *pid; | ||
57 | }; | ||
58 | |||
59 | static inline struct pid *get_pid(struct pid *pid) | ||
60 | { | ||
61 | if (pid) | ||
62 | atomic_inc(&pid->count); | ||
63 | return pid; | ||
64 | } | ||
65 | |||
66 | extern void FASTCALL(put_pid(struct pid *pid)); | ||
67 | extern struct task_struct *FASTCALL(pid_task(struct pid *pid, enum pid_type)); | ||
68 | extern struct task_struct *FASTCALL(get_pid_task(struct pid *pid, | ||
69 | enum pid_type)); | ||
23 | 70 | ||
24 | /* | 71 | /* |
25 | * attach_pid() and detach_pid() must be called with the tasklist_lock | 72 | * attach_pid() and detach_pid() must be called with the tasklist_lock |
26 | * write-held. | 73 | * write-held. |
27 | */ | 74 | */ |
28 | extern int FASTCALL(attach_pid(struct task_struct *task, enum pid_type type, int nr)); | 75 | extern int FASTCALL(attach_pid(struct task_struct *task, |
76 | enum pid_type type, int nr)); | ||
29 | 77 | ||
30 | extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); | 78 | extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); |
31 | 79 | ||
32 | /* | 80 | /* |
33 | * look up a PID in the hash table. Must be called with the tasklist_lock | 81 | * look up a PID in the hash table. Must be called with the tasklist_lock |
34 | * held. | 82 | * or rcu_read_lock() held. |
83 | */ | ||
84 | extern struct pid *FASTCALL(find_pid(int nr)); | ||
85 | |||
86 | /* | ||
87 | * Lookup a PID in the hash table, and return with it's count elevated. | ||
35 | */ | 88 | */ |
36 | extern struct pid *FASTCALL(find_pid(enum pid_type, int)); | 89 | extern struct pid *find_get_pid(int nr); |
37 | 90 | ||
38 | extern int alloc_pidmap(void); | 91 | extern struct pid *alloc_pid(void); |
39 | extern void FASTCALL(free_pidmap(int)); | 92 | extern void FASTCALL(free_pid(struct pid *pid)); |
40 | 93 | ||
94 | #define pid_next(task, type) \ | ||
95 | ((task)->pids[(type)].node.next) | ||
96 | |||
97 | #define pid_next_task(task, type) \ | ||
98 | hlist_entry(pid_next(task, type), struct task_struct, \ | ||
99 | pids[(type)].node) | ||
100 | |||
101 | |||
102 | /* We could use hlist_for_each_entry_rcu here but it takes more arguments | ||
103 | * than the do_each_task_pid/while_each_task_pid. So we roll our own | ||
104 | * to preserve the existing interface. | ||
105 | */ | ||
41 | #define do_each_task_pid(who, type, task) \ | 106 | #define do_each_task_pid(who, type, task) \ |
42 | if ((task = find_task_by_pid_type(type, who))) { \ | 107 | if ((task = find_task_by_pid_type(type, who))) { \ |
43 | prefetch((task)->pids[type].pid_list.next); \ | 108 | prefetch(pid_next(task, type)); \ |
44 | do { | 109 | do { |
45 | 110 | ||
46 | #define while_each_task_pid(who, type, task) \ | 111 | #define while_each_task_pid(who, type, task) \ |
47 | } while (task = pid_task((task)->pids[type].pid_list.next,\ | 112 | } while (pid_next(task, type) && ({ \ |
48 | type), \ | 113 | task = pid_next_task(task, type); \ |
49 | prefetch((task)->pids[type].pid_list.next), \ | 114 | rcu_dereference(task); \ |
50 | hlist_unhashed(&(task)->pids[type].pid_chain)); \ | 115 | prefetch(pid_next(task, type)); \ |
51 | } \ | 116 | 1; }) ); \ |
117 | } | ||
52 | 118 | ||
53 | #endif /* _LINUX_PID_H */ | 119 | #endif /* _LINUX_PID_H */ |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index b12e59c75752..123a7c24bc72 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -5,10 +5,14 @@ | |||
5 | 5 | ||
6 | #define PIPE_BUFFERS (16) | 6 | #define PIPE_BUFFERS (16) |
7 | 7 | ||
8 | #define PIPE_BUF_FLAG_STOLEN 0x01 | ||
9 | #define PIPE_BUF_FLAG_LRU 0x02 | ||
10 | |||
8 | struct pipe_buffer { | 11 | struct pipe_buffer { |
9 | struct page *page; | 12 | struct page *page; |
10 | unsigned int offset, len; | 13 | unsigned int offset, len; |
11 | struct pipe_buf_operations *ops; | 14 | struct pipe_buf_operations *ops; |
15 | unsigned int flags; | ||
12 | }; | 16 | }; |
13 | 17 | ||
14 | struct pipe_buf_operations { | 18 | struct pipe_buf_operations { |
@@ -16,6 +20,7 @@ struct pipe_buf_operations { | |||
16 | void * (*map)(struct file *, struct pipe_inode_info *, struct pipe_buffer *); | 20 | void * (*map)(struct file *, struct pipe_inode_info *, struct pipe_buffer *); |
17 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); | 21 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); |
18 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); | 22 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); |
23 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); | ||
19 | }; | 24 | }; |
20 | 25 | ||
21 | struct pipe_inode_info { | 26 | struct pipe_inode_info { |
@@ -31,26 +36,28 @@ struct pipe_inode_info { | |||
31 | unsigned int w_counter; | 36 | unsigned int w_counter; |
32 | struct fasync_struct *fasync_readers; | 37 | struct fasync_struct *fasync_readers; |
33 | struct fasync_struct *fasync_writers; | 38 | struct fasync_struct *fasync_writers; |
39 | struct inode *inode; | ||
34 | }; | 40 | }; |
35 | 41 | ||
36 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual | 42 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual |
37 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ | 43 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ |
38 | #define PIPE_SIZE PAGE_SIZE | 44 | #define PIPE_SIZE PAGE_SIZE |
39 | 45 | ||
40 | #define PIPE_MUTEX(inode) (&(inode).i_mutex) | ||
41 | #define PIPE_WAIT(inode) (&(inode).i_pipe->wait) | ||
42 | #define PIPE_READERS(inode) ((inode).i_pipe->readers) | ||
43 | #define PIPE_WRITERS(inode) ((inode).i_pipe->writers) | ||
44 | #define PIPE_WAITING_WRITERS(inode) ((inode).i_pipe->waiting_writers) | ||
45 | #define PIPE_RCOUNTER(inode) ((inode).i_pipe->r_counter) | ||
46 | #define PIPE_WCOUNTER(inode) ((inode).i_pipe->w_counter) | ||
47 | #define PIPE_FASYNC_READERS(inode) (&((inode).i_pipe->fasync_readers)) | ||
48 | #define PIPE_FASYNC_WRITERS(inode) (&((inode).i_pipe->fasync_writers)) | ||
49 | |||
50 | /* Drop the inode semaphore and wait for a pipe event, atomically */ | 46 | /* Drop the inode semaphore and wait for a pipe event, atomically */ |
51 | void pipe_wait(struct inode * inode); | 47 | void pipe_wait(struct pipe_inode_info *pipe); |
52 | 48 | ||
53 | struct inode* pipe_new(struct inode* inode); | 49 | struct pipe_inode_info * alloc_pipe_info(struct inode * inode); |
54 | void free_pipe_info(struct inode* inode); | 50 | void free_pipe_info(struct inode * inode); |
51 | void __free_pipe_info(struct pipe_inode_info *); | ||
52 | |||
53 | /* | ||
54 | * splice is tied to pipes as a transport (at least for now), so we'll just | ||
55 | * add the splice flags here. | ||
56 | */ | ||
57 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ | ||
58 | #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ | ||
59 | /* we may still block on the fd we splice */ | ||
60 | /* from/to, of course */ | ||
61 | #define SPLICE_F_MORE (0x04) /* expect more data */ | ||
55 | 62 | ||
56 | #endif | 63 | #endif |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 135871df9911..4b47a0253425 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -79,7 +79,7 @@ struct kcore_list { | |||
79 | struct vmcore { | 79 | struct vmcore { |
80 | struct list_head list; | 80 | struct list_head list; |
81 | unsigned long long paddr; | 81 | unsigned long long paddr; |
82 | unsigned long size; | 82 | unsigned long long size; |
83 | loff_t offset; | 83 | loff_t offset; |
84 | }; | 84 | }; |
85 | 85 | ||
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 774e1acfb8c4..f1fbae7e390e 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -227,8 +227,8 @@ struct mdp_superblock_1 { | |||
227 | */ | 227 | */ |
228 | 228 | ||
229 | /* These are only valid with feature bit '4' */ | 229 | /* These are only valid with feature bit '4' */ |
230 | __u64 reshape_position; /* next address in array-space for reshape */ | ||
231 | __u32 new_level; /* new level we are reshaping to */ | 230 | __u32 new_level; /* new level we are reshaping to */ |
231 | __u64 reshape_position; /* next address in array-space for reshape */ | ||
232 | __u32 delta_disks; /* change in number of raid_disks */ | 232 | __u32 delta_disks; /* change in number of raid_disks */ |
233 | __u32 new_layout; /* new layout */ | 233 | __u32 new_layout; /* new layout */ |
234 | __u32 new_chunk; /* new chunk size (bytes) */ | 234 | __u32 new_chunk; /* new chunk size (bytes) */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index d04186d8cc68..e3539c14e47e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -100,6 +100,7 @@ DECLARE_PER_CPU(unsigned long, process_counts); | |||
100 | extern int nr_processes(void); | 100 | extern int nr_processes(void); |
101 | extern unsigned long nr_running(void); | 101 | extern unsigned long nr_running(void); |
102 | extern unsigned long nr_uninterruptible(void); | 102 | extern unsigned long nr_uninterruptible(void); |
103 | extern unsigned long nr_active(void); | ||
103 | extern unsigned long nr_iowait(void); | 104 | extern unsigned long nr_iowait(void); |
104 | 105 | ||
105 | #include <linux/time.h> | 106 | #include <linux/time.h> |
@@ -483,6 +484,7 @@ struct signal_struct { | |||
483 | #define MAX_PRIO (MAX_RT_PRIO + 40) | 484 | #define MAX_PRIO (MAX_RT_PRIO + 40) |
484 | 485 | ||
485 | #define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) | 486 | #define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) |
487 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | ||
486 | 488 | ||
487 | /* | 489 | /* |
488 | * Some day this will be a full-fledged user tracking system.. | 490 | * Some day this will be a full-fledged user tracking system.. |
@@ -682,6 +684,14 @@ static inline void prefetch_stack(struct task_struct *t) { } | |||
682 | 684 | ||
683 | struct audit_context; /* See audit.c */ | 685 | struct audit_context; /* See audit.c */ |
684 | struct mempolicy; | 686 | struct mempolicy; |
687 | struct pipe_inode_info; | ||
688 | |||
689 | enum sleep_type { | ||
690 | SLEEP_NORMAL, | ||
691 | SLEEP_NONINTERACTIVE, | ||
692 | SLEEP_INTERACTIVE, | ||
693 | SLEEP_INTERRUPTED, | ||
694 | }; | ||
685 | 695 | ||
686 | struct task_struct { | 696 | struct task_struct { |
687 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 697 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
@@ -705,7 +715,7 @@ struct task_struct { | |||
705 | unsigned long sleep_avg; | 715 | unsigned long sleep_avg; |
706 | unsigned long long timestamp, last_ran; | 716 | unsigned long long timestamp, last_ran; |
707 | unsigned long long sched_time; /* sched_clock time spent running */ | 717 | unsigned long long sched_time; /* sched_clock time spent running */ |
708 | int activated; | 718 | enum sleep_type sleep_type; |
709 | 719 | ||
710 | unsigned long policy; | 720 | unsigned long policy; |
711 | cpumask_t cpus_allowed; | 721 | cpumask_t cpus_allowed; |
@@ -751,7 +761,7 @@ struct task_struct { | |||
751 | struct task_struct *group_leader; /* threadgroup leader */ | 761 | struct task_struct *group_leader; /* threadgroup leader */ |
752 | 762 | ||
753 | /* PID/PID hash table linkage. */ | 763 | /* PID/PID hash table linkage. */ |
754 | struct pid pids[PIDTYPE_MAX]; | 764 | struct pid_link pids[PIDTYPE_MAX]; |
755 | struct list_head thread_group; | 765 | struct list_head thread_group; |
756 | 766 | ||
757 | struct completion *vfork_done; /* for vfork() */ | 767 | struct completion *vfork_done; /* for vfork() */ |
@@ -873,6 +883,11 @@ struct task_struct { | |||
873 | 883 | ||
874 | atomic_t fs_excl; /* holding fs exclusive resources */ | 884 | atomic_t fs_excl; /* holding fs exclusive resources */ |
875 | struct rcu_head rcu; | 885 | struct rcu_head rcu; |
886 | |||
887 | /* | ||
888 | * cache last used pipe for splice | ||
889 | */ | ||
890 | struct pipe_inode_info *splice_pipe; | ||
876 | }; | 891 | }; |
877 | 892 | ||
878 | static inline pid_t process_group(struct task_struct *tsk) | 893 | static inline pid_t process_group(struct task_struct *tsk) |
@@ -890,18 +905,19 @@ static inline pid_t process_group(struct task_struct *tsk) | |||
890 | */ | 905 | */ |
891 | static inline int pid_alive(struct task_struct *p) | 906 | static inline int pid_alive(struct task_struct *p) |
892 | { | 907 | { |
893 | return p->pids[PIDTYPE_PID].nr != 0; | 908 | return p->pids[PIDTYPE_PID].pid != NULL; |
894 | } | 909 | } |
895 | 910 | ||
896 | extern void free_task(struct task_struct *tsk); | 911 | extern void free_task(struct task_struct *tsk); |
897 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 912 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
898 | 913 | ||
899 | extern void __put_task_struct_cb(struct rcu_head *rhp); | 914 | extern void __put_task_struct_cb(struct rcu_head *rhp); |
915 | extern void __put_task_struct(struct task_struct *t); | ||
900 | 916 | ||
901 | static inline void put_task_struct(struct task_struct *t) | 917 | static inline void put_task_struct(struct task_struct *t) |
902 | { | 918 | { |
903 | if (atomic_dec_and_test(&t->usage)) | 919 | if (atomic_dec_and_test(&t->usage)) |
904 | call_rcu(&t->rcu, __put_task_struct_cb); | 920 | __put_task_struct(t); |
905 | } | 921 | } |
906 | 922 | ||
907 | /* | 923 | /* |
@@ -1193,9 +1209,10 @@ extern void wait_task_inactive(task_t * p); | |||
1193 | #define while_each_thread(g, t) \ | 1209 | #define while_each_thread(g, t) \ |
1194 | while ((t = next_thread(t)) != g) | 1210 | while ((t = next_thread(t)) != g) |
1195 | 1211 | ||
1196 | #define thread_group_leader(p) (p->pid == p->tgid) | 1212 | /* de_thread depends on thread_group_leader not being a pid based check */ |
1213 | #define thread_group_leader(p) (p == p->group_leader) | ||
1197 | 1214 | ||
1198 | static inline task_t *next_thread(task_t *p) | 1215 | static inline task_t *next_thread(const task_t *p) |
1199 | { | 1216 | { |
1200 | return list_entry(rcu_dereference(p->thread_group.next), | 1217 | return list_entry(rcu_dereference(p->thread_group.next), |
1201 | task_t, thread_group); | 1218 | task_t, thread_group); |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index 6336987dae62..2925e66a6732 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h | |||
@@ -41,7 +41,8 @@ struct screen_info { | |||
41 | u16 vesapm_off; /* 0x30 */ | 41 | u16 vesapm_off; /* 0x30 */ |
42 | u16 pages; /* 0x32 */ | 42 | u16 pages; /* 0x32 */ |
43 | u16 vesa_attributes; /* 0x34 */ | 43 | u16 vesa_attributes; /* 0x34 */ |
44 | /* 0x36 -- 0x3f reserved for future expansion */ | 44 | u32 capabilities; /* 0x36 */ |
45 | /* 0x3a -- 0x3f reserved for future expansion */ | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | extern struct screen_info screen_info; | 48 | extern struct screen_info screen_info; |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index fca9b0fb5b4e..5a095572881d 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -73,7 +73,7 @@ static inline int write_tryseqlock(seqlock_t *sl) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /* Start of read calculation -- fetch last complete writer token */ | 75 | /* Start of read calculation -- fetch last complete writer token */ |
76 | static inline unsigned read_seqbegin(const seqlock_t *sl) | 76 | static __always_inline unsigned read_seqbegin(const seqlock_t *sl) |
77 | { | 77 | { |
78 | unsigned ret = sl->sequence; | 78 | unsigned ret = sl->sequence; |
79 | smp_rmb(); | 79 | smp_rmb(); |
@@ -88,7 +88,7 @@ static inline unsigned read_seqbegin(const seqlock_t *sl) | |||
88 | * | 88 | * |
89 | * Using xor saves one conditional branch. | 89 | * Using xor saves one conditional branch. |
90 | */ | 90 | */ |
91 | static inline int read_seqretry(const seqlock_t *sl, unsigned iv) | 91 | static __always_inline int read_seqretry(const seqlock_t *sl, unsigned iv) |
92 | { | 92 | { |
93 | smp_rmb(); | 93 | smp_rmb(); |
94 | return (iv & 1) | (sl->sequence ^ iv); | 94 | return (iv & 1) | (sl->sequence ^ iv); |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 690aabca8ed0..6348e8330897 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/mutex.h> | ||
21 | #include <linux/device.h> | 22 | #include <linux/device.h> |
22 | #include <linux/mod_devicetable.h> | 23 | #include <linux/mod_devicetable.h> |
23 | 24 | ||
@@ -42,7 +43,7 @@ struct serio { | |||
42 | struct serio *parent, *child; | 43 | struct serio *parent, *child; |
43 | 44 | ||
44 | struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ | 45 | struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ |
45 | struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ | 46 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ |
46 | 47 | ||
47 | struct device dev; | 48 | struct device dev; |
48 | unsigned int registered; /* port has been fully registered with driver core */ | 49 | unsigned int registered; /* port has been fully registered with driver core */ |
@@ -151,17 +152,17 @@ static inline void serio_continue_rx(struct serio *serio) | |||
151 | */ | 152 | */ |
152 | static inline int serio_pin_driver(struct serio *serio) | 153 | static inline int serio_pin_driver(struct serio *serio) |
153 | { | 154 | { |
154 | return down_interruptible(&serio->drv_sem); | 155 | return mutex_lock_interruptible(&serio->drv_mutex); |
155 | } | 156 | } |
156 | 157 | ||
157 | static inline void serio_pin_driver_uninterruptible(struct serio *serio) | 158 | static inline void serio_pin_driver_uninterruptible(struct serio *serio) |
158 | { | 159 | { |
159 | down(&serio->drv_sem); | 160 | mutex_lock(&serio->drv_mutex); |
160 | } | 161 | } |
161 | 162 | ||
162 | static inline void serio_unpin_driver(struct serio *serio) | 163 | static inline void serio_unpin_driver(struct serio *serio) |
163 | { | 164 | { |
164 | up(&serio->drv_sem); | 165 | mutex_unlock(&serio->drv_mutex); |
165 | } | 166 | } |
166 | 167 | ||
167 | 168 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 613b9513f8b9..c4619a428d9b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -941,6 +941,25 @@ static inline void skb_reserve(struct sk_buff *skb, int len) | |||
941 | #define NET_IP_ALIGN 2 | 941 | #define NET_IP_ALIGN 2 |
942 | #endif | 942 | #endif |
943 | 943 | ||
944 | /* | ||
945 | * The networking layer reserves some headroom in skb data (via | ||
946 | * dev_alloc_skb). This is used to avoid having to reallocate skb data when | ||
947 | * the header has to grow. In the default case, if the header has to grow | ||
948 | * 16 bytes or less we avoid the reallocation. | ||
949 | * | ||
950 | * Unfortunately this headroom changes the DMA alignment of the resulting | ||
951 | * network packet. As for NET_IP_ALIGN, this unaligned DMA is expensive | ||
952 | * on some architectures. An architecture can override this value, | ||
953 | * perhaps setting it to a cacheline in size (since that will maintain | ||
954 | * cacheline alignment of the DMA). It must be a power of 2. | ||
955 | * | ||
956 | * Various parts of the networking layer expect at least 16 bytes of | ||
957 | * headroom, you should not reduce this. | ||
958 | */ | ||
959 | #ifndef NET_SKB_PAD | ||
960 | #define NET_SKB_PAD 16 | ||
961 | #endif | ||
962 | |||
944 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc); | 963 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc); |
945 | 964 | ||
946 | static inline void __skb_trim(struct sk_buff *skb, unsigned int len) | 965 | static inline void __skb_trim(struct sk_buff *skb, unsigned int len) |
@@ -1030,9 +1049,9 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1030 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 1049 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
1031 | gfp_t gfp_mask) | 1050 | gfp_t gfp_mask) |
1032 | { | 1051 | { |
1033 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); | 1052 | struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD, gfp_mask); |
1034 | if (likely(skb)) | 1053 | if (likely(skb)) |
1035 | skb_reserve(skb, 16); | 1054 | skb_reserve(skb, NET_SKB_PAD); |
1036 | return skb; | 1055 | return skb; |
1037 | } | 1056 | } |
1038 | #else | 1057 | #else |
@@ -1070,13 +1089,15 @@ static inline struct sk_buff *dev_alloc_skb(unsigned int length) | |||
1070 | */ | 1089 | */ |
1071 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) | 1090 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) |
1072 | { | 1091 | { |
1073 | int delta = (headroom > 16 ? headroom : 16) - skb_headroom(skb); | 1092 | int delta = (headroom > NET_SKB_PAD ? headroom : NET_SKB_PAD) - |
1093 | skb_headroom(skb); | ||
1074 | 1094 | ||
1075 | if (delta < 0) | 1095 | if (delta < 0) |
1076 | delta = 0; | 1096 | delta = 0; |
1077 | 1097 | ||
1078 | if (delta || skb_cloned(skb)) | 1098 | if (delta || skb_cloned(skb)) |
1079 | return pskb_expand_head(skb, (delta + 15) & ~15, 0, GFP_ATOMIC); | 1099 | return pskb_expand_head(skb, (delta + (NET_SKB_PAD-1)) & |
1100 | ~(NET_SKB_PAD-1), 0, GFP_ATOMIC); | ||
1080 | return 0; | 1101 | return 0; |
1081 | } | 1102 | } |
1082 | 1103 | ||
diff --git a/include/linux/string.h b/include/linux/string.h index dee221429ad0..c61306da8c52 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -13,11 +13,6 @@ | |||
13 | extern "C" { | 13 | extern "C" { |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | extern char * strpbrk(const char *,const char *); | ||
17 | extern char * strsep(char **,const char *); | ||
18 | extern __kernel_size_t strspn(const char *,const char *); | ||
19 | extern __kernel_size_t strcspn(const char *,const char *); | ||
20 | |||
21 | extern char *strndup_user(const char __user *, long); | 16 | extern char *strndup_user(const char __user *, long); |
22 | 17 | ||
23 | /* | 18 | /* |
@@ -70,6 +65,18 @@ extern __kernel_size_t strlen(const char *); | |||
70 | #ifndef __HAVE_ARCH_STRNLEN | 65 | #ifndef __HAVE_ARCH_STRNLEN |
71 | extern __kernel_size_t strnlen(const char *,__kernel_size_t); | 66 | extern __kernel_size_t strnlen(const char *,__kernel_size_t); |
72 | #endif | 67 | #endif |
68 | #ifndef __HAVE_ARCH_STRPBRK | ||
69 | extern char * strpbrk(const char *,const char *); | ||
70 | #endif | ||
71 | #ifndef __HAVE_ARCH_STRSEP | ||
72 | extern char * strsep(char **,const char *); | ||
73 | #endif | ||
74 | #ifndef __HAVE_ARCH_STRSPN | ||
75 | extern __kernel_size_t strspn(const char *,const char *); | ||
76 | #endif | ||
77 | #ifndef __HAVE_ARCH_STRCSPN | ||
78 | extern __kernel_size_t strcspn(const char *,const char *); | ||
79 | #endif | ||
73 | 80 | ||
74 | #ifndef __HAVE_ARCH_MEMSET | 81 | #ifndef __HAVE_ARCH_MEMSET |
75 | extern void * memset(void *,int,__kernel_size_t); | 82 | extern void * memset(void *,int,__kernel_size_t); |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 50cab2a09f28..503564384545 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -197,15 +197,16 @@ svc_take_res_page(struct svc_rqst *rqstp) | |||
197 | return rqstp->rq_respages[rqstp->rq_resused++]; | 197 | return rqstp->rq_respages[rqstp->rq_resused++]; |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline int svc_take_page(struct svc_rqst *rqstp) | 200 | static inline void svc_take_page(struct svc_rqst *rqstp) |
201 | { | 201 | { |
202 | if (rqstp->rq_arghi <= rqstp->rq_argused) | 202 | if (rqstp->rq_arghi <= rqstp->rq_argused) { |
203 | return -ENOMEM; | 203 | WARN_ON(1); |
204 | return; | ||
205 | } | ||
204 | rqstp->rq_arghi--; | 206 | rqstp->rq_arghi--; |
205 | rqstp->rq_respages[rqstp->rq_resused] = | 207 | rqstp->rq_respages[rqstp->rq_resused] = |
206 | rqstp->rq_argpages[rqstp->rq_arghi]; | 208 | rqstp->rq_argpages[rqstp->rq_arghi]; |
207 | rqstp->rq_resused++; | 209 | rqstp->rq_resused++; |
208 | return 0; | ||
209 | } | 210 | } |
210 | 211 | ||
211 | static inline void svc_pushback_allpages(struct svc_rqst *rqstp) | 212 | static inline void svc_pushback_allpages(struct svc_rqst *rqstp) |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 54eac8a39a4c..5b1fdf1cff4f 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -155,6 +155,7 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct * | |||
155 | /* linux/mm/page_alloc.c */ | 155 | /* linux/mm/page_alloc.c */ |
156 | extern unsigned long totalram_pages; | 156 | extern unsigned long totalram_pages; |
157 | extern unsigned long totalhigh_pages; | 157 | extern unsigned long totalhigh_pages; |
158 | extern unsigned long totalreserve_pages; | ||
158 | extern long nr_swap_pages; | 159 | extern long nr_swap_pages; |
159 | extern unsigned int nr_free_pages(void); | 160 | extern unsigned int nr_free_pages(void); |
160 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); | 161 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index e487e3b60f60..f001bad28d9a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -570,4 +570,11 @@ asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | |||
570 | int flags, int mode); | 570 | int flags, int mode); |
571 | asmlinkage long sys_unshare(unsigned long unshare_flags); | 571 | asmlinkage long sys_unshare(unsigned long unshare_flags); |
572 | 572 | ||
573 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, | ||
574 | int fd_out, loff_t __user *off_out, | ||
575 | size_t len, unsigned int flags); | ||
576 | |||
577 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | ||
578 | unsigned int flags); | ||
579 | |||
573 | #endif | 580 | #endif |
diff --git a/include/linux/timer.h b/include/linux/timer.h index b5caabca553c..0a485beba9f5 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
8 | 8 | ||
9 | struct timer_base_s; | 9 | struct tvec_t_base_s; |
10 | 10 | ||
11 | struct timer_list { | 11 | struct timer_list { |
12 | struct list_head entry; | 12 | struct list_head entry; |
@@ -15,16 +15,16 @@ struct timer_list { | |||
15 | void (*function)(unsigned long); | 15 | void (*function)(unsigned long); |
16 | unsigned long data; | 16 | unsigned long data; |
17 | 17 | ||
18 | struct timer_base_s *base; | 18 | struct tvec_t_base_s *base; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | extern struct timer_base_s __init_timer_base; | 21 | extern struct tvec_t_base_s boot_tvec_bases; |
22 | 22 | ||
23 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ | 23 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ |
24 | .function = (_function), \ | 24 | .function = (_function), \ |
25 | .expires = (_expires), \ | 25 | .expires = (_expires), \ |
26 | .data = (_data), \ | 26 | .data = (_data), \ |
27 | .base = &__init_timer_base, \ | 27 | .base = &boot_tvec_bases, \ |
28 | } | 28 | } |
29 | 29 | ||
30 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ | 30 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ |
diff --git a/include/linux/tiocl.h b/include/linux/tiocl.h index 2c9e847f6ed1..4756862c4ed4 100644 --- a/include/linux/tiocl.h +++ b/include/linux/tiocl.h | |||
@@ -34,5 +34,6 @@ struct tiocl_selection { | |||
34 | #define TIOCL_SCROLLCONSOLE 13 /* scroll console */ | 34 | #define TIOCL_SCROLLCONSOLE 13 /* scroll console */ |
35 | #define TIOCL_BLANKSCREEN 14 /* keep screen blank even if a key is pressed */ | 35 | #define TIOCL_BLANKSCREEN 14 /* keep screen blank even if a key is pressed */ |
36 | #define TIOCL_BLANKEDSCREEN 15 /* return which vt was blanked */ | 36 | #define TIOCL_BLANKEDSCREEN 15 /* return which vt was blanked */ |
37 | #define TIOCL_GETKMSGREDIRECT 17 /* get the vt the kernel messages are restricted to */ | ||
37 | 38 | ||
38 | #endif /* _LINUX_TIOCL_H */ | 39 | #endif /* _LINUX_TIOCL_H */ |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 0976a163b459..31548303ee37 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -6,9 +6,10 @@ extern int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *c | |||
6 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); | 6 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); |
7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); | 7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); |
8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); | 8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); |
9 | void tty_schedule_flip(struct tty_struct *tty); | ||
9 | 10 | ||
10 | static inline int tty_insert_flip_char(struct tty_struct *tty, | 11 | static inline int tty_insert_flip_char(struct tty_struct *tty, |
11 | unsigned char ch, char flag) | 12 | unsigned char ch, char flag) |
12 | { | 13 | { |
13 | struct tty_buffer *tb = tty->buf.tail; | 14 | struct tty_buffer *tb = tty->buf.tail; |
14 | if (tb && tb->active && tb->used < tb->size) { | 15 | if (tb && tb->active && tb->used < tb->size) { |
@@ -19,26 +20,4 @@ static inline int tty_insert_flip_char(struct tty_struct *tty, | |||
19 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); | 20 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); |
20 | } | 21 | } |
21 | 22 | ||
22 | static inline void tty_schedule_flip(struct tty_struct *tty) | ||
23 | { | ||
24 | unsigned long flags; | ||
25 | spin_lock_irqsave(&tty->buf.lock, flags); | ||
26 | if (tty->buf.tail != NULL) { | ||
27 | tty->buf.tail->active = 0; | ||
28 | tty->buf.tail->commit = tty->buf.tail->used; | ||
29 | } | ||
30 | spin_unlock_irqrestore(&tty->buf.lock, flags); | ||
31 | schedule_delayed_work(&tty->buf.work, 1); | ||
32 | } | ||
33 | |||
34 | #undef _INLINE_ | ||
35 | |||
36 | |||
37 | #endif /* _LINUX_TTY_FLIP_H */ | 23 | #endif /* _LINUX_TTY_FLIP_H */ |
38 | |||
39 | |||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 0ff7ca68e5c5..7168302f9844 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | * | 21 | * |
22 | * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> | 22 | * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> |
23 | * | 23 | * |
24 | * Changes/Revisions: | 24 | * Changes/Revisions: |
25 | * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>) | 25 | * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>) |
26 | * - added force feedback support | 26 | * - added force feedback support |
@@ -51,7 +51,7 @@ struct uinput_request { | |||
51 | 51 | ||
52 | struct uinput_device { | 52 | struct uinput_device { |
53 | struct input_dev *dev; | 53 | struct input_dev *dev; |
54 | struct semaphore sem; | 54 | struct mutex mutex; |
55 | enum uinput_state state; | 55 | enum uinput_state state; |
56 | wait_queue_head_t waitq; | 56 | wait_queue_head_t waitq; |
57 | unsigned char ready; | 57 | unsigned char ready; |
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index fadc535e2925..dc7c621e4647 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h | |||
@@ -12,6 +12,11 @@ | |||
12 | #else | 12 | #else |
13 | #define MODULE_VERMAGIC_PREEMPT "" | 13 | #define MODULE_VERMAGIC_PREEMPT "" |
14 | #endif | 14 | #endif |
15 | #ifdef CONFIG_MODULE_UNLOAD | ||
16 | #define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload " | ||
17 | #else | ||
18 | #define MODULE_VERMAGIC_MODULE_UNLOAD "" | ||
19 | #endif | ||
15 | #ifndef MODULE_ARCH_VERMAGIC | 20 | #ifndef MODULE_ARCH_VERMAGIC |
16 | #define MODULE_ARCH_VERMAGIC "" | 21 | #define MODULE_ARCH_VERMAGIC "" |
17 | #endif | 22 | #endif |
@@ -19,5 +24,5 @@ | |||
19 | #define VERMAGIC_STRING \ | 24 | #define VERMAGIC_STRING \ |
20 | UTS_RELEASE " " \ | 25 | UTS_RELEASE " " \ |
21 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ | 26 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ |
22 | MODULE_ARCH_VERMAGIC \ | 27 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC \ |
23 | "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__) | 28 | "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__) |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index af2d6155d3fe..d7670ec1ec1e 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -966,66 +966,17 @@ struct v4l2_sliced_vbi_format | |||
966 | 966 | ||
967 | /* Teletext World System Teletext | 967 | /* Teletext World System Teletext |
968 | (WST), defined on ITU-R BT.653-2 */ | 968 | (WST), defined on ITU-R BT.653-2 */ |
969 | #define V4L2_SLICED_TELETEXT_PAL_B (0x000001) | 969 | #define V4L2_SLICED_TELETEXT_B (0x0001) |
970 | #define V4L2_SLICED_TELETEXT_PAL_C (0x000002) | ||
971 | #define V4L2_SLICED_TELETEXT_NTSC_B (0x000010) | ||
972 | #define V4L2_SLICED_TELETEXT_SECAM (0x000020) | ||
973 | |||
974 | /* Teletext North American Broadcast Teletext Specification | ||
975 | (NABTS), defined on ITU-R BT.653-2 */ | ||
976 | #define V4L2_SLICED_TELETEXT_NTSC_C (0x000040) | ||
977 | #define V4L2_SLICED_TELETEXT_NTSC_D (0x000080) | ||
978 | |||
979 | /* Video Program System, defined on ETS 300 231*/ | 970 | /* Video Program System, defined on ETS 300 231*/ |
980 | #define V4L2_SLICED_VPS (0x000400) | 971 | #define V4L2_SLICED_VPS (0x0400) |
981 | |||
982 | /* Closed Caption, defined on EIA-608 */ | 972 | /* Closed Caption, defined on EIA-608 */ |
983 | #define V4L2_SLICED_CAPTION_525 (0x001000) | 973 | #define V4L2_SLICED_CAPTION_525 (0x1000) |
984 | #define V4L2_SLICED_CAPTION_625 (0x002000) | ||
985 | |||
986 | /* Wide Screen System, defined on ITU-R BT1119.1 */ | 974 | /* Wide Screen System, defined on ITU-R BT1119.1 */ |
987 | #define V4L2_SLICED_WSS_625 (0x004000) | 975 | #define V4L2_SLICED_WSS_625 (0x4000) |
988 | 976 | ||
989 | /* Wide Screen System, defined on IEC 61880 */ | 977 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) |
990 | #define V4L2_SLICED_WSS_525 (0x008000) | 978 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) |
991 | 979 | ||
992 | /* Vertical Interval Timecode (VITC), defined on SMPTE 12M */ | ||
993 | #define V4l2_SLICED_VITC_625 (0x010000) | ||
994 | #define V4l2_SLICED_VITC_525 (0x020000) | ||
995 | |||
996 | #define V4L2_SLICED_TELETEXT_B (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
997 | V4L2_SLICED_TELETEXT_NTSC_B) | ||
998 | |||
999 | #define V4L2_SLICED_TELETEXT (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
1000 | V4L2_SLICED_TELETEXT_PAL_C |\ | ||
1001 | V4L2_SLICED_TELETEXT_SECAM |\ | ||
1002 | V4L2_SLICED_TELETEXT_NTSC_B |\ | ||
1003 | V4L2_SLICED_TELETEXT_NTSC_C |\ | ||
1004 | V4L2_SLICED_TELETEXT_NTSC_D) | ||
1005 | |||
1006 | #define V4L2_SLICED_CAPTION (V4L2_SLICED_CAPTION_525 |\ | ||
1007 | V4L2_SLICED_CAPTION_625) | ||
1008 | |||
1009 | #define V4L2_SLICED_WSS (V4L2_SLICED_WSS_525 |\ | ||
1010 | V4L2_SLICED_WSS_625) | ||
1011 | |||
1012 | #define V4L2_SLICED_VITC (V4L2_SLICED_VITC_525 |\ | ||
1013 | V4L2_SLICED_VITC_625) | ||
1014 | |||
1015 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\ | ||
1016 | V4L2_SLICED_TELETEXT_NTSC_C |\ | ||
1017 | V4L2_SLICED_TELETEXT_NTSC_D |\ | ||
1018 | V4L2_SLICED_CAPTION_525 |\ | ||
1019 | V4L2_SLICED_WSS_525 |\ | ||
1020 | V4l2_SLICED_VITC_525) | ||
1021 | |||
1022 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
1023 | V4L2_SLICED_TELETEXT_PAL_C |\ | ||
1024 | V4L2_SLICED_TELETEXT_SECAM |\ | ||
1025 | V4L2_SLICED_VPS |\ | ||
1026 | V4L2_SLICED_CAPTION_625 |\ | ||
1027 | V4L2_SLICED_WSS_625 |\ | ||
1028 | V4l2_SLICED_VITC_625) | ||
1029 | 980 | ||
1030 | struct v4l2_sliced_vbi_cap | 981 | struct v4l2_sliced_vbi_cap |
1031 | { | 982 | { |
diff --git a/include/media/cx25840.h b/include/media/cx25840.h new file mode 100644 index 000000000000..8e7e52d659a0 --- /dev/null +++ b/include/media/cx25840.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | cx25840.h - definition for cx25840/1/2/3 inputs | ||
3 | |||
4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _CX25840_H_ | ||
22 | #define _CX25840_H_ | ||
23 | |||
24 | enum cx25840_video_input { | ||
25 | /* Composite video inputs In1-In8 */ | ||
26 | CX25840_COMPOSITE1 = 1, | ||
27 | CX25840_COMPOSITE2, | ||
28 | CX25840_COMPOSITE3, | ||
29 | CX25840_COMPOSITE4, | ||
30 | CX25840_COMPOSITE5, | ||
31 | CX25840_COMPOSITE6, | ||
32 | CX25840_COMPOSITE7, | ||
33 | CX25840_COMPOSITE8, | ||
34 | |||
35 | /* S-Video inputs consist of one luma input (In1-In4) ORed with one | ||
36 | chroma input (In5-In8) */ | ||
37 | CX25840_SVIDEO_LUMA1 = 0x10, | ||
38 | CX25840_SVIDEO_LUMA2 = 0x20, | ||
39 | CX25840_SVIDEO_LUMA3 = 0x30, | ||
40 | CX25840_SVIDEO_LUMA4 = 0x40, | ||
41 | CX25840_SVIDEO_CHROMA4 = 0x400, | ||
42 | CX25840_SVIDEO_CHROMA5 = 0x500, | ||
43 | CX25840_SVIDEO_CHROMA6 = 0x600, | ||
44 | CX25840_SVIDEO_CHROMA7 = 0x700, | ||
45 | CX25840_SVIDEO_CHROMA8 = 0x800, | ||
46 | |||
47 | /* S-Video aliases for common luma/chroma combinations */ | ||
48 | CX25840_SVIDEO1 = 0x510, | ||
49 | CX25840_SVIDEO2 = 0x620, | ||
50 | CX25840_SVIDEO3 = 0x730, | ||
51 | CX25840_SVIDEO4 = 0x840, | ||
52 | }; | ||
53 | |||
54 | enum cx25840_audio_input { | ||
55 | /* Audio inputs: serial or In4-In8 */ | ||
56 | CX25840_AUDIO_SERIAL, | ||
57 | CX25840_AUDIO4 = 4, | ||
58 | CX25840_AUDIO5, | ||
59 | CX25840_AUDIO6, | ||
60 | CX25840_AUDIO7, | ||
61 | CX25840_AUDIO8, | ||
62 | }; | ||
63 | |||
64 | #endif | ||
diff --git a/include/media/msp3400.h b/include/media/msp3400.h index 0be61a021d45..6ab854931c05 100644 --- a/include/media/msp3400.h +++ b/include/media/msp3400.h | |||
@@ -80,16 +80,16 @@ | |||
80 | */ | 80 | */ |
81 | 81 | ||
82 | /* SCART input to DSP selection */ | 82 | /* SCART input to DSP selection */ |
83 | #define MSP_IN_SCART_1 0 /* Pin SC1_IN */ | 83 | #define MSP_IN_SCART1 0 /* Pin SC1_IN */ |
84 | #define MSP_IN_SCART_2 1 /* Pin SC2_IN */ | 84 | #define MSP_IN_SCART2 1 /* Pin SC2_IN */ |
85 | #define MSP_IN_SCART_3 2 /* Pin SC3_IN */ | 85 | #define MSP_IN_SCART3 2 /* Pin SC3_IN */ |
86 | #define MSP_IN_SCART_4 3 /* Pin SC4_IN */ | 86 | #define MSP_IN_SCART4 3 /* Pin SC4_IN */ |
87 | #define MSP_IN_MONO 6 /* Pin MONO_IN */ | 87 | #define MSP_IN_MONO 6 /* Pin MONO_IN */ |
88 | #define MSP_IN_MUTE 7 /* Mute DSP input */ | 88 | #define MSP_IN_MUTE 7 /* Mute DSP input */ |
89 | #define MSP_SCART_TO_DSP(in) (in) | 89 | #define MSP_SCART_TO_DSP(in) (in) |
90 | /* Tuner input to demodulator and DSP selection */ | 90 | /* Tuner input to demodulator and DSP selection */ |
91 | #define MSP_IN_TUNER_1 0 /* Analog Sound IF input pin ANA_IN1 */ | 91 | #define MSP_IN_TUNER1 0 /* Analog Sound IF input pin ANA_IN1 */ |
92 | #define MSP_IN_TUNER_2 1 /* Analog Sound IF input pin ANA_IN2 */ | 92 | #define MSP_IN_TUNER2 1 /* Analog Sound IF input pin ANA_IN2 */ |
93 | #define MSP_TUNER_TO_DSP(in) ((in) << 3) | 93 | #define MSP_TUNER_TO_DSP(in) ((in) << 3) |
94 | 94 | ||
95 | /* The msp has up to 5 DSP outputs, each output can independently select | 95 | /* The msp has up to 5 DSP outputs, each output can independently select |
@@ -109,14 +109,14 @@ | |||
109 | DSP. This is currently not implemented. Also not implemented is the | 109 | DSP. This is currently not implemented. Also not implemented is the |
110 | multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate | 110 | multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate |
111 | a need for one of those features then additional support can be added. */ | 111 | a need for one of those features then additional support can be added. */ |
112 | #define MSP_DSP_OUT_TUNER 0 /* Tuner output */ | 112 | #define MSP_DSP_IN_TUNER 0 /* Tuner DSP input */ |
113 | #define MSP_DSP_OUT_SCART 2 /* SCART output */ | 113 | #define MSP_DSP_IN_SCART 2 /* SCART DSP input */ |
114 | #define MSP_DSP_OUT_I2S1 5 /* I2S1 output */ | 114 | #define MSP_DSP_IN_I2S1 5 /* I2S1 DSP input */ |
115 | #define MSP_DSP_OUT_I2S2 6 /* I2S2 output */ | 115 | #define MSP_DSP_IN_I2S2 6 /* I2S2 DSP input */ |
116 | #define MSP_DSP_OUT_I2S3 7 /* I2S3 output */ | 116 | #define MSP_DSP_IN_I2S3 7 /* I2S3 DSP input */ |
117 | #define MSP_DSP_OUT_MAIN_AVC 11 /* MAIN AVC processed output */ | 117 | #define MSP_DSP_IN_MAIN_AVC 11 /* MAIN AVC processed DSP input */ |
118 | #define MSP_DSP_OUT_MAIN 12 /* MAIN output */ | 118 | #define MSP_DSP_IN_MAIN 12 /* MAIN DSP input */ |
119 | #define MSP_DSP_OUT_AUX 13 /* AUX output */ | 119 | #define MSP_DSP_IN_AUX 13 /* AUX DSP input */ |
120 | #define MSP_DSP_TO_MAIN(in) ((in) << 4) | 120 | #define MSP_DSP_TO_MAIN(in) ((in) << 4) |
121 | #define MSP_DSP_TO_AUX(in) ((in) << 8) | 121 | #define MSP_DSP_TO_AUX(in) ((in) << 8) |
122 | #define MSP_DSP_TO_SCART1(in) ((in) << 12) | 122 | #define MSP_DSP_TO_SCART1(in) ((in) << 12) |
@@ -125,16 +125,16 @@ | |||
125 | 125 | ||
126 | /* Output SCART select: the SCART outputs can select which input | 126 | /* Output SCART select: the SCART outputs can select which input |
127 | to use. */ | 127 | to use. */ |
128 | #define MSP_OUT_SCART1 0 /* SCART1 input, bypassing the DSP */ | 128 | #define MSP_SC_IN_SCART1 0 /* SCART1 input, bypassing the DSP */ |
129 | #define MSP_OUT_SCART2 1 /* SCART2 input, bypassing the DSP */ | 129 | #define MSP_SC_IN_SCART2 1 /* SCART2 input, bypassing the DSP */ |
130 | #define MSP_OUT_SCART3 2 /* SCART3 input, bypassing the DSP */ | 130 | #define MSP_SC_IN_SCART3 2 /* SCART3 input, bypassing the DSP */ |
131 | #define MSP_OUT_SCART4 3 /* SCART4 input, bypassing the DSP */ | 131 | #define MSP_SC_IN_SCART4 3 /* SCART4 input, bypassing the DSP */ |
132 | #define MSP_OUT_SCART1_DA 4 /* DSP SCART1 output */ | 132 | #define MSP_SC_IN_DSP_SCART1 4 /* DSP SCART1 input */ |
133 | #define MSP_OUT_SCART2_DA 5 /* DSP SCART2 output */ | 133 | #define MSP_SC_IN_DSP_SCART2 5 /* DSP SCART2 input */ |
134 | #define MSP_OUT_MONO 6 /* MONO input, bypassing the DSP */ | 134 | #define MSP_SC_IN_MONO 6 /* MONO input, bypassing the DSP */ |
135 | #define MSP_OUT_MUTE 7 /* MUTE output */ | 135 | #define MSP_SC_IN_MUTE 7 /* MUTE output */ |
136 | #define MSP_OUT_TO_SCART1(in) (in) | 136 | #define MSP_SC_TO_SCART1(in) (in) |
137 | #define MSP_OUT_TO_SCART2(in) ((in) << 4) | 137 | #define MSP_SC_TO_SCART2(in) ((in) << 4) |
138 | 138 | ||
139 | /* Shortcut macros */ | 139 | /* Shortcut macros */ |
140 | #define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \ | 140 | #define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \ |
@@ -145,14 +145,14 @@ | |||
145 | MSP_DSP_TO_SCART1(sc_i2s_src) | \ | 145 | MSP_DSP_TO_SCART1(sc_i2s_src) | \ |
146 | MSP_DSP_TO_SCART2(sc_i2s_src) | \ | 146 | MSP_DSP_TO_SCART2(sc_i2s_src) | \ |
147 | MSP_DSP_TO_I2S(sc_i2s_src)) | 147 | MSP_DSP_TO_I2S(sc_i2s_src)) |
148 | #define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, \ | 148 | #define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \ |
149 | MSP_DSP_OUT_TUNER, MSP_DSP_OUT_TUNER) | 149 | MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER) |
150 | #define MSP_OUTPUT(sc) \ | 150 | #define MSP_OUTPUT(sc) \ |
151 | (MSP_OUT_TO_SCART1(sc) | \ | 151 | (MSP_SC_TO_SCART1(sc) | \ |
152 | MSP_OUT_TO_SCART2(sc)) | 152 | MSP_SC_TO_SCART2(sc)) |
153 | /* This equals the RESET position of the msp3400 ACB register */ | 153 | /* This equals the RESET position of the msp3400 ACB register */ |
154 | #define MSP_OUTPUT_DEFAULT (MSP_OUT_TO_SCART1(MSP_OUT_SCART3) | \ | 154 | #define MSP_OUTPUT_DEFAULT (MSP_SC_TO_SCART1(MSP_SC_IN_SCART3) | \ |
155 | MSP_OUT_TO_SCART2(MSP_OUT_SCART1_DA)) | 155 | MSP_SC_TO_SCART2(MSP_SC_IN_DSP_SCART1)) |
156 | 156 | ||
157 | /* Tuner inputs vs. msp version */ | 157 | /* Tuner inputs vs. msp version */ |
158 | /* Chip TUNER_1 TUNER_2 | 158 | /* Chip TUNER_1 TUNER_2 |
diff --git a/include/media/saa7115.h b/include/media/saa7115.h new file mode 100644 index 000000000000..6b4836f3f057 --- /dev/null +++ b/include/media/saa7115.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | saa7115.h - definition for saa7113/4/5 inputs | ||
3 | |||
4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _SAA7115_H_ | ||
22 | #define _SAA7115_H_ | ||
23 | |||
24 | /* SAA7113/4/5 HW inputs */ | ||
25 | #define SAA7115_COMPOSITE0 0 | ||
26 | #define SAA7115_COMPOSITE1 1 | ||
27 | #define SAA7115_COMPOSITE2 2 | ||
28 | #define SAA7115_COMPOSITE3 3 | ||
29 | #define SAA7115_COMPOSITE4 4 /* not available for the saa7113 */ | ||
30 | #define SAA7115_COMPOSITE5 5 /* not available for the saa7113 */ | ||
31 | #define SAA7115_SVIDEO0 6 | ||
32 | #define SAA7115_SVIDEO1 7 | ||
33 | #define SAA7115_SVIDEO2 8 | ||
34 | #define SAA7115_SVIDEO3 9 | ||
35 | |||
36 | #endif | ||
37 | |||
diff --git a/include/media/saa7127.h b/include/media/saa7127.h new file mode 100644 index 000000000000..bbcf862141af --- /dev/null +++ b/include/media/saa7127.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | saa7127.h - definition for saa7126/7/8/9 inputs/outputs | ||
3 | |||
4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _SAA7127_H_ | ||
22 | #define _SAA7127_H_ | ||
23 | |||
24 | /* Enumeration for the supported input types */ | ||
25 | enum saa7127_input_type { | ||
26 | SAA7127_INPUT_TYPE_NORMAL, | ||
27 | SAA7127_INPUT_TYPE_TEST_IMAGE | ||
28 | }; | ||
29 | |||
30 | /* Enumeration for the supported output signal types */ | ||
31 | enum saa7127_output_type { | ||
32 | SAA7127_OUTPUT_TYPE_BOTH, | ||
33 | SAA7127_OUTPUT_TYPE_COMPOSITE, | ||
34 | SAA7127_OUTPUT_TYPE_SVIDEO, | ||
35 | SAA7127_OUTPUT_TYPE_RGB, | ||
36 | SAA7127_OUTPUT_TYPE_YUV_C, | ||
37 | SAA7127_OUTPUT_TYPE_YUV_V | ||
38 | }; | ||
39 | |||
40 | #endif | ||
41 | |||
diff --git a/include/media/upd64031a.h b/include/media/upd64031a.h new file mode 100644 index 000000000000..3ad6a32e1bce --- /dev/null +++ b/include/media/upd64031a.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * upd64031a - NEC Electronics Ghost Reduction input defines | ||
3 | * | ||
4 | * 2006 by Hans Verkuil (hverkuil@xs4all.nl) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _UPD64031A_H_ | ||
22 | #define _UPD64031A_H_ | ||
23 | |||
24 | /* Ghost reduction modes */ | ||
25 | #define UPD64031A_GR_ON 0 | ||
26 | #define UPD64031A_GR_OFF 1 | ||
27 | #define UPD64031A_GR_THROUGH 3 | ||
28 | |||
29 | /* Direct 3D/YCS Connection */ | ||
30 | #define UPD64031A_3DYCS_DISABLE (0 << 2) | ||
31 | #define UPD64031A_3DYCS_COMPOSITE (2 << 2) | ||
32 | #define UPD64031A_3DYCS_SVIDEO (3 << 2) | ||
33 | |||
34 | /* Composite sync digital separation circuit */ | ||
35 | #define UPD64031A_COMPOSITE_EXTERNAL (1 << 4) | ||
36 | |||
37 | /* Vertical sync digital separation circuit */ | ||
38 | #define UPD64031A_VERTICAL_EXTERNAL (1 << 5) | ||
39 | |||
40 | #endif | ||
diff --git a/include/media/upd64083.h b/include/media/upd64083.h new file mode 100644 index 000000000000..59b6f32ba300 --- /dev/null +++ b/include/media/upd64083.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * upd6408x - NEC Electronics 3-Dimensional Y/C separation input defines | ||
3 | * | ||
4 | * 2006 by Hans Verkuil (hverkuil@xs4all.nl) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _UPD64083_H_ | ||
22 | #define _UPD64083_H_ | ||
23 | |||
24 | /* There are two bits of information that the driver needs in order | ||
25 | to select the correct routing: the operating mode and the selection | ||
26 | of the Y input (external or internal). | ||
27 | |||
28 | The first two operating modes expect a composite signal on the Y input, | ||
29 | the second two operating modes use both the Y and C inputs. | ||
30 | |||
31 | Normally YCS_MODE is used for tuner and composite inputs, and the | ||
32 | YCNR mode is used for S-Video inputs. | ||
33 | |||
34 | The external Y-ADC is selected when the composite input comes from a | ||
35 | upd64031a ghost reduction device. If this device is not present, or | ||
36 | the input is a S-Video signal, then the internal Y-ADC input should | ||
37 | be used. */ | ||
38 | |||
39 | /* Operating modes: */ | ||
40 | |||
41 | /* YCS mode: Y/C separation (burst locked clocking) */ | ||
42 | #define UPD64083_YCS_MODE 0 | ||
43 | /* YCS+ mode: 2D Y/C separation and YCNR (burst locked clocking) */ | ||
44 | #define UPD64083_YCS_PLUS_MODE 1 | ||
45 | |||
46 | /* Note: the following two modes cannot be used in combination with the | ||
47 | external Y-ADC. */ | ||
48 | /* MNNR mode: frame comb type YNR+C delay (line locked clocking) */ | ||
49 | #define UPD64083_MNNR_MODE 2 | ||
50 | /* YCNR mode: frame recursive YCNR (burst locked clocking) */ | ||
51 | #define UPD64083_YCNR_MODE 3 | ||
52 | |||
53 | /* Select external Y-ADC: this should be set if this device is used in | ||
54 | combination with the upd64031a ghost reduction device. | ||
55 | Otherwise leave at 0 (use internal Y-ADC). */ | ||
56 | #define UPD64083_EXT_Y_ADC (1 << 2) | ||
57 | |||
58 | #endif | ||
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index 25f708ff020e..59f0c83d55a2 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -48,31 +48,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk) | |||
48 | return inet6_ehashfn(laddr, lport, faddr, fport); | 48 | return inet6_ehashfn(laddr, lport, faddr, fport); |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline void __inet6_hash(struct inet_hashinfo *hashinfo, | 51 | extern void __inet6_hash(struct inet_hashinfo *hashinfo, struct sock *sk); |
52 | struct sock *sk) | ||
53 | { | ||
54 | struct hlist_head *list; | ||
55 | rwlock_t *lock; | ||
56 | |||
57 | BUG_TRAP(sk_unhashed(sk)); | ||
58 | |||
59 | if (sk->sk_state == TCP_LISTEN) { | ||
60 | list = &hashinfo->listening_hash[inet_sk_listen_hashfn(sk)]; | ||
61 | lock = &hashinfo->lhash_lock; | ||
62 | inet_listen_wlock(hashinfo); | ||
63 | } else { | ||
64 | unsigned int hash; | ||
65 | sk->sk_hash = hash = inet6_sk_ehashfn(sk); | ||
66 | hash &= (hashinfo->ehash_size - 1); | ||
67 | list = &hashinfo->ehash[hash].chain; | ||
68 | lock = &hashinfo->ehash[hash].lock; | ||
69 | write_lock(lock); | ||
70 | } | ||
71 | |||
72 | __sk_add_node(sk, list); | ||
73 | sock_prot_inc_use(sk->sk_prot); | ||
74 | write_unlock(lock); | ||
75 | } | ||
76 | 52 | ||
77 | /* | 53 | /* |
78 | * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so | 54 | * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so |
@@ -80,52 +56,12 @@ static inline void __inet6_hash(struct inet_hashinfo *hashinfo, | |||
80 | * | 56 | * |
81 | * The sockhash lock must be held as a reader here. | 57 | * The sockhash lock must be held as a reader here. |
82 | */ | 58 | */ |
83 | static inline struct sock * | 59 | extern struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo, |
84 | __inet6_lookup_established(struct inet_hashinfo *hashinfo, | ||
85 | const struct in6_addr *saddr, | 60 | const struct in6_addr *saddr, |
86 | const u16 sport, | 61 | const u16 sport, |
87 | const struct in6_addr *daddr, | 62 | const struct in6_addr *daddr, |
88 | const u16 hnum, | 63 | const u16 hnum, |
89 | const int dif) | 64 | const int dif); |
90 | { | ||
91 | struct sock *sk; | ||
92 | const struct hlist_node *node; | ||
93 | const __u32 ports = INET_COMBINED_PORTS(sport, hnum); | ||
94 | /* Optimize here for direct hit, only listening connections can | ||
95 | * have wildcards anyways. | ||
96 | */ | ||
97 | unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport); | ||
98 | struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); | ||
99 | |||
100 | prefetch(head->chain.first); | ||
101 | read_lock(&head->lock); | ||
102 | sk_for_each(sk, node, &head->chain) { | ||
103 | /* For IPV6 do the cheaper port and family tests first. */ | ||
104 | if (INET6_MATCH(sk, hash, saddr, daddr, ports, dif)) | ||
105 | goto hit; /* You sunk my battleship! */ | ||
106 | } | ||
107 | /* Must check for a TIME_WAIT'er before going to listener hash. */ | ||
108 | sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) { | ||
109 | const struct inet_timewait_sock *tw = inet_twsk(sk); | ||
110 | |||
111 | if(*((__u32 *)&(tw->tw_dport)) == ports && | ||
112 | sk->sk_family == PF_INET6) { | ||
113 | const struct inet6_timewait_sock *tw6 = inet6_twsk(sk); | ||
114 | |||
115 | if (ipv6_addr_equal(&tw6->tw_v6_daddr, saddr) && | ||
116 | ipv6_addr_equal(&tw6->tw_v6_rcv_saddr, daddr) && | ||
117 | (!sk->sk_bound_dev_if || sk->sk_bound_dev_if == dif)) | ||
118 | goto hit; | ||
119 | } | ||
120 | } | ||
121 | read_unlock(&head->lock); | ||
122 | return NULL; | ||
123 | |||
124 | hit: | ||
125 | sock_hold(sk); | ||
126 | read_unlock(&head->lock); | ||
127 | return sk; | ||
128 | } | ||
129 | 65 | ||
130 | extern struct sock *inet6_lookup_listener(struct inet_hashinfo *hashinfo, | 66 | extern struct sock *inet6_lookup_listener(struct inet_hashinfo *hashinfo, |
131 | const struct in6_addr *daddr, | 67 | const struct in6_addr *daddr, |
diff --git a/include/net/ip.h b/include/net/ip.h index 8fe6156ca9b0..3d2e5ca62a5a 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -95,6 +95,7 @@ extern int ip_local_deliver(struct sk_buff *skb); | |||
95 | extern int ip_mr_input(struct sk_buff *skb); | 95 | extern int ip_mr_input(struct sk_buff *skb); |
96 | extern int ip_output(struct sk_buff *skb); | 96 | extern int ip_output(struct sk_buff *skb); |
97 | extern int ip_mc_output(struct sk_buff *skb); | 97 | extern int ip_mc_output(struct sk_buff *skb); |
98 | extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); | ||
98 | extern int ip_do_nat(struct sk_buff *skb); | 99 | extern int ip_do_nat(struct sk_buff *skb); |
99 | extern void ip_send_check(struct iphdr *ip); | 100 | extern void ip_send_check(struct iphdr *ip); |
100 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); | 101 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 9418f4d1afbb..3c989db8a7aa 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -405,9 +405,6 @@ extern int tcp_disconnect(struct sock *sk, int flags); | |||
405 | 405 | ||
406 | extern void tcp_unhash(struct sock *sk); | 406 | extern void tcp_unhash(struct sock *sk); |
407 | 407 | ||
408 | extern int tcp_v4_hash_connecting(struct sock *sk); | ||
409 | |||
410 | |||
411 | /* From syncookies.c */ | 408 | /* From syncookies.c */ |
412 | extern struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | 409 | extern struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, |
413 | struct ip_options *opt); | 410 | struct ip_options *opt); |
diff --git a/include/net/x25device.h b/include/net/x25device.h index 1a318374faef..1d10c879f7e2 100644 --- a/include/net/x25device.h +++ b/include/net/x25device.h | |||
@@ -8,6 +8,7 @@ | |||
8 | static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev) | 8 | static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev) |
9 | { | 9 | { |
10 | skb->mac.raw = skb->data; | 10 | skb->mac.raw = skb->data; |
11 | skb->dev = dev; | ||
11 | skb->pkt_type = PACKET_HOST; | 12 | skb->pkt_type = PACKET_HOST; |
12 | 13 | ||
13 | return htons(ETH_P_X25); | 14 | return htons(ETH_P_X25); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index e100291e43f4..0d5529c382e8 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -242,7 +242,6 @@ extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo); | |||
242 | 242 | ||
243 | extern void xfrm_state_delete_tunnel(struct xfrm_state *x); | 243 | extern void xfrm_state_delete_tunnel(struct xfrm_state *x); |
244 | 244 | ||
245 | struct xfrm_decap_state; | ||
246 | struct xfrm_type | 245 | struct xfrm_type |
247 | { | 246 | { |
248 | char *description; | 247 | char *description; |
@@ -251,7 +250,7 @@ struct xfrm_type | |||
251 | 250 | ||
252 | int (*init_state)(struct xfrm_state *x); | 251 | int (*init_state)(struct xfrm_state *x); |
253 | void (*destructor)(struct xfrm_state *); | 252 | void (*destructor)(struct xfrm_state *); |
254 | int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); | 253 | int (*input)(struct xfrm_state *, struct sk_buff *skb); |
255 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); | 254 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); |
256 | /* Estimate maximal size of result of transformation of a dgram */ | 255 | /* Estimate maximal size of result of transformation of a dgram */ |
257 | u32 (*get_max_size)(struct xfrm_state *, int size); | 256 | u32 (*get_max_size)(struct xfrm_state *, int size); |
@@ -606,25 +605,11 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) | |||
606 | 605 | ||
607 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); | 606 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); |
608 | 607 | ||
609 | /* Decapsulation state, used by the input to store data during | ||
610 | * decapsulation procedure, to be used later (during the policy | ||
611 | * check | ||
612 | */ | ||
613 | struct xfrm_decap_state { | ||
614 | char decap_data[20]; | ||
615 | __u16 decap_type; | ||
616 | }; | ||
617 | |||
618 | struct sec_decap_state { | ||
619 | struct xfrm_state *xvec; | ||
620 | struct xfrm_decap_state decap; | ||
621 | }; | ||
622 | |||
623 | struct sec_path | 608 | struct sec_path |
624 | { | 609 | { |
625 | atomic_t refcnt; | 610 | atomic_t refcnt; |
626 | int len; | 611 | int len; |
627 | struct sec_decap_state x[XFRM_MAX_DEPTH]; | 612 | struct xfrm_state *xvec[XFRM_MAX_DEPTH]; |
628 | }; | 613 | }; |
629 | 614 | ||
630 | static inline struct sec_path * | 615 | static inline struct sec_path * |
diff --git a/include/pcmcia/bulkmem.h b/include/pcmcia/bulkmem.h index b53b78d497ba..6bc7472293b2 100644 --- a/include/pcmcia/bulkmem.h +++ b/include/pcmcia/bulkmem.h | |||
@@ -35,7 +35,7 @@ typedef struct region_info_t { | |||
35 | #define REGION_BAR_MASK 0xe000 | 35 | #define REGION_BAR_MASK 0xe000 |
36 | #define REGION_BAR_SHIFT 13 | 36 | #define REGION_BAR_SHIFT 13 |
37 | 37 | ||
38 | int pcmcia_get_first_region(client_handle_t handle, region_info_t *rgn); | 38 | int pcmcia_get_first_region(struct pcmcia_device *handle, region_info_t *rgn); |
39 | int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn); | 39 | int pcmcia_get_next_region(struct pcmcia_device *handle, region_info_t *rgn); |
40 | 40 | ||
41 | #endif /* _LINUX_BULKMEM_H */ | 41 | #endif /* _LINUX_BULKMEM_H */ |
diff --git a/include/pcmcia/ciscode.h b/include/pcmcia/ciscode.h index da19c297dd65..c1da8558339a 100644 --- a/include/pcmcia/ciscode.h +++ b/include/pcmcia/ciscode.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * ciscode.h -- Definitions for bulk memory services | 2 | * ciscode.h |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
@@ -122,4 +122,7 @@ | |||
122 | 122 | ||
123 | #define MANFID_XIRCOM 0x0105 | 123 | #define MANFID_XIRCOM 0x0105 |
124 | 124 | ||
125 | #define MANFID_POSSIO 0x030c | ||
126 | #define PRODID_POSSIO_GCC 0x0003 | ||
127 | |||
125 | #endif /* _LINUX_CISCODE_H */ | 128 | #endif /* _LINUX_CISCODE_H */ |
diff --git a/include/pcmcia/cistpl.h b/include/pcmcia/cistpl.h index c6a069554fd7..d3bbb19caf81 100644 --- a/include/pcmcia/cistpl.h +++ b/include/pcmcia/cistpl.h | |||
@@ -586,12 +586,7 @@ typedef struct cisdump_t { | |||
586 | cisdata_t Data[CISTPL_MAX_CIS_SIZE]; | 586 | cisdata_t Data[CISTPL_MAX_CIS_SIZE]; |
587 | } cisdump_t; | 587 | } cisdump_t; |
588 | 588 | ||
589 | int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple); | ||
590 | int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple); | ||
591 | int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple); | ||
592 | int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse); | ||
593 | 589 | ||
594 | int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info); | ||
595 | int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis); | 590 | int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis); |
596 | 591 | ||
597 | /* don't use outside of PCMCIA core yet */ | 592 | /* don't use outside of PCMCIA core yet */ |
@@ -602,4 +597,20 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse); | |||
602 | 597 | ||
603 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info); | 598 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info); |
604 | 599 | ||
600 | /* ... but use these wrappers instead */ | ||
601 | #define pcmcia_get_first_tuple(p_dev, tuple) \ | ||
602 | pccard_get_first_tuple(p_dev->socket, p_dev->func, tuple) | ||
603 | |||
604 | #define pcmcia_get_next_tuple(p_dev, tuple) \ | ||
605 | pccard_get_next_tuple(p_dev->socket, p_dev->func, tuple) | ||
606 | |||
607 | #define pcmcia_get_tuple_data(p_dev, tuple) \ | ||
608 | pccard_get_tuple_data(p_dev->socket, tuple) | ||
609 | |||
610 | #define pcmcia_parse_tuple(p_dev, tuple, parse) \ | ||
611 | pccard_parse_tuple(tuple, parse) | ||
612 | |||
613 | #define pcmcia_validate_cis(p_dev, info) \ | ||
614 | pccard_validate_cis(p_dev->socket, p_dev->func, info) | ||
615 | |||
605 | #endif /* LINUX_CISTPL_H */ | 616 | #endif /* LINUX_CISTPL_H */ |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index 52660f32663d..d5838c30d20f 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -109,17 +109,6 @@ typedef struct client_req_t { | |||
109 | 109 | ||
110 | #define CLIENT_THIS_SOCKET 0x01 | 110 | #define CLIENT_THIS_SOCKET 0x01 |
111 | 111 | ||
112 | /* For RegisterClient */ | ||
113 | typedef struct client_reg_t { | ||
114 | dev_info_t *dev_info; | ||
115 | u_int Attributes; /* UNUSED */ | ||
116 | u_int EventMask; | ||
117 | int (*event_handler)(event_t event, int priority, | ||
118 | event_callback_args_t *); | ||
119 | event_callback_args_t event_callback_args; | ||
120 | u_int Version; | ||
121 | } client_reg_t; | ||
122 | |||
123 | /* ModifyConfiguration */ | 112 | /* ModifyConfiguration */ |
124 | typedef struct modconf_t { | 113 | typedef struct modconf_t { |
125 | u_int Attributes; | 114 | u_int Attributes; |
@@ -127,15 +116,16 @@ typedef struct modconf_t { | |||
127 | } modconf_t; | 116 | } modconf_t; |
128 | 117 | ||
129 | /* Attributes for ModifyConfiguration */ | 118 | /* Attributes for ModifyConfiguration */ |
130 | #define CONF_IRQ_CHANGE_VALID 0x100 | 119 | #define CONF_IRQ_CHANGE_VALID 0x0100 |
131 | #define CONF_VCC_CHANGE_VALID 0x200 | 120 | #define CONF_VCC_CHANGE_VALID 0x0200 |
132 | #define CONF_VPP1_CHANGE_VALID 0x400 | 121 | #define CONF_VPP1_CHANGE_VALID 0x0400 |
133 | #define CONF_VPP2_CHANGE_VALID 0x800 | 122 | #define CONF_VPP2_CHANGE_VALID 0x0800 |
123 | #define CONF_IO_CHANGE_WIDTH 0x1000 | ||
134 | 124 | ||
135 | /* For RequestConfiguration */ | 125 | /* For RequestConfiguration */ |
136 | typedef struct config_req_t { | 126 | typedef struct config_req_t { |
137 | u_int Attributes; | 127 | u_int Attributes; |
138 | u_int Vcc, Vpp1, Vpp2; | 128 | u_int Vpp; /* both Vpp1 and Vpp2 */ |
139 | u_int IntType; | 129 | u_int IntType; |
140 | u_int ConfigBase; | 130 | u_int ConfigBase; |
141 | u_char Status, Pin, Copy, ExtStatus; | 131 | u_char Status, Pin, Copy, ExtStatus; |
@@ -389,23 +379,27 @@ int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status); | |||
389 | int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); | 379 | int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); |
390 | int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); | 380 | int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); |
391 | int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); | 381 | int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); |
392 | int pcmcia_release_configuration(struct pcmcia_device *p_dev); | ||
393 | int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req); | ||
394 | int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req); | ||
395 | int pcmcia_release_window(window_handle_t win); | 382 | int pcmcia_release_window(window_handle_t win); |
396 | int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req); | 383 | int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req); |
397 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); | 384 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); |
398 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); | 385 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); |
399 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); | 386 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); |
400 | int pcmcia_reset_card(struct pcmcia_device *p_dev, client_req_t *req); | ||
401 | int pcmcia_suspend_card(struct pcmcia_socket *skt); | 387 | int pcmcia_suspend_card(struct pcmcia_socket *skt); |
402 | int pcmcia_resume_card(struct pcmcia_socket *skt); | 388 | int pcmcia_resume_card(struct pcmcia_socket *skt); |
403 | int pcmcia_eject_card(struct pcmcia_socket *skt); | 389 | int pcmcia_eject_card(struct pcmcia_socket *skt); |
404 | int pcmcia_insert_card(struct pcmcia_socket *skt); | 390 | int pcmcia_insert_card(struct pcmcia_socket *skt); |
391 | int pccard_reset_card(struct pcmcia_socket *skt); | ||
392 | |||
393 | struct pcmcia_device * pcmcia_dev_present(struct pcmcia_device *p_dev); | ||
394 | void pcmcia_disable_device(struct pcmcia_device *p_dev); | ||
405 | 395 | ||
406 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); | 396 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); |
407 | void pcmcia_put_socket(struct pcmcia_socket *skt); | 397 | void pcmcia_put_socket(struct pcmcia_socket *skt); |
408 | 398 | ||
399 | /* compatibility functions */ | ||
400 | #define pcmcia_reset_card(p_dev, req) \ | ||
401 | pccard_reset_card(p_dev->socket) | ||
402 | |||
409 | #endif /* __KERNEL__ */ | 403 | #endif /* __KERNEL__ */ |
410 | 404 | ||
411 | #endif /* _LINUX_CS_H */ | 405 | #endif /* _LINUX_CS_H */ |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 8e2a96396478..8c339f5678cf 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -39,7 +39,7 @@ typedef struct win_info_t { | |||
39 | typedef struct bind_info_t { | 39 | typedef struct bind_info_t { |
40 | dev_info_t dev_info; | 40 | dev_info_t dev_info; |
41 | u_char function; | 41 | u_char function; |
42 | struct dev_link_t *instance; | 42 | struct pcmcia_device *instance; |
43 | char name[DEV_NAME_LEN]; | 43 | char name[DEV_NAME_LEN]; |
44 | u_short major, minor; | 44 | u_short major, minor; |
45 | void *next; | 45 | void *next; |
@@ -96,6 +96,7 @@ typedef union ds_ioctl_arg_t { | |||
96 | 96 | ||
97 | #ifdef __KERNEL__ | 97 | #ifdef __KERNEL__ |
98 | #include <linux/device.h> | 98 | #include <linux/device.h> |
99 | #include <pcmcia/ss.h> | ||
99 | 100 | ||
100 | typedef struct dev_node_t { | 101 | typedef struct dev_node_t { |
101 | char dev_name[DEV_NAME_LEN]; | 102 | char dev_name[DEV_NAME_LEN]; |
@@ -103,34 +104,9 @@ typedef struct dev_node_t { | |||
103 | struct dev_node_t *next; | 104 | struct dev_node_t *next; |
104 | } dev_node_t; | 105 | } dev_node_t; |
105 | 106 | ||
106 | typedef struct dev_link_t { | ||
107 | dev_node_t *dev; | ||
108 | u_int state, open; | ||
109 | wait_queue_head_t pending; | ||
110 | client_handle_t handle; | ||
111 | io_req_t io; | ||
112 | irq_req_t irq; | ||
113 | config_req_t conf; | ||
114 | window_handle_t win; | ||
115 | void *priv; | ||
116 | struct dev_link_t *next; | ||
117 | } dev_link_t; | ||
118 | |||
119 | /* Flags for device state */ | ||
120 | #define DEV_PRESENT 0x01 | ||
121 | #define DEV_CONFIG 0x02 | ||
122 | #define DEV_STALE_CONFIG 0x04 /* release on close */ | ||
123 | #define DEV_STALE_LINK 0x08 /* detach on release */ | ||
124 | #define DEV_CONFIG_PENDING 0x10 | ||
125 | #define DEV_RELEASE_PENDING 0x20 | ||
126 | #define DEV_SUSPEND 0x40 | ||
127 | #define DEV_BUSY 0x80 | ||
128 | |||
129 | #define DEV_OK(l) \ | ||
130 | ((l) && ((l->state & ~DEV_BUSY) == (DEV_CONFIG|DEV_PRESENT))) | ||
131 | |||
132 | 107 | ||
133 | struct pcmcia_socket; | 108 | struct pcmcia_socket; |
109 | struct config_t; | ||
134 | 110 | ||
135 | struct pcmcia_driver { | 111 | struct pcmcia_driver { |
136 | int (*probe) (struct pcmcia_device *dev); | 112 | int (*probe) (struct pcmcia_device *dev); |
@@ -148,6 +124,7 @@ struct pcmcia_driver { | |||
148 | int pcmcia_register_driver(struct pcmcia_driver *driver); | 124 | int pcmcia_register_driver(struct pcmcia_driver *driver); |
149 | void pcmcia_unregister_driver(struct pcmcia_driver *driver); | 125 | void pcmcia_unregister_driver(struct pcmcia_driver *driver); |
150 | 126 | ||
127 | |||
151 | struct pcmcia_device { | 128 | struct pcmcia_device { |
152 | /* the socket and the device_no [for multifunction devices] | 129 | /* the socket and the device_no [for multifunction devices] |
153 | uniquely define a pcmcia_device */ | 130 | uniquely define a pcmcia_device */ |
@@ -160,21 +137,40 @@ struct pcmcia_device { | |||
160 | /* the hardware "function" device; certain subdevices can | 137 | /* the hardware "function" device; certain subdevices can |
161 | * share one hardware "function" device. */ | 138 | * share one hardware "function" device. */ |
162 | u8 func; | 139 | u8 func; |
140 | struct config_t* function_config; | ||
163 | 141 | ||
164 | struct list_head socket_device_list; | 142 | struct list_head socket_device_list; |
165 | 143 | ||
166 | /* deprecated, a cleaned up version will be moved into this | 144 | /* deprecated, will be cleaned up soon */ |
167 | struct soon */ | 145 | dev_node_t *dev_node; |
168 | dev_link_t *instance; | 146 | u_int open; |
169 | u_int state; | 147 | io_req_t io; |
148 | irq_req_t irq; | ||
149 | config_req_t conf; | ||
150 | window_handle_t win; | ||
151 | |||
152 | /* Is the device suspended, or in the process of | ||
153 | * being removed? */ | ||
154 | u16 suspended:1; | ||
155 | u16 _removed:1; | ||
156 | |||
157 | /* Flags whether io, irq, win configurations were | ||
158 | * requested, and whether the configuration is "locked" */ | ||
159 | u16 _irq:1; | ||
160 | u16 _io:1; | ||
161 | u16 _win:4; | ||
162 | u16 _locked:1; | ||
163 | |||
164 | /* Flag whether a "fuzzy" func_id based match is | ||
165 | * allowed. */ | ||
166 | u16 allow_func_id_match:1; | ||
170 | 167 | ||
171 | /* information about this device */ | 168 | /* information about this device */ |
172 | u8 has_manf_id:1; | 169 | u16 has_manf_id:1; |
173 | u8 has_card_id:1; | 170 | u16 has_card_id:1; |
174 | u8 has_func_id:1; | 171 | u16 has_func_id:1; |
175 | 172 | ||
176 | u8 allow_func_id_match:1; | 173 | u16 reserved:3; |
177 | u8 reserved:4; | ||
178 | 174 | ||
179 | u8 func_id; | 175 | u8 func_id; |
180 | u16 manf_id; | 176 | u16 manf_id; |
@@ -182,22 +178,24 @@ struct pcmcia_device { | |||
182 | 178 | ||
183 | char * prod_id[4]; | 179 | char * prod_id[4]; |
184 | 180 | ||
181 | struct device dev; | ||
182 | |||
183 | #ifdef CONFIG_PCMCIA_IOCTL | ||
185 | /* device driver wanted by cardmgr */ | 184 | /* device driver wanted by cardmgr */ |
186 | struct pcmcia_driver * cardmgr; | 185 | struct pcmcia_driver * cardmgr; |
186 | #endif | ||
187 | 187 | ||
188 | struct device dev; | 188 | /* data private to drivers */ |
189 | void *priv; | ||
189 | }; | 190 | }; |
190 | 191 | ||
191 | #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) | 192 | #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) |
192 | #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) | 193 | #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) |
193 | 194 | ||
194 | #define handle_to_pdev(handle) (handle) | ||
195 | #define handle_to_dev(handle) (handle->dev) | 195 | #define handle_to_dev(handle) (handle->dev) |
196 | 196 | ||
197 | #define dev_to_instance(dev) (dev->instance) | ||
198 | |||
199 | /* error reporting */ | 197 | /* error reporting */ |
200 | void cs_error(client_handle_t handle, int func, int ret); | 198 | void cs_error(struct pcmcia_device *handle, int func, int ret); |
201 | 199 | ||
202 | #endif /* __KERNEL__ */ | 200 | #endif /* __KERNEL__ */ |
203 | #endif /* _LINUX_DS_H */ | 201 | #endif /* _LINUX_DS_H */ |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 2889a69a7a8f..5e0a01ab2216 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/config.h> | 18 | #include <linux/config.h> |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/sched.h> /* task_struct, completion */ | 20 | #include <linux/sched.h> /* task_struct, completion */ |
21 | #include <linux/mutex.h> | ||
21 | 22 | ||
22 | #include <pcmcia/cs_types.h> | 23 | #include <pcmcia/cs_types.h> |
23 | #include <pcmcia/cs.h> | 24 | #include <pcmcia/cs.h> |
@@ -146,14 +147,15 @@ extern struct pccard_resource_ops pccard_static_ops; | |||
146 | /* !SS_CAP_STATIC_MAP */ | 147 | /* !SS_CAP_STATIC_MAP */ |
147 | extern struct pccard_resource_ops pccard_nonstatic_ops; | 148 | extern struct pccard_resource_ops pccard_nonstatic_ops; |
148 | 149 | ||
150 | /* static mem, dynamic IO sockets */ | ||
151 | extern struct pccard_resource_ops pccard_iodyn_ops; | ||
152 | |||
149 | /* | 153 | /* |
150 | * Calls to set up low-level "Socket Services" drivers | 154 | * Calls to set up low-level "Socket Services" drivers |
151 | */ | 155 | */ |
152 | struct pcmcia_socket; | 156 | struct pcmcia_socket; |
153 | 157 | ||
154 | typedef struct io_window_t { | 158 | typedef struct io_window_t { |
155 | u_int Attributes; | ||
156 | kio_addr_t BasePort, NumPorts; | ||
157 | kio_addr_t InUse, Config; | 159 | kio_addr_t InUse, Config; |
158 | struct resource *res; | 160 | struct resource *res; |
159 | } io_window_t; | 161 | } io_window_t; |
@@ -162,7 +164,7 @@ typedef struct io_window_t { | |||
162 | typedef struct window_t { | 164 | typedef struct window_t { |
163 | u_short magic; | 165 | u_short magic; |
164 | u_short index; | 166 | u_short index; |
165 | client_handle_t handle; | 167 | struct pcmcia_device *handle; |
166 | struct pcmcia_socket *sock; | 168 | struct pcmcia_socket *sock; |
167 | pccard_mem_map ctl; | 169 | pccard_mem_map ctl; |
168 | } window_t; | 170 | } window_t; |
@@ -186,7 +188,6 @@ struct pcmcia_socket { | |||
186 | u_short lock_count; | 188 | u_short lock_count; |
187 | pccard_mem_map cis_mem; | 189 | pccard_mem_map cis_mem; |
188 | void __iomem *cis_virt; | 190 | void __iomem *cis_virt; |
189 | struct config_t *config; | ||
190 | struct { | 191 | struct { |
191 | u_int AssignedIRQ; | 192 | u_int AssignedIRQ; |
192 | u_int Config; | 193 | u_int Config; |
@@ -241,7 +242,7 @@ struct pcmcia_socket { | |||
241 | #endif | 242 | #endif |
242 | 243 | ||
243 | /* state thread */ | 244 | /* state thread */ |
244 | struct semaphore skt_sem; /* protects socket h/w state */ | 245 | struct mutex skt_mutex; /* protects socket h/w state */ |
245 | 246 | ||
246 | struct task_struct *thread; | 247 | struct task_struct *thread; |
247 | struct completion thread_done; | 248 | struct completion thread_done; |
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 51ab8eddb295..5ff77558013b 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * Copyright (c) 2004 Infinicon Corporation. All rights reserved. | 3 | * Copyright (c) 2004 Infinicon Corporation. All rights reserved. |
4 | * Copyright (c) 2004 Intel Corporation. All rights reserved. | 4 | * Copyright (c) 2004 Intel Corporation. All rights reserved. |
5 | * Copyright (c) 2004 Topspin Corporation. All rights reserved. | 5 | * Copyright (c) 2004 Topspin Corporation. All rights reserved. |
6 | * Copyright (c) 2004 Voltaire Corporation. All rights reserved. | 6 | * Copyright (c) 2004-2006 Voltaire Corporation. All rights reserved. |
7 | * | 7 | * |
8 | * This software is available to you under a choice of one of two | 8 | * This software is available to you under a choice of one of two |
9 | * licenses. You may choose to be licensed under the terms of the GNU | 9 | * licenses. You may choose to be licensed under the terms of the GNU |
@@ -55,6 +55,10 @@ | |||
55 | #define IB_MGMT_CLASS_DEVICE_MGMT 0x06 | 55 | #define IB_MGMT_CLASS_DEVICE_MGMT 0x06 |
56 | #define IB_MGMT_CLASS_CM 0x07 | 56 | #define IB_MGMT_CLASS_CM 0x07 |
57 | #define IB_MGMT_CLASS_SNMP 0x08 | 57 | #define IB_MGMT_CLASS_SNMP 0x08 |
58 | #define IB_MGMT_CLASS_DEVICE_ADM 0x10 | ||
59 | #define IB_MGMT_CLASS_BOOT_MGMT 0x11 | ||
60 | #define IB_MGMT_CLASS_BIS 0x12 | ||
61 | #define IB_MGMT_CLASS_CONG_MGMT 0x21 | ||
58 | #define IB_MGMT_CLASS_VENDOR_RANGE2_START 0x30 | 62 | #define IB_MGMT_CLASS_VENDOR_RANGE2_START 0x30 |
59 | #define IB_MGMT_CLASS_VENDOR_RANGE2_END 0x4F | 63 | #define IB_MGMT_CLASS_VENDOR_RANGE2_END 0x4F |
60 | 64 | ||
@@ -117,6 +121,8 @@ enum { | |||
117 | IB_MGMT_VENDOR_DATA = 216, | 121 | IB_MGMT_VENDOR_DATA = 216, |
118 | IB_MGMT_SA_HDR = 56, | 122 | IB_MGMT_SA_HDR = 56, |
119 | IB_MGMT_SA_DATA = 200, | 123 | IB_MGMT_SA_DATA = 200, |
124 | IB_MGMT_DEVICE_HDR = 64, | ||
125 | IB_MGMT_DEVICE_DATA = 192, | ||
120 | }; | 126 | }; |
121 | 127 | ||
122 | struct ib_mad_hdr { | 128 | struct ib_mad_hdr { |
@@ -603,6 +609,25 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent, | |||
603 | gfp_t gfp_mask); | 609 | gfp_t gfp_mask); |
604 | 610 | ||
605 | /** | 611 | /** |
612 | * ib_is_mad_class_rmpp - returns whether given management class | ||
613 | * supports RMPP. | ||
614 | * @mgmt_class: management class | ||
615 | * | ||
616 | * This routine returns whether the management class supports RMPP. | ||
617 | */ | ||
618 | int ib_is_mad_class_rmpp(u8 mgmt_class); | ||
619 | |||
620 | /** | ||
621 | * ib_get_mad_data_offset - returns the data offset for a given | ||
622 | * management class. | ||
623 | * @mgmt_class: management class | ||
624 | * | ||
625 | * This routine returns the data offset in the MAD for the management | ||
626 | * class requested. | ||
627 | */ | ||
628 | int ib_get_mad_data_offset(u8 mgmt_class); | ||
629 | |||
630 | /** | ||
606 | * ib_get_rmpp_segment - returns the data buffer for a given RMPP segment. | 631 | * ib_get_rmpp_segment - returns the data buffer for a given RMPP segment. |
607 | * @send_buf: Previously allocated send data buffer. | 632 | * @send_buf: Previously allocated send data buffer. |
608 | * @seg_num: number of segment to return | 633 | * @seg_num: number of segment to return |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index dc6862d09e53..de6ce541a046 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -140,7 +140,6 @@ struct scsi_host_template { | |||
140 | * | 140 | * |
141 | * Status: REQUIRED (at least one of them) | 141 | * Status: REQUIRED (at least one of them) |
142 | */ | 142 | */ |
143 | int (* eh_strategy_handler)(struct Scsi_Host *); | ||
144 | int (* eh_abort_handler)(struct scsi_cmnd *); | 143 | int (* eh_abort_handler)(struct scsi_cmnd *); |
145 | int (* eh_device_reset_handler)(struct scsi_cmnd *); | 144 | int (* eh_device_reset_handler)(struct scsi_cmnd *); |
146 | int (* eh_bus_reset_handler)(struct scsi_cmnd *); | 145 | int (* eh_bus_reset_handler)(struct scsi_cmnd *); |
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index b3657f111937..cca1d4926d2a 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h | |||
@@ -50,6 +50,11 @@ struct scsi_transport_template { | |||
50 | unsigned int create_work_queue : 1; | 50 | unsigned int create_work_queue : 1; |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Allows a transport to override the default error handler. | ||
54 | */ | ||
55 | void (* eh_strategy_handler)(struct Scsi_Host *); | ||
56 | |||
57 | /* | ||
53 | * This is an optional routine that allows the transport to become | 58 | * This is an optional routine that allows the transport to become |
54 | * involved when a scsi io timer fires. The return value tells the | 59 | * involved when a scsi io timer fires. The return value tells the |
55 | * timer routine how to finish the io timeout handling: | 60 | * timer routine how to finish the io timeout handling: |
diff --git a/include/sound/core.h b/include/sound/core.h index 7f32c12b4a0a..5135147f20e8 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -170,13 +170,13 @@ static inline void snd_power_change_state(struct snd_card *card, unsigned int st | |||
170 | } | 170 | } |
171 | 171 | ||
172 | /* init.c */ | 172 | /* init.c */ |
173 | int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file); | 173 | int snd_power_wait(struct snd_card *card, unsigned int power_state); |
174 | 174 | ||
175 | #else /* ! CONFIG_PM */ | 175 | #else /* ! CONFIG_PM */ |
176 | 176 | ||
177 | #define snd_power_lock(card) do { (void)(card); } while (0) | 177 | #define snd_power_lock(card) do { (void)(card); } while (0) |
178 | #define snd_power_unlock(card) do { (void)(card); } while (0) | 178 | #define snd_power_unlock(card) do { (void)(card); } while (0) |
179 | static inline int snd_power_wait(struct snd_card *card, unsigned int state, struct file *file) { return 0; } | 179 | static inline int snd_power_wait(struct snd_card *card, unsigned int state) { return 0; } |
180 | #define snd_power_get_state(card) SNDRV_CTL_POWER_D0 | 180 | #define snd_power_get_state(card) SNDRV_CTL_POWER_D0 |
181 | #define snd_power_change_state(card, state) do { (void)(card); } while (0) | 181 | #define snd_power_change_state(card, state) do { (void)(card); } while (0) |
182 | 182 | ||
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 15b885660bf0..66b1f08b42b9 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -369,6 +369,7 @@ struct snd_pcm_substream { | |||
369 | /* -- assigned files -- */ | 369 | /* -- assigned files -- */ |
370 | struct snd_pcm_file *file; | 370 | struct snd_pcm_file *file; |
371 | struct file *ffile; | 371 | struct file *ffile; |
372 | void (*pcm_release)(struct snd_pcm_substream *); | ||
372 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | 373 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) |
373 | /* -- OSS things -- */ | 374 | /* -- OSS things -- */ |
374 | struct snd_pcm_oss_substream oss; | 375 | struct snd_pcm_oss_substream oss; |
@@ -381,13 +382,10 @@ struct snd_pcm_substream { | |||
381 | struct snd_info_entry *proc_prealloc_entry; | 382 | struct snd_info_entry *proc_prealloc_entry; |
382 | /* misc flags */ | 383 | /* misc flags */ |
383 | unsigned int no_mmap_ctrl: 1; | 384 | unsigned int no_mmap_ctrl: 1; |
385 | unsigned int hw_opened: 1; | ||
384 | }; | 386 | }; |
385 | 387 | ||
386 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | ||
387 | #define SUBSTREAM_BUSY(substream) ((substream)->file != NULL || ((substream)->oss.file != NULL)) | ||
388 | #else | ||
389 | #define SUBSTREAM_BUSY(substream) ((substream)->file != NULL) | 388 | #define SUBSTREAM_BUSY(substream) ((substream)->file != NULL) |
390 | #endif | ||
391 | 389 | ||
392 | 390 | ||
393 | struct snd_pcm_str { | 391 | struct snd_pcm_str { |
@@ -460,7 +458,6 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream, | |||
460 | struct snd_pcm_info __user *info); | 458 | struct snd_pcm_info __user *info); |
461 | int snd_pcm_status(struct snd_pcm_substream *substream, | 459 | int snd_pcm_status(struct snd_pcm_substream *substream, |
462 | struct snd_pcm_status *status); | 460 | struct snd_pcm_status *status); |
463 | int snd_pcm_prepare(struct snd_pcm_substream *substream); | ||
464 | int snd_pcm_start(struct snd_pcm_substream *substream); | 461 | int snd_pcm_start(struct snd_pcm_substream *substream); |
465 | int snd_pcm_stop(struct snd_pcm_substream *substream, int status); | 462 | int snd_pcm_stop(struct snd_pcm_substream *substream, int status); |
466 | int snd_pcm_drain_done(struct snd_pcm_substream *substream); | 463 | int snd_pcm_drain_done(struct snd_pcm_substream *substream); |
@@ -468,11 +465,13 @@ int snd_pcm_drain_done(struct snd_pcm_substream *substream); | |||
468 | int snd_pcm_suspend(struct snd_pcm_substream *substream); | 465 | int snd_pcm_suspend(struct snd_pcm_substream *substream); |
469 | int snd_pcm_suspend_all(struct snd_pcm *pcm); | 466 | int snd_pcm_suspend_all(struct snd_pcm *pcm); |
470 | #endif | 467 | #endif |
471 | int snd_pcm_kernel_playback_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); | ||
472 | int snd_pcm_kernel_capture_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); | ||
473 | int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); | 468 | int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); |
474 | int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct snd_pcm_substream **rsubstream); | 469 | int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct file *file, |
470 | struct snd_pcm_substream **rsubstream); | ||
475 | void snd_pcm_release_substream(struct snd_pcm_substream *substream); | 471 | void snd_pcm_release_substream(struct snd_pcm_substream *substream); |
472 | int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, struct file *file, | ||
473 | struct snd_pcm_substream **rsubstream); | ||
474 | void snd_pcm_detach_substream(struct snd_pcm_substream *substream); | ||
476 | void snd_pcm_vma_notify_data(void *client, void *data); | 475 | void snd_pcm_vma_notify_data(void *client, void *data); |
477 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); | 476 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); |
478 | 477 | ||
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index bff0778e1969..39df2baca18a 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h | |||
@@ -69,8 +69,7 @@ struct snd_pcm_oss_file { | |||
69 | 69 | ||
70 | struct snd_pcm_oss_substream { | 70 | struct snd_pcm_oss_substream { |
71 | unsigned oss: 1; /* oss mode */ | 71 | unsigned oss: 1; /* oss mode */ |
72 | struct snd_pcm_oss_setup *setup; /* active setup */ | 72 | struct snd_pcm_oss_setup setup; /* active setup */ |
73 | struct snd_pcm_oss_file *file; | ||
74 | }; | 73 | }; |
75 | 74 | ||
76 | struct snd_pcm_oss_stream { | 75 | struct snd_pcm_oss_stream { |