diff options
Diffstat (limited to 'include')
69 files changed, 1460 insertions, 345 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-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/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/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/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-sparc/unistd.h b/include/asm-sparc/unistd.h index 846708403900..aee17d7e2e44 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -212,7 +212,7 @@ | |||
212 | #define __NR_epoll_create 193 /* Linux Specific */ | 212 | #define __NR_epoll_create 193 /* Linux Specific */ |
213 | #define __NR_epoll_ctl 194 /* Linux Specific */ | 213 | #define __NR_epoll_ctl 194 /* Linux Specific */ |
214 | #define __NR_epoll_wait 195 /* Linux Specific */ | 214 | #define __NR_epoll_wait 195 /* Linux Specific */ |
215 | /* #define __NR_ulimit 196 Linux Specific */ | 215 | #define __NR_ioprio_set 196 /* Linux Specific */ |
216 | #define __NR_getppid 197 /* Linux Specific */ | 216 | #define __NR_getppid 197 /* Linux Specific */ |
217 | #define __NR_sigaction 198 /* Linux Specific */ | 217 | #define __NR_sigaction 198 /* Linux Specific */ |
218 | #define __NR_sgetmask 199 /* Linux Specific */ | 218 | #define __NR_sgetmask 199 /* Linux Specific */ |
@@ -234,7 +234,7 @@ | |||
234 | #define __NR_ipc 215 /* Linux Specific */ | 234 | #define __NR_ipc 215 /* Linux Specific */ |
235 | #define __NR_sigreturn 216 /* Linux Specific */ | 235 | #define __NR_sigreturn 216 /* Linux Specific */ |
236 | #define __NR_clone 217 /* Linux Specific */ | 236 | #define __NR_clone 217 /* Linux Specific */ |
237 | /* #define __NR_modify_ldt 218 Linux Specific - i386 specific, unused */ | 237 | #define __NR_ioprio_get 218 /* Linux Specific */ |
238 | #define __NR_adjtimex 219 /* Linux Specific */ | 238 | #define __NR_adjtimex 219 /* Linux Specific */ |
239 | #define __NR_sigprocmask 220 /* Linux Specific */ | 239 | #define __NR_sigprocmask 220 /* Linux Specific */ |
240 | #define __NR_create_module 221 /* Linux Specific */ | 240 | #define __NR_create_module 221 /* Linux Specific */ |
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/thread_info.h b/include/asm-sparc64/thread_info.h index 0cd652956929..a1d25c06f92a 100644 --- a/include/asm-sparc64/thread_info.h +++ b/include/asm-sparc64/thread_info.h | |||
@@ -220,8 +220,8 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
220 | #define TIF_NEWSIGNALS 6 /* wants new-style signals */ | 220 | #define TIF_NEWSIGNALS 6 /* wants new-style signals */ |
221 | #define TIF_32BIT 7 /* 32-bit binary */ | 221 | #define TIF_32BIT 7 /* 32-bit binary */ |
222 | #define TIF_NEWCHILD 8 /* just-spawned child process */ | 222 | #define TIF_NEWCHILD 8 /* just-spawned child process */ |
223 | /* TIF_* value 9 is available */ | 223 | #define TIF_SECCOMP 9 /* secure computing */ |
224 | #define TIF_POLLING_NRFLAG 10 | 224 | #define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */ |
225 | #define TIF_SYSCALL_SUCCESS 11 | 225 | #define TIF_SYSCALL_SUCCESS 11 |
226 | /* NOTE: Thread flags >= 12 should be ones we have no interest | 226 | /* NOTE: Thread flags >= 12 should be ones we have no interest |
227 | * in using in assembly, else we can't use the mask as | 227 | * in using in assembly, else we can't use the mask as |
@@ -229,6 +229,7 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
229 | */ | 229 | */ |
230 | #define TIF_ABI_PENDING 12 | 230 | #define TIF_ABI_PENDING 12 |
231 | #define TIF_MEMDIE 13 | 231 | #define TIF_MEMDIE 13 |
232 | #define TIF_POLLING_NRFLAG 14 | ||
232 | 233 | ||
233 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 234 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
234 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 235 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -239,9 +240,11 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
239 | #define _TIF_NEWSIGNALS (1<<TIF_NEWSIGNALS) | 240 | #define _TIF_NEWSIGNALS (1<<TIF_NEWSIGNALS) |
240 | #define _TIF_32BIT (1<<TIF_32BIT) | 241 | #define _TIF_32BIT (1<<TIF_32BIT) |
241 | #define _TIF_NEWCHILD (1<<TIF_NEWCHILD) | 242 | #define _TIF_NEWCHILD (1<<TIF_NEWCHILD) |
242 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 243 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
243 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 244 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
244 | #define _TIF_SYSCALL_SUCCESS (1<<TIF_SYSCALL_SUCCESS) | 245 | #define _TIF_SYSCALL_SUCCESS (1<<TIF_SYSCALL_SUCCESS) |
246 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | ||
247 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
245 | 248 | ||
246 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ | 249 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ |
247 | (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ | 250 | (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 5b8dcf5786a5..f59144c6b76a 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -212,7 +212,7 @@ | |||
212 | #define __NR_epoll_create 193 /* Linux Specific */ | 212 | #define __NR_epoll_create 193 /* Linux Specific */ |
213 | #define __NR_epoll_ctl 194 /* Linux Specific */ | 213 | #define __NR_epoll_ctl 194 /* Linux Specific */ |
214 | #define __NR_epoll_wait 195 /* Linux Specific */ | 214 | #define __NR_epoll_wait 195 /* Linux Specific */ |
215 | /* #define __NR_ulimit 196 Linux Specific */ | 215 | #define __NR_ioprio_set 196 /* Linux Specific */ |
216 | #define __NR_getppid 197 /* Linux Specific */ | 216 | #define __NR_getppid 197 /* Linux Specific */ |
217 | #define __NR_sigaction 198 /* Linux Specific */ | 217 | #define __NR_sigaction 198 /* Linux Specific */ |
218 | #define __NR_sgetmask 199 /* Linux Specific */ | 218 | #define __NR_sgetmask 199 /* Linux Specific */ |
@@ -234,7 +234,7 @@ | |||
234 | #define __NR_ipc 215 /* Linux Specific */ | 234 | #define __NR_ipc 215 /* Linux Specific */ |
235 | #define __NR_sigreturn 216 /* Linux Specific */ | 235 | #define __NR_sigreturn 216 /* Linux Specific */ |
236 | #define __NR_clone 217 /* Linux Specific */ | 236 | #define __NR_clone 217 /* Linux Specific */ |
237 | /* #define __NR_modify_ldt 218 Linux Specific - i386 specific, unused */ | 237 | #define __NR_ioprio_get 218 /* Linux Specific */ |
238 | #define __NR_adjtimex 219 /* Linux Specific */ | 238 | #define __NR_adjtimex 219 /* Linux Specific */ |
239 | #define __NR_sigprocmask 220 /* Linux Specific */ | 239 | #define __NR_sigprocmask 220 /* Linux Specific */ |
240 | #define __NR_create_module 221 /* Linux Specific */ | 240 | #define __NR_create_module 221 /* Linux Specific */ |
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/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/ipc.h b/include/asm-xtensa/ipc.h deleted file mode 100644 index a9eed4e21cb9..000000000000 --- a/include/asm-xtensa/ipc.h +++ /dev/null | |||
@@ -1,16 +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 | #include <asm-generic/ipc.h> | ||
15 | |||
16 | #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/audit.h b/include/linux/audit.h index bf2ad3ba72eb..68aba0c02e49 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -165,7 +165,7 @@ | |||
165 | #define AUDIT_ARCH_SH64 (EM_SH|__AUDIT_ARCH_64BIT) | 165 | #define AUDIT_ARCH_SH64 (EM_SH|__AUDIT_ARCH_64BIT) |
166 | #define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 166 | #define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
167 | #define AUDIT_ARCH_SPARC (EM_SPARC) | 167 | #define AUDIT_ARCH_SPARC (EM_SPARC) |
168 | #define AUDIT_ARCH_SPARC64 (EM_SPARC64|__AUDIT_ARCH_64BIT) | 168 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT) |
169 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) | 169 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) |
170 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 170 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
171 | 171 | ||
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..f6b5a46c5f82 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 | #if defined(CONFIG_X86) || defined(CONFIG_SPARC64) | ||
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/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/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/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/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/skbuff.h b/include/linux/skbuff.h index 14b950413495..5d4a990d5577 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -300,20 +300,26 @@ struct sk_buff { | |||
300 | #include <asm/system.h> | 300 | #include <asm/system.h> |
301 | 301 | ||
302 | extern void __kfree_skb(struct sk_buff *skb); | 302 | extern void __kfree_skb(struct sk_buff *skb); |
303 | 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); | ||
304 | 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, |
305 | unsigned int size, int priority); | 306 | unsigned int size, |
307 | unsigned int __nocast priority); | ||
306 | extern void kfree_skbmem(struct sk_buff *skb); | 308 | extern void kfree_skbmem(struct sk_buff *skb); |
307 | extern struct sk_buff *skb_clone(struct sk_buff *skb, int priority); | 309 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
308 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, int priority); | 310 | unsigned int __nocast priority); |
309 | 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); | ||
310 | extern int pskb_expand_head(struct sk_buff *skb, | 315 | extern int pskb_expand_head(struct sk_buff *skb, |
311 | int nhead, int ntail, int gfp_mask); | 316 | int nhead, int ntail, |
317 | unsigned int __nocast gfp_mask); | ||
312 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, | 318 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, |
313 | unsigned int headroom); | 319 | unsigned int headroom); |
314 | 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, |
315 | int newheadroom, int newtailroom, | 321 | int newheadroom, int newtailroom, |
316 | int priority); | 322 | unsigned int __nocast priority); |
317 | 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); |
318 | #define dev_kfree_skb(a) kfree_skb(a) | 324 | #define dev_kfree_skb(a) kfree_skb(a) |
319 | extern void skb_over_panic(struct sk_buff *skb, int len, | 325 | extern void skb_over_panic(struct sk_buff *skb, int len, |
@@ -464,7 +470,8 @@ static inline int skb_shared(const struct sk_buff *skb) | |||
464 | * | 470 | * |
465 | * NULL is returned on a memory allocation failure. | 471 | * NULL is returned on a memory allocation failure. |
466 | */ | 472 | */ |
467 | 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) | ||
468 | { | 475 | { |
469 | might_sleep_if(pri & __GFP_WAIT); | 476 | might_sleep_if(pri & __GFP_WAIT); |
470 | if (skb_shared(skb)) { | 477 | if (skb_shared(skb)) { |
@@ -1001,7 +1008,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1001 | * %NULL is returned in there is no free memory. | 1008 | * %NULL is returned in there is no free memory. |
1002 | */ | 1009 | */ |
1003 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 1010 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
1004 | int gfp_mask) | 1011 | unsigned int __nocast gfp_mask) |
1005 | { | 1012 | { |
1006 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); | 1013 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); |
1007 | if (likely(skb)) | 1014 | if (likely(skb)) |
@@ -1114,8 +1121,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i, | |||
1114 | * If there is no free memory -ENOMEM is returned, otherwise zero | 1121 | * If there is no free memory -ENOMEM is returned, otherwise zero |
1115 | * is returned and the old skb data released. | 1122 | * is returned and the old skb data released. |
1116 | */ | 1123 | */ |
1117 | extern int __skb_linearize(struct sk_buff *skb, int gfp); | 1124 | extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp); |
1118 | 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) |
1119 | { | 1126 | { |
1120 | return __skb_linearize(skb, gfp); | 1127 | return __skb_linearize(skb, gfp); |
1121 | } | 1128 | } |
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/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/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/sock.h b/include/net/sock.h index 7b76f891ae2d..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,7 +1134,8 @@ 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; | 1140 | struct sk_buff *skb; |
1138 | int hdr_len; | 1141 | int hdr_len; |
@@ -1155,7 +1158,8 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1155 | } | 1158 | } |
1156 | 1159 | ||
1157 | 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, |
1158 | int size, int gfp) | 1161 | int size, |
1162 | unsigned int __nocast gfp) | ||
1159 | { | 1163 | { |
1160 | return sk_stream_alloc_pskb(sk, size, 0, gfp); | 1164 | return sk_stream_alloc_pskb(sk, size, 0, gfp); |
1161 | } | 1165 | } |
@@ -1188,7 +1192,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1188 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); | 1192 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); |
1189 | } | 1193 | } |
1190 | 1194 | ||
1191 | static inline int gfp_any(void) | 1195 | static inline unsigned int __nocast gfp_any(void) |
1192 | { | 1196 | { |
1193 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; | 1197 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; |
1194 | } | 1198 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index a166918ca56d..f4f9aba07ac2 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -860,7 +860,8 @@ extern void tcp_send_probe0(struct sock *); | |||
860 | extern void tcp_send_partial(struct sock *); | 860 | extern void tcp_send_partial(struct sock *); |
861 | extern int tcp_write_wakeup(struct sock *); | 861 | extern int tcp_write_wakeup(struct sock *); |
862 | extern void tcp_send_fin(struct sock *sk); | 862 | extern void tcp_send_fin(struct sock *sk); |
863 | 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); | ||
864 | extern int tcp_send_synack(struct sock *); | 865 | extern int tcp_send_synack(struct sock *); |
865 | extern void tcp_push_one(struct sock *, unsigned int mss_now); | 866 | extern void tcp_push_one(struct sock *, unsigned int mss_now); |
866 | extern void tcp_send_ack(struct sock *sk); | 867 | extern void tcp_send_ack(struct sock *sk); |
@@ -991,7 +992,7 @@ static __inline__ void tcp_fast_path_on(struct tcp_sock *tp) | |||
991 | 992 | ||
992 | 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) |
993 | { | 994 | { |
994 | if (skb_queue_len(&tp->out_of_order_queue) == 0 && | 995 | if (skb_queue_empty(&tp->out_of_order_queue) && |
995 | tp->rcv_wnd && | 996 | tp->rcv_wnd && |
996 | atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && | 997 | atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && |
997 | !tp->urg_data) | 998 | !tp->urg_data) |
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 | ||