diff options
Diffstat (limited to 'include')
93 files changed, 1587 insertions, 780 deletions
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 408aea55e0cc..e139463d9a0e 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h | |||
@@ -132,6 +132,8 @@ | |||
132 | #define __S110 _PAGE_S(0) | 132 | #define __S110 _PAGE_S(0) |
133 | #define __S111 _PAGE_S(0) | 133 | #define __S111 _PAGE_S(0) |
134 | 134 | ||
135 | #define pgprot_noncached(prot) (prot) | ||
136 | |||
135 | /* | 137 | /* |
136 | * BAD_PAGETABLE is used when we need a bogus page-table, while | 138 | * BAD_PAGETABLE is used when we need a bogus page-table, while |
137 | * BAD_PAGE is used for a bogus page. | 139 | * BAD_PAGE is used for a bogus page. |
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h index 52ded516ea5c..c0caf3e3e6fd 100644 --- a/include/asm-arm/arch-ixp2000/platform.h +++ b/include/asm-arm/arch-ixp2000/platform.h | |||
@@ -115,6 +115,7 @@ static inline unsigned int ixp2000_is_pcimaster(void) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | void ixp2000_map_io(void); | 117 | void ixp2000_map_io(void); |
118 | void ixp2000_uart_init(void); | ||
118 | void ixp2000_init_irq(void); | 119 | void ixp2000_init_irq(void); |
119 | void ixp2000_init_time(unsigned long); | 120 | void ixp2000_init_time(unsigned long); |
120 | unsigned long ixp2000_gettimeoffset(void); | 121 | unsigned long ixp2000_gettimeoffset(void); |
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index c27b9d3079a7..7495026e2c18 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Author: Deepak Saxena <dsaxena@plexity.net> | 4 | * Author: Deepak Saxena <dsaxena@plexity.net> |
5 | * | 5 | * |
6 | * Copyright (C) 2002-2004 MontaVista Software, Inc. | 6 | * Copyright (C) 2002-2005 MontaVista Software, Inc. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -383,6 +383,180 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count) | |||
383 | *vaddr++ = inl(io_addr); | 383 | *vaddr++ = inl(io_addr); |
384 | } | 384 | } |
385 | 385 | ||
386 | #define __is_io_address(p) (((unsigned long)p >= 0x0) && \ | ||
387 | ((unsigned long)p <= 0x0000ffff)) | ||
388 | static inline unsigned int | ||
389 | __ixp4xx_ioread8(void __iomem *port) | ||
390 | { | ||
391 | if (__is_io_address(port)) | ||
392 | return (unsigned int)__ixp4xx_inb((unsigned int)port); | ||
393 | else | ||
394 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
395 | return (unsigned int)__raw_readb((u32)port); | ||
396 | #else | ||
397 | return (unsigned int)__ixp4xx_readb((u32)port); | ||
398 | #endif | ||
399 | } | ||
400 | |||
401 | static inline void | ||
402 | __ixp4xx_ioread8_rep(u32 port, u8 *vaddr, u32 count) | ||
403 | { | ||
404 | if (__is_io_address(port)) | ||
405 | __ixp4xx_insb(port, vaddr, count); | ||
406 | else | ||
407 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
408 | __raw_readsb((void __iomem *)port, vaddr, count); | ||
409 | #else | ||
410 | __ixp4xx_readsb(port, vaddr, count); | ||
411 | #endif | ||
412 | } | ||
413 | |||
414 | static inline unsigned int | ||
415 | __ixp4xx_ioread16(void __iomem *port) | ||
416 | { | ||
417 | if (__is_io_address(port)) | ||
418 | return (unsigned int)__ixp4xx_inw((unsigned int)port); | ||
419 | else | ||
420 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
421 | return le16_to_cpu(__raw_readw((u32)port)); | ||
422 | #else | ||
423 | return (unsigned int)__ixp4xx_readw((u32)port); | ||
424 | #endif | ||
425 | } | ||
426 | |||
427 | static inline void | ||
428 | __ixp4xx_ioread16_rep(u32 port, u16 *vaddr, u32 count) | ||
429 | { | ||
430 | if (__is_io_address(port)) | ||
431 | __ixp4xx_insw(port, vaddr, count); | ||
432 | else | ||
433 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
434 | __raw_readsw((void __iomem *)port, vaddr, count); | ||
435 | #else | ||
436 | __ixp4xx_readsw(port, vaddr, count); | ||
437 | #endif | ||
438 | } | ||
439 | |||
440 | static inline unsigned int | ||
441 | __ixp4xx_ioread32(void __iomem *port) | ||
442 | { | ||
443 | if (__is_io_address(port)) | ||
444 | return (unsigned int)__ixp4xx_inl((unsigned int)port); | ||
445 | else { | ||
446 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
447 | return le32_to_cpu(__raw_readl((u32)port)); | ||
448 | #else | ||
449 | return (unsigned int)__ixp4xx_readl((u32)port); | ||
450 | #endif | ||
451 | } | ||
452 | } | ||
453 | |||
454 | static inline void | ||
455 | __ixp4xx_ioread32_rep(u32 port, u32 *vaddr, u32 count) | ||
456 | { | ||
457 | if (__is_io_address(port)) | ||
458 | __ixp4xx_insl(port, vaddr, count); | ||
459 | else | ||
460 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
461 | __raw_readsl((void __iomem *)port, vaddr, count); | ||
462 | #else | ||
463 | __ixp4xx_readsl(port, vaddr, count); | ||
464 | #endif | ||
465 | } | ||
466 | |||
467 | static inline void | ||
468 | __ixp4xx_iowrite8(u8 value, void __iomem *port) | ||
469 | { | ||
470 | if (__is_io_address(port)) | ||
471 | __ixp4xx_outb(value, (unsigned int)port); | ||
472 | else | ||
473 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
474 | __raw_writeb(value, (u32)port); | ||
475 | #else | ||
476 | __ixp4xx_writeb(value, (u32)port); | ||
477 | #endif | ||
478 | } | ||
479 | |||
480 | static inline void | ||
481 | __ixp4xx_iowrite8_rep(u32 port, u8 *vaddr, u32 count) | ||
482 | { | ||
483 | if (__is_io_address(port)) | ||
484 | __ixp4xx_outsb(port, vaddr, count); | ||
485 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
486 | __raw_writesb((void __iomem *)port, vaddr, count); | ||
487 | #else | ||
488 | __ixp4xx_writesb(port, vaddr, count); | ||
489 | #endif | ||
490 | } | ||
491 | |||
492 | static inline void | ||
493 | __ixp4xx_iowrite16(u16 value, void __iomem *port) | ||
494 | { | ||
495 | if (__is_io_address(port)) | ||
496 | __ixp4xx_outw(value, (unsigned int)port); | ||
497 | else | ||
498 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
499 | __raw_writew(cpu_to_le16(value), (u32)port); | ||
500 | #else | ||
501 | __ixp4xx_writew(value, (u32)port); | ||
502 | #endif | ||
503 | } | ||
504 | |||
505 | static inline void | ||
506 | __ixp4xx_iowrite16_rep(u32 port, u16 *vaddr, u32 count) | ||
507 | { | ||
508 | if (__is_io_address(port)) | ||
509 | __ixp4xx_outsw(port, vaddr, count); | ||
510 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
511 | __raw_readsw((void __iomem *)port, vaddr, count); | ||
512 | #else | ||
513 | __ixp4xx_writesw(port, vaddr, count); | ||
514 | #endif | ||
515 | } | ||
516 | |||
517 | static inline void | ||
518 | __ixp4xx_iowrite32(u32 value, void __iomem *port) | ||
519 | { | ||
520 | if (__is_io_address(port)) | ||
521 | __ixp4xx_outl(value, (unsigned int)port); | ||
522 | else | ||
523 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
524 | __raw_writel(cpu_to_le32(value), (u32)port); | ||
525 | #else | ||
526 | __ixp4xx_writel(value, (u32)port); | ||
527 | #endif | ||
528 | } | ||
529 | |||
530 | static inline void | ||
531 | __ixp4xx_iowrite32_rep(u32 port, u32 *vaddr, u32 count) | ||
532 | { | ||
533 | if (__is_io_address(port)) | ||
534 | __ixp4xx_outsl(port, vaddr, count); | ||
535 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | ||
536 | __raw_readsl((void __iomem *)port, vaddr, count); | ||
537 | #else | ||
538 | __ixp4xx_outsl(port, vaddr, count); | ||
539 | #endif | ||
540 | } | ||
541 | |||
542 | #define ioread8(p) __ixp4xx_ioread8(p) | ||
543 | #define ioread16(p) __ixp4xx_ioread16(p) | ||
544 | #define ioread32(p) __ixp4xx_ioread32(p) | ||
545 | |||
546 | #define ioread8_rep(p, v, c) __ixp4xx_ioread8_rep(p, v, c) | ||
547 | #define ioread16_rep(p, v, c) __ixp4xx_ioread16_rep(p, v, c) | ||
548 | #define ioread32_rep(p, v, c) __ixp4xx_ioread32_rep(p, v, c) | ||
549 | |||
550 | #define iowrite8(v,p) __ixp4xx_iowrite8(v,p) | ||
551 | #define iowrite16(v,p) __ixp4xx_iowrite16(v,p) | ||
552 | #define iowrite32(v,p) __ixp4xx_iowrite32(v,p) | ||
553 | |||
554 | #define iowrite8_rep(p, v, c) __ixp4xx_iowrite8_rep(p, v, c) | ||
555 | #define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c) | ||
556 | #define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c) | ||
557 | |||
558 | #define ioport_map(port, nr) ((void __iomem*)port) | ||
559 | #define ioport_unmap(addr) | ||
386 | 560 | ||
387 | #endif // __ASM_ARM_ARCH_IO_H | 561 | #endif // __ASM_ARM_ARCH_IO_H |
388 | 562 | ||
diff --git a/include/asm-arm/arch-omap/board-h2.h b/include/asm-arm/arch-omap/board-h2.h index 60f002b72983..39ca5a31aeea 100644 --- a/include/asm-arm/arch-omap/board-h2.h +++ b/include/asm-arm/arch-omap/board-h2.h | |||
@@ -34,11 +34,6 @@ | |||
34 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ | 34 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ |
35 | #define OMAP1610_ETHR_START 0x04000300 | 35 | #define OMAP1610_ETHR_START 0x04000300 |
36 | 36 | ||
37 | /* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */ | ||
38 | #define OMAP_NOR_FLASH_SIZE SZ_32M | ||
39 | #define OMAP_NOR_FLASH_START1 0x0C000000 /* CS3 */ | ||
40 | #define OMAP_NOR_FLASH_START2 0x0A000000 /* CS2B */ | ||
41 | |||
42 | /* Samsung NAND flash at CS2B or CS3(NAND Boot) */ | 37 | /* Samsung NAND flash at CS2B or CS3(NAND Boot) */ |
43 | #define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ | 38 | #define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ |
44 | #define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ | 39 | #define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ |
diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h index e4d1cd231731..1b12c1dcc2fa 100644 --- a/include/asm-arm/arch-omap/board-h3.h +++ b/include/asm-arm/arch-omap/board-h3.h | |||
@@ -30,11 +30,6 @@ | |||
30 | /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ | 30 | /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ |
31 | #define OMAP1710_ETHR_START 0x04000300 | 31 | #define OMAP1710_ETHR_START 0x04000300 |
32 | 32 | ||
33 | /* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */ | ||
34 | #define OMAP_NOR_FLASH_SIZE SZ_32M | ||
35 | #define OMAP_NOR_FLASH_START1 0x0C000000 /* CS3 */ | ||
36 | #define OMAP_NOR_FLASH_START2 0x0A000000 /* CS2B */ | ||
37 | |||
38 | /* Samsung NAND flash at CS2B or CS3(NAND Boot) */ | 33 | /* Samsung NAND flash at CS2B or CS3(NAND Boot) */ |
39 | #define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ | 34 | #define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ |
40 | #define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ | 35 | #define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ |
diff --git a/include/asm-arm/arch-omap/board-osk.h b/include/asm-arm/arch-omap/board-osk.h index aaa49a0fbd21..2b1a8a4fe44e 100644 --- a/include/asm-arm/arch-omap/board-osk.h +++ b/include/asm-arm/arch-omap/board-osk.h | |||
@@ -32,10 +32,5 @@ | |||
32 | /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ | 32 | /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ |
33 | #define OMAP_OSK_ETHR_START 0x04800300 | 33 | #define OMAP_OSK_ETHR_START 0x04800300 |
34 | 34 | ||
35 | /* Micron NOR flash at CS3 mapped to address 0x0 if BM bit is 1 */ | ||
36 | #define OMAP_OSK_NOR_FLASH_BASE 0xD8000000 | ||
37 | #define OMAP_OSK_NOR_FLASH_SIZE SZ_32M | ||
38 | #define OMAP_OSK_NOR_FLASH_START 0x00000000 | ||
39 | |||
40 | #endif /* __ASM_ARCH_OMAP_OSK_H */ | 35 | #endif /* __ASM_ARCH_OMAP_OSK_H */ |
41 | 36 | ||
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index 1cefd60b6f2a..95bd625480c1 100644 --- a/include/asm-arm/arch-omap/board.h +++ b/include/asm-arm/arch-omap/board.h | |||
@@ -16,10 +16,11 @@ | |||
16 | /* Different peripheral ids */ | 16 | /* Different peripheral ids */ |
17 | #define OMAP_TAG_CLOCK 0x4f01 | 17 | #define OMAP_TAG_CLOCK 0x4f01 |
18 | #define OMAP_TAG_MMC 0x4f02 | 18 | #define OMAP_TAG_MMC 0x4f02 |
19 | #define OMAP_TAG_UART 0x4f03 | 19 | #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 |
20 | #define OMAP_TAG_USB 0x4f04 | 20 | #define OMAP_TAG_USB 0x4f04 |
21 | #define OMAP_TAG_LCD 0x4f05 | 21 | #define OMAP_TAG_LCD 0x4f05 |
22 | #define OMAP_TAG_GPIO_SWITCH 0x4f06 | 22 | #define OMAP_TAG_GPIO_SWITCH 0x4f06 |
23 | #define OMAP_TAG_UART 0x4f07 | ||
23 | 24 | ||
24 | #define OMAP_TAG_BOOT_REASON 0x4f80 | 25 | #define OMAP_TAG_BOOT_REASON 0x4f80 |
25 | #define OMAP_TAG_FLASH_PART 0x4f81 | 26 | #define OMAP_TAG_FLASH_PART 0x4f81 |
@@ -35,7 +36,7 @@ struct omap_mmc_config { | |||
35 | s16 mmc1_switch_pin, mmc2_switch_pin; | 36 | s16 mmc1_switch_pin, mmc2_switch_pin; |
36 | }; | 37 | }; |
37 | 38 | ||
38 | struct omap_uart_config { | 39 | struct omap_serial_console_config { |
39 | u8 console_uart; | 40 | u8 console_uart; |
40 | u32 console_speed; | 41 | u32 console_speed; |
41 | }; | 42 | }; |
@@ -82,7 +83,8 @@ struct omap_lcd_config { | |||
82 | */ | 83 | */ |
83 | #define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000 | 84 | #define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000 |
84 | #define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001 | 85 | #define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001 |
85 | #define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001 | 86 | #define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001 |
87 | #define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002 | ||
86 | struct omap_gpio_switch_config { | 88 | struct omap_gpio_switch_config { |
87 | char name[12]; | 89 | char name[12]; |
88 | u16 gpio; | 90 | u16 gpio; |
@@ -99,6 +101,10 @@ struct omap_boot_reason_config { | |||
99 | char reason_str[12]; | 101 | char reason_str[12]; |
100 | }; | 102 | }; |
101 | 103 | ||
104 | struct omap_uart_config { | ||
105 | /* Bit field of UARTs present; bit 0 --> UART1 */ | ||
106 | unsigned int enabled_uarts; | ||
107 | }; | ||
102 | 108 | ||
103 | struct omap_board_config_entry { | 109 | struct omap_board_config_entry { |
104 | u16 tag; | 110 | u16 tag; |
diff --git a/include/asm-arm/arch-omap/common.h b/include/asm-arm/arch-omap/common.h new file mode 100644 index 000000000000..2a676b4f13b5 --- /dev/null +++ b/include/asm-arm/arch-omap/common.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/common.h | ||
3 | * | ||
4 | * Header for code common to all OMAP machines. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
12 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
13 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
14 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
15 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
16 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
17 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
18 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
19 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
20 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License along | ||
23 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
24 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | */ | ||
26 | |||
27 | #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H | ||
28 | #define __ARCH_ARM_MACH_OMAP_COMMON_H | ||
29 | |||
30 | struct sys_timer; | ||
31 | |||
32 | extern void omap_map_common_io(void); | ||
33 | extern struct sys_timer omap_timer; | ||
34 | extern void omap_serial_init(int ports[]); | ||
35 | |||
36 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ | ||
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h index d785248377db..ce114ce5af5d 100644 --- a/include/asm-arm/arch-omap/dma.h +++ b/include/asm-arm/arch-omap/dma.h | |||
@@ -241,6 +241,7 @@ extern void omap_dma_unlink_lch (int lch_head, int lch_queue); | |||
241 | extern dma_addr_t omap_get_dma_src_pos(int lch); | 241 | extern dma_addr_t omap_get_dma_src_pos(int lch); |
242 | extern dma_addr_t omap_get_dma_dst_pos(int lch); | 242 | extern dma_addr_t omap_get_dma_dst_pos(int lch); |
243 | extern void omap_clear_dma(int lch); | 243 | extern void omap_clear_dma(int lch); |
244 | extern int omap_dma_running(void); | ||
244 | 245 | ||
245 | /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ | 246 | /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ |
246 | extern int omap_dma_in_1510_mode(void); | 247 | extern int omap_dma_in_1510_mode(void); |
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index 37e06c782bdf..48258c7f6541 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h | |||
@@ -54,6 +54,19 @@ | |||
54 | 54 | ||
55 | /* | 55 | /* |
56 | * ---------------------------------------------------------------------------- | 56 | * ---------------------------------------------------------------------------- |
57 | * Timers | ||
58 | * ---------------------------------------------------------------------------- | ||
59 | */ | ||
60 | #define OMAP_MPU_TIMER1_BASE (0xfffec500) | ||
61 | #define OMAP_MPU_TIMER2_BASE (0xfffec600) | ||
62 | #define OMAP_MPU_TIMER3_BASE (0xfffec700) | ||
63 | #define MPU_TIMER_FREE (1 << 6) | ||
64 | #define MPU_TIMER_CLOCK_ENABLE (1 << 5) | ||
65 | #define MPU_TIMER_AR (1 << 1) | ||
66 | #define MPU_TIMER_ST (1 << 0) | ||
67 | |||
68 | /* | ||
69 | * ---------------------------------------------------------------------------- | ||
57 | * Clocks | 70 | * Clocks |
58 | * ---------------------------------------------------------------------------- | 71 | * ---------------------------------------------------------------------------- |
59 | */ | 72 | */ |
@@ -78,6 +91,7 @@ | |||
78 | 91 | ||
79 | /* DSP clock control */ | 92 | /* DSP clock control */ |
80 | #define DSP_CONFIG_REG_BASE (0xe1008000) | 93 | #define DSP_CONFIG_REG_BASE (0xe1008000) |
94 | #define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0) | ||
81 | #define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4) | 95 | #define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4) |
82 | #define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8) | 96 | #define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8) |
83 | 97 | ||
@@ -88,6 +102,7 @@ | |||
88 | */ | 102 | */ |
89 | #define ULPD_REG_BASE (0xfffe0800) | 103 | #define ULPD_REG_BASE (0xfffe0800) |
90 | #define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14) | 104 | #define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14) |
105 | #define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24) | ||
91 | #define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30) | 106 | #define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30) |
92 | # define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */ | 107 | # define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */ |
93 | # define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */ | 108 | # define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */ |
@@ -268,17 +283,10 @@ | |||
268 | * Processor specific defines | 283 | * Processor specific defines |
269 | * --------------------------------------------------------------------------- | 284 | * --------------------------------------------------------------------------- |
270 | */ | 285 | */ |
271 | #ifdef CONFIG_ARCH_OMAP730 | ||
272 | #include "omap730.h" | ||
273 | #endif | ||
274 | 286 | ||
275 | #ifdef CONFIG_ARCH_OMAP1510 | 287 | #include "omap730.h" |
276 | #include "omap1510.h" | 288 | #include "omap1510.h" |
277 | #endif | ||
278 | |||
279 | #ifdef CONFIG_ARCH_OMAP16XX | ||
280 | #include "omap16xx.h" | 289 | #include "omap16xx.h" |
281 | #endif | ||
282 | 290 | ||
283 | /* | 291 | /* |
284 | * --------------------------------------------------------------------------- | 292 | * --------------------------------------------------------------------------- |
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h index 6701fd9e5f9b..0d05a7c957d1 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h | |||
@@ -159,6 +159,7 @@ | |||
159 | #define INT_1610_GPIO_BANK3 (41 + IH2_BASE) | 159 | #define INT_1610_GPIO_BANK3 (41 + IH2_BASE) |
160 | #define INT_1610_MMC2 (42 + IH2_BASE) | 160 | #define INT_1610_MMC2 (42 + IH2_BASE) |
161 | #define INT_1610_CF (43 + IH2_BASE) | 161 | #define INT_1610_CF (43 + IH2_BASE) |
162 | #define INT_1610_WAKE_UP_REQ (46 + IH2_BASE) | ||
162 | #define INT_1610_GPIO_BANK4 (48 + IH2_BASE) | 163 | #define INT_1610_GPIO_BANK4 (48 + IH2_BASE) |
163 | #define INT_1610_SPI (49 + IH2_BASE) | 164 | #define INT_1610_SPI (49 + IH2_BASE) |
164 | #define INT_1610_DMA_CH6 (53 + IH2_BASE) | 165 | #define INT_1610_DMA_CH6 (53 + IH2_BASE) |
@@ -238,6 +239,8 @@ | |||
238 | #define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE) | 239 | #define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE) |
239 | #define IH_BOARD_BASE (16 + IH_MPUIO_BASE) | 240 | #define IH_BOARD_BASE (16 + IH_MPUIO_BASE) |
240 | 241 | ||
242 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) | ||
243 | |||
241 | #ifndef __ASSEMBLY__ | 244 | #ifndef __ASSEMBLY__ |
242 | extern void omap_init_irq(void); | 245 | extern void omap_init_irq(void); |
243 | #endif | 246 | #endif |
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h index 39f99decbb7b..5bd3f0097fc6 100644 --- a/include/asm-arm/arch-omap/mux.h +++ b/include/asm-arm/arch-omap/mux.h | |||
@@ -231,7 +231,7 @@ typedef enum { | |||
231 | J19_1610_ETM_D6, | 231 | J19_1610_ETM_D6, |
232 | J18_1610_ETM_D7, | 232 | J18_1610_ETM_D7, |
233 | 233 | ||
234 | /* OMAP-1610 GPIO */ | 234 | /* OMAP16XX GPIO */ |
235 | P20_1610_GPIO4, | 235 | P20_1610_GPIO4, |
236 | V9_1610_GPIO7, | 236 | V9_1610_GPIO7, |
237 | W8_1610_GPIO9, | 237 | W8_1610_GPIO9, |
@@ -241,6 +241,9 @@ typedef enum { | |||
241 | AA20_1610_GPIO_41, | 241 | AA20_1610_GPIO_41, |
242 | W19_1610_GPIO48, | 242 | W19_1610_GPIO48, |
243 | M7_1610_GPIO62, | 243 | M7_1610_GPIO62, |
244 | V14_16XX_GPIO37, | ||
245 | R9_16XX_GPIO18, | ||
246 | L14_16XX_GPIO49, | ||
244 | 247 | ||
245 | /* OMAP-1610 uWire */ | 248 | /* OMAP-1610 uWire */ |
246 | V19_1610_UWIRE_SCLK, | 249 | V19_1610_UWIRE_SCLK, |
@@ -285,12 +288,13 @@ typedef enum { | |||
285 | V6_USB2_TXD, | 288 | V6_USB2_TXD, |
286 | W5_USB2_SE0, | 289 | W5_USB2_SE0, |
287 | 290 | ||
288 | /* UART1 1610 */ | 291 | /* 16XX UART */ |
289 | |||
290 | R13_1610_UART1_TX, | 292 | R13_1610_UART1_TX, |
291 | V14_1610_UART1_RX, | 293 | V14_16XX_UART1_RX, |
292 | R14_1610_UART1_CTS, | 294 | R14_1610_UART1_CTS, |
293 | AA15_1610_UART1_RTS, | 295 | AA15_1610_UART1_RTS, |
296 | R9_16XX_UART2_RX, | ||
297 | L14_16XX_UART3_RX, | ||
294 | 298 | ||
295 | /* I2C OMAP-1610 */ | 299 | /* I2C OMAP-1610 */ |
296 | I2C_SCL, | 300 | I2C_SCL, |
@@ -332,7 +336,7 @@ typedef enum { | |||
332 | * Table of various FUNC_MUX and PULL_DWN combinations for each device. | 336 | * Table of various FUNC_MUX and PULL_DWN combinations for each device. |
333 | * See also reg_cfg_t above for the lookup table. | 337 | * See also reg_cfg_t above for the lookup table. |
334 | */ | 338 | */ |
335 | static reg_cfg_set __initdata_or_module | 339 | static const reg_cfg_set __initdata_or_module |
336 | reg_cfg_table[] = { | 340 | reg_cfg_table[] = { |
337 | /* | 341 | /* |
338 | * description mux mode mux pull pull pull pu_pd pu dbg | 342 | * description mux mode mux pull pull pull pu_pd pu dbg |
@@ -455,7 +459,7 @@ MUX_CFG("L19_1610_ETM_D0", 5, 18, 1, 0, 26, 0, 0, 0, 1) | |||
455 | MUX_CFG("J19_1610_ETM_D6", 5, 0, 1, 0, 20, 0, 0, 0, 1) | 459 | MUX_CFG("J19_1610_ETM_D6", 5, 0, 1, 0, 20, 0, 0, 0, 1) |
456 | MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1) | 460 | MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1) |
457 | 461 | ||
458 | /* OMAP-1610 GPIO */ | 462 | /* OMAP16XX GPIO */ |
459 | MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1) | 463 | MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1) |
460 | MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1) | 464 | MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1) |
461 | MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1) | 465 | MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1) |
@@ -465,6 +469,9 @@ MUX_CFG("V5_1610_GPIO24", B, 15, 7, 2, 21, 0, 2, 1, 1) | |||
465 | MUX_CFG("AA20_1610_GPIO_41", 9, 9, 7, 1, 31, 0, 1, 1, 1) | 469 | MUX_CFG("AA20_1610_GPIO_41", 9, 9, 7, 1, 31, 0, 1, 1, 1) |
466 | MUX_CFG("W19_1610_GPIO48", 8, 15, 7, 1, 23, 1, 1, 0, 1) | 470 | MUX_CFG("W19_1610_GPIO48", 8, 15, 7, 1, 23, 1, 1, 0, 1) |
467 | MUX_CFG("M7_1610_GPIO62", 10, 0, 0, 4, 24, 0, 4, 0, 1) | 471 | MUX_CFG("M7_1610_GPIO62", 10, 0, 0, 4, 24, 0, 4, 0, 1) |
472 | MUX_CFG("V14_16XX_GPIO37", 9, 18, 7, 2, 2, 0, 2, 2, 0) | ||
473 | MUX_CFG("R9_16XX_GPIO18", C, 18, 7, 3, 0, 0, 3, 0, 0) | ||
474 | MUX_CFG("L14_16XX_GPIO49", 6, 3, 7, 0, 31, 0, 0, 31, 0) | ||
468 | 475 | ||
469 | /* OMAP-1610 uWire */ | 476 | /* OMAP-1610 uWire */ |
470 | MUX_CFG("V19_1610_UWIRE_SCLK", 8, 6, 0, 1, 20, 0, 1, 1, 1) | 477 | MUX_CFG("V19_1610_UWIRE_SCLK", 8, 6, 0, 1, 20, 0, 1, 1, 1) |
@@ -503,16 +510,17 @@ MUX_CFG("Y10_USB0_SUSP", B, 3, 5, 2, 17, 0, 2, 0, 1) | |||
503 | MUX_CFG("W9_USB2_TXEN", B, 9, 1, NA, 0, 0, NA, 0, 1) | 510 | MUX_CFG("W9_USB2_TXEN", B, 9, 1, NA, 0, 0, NA, 0, 1) |
504 | MUX_CFG("AA9_USB2_VP", B, 6, 1, NA, 0, 0, NA, 0, 1) | 511 | MUX_CFG("AA9_USB2_VP", B, 6, 1, NA, 0, 0, NA, 0, 1) |
505 | MUX_CFG("Y5_USB2_RCV", C, 21, 1, NA, 0, 0, NA, 0, 1) | 512 | MUX_CFG("Y5_USB2_RCV", C, 21, 1, NA, 0, 0, NA, 0, 1) |
506 | MUX_CFG("R8_USB2_VM", C, 18, 1, NA, 0, 0, NA, 0, 1) | 513 | MUX_CFG("R9_USB2_VM", C, 18, 1, NA, 0, 0, NA, 0, 1) |
507 | MUX_CFG("V6_USB2_TXD", C, 27, 2, NA, 0, 0, NA, 0, 1) | 514 | MUX_CFG("V6_USB2_TXD", C, 27, 2, NA, 0, 0, NA, 0, 1) |
508 | MUX_CFG("W5_USB2_SE0", C, 24, 2, NA, 0, 0, NA, 0, 1) | 515 | MUX_CFG("W5_USB2_SE0", C, 24, 2, NA, 0, 0, NA, 0, 1) |
509 | 516 | ||
510 | 517 | /* 16XX UART */ | |
511 | /* UART1 */ | ||
512 | MUX_CFG("R13_1610_UART1_TX", A, 12, 6, 2, 10, 0, 2, 10, 1) | 518 | MUX_CFG("R13_1610_UART1_TX", A, 12, 6, 2, 10, 0, 2, 10, 1) |
513 | MUX_CFG("V14_1610_UART1_RX", 9, 18, 0, 2, 2, 0, 2, 2, 1) | 519 | MUX_CFG("V14_16XX_UART1_RX", 9, 18, 0, 2, 2, 0, 2, 2, 1) |
514 | MUX_CFG("R14_1610_UART1_CTS", 9, 15, 0, 2, 1, 0, 2, 1, 1) | 520 | MUX_CFG("R14_1610_UART1_CTS", 9, 15, 0, 2, 1, 0, 2, 1, 1) |
515 | MUX_CFG("AA15_1610_UART1_RTS", 9, 12, 1, 2, 0, 0, 2, 0, 1) | 521 | MUX_CFG("AA15_1610_UART1_RTS", 9, 12, 1, 2, 0, 0, 2, 0, 1) |
522 | MUX_CFG("R9_16XX_UART2_RX", C, 18, 0, 3, 0, 0, 3, 0, 1) | ||
523 | MUX_CFG("L14_16XX_UART3_RX", 6, 3, 0, 0, 31, 0, 0, 31, 1) | ||
516 | 524 | ||
517 | /* I2C interface */ | 525 | /* I2C interface */ |
518 | MUX_CFG("I2C_SCL", 7, 24, 0, NA, 0, 0, NA, 0, 0) | 526 | MUX_CFG("I2C_SCL", 7, 24, 0, NA, 0, 0, NA, 0, 0) |
diff --git a/include/asm-arm/arch-omap/omap16xx.h b/include/asm-arm/arch-omap/omap16xx.h index 88b1fe43ae9e..38a9b95e6a33 100644 --- a/include/asm-arm/arch-omap/omap16xx.h +++ b/include/asm-arm/arch-omap/omap16xx.h | |||
@@ -183,5 +183,37 @@ | |||
183 | #define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00) | 183 | #define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00) |
184 | #define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04) | 184 | #define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04) |
185 | 185 | ||
186 | /* | ||
187 | * --------------------------------------------------------------------------- | ||
188 | * Watchdog timer | ||
189 | * --------------------------------------------------------------------------- | ||
190 | */ | ||
191 | |||
192 | /* 32-bit Watchdog timer in OMAP 16XX */ | ||
193 | #define OMAP_16XX_WATCHDOG_BASE (0xfffeb000) | ||
194 | #define OMAP_16XX_WIDR (OMAP_16XX_WATCHDOG_BASE + 0x00) | ||
195 | #define OMAP_16XX_WD_SYSCONFIG (OMAP_16XX_WATCHDOG_BASE + 0x10) | ||
196 | #define OMAP_16XX_WD_SYSSTATUS (OMAP_16XX_WATCHDOG_BASE + 0x14) | ||
197 | #define OMAP_16XX_WCLR (OMAP_16XX_WATCHDOG_BASE + 0x24) | ||
198 | #define OMAP_16XX_WCRR (OMAP_16XX_WATCHDOG_BASE + 0x28) | ||
199 | #define OMAP_16XX_WLDR (OMAP_16XX_WATCHDOG_BASE + 0x2c) | ||
200 | #define OMAP_16XX_WTGR (OMAP_16XX_WATCHDOG_BASE + 0x30) | ||
201 | #define OMAP_16XX_WWPS (OMAP_16XX_WATCHDOG_BASE + 0x34) | ||
202 | #define OMAP_16XX_WSPR (OMAP_16XX_WATCHDOG_BASE + 0x48) | ||
203 | |||
204 | #define WCLR_PRE_SHIFT 5 | ||
205 | #define WCLR_PTV_SHIFT 2 | ||
206 | |||
207 | #define WWPS_W_PEND_WSPR (1 << 4) | ||
208 | #define WWPS_W_PEND_WTGR (1 << 3) | ||
209 | #define WWPS_W_PEND_WLDR (1 << 2) | ||
210 | #define WWPS_W_PEND_WCRR (1 << 1) | ||
211 | #define WWPS_W_PEND_WCLR (1 << 0) | ||
212 | |||
213 | #define WSPR_ENABLE_0 (0x0000bbbb) | ||
214 | #define WSPR_ENABLE_1 (0x00004444) | ||
215 | #define WSPR_DISABLE_0 (0x0000aaaa) | ||
216 | #define WSPR_DISABLE_1 (0x00005555) | ||
217 | |||
186 | #endif /* __ASM_ARCH_OMAP16XX_H */ | 218 | #endif /* __ASM_ARCH_OMAP16XX_H */ |
187 | 219 | ||
diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h index 17a2c4825f07..ff37bc27e603 100644 --- a/include/asm-arm/arch-omap/system.h +++ b/include/asm-arm/arch-omap/system.h | |||
@@ -5,7 +5,9 @@ | |||
5 | #ifndef __ASM_ARCH_SYSTEM_H | 5 | #ifndef __ASM_ARCH_SYSTEM_H |
6 | #define __ASM_ARCH_SYSTEM_H | 6 | #define __ASM_ARCH_SYSTEM_H |
7 | #include <linux/config.h> | 7 | #include <linux/config.h> |
8 | #include <asm/mach-types.h> | ||
8 | #include <asm/arch/hardware.h> | 9 | #include <asm/arch/hardware.h> |
10 | #include <asm/mach-types.h> | ||
9 | 11 | ||
10 | static inline void arch_idle(void) | 12 | static inline void arch_idle(void) |
11 | { | 13 | { |
@@ -14,7 +16,24 @@ static inline void arch_idle(void) | |||
14 | 16 | ||
15 | static inline void arch_reset(char mode) | 17 | static inline void arch_reset(char mode) |
16 | { | 18 | { |
17 | omap_writew(1, ARM_RSTCT1); | 19 | |
20 | #ifdef CONFIG_ARCH_OMAP16XX | ||
21 | /* | ||
22 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 | ||
23 | * "Global Software Reset Affects Traffic Controller Frequency". | ||
24 | */ | ||
25 | if (cpu_is_omap5912()) { | ||
26 | omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), | ||
27 | DPLL_CTL); | ||
28 | omap_writew(0x8, ARM_RSTCT1); | ||
29 | } | ||
30 | #endif | ||
31 | #ifdef CONFIG_MACH_VOICEBLUE | ||
32 | if (machine_is_voiceblue()) | ||
33 | voiceblue_reset(); | ||
34 | else | ||
35 | #endif | ||
36 | omap_writew(1, ARM_RSTCT1); | ||
18 | } | 37 | } |
19 | 38 | ||
20 | #endif | 39 | #endif |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index b5e54a9e9fa7..51f0fe0ac165 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -1505,6 +1505,7 @@ | |||
1505 | #define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */ | 1505 | #define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */ |
1506 | #define PSSR_RDH (1 << 5) /* Read Disable Hold */ | 1506 | #define PSSR_RDH (1 << 5) /* Read Disable Hold */ |
1507 | #define PSSR_PH (1 << 4) /* Peripheral Control Hold */ | 1507 | #define PSSR_PH (1 << 4) /* Peripheral Control Hold */ |
1508 | #define PSSR_STS (1 << 3) /* Standby Mode Status */ | ||
1508 | #define PSSR_VFS (1 << 2) /* VDD Fault Status */ | 1509 | #define PSSR_VFS (1 << 2) /* VDD Fault Status */ |
1509 | #define PSSR_BFS (1 << 1) /* Battery Fault Status */ | 1510 | #define PSSR_BFS (1 << 1) /* Battery Fault Status */ |
1510 | #define PSSR_SSS (1 << 0) /* Software Sleep Status */ | 1511 | #define PSSR_SSS (1 << 0) /* Software Sleep Status */ |
@@ -1965,6 +1966,7 @@ | |||
1965 | #define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */ | 1966 | #define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */ |
1966 | #define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */ | 1967 | #define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */ |
1967 | 1968 | ||
1969 | #define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */ | ||
1968 | #define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */ | 1970 | #define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */ |
1969 | #define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */ | 1971 | #define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */ |
1970 | #define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */ | 1972 | #define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */ |
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h index 3a32e929ec8c..56c6bf4ab0c3 100644 --- a/include/asm-arm/mach/arch.h +++ b/include/asm-arm/mach/arch.h | |||
@@ -26,7 +26,7 @@ struct machine_desc { | |||
26 | * page tabe entry */ | 26 | * page tabe entry */ |
27 | 27 | ||
28 | const char *name; /* architecture name */ | 28 | const char *name; /* architecture name */ |
29 | unsigned int param_offset; /* parameter page */ | 29 | unsigned long boot_params; /* tagged list */ |
30 | 30 | ||
31 | unsigned int video_start; /* start of video RAM */ | 31 | unsigned int video_start; /* start of video RAM */ |
32 | unsigned int video_end; /* end of video RAM */ | 32 | unsigned int video_end; /* end of video RAM */ |
@@ -54,38 +54,6 @@ const struct machine_desc __mach_desc_##_type \ | |||
54 | .nr = MACH_TYPE_##_type, \ | 54 | .nr = MACH_TYPE_##_type, \ |
55 | .name = _name, | 55 | .name = _name, |
56 | 56 | ||
57 | #define MAINTAINER(n) | ||
58 | |||
59 | #define BOOT_MEM(_pram,_pio,_vio) \ | ||
60 | .phys_ram = _pram, \ | ||
61 | .phys_io = _pio, \ | ||
62 | .io_pg_offst = ((_vio)>>18)&0xfffc, | ||
63 | |||
64 | #define BOOT_PARAMS(_params) \ | ||
65 | .param_offset = _params, | ||
66 | |||
67 | #define VIDEO(_start,_end) \ | ||
68 | .video_start = _start, \ | ||
69 | .video_end = _end, | ||
70 | |||
71 | #define DISABLE_PARPORT(_n) \ | ||
72 | .reserve_lp##_n = 1, | ||
73 | |||
74 | #define SOFT_REBOOT \ | ||
75 | .soft_reboot = 1, | ||
76 | |||
77 | #define FIXUP(_func) \ | ||
78 | .fixup = _func, | ||
79 | |||
80 | #define MAPIO(_func) \ | ||
81 | .map_io = _func, | ||
82 | |||
83 | #define INITIRQ(_func) \ | ||
84 | .init_irq = _func, | ||
85 | |||
86 | #define INIT_MACHINE(_func) \ | ||
87 | .init_machine = _func, | ||
88 | |||
89 | #define MACHINE_END \ | 57 | #define MACHINE_END \ |
90 | }; | 58 | }; |
91 | 59 | ||
diff --git a/include/asm-arm/stat.h b/include/asm-arm/stat.h index ca8e7a8436da..ec4e2c2e3b47 100644 --- a/include/asm-arm/stat.h +++ b/include/asm-arm/stat.h | |||
@@ -89,6 +89,6 @@ struct stat64 { | |||
89 | unsigned long st_ctime_nsec; | 89 | unsigned long st_ctime_nsec; |
90 | 90 | ||
91 | unsigned long long st_ino; | 91 | unsigned long long st_ino; |
92 | }; | 92 | } __attribute__((packed)); |
93 | 93 | ||
94 | #endif | 94 | #endif |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index cdf49f442fd2..2f44b2044214 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -85,7 +85,9 @@ struct pt_regs; | |||
85 | void die(const char *msg, struct pt_regs *regs, int err) | 85 | void die(const char *msg, struct pt_regs *regs, int err) |
86 | __attribute__((noreturn)); | 86 | __attribute__((noreturn)); |
87 | 87 | ||
88 | void die_if_kernel(const char *str, struct pt_regs *regs, int err); | 88 | struct siginfo; |
89 | void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, | ||
90 | unsigned long err, unsigned long trap); | ||
89 | 91 | ||
90 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | 92 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, |
91 | struct pt_regs *), | 93 | struct pt_regs *), |
diff --git a/include/asm-i386/i8253.h b/include/asm-i386/i8253.h new file mode 100644 index 000000000000..015d8df07690 --- /dev/null +++ b/include/asm-i386/i8253.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_I8253_H__ | ||
2 | #define __ASM_I8253_H__ | ||
3 | |||
4 | extern spinlock_t i8253_lock; | ||
5 | |||
6 | #endif /* __ASM_I8253_H__ */ | ||
diff --git a/include/asm-i386/mach-default/do_timer.h b/include/asm-i386/mach-default/do_timer.h index 03dd13a48a8c..56211414fc95 100644 --- a/include/asm-i386/mach-default/do_timer.h +++ b/include/asm-i386/mach-default/do_timer.h | |||
@@ -1,6 +1,7 @@ | |||
1 | /* defines for inline arch setup functions */ | 1 | /* defines for inline arch setup functions */ |
2 | 2 | ||
3 | #include <asm/apic.h> | 3 | #include <asm/apic.h> |
4 | #include <asm/i8259.h> | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * do_timer_interrupt_hook - hook into timer tick | 7 | * do_timer_interrupt_hook - hook into timer tick |
diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h index 33ce5d37e894..516421300ea2 100644 --- a/include/asm-i386/mmzone.h +++ b/include/asm-i386/mmzone.h | |||
@@ -8,20 +8,15 @@ | |||
8 | 8 | ||
9 | #include <asm/smp.h> | 9 | #include <asm/smp.h> |
10 | 10 | ||
11 | #if CONFIG_NUMA | 11 | #ifdef CONFIG_NUMA |
12 | extern struct pglist_data *node_data[]; | 12 | extern struct pglist_data *node_data[]; |
13 | #define NODE_DATA(nid) (node_data[nid]) | 13 | #define NODE_DATA(nid) (node_data[nid]) |
14 | 14 | ||
15 | #ifdef CONFIG_NUMA | 15 | #ifdef CONFIG_X86_NUMAQ |
16 | #ifdef CONFIG_X86_NUMAQ | 16 | #include <asm/numaq.h> |
17 | #include <asm/numaq.h> | 17 | #else /* summit or generic arch */ |
18 | #else /* summit or generic arch */ | 18 | #include <asm/srat.h> |
19 | #include <asm/srat.h> | 19 | #endif |
20 | #endif | ||
21 | #else /* !CONFIG_NUMA */ | ||
22 | #define get_memcfg_numa get_memcfg_numa_flat | ||
23 | #define get_zholes_size(n) (0) | ||
24 | #endif /* CONFIG_NUMA */ | ||
25 | 20 | ||
26 | extern int get_memcfg_numa_flat(void ); | 21 | extern int get_memcfg_numa_flat(void ); |
27 | /* | 22 | /* |
@@ -42,6 +37,11 @@ static inline void get_memcfg_numa(void) | |||
42 | get_memcfg_numa_flat(); | 37 | get_memcfg_numa_flat(); |
43 | } | 38 | } |
44 | 39 | ||
40 | extern int early_pfn_to_nid(unsigned long pfn); | ||
41 | |||
42 | #else /* !CONFIG_NUMA */ | ||
43 | #define get_memcfg_numa get_memcfg_numa_flat | ||
44 | #define get_zholes_size(n) (0) | ||
45 | #endif /* CONFIG_NUMA */ | 45 | #endif /* CONFIG_NUMA */ |
46 | 46 | ||
47 | #ifdef CONFIG_DISCONTIGMEM | 47 | #ifdef CONFIG_DISCONTIGMEM |
@@ -151,6 +151,4 @@ static inline int pfn_valid(int pfn) | |||
151 | 151 | ||
152 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ | 152 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ |
153 | 153 | ||
154 | extern int early_pfn_to_nid(unsigned long pfn); | ||
155 | |||
156 | #endif /* _ASM_MMZONE_H_ */ | 154 | #endif /* _ASM_MMZONE_H_ */ |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 6f0f93d0d417..5d06e6bd6ba0 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -694,4 +694,12 @@ extern unsigned long boot_option_idle_override; | |||
694 | extern void enable_sep_cpu(void); | 694 | extern void enable_sep_cpu(void); |
695 | extern int sysenter_setup(void); | 695 | extern int sysenter_setup(void); |
696 | 696 | ||
697 | #ifdef CONFIG_MTRR | ||
698 | extern void mtrr_ap_init(void); | ||
699 | extern void mtrr_bp_init(void); | ||
700 | #else | ||
701 | #define mtrr_ap_init() do {} while (0) | ||
702 | #define mtrr_bp_init() do {} while (0) | ||
703 | #endif | ||
704 | |||
697 | #endif /* __ASM_I386_PROCESSOR_H */ | 705 | #endif /* __ASM_I386_PROCESSOR_H */ |
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h index 635fdce854a8..ab827d298569 100644 --- a/include/asm-ia64/sn/arch.h +++ b/include/asm-ia64/sn/arch.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef _ASM_IA64_SN_ARCH_H | 11 | #ifndef _ASM_IA64_SN_ARCH_H |
12 | #define _ASM_IA64_SN_ARCH_H | 12 | #define _ASM_IA64_SN_ARCH_H |
13 | 13 | ||
14 | #include <linux/numa.h> | ||
14 | #include <asm/types.h> | 15 | #include <asm/types.h> |
15 | #include <asm/percpu.h> | 16 | #include <asm/percpu.h> |
16 | #include <asm/sn/types.h> | 17 | #include <asm/sn/types.h> |
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index e51471fb0867..e190dd4213d5 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _ASM_IA64_SN_INTR_H | 9 | #ifndef _ASM_IA64_SN_INTR_H |
10 | #define _ASM_IA64_SN_INTR_H | 10 | #define _ASM_IA64_SN_INTR_H |
11 | 11 | ||
12 | #include <linux/rcupdate.h> | ||
13 | |||
12 | #define SGI_UART_VECTOR (0xe9) | 14 | #define SGI_UART_VECTOR (0xe9) |
13 | #define SGI_PCIBR_ERROR (0x33) | 15 | #define SGI_PCIBR_ERROR (0x33) |
14 | 16 | ||
@@ -33,7 +35,7 @@ | |||
33 | 35 | ||
34 | // The SN PROM irq struct | 36 | // The SN PROM irq struct |
35 | struct sn_irq_info { | 37 | struct sn_irq_info { |
36 | struct sn_irq_info *irq_next; /* sharing irq list */ | 38 | struct sn_irq_info *irq_next; /* deprecated DO NOT USE */ |
37 | short irq_nasid; /* Nasid IRQ is assigned to */ | 39 | short irq_nasid; /* Nasid IRQ is assigned to */ |
38 | int irq_slice; /* slice IRQ is assigned to */ | 40 | int irq_slice; /* slice IRQ is assigned to */ |
39 | int irq_cpuid; /* kernel logical cpuid */ | 41 | int irq_cpuid; /* kernel logical cpuid */ |
@@ -47,6 +49,8 @@ struct sn_irq_info { | |||
47 | int irq_cookie; /* unique cookie */ | 49 | int irq_cookie; /* unique cookie */ |
48 | int irq_flags; /* flags */ | 50 | int irq_flags; /* flags */ |
49 | int irq_share_cnt; /* num devices sharing IRQ */ | 51 | int irq_share_cnt; /* num devices sharing IRQ */ |
52 | struct list_head list; /* list of sn_irq_info structs */ | ||
53 | struct rcu_head rcu; /* rcu callback list */ | ||
50 | }; | 54 | }; |
51 | 55 | ||
52 | extern void sn_send_IPI_phys(int, long, int, int); | 56 | extern void sn_send_IPI_phys(int, long, int, int); |
diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h new file mode 100644 index 000000000000..f9b8d2164007 --- /dev/null +++ b/include/asm-ia64/sn/pcibr_provider.h | |||
@@ -0,0 +1,159 @@ | |||
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) 1992-1997,2000-2004 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | ||
9 | #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | ||
10 | |||
11 | #include <asm/sn/intr.h> | ||
12 | #include <asm/sn/pcibus_provider_defs.h> | ||
13 | |||
14 | /* Workarounds */ | ||
15 | #define PV907516 (1 << 1) /* TIOCP: Don't write the write buffer flush reg */ | ||
16 | |||
17 | #define BUSTYPE_MASK 0x1 | ||
18 | |||
19 | /* Macros given a pcibus structure */ | ||
20 | #define IS_PCIX(ps) ((ps)->pbi_bridge_mode & BUSTYPE_MASK) | ||
21 | #define IS_PCI_BRIDGE_ASIC(asic) (asic == PCIIO_ASIC_TYPE_PIC || \ | ||
22 | asic == PCIIO_ASIC_TYPE_TIOCP) | ||
23 | #define IS_PIC_SOFT(ps) (ps->pbi_bridge_type == PCIBR_BRIDGETYPE_PIC) | ||
24 | |||
25 | |||
26 | /* | ||
27 | * The different PCI Bridge types supported on the SGI Altix platforms | ||
28 | */ | ||
29 | #define PCIBR_BRIDGETYPE_UNKNOWN -1 | ||
30 | #define PCIBR_BRIDGETYPE_PIC 2 | ||
31 | #define PCIBR_BRIDGETYPE_TIOCP 3 | ||
32 | |||
33 | /* | ||
34 | * Bridge 64bit Direct Map Attributes | ||
35 | */ | ||
36 | #define PCI64_ATTR_PREF (1ull << 59) | ||
37 | #define PCI64_ATTR_PREC (1ull << 58) | ||
38 | #define PCI64_ATTR_VIRTUAL (1ull << 57) | ||
39 | #define PCI64_ATTR_BAR (1ull << 56) | ||
40 | #define PCI64_ATTR_SWAP (1ull << 55) | ||
41 | #define PCI64_ATTR_VIRTUAL1 (1ull << 54) | ||
42 | |||
43 | #define PCI32_LOCAL_BASE 0 | ||
44 | #define PCI32_MAPPED_BASE 0x40000000 | ||
45 | #define PCI32_DIRECT_BASE 0x80000000 | ||
46 | |||
47 | #define IS_PCI32_MAPPED(x) ((uint64_t)(x) < PCI32_DIRECT_BASE && \ | ||
48 | (uint64_t)(x) >= PCI32_MAPPED_BASE) | ||
49 | #define IS_PCI32_DIRECT(x) ((uint64_t)(x) >= PCI32_MAPPED_BASE) | ||
50 | |||
51 | |||
52 | /* | ||
53 | * Bridge PMU Address Transaltion Entry Attibutes | ||
54 | */ | ||
55 | #define PCI32_ATE_V (0x1 << 0) | ||
56 | #define PCI32_ATE_CO (0x1 << 1) | ||
57 | #define PCI32_ATE_PREC (0x1 << 2) | ||
58 | #define PCI32_ATE_PREF (0x1 << 3) | ||
59 | #define PCI32_ATE_BAR (0x1 << 4) | ||
60 | #define PCI32_ATE_ADDR_SHFT 12 | ||
61 | |||
62 | #define MINIMAL_ATES_REQUIRED(addr, size) \ | ||
63 | (IOPG(IOPGOFF(addr) + (size) - 1) == IOPG((size) - 1)) | ||
64 | |||
65 | #define MINIMAL_ATE_FLAG(addr, size) \ | ||
66 | (MINIMAL_ATES_REQUIRED((uint64_t)addr, size) ? 1 : 0) | ||
67 | |||
68 | /* bit 29 of the pci address is the SWAP bit */ | ||
69 | #define ATE_SWAPSHIFT 29 | ||
70 | #define ATE_SWAP_ON(x) ((x) |= (1 << ATE_SWAPSHIFT)) | ||
71 | #define ATE_SWAP_OFF(x) ((x) &= ~(1 << ATE_SWAPSHIFT)) | ||
72 | |||
73 | /* | ||
74 | * I/O page size | ||
75 | */ | ||
76 | #if PAGE_SIZE < 16384 | ||
77 | #define IOPFNSHIFT 12 /* 4K per mapped page */ | ||
78 | #else | ||
79 | #define IOPFNSHIFT 14 /* 16K per mapped page */ | ||
80 | #endif | ||
81 | |||
82 | #define IOPGSIZE (1 << IOPFNSHIFT) | ||
83 | #define IOPG(x) ((x) >> IOPFNSHIFT) | ||
84 | #define IOPGOFF(x) ((x) & (IOPGSIZE-1)) | ||
85 | |||
86 | #define PCIBR_DEV_SWAP_DIR (1ull << 19) | ||
87 | #define PCIBR_CTRL_PAGE_SIZE (0x1 << 21) | ||
88 | |||
89 | /* | ||
90 | * PMU resources. | ||
91 | */ | ||
92 | struct ate_resource{ | ||
93 | uint64_t *ate; | ||
94 | uint64_t num_ate; | ||
95 | uint64_t lowest_free_index; | ||
96 | }; | ||
97 | |||
98 | struct pcibus_info { | ||
99 | struct pcibus_bussoft pbi_buscommon; /* common header */ | ||
100 | uint32_t pbi_moduleid; | ||
101 | short pbi_bridge_type; | ||
102 | short pbi_bridge_mode; | ||
103 | |||
104 | struct ate_resource pbi_int_ate_resource; | ||
105 | uint64_t pbi_int_ate_size; | ||
106 | |||
107 | uint64_t pbi_dir_xbase; | ||
108 | char pbi_hub_xid; | ||
109 | |||
110 | uint64_t pbi_devreg[8]; | ||
111 | |||
112 | uint32_t pbi_valid_devices; | ||
113 | uint32_t pbi_enabled_devices; | ||
114 | |||
115 | spinlock_t pbi_lock; | ||
116 | }; | ||
117 | |||
118 | /* | ||
119 | * pcibus_info structure locking macros | ||
120 | */ | ||
121 | inline static unsigned long | ||
122 | pcibr_lock(struct pcibus_info *pcibus_info) | ||
123 | { | ||
124 | unsigned long flag; | ||
125 | spin_lock_irqsave(&pcibus_info->pbi_lock, flag); | ||
126 | return(flag); | ||
127 | } | ||
128 | #define pcibr_unlock(pcibus_info, flag) spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag) | ||
129 | |||
130 | extern int pcibr_init_provider(void); | ||
131 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *); | ||
132 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); | ||
133 | extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t); | ||
134 | extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int); | ||
135 | |||
136 | /* | ||
137 | * prototypes for the bridge asic register access routines in pcibr_reg.c | ||
138 | */ | ||
139 | extern void pcireg_control_bit_clr(struct pcibus_info *, uint64_t); | ||
140 | extern void pcireg_control_bit_set(struct pcibus_info *, uint64_t); | ||
141 | extern uint64_t pcireg_tflush_get(struct pcibus_info *); | ||
142 | extern uint64_t pcireg_intr_status_get(struct pcibus_info *); | ||
143 | extern void pcireg_intr_enable_bit_clr(struct pcibus_info *, uint64_t); | ||
144 | extern void pcireg_intr_enable_bit_set(struct pcibus_info *, uint64_t); | ||
145 | extern void pcireg_intr_addr_addr_set(struct pcibus_info *, int, uint64_t); | ||
146 | extern void pcireg_force_intr_set(struct pcibus_info *, int); | ||
147 | extern uint64_t pcireg_wrb_flush_get(struct pcibus_info *, int); | ||
148 | extern void pcireg_int_ate_set(struct pcibus_info *, int, uint64_t); | ||
149 | extern uint64_t * pcireg_int_ate_addr(struct pcibus_info *, int); | ||
150 | extern void pcibr_force_interrupt(struct sn_irq_info *sn_irq_info); | ||
151 | extern void pcibr_change_devices_irq(struct sn_irq_info *sn_irq_info); | ||
152 | extern int pcibr_ate_alloc(struct pcibus_info *, int); | ||
153 | extern void pcibr_ate_free(struct pcibus_info *, int); | ||
154 | extern void ate_write(struct pcibus_info *, int, int, uint64_t); | ||
155 | extern int sal_pcibr_slot_enable(struct pcibus_info *soft, int device, | ||
156 | void *resp); | ||
157 | extern int sal_pcibr_slot_disable(struct pcibus_info *soft, int device, | ||
158 | int action, void *resp); | ||
159 | #endif | ||
diff --git a/include/asm-ia64/sn/pcidev.h b/include/asm-ia64/sn/pcidev.h index ed4031d80811..49711d00ad04 100644 --- a/include/asm-ia64/sn/pcidev.h +++ b/include/asm-ia64/sn/pcidev.h | |||
@@ -10,11 +10,11 @@ | |||
10 | 10 | ||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | 12 | ||
13 | extern struct sn_irq_info **sn_irq; | ||
14 | |||
15 | #define SN_PCIDEV_INFO(pci_dev) \ | 13 | #define SN_PCIDEV_INFO(pci_dev) \ |
16 | ((struct pcidev_info *)(pci_dev)->sysdata) | 14 | ((struct pcidev_info *)(pci_dev)->sysdata) |
17 | 15 | ||
16 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ | ||
17 | (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | ||
18 | /* | 18 | /* |
19 | * Given a pci_bus, return the sn pcibus_bussoft struct. Note that | 19 | * Given a pci_bus, return the sn pcibus_bussoft struct. Note that |
20 | * this only works for root busses, not for busses represented by PPB's. | 20 | * this only works for root busses, not for busses represented by PPB's. |
@@ -23,6 +23,8 @@ extern struct sn_irq_info **sn_irq; | |||
23 | #define SN_PCIBUS_BUSSOFT(pci_bus) \ | 23 | #define SN_PCIBUS_BUSSOFT(pci_bus) \ |
24 | ((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | 24 | ((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) |
25 | 25 | ||
26 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ | ||
27 | (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | ||
26 | /* | 28 | /* |
27 | * Given a struct pci_dev, return the sn pcibus_bussoft struct. Note | 29 | * Given a struct pci_dev, return the sn pcibus_bussoft struct. Note |
28 | * that this is not equivalent to SN_PCIBUS_BUSSOFT(pci_dev->bus) due | 30 | * that this is not equivalent to SN_PCIBUS_BUSSOFT(pci_dev->bus) due |
@@ -50,9 +52,17 @@ struct pcidev_info { | |||
50 | 52 | ||
51 | struct sn_irq_info *pdi_sn_irq_info; | 53 | struct sn_irq_info *pdi_sn_irq_info; |
52 | struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ | 54 | struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ |
55 | struct pci_dev *host_pci_dev; /* host bus link */ | ||
53 | }; | 56 | }; |
54 | 57 | ||
55 | extern void sn_irq_fixup(struct pci_dev *pci_dev, | 58 | extern void sn_irq_fixup(struct pci_dev *pci_dev, |
56 | struct sn_irq_info *sn_irq_info); | 59 | struct sn_irq_info *sn_irq_info); |
57 | 60 | extern void sn_irq_unfixup(struct pci_dev *pci_dev); | |
61 | extern void sn_pci_controller_fixup(int segment, int busnum, | ||
62 | struct pci_bus *bus); | ||
63 | extern void sn_bus_store_sysdata(struct pci_dev *dev); | ||
64 | extern void sn_bus_free_sysdata(void); | ||
65 | extern void sn_pci_fixup_slot(struct pci_dev *dev); | ||
66 | extern void sn_pci_unfixup_slot(struct pci_dev *dev); | ||
67 | extern void sn_irq_lh_init(void); | ||
58 | #endif /* _ASM_IA64_SN_PCI_PCIDEV_H */ | 68 | #endif /* _ASM_IA64_SN_PCI_PCIDEV_H */ |
diff --git a/include/asm-ia64/sn/pic.h b/include/asm-ia64/sn/pic.h new file mode 100644 index 000000000000..0de82e6b0893 --- /dev/null +++ b/include/asm-ia64/sn/pic.h | |||
@@ -0,0 +1,261 @@ | |||
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) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | #ifndef _ASM_IA64_SN_PCI_PIC_H | ||
9 | #define _ASM_IA64_SN_PCI_PIC_H | ||
10 | |||
11 | /* | ||
12 | * PIC AS DEVICE ZERO | ||
13 | * ------------------ | ||
14 | * | ||
15 | * PIC handles PCI/X busses. PCI/X requires that the 'bridge' (i.e. PIC) | ||
16 | * be designated as 'device 0'. That is a departure from earlier SGI | ||
17 | * PCI bridges. Because of that we use config space 1 to access the | ||
18 | * config space of the first actual PCI device on the bus. | ||
19 | * Here's what the PIC manual says: | ||
20 | * | ||
21 | * The current PCI-X bus specification now defines that the parent | ||
22 | * hosts bus bridge (PIC for example) must be device 0 on bus 0. PIC | ||
23 | * reduced the total number of devices from 8 to 4 and removed the | ||
24 | * device registers and windows, now only supporting devices 0,1,2, and | ||
25 | * 3. PIC did leave all 8 configuration space windows. The reason was | ||
26 | * there was nothing to gain by removing them. Here in lies the problem. | ||
27 | * The device numbering we do using 0 through 3 is unrelated to the device | ||
28 | * numbering which PCI-X requires in configuration space. In the past we | ||
29 | * correlated Configs pace and our device space 0 <-> 0, 1 <-> 1, etc. | ||
30 | * PCI-X requires we start a 1, not 0 and currently the PX brick | ||
31 | * does associate our: | ||
32 | * | ||
33 | * device 0 with configuration space window 1, | ||
34 | * device 1 with configuration space window 2, | ||
35 | * device 2 with configuration space window 3, | ||
36 | * device 3 with configuration space window 4. | ||
37 | * | ||
38 | * The net effect is that all config space access are off-by-one with | ||
39 | * relation to other per-slot accesses on the PIC. | ||
40 | * Here is a table that shows some of that: | ||
41 | * | ||
42 | * Internal Slot# | ||
43 | * | | ||
44 | * | 0 1 2 3 | ||
45 | * ----------|--------------------------------------- | ||
46 | * config | 0x21000 0x22000 0x23000 0x24000 | ||
47 | * | | ||
48 | * even rrb | 0[0] n/a 1[0] n/a [] == implied even/odd | ||
49 | * | | ||
50 | * odd rrb | n/a 0[1] n/a 1[1] | ||
51 | * | | ||
52 | * int dev | 00 01 10 11 | ||
53 | * | | ||
54 | * ext slot# | 1 2 3 4 | ||
55 | * ----------|--------------------------------------- | ||
56 | */ | ||
57 | |||
58 | #define PIC_ATE_TARGETID_SHFT 8 | ||
59 | #define PIC_HOST_INTR_ADDR 0x0000FFFFFFFFFFFFUL | ||
60 | #define PIC_PCI64_ATTR_TARG_SHFT 60 | ||
61 | |||
62 | |||
63 | /***************************************************************************** | ||
64 | *********************** PIC MMR structure mapping *************************** | ||
65 | *****************************************************************************/ | ||
66 | |||
67 | /* NOTE: PIC WAR. PV#854697. PIC does not allow writes just to [31:0] | ||
68 | * of a 64-bit register. When writing PIC registers, always write the | ||
69 | * entire 64 bits. | ||
70 | */ | ||
71 | |||
72 | struct pic { | ||
73 | |||
74 | /* 0x000000-0x00FFFF -- Local Registers */ | ||
75 | |||
76 | /* 0x000000-0x000057 -- Standard Widget Configuration */ | ||
77 | uint64_t p_wid_id; /* 0x000000 */ | ||
78 | uint64_t p_wid_stat; /* 0x000008 */ | ||
79 | uint64_t p_wid_err_upper; /* 0x000010 */ | ||
80 | uint64_t p_wid_err_lower; /* 0x000018 */ | ||
81 | #define p_wid_err p_wid_err_lower | ||
82 | uint64_t p_wid_control; /* 0x000020 */ | ||
83 | uint64_t p_wid_req_timeout; /* 0x000028 */ | ||
84 | uint64_t p_wid_int_upper; /* 0x000030 */ | ||
85 | uint64_t p_wid_int_lower; /* 0x000038 */ | ||
86 | #define p_wid_int p_wid_int_lower | ||
87 | uint64_t p_wid_err_cmdword; /* 0x000040 */ | ||
88 | uint64_t p_wid_llp; /* 0x000048 */ | ||
89 | uint64_t p_wid_tflush; /* 0x000050 */ | ||
90 | |||
91 | /* 0x000058-0x00007F -- Bridge-specific Widget Configuration */ | ||
92 | uint64_t p_wid_aux_err; /* 0x000058 */ | ||
93 | uint64_t p_wid_resp_upper; /* 0x000060 */ | ||
94 | uint64_t p_wid_resp_lower; /* 0x000068 */ | ||
95 | #define p_wid_resp p_wid_resp_lower | ||
96 | uint64_t p_wid_tst_pin_ctrl; /* 0x000070 */ | ||
97 | uint64_t p_wid_addr_lkerr; /* 0x000078 */ | ||
98 | |||
99 | /* 0x000080-0x00008F -- PMU & MAP */ | ||
100 | uint64_t p_dir_map; /* 0x000080 */ | ||
101 | uint64_t _pad_000088; /* 0x000088 */ | ||
102 | |||
103 | /* 0x000090-0x00009F -- SSRAM */ | ||
104 | uint64_t p_map_fault; /* 0x000090 */ | ||
105 | uint64_t _pad_000098; /* 0x000098 */ | ||
106 | |||
107 | /* 0x0000A0-0x0000AF -- Arbitration */ | ||
108 | uint64_t p_arb; /* 0x0000A0 */ | ||
109 | uint64_t _pad_0000A8; /* 0x0000A8 */ | ||
110 | |||
111 | /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */ | ||
112 | uint64_t p_ate_parity_err; /* 0x0000B0 */ | ||
113 | uint64_t _pad_0000B8; /* 0x0000B8 */ | ||
114 | |||
115 | /* 0x0000C0-0x0000FF -- PCI/GIO */ | ||
116 | uint64_t p_bus_timeout; /* 0x0000C0 */ | ||
117 | uint64_t p_pci_cfg; /* 0x0000C8 */ | ||
118 | uint64_t p_pci_err_upper; /* 0x0000D0 */ | ||
119 | uint64_t p_pci_err_lower; /* 0x0000D8 */ | ||
120 | #define p_pci_err p_pci_err_lower | ||
121 | uint64_t _pad_0000E0[4]; /* 0x0000{E0..F8} */ | ||
122 | |||
123 | /* 0x000100-0x0001FF -- Interrupt */ | ||
124 | uint64_t p_int_status; /* 0x000100 */ | ||
125 | uint64_t p_int_enable; /* 0x000108 */ | ||
126 | uint64_t p_int_rst_stat; /* 0x000110 */ | ||
127 | uint64_t p_int_mode; /* 0x000118 */ | ||
128 | uint64_t p_int_device; /* 0x000120 */ | ||
129 | uint64_t p_int_host_err; /* 0x000128 */ | ||
130 | uint64_t p_int_addr[8]; /* 0x0001{30,,,68} */ | ||
131 | uint64_t p_err_int_view; /* 0x000170 */ | ||
132 | uint64_t p_mult_int; /* 0x000178 */ | ||
133 | uint64_t p_force_always[8]; /* 0x0001{80,,,B8} */ | ||
134 | uint64_t p_force_pin[8]; /* 0x0001{C0,,,F8} */ | ||
135 | |||
136 | /* 0x000200-0x000298 -- Device */ | ||
137 | uint64_t p_device[4]; /* 0x0002{00,,,18} */ | ||
138 | uint64_t _pad_000220[4]; /* 0x0002{20,,,38} */ | ||
139 | uint64_t p_wr_req_buf[4]; /* 0x0002{40,,,58} */ | ||
140 | uint64_t _pad_000260[4]; /* 0x0002{60,,,78} */ | ||
141 | uint64_t p_rrb_map[2]; /* 0x0002{80,,,88} */ | ||
142 | #define p_even_resp p_rrb_map[0] /* 0x000280 */ | ||
143 | #define p_odd_resp p_rrb_map[1] /* 0x000288 */ | ||
144 | uint64_t p_resp_status; /* 0x000290 */ | ||
145 | uint64_t p_resp_clear; /* 0x000298 */ | ||
146 | |||
147 | uint64_t _pad_0002A0[12]; /* 0x0002{A0..F8} */ | ||
148 | |||
149 | /* 0x000300-0x0003F8 -- Buffer Address Match Registers */ | ||
150 | struct { | ||
151 | uint64_t upper; /* 0x0003{00,,,F0} */ | ||
152 | uint64_t lower; /* 0x0003{08,,,F8} */ | ||
153 | } p_buf_addr_match[16]; | ||
154 | |||
155 | /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */ | ||
156 | struct { | ||
157 | uint64_t flush_w_touch; /* 0x000{400,,,5C0} */ | ||
158 | uint64_t flush_wo_touch; /* 0x000{408,,,5C8} */ | ||
159 | uint64_t inflight; /* 0x000{410,,,5D0} */ | ||
160 | uint64_t prefetch; /* 0x000{418,,,5D8} */ | ||
161 | uint64_t total_pci_retry; /* 0x000{420,,,5E0} */ | ||
162 | uint64_t max_pci_retry; /* 0x000{428,,,5E8} */ | ||
163 | uint64_t max_latency; /* 0x000{430,,,5F0} */ | ||
164 | uint64_t clear_all; /* 0x000{438,,,5F8} */ | ||
165 | } p_buf_count[8]; | ||
166 | |||
167 | |||
168 | /* 0x000600-0x0009FF -- PCI/X registers */ | ||
169 | uint64_t p_pcix_bus_err_addr; /* 0x000600 */ | ||
170 | uint64_t p_pcix_bus_err_attr; /* 0x000608 */ | ||
171 | uint64_t p_pcix_bus_err_data; /* 0x000610 */ | ||
172 | uint64_t p_pcix_pio_split_addr; /* 0x000618 */ | ||
173 | uint64_t p_pcix_pio_split_attr; /* 0x000620 */ | ||
174 | uint64_t p_pcix_dma_req_err_attr; /* 0x000628 */ | ||
175 | uint64_t p_pcix_dma_req_err_addr; /* 0x000630 */ | ||
176 | uint64_t p_pcix_timeout; /* 0x000638 */ | ||
177 | |||
178 | uint64_t _pad_000640[120]; /* 0x000{640,,,9F8} */ | ||
179 | |||
180 | /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */ | ||
181 | struct { | ||
182 | uint64_t p_buf_addr; /* 0x000{A00,,,AF0} */ | ||
183 | uint64_t p_buf_attr; /* 0X000{A08,,,AF8} */ | ||
184 | } p_pcix_read_buf_64[16]; | ||
185 | |||
186 | struct { | ||
187 | uint64_t p_buf_addr; /* 0x000{B00,,,BE0} */ | ||
188 | uint64_t p_buf_attr; /* 0x000{B08,,,BE8} */ | ||
189 | uint64_t p_buf_valid; /* 0x000{B10,,,BF0} */ | ||
190 | uint64_t __pad1; /* 0x000{B18,,,BF8} */ | ||
191 | } p_pcix_write_buf_64[8]; | ||
192 | |||
193 | /* End of Local Registers -- Start of Address Map space */ | ||
194 | |||
195 | char _pad_000c00[0x010000 - 0x000c00]; | ||
196 | |||
197 | /* 0x010000-0x011fff -- Internal ATE RAM (Auto Parity Generation) */ | ||
198 | uint64_t p_int_ate_ram[1024]; /* 0x010000-0x011fff */ | ||
199 | |||
200 | /* 0x012000-0x013fff -- Internal ATE RAM (Manual Parity Generation) */ | ||
201 | uint64_t p_int_ate_ram_mp[1024]; /* 0x012000-0x013fff */ | ||
202 | |||
203 | char _pad_014000[0x18000 - 0x014000]; | ||
204 | |||
205 | /* 0x18000-0x197F8 -- PIC Write Request Ram */ | ||
206 | uint64_t p_wr_req_lower[256]; /* 0x18000 - 0x187F8 */ | ||
207 | uint64_t p_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */ | ||
208 | uint64_t p_wr_req_parity[256]; /* 0x19000 - 0x197F8 */ | ||
209 | |||
210 | char _pad_019800[0x20000 - 0x019800]; | ||
211 | |||
212 | /* 0x020000-0x027FFF -- PCI Device Configuration Spaces */ | ||
213 | union { | ||
214 | uint8_t c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */ | ||
215 | uint16_t s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */ | ||
216 | uint32_t l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */ | ||
217 | uint64_t d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */ | ||
218 | union { | ||
219 | uint8_t c[0x100 / 1]; | ||
220 | uint16_t s[0x100 / 2]; | ||
221 | uint32_t l[0x100 / 4]; | ||
222 | uint64_t d[0x100 / 8]; | ||
223 | } f[8]; | ||
224 | } p_type0_cfg_dev[8]; /* 0x02{0000,,,7FFF} */ | ||
225 | |||
226 | /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */ | ||
227 | union { | ||
228 | uint8_t c[0x1000 / 1]; /* 0x028000-0x029000 */ | ||
229 | uint16_t s[0x1000 / 2]; /* 0x028000-0x029000 */ | ||
230 | uint32_t l[0x1000 / 4]; /* 0x028000-0x029000 */ | ||
231 | uint64_t d[0x1000 / 8]; /* 0x028000-0x029000 */ | ||
232 | union { | ||
233 | uint8_t c[0x100 / 1]; | ||
234 | uint16_t s[0x100 / 2]; | ||
235 | uint32_t l[0x100 / 4]; | ||
236 | uint64_t d[0x100 / 8]; | ||
237 | } f[8]; | ||
238 | } p_type1_cfg; /* 0x028000-0x029000 */ | ||
239 | |||
240 | char _pad_029000[0x030000-0x029000]; | ||
241 | |||
242 | /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */ | ||
243 | union { | ||
244 | uint8_t c[8 / 1]; | ||
245 | uint16_t s[8 / 2]; | ||
246 | uint32_t l[8 / 4]; | ||
247 | uint64_t d[8 / 8]; | ||
248 | } p_pci_iack; /* 0x030000-0x030007 */ | ||
249 | |||
250 | char _pad_030007[0x040000-0x030008]; | ||
251 | |||
252 | /* 0x040000-0x030007 -- PCIX Special Cycle */ | ||
253 | union { | ||
254 | uint8_t c[8 / 1]; | ||
255 | uint16_t s[8 / 2]; | ||
256 | uint32_t l[8 / 4]; | ||
257 | uint64_t d[8 / 8]; | ||
258 | } p_pcix_cycle; /* 0x040000-0x040007 */ | ||
259 | }; | ||
260 | |||
261 | #endif /* _ASM_IA64_SN_PCI_PIC_H */ | ||
diff --git a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h index 20b300187669..d2c1d34dcce4 100644 --- a/include/asm-ia64/sn/sn_cpuid.h +++ b/include/asm-ia64/sn/sn_cpuid.h | |||
@@ -81,11 +81,6 @@ | |||
81 | * | 81 | * |
82 | */ | 82 | */ |
83 | 83 | ||
84 | #ifndef CONFIG_SMP | ||
85 | #define cpu_physical_id(cpuid) ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff) | ||
86 | #endif | ||
87 | |||
88 | |||
89 | #define get_node_number(addr) NASID_GET(addr) | 84 | #define get_node_number(addr) NASID_GET(addr) |
90 | 85 | ||
91 | /* | 86 | /* |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 1455375d2ce4..27976d223186 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -134,43 +134,28 @@ | |||
134 | 134 | ||
135 | #define SN_SAL_FAKE_PROM 0x02009999 | 135 | #define SN_SAL_FAKE_PROM 0x02009999 |
136 | 136 | ||
137 | |||
138 | /** | 137 | /** |
139 | * sn_sal_rev_major - get the major SGI SAL revision number | 138 | * sn_sal_revision - get the SGI SAL revision number |
140 | * | 139 | * |
141 | * The SGI PROM stores its version in sal_[ab]_rev_(major|minor). | 140 | * The SGI PROM stores its version in the sal_[ab]_rev_(major|minor). |
142 | * This routine simply extracts the major value from the | 141 | * This routine simply extracts the major and minor values and |
143 | * @ia64_sal_systab structure constructed by ia64_sal_init(). | 142 | * presents them in a u32 format. |
144 | */ | 143 | * |
145 | static inline int | 144 | * For example, version 4.05 would be represented at 0x0405. |
146 | sn_sal_rev_major(void) | 145 | */ |
146 | static inline u32 | ||
147 | sn_sal_rev(void) | ||
147 | { | 148 | { |
148 | struct ia64_sal_systab *systab = efi.sal_systab; | 149 | struct ia64_sal_systab *systab = efi.sal_systab; |
149 | 150 | ||
150 | return (int)systab->sal_b_rev_major; | 151 | return (u32)(systab->sal_b_rev_major << 8 | systab->sal_b_rev_minor); |
151 | } | ||
152 | |||
153 | /** | ||
154 | * sn_sal_rev_minor - get the minor SGI SAL revision number | ||
155 | * | ||
156 | * The SGI PROM stores its version in sal_[ab]_rev_(major|minor). | ||
157 | * This routine simply extracts the minor value from the | ||
158 | * @ia64_sal_systab structure constructed by ia64_sal_init(). | ||
159 | */ | ||
160 | static inline int | ||
161 | sn_sal_rev_minor(void) | ||
162 | { | ||
163 | struct ia64_sal_systab *systab = efi.sal_systab; | ||
164 | |||
165 | return (int)systab->sal_b_rev_minor; | ||
166 | } | 152 | } |
167 | 153 | ||
168 | /* | 154 | /* |
169 | * Specify the minimum PROM revsion required for this kernel. | 155 | * Specify the minimum PROM revsion required for this kernel. |
170 | * Note that they're stored in hex format... | 156 | * Note that they're stored in hex format... |
171 | */ | 157 | */ |
172 | #define SN_SAL_MIN_MAJOR 0x4 /* SN2 kernels need at least PROM 4.0 */ | 158 | #define SN_SAL_MIN_VERSION 0x0404 |
173 | #define SN_SAL_MIN_MINOR 0x0 | ||
174 | 159 | ||
175 | /* | 160 | /* |
176 | * Returns the master console nasid, if the call fails, return an illegal | 161 | * Returns the master console nasid, if the call fails, return an illegal |
diff --git a/include/asm-ia64/sn/tiocp.h b/include/asm-ia64/sn/tiocp.h new file mode 100644 index 000000000000..5f2489c9d2dd --- /dev/null +++ b/include/asm-ia64/sn/tiocp.h | |||
@@ -0,0 +1,256 @@ | |||
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-2004 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | #ifndef _ASM_IA64_SN_PCI_TIOCP_H | ||
9 | #define _ASM_IA64_SN_PCI_TIOCP_H | ||
10 | |||
11 | #define TIOCP_HOST_INTR_ADDR 0x003FFFFFFFFFFFFFUL | ||
12 | #define TIOCP_PCI64_CMDTYPE_MEM (0x1ull << 60) | ||
13 | |||
14 | |||
15 | /***************************************************************************** | ||
16 | *********************** TIOCP MMR structure mapping *************************** | ||
17 | *****************************************************************************/ | ||
18 | |||
19 | struct tiocp{ | ||
20 | |||
21 | /* 0x000000-0x00FFFF -- Local Registers */ | ||
22 | |||
23 | /* 0x000000-0x000057 -- (Legacy Widget Space) Configuration */ | ||
24 | uint64_t cp_id; /* 0x000000 */ | ||
25 | uint64_t cp_stat; /* 0x000008 */ | ||
26 | uint64_t cp_err_upper; /* 0x000010 */ | ||
27 | uint64_t cp_err_lower; /* 0x000018 */ | ||
28 | #define cp_err cp_err_lower | ||
29 | uint64_t cp_control; /* 0x000020 */ | ||
30 | uint64_t cp_req_timeout; /* 0x000028 */ | ||
31 | uint64_t cp_intr_upper; /* 0x000030 */ | ||
32 | uint64_t cp_intr_lower; /* 0x000038 */ | ||
33 | #define cp_intr cp_intr_lower | ||
34 | uint64_t cp_err_cmdword; /* 0x000040 */ | ||
35 | uint64_t _pad_000048; /* 0x000048 */ | ||
36 | uint64_t cp_tflush; /* 0x000050 */ | ||
37 | |||
38 | /* 0x000058-0x00007F -- Bridge-specific Configuration */ | ||
39 | uint64_t cp_aux_err; /* 0x000058 */ | ||
40 | uint64_t cp_resp_upper; /* 0x000060 */ | ||
41 | uint64_t cp_resp_lower; /* 0x000068 */ | ||
42 | #define cp_resp cp_resp_lower | ||
43 | uint64_t cp_tst_pin_ctrl; /* 0x000070 */ | ||
44 | uint64_t cp_addr_lkerr; /* 0x000078 */ | ||
45 | |||
46 | /* 0x000080-0x00008F -- PMU & MAP */ | ||
47 | uint64_t cp_dir_map; /* 0x000080 */ | ||
48 | uint64_t _pad_000088; /* 0x000088 */ | ||
49 | |||
50 | /* 0x000090-0x00009F -- SSRAM */ | ||
51 | uint64_t cp_map_fault; /* 0x000090 */ | ||
52 | uint64_t _pad_000098; /* 0x000098 */ | ||
53 | |||
54 | /* 0x0000A0-0x0000AF -- Arbitration */ | ||
55 | uint64_t cp_arb; /* 0x0000A0 */ | ||
56 | uint64_t _pad_0000A8; /* 0x0000A8 */ | ||
57 | |||
58 | /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */ | ||
59 | uint64_t cp_ate_parity_err; /* 0x0000B0 */ | ||
60 | uint64_t _pad_0000B8; /* 0x0000B8 */ | ||
61 | |||
62 | /* 0x0000C0-0x0000FF -- PCI/GIO */ | ||
63 | uint64_t cp_bus_timeout; /* 0x0000C0 */ | ||
64 | uint64_t cp_pci_cfg; /* 0x0000C8 */ | ||
65 | uint64_t cp_pci_err_upper; /* 0x0000D0 */ | ||
66 | uint64_t cp_pci_err_lower; /* 0x0000D8 */ | ||
67 | #define cp_pci_err cp_pci_err_lower | ||
68 | uint64_t _pad_0000E0[4]; /* 0x0000{E0..F8} */ | ||
69 | |||
70 | /* 0x000100-0x0001FF -- Interrupt */ | ||
71 | uint64_t cp_int_status; /* 0x000100 */ | ||
72 | uint64_t cp_int_enable; /* 0x000108 */ | ||
73 | uint64_t cp_int_rst_stat; /* 0x000110 */ | ||
74 | uint64_t cp_int_mode; /* 0x000118 */ | ||
75 | uint64_t cp_int_device; /* 0x000120 */ | ||
76 | uint64_t cp_int_host_err; /* 0x000128 */ | ||
77 | uint64_t cp_int_addr[8]; /* 0x0001{30,,,68} */ | ||
78 | uint64_t cp_err_int_view; /* 0x000170 */ | ||
79 | uint64_t cp_mult_int; /* 0x000178 */ | ||
80 | uint64_t cp_force_always[8]; /* 0x0001{80,,,B8} */ | ||
81 | uint64_t cp_force_pin[8]; /* 0x0001{C0,,,F8} */ | ||
82 | |||
83 | /* 0x000200-0x000298 -- Device */ | ||
84 | uint64_t cp_device[4]; /* 0x0002{00,,,18} */ | ||
85 | uint64_t _pad_000220[4]; /* 0x0002{20,,,38} */ | ||
86 | uint64_t cp_wr_req_buf[4]; /* 0x0002{40,,,58} */ | ||
87 | uint64_t _pad_000260[4]; /* 0x0002{60,,,78} */ | ||
88 | uint64_t cp_rrb_map[2]; /* 0x0002{80,,,88} */ | ||
89 | #define cp_even_resp cp_rrb_map[0] /* 0x000280 */ | ||
90 | #define cp_odd_resp cp_rrb_map[1] /* 0x000288 */ | ||
91 | uint64_t cp_resp_status; /* 0x000290 */ | ||
92 | uint64_t cp_resp_clear; /* 0x000298 */ | ||
93 | |||
94 | uint64_t _pad_0002A0[12]; /* 0x0002{A0..F8} */ | ||
95 | |||
96 | /* 0x000300-0x0003F8 -- Buffer Address Match Registers */ | ||
97 | struct { | ||
98 | uint64_t upper; /* 0x0003{00,,,F0} */ | ||
99 | uint64_t lower; /* 0x0003{08,,,F8} */ | ||
100 | } cp_buf_addr_match[16]; | ||
101 | |||
102 | /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */ | ||
103 | struct { | ||
104 | uint64_t flush_w_touch; /* 0x000{400,,,5C0} */ | ||
105 | uint64_t flush_wo_touch; /* 0x000{408,,,5C8} */ | ||
106 | uint64_t inflight; /* 0x000{410,,,5D0} */ | ||
107 | uint64_t prefetch; /* 0x000{418,,,5D8} */ | ||
108 | uint64_t total_pci_retry; /* 0x000{420,,,5E0} */ | ||
109 | uint64_t max_pci_retry; /* 0x000{428,,,5E8} */ | ||
110 | uint64_t max_latency; /* 0x000{430,,,5F0} */ | ||
111 | uint64_t clear_all; /* 0x000{438,,,5F8} */ | ||
112 | } cp_buf_count[8]; | ||
113 | |||
114 | |||
115 | /* 0x000600-0x0009FF -- PCI/X registers */ | ||
116 | uint64_t cp_pcix_bus_err_addr; /* 0x000600 */ | ||
117 | uint64_t cp_pcix_bus_err_attr; /* 0x000608 */ | ||
118 | uint64_t cp_pcix_bus_err_data; /* 0x000610 */ | ||
119 | uint64_t cp_pcix_pio_split_addr; /* 0x000618 */ | ||
120 | uint64_t cp_pcix_pio_split_attr; /* 0x000620 */ | ||
121 | uint64_t cp_pcix_dma_req_err_attr; /* 0x000628 */ | ||
122 | uint64_t cp_pcix_dma_req_err_addr; /* 0x000630 */ | ||
123 | uint64_t cp_pcix_timeout; /* 0x000638 */ | ||
124 | |||
125 | uint64_t _pad_000640[24]; /* 0x000{640,,,6F8} */ | ||
126 | |||
127 | /* 0x000700-0x000737 -- Debug Registers */ | ||
128 | uint64_t cp_ct_debug_ctl; /* 0x000700 */ | ||
129 | uint64_t cp_br_debug_ctl; /* 0x000708 */ | ||
130 | uint64_t cp_mux3_debug_ctl; /* 0x000710 */ | ||
131 | uint64_t cp_mux4_debug_ctl; /* 0x000718 */ | ||
132 | uint64_t cp_mux5_debug_ctl; /* 0x000720 */ | ||
133 | uint64_t cp_mux6_debug_ctl; /* 0x000728 */ | ||
134 | uint64_t cp_mux7_debug_ctl; /* 0x000730 */ | ||
135 | |||
136 | uint64_t _pad_000738[89]; /* 0x000{738,,,9F8} */ | ||
137 | |||
138 | /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */ | ||
139 | struct { | ||
140 | uint64_t cp_buf_addr; /* 0x000{A00,,,AF0} */ | ||
141 | uint64_t cp_buf_attr; /* 0X000{A08,,,AF8} */ | ||
142 | } cp_pcix_read_buf_64[16]; | ||
143 | |||
144 | struct { | ||
145 | uint64_t cp_buf_addr; /* 0x000{B00,,,BE0} */ | ||
146 | uint64_t cp_buf_attr; /* 0x000{B08,,,BE8} */ | ||
147 | uint64_t cp_buf_valid; /* 0x000{B10,,,BF0} */ | ||
148 | uint64_t __pad1; /* 0x000{B18,,,BF8} */ | ||
149 | } cp_pcix_write_buf_64[8]; | ||
150 | |||
151 | /* End of Local Registers -- Start of Address Map space */ | ||
152 | |||
153 | char _pad_000c00[0x010000 - 0x000c00]; | ||
154 | |||
155 | /* 0x010000-0x011FF8 -- Internal ATE RAM (Auto Parity Generation) */ | ||
156 | uint64_t cp_int_ate_ram[1024]; /* 0x010000-0x011FF8 */ | ||
157 | |||
158 | char _pad_012000[0x14000 - 0x012000]; | ||
159 | |||
160 | /* 0x014000-0x015FF8 -- Internal ATE RAM (Manual Parity Generation) */ | ||
161 | uint64_t cp_int_ate_ram_mp[1024]; /* 0x014000-0x015FF8 */ | ||
162 | |||
163 | char _pad_016000[0x18000 - 0x016000]; | ||
164 | |||
165 | /* 0x18000-0x197F8 -- TIOCP Write Request Ram */ | ||
166 | uint64_t cp_wr_req_lower[256]; /* 0x18000 - 0x187F8 */ | ||
167 | uint64_t cp_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */ | ||
168 | uint64_t cp_wr_req_parity[256]; /* 0x19000 - 0x197F8 */ | ||
169 | |||
170 | char _pad_019800[0x1C000 - 0x019800]; | ||
171 | |||
172 | /* 0x1C000-0x1EFF8 -- TIOCP Read Response Ram */ | ||
173 | uint64_t cp_rd_resp_lower[512]; /* 0x1C000 - 0x1CFF8 */ | ||
174 | uint64_t cp_rd_resp_upper[512]; /* 0x1D000 - 0x1DFF8 */ | ||
175 | uint64_t cp_rd_resp_parity[512]; /* 0x1E000 - 0x1EFF8 */ | ||
176 | |||
177 | char _pad_01F000[0x20000 - 0x01F000]; | ||
178 | |||
179 | /* 0x020000-0x021FFF -- Host Device (CP) Configuration Space (not used) */ | ||
180 | char _pad_020000[0x021000 - 0x20000]; | ||
181 | |||
182 | /* 0x021000-0x027FFF -- PCI Device Configuration Spaces */ | ||
183 | union { | ||
184 | uint8_t c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */ | ||
185 | uint16_t s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */ | ||
186 | uint32_t l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */ | ||
187 | uint64_t d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */ | ||
188 | union { | ||
189 | uint8_t c[0x100 / 1]; | ||
190 | uint16_t s[0x100 / 2]; | ||
191 | uint32_t l[0x100 / 4]; | ||
192 | uint64_t d[0x100 / 8]; | ||
193 | } f[8]; | ||
194 | } cp_type0_cfg_dev[7]; /* 0x02{1000,,,7FFF} */ | ||
195 | |||
196 | /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */ | ||
197 | union { | ||
198 | uint8_t c[0x1000 / 1]; /* 0x028000-0x029000 */ | ||
199 | uint16_t s[0x1000 / 2]; /* 0x028000-0x029000 */ | ||
200 | uint32_t l[0x1000 / 4]; /* 0x028000-0x029000 */ | ||
201 | uint64_t d[0x1000 / 8]; /* 0x028000-0x029000 */ | ||
202 | union { | ||
203 | uint8_t c[0x100 / 1]; | ||
204 | uint16_t s[0x100 / 2]; | ||
205 | uint32_t l[0x100 / 4]; | ||
206 | uint64_t d[0x100 / 8]; | ||
207 | } f[8]; | ||
208 | } cp_type1_cfg; /* 0x028000-0x029000 */ | ||
209 | |||
210 | char _pad_029000[0x030000-0x029000]; | ||
211 | |||
212 | /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */ | ||
213 | union { | ||
214 | uint8_t c[8 / 1]; | ||
215 | uint16_t s[8 / 2]; | ||
216 | uint32_t l[8 / 4]; | ||
217 | uint64_t d[8 / 8]; | ||
218 | } cp_pci_iack; /* 0x030000-0x030007 */ | ||
219 | |||
220 | char _pad_030007[0x040000-0x030008]; | ||
221 | |||
222 | /* 0x040000-0x040007 -- PCIX Special Cycle */ | ||
223 | union { | ||
224 | uint8_t c[8 / 1]; | ||
225 | uint16_t s[8 / 2]; | ||
226 | uint32_t l[8 / 4]; | ||
227 | uint64_t d[8 / 8]; | ||
228 | } cp_pcix_cycle; /* 0x040000-0x040007 */ | ||
229 | |||
230 | char _pad_040007[0x200000-0x040008]; | ||
231 | |||
232 | /* 0x200000-0x7FFFFF -- PCI/GIO Device Spaces */ | ||
233 | union { | ||
234 | uint8_t c[0x100000 / 1]; | ||
235 | uint16_t s[0x100000 / 2]; | ||
236 | uint32_t l[0x100000 / 4]; | ||
237 | uint64_t d[0x100000 / 8]; | ||
238 | } cp_devio_raw[6]; /* 0x200000-0x7FFFFF */ | ||
239 | |||
240 | #define cp_devio(n) cp_devio_raw[((n)<2)?(n*2):(n+2)] | ||
241 | |||
242 | char _pad_800000[0xA00000-0x800000]; | ||
243 | |||
244 | /* 0xA00000-0xBFFFFF -- PCI/GIO Device Spaces w/flush */ | ||
245 | union { | ||
246 | uint8_t c[0x100000 / 1]; | ||
247 | uint16_t s[0x100000 / 2]; | ||
248 | uint32_t l[0x100000 / 4]; | ||
249 | uint64_t d[0x100000 / 8]; | ||
250 | } cp_devio_raw_flush[6]; /* 0xA00000-0xBFFFFF */ | ||
251 | |||
252 | #define cp_devio_flush(n) cp_devio_raw_flush[((n)<2)?(n*2):(n+2)] | ||
253 | |||
254 | }; | ||
255 | |||
256 | #endif /* _ASM_IA64_SN_PCI_TIOCP_H */ | ||
diff --git a/include/asm-m32r/s1d13806.h b/include/asm-m32r/s1d13806.h new file mode 100644 index 000000000000..248d36a82d79 --- /dev/null +++ b/include/asm-m32r/s1d13806.h | |||
@@ -0,0 +1,199 @@ | |||
1 | //---------------------------------------------------------------------------- | ||
2 | // | ||
3 | // File generated by S1D13806CFG.EXE | ||
4 | // | ||
5 | // Copyright (c) 2000,2001 Epson Research and Development, Inc. | ||
6 | // All rights reserved. | ||
7 | // | ||
8 | //---------------------------------------------------------------------------- | ||
9 | |||
10 | // Panel: (active) 640x480 77Hz STN Single 8-bit (PCLK=CLKI=25.175MHz) | ||
11 | // Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=33.333MHz) | ||
12 | |||
13 | #define SWIVEL_VIEW 0 /* 0:none, 1:90 not completed */ | ||
14 | |||
15 | static struct s1d13xxxfb_regval s1d13xxxfb_initregs[] = { | ||
16 | |||
17 | {0x0001,0x00}, // Miscellaneous Register | ||
18 | {0x01FC,0x00}, // Display Mode Register | ||
19 | #if defined(CONFIG_PLAT_MAPPI) | ||
20 | {0x0004,0x00}, // General IO Pins Configuration Register 0 | ||
21 | {0x0005,0x00}, // General IO Pins Configuration Register 1 | ||
22 | {0x0008,0x00}, // General IO Pins Control Register 0 | ||
23 | {0x0009,0x00}, // General IO Pins Control Register 1 | ||
24 | {0x0010,0x00}, // Memory Clock Configuration Register | ||
25 | {0x0014,0x00}, // LCD Pixel Clock Configuration Register | ||
26 | {0x0018,0x00}, // CRT/TV Pixel Clock Configuration Register | ||
27 | {0x001C,0x00}, // MediaPlug Clock Configuration Register | ||
28 | /* | ||
29 | * .. 10MHz: 0x00 | ||
30 | * .. 30MHz: 0x01 | ||
31 | * 30MHz ..: 0x02 | ||
32 | */ | ||
33 | {0x001E,0x02}, // CPU To Memory Wait State Select Register | ||
34 | {0x0021,0x02}, // DRAM Refresh Rate Register | ||
35 | {0x002A,0x11}, // DRAM Timings Control Register 0 | ||
36 | {0x002B,0x13}, // DRAM Timings Control Register 1 | ||
37 | {0x0020,0x80}, // Memory Configuration Register | ||
38 | {0x0030,0x25}, // Panel Type Register | ||
39 | {0x0031,0x00}, // MOD Rate Register | ||
40 | {0x0032,0x4F}, // LCD Horizontal Display Width Register | ||
41 | {0x0034,0x12}, // LCD Horizontal Non-Display Period Register | ||
42 | {0x0035,0x01}, // TFT FPLINE Start Position Register | ||
43 | {0x0036,0x0B}, // TFT FPLINE Pulse Width Register | ||
44 | {0x0038,0xDF}, // LCD Vertical Display Height Register 0 | ||
45 | {0x0039,0x01}, // LCD Vertical Display Height Register 1 | ||
46 | {0x003A,0x2C}, // LCD Vertical Non-Display Period Register | ||
47 | {0x003B,0x0A}, // TFT FPFRAME Start Position Register | ||
48 | {0x003C,0x01}, // TFT FPFRAME Pulse Width Register | ||
49 | |||
50 | {0x0041,0x00}, // LCD Miscellaneous Register | ||
51 | {0x0042,0x00}, // LCD Display Start Address Register 0 | ||
52 | {0x0043,0x00}, // LCD Display Start Address Register 1 | ||
53 | {0x0044,0x00}, // LCD Display Start Address Register 2 | ||
54 | |||
55 | #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) || defined(CONFIG_PLAT_MAPPI3) | ||
56 | {0x0004,0x07}, // GPIO[0:7] direction | ||
57 | {0x0005,0x00}, // GPIO[8:12] direction | ||
58 | {0x0008,0x00}, // GPIO[0:7] data | ||
59 | {0x0009,0x00}, // GPIO[8:12] data | ||
60 | {0x0008,0x04}, // LCD panel Vcc on | ||
61 | {0x0008,0x05}, // LCD panel reset | ||
62 | {0x0010,0x01}, // Memory Clock Configuration Register | ||
63 | {0x0014,0x30}, // LCD Pixel Clock Configuration Register (CLKI 22MHz/4) | ||
64 | {0x0018,0x00}, // CRT/TV Pixel Clock Configuration Register | ||
65 | {0x001C,0x00}, // MediaPlug Clock Configuration Register(10MHz) | ||
66 | {0x001E,0x00}, // CPU To Memory Wait State Select Register | ||
67 | {0x0020,0x80}, // Memory Configuration Register | ||
68 | {0x0021,0x03}, // DRAM Refresh Rate Register | ||
69 | {0x002A,0x00}, // DRAM Timings Control Register 0 | ||
70 | {0x002B,0x01}, // DRAM Timings Control Register 1 | ||
71 | {0x0030,0x25}, // Panel Type Register | ||
72 | {0x0031,0x00}, // MOD Rate Register | ||
73 | {0x0032,0x1d}, // LCD Horizontal Display Width Register | ||
74 | {0x0034,0x05}, // LCD Horizontal Non-Display Period Register | ||
75 | {0x0035,0x01}, // TFT FPLINE Start Position Register | ||
76 | {0x0036,0x01}, // TFT FPLINE Pulse Width Register | ||
77 | {0x0038,0x3F}, // LCD Vertical Display Height Register 0 | ||
78 | {0x0039,0x01}, // LCD Vertical Display Height Register 1 | ||
79 | {0x003A,0x0b}, // LCD Vertical Non-Display Period Register | ||
80 | {0x003B,0x07}, // TFT FPFRAME Start Position Register | ||
81 | {0x003C,0x02}, // TFT FPFRAME Pulse Width Register | ||
82 | |||
83 | {0x0041,0x00}, // LCD Miscellaneous Register | ||
84 | #if (SWIVEL_VIEW == 0) | ||
85 | {0x0042,0x00}, // LCD Display Start Address Register 0 | ||
86 | {0x0043,0x00}, // LCD Display Start Address Register 1 | ||
87 | {0x0044,0x00}, // LCD Display Start Address Register 2 | ||
88 | |||
89 | #elif (SWIVEL_VIEW == 1) | ||
90 | // 1024 - W(320) = 0x2C0 | ||
91 | {0x0042,0xC0}, // LCD Display Start Address Register 0 | ||
92 | {0x0043,0x02}, // LCD Display Start Address Register 1 | ||
93 | {0x0044,0x00}, // LCD Display Start Address Register 2 | ||
94 | // 1024 | ||
95 | {0x0046,0x00}, // LCD Memory Address Offset Register 0 | ||
96 | {0x0047,0x02}, // LCD Memory Address Offset Register 1 | ||
97 | #else | ||
98 | #error unsupported SWIVEL_VIEW mode | ||
99 | #endif | ||
100 | #else | ||
101 | #error no platform configuration | ||
102 | #endif /* CONFIG_PLAT_XXX */ | ||
103 | |||
104 | {0x0048,0x00}, // LCD Pixel Panning Register | ||
105 | {0x004A,0x00}, // LCD Display FIFO High Threshold Control Register | ||
106 | {0x004B,0x00}, // LCD Display FIFO Low Threshold Control Register | ||
107 | {0x0050,0x4F}, // CRT/TV Horizontal Display Width Register | ||
108 | {0x0052,0x13}, // CRT/TV Horizontal Non-Display Period Register | ||
109 | {0x0053,0x01}, // CRT/TV HRTC Start Position Register | ||
110 | {0x0054,0x0B}, // CRT/TV HRTC Pulse Width Register | ||
111 | {0x0056,0xDF}, // CRT/TV Vertical Display Height Register 0 | ||
112 | {0x0057,0x01}, // CRT/TV Vertical Display Height Register 1 | ||
113 | {0x0058,0x2B}, // CRT/TV Vertical Non-Display Period Register | ||
114 | {0x0059,0x09}, // CRT/TV VRTC Start Position Register | ||
115 | {0x005A,0x01}, // CRT/TV VRTC Pulse Width Register | ||
116 | {0x005B,0x10}, // TV Output Control Register | ||
117 | |||
118 | {0x0062,0x00}, // CRT/TV Display Start Address Register 0 | ||
119 | {0x0063,0x00}, // CRT/TV Display Start Address Register 1 | ||
120 | {0x0064,0x00}, // CRT/TV Display Start Address Register 2 | ||
121 | |||
122 | {0x0068,0x00}, // CRT/TV Pixel Panning Register | ||
123 | {0x006A,0x00}, // CRT/TV Display FIFO High Threshold Control Register | ||
124 | {0x006B,0x00}, // CRT/TV Display FIFO Low Threshold Control Register | ||
125 | {0x0070,0x00}, // LCD Ink/Cursor Control Register | ||
126 | {0x0071,0x01}, // LCD Ink/Cursor Start Address Register | ||
127 | {0x0072,0x00}, // LCD Cursor X Position Register 0 | ||
128 | {0x0073,0x00}, // LCD Cursor X Position Register 1 | ||
129 | {0x0074,0x00}, // LCD Cursor Y Position Register 0 | ||
130 | {0x0075,0x00}, // LCD Cursor Y Position Register 1 | ||
131 | {0x0076,0x00}, // LCD Ink/Cursor Blue Color 0 Register | ||
132 | {0x0077,0x00}, // LCD Ink/Cursor Green Color 0 Register | ||
133 | {0x0078,0x00}, // LCD Ink/Cursor Red Color 0 Register | ||
134 | {0x007A,0x1F}, // LCD Ink/Cursor Blue Color 1 Register | ||
135 | {0x007B,0x3F}, // LCD Ink/Cursor Green Color 1 Register | ||
136 | {0x007C,0x1F}, // LCD Ink/Cursor Red Color 1 Register | ||
137 | {0x007E,0x00}, // LCD Ink/Cursor FIFO Threshold Register | ||
138 | {0x0080,0x00}, // CRT/TV Ink/Cursor Control Register | ||
139 | {0x0081,0x01}, // CRT/TV Ink/Cursor Start Address Register | ||
140 | {0x0082,0x00}, // CRT/TV Cursor X Position Register 0 | ||
141 | {0x0083,0x00}, // CRT/TV Cursor X Position Register 1 | ||
142 | {0x0084,0x00}, // CRT/TV Cursor Y Position Register 0 | ||
143 | {0x0085,0x00}, // CRT/TV Cursor Y Position Register 1 | ||
144 | {0x0086,0x00}, // CRT/TV Ink/Cursor Blue Color 0 Register | ||
145 | {0x0087,0x00}, // CRT/TV Ink/Cursor Green Color 0 Register | ||
146 | {0x0088,0x00}, // CRT/TV Ink/Cursor Red Color 0 Register | ||
147 | {0x008A,0x1F}, // CRT/TV Ink/Cursor Blue Color 1 Register | ||
148 | {0x008B,0x3F}, // CRT/TV Ink/Cursor Green Color 1 Register | ||
149 | {0x008C,0x1F}, // CRT/TV Ink/Cursor Red Color 1 Register | ||
150 | {0x008E,0x00}, // CRT/TV Ink/Cursor FIFO Threshold Register | ||
151 | {0x0100,0x00}, // BitBlt Control Register 0 | ||
152 | {0x0101,0x00}, // BitBlt Control Register 1 | ||
153 | {0x0102,0x00}, // BitBlt ROP Code/Color Expansion Register | ||
154 | {0x0103,0x00}, // BitBlt Operation Register | ||
155 | {0x0104,0x00}, // BitBlt Source Start Address Register 0 | ||
156 | {0x0105,0x00}, // BitBlt Source Start Address Register 1 | ||
157 | {0x0106,0x00}, // BitBlt Source Start Address Register 2 | ||
158 | {0x0108,0x00}, // BitBlt Destination Start Address Register 0 | ||
159 | {0x0109,0x00}, // BitBlt Destination Start Address Register 1 | ||
160 | {0x010A,0x00}, // BitBlt Destination Start Address Register 2 | ||
161 | {0x010C,0x00}, // BitBlt Memory Address Offset Register 0 | ||
162 | {0x010D,0x00}, // BitBlt Memory Address Offset Register 1 | ||
163 | {0x0110,0x00}, // BitBlt Width Register 0 | ||
164 | {0x0111,0x00}, // BitBlt Width Register 1 | ||
165 | {0x0112,0x00}, // BitBlt Height Register 0 | ||
166 | {0x0113,0x00}, // BitBlt Height Register 1 | ||
167 | {0x0114,0x00}, // BitBlt Background Color Register 0 | ||
168 | {0x0115,0x00}, // BitBlt Background Color Register 1 | ||
169 | {0x0118,0x00}, // BitBlt Foreground Color Register 0 | ||
170 | {0x0119,0x00}, // BitBlt Foreground Color Register 1 | ||
171 | {0x01E0,0x00}, // Look-Up Table Mode Register | ||
172 | {0x01E2,0x00}, // Look-Up Table Address Register | ||
173 | {0x01F0,0x10}, // Power Save Configuration Register | ||
174 | {0x01F1,0x00}, // Power Save Status Register | ||
175 | {0x01F4,0x00}, // CPU-to-Memory Access Watchdog Timer Register | ||
176 | #if (SWIVEL_VIEW == 0) | ||
177 | {0x01FC,0x01}, // Display Mode Register(0x01:LCD, 0x02:CRT, 0x03:LCD&CRT) | ||
178 | #elif (SWIVEL_VIEW == 1) | ||
179 | {0x01FC,0x41}, // Display Mode Register(0x01:LCD, 0x02:CRT, 0x03:LCD&CRT) | ||
180 | #else | ||
181 | #error unsupported SWIVEL_VIEW mode | ||
182 | #endif /* SWIVEL_VIEW */ | ||
183 | |||
184 | #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) || defined(CONFIG_PLAT_MAPPI3) | ||
185 | {0x0008,0x07}, // LCD panel Vdd & Vg on | ||
186 | #endif | ||
187 | |||
188 | {0x0040,0x05}, // LCD Display Mode Register (2:4bpp,3:8bpp,5:16bpp) | ||
189 | #if defined(CONFIG_PLAT_MAPPI) | ||
190 | {0x0046,0x80}, // LCD Memory Address Offset Register 0 | ||
191 | {0x0047,0x02}, // LCD Memory Address Offset Register 1 | ||
192 | #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) || defined(CONFIG_PLAT_MAPPI3) | ||
193 | {0x0046,0xf0}, // LCD Memory Address Offset Register 0 | ||
194 | {0x0047,0x00}, // LCD Memory Address Offset Register 1 | ||
195 | #endif | ||
196 | {0x0060,0x05}, // CRT/TV Display Mode Register (2:4bpp,3:8bpp,5:16bpp) | ||
197 | {0x0066,0x80}, // CRT/TV Memory Address Offset Register 0 // takeo | ||
198 | {0x0067,0x02}, // CRT/TV Memory Address Offset Register 1 | ||
199 | }; | ||
diff --git a/include/asm-ppc/macio.h b/include/asm-ppc/macio.h index 2cafc9978607..a481b772d154 100644 --- a/include/asm-ppc/macio.h +++ b/include/asm-ppc/macio.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __MACIO_ASIC_H__ | 1 | #ifndef __MACIO_ASIC_H__ |
2 | #define __MACIO_ASIC_H__ | 2 | #define __MACIO_ASIC_H__ |
3 | 3 | ||
4 | #include <linux/mod_devicetable.h> | ||
4 | #include <asm/of_device.h> | 5 | #include <asm/of_device.h> |
5 | 6 | ||
6 | extern struct bus_type macio_bus_type; | 7 | extern struct bus_type macio_bus_type; |
@@ -120,10 +121,10 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev) | |||
120 | struct macio_driver | 121 | struct macio_driver |
121 | { | 122 | { |
122 | char *name; | 123 | char *name; |
123 | struct of_match *match_table; | 124 | struct of_device_id *match_table; |
124 | struct module *owner; | 125 | struct module *owner; |
125 | 126 | ||
126 | int (*probe)(struct macio_dev* dev, const struct of_match *match); | 127 | int (*probe)(struct macio_dev* dev, const struct of_device_id *match); |
127 | int (*remove)(struct macio_dev* dev); | 128 | int (*remove)(struct macio_dev* dev); |
128 | 129 | ||
129 | int (*suspend)(struct macio_dev* dev, pm_message_t state); | 130 | int (*suspend)(struct macio_dev* dev, pm_message_t state); |
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index 714d69c819d3..7c31f2d564a1 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
@@ -68,6 +68,10 @@ | |||
68 | #include <platforms/lantec.h> | 68 | #include <platforms/lantec.h> |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #if defined(CONFIG_MPC885ADS) | ||
72 | #include <platforms/mpc885ads.h> | ||
73 | #endif | ||
74 | |||
71 | /* Currently, all 8xx boards that support a processor to PCI/ISA bridge | 75 | /* Currently, all 8xx boards that support a processor to PCI/ISA bridge |
72 | * use the same memory map. | 76 | * use the same memory map. |
73 | */ | 77 | */ |
diff --git a/include/asm-ppc/of_device.h b/include/asm-ppc/of_device.h index 7229735a7c18..4b264cfd3998 100644 --- a/include/asm-ppc/of_device.h +++ b/include/asm-ppc/of_device.h | |||
@@ -24,20 +24,8 @@ struct of_device | |||
24 | }; | 24 | }; |
25 | #define to_of_device(d) container_of(d, struct of_device, dev) | 25 | #define to_of_device(d) container_of(d, struct of_device, dev) |
26 | 26 | ||
27 | /* | 27 | extern const struct of_device_id *of_match_device( |
28 | * Struct used for matching a device | 28 | const struct of_device_id *matches, const struct of_device *dev); |
29 | */ | ||
30 | struct of_match | ||
31 | { | ||
32 | char *name; | ||
33 | char *type; | ||
34 | char *compatible; | ||
35 | void *data; | ||
36 | }; | ||
37 | #define OF_ANY_MATCH ((char *)-1L) | ||
38 | |||
39 | extern const struct of_match *of_match_device( | ||
40 | const struct of_match *matches, const struct of_device *dev); | ||
41 | 29 | ||
42 | extern struct of_device *of_dev_get(struct of_device *dev); | 30 | extern struct of_device *of_dev_get(struct of_device *dev); |
43 | extern void of_dev_put(struct of_device *dev); | 31 | extern void of_dev_put(struct of_device *dev); |
@@ -49,10 +37,10 @@ extern void of_dev_put(struct of_device *dev); | |||
49 | struct of_platform_driver | 37 | struct of_platform_driver |
50 | { | 38 | { |
51 | char *name; | 39 | char *name; |
52 | struct of_match *match_table; | 40 | struct of_device_id *match_table; |
53 | struct module *owner; | 41 | struct module *owner; |
54 | 42 | ||
55 | int (*probe)(struct of_device* dev, const struct of_match *match); | 43 | int (*probe)(struct of_device* dev, const struct of_device_id *match); |
56 | int (*remove)(struct of_device* dev); | 44 | int (*remove)(struct of_device* dev); |
57 | 45 | ||
58 | int (*suspend)(struct of_device* dev, pm_message_t state); | 46 | int (*suspend)(struct of_device* dev, pm_message_t state); |
diff --git a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h index e8b79220b29c..a7894e0fbbb1 100644 --- a/include/asm-ppc/unistd.h +++ b/include/asm-ppc/unistd.h | |||
@@ -262,7 +262,7 @@ | |||
262 | #define __NR_rtas 255 | 262 | #define __NR_rtas 255 |
263 | #define __NR_sys_debug_setcontext 256 | 263 | #define __NR_sys_debug_setcontext 256 |
264 | /* Number 257 is reserved for vserver */ | 264 | /* Number 257 is reserved for vserver */ |
265 | /* Number 258 is reserved for new sys_remap_file_pages */ | 265 | /* 258 currently unused */ |
266 | /* Number 259 is reserved for new sys_mbind */ | 266 | /* Number 259 is reserved for new sys_mbind */ |
267 | /* Number 260 is reserved for new sys_get_mempolicy */ | 267 | /* Number 260 is reserved for new sys_get_mempolicy */ |
268 | /* Number 261 is reserved for new sys_set_mempolicy */ | 268 | /* Number 261 is reserved for new sys_set_mempolicy */ |
diff --git a/include/asm-ppc64/cputable.h b/include/asm-ppc64/cputable.h index cbbfbec78b6b..d67fa9e26079 100644 --- a/include/asm-ppc64/cputable.h +++ b/include/asm-ppc64/cputable.h | |||
@@ -138,6 +138,7 @@ extern firmware_feature_t firmware_features_table[]; | |||
138 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) | 138 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) |
139 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) | 139 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) |
140 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) | 140 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) |
141 | #define CPU_FTR_CTRL ASM_CONST(0x0000100000000000) | ||
141 | 142 | ||
142 | /* Platform firmware features */ | 143 | /* Platform firmware features */ |
143 | #define FW_FTR_ ASM_CONST(0x0000000000000001) | 144 | #define FW_FTR_ ASM_CONST(0x0000000000000001) |
@@ -148,7 +149,7 @@ extern firmware_feature_t firmware_features_table[]; | |||
148 | 149 | ||
149 | #define CPU_FTR_PPCAS_ARCH_V2_BASE (CPU_FTR_SLB | \ | 150 | #define CPU_FTR_PPCAS_ARCH_V2_BASE (CPU_FTR_SLB | \ |
150 | CPU_FTR_TLBIEL | CPU_FTR_NOEXECUTE | \ | 151 | CPU_FTR_TLBIEL | CPU_FTR_NOEXECUTE | \ |
151 | CPU_FTR_NODSISRALIGN) | 152 | CPU_FTR_NODSISRALIGN | CPU_FTR_CTRL) |
152 | 153 | ||
153 | /* iSeries doesn't support large pages */ | 154 | /* iSeries doesn't support large pages */ |
154 | #ifdef CONFIG_PPC_ISERIES | 155 | #ifdef CONFIG_PPC_ISERIES |
diff --git a/include/asm-ppc64/hvconsole.h b/include/asm-ppc64/hvconsole.h index d89d94c91815..6da93ce74dc0 100644 --- a/include/asm-ppc64/hvconsole.h +++ b/include/asm-ppc64/hvconsole.h | |||
@@ -29,12 +29,21 @@ | |||
29 | */ | 29 | */ |
30 | #define MAX_NR_HVC_CONSOLES 16 | 30 | #define MAX_NR_HVC_CONSOLES 16 |
31 | 31 | ||
32 | /* implemented by a low level driver */ | ||
33 | struct hv_ops { | ||
34 | int (*get_chars)(uint32_t vtermno, char *buf, int count); | ||
35 | int (*put_chars)(uint32_t vtermno, const char *buf, int count); | ||
36 | }; | ||
32 | extern int hvc_get_chars(uint32_t vtermno, char *buf, int count); | 37 | extern int hvc_get_chars(uint32_t vtermno, char *buf, int count); |
33 | extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count); | 38 | extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count); |
34 | 39 | ||
35 | /* Early discovery of console adapters. */ | 40 | struct hvc_struct; |
36 | extern int hvc_find_vtys(void); | ||
37 | 41 | ||
38 | /* Implemented by a console driver */ | 42 | /* Register a vterm and a slot index for use as a console (console_init) */ |
39 | extern int hvc_instantiate(uint32_t vtermno, int index); | 43 | extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops); |
44 | /* register a vterm for hvc tty operation (module_init or hotplug add) */ | ||
45 | extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int irq, | ||
46 | struct hv_ops *ops); | ||
47 | /* remove a vterm from hvc tty operation (modele_exit or hotplug remove) */ | ||
48 | extern int __devexit hvc_remove(struct hvc_struct *hp); | ||
40 | #endif /* _PPC64_HVCONSOLE_H */ | 49 | #endif /* _PPC64_HVCONSOLE_H */ |
diff --git a/include/asm-ppc64/iSeries/ItLpQueue.h b/include/asm-ppc64/iSeries/ItLpQueue.h index 393299e04d7f..69b26ad74135 100644 --- a/include/asm-ppc64/iSeries/ItLpQueue.h +++ b/include/asm-ppc64/iSeries/ItLpQueue.h | |||
@@ -41,7 +41,7 @@ struct HvLpEvent; | |||
41 | #define LpEventMaxSize 256 | 41 | #define LpEventMaxSize 256 |
42 | #define LpEventAlign 64 | 42 | #define LpEventAlign 64 |
43 | 43 | ||
44 | struct ItLpQueue { | 44 | struct hvlpevent_queue { |
45 | /* | 45 | /* |
46 | * The xSlicCurEventPtr is the pointer to the next event stack entry | 46 | * The xSlicCurEventPtr is the pointer to the next event stack entry |
47 | * that will become valid. The OS must peek at this entry to determine | 47 | * that will become valid. The OS must peek at this entry to determine |
@@ -69,16 +69,13 @@ struct ItLpQueue { | |||
69 | char *xSlicEventStackPtr; // 0x20 | 69 | char *xSlicEventStackPtr; // 0x20 |
70 | u8 xIndex; // 0x28 unique sequential index. | 70 | u8 xIndex; // 0x28 unique sequential index. |
71 | u8 xSlicRsvd[3]; // 0x29-2b | 71 | u8 xSlicRsvd[3]; // 0x29-2b |
72 | u32 xInUseWord; // 0x2C | 72 | spinlock_t lock; |
73 | u64 xLpIntCount; // 0x30 Total Lp Int msgs processed | ||
74 | u64 xLpIntCountByType[9]; // 0x38-0x7F Event counts by type | ||
75 | }; | 73 | }; |
76 | 74 | ||
77 | extern struct ItLpQueue xItLpQueue; | 75 | extern struct hvlpevent_queue hvlpevent_queue; |
78 | 76 | ||
79 | extern struct HvLpEvent *ItLpQueue_getNextLpEvent(struct ItLpQueue *); | 77 | extern int hvlpevent_is_pending(void); |
80 | extern int ItLpQueue_isLpIntPending(struct ItLpQueue *); | 78 | extern void process_hvlpevents(struct pt_regs *); |
81 | extern unsigned ItLpQueue_process(struct ItLpQueue *, struct pt_regs *); | 79 | extern void setup_hvlpevent_queue(void); |
82 | extern void ItLpQueue_clearValid(struct HvLpEvent *); | ||
83 | 80 | ||
84 | #endif /* _ITLPQUEUE_H */ | 81 | #endif /* _ITLPQUEUE_H */ |
diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h index 9cdad3ed1526..1e6ad4824132 100644 --- a/include/asm-ppc64/machdep.h +++ b/include/asm-ppc64/machdep.h | |||
@@ -140,8 +140,13 @@ struct machdep_calls { | |||
140 | unsigned long size, | 140 | unsigned long size, |
141 | pgprot_t vma_prot); | 141 | pgprot_t vma_prot); |
142 | 142 | ||
143 | /* Idle loop for this platform, leave empty for default idle loop */ | ||
144 | int (*idle_loop)(void); | ||
143 | }; | 145 | }; |
144 | 146 | ||
147 | extern int default_idle(void); | ||
148 | extern int native_idle(void); | ||
149 | |||
145 | extern struct machdep_calls ppc_md; | 150 | extern struct machdep_calls ppc_md; |
146 | extern char cmd_line[COMMAND_LINE_SIZE]; | 151 | extern char cmd_line[COMMAND_LINE_SIZE]; |
147 | 152 | ||
diff --git a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h index ae76cae1483f..2f0f36f73d38 100644 --- a/include/asm-ppc64/paca.h +++ b/include/asm-ppc64/paca.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <asm/types.h> | 20 | #include <asm/types.h> |
21 | #include <asm/lppaca.h> | 21 | #include <asm/lppaca.h> |
22 | #include <asm/iSeries/ItLpRegSave.h> | 22 | #include <asm/iSeries/ItLpRegSave.h> |
23 | #include <asm/iSeries/ItLpQueue.h> | ||
24 | #include <asm/mmu.h> | 23 | #include <asm/mmu.h> |
25 | 24 | ||
26 | register struct paca_struct *local_paca asm("r13"); | 25 | register struct paca_struct *local_paca asm("r13"); |
@@ -62,7 +61,6 @@ struct paca_struct { | |||
62 | u16 paca_index; /* Logical processor number */ | 61 | u16 paca_index; /* Logical processor number */ |
63 | 62 | ||
64 | u32 default_decr; /* Default decrementer value */ | 63 | u32 default_decr; /* Default decrementer value */ |
65 | struct ItLpQueue *lpqueue_ptr; /* LpQueue handled by this CPU */ | ||
66 | u64 kernel_toc; /* Kernel TOC address */ | 64 | u64 kernel_toc; /* Kernel TOC address */ |
67 | u64 stab_real; /* Absolute address of segment table */ | 65 | u64 stab_real; /* Absolute address of segment table */ |
68 | u64 stab_addr; /* Virtual address of segment table */ | 66 | u64 stab_addr; /* Virtual address of segment table */ |
@@ -91,7 +89,6 @@ struct paca_struct { | |||
91 | u64 next_jiffy_update_tb; /* TB value for next jiffy update */ | 89 | u64 next_jiffy_update_tb; /* TB value for next jiffy update */ |
92 | u64 saved_r1; /* r1 save for RTAS calls */ | 90 | u64 saved_r1; /* r1 save for RTAS calls */ |
93 | u64 saved_msr; /* MSR saved here by enter_rtas */ | 91 | u64 saved_msr; /* MSR saved here by enter_rtas */ |
94 | u32 lpevent_count; /* lpevents processed */ | ||
95 | u8 proc_enabled; /* irq soft-enable flag */ | 92 | u8 proc_enabled; /* irq soft-enable flag */ |
96 | 93 | ||
97 | /* not yet used */ | 94 | /* not yet used */ |
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index af28aa55d8c1..352306cfb579 100644 --- a/include/asm-ppc64/processor.h +++ b/include/asm-ppc64/processor.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
21 | #include <asm/types.h> | 21 | #include <asm/types.h> |
22 | #include <asm/systemcfg.h> | 22 | #include <asm/systemcfg.h> |
23 | #include <asm/cputable.h> | ||
23 | 24 | ||
24 | /* Machine State Register (MSR) Fields */ | 25 | /* Machine State Register (MSR) Fields */ |
25 | #define MSR_SF_LG 63 /* Enable 64 bit mode */ | 26 | #define MSR_SF_LG 63 /* Enable 64 bit mode */ |
@@ -501,24 +502,37 @@ static inline void ppc64_runlatch_on(void) | |||
501 | { | 502 | { |
502 | unsigned long ctrl; | 503 | unsigned long ctrl; |
503 | 504 | ||
504 | ctrl = mfspr(SPRN_CTRLF); | 505 | if (cpu_has_feature(CPU_FTR_CTRL)) { |
505 | ctrl |= CTRL_RUNLATCH; | 506 | ctrl = mfspr(SPRN_CTRLF); |
506 | mtspr(SPRN_CTRLT, ctrl); | 507 | ctrl |= CTRL_RUNLATCH; |
508 | mtspr(SPRN_CTRLT, ctrl); | ||
509 | } | ||
507 | } | 510 | } |
508 | 511 | ||
509 | static inline void ppc64_runlatch_off(void) | 512 | static inline void ppc64_runlatch_off(void) |
510 | { | 513 | { |
511 | unsigned long ctrl; | 514 | unsigned long ctrl; |
512 | 515 | ||
513 | ctrl = mfspr(SPRN_CTRLF); | 516 | if (cpu_has_feature(CPU_FTR_CTRL)) { |
514 | ctrl &= ~CTRL_RUNLATCH; | 517 | ctrl = mfspr(SPRN_CTRLF); |
515 | mtspr(SPRN_CTRLT, ctrl); | 518 | ctrl &= ~CTRL_RUNLATCH; |
519 | mtspr(SPRN_CTRLT, ctrl); | ||
520 | } | ||
516 | } | 521 | } |
517 | 522 | ||
518 | #endif /* __KERNEL__ */ | 523 | #endif /* __KERNEL__ */ |
519 | 524 | ||
520 | #endif /* __ASSEMBLY__ */ | 525 | #endif /* __ASSEMBLY__ */ |
521 | 526 | ||
527 | #ifdef __KERNEL__ | ||
528 | #define RUNLATCH_ON(REG) \ | ||
529 | BEGIN_FTR_SECTION \ | ||
530 | mfspr (REG),SPRN_CTRLF; \ | ||
531 | ori (REG),(REG),CTRL_RUNLATCH; \ | ||
532 | mtspr SPRN_CTRLT,(REG); \ | ||
533 | END_FTR_SECTION_IFSET(CPU_FTR_CTRL) | ||
534 | #endif | ||
535 | |||
522 | /* | 536 | /* |
523 | * Number of entries in the SLB. If this ever changes we should handle | 537 | * Number of entries in the SLB. If this ever changes we should handle |
524 | * it with a use a cpu feature fixup. | 538 | * it with a use a cpu feature fixup. |
diff --git a/include/asm-ppc64/unistd.h b/include/asm-ppc64/unistd.h index 605d91e011ec..4a94acf6bfed 100644 --- a/include/asm-ppc64/unistd.h +++ b/include/asm-ppc64/unistd.h | |||
@@ -268,7 +268,7 @@ | |||
268 | #define __NR_rtas 255 | 268 | #define __NR_rtas 255 |
269 | /* Number 256 is reserved for sys_debug_setcontext */ | 269 | /* Number 256 is reserved for sys_debug_setcontext */ |
270 | /* Number 257 is reserved for vserver */ | 270 | /* Number 257 is reserved for vserver */ |
271 | /* Number 258 is reserved for new sys_remap_file_pages */ | 271 | /* 258 currently unused */ |
272 | #define __NR_mbind 259 | 272 | #define __NR_mbind 259 |
273 | #define __NR_get_mempolicy 260 | 273 | #define __NR_get_mempolicy 260 |
274 | #define __NR_set_mempolicy 261 | 274 | #define __NR_set_mempolicy 261 |
@@ -283,8 +283,10 @@ | |||
283 | #define __NR_request_key 270 | 283 | #define __NR_request_key 270 |
284 | #define __NR_keyctl 271 | 284 | #define __NR_keyctl 271 |
285 | #define __NR_waitid 272 | 285 | #define __NR_waitid 272 |
286 | #define __NR_ioprio_set 273 | ||
287 | #define __NR_ioprio_get 274 | ||
286 | 288 | ||
287 | #define __NR_syscalls 273 | 289 | #define __NR_syscalls 275 |
288 | #ifdef __KERNEL__ | 290 | #ifdef __KERNEL__ |
289 | #define NR_syscalls __NR_syscalls | 291 | #define NR_syscalls __NR_syscalls |
290 | #endif | 292 | #endif |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index b4a9f05a93d6..864cae7e1fd6 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -107,11 +107,9 @@ static inline void restore_access_regs(unsigned int *acrs) | |||
107 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 107 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
108 | extern void account_user_vtime(struct task_struct *); | 108 | extern void account_user_vtime(struct task_struct *); |
109 | extern void account_system_vtime(struct task_struct *); | 109 | extern void account_system_vtime(struct task_struct *); |
110 | #else | ||
111 | #define account_system_vtime(prev) do { } while (0) | ||
112 | #endif | 110 | #endif |
113 | 111 | ||
114 | #define finish_arch_switch(rq, prev) do { \ | 112 | #define finish_arch_switch(prev) do { \ |
115 | set_fs(current->thread.mm_segment); \ | 113 | set_fs(current->thread.mm_segment); \ |
116 | account_system_vtime(prev); \ | 114 | account_system_vtime(prev); \ |
117 | } while (0) | 115 | } while (0) |
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 018e2e46082b..8b70edcb80dc 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -16,6 +16,18 @@ | |||
16 | #include <asm/pil.h> | 16 | #include <asm/pil.h> |
17 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
18 | 18 | ||
19 | struct ino_bucket; | ||
20 | |||
21 | #define MAX_IRQ_DESC_ACTION 4 | ||
22 | |||
23 | struct irq_desc { | ||
24 | void (*pre_handler)(struct ino_bucket *, void *, void *); | ||
25 | void *pre_handler_arg1; | ||
26 | void *pre_handler_arg2; | ||
27 | u32 action_active_mask; | ||
28 | struct irqaction action[MAX_IRQ_DESC_ACTION]; | ||
29 | }; | ||
30 | |||
19 | /* You should not mess with this directly. That's the job of irq.c. | 31 | /* You should not mess with this directly. That's the job of irq.c. |
20 | * | 32 | * |
21 | * If you make changes here, please update hand coded assembler of | 33 | * If you make changes here, please update hand coded assembler of |
@@ -42,24 +54,11 @@ struct ino_bucket { | |||
42 | /* Miscellaneous flags. */ | 54 | /* Miscellaneous flags. */ |
43 | /*0x06*/unsigned char flags; | 55 | /*0x06*/unsigned char flags; |
44 | 56 | ||
45 | /* This is used to deal with IBF_DMA_SYNC on | 57 | /* Currently unused. */ |
46 | * Sabre systems. | 58 | /*0x07*/unsigned char __pad; |
47 | */ | 59 | |
48 | /*0x07*/unsigned char synctab_ent; | 60 | /* Reference to IRQ descriptor for this bucket. */ |
49 | 61 | /*0x08*/struct irq_desc *irq_info; | |
50 | /* Reference to handler for this IRQ. If this is | ||
51 | * non-NULL this means it is active and should be | ||
52 | * serviced. Else the pending member is set to one | ||
53 | * and later registry of the interrupt checks for | ||
54 | * this condition. | ||
55 | * | ||
56 | * Normally this is just an irq_action structure. | ||
57 | * But, on PCI, if multiple interrupt sources behind | ||
58 | * a bridge have multiple interrupt sources that share | ||
59 | * the same INO bucket, this points to an array of | ||
60 | * pointers to four IRQ action structures. | ||
61 | */ | ||
62 | /*0x08*/void *irq_info; | ||
63 | 62 | ||
64 | /* Sun5 Interrupt Clear Register. */ | 63 | /* Sun5 Interrupt Clear Register. */ |
65 | /*0x10*/unsigned long iclr; | 64 | /*0x10*/unsigned long iclr; |
@@ -69,12 +68,6 @@ struct ino_bucket { | |||
69 | 68 | ||
70 | }; | 69 | }; |
71 | 70 | ||
72 | #ifdef CONFIG_PCI | ||
73 | extern unsigned long pci_dma_wsync; | ||
74 | extern unsigned long dma_sync_reg_table[256]; | ||
75 | extern unsigned char dma_sync_reg_table_entry; | ||
76 | #endif | ||
77 | |||
78 | /* IMAP/ICLR register defines */ | 71 | /* IMAP/ICLR register defines */ |
79 | #define IMAP_VALID 0x80000000 /* IRQ Enabled */ | 72 | #define IMAP_VALID 0x80000000 /* IRQ Enabled */ |
80 | #define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ | 73 | #define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ |
@@ -90,11 +83,9 @@ extern unsigned char dma_sync_reg_table_entry; | |||
90 | #define ICLR_PENDING 0x00000003 /* Pending state */ | 83 | #define ICLR_PENDING 0x00000003 /* Pending state */ |
91 | 84 | ||
92 | /* Only 8-bits are available, be careful. -DaveM */ | 85 | /* Only 8-bits are available, be careful. -DaveM */ |
93 | #define IBF_DMA_SYNC 0x01 /* DMA synchronization behind PCI bridge needed. */ | 86 | #define IBF_PCI 0x02 /* PSYCHO/SABRE/SCHIZO PCI interrupt. */ |
94 | #define IBF_PCI 0x02 /* Indicates PSYCHO/SABRE/SCHIZO PCI interrupt. */ | 87 | #define IBF_ACTIVE 0x04 /* Interrupt is active and has a handler.*/ |
95 | #define IBF_ACTIVE 0x04 /* This interrupt is active and has a handler. */ | 88 | #define IBF_INPROGRESS 0x10 /* IRQ is being serviced. */ |
96 | #define IBF_MULTI 0x08 /* On PCI, indicates shared bucket. */ | ||
97 | #define IBF_INPROGRESS 0x10 /* IRQ is being serviced. */ | ||
98 | 89 | ||
99 | #define NUM_IVECS (IMAP_INR + 1) | 90 | #define NUM_IVECS (IMAP_INR + 1) |
100 | extern struct ino_bucket ivector_table[NUM_IVECS]; | 91 | extern struct ino_bucket ivector_table[NUM_IVECS]; |
diff --git a/include/asm-sparc64/param.h b/include/asm-sparc64/param.h index 6a12f3ac0359..a1cd4974630b 100644 --- a/include/asm-sparc64/param.h +++ b/include/asm-sparc64/param.h | |||
@@ -1,9 +1,10 @@ | |||
1 | /* $Id: param.h,v 1.2 2000/10/30 21:01:41 davem Exp $ */ | ||
2 | #ifndef _ASMSPARC64_PARAM_H | 1 | #ifndef _ASMSPARC64_PARAM_H |
3 | #define _ASMSPARC64_PARAM_H | 2 | #define _ASMSPARC64_PARAM_H |
4 | 3 | ||
4 | #include <linux/config.h> | ||
5 | |||
5 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
6 | # define HZ 1000 /* Internal kernel timer frequency */ | 7 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ |
7 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | 8 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ |
8 | # define CLOCKS_PER_SEC (USER_HZ) | 9 | # define CLOCKS_PER_SEC (USER_HZ) |
9 | #endif | 10 | #endif |
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index b7e635544cec..56b5197d7898 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
@@ -27,12 +27,12 @@ static struct sparc_ebus_info { | |||
27 | 27 | ||
28 | static __inline__ void enable_dma(unsigned int dmanr) | 28 | static __inline__ void enable_dma(unsigned int dmanr) |
29 | { | 29 | { |
30 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); | ||
31 | |||
30 | if (ebus_dma_request(&sparc_ebus_dmas[dmanr].info, | 32 | if (ebus_dma_request(&sparc_ebus_dmas[dmanr].info, |
31 | sparc_ebus_dmas[dmanr].addr, | 33 | sparc_ebus_dmas[dmanr].addr, |
32 | sparc_ebus_dmas[dmanr].count)) | 34 | sparc_ebus_dmas[dmanr].count)) |
33 | BUG(); | 35 | BUG(); |
34 | |||
35 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); | ||
36 | } | 36 | } |
37 | 37 | ||
38 | static __inline__ void disable_dma(unsigned int dmanr) | 38 | static __inline__ void disable_dma(unsigned int dmanr) |
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index 4c15610a2bac..38bbbccb4068 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
@@ -145,6 +145,9 @@ struct pci_pbm_info { | |||
145 | /* Physical address base of PBM registers. */ | 145 | /* Physical address base of PBM registers. */ |
146 | unsigned long pbm_regs; | 146 | unsigned long pbm_regs; |
147 | 147 | ||
148 | /* Physical address of DMA sync register, if any. */ | ||
149 | unsigned long sync_reg; | ||
150 | |||
148 | /* Opaque 32-bit system bus Port ID. */ | 151 | /* Opaque 32-bit system bus Port ID. */ |
149 | u32 portid; | 152 | u32 portid; |
150 | 153 | ||
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index becdf1bc5924..e3059bb4a465 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h | |||
@@ -162,21 +162,6 @@ struct sigstack { | |||
162 | #define MINSIGSTKSZ 4096 | 162 | #define MINSIGSTKSZ 4096 |
163 | #define SIGSTKSZ 16384 | 163 | #define SIGSTKSZ 16384 |
164 | 164 | ||
165 | #ifdef __KERNEL__ | ||
166 | /* | ||
167 | * DJHR | ||
168 | * SA_STATIC_ALLOC is used for the SPARC system to indicate that this | ||
169 | * interrupt handler's irq structure should be statically allocated | ||
170 | * by the request_irq routine. | ||
171 | * The alternative is that arch/sparc/kernel/irq.c has carnal knowledge | ||
172 | * of interrupt usage and that sucks. Also without a flag like this | ||
173 | * it may be possible for the free_irq routine to attempt to free | ||
174 | * statically allocated data.. which is NOT GOOD. | ||
175 | * | ||
176 | */ | ||
177 | #define SA_STATIC_ALLOC 0x80 | ||
178 | #endif | ||
179 | |||
180 | #include <asm-generic/signal.h> | 165 | #include <asm-generic/signal.h> |
181 | 166 | ||
182 | struct __new_sigaction { | 167 | struct __new_sigaction { |
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 89bff310b7a9..7529c9c853dd 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h | |||
@@ -7,7 +7,9 @@ | |||
7 | #define __UM_MMU_CONTEXT_H | 7 | #define __UM_MMU_CONTEXT_H |
8 | 8 | ||
9 | #include "linux/sched.h" | 9 | #include "linux/sched.h" |
10 | #include "linux/config.h" | ||
10 | #include "choose-mode.h" | 11 | #include "choose-mode.h" |
12 | #include "um_mmu.h" | ||
11 | 13 | ||
12 | #define get_mmu_context(task) do ; while(0) | 14 | #define get_mmu_context(task) do ; while(0) |
13 | #define activate_context(tsk) do ; while(0) | 15 | #define activate_context(tsk) do ; while(0) |
@@ -18,8 +20,6 @@ static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) | |||
18 | { | 20 | { |
19 | } | 21 | } |
20 | 22 | ||
21 | extern void switch_mm_skas(int mm_fd); | ||
22 | |||
23 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 23 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
24 | struct task_struct *tsk) | 24 | struct task_struct *tsk) |
25 | { | 25 | { |
@@ -30,7 +30,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
30 | cpu_set(cpu, next->cpu_vm_mask); | 30 | cpu_set(cpu, next->cpu_vm_mask); |
31 | if(next != &init_mm) | 31 | if(next != &init_mm) |
32 | CHOOSE_MODE((void) 0, | 32 | CHOOSE_MODE((void) 0, |
33 | switch_mm_skas(next->context.skas.mm_fd)); | 33 | switch_mm_skas(&next->context.skas.id)); |
34 | } | 34 | } |
35 | } | 35 | } |
36 | 36 | ||
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index 32573749004c..a8babd2bbe84 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -217,4 +217,6 @@ extern int assign_irq_vector(int irq); | |||
217 | 217 | ||
218 | void enable_NMI_through_LVT0 (void * dummy); | 218 | void enable_NMI_through_LVT0 (void * dummy); |
219 | 219 | ||
220 | extern spinlock_t i8259A_lock; | ||
221 | |||
220 | #endif | 222 | #endif |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index f2f073642d62..6c813eb521f3 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -15,6 +15,13 @@ extern void pda_init(int); | |||
15 | extern void early_idt_handler(void); | 15 | extern void early_idt_handler(void); |
16 | 16 | ||
17 | extern void mcheck_init(struct cpuinfo_x86 *c); | 17 | extern void mcheck_init(struct cpuinfo_x86 *c); |
18 | #ifdef CONFIG_MTRR | ||
19 | extern void mtrr_ap_init(void); | ||
20 | extern void mtrr_bp_init(void); | ||
21 | #else | ||
22 | #define mtrr_ap_init() do {} while (0) | ||
23 | #define mtrr_bp_init() do {} while (0) | ||
24 | #endif | ||
18 | extern void init_memory_mapping(unsigned long start, unsigned long end); | 25 | extern void init_memory_mapping(unsigned long start, unsigned long end); |
19 | 26 | ||
20 | extern void system_call(void); | 27 | extern void system_call(void); |
diff --git a/include/asm-xtensa/delay.h b/include/asm-xtensa/delay.h index 6359c55e77a8..0a123d53a636 100644 --- a/include/asm-xtensa/delay.h +++ b/include/asm-xtensa/delay.h | |||
@@ -21,7 +21,7 @@ extern unsigned long loops_per_jiffy; | |||
21 | extern __inline__ void __delay(unsigned long loops) | 21 | extern __inline__ void __delay(unsigned long loops) |
22 | { | 22 | { |
23 | /* 2 cycles per loop. */ | 23 | /* 2 cycles per loop. */ |
24 | __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 1, 1b" | 24 | __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" |
25 | : "=r" (loops) : "0" (loops)); | 25 | : "=r" (loops) : "0" (loops)); |
26 | } | 26 | } |
27 | 27 | ||
diff --git a/include/asm-xtensa/errno.h b/include/asm-xtensa/errno.h index ced5194d2750..a0f3b96b79b4 100644 --- a/include/asm-xtensa/errno.h +++ b/include/asm-xtensa/errno.h | |||
@@ -11,132 +11,6 @@ | |||
11 | #ifndef _XTENSA_ERRNO_H | 11 | #ifndef _XTENSA_ERRNO_H |
12 | #define _XTENSA_ERRNO_H | 12 | #define _XTENSA_ERRNO_H |
13 | 13 | ||
14 | #define EPERM 1 /* Operation not permitted */ | 14 | #include <asm-generic/errno.h> |
15 | #define ENOENT 2 /* No such file or directory */ | ||
16 | #define ESRCH 3 /* No such process */ | ||
17 | #define EINTR 4 /* Interrupted system call */ | ||
18 | #define EIO 5 /* I/O error */ | ||
19 | #define ENXIO 6 /* No such device or address */ | ||
20 | #define E2BIG 7 /* Arg list too long */ | ||
21 | #define ENOEXEC 8 /* Exec format error */ | ||
22 | #define EBADF 9 /* Bad file number */ | ||
23 | #define ECHILD 10 /* No child processes */ | ||
24 | #define EAGAIN 11 /* Try again */ | ||
25 | #define ENOMEM 12 /* Out of memory */ | ||
26 | #define EACCES 13 /* Permission denied */ | ||
27 | #define EFAULT 14 /* Bad address */ | ||
28 | #define ENOTBLK 15 /* Block device required */ | ||
29 | #define EBUSY 16 /* Device or resource busy */ | ||
30 | #define EEXIST 17 /* File exists */ | ||
31 | #define EXDEV 18 /* Cross-device link */ | ||
32 | #define ENODEV 19 /* No such device */ | ||
33 | #define ENOTDIR 20 /* Not a directory */ | ||
34 | #define EISDIR 21 /* Is a directory */ | ||
35 | #define EINVAL 22 /* Invalid argument */ | ||
36 | #define ENFILE 23 /* File table overflow */ | ||
37 | #define EMFILE 24 /* Too many open files */ | ||
38 | #define ENOTTY 25 /* Not a typewriter */ | ||
39 | #define ETXTBSY 26 /* Text file busy */ | ||
40 | #define EFBIG 27 /* File too large */ | ||
41 | #define ENOSPC 28 /* No space left on device */ | ||
42 | #define ESPIPE 29 /* Illegal seek */ | ||
43 | #define EROFS 30 /* Read-only file system */ | ||
44 | #define EMLINK 31 /* Too many links */ | ||
45 | #define EPIPE 32 /* Broken pipe */ | ||
46 | #define EDOM 33 /* Math argument out of domain of func */ | ||
47 | #define ERANGE 34 /* Math result not representable */ | ||
48 | #define EDEADLK 35 /* Resource deadlock would occur */ | ||
49 | #define ENAMETOOLONG 36 /* File name too long */ | ||
50 | #define ENOLCK 37 /* No record locks available */ | ||
51 | #define ENOSYS 38 /* Function not implemented */ | ||
52 | #define ENOTEMPTY 39 /* Directory not empty */ | ||
53 | #define ELOOP 40 /* Too many symbolic links encountered */ | ||
54 | #define EWOULDBLOCK EAGAIN /* Operation would block */ | ||
55 | #define ENOMSG 42 /* No message of desired type */ | ||
56 | #define EIDRM 43 /* Identifier removed */ | ||
57 | #define ECHRNG 44 /* Channel number out of range */ | ||
58 | #define EL2NSYNC 45 /* Level 2 not synchronized */ | ||
59 | #define EL3HLT 46 /* Level 3 halted */ | ||
60 | #define EL3RST 47 /* Level 3 reset */ | ||
61 | #define ELNRNG 48 /* Link number out of range */ | ||
62 | #define EUNATCH 49 /* Protocol driver not attached */ | ||
63 | #define ENOCSI 50 /* No CSI structure available */ | ||
64 | #define EL2HLT 51 /* Level 2 halted */ | ||
65 | #define EBADE 52 /* Invalid exchange */ | ||
66 | #define EBADR 53 /* Invalid request descriptor */ | ||
67 | #define EXFULL 54 /* Exchange full */ | ||
68 | #define ENOANO 55 /* No anode */ | ||
69 | #define EBADRQC 56 /* Invalid request code */ | ||
70 | #define EBADSLT 57 /* Invalid slot */ | ||
71 | |||
72 | #define EDEADLOCK EDEADLK | ||
73 | |||
74 | #define EBFONT 59 /* Bad font file format */ | ||
75 | #define ENOSTR 60 /* Device not a stream */ | ||
76 | #define ENODATA 61 /* No data available */ | ||
77 | #define ETIME 62 /* Timer expired */ | ||
78 | #define ENOSR 63 /* Out of streams resources */ | ||
79 | #define ENONET 64 /* Machine is not on the network */ | ||
80 | #define ENOPKG 65 /* Package not installed */ | ||
81 | #define EREMOTE 66 /* Object is remote */ | ||
82 | #define ENOLINK 67 /* Link has been severed */ | ||
83 | #define EADV 68 /* Advertise error */ | ||
84 | #define ESRMNT 69 /* Srmount error */ | ||
85 | #define ECOMM 70 /* Communication error on send */ | ||
86 | #define EPROTO 71 /* Protocol error */ | ||
87 | #define EMULTIHOP 72 /* Multihop attempted */ | ||
88 | #define EDOTDOT 73 /* RFS specific error */ | ||
89 | #define EBADMSG 74 /* Not a data message */ | ||
90 | #define EOVERFLOW 75 /* Value too large for defined data type */ | ||
91 | #define ENOTUNIQ 76 /* Name not unique on network */ | ||
92 | #define EBADFD 77 /* File descriptor in bad state */ | ||
93 | #define EREMCHG 78 /* Remote address changed */ | ||
94 | #define ELIBACC 79 /* Can not access a needed shared library */ | ||
95 | #define ELIBBAD 80 /* Accessing a corrupted shared library */ | ||
96 | #define ELIBSCN 81 /* .lib section in a.out corrupted */ | ||
97 | #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ | ||
98 | #define ELIBEXEC 83 /* Cannot exec a shared library directly */ | ||
99 | #define EILSEQ 84 /* Illegal byte sequence */ | ||
100 | #define ERESTART 85 /* Interrupted system call should be restarted */ | ||
101 | #define ESTRPIPE 86 /* Streams pipe error */ | ||
102 | #define EUSERS 87 /* Too many users */ | ||
103 | #define ENOTSOCK 88 /* Socket operation on non-socket */ | ||
104 | #define EDESTADDRREQ 89 /* Destination address required */ | ||
105 | #define EMSGSIZE 90 /* Message too long */ | ||
106 | #define EPROTOTYPE 91 /* Protocol wrong type for socket */ | ||
107 | #define ENOPROTOOPT 92 /* Protocol not available */ | ||
108 | #define EPROTONOSUPPORT 93 /* Protocol not supported */ | ||
109 | #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ | ||
110 | #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ | ||
111 | #define EPFNOSUPPORT 96 /* Protocol family not supported */ | ||
112 | #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ | ||
113 | #define EADDRINUSE 98 /* Address already in use */ | ||
114 | #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ | ||
115 | #define ENETDOWN 100 /* Network is down */ | ||
116 | #define ENETUNREACH 101 /* Network is unreachable */ | ||
117 | #define ENETRESET 102 /* Network dropped connection because of reset */ | ||
118 | #define ECONNABORTED 103 /* Software caused connection abort */ | ||
119 | #define ECONNRESET 104 /* Connection reset by peer */ | ||
120 | #define ENOBUFS 105 /* No buffer space available */ | ||
121 | #define EISCONN 106 /* Transport endpoint is already connected */ | ||
122 | #define ENOTCONN 107 /* Transport endpoint is not connected */ | ||
123 | #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ | ||
124 | #define ETOOMANYREFS 109 /* Too many references: cannot splice */ | ||
125 | #define ETIMEDOUT 110 /* Connection timed out */ | ||
126 | #define ECONNREFUSED 111 /* Connection refused */ | ||
127 | #define EHOSTDOWN 112 /* Host is down */ | ||
128 | #define EHOSTUNREACH 113 /* No route to host */ | ||
129 | #define EALREADY 114 /* Operation already in progress */ | ||
130 | #define EINPROGRESS 115 /* Operation now in progress */ | ||
131 | #define ESTALE 116 /* Stale NFS file handle */ | ||
132 | #define EUCLEAN 117 /* Structure needs cleaning */ | ||
133 | #define ENOTNAM 118 /* Not a XENIX named type file */ | ||
134 | #define ENAVAIL 119 /* No XENIX semaphores available */ | ||
135 | #define EISNAM 120 /* Is a named type file */ | ||
136 | #define EREMOTEIO 121 /* Remote I/O error */ | ||
137 | #define EDQUOT 122 /* Quota exceeded */ | ||
138 | |||
139 | #define ENOMEDIUM 123 /* No medium found */ | ||
140 | #define EMEDIUMTYPE 124 /* Wrong medium type */ | ||
141 | 15 | ||
142 | #endif /* _XTENSA_ERRNO_H */ | 16 | #endif /* _XTENSA_ERRNO_H */ |
diff --git a/include/asm-xtensa/ipc.h b/include/asm-xtensa/ipc.h deleted file mode 100644 index d37bdb4d4c9c..000000000000 --- a/include/asm-xtensa/ipc.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/ipc.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General | ||
5 | * Public License. See the file "COPYING" in the main directory of | ||
6 | * this archive for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_IPC_H | ||
12 | #define _XTENSA_IPC_H | ||
13 | |||
14 | struct ipc_kludge { | ||
15 | struct msgbuf __user *msgp; | ||
16 | long msgtyp; | ||
17 | }; | ||
18 | |||
19 | #define SEMOP 1 | ||
20 | #define SEMGET 2 | ||
21 | #define SEMCTL 3 | ||
22 | #define SEMTIMEDOP 4 | ||
23 | #define MSGSND 11 | ||
24 | #define MSGRCV 12 | ||
25 | #define MSGGET 13 | ||
26 | #define MSGCTL 14 | ||
27 | #define SHMAT 21 | ||
28 | #define SHMDT 22 | ||
29 | #define SHMGET 23 | ||
30 | #define SHMCTL 24 | ||
31 | |||
32 | #define IPCCALL(version,op) ((version)<<16 | (op)) | ||
33 | |||
34 | #endif /* _XTENSA_IPC_H */ | ||
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h index 64c64dd83ba4..6b39d6609d9c 100644 --- a/include/asm-xtensa/unistd.h +++ b/include/asm-xtensa/unistd.h | |||
@@ -13,42 +13,31 @@ | |||
13 | 13 | ||
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | 15 | ||
16 | //#define __NR_setup 0 /* used only by init, to get system going */ | ||
17 | #define __NR_spill 0 | 16 | #define __NR_spill 0 |
18 | #define __NR_exit 1 | 17 | #define __NR_exit 1 |
19 | #define __NR_fork 2 | ||
20 | #define __NR_read 3 | 18 | #define __NR_read 3 |
21 | #define __NR_write 4 | 19 | #define __NR_write 4 |
22 | #define __NR_open 5 | 20 | #define __NR_open 5 |
23 | #define __NR_close 6 | 21 | #define __NR_close 6 |
24 | #define __NR_waitpid 7 | ||
25 | #define __NR_creat 8 | 22 | #define __NR_creat 8 |
26 | #define __NR_link 9 | 23 | #define __NR_link 9 |
27 | #define __NR_unlink 10 | 24 | #define __NR_unlink 10 |
28 | #define __NR_execve 11 | 25 | #define __NR_execve 11 |
29 | #define __NR_chdir 12 | 26 | #define __NR_chdir 12 |
30 | #define __NR_time 13 | ||
31 | #define __NR_mknod 14 | 27 | #define __NR_mknod 14 |
32 | #define __NR_chmod 15 | 28 | #define __NR_chmod 15 |
33 | #define __NR_lchown 16 | 29 | #define __NR_lchown 16 |
34 | #define __NR_break 17 | 30 | #define __NR_break 17 |
35 | #define __NR_oldstat 18 | ||
36 | #define __NR_lseek 19 | 31 | #define __NR_lseek 19 |
37 | #define __NR_getpid 20 | 32 | #define __NR_getpid 20 |
38 | #define __NR_mount 21 | 33 | #define __NR_mount 21 |
39 | #define __NR_oldumount 22 | ||
40 | #define __NR_setuid 23 | 34 | #define __NR_setuid 23 |
41 | #define __NR_getuid 24 | 35 | #define __NR_getuid 24 |
42 | #define __NR_stime 25 | ||
43 | #define __NR_ptrace 26 | 36 | #define __NR_ptrace 26 |
44 | #define __NR_alarm 27 | ||
45 | #define __NR_oldfstat 28 | ||
46 | #define __NR_pause 29 | ||
47 | #define __NR_utime 30 | 37 | #define __NR_utime 30 |
48 | #define __NR_stty 31 | 38 | #define __NR_stty 31 |
49 | #define __NR_gtty 32 | 39 | #define __NR_gtty 32 |
50 | #define __NR_access 33 | 40 | #define __NR_access 33 |
51 | #define __NR_nice 34 | ||
52 | #define __NR_ftime 35 | 41 | #define __NR_ftime 35 |
53 | #define __NR_sync 36 | 42 | #define __NR_sync 36 |
54 | #define __NR_kill 37 | 43 | #define __NR_kill 37 |
@@ -66,24 +55,18 @@ | |||
66 | #define __NR_geteuid 49 | 55 | #define __NR_geteuid 49 |
67 | #define __NR_getegid 50 | 56 | #define __NR_getegid 50 |
68 | #define __NR_acct 51 | 57 | #define __NR_acct 51 |
69 | #define __NR_umount 52 | ||
70 | #define __NR_lock 53 | 58 | #define __NR_lock 53 |
71 | #define __NR_ioctl 54 | 59 | #define __NR_ioctl 54 |
72 | #define __NR_fcntl 55 | 60 | #define __NR_fcntl 55 |
73 | #define __NR_mpx 56 | ||
74 | #define __NR_setpgid 57 | 61 | #define __NR_setpgid 57 |
75 | #define __NR_ulimit 58 | 62 | #define __NR_ulimit 58 |
76 | #define __NR_oldolduname 59 | ||
77 | #define __NR_umask 60 | 63 | #define __NR_umask 60 |
78 | #define __NR_chroot 61 | 64 | #define __NR_chroot 61 |
79 | #define __NR_ustat 62 | 65 | #define __NR_ustat 62 |
80 | #define __NR_dup2 63 | 66 | #define __NR_dup2 63 |
81 | #define __NR_getppid 64 | 67 | #define __NR_getppid 64 |
82 | #define __NR_getpgrp 65 | ||
83 | #define __NR_setsid 66 | 68 | #define __NR_setsid 66 |
84 | #define __NR_sigaction 67 | 69 | #define __NR_sigaction 67 |
85 | #define __NR_sgetmask 68 | ||
86 | #define __NR_ssetmask 69 | ||
87 | #define __NR_setreuid 70 | 70 | #define __NR_setreuid 70 |
88 | #define __NR_setregid 71 | 71 | #define __NR_setregid 71 |
89 | #define __NR_sigsuspend 72 | 72 | #define __NR_sigsuspend 72 |
@@ -98,13 +81,10 @@ | |||
98 | #define __NR_setgroups 81 | 81 | #define __NR_setgroups 81 |
99 | #define __NR_select 82 | 82 | #define __NR_select 82 |
100 | #define __NR_symlink 83 | 83 | #define __NR_symlink 83 |
101 | #define __NR_oldlstat 84 | ||
102 | #define __NR_readlink 85 | 84 | #define __NR_readlink 85 |
103 | #define __NR_uselib 86 | 85 | #define __NR_uselib 86 |
104 | #define __NR_swapon 87 | 86 | #define __NR_swapon 87 |
105 | #define __NR_reboot 88 | 87 | #define __NR_reboot 88 |
106 | #define __NR_readdir 89 | ||
107 | #define __NR_mmap 90 | ||
108 | #define __NR_munmap 91 | 88 | #define __NR_munmap 91 |
109 | #define __NR_truncate 92 | 89 | #define __NR_truncate 92 |
110 | #define __NR_ftruncate 93 | 90 | #define __NR_ftruncate 93 |
@@ -116,22 +96,18 @@ | |||
116 | #define __NR_statfs 99 | 96 | #define __NR_statfs 99 |
117 | #define __NR_fstatfs 100 | 97 | #define __NR_fstatfs 100 |
118 | #define __NR_ioperm 101 | 98 | #define __NR_ioperm 101 |
119 | #define __NR_socketcall 102 | ||
120 | #define __NR_syslog 103 | 99 | #define __NR_syslog 103 |
121 | #define __NR_setitimer 104 | 100 | #define __NR_setitimer 104 |
122 | #define __NR_getitimer 105 | 101 | #define __NR_getitimer 105 |
123 | #define __NR_stat 106 | 102 | #define __NR_stat 106 |
124 | #define __NR_lstat 107 | 103 | #define __NR_lstat 107 |
125 | #define __NR_fstat 108 | 104 | #define __NR_fstat 108 |
126 | #define __NR_olduname 109 | ||
127 | #define __NR_iopl 110 | 105 | #define __NR_iopl 110 |
128 | #define __NR_vhangup 111 | 106 | #define __NR_vhangup 111 |
129 | #define __NR_idle 112 | 107 | #define __NR_idle 112 |
130 | #define __NR_vm86 113 | ||
131 | #define __NR_wait4 114 | 108 | #define __NR_wait4 114 |
132 | #define __NR_swapoff 115 | 109 | #define __NR_swapoff 115 |
133 | #define __NR_sysinfo 116 | 110 | #define __NR_sysinfo 116 |
134 | #define __NR_ipc 117 | ||
135 | #define __NR_fsync 118 | 111 | #define __NR_fsync 118 |
136 | #define __NR_sigreturn 119 | 112 | #define __NR_sigreturn 119 |
137 | #define __NR_clone 120 | 113 | #define __NR_clone 120 |
@@ -140,18 +116,15 @@ | |||
140 | #define __NR_modify_ldt 123 | 116 | #define __NR_modify_ldt 123 |
141 | #define __NR_adjtimex 124 | 117 | #define __NR_adjtimex 124 |
142 | #define __NR_mprotect 125 | 118 | #define __NR_mprotect 125 |
143 | #define __NR_sigprocmask 126 | ||
144 | #define __NR_create_module 127 | 119 | #define __NR_create_module 127 |
145 | #define __NR_init_module 128 | 120 | #define __NR_init_module 128 |
146 | #define __NR_delete_module 129 | 121 | #define __NR_delete_module 129 |
147 | #define __NR_get_kernel_syms 130 | ||
148 | #define __NR_quotactl 131 | 122 | #define __NR_quotactl 131 |
149 | #define __NR_getpgid 132 | 123 | #define __NR_getpgid 132 |
150 | #define __NR_fchdir 133 | 124 | #define __NR_fchdir 133 |
151 | #define __NR_bdflush 134 | 125 | #define __NR_bdflush 134 |
152 | #define __NR_sysfs 135 | 126 | #define __NR_sysfs 135 |
153 | #define __NR_personality 136 | 127 | #define __NR_personality 136 |
154 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
155 | #define __NR_setfsuid 138 | 128 | #define __NR_setfsuid 138 |
156 | #define __NR_setfsgid 139 | 129 | #define __NR_setfsgid 139 |
157 | #define __NR__llseek 140 | 130 | #define __NR__llseek 140 |
@@ -222,8 +195,6 @@ | |||
222 | #define __NR_capset 205 | 195 | #define __NR_capset 205 |
223 | #define __NR_sigaltstack 206 | 196 | #define __NR_sigaltstack 206 |
224 | #define __NR_sendfile 207 | 197 | #define __NR_sendfile 207 |
225 | #define __NR_streams1 208 /* some people actually want it */ | ||
226 | #define __NR_streams2 209 /* some people actually want it */ | ||
227 | #define __NR_mmap2 210 | 198 | #define __NR_mmap2 210 |
228 | #define __NR_truncate64 211 | 199 | #define __NR_truncate64 211 |
229 | #define __NR_ftruncate64 212 | 200 | #define __NR_ftruncate64 212 |
@@ -234,7 +205,6 @@ | |||
234 | #define __NR_mincore 217 | 205 | #define __NR_mincore 217 |
235 | #define __NR_madvise 218 | 206 | #define __NR_madvise 218 |
236 | #define __NR_getdents64 219 | 207 | #define __NR_getdents64 219 |
237 | #define __NR_vfork 220 | ||
238 | 208 | ||
239 | /* Keep this last; should always equal the last valid call number. */ | 209 | /* Keep this last; should always equal the last valid call number. */ |
240 | #define __NR_Linux_syscalls 220 | 210 | #define __NR_Linux_syscalls 220 |
@@ -448,55 +418,7 @@ __syscall_return(type,__res); \ | |||
448 | 418 | ||
449 | 419 | ||
450 | #ifdef __KERNEL_SYSCALLS__ | 420 | #ifdef __KERNEL_SYSCALLS__ |
451 | |||
452 | #include <linux/compiler.h> | ||
453 | #include <linux/types.h> | ||
454 | #include <linux/syscalls.h> | ||
455 | |||
456 | /* | ||
457 | * we need this inline - forking from kernel space will result | ||
458 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
459 | * is no problem, but for the stack. This is handled by not letting | ||
460 | * main() use the stack at all after fork(). Thus, no function | ||
461 | * calls - which means inline code for fork too, as otherwise we | ||
462 | * would use the stack upon exit from 'fork()'. | ||
463 | * | ||
464 | * Actually only pause and fork are needed inline, so that there | ||
465 | * won't be any messing with the stack from main(), but we define | ||
466 | * some others too. | ||
467 | */ | ||
468 | |||
469 | #define __NR__exit __NR_exit | ||
470 | |||
471 | static __inline__ _syscall0(int,pause) | ||
472 | //static __inline__ _syscall1(int,setup,int,magic) FIXME | ||
473 | static __inline__ _syscall0(int,sync) | ||
474 | static __inline__ _syscall0(pid_t,setsid) | ||
475 | static __inline__ _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
476 | static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
477 | static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
478 | static __inline__ _syscall1(int,dup,int,fd) | ||
479 | static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp) | 421 | static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp) |
480 | static __inline__ _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
481 | static __inline__ _syscall1(int,close,int,fd) | ||
482 | static __inline__ _syscall1(int,_exit,int,exitcode) | ||
483 | static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
484 | static __inline__ _syscall1(int,delete_module,const char *,name) | ||
485 | |||
486 | struct stat; | ||
487 | static __inline__ _syscall2(int,fstat,int,fd,struct stat *,buf) | ||
488 | static __inline__ _syscall0(pid_t,getpid) | ||
489 | static __inline__ _syscall2(int,kill,int,pid,int,sig) | ||
490 | static __inline__ _syscall2(int,stat,const char *, path,struct stat *,buf) | ||
491 | static __inline__ _syscall1(int,unlink,char *,pathname) | ||
492 | |||
493 | |||
494 | |||
495 | extern pid_t waitpid(int, int*, int ); | ||
496 | static __inline__ pid_t wait(int * wait_stat) | ||
497 | { | ||
498 | return waitpid(-1,wait_stat,0); | ||
499 | } | ||
500 | #endif | 422 | #endif |
501 | 423 | ||
502 | /* | 424 | /* |
@@ -508,30 +430,10 @@ static __inline__ pid_t wait(int * wait_stat) | |||
508 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); | 430 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); |
509 | 431 | ||
510 | #ifdef __KERNEL__ | 432 | #ifdef __KERNEL__ |
511 | #define __ARCH_WANT_IPC_PARSE_VERSION | ||
512 | #define __ARCH_WANT_OLD_READDIR | ||
513 | #define __ARCH_WANT_OLD_STAT | ||
514 | #define __ARCH_WANT_STAT64 | 433 | #define __ARCH_WANT_STAT64 |
515 | #define __ARCH_WANT_SYS_ALARM | ||
516 | #define __ARCH_WANT_SYS_GETHOSTNAME | ||
517 | #define __ARCH_WANT_SYS_PAUSE | ||
518 | #define __ARCH_WANT_SYS_SGETMASK | ||
519 | #define __ARCH_WANT_SYS_SIGNAL | ||
520 | #define __ARCH_WANT_SYS_TIME | ||
521 | #define __ARCH_WANT_SYS_UTIME | 434 | #define __ARCH_WANT_SYS_UTIME |
522 | #define __ARCH_WANT_SYS_WAITPID | ||
523 | #define __ARCH_WANT_SYS_SOCKETCALL | ||
524 | #define __ARCH_WANT_SYS_FADVISE64 | ||
525 | #define __ARCH_WANT_SYS_GETPGRP | ||
526 | #define __ARCH_WANT_SYS_LLSEEK | 435 | #define __ARCH_WANT_SYS_LLSEEK |
527 | #define __ARCH_WANT_SYS_NICE | ||
528 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | ||
529 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
530 | #define __ARCH_WANT_SYS_SIGPENDING | ||
531 | #define __ARCH_WANT_SYS_SIGPROCMASK | ||
532 | #define __ARCH_WANT_SYS_RT_SIGACTION | 436 | #define __ARCH_WANT_SYS_RT_SIGACTION |
533 | #endif | 437 | #endif |
534 | 438 | ||
535 | |||
536 | |||
537 | #endif /* _XTENSA_UNISTD_H */ | 439 | #endif /* _XTENSA_UNISTD_H */ |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 802c91e9b3da..90828493791f 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -19,6 +19,9 @@ enum bh_state_bits { | |||
19 | BH_Dirty, /* Is dirty */ | 19 | BH_Dirty, /* Is dirty */ |
20 | BH_Lock, /* Is locked */ | 20 | BH_Lock, /* Is locked */ |
21 | BH_Req, /* Has been submitted for I/O */ | 21 | BH_Req, /* Has been submitted for I/O */ |
22 | BH_Uptodate_Lock,/* Used by the first bh in a page, to serialise | ||
23 | * IO completion of other buffers in the page | ||
24 | */ | ||
22 | 25 | ||
23 | BH_Mapped, /* Has a disk mapping */ | 26 | BH_Mapped, /* Has a disk mapping */ |
24 | BH_New, /* Disk mapping was newly created by get_block */ | 27 | BH_New, /* Disk mapping was newly created by get_block */ |
diff --git a/include/linux/cache.h b/include/linux/cache.h index 4d767b93738a..2b66a36d85f0 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
@@ -13,6 +13,12 @@ | |||
13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #ifdef CONFIG_X86 | ||
17 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | ||
18 | #else | ||
19 | #define __read_mostly | ||
20 | #endif | ||
21 | |||
16 | #ifndef ____cacheline_aligned | 22 | #ifndef ____cacheline_aligned |
17 | #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) | 23 | #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) |
18 | #endif | 24 | #endif |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 70a4ebb5d964..ecb0d39c0798 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -346,10 +346,27 @@ COMPATIBLE_IOCTL(PPPOEIOCDFWD) | |||
346 | /* LP */ | 346 | /* LP */ |
347 | COMPATIBLE_IOCTL(LPGETSTATUS) | 347 | COMPATIBLE_IOCTL(LPGETSTATUS) |
348 | /* ppdev */ | 348 | /* ppdev */ |
349 | COMPATIBLE_IOCTL(PPSETMODE) | ||
350 | COMPATIBLE_IOCTL(PPRSTATUS) | ||
351 | COMPATIBLE_IOCTL(PPRCONTROL) | ||
352 | COMPATIBLE_IOCTL(PPWCONTROL) | ||
353 | COMPATIBLE_IOCTL(PPFCONTROL) | ||
354 | COMPATIBLE_IOCTL(PPRDATA) | ||
355 | COMPATIBLE_IOCTL(PPWDATA) | ||
349 | COMPATIBLE_IOCTL(PPCLAIM) | 356 | COMPATIBLE_IOCTL(PPCLAIM) |
350 | COMPATIBLE_IOCTL(PPRELEASE) | 357 | COMPATIBLE_IOCTL(PPRELEASE) |
351 | COMPATIBLE_IOCTL(PPEXCL) | ||
352 | COMPATIBLE_IOCTL(PPYIELD) | 358 | COMPATIBLE_IOCTL(PPYIELD) |
359 | COMPATIBLE_IOCTL(PPEXCL) | ||
360 | COMPATIBLE_IOCTL(PPDATADIR) | ||
361 | COMPATIBLE_IOCTL(PPNEGOT) | ||
362 | COMPATIBLE_IOCTL(PPWCTLONIRQ) | ||
363 | COMPATIBLE_IOCTL(PPCLRIRQ) | ||
364 | COMPATIBLE_IOCTL(PPSETPHASE) | ||
365 | COMPATIBLE_IOCTL(PPGETMODES) | ||
366 | COMPATIBLE_IOCTL(PPGETMODE) | ||
367 | COMPATIBLE_IOCTL(PPGETPHASE) | ||
368 | COMPATIBLE_IOCTL(PPGETFLAGS) | ||
369 | COMPATIBLE_IOCTL(PPSETFLAGS) | ||
353 | /* CDROM stuff */ | 370 | /* CDROM stuff */ |
354 | COMPATIBLE_IOCTL(CDROMPAUSE) | 371 | COMPATIBLE_IOCTL(CDROMPAUSE) |
355 | COMPATIBLE_IOCTL(CDROMRESUME) | 372 | COMPATIBLE_IOCTL(CDROMRESUME) |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 927daa86c9b3..ff7f80f48df1 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -201,7 +201,7 @@ struct cpufreq_driver { | |||
201 | 201 | ||
202 | /* optional */ | 202 | /* optional */ |
203 | int (*exit) (struct cpufreq_policy *policy); | 203 | int (*exit) (struct cpufreq_policy *policy); |
204 | int (*suspend) (struct cpufreq_policy *policy, u32 state); | 204 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); |
205 | int (*resume) (struct cpufreq_policy *policy); | 205 | int (*resume) (struct cpufreq_policy *policy); |
206 | struct freq_attr **attr; | 206 | struct freq_attr **attr; |
207 | }; | 207 | }; |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 387da6a3e58c..5e2bcc636a02 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -61,6 +61,15 @@ | |||
61 | #define CRYPTO_DIR_DECRYPT 0 | 61 | #define CRYPTO_DIR_DECRYPT 0 |
62 | 62 | ||
63 | struct scatterlist; | 63 | struct scatterlist; |
64 | struct crypto_tfm; | ||
65 | |||
66 | struct cipher_desc { | ||
67 | struct crypto_tfm *tfm; | ||
68 | void (*crfn)(void *ctx, u8 *dst, const u8 *src); | ||
69 | unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst, | ||
70 | const u8 *src, unsigned int nbytes); | ||
71 | void *info; | ||
72 | }; | ||
64 | 73 | ||
65 | /* | 74 | /* |
66 | * Algorithms: modular crypto algorithm implementations, managed | 75 | * Algorithms: modular crypto algorithm implementations, managed |
@@ -73,6 +82,19 @@ struct cipher_alg { | |||
73 | unsigned int keylen, u32 *flags); | 82 | unsigned int keylen, u32 *flags); |
74 | void (*cia_encrypt)(void *ctx, u8 *dst, const u8 *src); | 83 | void (*cia_encrypt)(void *ctx, u8 *dst, const u8 *src); |
75 | void (*cia_decrypt)(void *ctx, u8 *dst, const u8 *src); | 84 | void (*cia_decrypt)(void *ctx, u8 *dst, const u8 *src); |
85 | |||
86 | unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, | ||
87 | u8 *dst, const u8 *src, | ||
88 | unsigned int nbytes); | ||
89 | unsigned int (*cia_decrypt_ecb)(const struct cipher_desc *desc, | ||
90 | u8 *dst, const u8 *src, | ||
91 | unsigned int nbytes); | ||
92 | unsigned int (*cia_encrypt_cbc)(const struct cipher_desc *desc, | ||
93 | u8 *dst, const u8 *src, | ||
94 | unsigned int nbytes); | ||
95 | unsigned int (*cia_decrypt_cbc)(const struct cipher_desc *desc, | ||
96 | u8 *dst, const u8 *src, | ||
97 | unsigned int nbytes); | ||
76 | }; | 98 | }; |
77 | 99 | ||
78 | struct digest_alg { | 100 | struct digest_alg { |
@@ -102,6 +124,7 @@ struct crypto_alg { | |||
102 | u32 cra_flags; | 124 | u32 cra_flags; |
103 | unsigned int cra_blocksize; | 125 | unsigned int cra_blocksize; |
104 | unsigned int cra_ctxsize; | 126 | unsigned int cra_ctxsize; |
127 | unsigned int cra_alignmask; | ||
105 | const char cra_name[CRYPTO_MAX_ALG_NAME]; | 128 | const char cra_name[CRYPTO_MAX_ALG_NAME]; |
106 | 129 | ||
107 | union { | 130 | union { |
@@ -136,7 +159,6 @@ static inline int crypto_alg_available(const char *name, u32 flags) | |||
136 | * and core processing logic. Managed via crypto_alloc_tfm() and | 159 | * and core processing logic. Managed via crypto_alloc_tfm() and |
137 | * crypto_free_tfm(), as well as the various helpers below. | 160 | * crypto_free_tfm(), as well as the various helpers below. |
138 | */ | 161 | */ |
139 | struct crypto_tfm; | ||
140 | 162 | ||
141 | struct cipher_tfm { | 163 | struct cipher_tfm { |
142 | void *cit_iv; | 164 | void *cit_iv; |
@@ -266,6 +288,16 @@ static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm) | |||
266 | return tfm->__crt_alg->cra_digest.dia_digestsize; | 288 | return tfm->__crt_alg->cra_digest.dia_digestsize; |
267 | } | 289 | } |
268 | 290 | ||
291 | static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) | ||
292 | { | ||
293 | return tfm->__crt_alg->cra_alignmask; | ||
294 | } | ||
295 | |||
296 | static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm) | ||
297 | { | ||
298 | return (void *)&tfm[1]; | ||
299 | } | ||
300 | |||
269 | /* | 301 | /* |
270 | * API wrappers. | 302 | * API wrappers. |
271 | */ | 303 | */ |
diff --git a/include/linux/device.h b/include/linux/device.h index 7b781a72b293..f378c846e6d5 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -69,7 +69,7 @@ struct bus_type { | |||
69 | extern int bus_register(struct bus_type * bus); | 69 | extern int bus_register(struct bus_type * bus); |
70 | extern void bus_unregister(struct bus_type * bus); | 70 | extern void bus_unregister(struct bus_type * bus); |
71 | 71 | ||
72 | extern int bus_rescan_devices(struct bus_type * bus); | 72 | extern void bus_rescan_devices(struct bus_type * bus); |
73 | 73 | ||
74 | extern struct bus_type * get_bus(struct bus_type * bus); | 74 | extern struct bus_type * get_bus(struct bus_type * bus); |
75 | extern void put_bus(struct bus_type * bus); | 75 | extern void put_bus(struct bus_type * bus); |
@@ -80,6 +80,8 @@ extern struct bus_type * find_bus(char * name); | |||
80 | 80 | ||
81 | int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, | 81 | int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, |
82 | int (*fn)(struct device *, void *)); | 82 | int (*fn)(struct device *, void *)); |
83 | struct device * bus_find_device(struct bus_type *bus, struct device *start, | ||
84 | void *data, int (*match)(struct device *, void *)); | ||
83 | 85 | ||
84 | int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, | 86 | int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, |
85 | void * data, int (*fn)(struct device_driver *, void *)); | 87 | void * data, int (*fn)(struct device_driver *, void *)); |
@@ -142,6 +144,9 @@ extern void driver_remove_file(struct device_driver *, struct driver_attribute * | |||
142 | 144 | ||
143 | extern int driver_for_each_device(struct device_driver * drv, struct device * start, | 145 | extern int driver_for_each_device(struct device_driver * drv, struct device * start, |
144 | void * data, int (*fn)(struct device *, void *)); | 146 | void * data, int (*fn)(struct device *, void *)); |
147 | struct device * driver_find_device(struct device_driver *drv, | ||
148 | struct device *start, void *data, | ||
149 | int (*match)(struct device *, void *)); | ||
145 | 150 | ||
146 | 151 | ||
147 | /* | 152 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 047bde30836a..302ec20838ca 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1435,6 +1435,7 @@ extern struct inode * igrab(struct inode *); | |||
1435 | extern ino_t iunique(struct super_block *, ino_t); | 1435 | extern ino_t iunique(struct super_block *, ino_t); |
1436 | extern int inode_needs_sync(struct inode *inode); | 1436 | extern int inode_needs_sync(struct inode *inode); |
1437 | extern void generic_delete_inode(struct inode *inode); | 1437 | extern void generic_delete_inode(struct inode *inode); |
1438 | extern void generic_drop_inode(struct inode *inode); | ||
1438 | 1439 | ||
1439 | extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, | 1440 | extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, |
1440 | int (*test)(struct inode *, void *), void *data); | 1441 | int (*test)(struct inode *, void *), void *data); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 8d6bf608b199..7c7400137e97 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -12,8 +12,8 @@ struct vm_area_struct; | |||
12 | * GFP bitmasks.. | 12 | * GFP bitmasks.. |
13 | */ | 13 | */ |
14 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ | 14 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ |
15 | #define __GFP_DMA 0x01 | 15 | #define __GFP_DMA 0x01u |
16 | #define __GFP_HIGHMEM 0x02 | 16 | #define __GFP_HIGHMEM 0x02u |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Action modifiers - doesn't change the zoning | 19 | * Action modifiers - doesn't change the zoning |
diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h index 004e6f09a6e2..68c896a36a34 100644 --- a/include/linux/if_shaper.h +++ b/include/linux/if_shaper.h | |||
@@ -23,7 +23,7 @@ struct shaper | |||
23 | __u32 shapeclock; | 23 | __u32 shapeclock; |
24 | unsigned long recovery; /* Time we can next clock a packet out on | 24 | unsigned long recovery; /* Time we can next clock a packet out on |
25 | an empty queue */ | 25 | an empty queue */ |
26 | struct semaphore sem; | 26 | spinlock_t lock; |
27 | struct net_device_stats stats; | 27 | struct net_device_stats stats; |
28 | struct net_device *dev; | 28 | struct net_device *dev; |
29 | int (*hard_start_xmit) (struct sk_buff *skb, | 29 | int (*hard_start_xmit) (struct sk_buff *skb, |
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 390e760a96d3..0c31ef0b5bad 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -148,7 +148,6 @@ struct ip_sf_socklist | |||
148 | struct ip_mc_socklist | 148 | struct ip_mc_socklist |
149 | { | 149 | { |
150 | struct ip_mc_socklist *next; | 150 | struct ip_mc_socklist *next; |
151 | int count; | ||
152 | struct ip_mreqn multi; | 151 | struct ip_mreqn multi; |
153 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ | 152 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ |
154 | struct ip_sf_socklist *sflist; | 153 | struct ip_sf_socklist *sflist; |
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 8a453a0b5e4b..88d5961f7a3f 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h | |||
@@ -34,9 +34,6 @@ enum { | |||
34 | */ | 34 | */ |
35 | #define IOPRIO_BE_NR (8) | 35 | #define IOPRIO_BE_NR (8) |
36 | 36 | ||
37 | asmlinkage int sys_ioprio_set(int, int, int); | ||
38 | asmlinkage int sys_ioprio_get(int, int); | ||
39 | |||
40 | enum { | 37 | enum { |
41 | IOPRIO_WHO_PROCESS = 1, | 38 | IOPRIO_WHO_PROCESS = 1, |
42 | IOPRIO_WHO_PGRP, | 39 | IOPRIO_WHO_PGRP, |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index b7a194c4362a..e050fc2d4c26 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -155,7 +155,7 @@ extern void arch_copy_kprobe(struct kprobe *p); | |||
155 | extern void arch_arm_kprobe(struct kprobe *p); | 155 | extern void arch_arm_kprobe(struct kprobe *p); |
156 | extern void arch_disarm_kprobe(struct kprobe *p); | 156 | extern void arch_disarm_kprobe(struct kprobe *p); |
157 | extern void arch_remove_kprobe(struct kprobe *p); | 157 | extern void arch_remove_kprobe(struct kprobe *p); |
158 | extern int arch_init(void); | 158 | extern int arch_init_kprobes(void); |
159 | extern void show_registers(struct pt_regs *regs); | 159 | extern void show_registers(struct pt_regs *regs); |
160 | extern kprobe_opcode_t *get_insn_slot(void); | 160 | extern kprobe_opcode_t *get_insn_slot(void); |
161 | extern void free_insn_slot(kprobe_opcode_t *slot); | 161 | extern void free_insn_slot(kprobe_opcode_t *slot); |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 9b6d05172ed4..dce53ac1625d 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -174,6 +174,17 @@ struct serio_device_id { | |||
174 | __u8 proto; | 174 | __u8 proto; |
175 | }; | 175 | }; |
176 | 176 | ||
177 | /* | ||
178 | * Struct used for matching a device | ||
179 | */ | ||
180 | struct of_device_id | ||
181 | { | ||
182 | char name[32]; | ||
183 | char type[32]; | ||
184 | char compatible[128]; | ||
185 | void *data; | ||
186 | }; | ||
187 | |||
177 | 188 | ||
178 | /* PCMCIA */ | 189 | /* PCMCIA */ |
179 | 190 | ||
diff --git a/include/linux/mount.h b/include/linux/mount.h index 8b8d3b9beefd..74b4727a4e30 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -34,7 +34,7 @@ struct vfsmount | |||
34 | int mnt_expiry_mark; /* true if marked for expiry */ | 34 | int mnt_expiry_mark; /* true if marked for expiry */ |
35 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 35 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
36 | struct list_head mnt_list; | 36 | struct list_head mnt_list; |
37 | struct list_head mnt_fslink; /* link in fs-specific expiry list */ | 37 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
38 | struct namespace *mnt_namespace; /* containing namespace */ | 38 | struct namespace *mnt_namespace; /* containing namespace */ |
39 | }; | 39 | }; |
40 | 40 | ||
@@ -47,7 +47,7 @@ static inline struct vfsmount *mntget(struct vfsmount *mnt) | |||
47 | 47 | ||
48 | extern void __mntput(struct vfsmount *mnt); | 48 | extern void __mntput(struct vfsmount *mnt); |
49 | 49 | ||
50 | static inline void _mntput(struct vfsmount *mnt) | 50 | static inline void mntput_no_expire(struct vfsmount *mnt) |
51 | { | 51 | { |
52 | if (mnt) { | 52 | if (mnt) { |
53 | if (atomic_dec_and_test(&mnt->mnt_count)) | 53 | if (atomic_dec_and_test(&mnt->mnt_count)) |
@@ -59,7 +59,7 @@ static inline void mntput(struct vfsmount *mnt) | |||
59 | { | 59 | { |
60 | if (mnt) { | 60 | if (mnt) { |
61 | mnt->mnt_expiry_mark = 0; | 61 | mnt->mnt_expiry_mark = 0; |
62 | _mntput(mnt); | 62 | mntput_no_expire(mnt); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | 65 | ||
diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 697991b69f9b..0e5a86f13b2f 100644 --- a/include/linux/namespace.h +++ b/include/linux/namespace.h | |||
@@ -17,7 +17,8 @@ extern void __put_namespace(struct namespace *namespace); | |||
17 | 17 | ||
18 | static inline void put_namespace(struct namespace *namespace) | 18 | static inline void put_namespace(struct namespace *namespace) |
19 | { | 19 | { |
20 | if (atomic_dec_and_test(&namespace->count)) | 20 | if (atomic_dec_and_lock(&namespace->count, &vfsmount_lock)) |
21 | /* releases vfsmount_lock */ | ||
21 | __put_namespace(namespace); | 22 | __put_namespace(namespace); |
22 | } | 23 | } |
23 | 24 | ||
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 5791dfd30dd0..6d5a24f3fc6d 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -124,6 +124,7 @@ int nfsd_statfs(struct svc_rqst *, struct svc_fh *, | |||
124 | 124 | ||
125 | int nfsd_notify_change(struct inode *, struct iattr *); | 125 | int nfsd_notify_change(struct inode *, struct iattr *); |
126 | int nfsd_permission(struct svc_export *, struct dentry *, int); | 126 | int nfsd_permission(struct svc_export *, struct dentry *, int); |
127 | void nfsd_sync_dir(struct dentry *dp); | ||
127 | 128 | ||
128 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) | 129 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) |
129 | #ifdef CONFIG_NFSD_V2_ACL | 130 | #ifdef CONFIG_NFSD_V2_ACL |
@@ -230,6 +231,7 @@ void nfsd_lockd_shutdown(void); | |||
230 | #define nfserr_reclaim_bad __constant_htonl(NFSERR_RECLAIM_BAD) | 231 | #define nfserr_reclaim_bad __constant_htonl(NFSERR_RECLAIM_BAD) |
231 | #define nfserr_badname __constant_htonl(NFSERR_BADNAME) | 232 | #define nfserr_badname __constant_htonl(NFSERR_BADNAME) |
232 | #define nfserr_cb_path_down __constant_htonl(NFSERR_CB_PATH_DOWN) | 233 | #define nfserr_cb_path_down __constant_htonl(NFSERR_CB_PATH_DOWN) |
234 | #define nfserr_locked __constant_htonl(NFSERR_LOCKED) | ||
233 | 235 | ||
234 | /* error codes for internal use */ | 236 | /* error codes for internal use */ |
235 | /* if a request fails due to kmalloc failure, it gets dropped. | 237 | /* if a request fails due to kmalloc failure, it gets dropped. |
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index a84a3fa99be1..8bf23cf8b603 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
@@ -203,7 +203,9 @@ struct nfs4_stateowner { | |||
203 | int so_is_open_owner; /* 1=openowner,0=lockowner */ | 203 | int so_is_open_owner; /* 1=openowner,0=lockowner */ |
204 | u32 so_id; | 204 | u32 so_id; |
205 | struct nfs4_client * so_client; | 205 | struct nfs4_client * so_client; |
206 | u32 so_seqid; | 206 | /* after increment in ENCODE_SEQID_OP_TAIL, represents the next |
207 | * sequence id expected from the client: */ | ||
208 | u32 so_seqid; | ||
207 | struct xdr_netobj so_owner; /* open owner name */ | 209 | struct xdr_netobj so_owner; /* open owner name */ |
208 | int so_confirmed; /* successful OPEN_CONFIRM? */ | 210 | int so_confirmed; /* successful OPEN_CONFIRM? */ |
209 | struct nfs4_replay so_replay; | 211 | struct nfs4_replay so_replay; |
@@ -235,6 +237,10 @@ struct nfs4_file { | |||
235 | * st_perlockowner: (open stateid) list of lock nfs4_stateowners | 237 | * st_perlockowner: (open stateid) list of lock nfs4_stateowners |
236 | * st_access_bmap: used only for open stateid | 238 | * st_access_bmap: used only for open stateid |
237 | * st_deny_bmap: used only for open stateid | 239 | * st_deny_bmap: used only for open stateid |
240 | * st_openstp: open stateid lock stateid was derived from | ||
241 | * | ||
242 | * XXX: open stateids and lock stateids have diverged sufficiently that | ||
243 | * we should consider defining separate structs for the two cases. | ||
238 | */ | 244 | */ |
239 | 245 | ||
240 | struct nfs4_stateid { | 246 | struct nfs4_stateid { |
@@ -248,6 +254,7 @@ struct nfs4_stateid { | |||
248 | struct file * st_vfs_file; | 254 | struct file * st_vfs_file; |
249 | unsigned long st_access_bmap; | 255 | unsigned long st_access_bmap; |
250 | unsigned long st_deny_bmap; | 256 | unsigned long st_deny_bmap; |
257 | struct nfs4_stateid * st_openstp; | ||
251 | }; | 258 | }; |
252 | 259 | ||
253 | /* flags for preprocess_seqid_op() */ | 260 | /* flags for preprocess_seqid_op() */ |
diff --git a/include/linux/pci-dynids.h b/include/linux/pci-dynids.h deleted file mode 100644 index 183b6b0de81c..000000000000 --- a/include/linux/pci-dynids.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * PCI defines and function prototypes | ||
3 | * Copyright 2003 Dell Inc. | ||
4 | * by Matt Domsch <Matt_Domsch@dell.com> | ||
5 | */ | ||
6 | |||
7 | #ifndef LINUX_PCI_DYNIDS_H | ||
8 | #define LINUX_PCI_DYNIDS_H | ||
9 | |||
10 | #include <linux/list.h> | ||
11 | #include <linux/mod_devicetable.h> | ||
12 | |||
13 | struct dynid { | ||
14 | struct list_head node; | ||
15 | struct pci_device_id id; | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 66798b46f308..7ac14961ba22 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -586,7 +586,7 @@ struct pci_dev { | |||
586 | #define PCI_NUM_RESOURCES 11 | 586 | #define PCI_NUM_RESOURCES 11 |
587 | 587 | ||
588 | #ifndef PCI_BUS_NUM_RESOURCES | 588 | #ifndef PCI_BUS_NUM_RESOURCES |
589 | #define PCI_BUS_NUM_RESOURCES 4 | 589 | #define PCI_BUS_NUM_RESOURCES 8 |
590 | #endif | 590 | #endif |
591 | 591 | ||
592 | #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ | 592 | #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ |
@@ -860,7 +860,8 @@ int pci_register_driver(struct pci_driver *); | |||
860 | void pci_unregister_driver(struct pci_driver *); | 860 | void pci_unregister_driver(struct pci_driver *); |
861 | void pci_remove_behind_bridge(struct pci_dev *); | 861 | void pci_remove_behind_bridge(struct pci_dev *); |
862 | struct pci_driver *pci_dev_driver(const struct pci_dev *); | 862 | struct pci_driver *pci_dev_driver(const struct pci_dev *); |
863 | const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev); | 863 | const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); |
864 | const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); | ||
864 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); | 865 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); |
865 | 866 | ||
866 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 867 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c3ee1ae4545a..27348c22dacb 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1238,6 +1238,7 @@ | |||
1238 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 | 1238 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 |
1239 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 | 1239 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 |
1240 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 | 1240 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 |
1241 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E | ||
1241 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | 1242 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 |
1242 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | 1243 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 |
1243 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B | 1244 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 416a2e4024b2..5d4a990d5577 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -183,7 +183,6 @@ struct skb_shared_info { | |||
183 | * @priority: Packet queueing priority | 183 | * @priority: Packet queueing priority |
184 | * @users: User count - see {datagram,tcp}.c | 184 | * @users: User count - see {datagram,tcp}.c |
185 | * @protocol: Packet protocol from driver | 185 | * @protocol: Packet protocol from driver |
186 | * @security: Security level of packet | ||
187 | * @truesize: Buffer size | 186 | * @truesize: Buffer size |
188 | * @head: Head of buffer | 187 | * @head: Head of buffer |
189 | * @data: Data head pointer | 188 | * @data: Data head pointer |
@@ -249,18 +248,18 @@ struct sk_buff { | |||
249 | data_len, | 248 | data_len, |
250 | mac_len, | 249 | mac_len, |
251 | csum; | 250 | csum; |
252 | unsigned char local_df, | ||
253 | cloned:1, | ||
254 | nohdr:1, | ||
255 | pkt_type, | ||
256 | ip_summed; | ||
257 | __u32 priority; | 251 | __u32 priority; |
258 | unsigned short protocol, | 252 | __u8 local_df:1, |
259 | security; | 253 | cloned:1, |
254 | ip_summed:2, | ||
255 | nohdr:1; | ||
256 | /* 3 bits spare */ | ||
257 | __u8 pkt_type; | ||
258 | __u16 protocol; | ||
260 | 259 | ||
261 | void (*destructor)(struct sk_buff *skb); | 260 | void (*destructor)(struct sk_buff *skb); |
262 | #ifdef CONFIG_NETFILTER | 261 | #ifdef CONFIG_NETFILTER |
263 | unsigned long nfmark; | 262 | unsigned long nfmark; |
264 | __u32 nfcache; | 263 | __u32 nfcache; |
265 | __u32 nfctinfo; | 264 | __u32 nfctinfo; |
266 | struct nf_conntrack *nfct; | 265 | struct nf_conntrack *nfct; |
@@ -301,20 +300,26 @@ struct sk_buff { | |||
301 | #include <asm/system.h> | 300 | #include <asm/system.h> |
302 | 301 | ||
303 | extern void __kfree_skb(struct sk_buff *skb); | 302 | extern void __kfree_skb(struct sk_buff *skb); |
304 | extern struct sk_buff *alloc_skb(unsigned int size, int priority); | 303 | extern struct sk_buff *alloc_skb(unsigned int size, |
304 | unsigned int __nocast priority); | ||
305 | extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, | 305 | extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, |
306 | unsigned int size, int priority); | 306 | unsigned int size, |
307 | unsigned int __nocast priority); | ||
307 | extern void kfree_skbmem(struct sk_buff *skb); | 308 | extern void kfree_skbmem(struct sk_buff *skb); |
308 | extern struct sk_buff *skb_clone(struct sk_buff *skb, int priority); | 309 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
309 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, int priority); | 310 | unsigned int __nocast priority); |
310 | extern struct sk_buff *pskb_copy(struct sk_buff *skb, int gfp_mask); | 311 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, |
312 | unsigned int __nocast priority); | ||
313 | extern struct sk_buff *pskb_copy(struct sk_buff *skb, | ||
314 | unsigned int __nocast gfp_mask); | ||
311 | extern int pskb_expand_head(struct sk_buff *skb, | 315 | extern int pskb_expand_head(struct sk_buff *skb, |
312 | int nhead, int ntail, int gfp_mask); | 316 | int nhead, int ntail, |
317 | unsigned int __nocast gfp_mask); | ||
313 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, | 318 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, |
314 | unsigned int headroom); | 319 | unsigned int headroom); |
315 | extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, | 320 | extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, |
316 | int newheadroom, int newtailroom, | 321 | int newheadroom, int newtailroom, |
317 | int priority); | 322 | unsigned int __nocast priority); |
318 | extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); | 323 | extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); |
319 | #define dev_kfree_skb(a) kfree_skb(a) | 324 | #define dev_kfree_skb(a) kfree_skb(a) |
320 | extern void skb_over_panic(struct sk_buff *skb, int len, | 325 | extern void skb_over_panic(struct sk_buff *skb, int len, |
@@ -465,7 +470,8 @@ static inline int skb_shared(const struct sk_buff *skb) | |||
465 | * | 470 | * |
466 | * NULL is returned on a memory allocation failure. | 471 | * NULL is returned on a memory allocation failure. |
467 | */ | 472 | */ |
468 | static inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri) | 473 | static inline struct sk_buff *skb_share_check(struct sk_buff *skb, |
474 | unsigned int __nocast pri) | ||
469 | { | 475 | { |
470 | might_sleep_if(pri & __GFP_WAIT); | 476 | might_sleep_if(pri & __GFP_WAIT); |
471 | if (skb_shared(skb)) { | 477 | if (skb_shared(skb)) { |
@@ -1002,7 +1008,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1002 | * %NULL is returned in there is no free memory. | 1008 | * %NULL is returned in there is no free memory. |
1003 | */ | 1009 | */ |
1004 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 1010 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
1005 | int gfp_mask) | 1011 | unsigned int __nocast gfp_mask) |
1006 | { | 1012 | { |
1007 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); | 1013 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); |
1008 | if (likely(skb)) | 1014 | if (likely(skb)) |
@@ -1115,8 +1121,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i, | |||
1115 | * If there is no free memory -ENOMEM is returned, otherwise zero | 1121 | * If there is no free memory -ENOMEM is returned, otherwise zero |
1116 | * is returned and the old skb data released. | 1122 | * is returned and the old skb data released. |
1117 | */ | 1123 | */ |
1118 | extern int __skb_linearize(struct sk_buff *skb, int gfp); | 1124 | extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp); |
1119 | static inline int skb_linearize(struct sk_buff *skb, int gfp) | 1125 | static inline int skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp) |
1120 | { | 1126 | { |
1121 | return __skb_linearize(skb, gfp); | 1127 | return __skb_linearize(skb, gfp); |
1122 | } | 1128 | } |
@@ -1211,7 +1217,7 @@ static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | |||
1211 | { | 1217 | { |
1212 | int hlen = skb_headlen(skb); | 1218 | int hlen = skb_headlen(skb); |
1213 | 1219 | ||
1214 | if (offset + len <= hlen) | 1220 | if (hlen - offset >= len) |
1215 | return skb->data + offset; | 1221 | return skb->data + offset; |
1216 | 1222 | ||
1217 | if (skb_copy_bits(skb, offset, buffer, len) < 0) | 1223 | if (skb_copy_bits(skb, offset, buffer, len) < 0) |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 76cf7e60216c..4c8e552471b0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -65,7 +65,7 @@ extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); | |||
65 | extern void kmem_cache_free(kmem_cache_t *, void *); | 65 | extern void kmem_cache_free(kmem_cache_t *, void *); |
66 | extern unsigned int kmem_cache_size(kmem_cache_t *); | 66 | extern unsigned int kmem_cache_size(kmem_cache_t *); |
67 | extern const char *kmem_cache_name(kmem_cache_t *); | 67 | extern const char *kmem_cache_name(kmem_cache_t *); |
68 | extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags); | 68 | extern kmem_cache_t *kmem_find_general_cachep(size_t size, unsigned int __nocast gfpflags); |
69 | 69 | ||
70 | /* Size description struct for general caches. */ | 70 | /* Size description struct for general caches. */ |
71 | struct cache_sizes { | 71 | struct cache_sizes { |
@@ -105,7 +105,7 @@ extern unsigned int ksize(const void *); | |||
105 | 105 | ||
106 | #ifdef CONFIG_NUMA | 106 | #ifdef CONFIG_NUMA |
107 | extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node); | 107 | extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node); |
108 | extern void *kmalloc_node(size_t size, int flags, int node); | 108 | extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node); |
109 | #else | 109 | #else |
110 | static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node) | 110 | static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node) |
111 | { | 111 | { |
diff --git a/include/linux/string.h b/include/linux/string.h index 93994c613095..dab2652acbd8 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -88,7 +88,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t); | |||
88 | extern void * memchr(const void *,int,__kernel_size_t); | 88 | extern void * memchr(const void *,int,__kernel_size_t); |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | extern char *kstrdup(const char *s, int gfp); | 91 | extern char *kstrdup(const char *s, unsigned int __nocast gfp); |
92 | 92 | ||
93 | #ifdef __cplusplus | 93 | #ifdef __cplusplus |
94 | } | 94 | } |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 2343f999e6e1..c75954f2d868 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -148,7 +148,7 @@ struct swap_list_t { | |||
148 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) | 148 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) |
149 | 149 | ||
150 | /* linux/mm/oom_kill.c */ | 150 | /* linux/mm/oom_kill.c */ |
151 | extern void out_of_memory(unsigned int __nocast gfp_mask); | 151 | extern void out_of_memory(unsigned int __nocast gfp_mask, int order); |
152 | 152 | ||
153 | /* linux/mm/memory.c */ | 153 | /* linux/mm/memory.c */ |
154 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); | 154 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 52830b6d94e5..425f58c8ea4a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -506,4 +506,7 @@ asmlinkage long sys_request_key(const char __user *_type, | |||
506 | asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3, | 506 | asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3, |
507 | unsigned long arg4, unsigned long arg5); | 507 | unsigned long arg4, unsigned long arg5); |
508 | 508 | ||
509 | asmlinkage long sys_ioprio_set(int which, int who, int ioprio); | ||
510 | asmlinkage long sys_ioprio_get(int which, int who); | ||
511 | |||
509 | #endif | 512 | #endif |
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index a6b2cc530af5..bcb762d93123 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
@@ -45,7 +45,7 @@ enum | |||
45 | TCF_META_ID_REALDEV, | 45 | TCF_META_ID_REALDEV, |
46 | TCF_META_ID_PRIORITY, | 46 | TCF_META_ID_PRIORITY, |
47 | TCF_META_ID_PROTOCOL, | 47 | TCF_META_ID_PROTOCOL, |
48 | TCF_META_ID_SECURITY, | 48 | TCF_META_ID_SECURITY, /* obsolete */ |
49 | TCF_META_ID_PKTTYPE, | 49 | TCF_META_ID_PKTTYPE, |
50 | TCF_META_ID_PKTLEN, | 50 | TCF_META_ID_PKTLEN, |
51 | TCF_META_ID_DATALEN, | 51 | TCF_META_ID_DATALEN, |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index dfd93d03f5d2..e4fd82e42104 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -286,7 +286,7 @@ struct tcp_sock { | |||
286 | __u32 max_window; /* Maximal window ever seen from peer */ | 286 | __u32 max_window; /* Maximal window ever seen from peer */ |
287 | __u32 pmtu_cookie; /* Last pmtu seen by socket */ | 287 | __u32 pmtu_cookie; /* Last pmtu seen by socket */ |
288 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ | 288 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ |
289 | __u16 mss_cache_std; /* Like mss_cache, but without TSO */ | 289 | __u16 xmit_size_goal; /* Goal for segmenting output packets */ |
290 | __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ | 290 | __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ |
291 | __u8 ca_state; /* State of fast-retransmit machine */ | 291 | __u8 ca_state; /* State of fast-retransmit machine */ |
292 | __u8 retransmits; /* Number of unrecovered RTO timeouts. */ | 292 | __u8 retransmits; /* Number of unrecovered RTO timeouts. */ |
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h index 71d6af83b631..92c828029cd8 100644 --- a/include/net/irda/irda_device.h +++ b/include/net/irda/irda_device.h | |||
@@ -224,7 +224,7 @@ int irda_device_is_receiving(struct net_device *dev); | |||
224 | /* Interface for internal use */ | 224 | /* Interface for internal use */ |
225 | static inline int irda_device_txqueue_empty(const struct net_device *dev) | 225 | static inline int irda_device_txqueue_empty(const struct net_device *dev) |
226 | { | 226 | { |
227 | return (skb_queue_len(&dev->qdisc->q) == 0); | 227 | return skb_queue_empty(&dev->qdisc->q); |
228 | } | 228 | } |
229 | int irda_device_set_raw_mode(struct net_device* self, int status); | 229 | int irda_device_set_raw_mode(struct net_device* self, int status); |
230 | struct net_device *alloc_irdadev(int sizeof_priv); | 230 | struct net_device *alloc_irdadev(int sizeof_priv); |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index fcb05a387dbe..6492e7363d84 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -13,13 +13,12 @@ struct qdisc_walker | |||
13 | 13 | ||
14 | extern rwlock_t qdisc_tree_lock; | 14 | extern rwlock_t qdisc_tree_lock; |
15 | 15 | ||
16 | #define QDISC_ALIGN 32 | 16 | #define QDISC_ALIGNTO 32 |
17 | #define QDISC_ALIGN_CONST (QDISC_ALIGN - 1) | 17 | #define QDISC_ALIGN(len) (((len) + QDISC_ALIGNTO-1) & ~(QDISC_ALIGNTO-1)) |
18 | 18 | ||
19 | static inline void *qdisc_priv(struct Qdisc *q) | 19 | static inline void *qdisc_priv(struct Qdisc *q) |
20 | { | 20 | { |
21 | return (char *)q + ((sizeof(struct Qdisc) + QDISC_ALIGN_CONST) | 21 | return (char *) q + QDISC_ALIGN(sizeof(struct Qdisc)); |
22 | & ~QDISC_ALIGN_CONST); | ||
23 | } | 22 | } |
24 | 23 | ||
25 | /* | 24 | /* |
@@ -207,8 +206,6 @@ psched_tod_diff(int delta_sec, int bound) | |||
207 | 206 | ||
208 | #endif /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */ | 207 | #endif /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */ |
209 | 208 | ||
210 | extern struct Qdisc noop_qdisc; | ||
211 | extern struct Qdisc_ops noop_qdisc_ops; | ||
212 | extern struct Qdisc_ops pfifo_qdisc_ops; | 209 | extern struct Qdisc_ops pfifo_qdisc_ops; |
213 | extern struct Qdisc_ops bfifo_qdisc_ops; | 210 | extern struct Qdisc_ops bfifo_qdisc_ops; |
214 | 211 | ||
@@ -216,14 +213,6 @@ extern int register_qdisc(struct Qdisc_ops *qops); | |||
216 | extern int unregister_qdisc(struct Qdisc_ops *qops); | 213 | extern int unregister_qdisc(struct Qdisc_ops *qops); |
217 | extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); | 214 | extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); |
218 | extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); | 215 | extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); |
219 | extern void dev_init_scheduler(struct net_device *dev); | ||
220 | extern void dev_shutdown(struct net_device *dev); | ||
221 | extern void dev_activate(struct net_device *dev); | ||
222 | extern void dev_deactivate(struct net_device *dev); | ||
223 | extern void qdisc_reset(struct Qdisc *qdisc); | ||
224 | extern void qdisc_destroy(struct Qdisc *qdisc); | ||
225 | extern struct Qdisc * qdisc_create_dflt(struct net_device *dev, | ||
226 | struct Qdisc_ops *ops); | ||
227 | extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, | 216 | extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, |
228 | struct rtattr *tab); | 217 | struct rtattr *tab); |
229 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); | 218 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 7b97405e2dbf..7b6ec9986715 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -164,6 +164,19 @@ extern void qdisc_unlock_tree(struct net_device *dev); | |||
164 | #define tcf_tree_lock(tp) qdisc_lock_tree((tp)->q->dev) | 164 | #define tcf_tree_lock(tp) qdisc_lock_tree((tp)->q->dev) |
165 | #define tcf_tree_unlock(tp) qdisc_unlock_tree((tp)->q->dev) | 165 | #define tcf_tree_unlock(tp) qdisc_unlock_tree((tp)->q->dev) |
166 | 166 | ||
167 | extern struct Qdisc noop_qdisc; | ||
168 | extern struct Qdisc_ops noop_qdisc_ops; | ||
169 | |||
170 | extern void dev_init_scheduler(struct net_device *dev); | ||
171 | extern void dev_shutdown(struct net_device *dev); | ||
172 | extern void dev_activate(struct net_device *dev); | ||
173 | extern void dev_deactivate(struct net_device *dev); | ||
174 | extern void qdisc_reset(struct Qdisc *qdisc); | ||
175 | extern void qdisc_destroy(struct Qdisc *qdisc); | ||
176 | extern struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops); | ||
177 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, | ||
178 | struct Qdisc_ops *ops); | ||
179 | |||
167 | static inline void | 180 | static inline void |
168 | tcf_destroy(struct tcf_proto *tp) | 181 | tcf_destroy(struct tcf_proto *tp) |
169 | { | 182 | { |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 47727c7cc628..7435528a1747 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -582,7 +582,6 @@ void sctp_datamsg_track(struct sctp_chunk *); | |||
582 | void sctp_chunk_fail(struct sctp_chunk *, int error); | 582 | void sctp_chunk_fail(struct sctp_chunk *, int error); |
583 | int sctp_chunk_abandoned(struct sctp_chunk *); | 583 | int sctp_chunk_abandoned(struct sctp_chunk *); |
584 | 584 | ||
585 | |||
586 | /* RFC2960 1.4 Key Terms | 585 | /* RFC2960 1.4 Key Terms |
587 | * | 586 | * |
588 | * o Chunk: A unit of information within an SCTP packet, consisting of | 587 | * o Chunk: A unit of information within an SCTP packet, consisting of |
@@ -592,13 +591,8 @@ int sctp_chunk_abandoned(struct sctp_chunk *); | |||
592 | * each chunk as well as a few other header pointers... | 591 | * each chunk as well as a few other header pointers... |
593 | */ | 592 | */ |
594 | struct sctp_chunk { | 593 | struct sctp_chunk { |
595 | /* These first three elements MUST PRECISELY match the first | 594 | struct list_head list; |
596 | * three elements of struct sk_buff. This allows us to reuse | 595 | |
597 | * all the skb_* queue management functions. | ||
598 | */ | ||
599 | struct sctp_chunk *next; | ||
600 | struct sctp_chunk *prev; | ||
601 | struct sk_buff_head *list; | ||
602 | atomic_t refcnt; | 596 | atomic_t refcnt; |
603 | 597 | ||
604 | /* This is our link to the per-transport transmitted list. */ | 598 | /* This is our link to the per-transport transmitted list. */ |
@@ -717,7 +711,7 @@ struct sctp_packet { | |||
717 | __u32 vtag; | 711 | __u32 vtag; |
718 | 712 | ||
719 | /* This contains the payload chunks. */ | 713 | /* This contains the payload chunks. */ |
720 | struct sk_buff_head chunks; | 714 | struct list_head chunk_list; |
721 | 715 | ||
722 | /* This is the overhead of the sctp and ip headers. */ | 716 | /* This is the overhead of the sctp and ip headers. */ |
723 | size_t overhead; | 717 | size_t overhead; |
@@ -974,7 +968,7 @@ struct sctp_inq { | |||
974 | /* This is actually a queue of sctp_chunk each | 968 | /* This is actually a queue of sctp_chunk each |
975 | * containing a partially decoded packet. | 969 | * containing a partially decoded packet. |
976 | */ | 970 | */ |
977 | struct sk_buff_head in; | 971 | struct list_head in_chunk_list; |
978 | /* This is the packet which is currently off the in queue and is | 972 | /* This is the packet which is currently off the in queue and is |
979 | * being worked on through the inbound chunk processing. | 973 | * being worked on through the inbound chunk processing. |
980 | */ | 974 | */ |
@@ -1017,7 +1011,7 @@ struct sctp_outq { | |||
1017 | struct sctp_association *asoc; | 1011 | struct sctp_association *asoc; |
1018 | 1012 | ||
1019 | /* Data pending that has never been transmitted. */ | 1013 | /* Data pending that has never been transmitted. */ |
1020 | struct sk_buff_head out; | 1014 | struct list_head out_chunk_list; |
1021 | 1015 | ||
1022 | unsigned out_qlen; /* Total length of queued data chunks. */ | 1016 | unsigned out_qlen; /* Total length of queued data chunks. */ |
1023 | 1017 | ||
@@ -1025,7 +1019,7 @@ struct sctp_outq { | |||
1025 | unsigned error; | 1019 | unsigned error; |
1026 | 1020 | ||
1027 | /* These are control chunks we want to send. */ | 1021 | /* These are control chunks we want to send. */ |
1028 | struct sk_buff_head control; | 1022 | struct list_head control_chunk_list; |
1029 | 1023 | ||
1030 | /* These are chunks that have been sacked but are above the | 1024 | /* These are chunks that have been sacked but are above the |
1031 | * CTSN, or cumulative tsn ack point. | 1025 | * CTSN, or cumulative tsn ack point. |
@@ -1672,7 +1666,7 @@ struct sctp_association { | |||
1672 | * which already resides in sctp_outq. Please move this | 1666 | * which already resides in sctp_outq. Please move this |
1673 | * queue and its supporting logic down there. --piggy] | 1667 | * queue and its supporting logic down there. --piggy] |
1674 | */ | 1668 | */ |
1675 | struct sk_buff_head addip_chunks; | 1669 | struct list_head addip_chunk_list; |
1676 | 1670 | ||
1677 | /* ADDIP Section 4.1 ASCONF Chunk Procedures | 1671 | /* ADDIP Section 4.1 ASCONF Chunk Procedures |
1678 | * | 1672 | * |
diff --git a/include/net/slhc_vj.h b/include/net/slhc_vj.h index 0b2c2784f333..8716d5942b65 100644 --- a/include/net/slhc_vj.h +++ b/include/net/slhc_vj.h | |||
@@ -170,19 +170,14 @@ struct slcompress { | |||
170 | }; | 170 | }; |
171 | #define NULLSLCOMPR (struct slcompress *)0 | 171 | #define NULLSLCOMPR (struct slcompress *)0 |
172 | 172 | ||
173 | #define __ARGS(x) x | ||
174 | |||
175 | /* In slhc.c: */ | 173 | /* In slhc.c: */ |
176 | struct slcompress *slhc_init __ARGS((int rslots, int tslots)); | 174 | struct slcompress *slhc_init(int rslots, int tslots); |
177 | void slhc_free __ARGS((struct slcompress *comp)); | 175 | void slhc_free(struct slcompress *comp); |
178 | 176 | ||
179 | int slhc_compress __ARGS((struct slcompress *comp, unsigned char *icp, | 177 | int slhc_compress(struct slcompress *comp, unsigned char *icp, int isize, |
180 | int isize, unsigned char *ocp, unsigned char **cpp, | 178 | unsigned char *ocp, unsigned char **cpp, int compress_cid); |
181 | int compress_cid)); | 179 | int slhc_uncompress(struct slcompress *comp, unsigned char *icp, int isize); |
182 | int slhc_uncompress __ARGS((struct slcompress *comp, unsigned char *icp, | 180 | int slhc_remember(struct slcompress *comp, unsigned char *icp, int isize); |
183 | int isize)); | 181 | int slhc_toss(struct slcompress *comp); |
184 | int slhc_remember __ARGS((struct slcompress *comp, unsigned char *icp, | ||
185 | int isize)); | ||
186 | int slhc_toss __ARGS((struct slcompress *comp)); | ||
187 | 182 | ||
188 | #endif /* _SLHC_H */ | 183 | #endif /* _SLHC_H */ |
diff --git a/include/net/sock.h b/include/net/sock.h index e593af5b1ecc..a1042d08becd 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -684,16 +684,17 @@ extern void FASTCALL(release_sock(struct sock *sk)); | |||
684 | #define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) | 684 | #define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) |
685 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) | 685 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) |
686 | 686 | ||
687 | extern struct sock *sk_alloc(int family, int priority, | 687 | extern struct sock *sk_alloc(int family, |
688 | unsigned int __nocast priority, | ||
688 | struct proto *prot, int zero_it); | 689 | struct proto *prot, int zero_it); |
689 | extern void sk_free(struct sock *sk); | 690 | extern void sk_free(struct sock *sk); |
690 | 691 | ||
691 | extern struct sk_buff *sock_wmalloc(struct sock *sk, | 692 | extern struct sk_buff *sock_wmalloc(struct sock *sk, |
692 | unsigned long size, int force, | 693 | unsigned long size, int force, |
693 | int priority); | 694 | unsigned int __nocast priority); |
694 | extern struct sk_buff *sock_rmalloc(struct sock *sk, | 695 | extern struct sk_buff *sock_rmalloc(struct sock *sk, |
695 | unsigned long size, int force, | 696 | unsigned long size, int force, |
696 | int priority); | 697 | unsigned int __nocast priority); |
697 | extern void sock_wfree(struct sk_buff *skb); | 698 | extern void sock_wfree(struct sk_buff *skb); |
698 | extern void sock_rfree(struct sk_buff *skb); | 699 | extern void sock_rfree(struct sk_buff *skb); |
699 | 700 | ||
@@ -708,7 +709,8 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk, | |||
708 | unsigned long size, | 709 | unsigned long size, |
709 | int noblock, | 710 | int noblock, |
710 | int *errcode); | 711 | int *errcode); |
711 | extern void *sock_kmalloc(struct sock *sk, int size, int priority); | 712 | extern void *sock_kmalloc(struct sock *sk, int size, |
713 | unsigned int __nocast priority); | ||
712 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); | 714 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); |
713 | extern void sk_send_sigurg(struct sock *sk); | 715 | extern void sk_send_sigurg(struct sock *sk); |
714 | 716 | ||
@@ -1132,15 +1134,19 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) | |||
1132 | } | 1134 | } |
1133 | 1135 | ||
1134 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | 1136 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, |
1135 | int size, int mem, int gfp) | 1137 | int size, int mem, |
1138 | unsigned int __nocast gfp) | ||
1136 | { | 1139 | { |
1137 | struct sk_buff *skb = alloc_skb(size + sk->sk_prot->max_header, gfp); | 1140 | struct sk_buff *skb; |
1141 | int hdr_len; | ||
1138 | 1142 | ||
1143 | hdr_len = SKB_DATA_ALIGN(sk->sk_prot->max_header); | ||
1144 | skb = alloc_skb(size + hdr_len, gfp); | ||
1139 | if (skb) { | 1145 | if (skb) { |
1140 | skb->truesize += mem; | 1146 | skb->truesize += mem; |
1141 | if (sk->sk_forward_alloc >= (int)skb->truesize || | 1147 | if (sk->sk_forward_alloc >= (int)skb->truesize || |
1142 | sk_stream_mem_schedule(sk, skb->truesize, 0)) { | 1148 | sk_stream_mem_schedule(sk, skb->truesize, 0)) { |
1143 | skb_reserve(skb, sk->sk_prot->max_header); | 1149 | skb_reserve(skb, hdr_len); |
1144 | return skb; | 1150 | return skb; |
1145 | } | 1151 | } |
1146 | __kfree_skb(skb); | 1152 | __kfree_skb(skb); |
@@ -1152,7 +1158,8 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1152 | } | 1158 | } |
1153 | 1159 | ||
1154 | static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, | 1160 | static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, |
1155 | int size, int gfp) | 1161 | int size, |
1162 | unsigned int __nocast gfp) | ||
1156 | { | 1163 | { |
1157 | return sk_stream_alloc_pskb(sk, size, 0, gfp); | 1164 | return sk_stream_alloc_pskb(sk, size, 0, gfp); |
1158 | } | 1165 | } |
@@ -1185,7 +1192,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1185 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); | 1192 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); |
1186 | } | 1193 | } |
1187 | 1194 | ||
1188 | static inline int gfp_any(void) | 1195 | static inline unsigned int __nocast gfp_any(void) |
1189 | { | 1196 | { |
1190 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; | 1197 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; |
1191 | } | 1198 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index ec9e20c27179..f4f9aba07ac2 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -721,11 +721,16 @@ static inline int tcp_ack_scheduled(struct tcp_sock *tp) | |||
721 | return tp->ack.pending&TCP_ACK_SCHED; | 721 | return tp->ack.pending&TCP_ACK_SCHED; |
722 | } | 722 | } |
723 | 723 | ||
724 | static __inline__ void tcp_dec_quickack_mode(struct tcp_sock *tp) | 724 | static __inline__ void tcp_dec_quickack_mode(struct tcp_sock *tp, unsigned int pkts) |
725 | { | 725 | { |
726 | if (tp->ack.quick && --tp->ack.quick == 0) { | 726 | if (tp->ack.quick) { |
727 | /* Leaving quickack mode we deflate ATO. */ | 727 | if (pkts >= tp->ack.quick) { |
728 | tp->ack.ato = TCP_ATO_MIN; | 728 | tp->ack.quick = 0; |
729 | |||
730 | /* Leaving quickack mode we deflate ATO. */ | ||
731 | tp->ack.ato = TCP_ATO_MIN; | ||
732 | } else | ||
733 | tp->ack.quick -= pkts; | ||
729 | } | 734 | } |
730 | } | 735 | } |
731 | 736 | ||
@@ -843,7 +848,9 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, | |||
843 | 848 | ||
844 | /* tcp_output.c */ | 849 | /* tcp_output.c */ |
845 | 850 | ||
846 | extern int tcp_write_xmit(struct sock *, int nonagle); | 851 | extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp, |
852 | unsigned int cur_mss, int nonagle); | ||
853 | extern int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp); | ||
847 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); | 854 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); |
848 | extern void tcp_xmit_retransmit_queue(struct sock *); | 855 | extern void tcp_xmit_retransmit_queue(struct sock *); |
849 | extern void tcp_simple_retransmit(struct sock *); | 856 | extern void tcp_simple_retransmit(struct sock *); |
@@ -853,12 +860,16 @@ extern void tcp_send_probe0(struct sock *); | |||
853 | extern void tcp_send_partial(struct sock *); | 860 | extern void tcp_send_partial(struct sock *); |
854 | extern int tcp_write_wakeup(struct sock *); | 861 | extern int tcp_write_wakeup(struct sock *); |
855 | extern void tcp_send_fin(struct sock *sk); | 862 | extern void tcp_send_fin(struct sock *sk); |
856 | extern void tcp_send_active_reset(struct sock *sk, int priority); | 863 | extern void tcp_send_active_reset(struct sock *sk, |
864 | unsigned int __nocast priority); | ||
857 | extern int tcp_send_synack(struct sock *); | 865 | extern int tcp_send_synack(struct sock *); |
858 | extern void tcp_push_one(struct sock *, unsigned mss_now); | 866 | extern void tcp_push_one(struct sock *, unsigned int mss_now); |
859 | extern void tcp_send_ack(struct sock *sk); | 867 | extern void tcp_send_ack(struct sock *sk); |
860 | extern void tcp_send_delayed_ack(struct sock *sk); | 868 | extern void tcp_send_delayed_ack(struct sock *sk); |
861 | 869 | ||
870 | /* tcp_input.c */ | ||
871 | extern void tcp_cwnd_application_limited(struct sock *sk); | ||
872 | |||
862 | /* tcp_timer.c */ | 873 | /* tcp_timer.c */ |
863 | extern void tcp_init_xmit_timers(struct sock *); | 874 | extern void tcp_init_xmit_timers(struct sock *); |
864 | extern void tcp_clear_xmit_timers(struct sock *); | 875 | extern void tcp_clear_xmit_timers(struct sock *); |
@@ -958,7 +969,7 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long | |||
958 | static inline void tcp_initialize_rcv_mss(struct sock *sk) | 969 | static inline void tcp_initialize_rcv_mss(struct sock *sk) |
959 | { | 970 | { |
960 | struct tcp_sock *tp = tcp_sk(sk); | 971 | struct tcp_sock *tp = tcp_sk(sk); |
961 | unsigned int hint = min(tp->advmss, tp->mss_cache_std); | 972 | unsigned int hint = min_t(unsigned int, tp->advmss, tp->mss_cache); |
962 | 973 | ||
963 | hint = min(hint, tp->rcv_wnd/2); | 974 | hint = min(hint, tp->rcv_wnd/2); |
964 | hint = min(hint, TCP_MIN_RCVMSS); | 975 | hint = min(hint, TCP_MIN_RCVMSS); |
@@ -981,7 +992,7 @@ static __inline__ void tcp_fast_path_on(struct tcp_sock *tp) | |||
981 | 992 | ||
982 | static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp) | 993 | static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp) |
983 | { | 994 | { |
984 | if (skb_queue_len(&tp->out_of_order_queue) == 0 && | 995 | if (skb_queue_empty(&tp->out_of_order_queue) && |
985 | tp->rcv_wnd && | 996 | tp->rcv_wnd && |
986 | atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && | 997 | atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && |
987 | !tp->urg_data) | 998 | !tp->urg_data) |
@@ -1225,28 +1236,6 @@ static inline void tcp_sync_left_out(struct tcp_sock *tp) | |||
1225 | tp->left_out = tp->sacked_out + tp->lost_out; | 1236 | tp->left_out = tp->sacked_out + tp->lost_out; |
1226 | } | 1237 | } |
1227 | 1238 | ||
1228 | extern void tcp_cwnd_application_limited(struct sock *sk); | ||
1229 | |||
1230 | /* Congestion window validation. (RFC2861) */ | ||
1231 | |||
1232 | static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp) | ||
1233 | { | ||
1234 | __u32 packets_out = tp->packets_out; | ||
1235 | |||
1236 | if (packets_out >= tp->snd_cwnd) { | ||
1237 | /* Network is feed fully. */ | ||
1238 | tp->snd_cwnd_used = 0; | ||
1239 | tp->snd_cwnd_stamp = tcp_time_stamp; | ||
1240 | } else { | ||
1241 | /* Network starves. */ | ||
1242 | if (tp->packets_out > tp->snd_cwnd_used) | ||
1243 | tp->snd_cwnd_used = tp->packets_out; | ||
1244 | |||
1245 | if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= tp->rto) | ||
1246 | tcp_cwnd_application_limited(sk); | ||
1247 | } | ||
1248 | } | ||
1249 | |||
1250 | /* Set slow start threshould and cwnd not falling to slow start */ | 1239 | /* Set slow start threshould and cwnd not falling to slow start */ |
1251 | static inline void __tcp_enter_cwr(struct tcp_sock *tp) | 1240 | static inline void __tcp_enter_cwr(struct tcp_sock *tp) |
1252 | { | 1241 | { |
@@ -1279,12 +1268,6 @@ static __inline__ __u32 tcp_max_burst(const struct tcp_sock *tp) | |||
1279 | return 3; | 1268 | return 3; |
1280 | } | 1269 | } |
1281 | 1270 | ||
1282 | static __inline__ int tcp_minshall_check(const struct tcp_sock *tp) | ||
1283 | { | ||
1284 | return after(tp->snd_sml,tp->snd_una) && | ||
1285 | !after(tp->snd_sml, tp->snd_nxt); | ||
1286 | } | ||
1287 | |||
1288 | static __inline__ void tcp_minshall_update(struct tcp_sock *tp, int mss, | 1271 | static __inline__ void tcp_minshall_update(struct tcp_sock *tp, int mss, |
1289 | const struct sk_buff *skb) | 1272 | const struct sk_buff *skb) |
1290 | { | 1273 | { |
@@ -1292,122 +1275,18 @@ static __inline__ void tcp_minshall_update(struct tcp_sock *tp, int mss, | |||
1292 | tp->snd_sml = TCP_SKB_CB(skb)->end_seq; | 1275 | tp->snd_sml = TCP_SKB_CB(skb)->end_seq; |
1293 | } | 1276 | } |
1294 | 1277 | ||
1295 | /* Return 0, if packet can be sent now without violation Nagle's rules: | ||
1296 | 1. It is full sized. | ||
1297 | 2. Or it contains FIN. | ||
1298 | 3. Or TCP_NODELAY was set. | ||
1299 | 4. Or TCP_CORK is not set, and all sent packets are ACKed. | ||
1300 | With Minshall's modification: all sent small packets are ACKed. | ||
1301 | */ | ||
1302 | |||
1303 | static __inline__ int | ||
1304 | tcp_nagle_check(const struct tcp_sock *tp, const struct sk_buff *skb, | ||
1305 | unsigned mss_now, int nonagle) | ||
1306 | { | ||
1307 | return (skb->len < mss_now && | ||
1308 | !(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) && | ||
1309 | ((nonagle&TCP_NAGLE_CORK) || | ||
1310 | (!nonagle && | ||
1311 | tp->packets_out && | ||
1312 | tcp_minshall_check(tp)))); | ||
1313 | } | ||
1314 | |||
1315 | extern void tcp_set_skb_tso_segs(struct sock *, struct sk_buff *); | ||
1316 | |||
1317 | /* This checks if the data bearing packet SKB (usually sk->sk_send_head) | ||
1318 | * should be put on the wire right now. | ||
1319 | */ | ||
1320 | static __inline__ int tcp_snd_test(struct sock *sk, | ||
1321 | struct sk_buff *skb, | ||
1322 | unsigned cur_mss, int nonagle) | ||
1323 | { | ||
1324 | struct tcp_sock *tp = tcp_sk(sk); | ||
1325 | int pkts = tcp_skb_pcount(skb); | ||
1326 | |||
1327 | if (!pkts) { | ||
1328 | tcp_set_skb_tso_segs(sk, skb); | ||
1329 | pkts = tcp_skb_pcount(skb); | ||
1330 | } | ||
1331 | |||
1332 | /* RFC 1122 - section 4.2.3.4 | ||
1333 | * | ||
1334 | * We must queue if | ||
1335 | * | ||
1336 | * a) The right edge of this frame exceeds the window | ||
1337 | * b) There are packets in flight and we have a small segment | ||
1338 | * [SWS avoidance and Nagle algorithm] | ||
1339 | * (part of SWS is done on packetization) | ||
1340 | * Minshall version sounds: there are no _small_ | ||
1341 | * segments in flight. (tcp_nagle_check) | ||
1342 | * c) We have too many packets 'in flight' | ||
1343 | * | ||
1344 | * Don't use the nagle rule for urgent data (or | ||
1345 | * for the final FIN -DaveM). | ||
1346 | * | ||
1347 | * Also, Nagle rule does not apply to frames, which | ||
1348 | * sit in the middle of queue (they have no chances | ||
1349 | * to get new data) and if room at tail of skb is | ||
1350 | * not enough to save something seriously (<32 for now). | ||
1351 | */ | ||
1352 | |||
1353 | /* Don't be strict about the congestion window for the | ||
1354 | * final FIN frame. -DaveM | ||
1355 | */ | ||
1356 | return (((nonagle&TCP_NAGLE_PUSH) || tp->urg_mode | ||
1357 | || !tcp_nagle_check(tp, skb, cur_mss, nonagle)) && | ||
1358 | (((tcp_packets_in_flight(tp) + (pkts-1)) < tp->snd_cwnd) || | ||
1359 | (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN)) && | ||
1360 | !after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd)); | ||
1361 | } | ||
1362 | |||
1363 | static __inline__ void tcp_check_probe_timer(struct sock *sk, struct tcp_sock *tp) | 1278 | static __inline__ void tcp_check_probe_timer(struct sock *sk, struct tcp_sock *tp) |
1364 | { | 1279 | { |
1365 | if (!tp->packets_out && !tp->pending) | 1280 | if (!tp->packets_out && !tp->pending) |
1366 | tcp_reset_xmit_timer(sk, TCP_TIME_PROBE0, tp->rto); | 1281 | tcp_reset_xmit_timer(sk, TCP_TIME_PROBE0, tp->rto); |
1367 | } | 1282 | } |
1368 | 1283 | ||
1369 | static __inline__ int tcp_skb_is_last(const struct sock *sk, | ||
1370 | const struct sk_buff *skb) | ||
1371 | { | ||
1372 | return skb->next == (struct sk_buff *)&sk->sk_write_queue; | ||
1373 | } | ||
1374 | |||
1375 | /* Push out any pending frames which were held back due to | ||
1376 | * TCP_CORK or attempt at coalescing tiny packets. | ||
1377 | * The socket must be locked by the caller. | ||
1378 | */ | ||
1379 | static __inline__ void __tcp_push_pending_frames(struct sock *sk, | ||
1380 | struct tcp_sock *tp, | ||
1381 | unsigned cur_mss, | ||
1382 | int nonagle) | ||
1383 | { | ||
1384 | struct sk_buff *skb = sk->sk_send_head; | ||
1385 | |||
1386 | if (skb) { | ||
1387 | if (!tcp_skb_is_last(sk, skb)) | ||
1388 | nonagle = TCP_NAGLE_PUSH; | ||
1389 | if (!tcp_snd_test(sk, skb, cur_mss, nonagle) || | ||
1390 | tcp_write_xmit(sk, nonagle)) | ||
1391 | tcp_check_probe_timer(sk, tp); | ||
1392 | } | ||
1393 | tcp_cwnd_validate(sk, tp); | ||
1394 | } | ||
1395 | |||
1396 | static __inline__ void tcp_push_pending_frames(struct sock *sk, | 1284 | static __inline__ void tcp_push_pending_frames(struct sock *sk, |
1397 | struct tcp_sock *tp) | 1285 | struct tcp_sock *tp) |
1398 | { | 1286 | { |
1399 | __tcp_push_pending_frames(sk, tp, tcp_current_mss(sk, 1), tp->nonagle); | 1287 | __tcp_push_pending_frames(sk, tp, tcp_current_mss(sk, 1), tp->nonagle); |
1400 | } | 1288 | } |
1401 | 1289 | ||
1402 | static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp) | ||
1403 | { | ||
1404 | struct sk_buff *skb = sk->sk_send_head; | ||
1405 | |||
1406 | return (skb && | ||
1407 | tcp_snd_test(sk, skb, tcp_current_mss(sk, 1), | ||
1408 | tcp_skb_is_last(sk, skb) ? TCP_NAGLE_PUSH : tp->nonagle)); | ||
1409 | } | ||
1410 | |||
1411 | static __inline__ void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq) | 1290 | static __inline__ void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq) |
1412 | { | 1291 | { |
1413 | tp->snd_wl1 = seq; | 1292 | tp->snd_wl1 = seq; |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index b42ddc0c1143..2cab39f49eb2 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -68,21 +68,9 @@ typedef struct adjust_t { | |||
68 | #define RES_ALLOCATED 0x20 | 68 | #define RES_ALLOCATED 0x20 |
69 | #define RES_REMOVED 0x40 | 69 | #define RES_REMOVED 0x40 |
70 | 70 | ||
71 | typedef struct servinfo_t { | ||
72 | char Signature[2]; | ||
73 | u_int Count; | ||
74 | u_int Revision; | ||
75 | u_int CSLevel; | ||
76 | char *VendorString; | ||
77 | } servinfo_t; | ||
78 | |||
79 | typedef struct event_callback_args_t { | 71 | typedef struct event_callback_args_t { |
80 | client_handle_t client_handle; | 72 | struct pcmcia_device *client_handle; |
81 | void *info; | 73 | void *client_data; |
82 | void *mtdrequest; | ||
83 | void *buffer; | ||
84 | void *misc; | ||
85 | void *client_data; | ||
86 | } event_callback_args_t; | 74 | } event_callback_args_t; |
87 | 75 | ||
88 | /* for GetConfigurationInfo */ | 76 | /* for GetConfigurationInfo */ |
@@ -393,25 +381,25 @@ enum service { | |||
393 | 381 | ||
394 | struct pcmcia_socket; | 382 | struct pcmcia_socket; |
395 | 383 | ||
396 | int pcmcia_access_configuration_register(client_handle_t handle, conf_reg_t *reg); | 384 | int pcmcia_access_configuration_register(struct pcmcia_device *p_dev, conf_reg_t *reg); |
397 | int pcmcia_deregister_client(client_handle_t handle); | 385 | int pcmcia_deregister_client(struct pcmcia_device *p_dev); |
398 | int pcmcia_get_configuration_info(client_handle_t handle, config_info_t *config); | 386 | int pcmcia_get_configuration_info(struct pcmcia_device *p_dev, config_info_t *config); |
399 | int pcmcia_get_first_window(window_handle_t *win, win_req_t *req); | 387 | int pcmcia_get_first_window(window_handle_t *win, win_req_t *req); |
400 | int pcmcia_get_next_window(window_handle_t *win, win_req_t *req); | 388 | int pcmcia_get_next_window(window_handle_t *win, win_req_t *req); |
401 | int pcmcia_get_status(client_handle_t handle, cs_status_t *status); | 389 | int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status); |
402 | int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); | 390 | int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); |
403 | int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); | 391 | int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); |
404 | int pcmcia_modify_configuration(client_handle_t handle, modconf_t *mod); | 392 | int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); |
405 | int pcmcia_register_client(client_handle_t *handle, client_reg_t *req); | 393 | int pcmcia_register_client(client_handle_t *handle, client_reg_t *req); |
406 | int pcmcia_release_configuration(client_handle_t handle); | 394 | int pcmcia_release_configuration(struct pcmcia_device *p_dev); |
407 | int pcmcia_release_io(client_handle_t handle, io_req_t *req); | 395 | int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req); |
408 | int pcmcia_release_irq(client_handle_t handle, irq_req_t *req); | 396 | int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req); |
409 | int pcmcia_release_window(window_handle_t win); | 397 | int pcmcia_release_window(window_handle_t win); |
410 | int pcmcia_request_configuration(client_handle_t handle, config_req_t *req); | 398 | int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req); |
411 | int pcmcia_request_io(client_handle_t handle, io_req_t *req); | 399 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); |
412 | int pcmcia_request_irq(client_handle_t handle, irq_req_t *req); | 400 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); |
413 | int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle_t *wh); | 401 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); |
414 | int pcmcia_reset_card(client_handle_t handle, client_req_t *req); | 402 | int pcmcia_reset_card(struct pcmcia_device *p_dev, client_req_t *req); |
415 | int pcmcia_suspend_card(struct pcmcia_socket *skt); | 403 | int pcmcia_suspend_card(struct pcmcia_socket *skt); |
416 | int pcmcia_resume_card(struct pcmcia_socket *skt); | 404 | int pcmcia_resume_card(struct pcmcia_socket *skt); |
417 | int pcmcia_eject_card(struct pcmcia_socket *skt); | 405 | int pcmcia_eject_card(struct pcmcia_socket *skt); |
diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h index 7881d40aac8d..c1d1629fcd27 100644 --- a/include/pcmcia/cs_types.h +++ b/include/pcmcia/cs_types.h | |||
@@ -34,8 +34,8 @@ typedef u_int event_t; | |||
34 | typedef u_char cisdata_t; | 34 | typedef u_char cisdata_t; |
35 | typedef u_short page_t; | 35 | typedef u_short page_t; |
36 | 36 | ||
37 | struct client_t; | 37 | struct pcmcia_device; |
38 | typedef struct client_t *client_handle_t; | 38 | typedef struct pcmcia_device *client_handle_t; |
39 | 39 | ||
40 | struct window_t; | 40 | struct window_t; |
41 | typedef struct window_t *window_handle_t; | 41 | typedef struct window_t *window_handle_t; |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 2b52553f2d94..0190e766e1a7 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -49,7 +49,6 @@ typedef struct mtd_info_t { | |||
49 | } mtd_info_t; | 49 | } mtd_info_t; |
50 | 50 | ||
51 | typedef union ds_ioctl_arg_t { | 51 | typedef union ds_ioctl_arg_t { |
52 | servinfo_t servinfo; | ||
53 | adjust_t adjust; | 52 | adjust_t adjust; |
54 | config_info_t config; | 53 | config_info_t config; |
55 | tuple_t tuple; | 54 | tuple_t tuple; |
@@ -65,7 +64,6 @@ typedef union ds_ioctl_arg_t { | |||
65 | cisdump_t cisdump; | 64 | cisdump_t cisdump; |
66 | } ds_ioctl_arg_t; | 65 | } ds_ioctl_arg_t; |
67 | 66 | ||
68 | #define DS_GET_CARD_SERVICES_INFO _IOR ('d', 1, servinfo_t) | ||
69 | #define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t) | 67 | #define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t) |
70 | #define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t) | 68 | #define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t) |
71 | #define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t) | 69 | #define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t) |
@@ -133,6 +131,8 @@ struct pcmcia_socket; | |||
133 | 131 | ||
134 | struct pcmcia_driver { | 132 | struct pcmcia_driver { |
135 | dev_link_t *(*attach)(void); | 133 | dev_link_t *(*attach)(void); |
134 | int (*event) (event_t event, int priority, | ||
135 | event_callback_args_t *); | ||
136 | void (*detach)(dev_link_t *); | 136 | void (*detach)(dev_link_t *); |
137 | struct module *owner; | 137 | struct module *owner; |
138 | struct pcmcia_device_id *id_table; | 138 | struct pcmcia_device_id *id_table; |
@@ -159,16 +159,8 @@ struct pcmcia_device { | |||
159 | /* deprecated, a cleaned up version will be moved into this | 159 | /* deprecated, a cleaned up version will be moved into this |
160 | struct soon */ | 160 | struct soon */ |
161 | dev_link_t *instance; | 161 | dev_link_t *instance; |
162 | struct client_t { | 162 | event_callback_args_t event_callback_args; |
163 | u_short client_magic; | 163 | u_int state; |
164 | struct pcmcia_socket *Socket; | ||
165 | u_char Function; | ||
166 | u_int state; | ||
167 | event_t EventMask; | ||
168 | int (*event_handler) (event_t event, int priority, | ||
169 | event_callback_args_t *); | ||
170 | event_callback_args_t event_callback_args; | ||
171 | } client; | ||
172 | 164 | ||
173 | /* information about this device */ | 165 | /* information about this device */ |
174 | u8 has_manf_id:1; | 166 | u8 has_manf_id:1; |
@@ -193,8 +185,8 @@ struct pcmcia_device { | |||
193 | #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) | 185 | #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) |
194 | #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) | 186 | #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) |
195 | 187 | ||
196 | #define handle_to_pdev(handle) container_of(handle, struct pcmcia_device, client); | 188 | #define handle_to_pdev(handle) (handle) |
197 | #define handle_to_dev(handle) ((container_of(handle, struct pcmcia_device, client))->dev) | 189 | #define handle_to_dev(handle) (handle->dev) |
198 | 190 | ||
199 | /* error reporting */ | 191 | /* error reporting */ |
200 | void cs_error(client_handle_t handle, int func, int ret); | 192 | void cs_error(client_handle_t handle, int func, int ret); |
diff --git a/include/pcmcia/version.h b/include/pcmcia/version.h index eb88263fc8d5..5ad9c5e198b6 100644 --- a/include/pcmcia/version.h +++ b/include/pcmcia/version.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* version.h 1.94 2000/10/03 17:55:48 (David Hinds) */ | 1 | /* version.h 1.94 2000/10/03 17:55:48 (David Hinds) */ |
2 | 2 | ||
3 | #define CS_RELEASE "3.1.22" | 3 | /* This file will be removed, please don't include it */ |
4 | #define CS_RELEASE_CODE 0x3116 | ||