diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-10-13 09:43:54 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-10-13 09:43:54 -0400 |
commit | b160292cc216a50fd0cd386b0bda2cd48352c73b (patch) | |
tree | ef07cf98f91353ee4c9ec1e1ca7a2a5d9d4b538a /include | |
parent | b37bde147890c8fea8369a5a4e230dabdea4ebfb (diff) | |
parent | bbf25010f1a6b761914430f5fca081ec8c7accd1 (diff) |
Merge Linux 2.6.23
Diffstat (limited to 'include')
134 files changed, 1558 insertions, 2512 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 3d0fea235bf3..86aea44ce6d4 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -321,8 +321,7 @@ struct acpi_bus_event { | |||
321 | }; | 321 | }; |
322 | 322 | ||
323 | extern struct kset acpi_subsys; | 323 | extern struct kset acpi_subsys; |
324 | extern int acpi_bus_generate_genetlink_event(struct acpi_device *device, | 324 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); |
325 | u8 type, int data); | ||
326 | /* | 325 | /* |
327 | * External Functions | 326 | * External Functions |
328 | */ | 327 | */ |
@@ -332,8 +331,13 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context); | |||
332 | int acpi_bus_get_status(struct acpi_device *device); | 331 | int acpi_bus_get_status(struct acpi_device *device); |
333 | int acpi_bus_get_power(acpi_handle handle, int *state); | 332 | int acpi_bus_get_power(acpi_handle handle, int *state); |
334 | int acpi_bus_set_power(acpi_handle handle, int state); | 333 | int acpi_bus_set_power(acpi_handle handle, int state); |
335 | int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data); | 334 | #ifdef CONFIG_ACPI_PROC_EVENT |
335 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); | ||
336 | int acpi_bus_receive_event(struct acpi_bus_event *event); | 336 | int acpi_bus_receive_event(struct acpi_bus_event *event); |
337 | #else | ||
338 | static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | ||
339 | { return 0; } | ||
340 | #endif | ||
337 | int acpi_bus_register_driver(struct acpi_driver *driver); | 341 | int acpi_bus_register_driver(struct acpi_driver *driver); |
338 | void acpi_bus_unregister_driver(struct acpi_driver *driver); | 342 | void acpi_bus_unregister_driver(struct acpi_driver *driver); |
339 | int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, | 343 | int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 202acb9ff4d0..f85f77a538aa 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -147,10 +147,6 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle) | |||
147 | /*-------------------------------------------------------------------------- | 147 | /*-------------------------------------------------------------------------- |
148 | Suspend/Resume | 148 | Suspend/Resume |
149 | -------------------------------------------------------------------------- */ | 149 | -------------------------------------------------------------------------- */ |
150 | #ifdef CONFIG_ACPI_SLEEP | ||
151 | extern int acpi_sleep_init(void); | 150 | extern int acpi_sleep_init(void); |
152 | #else | ||
153 | static inline int acpi_sleep_init(void) { return 0; } | ||
154 | #endif | ||
155 | 151 | ||
156 | #endif /*__ACPI_DRIVERS_H__*/ | 152 | #endif /*__ACPI_DRIVERS_H__*/ |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index b5cca5daa348..3d7ab9e0c9fe 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -130,7 +130,7 @@ acpi_walk_namespace(acpi_object_type type, | |||
130 | void *context, void **return_value); | 130 | void *context, void **return_value); |
131 | 131 | ||
132 | acpi_status | 132 | acpi_status |
133 | acpi_get_devices(char *HID, | 133 | acpi_get_devices(const char *HID, |
134 | acpi_walk_callback user_function, | 134 | acpi_walk_callback user_function, |
135 | void *context, void **return_value); | 135 | void *context, void **return_value); |
136 | 136 | ||
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h index aeb4498e5e06..88482655407f 100644 --- a/include/acpi/acstruct.h +++ b/include/acpi/acstruct.h | |||
@@ -146,7 +146,7 @@ struct acpi_init_walk_info { | |||
146 | struct acpi_get_devices_info { | 146 | struct acpi_get_devices_info { |
147 | acpi_walk_callback user_function; | 147 | acpi_walk_callback user_function; |
148 | void *context; | 148 | void *context; |
149 | char *hid; | 149 | const char *hid; |
150 | }; | 150 | }; |
151 | 151 | ||
152 | union acpi_aml_operands { | 152 | union acpi_aml_operands { |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index ec3ffdadb4d2..99934a999e66 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -320,6 +320,8 @@ int acpi_processor_power_init(struct acpi_processor *pr, | |||
320 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); | 320 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); |
321 | int acpi_processor_power_exit(struct acpi_processor *pr, | 321 | int acpi_processor_power_exit(struct acpi_processor *pr, |
322 | struct acpi_device *device); | 322 | struct acpi_device *device); |
323 | int acpi_processor_suspend(struct acpi_device * device, pm_message_t state); | ||
324 | int acpi_processor_resume(struct acpi_device * device); | ||
323 | 325 | ||
324 | /* in processor_thermal.c */ | 326 | /* in processor_thermal.c */ |
325 | int acpi_processor_get_limit_info(struct acpi_processor *pr); | 327 | int acpi_processor_get_limit_info(struct acpi_processor *pr); |
diff --git a/include/asm-arm/arch-at91/irqs.h b/include/asm-arm/arch-at91/irqs.h index 1127a3b5e928..70b1216dce5d 100644 --- a/include/asm-arm/arch-at91/irqs.h +++ b/include/asm-arm/arch-at91/irqs.h | |||
@@ -42,4 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | #define NR_IRQS (NR_AIC_IRQS + (5 * 32)) | 43 | #define NR_IRQS (NR_AIC_IRQS + (5 * 32)) |
44 | 44 | ||
45 | /* FIQ is AIC source 0. */ | ||
46 | #define FIQ_START AT91_ID_FIQ | ||
47 | |||
45 | #endif | 48 | #endif |
diff --git a/include/asm-arm/arch-omap/irda.h b/include/asm-arm/arch-omap/irda.h index 345a649ec838..96bb12fab438 100644 --- a/include/asm-arm/arch-omap/irda.h +++ b/include/asm-arm/arch-omap/irda.h | |||
@@ -31,6 +31,7 @@ struct omap_irda_config { | |||
31 | unsigned long src_start; | 31 | unsigned long src_start; |
32 | int tx_trigger; | 32 | int tx_trigger; |
33 | int rx_trigger; | 33 | int rx_trigger; |
34 | int mode; | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | #endif | 37 | #endif |
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index d1294a46c70c..6c1c968b2987 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -426,6 +426,13 @@ static inline void flush_anon_page(struct vm_area_struct *vma, | |||
426 | */ | 426 | */ |
427 | #define flush_icache_page(vma,page) do { } while (0) | 427 | #define flush_icache_page(vma,page) do { } while (0) |
428 | 428 | ||
429 | static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt, | ||
430 | unsigned offset, size_t size) | ||
431 | { | ||
432 | const void *start = (void __force *)virt + offset; | ||
433 | dmac_inv_range(start, start + size); | ||
434 | } | ||
435 | |||
429 | #define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) | 436 | #define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) |
430 | #define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29)) | 437 | #define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29)) |
431 | 438 | ||
diff --git a/include/asm-arm/plat-s3c/map.h b/include/asm-arm/plat-s3c/map.h index 95a82b0e84a1..b84289d32a54 100644 --- a/include/asm-arm/plat-s3c/map.h +++ b/include/asm-arm/plat-s3c/map.h | |||
@@ -30,11 +30,11 @@ | |||
30 | #define S3C_ADDR(x) (S3C_ADDR_BASE + (x)) | 30 | #define S3C_ADDR(x) (S3C_ADDR_BASE + (x)) |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #define S3C_VA_IRQ S3C_ADDR(0x000000000) /* irq controller(s) */ | 33 | #define S3C_VA_IRQ S3C_ADDR(0x00000000) /* irq controller(s) */ |
34 | #define S3C_VA_SYS S3C_ADDR(0x001000000) /* system control */ | 34 | #define S3C_VA_SYS S3C_ADDR(0x00100000) /* system control */ |
35 | #define S3C_VA_MEM S3C_ADDR(0x002000000) /* system control */ | 35 | #define S3C_VA_MEM S3C_ADDR(0x00200000) /* system control */ |
36 | #define S3C_VA_TIMER S3C_ADDR(0x003000000) /* timer block */ | 36 | #define S3C_VA_TIMER S3C_ADDR(0x00300000) /* timer block */ |
37 | #define S3C_VA_WATCHDOG S3C_ADDR(0x004000000) /* watchdog */ | 37 | #define S3C_VA_WATCHDOG S3C_ADDR(0x00400000) /* watchdog */ |
38 | #define S3C_VA_UART S3C_ADDR(0x010000000) /* UART */ | 38 | #define S3C_VA_UART S3C_ADDR(0x01000000) /* UART */ |
39 | 39 | ||
40 | #endif /* __ASM_PLAT_MAP_H */ | 40 | #endif /* __ASM_PLAT_MAP_H */ |
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index e043cafa3c42..69b9f8e120e9 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/serial.h> | 1 | #include <linux/serial.h> |
2 | #include <asm/dma.h> | 2 | #include <asm/dma.h> |
3 | #include <asm/portmux.h> | ||
3 | 4 | ||
4 | #define NR_PORTS 1 | 5 | #define NR_PORTS 1 |
5 | 6 | ||
@@ -92,18 +93,24 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
92 | } | 93 | } |
93 | }; | 94 | }; |
94 | 95 | ||
96 | #define DRIVER_NAME "bfin-uart" | ||
95 | 97 | ||
96 | int nr_ports = NR_PORTS; | 98 | int nr_ports = NR_PORTS; |
97 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) | 99 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) |
98 | { | 100 | { |
99 | 101 | ||
102 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
103 | peripheral_request(P_UART0_TX, DRIVER_NAME); | ||
104 | peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
105 | #endif | ||
106 | |||
100 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | 107 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS |
101 | if (uart->cts_pin >= 0) { | 108 | if (uart->cts_pin >= 0) { |
102 | gpio_request(uart->cts_pin, NULL); | 109 | gpio_request(uart->cts_pin, DRIVER_NAME); |
103 | gpio_direction_input(uart->cts_pin); | 110 | gpio_direction_input(uart->cts_pin); |
104 | } | 111 | } |
105 | if (uart->rts_pin >= 0) { | 112 | if (uart->rts_pin >= 0) { |
106 | gpio_request(uart->rts_pin, NULL); | 113 | gpio_request(uart->rts_pin, DRIVER_NAME); |
107 | gpio_direction_input(uart->rts_pin); | 114 | gpio_direction_input(uart->rts_pin); |
108 | } | 115 | } |
109 | #endif | 116 | #endif |
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h index 8f5d9c4d8d5b..6fb328f5186a 100644 --- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/serial.h> | 1 | #include <linux/serial.h> |
2 | #include <asm/dma.h> | 2 | #include <asm/dma.h> |
3 | #include <asm/portmux.h> | ||
3 | 4 | ||
4 | #define NR_PORTS 2 | 5 | #define NR_PORTS 2 |
5 | 6 | ||
@@ -122,25 +123,29 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
122 | 123 | ||
123 | int nr_ports = ARRAY_SIZE(bfin_serial_resource); | 124 | int nr_ports = ARRAY_SIZE(bfin_serial_resource); |
124 | 125 | ||
126 | #define DRIVER_NAME "bfin-uart" | ||
127 | |||
125 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) | 128 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) |
126 | { | 129 | { |
127 | unsigned short val; | ||
128 | val = bfin_read16(BFIN_PORT_MUX); | ||
129 | val &= ~(PFDE | PFTE); | ||
130 | bfin_write16(BFIN_PORT_MUX, val); | ||
131 | 130 | ||
132 | val = bfin_read16(PORTF_FER); | 131 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
133 | val |= 0xF; | 132 | peripheral_request(P_UART0_TX, DRIVER_NAME); |
134 | bfin_write16(PORTF_FER, val); | 133 | peripheral_request(P_UART0_RX, DRIVER_NAME); |
134 | #endif | ||
135 | |||
136 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
137 | peripheral_request(P_UART1_TX, DRIVER_NAME); | ||
138 | peripheral_request(P_UART1_RX, DRIVER_NAME); | ||
139 | #endif | ||
135 | 140 | ||
136 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | 141 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS |
137 | if (uart->cts_pin >= 0) { | 142 | if (uart->cts_pin >= 0) { |
138 | gpio_request(uart->cts_pin, NULL); | 143 | gpio_request(uart->cts_pin, DRIVER_NAME); |
139 | gpio_direction_input(uart->cts_pin); | 144 | gpio_direction_input(uart->cts_pin); |
140 | } | 145 | } |
141 | 146 | ||
142 | if (uart->rts_pin >= 0) { | 147 | if (uart->rts_pin >= 0) { |
143 | gpio_request(uart->rts_pin, NULL); | 148 | gpio_request(uart->rts_pin, DRIVER_NAME); |
144 | gpio_direction_output(uart->rts_pin); | 149 | gpio_direction_output(uart->rts_pin); |
145 | } | 150 | } |
146 | #endif | 151 | #endif |
diff --git a/include/asm-blackfin/mach-bf537/portmux.h b/include/asm-blackfin/mach-bf537/portmux.h index 23e13c5abc4d..ae6c53b28452 100644 --- a/include/asm-blackfin/mach-bf537/portmux.h +++ b/include/asm-blackfin/mach-bf537/portmux.h | |||
@@ -106,4 +106,37 @@ | |||
106 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1)) | 106 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1)) |
107 | #define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2)) | 107 | #define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2)) |
108 | 108 | ||
109 | #endif /* _MACH_PORTMUX_H_ */ | 109 | #define P_MII0 {\ |
110 | P_MII0_ETxD0, \ | ||
111 | P_MII0_ETxD1, \ | ||
112 | P_MII0_ETxD2, \ | ||
113 | P_MII0_ETxD3, \ | ||
114 | P_MII0_ETxEN, \ | ||
115 | P_MII0_TxCLK, \ | ||
116 | P_MII0_PHYINT, \ | ||
117 | P_MII0_COL, \ | ||
118 | P_MII0_ERxD0, \ | ||
119 | P_MII0_ERxD1, \ | ||
120 | P_MII0_ERxD2, \ | ||
121 | P_MII0_ERxD3, \ | ||
122 | P_MII0_ERxDV, \ | ||
123 | P_MII0_ERxCLK, \ | ||
124 | P_MII0_ERxER, \ | ||
125 | P_MII0_CRS, \ | ||
126 | P_MDC, \ | ||
127 | P_MDIO, 0} | ||
128 | |||
129 | |||
130 | #define P_RMII0 {\ | ||
131 | P_MII0_ETxD0, \ | ||
132 | P_MII0_ETxD1, \ | ||
133 | P_MII0_ETxEN, \ | ||
134 | P_MII0_ERxD0, \ | ||
135 | P_MII0_ERxD1, \ | ||
136 | P_MII0_ERxER, \ | ||
137 | P_RMII0_REF_CLK, \ | ||
138 | P_RMII0_MDINT, \ | ||
139 | P_RMII0_CRS_DV, \ | ||
140 | P_MDC, \ | ||
141 | P_MDIO, 0} | ||
142 | #endif /* _MACH_PORTMUX_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index e043cafa3c42..69b9f8e120e9 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/serial.h> | 1 | #include <linux/serial.h> |
2 | #include <asm/dma.h> | 2 | #include <asm/dma.h> |
3 | #include <asm/portmux.h> | ||
3 | 4 | ||
4 | #define NR_PORTS 1 | 5 | #define NR_PORTS 1 |
5 | 6 | ||
@@ -92,18 +93,24 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
92 | } | 93 | } |
93 | }; | 94 | }; |
94 | 95 | ||
96 | #define DRIVER_NAME "bfin-uart" | ||
95 | 97 | ||
96 | int nr_ports = NR_PORTS; | 98 | int nr_ports = NR_PORTS; |
97 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) | 99 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) |
98 | { | 100 | { |
99 | 101 | ||
102 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
103 | peripheral_request(P_UART0_TX, DRIVER_NAME); | ||
104 | peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
105 | #endif | ||
106 | |||
100 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | 107 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS |
101 | if (uart->cts_pin >= 0) { | 108 | if (uart->cts_pin >= 0) { |
102 | gpio_request(uart->cts_pin, NULL); | 109 | gpio_request(uart->cts_pin, DRIVER_NAME); |
103 | gpio_direction_input(uart->cts_pin); | 110 | gpio_direction_input(uart->cts_pin); |
104 | } | 111 | } |
105 | if (uart->rts_pin >= 0) { | 112 | if (uart->rts_pin >= 0) { |
106 | gpio_request(uart->rts_pin, NULL); | 113 | gpio_request(uart->rts_pin, DRIVER_NAME); |
107 | gpio_direction_input(uart->rts_pin); | 114 | gpio_direction_input(uart->rts_pin); |
108 | } | 115 | } |
109 | #endif | 116 | #endif |
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h index 6e87ab269ffe..73d4d65249cd 100644 --- a/include/asm-blackfin/mach-bf561/cdefBF561.h +++ b/include/asm-blackfin/mach-bf561/cdefBF561.h | |||
@@ -83,9 +83,9 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
83 | 83 | ||
84 | /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ | 84 | /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ |
85 | #define bfin_read_SWRST() bfin_read_SICA_SWRST() | 85 | #define bfin_read_SWRST() bfin_read_SICA_SWRST() |
86 | #define bfin_write_SWRST() bfin_write_SICA_SWRST() | 86 | #define bfin_write_SWRST(val) bfin_write_SICA_SWRST(val) |
87 | #define bfin_read_SYSCR() bfin_read_SICA_SYSCR() | 87 | #define bfin_read_SYSCR() bfin_read_SICA_SYSCR() |
88 | #define bfin_write_SYSCR() bfin_write_SICA_SYSCR() | 88 | #define bfin_write_SYSCR(val) bfin_write_SICA_SYSCR(val) |
89 | 89 | ||
90 | /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ | 90 | /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ |
91 | #define bfin_read_SICA_SWRST() bfin_read16(SICA_SWRST) | 91 | #define bfin_read_SICA_SWRST() bfin_read16(SICA_SWRST) |
diff --git a/include/asm-blackfin/portmux.h b/include/asm-blackfin/portmux.h index 9d3681e42111..0d3f650d2d99 100644 --- a/include/asm-blackfin/portmux.h +++ b/include/asm-blackfin/portmux.h | |||
@@ -14,6 +14,12 @@ | |||
14 | #define P_MAYSHARE 0x2000 | 14 | #define P_MAYSHARE 0x2000 |
15 | #define P_DONTCARE 0x1000 | 15 | #define P_DONTCARE 0x1000 |
16 | 16 | ||
17 | |||
18 | int peripheral_request(unsigned short per, const char *label); | ||
19 | void peripheral_free(unsigned short per); | ||
20 | int peripheral_request_list(unsigned short per[], const char *label); | ||
21 | void peripheral_free_list(unsigned short per[]); | ||
22 | |||
17 | #include <asm/gpio.h> | 23 | #include <asm/gpio.h> |
18 | #include <asm/mach/portmux.h> | 24 | #include <asm/mach/portmux.h> |
19 | 25 | ||
@@ -145,6 +151,22 @@ | |||
145 | #define P_SPI2_SSEL3 P_UNDEF | 151 | #define P_SPI2_SSEL3 P_UNDEF |
146 | #endif | 152 | #endif |
147 | 153 | ||
154 | #ifndef P_SPI2_SSEL4 | ||
155 | #define P_SPI2_SSEL4 P_UNDEF | ||
156 | #endif | ||
157 | |||
158 | #ifndef P_SPI2_SSEL5 | ||
159 | #define P_SPI2_SSEL5 P_UNDEF | ||
160 | #endif | ||
161 | |||
162 | #ifndef P_SPI2_SSEL6 | ||
163 | #define P_SPI2_SSEL6 P_UNDEF | ||
164 | #endif | ||
165 | |||
166 | #ifndef P_SPI2_SSEL7 | ||
167 | #define P_SPI2_SSEL7 P_UNDEF | ||
168 | #endif | ||
169 | |||
148 | #ifndef P_SPI2_SCK | 170 | #ifndef P_SPI2_SCK |
149 | #define P_SPI2_SCK P_UNDEF | 171 | #define P_SPI2_SCK P_UNDEF |
150 | #endif | 172 | #endif |
@@ -513,6 +535,22 @@ | |||
513 | #define P_SPI0_SSEL3 P_UNDEF | 535 | #define P_SPI0_SSEL3 P_UNDEF |
514 | #endif | 536 | #endif |
515 | 537 | ||
538 | #ifndef P_SPI0_SSEL4 | ||
539 | #define P_SPI0_SSEL4 P_UNDEF | ||
540 | #endif | ||
541 | |||
542 | #ifndef P_SPI0_SSEL5 | ||
543 | #define P_SPI0_SSEL5 P_UNDEF | ||
544 | #endif | ||
545 | |||
546 | #ifndef P_SPI0_SSEL6 | ||
547 | #define P_SPI0_SSEL6 P_UNDEF | ||
548 | #endif | ||
549 | |||
550 | #ifndef P_SPI0_SSEL7 | ||
551 | #define P_SPI0_SSEL7 P_UNDEF | ||
552 | #endif | ||
553 | |||
516 | #ifndef P_UART0_TX | 554 | #ifndef P_UART0_TX |
517 | #define P_UART0_TX P_UNDEF | 555 | #define P_UART0_TX P_UNDEF |
518 | #endif | 556 | #endif |
@@ -741,6 +779,23 @@ | |||
741 | #define P_SPI1_SSEL3 P_UNDEF | 779 | #define P_SPI1_SSEL3 P_UNDEF |
742 | #endif | 780 | #endif |
743 | 781 | ||
782 | |||
783 | #ifndef P_SPI1_SSEL4 | ||
784 | #define P_SPI1_SSEL4 P_UNDEF | ||
785 | #endif | ||
786 | |||
787 | #ifndef P_SPI1_SSEL5 | ||
788 | #define P_SPI1_SSEL5 P_UNDEF | ||
789 | #endif | ||
790 | |||
791 | #ifndef P_SPI1_SSEL6 | ||
792 | #define P_SPI1_SSEL6 P_UNDEF | ||
793 | #endif | ||
794 | |||
795 | #ifndef P_SPI1_SSEL7 | ||
796 | #define P_SPI1_SSEL7 P_UNDEF | ||
797 | #endif | ||
798 | |||
744 | #ifndef P_SPI1_SCK | 799 | #ifndef P_SPI1_SCK |
745 | #define P_SPI1_SCK P_UNDEF | 800 | #define P_SPI1_SCK P_UNDEF |
746 | #endif | 801 | #endif |
diff --git a/include/asm-blackfin/string.h b/include/asm-blackfin/string.h index 6f1eb7d6d3cb..e8ada91ab002 100644 --- a/include/asm-blackfin/string.h +++ b/include/asm-blackfin/string.h | |||
@@ -9,13 +9,16 @@ extern inline char *strcpy(char *dest, const char *src) | |||
9 | char *xdest = dest; | 9 | char *xdest = dest; |
10 | char temp = 0; | 10 | char temp = 0; |
11 | 11 | ||
12 | __asm__ __volatile__ | 12 | __asm__ __volatile__ ( |
13 | ("1:\t%2 = B [%1++] (Z);\n\t" | 13 | "1:" |
14 | "B [%0++] = %2;\n\t" | 14 | "%2 = B [%1++] (Z);" |
15 | "CC = %2;\n\t" | 15 | "B [%0++] = %2;" |
16 | "if cc jump 1b (bp);\n" | 16 | "CC = %2;" |
17 | : "+&a" (dest), "+&a" (src), "=&d" (temp) | 17 | "if cc jump 1b (bp);" |
18 | ::"memory", "CC"); | 18 | : "+&a" (dest), "+&a" (src), "=&d" (temp) |
19 | : | ||
20 | : "memory", "CC"); | ||
21 | |||
19 | return xdest; | 22 | return xdest; |
20 | } | 23 | } |
21 | 24 | ||
@@ -28,37 +31,56 @@ extern inline char *strncpy(char *dest, const char *src, size_t n) | |||
28 | if (n == 0) | 31 | if (n == 0) |
29 | return xdest; | 32 | return xdest; |
30 | 33 | ||
31 | __asm__ __volatile__ | 34 | __asm__ __volatile__ ( |
32 | ("1:\t%3 = B [%1++] (Z);\n\t" | 35 | "1:" |
33 | "B [%0++] = %3;\n\t" | 36 | "%3 = B [%1++] (Z);" |
34 | "CC = %3;\n\t" | 37 | "B [%0++] = %3;" |
35 | "if ! cc jump 2f;\n\t" | 38 | "CC = %3;" |
36 | "%2 += -1;\n\t" | 39 | "if ! cc jump 2f;" |
37 | "CC = %2 == 0;\n\t" | 40 | "%2 += -1;" |
38 | "if ! cc jump 1b (bp);\n" | 41 | "CC = %2 == 0;" |
39 | "2:\n" | 42 | "if ! cc jump 1b (bp);" |
40 | : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp) | 43 | "jump 4f;" |
41 | ::"memory", "CC"); | 44 | "2:" |
45 | /* if src is shorter than n, we need to null pad bytes now */ | ||
46 | "%3 = 0;" | ||
47 | "3:" | ||
48 | "%2 += -1;" | ||
49 | "CC = %2 == 0;" | ||
50 | "if cc jump 4f;" | ||
51 | "B [%0++] = %3;" | ||
52 | "jump 3b;" | ||
53 | "4:" | ||
54 | : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp) | ||
55 | : | ||
56 | : "memory", "CC"); | ||
57 | |||
42 | return xdest; | 58 | return xdest; |
43 | } | 59 | } |
44 | 60 | ||
45 | #define __HAVE_ARCH_STRCMP | 61 | #define __HAVE_ARCH_STRCMP |
46 | extern inline int strcmp(const char *cs, const char *ct) | 62 | extern inline int strcmp(const char *cs, const char *ct) |
47 | { | 63 | { |
48 | char __res1, __res2; | 64 | /* need to use int's here so the char's in the assembly don't get |
49 | 65 | * sign extended incorrectly when we don't want them to be | |
50 | __asm__ | 66 | */ |
51 | ("1:\t%2 = B[%0++] (Z);\n\t" /* get *cs */ | 67 | int __res1, __res2; |
52 | "%3 = B[%1++] (Z);\n\t" /* get *ct */ | 68 | |
53 | "CC = %2 == %3;\n\t" /* compare a byte */ | 69 | __asm__ __volatile__ ( |
54 | "if ! cc jump 2f;\n\t" /* not equal, break out */ | 70 | "1:" |
55 | "CC = %2;\n\t" /* at end of cs? */ | 71 | "%2 = B[%0++] (Z);" /* get *cs */ |
56 | "if cc jump 1b (bp);\n\t" /* no, keep going */ | 72 | "%3 = B[%1++] (Z);" /* get *ct */ |
57 | "jump.s 3f;\n" /* strings are equal */ | 73 | "CC = %2 == %3;" /* compare a byte */ |
58 | "2:\t%2 = %2 - %3;\n" /* *cs - *ct */ | 74 | "if ! cc jump 2f;" /* not equal, break out */ |
59 | "3:\n" | 75 | "CC = %2;" /* at end of cs? */ |
60 | : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2) | 76 | "if cc jump 1b (bp);" /* no, keep going */ |
61 | : : "CC"); | 77 | "jump.s 3f;" /* strings are equal */ |
78 | "2:" | ||
79 | "%2 = %2 - %3;" /* *cs - *ct */ | ||
80 | "3:" | ||
81 | : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2) | ||
82 | : | ||
83 | : "memory", "CC"); | ||
62 | 84 | ||
63 | return __res1; | 85 | return __res1; |
64 | } | 86 | } |
@@ -66,26 +88,35 @@ extern inline int strcmp(const char *cs, const char *ct) | |||
66 | #define __HAVE_ARCH_STRNCMP | 88 | #define __HAVE_ARCH_STRNCMP |
67 | extern inline int strncmp(const char *cs, const char *ct, size_t count) | 89 | extern inline int strncmp(const char *cs, const char *ct, size_t count) |
68 | { | 90 | { |
69 | char __res1, __res2; | 91 | /* need to use int's here so the char's in the assembly don't get |
92 | * sign extended incorrectly when we don't want them to be | ||
93 | */ | ||
94 | int __res1, __res2; | ||
70 | 95 | ||
71 | if (!count) | 96 | if (!count) |
72 | return 0; | 97 | return 0; |
73 | __asm__ | 98 | |
74 | ("1:\t%3 = B[%0++] (Z);\n\t" /* get *cs */ | 99 | __asm__ __volatile__ ( |
75 | "%4 = B[%1++] (Z);\n\t" /* get *ct */ | 100 | "1:" |
76 | "CC = %3 == %4;\n\t" /* compare a byte */ | 101 | "%3 = B[%0++] (Z);" /* get *cs */ |
77 | "if ! cc jump 3f;\n\t" /* not equal, break out */ | 102 | "%4 = B[%1++] (Z);" /* get *ct */ |
78 | "CC = %3;\n\t" /* at end of cs? */ | 103 | "CC = %3 == %4;" /* compare a byte */ |
79 | "if ! cc jump 4f;\n\t" /* yes, all done */ | 104 | "if ! cc jump 3f;" /* not equal, break out */ |
80 | "%2 += -1;\n\t" /* no, adjust count */ | 105 | "CC = %3;" /* at end of cs? */ |
81 | "CC = %2 == 0;\n\t" | 106 | "if ! cc jump 4f;" /* yes, all done */ |
82 | "if ! cc jump 1b;\n" /* more to do, keep going */ | 107 | "%2 += -1;" /* no, adjust count */ |
83 | "2:\t%3 = 0;\n\t" /* strings are equal */ | 108 | "CC = %2 == 0;" |
84 | "jump.s 4f;\n" | 109 | "if ! cc jump 1b;" /* more to do, keep going */ |
85 | "3:\t%3 = %3 - %4;\n" /* *cs - *ct */ | 110 | "2:" |
86 | "4:" | 111 | "%3 = 0;" /* strings are equal */ |
87 | : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2) | 112 | "jump.s 4f;" |
88 | : : "CC"); | 113 | "3:" |
114 | "%3 = %3 - %4;" /* *cs - *ct */ | ||
115 | "4:" | ||
116 | : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2) | ||
117 | : | ||
118 | : "memory", "CC"); | ||
119 | |||
89 | return __res1; | 120 | return __res1; |
90 | } | 121 | } |
91 | 122 | ||
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h index 0df9f2d322a3..07ffe8b718c5 100644 --- a/include/asm-blackfin/unistd.h +++ b/include/asm-blackfin/unistd.h | |||
@@ -3,6 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * This file contains the system call numbers. | 4 | * This file contains the system call numbers. |
5 | */ | 5 | */ |
6 | #define __NR_restart_syscall 0 | ||
6 | #define __NR_exit 1 | 7 | #define __NR_exit 1 |
7 | #define __NR_fork 2 | 8 | #define __NR_fork 2 |
8 | #define __NR_read 3 | 9 | #define __NR_read 3 |
@@ -165,13 +166,13 @@ | |||
165 | #define __NR_sched_get_priority_min 160 | 166 | #define __NR_sched_get_priority_min 160 |
166 | #define __NR_sched_rr_get_interval 161 | 167 | #define __NR_sched_rr_get_interval 161 |
167 | #define __NR_nanosleep 162 | 168 | #define __NR_nanosleep 162 |
168 | /* 163 __NR_mremap */ | 169 | #define __NR_mremap 163 |
169 | #define __NR_setresuid 164 | 170 | #define __NR_setresuid 164 |
170 | #define __NR_getresuid 165 | 171 | #define __NR_getresuid 165 |
171 | /* 166 __NR_vm86 */ | 172 | /* 166 __NR_vm86 */ |
172 | /* 167 __NR_query_module */ | 173 | /* 167 __NR_query_module */ |
173 | /* 168 __NR_poll */ | 174 | /* 168 __NR_poll */ |
174 | /* 169 __NR_nfsservctl */ | 175 | #define __NR_nfsservctl 169 |
175 | #define __NR_setresgid 170 | 176 | #define __NR_setresgid 170 |
176 | #define __NR_getresgid 171 | 177 | #define __NR_getresgid 171 |
177 | #define __NR_prctl 172 | 178 | #define __NR_prctl 172 |
@@ -227,7 +228,7 @@ | |||
227 | /* 222 reserved for TUX */ | 228 | /* 222 reserved for TUX */ |
228 | /* 223 reserved for TUX */ | 229 | /* 223 reserved for TUX */ |
229 | #define __NR_gettid 224 | 230 | #define __NR_gettid 224 |
230 | /* 225 __NR_readahead */ | 231 | #define __NR_readahead 225 |
231 | #define __NR_setxattr 226 | 232 | #define __NR_setxattr 226 |
232 | #define __NR_lsetxattr 227 | 233 | #define __NR_lsetxattr 227 |
233 | #define __NR_fsetxattr 228 | 234 | #define __NR_fsetxattr 228 |
@@ -287,7 +288,7 @@ | |||
287 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 288 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
288 | #define __NR_mq_notify (__NR_mq_open+4) | 289 | #define __NR_mq_notify (__NR_mq_open+4) |
289 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 290 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
290 | /* 284 __NR_sys_kexec_load */ | 291 | #define __NR_kexec_load 284 |
291 | #define __NR_waitid 285 | 292 | #define __NR_waitid 285 |
292 | #define __NR_add_key 286 | 293 | #define __NR_add_key 286 |
293 | #define __NR_request_key 287 | 294 | #define __NR_request_key 287 |
@@ -352,9 +353,54 @@ | |||
352 | #define __NR_shmdt 340 | 353 | #define __NR_shmdt 340 |
353 | #define __NR_shmget 341 | 354 | #define __NR_shmget 341 |
354 | 355 | ||
355 | #define __NR_syscall 342 | 356 | #define __NR_splice 342 |
357 | #define __NR_sync_file_range 343 | ||
358 | #define __NR_tee 344 | ||
359 | #define __NR_vmsplice 345 | ||
360 | |||
361 | #define __NR_epoll_pwait 346 | ||
362 | #define __NR_utimensat 347 | ||
363 | #define __NR_signalfd 348 | ||
364 | #define __NR_timerfd 349 | ||
365 | #define __NR_eventfd 350 | ||
366 | #define __NR_pread64 351 | ||
367 | #define __NR_pwrite64 352 | ||
368 | #define __NR_fadvise64 353 | ||
369 | #define __NR_set_robust_list 354 | ||
370 | #define __NR_get_robust_list 355 | ||
371 | #define __NR_fallocate 356 | ||
372 | |||
373 | #define __NR_syscall 357 | ||
356 | #define NR_syscalls __NR_syscall | 374 | #define NR_syscalls __NR_syscall |
357 | 375 | ||
376 | /* Old optional stuff no one actually uses */ | ||
377 | #define __IGNORE_sysfs | ||
378 | #define __IGNORE_uselib | ||
379 | |||
380 | /* Implement the newer interfaces */ | ||
381 | #define __IGNORE_mmap | ||
382 | #define __IGNORE_poll | ||
383 | #define __IGNORE_select | ||
384 | #define __IGNORE_utime | ||
385 | |||
386 | /* Not relevant on no-mmu */ | ||
387 | #define __IGNORE_swapon | ||
388 | #define __IGNORE_swapoff | ||
389 | #define __IGNORE_msync | ||
390 | #define __IGNORE_mlock | ||
391 | #define __IGNORE_munlock | ||
392 | #define __IGNORE_mlockall | ||
393 | #define __IGNORE_munlockall | ||
394 | #define __IGNORE_mincore | ||
395 | #define __IGNORE_madvise | ||
396 | #define __IGNORE_remap_file_pages | ||
397 | #define __IGNORE_mbind | ||
398 | #define __IGNORE_get_mempolicy | ||
399 | #define __IGNORE_set_mempolicy | ||
400 | #define __IGNORE_migrate_pages | ||
401 | #define __IGNORE_move_pages | ||
402 | #define __IGNORE_getcpu | ||
403 | |||
358 | #ifdef __KERNEL__ | 404 | #ifdef __KERNEL__ |
359 | #define __ARCH_WANT_IPC_PARSE_VERSION | 405 | #define __ARCH_WANT_IPC_PARSE_VERSION |
360 | #define __ARCH_WANT_STAT64 | 406 | #define __ARCH_WANT_STAT64 |
diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h index 3769e6bd63b1..33dca30a3c45 100644 --- a/include/asm-generic/termios.h +++ b/include/asm-generic/termios.h | |||
@@ -63,6 +63,8 @@ static inline int kernel_termios_to_user_termio(struct termio __user *termio, | |||
63 | 63 | ||
64 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 64 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) |
65 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 65 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) |
66 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
67 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
66 | 68 | ||
67 | #endif /* __ARCH_TERMIO_GETPUT */ | 69 | #endif /* __ARCH_TERMIO_GETPUT */ |
68 | 70 | ||
diff --git a/include/asm-h8300/flat.h b/include/asm-h8300/flat.h index c20eee767d6f..2a873508a9a1 100644 --- a/include/asm-h8300/flat.h +++ b/include/asm-h8300/flat.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define flat_argvp_envp_on_stack() 1 | 9 | #define flat_argvp_envp_on_stack() 1 |
10 | #define flat_old_ram_flag(flags) 1 | 10 | #define flat_old_ram_flag(flags) 1 |
11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
12 | #define flat_set_persistent(relval, p) 0 | ||
12 | 13 | ||
13 | /* | 14 | /* |
14 | * on the H8 a couple of the relocations have an instruction in the | 15 | * on the H8 a couple of the relocations have an instruction in the |
@@ -18,7 +19,7 @@ | |||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #define flat_get_relocate_addr(rel) (rel) | 21 | #define flat_get_relocate_addr(rel) (rel) |
21 | #define flat_get_addr_from_rp(rp, relval, flags) \ | 22 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) \ |
22 | (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff)) | 23 | (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff)) |
23 | #define flat_put_addr_at_rp(rp, addr, rel) \ | 24 | #define flat_put_addr_at_rp(rp, addr, rel) \ |
24 | put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp) | 25 | put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp) |
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index 7b65b5b00034..e8e0bd641120 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h | |||
@@ -112,6 +112,9 @@ extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsign | |||
112 | * writew/writel functions and the other mmio helpers. The returned | 112 | * writew/writel functions and the other mmio helpers. The returned |
113 | * address is not guaranteed to be usable directly as a virtual | 113 | * address is not guaranteed to be usable directly as a virtual |
114 | * address. | 114 | * address. |
115 | * | ||
116 | * If the area you are trying to map is a PCI BAR you should have a | ||
117 | * look at pci_iomap(). | ||
115 | */ | 118 | */ |
116 | 119 | ||
117 | static inline void __iomem * ioremap(unsigned long offset, unsigned long size) | 120 | static inline void __iomem * ioremap(unsigned long offset, unsigned long size) |
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h index 340764076d5f..dbe734ddf2af 100644 --- a/include/asm-i386/io_apic.h +++ b/include/asm-i386/io_apic.h | |||
@@ -150,7 +150,6 @@ extern int (*ioapic_renumber_irq)(int ioapic, int irq); | |||
150 | 150 | ||
151 | #else /* !CONFIG_X86_IO_APIC */ | 151 | #else /* !CONFIG_X86_IO_APIC */ |
152 | #define io_apic_assign_pci_irqs 0 | 152 | #define io_apic_assign_pci_irqs 0 |
153 | static inline void disable_ioapic_setup(void) { } | ||
154 | #endif | 153 | #endif |
155 | 154 | ||
156 | #endif | 155 | #endif |
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 609756c61676..d69ba937e092 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -214,11 +214,6 @@ static inline unsigned long get_limit(unsigned long segment) | |||
214 | */ | 214 | */ |
215 | 215 | ||
216 | 216 | ||
217 | /* | ||
218 | * Actually only lfence would be needed for mb() because all stores done | ||
219 | * by the kernel should be already ordered. But keep a full barrier for now. | ||
220 | */ | ||
221 | |||
222 | #define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2) | 217 | #define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2) |
223 | #define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2) | 218 | #define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2) |
224 | 219 | ||
diff --git a/include/asm-ia64/hpsim.h b/include/asm-ia64/hpsim.h new file mode 100644 index 000000000000..892ab198a9da --- /dev/null +++ b/include/asm-ia64/hpsim.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef _ASMIA64_HPSIM_H | ||
2 | #define _ASMIA64_HPSIM_H | ||
3 | |||
4 | #ifndef CONFIG_HP_SIMSERIAL_CONSOLE | ||
5 | static inline int simcons_register(void) { return 1; } | ||
6 | #else | ||
7 | int simcons_register(void); | ||
8 | #endif | ||
9 | |||
10 | struct tty_driver; | ||
11 | extern struct tty_driver *hp_simserial_driver; | ||
12 | |||
13 | void ia64_ssc_connect_irq(long intr, long irq); | ||
14 | void ia64_ctl_trace(long on); | ||
15 | |||
16 | #endif | ||
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h index 16adc93d7a72..7caa1f44cd95 100644 --- a/include/asm-ia64/sn/arch.h +++ b/include/asm-ia64/sn/arch.h | |||
@@ -81,5 +81,6 @@ extern u8 sn_sharing_domain_size; | |||
81 | extern u8 sn_region_size; | 81 | extern u8 sn_region_size; |
82 | 82 | ||
83 | extern void sn_flush_all_caches(long addr, long bytes); | 83 | extern void sn_flush_all_caches(long addr, long bytes); |
84 | extern bool sn_cpu_disable_allowed(int cpu); | ||
84 | 85 | ||
85 | #endif /* _ASM_IA64_SN_ARCH_H */ | 86 | #endif /* _ASM_IA64_SN_ARCH_H */ |
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index 12b54ddb06be..e0487aa97418 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.h | |||
@@ -60,6 +60,7 @@ extern u64 sn_intr_alloc(nasid_t, int, | |||
60 | int, nasid_t, int); | 60 | int, nasid_t, int); |
61 | extern void sn_intr_free(nasid_t, int, struct sn_irq_info *); | 61 | extern void sn_intr_free(nasid_t, int, struct sn_irq_info *); |
62 | extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int); | 62 | extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int); |
63 | extern void sn_set_err_irq_affinity(unsigned int); | ||
63 | extern struct list_head **sn_irq_lh; | 64 | extern struct list_head **sn_irq_lh; |
64 | 65 | ||
65 | #define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) | 66 | #define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) |
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h index bfdc36273ed4..8e83ac117ace 100644 --- a/include/asm-ia64/sn/sn_feature_sets.h +++ b/include/asm-ia64/sn/sn_feature_sets.h | |||
@@ -31,6 +31,7 @@ extern int sn_prom_feature_available(int id); | |||
31 | #define PRF_PAL_CACHE_FLUSH_SAFE 0 | 31 | #define PRF_PAL_CACHE_FLUSH_SAFE 0 |
32 | #define PRF_DEVICE_FLUSH_LIST 1 | 32 | #define PRF_DEVICE_FLUSH_LIST 1 |
33 | #define PRF_HOTPLUG_SUPPORT 2 | 33 | #define PRF_HOTPLUG_SUPPORT 2 |
34 | #define PRF_CPU_DISABLE_SUPPORT 3 | ||
34 | 35 | ||
35 | /* --------------------- OS Features -------------------------------*/ | 36 | /* --------------------- OS Features -------------------------------*/ |
36 | 37 | ||
diff --git a/include/asm-m32r/assembler.h b/include/asm-m32r/assembler.h index 47041d19d4a8..26351539b5ff 100644 --- a/include/asm-m32r/assembler.h +++ b/include/asm-m32r/assembler.h | |||
@@ -52,27 +52,27 @@ | |||
52 | .endm | 52 | .endm |
53 | 53 | ||
54 | #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104)) | 54 | #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104)) |
55 | #define STI(reg) STI_M reg | 55 | #define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg |
56 | .macro STI_M reg | 56 | .macro ENABLE_INTERRUPTS reg |
57 | setpsw #0x40 -> nop | 57 | setpsw #0x40 -> nop |
58 | ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). | 58 | ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). |
59 | .endm | 59 | .endm |
60 | 60 | ||
61 | #define CLI(reg) CLI_M reg | 61 | #define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg |
62 | .macro CLI_M reg | 62 | .macro DISABLE_INTERRUPTS reg |
63 | clrpsw #0x40 -> nop | 63 | clrpsw #0x40 -> nop |
64 | ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). | 64 | ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). |
65 | .endm | 65 | .endm |
66 | #else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ | 66 | #else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ |
67 | #define STI(reg) STI_M reg | 67 | #define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg |
68 | .macro STI_M reg | 68 | .macro ENABLE_INTERRUPTS reg |
69 | mvfc \reg, psw | 69 | mvfc \reg, psw |
70 | or3 \reg, \reg, #0x0040 | 70 | or3 \reg, \reg, #0x0040 |
71 | mvtc \reg, psw | 71 | mvtc \reg, psw |
72 | .endm | 72 | .endm |
73 | 73 | ||
74 | #define CLI(reg) CLI_M reg | 74 | #define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg |
75 | .macro CLI_M reg | 75 | .macro DISABLE_INTERRUPTS reg |
76 | mvfc \reg, psw | 76 | mvfc \reg, psw |
77 | and3 \reg, \reg, #0xffbf | 77 | and3 \reg, \reg, #0xffbf |
78 | mvtc \reg, psw | 78 | mvtc \reg, psw |
diff --git a/include/asm-m32r/flat.h b/include/asm-m32r/flat.h index 1b285f65cab6..d851cf0c4aa5 100644 --- a/include/asm-m32r/flat.h +++ b/include/asm-m32r/flat.h | |||
@@ -15,9 +15,10 @@ | |||
15 | #define flat_stack_align(sp) (*sp += (*sp & 3 ? (4 - (*sp & 3)): 0)) | 15 | #define flat_stack_align(sp) (*sp += (*sp & 3 ? (4 - (*sp & 3)): 0)) |
16 | #define flat_argvp_envp_on_stack() 0 | 16 | #define flat_argvp_envp_on_stack() 0 |
17 | #define flat_old_ram_flag(flags) (flags) | 17 | #define flat_old_ram_flag(flags) (flags) |
18 | #define flat_set_persistent(relval, p) 0 | ||
18 | #define flat_reloc_valid(reloc, size) \ | 19 | #define flat_reloc_valid(reloc, size) \ |
19 | (((reloc) - textlen_for_m32r_lo16_data) <= (size)) | 20 | (((reloc) - textlen_for_m32r_lo16_data) <= (size)) |
20 | #define flat_get_addr_from_rp(rp, relval, flags) \ | 21 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) \ |
21 | m32r_flat_get_addr_from_rp(rp, relval, (text_len) ) | 22 | m32r_flat_get_addr_from_rp(rp, relval, (text_len) ) |
22 | 23 | ||
23 | #define flat_put_addr_at_rp(rp, addr, relval) \ | 24 | #define flat_put_addr_at_rp(rp, addr, relval) \ |
diff --git a/include/asm-m32r/m32r.h b/include/asm-m32r/m32r.h index decfc59907c7..214b44b40757 100644 --- a/include/asm-m32r/m32r.h +++ b/include/asm-m32r/m32r.h | |||
@@ -22,12 +22,26 @@ | |||
22 | #include <asm/m32700ut/m32700ut_pld.h> | 22 | #include <asm/m32700ut/m32700ut_pld.h> |
23 | #include <asm/m32700ut/m32700ut_lan.h> | 23 | #include <asm/m32700ut/m32700ut_lan.h> |
24 | #include <asm/m32700ut/m32700ut_lcd.h> | 24 | #include <asm/m32700ut/m32700ut_lcd.h> |
25 | /* for ei_handler:linux/arch/m32r/kernel/entry.S */ | ||
26 | #define M32R_INT1ICU_ISTS PLD_ICUISTS | ||
27 | #define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE | ||
28 | #define M32R_INT0ICU_ISTS M32700UT_LAN_ICUISTS | ||
29 | #define M32R_INT0ICU_IRQ_BASE M32700UT_LAN_PLD_IRQ_BASE | ||
30 | #define M32R_INT2ICU_ISTS M32700UT_LCD_ICUISTS | ||
31 | #define M32R_INT2ICU_IRQ_BASE M32700UT_LCD_PLD_IRQ_BASE | ||
25 | #endif /* CONFIG_PLAT_M32700UT */ | 32 | #endif /* CONFIG_PLAT_M32700UT */ |
26 | 33 | ||
27 | #if defined(CONFIG_PLAT_OPSPUT) | 34 | #if defined(CONFIG_PLAT_OPSPUT) |
28 | #include <asm/opsput/opsput_pld.h> | 35 | #include <asm/opsput/opsput_pld.h> |
29 | #include <asm/opsput/opsput_lan.h> | 36 | #include <asm/opsput/opsput_lan.h> |
30 | #include <asm/opsput/opsput_lcd.h> | 37 | #include <asm/opsput/opsput_lcd.h> |
38 | /* for ei_handler:linux/arch/m32r/kernel/entry.S */ | ||
39 | #define M32R_INT1ICU_ISTS PLD_ICUISTS | ||
40 | #define M32R_INT1ICU_IRQ_BASE OPSPUT_PLD_IRQ_BASE | ||
41 | #define M32R_INT0ICU_ISTS OPSPUT_LAN_ICUISTS | ||
42 | #define M32R_INT0ICU_IRQ_BASE OPSPUT_LAN_PLD_IRQ_BASE | ||
43 | #define M32R_INT2ICU_ISTS OPSPUT_LCD_ICUISTS | ||
44 | #define M32R_INT2ICU_IRQ_BASE OPSPUT_LCD_PLD_IRQ_BASE | ||
31 | #endif /* CONFIG_PLAT_OPSPUT */ | 45 | #endif /* CONFIG_PLAT_OPSPUT */ |
32 | 46 | ||
33 | #if defined(CONFIG_PLAT_MAPPI2) | 47 | #if defined(CONFIG_PLAT_MAPPI2) |
@@ -40,10 +54,16 @@ | |||
40 | 54 | ||
41 | #if defined(CONFIG_PLAT_USRV) | 55 | #if defined(CONFIG_PLAT_USRV) |
42 | #include <asm/m32700ut/m32700ut_pld.h> | 56 | #include <asm/m32700ut/m32700ut_pld.h> |
57 | /* for ei_handler:linux/arch/m32r/kernel/entry.S */ | ||
58 | #define M32R_INT1ICU_ISTS PLD_ICUISTS | ||
59 | #define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE | ||
43 | #endif | 60 | #endif |
44 | 61 | ||
45 | #if defined(CONFIG_PLAT_M32104UT) | 62 | #if defined(CONFIG_PLAT_M32104UT) |
46 | #include <asm/m32104ut/m32104ut_pld.h> | 63 | #include <asm/m32104ut/m32104ut_pld.h> |
64 | /* for ei_handler:linux/arch/m32r/kernel/entry.S */ | ||
65 | #define M32R_INT1ICU_ISTS PLD_ICUISTS | ||
66 | #define M32R_INT1ICU_IRQ_BASE M32104UT_PLD_IRQ_BASE | ||
47 | #endif /* CONFIG_PLAT_M32104 */ | 67 | #endif /* CONFIG_PLAT_M32104 */ |
48 | 68 | ||
49 | /* | 69 | /* |
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index fdbb60e6a0d4..a30fe9c64143 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h | |||
@@ -313,10 +313,20 @@ | |||
313 | #define __NR_tee 308 | 313 | #define __NR_tee 308 |
314 | #define __NR_vmsplice 309 | 314 | #define __NR_vmsplice 309 |
315 | #define __NR_move_pages 310 | 315 | #define __NR_move_pages 310 |
316 | #define __NR_sched_setaffinity 311 | ||
317 | #define __NR_sched_getaffinity 312 | ||
318 | #define __NR_kexec_load 313 | ||
319 | #define __NR_getcpu 314 | ||
320 | #define __NR_epoll_pwait 315 | ||
321 | #define __NR_utimensat 316 | ||
322 | #define __NR_signalfd 317 | ||
323 | #define __NR_timerfd 318 | ||
324 | #define __NR_eventfd 319 | ||
325 | #define __NR_fallocate 320 | ||
316 | 326 | ||
317 | #ifdef __KERNEL__ | 327 | #ifdef __KERNEL__ |
318 | 328 | ||
319 | #define NR_syscalls 311 | 329 | #define NR_syscalls 321 |
320 | 330 | ||
321 | #define __ARCH_WANT_IPC_PARSE_VERSION | 331 | #define __ARCH_WANT_IPC_PARSE_VERSION |
322 | #define __ARCH_WANT_OLD_READDIR | 332 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/include/asm-m68knommu/flat.h b/include/asm-m68knommu/flat.h index 2d836edc4344..814b5174a8e0 100644 --- a/include/asm-m68knommu/flat.h +++ b/include/asm-m68knommu/flat.h | |||
@@ -9,8 +9,9 @@ | |||
9 | #define flat_argvp_envp_on_stack() 1 | 9 | #define flat_argvp_envp_on_stack() 1 |
10 | #define flat_old_ram_flag(flags) (flags) | 10 | #define flat_old_ram_flag(flags) (flags) |
11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
12 | #define flat_get_addr_from_rp(rp, relval, flags) get_unaligned(rp) | 12 | #define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp) |
13 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) | 13 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) |
14 | #define flat_get_relocate_addr(rel) (rel) | 14 | #define flat_get_relocate_addr(rel) (rel) |
15 | #define flat_set_persistent(relval, p) 0 | ||
15 | 16 | ||
16 | #endif /* __M68KNOMMU_FLAT_H__ */ | 17 | #endif /* __M68KNOMMU_FLAT_H__ */ |
diff --git a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h index e1e6a1d2333a..46251016e821 100644 --- a/include/asm-m68knommu/pgtable.h +++ b/include/asm-m68knommu/pgtable.h | |||
@@ -65,4 +65,6 @@ extern unsigned int kobjsize(const void *objp); | |||
65 | #define VMALLOC_START 0 | 65 | #define VMALLOC_START 0 |
66 | #define VMALLOC_END 0xffffffff | 66 | #define VMALLOC_END 0xffffffff |
67 | 67 | ||
68 | #include <asm-generic/pgtable.h> | ||
69 | |||
68 | #endif /* _M68KNOMMU_PGTABLE_H */ | 70 | #endif /* _M68KNOMMU_PGTABLE_H */ |
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h index 82e03195f325..eb1b566793fe 100644 --- a/include/asm-m68knommu/unistd.h +++ b/include/asm-m68knommu/unistd.h | |||
@@ -314,10 +314,20 @@ | |||
314 | #define __NR_tee 308 | 314 | #define __NR_tee 308 |
315 | #define __NR_vmsplice 309 | 315 | #define __NR_vmsplice 309 |
316 | #define __NR_move_pages 310 | 316 | #define __NR_move_pages 310 |
317 | #define __NR_sched_setaffinity 311 | ||
318 | #define __NR_sched_getaffinity 312 | ||
319 | #define __NR_kexec_load 313 | ||
320 | #define __NR_getcpu 314 | ||
321 | #define __NR_epoll_pwait 315 | ||
322 | #define __NR_utimensat 316 | ||
323 | #define __NR_signalfd 317 | ||
324 | #define __NR_timerfd 318 | ||
325 | #define __NR_eventfd 319 | ||
326 | #define __NR_fallocate 320 | ||
317 | 327 | ||
318 | #ifdef __KERNEL__ | 328 | #ifdef __KERNEL__ |
319 | 329 | ||
320 | #define NR_syscalls 311 | 330 | #define NR_syscalls 321 |
321 | 331 | ||
322 | #define __ARCH_WANT_IPC_PARSE_VERSION | 332 | #define __ARCH_WANT_IPC_PARSE_VERSION |
323 | #define __ARCH_WANT_OLD_READDIR | 333 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/include/asm-mips/bcache.h b/include/asm-mips/bcache.h index 3646a3f2ed38..0ba9d6ef76a7 100644 --- a/include/asm-mips/bcache.h +++ b/include/asm-mips/bcache.h | |||
@@ -21,7 +21,6 @@ struct bcache_ops { | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | extern void indy_sc_init(void); | 23 | extern void indy_sc_init(void); |
24 | extern void sni_pcimt_sc_init(void); | ||
25 | 24 | ||
26 | #ifdef CONFIG_BOARD_SCACHE | 25 | #ifdef CONFIG_BOARD_SCACHE |
27 | 26 | ||
diff --git a/include/asm-mips/cmpxchg.h b/include/asm-mips/cmpxchg.h new file mode 100644 index 000000000000..c5b4708e003b --- /dev/null +++ b/include/asm-mips/cmpxchg.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003, 06, 07 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | ||
8 | #ifndef __ASM_CMPXCHG_H | ||
9 | #define __ASM_CMPXCHG_H | ||
10 | |||
11 | #include <linux/irqflags.h> | ||
12 | |||
13 | #define __HAVE_ARCH_CMPXCHG 1 | ||
14 | |||
15 | #define __cmpxchg_asm(ld, st, m, old, new) \ | ||
16 | ({ \ | ||
17 | __typeof(*(m)) __ret; \ | ||
18 | \ | ||
19 | if (cpu_has_llsc && R10000_LLSC_WAR) { \ | ||
20 | __asm__ __volatile__( \ | ||
21 | " .set push \n" \ | ||
22 | " .set noat \n" \ | ||
23 | " .set mips3 \n" \ | ||
24 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ | ||
25 | " bne %0, %z3, 2f \n" \ | ||
26 | " .set mips0 \n" \ | ||
27 | " move $1, %z4 \n" \ | ||
28 | " .set mips3 \n" \ | ||
29 | " " st " $1, %1 \n" \ | ||
30 | " beqzl $1, 1b \n" \ | ||
31 | "2: \n" \ | ||
32 | " .set pop \n" \ | ||
33 | : "=&r" (__ret), "=R" (*m) \ | ||
34 | : "R" (*m), "Jr" (old), "Jr" (new) \ | ||
35 | : "memory"); \ | ||
36 | } else if (cpu_has_llsc) { \ | ||
37 | __asm__ __volatile__( \ | ||
38 | " .set push \n" \ | ||
39 | " .set noat \n" \ | ||
40 | " .set mips3 \n" \ | ||
41 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ | ||
42 | " bne %0, %z3, 2f \n" \ | ||
43 | " .set mips0 \n" \ | ||
44 | " move $1, %z4 \n" \ | ||
45 | " .set mips3 \n" \ | ||
46 | " " st " $1, %1 \n" \ | ||
47 | " beqz $1, 3f \n" \ | ||
48 | "2: \n" \ | ||
49 | " .subsection 2 \n" \ | ||
50 | "3: b 1b \n" \ | ||
51 | " .previous \n" \ | ||
52 | " .set pop \n" \ | ||
53 | : "=&r" (__ret), "=R" (*m) \ | ||
54 | : "R" (*m), "Jr" (old), "Jr" (new) \ | ||
55 | : "memory"); \ | ||
56 | } else { \ | ||
57 | unsigned long __flags; \ | ||
58 | \ | ||
59 | raw_local_irq_save(__flags); \ | ||
60 | __ret = *m; \ | ||
61 | if (__ret == old) \ | ||
62 | *m = new; \ | ||
63 | raw_local_irq_restore(__flags); \ | ||
64 | } \ | ||
65 | \ | ||
66 | __ret; \ | ||
67 | }) | ||
68 | |||
69 | /* | ||
70 | * This function doesn't exist, so you'll get a linker error | ||
71 | * if something tries to do an invalid cmpxchg(). | ||
72 | */ | ||
73 | extern void __cmpxchg_called_with_bad_pointer(void); | ||
74 | |||
75 | #define __cmpxchg(ptr,old,new,barrier) \ | ||
76 | ({ \ | ||
77 | __typeof__(ptr) __ptr = (ptr); \ | ||
78 | __typeof__(*(ptr)) __old = (old); \ | ||
79 | __typeof__(*(ptr)) __new = (new); \ | ||
80 | __typeof__(*(ptr)) __res = 0; \ | ||
81 | \ | ||
82 | barrier; \ | ||
83 | \ | ||
84 | switch (sizeof(*(__ptr))) { \ | ||
85 | case 4: \ | ||
86 | __res = __cmpxchg_asm("ll", "sc", __ptr, __old, __new); \ | ||
87 | break; \ | ||
88 | case 8: \ | ||
89 | if (sizeof(long) == 8) { \ | ||
90 | __res = __cmpxchg_asm("lld", "scd", __ptr, \ | ||
91 | __old, __new); \ | ||
92 | break; \ | ||
93 | } \ | ||
94 | default: \ | ||
95 | __cmpxchg_called_with_bad_pointer(); \ | ||
96 | break; \ | ||
97 | } \ | ||
98 | \ | ||
99 | barrier; \ | ||
100 | \ | ||
101 | __res; \ | ||
102 | }) | ||
103 | |||
104 | #define cmpxchg(ptr, old, new) __cmpxchg(ptr, old, new, smp_llsc_mb()) | ||
105 | #define cmpxchg_local(ptr, old, new) __cmpxchg(ptr, old, new,) | ||
106 | |||
107 | #endif /* __ASM_CMPXCHG_H */ | ||
diff --git a/include/asm-mips/compiler.h b/include/asm-mips/compiler.h index 169ae26105e9..aa6b876bbd78 100644 --- a/include/asm-mips/compiler.h +++ b/include/asm-mips/compiler.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2004 Maciej W. Rozycki | 2 | * Copyright (C) 2004, 2007 Maciej W. Rozycki |
3 | * | 3 | * |
4 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
@@ -9,8 +9,10 @@ | |||
9 | #define _ASM_COMPILER_H | 9 | #define _ASM_COMPILER_H |
10 | 10 | ||
11 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) | 11 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) |
12 | #define GCC_IMM_ASM "n" | ||
12 | #define GCC_REG_ACCUM "$0" | 13 | #define GCC_REG_ACCUM "$0" |
13 | #else | 14 | #else |
15 | #define GCC_IMM_ASM "rn" | ||
14 | #define GCC_REG_ACCUM "accum" | 16 | #define GCC_REG_ACCUM "accum" |
15 | #endif | 17 | #endif |
16 | 18 | ||
diff --git a/include/asm-mips/edac.h b/include/asm-mips/edac.h index 83719eee2d13..4da0c1fe30d9 100644 --- a/include/asm-mips/edac.h +++ b/include/asm-mips/edac.h | |||
@@ -9,8 +9,7 @@ static inline void atomic_scrub(void *va, u32 size) | |||
9 | unsigned long temp; | 9 | unsigned long temp; |
10 | u32 i; | 10 | u32 i; |
11 | 11 | ||
12 | for (i = 0; i < size / sizeof(unsigned long); i++, virt_addr++) { | 12 | for (i = 0; i < size / sizeof(unsigned long); i++) { |
13 | |||
14 | /* | 13 | /* |
15 | * Very carefully read and write to memory atomically | 14 | * Very carefully read and write to memory atomically |
16 | * so we are interrupt, DMA and SMP safe. | 15 | * so we are interrupt, DMA and SMP safe. |
@@ -19,16 +18,16 @@ static inline void atomic_scrub(void *va, u32 size) | |||
19 | */ | 18 | */ |
20 | 19 | ||
21 | __asm__ __volatile__ ( | 20 | __asm__ __volatile__ ( |
22 | " .set mips3 \n" | 21 | " .set mips2 \n" |
23 | "1: ll %0, %1 # atomic_add \n" | 22 | "1: ll %0, %1 # atomic_scrub \n" |
24 | " ll %0, %1 # atomic_add \n" | 23 | " addu %0, $0 \n" |
25 | " addu %0, $0 \n" | 24 | " sc %0, %1 \n" |
26 | " sc %0, %1 \n" | 25 | " beqz %0, 1b \n" |
27 | " beqz %0, 1b \n" | 26 | " .set mips0 \n" |
28 | " .set mips0 \n" | ||
29 | : "=&r" (temp), "=m" (*virt_addr) | 27 | : "=&r" (temp), "=m" (*virt_addr) |
30 | : "m" (*virt_addr)); | 28 | : "m" (*virt_addr)); |
31 | 29 | ||
30 | virt_addr++; | ||
32 | } | 31 | } |
33 | } | 32 | } |
34 | 33 | ||
diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h index 00a50ec1c19f..2a52333a062d 100644 --- a/include/asm-mips/fcntl.h +++ b/include/asm-mips/fcntl.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define O_SYNC 0x0010 | 13 | #define O_SYNC 0x0010 |
14 | #define O_NONBLOCK 0x0080 | 14 | #define O_NONBLOCK 0x0080 |
15 | #define O_CREAT 0x0100 /* not fcntl */ | 15 | #define O_CREAT 0x0100 /* not fcntl */ |
16 | #define O_TRUNC 0x0200 /* not fcntl */ | ||
16 | #define O_EXCL 0x0400 /* not fcntl */ | 17 | #define O_EXCL 0x0400 /* not fcntl */ |
17 | #define O_NOCTTY 0x0800 /* not fcntl */ | 18 | #define O_NOCTTY 0x0800 /* not fcntl */ |
18 | #define FASYNC 0x1000 /* fcntl, for BSD compatibility */ | 19 | #define FASYNC 0x1000 /* fcntl, for BSD compatibility */ |
diff --git a/include/asm-mips/gt64240.h b/include/asm-mips/gt64240.h deleted file mode 100644 index 8f9bd341ed49..000000000000 --- a/include/asm-mips/gt64240.h +++ /dev/null | |||
@@ -1,1235 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright - Galileo technology. | ||
7 | * Copyright (C) 2004 by Ralf Baechle | ||
8 | */ | ||
9 | #ifndef __ASM_MIPS_MV64240_H | ||
10 | #define __ASM_MIPS_MV64240_H | ||
11 | |||
12 | #include <asm/addrspace.h> | ||
13 | #include <asm/marvell.h> | ||
14 | |||
15 | /* | ||
16 | * CPU Control Registers | ||
17 | */ | ||
18 | |||
19 | #define CPU_CONFIGURATION 0x000 | ||
20 | #define CPU_MODE 0x120 | ||
21 | #define CPU_READ_RESPONSE_CROSSBAR_LOW 0x170 | ||
22 | #define CPU_READ_RESPONSE_CROSSBAR_HIGH 0x178 | ||
23 | |||
24 | /* | ||
25 | * Processor Address Space | ||
26 | */ | ||
27 | |||
28 | /* Sdram's BAR'S */ | ||
29 | #define SCS_0_LOW_DECODE_ADDRESS 0x008 | ||
30 | #define SCS_0_HIGH_DECODE_ADDRESS 0x010 | ||
31 | #define SCS_1_LOW_DECODE_ADDRESS 0x208 | ||
32 | #define SCS_1_HIGH_DECODE_ADDRESS 0x210 | ||
33 | #define SCS_2_LOW_DECODE_ADDRESS 0x018 | ||
34 | #define SCS_2_HIGH_DECODE_ADDRESS 0x020 | ||
35 | #define SCS_3_LOW_DECODE_ADDRESS 0x218 | ||
36 | #define SCS_3_HIGH_DECODE_ADDRESS 0x220 | ||
37 | /* Devices BAR'S */ | ||
38 | #define CS_0_LOW_DECODE_ADDRESS 0x028 | ||
39 | #define CS_0_HIGH_DECODE_ADDRESS 0x030 | ||
40 | #define CS_1_LOW_DECODE_ADDRESS 0x228 | ||
41 | #define CS_1_HIGH_DECODE_ADDRESS 0x230 | ||
42 | #define CS_2_LOW_DECODE_ADDRESS 0x248 | ||
43 | #define CS_2_HIGH_DECODE_ADDRESS 0x250 | ||
44 | #define CS_3_LOW_DECODE_ADDRESS 0x038 | ||
45 | #define CS_3_HIGH_DECODE_ADDRESS 0x040 | ||
46 | #define BOOTCS_LOW_DECODE_ADDRESS 0x238 | ||
47 | #define BOOTCS_HIGH_DECODE_ADDRESS 0x240 | ||
48 | |||
49 | #define PCI_0I_O_LOW_DECODE_ADDRESS 0x048 | ||
50 | #define PCI_0I_O_HIGH_DECODE_ADDRESS 0x050 | ||
51 | #define PCI_0MEMORY0_LOW_DECODE_ADDRESS 0x058 | ||
52 | #define PCI_0MEMORY0_HIGH_DECODE_ADDRESS 0x060 | ||
53 | #define PCI_0MEMORY1_LOW_DECODE_ADDRESS 0x080 | ||
54 | #define PCI_0MEMORY1_HIGH_DECODE_ADDRESS 0x088 | ||
55 | #define PCI_0MEMORY2_LOW_DECODE_ADDRESS 0x258 | ||
56 | #define PCI_0MEMORY2_HIGH_DECODE_ADDRESS 0x260 | ||
57 | #define PCI_0MEMORY3_LOW_DECODE_ADDRESS 0x280 | ||
58 | #define PCI_0MEMORY3_HIGH_DECODE_ADDRESS 0x288 | ||
59 | |||
60 | #define PCI_1I_O_LOW_DECODE_ADDRESS 0x090 | ||
61 | #define PCI_1I_O_HIGH_DECODE_ADDRESS 0x098 | ||
62 | #define PCI_1MEMORY0_LOW_DECODE_ADDRESS 0x0a0 | ||
63 | #define PCI_1MEMORY0_HIGH_DECODE_ADDRESS 0x0a8 | ||
64 | #define PCI_1MEMORY1_LOW_DECODE_ADDRESS 0x0b0 | ||
65 | #define PCI_1MEMORY1_HIGH_DECODE_ADDRESS 0x0b8 | ||
66 | #define PCI_1MEMORY2_LOW_DECODE_ADDRESS 0x2a0 | ||
67 | #define PCI_1MEMORY2_HIGH_DECODE_ADDRESS 0x2a8 | ||
68 | #define PCI_1MEMORY3_LOW_DECODE_ADDRESS 0x2b0 | ||
69 | #define PCI_1MEMORY3_HIGH_DECODE_ADDRESS 0x2b8 | ||
70 | |||
71 | #define INTERNAL_SPACE_DECODE 0x068 | ||
72 | |||
73 | #define CPU_0_LOW_DECODE_ADDRESS 0x290 | ||
74 | #define CPU_0_HIGH_DECODE_ADDRESS 0x298 | ||
75 | #define CPU_1_LOW_DECODE_ADDRESS 0x2c0 | ||
76 | #define CPU_1_HIGH_DECODE_ADDRESS 0x2c8 | ||
77 | |||
78 | #define PCI_0I_O_ADDRESS_REMAP 0x0f0 | ||
79 | #define PCI_0MEMORY0_ADDRESS_REMAP 0x0f8 | ||
80 | #define PCI_0MEMORY0_HIGH_ADDRESS_REMAP 0x320 | ||
81 | #define PCI_0MEMORY1_ADDRESS_REMAP 0x100 | ||
82 | #define PCI_0MEMORY1_HIGH_ADDRESS_REMAP 0x328 | ||
83 | #define PCI_0MEMORY2_ADDRESS_REMAP 0x2f8 | ||
84 | #define PCI_0MEMORY2_HIGH_ADDRESS_REMAP 0x330 | ||
85 | #define PCI_0MEMORY3_ADDRESS_REMAP 0x300 | ||
86 | #define PCI_0MEMORY3_HIGH_ADDRESS_REMAP 0x338 | ||
87 | |||
88 | #define PCI_1I_O_ADDRESS_REMAP 0x108 | ||
89 | #define PCI_1MEMORY0_ADDRESS_REMAP 0x110 | ||
90 | #define PCI_1MEMORY0_HIGH_ADDRESS_REMAP 0x340 | ||
91 | #define PCI_1MEMORY1_ADDRESS_REMAP 0x118 | ||
92 | #define PCI_1MEMORY1_HIGH_ADDRESS_REMAP 0x348 | ||
93 | #define PCI_1MEMORY2_ADDRESS_REMAP 0x310 | ||
94 | #define PCI_1MEMORY2_HIGH_ADDRESS_REMAP 0x350 | ||
95 | #define PCI_1MEMORY3_ADDRESS_REMAP 0x318 | ||
96 | #define PCI_1MEMORY3_HIGH_ADDRESS_REMAP 0x358 | ||
97 | |||
98 | /* | ||
99 | * CPU Sync Barrier | ||
100 | */ | ||
101 | |||
102 | #define PCI_0SYNC_BARIER_VIRTUAL_REGISTER 0x0c0 | ||
103 | #define PCI_1SYNC_BARIER_VIRTUAL_REGISTER 0x0c8 | ||
104 | |||
105 | |||
106 | /* | ||
107 | * CPU Access Protect | ||
108 | */ | ||
109 | |||
110 | #define CPU_LOW_PROTECT_ADDRESS_0 0X180 | ||
111 | #define CPU_HIGH_PROTECT_ADDRESS_0 0X188 | ||
112 | #define CPU_LOW_PROTECT_ADDRESS_1 0X190 | ||
113 | #define CPU_HIGH_PROTECT_ADDRESS_1 0X198 | ||
114 | #define CPU_LOW_PROTECT_ADDRESS_2 0X1a0 | ||
115 | #define CPU_HIGH_PROTECT_ADDRESS_2 0X1a8 | ||
116 | #define CPU_LOW_PROTECT_ADDRESS_3 0X1b0 | ||
117 | #define CPU_HIGH_PROTECT_ADDRESS_3 0X1b8 | ||
118 | #define CPU_LOW_PROTECT_ADDRESS_4 0X1c0 | ||
119 | #define CPU_HIGH_PROTECT_ADDRESS_4 0X1c8 | ||
120 | #define CPU_LOW_PROTECT_ADDRESS_5 0X1d0 | ||
121 | #define CPU_HIGH_PROTECT_ADDRESS_5 0X1d8 | ||
122 | #define CPU_LOW_PROTECT_ADDRESS_6 0X1e0 | ||
123 | #define CPU_HIGH_PROTECT_ADDRESS_6 0X1e8 | ||
124 | #define CPU_LOW_PROTECT_ADDRESS_7 0X1f0 | ||
125 | #define CPU_HIGH_PROTECT_ADDRESS_7 0X1f8 | ||
126 | |||
127 | |||
128 | /* | ||
129 | * Snoop Control | ||
130 | */ | ||
131 | |||
132 | #define SNOOP_BASE_ADDRESS_0 0x380 | ||
133 | #define SNOOP_TOP_ADDRESS_0 0x388 | ||
134 | #define SNOOP_BASE_ADDRESS_1 0x390 | ||
135 | #define SNOOP_TOP_ADDRESS_1 0x398 | ||
136 | #define SNOOP_BASE_ADDRESS_2 0x3a0 | ||
137 | #define SNOOP_TOP_ADDRESS_2 0x3a8 | ||
138 | #define SNOOP_BASE_ADDRESS_3 0x3b0 | ||
139 | #define SNOOP_TOP_ADDRESS_3 0x3b8 | ||
140 | |||
141 | /* | ||
142 | * CPU Error Report | ||
143 | */ | ||
144 | |||
145 | #define CPU_ERROR_ADDRESS_LOW 0x070 | ||
146 | #define CPU_ERROR_ADDRESS_HIGH 0x078 | ||
147 | #define CPU_ERROR_DATA_LOW 0x128 | ||
148 | #define CPU_ERROR_DATA_HIGH 0x130 | ||
149 | #define CPU_ERROR_PARITY 0x138 | ||
150 | #define CPU_ERROR_CAUSE 0x140 | ||
151 | #define CPU_ERROR_MASK 0x148 | ||
152 | |||
153 | /* | ||
154 | * Pslave Debug | ||
155 | */ | ||
156 | |||
157 | #define X_0_ADDRESS 0x360 | ||
158 | #define X_0_COMMAND_ID 0x368 | ||
159 | #define X_1_ADDRESS 0x370 | ||
160 | #define X_1_COMMAND_ID 0x378 | ||
161 | #define WRITE_DATA_LOW 0x3c0 | ||
162 | #define WRITE_DATA_HIGH 0x3c8 | ||
163 | #define WRITE_BYTE_ENABLE 0X3e0 | ||
164 | #define READ_DATA_LOW 0x3d0 | ||
165 | #define READ_DATA_HIGH 0x3d8 | ||
166 | #define READ_ID 0x3e8 | ||
167 | |||
168 | |||
169 | /* | ||
170 | * SDRAM and Device Address Space | ||
171 | */ | ||
172 | |||
173 | |||
174 | /* | ||
175 | * SDRAM Configuration | ||
176 | */ | ||
177 | |||
178 | #define SDRAM_CONFIGURATION 0x448 | ||
179 | #define SDRAM_OPERATION_MODE 0x474 | ||
180 | #define SDRAM_ADDRESS_DECODE 0x47C | ||
181 | #define SDRAM_TIMING_PARAMETERS 0x4b4 | ||
182 | #define SDRAM_UMA_CONTROL 0x4a4 | ||
183 | #define SDRAM_CROSS_BAR_CONTROL_LOW 0x4a8 | ||
184 | #define SDRAM_CROSS_BAR_CONTROL_HIGH 0x4ac | ||
185 | #define SDRAM_CROSS_BAR_TIMEOUT 0x4b0 | ||
186 | |||
187 | |||
188 | /* | ||
189 | * SDRAM Parameters | ||
190 | */ | ||
191 | |||
192 | #define SDRAM_BANK0PARAMETERS 0x44C | ||
193 | #define SDRAM_BANK1PARAMETERS 0x450 | ||
194 | #define SDRAM_BANK2PARAMETERS 0x454 | ||
195 | #define SDRAM_BANK3PARAMETERS 0x458 | ||
196 | |||
197 | |||
198 | /* | ||
199 | * SDRAM Error Report | ||
200 | */ | ||
201 | |||
202 | #define SDRAM_ERROR_DATA_LOW 0x484 | ||
203 | #define SDRAM_ERROR_DATA_HIGH 0x480 | ||
204 | #define SDRAM_AND_DEVICE_ERROR_ADDRESS 0x490 | ||
205 | #define SDRAM_RECEIVED_ECC 0x488 | ||
206 | #define SDRAM_CALCULATED_ECC 0x48c | ||
207 | #define SDRAM_ECC_CONTROL 0x494 | ||
208 | #define SDRAM_ECC_ERROR_COUNTER 0x498 | ||
209 | |||
210 | |||
211 | /* | ||
212 | * SDunit Debug (for internal use) | ||
213 | */ | ||
214 | |||
215 | #define X0_ADDRESS 0x500 | ||
216 | #define X0_COMMAND_AND_ID 0x504 | ||
217 | #define X0_WRITE_DATA_LOW 0x508 | ||
218 | #define X0_WRITE_DATA_HIGH 0x50c | ||
219 | #define X0_WRITE_BYTE_ENABLE 0x518 | ||
220 | #define X0_READ_DATA_LOW 0x510 | ||
221 | #define X0_READ_DATA_HIGH 0x514 | ||
222 | #define X0_READ_ID 0x51c | ||
223 | #define X1_ADDRESS 0x520 | ||
224 | #define X1_COMMAND_AND_ID 0x524 | ||
225 | #define X1_WRITE_DATA_LOW 0x528 | ||
226 | #define X1_WRITE_DATA_HIGH 0x52c | ||
227 | #define X1_WRITE_BYTE_ENABLE 0x538 | ||
228 | #define X1_READ_DATA_LOW 0x530 | ||
229 | #define X1_READ_DATA_HIGH 0x534 | ||
230 | #define X1_READ_ID 0x53c | ||
231 | #define X0_SNOOP_ADDRESS 0x540 | ||
232 | #define X0_SNOOP_COMMAND 0x544 | ||
233 | #define X1_SNOOP_ADDRESS 0x548 | ||
234 | #define X1_SNOOP_COMMAND 0x54c | ||
235 | |||
236 | |||
237 | /* | ||
238 | * Device Parameters | ||
239 | */ | ||
240 | |||
241 | #define DEVICE_BANK0PARAMETERS 0x45c | ||
242 | #define DEVICE_BANK1PARAMETERS 0x460 | ||
243 | #define DEVICE_BANK2PARAMETERS 0x464 | ||
244 | #define DEVICE_BANK3PARAMETERS 0x468 | ||
245 | #define DEVICE_BOOT_BANK_PARAMETERS 0x46c | ||
246 | #define DEVICE_CONTROL 0x4c0 | ||
247 | #define DEVICE_CROSS_BAR_CONTROL_LOW 0x4c8 | ||
248 | #define DEVICE_CROSS_BAR_CONTROL_HIGH 0x4cc | ||
249 | #define DEVICE_CROSS_BAR_TIMEOUT 0x4c4 | ||
250 | |||
251 | |||
252 | /* | ||
253 | * Device Interrupt | ||
254 | */ | ||
255 | |||
256 | #define DEVICE_INTERRUPT_CAUSE 0x4d0 | ||
257 | #define DEVICE_INTERRUPT_MASK 0x4d4 | ||
258 | #define DEVICE_ERROR_ADDRESS 0x4d8 | ||
259 | |||
260 | /* | ||
261 | * DMA Record | ||
262 | */ | ||
263 | |||
264 | #define CHANNEL0_DMA_BYTE_COUNT 0x800 | ||
265 | #define CHANNEL1_DMA_BYTE_COUNT 0x804 | ||
266 | #define CHANNEL2_DMA_BYTE_COUNT 0x808 | ||
267 | #define CHANNEL3_DMA_BYTE_COUNT 0x80C | ||
268 | #define CHANNEL4_DMA_BYTE_COUNT 0x900 | ||
269 | #define CHANNEL5_DMA_BYTE_COUNT 0x904 | ||
270 | #define CHANNEL6_DMA_BYTE_COUNT 0x908 | ||
271 | #define CHANNEL7_DMA_BYTE_COUNT 0x90C | ||
272 | #define CHANNEL0_DMA_SOURCE_ADDRESS 0x810 | ||
273 | #define CHANNEL1_DMA_SOURCE_ADDRESS 0x814 | ||
274 | #define CHANNEL2_DMA_SOURCE_ADDRESS 0x818 | ||
275 | #define CHANNEL3_DMA_SOURCE_ADDRESS 0x81C | ||
276 | #define CHANNEL4_DMA_SOURCE_ADDRESS 0x910 | ||
277 | #define CHANNEL5_DMA_SOURCE_ADDRESS 0x914 | ||
278 | #define CHANNEL6_DMA_SOURCE_ADDRESS 0x918 | ||
279 | #define CHANNEL7_DMA_SOURCE_ADDRESS 0x91C | ||
280 | #define CHANNEL0_DMA_DESTINATION_ADDRESS 0x820 | ||
281 | #define CHANNEL1_DMA_DESTINATION_ADDRESS 0x824 | ||
282 | #define CHANNEL2_DMA_DESTINATION_ADDRESS 0x828 | ||
283 | #define CHANNEL3_DMA_DESTINATION_ADDRESS 0x82C | ||
284 | #define CHANNEL4_DMA_DESTINATION_ADDRESS 0x920 | ||
285 | #define CHANNEL5_DMA_DESTINATION_ADDRESS 0x924 | ||
286 | #define CHANNEL6_DMA_DESTINATION_ADDRESS 0x928 | ||
287 | #define CHANNEL7_DMA_DESTINATION_ADDRESS 0x92C | ||
288 | #define CHANNEL0NEXT_RECORD_POINTER 0x830 | ||
289 | #define CHANNEL1NEXT_RECORD_POINTER 0x834 | ||
290 | #define CHANNEL2NEXT_RECORD_POINTER 0x838 | ||
291 | #define CHANNEL3NEXT_RECORD_POINTER 0x83C | ||
292 | #define CHANNEL4NEXT_RECORD_POINTER 0x930 | ||
293 | #define CHANNEL5NEXT_RECORD_POINTER 0x934 | ||
294 | #define CHANNEL6NEXT_RECORD_POINTER 0x938 | ||
295 | #define CHANNEL7NEXT_RECORD_POINTER 0x93C | ||
296 | #define CHANNEL0CURRENT_DESCRIPTOR_POINTER 0x870 | ||
297 | #define CHANNEL1CURRENT_DESCRIPTOR_POINTER 0x874 | ||
298 | #define CHANNEL2CURRENT_DESCRIPTOR_POINTER 0x878 | ||
299 | #define CHANNEL3CURRENT_DESCRIPTOR_POINTER 0x87C | ||
300 | #define CHANNEL4CURRENT_DESCRIPTOR_POINTER 0x970 | ||
301 | #define CHANNEL5CURRENT_DESCRIPTOR_POINTER 0x974 | ||
302 | #define CHANNEL6CURRENT_DESCRIPTOR_POINTER 0x978 | ||
303 | #define CHANNEL7CURRENT_DESCRIPTOR_POINTER 0x97C | ||
304 | #define CHANNEL0_DMA_SOURCE_HIGH_PCI_ADDRESS 0x890 | ||
305 | #define CHANNEL1_DMA_SOURCE_HIGH_PCI_ADDRESS 0x894 | ||
306 | #define CHANNEL2_DMA_SOURCE_HIGH_PCI_ADDRESS 0x898 | ||
307 | #define CHANNEL3_DMA_SOURCE_HIGH_PCI_ADDRESS 0x89c | ||
308 | #define CHANNEL4_DMA_SOURCE_HIGH_PCI_ADDRESS 0x990 | ||
309 | #define CHANNEL5_DMA_SOURCE_HIGH_PCI_ADDRESS 0x994 | ||
310 | #define CHANNEL6_DMA_SOURCE_HIGH_PCI_ADDRESS 0x998 | ||
311 | #define CHANNEL7_DMA_SOURCE_HIGH_PCI_ADDRESS 0x99c | ||
312 | #define CHANNEL0_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x8a0 | ||
313 | #define CHANNEL1_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x8a4 | ||
314 | #define CHANNEL2_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x8a8 | ||
315 | #define CHANNEL3_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x8ac | ||
316 | #define CHANNEL4_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x9a0 | ||
317 | #define CHANNEL5_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x9a4 | ||
318 | #define CHANNEL6_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x9a8 | ||
319 | #define CHANNEL7_DMA_DESTINATION_HIGH_PCI_ADDRESS 0x9ac | ||
320 | #define CHANNEL0_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x8b0 | ||
321 | #define CHANNEL1_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x8b4 | ||
322 | #define CHANNEL2_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x8b8 | ||
323 | #define CHANNEL3_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x8bc | ||
324 | #define CHANNEL4_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x9b0 | ||
325 | #define CHANNEL5_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x9b4 | ||
326 | #define CHANNEL6_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x9b8 | ||
327 | #define CHANNEL7_DMA_NEXT_RECORD_POINTER_HIGH_PCI_ADDRESS 0x9bc | ||
328 | |||
329 | /* | ||
330 | * DMA Channel Control | ||
331 | */ | ||
332 | |||
333 | #define CHANNEL0CONTROL 0x840 | ||
334 | #define CHANNEL0CONTROL_HIGH 0x880 | ||
335 | |||
336 | #define CHANNEL1CONTROL 0x844 | ||
337 | #define CHANNEL1CONTROL_HIGH 0x884 | ||
338 | |||
339 | #define CHANNEL2CONTROL 0x848 | ||
340 | #define CHANNEL2CONTROL_HIGH 0x888 | ||
341 | |||
342 | #define CHANNEL3CONTROL 0x84C | ||
343 | #define CHANNEL3CONTROL_HIGH 0x88C | ||
344 | |||
345 | #define CHANNEL4CONTROL 0x940 | ||
346 | #define CHANNEL4CONTROL_HIGH 0x980 | ||
347 | |||
348 | #define CHANNEL5CONTROL 0x944 | ||
349 | #define CHANNEL5CONTROL_HIGH 0x984 | ||
350 | |||
351 | #define CHANNEL6CONTROL 0x948 | ||
352 | #define CHANNEL6CONTROL_HIGH 0x988 | ||
353 | |||
354 | #define CHANNEL7CONTROL 0x94C | ||
355 | #define CHANNEL7CONTROL_HIGH 0x98C | ||
356 | |||
357 | |||
358 | /* | ||
359 | * DMA Arbiter | ||
360 | */ | ||
361 | |||
362 | #define ARBITER_CONTROL_0_3 0x860 | ||
363 | #define ARBITER_CONTROL_4_7 0x960 | ||
364 | |||
365 | |||
366 | /* | ||
367 | * DMA Interrupt | ||
368 | */ | ||
369 | |||
370 | #define CHANELS0_3_INTERRUPT_CAUSE 0x8c0 | ||
371 | #define CHANELS0_3_INTERRUPT_MASK 0x8c4 | ||
372 | #define CHANELS0_3_ERROR_ADDRESS 0x8c8 | ||
373 | #define CHANELS0_3_ERROR_SELECT 0x8cc | ||
374 | #define CHANELS4_7_INTERRUPT_CAUSE 0x9c0 | ||
375 | #define CHANELS4_7_INTERRUPT_MASK 0x9c4 | ||
376 | #define CHANELS4_7_ERROR_ADDRESS 0x9c8 | ||
377 | #define CHANELS4_7_ERROR_SELECT 0x9cc | ||
378 | |||
379 | |||
380 | /* | ||
381 | * DMA Debug (for internal use) | ||
382 | */ | ||
383 | |||
384 | #define DMA_X0_ADDRESS 0x8e0 | ||
385 | #define DMA_X0_COMMAND_AND_ID 0x8e4 | ||
386 | #define DMA_X0_WRITE_DATA_LOW 0x8e8 | ||
387 | #define DMA_X0_WRITE_DATA_HIGH 0x8ec | ||
388 | #define DMA_X0_WRITE_BYTE_ENABLE 0x8f8 | ||
389 | #define DMA_X0_READ_DATA_LOW 0x8f0 | ||
390 | #define DMA_X0_READ_DATA_HIGH 0x8f4 | ||
391 | #define DMA_X0_READ_ID 0x8fc | ||
392 | #define DMA_X1_ADDRESS 0x9e0 | ||
393 | #define DMA_X1_COMMAND_AND_ID 0x9e4 | ||
394 | #define DMA_X1_WRITE_DATA_LOW 0x9e8 | ||
395 | #define DMA_X1_WRITE_DATA_HIGH 0x9ec | ||
396 | #define DMA_X1_WRITE_BYTE_ENABLE 0x9f8 | ||
397 | #define DMA_X1_READ_DATA_LOW 0x9f0 | ||
398 | #define DMA_X1_READ_DATA_HIGH 0x9f4 | ||
399 | #define DMA_X1_READ_ID 0x9fc | ||
400 | |||
401 | /* | ||
402 | * Timer_Counter | ||
403 | */ | ||
404 | |||
405 | #define TIMER_COUNTER0 0x850 | ||
406 | #define TIMER_COUNTER1 0x854 | ||
407 | #define TIMER_COUNTER2 0x858 | ||
408 | #define TIMER_COUNTER3 0x85C | ||
409 | #define TIMER_COUNTER_0_3_CONTROL 0x864 | ||
410 | #define TIMER_COUNTER_0_3_INTERRUPT_CAUSE 0x868 | ||
411 | #define TIMER_COUNTER_0_3_INTERRUPT_MASK 0x86c | ||
412 | #define TIMER_COUNTER4 0x950 | ||
413 | #define TIMER_COUNTER5 0x954 | ||
414 | #define TIMER_COUNTER6 0x958 | ||
415 | #define TIMER_COUNTER7 0x95C | ||
416 | #define TIMER_COUNTER_4_7_CONTROL 0x964 | ||
417 | #define TIMER_COUNTER_4_7_INTERRUPT_CAUSE 0x968 | ||
418 | #define TIMER_COUNTER_4_7_INTERRUPT_MASK 0x96c | ||
419 | |||
420 | /* | ||
421 | * PCI Slave Address Decoding | ||
422 | */ | ||
423 | |||
424 | #define PCI_0SCS_0_BANK_SIZE 0xc08 | ||
425 | #define PCI_1SCS_0_BANK_SIZE 0xc88 | ||
426 | #define PCI_0SCS_1_BANK_SIZE 0xd08 | ||
427 | #define PCI_1SCS_1_BANK_SIZE 0xd88 | ||
428 | #define PCI_0SCS_2_BANK_SIZE 0xc0c | ||
429 | #define PCI_1SCS_2_BANK_SIZE 0xc8c | ||
430 | #define PCI_0SCS_3_BANK_SIZE 0xd0c | ||
431 | #define PCI_1SCS_3_BANK_SIZE 0xd8c | ||
432 | #define PCI_0CS_0_BANK_SIZE 0xc10 | ||
433 | #define PCI_1CS_0_BANK_SIZE 0xc90 | ||
434 | #define PCI_0CS_1_BANK_SIZE 0xd10 | ||
435 | #define PCI_1CS_1_BANK_SIZE 0xd90 | ||
436 | #define PCI_0CS_2_BANK_SIZE 0xd18 | ||
437 | #define PCI_1CS_2_BANK_SIZE 0xd98 | ||
438 | #define PCI_0CS_3_BANK_SIZE 0xc14 | ||
439 | #define PCI_1CS_3_BANK_SIZE 0xc94 | ||
440 | #define PCI_0CS_BOOT_BANK_SIZE 0xd14 | ||
441 | #define PCI_1CS_BOOT_BANK_SIZE 0xd94 | ||
442 | #define PCI_0P2P_MEM0_BAR_SIZE 0xd1c | ||
443 | #define PCI_1P2P_MEM0_BAR_SIZE 0xd9c | ||
444 | #define PCI_0P2P_MEM1_BAR_SIZE 0xd20 | ||
445 | #define PCI_1P2P_MEM1_BAR_SIZE 0xda0 | ||
446 | #define PCI_0P2P_I_O_BAR_SIZE 0xd24 | ||
447 | #define PCI_1P2P_I_O_BAR_SIZE 0xda4 | ||
448 | #define PCI_0CPU_BAR_SIZE 0xd28 | ||
449 | #define PCI_1CPU_BAR_SIZE 0xda8 | ||
450 | #define PCI_0DAC_SCS_0_BANK_SIZE 0xe00 | ||
451 | #define PCI_1DAC_SCS_0_BANK_SIZE 0xe80 | ||
452 | #define PCI_0DAC_SCS_1_BANK_SIZE 0xe04 | ||
453 | #define PCI_1DAC_SCS_1_BANK_SIZE 0xe84 | ||
454 | #define PCI_0DAC_SCS_2_BANK_SIZE 0xe08 | ||
455 | #define PCI_1DAC_SCS_2_BANK_SIZE 0xe88 | ||
456 | #define PCI_0DAC_SCS_3_BANK_SIZE 0xe0c | ||
457 | #define PCI_1DAC_SCS_3_BANK_SIZE 0xe8c | ||
458 | #define PCI_0DAC_CS_0_BANK_SIZE 0xe10 | ||
459 | #define PCI_1DAC_CS_0_BANK_SIZE 0xe90 | ||
460 | #define PCI_0DAC_CS_1_BANK_SIZE 0xe14 | ||
461 | #define PCI_1DAC_CS_1_BANK_SIZE 0xe94 | ||
462 | #define PCI_0DAC_CS_2_BANK_SIZE 0xe18 | ||
463 | #define PCI_1DAC_CS_2_BANK_SIZE 0xe98 | ||
464 | #define PCI_0DAC_CS_3_BANK_SIZE 0xe1c | ||
465 | #define PCI_1DAC_CS_3_BANK_SIZE 0xe9c | ||
466 | #define PCI_0DAC_BOOTCS_BANK_SIZE 0xe20 | ||
467 | #define PCI_1DAC_BOOTCS_BANK_SIZE 0xea0 | ||
468 | #define PCI_0DAC_P2P_MEM0_BAR_SIZE 0xe24 | ||
469 | #define PCI_1DAC_P2P_MEM0_BAR_SIZE 0xea4 | ||
470 | #define PCI_0DAC_P2P_MEM1_BAR_SIZE 0xe28 | ||
471 | #define PCI_1DAC_P2P_MEM1_BAR_SIZE 0xea8 | ||
472 | #define PCI_0DAC_CPU_BAR_SIZE 0xe2c | ||
473 | #define PCI_1DAC_CPU_BAR_SIZE 0xeac | ||
474 | #define PCI_0EXPANSION_ROM_BAR_SIZE 0xd2c | ||
475 | #define PCI_1EXPANSION_ROM_BAR_SIZE 0xdac | ||
476 | #define PCI_0BASE_ADDRESS_REGISTERS_ENABLE 0xc3c | ||
477 | #define PCI_1BASE_ADDRESS_REGISTERS_ENABLE 0xcbc | ||
478 | #define PCI_0SCS_0_BASE_ADDRESS_REMAP 0xc48 | ||
479 | #define PCI_1SCS_0_BASE_ADDRESS_REMAP 0xcc8 | ||
480 | #define PCI_0SCS_1_BASE_ADDRESS_REMAP 0xd48 | ||
481 | #define PCI_1SCS_1_BASE_ADDRESS_REMAP 0xdc8 | ||
482 | #define PCI_0SCS_2_BASE_ADDRESS_REMAP 0xc4c | ||
483 | #define PCI_1SCS_2_BASE_ADDRESS_REMAP 0xccc | ||
484 | #define PCI_0SCS_3_BASE_ADDRESS_REMAP 0xd4c | ||
485 | #define PCI_1SCS_3_BASE_ADDRESS_REMAP 0xdcc | ||
486 | #define PCI_0CS_0_BASE_ADDRESS_REMAP 0xc50 | ||
487 | #define PCI_1CS_0_BASE_ADDRESS_REMAP 0xcd0 | ||
488 | #define PCI_0CS_1_BASE_ADDRESS_REMAP 0xd50 | ||
489 | #define PCI_1CS_1_BASE_ADDRESS_REMAP 0xdd0 | ||
490 | #define PCI_0CS_2_BASE_ADDRESS_REMAP 0xd58 | ||
491 | #define PCI_1CS_2_BASE_ADDRESS_REMAP 0xdd8 | ||
492 | #define PCI_0CS_3_BASE_ADDRESS_REMAP 0xc54 | ||
493 | #define PCI_1CS_3_BASE_ADDRESS_REMAP 0xcd4 | ||
494 | #define PCI_0CS_BOOTCS_BASE_ADDRESS_REMAP 0xd54 | ||
495 | #define PCI_1CS_BOOTCS_BASE_ADDRESS_REMAP 0xdd4 | ||
496 | #define PCI_0P2P_MEM0_BASE_ADDRESS_REMAP_LOW 0xd5c | ||
497 | #define PCI_1P2P_MEM0_BASE_ADDRESS_REMAP_LOW 0xddc | ||
498 | #define PCI_0P2P_MEM0_BASE_ADDRESS_REMAP_HIGH 0xd60 | ||
499 | #define PCI_1P2P_MEM0_BASE_ADDRESS_REMAP_HIGH 0xde0 | ||
500 | #define PCI_0P2P_MEM1_BASE_ADDRESS_REMAP_LOW 0xd64 | ||
501 | #define PCI_1P2P_MEM1_BASE_ADDRESS_REMAP_LOW 0xde4 | ||
502 | #define PCI_0P2P_MEM1_BASE_ADDRESS_REMAP_HIGH 0xd68 | ||
503 | #define PCI_1P2P_MEM1_BASE_ADDRESS_REMAP_HIGH 0xde8 | ||
504 | #define PCI_0P2P_I_O_BASE_ADDRESS_REMAP 0xd6c | ||
505 | #define PCI_1P2P_I_O_BASE_ADDRESS_REMAP 0xdec | ||
506 | #define PCI_0CPU_BASE_ADDRESS_REMAP 0xd70 | ||
507 | #define PCI_1CPU_BASE_ADDRESS_REMAP 0xdf0 | ||
508 | #define PCI_0DAC_SCS_0_BASE_ADDRESS_REMAP 0xf00 | ||
509 | #define PCI_1DAC_SCS_0_BASE_ADDRESS_REMAP 0xff0 | ||
510 | #define PCI_0DAC_SCS_1_BASE_ADDRESS_REMAP 0xf04 | ||
511 | #define PCI_1DAC_SCS_1_BASE_ADDRESS_REMAP 0xf84 | ||
512 | #define PCI_0DAC_SCS_2_BASE_ADDRESS_REMAP 0xf08 | ||
513 | #define PCI_1DAC_SCS_2_BASE_ADDRESS_REMAP 0xf88 | ||
514 | #define PCI_0DAC_SCS_3_BASE_ADDRESS_REMAP 0xf0c | ||
515 | #define PCI_1DAC_SCS_3_BASE_ADDRESS_REMAP 0xf8c | ||
516 | #define PCI_0DAC_CS_0_BASE_ADDRESS_REMAP 0xf10 | ||
517 | #define PCI_1DAC_CS_0_BASE_ADDRESS_REMAP 0xf90 | ||
518 | #define PCI_0DAC_CS_1_BASE_ADDRESS_REMAP 0xf14 | ||
519 | #define PCI_1DAC_CS_1_BASE_ADDRESS_REMAP 0xf94 | ||
520 | #define PCI_0DAC_CS_2_BASE_ADDRESS_REMAP 0xf18 | ||
521 | #define PCI_1DAC_CS_2_BASE_ADDRESS_REMAP 0xf98 | ||
522 | #define PCI_0DAC_CS_3_BASE_ADDRESS_REMAP 0xf1c | ||
523 | #define PCI_1DAC_CS_3_BASE_ADDRESS_REMAP 0xf9c | ||
524 | #define PCI_0DAC_BOOTCS_BASE_ADDRESS_REMAP 0xf20 | ||
525 | #define PCI_1DAC_BOOTCS_BASE_ADDRESS_REMAP 0xfa0 | ||
526 | #define PCI_0DAC_P2P_MEM0_BASE_ADDRESS_REMAP_LOW 0xf24 | ||
527 | #define PCI_1DAC_P2P_MEM0_BASE_ADDRESS_REMAP_LOW 0xfa4 | ||
528 | #define PCI_0DAC_P2P_MEM0_BASE_ADDRESS_REMAP_HIGH 0xf28 | ||
529 | #define PCI_1DAC_P2P_MEM0_BASE_ADDRESS_REMAP_HIGH 0xfa8 | ||
530 | #define PCI_0DAC_P2P_MEM1_BASE_ADDRESS_REMAP_LOW 0xf2c | ||
531 | #define PCI_1DAC_P2P_MEM1_BASE_ADDRESS_REMAP_LOW 0xfac | ||
532 | #define PCI_0DAC_P2P_MEM1_BASE_ADDRESS_REMAP_HIGH 0xf30 | ||
533 | #define PCI_1DAC_P2P_MEM1_BASE_ADDRESS_REMAP_HIGH 0xfb0 | ||
534 | #define PCI_0DAC_CPU_BASE_ADDRESS_REMAP 0xf34 | ||
535 | #define PCI_1DAC_CPU_BASE_ADDRESS_REMAP 0xfb4 | ||
536 | #define PCI_0EXPANSION_ROM_BASE_ADDRESS_REMAP 0xf38 | ||
537 | #define PCI_1EXPANSION_ROM_BASE_ADDRESS_REMAP 0xfb8 | ||
538 | #define PCI_0ADDRESS_DECODE_CONTROL 0xd3c | ||
539 | #define PCI_1ADDRESS_DECODE_CONTROL 0xdbc | ||
540 | |||
541 | /* | ||
542 | * PCI Control | ||
543 | */ | ||
544 | |||
545 | #define PCI_0COMMAND 0xc00 | ||
546 | #define PCI_1COMMAND 0xc80 | ||
547 | #define PCI_0MODE 0xd00 | ||
548 | #define PCI_1MODE 0xd80 | ||
549 | #define PCI_0TIMEOUT_RETRY 0xc04 | ||
550 | #define PCI_1TIMEOUT_RETRY 0xc84 | ||
551 | #define PCI_0READ_BUFFER_DISCARD_TIMER 0xd04 | ||
552 | #define PCI_1READ_BUFFER_DISCARD_TIMER 0xd84 | ||
553 | #define MSI_0TRIGGER_TIMER 0xc38 | ||
554 | #define MSI_1TRIGGER_TIMER 0xcb8 | ||
555 | #define PCI_0ARBITER_CONTROL 0x1d00 | ||
556 | #define PCI_1ARBITER_CONTROL 0x1d80 | ||
557 | /* changing untill here */ | ||
558 | #define PCI_0CROSS_BAR_CONTROL_LOW 0x1d08 | ||
559 | #define PCI_0CROSS_BAR_CONTROL_HIGH 0x1d0c | ||
560 | #define PCI_0CROSS_BAR_TIMEOUT 0x1d04 | ||
561 | #define PCI_0READ_RESPONSE_CROSS_BAR_CONTROL_LOW 0x1d18 | ||
562 | #define PCI_0READ_RESPONSE_CROSS_BAR_CONTROL_HIGH 0x1d1c | ||
563 | #define PCI_0SYNC_BARRIER_VIRTUAL_REGISTER 0x1d10 | ||
564 | #define PCI_0P2P_CONFIGURATION 0x1d14 | ||
565 | #define PCI_0ACCESS_CONTROL_BASE_0_LOW 0x1e00 | ||
566 | #define PCI_0ACCESS_CONTROL_BASE_0_HIGH 0x1e04 | ||
567 | #define PCI_0ACCESS_CONTROL_TOP_0 0x1e08 | ||
568 | #define PCI_0ACCESS_CONTROL_BASE_1_LOW 0c1e10 | ||
569 | #define PCI_0ACCESS_CONTROL_BASE_1_HIGH 0x1e14 | ||
570 | #define PCI_0ACCESS_CONTROL_TOP_1 0x1e18 | ||
571 | #define PCI_0ACCESS_CONTROL_BASE_2_LOW 0c1e20 | ||
572 | #define PCI_0ACCESS_CONTROL_BASE_2_HIGH 0x1e24 | ||
573 | #define PCI_0ACCESS_CONTROL_TOP_2 0x1e28 | ||
574 | #define PCI_0ACCESS_CONTROL_BASE_3_LOW 0c1e30 | ||
575 | #define PCI_0ACCESS_CONTROL_BASE_3_HIGH 0x1e34 | ||
576 | #define PCI_0ACCESS_CONTROL_TOP_3 0x1e38 | ||
577 | #define PCI_0ACCESS_CONTROL_BASE_4_LOW 0c1e40 | ||
578 | #define PCI_0ACCESS_CONTROL_BASE_4_HIGH 0x1e44 | ||
579 | #define PCI_0ACCESS_CONTROL_TOP_4 0x1e48 | ||
580 | #define PCI_0ACCESS_CONTROL_BASE_5_LOW 0c1e50 | ||
581 | #define PCI_0ACCESS_CONTROL_BASE_5_HIGH 0x1e54 | ||
582 | #define PCI_0ACCESS_CONTROL_TOP_5 0x1e58 | ||
583 | #define PCI_0ACCESS_CONTROL_BASE_6_LOW 0c1e60 | ||
584 | #define PCI_0ACCESS_CONTROL_BASE_6_HIGH 0x1e64 | ||
585 | #define PCI_0ACCESS_CONTROL_TOP_6 0x1e68 | ||
586 | #define PCI_0ACCESS_CONTROL_BASE_7_LOW 0c1e70 | ||
587 | #define PCI_0ACCESS_CONTROL_BASE_7_HIGH 0x1e74 | ||
588 | #define PCI_0ACCESS_CONTROL_TOP_7 0x1e78 | ||
589 | #define PCI_1CROSS_BAR_CONTROL_LOW 0x1d88 | ||
590 | #define PCI_1CROSS_BAR_CONTROL_HIGH 0x1d8c | ||
591 | #define PCI_1CROSS_BAR_TIMEOUT 0x1d84 | ||
592 | #define PCI_1READ_RESPONSE_CROSS_BAR_CONTROL_LOW 0x1d98 | ||
593 | #define PCI_1READ_RESPONSE_CROSS_BAR_CONTROL_HIGH 0x1d9c | ||
594 | #define PCI_1SYNC_BARRIER_VIRTUAL_REGISTER 0x1d90 | ||
595 | #define PCI_1P2P_CONFIGURATION 0x1d94 | ||
596 | #define PCI_1ACCESS_CONTROL_BASE_0_LOW 0x1e80 | ||
597 | #define PCI_1ACCESS_CONTROL_BASE_0_HIGH 0x1e84 | ||
598 | #define PCI_1ACCESS_CONTROL_TOP_0 0x1e88 | ||
599 | #define PCI_1ACCESS_CONTROL_BASE_1_LOW 0c1e90 | ||
600 | #define PCI_1ACCESS_CONTROL_BASE_1_HIGH 0x1e94 | ||
601 | #define PCI_1ACCESS_CONTROL_TOP_1 0x1e98 | ||
602 | #define PCI_1ACCESS_CONTROL_BASE_2_LOW 0c1ea0 | ||
603 | #define PCI_1ACCESS_CONTROL_BASE_2_HIGH 0x1ea4 | ||
604 | #define PCI_1ACCESS_CONTROL_TOP_2 0x1ea8 | ||
605 | #define PCI_1ACCESS_CONTROL_BASE_3_LOW 0c1eb0 | ||
606 | #define PCI_1ACCESS_CONTROL_BASE_3_HIGH 0x1eb4 | ||
607 | #define PCI_1ACCESS_CONTROL_TOP_3 0x1eb8 | ||
608 | #define PCI_1ACCESS_CONTROL_BASE_4_LOW 0c1ec0 | ||
609 | #define PCI_1ACCESS_CONTROL_BASE_4_HIGH 0x1ec4 | ||
610 | #define PCI_1ACCESS_CONTROL_TOP_4 0x1ec8 | ||
611 | #define PCI_1ACCESS_CONTROL_BASE_5_LOW 0c1ed0 | ||
612 | #define PCI_1ACCESS_CONTROL_BASE_5_HIGH 0x1ed4 | ||
613 | #define PCI_1ACCESS_CONTROL_TOP_5 0x1ed8 | ||
614 | #define PCI_1ACCESS_CONTROL_BASE_6_LOW 0c1ee0 | ||
615 | #define PCI_1ACCESS_CONTROL_BASE_6_HIGH 0x1ee4 | ||
616 | #define PCI_1ACCESS_CONTROL_TOP_6 0x1ee8 | ||
617 | #define PCI_1ACCESS_CONTROL_BASE_7_LOW 0c1ef0 | ||
618 | #define PCI_1ACCESS_CONTROL_BASE_7_HIGH 0x1ef4 | ||
619 | #define PCI_1ACCESS_CONTROL_TOP_7 0x1ef8 | ||
620 | |||
621 | /* | ||
622 | * PCI Snoop Control | ||
623 | */ | ||
624 | |||
625 | #define PCI_0SNOOP_CONTROL_BASE_0_LOW 0x1f00 | ||
626 | #define PCI_0SNOOP_CONTROL_BASE_0_HIGH 0x1f04 | ||
627 | #define PCI_0SNOOP_CONTROL_TOP_0 0x1f08 | ||
628 | #define PCI_0SNOOP_CONTROL_BASE_1_0_LOW 0x1f10 | ||
629 | #define PCI_0SNOOP_CONTROL_BASE_1_0_HIGH 0x1f14 | ||
630 | #define PCI_0SNOOP_CONTROL_TOP_1 0x1f18 | ||
631 | #define PCI_0SNOOP_CONTROL_BASE_2_0_LOW 0x1f20 | ||
632 | #define PCI_0SNOOP_CONTROL_BASE_2_0_HIGH 0x1f24 | ||
633 | #define PCI_0SNOOP_CONTROL_TOP_2 0x1f28 | ||
634 | #define PCI_0SNOOP_CONTROL_BASE_3_0_LOW 0x1f30 | ||
635 | #define PCI_0SNOOP_CONTROL_BASE_3_0_HIGH 0x1f34 | ||
636 | #define PCI_0SNOOP_CONTROL_TOP_3 0x1f38 | ||
637 | #define PCI_1SNOOP_CONTROL_BASE_0_LOW 0x1f80 | ||
638 | #define PCI_1SNOOP_CONTROL_BASE_0_HIGH 0x1f84 | ||
639 | #define PCI_1SNOOP_CONTROL_TOP_0 0x1f88 | ||
640 | #define PCI_1SNOOP_CONTROL_BASE_1_0_LOW 0x1f90 | ||
641 | #define PCI_1SNOOP_CONTROL_BASE_1_0_HIGH 0x1f94 | ||
642 | #define PCI_1SNOOP_CONTROL_TOP_1 0x1f98 | ||
643 | #define PCI_1SNOOP_CONTROL_BASE_2_0_LOW 0x1fa0 | ||
644 | #define PCI_1SNOOP_CONTROL_BASE_2_0_HIGH 0x1fa4 | ||
645 | #define PCI_1SNOOP_CONTROL_TOP_2 0x1fa8 | ||
646 | #define PCI_1SNOOP_CONTROL_BASE_3_0_LOW 0x1fb0 | ||
647 | #define PCI_1SNOOP_CONTROL_BASE_3_0_HIGH 0x1fb4 | ||
648 | #define PCI_1SNOOP_CONTROL_TOP_3 0x1fb8 | ||
649 | |||
650 | /* | ||
651 | * PCI Configuration Address | ||
652 | */ | ||
653 | |||
654 | #define PCI_0CONFIGURATION_ADDRESS 0xcf8 | ||
655 | #define PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER 0xcfc | ||
656 | #define PCI_1CONFIGURATION_ADDRESS 0xc78 | ||
657 | #define PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER 0xc7c | ||
658 | #define PCI_0INTERRUPT_ACKNOWLEDGE_VIRTUAL_REGISTER 0xc34 | ||
659 | #define PCI_1INTERRUPT_ACKNOWLEDGE_VIRTUAL_REGISTER 0xcb4 | ||
660 | |||
661 | /* | ||
662 | * PCI Error Report | ||
663 | */ | ||
664 | |||
665 | #define PCI_0SERR_MASK 0xc28 | ||
666 | #define PCI_0ERROR_ADDRESS_LOW 0x1d40 | ||
667 | #define PCI_0ERROR_ADDRESS_HIGH 0x1d44 | ||
668 | #define PCI_0ERROR_DATA_LOW 0x1d48 | ||
669 | #define PCI_0ERROR_DATA_HIGH 0x1d4c | ||
670 | #define PCI_0ERROR_COMMAND 0x1d50 | ||
671 | #define PCI_0ERROR_CAUSE 0x1d58 | ||
672 | #define PCI_0ERROR_MASK 0x1d5c | ||
673 | |||
674 | #define PCI_1SERR_MASK 0xca8 | ||
675 | #define PCI_1ERROR_ADDRESS_LOW 0x1dc0 | ||
676 | #define PCI_1ERROR_ADDRESS_HIGH 0x1dc4 | ||
677 | #define PCI_1ERROR_DATA_LOW 0x1dc8 | ||
678 | #define PCI_1ERROR_DATA_HIGH 0x1dcc | ||
679 | #define PCI_1ERROR_COMMAND 0x1dd0 | ||
680 | #define PCI_1ERROR_CAUSE 0x1dd8 | ||
681 | #define PCI_1ERROR_MASK 0x1ddc | ||
682 | |||
683 | |||
684 | /* | ||
685 | * Lslave Debug (for internal use) | ||
686 | */ | ||
687 | |||
688 | #define L_SLAVE_X0_ADDRESS 0x1d20 | ||
689 | #define L_SLAVE_X0_COMMAND_AND_ID 0x1d24 | ||
690 | #define L_SLAVE_X1_ADDRESS 0x1d28 | ||
691 | #define L_SLAVE_X1_COMMAND_AND_ID 0x1d2c | ||
692 | #define L_SLAVE_WRITE_DATA_LOW 0x1d30 | ||
693 | #define L_SLAVE_WRITE_DATA_HIGH 0x1d34 | ||
694 | #define L_SLAVE_WRITE_BYTE_ENABLE 0x1d60 | ||
695 | #define L_SLAVE_READ_DATA_LOW 0x1d38 | ||
696 | #define L_SLAVE_READ_DATA_HIGH 0x1d3c | ||
697 | #define L_SLAVE_READ_ID 0x1d64 | ||
698 | |||
699 | #if 0 /* Disabled because PCI_* namespace belongs to PCI subsystem ... */ | ||
700 | |||
701 | /* | ||
702 | * PCI Configuration Function 0 | ||
703 | */ | ||
704 | |||
705 | #define PCI_DEVICE_AND_VENDOR_ID 0x000 | ||
706 | #define PCI_STATUS_AND_COMMAND 0x004 | ||
707 | #define PCI_CLASS_CODE_AND_REVISION_ID 0x008 | ||
708 | #define PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE 0x00C | ||
709 | #define PCI_SCS_0_BASE_ADDRESS 0x010 | ||
710 | #define PCI_SCS_1_BASE_ADDRESS 0x014 | ||
711 | #define PCI_SCS_2_BASE_ADDRESS 0x018 | ||
712 | #define PCI_SCS_3_BASE_ADDRESS 0x01C | ||
713 | #define PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS 0x020 | ||
714 | #define PCI_INTERNAL_REGISTERS_I_OMAPPED_BASE_ADDRESS 0x024 | ||
715 | #define PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID 0x02C | ||
716 | #define PCI_EXPANSION_ROM_BASE_ADDRESS_REGISTER 0x030 | ||
717 | #define PCI_CAPABILTY_LIST_POINTER 0x034 | ||
718 | #define PCI_INTERRUPT_PIN_AND_LINE 0x03C | ||
719 | #define PCI_POWER_MANAGEMENT_CAPABILITY 0x040 | ||
720 | #define PCI_POWER_MANAGEMENT_STATUS_AND_CONTROL 0x044 | ||
721 | #define PCI_VPD_ADDRESS 0x048 | ||
722 | #define PCI_VPD_DATA 0X04c | ||
723 | #define PCI_MSI_MESSAGE_CONTROL 0x050 | ||
724 | #define PCI_MSI_MESSAGE_ADDRESS 0x054 | ||
725 | #define PCI_MSI_MESSAGE_UPPER_ADDRESS 0x058 | ||
726 | #define PCI_MSI_MESSAGE_DATA 0x05c | ||
727 | #define PCI_COMPACT_PCI_HOT_SWAP_CAPABILITY 0x058 | ||
728 | |||
729 | /* | ||
730 | * PCI Configuration Function 1 | ||
731 | */ | ||
732 | |||
733 | #define PCI_CS_0_BASE_ADDRESS 0x110 | ||
734 | #define PCI_CS_1_BASE_ADDRESS 0x114 | ||
735 | #define PCI_CS_2_BASE_ADDRESS 0x118 | ||
736 | #define PCI_CS_3_BASE_ADDRESS 0x11c | ||
737 | #define PCI_BOOTCS_BASE_ADDRESS 0x120 | ||
738 | |||
739 | /* | ||
740 | * PCI Configuration Function 2 | ||
741 | */ | ||
742 | |||
743 | #define PCI_P2P_MEM0_BASE_ADDRESS 0x210 | ||
744 | #define PCI_P2P_MEM1_BASE_ADDRESS 0x214 | ||
745 | #define PCI_P2P_I_O_BASE_ADDRESS 0x218 | ||
746 | #define PCI_CPU_BASE_ADDRESS 0x21c | ||
747 | |||
748 | /* | ||
749 | * PCI Configuration Function 4 | ||
750 | */ | ||
751 | |||
752 | #define PCI_DAC_SCS_0_BASE_ADDRESS_LOW 0x410 | ||
753 | #define PCI_DAC_SCS_0_BASE_ADDRESS_HIGH 0x414 | ||
754 | #define PCI_DAC_SCS_1_BASE_ADDRESS_LOW 0x418 | ||
755 | #define PCI_DAC_SCS_1_BASE_ADDRESS_HIGH 0x41c | ||
756 | #define PCI_DAC_P2P_MEM0_BASE_ADDRESS_LOW 0x420 | ||
757 | #define PCI_DAC_P2P_MEM0_BASE_ADDRESS_HIGH 0x424 | ||
758 | |||
759 | |||
760 | /* | ||
761 | * PCI Configuration Function 5 | ||
762 | */ | ||
763 | |||
764 | #define PCI_DAC_SCS_2_BASE_ADDRESS_LOW 0x510 | ||
765 | #define PCI_DAC_SCS_2_BASE_ADDRESS_HIGH 0x514 | ||
766 | #define PCI_DAC_SCS_3_BASE_ADDRESS_LOW 0x518 | ||
767 | #define PCI_DAC_SCS_3_BASE_ADDRESS_HIGH 0x51c | ||
768 | #define PCI_DAC_P2P_MEM1_BASE_ADDRESS_LOW 0x520 | ||
769 | #define PCI_DAC_P2P_MEM1_BASE_ADDRESS_HIGH 0x524 | ||
770 | |||
771 | |||
772 | /* | ||
773 | * PCI Configuration Function 6 | ||
774 | */ | ||
775 | |||
776 | #define PCI_DAC_CS_0_BASE_ADDRESS_LOW 0x610 | ||
777 | #define PCI_DAC_CS_0_BASE_ADDRESS_HIGH 0x614 | ||
778 | #define PCI_DAC_CS_1_BASE_ADDRESS_LOW 0x618 | ||
779 | #define PCI_DAC_CS_1_BASE_ADDRESS_HIGH 0x61c | ||
780 | #define PCI_DAC_CS_2_BASE_ADDRESS_LOW 0x620 | ||
781 | #define PCI_DAC_CS_2_BASE_ADDRESS_HIGH 0x624 | ||
782 | |||
783 | /* | ||
784 | * PCI Configuration Function 7 | ||
785 | */ | ||
786 | |||
787 | #define PCI_DAC_CS_3_BASE_ADDRESS_LOW 0x710 | ||
788 | #define PCI_DAC_CS_3_BASE_ADDRESS_HIGH 0x714 | ||
789 | #define PCI_DAC_BOOTCS_BASE_ADDRESS_LOW 0x718 | ||
790 | #define PCI_DAC_BOOTCS_BASE_ADDRESS_HIGH 0x71c | ||
791 | #define PCI_DAC_CPU_BASE_ADDRESS_LOW 0x720 | ||
792 | #define PCI_DAC_CPU_BASE_ADDRESS_HIGH 0x724 | ||
793 | #endif | ||
794 | |||
795 | /* | ||
796 | * Interrupts | ||
797 | */ | ||
798 | |||
799 | #define LOW_INTERRUPT_CAUSE_REGISTER 0xc18 | ||
800 | #define HIGH_INTERRUPT_CAUSE_REGISTER 0xc68 | ||
801 | #define CPU_INTERRUPT_MASK_REGISTER_LOW 0xc1c | ||
802 | #define CPU_INTERRUPT_MASK_REGISTER_HIGH 0xc6c | ||
803 | #define CPU_SELECT_CAUSE_REGISTER 0xc70 | ||
804 | #define PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW 0xc24 | ||
805 | #define PCI_0INTERRUPT_CAUSE_MASK_REGISTER_HIGH 0xc64 | ||
806 | #define PCI_0SELECT_CAUSE 0xc74 | ||
807 | #define PCI_1INTERRUPT_CAUSE_MASK_REGISTER_LOW 0xca4 | ||
808 | #define PCI_1INTERRUPT_CAUSE_MASK_REGISTER_HIGH 0xce4 | ||
809 | #define PCI_1SELECT_CAUSE 0xcf4 | ||
810 | #define CPU_INT_0_MASK 0xe60 | ||
811 | #define CPU_INT_1_MASK 0xe64 | ||
812 | #define CPU_INT_2_MASK 0xe68 | ||
813 | #define CPU_INT_3_MASK 0xe6c | ||
814 | |||
815 | /* | ||
816 | * I20 Support registers | ||
817 | */ | ||
818 | |||
819 | #define INBOUND_MESSAGE_REGISTER0_PCI0_SIDE 0x010 | ||
820 | #define INBOUND_MESSAGE_REGISTER1_PCI0_SIDE 0x014 | ||
821 | #define OUTBOUND_MESSAGE_REGISTER0_PCI0_SIDE 0x018 | ||
822 | #define OUTBOUND_MESSAGE_REGISTER1_PCI0_SIDE 0x01C | ||
823 | #define INBOUND_DOORBELL_REGISTER_PCI0_SIDE 0x020 | ||
824 | #define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI0_SIDE 0x024 | ||
825 | #define INBOUND_INTERRUPT_MASK_REGISTER_PCI0_SIDE 0x028 | ||
826 | #define OUTBOUND_DOORBELL_REGISTER_PCI0_SIDE 0x02C | ||
827 | #define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI0_SIDE 0x030 | ||
828 | #define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI0_SIDE 0x034 | ||
829 | #define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI0_SIDE 0x040 | ||
830 | #define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI0_SIDE 0x044 | ||
831 | #define QUEUE_CONTROL_REGISTER_PCI0_SIDE 0x050 | ||
832 | #define QUEUE_BASE_ADDRESS_REGISTER_PCI0_SIDE 0x054 | ||
833 | #define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI0_SIDE 0x060 | ||
834 | #define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI0_SIDE 0x064 | ||
835 | #define INBOUND_POST_HEAD_POINTER_REGISTER_PCI0_SIDE 0x068 | ||
836 | #define INBOUND_POST_TAIL_POINTER_REGISTER_PCI0_SIDE 0x06C | ||
837 | #define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI0_SIDE 0x070 | ||
838 | #define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI0_SIDE 0x074 | ||
839 | #define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI0_SIDE 0x0F8 | ||
840 | #define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI0_SIDE 0x0FC | ||
841 | |||
842 | #define INBOUND_MESSAGE_REGISTER0_PCI1_SIDE 0x090 | ||
843 | #define INBOUND_MESSAGE_REGISTER1_PCI1_SIDE 0x094 | ||
844 | #define OUTBOUND_MESSAGE_REGISTER0_PCI1_SIDE 0x098 | ||
845 | #define OUTBOUND_MESSAGE_REGISTER1_PCI1_SIDE 0x09C | ||
846 | #define INBOUND_DOORBELL_REGISTER_PCI1_SIDE 0x0A0 | ||
847 | #define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI1_SIDE 0x0A4 | ||
848 | #define INBOUND_INTERRUPT_MASK_REGISTER_PCI1_SIDE 0x0A8 | ||
849 | #define OUTBOUND_DOORBELL_REGISTER_PCI1_SIDE 0x0AC | ||
850 | #define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI1_SIDE 0x0B0 | ||
851 | #define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI1_SIDE 0x0B4 | ||
852 | #define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI1_SIDE 0x0C0 | ||
853 | #define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI1_SIDE 0x0C4 | ||
854 | #define QUEUE_CONTROL_REGISTER_PCI1_SIDE 0x0D0 | ||
855 | #define QUEUE_BASE_ADDRESS_REGISTER_PCI1_SIDE 0x0D4 | ||
856 | #define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI1_SIDE 0x0E0 | ||
857 | #define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI1_SIDE 0x0E4 | ||
858 | #define INBOUND_POST_HEAD_POINTER_REGISTER_PCI1_SIDE 0x0E8 | ||
859 | #define INBOUND_POST_TAIL_POINTER_REGISTER_PCI1_SIDE 0x0EC | ||
860 | #define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI1_SIDE 0x0F0 | ||
861 | #define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI1_SIDE 0x0F4 | ||
862 | #define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI1_SIDE 0x078 | ||
863 | #define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI1_SIDE 0x07C | ||
864 | |||
865 | #define INBOUND_MESSAGE_REGISTER0_CPU0_SIDE 0X1C10 | ||
866 | #define INBOUND_MESSAGE_REGISTER1_CPU0_SIDE 0X1C14 | ||
867 | #define OUTBOUND_MESSAGE_REGISTER0_CPU0_SIDE 0X1C18 | ||
868 | #define OUTBOUND_MESSAGE_REGISTER1_CPU0_SIDE 0X1C1C | ||
869 | #define INBOUND_DOORBELL_REGISTER_CPU0_SIDE 0X1C20 | ||
870 | #define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU0_SIDE 0X1C24 | ||
871 | #define INBOUND_INTERRUPT_MASK_REGISTER_CPU0_SIDE 0X1C28 | ||
872 | #define OUTBOUND_DOORBELL_REGISTER_CPU0_SIDE 0X1C2C | ||
873 | #define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU0_SIDE 0X1C30 | ||
874 | #define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU0_SIDE 0X1C34 | ||
875 | #define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU0_SIDE 0X1C40 | ||
876 | #define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU0_SIDE 0X1C44 | ||
877 | #define QUEUE_CONTROL_REGISTER_CPU0_SIDE 0X1C50 | ||
878 | #define QUEUE_BASE_ADDRESS_REGISTER_CPU0_SIDE 0X1C54 | ||
879 | #define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU0_SIDE 0X1C60 | ||
880 | #define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU0_SIDE 0X1C64 | ||
881 | #define INBOUND_POST_HEAD_POINTER_REGISTER_CPU0_SIDE 0X1C68 | ||
882 | #define INBOUND_POST_TAIL_POINTER_REGISTER_CPU0_SIDE 0X1C6C | ||
883 | #define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU0_SIDE 0X1C70 | ||
884 | #define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU0_SIDE 0X1C74 | ||
885 | #define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU0_SIDE 0X1CF8 | ||
886 | #define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU0_SIDE 0X1CFC | ||
887 | |||
888 | #define INBOUND_MESSAGE_REGISTER0_CPU1_SIDE 0X1C90 | ||
889 | #define INBOUND_MESSAGE_REGISTER1_CPU1_SIDE 0X1C94 | ||
890 | #define OUTBOUND_MESSAGE_REGISTER0_CPU1_SIDE 0X1C98 | ||
891 | #define OUTBOUND_MESSAGE_REGISTER1_CPU1_SIDE 0X1C9C | ||
892 | #define INBOUND_DOORBELL_REGISTER_CPU1_SIDE 0X1CA0 | ||
893 | #define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU1_SIDE 0X1CA4 | ||
894 | #define INBOUND_INTERRUPT_MASK_REGISTER_CPU1_SIDE 0X1CA8 | ||
895 | #define OUTBOUND_DOORBELL_REGISTER_CPU1_SIDE 0X1CAC | ||
896 | #define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU1_SIDE 0X1CB0 | ||
897 | #define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU1_SIDE 0X1CB4 | ||
898 | #define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU1_SIDE 0X1CC0 | ||
899 | #define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU1_SIDE 0X1CC4 | ||
900 | #define QUEUE_CONTROL_REGISTER_CPU1_SIDE 0X1CD0 | ||
901 | #define QUEUE_BASE_ADDRESS_REGISTER_CPU1_SIDE 0X1CD4 | ||
902 | #define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU1_SIDE 0X1CE0 | ||
903 | #define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU1_SIDE 0X1CE4 | ||
904 | #define INBOUND_POST_HEAD_POINTER_REGISTER_CPU1_SIDE 0X1CE8 | ||
905 | #define INBOUND_POST_TAIL_POINTER_REGISTER_CPU1_SIDE 0X1CEC | ||
906 | #define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU1_SIDE 0X1CF0 | ||
907 | #define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU1_SIDE 0X1CF4 | ||
908 | #define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU1_SIDE 0X1C78 | ||
909 | #define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU1_SIDE 0X1C7C | ||
910 | |||
911 | /* | ||
912 | * Communication Unit Registers | ||
913 | */ | ||
914 | |||
915 | #define ETHERNET_0_ADDRESS_CONTROL_LOW | ||
916 | #define ETHERNET_0_ADDRESS_CONTROL_HIGH 0xf204 | ||
917 | #define ETHERNET_0_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf208 | ||
918 | #define ETHERNET_0_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf20c | ||
919 | #define ETHERNET_0_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf210 | ||
920 | #define ETHERNET_0_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf214 | ||
921 | #define ETHERNET_0_HASH_TABLE_PCI_HIGH_ADDRESS 0xf218 | ||
922 | #define ETHERNET_1_ADDRESS_CONTROL_LOW 0xf220 | ||
923 | #define ETHERNET_1_ADDRESS_CONTROL_HIGH 0xf224 | ||
924 | #define ETHERNET_1_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf228 | ||
925 | #define ETHERNET_1_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf22c | ||
926 | #define ETHERNET_1_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf230 | ||
927 | #define ETHERNET_1_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf234 | ||
928 | #define ETHERNET_1_HASH_TABLE_PCI_HIGH_ADDRESS 0xf238 | ||
929 | #define ETHERNET_2_ADDRESS_CONTROL_LOW 0xf240 | ||
930 | #define ETHERNET_2_ADDRESS_CONTROL_HIGH 0xf244 | ||
931 | #define ETHERNET_2_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf248 | ||
932 | #define ETHERNET_2_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf24c | ||
933 | #define ETHERNET_2_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf250 | ||
934 | #define ETHERNET_2_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf254 | ||
935 | #define ETHERNET_2_HASH_TABLE_PCI_HIGH_ADDRESS 0xf258 | ||
936 | #define MPSC_0_ADDRESS_CONTROL_LOW 0xf280 | ||
937 | #define MPSC_0_ADDRESS_CONTROL_HIGH 0xf284 | ||
938 | #define MPSC_0_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf288 | ||
939 | #define MPSC_0_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf28c | ||
940 | #define MPSC_0_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf290 | ||
941 | #define MPSC_0_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf294 | ||
942 | #define MPSC_1_ADDRESS_CONTROL_LOW 0xf2a0 | ||
943 | #define MPSC_1_ADDRESS_CONTROL_HIGH 0xf2a4 | ||
944 | #define MPSC_1_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf2a8 | ||
945 | #define MPSC_1_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf2ac | ||
946 | #define MPSC_1_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf2b0 | ||
947 | #define MPSC_1_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf2b4 | ||
948 | #define MPSC_2_ADDRESS_CONTROL_LOW 0xf2c0 | ||
949 | #define MPSC_2_ADDRESS_CONTROL_HIGH 0xf2c4 | ||
950 | #define MPSC_2_RECEIVE_BUFFER_PCI_HIGH_ADDRESS 0xf2c8 | ||
951 | #define MPSC_2_TRANSMIT_BUFFER_PCI_HIGH_ADDRESS 0xf2cc | ||
952 | #define MPSC_2_RECEIVE_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf2d0 | ||
953 | #define MPSC_2_TRANSMIT_DESCRIPTOR_PCI_HIGH_ADDRESS 0xf2d4 | ||
954 | #define SERIAL_INIT_PCI_HIGH_ADDRESS 0xf320 | ||
955 | #define SERIAL_INIT_LAST_DATA 0xf324 | ||
956 | #define SERIAL_INIT_STATUS_AND_CONTROL 0xf328 | ||
957 | #define COMM_UNIT_ARBITER_CONTROL 0xf300 | ||
958 | #define COMM_UNIT_CROSS_BAR_TIMEOUT 0xf304 | ||
959 | #define COMM_UNIT_INTERRUPT_CAUSE 0xf310 | ||
960 | #define COMM_UNIT_INTERRUPT_MASK 0xf314 | ||
961 | #define COMM_UNIT_ERROR_ADDRESS 0xf314 | ||
962 | |||
963 | /* | ||
964 | * Cunit Debug (for internal use) | ||
965 | */ | ||
966 | |||
967 | #define CUNIT_ADDRESS 0xf340 | ||
968 | #define CUNIT_COMMAND_AND_ID 0xf344 | ||
969 | #define CUNIT_WRITE_DATA_LOW 0xf348 | ||
970 | #define CUNIT_WRITE_DATA_HIGH 0xf34c | ||
971 | #define CUNIT_WRITE_BYTE_ENABLE 0xf358 | ||
972 | #define CUNIT_READ_DATA_LOW 0xf350 | ||
973 | #define CUNIT_READ_DATA_HIGH 0xf354 | ||
974 | #define CUNIT_READ_ID 0xf35c | ||
975 | |||
976 | /* | ||
977 | * Fast Ethernet Unit Registers | ||
978 | */ | ||
979 | |||
980 | /* Ethernet */ | ||
981 | |||
982 | #define ETHERNET_PHY_ADDRESS_REGISTER 0x2000 | ||
983 | #define ETHERNET_SMI_REGISTER 0x2010 | ||
984 | |||
985 | /* Ethernet 0 */ | ||
986 | |||
987 | #define ETHERNET0_PORT_CONFIGURATION_REGISTER 0x2400 | ||
988 | #define ETHERNET0_PORT_CONFIGURATION_EXTEND_REGISTER 0x2408 | ||
989 | #define ETHERNET0_PORT_COMMAND_REGISTER 0x2410 | ||
990 | #define ETHERNET0_PORT_STATUS_REGISTER 0x2418 | ||
991 | #define ETHERNET0_SERIAL_PARAMETRS_REGISTER 0x2420 | ||
992 | #define ETHERNET0_HASH_TABLE_POINTER_REGISTER 0x2428 | ||
993 | #define ETHERNET0_FLOW_CONTROL_SOURCE_ADDRESS_LOW 0x2430 | ||
994 | #define ETHERNET0_FLOW_CONTROL_SOURCE_ADDRESS_HIGH 0x2438 | ||
995 | #define ETHERNET0_SDMA_CONFIGURATION_REGISTER 0x2440 | ||
996 | #define ETHERNET0_SDMA_COMMAND_REGISTER 0x2448 | ||
997 | #define ETHERNET0_INTERRUPT_CAUSE_REGISTER 0x2450 | ||
998 | #define ETHERNET0_INTERRUPT_MASK_REGISTER 0x2458 | ||
999 | #define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER0 0x2480 | ||
1000 | #define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER1 0x2484 | ||
1001 | #define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER2 0x2488 | ||
1002 | #define ETHERNET0_FIRST_RX_DESCRIPTOR_POINTER3 0x248c | ||
1003 | #define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER0 0x24a0 | ||
1004 | #define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER1 0x24a4 | ||
1005 | #define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER2 0x24a8 | ||
1006 | #define ETHERNET0_CURRENT_RX_DESCRIPTOR_POINTER3 0x24ac | ||
1007 | #define ETHERNET0_CURRENT_TX_DESCRIPTOR_POINTER0 0x24e0 | ||
1008 | #define ETHERNET0_CURRENT_TX_DESCRIPTOR_POINTER1 0x24e4 | ||
1009 | #define ETHERNET0_MIB_COUNTER_BASE 0x2500 | ||
1010 | |||
1011 | /* Ethernet 1 */ | ||
1012 | |||
1013 | #define ETHERNET1_PORT_CONFIGURATION_REGISTER 0x2800 | ||
1014 | #define ETHERNET1_PORT_CONFIGURATION_EXTEND_REGISTER 0x2808 | ||
1015 | #define ETHERNET1_PORT_COMMAND_REGISTER 0x2810 | ||
1016 | #define ETHERNET1_PORT_STATUS_REGISTER 0x2818 | ||
1017 | #define ETHERNET1_SERIAL_PARAMETRS_REGISTER 0x2820 | ||
1018 | #define ETHERNET1_HASH_TABLE_POINTER_REGISTER 0x2828 | ||
1019 | #define ETHERNET1_FLOW_CONTROL_SOURCE_ADDRESS_LOW 0x2830 | ||
1020 | #define ETHERNET1_FLOW_CONTROL_SOURCE_ADDRESS_HIGH 0x2838 | ||
1021 | #define ETHERNET1_SDMA_CONFIGURATION_REGISTER 0x2840 | ||
1022 | #define ETHERNET1_SDMA_COMMAND_REGISTER 0x2848 | ||
1023 | #define ETHERNET1_INTERRUPT_CAUSE_REGISTER 0x2850 | ||
1024 | #define ETHERNET1_INTERRUPT_MASK_REGISTER 0x2858 | ||
1025 | #define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER0 0x2880 | ||
1026 | #define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER1 0x2884 | ||
1027 | #define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER2 0x2888 | ||
1028 | #define ETHERNET1_FIRST_RX_DESCRIPTOR_POINTER3 0x288c | ||
1029 | #define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER0 0x28a0 | ||
1030 | #define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER1 0x28a4 | ||
1031 | #define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER2 0x28a8 | ||
1032 | #define ETHERNET1_CURRENT_RX_DESCRIPTOR_POINTER3 0x28ac | ||
1033 | #define ETHERNET1_CURRENT_TX_DESCRIPTOR_POINTER0 0x28e0 | ||
1034 | #define ETHERNET1_CURRENT_TX_DESCRIPTOR_POINTER1 0x28e4 | ||
1035 | #define ETHERNET1_MIB_COUNTER_BASE 0x2900 | ||
1036 | |||
1037 | /* Ethernet 2 */ | ||
1038 | |||
1039 | #define ETHERNET2_PORT_CONFIGURATION_REGISTER 0x2c00 | ||
1040 | #define ETHERNET2_PORT_CONFIGURATION_EXTEND_REGISTER 0x2c08 | ||
1041 | #define ETHERNET2_PORT_COMMAND_REGISTER 0x2c10 | ||
1042 | #define ETHERNET2_PORT_STATUS_REGISTER 0x2c18 | ||
1043 | #define ETHERNET2_SERIAL_PARAMETRS_REGISTER 0x2c20 | ||
1044 | #define ETHERNET2_HASH_TABLE_POINTER_REGISTER 0x2c28 | ||
1045 | #define ETHERNET2_FLOW_CONTROL_SOURCE_ADDRESS_LOW 0x2c30 | ||
1046 | #define ETHERNET2_FLOW_CONTROL_SOURCE_ADDRESS_HIGH 0x2c38 | ||
1047 | #define ETHERNET2_SDMA_CONFIGURATION_REGISTER 0x2c40 | ||
1048 | #define ETHERNET2_SDMA_COMMAND_REGISTER 0x2c48 | ||
1049 | #define ETHERNET2_INTERRUPT_CAUSE_REGISTER 0x2c50 | ||
1050 | #define ETHERNET2_INTERRUPT_MASK_REGISTER 0x2c58 | ||
1051 | #define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER0 0x2c80 | ||
1052 | #define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER1 0x2c84 | ||
1053 | #define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER2 0x2c88 | ||
1054 | #define ETHERNET2_FIRST_RX_DESCRIPTOR_POINTER3 0x2c8c | ||
1055 | #define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER0 0x2ca0 | ||
1056 | #define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER1 0x2ca4 | ||
1057 | #define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER2 0x2ca8 | ||
1058 | #define ETHERNET2_CURRENT_RX_DESCRIPTOR_POINTER3 0x2cac | ||
1059 | #define ETHERNET2_CURRENT_TX_DESCRIPTOR_POINTER0 0x2ce0 | ||
1060 | #define ETHERNET2_CURRENT_TX_DESCRIPTOR_POINTER1 0x2ce4 | ||
1061 | #define ETHERNET2_MIB_COUNTER_BASE 0x2d00 | ||
1062 | |||
1063 | /* | ||
1064 | * SDMA Registers | ||
1065 | */ | ||
1066 | |||
1067 | #define SDMA_GROUP_CONFIGURATION_REGISTER 0xb1f0 | ||
1068 | #define CHANNEL0_CONFIGURATION_REGISTER 0x4000 | ||
1069 | #define CHANNEL0_COMMAND_REGISTER 0x4008 | ||
1070 | #define CHANNEL0_RX_CMD_STATUS 0x4800 | ||
1071 | #define CHANNEL0_RX_PACKET_AND_BUFFER_SIZES 0x4804 | ||
1072 | #define CHANNEL0_RX_BUFFER_POINTER 0x4808 | ||
1073 | #define CHANNEL0_RX_NEXT_POINTER 0x480c | ||
1074 | #define CHANNEL0_CURRENT_RX_DESCRIPTOR_POINTER 0x4810 | ||
1075 | #define CHANNEL0_TX_CMD_STATUS 0x4C00 | ||
1076 | #define CHANNEL0_TX_PACKET_SIZE 0x4C04 | ||
1077 | #define CHANNEL0_TX_BUFFER_POINTER 0x4C08 | ||
1078 | #define CHANNEL0_TX_NEXT_POINTER 0x4C0c | ||
1079 | #define CHANNEL0_CURRENT_TX_DESCRIPTOR_POINTER 0x4c10 | ||
1080 | #define CHANNEL0_FIRST_TX_DESCRIPTOR_POINTER 0x4c14 | ||
1081 | #define CHANNEL1_CONFIGURATION_REGISTER 0x6000 | ||
1082 | #define CHANNEL1_COMMAND_REGISTER 0x6008 | ||
1083 | #define CHANNEL1_RX_CMD_STATUS 0x6800 | ||
1084 | #define CHANNEL1_RX_PACKET_AND_BUFFER_SIZES 0x6804 | ||
1085 | #define CHANNEL1_RX_BUFFER_POINTER 0x6808 | ||
1086 | #define CHANNEL1_RX_NEXT_POINTER 0x680c | ||
1087 | #define CHANNEL1_CURRENT_RX_DESCRIPTOR_POINTER 0x6810 | ||
1088 | #define CHANNEL1_TX_CMD_STATUS 0x6C00 | ||
1089 | #define CHANNEL1_TX_PACKET_SIZE 0x6C04 | ||
1090 | #define CHANNEL1_TX_BUFFER_POINTER 0x6C08 | ||
1091 | #define CHANNEL1_TX_NEXT_POINTER 0x6C0c | ||
1092 | #define CHANNEL1_CURRENT_RX_DESCRIPTOR_POINTER 0x6810 | ||
1093 | #define CHANNEL1_CURRENT_TX_DESCRIPTOR_POINTER 0x6c10 | ||
1094 | #define CHANNEL1_FIRST_TX_DESCRIPTOR_POINTER 0x6c14 | ||
1095 | |||
1096 | /* SDMA Interrupt */ | ||
1097 | |||
1098 | #define SDMA_CAUSE 0xb820 | ||
1099 | #define SDMA_MASK 0xb8a0 | ||
1100 | |||
1101 | |||
1102 | /* | ||
1103 | * Baude Rate Generators Registers | ||
1104 | */ | ||
1105 | |||
1106 | /* BRG 0 */ | ||
1107 | |||
1108 | #define BRG0_CONFIGURATION_REGISTER 0xb200 | ||
1109 | #define BRG0_BAUDE_TUNING_REGISTER 0xb204 | ||
1110 | |||
1111 | /* BRG 1 */ | ||
1112 | |||
1113 | #define BRG1_CONFIGURATION_REGISTER 0xb208 | ||
1114 | #define BRG1_BAUDE_TUNING_REGISTER 0xb20c | ||
1115 | |||
1116 | /* BRG 2 */ | ||
1117 | |||
1118 | #define BRG2_CONFIGURATION_REGISTER 0xb210 | ||
1119 | #define BRG2_BAUDE_TUNING_REGISTER 0xb214 | ||
1120 | |||
1121 | /* BRG Interrupts */ | ||
1122 | |||
1123 | #define BRG_CAUSE_REGISTER 0xb834 | ||
1124 | #define BRG_MASK_REGISTER 0xb8b4 | ||
1125 | |||
1126 | /* MISC */ | ||
1127 | |||
1128 | #define MAIN_ROUTING_REGISTER 0xb400 | ||
1129 | #define RECEIVE_CLOCK_ROUTING_REGISTER 0xb404 | ||
1130 | #define TRANSMIT_CLOCK_ROUTING_REGISTER 0xb408 | ||
1131 | #define COMM_UNIT_ARBITER_CONFIGURATION_REGISTER 0xb40c | ||
1132 | #define WATCHDOG_CONFIGURATION_REGISTER 0xb410 | ||
1133 | #define WATCHDOG_VALUE_REGISTER 0xb414 | ||
1134 | |||
1135 | |||
1136 | /* | ||
1137 | * Flex TDM Registers | ||
1138 | */ | ||
1139 | |||
1140 | /* FTDM Port */ | ||
1141 | |||
1142 | #define FLEXTDM_TRANSMIT_READ_POINTER 0xa800 | ||
1143 | #define FLEXTDM_RECEIVE_READ_POINTER 0xa804 | ||
1144 | #define FLEXTDM_CONFIGURATION_REGISTER 0xa808 | ||
1145 | #define FLEXTDM_AUX_CHANNELA_TX_REGISTER 0xa80c | ||
1146 | #define FLEXTDM_AUX_CHANNELA_RX_REGISTER 0xa810 | ||
1147 | #define FLEXTDM_AUX_CHANNELB_TX_REGISTER 0xa814 | ||
1148 | #define FLEXTDM_AUX_CHANNELB_RX_REGISTER 0xa818 | ||
1149 | |||
1150 | /* FTDM Interrupts */ | ||
1151 | |||
1152 | #define FTDM_CAUSE_REGISTER 0xb830 | ||
1153 | #define FTDM_MASK_REGISTER 0xb8b0 | ||
1154 | |||
1155 | |||
1156 | /* | ||
1157 | * GPP Interface Registers | ||
1158 | */ | ||
1159 | |||
1160 | #define GPP_IO_CONTROL 0xf100 | ||
1161 | #define GPP_LEVEL_CONTROL 0xf110 | ||
1162 | #define GPP_VALUE 0xf104 | ||
1163 | #define GPP_INTERRUPT_CAUSE 0xf108 | ||
1164 | #define GPP_INTERRUPT_MASK 0xf10c | ||
1165 | |||
1166 | #define MPP_CONTROL0 0xf000 | ||
1167 | #define MPP_CONTROL1 0xf004 | ||
1168 | #define MPP_CONTROL2 0xf008 | ||
1169 | #define MPP_CONTROL3 0xf00c | ||
1170 | #define DEBUG_PORT_MULTIPLEX 0xf014 | ||
1171 | #define SERIAL_PORT_MULTIPLEX 0xf010 | ||
1172 | |||
1173 | /* | ||
1174 | * I2C Registers | ||
1175 | */ | ||
1176 | |||
1177 | #define I2C_SLAVE_ADDRESS 0xc000 | ||
1178 | #define I2C_EXTENDED_SLAVE_ADDRESS 0xc040 | ||
1179 | #define I2C_DATA 0xc004 | ||
1180 | #define I2C_CONTROL 0xc008 | ||
1181 | #define I2C_STATUS_BAUDE_RATE 0xc00C | ||
1182 | #define I2C_SOFT_RESET 0xc01c | ||
1183 | |||
1184 | /* | ||
1185 | * MPSC Registers | ||
1186 | */ | ||
1187 | |||
1188 | /* | ||
1189 | * MPSC0 | ||
1190 | */ | ||
1191 | |||
1192 | #define MPSC0_MAIN_CONFIGURATION_LOW 0x8000 | ||
1193 | #define MPSC0_MAIN_CONFIGURATION_HIGH 0x8004 | ||
1194 | #define MPSC0_PROTOCOL_CONFIGURATION 0x8008 | ||
1195 | #define CHANNEL0_REGISTER1 0x800c | ||
1196 | #define CHANNEL0_REGISTER2 0x8010 | ||
1197 | #define CHANNEL0_REGISTER3 0x8014 | ||
1198 | #define CHANNEL0_REGISTER4 0x8018 | ||
1199 | #define CHANNEL0_REGISTER5 0x801c | ||
1200 | #define CHANNEL0_REGISTER6 0x8020 | ||
1201 | #define CHANNEL0_REGISTER7 0x8024 | ||
1202 | #define CHANNEL0_REGISTER8 0x8028 | ||
1203 | #define CHANNEL0_REGISTER9 0x802c | ||
1204 | #define CHANNEL0_REGISTER10 0x8030 | ||
1205 | #define CHANNEL0_REGISTER11 0x8034 | ||
1206 | |||
1207 | /* | ||
1208 | * MPSC1 | ||
1209 | */ | ||
1210 | |||
1211 | #define MPSC1_MAIN_CONFIGURATION_LOW 0x9000 | ||
1212 | #define MPSC1_MAIN_CONFIGURATION_HIGH 0x9004 | ||
1213 | #define MPSC1_PROTOCOL_CONFIGURATION 0x9008 | ||
1214 | #define CHANNEL1_REGISTER1 0x900c | ||
1215 | #define CHANNEL1_REGISTER2 0x9010 | ||
1216 | #define CHANNEL1_REGISTER3 0x9014 | ||
1217 | #define CHANNEL1_REGISTER4 0x9018 | ||
1218 | #define CHANNEL1_REGISTER5 0x901c | ||
1219 | #define CHANNEL1_REGISTER6 0x9020 | ||
1220 | #define CHANNEL1_REGISTER7 0x9024 | ||
1221 | #define CHANNEL1_REGISTER8 0x9028 | ||
1222 | #define CHANNEL1_REGISTER9 0x902c | ||
1223 | #define CHANNEL1_REGISTER10 0x9030 | ||
1224 | #define CHANNEL1_REGISTER11 0x9034 | ||
1225 | |||
1226 | /* | ||
1227 | * MPSCs Interupts | ||
1228 | */ | ||
1229 | |||
1230 | #define MPSC0_CAUSE 0xb804 | ||
1231 | #define MPSC0_MASK 0xb884 | ||
1232 | #define MPSC1_CAUSE 0xb80c | ||
1233 | #define MPSC1_MASK 0xb88c | ||
1234 | |||
1235 | #endif /* __ASM_MIPS_MV64240_H */ | ||
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index 918a4894b587..6a5fa32f615b 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h | |||
@@ -172,6 +172,7 @@ ASMMACRO(tlb_probe_hazard, | |||
172 | nop; nop; nop | 172 | nop; nop; nop |
173 | ) | 173 | ) |
174 | ASMMACRO(irq_enable_hazard, | 174 | ASMMACRO(irq_enable_hazard, |
175 | _ssnop; _ssnop; _ssnop; | ||
175 | ) | 176 | ) |
176 | ASMMACRO(irq_disable_hazard, | 177 | ASMMACRO(irq_disable_hazard, |
177 | nop; nop; nop | 178 | nop; nop; nop |
diff --git a/include/asm-mips/ioctls.h b/include/asm-mips/ioctls.h index 92f6c36aac4d..5097cbf183a9 100644 --- a/include/asm-mips/ioctls.h +++ b/include/asm-mips/ioctls.h | |||
@@ -77,6 +77,10 @@ | |||
77 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 77 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
78 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 78 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
79 | #define TIOCGSID 0x7416 /* Return the session ID of FD */ | 79 | #define TIOCGSID 0x7416 /* Return the session ID of FD */ |
80 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
81 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
82 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
83 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
80 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 84 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
81 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 85 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
82 | 86 | ||
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h index 97102ebc54b1..2cb52cf8bd4e 100644 --- a/include/asm-mips/irq.h +++ b/include/asm-mips/irq.h | |||
@@ -24,7 +24,30 @@ static inline int irq_canonicalize(int irq) | |||
24 | #define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */ | 24 | #define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */ |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #ifdef CONFIG_MIPS_MT_SMTC | ||
28 | |||
29 | struct irqaction; | ||
30 | |||
31 | extern unsigned long irq_hwmask[]; | ||
32 | extern int setup_irq_smtc(unsigned int irq, struct irqaction * new, | ||
33 | unsigned long hwmask); | ||
34 | |||
35 | static inline void smtc_im_ack_irq(unsigned int irq) | ||
36 | { | ||
37 | if (irq_hwmask[irq] & ST0_IM) | ||
38 | set_c0_status(irq_hwmask[irq] & ST0_IM); | ||
39 | } | ||
40 | |||
41 | #else | ||
42 | |||
43 | static inline void smtc_im_ack_irq(unsigned int irq) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
48 | |||
27 | #ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP | 49 | #ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP |
50 | |||
28 | /* | 51 | /* |
29 | * Clear interrupt mask handling "backstop" if irq_hwmask | 52 | * Clear interrupt mask handling "backstop" if irq_hwmask |
30 | * entry so indicates. This implies that the ack() or end() | 53 | * entry so indicates. This implies that the ack() or end() |
@@ -38,6 +61,7 @@ do { \ | |||
38 | ~(irq_hwmask[irq] & 0x0000ff00)); \ | 61 | ~(irq_hwmask[irq] & 0x0000ff00)); \ |
39 | } while (0) | 62 | } while (0) |
40 | #else | 63 | #else |
64 | |||
41 | #define __DO_IRQ_SMTC_HOOK(irq) do { } while (0) | 65 | #define __DO_IRQ_SMTC_HOOK(irq) do { } while (0) |
42 | #endif | 66 | #endif |
43 | 67 | ||
@@ -60,14 +84,6 @@ do { \ | |||
60 | extern void arch_init_irq(void); | 84 | extern void arch_init_irq(void); |
61 | extern void spurious_interrupt(void); | 85 | extern void spurious_interrupt(void); |
62 | 86 | ||
63 | #ifdef CONFIG_MIPS_MT_SMTC | ||
64 | struct irqaction; | ||
65 | |||
66 | extern unsigned long irq_hwmask[]; | ||
67 | extern int setup_irq_smtc(unsigned int irq, struct irqaction * new, | ||
68 | unsigned long hwmask); | ||
69 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
70 | |||
71 | extern int allocate_irqno(void); | 87 | extern int allocate_irqno(void); |
72 | extern void alloc_legacy_irqno(void); | 88 | extern void alloc_legacy_irqno(void); |
73 | extern void free_irqno(unsigned int irq); | 89 | extern void free_irqno(unsigned int irq); |
diff --git a/include/asm-mips/jmr3927/jmr3927.h b/include/asm-mips/jmr3927/jmr3927.h index 958e29706e2d..b2dc35f56181 100644 --- a/include/asm-mips/jmr3927/jmr3927.h +++ b/include/asm-mips/jmr3927/jmr3927.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/jmr3927/tx3927.h> | 13 | #include <asm/jmr3927/tx3927.h> |
14 | #include <asm/addrspace.h> | 14 | #include <asm/addrspace.h> |
15 | #include <asm/system.h> | 15 | #include <asm/system.h> |
16 | #include <asm/txx9irq.h> | ||
16 | 17 | ||
17 | /* CS */ | 18 | /* CS */ |
18 | #define JMR3927_ROMCE0 0x1fc00000 /* 4M */ | 19 | #define JMR3927_ROMCE0 0x1fc00000 /* 4M */ |
@@ -115,7 +116,7 @@ | |||
115 | #define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */ | 116 | #define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */ |
116 | #define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */ | 117 | #define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */ |
117 | 118 | ||
118 | #define JMR3927_IRQ_IRC 16 | 119 | #define JMR3927_IRQ_IRC TXX9_IRQ_BASE |
119 | #define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC) | 120 | #define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC) |
120 | #define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC) | 121 | #define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC) |
121 | 122 | ||
diff --git a/include/asm-mips/jmr3927/tx3927.h b/include/asm-mips/jmr3927/tx3927.h index 0b9073bfb759..4be2f25f70dd 100644 --- a/include/asm-mips/jmr3927/tx3927.h +++ b/include/asm-mips/jmr3927/tx3927.h | |||
@@ -50,21 +50,6 @@ struct tx3927_dma_reg { | |||
50 | volatile unsigned long unused0; | 50 | volatile unsigned long unused0; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct tx3927_irc_reg { | ||
54 | volatile unsigned long cer; | ||
55 | volatile unsigned long cr[2]; | ||
56 | volatile unsigned long unused0; | ||
57 | volatile unsigned long ilr[8]; | ||
58 | volatile unsigned long unused1[4]; | ||
59 | volatile unsigned long imr; | ||
60 | volatile unsigned long unused2[7]; | ||
61 | volatile unsigned long scr; | ||
62 | volatile unsigned long unused3[7]; | ||
63 | volatile unsigned long ssr; | ||
64 | volatile unsigned long unused4[7]; | ||
65 | volatile unsigned long csr; | ||
66 | }; | ||
67 | |||
68 | #include <asm/byteorder.h> | 53 | #include <asm/byteorder.h> |
69 | 54 | ||
70 | #ifdef __BIG_ENDIAN | 55 | #ifdef __BIG_ENDIAN |
@@ -225,26 +210,6 @@ struct tx3927_ccfg_reg { | |||
225 | /* | 210 | /* |
226 | * IRC | 211 | * IRC |
227 | */ | 212 | */ |
228 | #define TX3927_IR_MAX_LEVEL 7 | ||
229 | |||
230 | /* IRCER : Int. Control Enable */ | ||
231 | #define TX3927_IRCER_ICE 0x00000001 | ||
232 | |||
233 | /* IRCR : Int. Control */ | ||
234 | #define TX3927_IRCR_LOW 0x00000000 | ||
235 | #define TX3927_IRCR_HIGH 0x00000001 | ||
236 | #define TX3927_IRCR_DOWN 0x00000002 | ||
237 | #define TX3927_IRCR_UP 0x00000003 | ||
238 | |||
239 | /* IRSCR : Int. Status Control */ | ||
240 | #define TX3927_IRSCR_EIClrE 0x00000100 | ||
241 | #define TX3927_IRSCR_EIClr_MASK 0x0000000f | ||
242 | |||
243 | /* IRCSR : Int. Current Status */ | ||
244 | #define TX3927_IRCSR_IF 0x00010000 | ||
245 | #define TX3927_IRCSR_ILV_MASK 0x00000700 | ||
246 | #define TX3927_IRCSR_IVL_MASK 0x0000001f | ||
247 | |||
248 | #define TX3927_IR_INT0 0 | 213 | #define TX3927_IR_INT0 0 |
249 | #define TX3927_IR_INT1 1 | 214 | #define TX3927_IR_INT1 1 |
250 | #define TX3927_IR_INT2 2 | 215 | #define TX3927_IR_INT2 2 |
@@ -347,7 +312,6 @@ struct tx3927_ccfg_reg { | |||
347 | #define tx3927_sdramcptr ((struct tx3927_sdramc_reg *)TX3927_SDRAMC_REG) | 312 | #define tx3927_sdramcptr ((struct tx3927_sdramc_reg *)TX3927_SDRAMC_REG) |
348 | #define tx3927_romcptr ((struct tx3927_romc_reg *)TX3927_ROMC_REG) | 313 | #define tx3927_romcptr ((struct tx3927_romc_reg *)TX3927_ROMC_REG) |
349 | #define tx3927_dmaptr ((struct tx3927_dma_reg *)TX3927_DMA_REG) | 314 | #define tx3927_dmaptr ((struct tx3927_dma_reg *)TX3927_DMA_REG) |
350 | #define tx3927_ircptr ((struct tx3927_irc_reg *)TX3927_IRC_REG) | ||
351 | #define tx3927_pcicptr ((struct tx3927_pcic_reg *)TX3927_PCIC_REG) | 315 | #define tx3927_pcicptr ((struct tx3927_pcic_reg *)TX3927_PCIC_REG) |
352 | #define tx3927_ccfgptr ((struct tx3927_ccfg_reg *)TX3927_CCFG_REG) | 316 | #define tx3927_ccfgptr ((struct tx3927_ccfg_reg *)TX3927_CCFG_REG) |
353 | #define tx3927_tmrptr(ch) ((struct txx927_tmr_reg *)TX3927_TMR_REG(ch)) | 317 | #define tx3927_tmrptr(ch) ((struct txx927_tmr_reg *)TX3927_TMR_REG(ch)) |
diff --git a/include/asm-mips/local.h b/include/asm-mips/local.h index ed882c88e0ca..f9a5ce5c9af1 100644 --- a/include/asm-mips/local.h +++ b/include/asm-mips/local.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | #include <linux/bitops.h> | 5 | #include <linux/bitops.h> |
6 | #include <asm/atomic.h> | 6 | #include <asm/atomic.h> |
7 | #include <asm/cmpxchg.h> | ||
7 | #include <asm/war.h> | 8 | #include <asm/war.h> |
8 | 9 | ||
9 | typedef struct | 10 | typedef struct |
@@ -114,68 +115,6 @@ static __inline__ long local_sub_return(long i, local_t * l) | |||
114 | return result; | 115 | return result; |
115 | } | 116 | } |
116 | 117 | ||
117 | /* | ||
118 | * local_sub_if_positive - conditionally subtract integer from atomic variable | ||
119 | * @i: integer value to subtract | ||
120 | * @l: pointer of type local_t | ||
121 | * | ||
122 | * Atomically test @l and subtract @i if @l is greater or equal than @i. | ||
123 | * The function returns the old value of @l minus @i. | ||
124 | */ | ||
125 | static __inline__ long local_sub_if_positive(long i, local_t * l) | ||
126 | { | ||
127 | unsigned long result; | ||
128 | |||
129 | if (cpu_has_llsc && R10000_LLSC_WAR) { | ||
130 | unsigned long temp; | ||
131 | |||
132 | __asm__ __volatile__( | ||
133 | " .set mips3 \n" | ||
134 | "1:" __LL "%1, %2 # local_sub_if_positive\n" | ||
135 | " dsubu %0, %1, %3 \n" | ||
136 | " bltz %0, 1f \n" | ||
137 | __SC "%0, %2 \n" | ||
138 | " .set noreorder \n" | ||
139 | " beqzl %0, 1b \n" | ||
140 | " dsubu %0, %1, %3 \n" | ||
141 | " .set reorder \n" | ||
142 | "1: \n" | ||
143 | " .set mips0 \n" | ||
144 | : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) | ||
145 | : "Ir" (i), "m" (l->a.counter) | ||
146 | : "memory"); | ||
147 | } else if (cpu_has_llsc) { | ||
148 | unsigned long temp; | ||
149 | |||
150 | __asm__ __volatile__( | ||
151 | " .set mips3 \n" | ||
152 | "1:" __LL "%1, %2 # local_sub_if_positive\n" | ||
153 | " dsubu %0, %1, %3 \n" | ||
154 | " bltz %0, 1f \n" | ||
155 | __SC "%0, %2 \n" | ||
156 | " .set noreorder \n" | ||
157 | " beqz %0, 1b \n" | ||
158 | " dsubu %0, %1, %3 \n" | ||
159 | " .set reorder \n" | ||
160 | "1: \n" | ||
161 | " .set mips0 \n" | ||
162 | : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) | ||
163 | : "Ir" (i), "m" (l->a.counter) | ||
164 | : "memory"); | ||
165 | } else { | ||
166 | unsigned long flags; | ||
167 | |||
168 | local_irq_save(flags); | ||
169 | result = l->a.counter; | ||
170 | result -= i; | ||
171 | if (result >= 0) | ||
172 | l->a.counter = result; | ||
173 | local_irq_restore(flags); | ||
174 | } | ||
175 | |||
176 | return result; | ||
177 | } | ||
178 | |||
179 | #define local_cmpxchg(l, o, n) \ | 118 | #define local_cmpxchg(l, o, n) \ |
180 | ((long)cmpxchg_local(&((l)->a.counter), (o), (n))) | 119 | ((long)cmpxchg_local(&((l)->a.counter), (o), (n))) |
181 | #define local_xchg(l, n) (xchg_local(&((l)->a.counter),(n))) | 120 | #define local_xchg(l, n) (xchg_local(&((l)->a.counter),(n))) |
@@ -234,12 +173,6 @@ static __inline__ long local_sub_if_positive(long i, local_t * l) | |||
234 | #define local_dec_and_test(l) (local_sub_return(1, (l)) == 0) | 173 | #define local_dec_and_test(l) (local_sub_return(1, (l)) == 0) |
235 | 174 | ||
236 | /* | 175 | /* |
237 | * local_dec_if_positive - decrement by 1 if old value positive | ||
238 | * @l: pointer of type local_t | ||
239 | */ | ||
240 | #define local_dec_if_positive(l) local_sub_if_positive(1, l) | ||
241 | |||
242 | /* | ||
243 | * local_add_negative - add and test if negative | 176 | * local_add_negative - add and test if negative |
244 | * @l: pointer of type local_t | 177 | * @l: pointer of type local_t |
245 | * @i: integer value to add | 178 | * @i: integer value to add |
diff --git a/include/asm-mips/mach-generic/ide.h b/include/asm-mips/mach-generic/ide.h index 6eba2e576aaa..a77128362a7d 100644 --- a/include/asm-mips/mach-generic/ide.h +++ b/include/asm-mips/mach-generic/ide.h | |||
@@ -33,13 +33,24 @@ static __inline__ int ide_probe_legacy(void) | |||
33 | { | 33 | { |
34 | #ifdef CONFIG_PCI | 34 | #ifdef CONFIG_PCI |
35 | struct pci_dev *dev; | 35 | struct pci_dev *dev; |
36 | if ((dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL)) != NULL || | 36 | /* |
37 | (dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL)) != NULL) { | 37 | * This can be called on the ide_setup() path, super-early in |
38 | pci_dev_put(dev); | 38 | * boot. But the down_read() will enable local interrupts, |
39 | 39 | * which can cause some machines to crash. So here we detect | |
40 | return 1; | 40 | * and flag that situation and bail out early. |
41 | } | 41 | */ |
42 | if (no_pci_devices()) | ||
43 | return 0; | ||
44 | dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL); | ||
45 | if (dev) | ||
46 | goto found; | ||
47 | dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL); | ||
48 | if (dev) | ||
49 | goto found; | ||
42 | return 0; | 50 | return 0; |
51 | found: | ||
52 | pci_dev_put(dev); | ||
53 | return 1; | ||
43 | #elif defined(CONFIG_EISA) || defined(CONFIG_ISA) | 54 | #elif defined(CONFIG_EISA) || defined(CONFIG_ISA) |
44 | return 1; | 55 | return 1; |
45 | #else | 56 | #else |
@@ -49,48 +60,42 @@ static __inline__ int ide_probe_legacy(void) | |||
49 | 60 | ||
50 | static __inline__ int ide_default_irq(unsigned long base) | 61 | static __inline__ int ide_default_irq(unsigned long base) |
51 | { | 62 | { |
52 | if (ide_probe_legacy()) | 63 | switch (base) { |
53 | switch (base) { | 64 | case 0x1f0: return 14; |
54 | case 0x1f0: | 65 | case 0x170: return 15; |
55 | return 14; | 66 | case 0x1e8: return 11; |
56 | case 0x170: | 67 | case 0x168: return 10; |
57 | return 15; | 68 | case 0x1e0: return 8; |
58 | case 0x1e8: | 69 | case 0x160: return 12; |
59 | return 11; | ||
60 | case 0x168: | ||
61 | return 10; | ||
62 | case 0x1e0: | ||
63 | return 8; | ||
64 | case 0x160: | ||
65 | return 12; | ||
66 | default: | 70 | default: |
67 | return 0; | 71 | return 0; |
68 | } | 72 | } |
69 | else | ||
70 | return 0; | ||
71 | } | 73 | } |
72 | 74 | ||
73 | static __inline__ unsigned long ide_default_io_base(int index) | 75 | static __inline__ unsigned long ide_default_io_base(int index) |
74 | { | 76 | { |
75 | if (ide_probe_legacy()) | 77 | if (!ide_probe_legacy()) |
78 | return 0; | ||
79 | /* | ||
80 | * If PCI is present then it is not safe to poke around | ||
81 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are | ||
82 | * defined compatibility mode ports for PCI. A user can | ||
83 | * override this using ide= but we must default safe. | ||
84 | */ | ||
85 | if (no_pci_devices()) { | ||
76 | switch (index) { | 86 | switch (index) { |
77 | case 0: | 87 | case 2: return 0x1e8; |
78 | return 0x1f0; | 88 | case 3: return 0x168; |
79 | case 1: | 89 | case 4: return 0x1e0; |
80 | return 0x170; | 90 | case 5: return 0x160; |
81 | case 2: | ||
82 | return 0x1e8; | ||
83 | case 3: | ||
84 | return 0x168; | ||
85 | case 4: | ||
86 | return 0x1e0; | ||
87 | case 5: | ||
88 | return 0x160; | ||
89 | default: | ||
90 | return 0; | ||
91 | } | 91 | } |
92 | else | 92 | } |
93 | switch (index) { | ||
94 | case 0: return 0x1f0; | ||
95 | case 1: return 0x170; | ||
96 | default: | ||
93 | return 0; | 97 | return 0; |
98 | } | ||
94 | } | 99 | } |
95 | 100 | ||
96 | #define IDE_ARCH_OBSOLETE_INIT | 101 | #define IDE_ARCH_OBSOLETE_INIT |
diff --git a/include/asm-mips/mach-ocelot/mach-gt64120.h b/include/asm-mips/mach-ocelot/mach-gt64120.h deleted file mode 100644 index a62ecb53c751..000000000000 --- a/include/asm-mips/mach-ocelot/mach-gt64120.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2001 MontaVista Software Inc. | ||
3 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published by the | ||
7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | */ | ||
10 | #ifndef _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H | ||
11 | #define _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H | ||
12 | |||
13 | /* | ||
14 | * PCI address allocation | ||
15 | */ | ||
16 | #define GT_PCI_MEM_BASE (0x22000000UL) | ||
17 | #define GT_PCI_MEM_SIZE GT_DEF_PCI0_MEM0_SIZE | ||
18 | #define GT_PCI_IO_BASE (0x20000000UL) | ||
19 | #define GT_PCI_IO_SIZE GT_DEF_PCI0_IO_SIZE | ||
20 | |||
21 | extern unsigned long gt64120_base; | ||
22 | |||
23 | #define GT64120_BASE (gt64120_base) | ||
24 | |||
25 | /* | ||
26 | * GT timer irq | ||
27 | */ | ||
28 | #define GT_TIMER 6 | ||
29 | |||
30 | #endif /* _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H */ | ||
diff --git a/include/asm-mips/marvell.h b/include/asm-mips/marvell.h deleted file mode 100644 index b6144bafc565..000000000000 --- a/include/asm-mips/marvell.h +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2004 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MIPS_MARVELL_H | ||
9 | #define __ASM_MIPS_MARVELL_H | ||
10 | |||
11 | #include <linux/pci.h> | ||
12 | |||
13 | #include <asm/byteorder.h> | ||
14 | |||
15 | extern unsigned long marvell_base; | ||
16 | |||
17 | /* | ||
18 | * Because of an error/peculiarity in the Galileo chip, we need to swap the | ||
19 | * bytes when running bigendian. | ||
20 | */ | ||
21 | #define __MV_READ(ofs) \ | ||
22 | (*(volatile u32 *)(marvell_base+(ofs))) | ||
23 | #define __MV_WRITE(ofs, data) \ | ||
24 | do { *(volatile u32 *)(marvell_base+(ofs)) = (data); } while (0) | ||
25 | |||
26 | #define MV_READ(ofs) le32_to_cpu(__MV_READ(ofs)) | ||
27 | #define MV_WRITE(ofs, data) __MV_WRITE(ofs, cpu_to_le32(data)) | ||
28 | |||
29 | #define MV_READ_16(ofs) \ | ||
30 | le16_to_cpu(*(volatile u16 *)(marvell_base+(ofs))) | ||
31 | #define MV_WRITE_16(ofs, data) \ | ||
32 | *(volatile u16 *)(marvell_base+(ofs)) = cpu_to_le16(data) | ||
33 | |||
34 | #define MV_READ_8(ofs) \ | ||
35 | *(volatile u8 *)(marvell_base+(ofs)) | ||
36 | #define MV_WRITE_8(ofs, data) \ | ||
37 | *(volatile u8 *)(marvell_base+(ofs)) = data | ||
38 | |||
39 | #define MV_SET_REG_BITS(ofs, bits) \ | ||
40 | (*((volatile u32 *)(marvell_base + (ofs)))) |= ((u32)cpu_to_le32(bits)) | ||
41 | #define MV_RESET_REG_BITS(ofs, bits) \ | ||
42 | (*((volatile u32 *)(marvell_base + (ofs)))) &= ~((u32)cpu_to_le32(bits)) | ||
43 | |||
44 | extern struct pci_ops mv_pci_ops; | ||
45 | |||
46 | struct mv_pci_controller { | ||
47 | struct pci_controller pcic; | ||
48 | |||
49 | /* | ||
50 | * GT-64240/MV-64340 specific, per host bus information | ||
51 | */ | ||
52 | unsigned long config_addr; | ||
53 | unsigned long config_vreg; | ||
54 | }; | ||
55 | |||
56 | extern void ll_mv64340_irq(void); | ||
57 | extern void mv64340_irq_init(unsigned int base); | ||
58 | |||
59 | #endif /* __ASM_MIPS_MARVELL_H */ | ||
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index b92dd8c760da..e3301e54d559 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -142,7 +142,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
142 | /* | 142 | /* |
143 | * __pa()/__va() should be used only during mem init. | 143 | * __pa()/__va() should be used only during mem init. |
144 | */ | 144 | */ |
145 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) | 145 | #ifdef CONFIG_64BIT |
146 | #define __pa(x) \ | 146 | #define __pa(x) \ |
147 | ({ \ | 147 | ({ \ |
148 | unsigned long __x = (unsigned long)(x); \ | 148 | unsigned long __x = (unsigned long)(x); \ |
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index 2fbd47eba32d..59c865deb0c7 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h | |||
@@ -43,11 +43,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
43 | */ | 43 | */ |
44 | 44 | ||
45 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ | 45 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ |
46 | #ifdef CONFIG_64BIT_PHYS_ADDR | 46 | #define PGDIR_SHIFT (2 * PAGE_SHIFT + PTE_ORDER - PTE_T_LOG2) |
47 | #define PGDIR_SHIFT 21 | ||
48 | #else | ||
49 | #define PGDIR_SHIFT 22 | ||
50 | #endif | ||
51 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 47 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
52 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 48 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
53 | 49 | ||
@@ -55,17 +51,11 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
55 | * Entries per page directory level: we use two-level, so | 51 | * Entries per page directory level: we use two-level, so |
56 | * we don't really have any PUD/PMD directory physically. | 52 | * we don't really have any PUD/PMD directory physically. |
57 | */ | 53 | */ |
58 | #ifdef CONFIG_64BIT_PHYS_ADDR | 54 | #define __PGD_ORDER (32 - 3 * PAGE_SHIFT + PGD_T_LOG2 + PTE_T_LOG2) |
59 | #define PGD_ORDER 1 | 55 | #define PGD_ORDER (__PGD_ORDER >= 0 ? __PGD_ORDER : 0) |
60 | #define PUD_ORDER aieeee_attempt_to_allocate_pud | 56 | #define PUD_ORDER aieeee_attempt_to_allocate_pud |
61 | #define PMD_ORDER 1 | 57 | #define PMD_ORDER 1 |
62 | #define PTE_ORDER 0 | 58 | #define PTE_ORDER 0 |
63 | #else | ||
64 | #define PGD_ORDER 0 | ||
65 | #define PUD_ORDER aieeee_attempt_to_allocate_pud | ||
66 | #define PMD_ORDER 1 | ||
67 | #define PTE_ORDER 0 | ||
68 | #endif | ||
69 | 59 | ||
70 | #define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) | 60 | #define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) |
71 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) | 61 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 2e2d70d13ff6..d2ee28156743 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -168,11 +168,15 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt | |||
168 | #define set_pud(pudptr, pudval) do { *(pudptr) = (pudval); } while(0) | 168 | #define set_pud(pudptr, pudval) do { *(pudptr) = (pudval); } while(0) |
169 | #endif | 169 | #endif |
170 | 170 | ||
171 | #define PGD_T_LOG2 ffz(~sizeof(pgd_t)) | 171 | #define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1) |
172 | #define PMD_T_LOG2 ffz(~sizeof(pmd_t)) | 172 | #define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1) |
173 | #define PTE_T_LOG2 ffz(~sizeof(pte_t)) | 173 | #define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1) |
174 | 174 | ||
175 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 175 | /* |
176 | * We used to declare this array with size but gcc 3.3 and older are not able | ||
177 | * to find that this expression is a constant, so the size is dropped. | ||
178 | */ | ||
179 | extern pgd_t swapper_pg_dir[]; | ||
176 | 180 | ||
177 | /* | 181 | /* |
178 | * The following only work if pte_present() is true. | 182 | * The following only work if pte_present() is true. |
diff --git a/include/asm-mips/sibyte/bcm1480_regs.h b/include/asm-mips/sibyte/bcm1480_regs.h index 2738c1366f66..c34d36b6b8c2 100644 --- a/include/asm-mips/sibyte/bcm1480_regs.h +++ b/include/asm-mips/sibyte/bcm1480_regs.h | |||
@@ -227,10 +227,15 @@ | |||
227 | (A_BCM1480_DUART(chan) + \ | 227 | (A_BCM1480_DUART(chan) + \ |
228 | BCM1480_DUART_CHANREG_SPACING * 3 + (reg)) | 228 | BCM1480_DUART_CHANREG_SPACING * 3 + (reg)) |
229 | 229 | ||
230 | #define DUART_IMRISR_SPACING 0x20 | ||
231 | #define DUART_INCHNG_SPACING 0x10 | ||
232 | |||
230 | #define R_BCM1480_DUART_IMRREG(chan) \ | 233 | #define R_BCM1480_DUART_IMRREG(chan) \ |
231 | (R_DUART_IMR_A + ((chan) & 1) * DUART_IMRISR_SPACING) | 234 | (R_DUART_IMR_A + ((chan) & 1) * DUART_IMRISR_SPACING) |
232 | #define R_BCM1480_DUART_ISRREG(chan) \ | 235 | #define R_BCM1480_DUART_ISRREG(chan) \ |
233 | (R_DUART_ISR_A + ((chan) & 1) * DUART_IMRISR_SPACING) | 236 | (R_DUART_ISR_A + ((chan) & 1) * DUART_IMRISR_SPACING) |
237 | #define R_BCM1480_DUART_INCHREG(chan) \ | ||
238 | (R_DUART_IN_CHNG_A + ((chan) & 1) * DUART_INCHNG_SPACING) | ||
234 | 239 | ||
235 | #define A_BCM1480_DUART_IMRREG(chan) \ | 240 | #define A_BCM1480_DUART_IMRREG(chan) \ |
236 | (A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_IMRREG(chan))) | 241 | (A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_IMRREG(chan))) |
diff --git a/include/asm-mips/smtc.h b/include/asm-mips/smtc.h index 44dfa4adecf3..ff3e8936b493 100644 --- a/include/asm-mips/smtc.h +++ b/include/asm-mips/smtc.h | |||
@@ -55,4 +55,14 @@ extern void smtc_boot_secondary(int cpu, struct task_struct *t); | |||
55 | 55 | ||
56 | #define PARKED_INDEX ((unsigned int)0x80000000) | 56 | #define PARKED_INDEX ((unsigned int)0x80000000) |
57 | 57 | ||
58 | /* | ||
59 | * Define low-level interrupt mask for IPIs, if necessary. | ||
60 | * By default, use SW interrupt 1, which requires no external | ||
61 | * hardware support, but which works only for single-core | ||
62 | * MIPS MT systems. | ||
63 | */ | ||
64 | #ifndef MIPS_CPU_IPI_IRQ | ||
65 | #define MIPS_CPU_IPI_IRQ 1 | ||
66 | #endif | ||
67 | |||
58 | #endif /* _ASM_SMTC_MT_H */ | 68 | #endif /* _ASM_SMTC_MT_H */ |
diff --git a/include/asm-mips/stacktrace.h b/include/asm-mips/stacktrace.h index 07f873351a86..0bf82818aa53 100644 --- a/include/asm-mips/stacktrace.h +++ b/include/asm-mips/stacktrace.h | |||
@@ -9,7 +9,11 @@ extern unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, | |||
9 | unsigned long pc, unsigned long *ra); | 9 | unsigned long pc, unsigned long *ra); |
10 | #else | 10 | #else |
11 | #define raw_show_trace 1 | 11 | #define raw_show_trace 1 |
12 | #define unwind_stack(task, sp, pc, ra) 0 | 12 | static inline unsigned long unwind_stack(struct task_struct *task, |
13 | unsigned long *sp, unsigned long pc, unsigned long *ra) | ||
14 | { | ||
15 | return 0; | ||
16 | } | ||
13 | #endif | 17 | #endif |
14 | 18 | ||
15 | static __always_inline void prepare_frametrace(struct pt_regs *regs) | 19 | static __always_inline void prepare_frametrace(struct pt_regs *regs) |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 357251f42518..480b574e2483 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <asm/addrspace.h> | 18 | #include <asm/addrspace.h> |
19 | #include <asm/barrier.h> | 19 | #include <asm/barrier.h> |
20 | #include <asm/cmpxchg.h> | ||
20 | #include <asm/cpu-features.h> | 21 | #include <asm/cpu-features.h> |
21 | #include <asm/dsp.h> | 22 | #include <asm/dsp.h> |
22 | #include <asm/war.h> | 23 | #include <asm/war.h> |
@@ -194,266 +195,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
194 | 195 | ||
195 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 196 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
196 | 197 | ||
197 | #define __HAVE_ARCH_CMPXCHG 1 | ||
198 | |||
199 | static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | ||
200 | unsigned long new) | ||
201 | { | ||
202 | __u32 retval; | ||
203 | |||
204 | if (cpu_has_llsc && R10000_LLSC_WAR) { | ||
205 | __asm__ __volatile__( | ||
206 | " .set push \n" | ||
207 | " .set noat \n" | ||
208 | " .set mips3 \n" | ||
209 | "1: ll %0, %2 # __cmpxchg_u32 \n" | ||
210 | " bne %0, %z3, 2f \n" | ||
211 | " .set mips0 \n" | ||
212 | " move $1, %z4 \n" | ||
213 | " .set mips3 \n" | ||
214 | " sc $1, %1 \n" | ||
215 | " beqzl $1, 1b \n" | ||
216 | "2: \n" | ||
217 | " .set pop \n" | ||
218 | : "=&r" (retval), "=R" (*m) | ||
219 | : "R" (*m), "Jr" (old), "Jr" (new) | ||
220 | : "memory"); | ||
221 | } else if (cpu_has_llsc) { | ||
222 | __asm__ __volatile__( | ||
223 | " .set push \n" | ||
224 | " .set noat \n" | ||
225 | " .set mips3 \n" | ||
226 | "1: ll %0, %2 # __cmpxchg_u32 \n" | ||
227 | " bne %0, %z3, 2f \n" | ||
228 | " .set mips0 \n" | ||
229 | " move $1, %z4 \n" | ||
230 | " .set mips3 \n" | ||
231 | " sc $1, %1 \n" | ||
232 | " beqz $1, 3f \n" | ||
233 | "2: \n" | ||
234 | " .subsection 2 \n" | ||
235 | "3: b 1b \n" | ||
236 | " .previous \n" | ||
237 | " .set pop \n" | ||
238 | : "=&r" (retval), "=R" (*m) | ||
239 | : "R" (*m), "Jr" (old), "Jr" (new) | ||
240 | : "memory"); | ||
241 | } else { | ||
242 | unsigned long flags; | ||
243 | |||
244 | raw_local_irq_save(flags); | ||
245 | retval = *m; | ||
246 | if (retval == old) | ||
247 | *m = new; | ||
248 | raw_local_irq_restore(flags); /* implies memory barrier */ | ||
249 | } | ||
250 | |||
251 | smp_llsc_mb(); | ||
252 | |||
253 | return retval; | ||
254 | } | ||
255 | |||
256 | static inline unsigned long __cmpxchg_u32_local(volatile int * m, | ||
257 | unsigned long old, unsigned long new) | ||
258 | { | ||
259 | __u32 retval; | ||
260 | |||
261 | if (cpu_has_llsc && R10000_LLSC_WAR) { | ||
262 | __asm__ __volatile__( | ||
263 | " .set push \n" | ||
264 | " .set noat \n" | ||
265 | " .set mips3 \n" | ||
266 | "1: ll %0, %2 # __cmpxchg_u32 \n" | ||
267 | " bne %0, %z3, 2f \n" | ||
268 | " .set mips0 \n" | ||
269 | " move $1, %z4 \n" | ||
270 | " .set mips3 \n" | ||
271 | " sc $1, %1 \n" | ||
272 | " beqzl $1, 1b \n" | ||
273 | "2: \n" | ||
274 | " .set pop \n" | ||
275 | : "=&r" (retval), "=R" (*m) | ||
276 | : "R" (*m), "Jr" (old), "Jr" (new) | ||
277 | : "memory"); | ||
278 | } else if (cpu_has_llsc) { | ||
279 | __asm__ __volatile__( | ||
280 | " .set push \n" | ||
281 | " .set noat \n" | ||
282 | " .set mips3 \n" | ||
283 | "1: ll %0, %2 # __cmpxchg_u32 \n" | ||
284 | " bne %0, %z3, 2f \n" | ||
285 | " .set mips0 \n" | ||
286 | " move $1, %z4 \n" | ||
287 | " .set mips3 \n" | ||
288 | " sc $1, %1 \n" | ||
289 | " beqz $1, 1b \n" | ||
290 | "2: \n" | ||
291 | " .set pop \n" | ||
292 | : "=&r" (retval), "=R" (*m) | ||
293 | : "R" (*m), "Jr" (old), "Jr" (new) | ||
294 | : "memory"); | ||
295 | } else { | ||
296 | unsigned long flags; | ||
297 | |||
298 | local_irq_save(flags); | ||
299 | retval = *m; | ||
300 | if (retval == old) | ||
301 | *m = new; | ||
302 | local_irq_restore(flags); /* implies memory barrier */ | ||
303 | } | ||
304 | |||
305 | return retval; | ||
306 | } | ||
307 | |||
308 | #ifdef CONFIG_64BIT | ||
309 | static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | ||
310 | unsigned long new) | ||
311 | { | ||
312 | __u64 retval; | ||
313 | |||
314 | if (cpu_has_llsc && R10000_LLSC_WAR) { | ||
315 | __asm__ __volatile__( | ||
316 | " .set push \n" | ||
317 | " .set noat \n" | ||
318 | " .set mips3 \n" | ||
319 | "1: lld %0, %2 # __cmpxchg_u64 \n" | ||
320 | " bne %0, %z3, 2f \n" | ||
321 | " move $1, %z4 \n" | ||
322 | " scd $1, %1 \n" | ||
323 | " beqzl $1, 1b \n" | ||
324 | "2: \n" | ||
325 | " .set pop \n" | ||
326 | : "=&r" (retval), "=R" (*m) | ||
327 | : "R" (*m), "Jr" (old), "Jr" (new) | ||
328 | : "memory"); | ||
329 | } else if (cpu_has_llsc) { | ||
330 | __asm__ __volatile__( | ||
331 | " .set push \n" | ||
332 | " .set noat \n" | ||
333 | " .set mips3 \n" | ||
334 | "1: lld %0, %2 # __cmpxchg_u64 \n" | ||
335 | " bne %0, %z3, 2f \n" | ||
336 | " move $1, %z4 \n" | ||
337 | " scd $1, %1 \n" | ||
338 | " beqz $1, 3f \n" | ||
339 | "2: \n" | ||
340 | " .subsection 2 \n" | ||
341 | "3: b 1b \n" | ||
342 | " .previous \n" | ||
343 | " .set pop \n" | ||
344 | : "=&r" (retval), "=R" (*m) | ||
345 | : "R" (*m), "Jr" (old), "Jr" (new) | ||
346 | : "memory"); | ||
347 | } else { | ||
348 | unsigned long flags; | ||
349 | |||
350 | raw_local_irq_save(flags); | ||
351 | retval = *m; | ||
352 | if (retval == old) | ||
353 | *m = new; | ||
354 | raw_local_irq_restore(flags); /* implies memory barrier */ | ||
355 | } | ||
356 | |||
357 | smp_llsc_mb(); | ||
358 | |||
359 | return retval; | ||
360 | } | ||
361 | |||
362 | static inline unsigned long __cmpxchg_u64_local(volatile int * m, | ||
363 | unsigned long old, unsigned long new) | ||
364 | { | ||
365 | __u64 retval; | ||
366 | |||
367 | if (cpu_has_llsc && R10000_LLSC_WAR) { | ||
368 | __asm__ __volatile__( | ||
369 | " .set push \n" | ||
370 | " .set noat \n" | ||
371 | " .set mips3 \n" | ||
372 | "1: lld %0, %2 # __cmpxchg_u64 \n" | ||
373 | " bne %0, %z3, 2f \n" | ||
374 | " move $1, %z4 \n" | ||
375 | " scd $1, %1 \n" | ||
376 | " beqzl $1, 1b \n" | ||
377 | "2: \n" | ||
378 | " .set pop \n" | ||
379 | : "=&r" (retval), "=R" (*m) | ||
380 | : "R" (*m), "Jr" (old), "Jr" (new) | ||
381 | : "memory"); | ||
382 | } else if (cpu_has_llsc) { | ||
383 | __asm__ __volatile__( | ||
384 | " .set push \n" | ||
385 | " .set noat \n" | ||
386 | " .set mips3 \n" | ||
387 | "1: lld %0, %2 # __cmpxchg_u64 \n" | ||
388 | " bne %0, %z3, 2f \n" | ||
389 | " move $1, %z4 \n" | ||
390 | " scd $1, %1 \n" | ||
391 | " beqz $1, 1b \n" | ||
392 | "2: \n" | ||
393 | " .set pop \n" | ||
394 | : "=&r" (retval), "=R" (*m) | ||
395 | : "R" (*m), "Jr" (old), "Jr" (new) | ||
396 | : "memory"); | ||
397 | } else { | ||
398 | unsigned long flags; | ||
399 | |||
400 | local_irq_save(flags); | ||
401 | retval = *m; | ||
402 | if (retval == old) | ||
403 | *m = new; | ||
404 | local_irq_restore(flags); /* implies memory barrier */ | ||
405 | } | ||
406 | |||
407 | return retval; | ||
408 | } | ||
409 | |||
410 | #else | ||
411 | extern unsigned long __cmpxchg_u64_unsupported_on_32bit_kernels( | ||
412 | volatile int * m, unsigned long old, unsigned long new); | ||
413 | #define __cmpxchg_u64 __cmpxchg_u64_unsupported_on_32bit_kernels | ||
414 | extern unsigned long __cmpxchg_u64_local_unsupported_on_32bit_kernels( | ||
415 | volatile int * m, unsigned long old, unsigned long new); | ||
416 | #define __cmpxchg_u64_local __cmpxchg_u64_local_unsupported_on_32bit_kernels | ||
417 | #endif | ||
418 | |||
419 | /* This function doesn't exist, so you'll get a linker error | ||
420 | if something tries to do an invalid cmpxchg(). */ | ||
421 | extern void __cmpxchg_called_with_bad_pointer(void); | ||
422 | |||
423 | static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, | ||
424 | unsigned long new, int size) | ||
425 | { | ||
426 | switch (size) { | ||
427 | case 4: | ||
428 | return __cmpxchg_u32(ptr, old, new); | ||
429 | case 8: | ||
430 | return __cmpxchg_u64(ptr, old, new); | ||
431 | } | ||
432 | __cmpxchg_called_with_bad_pointer(); | ||
433 | return old; | ||
434 | } | ||
435 | |||
436 | static inline unsigned long __cmpxchg_local(volatile void * ptr, | ||
437 | unsigned long old, unsigned long new, int size) | ||
438 | { | ||
439 | switch (size) { | ||
440 | case 4: | ||
441 | return __cmpxchg_u32_local(ptr, old, new); | ||
442 | case 8: | ||
443 | return __cmpxchg_u64_local(ptr, old, new); | ||
444 | } | ||
445 | __cmpxchg_called_with_bad_pointer(); | ||
446 | return old; | ||
447 | } | ||
448 | |||
449 | #define cmpxchg(ptr,old,new) \ | ||
450 | ((__typeof__(*(ptr)))__cmpxchg((ptr), \ | ||
451 | (unsigned long)(old), (unsigned long)(new),sizeof(*(ptr)))) | ||
452 | |||
453 | #define cmpxchg_local(ptr,old,new) \ | ||
454 | ((__typeof__(*(ptr)))__cmpxchg_local((ptr), \ | ||
455 | (unsigned long)(old), (unsigned long)(new),sizeof(*(ptr)))) | ||
456 | |||
457 | extern void set_handler (unsigned long offset, void *addr, unsigned long len); | 198 | extern void set_handler (unsigned long offset, void *addr, unsigned long len); |
458 | extern void set_uncached_handler (unsigned long offset, void *addr, unsigned long len); | 199 | extern void set_uncached_handler (unsigned long offset, void *addr, unsigned long len); |
459 | 200 | ||
diff --git a/include/asm-mips/termbits.h b/include/asm-mips/termbits.h index 5bfdc3b64510..c83c68444e86 100644 --- a/include/asm-mips/termbits.h +++ b/include/asm-mips/termbits.h | |||
@@ -164,6 +164,7 @@ struct ktermios { | |||
164 | #define HUPCL 0002000 /* Hang up on last close. */ | 164 | #define HUPCL 0002000 /* Hang up on last close. */ |
165 | #define CLOCAL 0004000 /* Ignore modem status lines. */ | 165 | #define CLOCAL 0004000 /* Ignore modem status lines. */ |
166 | #define CBAUDEX 0010000 | 166 | #define CBAUDEX 0010000 |
167 | #define BOTHER 0010000 | ||
167 | #define B57600 0010001 | 168 | #define B57600 0010001 |
168 | #define B115200 0010002 | 169 | #define B115200 0010002 |
169 | #define B230400 0010003 | 170 | #define B230400 0010003 |
@@ -179,9 +180,11 @@ struct ktermios { | |||
179 | #define B3000000 0010015 | 180 | #define B3000000 0010015 |
180 | #define B3500000 0010016 | 181 | #define B3500000 0010016 |
181 | #define B4000000 0010017 | 182 | #define B4000000 0010017 |
182 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 183 | #define CIBAUD 002003600000 /* input baud rate */ |
183 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 184 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
184 | #define CRTSCTS 020000000000 /* flow control */ | 185 | #define CRTSCTS 020000000000 /* flow control */ |
186 | |||
187 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
185 | 188 | ||
186 | /* c_lflag bits */ | 189 | /* c_lflag bits */ |
187 | #define ISIG 0000001 /* Enable signals. */ | 190 | #define ISIG 0000001 /* Enable signals. */ |
diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h index 2ce07f4be369..a275661fa7e1 100644 --- a/include/asm-mips/termios.h +++ b/include/asm-mips/termios.h | |||
@@ -122,8 +122,10 @@ struct termio { | |||
122 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 122 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
123 | }) | 123 | }) |
124 | 124 | ||
125 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 125 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
126 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 126 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
127 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
128 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
127 | 129 | ||
128 | #endif /* defined(__KERNEL__) */ | 130 | #endif /* defined(__KERNEL__) */ |
129 | 131 | ||
diff --git a/include/asm-mips/tx4927/toshiba_rbtx4927.h b/include/asm-mips/tx4927/toshiba_rbtx4927.h index 5dc40a867774..a60649569c2c 100644 --- a/include/asm-mips/tx4927/toshiba_rbtx4927.h +++ b/include/asm-mips/tx4927/toshiba_rbtx4927.h | |||
@@ -50,7 +50,7 @@ | |||
50 | 50 | ||
51 | 51 | ||
52 | #define RBTX4927_RTL_8019_BASE (0x1c020280-TBTX4927_ISA_IO_OFFSET) | 52 | #define RBTX4927_RTL_8019_BASE (0x1c020280-TBTX4927_ISA_IO_OFFSET) |
53 | #define RBTX4927_RTL_8019_IRQ (29) | 53 | #define RBTX4927_RTL_8019_IRQ (TX4927_IRQ_PIC_BEG + 5) |
54 | 54 | ||
55 | int toshiba_rbtx4927_irq_nested(int sw_irq); | 55 | int toshiba_rbtx4927_irq_nested(int sw_irq); |
56 | 56 | ||
diff --git a/include/asm-mips/tx4927/tx4927.h b/include/asm-mips/tx4927/tx4927.h index de85bd2245f7..4bd4368e188c 100644 --- a/include/asm-mips/tx4927/tx4927.h +++ b/include/asm-mips/tx4927/tx4927.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define __ASM_TX4927_TX4927_H | 28 | #define __ASM_TX4927_TX4927_H |
29 | 29 | ||
30 | #include <asm/tx4927/tx4927_mips.h> | 30 | #include <asm/tx4927/tx4927_mips.h> |
31 | #include <asm/txx9irq.h> | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | This register naming came from the integrated CPU/controller name TX4927 | 34 | This register naming came from the integrated CPU/controller name TX4927 |
@@ -421,32 +422,6 @@ | |||
421 | #define TX4927_PIO_LIMIT 0xf50f | 422 | #define TX4927_PIO_LIMIT 0xf50f |
422 | 423 | ||
423 | 424 | ||
424 | /* TX4927 Interrupt Controller (32-bit registers) */ | ||
425 | #define TX4927_IRC_BASE 0xf510 | ||
426 | #define TX4927_IRC_IRFLAG0 0xf510 | ||
427 | #define TX4927_IRC_IRFLAG1 0xf514 | ||
428 | #define TX4927_IRC_IRPOL 0xf518 | ||
429 | #define TX4927_IRC_IRRCNT 0xf51c | ||
430 | #define TX4927_IRC_IRMASKINT 0xf520 | ||
431 | #define TX4927_IRC_IRMASKEXT 0xf524 | ||
432 | #define TX4927_IRC_IRDEN 0xf600 | ||
433 | #define TX4927_IRC_IRDM0 0xf604 | ||
434 | #define TX4927_IRC_IRDM1 0xf608 | ||
435 | #define TX4927_IRC_IRLVL0 0xf610 | ||
436 | #define TX4927_IRC_IRLVL1 0xf614 | ||
437 | #define TX4927_IRC_IRLVL2 0xf618 | ||
438 | #define TX4927_IRC_IRLVL3 0xf61c | ||
439 | #define TX4927_IRC_IRLVL4 0xf620 | ||
440 | #define TX4927_IRC_IRLVL5 0xf624 | ||
441 | #define TX4927_IRC_IRLVL6 0xf628 | ||
442 | #define TX4927_IRC_IRLVL7 0xf62c | ||
443 | #define TX4927_IRC_IRMSK 0xf640 | ||
444 | #define TX4927_IRC_IREDC 0xf660 | ||
445 | #define TX4927_IRC_IRPND 0xf680 | ||
446 | #define TX4927_IRC_IRCS 0xf6a0 | ||
447 | #define TX4927_IRC_LIMIT 0xf6ff | ||
448 | |||
449 | |||
450 | /* TX4927 AC-link controller (32-bit registers) */ | 425 | /* TX4927 AC-link controller (32-bit registers) */ |
451 | #define TX4927_ACLC_BASE 0xf700 | 426 | #define TX4927_ACLC_BASE 0xf700 |
452 | #define TX4927_ACLC_ACCTLEN 0xf700 | 427 | #define TX4927_ACLC_ACCTLEN 0xf700 |
@@ -493,25 +468,11 @@ | |||
493 | #define TX4927_WR( reg, val ) TX4927_WR32( reg, val ) | 468 | #define TX4927_WR( reg, val ) TX4927_WR32( reg, val ) |
494 | 469 | ||
495 | 470 | ||
471 | #define TX4927_IRQ_CP0_BEG MIPS_CPU_IRQ_BASE | ||
472 | #define TX4927_IRQ_CP0_END (MIPS_CPU_IRQ_BASE + 8 - 1) | ||
496 | 473 | ||
497 | 474 | #define TX4927_IRQ_PIC_BEG TXX9_IRQ_BASE | |
498 | 475 | #define TX4927_IRQ_PIC_END (TXX9_IRQ_BASE + TXx9_MAX_IR - 1) | |
499 | #define MI8259_IRQ_ISA_RAW_BEG 0 /* optional backplane i8259 */ | ||
500 | #define MI8259_IRQ_ISA_RAW_END 15 | ||
501 | #define TX4927_IRQ_CP0_RAW_BEG 0 /* tx4927 cpu built-in cp0 */ | ||
502 | #define TX4927_IRQ_CP0_RAW_END 7 | ||
503 | #define TX4927_IRQ_PIC_RAW_BEG 0 /* tx4927 cpu build-in pic */ | ||
504 | #define TX4927_IRQ_PIC_RAW_END 31 | ||
505 | |||
506 | |||
507 | #define MI8259_IRQ_ISA_BEG MI8259_IRQ_ISA_RAW_BEG /* 0 */ | ||
508 | #define MI8259_IRQ_ISA_END MI8259_IRQ_ISA_RAW_END /* 15 */ | ||
509 | |||
510 | #define TX4927_IRQ_CP0_BEG ((MI8259_IRQ_ISA_END+1)+TX4927_IRQ_CP0_RAW_BEG) /* 16 */ | ||
511 | #define TX4927_IRQ_CP0_END ((MI8259_IRQ_ISA_END+1)+TX4927_IRQ_CP0_RAW_END) /* 23 */ | ||
512 | |||
513 | #define TX4927_IRQ_PIC_BEG ((TX4927_IRQ_CP0_END+1)+TX4927_IRQ_PIC_RAW_BEG) /* 24 */ | ||
514 | #define TX4927_IRQ_PIC_END ((TX4927_IRQ_CP0_END+1)+TX4927_IRQ_PIC_RAW_END) /* 55 */ | ||
515 | 476 | ||
516 | 477 | ||
517 | #define TX4927_IRQ_USER0 (TX4927_IRQ_CP0_BEG+0) | 478 | #define TX4927_IRQ_USER0 (TX4927_IRQ_CP0_BEG+0) |
diff --git a/include/asm-mips/tx4927/tx4927_pci.h b/include/asm-mips/tx4927/tx4927_pci.h index 66c064690f41..f98b2bb719d5 100644 --- a/include/asm-mips/tx4927/tx4927_pci.h +++ b/include/asm-mips/tx4927/tx4927_pci.h | |||
@@ -48,7 +48,7 @@ | |||
48 | #define TX4927_PCI_CLK_ACK 0x04 | 48 | #define TX4927_PCI_CLK_ACK 0x04 |
49 | #define TX4927_PCI_CLK_ACE 0x02 | 49 | #define TX4927_PCI_CLK_ACE 0x02 |
50 | #define TX4927_PCI_CLK_ENDIAN 0x01 | 50 | #define TX4927_PCI_CLK_ENDIAN 0x01 |
51 | #define TX4927_NR_IRQ_LOCAL (8+16) | 51 | #define TX4927_NR_IRQ_LOCAL TX4927_IRQ_PIC_BEG |
52 | #define TX4927_NR_IRQ_IRC 32 /* On-Chip IRC */ | 52 | #define TX4927_NR_IRQ_IRC 32 /* On-Chip IRC */ |
53 | 53 | ||
54 | #define TX4927_IR_PCIC 16 | 54 | #define TX4927_IR_PCIC 16 |
@@ -99,21 +99,6 @@ struct tx4927_ccfg_reg { | |||
99 | volatile unsigned long long ramp; | 99 | volatile unsigned long long ramp; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | struct tx4927_irc_reg { | ||
103 | volatile unsigned long cer; | ||
104 | volatile unsigned long cr[2]; | ||
105 | volatile unsigned long unused0; | ||
106 | volatile unsigned long ilr[8]; | ||
107 | volatile unsigned long unused1[4]; | ||
108 | volatile unsigned long imr; | ||
109 | volatile unsigned long unused2[7]; | ||
110 | volatile unsigned long scr; | ||
111 | volatile unsigned long unused3[7]; | ||
112 | volatile unsigned long ssr; | ||
113 | volatile unsigned long unused4[7]; | ||
114 | volatile unsigned long csr; | ||
115 | }; | ||
116 | |||
117 | struct tx4927_pcic_reg { | 102 | struct tx4927_pcic_reg { |
118 | volatile unsigned long pciid; | 103 | volatile unsigned long pciid; |
119 | volatile unsigned long pcistatus; | 104 | volatile unsigned long pcistatus; |
@@ -182,11 +167,6 @@ struct tx4927_pcic_reg { | |||
182 | 167 | ||
183 | #endif /* _LANGUAGE_ASSEMBLY */ | 168 | #endif /* _LANGUAGE_ASSEMBLY */ |
184 | 169 | ||
185 | /* IRCSR : Int. Current Status */ | ||
186 | #define TX4927_IRCSR_IF 0x00010000 | ||
187 | #define TX4927_IRCSR_ILV_MASK 0x00000700 | ||
188 | #define TX4927_IRCSR_IVL_MASK 0x0000001f | ||
189 | |||
190 | /* | 170 | /* |
191 | * PCIC | 171 | * PCIC |
192 | */ | 172 | */ |
@@ -278,7 +258,6 @@ struct tx4927_pcic_reg { | |||
278 | #define tx4927_pcicptr ((struct tx4927_pcic_reg *)TX4927_PCIC_REG) | 258 | #define tx4927_pcicptr ((struct tx4927_pcic_reg *)TX4927_PCIC_REG) |
279 | #define tx4927_ccfgptr ((struct tx4927_ccfg_reg *)TX4927_CCFG_REG) | 259 | #define tx4927_ccfgptr ((struct tx4927_ccfg_reg *)TX4927_CCFG_REG) |
280 | #define tx4927_ebuscptr ((struct tx4927_ebusc_reg *)TX4927_EBUSC_REG) | 260 | #define tx4927_ebuscptr ((struct tx4927_ebusc_reg *)TX4927_EBUSC_REG) |
281 | #define tx4927_ircptr ((struct tx4927_irc_reg *)TX4927_IRC_REG) | ||
282 | 261 | ||
283 | #endif /* _LANGUAGE_ASSEMBLY */ | 262 | #endif /* _LANGUAGE_ASSEMBLY */ |
284 | 263 | ||
diff --git a/include/asm-mips/tx4938/rbtx4938.h b/include/asm-mips/tx4938/rbtx4938.h index 74e7d8061e58..b14acb575be2 100644 --- a/include/asm-mips/tx4938/rbtx4938.h +++ b/include/asm-mips/tx4938/rbtx4938.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
16 | #include <asm/tx4938/tx4938.h> | 16 | #include <asm/tx4938/tx4938.h> |
17 | #include <asm/txx9irq.h> | ||
17 | 18 | ||
18 | /* CS */ | 19 | /* CS */ |
19 | #define RBTX4938_CE0 0x1c000000 /* 64M */ | 20 | #define RBTX4938_CE0 0x1c000000 /* 64M */ |
@@ -123,21 +124,11 @@ | |||
123 | #define RBTX4938_NR_IRQ_IRC 32 /* On-Chip IRC */ | 124 | #define RBTX4938_NR_IRQ_IRC 32 /* On-Chip IRC */ |
124 | #define RBTX4938_NR_IRQ_IOC 8 | 125 | #define RBTX4938_NR_IRQ_IOC 8 |
125 | 126 | ||
126 | #define MI8259_IRQ_ISA_RAW_BEG 0 /* optional backplane i8259 */ | 127 | #define TX4938_IRQ_CP0_BEG MIPS_CPU_IRQ_BASE |
127 | #define MI8259_IRQ_ISA_RAW_END 15 | 128 | #define TX4938_IRQ_CP0_END (MIPS_CPU_IRQ_BASE + 8 - 1) |
128 | #define TX4938_IRQ_CP0_RAW_BEG 0 /* tx4938 cpu built-in cp0 */ | ||
129 | #define TX4938_IRQ_CP0_RAW_END 7 | ||
130 | #define TX4938_IRQ_PIC_RAW_BEG 0 /* tx4938 cpu build-in pic */ | ||
131 | #define TX4938_IRQ_PIC_RAW_END 31 | ||
132 | 129 | ||
133 | #define MI8259_IRQ_ISA_BEG MI8259_IRQ_ISA_RAW_BEG /* 0 */ | 130 | #define TX4938_IRQ_PIC_BEG TXX9_IRQ_BASE |
134 | #define MI8259_IRQ_ISA_END MI8259_IRQ_ISA_RAW_END /* 15 */ | 131 | #define TX4938_IRQ_PIC_END (TXX9_IRQ_BASE + TXx9_MAX_IR - 1) |
135 | |||
136 | #define TX4938_IRQ_CP0_BEG ((MI8259_IRQ_ISA_END+1)+TX4938_IRQ_CP0_RAW_BEG) /* 16 */ | ||
137 | #define TX4938_IRQ_CP0_END ((MI8259_IRQ_ISA_END+1)+TX4938_IRQ_CP0_RAW_END) /* 23 */ | ||
138 | |||
139 | #define TX4938_IRQ_PIC_BEG ((TX4938_IRQ_CP0_END+1)+TX4938_IRQ_PIC_RAW_BEG) /* 24 */ | ||
140 | #define TX4938_IRQ_PIC_END ((TX4938_IRQ_CP0_END+1)+TX4938_IRQ_PIC_RAW_END) /* 55 */ | ||
141 | #define TX4938_IRQ_NEST_EXT_ON_PIC (TX4938_IRQ_PIC_BEG+2) | 132 | #define TX4938_IRQ_NEST_EXT_ON_PIC (TX4938_IRQ_PIC_BEG+2) |
142 | #define TX4938_IRQ_NEST_PIC_ON_CP0 (TX4938_IRQ_CP0_BEG+2) | 133 | #define TX4938_IRQ_NEST_PIC_ON_CP0 (TX4938_IRQ_CP0_BEG+2) |
143 | #define TX4938_IRQ_USER0 (TX4938_IRQ_CP0_BEG+0) | 134 | #define TX4938_IRQ_USER0 (TX4938_IRQ_CP0_BEG+0) |
@@ -192,10 +183,4 @@ | |||
192 | #define RBTX4938_RTL_8019_BASE (RBTX4938_ETHER_ADDR - mips_io_port_base) | 183 | #define RBTX4938_RTL_8019_BASE (RBTX4938_ETHER_ADDR - mips_io_port_base) |
193 | #define RBTX4938_RTL_8019_IRQ (RBTX4938_IRQ_ETHER) | 184 | #define RBTX4938_RTL_8019_IRQ (RBTX4938_IRQ_ETHER) |
194 | 185 | ||
195 | /* IRCR : Int. Control */ | ||
196 | #define TX4938_IRCR_LOW 0x00000000 | ||
197 | #define TX4938_IRCR_HIGH 0x00000001 | ||
198 | #define TX4938_IRCR_DOWN 0x00000002 | ||
199 | #define TX4938_IRCR_UP 0x00000003 | ||
200 | |||
201 | #endif /* __ASM_TX_BOARDS_RBTX4938_H */ | 186 | #endif /* __ASM_TX_BOARDS_RBTX4938_H */ |
diff --git a/include/asm-mips/tx4938/tx4938.h b/include/asm-mips/tx4938/tx4938.h index e25b1a0975cb..afdb19813ca1 100644 --- a/include/asm-mips/tx4938/tx4938.h +++ b/include/asm-mips/tx4938/tx4938.h | |||
@@ -272,20 +272,6 @@ struct tx4938_pio_reg { | |||
272 | volatile unsigned long maskcpu; | 272 | volatile unsigned long maskcpu; |
273 | volatile unsigned long maskext; | 273 | volatile unsigned long maskext; |
274 | }; | 274 | }; |
275 | struct tx4938_irc_reg { | ||
276 | volatile unsigned long cer; | ||
277 | volatile unsigned long cr[2]; | ||
278 | volatile unsigned long unused0; | ||
279 | volatile unsigned long ilr[8]; | ||
280 | volatile unsigned long unused1[4]; | ||
281 | volatile unsigned long imr; | ||
282 | volatile unsigned long unused2[7]; | ||
283 | volatile unsigned long scr; | ||
284 | volatile unsigned long unused3[7]; | ||
285 | volatile unsigned long ssr; | ||
286 | volatile unsigned long unused4[7]; | ||
287 | volatile unsigned long csr; | ||
288 | }; | ||
289 | 275 | ||
290 | struct tx4938_ndfmc_reg { | 276 | struct tx4938_ndfmc_reg { |
291 | endian_def_l2(unused0, dtr); | 277 | endian_def_l2(unused0, dtr); |
@@ -646,39 +632,12 @@ struct tx4938_ccfg_reg { | |||
646 | #define TX4938_DMA_CSR_DESERR 0x00000002 | 632 | #define TX4938_DMA_CSR_DESERR 0x00000002 |
647 | #define TX4938_DMA_CSR_SORERR 0x00000001 | 633 | #define TX4938_DMA_CSR_SORERR 0x00000001 |
648 | 634 | ||
649 | /* TX4938 Interrupt Controller (32-bit registers) */ | ||
650 | #define TX4938_IRC_BASE 0xf510 | ||
651 | #define TX4938_IRC_IRFLAG0 0xf510 | ||
652 | #define TX4938_IRC_IRFLAG1 0xf514 | ||
653 | #define TX4938_IRC_IRPOL 0xf518 | ||
654 | #define TX4938_IRC_IRRCNT 0xf51c | ||
655 | #define TX4938_IRC_IRMASKINT 0xf520 | ||
656 | #define TX4938_IRC_IRMASKEXT 0xf524 | ||
657 | #define TX4938_IRC_IRDEN 0xf600 | ||
658 | #define TX4938_IRC_IRDM0 0xf604 | ||
659 | #define TX4938_IRC_IRDM1 0xf608 | ||
660 | #define TX4938_IRC_IRLVL0 0xf610 | ||
661 | #define TX4938_IRC_IRLVL1 0xf614 | ||
662 | #define TX4938_IRC_IRLVL2 0xf618 | ||
663 | #define TX4938_IRC_IRLVL3 0xf61c | ||
664 | #define TX4938_IRC_IRLVL4 0xf620 | ||
665 | #define TX4938_IRC_IRLVL5 0xf624 | ||
666 | #define TX4938_IRC_IRLVL6 0xf628 | ||
667 | #define TX4938_IRC_IRLVL7 0xf62c | ||
668 | #define TX4938_IRC_IRMSK 0xf640 | ||
669 | #define TX4938_IRC_IREDC 0xf660 | ||
670 | #define TX4938_IRC_IRPND 0xf680 | ||
671 | #define TX4938_IRC_IRCS 0xf6a0 | ||
672 | #define TX4938_IRC_LIMIT 0xf6ff | ||
673 | |||
674 | |||
675 | #ifndef __ASSEMBLY__ | 635 | #ifndef __ASSEMBLY__ |
676 | 636 | ||
677 | #define tx4938_sdramcptr ((struct tx4938_sdramc_reg *)TX4938_SDRAMC_REG) | 637 | #define tx4938_sdramcptr ((struct tx4938_sdramc_reg *)TX4938_SDRAMC_REG) |
678 | #define tx4938_ebuscptr ((struct tx4938_ebusc_reg *)TX4938_EBUSC_REG) | 638 | #define tx4938_ebuscptr ((struct tx4938_ebusc_reg *)TX4938_EBUSC_REG) |
679 | #define tx4938_dmaptr(ch) ((struct tx4938_dma_reg *)TX4938_DMA_REG(ch)) | 639 | #define tx4938_dmaptr(ch) ((struct tx4938_dma_reg *)TX4938_DMA_REG(ch)) |
680 | #define tx4938_ndfmcptr ((struct tx4938_ndfmc_reg *)TX4938_NDFMC_REG) | 640 | #define tx4938_ndfmcptr ((struct tx4938_ndfmc_reg *)TX4938_NDFMC_REG) |
681 | #define tx4938_ircptr ((struct tx4938_irc_reg *)TX4938_IRC_REG) | ||
682 | #define tx4938_pcicptr ((struct tx4938_pcic_reg *)TX4938_PCIC_REG) | 641 | #define tx4938_pcicptr ((struct tx4938_pcic_reg *)TX4938_PCIC_REG) |
683 | #define tx4938_pcic1ptr ((struct tx4938_pcic_reg *)TX4938_PCIC1_REG) | 642 | #define tx4938_pcic1ptr ((struct tx4938_pcic_reg *)TX4938_PCIC1_REG) |
684 | #define tx4938_ccfgptr ((struct tx4938_ccfg_reg *)TX4938_CCFG_REG) | 643 | #define tx4938_ccfgptr ((struct tx4938_ccfg_reg *)TX4938_CCFG_REG) |
diff --git a/include/asm-mips/txx9irq.h b/include/asm-mips/txx9irq.h new file mode 100644 index 000000000000..1c439e51b875 --- /dev/null +++ b/include/asm-mips/txx9irq.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * include/asm-mips/txx9irq.h | ||
3 | * TX39/TX49 interrupt controller definitions. | ||
4 | * | ||
5 | * This file is subject to the terms and conditions of the GNU General Public | ||
6 | * License. See the file "COPYING" in the main directory of this archive | ||
7 | * for more details. | ||
8 | */ | ||
9 | #ifndef __ASM_TXX9IRQ_H | ||
10 | #define __ASM_TXX9IRQ_H | ||
11 | |||
12 | #include <irq.h> | ||
13 | |||
14 | #ifdef CONFIG_IRQ_CPU | ||
15 | #define TXX9_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8) | ||
16 | #else | ||
17 | #define TXX9_IRQ_BASE 0 | ||
18 | #endif | ||
19 | |||
20 | #ifdef CONFIG_CPU_TX39XX | ||
21 | #define TXx9_MAX_IR 16 | ||
22 | #else | ||
23 | #define TXx9_MAX_IR 32 | ||
24 | #endif | ||
25 | |||
26 | void txx9_irq_init(unsigned long baseaddr); | ||
27 | int txx9_irq(void); | ||
28 | int txx9_irq_set_pri(int irc_irq, int new_pri); | ||
29 | |||
30 | #endif /* __ASM_TXX9IRQ_H */ | ||
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index c0fed91da3a2..4cc9bcec0564 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -15,6 +15,16 @@ extern unsigned long parisc_vmerge_max_size; | |||
15 | #define virt_to_bus virt_to_phys | 15 | #define virt_to_bus virt_to_phys |
16 | #define bus_to_virt phys_to_virt | 16 | #define bus_to_virt phys_to_virt |
17 | 17 | ||
18 | static inline unsigned long isa_bus_to_virt(unsigned long addr) { | ||
19 | BUG(); | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | static inline unsigned long isa_virt_to_bus(void *addr) { | ||
24 | BUG(); | ||
25 | return 0; | ||
26 | } | ||
27 | |||
18 | /* | 28 | /* |
19 | * Memory mapped I/O | 29 | * Memory mapped I/O |
20 | * | 30 | * |
diff --git a/include/asm-parisc/vga.h b/include/asm-parisc/vga.h new file mode 100644 index 000000000000..154a84c843a7 --- /dev/null +++ b/include/asm-parisc/vga.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_PARISC_VGA_H__ | ||
2 | #define __ASM_PARISC_VGA_H__ | ||
3 | |||
4 | /* nothing */ | ||
5 | |||
6 | #endif __ASM_PARISC_VGA_H__ | ||
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 8836c0f1f2f7..5bde3980bf49 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -130,6 +130,7 @@ struct spu { | |||
130 | u64 flags; | 130 | u64 flags; |
131 | u64 dar; | 131 | u64 dar; |
132 | u64 dsisr; | 132 | u64 dsisr; |
133 | u64 class_0_pending; | ||
133 | size_t ls_size; | 134 | size_t ls_size; |
134 | unsigned int slb_replace; | 135 | unsigned int slb_replace; |
135 | struct mm_struct *mm; | 136 | struct mm_struct *mm; |
@@ -138,7 +139,6 @@ struct spu { | |||
138 | unsigned long long timestamp; | 139 | unsigned long long timestamp; |
139 | pid_t pid; | 140 | pid_t pid; |
140 | pid_t tgid; | 141 | pid_t tgid; |
141 | int class_0_pending; | ||
142 | spinlock_t register_lock; | 142 | spinlock_t register_lock; |
143 | 143 | ||
144 | void (* wbox_callback)(struct spu *spu); | 144 | void (* wbox_callback)(struct spu *spu); |
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index d7f5ddfbaac7..c104c15c6625 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -149,6 +149,11 @@ static inline u64 get_tb(void) | |||
149 | } | 149 | } |
150 | #endif /* !CONFIG_PPC64 */ | 150 | #endif /* !CONFIG_PPC64 */ |
151 | 151 | ||
152 | static inline u64 get_tb_or_rtc(void) | ||
153 | { | ||
154 | return __USE_RTC() ? get_rtc() : get_tb(); | ||
155 | } | ||
156 | |||
152 | static inline void set_tb(unsigned int upper, unsigned int lower) | 157 | static inline void set_tb(unsigned int upper, unsigned int lower) |
153 | { | 158 | { |
154 | mtspr(SPRN_TBWL, 0); | 159 | mtspr(SPRN_TBWL, 0); |
diff --git a/include/asm-sh/flat.h b/include/asm-sh/flat.h index 0d5cc04ab005..dc4f5950dafa 100644 --- a/include/asm-sh/flat.h +++ b/include/asm-sh/flat.h | |||
@@ -16,8 +16,9 @@ | |||
16 | #define flat_argvp_envp_on_stack() 0 | 16 | #define flat_argvp_envp_on_stack() 0 |
17 | #define flat_old_ram_flag(flags) (flags) | 17 | #define flat_old_ram_flag(flags) (flags) |
18 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 18 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
19 | #define flat_get_addr_from_rp(rp, relval, flags) get_unaligned(rp) | 19 | #define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp) |
20 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) | 20 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) |
21 | #define flat_get_relocate_addr(rel) (rel) | 21 | #define flat_get_relocate_addr(rel) (rel) |
22 | #define flat_set_persistent(relval, p) 0 | ||
22 | 23 | ||
23 | #endif /* __ASM_SH_FLAT_H */ | 24 | #endif /* __ASM_SH_FLAT_H */ |
diff --git a/include/asm-sparc/tlbflush.h b/include/asm-sparc/tlbflush.h index 4a3b66618e75..a619da5cfaa9 100644 --- a/include/asm-sparc/tlbflush.h +++ b/include/asm-sparc/tlbflush.h | |||
@@ -57,6 +57,10 @@ BTFIXUPDEF_CALL(void, flush_tlb_page, struct vm_area_struct *, unsigned long) | |||
57 | /* | 57 | /* |
58 | * This is a kludge, until I know better. --zaitcev XXX | 58 | * This is a kludge, until I know better. --zaitcev XXX |
59 | */ | 59 | */ |
60 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() | 60 | static inline void flush_tlb_kernel_range(unsigned long start, |
61 | unsigned long end) | ||
62 | { | ||
63 | flush_tlb_all(); | ||
64 | } | ||
61 | 65 | ||
62 | #endif /* _SPARC_TLBFLUSH_H */ | 66 | #endif /* _SPARC_TLBFLUSH_H */ |
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h index d5a4559b9555..5111e8717be3 100644 --- a/include/asm-sparc64/device.h +++ b/include/asm-sparc64/device.h | |||
@@ -16,8 +16,6 @@ struct dev_archdata { | |||
16 | 16 | ||
17 | struct device_node *prom_node; | 17 | struct device_node *prom_node; |
18 | struct of_device *op; | 18 | struct of_device *op; |
19 | |||
20 | unsigned int msi_num; | ||
21 | }; | 19 | }; |
22 | 20 | ||
23 | #endif /* _ASM_SPARC64_DEVICE_H */ | 21 | #endif /* _ASM_SPARC64_DEVICE_H */ |
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index e6c436ef9356..c00ad152771b 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -16,21 +16,21 @@ | |||
16 | #include <asm/ptrace.h> | 16 | #include <asm/ptrace.h> |
17 | 17 | ||
18 | /* IMAP/ICLR register defines */ | 18 | /* IMAP/ICLR register defines */ |
19 | #define IMAP_VALID 0x80000000 /* IRQ Enabled */ | 19 | #define IMAP_VALID 0x80000000UL /* IRQ Enabled */ |
20 | #define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ | 20 | #define IMAP_TID_UPA 0x7c000000UL /* UPA TargetID */ |
21 | #define IMAP_TID_JBUS 0x7c000000 /* JBUS TargetID */ | 21 | #define IMAP_TID_JBUS 0x7c000000UL /* JBUS TargetID */ |
22 | #define IMAP_TID_SHIFT 26 | 22 | #define IMAP_TID_SHIFT 26 |
23 | #define IMAP_AID_SAFARI 0x7c000000 /* Safari AgentID */ | 23 | #define IMAP_AID_SAFARI 0x7c000000UL /* Safari AgentID */ |
24 | #define IMAP_AID_SHIFT 26 | 24 | #define IMAP_AID_SHIFT 26 |
25 | #define IMAP_NID_SAFARI 0x03e00000 /* Safari NodeID */ | 25 | #define IMAP_NID_SAFARI 0x03e00000UL /* Safari NodeID */ |
26 | #define IMAP_NID_SHIFT 21 | 26 | #define IMAP_NID_SHIFT 21 |
27 | #define IMAP_IGN 0x000007c0 /* IRQ Group Number */ | 27 | #define IMAP_IGN 0x000007c0UL /* IRQ Group Number */ |
28 | #define IMAP_INO 0x0000003f /* IRQ Number */ | 28 | #define IMAP_INO 0x0000003fUL /* IRQ Number */ |
29 | #define IMAP_INR 0x000007ff /* Full interrupt number*/ | 29 | #define IMAP_INR 0x000007ffUL /* Full interrupt number*/ |
30 | 30 | ||
31 | #define ICLR_IDLE 0x00000000 /* Idle state */ | 31 | #define ICLR_IDLE 0x00000000UL /* Idle state */ |
32 | #define ICLR_TRANSMIT 0x00000001 /* Transmit state */ | 32 | #define ICLR_TRANSMIT 0x00000001UL /* Transmit state */ |
33 | #define ICLR_PENDING 0x00000003 /* Pending state */ | 33 | #define ICLR_PENDING 0x00000003UL /* Pending state */ |
34 | 34 | ||
35 | /* The largest number of unique interrupt sources we support. | 35 | /* The largest number of unique interrupt sources we support. |
36 | * If this needs to ever be larger than 255, you need to change | 36 | * If this needs to ever be larger than 255, you need to change |
@@ -53,6 +53,9 @@ extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, | |||
53 | extern void sun4v_destroy_msi(unsigned int virt_irq); | 53 | extern void sun4v_destroy_msi(unsigned int virt_irq); |
54 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); | 54 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); |
55 | 55 | ||
56 | extern void sparc64_set_msi(unsigned int virt_irq, u32 msi); | ||
57 | extern u32 sparc64_get_msi(unsigned int virt_irq); | ||
58 | |||
56 | extern void fixup_irqs(void); | 59 | extern void fixup_irqs(void); |
57 | 60 | ||
58 | static __inline__ void set_softint(unsigned long bits) | 61 | static __inline__ void set_softint(unsigned long bits) |
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h index 86dc5c018a19..55c5bb27e4da 100644 --- a/include/asm-sparc64/oplib.h +++ b/include/asm-sparc64/oplib.h | |||
@@ -297,11 +297,7 @@ extern void prom_sun4v_guest_soft_state(void); | |||
297 | extern int prom_ihandle2path(int handle, char *buffer, int bufsize); | 297 | extern int prom_ihandle2path(int handle, char *buffer, int bufsize); |
298 | 298 | ||
299 | /* Client interface level routines. */ | 299 | /* Client interface level routines. */ |
300 | extern void prom_set_trap_table(unsigned long tba); | ||
301 | extern void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa); | ||
302 | |||
303 | extern long p1275_cmd(const char *, long, ...); | 300 | extern long p1275_cmd(const char *, long, ...); |
304 | |||
305 | 301 | ||
306 | #if 0 | 302 | #if 0 |
307 | #define P1275_SIZE(x) ((((long)((x) / 32)) << 32) | (x)) | 303 | #define P1275_SIZE(x) ((((long)((x) / 32)) << 32) | (x)) |
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S index e3f010bd12b3..cb0248616d49 100644 --- a/include/asm-um/common.lds.S +++ b/include/asm-um/common.lds.S | |||
@@ -16,82 +16,112 @@ | |||
16 | 16 | ||
17 | . = ALIGN(4096); | 17 | . = ALIGN(4096); |
18 | .note : { *(.note.*) } | 18 | .note : { *(.note.*) } |
19 | __start___ex_table = .; | 19 | __ex_table : { |
20 | __ex_table : { *(__ex_table) } | 20 | __start___ex_table = .; |
21 | __stop___ex_table = .; | 21 | *(__ex_table) |
22 | __stop___ex_table = .; | ||
23 | } | ||
22 | 24 | ||
23 | BUG_TABLE | 25 | BUG_TABLE |
24 | 26 | ||
25 | __uml_setup_start = .; | 27 | .uml.setup.init : { |
26 | .uml.setup.init : { *(.uml.setup.init) } | 28 | __uml_setup_start = .; |
27 | __uml_setup_end = .; | 29 | *(.uml.setup.init) |
30 | __uml_setup_end = .; | ||
31 | } | ||
28 | 32 | ||
29 | __uml_help_start = .; | 33 | .uml.help.init : { |
30 | .uml.help.init : { *(.uml.help.init) } | 34 | __uml_help_start = .; |
31 | __uml_help_end = .; | 35 | *(.uml.help.init) |
36 | __uml_help_end = .; | ||
37 | } | ||
32 | 38 | ||
33 | __uml_postsetup_start = .; | 39 | .uml.postsetup.init : { |
34 | .uml.postsetup.init : { *(.uml.postsetup.init) } | 40 | __uml_postsetup_start = .; |
35 | __uml_postsetup_end = .; | 41 | *(.uml.postsetup.init) |
42 | __uml_postsetup_end = .; | ||
43 | } | ||
36 | 44 | ||
37 | __setup_start = .; | 45 | .init.setup : { |
38 | .init.setup : { *(.init.setup) } | 46 | __setup_start = .; |
39 | __setup_end = .; | 47 | *(.init.setup) |
48 | __setup_end = .; | ||
49 | } | ||
40 | 50 | ||
41 | . = ALIGN(32); | 51 | . = ALIGN(32); |
42 | __per_cpu_start = . ; | 52 | .data.percpu : { |
43 | .data.percpu : { *(.data.percpu) } | 53 | __per_cpu_start = . ; |
44 | __per_cpu_end = . ; | 54 | *(.data.percpu) |
55 | __per_cpu_end = . ; | ||
56 | } | ||
45 | 57 | ||
46 | __initcall_start = .; | ||
47 | .initcall.init : { | 58 | .initcall.init : { |
59 | __initcall_start = .; | ||
48 | INITCALLS | 60 | INITCALLS |
61 | __initcall_end = .; | ||
49 | } | 62 | } |
50 | __initcall_end = .; | ||
51 | 63 | ||
52 | __con_initcall_start = .; | 64 | .con_initcall.init : { |
53 | .con_initcall.init : { *(.con_initcall.init) } | 65 | __con_initcall_start = .; |
54 | __con_initcall_end = .; | 66 | *(.con_initcall.init) |
67 | __con_initcall_end = .; | ||
68 | } | ||
55 | 69 | ||
56 | __uml_initcall_start = .; | 70 | .uml.initcall.init : { |
57 | .uml.initcall.init : { *(.uml.initcall.init) } | 71 | __uml_initcall_start = .; |
58 | __uml_initcall_end = .; | 72 | *(.uml.initcall.init) |
73 | __uml_initcall_end = .; | ||
74 | } | ||
59 | __init_end = .; | 75 | __init_end = .; |
60 | 76 | ||
61 | SECURITY_INIT | 77 | SECURITY_INIT |
62 | 78 | ||
63 | __exitcall_begin = .; | 79 | .exitcall : { |
64 | .exitcall : { *(.exitcall.exit) } | 80 | __exitcall_begin = .; |
65 | __exitcall_end = .; | 81 | *(.exitcall.exit) |
82 | __exitcall_end = .; | ||
83 | } | ||
66 | 84 | ||
67 | __uml_exitcall_begin = .; | 85 | .uml.exitcall : { |
68 | .uml.exitcall : { *(.uml.exitcall.exit) } | 86 | __uml_exitcall_begin = .; |
69 | __uml_exitcall_end = .; | 87 | *(.uml.exitcall.exit) |
88 | __uml_exitcall_end = .; | ||
89 | } | ||
70 | 90 | ||
71 | . = ALIGN(4); | 91 | . = ALIGN(4); |
72 | __alt_instructions = .; | 92 | .altinstructions : { |
73 | .altinstructions : { *(.altinstructions) } | 93 | __alt_instructions = .; |
74 | __alt_instructions_end = .; | 94 | *(.altinstructions) |
95 | __alt_instructions_end = .; | ||
96 | } | ||
75 | .altinstr_replacement : { *(.altinstr_replacement) } | 97 | .altinstr_replacement : { *(.altinstr_replacement) } |
76 | /* .exit.text is discard at runtime, not link time, to deal with references | 98 | /* .exit.text is discard at runtime, not link time, to deal with references |
77 | from .altinstructions and .eh_frame */ | 99 | from .altinstructions and .eh_frame */ |
78 | .exit.text : { *(.exit.text) } | 100 | .exit.text : { *(.exit.text) } |
79 | .exit.data : { *(.exit.data) } | 101 | .exit.data : { *(.exit.data) } |
80 | 102 | ||
81 | __preinit_array_start = .; | 103 | .preinit_array : { |
82 | .preinit_array : { *(.preinit_array) } | 104 | __preinit_array_start = .; |
83 | __preinit_array_end = .; | 105 | *(.preinit_array) |
84 | __init_array_start = .; | 106 | __preinit_array_end = .; |
85 | .init_array : { *(.init_array) } | 107 | } |
86 | __init_array_end = .; | 108 | .init_array : { |
87 | __fini_array_start = .; | 109 | __init_array_start = .; |
88 | .fini_array : { *(.fini_array) } | 110 | *(.init_array) |
89 | __fini_array_end = .; | 111 | __init_array_end = .; |
112 | } | ||
113 | .fini_array : { | ||
114 | __fini_array_start = .; | ||
115 | *(.fini_array) | ||
116 | __fini_array_end = .; | ||
117 | } | ||
90 | 118 | ||
91 | . = ALIGN(4096); | 119 | . = ALIGN(4096); |
92 | __initramfs_start = .; | 120 | .init.ramfs : { |
93 | .init.ramfs : { *(.init.ramfs) } | 121 | __initramfs_start = .; |
94 | __initramfs_end = .; | 122 | *(.init.ramfs) |
123 | __initramfs_end = .; | ||
124 | } | ||
95 | 125 | ||
96 | /* Sections to be discarded */ | 126 | /* Sections to be discarded */ |
97 | /DISCARD/ : { | 127 | /DISCARD/ : { |
diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h index 8a8246d03936..857471c49dac 100644 --- a/include/asm-um/elf-x86_64.h +++ b/include/asm-um/elf-x86_64.h | |||
@@ -6,7 +6,9 @@ | |||
6 | #ifndef __UM_ELF_X86_64_H | 6 | #ifndef __UM_ELF_X86_64_H |
7 | #define __UM_ELF_X86_64_H | 7 | #define __UM_ELF_X86_64_H |
8 | 8 | ||
9 | #include <linux/sched.h> | ||
9 | #include <asm/user.h> | 10 | #include <asm/user.h> |
11 | #include "skas.h" | ||
10 | 12 | ||
11 | /* x86-64 relocation types, taken from asm-x86_64/elf.h */ | 13 | /* x86-64 relocation types, taken from asm-x86_64/elf.h */ |
12 | #define R_X86_64_NONE 0 /* No reloc */ | 14 | #define R_X86_64_NONE 0 /* No reloc */ |
@@ -64,6 +66,44 @@ typedef struct { } elf_fpregset_t; | |||
64 | PT_REGS_R15(regs) = 0; \ | 66 | PT_REGS_R15(regs) = 0; \ |
65 | } while (0) | 67 | } while (0) |
66 | 68 | ||
69 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ | ||
70 | (pr_reg)[0] = (regs)->regs.skas.regs[0]; \ | ||
71 | (pr_reg)[1] = (regs)->regs.skas.regs[1]; \ | ||
72 | (pr_reg)[2] = (regs)->regs.skas.regs[2]; \ | ||
73 | (pr_reg)[3] = (regs)->regs.skas.regs[3]; \ | ||
74 | (pr_reg)[4] = (regs)->regs.skas.regs[4]; \ | ||
75 | (pr_reg)[5] = (regs)->regs.skas.regs[5]; \ | ||
76 | (pr_reg)[6] = (regs)->regs.skas.regs[6]; \ | ||
77 | (pr_reg)[7] = (regs)->regs.skas.regs[7]; \ | ||
78 | (pr_reg)[8] = (regs)->regs.skas.regs[8]; \ | ||
79 | (pr_reg)[9] = (regs)->regs.skas.regs[9]; \ | ||
80 | (pr_reg)[10] = (regs)->regs.skas.regs[10]; \ | ||
81 | (pr_reg)[11] = (regs)->regs.skas.regs[11]; \ | ||
82 | (pr_reg)[12] = (regs)->regs.skas.regs[12]; \ | ||
83 | (pr_reg)[13] = (regs)->regs.skas.regs[13]; \ | ||
84 | (pr_reg)[14] = (regs)->regs.skas.regs[14]; \ | ||
85 | (pr_reg)[15] = (regs)->regs.skas.regs[15]; \ | ||
86 | (pr_reg)[16] = (regs)->regs.skas.regs[16]; \ | ||
87 | (pr_reg)[17] = (regs)->regs.skas.regs[17]; \ | ||
88 | (pr_reg)[18] = (regs)->regs.skas.regs[18]; \ | ||
89 | (pr_reg)[19] = (regs)->regs.skas.regs[19]; \ | ||
90 | (pr_reg)[20] = (regs)->regs.skas.regs[20]; \ | ||
91 | (pr_reg)[21] = current->thread.arch.fs; \ | ||
92 | (pr_reg)[22] = 0; \ | ||
93 | (pr_reg)[23] = 0; \ | ||
94 | (pr_reg)[24] = 0; \ | ||
95 | (pr_reg)[25] = 0; \ | ||
96 | (pr_reg)[26] = 0; | ||
97 | |||
98 | static inline int elf_core_copy_fpregs(struct task_struct *t, | ||
99 | elf_fpregset_t *fpu) | ||
100 | { | ||
101 | int cpu = current_thread->cpu; | ||
102 | return save_fp_registers(userspace_pid[cpu], (unsigned long *) fpu); | ||
103 | } | ||
104 | |||
105 | #define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu) | ||
106 | |||
67 | #ifdef TIF_IA32 /* XXX */ | 107 | #ifdef TIF_IA32 /* XXX */ |
68 | #error XXX, indeed | 108 | #error XXX, indeed |
69 | clear_thread_flag(TIF_IA32); | 109 | clear_thread_flag(TIF_IA32); |
diff --git a/include/asm-v850/flat.h b/include/asm-v850/flat.h index 3888f59d6881..17f0ea566611 100644 --- a/include/asm-v850/flat.h +++ b/include/asm-v850/flat.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define flat_stack_align(sp) /* nothing needed */ | 25 | #define flat_stack_align(sp) /* nothing needed */ |
26 | #define flat_argvp_envp_on_stack() 0 | 26 | #define flat_argvp_envp_on_stack() 0 |
27 | #define flat_old_ram_flag(flags) (flags) | 27 | #define flat_old_ram_flag(flags) (flags) |
28 | #define flat_set_persistent(relval, p) 0 | ||
28 | 29 | ||
29 | /* We store the type of relocation in the top 4 bits of the `relval.' */ | 30 | /* We store the type of relocation in the top 4 bits of the `relval.' */ |
30 | 31 | ||
@@ -46,7 +47,8 @@ flat_get_relocate_addr (unsigned long relval) | |||
46 | For the v850, RP should always be half-word aligned. */ | 47 | For the v850, RP should always be half-word aligned. */ |
47 | static inline unsigned long flat_get_addr_from_rp (unsigned long *rp, | 48 | static inline unsigned long flat_get_addr_from_rp (unsigned long *rp, |
48 | unsigned long relval, | 49 | unsigned long relval, |
49 | unsigned long flags) | 50 | unsigned long flags, |
51 | unsigned long *persistent) | ||
50 | { | 52 | { |
51 | short *srp = (short *)rp; | 53 | short *srp = (short *)rp; |
52 | 54 | ||
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index 969d225a9350..d9f2e54324d5 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -109,6 +109,12 @@ extern int mpc_default_type; | |||
109 | /* 1 if "noapic" boot option passed */ | 109 | /* 1 if "noapic" boot option passed */ |
110 | extern int skip_ioapic_setup; | 110 | extern int skip_ioapic_setup; |
111 | 111 | ||
112 | static inline void disable_ioapic_setup(void) | ||
113 | { | ||
114 | skip_ioapic_setup = 1; | ||
115 | } | ||
116 | |||
117 | |||
112 | /* | 118 | /* |
113 | * If we use the IO-APIC for IRQ routing, disable automatic | 119 | * If we use the IO-APIC for IRQ routing, disable automatic |
114 | * assignment of PCI IRQ's. | 120 | * assignment of PCI IRQ's. |
diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h index b467be6d367f..8bb564687860 100644 --- a/include/asm-x86_64/pgalloc.h +++ b/include/asm-x86_64/pgalloc.h | |||
@@ -4,10 +4,6 @@ | |||
4 | #include <asm/pda.h> | 4 | #include <asm/pda.h> |
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/quicklist.h> | ||
8 | |||
9 | #define QUICK_PGD 0 /* We preserve special mappings over free */ | ||
10 | #define QUICK_PT 1 /* Other page table pages that are zero on free */ | ||
11 | 7 | ||
12 | #define pmd_populate_kernel(mm, pmd, pte) \ | 8 | #define pmd_populate_kernel(mm, pmd, pte) \ |
13 | set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte))) | 9 | set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte))) |
@@ -24,23 +20,23 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p | |||
24 | static inline void pmd_free(pmd_t *pmd) | 20 | static inline void pmd_free(pmd_t *pmd) |
25 | { | 21 | { |
26 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | 22 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); |
27 | quicklist_free(QUICK_PT, NULL, pmd); | 23 | free_page((unsigned long)pmd); |
28 | } | 24 | } |
29 | 25 | ||
30 | static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr) | 26 | static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr) |
31 | { | 27 | { |
32 | return (pmd_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); | 28 | return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); |
33 | } | 29 | } |
34 | 30 | ||
35 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) | 31 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) |
36 | { | 32 | { |
37 | return (pud_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); | 33 | return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); |
38 | } | 34 | } |
39 | 35 | ||
40 | static inline void pud_free (pud_t *pud) | 36 | static inline void pud_free (pud_t *pud) |
41 | { | 37 | { |
42 | BUG_ON((unsigned long)pud & (PAGE_SIZE-1)); | 38 | BUG_ON((unsigned long)pud & (PAGE_SIZE-1)); |
43 | quicklist_free(QUICK_PT, NULL, pud); | 39 | free_page((unsigned long)pud); |
44 | } | 40 | } |
45 | 41 | ||
46 | static inline void pgd_list_add(pgd_t *pgd) | 42 | static inline void pgd_list_add(pgd_t *pgd) |
@@ -61,57 +57,41 @@ static inline void pgd_list_del(pgd_t *pgd) | |||
61 | spin_unlock(&pgd_lock); | 57 | spin_unlock(&pgd_lock); |
62 | } | 58 | } |
63 | 59 | ||
64 | static inline void pgd_ctor(void *x) | 60 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
65 | { | 61 | { |
66 | unsigned boundary; | 62 | unsigned boundary; |
67 | pgd_t *pgd = x; | 63 | pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); |
68 | struct page *page = virt_to_page(pgd); | 64 | if (!pgd) |
69 | 65 | return NULL; | |
66 | pgd_list_add(pgd); | ||
70 | /* | 67 | /* |
71 | * Copy kernel pointers in from init. | 68 | * Copy kernel pointers in from init. |
69 | * Could keep a freelist or slab cache of those because the kernel | ||
70 | * part never changes. | ||
72 | */ | 71 | */ |
73 | boundary = pgd_index(__PAGE_OFFSET); | 72 | boundary = pgd_index(__PAGE_OFFSET); |
73 | memset(pgd, 0, boundary * sizeof(pgd_t)); | ||
74 | memcpy(pgd + boundary, | 74 | memcpy(pgd + boundary, |
75 | init_level4_pgt + boundary, | 75 | init_level4_pgt + boundary, |
76 | (PTRS_PER_PGD - boundary) * sizeof(pgd_t)); | 76 | (PTRS_PER_PGD - boundary) * sizeof(pgd_t)); |
77 | |||
78 | spin_lock(&pgd_lock); | ||
79 | list_add(&page->lru, &pgd_list); | ||
80 | spin_unlock(&pgd_lock); | ||
81 | } | ||
82 | |||
83 | static inline void pgd_dtor(void *x) | ||
84 | { | ||
85 | pgd_t *pgd = x; | ||
86 | struct page *page = virt_to_page(pgd); | ||
87 | |||
88 | spin_lock(&pgd_lock); | ||
89 | list_del(&page->lru); | ||
90 | spin_unlock(&pgd_lock); | ||
91 | } | ||
92 | |||
93 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | ||
94 | { | ||
95 | pgd_t *pgd = (pgd_t *)quicklist_alloc(QUICK_PGD, | ||
96 | GFP_KERNEL|__GFP_REPEAT, pgd_ctor); | ||
97 | return pgd; | 77 | return pgd; |
98 | } | 78 | } |
99 | 79 | ||
100 | static inline void pgd_free(pgd_t *pgd) | 80 | static inline void pgd_free(pgd_t *pgd) |
101 | { | 81 | { |
102 | BUG_ON((unsigned long)pgd & (PAGE_SIZE-1)); | 82 | BUG_ON((unsigned long)pgd & (PAGE_SIZE-1)); |
103 | quicklist_free(QUICK_PGD, pgd_dtor, pgd); | 83 | pgd_list_del(pgd); |
84 | free_page((unsigned long)pgd); | ||
104 | } | 85 | } |
105 | 86 | ||
106 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 87 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
107 | { | 88 | { |
108 | return (pte_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); | 89 | return (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); |
109 | } | 90 | } |
110 | 91 | ||
111 | static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | 92 | static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) |
112 | { | 93 | { |
113 | void *p = (void *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); | 94 | void *p = (void *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); |
114 | |||
115 | if (!p) | 95 | if (!p) |
116 | return NULL; | 96 | return NULL; |
117 | return virt_to_page(p); | 97 | return virt_to_page(p); |
@@ -123,22 +103,17 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long add | |||
123 | static inline void pte_free_kernel(pte_t *pte) | 103 | static inline void pte_free_kernel(pte_t *pte) |
124 | { | 104 | { |
125 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); | 105 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); |
126 | quicklist_free(QUICK_PT, NULL, pte); | 106 | free_page((unsigned long)pte); |
127 | } | 107 | } |
128 | 108 | ||
129 | static inline void pte_free(struct page *pte) | 109 | static inline void pte_free(struct page *pte) |
130 | { | 110 | { |
131 | quicklist_free_page(QUICK_PT, NULL, pte); | 111 | __free_page(pte); |
132 | } | 112 | } |
133 | 113 | ||
134 | #define __pte_free_tlb(tlb,pte) quicklist_free_page(QUICK_PT, NULL,(pte)) | 114 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) |
135 | 115 | ||
136 | #define __pmd_free_tlb(tlb,x) quicklist_free(QUICK_PT, NULL, (x)) | 116 | #define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) |
137 | #define __pud_free_tlb(tlb,x) quicklist_free(QUICK_PT, NULL, (x)) | 117 | #define __pud_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) |
138 | 118 | ||
139 | static inline void check_pgt_cache(void) | ||
140 | { | ||
141 | quicklist_trim(QUICK_PGD, pgd_dtor, 25, 16); | ||
142 | quicklist_trim(QUICK_PT, NULL, 25, 16); | ||
143 | } | ||
144 | #endif /* _X86_64_PGALLOC_H */ | 119 | #endif /* _X86_64_PGALLOC_H */ |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index c9d8764c89d1..57dd6b3107ea 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -411,6 +411,7 @@ pte_t *lookup_address(unsigned long addr); | |||
411 | #define HAVE_ARCH_UNMAPPED_AREA | 411 | #define HAVE_ARCH_UNMAPPED_AREA |
412 | 412 | ||
413 | #define pgtable_cache_init() do { } while (0) | 413 | #define pgtable_cache_init() do { } while (0) |
414 | #define check_pgt_cache() do { } while (0) | ||
414 | 415 | ||
415 | #define PAGE_AGP PAGE_KERNEL_NOCACHE | 416 | #define PAGE_AGP PAGE_KERNEL_NOCACHE |
416 | #define HAVE_PAGE_AGP 1 | 417 | #define HAVE_PAGE_AGP 1 |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 19525175b91c..31f579b828f2 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -371,7 +371,7 @@ static inline void sync_core(void) | |||
371 | #define ARCH_HAS_PREFETCH | 371 | #define ARCH_HAS_PREFETCH |
372 | static inline void prefetch(void *x) | 372 | static inline void prefetch(void *x) |
373 | { | 373 | { |
374 | asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); | 374 | asm volatile("prefetcht0 (%0)" :: "r" (x)); |
375 | } | 375 | } |
376 | 376 | ||
377 | #define ARCH_HAS_PREFETCHW 1 | 377 | #define ARCH_HAS_PREFETCHW 1 |
diff --git a/include/asm-xtensa/bugs.h b/include/asm-xtensa/bugs.h index c42285320133..69b29d198249 100644 --- a/include/asm-xtensa/bugs.h +++ b/include/asm-xtensa/bugs.h | |||
@@ -13,10 +13,6 @@ | |||
13 | #ifndef _XTENSA_BUGS_H | 13 | #ifndef _XTENSA_BUGS_H |
14 | #define _XTENSA_BUGS_H | 14 | #define _XTENSA_BUGS_H |
15 | 15 | ||
16 | #include <asm/processor.h> | 16 | static void check_bugs(void) { } |
17 | |||
18 | static void __init check_bugs(void) | ||
19 | { | ||
20 | } | ||
21 | 17 | ||
22 | #endif /* _XTENSA_BUGS_H */ | 18 | #endif /* _XTENSA_BUGS_H */ |
diff --git a/include/asm-xtensa/cache.h b/include/asm-xtensa/cache.h index 1c4a78f29ae2..3bba2a540cf0 100644 --- a/include/asm-xtensa/cache.h +++ b/include/asm-xtensa/cache.h | |||
@@ -19,6 +19,15 @@ | |||
19 | 19 | ||
20 | #define DCACHE_WAY_SIZE (XCHAL_DCACHE_SIZE/XCHAL_DCACHE_WAYS) | 20 | #define DCACHE_WAY_SIZE (XCHAL_DCACHE_SIZE/XCHAL_DCACHE_WAYS) |
21 | #define ICACHE_WAY_SIZE (XCHAL_ICACHE_SIZE/XCHAL_ICACHE_WAYS) | 21 | #define ICACHE_WAY_SIZE (XCHAL_ICACHE_SIZE/XCHAL_ICACHE_WAYS) |
22 | #define DCACHE_WAY_SHIFT (XCHAL_DCACHE_SETWIDTH + XCHAL_DCACHE_LINEWIDTH) | ||
23 | #define ICACHE_WAY_SHIFT (XCHAL_ICACHE_SETWIDTH + XCHAL_ICACHE_LINEWIDTH) | ||
24 | |||
25 | /* Maximum cache size per way. */ | ||
26 | #if DCACHE_WAY_SIZE >= ICACHE_WAY_SIZE | ||
27 | # define CACHE_WAY_SIZE DCACHE_WAY_SIZE | ||
28 | #else | ||
29 | # define CACHE_WAY_SIZE ICACHE_WAY_SIZE | ||
30 | #endif | ||
22 | 31 | ||
23 | 32 | ||
24 | #endif /* _XTENSA_CACHE_H */ | 33 | #endif /* _XTENSA_CACHE_H */ |
diff --git a/include/asm-xtensa/cacheflush.h b/include/asm-xtensa/cacheflush.h index 22ef901b7845..b773c57e75a5 100644 --- a/include/asm-xtensa/cacheflush.h +++ b/include/asm-xtensa/cacheflush.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * (C) 2001 - 2006 Tensilica Inc. | 8 | * (C) 2001 - 2007 Tensilica Inc. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _XTENSA_CACHEFLUSH_H | 11 | #ifndef _XTENSA_CACHEFLUSH_H |
@@ -18,10 +18,7 @@ | |||
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * flush and invalidate data cache, invalidate instruction cache: | 21 | * Lo-level routines for cache flushing. |
22 | * | ||
23 | * __flush_invalidate_cache_all() | ||
24 | * __flush_invalidate_cache_range(from,sze) | ||
25 | * | 22 | * |
26 | * invalidate data or instruction cache: | 23 | * invalidate data or instruction cache: |
27 | * | 24 | * |
@@ -40,26 +37,39 @@ | |||
40 | * __flush_invalidate_dcache_all() | 37 | * __flush_invalidate_dcache_all() |
41 | * __flush_invalidate_dcache_page(adr) | 38 | * __flush_invalidate_dcache_page(adr) |
42 | * __flush_invalidate_dcache_range(from,size) | 39 | * __flush_invalidate_dcache_range(from,size) |
40 | * | ||
41 | * specials for cache aliasing: | ||
42 | * | ||
43 | * __flush_invalidate_dcache_page_alias(vaddr,paddr) | ||
44 | * __invalidate_icache_page_alias(vaddr,paddr) | ||
43 | */ | 45 | */ |
44 | 46 | ||
45 | extern void __flush_invalidate_cache_all(void); | 47 | extern void __invalidate_dcache_all(void); |
46 | extern void __flush_invalidate_cache_range(unsigned long, unsigned long); | ||
47 | extern void __flush_invalidate_dcache_all(void); | ||
48 | extern void __invalidate_icache_all(void); | 48 | extern void __invalidate_icache_all(void); |
49 | |||
50 | extern void __invalidate_dcache_page(unsigned long); | 49 | extern void __invalidate_dcache_page(unsigned long); |
51 | extern void __invalidate_icache_page(unsigned long); | 50 | extern void __invalidate_icache_page(unsigned long); |
52 | extern void __invalidate_icache_range(unsigned long, unsigned long); | 51 | extern void __invalidate_icache_range(unsigned long, unsigned long); |
53 | extern void __invalidate_dcache_range(unsigned long, unsigned long); | 52 | extern void __invalidate_dcache_range(unsigned long, unsigned long); |
54 | 53 | ||
54 | |||
55 | #if XCHAL_DCACHE_IS_WRITEBACK | 55 | #if XCHAL_DCACHE_IS_WRITEBACK |
56 | extern void __flush_invalidate_dcache_all(void); | ||
56 | extern void __flush_dcache_page(unsigned long); | 57 | extern void __flush_dcache_page(unsigned long); |
58 | extern void __flush_dcache_range(unsigned long, unsigned long); | ||
57 | extern void __flush_invalidate_dcache_page(unsigned long); | 59 | extern void __flush_invalidate_dcache_page(unsigned long); |
58 | extern void __flush_invalidate_dcache_range(unsigned long, unsigned long); | 60 | extern void __flush_invalidate_dcache_range(unsigned long, unsigned long); |
59 | #else | 61 | #else |
60 | # define __flush_dcache_page(p) do { } while(0) | 62 | # define __flush_dcache_range(p,s) do { } while(0) |
61 | # define __flush_invalidate_dcache_page(p) do { } while(0) | 63 | # define __flush_dcache_page(p) do { } while(0) |
62 | # define __flush_invalidate_dcache_range(p,s) do { } while(0) | 64 | # define __flush_invalidate_dcache_page(p) __invalidate_dcache_page(p) |
65 | # define __flush_invalidate_dcache_range(p,s) __invalidate_dcache_range(p,s) | ||
66 | #endif | ||
67 | |||
68 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) | ||
69 | extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long); | ||
70 | #endif | ||
71 | #if (ICACHE_WAY_SIZE > PAGE_SIZE) | ||
72 | extern void __invalidate_icache_page_alias(unsigned long, unsigned long); | ||
63 | #endif | 73 | #endif |
64 | 74 | ||
65 | /* | 75 | /* |
@@ -71,17 +81,21 @@ extern void __flush_invalidate_dcache_range(unsigned long, unsigned long); | |||
71 | * (see also Documentation/cachetlb.txt) | 81 | * (see also Documentation/cachetlb.txt) |
72 | */ | 82 | */ |
73 | 83 | ||
74 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | 84 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) |
75 | 85 | ||
76 | #define flush_cache_all() __flush_invalidate_cache_all(); | 86 | #define flush_cache_all() \ |
77 | #define flush_cache_mm(mm) __flush_invalidate_cache_all(); | 87 | do { \ |
78 | #define flush_cache_dup_mm(mm) __flush_invalidate_cache_all(); | 88 | __flush_invalidate_dcache_all(); \ |
89 | __invalidate_icache_all(); \ | ||
90 | } while (0) | ||
79 | 91 | ||
80 | #define flush_cache_vmap(start,end) __flush_invalidate_cache_all(); | 92 | #define flush_cache_mm(mm) flush_cache_all() |
81 | #define flush_cache_vunmap(start,end) __flush_invalidate_cache_all(); | 93 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
82 | 94 | ||
83 | extern void flush_dcache_page(struct page*); | 95 | #define flush_cache_vmap(start,end) flush_cache_all() |
96 | #define flush_cache_vunmap(start,end) flush_cache_all() | ||
84 | 97 | ||
98 | extern void flush_dcache_page(struct page*); | ||
85 | extern void flush_cache_range(struct vm_area_struct*, ulong, ulong); | 99 | extern void flush_cache_range(struct vm_area_struct*, ulong, ulong); |
86 | extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned long); | 100 | extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned long); |
87 | 101 | ||
@@ -101,24 +115,39 @@ extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned lon | |||
101 | 115 | ||
102 | #endif | 116 | #endif |
103 | 117 | ||
118 | /* Ensure consistency between data and instruction cache. */ | ||
104 | #define flush_icache_range(start,end) \ | 119 | #define flush_icache_range(start,end) \ |
105 | __invalidate_icache_range(start,(end)-(start)) | 120 | do { \ |
121 | __flush_dcache_range(start, (end) - (start)); \ | ||
122 | __invalidate_icache_range(start,(end) - (start)); \ | ||
123 | } while (0) | ||
106 | 124 | ||
107 | /* This is not required, see Documentation/cachetlb.txt */ | 125 | /* This is not required, see Documentation/cachetlb.txt */ |
108 | 126 | #define flush_icache_page(vma,page) do { } while (0) | |
109 | #define flush_icache_page(vma,page) do { } while(0) | ||
110 | 127 | ||
111 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 128 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
112 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 129 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
113 | 130 | ||
131 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) | ||
114 | 132 | ||
115 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 133 | extern void copy_to_user_page(struct vm_area_struct*, struct page*, |
116 | memcpy(dst, src, len) | 134 | unsigned long, void*, const void*, unsigned long); |
135 | extern void copy_from_user_page(struct vm_area_struct*, struct page*, | ||
136 | unsigned long, void*, const void*, unsigned long); | ||
137 | |||
138 | #else | ||
139 | |||
140 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
141 | do { \ | ||
142 | memcpy(dst, src, len); \ | ||
143 | __flush_dcache_range((unsigned long) dst, len); \ | ||
144 | __invalidate_icache_range((unsigned long) dst, len); \ | ||
145 | } while (0) | ||
117 | 146 | ||
118 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 147 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
119 | memcpy(dst, src, len) | 148 | memcpy(dst, src, len) |
120 | 149 | ||
121 | #endif /* __KERNEL__ */ | 150 | #endif |
122 | 151 | ||
152 | #endif /* __KERNEL__ */ | ||
123 | #endif /* _XTENSA_CACHEFLUSH_H */ | 153 | #endif /* _XTENSA_CACHEFLUSH_H */ |
124 | |||
diff --git a/include/asm-xtensa/elf.h b/include/asm-xtensa/elf.h index 1569b53cec91..7083d46766a8 100644 --- a/include/asm-xtensa/elf.h +++ b/include/asm-xtensa/elf.h | |||
@@ -20,6 +20,56 @@ | |||
20 | #define EM_XTENSA 94 | 20 | #define EM_XTENSA 94 |
21 | #define EM_XTENSA_OLD 0xABC7 | 21 | #define EM_XTENSA_OLD 0xABC7 |
22 | 22 | ||
23 | /* Xtensa relocations defined by the ABIs */ | ||
24 | |||
25 | #define R_XTENSA_NONE 0 | ||
26 | #define R_XTENSA_32 1 | ||
27 | #define R_XTENSA_RTLD 2 | ||
28 | #define R_XTENSA_GLOB_DAT 3 | ||
29 | #define R_XTENSA_JMP_SLOT 4 | ||
30 | #define R_XTENSA_RELATIVE 5 | ||
31 | #define R_XTENSA_PLT 6 | ||
32 | #define R_XTENSA_OP0 8 | ||
33 | #define R_XTENSA_OP1 9 | ||
34 | #define R_XTENSA_OP2 10 | ||
35 | #define R_XTENSA_ASM_EXPAND 11 | ||
36 | #define R_XTENSA_ASM_SIMPLIFY 12 | ||
37 | #define R_XTENSA_GNU_VTINHERIT 15 | ||
38 | #define R_XTENSA_GNU_VTENTRY 16 | ||
39 | #define R_XTENSA_DIFF8 17 | ||
40 | #define R_XTENSA_DIFF16 18 | ||
41 | #define R_XTENSA_DIFF32 19 | ||
42 | #define R_XTENSA_SLOT0_OP 20 | ||
43 | #define R_XTENSA_SLOT1_OP 21 | ||
44 | #define R_XTENSA_SLOT2_OP 22 | ||
45 | #define R_XTENSA_SLOT3_OP 23 | ||
46 | #define R_XTENSA_SLOT4_OP 24 | ||
47 | #define R_XTENSA_SLOT5_OP 25 | ||
48 | #define R_XTENSA_SLOT6_OP 26 | ||
49 | #define R_XTENSA_SLOT7_OP 27 | ||
50 | #define R_XTENSA_SLOT8_OP 28 | ||
51 | #define R_XTENSA_SLOT9_OP 29 | ||
52 | #define R_XTENSA_SLOT10_OP 30 | ||
53 | #define R_XTENSA_SLOT11_OP 31 | ||
54 | #define R_XTENSA_SLOT12_OP 32 | ||
55 | #define R_XTENSA_SLOT13_OP 33 | ||
56 | #define R_XTENSA_SLOT14_OP 34 | ||
57 | #define R_XTENSA_SLOT0_ALT 35 | ||
58 | #define R_XTENSA_SLOT1_ALT 36 | ||
59 | #define R_XTENSA_SLOT2_ALT 37 | ||
60 | #define R_XTENSA_SLOT3_ALT 38 | ||
61 | #define R_XTENSA_SLOT4_ALT 39 | ||
62 | #define R_XTENSA_SLOT5_ALT 40 | ||
63 | #define R_XTENSA_SLOT6_ALT 41 | ||
64 | #define R_XTENSA_SLOT7_ALT 42 | ||
65 | #define R_XTENSA_SLOT8_ALT 43 | ||
66 | #define R_XTENSA_SLOT9_ALT 44 | ||
67 | #define R_XTENSA_SLOT10_ALT 45 | ||
68 | #define R_XTENSA_SLOT11_ALT 46 | ||
69 | #define R_XTENSA_SLOT12_ALT 47 | ||
70 | #define R_XTENSA_SLOT13_ALT 48 | ||
71 | #define R_XTENSA_SLOT14_ALT 49 | ||
72 | |||
23 | /* ELF register definitions. This is needed for core dump support. */ | 73 | /* ELF register definitions. This is needed for core dump support. */ |
24 | 74 | ||
25 | /* | 75 | /* |
diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h index 0faa614d9696..47c3616ea9ac 100644 --- a/include/asm-xtensa/io.h +++ b/include/asm-xtensa/io.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <linux/kernel.h> | ||
17 | 18 | ||
18 | #include <linux/types.h> | 19 | #include <linux/types.h> |
19 | 20 | ||
diff --git a/include/asm-xtensa/ioctls.h b/include/asm-xtensa/ioctls.h index 39e6f23921bb..0ffa942954b9 100644 --- a/include/asm-xtensa/ioctls.h +++ b/include/asm-xtensa/ioctls.h | |||
@@ -91,6 +91,10 @@ | |||
91 | #define TIOCSBRK _IO('T', 39) /* BSD compatibility */ | 91 | #define TIOCSBRK _IO('T', 39) /* BSD compatibility */ |
92 | #define TIOCCBRK _IO('T', 40) /* BSD compatibility */ | 92 | #define TIOCCBRK _IO('T', 40) /* BSD compatibility */ |
93 | #define TIOCGSID _IOR('T', 41, pid_t) /* Return the session ID of FD*/ | 93 | #define TIOCGSID _IOR('T', 41, pid_t) /* Return the session ID of FD*/ |
94 | #define TCGETS2 _IOR('T', 42, struct termios2) | ||
95 | #define TCSETS2 _IOW('T', 43, struct termios2) | ||
96 | #define TCSETSW2 _IOW('T', 44, struct termios2) | ||
97 | #define TCSETSF2 _IOW('T', 45, struct termios2) | ||
94 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 98 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
95 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 99 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
96 | 100 | ||
diff --git a/include/asm-xtensa/page.h b/include/asm-xtensa/page.h index 1213cde75438..55ce2c9749a3 100644 --- a/include/asm-xtensa/page.h +++ b/include/asm-xtensa/page.h | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-xtensa/page.h | 2 | * include/asm-xtensa/page.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 version2 as | 5 | * it under the terms of the GNU General Public License version2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | * | 7 | * |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 8 | * Copyright (C) 2001 - 2007 Tensilica Inc. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _XTENSA_PAGE_H | 11 | #ifndef _XTENSA_PAGE_H |
@@ -14,6 +14,12 @@ | |||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | 15 | ||
16 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
17 | #include <asm/types.h> | ||
18 | #include <asm/cache.h> | ||
19 | |||
20 | /* | ||
21 | * Fixed TLB translations in the processor. | ||
22 | */ | ||
17 | 23 | ||
18 | #define XCHAL_KSEG_CACHED_VADDR 0xd0000000 | 24 | #define XCHAL_KSEG_CACHED_VADDR 0xd0000000 |
19 | #define XCHAL_KSEG_BYPASS_VADDR 0xd8000000 | 25 | #define XCHAL_KSEG_BYPASS_VADDR 0xd8000000 |
@@ -26,13 +32,60 @@ | |||
26 | */ | 32 | */ |
27 | 33 | ||
28 | #define PAGE_SHIFT 12 | 34 | #define PAGE_SHIFT 12 |
29 | #define PAGE_SIZE (1 << PAGE_SHIFT) | 35 | #define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT) |
30 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 36 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
31 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE - 1) & PAGE_MASK) | 37 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE - 1) & PAGE_MASK) |
32 | 38 | ||
33 | #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR | 39 | #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR |
34 | #define MAX_MEM_PFN XCHAL_KSEG_SIZE | 40 | #define MAX_MEM_PFN XCHAL_KSEG_SIZE |
35 | #define PGTABLE_START 0x80000000 | 41 | #define PGTABLE_START 0x80000000 |
42 | |||
43 | /* | ||
44 | * Cache aliasing: | ||
45 | * | ||
46 | * If the cache size for one way is greater than the page size, we have to | ||
47 | * deal with cache aliasing. The cache index is wider than the page size: | ||
48 | * | ||
49 | * | |cache| cache index | ||
50 | * | pfn |off| virtual address | ||
51 | * |xxxx:X|zzz| | ||
52 | * | : | | | ||
53 | * | \ / | | | ||
54 | * |trans.| | | ||
55 | * | / \ | | | ||
56 | * |yyyy:Y|zzz| physical address | ||
57 | * | ||
58 | * When the page number is translated to the physical page address, the lowest | ||
59 | * bit(s) (X) that are part of the cache index are also translated (Y). | ||
60 | * If this translation changes bit(s) (X), the cache index is also afected, | ||
61 | * thus resulting in a different cache line than before. | ||
62 | * The kernel does not provide a mechanism to ensure that the page color | ||
63 | * (represented by this bit) remains the same when allocated or when pages | ||
64 | * are remapped. When user pages are mapped into kernel space, the color of | ||
65 | * the page might also change. | ||
66 | * | ||
67 | * We use the address space VMALLOC_END ... VMALLOC_END + DCACHE_WAY_SIZE * 2 | ||
68 | * to temporarily map a patch so we can match the color. | ||
69 | */ | ||
70 | |||
71 | #if DCACHE_WAY_SIZE > PAGE_SIZE | ||
72 | # define DCACHE_ALIAS_ORDER (DCACHE_WAY_SHIFT - PAGE_SHIFT) | ||
73 | # define DCACHE_ALIAS_MASK (PAGE_MASK & (DCACHE_WAY_SIZE - 1)) | ||
74 | # define DCACHE_ALIAS(a) (((a) & DCACHE_ALIAS_MASK) >> PAGE_SHIFT) | ||
75 | # define DCACHE_ALIAS_EQ(a,b) ((((a) ^ (b)) & DCACHE_ALIAS_MASK) == 0) | ||
76 | #else | ||
77 | # define DCACHE_ALIAS_ORDER 0 | ||
78 | #endif | ||
79 | |||
80 | #if ICACHE_WAY_SIZE > PAGE_SIZE | ||
81 | # define ICACHE_ALIAS_ORDER (ICACHE_WAY_SHIFT - PAGE_SHIFT) | ||
82 | # define ICACHE_ALIAS_MASK (PAGE_MASK & (ICACHE_WAY_SIZE - 1)) | ||
83 | # define ICACHE_ALIAS(a) (((a) & ICACHE_ALIAS_MASK) >> PAGE_SHIFT) | ||
84 | # define ICACHE_ALIAS_EQ(a,b) ((((a) ^ (b)) & ICACHE_ALIAS_MASK) == 0) | ||
85 | #else | ||
86 | # define ICACHE_ALIAS_ORDER 0 | ||
87 | #endif | ||
88 | |||
36 | 89 | ||
37 | #ifdef __ASSEMBLY__ | 90 | #ifdef __ASSEMBLY__ |
38 | 91 | ||
@@ -58,34 +111,23 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
58 | 111 | ||
59 | /* | 112 | /* |
60 | * Pure 2^n version of get_order | 113 | * Pure 2^n version of get_order |
114 | * Use 'nsau' instructions if supported by the processor or the generic version. | ||
61 | */ | 115 | */ |
62 | 116 | ||
63 | static inline int get_order(unsigned long size) | 117 | #if XCHAL_HAVE_NSA |
118 | |||
119 | static inline __attribute_const__ int get_order(unsigned long size) | ||
64 | { | 120 | { |
65 | int order; | 121 | int lz; |
66 | #ifndef XCHAL_HAVE_NSU | 122 | asm ("nsau %0, %1" : "=r" (lz) : "r" ((size - 1) >> PAGE_SHIFT)); |
67 | unsigned long x1, x2, x4, x8, x16; | 123 | return 32 - lz; |
68 | |||
69 | size = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
70 | x1 = size & 0xAAAAAAAA; | ||
71 | x2 = size & 0xCCCCCCCC; | ||
72 | x4 = size & 0xF0F0F0F0; | ||
73 | x8 = size & 0xFF00FF00; | ||
74 | x16 = size & 0xFFFF0000; | ||
75 | order = x2 ? 2 : 0; | ||
76 | order += (x16 != 0) * 16; | ||
77 | order += (x8 != 0) * 8; | ||
78 | order += (x4 != 0) * 4; | ||
79 | order += (x1 != 0); | ||
80 | |||
81 | return order; | ||
82 | #else | ||
83 | size = (size - 1) >> PAGE_SHIFT; | ||
84 | asm ("nsau %0, %1" : "=r" (order) : "r" (size)); | ||
85 | return 32 - order; | ||
86 | #endif | ||
87 | } | 124 | } |
88 | 125 | ||
126 | #else | ||
127 | |||
128 | # include <asm-generic/page.h> | ||
129 | |||
130 | #endif | ||
89 | 131 | ||
90 | struct page; | 132 | struct page; |
91 | extern void clear_page(void *page); | 133 | extern void clear_page(void *page); |
@@ -96,11 +138,11 @@ extern void copy_page(void *to, void *from); | |||
96 | * some extra work | 138 | * some extra work |
97 | */ | 139 | */ |
98 | 140 | ||
99 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) | 141 | #if DCACHE_WAY_SIZE > PAGE_SIZE |
100 | void clear_user_page(void *addr, unsigned long vaddr, struct page* page); | 142 | extern void clear_user_page(void*, unsigned long, struct page*); |
101 | void copy_user_page(void *to,void* from,unsigned long vaddr,struct page* page); | 143 | extern void copy_user_page(void*, void*, unsigned long, struct page*); |
102 | #else | 144 | #else |
103 | # define clear_user_page(page,vaddr,pg) clear_page(page) | 145 | # define clear_user_page(page, vaddr, pg) clear_page(page) |
104 | # define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | 146 | # define copy_user_page(to, from, vaddr, pg) copy_page(to, from) |
105 | #endif | 147 | #endif |
106 | 148 | ||
diff --git a/include/asm-xtensa/pgalloc.h b/include/asm-xtensa/pgalloc.h index d56ddf2055e1..3e5b56525102 100644 --- a/include/asm-xtensa/pgalloc.h +++ b/include/asm-xtensa/pgalloc.h | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-xtensa/pgalloc.h | 2 | * include/asm-xtensa/pgalloc.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 |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | * | 7 | * |
8 | * Copyright (C) 2001-2005 Tensilica Inc. | 8 | * Copyright (C) 2001-2007 Tensilica Inc. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _XTENSA_PGALLOC_H | 11 | #ifndef _XTENSA_PGALLOC_H |
@@ -13,103 +13,54 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | 15 | ||
16 | #include <linux/threads.h> | ||
17 | #include <linux/highmem.h> | 16 | #include <linux/highmem.h> |
18 | #include <asm/processor.h> | ||
19 | #include <asm/cacheflush.h> | ||
20 | |||
21 | |||
22 | /* Cache aliasing: | ||
23 | * | ||
24 | * If the cache size for one way is greater than the page size, we have to | ||
25 | * deal with cache aliasing. The cache index is wider than the page size: | ||
26 | * | ||
27 | * |cache | | ||
28 | * |pgnum |page| virtual address | ||
29 | * |xxxxxX|zzzz| | ||
30 | * | | | | ||
31 | * \ / | | | ||
32 | * trans.| | | ||
33 | * / \ | | | ||
34 | * |yyyyyY|zzzz| physical address | ||
35 | * | ||
36 | * When the page number is translated to the physical page address, the lowest | ||
37 | * bit(s) (X) that are also part of the cache index are also translated (Y). | ||
38 | * If this translation changes this bit (X), the cache index is also afected, | ||
39 | * thus resulting in a different cache line than before. | ||
40 | * The kernel does not provide a mechanism to ensure that the page color | ||
41 | * (represented by this bit) remains the same when allocated or when pages | ||
42 | * are remapped. When user pages are mapped into kernel space, the color of | ||
43 | * the page might also change. | ||
44 | * | ||
45 | * We use the address space VMALLOC_END ... VMALLOC_END + DCACHE_WAY_SIZE * 2 | ||
46 | * to temporarily map a patch so we can match the color. | ||
47 | */ | ||
48 | |||
49 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) | ||
50 | # define PAGE_COLOR_MASK (PAGE_MASK & (DCACHE_WAY_SIZE-1)) | ||
51 | # define PAGE_COLOR(a) \ | ||
52 | (((unsigned long)(a)&PAGE_COLOR_MASK) >> PAGE_SHIFT) | ||
53 | # define PAGE_COLOR_EQ(a,b) \ | ||
54 | ((((unsigned long)(a) ^ (unsigned long)(b)) & PAGE_COLOR_MASK) == 0) | ||
55 | # define PAGE_COLOR_MAP0(v) \ | ||
56 | (VMALLOC_END + ((unsigned long)(v) & PAGE_COLOR_MASK)) | ||
57 | # define PAGE_COLOR_MAP1(v) \ | ||
58 | (VMALLOC_END + ((unsigned long)(v) & PAGE_COLOR_MASK) + DCACHE_WAY_SIZE) | ||
59 | #endif | ||
60 | 17 | ||
61 | /* | 18 | /* |
62 | * Allocating and freeing a pmd is trivial: the 1-entry pmd is | 19 | * Allocating and freeing a pmd is trivial: the 1-entry pmd is |
63 | * inside the pgd, so has no extra memory associated with it. | 20 | * inside the pgd, so has no extra memory associated with it. |
64 | */ | 21 | */ |
65 | 22 | ||
66 | #define pgd_free(pgd) free_page((unsigned long)(pgd)) | 23 | #define pmd_populate_kernel(mm, pmdp, ptep) \ |
67 | 24 | (pmd_val(*(pmdp)) = ((unsigned long)ptep)) | |
68 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | 25 | #define pmd_populate(mm, pmdp, page) \ |
26 | (pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page))) | ||
69 | 27 | ||
70 | static inline void | 28 | static inline pgd_t* |
71 | pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *pte) | 29 | pgd_alloc(struct mm_struct *mm) |
72 | { | 30 | { |
73 | pmd_val(*(pmdp)) = (unsigned long)(pte); | 31 | return (pgd_t*) __get_free_pages(GFP_KERNEL | __GFP_ZERO, PGD_ORDER); |
74 | __asm__ __volatile__ ("memw; dhwb %0, 0; dsync" :: "a" (pmdp)); | ||
75 | } | 32 | } |
76 | 33 | ||
77 | static inline void | 34 | static inline void pgd_free(pgd_t *pgd) |
78 | pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *page) | ||
79 | { | 35 | { |
80 | pmd_val(*(pmdp)) = (unsigned long)page_to_virt(page); | 36 | free_page((unsigned long)pgd); |
81 | __asm__ __volatile__ ("memw; dhwb %0, 0; dsync" :: "a" (pmdp)); | ||
82 | } | 37 | } |
83 | 38 | ||
39 | /* Use a slab cache for the pte pages (see also sparc64 implementation) */ | ||
84 | 40 | ||
41 | extern struct kmem_cache *pgtable_cache; | ||
85 | 42 | ||
86 | #else | 43 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
87 | 44 | unsigned long address) | |
88 | # define pmd_populate_kernel(mm, pmdp, pte) \ | ||
89 | (pmd_val(*(pmdp)) = (unsigned long)(pte)) | ||
90 | # define pmd_populate(mm, pmdp, page) \ | ||
91 | (pmd_val(*(pmdp)) = (unsigned long)page_to_virt(page)) | ||
92 | |||
93 | #endif | ||
94 | |||
95 | static inline pgd_t* | ||
96 | pgd_alloc(struct mm_struct *mm) | ||
97 | { | 45 | { |
98 | pgd_t *pgd; | 46 | return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); |
99 | 47 | } | |
100 | pgd = (pgd_t *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, PGD_ORDER); | ||
101 | |||
102 | if (likely(pgd != NULL)) | ||
103 | __flush_dcache_page((unsigned long)pgd); | ||
104 | 48 | ||
105 | return pgd; | 49 | static inline struct page *pte_alloc_one(struct mm_struct *mm, |
50 | unsigned long addr) | ||
51 | { | ||
52 | return virt_to_page(pte_alloc_one_kernel(mm, addr)); | ||
106 | } | 53 | } |
107 | 54 | ||
108 | extern pte_t* pte_alloc_one_kernel(struct mm_struct* mm, unsigned long addr); | 55 | static inline void pte_free_kernel(pte_t *pte) |
109 | extern struct page* pte_alloc_one(struct mm_struct* mm, unsigned long addr); | 56 | { |
57 | kmem_cache_free(pgtable_cache, pte); | ||
58 | } | ||
110 | 59 | ||
111 | #define pte_free_kernel(pte) free_page((unsigned long)pte) | 60 | static inline void pte_free(struct page *page) |
112 | #define pte_free(pte) __free_page(pte) | 61 | { |
62 | kmem_cache_free(pgtable_cache, page_address(page)); | ||
63 | } | ||
113 | 64 | ||
114 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
115 | #endif /* _XTENSA_PGALLOC_H */ | 66 | #endif /* _XTENSA_PGALLOC_H */ |
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h index 06850f3b26a7..c0fcc1c9660c 100644 --- a/include/asm-xtensa/pgtable.h +++ b/include/asm-xtensa/pgtable.h | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-xtensa/pgtable.h | 2 | * include/asm-xtensa/pgtable.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 version2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | * | 7 | * |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 8 | * Copyright (C) 2001 - 2007 Tensilica Inc. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _XTENSA_PGTABLE_H | 11 | #ifndef _XTENSA_PGTABLE_H |
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | /* | 24 | /* |
25 | * The Xtensa architecture port of Linux has a two-level page table system, | 25 | * The Xtensa architecture port of Linux has a two-level page table system, |
26 | * i.e. the logical three-level Linux page table layout are folded. | 26 | * i.e. the logical three-level Linux page table layout is folded. |
27 | * Each task has the following memory page tables: | 27 | * Each task has the following memory page tables: |
28 | * | 28 | * |
29 | * PGD table (page directory), ie. 3rd-level page table: | 29 | * PGD table (page directory), ie. 3rd-level page table: |
@@ -43,6 +43,7 @@ | |||
43 | * | 43 | * |
44 | * The individual pages are 4 kB big with special pages for the empty_zero_page. | 44 | * The individual pages are 4 kB big with special pages for the empty_zero_page. |
45 | */ | 45 | */ |
46 | |||
46 | #define PGDIR_SHIFT 22 | 47 | #define PGDIR_SHIFT 22 |
47 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 48 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
48 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 49 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
@@ -53,24 +54,26 @@ | |||
53 | */ | 54 | */ |
54 | #define PTRS_PER_PTE 1024 | 55 | #define PTRS_PER_PTE 1024 |
55 | #define PTRS_PER_PTE_SHIFT 10 | 56 | #define PTRS_PER_PTE_SHIFT 10 |
56 | #define PTRS_PER_PMD 1 | ||
57 | #define PTRS_PER_PGD 1024 | 57 | #define PTRS_PER_PGD 1024 |
58 | #define PGD_ORDER 0 | 58 | #define PGD_ORDER 0 |
59 | #define PMD_ORDER 0 | ||
60 | #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) | 59 | #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) |
61 | #define FIRST_USER_ADDRESS 0 | 60 | #define FIRST_USER_ADDRESS 0 |
62 | #define FIRST_USER_PGD_NR (FIRST_USER_ADDRESS >> PGDIR_SHIFT) | 61 | #define FIRST_USER_PGD_NR (FIRST_USER_ADDRESS >> PGDIR_SHIFT) |
63 | 62 | ||
64 | /* virtual memory area. We keep a distance to other memory regions to be | 63 | /* |
64 | * Virtual memory area. We keep a distance to other memory regions to be | ||
65 | * on the safe side. We also use this area for cache aliasing. | 65 | * on the safe side. We also use this area for cache aliasing. |
66 | */ | 66 | */ |
67 | 67 | ||
68 | // FIXME: virtual memory area must be configuration-dependent | ||
69 | |||
70 | #define VMALLOC_START 0xC0000000 | 68 | #define VMALLOC_START 0xC0000000 |
71 | #define VMALLOC_END 0xC7FF0000 | 69 | #define VMALLOC_END 0xC6FEFFFF |
70 | #define TLBTEMP_BASE_1 0xC6FF0000 | ||
71 | #define TLBTEMP_BASE_2 0xC6FF8000 | ||
72 | #define MODULE_START 0xC7000000 | ||
73 | #define MODULE_END 0xC7FFFFFF | ||
72 | 74 | ||
73 | /* Xtensa Linux config PTE layout (when present): | 75 | /* |
76 | * Xtensa Linux config PTE layout (when present): | ||
74 | * 31-12: PPN | 77 | * 31-12: PPN |
75 | * 11-6: Software | 78 | * 11-6: Software |
76 | * 5-4: RING | 79 | * 5-4: RING |
@@ -86,47 +89,55 @@ | |||
86 | * See further below for PTE layout for swapped-out pages. | 89 | * See further below for PTE layout for swapped-out pages. |
87 | */ | 90 | */ |
88 | 91 | ||
89 | #define _PAGE_VALID (1<<0) /* hardware: page is accessible */ | 92 | #define _PAGE_HW_EXEC (1<<0) /* hardware: page is executable */ |
90 | #define _PAGE_WRENABLE (1<<1) /* hardware: page is writable */ | 93 | #define _PAGE_HW_WRITE (1<<1) /* hardware: page is writable */ |
94 | |||
95 | #define _PAGE_FILE (1<<1) /* non-linear mapping, if !present */ | ||
96 | #define _PAGE_PROTNONE (3<<0) /* special case for VM_PROT_NONE */ | ||
91 | 97 | ||
92 | /* None of these cache modes include MP coherency: */ | 98 | /* None of these cache modes include MP coherency: */ |
93 | #define _PAGE_NO_CACHE (0<<2) /* bypass, non-speculative */ | 99 | #define _PAGE_CA_BYPASS (0<<2) /* bypass, non-speculative */ |
94 | #if XCHAL_DCACHE_IS_WRITEBACK | 100 | #define _PAGE_CA_WB (1<<2) /* write-back */ |
95 | # define _PAGE_WRITEBACK (1<<2) /* write back */ | 101 | #define _PAGE_CA_WT (2<<2) /* write-through */ |
96 | # define _PAGE_WRITETHRU (2<<2) /* write through */ | 102 | #define _PAGE_CA_MASK (3<<2) |
97 | #else | 103 | #define _PAGE_INVALID (3<<2) |
98 | # define _PAGE_WRITEBACK (1<<2) /* assume write through */ | ||
99 | # define _PAGE_WRITETHRU (1<<2) | ||
100 | #endif | ||
101 | #define _PAGE_NOALLOC (3<<2) /* don't allocate cache,if not cached */ | ||
102 | #define _CACHE_MASK (3<<2) | ||
103 | 104 | ||
104 | #define _PAGE_USER (1<<4) /* user access (ring=1) */ | 105 | #define _PAGE_USER (1<<4) /* user access (ring=1) */ |
105 | #define _PAGE_KERNEL (0<<4) /* kernel access (ring=0) */ | ||
106 | 106 | ||
107 | /* Software */ | 107 | /* Software */ |
108 | #define _PAGE_RW (1<<6) /* software: page writable */ | 108 | #define _PAGE_WRITABLE_BIT 6 |
109 | #define _PAGE_WRITABLE (1<<6) /* software: page writable */ | ||
109 | #define _PAGE_DIRTY (1<<7) /* software: page dirty */ | 110 | #define _PAGE_DIRTY (1<<7) /* software: page dirty */ |
110 | #define _PAGE_ACCESSED (1<<8) /* software: page accessed (read) */ | 111 | #define _PAGE_ACCESSED (1<<8) /* software: page accessed (read) */ |
111 | #define _PAGE_FILE (1<<9) /* nonlinear file mapping*/ | ||
112 | 112 | ||
113 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _CACHE_MASK | _PAGE_DIRTY) | 113 | /* On older HW revisions, we always have to set bit 0 */ |
114 | #define _PAGE_PRESENT ( _PAGE_VALID | _PAGE_WRITEBACK | _PAGE_ACCESSED) | 114 | #if XCHAL_HW_VERSION_MAJOR < 2000 |
115 | # define _PAGE_VALID (1<<0) | ||
116 | #else | ||
117 | # define _PAGE_VALID 0 | ||
118 | #endif | ||
115 | 119 | ||
116 | #ifdef CONFIG_MMU | 120 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) |
121 | #define _PAGE_PRESENT (_PAGE_VALID | _PAGE_CA_WB | _PAGE_ACCESSED) | ||
117 | 122 | ||
118 | # define PAGE_NONE __pgprot(_PAGE_PRESENT) | 123 | #ifdef CONFIG_MMU |
119 | # define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_RW) | ||
120 | # define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER) | ||
121 | # define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER) | ||
122 | # define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_KERNEL | _PAGE_WRENABLE) | ||
123 | # define PAGE_INVALID __pgprot(_PAGE_USER) | ||
124 | 124 | ||
125 | # if (DCACHE_WAY_SIZE > PAGE_SIZE) | 125 | #define PAGE_NONE __pgprot(_PAGE_INVALID | _PAGE_USER | _PAGE_PROTNONE) |
126 | # define PAGE_DIRECTORY __pgprot(_PAGE_VALID | _PAGE_ACCESSED | _PAGE_KERNEL) | 126 | #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER) |
127 | # else | 127 | #define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC) |
128 | # define PAGE_DIRECTORY __pgprot(_PAGE_PRESENT | _PAGE_KERNEL) | 128 | #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER) |
129 | # endif | 129 | #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC) |
130 | #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE) | ||
131 | #define PAGE_SHARED_EXEC \ | ||
132 | __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE | _PAGE_HW_EXEC) | ||
133 | #define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_HW_WRITE) | ||
134 | #define PAGE_KERNEL_EXEC __pgprot(_PAGE_PRESENT|_PAGE_HW_WRITE|_PAGE_HW_EXEC) | ||
135 | |||
136 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) | ||
137 | # define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED) | ||
138 | #else | ||
139 | # define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED | _PAGE_CA_WB) | ||
140 | #endif | ||
130 | 141 | ||
131 | #else /* no mmu */ | 142 | #else /* no mmu */ |
132 | 143 | ||
@@ -145,23 +156,23 @@ | |||
145 | * What follows is the closest we can get by reasonable means.. | 156 | * What follows is the closest we can get by reasonable means.. |
146 | * See linux/mm/mmap.c for protection_map[] array that uses these definitions. | 157 | * See linux/mm/mmap.c for protection_map[] array that uses these definitions. |
147 | */ | 158 | */ |
148 | #define __P000 PAGE_NONE /* private --- */ | 159 | #define __P000 PAGE_NONE /* private --- */ |
149 | #define __P001 PAGE_READONLY /* private --r */ | 160 | #define __P001 PAGE_READONLY /* private --r */ |
150 | #define __P010 PAGE_COPY /* private -w- */ | 161 | #define __P010 PAGE_COPY /* private -w- */ |
151 | #define __P011 PAGE_COPY /* private -wr */ | 162 | #define __P011 PAGE_COPY /* private -wr */ |
152 | #define __P100 PAGE_READONLY /* private x-- */ | 163 | #define __P100 PAGE_READONLY_EXEC /* private x-- */ |
153 | #define __P101 PAGE_READONLY /* private x-r */ | 164 | #define __P101 PAGE_READONLY_EXEC /* private x-r */ |
154 | #define __P110 PAGE_COPY /* private xw- */ | 165 | #define __P110 PAGE_COPY_EXEC /* private xw- */ |
155 | #define __P111 PAGE_COPY /* private xwr */ | 166 | #define __P111 PAGE_COPY_EXEC /* private xwr */ |
156 | 167 | ||
157 | #define __S000 PAGE_NONE /* shared --- */ | 168 | #define __S000 PAGE_NONE /* shared --- */ |
158 | #define __S001 PAGE_READONLY /* shared --r */ | 169 | #define __S001 PAGE_READONLY /* shared --r */ |
159 | #define __S010 PAGE_SHARED /* shared -w- */ | 170 | #define __S010 PAGE_SHARED /* shared -w- */ |
160 | #define __S011 PAGE_SHARED /* shared -wr */ | 171 | #define __S011 PAGE_SHARED /* shared -wr */ |
161 | #define __S100 PAGE_READONLY /* shared x-- */ | 172 | #define __S100 PAGE_READONLY_EXEC /* shared x-- */ |
162 | #define __S101 PAGE_READONLY /* shared x-r */ | 173 | #define __S101 PAGE_READONLY_EXEC /* shared x-r */ |
163 | #define __S110 PAGE_SHARED /* shared xw- */ | 174 | #define __S110 PAGE_SHARED_EXEC /* shared xw- */ |
164 | #define __S111 PAGE_SHARED /* shared xwr */ | 175 | #define __S111 PAGE_SHARED_EXEC /* shared xwr */ |
165 | 176 | ||
166 | #ifndef __ASSEMBLY__ | 177 | #ifndef __ASSEMBLY__ |
167 | 178 | ||
@@ -183,35 +194,42 @@ extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)]; | |||
183 | #define pmd_page(pmd) virt_to_page(pmd_val(pmd)) | 194 | #define pmd_page(pmd) virt_to_page(pmd_val(pmd)) |
184 | 195 | ||
185 | /* | 196 | /* |
186 | * The following only work if pte_present() is true. | 197 | * pte status. |
187 | */ | 198 | */ |
188 | #define pte_none(pte) (!(pte_val(pte) ^ _PAGE_USER)) | 199 | #define pte_none(pte) (pte_val(pte) == _PAGE_INVALID) |
189 | #define pte_present(pte) (pte_val(pte) & _PAGE_VALID) | 200 | #define pte_present(pte) \ |
201 | (((pte_val(pte) & _PAGE_CA_MASK) != _PAGE_INVALID) \ | ||
202 | || ((pte_val(pte) & _PAGE_PROTNONE) == _PAGE_PROTNONE)) | ||
190 | #define pte_clear(mm,addr,ptep) \ | 203 | #define pte_clear(mm,addr,ptep) \ |
191 | do { update_pte(ptep, __pte(_PAGE_USER)); } while(0) | 204 | do { update_pte(ptep, __pte(_PAGE_INVALID)); } while(0) |
192 | 205 | ||
193 | #define pmd_none(pmd) (!pmd_val(pmd)) | 206 | #define pmd_none(pmd) (!pmd_val(pmd)) |
194 | #define pmd_present(pmd) (pmd_val(pmd) & PAGE_MASK) | 207 | #define pmd_present(pmd) (pmd_val(pmd) & PAGE_MASK) |
195 | #define pmd_clear(pmdp) do { set_pmd(pmdp, __pmd(0)); } while (0) | ||
196 | #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) | 208 | #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) |
209 | #define pmd_clear(pmdp) do { set_pmd(pmdp, __pmd(0)); } while (0) | ||
197 | 210 | ||
198 | /* Note: We use the _PAGE_USER bit to indicate write-protect kernel memory */ | 211 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; } |
199 | |||
200 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | ||
201 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 212 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
202 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 213 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
203 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 214 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
204 | static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~(_PAGE_RW | _PAGE_WRENABLE); return pte; } | 215 | static inline pte_t pte_wrprotect(pte_t pte) |
205 | static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } | 216 | { pte_val(pte) &= ~(_PAGE_WRITABLE | _PAGE_HW_WRITE); return pte; } |
206 | static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } | 217 | static inline pte_t pte_mkclean(pte_t pte) |
207 | static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } | 218 | { pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HW_WRITE); return pte; } |
208 | static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } | 219 | static inline pte_t pte_mkold(pte_t pte) |
209 | static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_RW; return pte; } | 220 | { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } |
221 | static inline pte_t pte_mkdirty(pte_t pte) | ||
222 | { pte_val(pte) |= _PAGE_DIRTY; return pte; } | ||
223 | static inline pte_t pte_mkyoung(pte_t pte) | ||
224 | { pte_val(pte) |= _PAGE_ACCESSED; return pte; } | ||
225 | static inline pte_t pte_mkwrite(pte_t pte) | ||
226 | { pte_val(pte) |= _PAGE_WRITABLE; return pte; } | ||
210 | 227 | ||
211 | /* | 228 | /* |
212 | * Conversion functions: convert a page and protection to a page entry, | 229 | * Conversion functions: convert a page and protection to a page entry, |
213 | * and a page entry and page directory to the page they refer to. | 230 | * and a page entry and page directory to the page they refer to. |
214 | */ | 231 | */ |
232 | |||
215 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) | 233 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) |
216 | #define pte_same(a,b) (pte_val(a) == pte_val(b)) | 234 | #define pte_same(a,b) (pte_val(a) == pte_val(b)) |
217 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 235 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
@@ -232,8 +250,9 @@ static inline void update_pte(pte_t *ptep, pte_t pteval) | |||
232 | { | 250 | { |
233 | *ptep = pteval; | 251 | *ptep = pteval; |
234 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | 252 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK |
235 | __asm__ __volatile__ ("memw; dhwb %0, 0; dsync" :: "a" (ptep)); | 253 | __asm__ __volatile__ ("dhwb %0, 0" :: "a" (ptep)); |
236 | #endif | 254 | #endif |
255 | |||
237 | } | 256 | } |
238 | 257 | ||
239 | struct mm_struct; | 258 | struct mm_struct; |
@@ -249,9 +268,6 @@ static inline void | |||
249 | set_pmd(pmd_t *pmdp, pmd_t pmdval) | 268 | set_pmd(pmd_t *pmdp, pmd_t pmdval) |
250 | { | 269 | { |
251 | *pmdp = pmdval; | 270 | *pmdp = pmdval; |
252 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | ||
253 | __asm__ __volatile__ ("memw; dhwb %0, 0; dsync" :: "a" (pmdp)); | ||
254 | #endif | ||
255 | } | 271 | } |
256 | 272 | ||
257 | struct vm_area_struct; | 273 | struct vm_area_struct; |
@@ -306,52 +322,34 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | |||
306 | 322 | ||
307 | /* | 323 | /* |
308 | * Encode and decode a swap entry. | 324 | * Encode and decode a swap entry. |
309 | * Each PTE in a process VM's page table is either: | ||
310 | * "present" -- valid and not swapped out, protection bits are meaningful; | ||
311 | * "not present" -- which further subdivides in these two cases: | ||
312 | * "none" -- no mapping at all; identified by pte_none(), set by pte_clear( | ||
313 | * "swapped out" -- the page is swapped out, and the SWP macros below | ||
314 | * are used to store swap file info in the PTE itself. | ||
315 | * | 325 | * |
316 | * In the Xtensa processor MMU, any PTE entries in user space (or anywhere | 326 | * Format of swap pte: |
317 | * in virtual memory that can map differently across address spaces) | 327 | * bit 0 MBZ |
318 | * must have a correct ring value that represents the RASID field that | 328 | * bit 1 page-file (must be zero) |
319 | * is changed when switching address spaces. Eg. such PTE entries cannot | 329 | * bits 2 - 3 page hw access mode (must be 11: _PAGE_INVALID) |
320 | * be set to ring zero, because that can cause a (global) kernel ASID | 330 | * bits 4 - 5 ring protection (must be 01: _PAGE_USER) |
321 | * entry to be created in the TLBs (even with invalid cache attribute), | 331 | * bits 6 - 10 swap type (5 bits -> 32 types) |
322 | * potentially causing a multihit exception when going back to another | 332 | * bits 11 - 31 swap offset / PAGE_SIZE (21 bits -> 8GB) |
323 | * address space that mapped the same virtual address at another ring. | 333 | |
324 | * | 334 | * Format of file pte: |
325 | * SO: we avoid using ring bits (_PAGE_RING_MASK) in "not present" PTEs. | 335 | * bit 0 MBZ |
326 | * We also avoid using the _PAGE_VALID bit which must be zero for non-present | 336 | * bit 1 page-file (must be one: _PAGE_FILE) |
327 | * pages. | 337 | * bits 2 - 3 page hw access mode (must be 11: _PAGE_INVALID) |
328 | * | 338 | * bits 4 - 5 ring protection (must be 01: _PAGE_USER) |
329 | * We end up with the following available bits: 1..3 and 7..31. | 339 | * bits 6 - 31 file offset / PAGE_SIZE |
330 | * We don't bother with 1..3 for now (we can use them later if needed), | ||
331 | * and chose to allocate 6 bits for SWP_TYPE and the remaining 19 bits | ||
332 | * for SWP_OFFSET. At least 5 bits are needed for SWP_TYPE, because it | ||
333 | * is currently implemented as an index into swap_info[MAX_SWAPFILES] | ||
334 | * and MAX_SWAPFILES is currently defined as 32 in <linux/swap.h>. | ||
335 | * However, for some reason all other architectures in the 2.4 kernel | ||
336 | * reserve either 6, 7, or 8 bits so I'll not detract from that for now. :) | ||
337 | * SWP_OFFSET is an offset into the swap file in page-size units, so | ||
338 | * with 4 kB pages, 19 bits supports a maximum swap file size of 2 GB. | ||
339 | * | ||
340 | * FIXME: 2 GB isn't very big. Other bits can be used to allow | ||
341 | * larger swap sizes. In the meantime, it appears relatively easy to get | ||
342 | * around the 2 GB limitation by simply using multiple swap files. | ||
343 | */ | 340 | */ |
344 | 341 | ||
345 | #define __swp_type(entry) (((entry).val >> 7) & 0x3f) | 342 | #define __swp_type(entry) (((entry).val >> 6) & 0x1f) |
346 | #define __swp_offset(entry) ((entry).val >> 13) | 343 | #define __swp_offset(entry) ((entry).val >> 11) |
347 | #define __swp_entry(type,offs) ((swp_entry_t) {((type) << 7) | ((offs) << 13)}) | 344 | #define __swp_entry(type,offs) \ |
345 | ((swp_entry_t) {((type) << 6) | ((offs) << 11) | _PAGE_INVALID}) | ||
348 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 346 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
349 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 347 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
350 | 348 | ||
351 | #define PTE_FILE_MAX_BITS 29 | 349 | #define PTE_FILE_MAX_BITS 28 |
352 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) | 350 | #define pte_to_pgoff(pte) (pte_val(pte) >> 4) |
353 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) | 351 | #define pgoff_to_pte(off) \ |
354 | 352 | ((pte_t) { ((off) << 4) | _PAGE_INVALID | _PAGE_FILE }) | |
355 | 353 | ||
356 | #endif /* !defined (__ASSEMBLY__) */ | 354 | #endif /* !defined (__ASSEMBLY__) */ |
357 | 355 | ||
@@ -394,13 +392,12 @@ extern void update_mmu_cache(struct vm_area_struct * vma, | |||
394 | * remap a physical page `pfn' of size `size' with page protection `prot' | 392 | * remap a physical page `pfn' of size `size' with page protection `prot' |
395 | * into virtual address `from' | 393 | * into virtual address `from' |
396 | */ | 394 | */ |
395 | |||
397 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | 396 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ |
398 | remap_pfn_range(vma, from, pfn, size, prot) | 397 | remap_pfn_range(vma, from, pfn, size, prot) |
399 | 398 | ||
400 | 399 | ||
401 | /* No page table caches to init */ | 400 | extern void pgtable_cache_init(void); |
402 | |||
403 | #define pgtable_cache_init() do { } while (0) | ||
404 | 401 | ||
405 | typedef pte_t *pte_addr_t; | 402 | typedef pte_t *pte_addr_t; |
406 | 403 | ||
diff --git a/include/asm-xtensa/processor.h b/include/asm-xtensa/processor.h index 4feb9f7f35a6..35145bcd96eb 100644 --- a/include/asm-xtensa/processor.h +++ b/include/asm-xtensa/processor.h | |||
@@ -33,7 +33,7 @@ | |||
33 | * the 1 GB requirement applies to the stack as well. | 33 | * the 1 GB requirement applies to the stack as well. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #define TASK_SIZE 0x40000000 | 36 | #define TASK_SIZE __XTENSA_UL_CONST(0x40000000) |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * General exception cause assigned to debug exceptions. Debug exceptions go | 39 | * General exception cause assigned to debug exceptions. Debug exceptions go |
diff --git a/include/asm-xtensa/syscall.h b/include/asm-xtensa/syscall.h index 6cb0d42f11c8..05cebf8f62b1 100644 --- a/include/asm-xtensa/syscall.h +++ b/include/asm-xtensa/syscall.h | |||
@@ -1,3 +1,13 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/syscall.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2007 Tensilica Inc. | ||
9 | */ | ||
10 | |||
1 | struct pt_regs; | 11 | struct pt_regs; |
2 | struct sigaction; | 12 | struct sigaction; |
3 | asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*); | 13 | asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*); |
@@ -17,4 +27,16 @@ asmlinkage long sys_rt_sigaction(int, | |||
17 | const struct sigaction __user *, | 27 | const struct sigaction __user *, |
18 | struct sigaction __user *, | 28 | struct sigaction __user *, |
19 | size_t); | 29 | size_t); |
20 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg); | 30 | asmlinkage long xtensa_shmat(int, char __user *, int); |
31 | asmlinkage long xtensa_fadvise64_64(int, int, | ||
32 | unsigned long long, unsigned long long); | ||
33 | |||
34 | /* Should probably move to linux/syscalls.h */ | ||
35 | struct pollfd; | ||
36 | asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, | ||
37 | fd_set __user *exp, struct timespec __user *tsp, void __user *sig); | ||
38 | asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | ||
39 | struct timespec __user *tsp, const sigset_t __user *sigmask, | ||
40 | size_t sigsetsize); | ||
41 | |||
42 | |||
diff --git a/include/asm-xtensa/termbits.h b/include/asm-xtensa/termbits.h index 9972c25ec86f..85aa6a3c0b6e 100644 --- a/include/asm-xtensa/termbits.h +++ b/include/asm-xtensa/termbits.h | |||
@@ -157,6 +157,7 @@ struct ktermios { | |||
157 | #define HUPCL 0002000 | 157 | #define HUPCL 0002000 |
158 | #define CLOCAL 0004000 | 158 | #define CLOCAL 0004000 |
159 | #define CBAUDEX 0010000 | 159 | #define CBAUDEX 0010000 |
160 | #define BOTHER 0010000 | ||
160 | #define B57600 0010001 | 161 | #define B57600 0010001 |
161 | #define B115200 0010002 | 162 | #define B115200 0010002 |
162 | #define B230400 0010003 | 163 | #define B230400 0010003 |
@@ -172,10 +173,12 @@ struct ktermios { | |||
172 | #define B3000000 0010015 | 173 | #define B3000000 0010015 |
173 | #define B3500000 0010016 | 174 | #define B3500000 0010016 |
174 | #define B4000000 0010017 | 175 | #define B4000000 0010017 |
175 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 176 | #define CIBAUD 002003600000 /* input baud rate */ |
176 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 177 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
177 | #define CRTSCTS 020000000000 /* flow control */ | 178 | #define CRTSCTS 020000000000 /* flow control */ |
178 | 179 | ||
180 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
181 | |||
179 | /* c_lflag bits */ | 182 | /* c_lflag bits */ |
180 | 183 | ||
181 | #define ISIG 0000001 | 184 | #define ISIG 0000001 |
diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h index f14b42c8dac0..4673f42f88a7 100644 --- a/include/asm-xtensa/termios.h +++ b/include/asm-xtensa/termios.h | |||
@@ -95,8 +95,10 @@ struct termio { | |||
95 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 95 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
96 | }) | 96 | }) |
97 | 97 | ||
98 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 98 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
99 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 99 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
100 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
101 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
100 | 102 | ||
101 | #endif /* __KERNEL__ */ | 103 | #endif /* __KERNEL__ */ |
102 | 104 | ||
diff --git a/include/asm-xtensa/timex.h b/include/asm-xtensa/timex.h index 28c7985a4000..a5fca59fba9e 100644 --- a/include/asm-xtensa/timex.h +++ b/include/asm-xtensa/timex.h | |||
@@ -41,10 +41,10 @@ | |||
41 | extern unsigned long ccount_per_jiffy; | 41 | extern unsigned long ccount_per_jiffy; |
42 | extern unsigned long ccount_nsec; | 42 | extern unsigned long ccount_nsec; |
43 | #define CCOUNT_PER_JIFFY ccount_per_jiffy | 43 | #define CCOUNT_PER_JIFFY ccount_per_jiffy |
44 | #define CCOUNT_NSEC ccount_nsec | 44 | #define NSEC_PER_CCOUNT ccount_nsec |
45 | #else | 45 | #else |
46 | #define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ)) | 46 | #define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ)) |
47 | #define CCOUNT_NSEC (1000000000UL / CONFIG_XTENSA_CPU_CLOCK) | 47 | #define NSEC_PER_CCOUNT (1000UL / CONFIG_XTENSA_CPU_CLOCK) |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | 50 | ||
diff --git a/include/asm-xtensa/tlb.h b/include/asm-xtensa/tlb.h index 4562b2dcfbc0..4830232017af 100644 --- a/include/asm-xtensa/tlb.h +++ b/include/asm-xtensa/tlb.h | |||
@@ -11,14 +11,36 @@ | |||
11 | #ifndef _XTENSA_TLB_H | 11 | #ifndef _XTENSA_TLB_H |
12 | #define _XTENSA_TLB_H | 12 | #define _XTENSA_TLB_H |
13 | 13 | ||
14 | #define tlb_start_vma(tlb,vma) do { } while (0) | 14 | #include <asm/cache.h> |
15 | #define tlb_end_vma(tlb,vma) do { } while (0) | 15 | #include <asm/page.h> |
16 | #define __tlb_remove_tlb_entry(tlb,pte,addr) do { } while (0) | 16 | |
17 | #if (DCACHE_WAY_SIZE <= PAGE_SIZE) | ||
18 | |||
19 | /* Note, read http://lkml.org/lkml/2004/1/15/6 */ | ||
20 | |||
21 | # define tlb_start_vma(tlb,vma) do { } while (0) | ||
22 | # define tlb_end_vma(tlb,vma) do { } while (0) | ||
23 | |||
24 | #else | ||
17 | 25 | ||
26 | # define tlb_start_vma(tlb, vma) \ | ||
27 | do { \ | ||
28 | if (!tlb->fullmm) \ | ||
29 | flush_cache_range(vma, vma->vm_start, vma->vm_end); \ | ||
30 | } while(0) | ||
31 | |||
32 | # define tlb_end_vma(tlb, vma) \ | ||
33 | do { \ | ||
34 | if (!tlb->fullmm) \ | ||
35 | flush_tlb_range(vma, vma->vm_start, vma->vm_end); \ | ||
36 | } while(0) | ||
37 | |||
38 | #endif | ||
39 | |||
40 | #define __tlb_remove_tlb_entry(tlb,pte,addr) do { } while (0) | ||
18 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) | 41 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) |
19 | 42 | ||
20 | #include <asm-generic/tlb.h> | 43 | #include <asm-generic/tlb.h> |
21 | #include <asm/page.h> | ||
22 | 44 | ||
23 | #define __pte_free_tlb(tlb,pte) pte_free(pte) | 45 | #define __pte_free_tlb(tlb,pte) pte_free(pte) |
24 | 46 | ||
diff --git a/include/asm-xtensa/types.h b/include/asm-xtensa/types.h index 9d99a8e9e337..f1e84526f999 100644 --- a/include/asm-xtensa/types.h +++ b/include/asm-xtensa/types.h | |||
@@ -11,6 +11,15 @@ | |||
11 | #ifndef _XTENSA_TYPES_H | 11 | #ifndef _XTENSA_TYPES_H |
12 | #define _XTENSA_TYPES_H | 12 | #define _XTENSA_TYPES_H |
13 | 13 | ||
14 | |||
15 | #ifdef __ASSEMBLY__ | ||
16 | # define __XTENSA_UL(x) (x) | ||
17 | # define __XTENSA_UL_CONST(x) x | ||
18 | #else | ||
19 | # define __XTENSA_UL(x) ((unsigned long)(x)) | ||
20 | # define __XTENSA_UL_CONST(x) x##UL | ||
21 | #endif | ||
22 | |||
14 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
15 | 24 | ||
16 | typedef unsigned short umode_t; | 25 | typedef unsigned short umode_t; |
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h index 9bd34024431c..92968aabe34e 100644 --- a/include/asm-xtensa/unistd.h +++ b/include/asm-xtensa/unistd.h | |||
@@ -151,7 +151,7 @@ __SYSCALL( 61, sys_fcntl64, 3) | |||
151 | #define __NR_available62 62 | 151 | #define __NR_available62 62 |
152 | __SYSCALL( 62, sys_ni_syscall, 0) | 152 | __SYSCALL( 62, sys_ni_syscall, 0) |
153 | #define __NR_fadvise64_64 63 | 153 | #define __NR_fadvise64_64 63 |
154 | __SYSCALL( 63, sys_fadvise64_64, 6) | 154 | __SYSCALL( 63, xtensa_fadvise64_64, 6) |
155 | #define __NR_utime 64 /* glibc 2.3.3 ?? */ | 155 | #define __NR_utime 64 /* glibc 2.3.3 ?? */ |
156 | __SYSCALL( 64, sys_utime, 2) | 156 | __SYSCALL( 64, sys_utime, 2) |
157 | #define __NR_utimes 65 | 157 | #define __NR_utimes 65 |
@@ -339,8 +339,8 @@ __SYSCALL(148, sys_setpgid, 2) | |||
339 | __SYSCALL(149, sys_getpgid, 1) | 339 | __SYSCALL(149, sys_getpgid, 1) |
340 | #define __NR_getppid 150 | 340 | #define __NR_getppid 150 |
341 | __SYSCALL(150, sys_getppid, 0) | 341 | __SYSCALL(150, sys_getppid, 0) |
342 | #define __NR_available151 151 | 342 | #define __NR_getpgrp 151 |
343 | __SYSCALL(151, sys_ni_syscall, 0) | 343 | __SYSCALL(151, sys_getpgrp, 0) |
344 | 344 | ||
345 | #define __NR_reserved152 152 /* set_thread_area */ | 345 | #define __NR_reserved152 152 /* set_thread_area */ |
346 | __SYSCALL(152, sys_ni_syscall, 0) | 346 | __SYSCALL(152, sys_ni_syscall, 0) |
@@ -577,7 +577,112 @@ __SYSCALL(258, sys_keyctl, 5) | |||
577 | #define __NR_available259 259 | 577 | #define __NR_available259 259 |
578 | __SYSCALL(259, sys_ni_syscall, 0) | 578 | __SYSCALL(259, sys_ni_syscall, 0) |
579 | 579 | ||
580 | #define __NR_syscall_count 261 | 580 | |
581 | #define __NR_readahead 260 | ||
582 | __SYSCALL(260, sys_readahead, 5) | ||
583 | #define __NR_remap_file_pages 261 | ||
584 | __SYSCALL(261, sys_remap_file_pages, 5) | ||
585 | #define __NR_migrate_pages 262 | ||
586 | __SYSCALL(262, sys_migrate_pages, 0) | ||
587 | #define __NR_mbind 263 | ||
588 | __SYSCALL(263, sys_mbind, 6) | ||
589 | #define __NR_get_mempolicy 264 | ||
590 | __SYSCALL(264, sys_get_mempolicy, 5) | ||
591 | #define __NR_set_mempolicy 265 | ||
592 | __SYSCALL(265, sys_set_mempolicy, 3) | ||
593 | #define __NR_unshare 266 | ||
594 | __SYSCALL(266, sys_unshare, 1) | ||
595 | #define __NR_move_pages 267 | ||
596 | __SYSCALL(267, sys_move_pages, 0) | ||
597 | #define __NR_splice 268 | ||
598 | __SYSCALL(268, sys_splice, 0) | ||
599 | #define __NR_tee 269 | ||
600 | __SYSCALL(269, sys_tee, 0) | ||
601 | #define __NR_vmsplice 270 | ||
602 | __SYSCALL(270, sys_vmsplice, 0) | ||
603 | #define __NR_available271 271 | ||
604 | __SYSCALL(271, sys_ni_syscall, 0) | ||
605 | |||
606 | #define __NR_pselect6 272 | ||
607 | __SYSCALL(272, sys_pselect6, 0) | ||
608 | #define __NR_ppoll 273 | ||
609 | __SYSCALL(273, sys_ppoll, 0) | ||
610 | #define __NR_epoll_pwait 274 | ||
611 | __SYSCALL(274, sys_epoll_pwait, 0) | ||
612 | #define __NR_available275 275 | ||
613 | __SYSCALL(275, sys_ni_syscall, 0) | ||
614 | |||
615 | #define __NR_inotify_init 276 | ||
616 | __SYSCALL(276, sys_inotify_init, 0) | ||
617 | #define __NR_inotify_add_watch 277 | ||
618 | __SYSCALL(277, sys_inotify_add_watch, 3) | ||
619 | #define __NR_inotify_rm_watch 278 | ||
620 | __SYSCALL(278, sys_inotify_rm_watch, 2) | ||
621 | #define __NR_available279 279 | ||
622 | __SYSCALL(279, sys_ni_syscall, 0) | ||
623 | |||
624 | #define __NR_getcpu 280 | ||
625 | __SYSCALL(280, sys_getcpu, 0) | ||
626 | #define __NR_kexec_load 281 | ||
627 | __SYSCALL(281, sys_ni_syscall, 0) | ||
628 | |||
629 | #define __NR_ioprio_set 282 | ||
630 | __SYSCALL(282, sys_ioprio_set, 2) | ||
631 | #define __NR_ioprio_get 283 | ||
632 | __SYSCALL(283, sys_ioprio_get, 3) | ||
633 | |||
634 | #define __NR_set_robust_list 284 | ||
635 | __SYSCALL(284, sys_set_robust_list, 3) | ||
636 | #define __NR_get_robust_list 285 | ||
637 | __SYSCALL(285, sys_get_robust_list, 3) | ||
638 | #define __NR_reserved286 286 /* sync_file_rangeX */ | ||
639 | __SYSCALL(286, sys_ni_syscall, 3) | ||
640 | #define __NR_available287 287 | ||
641 | __SYSCALL(287, sys_faccessat, 0) | ||
642 | |||
643 | /* Relative File Operations */ | ||
644 | |||
645 | #define __NR_openat 288 | ||
646 | __SYSCALL(288, sys_openat, 4) | ||
647 | #define __NR_mkdirat 289 | ||
648 | __SYSCALL(289, sys_mkdirat, 3) | ||
649 | #define __NR_mknodat 290 | ||
650 | __SYSCALL(290, sys_mknodat, 4) | ||
651 | #define __NR_unlinkat 291 | ||
652 | __SYSCALL(291, sys_unlinkat, 3) | ||
653 | #define __NR_renameat 292 | ||
654 | __SYSCALL(292, sys_renameat, 4) | ||
655 | #define __NR_linkat 293 | ||
656 | __SYSCALL(293, sys_linkat, 5) | ||
657 | #define __NR_symlinkat 294 | ||
658 | __SYSCALL(294, sys_symlinkat, 3) | ||
659 | #define __NR_readlinkat 295 | ||
660 | __SYSCALL(295, sys_readlinkat, 4) | ||
661 | #define __NR_utimensat 296 | ||
662 | __SYSCALL(296, sys_utimensat, 0) | ||
663 | #define __NR_fchownat 297 | ||
664 | __SYSCALL(297, sys_fchownat, 5) | ||
665 | #define __NR_futimesat 298 | ||
666 | __SYSCALL(298, sys_futimesat, 4) | ||
667 | #define __NR_fstatat64 299 | ||
668 | __SYSCALL(299, sys_fstatat64, 0) | ||
669 | #define __NR_fchmodat 300 | ||
670 | __SYSCALL(300, sys_fchmodat, 4) | ||
671 | #define __NR_faccessat 301 | ||
672 | __SYSCALL(301, sys_faccessat, 4) | ||
673 | #define __NR_available302 302 | ||
674 | __SYSCALL(302, sys_ni_syscall, 0) | ||
675 | #define __NR_available303 303 | ||
676 | __SYSCALL(303, sys_ni_syscall, 0) | ||
677 | |||
678 | #define __NR_signalfd 304 | ||
679 | __SYSCALL(304, sys_signalfd, 3) | ||
680 | #define __NR_timerfd 305 | ||
681 | __SYSCALL(305, sys_timerfd, 4) | ||
682 | #define __NR_eventfd 306 | ||
683 | __SYSCALL(306, sys_eventfd, 1) | ||
684 | |||
685 | #define __NR_syscall_count 307 | ||
581 | 686 | ||
582 | /* | 687 | /* |
583 | * sysxtensa syscall handler | 688 | * sysxtensa syscall handler |
@@ -612,8 +717,19 @@ __SYSCALL(259, sys_ni_syscall, 0) | |||
612 | #define __ARCH_WANT_SYS_LLSEEK | 717 | #define __ARCH_WANT_SYS_LLSEEK |
613 | #define __ARCH_WANT_SYS_RT_SIGACTION | 718 | #define __ARCH_WANT_SYS_RT_SIGACTION |
614 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 719 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
720 | #define __ARCH_WANT_SYS_GETPGRP | ||
615 | 721 | ||
616 | #endif /* __KERNEL__ */ | 722 | /* |
723 | * Ignore legacy system calls in the checksyscalls.sh script | ||
724 | */ | ||
617 | 725 | ||
618 | #endif /* _XTENSA_UNISTD_H */ | 726 | #define __IGNORE_fork /* use clone */ |
727 | #define __IGNORE_time | ||
728 | #define __IGNORE_alarm /* use setitimer */ | ||
729 | #define __IGNORE_pause | ||
730 | #define __IGNORE_mmap /* use mmap2 */ | ||
731 | #define __IGNORE_vfork /* use clone */ | ||
732 | #define __IGNORE_fadvise64 /* use fadvise64_64 */ | ||
619 | 733 | ||
734 | #endif /* __KERNEL__ */ | ||
735 | #endif /* _XTENSA_UNISTD_H */ | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index ad7f71a81b0a..818cc3a50e6b 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -7,6 +7,7 @@ header-y += raid/ | |||
7 | header-y += spi/ | 7 | header-y += spi/ |
8 | header-y += sunrpc/ | 8 | header-y += sunrpc/ |
9 | header-y += tc_act/ | 9 | header-y += tc_act/ |
10 | header-y += tc_ematch/ | ||
10 | header-y += netfilter/ | 11 | header-y += netfilter/ |
11 | header-y += netfilter_arp/ | 12 | header-y += netfilter_arp/ |
12 | header-y += netfilter_bridge/ | 13 | header-y += netfilter_bridge/ |
diff --git a/include/linux/aer.h b/include/linux/aer.h index 509656286e53..bcf236d825e8 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -15,11 +15,26 @@ extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); | |||
15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); | 15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); |
16 | extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); | 16 | extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); |
17 | #else | 17 | #else |
18 | #define pci_enable_pcie_error_reporting(dev) (-EINVAL) | 18 | static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev) |
19 | #define pci_find_aer_capability(dev) (0) | 19 | { |
20 | #define pci_disable_pcie_error_reporting(dev) (-EINVAL) | 20 | return -EINVAL; |
21 | #define pci_cleanup_aer_uncorrect_error_status(dev) (-EINVAL) | 21 | } |
22 | #define pci_cleanup_aer_correct_error_status(dev) (-EINVAL) | 22 | static inline int pci_find_aer_capability(struct pci_dev *dev) |
23 | { | ||
24 | return 0; | ||
25 | } | ||
26 | static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev) | ||
27 | { | ||
28 | return -EINVAL; | ||
29 | } | ||
30 | static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) | ||
31 | { | ||
32 | return -EINVAL; | ||
33 | } | ||
34 | static inline int pci_cleanup_aer_correct_error_status(struct pci_dev *dev) | ||
35 | { | ||
36 | return -EINVAL; | ||
37 | } | ||
23 | #endif | 38 | #endif |
24 | 39 | ||
25 | #endif //_AER_H_ | 40 | #endif //_AER_H_ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 23a22df039d8..c043c1ccf1c5 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -73,6 +73,19 @@ enum { | |||
73 | ATA_PIO5 = ATA_PIO4 | (1 << 5), | 73 | ATA_PIO5 = ATA_PIO4 | (1 << 5), |
74 | ATA_PIO6 = ATA_PIO5 | (1 << 6), | 74 | ATA_PIO6 = ATA_PIO5 | (1 << 6), |
75 | 75 | ||
76 | ATA_SWDMA0 = (1 << 0), | ||
77 | ATA_SWDMA1 = ATA_SWDMA0 | (1 << 1), | ||
78 | ATA_SWDMA2 = ATA_SWDMA1 | (1 << 2), | ||
79 | |||
80 | ATA_SWDMA2_ONLY = (1 << 2), | ||
81 | |||
82 | ATA_MWDMA0 = (1 << 0), | ||
83 | ATA_MWDMA1 = ATA_MWDMA0 | (1 << 1), | ||
84 | ATA_MWDMA2 = ATA_MWDMA1 | (1 << 2), | ||
85 | |||
86 | ATA_MWDMA12_ONLY = (1 << 1) | (1 << 2), | ||
87 | ATA_MWDMA2_ONLY = (1 << 2), | ||
88 | |||
76 | ATA_UDMA0 = (1 << 0), | 89 | ATA_UDMA0 = (1 << 0), |
77 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), | 90 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), |
78 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), | 91 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 4bbd8601b8f0..d6579df8dadf 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -63,8 +63,8 @@ | |||
63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ | 63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ |
64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ | 64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ |
65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ | 65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ |
66 | #define AUDIT_TTY_GET 1014 /* Get TTY auditing status */ | 66 | #define AUDIT_TTY_GET 1016 /* Get TTY auditing status */ |
67 | #define AUDIT_TTY_SET 1015 /* Set TTY auditing status */ | 67 | #define AUDIT_TTY_SET 1017 /* Set TTY auditing status */ |
68 | 68 | ||
69 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ | 69 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ |
70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ | 70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 1d5ded0836ee..0ad72c4cf312 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -126,16 +126,16 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | |||
126 | static inline int cpu_is_offline(int cpu) { return 0; } | 126 | static inline int cpu_is_offline(int cpu) { return 0; } |
127 | #endif /* CONFIG_HOTPLUG_CPU */ | 127 | #endif /* CONFIG_HOTPLUG_CPU */ |
128 | 128 | ||
129 | #ifdef CONFIG_SUSPEND_SMP | 129 | #ifdef CONFIG_PM_SLEEP_SMP |
130 | extern int suspend_cpu_hotplug; | 130 | extern int suspend_cpu_hotplug; |
131 | 131 | ||
132 | extern int disable_nonboot_cpus(void); | 132 | extern int disable_nonboot_cpus(void); |
133 | extern void enable_nonboot_cpus(void); | 133 | extern void enable_nonboot_cpus(void); |
134 | #else | 134 | #else /* !CONFIG_PM_SLEEP_SMP */ |
135 | #define suspend_cpu_hotplug 0 | 135 | #define suspend_cpu_hotplug 0 |
136 | 136 | ||
137 | static inline int disable_nonboot_cpus(void) { return 0; } | 137 | static inline int disable_nonboot_cpus(void) { return 0; } |
138 | static inline void enable_nonboot_cpus(void) {} | 138 | static inline void enable_nonboot_cpus(void) {} |
139 | #endif | 139 | #endif /* !CONFIG_PM_SLEEP_SMP */ |
140 | 140 | ||
141 | #endif /* _LINUX_CPU_H_ */ | 141 | #endif /* _LINUX_CPU_H_ */ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 963051a967d6..3ec6e7ff5fbd 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -32,15 +32,7 @@ | |||
32 | * CPUFREQ NOTIFIER INTERFACE * | 32 | * CPUFREQ NOTIFIER INTERFACE * |
33 | *********************************************************************/ | 33 | *********************************************************************/ |
34 | 34 | ||
35 | #ifdef CONFIG_CPU_FREQ | ||
36 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); | 35 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); |
37 | #else | ||
38 | static inline int cpufreq_register_notifier(struct notifier_block *nb, | ||
39 | unsigned int list) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | #endif | ||
44 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); | 36 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); |
45 | 37 | ||
46 | #define CPUFREQ_TRANSITION_NOTIFIER (0) | 38 | #define CPUFREQ_TRANSITION_NOTIFIER (0) |
@@ -268,22 +260,17 @@ struct freq_attr { | |||
268 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 260 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
269 | int cpufreq_update_policy(unsigned int cpu); | 261 | int cpufreq_update_policy(unsigned int cpu); |
270 | 262 | ||
263 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | ||
264 | unsigned int cpufreq_get(unsigned int cpu); | ||
271 | 265 | ||
272 | /* | 266 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ |
273 | * query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it | ||
274 | */ | ||
275 | #ifdef CONFIG_CPU_FREQ | 267 | #ifdef CONFIG_CPU_FREQ |
276 | unsigned int cpufreq_quick_get(unsigned int cpu); | 268 | unsigned int cpufreq_quick_get(unsigned int cpu); |
277 | unsigned int cpufreq_get(unsigned int cpu); | ||
278 | #else | 269 | #else |
279 | static inline unsigned int cpufreq_quick_get(unsigned int cpu) | 270 | static inline unsigned int cpufreq_quick_get(unsigned int cpu) |
280 | { | 271 | { |
281 | return 0; | 272 | return 0; |
282 | } | 273 | } |
283 | static inline unsigned int cpufreq_get(unsigned int cpu) | ||
284 | { | ||
285 | return 0; | ||
286 | } | ||
287 | #endif | 274 | #endif |
288 | 275 | ||
289 | 276 | ||
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index e6a71c82d204..3a19b032c0eb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -66,11 +66,8 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | |||
66 | * If the arch doesn't supply something else, assume that hugepage | 66 | * If the arch doesn't supply something else, assume that hugepage |
67 | * size aligned regions are ok without further preparation. | 67 | * size aligned regions are ok without further preparation. |
68 | */ | 68 | */ |
69 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, | 69 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) |
70 | pgoff_t pgoff) | ||
71 | { | 70 | { |
72 | if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) | ||
73 | return -EINVAL; | ||
74 | if (len & ~HPAGE_MASK) | 71 | if (len & ~HPAGE_MASK) |
75 | return -EINVAL; | 72 | return -EINVAL; |
76 | if (addr & ~HPAGE_MASK) | 73 | if (addr & ~HPAGE_MASK) |
@@ -78,8 +75,7 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, | |||
78 | return 0; | 75 | return 0; |
79 | } | 76 | } |
80 | #else | 77 | #else |
81 | int prepare_hugepage_range(unsigned long addr, unsigned long len, | 78 | int prepare_hugepage_range(unsigned long addr, unsigned long len); |
82 | pgoff_t pgoff); | ||
83 | #endif | 79 | #endif |
84 | 80 | ||
85 | #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE | 81 | #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE |
@@ -117,7 +113,7 @@ static inline unsigned long hugetlb_total_pages(void) | |||
117 | #define hugetlb_report_meminfo(buf) 0 | 113 | #define hugetlb_report_meminfo(buf) 0 |
118 | #define hugetlb_report_node_meminfo(n, buf) 0 | 114 | #define hugetlb_report_node_meminfo(n, buf) 0 |
119 | #define follow_huge_pmd(mm, addr, pmd, write) NULL | 115 | #define follow_huge_pmd(mm, addr, pmd, write) NULL |
120 | #define prepare_hugepage_range(addr,len,pgoff) (-EINVAL) | 116 | #define prepare_hugepage_range(addr,len) (-EINVAL) |
121 | #define pmd_huge(x) 0 | 117 | #define pmd_huge(x) 0 |
122 | #define is_hugepage_only_range(mm, addr, len) 0 | 118 | #define is_hugepage_only_range(mm, addr, len) 0 |
123 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 119 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
diff --git a/include/linux/ide.h b/include/linux/ide.h index c792b4fd1588..b9f66c10caa0 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1378,6 +1378,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id) | |||
1378 | return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; | 1378 | return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; |
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | static inline int ide_dev_is_sata(struct hd_driveid *id) | ||
1382 | { | ||
1383 | /* | ||
1384 | * See if word 93 is 0 AND drive is at least ATA-5 compatible | ||
1385 | * verifying that word 80 by casting it to a signed type -- | ||
1386 | * this trick allows us to filter out the reserved values of | ||
1387 | * 0x0000 and 0xffff along with the earlier ATA revisions... | ||
1388 | */ | ||
1389 | if (id->hw_config == 0 && (short)id->major_rev_num >= 0x0020) | ||
1390 | return 1; | ||
1391 | return 0; | ||
1392 | } | ||
1393 | |||
1381 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1394 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
1382 | 1395 | ||
1383 | typedef struct ide_pio_timings_s { | 1396 | typedef struct ide_pio_timings_s { |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h index 516203b6fdeb..a7d6a2234b31 100644 --- a/include/linux/if_pppol2tp.h +++ b/include/linux/if_pppol2tp.h | |||
@@ -32,8 +32,8 @@ struct pppol2tp_addr | |||
32 | 32 | ||
33 | struct sockaddr_in addr; /* IP address and port to send to */ | 33 | struct sockaddr_in addr; /* IP address and port to send to */ |
34 | 34 | ||
35 | __be16 s_tunnel, s_session; /* For matching incoming packets */ | 35 | __u16 s_tunnel, s_session; /* For matching incoming packets */ |
36 | __be16 d_tunnel, d_session; /* For sending outgoing packets */ | 36 | __u16 d_tunnel, d_session; /* For sending outgoing packets */ |
37 | }; | 37 | }; |
38 | 38 | ||
39 | /* Socket options: | 39 | /* Socket options: |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index cab741c2d603..f8abfa349ef9 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -86,7 +86,7 @@ extern struct nsproxy init_nsproxy; | |||
86 | .count = ATOMIC_INIT(1), \ | 86 | .count = ATOMIC_INIT(1), \ |
87 | .action = { { { .sa_handler = NULL, } }, }, \ | 87 | .action = { { { .sa_handler = NULL, } }, }, \ |
88 | .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ | 88 | .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ |
89 | .signalfd_list = LIST_HEAD_INIT(sighand.signalfd_list), \ | 89 | .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(sighand.signalfd_wqh), \ |
90 | } | 90 | } |
91 | 91 | ||
92 | extern struct group_info init_groups; | 92 | extern struct group_info init_groups; |
diff --git a/include/linux/input.h b/include/linux/input.h index e02c6a66b2ba..36e00aa6f03b 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -363,6 +363,12 @@ struct input_absinfo { | |||
363 | 363 | ||
364 | #define KEY_UNKNOWN 240 | 364 | #define KEY_UNKNOWN 240 |
365 | 365 | ||
366 | #define KEY_VIDEO_NEXT 241 /* drive next video source */ | ||
367 | #define KEY_VIDEO_PREV 242 /* drive previous video source */ | ||
368 | #define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ | ||
369 | #define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ | ||
370 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ | ||
371 | |||
366 | #define BTN_MISC 0x100 | 372 | #define BTN_MISC 0x100 |
367 | #define BTN_0 0x100 | 373 | #define BTN_0 0x100 |
368 | #define BTN_1 0x101 | 374 | #define BTN_1 0x101 |
@@ -552,6 +558,8 @@ struct input_absinfo { | |||
552 | #define KEY_BRL_DOT6 0x1f6 | 558 | #define KEY_BRL_DOT6 0x1f6 |
553 | #define KEY_BRL_DOT7 0x1f7 | 559 | #define KEY_BRL_DOT7 0x1f7 |
554 | #define KEY_BRL_DOT8 0x1f8 | 560 | #define KEY_BRL_DOT8 0x1f8 |
561 | #define KEY_BRL_DOT9 0x1f9 | ||
562 | #define KEY_BRL_DOT10 0x1fa | ||
555 | 563 | ||
556 | /* We avoid low common keys in module aliases so they don't get huge. */ | 564 | /* We avoid low common keys in module aliases so they don't get huge. */ |
557 | #define KEY_MIN_INTERESTING KEY_MUTE | 565 | #define KEY_MIN_INTERESTING KEY_MUTE |
diff --git a/include/linux/isa.h b/include/linux/isa.h index 1b855335cb11..b0270e3814c8 100644 --- a/include/linux/isa.h +++ b/include/linux/isa.h | |||
@@ -22,7 +22,18 @@ struct isa_driver { | |||
22 | 22 | ||
23 | #define to_isa_driver(x) container_of((x), struct isa_driver, driver) | 23 | #define to_isa_driver(x) container_of((x), struct isa_driver, driver) |
24 | 24 | ||
25 | #ifdef CONFIG_ISA | ||
25 | int isa_register_driver(struct isa_driver *, unsigned int); | 26 | int isa_register_driver(struct isa_driver *, unsigned int); |
26 | void isa_unregister_driver(struct isa_driver *); | 27 | void isa_unregister_driver(struct isa_driver *); |
28 | #else | ||
29 | static inline int isa_register_driver(struct isa_driver *d, unsigned int i) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | static inline void isa_unregister_driver(struct isa_driver *d) | ||
35 | { | ||
36 | } | ||
37 | #endif | ||
27 | 38 | ||
28 | #endif /* __LINUX_ISA_H */ | 39 | #endif /* __LINUX_ISA_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f592df74b3cf..47160fe378c9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -34,6 +34,7 @@ extern const char linux_proc_banner[]; | |||
34 | 34 | ||
35 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | 35 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) |
36 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | 36 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) |
37 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) | ||
37 | 38 | ||
38 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 39 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
39 | 40 | ||
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index de76843bbe8a..7ddbc30aa8e7 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h | |||
@@ -437,8 +437,10 @@ extern unsigned short plain_map[NR_KEYS]; | |||
437 | #define K_BRL_DOT6 K(KT_BRL, 6) | 437 | #define K_BRL_DOT6 K(KT_BRL, 6) |
438 | #define K_BRL_DOT7 K(KT_BRL, 7) | 438 | #define K_BRL_DOT7 K(KT_BRL, 7) |
439 | #define K_BRL_DOT8 K(KT_BRL, 8) | 439 | #define K_BRL_DOT8 K(KT_BRL, 8) |
440 | #define K_BRL_DOT9 K(KT_BRL, 9) | ||
441 | #define K_BRL_DOT10 K(KT_BRL, 10) | ||
440 | 442 | ||
441 | #define NR_BRL 9 | 443 | #define NR_BRL 11 |
442 | 444 | ||
443 | #define MAX_DIACR 256 | 445 | #define MAX_DIACR 256 |
444 | #endif | 446 | #endif |
diff --git a/include/linux/leds.h b/include/linux/leds.h index 421175092ee2..dc1178f6184b 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define __LINUX_LEDS_H_INCLUDED | 13 | #define __LINUX_LEDS_H_INCLUDED |
14 | 14 | ||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/spinlock.h> | ||
16 | 17 | ||
17 | struct device; | 18 | struct device; |
18 | /* | 19 | /* |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 41978a557318..a67bb9075e9b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -303,6 +303,7 @@ enum { | |||
303 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ | 303 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ |
304 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ | 304 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ |
305 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ | 305 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ |
306 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ | ||
306 | }; | 307 | }; |
307 | 308 | ||
308 | enum hsm_task_states { | 309 | enum hsm_task_states { |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 5bdd656e88cf..a020eb2d4e2a 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -159,7 +159,7 @@ extern void mpol_fix_fork_child_flag(struct task_struct *p); | |||
159 | 159 | ||
160 | extern struct mempolicy default_policy; | 160 | extern struct mempolicy default_policy; |
161 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 161 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
162 | unsigned long addr, gfp_t gfp_flags); | 162 | unsigned long addr, gfp_t gfp_flags, struct mempolicy **mpol); |
163 | extern unsigned slab_node(struct mempolicy *policy); | 163 | extern unsigned slab_node(struct mempolicy *policy); |
164 | 164 | ||
165 | extern enum zone_type policy_zone; | 165 | extern enum zone_type policy_zone; |
@@ -256,7 +256,7 @@ static inline void mpol_fix_fork_child_flag(struct task_struct *p) | |||
256 | #define set_cpuset_being_rebound(x) do {} while (0) | 256 | #define set_cpuset_being_rebound(x) do {} while (0) |
257 | 257 | ||
258 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 258 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
259 | unsigned long addr, gfp_t gfp_flags) | 259 | unsigned long addr, gfp_t gfp_flags, struct mempolicy **mpol) |
260 | { | 260 | { |
261 | return NODE_DATA(0)->node_zonelists + gfp_zone(gfp_flags); | 261 | return NODE_DATA(0)->node_zonelists + gfp_zone(gfp_flags); |
262 | } | 262 | } |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 0eed0b7ab2df..1dd075eda595 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -88,9 +88,8 @@ struct nf_sockopt_ops | |||
88 | int (*compat_get)(struct sock *sk, int optval, | 88 | int (*compat_get)(struct sock *sk, int optval, |
89 | void __user *user, int *len); | 89 | void __user *user, int *len); |
90 | 90 | ||
91 | /* Number of users inside set() or get(). */ | 91 | /* Use the module struct to lock set/get code in place */ |
92 | unsigned int use; | 92 | struct module *owner; |
93 | struct task_struct *cleanup_task; | ||
94 | }; | 93 | }; |
95 | 94 | ||
96 | /* Each queued (to userspace) skbuff has one of these. */ | 95 | /* Each queued (to userspace) skbuff has one of these. */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 157dcb055b5c..7250eeadd7b5 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -431,6 +431,7 @@ extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int); | |||
431 | extern int nfs_wb_all(struct inode *inode); | 431 | extern int nfs_wb_all(struct inode *inode); |
432 | extern int nfs_wb_page(struct inode *inode, struct page* page); | 432 | extern int nfs_wb_page(struct inode *inode, struct page* page); |
433 | extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); | 433 | extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); |
434 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); | ||
434 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 435 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
435 | extern int nfs_commit_inode(struct inode *, int); | 436 | extern int nfs_commit_inode(struct inode *, int); |
436 | extern struct nfs_write_data *nfs_commit_alloc(void); | 437 | extern struct nfs_write_data *nfs_commit_alloc(void); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index e7d8d4e19a53..038a0dc7273a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -557,6 +557,7 @@ int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | |||
557 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 557 | int pcix_get_max_mmrbc(struct pci_dev *dev); |
558 | int pcix_get_mmrbc(struct pci_dev *dev); | 558 | int pcix_get_mmrbc(struct pci_dev *dev); |
559 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 559 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
560 | int pcie_get_readrq(struct pci_dev *dev); | ||
560 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 561 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
561 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 562 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
562 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 563 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
@@ -578,6 +579,9 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
578 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 579 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
579 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 580 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); |
580 | 581 | ||
582 | /* Functions for PCI Hotplug drivers to use */ | ||
583 | int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||
584 | |||
581 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ | 585 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ |
582 | void pci_bus_assign_resources(struct pci_bus *bus); | 586 | void pci_bus_assign_resources(struct pci_bus *bus); |
583 | void pci_bus_size_bridges(struct pci_bus *bus); | 587 | void pci_bus_size_bridges(struct pci_bus *bus); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 8938d59013c6..55f307ffbf96 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -360,6 +360,9 @@ | |||
360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 | 360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 |
361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 | 361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 |
362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 | 362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 |
363 | #define PCI_DEVICE_ID_ATI_RD580 0x5952 | ||
364 | #define PCI_DEVICE_ID_ATI_RX790 0x5957 | ||
365 | #define PCI_DEVICE_ID_ATI_RS690 0x7910 | ||
363 | /* ATI IXP Chipset */ | 366 | /* ATI IXP Chipset */ |
364 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 | 367 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 |
365 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 | 368 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 |
@@ -371,10 +374,9 @@ | |||
371 | #define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 | 374 | #define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 |
372 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a | 375 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a |
373 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 | 376 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 |
374 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 | 377 | #define PCI_DEVICE_ID_ATI_SBX00_SMBUS 0x4385 |
375 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 378 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
376 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 | 379 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 |
377 | #define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395 | ||
378 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c | 380 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c |
379 | 381 | ||
380 | #define PCI_VENDOR_ID_VLSI 0x1004 | 382 | #define PCI_VENDOR_ID_VLSI 0x1004 |
@@ -1287,6 +1289,7 @@ | |||
1287 | #define PCI_DEVICE_ID_VIA_VT3324 0x0324 | 1289 | #define PCI_DEVICE_ID_VIA_VT3324 0x0324 |
1288 | #define PCI_DEVICE_ID_VIA_VT3336 0x0336 | 1290 | #define PCI_DEVICE_ID_VIA_VT3336 0x0336 |
1289 | #define PCI_DEVICE_ID_VIA_VT3351 0x0351 | 1291 | #define PCI_DEVICE_ID_VIA_VT3351 0x0351 |
1292 | #define PCI_DEVICE_ID_VIA_VT3364 0x0364 | ||
1290 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 | 1293 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 |
1291 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 | 1294 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 |
1292 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | 1295 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 |
@@ -1340,6 +1343,7 @@ | |||
1340 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 | 1343 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 |
1341 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 | 1344 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 |
1342 | #define PCI_DEVICE_ID_VIA_CX700 0x8324 | 1345 | #define PCI_DEVICE_ID_VIA_CX700 0x8324 |
1346 | #define PCI_DEVICE_ID_VIA_VX800 0x8353 | ||
1343 | #define PCI_DEVICE_ID_VIA_8371_1 0x8391 | 1347 | #define PCI_DEVICE_ID_VIA_8371_1 0x8391 |
1344 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 | 1348 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 |
1345 | #define PCI_DEVICE_ID_VIA_838X_1 0xB188 | 1349 | #define PCI_DEVICE_ID_VIA_838X_1 0xB188 |
@@ -2289,6 +2293,8 @@ | |||
2289 | #define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599 | 2293 | #define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599 |
2290 | #define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a | 2294 | #define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a |
2291 | #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e | 2295 | #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e |
2296 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 | ||
2297 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032 | ||
2292 | #define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 | 2298 | #define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 |
2293 | #define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 | 2299 | #define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 |
2294 | #define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 | 2300 | #define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 |
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 5ad913ff02b2..b7824c215354 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -226,7 +226,7 @@ extern unsigned int pmu_power_flags; | |||
226 | extern void pmu_backlight_init(void); | 226 | extern void pmu_backlight_init(void); |
227 | 227 | ||
228 | /* some code needs to know if the PMU was suspended for hibernation */ | 228 | /* some code needs to know if the PMU was suspended for hibernation */ |
229 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 229 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
230 | extern int pmu_sys_suspended; | 230 | extern int pmu_sys_suspended; |
231 | #else | 231 | #else |
232 | /* if power management is not configured it can't be suspended */ | 232 | /* if power management is not configured it can't be suspended */ |
diff --git a/include/linux/poll.h b/include/linux/poll.h index 27690798623f..16d813b364ef 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) | 21 | #define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) |
22 | #define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) | 22 | #define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) |
23 | 23 | ||
24 | #define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) | ||
25 | |||
24 | struct poll_table_struct; | 26 | struct poll_table_struct; |
25 | 27 | ||
26 | /* | 28 | /* |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index c91476ce314a..dff3192374f8 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -351,6 +351,8 @@ enum | |||
351 | #define RTAX_INITCWND RTAX_INITCWND | 351 | #define RTAX_INITCWND RTAX_INITCWND |
352 | RTAX_FEATURES, | 352 | RTAX_FEATURES, |
353 | #define RTAX_FEATURES RTAX_FEATURES | 353 | #define RTAX_FEATURES RTAX_FEATURES |
354 | RTAX_RTO_MIN, | ||
355 | #define RTAX_RTO_MIN RTAX_RTO_MIN | ||
354 | __RTAX_MAX | 356 | __RTAX_MAX |
355 | }; | 357 | }; |
356 | 358 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 682ef87da6eb..313c6b6e774f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -113,7 +113,7 @@ extern unsigned long avenrun[]; /* Load averages */ | |||
113 | 113 | ||
114 | #define FSHIFT 11 /* nr of bits of precision */ | 114 | #define FSHIFT 11 /* nr of bits of precision */ |
115 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | 115 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ |
116 | #define LOAD_FREQ (5*HZ) /* 5 sec intervals */ | 116 | #define LOAD_FREQ (5*HZ+1) /* 5 sec intervals */ |
117 | #define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */ | 117 | #define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */ |
118 | #define EXP_5 2014 /* 1/exp(5sec/5min) */ | 118 | #define EXP_5 2014 /* 1/exp(5sec/5min) */ |
119 | #define EXP_15 2037 /* 1/exp(5sec/15min) */ | 119 | #define EXP_15 2037 /* 1/exp(5sec/15min) */ |
@@ -438,7 +438,7 @@ struct sighand_struct { | |||
438 | atomic_t count; | 438 | atomic_t count; |
439 | struct k_sigaction action[_NSIG]; | 439 | struct k_sigaction action[_NSIG]; |
440 | spinlock_t siglock; | 440 | spinlock_t siglock; |
441 | struct list_head signalfd_list; | 441 | wait_queue_head_t signalfd_wqh; |
442 | }; | 442 | }; |
443 | 443 | ||
444 | struct pacct_struct { | 444 | struct pacct_struct { |
@@ -593,7 +593,7 @@ struct user_struct { | |||
593 | #endif | 593 | #endif |
594 | 594 | ||
595 | /* Hash table maintenance information */ | 595 | /* Hash table maintenance information */ |
596 | struct list_head uidhash_list; | 596 | struct hlist_node uidhash_node; |
597 | uid_t uid; | 597 | uid_t uid; |
598 | }; | 598 | }; |
599 | 599 | ||
@@ -681,7 +681,7 @@ enum cpu_idle_type { | |||
681 | #define SCHED_LOAD_SHIFT 10 | 681 | #define SCHED_LOAD_SHIFT 10 |
682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | 682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) |
683 | 683 | ||
684 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 1) | 684 | #define SCHED_LOAD_SCALE_FUZZ SCHED_LOAD_SCALE |
685 | 685 | ||
686 | #ifdef CONFIG_SMP | 686 | #ifdef CONFIG_SMP |
687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
@@ -904,6 +904,7 @@ struct sched_entity { | |||
904 | 904 | ||
905 | u64 exec_start; | 905 | u64 exec_start; |
906 | u64 sum_exec_runtime; | 906 | u64 sum_exec_runtime; |
907 | u64 prev_sum_exec_runtime; | ||
907 | u64 wait_start_fair; | 908 | u64 wait_start_fair; |
908 | u64 sleep_start_fair; | 909 | u64 sleep_start_fair; |
909 | 910 | ||
@@ -1388,7 +1389,8 @@ extern void sched_exec(void); | |||
1388 | #define sched_exec() {} | 1389 | #define sched_exec() {} |
1389 | #endif | 1390 | #endif |
1390 | 1391 | ||
1391 | extern void sched_clock_unstable_event(void); | 1392 | extern void sched_clock_idle_sleep_event(void); |
1393 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | ||
1392 | 1394 | ||
1393 | #ifdef CONFIG_HOTPLUG_CPU | 1395 | #ifdef CONFIG_HOTPLUG_CPU |
1394 | extern void idle_task_exit(void); | 1396 | extern void idle_task_exit(void); |
@@ -1398,11 +1400,13 @@ static inline void idle_task_exit(void) {} | |||
1398 | 1400 | ||
1399 | extern void sched_idle_next(void); | 1401 | extern void sched_idle_next(void); |
1400 | 1402 | ||
1401 | extern unsigned int sysctl_sched_granularity; | 1403 | extern unsigned int sysctl_sched_latency; |
1404 | extern unsigned int sysctl_sched_min_granularity; | ||
1402 | extern unsigned int sysctl_sched_wakeup_granularity; | 1405 | extern unsigned int sysctl_sched_wakeup_granularity; |
1403 | extern unsigned int sysctl_sched_batch_wakeup_granularity; | 1406 | extern unsigned int sysctl_sched_batch_wakeup_granularity; |
1404 | extern unsigned int sysctl_sched_stat_granularity; | 1407 | extern unsigned int sysctl_sched_stat_granularity; |
1405 | extern unsigned int sysctl_sched_runtime_limit; | 1408 | extern unsigned int sysctl_sched_runtime_limit; |
1409 | extern unsigned int sysctl_sched_compat_yield; | ||
1406 | extern unsigned int sysctl_sched_child_runs_first; | 1410 | extern unsigned int sysctl_sched_child_runs_first; |
1407 | extern unsigned int sysctl_sched_features; | 1411 | extern unsigned int sysctl_sched_features; |
1408 | 1412 | ||
@@ -1469,6 +1473,7 @@ static inline struct user_struct *get_uid(struct user_struct *u) | |||
1469 | } | 1473 | } |
1470 | extern void free_uid(struct user_struct *); | 1474 | extern void free_uid(struct user_struct *); |
1471 | extern void switch_uid(struct user_struct *); | 1475 | extern void switch_uid(struct user_struct *); |
1476 | extern void release_uids(struct user_namespace *ns); | ||
1472 | 1477 | ||
1473 | #include <asm/current.h> | 1478 | #include <asm/current.h> |
1474 | 1479 | ||
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index 510429495690..4c9ff0910ae0 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
@@ -45,49 +45,17 @@ struct signalfd_siginfo { | |||
45 | #ifdef CONFIG_SIGNALFD | 45 | #ifdef CONFIG_SIGNALFD |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Deliver the signal to listening signalfd. This must be called | 48 | * Deliver the signal to listening signalfd. |
49 | * with the sighand lock held. Same are the following that end up | ||
50 | * calling signalfd_deliver(). | ||
51 | */ | ||
52 | void signalfd_deliver(struct task_struct *tsk, int sig); | ||
53 | |||
54 | /* | ||
55 | * No need to fall inside signalfd_deliver() if no signal listeners | ||
56 | * are available. | ||
57 | */ | 49 | */ |
58 | static inline void signalfd_notify(struct task_struct *tsk, int sig) | 50 | static inline void signalfd_notify(struct task_struct *tsk, int sig) |
59 | { | 51 | { |
60 | if (unlikely(!list_empty(&tsk->sighand->signalfd_list))) | 52 | if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh))) |
61 | signalfd_deliver(tsk, sig); | 53 | wake_up(&tsk->sighand->signalfd_wqh); |
62 | } | ||
63 | |||
64 | /* | ||
65 | * The signal -1 is used to notify the signalfd that the sighand | ||
66 | * is on its way to be detached. | ||
67 | */ | ||
68 | static inline void signalfd_detach_locked(struct task_struct *tsk) | ||
69 | { | ||
70 | if (unlikely(!list_empty(&tsk->sighand->signalfd_list))) | ||
71 | signalfd_deliver(tsk, -1); | ||
72 | } | ||
73 | |||
74 | static inline void signalfd_detach(struct task_struct *tsk) | ||
75 | { | ||
76 | struct sighand_struct *sighand = tsk->sighand; | ||
77 | |||
78 | if (unlikely(!list_empty(&sighand->signalfd_list))) { | ||
79 | spin_lock_irq(&sighand->siglock); | ||
80 | signalfd_deliver(tsk, -1); | ||
81 | spin_unlock_irq(&sighand->siglock); | ||
82 | } | ||
83 | } | 54 | } |
84 | 55 | ||
85 | #else /* CONFIG_SIGNALFD */ | 56 | #else /* CONFIG_SIGNALFD */ |
86 | 57 | ||
87 | #define signalfd_deliver(t, s) do { } while (0) | 58 | static inline void signalfd_notify(struct task_struct *tsk, int sig) { } |
88 | #define signalfd_notify(t, s) do { } while (0) | ||
89 | #define signalfd_detach_locked(t) do { } while (0) | ||
90 | #define signalfd_detach(t) do { } while (0) | ||
91 | 59 | ||
92 | #endif /* CONFIG_SIGNALFD */ | 60 | #endif /* CONFIG_SIGNALFD */ |
93 | 61 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 93c27f71122a..a656cecd373c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1352,6 +1352,22 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len) | |||
1352 | skb_headroom(skb) + len <= skb->hdr_len; | 1352 | skb_headroom(skb) + len <= skb->hdr_len; |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom, | ||
1356 | int cloned) | ||
1357 | { | ||
1358 | int delta = 0; | ||
1359 | |||
1360 | if (headroom < NET_SKB_PAD) | ||
1361 | headroom = NET_SKB_PAD; | ||
1362 | if (headroom > skb_headroom(skb)) | ||
1363 | delta = headroom - skb_headroom(skb); | ||
1364 | |||
1365 | if (delta || cloned) | ||
1366 | return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0, | ||
1367 | GFP_ATOMIC); | ||
1368 | return 0; | ||
1369 | } | ||
1370 | |||
1355 | /** | 1371 | /** |
1356 | * skb_cow - copy header of skb when it is required | 1372 | * skb_cow - copy header of skb when it is required |
1357 | * @skb: buffer to cow | 1373 | * @skb: buffer to cow |
@@ -1366,16 +1382,22 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len) | |||
1366 | */ | 1382 | */ |
1367 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) | 1383 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) |
1368 | { | 1384 | { |
1369 | int delta = (headroom > NET_SKB_PAD ? headroom : NET_SKB_PAD) - | 1385 | return __skb_cow(skb, headroom, skb_cloned(skb)); |
1370 | skb_headroom(skb); | 1386 | } |
1371 | |||
1372 | if (delta < 0) | ||
1373 | delta = 0; | ||
1374 | 1387 | ||
1375 | if (delta || skb_cloned(skb)) | 1388 | /** |
1376 | return pskb_expand_head(skb, (delta + (NET_SKB_PAD-1)) & | 1389 | * skb_cow_head - skb_cow but only making the head writable |
1377 | ~(NET_SKB_PAD-1), 0, GFP_ATOMIC); | 1390 | * @skb: buffer to cow |
1378 | return 0; | 1391 | * @headroom: needed headroom |
1392 | * | ||
1393 | * This function is identical to skb_cow except that we replace the | ||
1394 | * skb_cloned check by skb_header_cloned. It should be used when | ||
1395 | * you only need to push on some header and do not need to modify | ||
1396 | * the data. | ||
1397 | */ | ||
1398 | static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom) | ||
1399 | { | ||
1400 | return __skb_cow(skb, headroom, skb_header_cloned(skb)); | ||
1379 | } | 1401 | } |
1380 | 1402 | ||
1381 | /** | 1403 | /** |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 124270df8734..74962077f632 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -78,7 +78,7 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; | |||
78 | * Sorry that the following has to be that ugly but some versions of GCC | 78 | * Sorry that the following has to be that ugly but some versions of GCC |
79 | * have trouble with constant propagation and loops. | 79 | * have trouble with constant propagation and loops. |
80 | */ | 80 | */ |
81 | static inline int kmalloc_index(size_t size) | 81 | static __always_inline int kmalloc_index(size_t size) |
82 | { | 82 | { |
83 | if (!size) | 83 | if (!size) |
84 | return 0; | 84 | return 0; |
@@ -133,7 +133,7 @@ static inline int kmalloc_index(size_t size) | |||
133 | * This ought to end up with a global pointer to the right cache | 133 | * This ought to end up with a global pointer to the right cache |
134 | * in kmalloc_caches. | 134 | * in kmalloc_caches. |
135 | */ | 135 | */ |
136 | static inline struct kmem_cache *kmalloc_slab(size_t size) | 136 | static __always_inline struct kmem_cache *kmalloc_slab(size_t size) |
137 | { | 137 | { |
138 | int index = kmalloc_index(size); | 138 | int index = kmalloc_index(size); |
139 | 139 | ||
@@ -166,7 +166,7 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
166 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | 166 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); |
167 | void *__kmalloc(size_t size, gfp_t flags); | 167 | void *__kmalloc(size_t size, gfp_t flags); |
168 | 168 | ||
169 | static inline void *kmalloc(size_t size, gfp_t flags) | 169 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
170 | { | 170 | { |
171 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | 171 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { |
172 | struct kmem_cache *s = kmalloc_slab(size); | 172 | struct kmem_cache *s = kmalloc_slab(size); |
@@ -183,7 +183,7 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
183 | void *__kmalloc_node(size_t size, gfp_t flags, int node); | 183 | void *__kmalloc_node(size_t size, gfp_t flags, int node); |
184 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | 184 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); |
185 | 185 | ||
186 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 186 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
187 | { | 187 | { |
188 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | 188 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { |
189 | struct kmem_cache *s = kmalloc_slab(size); | 189 | struct kmem_cache *s = kmalloc_slab(size); |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 1101b0ce878f..b5f41d4c2eec 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | struct user_namespace { | 12 | struct user_namespace { |
13 | struct kref kref; | 13 | struct kref kref; |
14 | struct list_head uidhash_table[UIDHASH_SZ]; | 14 | struct hlist_head uidhash_table[UIDHASH_SZ]; |
15 | struct user_struct *root_user; | 15 | struct user_struct *root_user; |
16 | }; | 16 | }; |
17 | 17 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 4ef4d22e5e43..b4af6bcb7b7a 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -127,7 +127,7 @@ int sync_page_range(struct inode *inode, struct address_space *mapping, | |||
127 | loff_t pos, loff_t count); | 127 | loff_t pos, loff_t count); |
128 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, | 128 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, |
129 | loff_t pos, loff_t count); | 129 | loff_t pos, loff_t count); |
130 | void set_page_dirty_balance(struct page *page); | 130 | void set_page_dirty_balance(struct page *page, int page_mkwrite); |
131 | void writeback_set_ratelimit(void); | 131 | void writeback_set_ratelimit(void); |
132 | 132 | ||
133 | /* pdflush.c */ | 133 | /* pdflush.c */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index d62847f846c2..17f8f3a2f0a3 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -337,6 +337,9 @@ void *priv; | |||
337 | struct class_device class_dev; /* sysfs */ | 337 | struct class_device class_dev; /* sysfs */ |
338 | }; | 338 | }; |
339 | 339 | ||
340 | /* Class-dev to video-device */ | ||
341 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
342 | |||
340 | /* Version 2 functions */ | 343 | /* Version 2 functions */ |
341 | extern int video_register_device(struct video_device *vfd, int type, int nr); | 344 | extern int video_register_device(struct video_device *vfd, int type, int nr); |
342 | void video_unregister_device(struct video_device *); | 345 | void video_unregister_device(struct video_device *); |
@@ -354,11 +357,9 @@ extern int video_usercopy(struct inode *inode, struct file *file, | |||
354 | int (*func)(struct inode *inode, struct file *file, | 357 | int (*func)(struct inode *inode, struct file *file, |
355 | unsigned int cmd, void *arg)); | 358 | unsigned int cmd, void *arg)); |
356 | 359 | ||
357 | |||
358 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 360 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
359 | #include <linux/mm.h> | 361 | #include <linux/mm.h> |
360 | 362 | ||
361 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
362 | static inline int __must_check | 363 | static inline int __must_check |
363 | video_device_create_file(struct video_device *vfd, | 364 | video_device_create_file(struct video_device *vfd, |
364 | struct class_device_attribute *attr) | 365 | struct class_device_attribute *attr) |
diff --git a/include/net/rose.h b/include/net/rose.h index a4047d3cf5dd..e5bb084d8754 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -188,7 +188,7 @@ extern void rose_kick(struct sock *); | |||
188 | extern void rose_enquiry_response(struct sock *); | 188 | extern void rose_enquiry_response(struct sock *); |
189 | 189 | ||
190 | /* rose_route.c */ | 190 | /* rose_route.c */ |
191 | extern struct rose_neigh rose_loopback_neigh; | 191 | extern struct rose_neigh *rose_loopback_neigh; |
192 | extern const struct file_operations rose_neigh_fops; | 192 | extern const struct file_operations rose_neigh_fops; |
193 | extern const struct file_operations rose_nodes_fops; | 193 | extern const struct file_operations rose_nodes_fops; |
194 | extern const struct file_operations rose_routes_fops; | 194 | extern const struct file_operations rose_routes_fops; |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index d529045c1679..c9cc00c85782 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -123,6 +123,7 @@ | |||
123 | * sctp/protocol.c | 123 | * sctp/protocol.c |
124 | */ | 124 | */ |
125 | extern struct sock *sctp_get_ctl_sock(void); | 125 | extern struct sock *sctp_get_ctl_sock(void); |
126 | extern void sctp_local_addr_free(struct rcu_head *head); | ||
126 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, | 127 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, |
127 | sctp_scope_t, gfp_t gfp, | 128 | sctp_scope_t, gfp_t gfp, |
128 | int flags); | 129 | int flags); |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 73cb9943c8a8..e8e3a64eb322 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -114,7 +114,6 @@ sctp_state_fn_t sctp_sf_do_4_C; | |||
114 | sctp_state_fn_t sctp_sf_eat_data_6_2; | 114 | sctp_state_fn_t sctp_sf_eat_data_6_2; |
115 | sctp_state_fn_t sctp_sf_eat_data_fast_4_4; | 115 | sctp_state_fn_t sctp_sf_eat_data_fast_4_4; |
116 | sctp_state_fn_t sctp_sf_eat_sack_6_2; | 116 | sctp_state_fn_t sctp_sf_eat_sack_6_2; |
117 | sctp_state_fn_t sctp_sf_tabort_8_4_8; | ||
118 | sctp_state_fn_t sctp_sf_operr_notify; | 117 | sctp_state_fn_t sctp_sf_operr_notify; |
119 | sctp_state_fn_t sctp_sf_t1_init_timer_expire; | 118 | sctp_state_fn_t sctp_sf_t1_init_timer_expire; |
120 | sctp_state_fn_t sctp_sf_t1_cookie_timer_expire; | 119 | sctp_state_fn_t sctp_sf_t1_cookie_timer_expire; |
@@ -214,7 +213,7 @@ struct sctp_chunk *sctp_make_shutdown_ack(const struct sctp_association *asoc, | |||
214 | const struct sctp_chunk *); | 213 | const struct sctp_chunk *); |
215 | struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *, | 214 | struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *, |
216 | const struct sctp_chunk *); | 215 | const struct sctp_chunk *); |
217 | void sctp_init_cause(struct sctp_chunk *, __be16 cause, const void *, size_t); | 216 | void sctp_init_cause(struct sctp_chunk *, __be16 cause, size_t); |
218 | struct sctp_chunk *sctp_make_abort(const struct sctp_association *, | 217 | struct sctp_chunk *sctp_make_abort(const struct sctp_association *, |
219 | const struct sctp_chunk *, | 218 | const struct sctp_chunk *, |
220 | const size_t hint); | 219 | const size_t hint); |
@@ -247,6 +246,9 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *, | |||
247 | int, __be16); | 246 | int, __be16); |
248 | struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, | 247 | struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, |
249 | union sctp_addr *addr); | 248 | union sctp_addr *addr); |
249 | int sctp_verify_asconf(const struct sctp_association *asoc, | ||
250 | struct sctp_paramhdr *param_hdr, void *chunk_end, | ||
251 | struct sctp_paramhdr **errp); | ||
250 | struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, | 252 | struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, |
251 | struct sctp_chunk *asconf); | 253 | struct sctp_chunk *asconf); |
252 | int sctp_process_asconf_ack(struct sctp_association *asoc, | 254 | int sctp_process_asconf_ack(struct sctp_association *asoc, |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index ee4559b11302..baff49dfcdbd 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -207,6 +207,9 @@ extern struct sctp_globals { | |||
207 | * It is a list of sctp_sockaddr_entry. | 207 | * It is a list of sctp_sockaddr_entry. |
208 | */ | 208 | */ |
209 | struct list_head local_addr_list; | 209 | struct list_head local_addr_list; |
210 | |||
211 | /* Lock that protects the local_addr_list writers */ | ||
212 | spinlock_t addr_list_lock; | ||
210 | 213 | ||
211 | /* Flag to indicate if addip is enabled. */ | 214 | /* Flag to indicate if addip is enabled. */ |
212 | int addip_enable; | 215 | int addip_enable; |
@@ -242,6 +245,7 @@ extern struct sctp_globals { | |||
242 | #define sctp_port_alloc_lock (sctp_globals.port_alloc_lock) | 245 | #define sctp_port_alloc_lock (sctp_globals.port_alloc_lock) |
243 | #define sctp_port_hashtable (sctp_globals.port_hashtable) | 246 | #define sctp_port_hashtable (sctp_globals.port_hashtable) |
244 | #define sctp_local_addr_list (sctp_globals.local_addr_list) | 247 | #define sctp_local_addr_list (sctp_globals.local_addr_list) |
248 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) | ||
245 | #define sctp_addip_enable (sctp_globals.addip_enable) | 249 | #define sctp_addip_enable (sctp_globals.addip_enable) |
246 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) | 250 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) |
247 | 251 | ||
@@ -417,6 +421,7 @@ struct sctp_signed_cookie { | |||
417 | * internally. | 421 | * internally. |
418 | */ | 422 | */ |
419 | union sctp_addr_param { | 423 | union sctp_addr_param { |
424 | struct sctp_paramhdr p; | ||
420 | struct sctp_ipv4addr_param v4; | 425 | struct sctp_ipv4addr_param v4; |
421 | struct sctp_ipv6addr_param v6; | 426 | struct sctp_ipv6addr_param v6; |
422 | }; | 427 | }; |
@@ -726,6 +731,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len, | |||
726 | struct iovec *data); | 731 | struct iovec *data); |
727 | void sctp_chunk_free(struct sctp_chunk *); | 732 | void sctp_chunk_free(struct sctp_chunk *); |
728 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); | 733 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); |
734 | void *sctp_addto_param(struct sctp_chunk *, int len, const void *data); | ||
729 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, | 735 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, |
730 | const struct sctp_association *, | 736 | const struct sctp_association *, |
731 | struct sock *); | 737 | struct sock *); |
@@ -736,8 +742,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); | |||
736 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ | 742 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ |
737 | struct sctp_sockaddr_entry { | 743 | struct sctp_sockaddr_entry { |
738 | struct list_head list; | 744 | struct list_head list; |
745 | struct rcu_head rcu; | ||
739 | union sctp_addr a; | 746 | union sctp_addr a; |
740 | __u8 use_as_src; | 747 | __u8 use_as_src; |
748 | __u8 valid; | ||
741 | }; | 749 | }; |
742 | 750 | ||
743 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); | 751 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); |
@@ -1148,7 +1156,9 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
1148 | int flags); | 1156 | int flags); |
1149 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1157 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1150 | __u8 use_as_src, gfp_t gfp); | 1158 | __u8 use_as_src, gfp_t gfp); |
1151 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); | 1159 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1160 | void fastcall (*rcu_call)(struct rcu_head *, | ||
1161 | void (*func)(struct rcu_head *))); | ||
1152 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1162 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
1153 | struct sctp_sock *); | 1163 | struct sctp_sock *); |
1154 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | 1164 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, |
@@ -1219,9 +1229,6 @@ struct sctp_ep_common { | |||
1219 | * bind_addr.address_list is our set of local IP addresses. | 1229 | * bind_addr.address_list is our set of local IP addresses. |
1220 | */ | 1230 | */ |
1221 | struct sctp_bind_addr bind_addr; | 1231 | struct sctp_bind_addr bind_addr; |
1222 | |||
1223 | /* Protection during address list comparisons. */ | ||
1224 | rwlock_t addr_lock; | ||
1225 | }; | 1232 | }; |
1226 | 1233 | ||
1227 | 1234 | ||
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h index 39ea3f442b47..cd33270e86dd 100644 --- a/include/net/sctp/ulpqueue.h +++ b/include/net/sctp/ulpqueue.h | |||
@@ -83,6 +83,7 @@ int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc); | |||
83 | /* Skip over an SSN. */ | 83 | /* Skip over an SSN. */ |
84 | void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn); | 84 | void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn); |
85 | 85 | ||
86 | void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32); | ||
86 | #endif /* __sctp_ulpqueue_h__ */ | 87 | #endif /* __sctp_ulpqueue_h__ */ |
87 | 88 | ||
88 | 89 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 185c7ecce4cc..54053de0bdd7 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1059,14 +1059,12 @@ struct tcp_md5sig_key { | |||
1059 | }; | 1059 | }; |
1060 | 1060 | ||
1061 | struct tcp4_md5sig_key { | 1061 | struct tcp4_md5sig_key { |
1062 | u8 *key; | 1062 | struct tcp_md5sig_key base; |
1063 | u16 keylen; | ||
1064 | __be32 addr; | 1063 | __be32 addr; |
1065 | }; | 1064 | }; |
1066 | 1065 | ||
1067 | struct tcp6_md5sig_key { | 1066 | struct tcp6_md5sig_key { |
1068 | u8 *key; | 1067 | struct tcp_md5sig_key base; |
1069 | u16 keylen; | ||
1070 | #if 0 | 1068 | #if 0 |
1071 | u32 scope_id; /* XXX */ | 1069 | u32 scope_id; /* XXX */ |
1072 | #endif | 1070 | #endif |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 007d442412e2..b4b31132618b 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -205,6 +205,13 @@ struct iscsi_queue { | |||
205 | }; | 205 | }; |
206 | 206 | ||
207 | struct iscsi_session { | 207 | struct iscsi_session { |
208 | /* | ||
209 | * Syncs up the scsi eh thread with the iscsi eh thread when sending | ||
210 | * task management functions. This must be taken before the session | ||
211 | * and recv lock. | ||
212 | */ | ||
213 | struct mutex eh_mutex; | ||
214 | |||
208 | /* iSCSI session-wide sequencing */ | 215 | /* iSCSI session-wide sequencing */ |
209 | uint32_t cmdsn; | 216 | uint32_t cmdsn; |
210 | uint32_t exp_cmdsn; | 217 | uint32_t exp_cmdsn; |