diff options
Diffstat (limited to 'include')
247 files changed, 2689 insertions, 2639 deletions
diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h index 0577daffc720..fa0b41b164a7 100644 --- a/include/asm-alpha/page.h +++ b/include/asm-alpha/page.h | |||
@@ -63,20 +63,6 @@ typedef unsigned long pgprot_t; | |||
63 | 63 | ||
64 | #endif /* STRICT_MM_TYPECHECKS */ | 64 | #endif /* STRICT_MM_TYPECHECKS */ |
65 | 65 | ||
66 | /* Pure 2^n version of get_order */ | ||
67 | extern __inline__ int get_order(unsigned long size) | ||
68 | { | ||
69 | int order; | ||
70 | |||
71 | size = (size-1) >> (PAGE_SHIFT-1); | ||
72 | order = -1; | ||
73 | do { | ||
74 | size >>= 1; | ||
75 | order++; | ||
76 | } while (size); | ||
77 | return order; | ||
78 | } | ||
79 | |||
80 | #ifdef USE_48_BIT_KSEG | 66 | #ifdef USE_48_BIT_KSEG |
81 | #define PAGE_OFFSET 0xffff800000000000UL | 67 | #define PAGE_OFFSET 0xffff800000000000UL |
82 | #else | 68 | #else |
@@ -112,4 +98,6 @@ extern __inline__ int get_order(unsigned long size) | |||
112 | 98 | ||
113 | #endif /* __KERNEL__ */ | 99 | #endif /* __KERNEL__ */ |
114 | 100 | ||
101 | #include <asm-generic/page.h> | ||
102 | |||
115 | #endif /* _ALPHA_PAGE_H */ | 103 | #endif /* _ALPHA_PAGE_H */ |
diff --git a/include/asm-alpha/types.h b/include/asm-alpha/types.h index 43264d219246..f5716139ec89 100644 --- a/include/asm-alpha/types.h +++ b/include/asm-alpha/types.h | |||
@@ -56,8 +56,6 @@ typedef unsigned long u64; | |||
56 | typedef u64 dma_addr_t; | 56 | typedef u64 dma_addr_t; |
57 | typedef u64 dma64_addr_t; | 57 | typedef u64 dma64_addr_t; |
58 | 58 | ||
59 | typedef unsigned short kmem_bufctl_t; | ||
60 | |||
61 | #endif /* __ASSEMBLY__ */ | 59 | #endif /* __ASSEMBLY__ */ |
62 | #endif /* __KERNEL__ */ | 60 | #endif /* __KERNEL__ */ |
63 | #endif /* _ALPHA_TYPES_H */ | 61 | #endif /* _ALPHA_TYPES_H */ |
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 7495026e2c18..e350dcb544e8 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -383,39 +383,45 @@ __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) && \ | 386 | #define PIO_OFFSET 0x10000UL |
387 | ((unsigned long)p <= 0x0000ffff)) | 387 | #define PIO_MASK 0x0ffffUL |
388 | |||
389 | #define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \ | ||
390 | ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) | ||
388 | static inline unsigned int | 391 | static inline unsigned int |
389 | __ixp4xx_ioread8(void __iomem *port) | 392 | __ixp4xx_ioread8(void __iomem *addr) |
390 | { | 393 | { |
394 | unsigned long port = (unsigned long __force)addr; | ||
391 | if (__is_io_address(port)) | 395 | if (__is_io_address(port)) |
392 | return (unsigned int)__ixp4xx_inb((unsigned int)port); | 396 | return (unsigned int)__ixp4xx_inb(port & PIO_MASK); |
393 | else | 397 | else |
394 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 398 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
395 | return (unsigned int)__raw_readb((u32)port); | 399 | return (unsigned int)__raw_readb(port); |
396 | #else | 400 | #else |
397 | return (unsigned int)__ixp4xx_readb((u32)port); | 401 | return (unsigned int)__ixp4xx_readb(port); |
398 | #endif | 402 | #endif |
399 | } | 403 | } |
400 | 404 | ||
401 | static inline void | 405 | static inline void |
402 | __ixp4xx_ioread8_rep(u32 port, u8 *vaddr, u32 count) | 406 | __ixp4xx_ioread8_rep(void __iomem *addr, void *vaddr, u32 count) |
403 | { | 407 | { |
408 | unsigned long port = (unsigned long __force)addr; | ||
404 | if (__is_io_address(port)) | 409 | if (__is_io_address(port)) |
405 | __ixp4xx_insb(port, vaddr, count); | 410 | __ixp4xx_insb(port & PIO_MASK, vaddr, count); |
406 | else | 411 | else |
407 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 412 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
408 | __raw_readsb((void __iomem *)port, vaddr, count); | 413 | __raw_readsb(addr, vaddr, count); |
409 | #else | 414 | #else |
410 | __ixp4xx_readsb(port, vaddr, count); | 415 | __ixp4xx_readsb(port, vaddr, count); |
411 | #endif | 416 | #endif |
412 | } | 417 | } |
413 | 418 | ||
414 | static inline unsigned int | 419 | static inline unsigned int |
415 | __ixp4xx_ioread16(void __iomem *port) | 420 | __ixp4xx_ioread16(void __iomem *addr) |
416 | { | 421 | { |
422 | unsigned long port = (unsigned long __force)addr; | ||
417 | if (__is_io_address(port)) | 423 | if (__is_io_address(port)) |
418 | return (unsigned int)__ixp4xx_inw((unsigned int)port); | 424 | return (unsigned int)__ixp4xx_inw(port & PIO_MASK); |
419 | else | 425 | else |
420 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 426 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
421 | return le16_to_cpu(__raw_readw((u32)port)); | 427 | return le16_to_cpu(__raw_readw((u32)port)); |
@@ -425,23 +431,25 @@ __ixp4xx_ioread16(void __iomem *port) | |||
425 | } | 431 | } |
426 | 432 | ||
427 | static inline void | 433 | static inline void |
428 | __ixp4xx_ioread16_rep(u32 port, u16 *vaddr, u32 count) | 434 | __ixp4xx_ioread16_rep(void __iomem *addr, void *vaddr, u32 count) |
429 | { | 435 | { |
436 | unsigned long port = (unsigned long __force)addr; | ||
430 | if (__is_io_address(port)) | 437 | if (__is_io_address(port)) |
431 | __ixp4xx_insw(port, vaddr, count); | 438 | __ixp4xx_insw(port & PIO_MASK, vaddr, count); |
432 | else | 439 | else |
433 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
434 | __raw_readsw((void __iomem *)port, vaddr, count); | 441 | __raw_readsw(addr, vaddr, count); |
435 | #else | 442 | #else |
436 | __ixp4xx_readsw(port, vaddr, count); | 443 | __ixp4xx_readsw(port, vaddr, count); |
437 | #endif | 444 | #endif |
438 | } | 445 | } |
439 | 446 | ||
440 | static inline unsigned int | 447 | static inline unsigned int |
441 | __ixp4xx_ioread32(void __iomem *port) | 448 | __ixp4xx_ioread32(void __iomem *addr) |
442 | { | 449 | { |
450 | unsigned long port = (unsigned long __force)addr; | ||
443 | if (__is_io_address(port)) | 451 | if (__is_io_address(port)) |
444 | return (unsigned int)__ixp4xx_inl((unsigned int)port); | 452 | return (unsigned int)__ixp4xx_inl(port & PIO_MASK); |
445 | else { | 453 | else { |
446 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 454 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
447 | return le32_to_cpu(__raw_readl((u32)port)); | 455 | return le32_to_cpu(__raw_readl((u32)port)); |
@@ -452,90 +460,100 @@ __ixp4xx_ioread32(void __iomem *port) | |||
452 | } | 460 | } |
453 | 461 | ||
454 | static inline void | 462 | static inline void |
455 | __ixp4xx_ioread32_rep(u32 port, u32 *vaddr, u32 count) | 463 | __ixp4xx_ioread32_rep(void __iomem *addr, void *vaddr, u32 count) |
456 | { | 464 | { |
465 | unsigned long port = (unsigned long __force)addr; | ||
457 | if (__is_io_address(port)) | 466 | if (__is_io_address(port)) |
458 | __ixp4xx_insl(port, vaddr, count); | 467 | __ixp4xx_insl(port & PIO_MASK, vaddr, count); |
459 | else | 468 | else |
460 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 469 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
461 | __raw_readsl((void __iomem *)port, vaddr, count); | 470 | __raw_readsl(addr, vaddr, count); |
462 | #else | 471 | #else |
463 | __ixp4xx_readsl(port, vaddr, count); | 472 | __ixp4xx_readsl(port, vaddr, count); |
464 | #endif | 473 | #endif |
465 | } | 474 | } |
466 | 475 | ||
467 | static inline void | 476 | static inline void |
468 | __ixp4xx_iowrite8(u8 value, void __iomem *port) | 477 | __ixp4xx_iowrite8(u8 value, void __iomem *addr) |
469 | { | 478 | { |
479 | unsigned long port = (unsigned long __force)addr; | ||
470 | if (__is_io_address(port)) | 480 | if (__is_io_address(port)) |
471 | __ixp4xx_outb(value, (unsigned int)port); | 481 | __ixp4xx_outb(value, port & PIO_MASK); |
472 | else | 482 | else |
473 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 483 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
474 | __raw_writeb(value, (u32)port); | 484 | __raw_writeb(value, port); |
475 | #else | 485 | #else |
476 | __ixp4xx_writeb(value, (u32)port); | 486 | __ixp4xx_writeb(value, port); |
477 | #endif | 487 | #endif |
478 | } | 488 | } |
479 | 489 | ||
480 | static inline void | 490 | static inline void |
481 | __ixp4xx_iowrite8_rep(u32 port, u8 *vaddr, u32 count) | 491 | __ixp4xx_iowrite8_rep(void __iomem *addr, const void *vaddr, u32 count) |
482 | { | 492 | { |
493 | unsigned long port = (unsigned long __force)addr; | ||
483 | if (__is_io_address(port)) | 494 | if (__is_io_address(port)) |
484 | __ixp4xx_outsb(port, vaddr, count); | 495 | __ixp4xx_outsb(port & PIO_MASK, vaddr, count); |
496 | else | ||
485 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 497 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
486 | __raw_writesb((void __iomem *)port, vaddr, count); | 498 | __raw_writesb(addr, vaddr, count); |
487 | #else | 499 | #else |
488 | __ixp4xx_writesb(port, vaddr, count); | 500 | __ixp4xx_writesb(port, vaddr, count); |
489 | #endif | 501 | #endif |
490 | } | 502 | } |
491 | 503 | ||
492 | static inline void | 504 | static inline void |
493 | __ixp4xx_iowrite16(u16 value, void __iomem *port) | 505 | __ixp4xx_iowrite16(u16 value, void __iomem *addr) |
494 | { | 506 | { |
507 | unsigned long port = (unsigned long __force)addr; | ||
495 | if (__is_io_address(port)) | 508 | if (__is_io_address(port)) |
496 | __ixp4xx_outw(value, (unsigned int)port); | 509 | __ixp4xx_outw(value, port & PIO_MASK); |
497 | else | 510 | else |
498 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 511 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
499 | __raw_writew(cpu_to_le16(value), (u32)port); | 512 | __raw_writew(cpu_to_le16(value), addr); |
500 | #else | 513 | #else |
501 | __ixp4xx_writew(value, (u32)port); | 514 | __ixp4xx_writew(value, port); |
502 | #endif | 515 | #endif |
503 | } | 516 | } |
504 | 517 | ||
505 | static inline void | 518 | static inline void |
506 | __ixp4xx_iowrite16_rep(u32 port, u16 *vaddr, u32 count) | 519 | __ixp4xx_iowrite16_rep(void __iomem *addr, const void *vaddr, u32 count) |
507 | { | 520 | { |
521 | unsigned long port = (unsigned long __force)addr; | ||
508 | if (__is_io_address(port)) | 522 | if (__is_io_address(port)) |
509 | __ixp4xx_outsw(port, vaddr, count); | 523 | __ixp4xx_outsw(port & PIO_MASK, vaddr, count); |
524 | else | ||
510 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
511 | __raw_readsw((void __iomem *)port, vaddr, count); | 526 | __raw_writesw(addr, vaddr, count); |
512 | #else | 527 | #else |
513 | __ixp4xx_writesw(port, vaddr, count); | 528 | __ixp4xx_writesw(port, vaddr, count); |
514 | #endif | 529 | #endif |
515 | } | 530 | } |
516 | 531 | ||
517 | static inline void | 532 | static inline void |
518 | __ixp4xx_iowrite32(u32 value, void __iomem *port) | 533 | __ixp4xx_iowrite32(u32 value, void __iomem *addr) |
519 | { | 534 | { |
535 | unsigned long port = (unsigned long __force)addr; | ||
520 | if (__is_io_address(port)) | 536 | if (__is_io_address(port)) |
521 | __ixp4xx_outl(value, (unsigned int)port); | 537 | __ixp4xx_outl(value, port & PIO_MASK); |
522 | else | 538 | else |
523 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 539 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
524 | __raw_writel(cpu_to_le32(value), (u32)port); | 540 | __raw_writel(cpu_to_le32(value), port); |
525 | #else | 541 | #else |
526 | __ixp4xx_writel(value, (u32)port); | 542 | __ixp4xx_writel(value, port); |
527 | #endif | 543 | #endif |
528 | } | 544 | } |
529 | 545 | ||
530 | static inline void | 546 | static inline void |
531 | __ixp4xx_iowrite32_rep(u32 port, u32 *vaddr, u32 count) | 547 | __ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count) |
532 | { | 548 | { |
549 | unsigned long port = (unsigned long __force)addr; | ||
533 | if (__is_io_address(port)) | 550 | if (__is_io_address(port)) |
534 | __ixp4xx_outsl(port, vaddr, count); | 551 | __ixp4xx_outsl(port & PIO_MASK, vaddr, count); |
552 | else | ||
535 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 553 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
536 | __raw_readsl((void __iomem *)port, vaddr, count); | 554 | __raw_writesl(addr, vaddr, count); |
537 | #else | 555 | #else |
538 | __ixp4xx_outsl(port, vaddr, count); | 556 | __ixp4xx_writesl(port, vaddr, count); |
539 | #endif | 557 | #endif |
540 | } | 558 | } |
541 | 559 | ||
@@ -555,7 +573,7 @@ __ixp4xx_iowrite32_rep(u32 port, u32 *vaddr, u32 count) | |||
555 | #define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c) | 573 | #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) | 574 | #define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c) |
557 | 575 | ||
558 | #define ioport_map(port, nr) ((void __iomem*)port) | 576 | #define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET)) |
559 | #define ioport_unmap(addr) | 577 | #define ioport_unmap(addr) |
560 | 578 | ||
561 | #endif // __ASM_ARM_ARCH_IO_H | 579 | #endif // __ASM_ARM_ARCH_IO_H |
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h index 3a626c03ea26..d13ee7f78c70 100644 --- a/include/asm-arm/arch-ixp4xx/platform.h +++ b/include/asm-arm/arch-ixp4xx/platform.h | |||
@@ -83,17 +83,6 @@ extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); | |||
83 | #define IXP4XX_GPIO_OUT 0x1 | 83 | #define IXP4XX_GPIO_OUT 0x1 |
84 | #define IXP4XX_GPIO_IN 0x2 | 84 | #define IXP4XX_GPIO_IN 0x2 |
85 | 85 | ||
86 | #define IXP4XX_GPIO_INTSTYLE_MASK 0x7C /* Bits [6:2] define interrupt style */ | ||
87 | |||
88 | /* | ||
89 | * GPIO interrupt types. | ||
90 | */ | ||
91 | #define IXP4XX_GPIO_ACTIVE_HIGH 0x4 /* Default */ | ||
92 | #define IXP4XX_GPIO_ACTIVE_LOW 0x8 | ||
93 | #define IXP4XX_GPIO_RISING_EDGE 0x10 | ||
94 | #define IXP4XX_GPIO_FALLING_EDGE 0x20 | ||
95 | #define IXP4XX_GPIO_TRANSITIONAL 0x40 | ||
96 | |||
97 | /* GPIO signal types */ | 86 | /* GPIO signal types */ |
98 | #define IXP4XX_GPIO_LOW 0 | 87 | #define IXP4XX_GPIO_LOW 0 |
99 | #define IXP4XX_GPIO_HIGH 1 | 88 | #define IXP4XX_GPIO_HIGH 1 |
@@ -102,7 +91,13 @@ extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); | |||
102 | #define IXP4XX_GPIO_CLK_0 14 | 91 | #define IXP4XX_GPIO_CLK_0 14 |
103 | #define IXP4XX_GPIO_CLK_1 15 | 92 | #define IXP4XX_GPIO_CLK_1 15 |
104 | 93 | ||
105 | extern void gpio_line_config(u8 line, u32 style); | 94 | static inline void gpio_line_config(u8 line, u32 direction) |
95 | { | ||
96 | if (direction == IXP4XX_GPIO_OUT) | ||
97 | *IXP4XX_GPIO_GPOER |= (1 << line); | ||
98 | else | ||
99 | *IXP4XX_GPIO_GPOER &= ~(1 << line); | ||
100 | } | ||
106 | 101 | ||
107 | static inline void gpio_line_get(u8 line, int *value) | 102 | static inline void gpio_line_get(u8 line, int *value) |
108 | { | 103 | { |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 51f0fe0ac165..939d9e5020a0 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -818,6 +818,23 @@ | |||
818 | #define UDCOTGICR_IEIDF (1 << 0) /* OTG ID Change Falling Edge | 818 | #define UDCOTGICR_IEIDF (1 << 0) /* OTG ID Change Falling Edge |
819 | Interrupt Enable */ | 819 | Interrupt Enable */ |
820 | 820 | ||
821 | #define UP2OCR __REG(0x40600020) /* USB Port 2 Output Control register */ | ||
822 | |||
823 | #define UP2OCR_CPVEN (1 << 0) /* Charge Pump Vbus Enable */ | ||
824 | #define UP2OCR_CPVPE (1 << 1) /* Charge Pump Vbus Pulse Enable */ | ||
825 | #define UP2OCR_DPPDE (1 << 2) /* Host Port 2 Transceiver D+ Pull Down Enable */ | ||
826 | #define UP2OCR_DMPDE (1 << 3) /* Host Port 2 Transceiver D- Pull Down Enable */ | ||
827 | #define UP2OCR_DPPUE (1 << 4) /* Host Port 2 Transceiver D+ Pull Up Enable */ | ||
828 | #define UP2OCR_DMPUE (1 << 5) /* Host Port 2 Transceiver D- Pull Up Enable */ | ||
829 | #define UP2OCR_DPPUBE (1 << 6) /* Host Port 2 Transceiver D+ Pull Up Bypass Enable */ | ||
830 | #define UP2OCR_DMPUBE (1 << 7) /* Host Port 2 Transceiver D- Pull Up Bypass Enable */ | ||
831 | #define UP2OCR_EXSP (1 << 8) /* External Transceiver Speed Control */ | ||
832 | #define UP2OCR_EXSUS (1 << 9) /* External Transceiver Speed Enable */ | ||
833 | #define UP2OCR_IDON (1 << 10) /* OTG ID Read Enable */ | ||
834 | #define UP2OCR_HXS (1 << 16) /* Host Port 2 Transceiver Output Select */ | ||
835 | #define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */ | ||
836 | #define UP2OCR_SEOS (1 << 24) /* Single-Ended Output Select */ | ||
837 | |||
821 | #define UDCCSN(x) __REG2(0x40600100, (x) << 2) | 838 | #define UDCCSN(x) __REG2(0x40600100, (x) << 2) |
822 | #define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */ | 839 | #define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */ |
823 | #define UDCCSR0_SA (1 << 7) /* Setup Active */ | 840 | #define UDCCSR0_SA (1 << 7) /* Setup Active */ |
@@ -1423,6 +1440,7 @@ | |||
1423 | #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) | 1440 | #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) |
1424 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) | 1441 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) |
1425 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) | 1442 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) |
1443 | #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) | ||
1426 | #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) | 1444 | #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) |
1427 | #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) | 1445 | #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) |
1428 | #define GPIO110_MMCCS0_MD (110 | GPIO_ALT_FN_1_OUT) | 1446 | #define GPIO110_MMCCS0_MD (110 | GPIO_ALT_FN_1_OUT) |
@@ -1510,6 +1528,8 @@ | |||
1510 | #define PSSR_BFS (1 << 1) /* Battery Fault Status */ | 1528 | #define PSSR_BFS (1 << 1) /* Battery Fault Status */ |
1511 | #define PSSR_SSS (1 << 0) /* Software Sleep Status */ | 1529 | #define PSSR_SSS (1 << 0) /* Software Sleep Status */ |
1512 | 1530 | ||
1531 | #define PSLR_SL_ROD (1 << 20) /* Sleep-Mode/Depp-Sleep Mode nRESET_OUT Disable */ | ||
1532 | |||
1513 | #define PCFR_RO (1 << 15) /* RDH Override */ | 1533 | #define PCFR_RO (1 << 15) /* RDH Override */ |
1514 | #define PCFR_PO (1 << 14) /* PH Override */ | 1534 | #define PCFR_PO (1 << 14) /* PH Override */ |
1515 | #define PCFR_GPROD (1 << 12) /* GPIO nRESET_OUT Disable */ | 1535 | #define PCFR_GPROD (1 << 12) /* GPIO nRESET_OUT Disable */ |
@@ -1517,6 +1537,7 @@ | |||
1517 | #define PCFR_FVC (1 << 10) /* Frequency/Voltage Change */ | 1537 | #define PCFR_FVC (1 << 10) /* Frequency/Voltage Change */ |
1518 | #define PCFR_DC_EN (1 << 7) /* Sleep/deep-sleep DC-DC Converter Enable */ | 1538 | #define PCFR_DC_EN (1 << 7) /* Sleep/deep-sleep DC-DC Converter Enable */ |
1519 | #define PCFR_PI2CEN (1 << 6) /* Enable PI2C controller */ | 1539 | #define PCFR_PI2CEN (1 << 6) /* Enable PI2C controller */ |
1540 | #define PCFR_GPR_EN (1 << 4) /* nRESET_GPIO Pin Enable */ | ||
1520 | #define PCFR_DS (1 << 3) /* Deep Sleep Mode */ | 1541 | #define PCFR_DS (1 << 3) /* Deep Sleep Mode */ |
1521 | #define PCFR_FS (1 << 2) /* Float Static Chip Selects */ | 1542 | #define PCFR_FS (1 << 2) /* Float Static Chip Selects */ |
1522 | #define PCFR_FP (1 << 1) /* Float PCMCIA controls */ | 1543 | #define PCFR_FP (1 << 1) /* Float PCMCIA controls */ |
@@ -1810,6 +1831,11 @@ | |||
1810 | #define LCCR0_PDD_S 12 | 1831 | #define LCCR0_PDD_S 12 |
1811 | #define LCCR0_BM (1 << 20) /* Branch mask */ | 1832 | #define LCCR0_BM (1 << 20) /* Branch mask */ |
1812 | #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ | 1833 | #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ |
1834 | #define LCCR0_LCDT (1 << 22) /* LCD panel type */ | ||
1835 | #define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ | ||
1836 | #define LCCR0_CMDIM (1 << 24) /* Command interrupt mask */ | ||
1837 | #define LCCR0_OUC (1 << 25) /* Overlay Underlay control bit */ | ||
1838 | #define LCCR0_LDDALT (1 << 26) /* LDD alternate mapping control */ | ||
1813 | 1839 | ||
1814 | #define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */ | 1840 | #define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */ |
1815 | #define LCCR1_DisWdth(Pixel) /* Display Width [1..800 pix.] */ \ | 1841 | #define LCCR1_DisWdth(Pixel) /* Display Width [1..800 pix.] */ \ |
@@ -2062,7 +2088,10 @@ | |||
2062 | #define UHCFMN __REG(0x4C00003C) /* UHC Frame Number */ | 2088 | #define UHCFMN __REG(0x4C00003C) /* UHC Frame Number */ |
2063 | #define UHCPERS __REG(0x4C000040) /* UHC Periodic Start */ | 2089 | #define UHCPERS __REG(0x4C000040) /* UHC Periodic Start */ |
2064 | #define UHCLS __REG(0x4C000044) /* UHC Low Speed Threshold */ | 2090 | #define UHCLS __REG(0x4C000044) /* UHC Low Speed Threshold */ |
2091 | |||
2065 | #define UHCRHDA __REG(0x4C000048) /* UHC Root Hub Descriptor A */ | 2092 | #define UHCRHDA __REG(0x4C000048) /* UHC Root Hub Descriptor A */ |
2093 | #define UHCRHDA_NOCP (1 << 12) /* No over current protection */ | ||
2094 | |||
2066 | #define UHCRHDB __REG(0x4C00004C) /* UHC Root Hub Descriptor B */ | 2095 | #define UHCRHDB __REG(0x4C00004C) /* UHC Root Hub Descriptor B */ |
2067 | #define UHCRHS __REG(0x4C000050) /* UHC Root Hub Status */ | 2096 | #define UHCRHS __REG(0x4C000050) /* UHC Root Hub Status */ |
2068 | #define UHCRHPS1 __REG(0x4C000054) /* UHC Root Hub Port 1 Status */ | 2097 | #define UHCRHPS1 __REG(0x4C000054) /* UHC Root Hub Port 1 Status */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index e5e938b79acc..16f4c3cc1388 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/regs-clock.h | 1 | /* linux/include/asm/arch-s3c2410/regs-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2003,2004 Simtec Electronics <linux@simtec.co.uk> | 3 | * Copyright (c) 2003,2004,2005 Simtec Electronics <linux@simtec.co.uk> |
4 | * http://www.simtec.co.uk/products/SWLINUX/ | 4 | * http://armlinux.simtec.co.uk/ |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -17,6 +17,7 @@ | |||
17 | * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion | 17 | * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion |
18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) | 18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) |
19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA | 19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA |
20 | * 27-Aug-2005 Ben Dooks Add clock-slow info | ||
20 | */ | 21 | */ |
21 | 22 | ||
22 | #ifndef __ASM_ARM_REGS_CLOCK | 23 | #ifndef __ASM_ARM_REGS_CLOCK |
@@ -74,6 +75,12 @@ | |||
74 | #define S3C2410_CLKDIVN_PDIVN (1<<0) | 75 | #define S3C2410_CLKDIVN_PDIVN (1<<0) |
75 | #define S3C2410_CLKDIVN_HDIVN (1<<1) | 76 | #define S3C2410_CLKDIVN_HDIVN (1<<1) |
76 | 77 | ||
78 | #define S3C2410_CLKSLOW_UCLK_OFF (1<<7) | ||
79 | #define S3C2410_CLKSLOW_MPLL_OFF (1<<5) | ||
80 | #define S3C2410_CLKSLOW_SLOW (1<<4) | ||
81 | #define S3C2410_CLKSLOW_SLOWVAL(x) (x) | ||
82 | #define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7) | ||
83 | |||
77 | #ifndef __ASSEMBLY__ | 84 | #ifndef __ASSEMBLY__ |
78 | 85 | ||
79 | static inline unsigned int | 86 | static inline unsigned int |
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h index a43a353f6c7b..0ce6ca588d8c 100644 --- a/include/asm-arm/mach/irq.h +++ b/include/asm-arm/mach/irq.h | |||
@@ -42,11 +42,11 @@ struct irqchip { | |||
42 | /* | 42 | /* |
43 | * Set the type of the IRQ. | 43 | * Set the type of the IRQ. |
44 | */ | 44 | */ |
45 | int (*type)(unsigned int, unsigned int); | 45 | int (*set_type)(unsigned int, unsigned int); |
46 | /* | 46 | /* |
47 | * Set wakeup-enable on the selected IRQ | 47 | * Set wakeup-enable on the selected IRQ |
48 | */ | 48 | */ |
49 | int (*wake)(unsigned int, unsigned int); | 49 | int (*set_wake)(unsigned int, unsigned int); |
50 | 50 | ||
51 | #ifdef CONFIG_SMP | 51 | #ifdef CONFIG_SMP |
52 | /* | 52 | /* |
@@ -92,6 +92,14 @@ struct irqdesc { | |||
92 | extern struct irqdesc irq_desc[]; | 92 | extern struct irqdesc irq_desc[]; |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Helpful inline function for calling irq descriptor handlers. | ||
96 | */ | ||
97 | static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | ||
98 | { | ||
99 | desc->handle(irq, desc, regs); | ||
100 | } | ||
101 | |||
102 | /* | ||
95 | * This is internal. Do not use it. | 103 | * This is internal. Do not use it. |
96 | */ | 104 | */ |
97 | extern void (*init_arch_irq)(void); | 105 | extern void (*init_arch_irq)(void); |
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 019c45d75730..4da1d532cbeb 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -163,20 +163,6 @@ typedef unsigned long pgprot_t; | |||
163 | /* the upper-most page table pointer */ | 163 | /* the upper-most page table pointer */ |
164 | extern pmd_t *top_pmd; | 164 | extern pmd_t *top_pmd; |
165 | 165 | ||
166 | /* Pure 2^n version of get_order */ | ||
167 | static inline int get_order(unsigned long size) | ||
168 | { | ||
169 | int order; | ||
170 | |||
171 | size = (size-1) >> (PAGE_SHIFT-1); | ||
172 | order = -1; | ||
173 | do { | ||
174 | size >>= 1; | ||
175 | order++; | ||
176 | } while (size); | ||
177 | return order; | ||
178 | } | ||
179 | |||
180 | #include <asm/memory.h> | 166 | #include <asm/memory.h> |
181 | 167 | ||
182 | #endif /* !__ASSEMBLY__ */ | 168 | #endif /* !__ASSEMBLY__ */ |
@@ -186,4 +172,6 @@ static inline int get_order(unsigned long size) | |||
186 | 172 | ||
187 | #endif /* __KERNEL__ */ | 173 | #endif /* __KERNEL__ */ |
188 | 174 | ||
175 | #include <asm-generic/page.h> | ||
176 | |||
189 | #endif | 177 | #endif |
diff --git a/include/asm-arm/types.h b/include/asm-arm/types.h index f4c92e4c8c02..22992ee0627a 100644 --- a/include/asm-arm/types.h +++ b/include/asm-arm/types.h | |||
@@ -52,8 +52,6 @@ typedef unsigned long long u64; | |||
52 | typedef u32 dma_addr_t; | 52 | typedef u32 dma_addr_t; |
53 | typedef u32 dma64_addr_t; | 53 | typedef u32 dma64_addr_t; |
54 | 54 | ||
55 | typedef unsigned int kmem_bufctl_t; | ||
56 | |||
57 | #endif /* __ASSEMBLY__ */ | 55 | #endif /* __ASSEMBLY__ */ |
58 | 56 | ||
59 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index abb36e54c966..278de61224d1 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -295,7 +295,7 @@ | |||
295 | #define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) | 295 | #define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) |
296 | #define __NR_tgkill (__NR_SYSCALL_BASE+268) | 296 | #define __NR_tgkill (__NR_SYSCALL_BASE+268) |
297 | #define __NR_utimes (__NR_SYSCALL_BASE+269) | 297 | #define __NR_utimes (__NR_SYSCALL_BASE+269) |
298 | #define __NR_fadvise64_64 (__NR_SYSCALL_BASE+270) | 298 | #define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270) |
299 | #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) | 299 | #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) |
300 | #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) | 300 | #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) |
301 | #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) | 301 | #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) |
@@ -515,7 +515,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 | |||
515 | #define __ARCH_WANT_SYS_TIME | 515 | #define __ARCH_WANT_SYS_TIME |
516 | #define __ARCH_WANT_SYS_UTIME | 516 | #define __ARCH_WANT_SYS_UTIME |
517 | #define __ARCH_WANT_SYS_SOCKETCALL | 517 | #define __ARCH_WANT_SYS_SOCKETCALL |
518 | #define __ARCH_WANT_SYS_FADVISE64 | ||
519 | #define __ARCH_WANT_SYS_GETPGRP | 518 | #define __ARCH_WANT_SYS_GETPGRP |
520 | #define __ARCH_WANT_SYS_LLSEEK | 519 | #define __ARCH_WANT_SYS_LLSEEK |
521 | #define __ARCH_WANT_SYS_NICE | 520 | #define __ARCH_WANT_SYS_NICE |
diff --git a/include/asm-arm26/page.h b/include/asm-arm26/page.h index c334079b082b..d3f23ac4d468 100644 --- a/include/asm-arm26/page.h +++ b/include/asm-arm26/page.h | |||
@@ -89,20 +89,6 @@ typedef unsigned long pgprot_t; | |||
89 | #ifdef __KERNEL__ | 89 | #ifdef __KERNEL__ |
90 | #ifndef __ASSEMBLY__ | 90 | #ifndef __ASSEMBLY__ |
91 | 91 | ||
92 | /* Pure 2^n version of get_order */ | ||
93 | static inline int get_order(unsigned long size) | ||
94 | { | ||
95 | int order; | ||
96 | |||
97 | size = (size-1) >> (PAGE_SHIFT-1); | ||
98 | order = -1; | ||
99 | do { | ||
100 | size >>= 1; | ||
101 | order++; | ||
102 | } while (size); | ||
103 | return order; | ||
104 | } | ||
105 | |||
106 | #include <asm/memory.h> | 92 | #include <asm/memory.h> |
107 | 93 | ||
108 | #endif /* !__ASSEMBLY__ */ | 94 | #endif /* !__ASSEMBLY__ */ |
@@ -112,4 +98,6 @@ static inline int get_order(unsigned long size) | |||
112 | 98 | ||
113 | #endif /* __KERNEL__ */ | 99 | #endif /* __KERNEL__ */ |
114 | 100 | ||
101 | #include <asm-generic/page.h> | ||
102 | |||
115 | #endif | 103 | #endif |
diff --git a/include/asm-arm26/types.h b/include/asm-arm26/types.h index 56cbe573a234..81bd357ada02 100644 --- a/include/asm-arm26/types.h +++ b/include/asm-arm26/types.h | |||
@@ -52,8 +52,6 @@ typedef unsigned long long u64; | |||
52 | typedef u32 dma_addr_t; | 52 | typedef u32 dma_addr_t; |
53 | typedef u32 dma64_addr_t; | 53 | typedef u32 dma64_addr_t; |
54 | 54 | ||
55 | typedef unsigned int kmem_bufctl_t; | ||
56 | |||
57 | #endif /* __ASSEMBLY__ */ | 55 | #endif /* __ASSEMBLY__ */ |
58 | 56 | ||
59 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index bbf17bd39385..c99c478c482f 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h | |||
@@ -70,19 +70,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
70 | 70 | ||
71 | #ifndef __ASSEMBLY__ | 71 | #ifndef __ASSEMBLY__ |
72 | 72 | ||
73 | /* Pure 2^n version of get_order */ | ||
74 | static inline int get_order(unsigned long size) | ||
75 | { | ||
76 | int order; | ||
77 | |||
78 | size = (size-1) >> (PAGE_SHIFT-1); | ||
79 | order = -1; | ||
80 | do { | ||
81 | size >>= 1; | ||
82 | order++; | ||
83 | } while (size); | ||
84 | return order; | ||
85 | } | ||
86 | #endif /* __ASSEMBLY__ */ | 73 | #endif /* __ASSEMBLY__ */ |
87 | 74 | ||
88 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 75 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
@@ -90,5 +77,7 @@ static inline int get_order(unsigned long size) | |||
90 | 77 | ||
91 | #endif /* __KERNEL__ */ | 78 | #endif /* __KERNEL__ */ |
92 | 79 | ||
80 | #include <asm-generic/page.h> | ||
81 | |||
93 | #endif /* _CRIS_PAGE_H */ | 82 | #endif /* _CRIS_PAGE_H */ |
94 | 83 | ||
diff --git a/include/asm-cris/types.h b/include/asm-cris/types.h index 8fa6d6c7afce..84557c9bac93 100644 --- a/include/asm-cris/types.h +++ b/include/asm-cris/types.h | |||
@@ -52,8 +52,6 @@ typedef unsigned long long u64; | |||
52 | typedef u32 dma_addr_t; | 52 | typedef u32 dma_addr_t; |
53 | typedef u32 dma64_addr_t; | 53 | typedef u32 dma64_addr_t; |
54 | 54 | ||
55 | typedef unsigned short kmem_bufctl_t; | ||
56 | |||
57 | #endif /* __ASSEMBLY__ */ | 55 | #endif /* __ASSEMBLY__ */ |
58 | 56 | ||
59 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h index f7914f1782b0..4feba567e7fd 100644 --- a/include/asm-frv/page.h +++ b/include/asm-frv/page.h | |||
@@ -45,21 +45,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
45 | /* to align the pointer to the (next) page boundary */ | 45 | /* to align the pointer to the (next) page boundary */ |
46 | #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) | 46 | #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) |
47 | 47 | ||
48 | /* Pure 2^n version of get_order */ | ||
49 | static inline int get_order(unsigned long size) __attribute_const__; | ||
50 | static inline int get_order(unsigned long size) | ||
51 | { | ||
52 | int order; | ||
53 | |||
54 | size = (size - 1) >> (PAGE_SHIFT - 1); | ||
55 | order = -1; | ||
56 | do { | ||
57 | size >>= 1; | ||
58 | order++; | ||
59 | } while (size); | ||
60 | return order; | ||
61 | } | ||
62 | |||
63 | #define devmem_is_allowed(pfn) 1 | 48 | #define devmem_is_allowed(pfn) 1 |
64 | 49 | ||
65 | #define __pa(vaddr) virt_to_phys((void *) vaddr) | 50 | #define __pa(vaddr) virt_to_phys((void *) vaddr) |
@@ -102,4 +87,6 @@ extern unsigned long max_pfn; | |||
102 | #define WANT_PAGE_VIRTUAL 1 | 87 | #define WANT_PAGE_VIRTUAL 1 |
103 | #endif | 88 | #endif |
104 | 89 | ||
90 | #include <asm-generic/page.h> | ||
91 | |||
105 | #endif /* _ASM_PAGE_H */ | 92 | #endif /* _ASM_PAGE_H */ |
diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h index 1a5b6546bb41..50605df6d8ac 100644 --- a/include/asm-frv/types.h +++ b/include/asm-frv/types.h | |||
@@ -65,8 +65,6 @@ typedef u64 u_quad_t; | |||
65 | 65 | ||
66 | typedef u32 dma_addr_t; | 66 | typedef u32 dma_addr_t; |
67 | 67 | ||
68 | typedef unsigned short kmem_bufctl_t; | ||
69 | |||
70 | #endif /* __ASSEMBLY__ */ | 68 | #endif /* __ASSEMBLY__ */ |
71 | 69 | ||
72 | #endif /* __KERNEL__ */ | 70 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h new file mode 100644 index 000000000000..a96b5d986b6e --- /dev/null +++ b/include/asm-generic/page.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef _ASM_GENERIC_PAGE_H | ||
2 | #define _ASM_GENERIC_PAGE_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | #ifndef __ASSEMBLY__ | ||
6 | |||
7 | #include <linux/compiler.h> | ||
8 | |||
9 | /* Pure 2^n version of get_order */ | ||
10 | static __inline__ __attribute_const__ int get_order(unsigned long size) | ||
11 | { | ||
12 | int order; | ||
13 | |||
14 | size = (size - 1) >> (PAGE_SHIFT - 1); | ||
15 | order = -1; | ||
16 | do { | ||
17 | size >>= 1; | ||
18 | order++; | ||
19 | } while (size); | ||
20 | return order; | ||
21 | } | ||
22 | |||
23 | #endif /* __ASSEMBLY__ */ | ||
24 | #endif /* __KERNEL__ */ | ||
25 | |||
26 | #endif /* _ASM_GENERIC_PAGE_H */ | ||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index f40593565173..f86c1e549466 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -101,6 +101,22 @@ do { \ | |||
101 | }) | 101 | }) |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | ||
105 | #define ptep_get_and_clear_full(__mm, __address, __ptep, __full) \ | ||
106 | ({ \ | ||
107 | pte_t __pte; \ | ||
108 | __pte = ptep_get_and_clear((__mm), (__address), (__ptep)); \ | ||
109 | __pte; \ | ||
110 | }) | ||
111 | #endif | ||
112 | |||
113 | #ifndef __HAVE_ARCH_PTE_CLEAR_FULL | ||
114 | #define pte_clear_full(__mm, __address, __ptep, __full) \ | ||
115 | do { \ | ||
116 | pte_clear((__mm), (__address), (__ptep)); \ | ||
117 | } while (0) | ||
118 | #endif | ||
119 | |||
104 | #ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH | 120 | #ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH |
105 | #define ptep_clear_flush(__vma, __address, __ptep) \ | 121 | #define ptep_clear_flush(__vma, __address, __ptep) \ |
106 | ({ \ | 122 | ({ \ |
diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h index e3b7960d445b..e8c02b8c2d99 100644 --- a/include/asm-h8300/page.h +++ b/include/asm-h8300/page.h | |||
@@ -54,20 +54,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
54 | /* to align the pointer to the (next) page boundary */ | 54 | /* to align the pointer to the (next) page boundary */ |
55 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 55 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
56 | 56 | ||
57 | /* Pure 2^n version of get_order */ | ||
58 | extern __inline__ int get_order(unsigned long size) | ||
59 | { | ||
60 | int order; | ||
61 | |||
62 | size = (size-1) >> (PAGE_SHIFT-1); | ||
63 | order = -1; | ||
64 | do { | ||
65 | size >>= 1; | ||
66 | order++; | ||
67 | } while (size); | ||
68 | return order; | ||
69 | } | ||
70 | |||
71 | extern unsigned long memory_start; | 57 | extern unsigned long memory_start; |
72 | extern unsigned long memory_end; | 58 | extern unsigned long memory_end; |
73 | 59 | ||
@@ -101,4 +87,6 @@ extern unsigned long memory_end; | |||
101 | 87 | ||
102 | #endif /* __KERNEL__ */ | 88 | #endif /* __KERNEL__ */ |
103 | 89 | ||
90 | #include <asm-generic/page.h> | ||
91 | |||
104 | #endif /* _H8300_PAGE_H */ | 92 | #endif /* _H8300_PAGE_H */ |
diff --git a/include/asm-h8300/types.h b/include/asm-h8300/types.h index 21f4fc07ac0e..bf91e0d4dde7 100644 --- a/include/asm-h8300/types.h +++ b/include/asm-h8300/types.h | |||
@@ -58,8 +58,6 @@ typedef u32 dma_addr_t; | |||
58 | #define HAVE_SECTOR_T | 58 | #define HAVE_SECTOR_T |
59 | typedef u64 sector_t; | 59 | typedef u64 sector_t; |
60 | 60 | ||
61 | typedef unsigned int kmem_bufctl_t; | ||
62 | |||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
64 | 62 | ||
65 | #endif /* __ASSEMBLY__ */ | 63 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-i386/agp.h b/include/asm-i386/agp.h index b82f5f3ab887..9075083bab76 100644 --- a/include/asm-i386/agp.h +++ b/include/asm-i386/agp.h | |||
@@ -19,7 +19,7 @@ int unmap_page_from_agp(struct page *page); | |||
19 | /* Could use CLFLUSH here if the cpu supports it. But then it would | 19 | /* Could use CLFLUSH here if the cpu supports it. But then it would |
20 | need to be called for each cacheline of the whole page so it may not be | 20 | need to be called for each cacheline of the whole page so it may not be |
21 | worth it. Would need a page for it. */ | 21 | worth it. Would need a page for it. */ |
22 | #define flush_agp_cache() asm volatile("wbinvd":::"memory") | 22 | #define flush_agp_cache() wbinvd() |
23 | 23 | ||
24 | /* Convert a physical address to an address suitable for the GART. */ | 24 | /* Convert a physical address to an address suitable for the GART. */ |
25 | #define phys_to_gart(x) (x) | 25 | #define phys_to_gart(x) (x) |
diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h index a96a8f48fbfc..03185cef8e0a 100644 --- a/include/asm-i386/apicdef.h +++ b/include/asm-i386/apicdef.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define GET_APIC_VERSION(x) ((x)&0xFF) | 16 | #define GET_APIC_VERSION(x) ((x)&0xFF) |
17 | #define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF) | 17 | #define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF) |
18 | #define APIC_INTEGRATED(x) ((x)&0xF0) | 18 | #define APIC_INTEGRATED(x) ((x)&0xF0) |
19 | #define APIC_XAPIC(x) ((x) >= 0x14) | ||
19 | #define APIC_TASKPRI 0x80 | 20 | #define APIC_TASKPRI 0x80 |
20 | #define APIC_TPRI_MASK 0xFF | 21 | #define APIC_TPRI_MASK 0xFF |
21 | #define APIC_ARBPRI 0x90 | 22 | #define APIC_ARBPRI 0x90 |
diff --git a/include/asm-i386/bugs.h b/include/asm-i386/bugs.h index 6789fc275da3..ea54540638d2 100644 --- a/include/asm-i386/bugs.h +++ b/include/asm-i386/bugs.h | |||
@@ -118,7 +118,10 @@ static void __init check_hlt(void) | |||
118 | printk("disabled\n"); | 118 | printk("disabled\n"); |
119 | return; | 119 | return; |
120 | } | 120 | } |
121 | __asm__ __volatile__("hlt ; hlt ; hlt ; hlt"); | 121 | halt(); |
122 | halt(); | ||
123 | halt(); | ||
124 | halt(); | ||
122 | printk("OK.\n"); | 125 | printk("OK.\n"); |
123 | } | 126 | } |
124 | 127 | ||
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 11e67811a990..6df1a53c190e 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -27,8 +27,18 @@ struct Xgt_desc_struct { | |||
27 | 27 | ||
28 | extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; | 28 | extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; |
29 | 29 | ||
30 | #define load_TR_desc() __asm__ __volatile__("ltr %%ax"::"a" (GDT_ENTRY_TSS*8)) | 30 | #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) |
31 | #define load_LDT_desc() __asm__ __volatile__("lldt %%ax"::"a" (GDT_ENTRY_LDT*8)) | 31 | #define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) |
32 | |||
33 | #define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr)) | ||
34 | #define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr)) | ||
35 | #define load_tr(tr) __asm__ __volatile("ltr %0"::"mr" (tr)) | ||
36 | #define load_ldt(ldt) __asm__ __volatile("lldt %0"::"mr" (ldt)) | ||
37 | |||
38 | #define store_gdt(dtr) __asm__ ("sgdt %0":"=m" (*dtr)) | ||
39 | #define store_idt(dtr) __asm__ ("sidt %0":"=m" (*dtr)) | ||
40 | #define store_tr(tr) __asm__ ("str %0":"=mr" (tr)) | ||
41 | #define store_ldt(ldt) __asm__ ("sldt %0":"=mr" (ldt)) | ||
32 | 42 | ||
33 | /* | 43 | /* |
34 | * This is the ldt that every process will get unless we need | 44 | * This is the ldt that every process will get unless we need |
@@ -39,14 +49,14 @@ extern void set_intr_gate(unsigned int irq, void * addr); | |||
39 | 49 | ||
40 | #define _set_tssldt_desc(n,addr,limit,type) \ | 50 | #define _set_tssldt_desc(n,addr,limit,type) \ |
41 | __asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ | 51 | __asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ |
42 | "movw %%ax,2(%2)\n\t" \ | 52 | "movw %w1,2(%2)\n\t" \ |
43 | "rorl $16,%%eax\n\t" \ | 53 | "rorl $16,%1\n\t" \ |
44 | "movb %%al,4(%2)\n\t" \ | 54 | "movb %b1,4(%2)\n\t" \ |
45 | "movb %4,5(%2)\n\t" \ | 55 | "movb %4,5(%2)\n\t" \ |
46 | "movb $0,6(%2)\n\t" \ | 56 | "movb $0,6(%2)\n\t" \ |
47 | "movb %%ah,7(%2)\n\t" \ | 57 | "movb %h1,7(%2)\n\t" \ |
48 | "rorl $16,%%eax" \ | 58 | "rorl $16,%1" \ |
49 | : "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type)) | 59 | : "=m"(*(n)) : "q" (addr), "r"(n), "ir"(limit), "i"(type)) |
50 | 60 | ||
51 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) | 61 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) |
52 | { | 62 | { |
@@ -86,6 +96,13 @@ static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) | |||
86 | (info)->seg_not_present == 1 && \ | 96 | (info)->seg_not_present == 1 && \ |
87 | (info)->useable == 0 ) | 97 | (info)->useable == 0 ) |
88 | 98 | ||
99 | static inline void write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b) | ||
100 | { | ||
101 | __u32 *lp = (__u32 *)((char *)ldt + entry*8); | ||
102 | *lp = entry_a; | ||
103 | *(lp+1) = entry_b; | ||
104 | } | ||
105 | |||
89 | #if TLS_SIZE != 24 | 106 | #if TLS_SIZE != 24 |
90 | # error update this code. | 107 | # error update this code. |
91 | #endif | 108 | #endif |
diff --git a/include/asm-i386/kdebug.h b/include/asm-i386/kdebug.h index b3f8d5f59d5d..316138e89910 100644 --- a/include/asm-i386/kdebug.h +++ b/include/asm-i386/kdebug.h | |||
@@ -41,9 +41,16 @@ enum die_val { | |||
41 | DIE_PAGE_FAULT, | 41 | DIE_PAGE_FAULT, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig) | 44 | static inline int notify_die(enum die_val val, const char *str, |
45 | struct pt_regs *regs, long err, int trap, int sig) | ||
45 | { | 46 | { |
46 | struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig }; | 47 | struct die_args args = { |
48 | .regs = regs, | ||
49 | .str = str, | ||
50 | .err = err, | ||
51 | .trapnr = trap, | ||
52 | .signr = sig | ||
53 | }; | ||
47 | return notifier_call_chain(&i386die_chain, val, &args); | 54 | return notifier_call_chain(&i386die_chain, val, &args); |
48 | } | 55 | } |
49 | 56 | ||
diff --git a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h index 85809e0898d7..28a84f6185a7 100644 --- a/include/asm-i386/mach-es7000/mach_mpparse.h +++ b/include/asm-i386/mach-es7000/mach_mpparse.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef __ASM_MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define __ASM_MACH_MPPARSE_H |
3 | 3 | ||
4 | #include <linux/acpi.h> | ||
5 | |||
4 | static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | 6 | static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, |
5 | struct mpc_config_translation *translation) | 7 | struct mpc_config_translation *translation) |
6 | { | 8 | { |
@@ -12,8 +14,9 @@ static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, | |||
12 | { | 14 | { |
13 | } | 15 | } |
14 | 16 | ||
15 | extern int parse_unisys_oem (char *oemptr, int oem_entries); | 17 | extern int parse_unisys_oem (char *oemptr); |
16 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length); | 18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); |
19 | extern void setup_unisys(); | ||
17 | 20 | ||
18 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | 21 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, |
19 | char *productid) | 22 | char *productid) |
@@ -22,18 +25,33 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
22 | struct mp_config_oemtable *oem_table = | 25 | struct mp_config_oemtable *oem_table = |
23 | (struct mp_config_oemtable *)mpc->mpc_oemptr; | 26 | (struct mp_config_oemtable *)mpc->mpc_oemptr; |
24 | if (!strncmp(oem, "UNISYS", 6)) | 27 | if (!strncmp(oem, "UNISYS", 6)) |
25 | return parse_unisys_oem((char *)oem_table, oem_table->oem_length); | 28 | return parse_unisys_oem((char *)oem_table); |
26 | } | 29 | } |
27 | return 0; | 30 | return 0; |
28 | } | 31 | } |
29 | 32 | ||
33 | static inline int es7000_check_dsdt() | ||
34 | { | ||
35 | struct acpi_table_header *header = NULL; | ||
36 | if(!acpi_get_table_header_early(ACPI_DSDT, &header)) | ||
37 | acpi_table_print(header, 0); | ||
38 | if (!strncmp(header->oem_id, "UNISYS", 6)) | ||
39 | return 1; | ||
40 | return 0; | ||
41 | } | ||
42 | |||
30 | /* Hook from generic ACPI tables.c */ | 43 | /* Hook from generic ACPI tables.c */ |
31 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 44 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
32 | { | 45 | { |
33 | unsigned long oem_addr; | 46 | unsigned long oem_addr; |
34 | int oem_entries; | 47 | if (!find_unisys_acpi_oem_table(&oem_addr)) { |
35 | if (!find_unisys_acpi_oem_table(&oem_addr, &oem_entries)) | 48 | if (es7000_check_dsdt()) |
36 | return parse_unisys_oem((char *)oem_addr, oem_entries); | 49 | return parse_unisys_oem((char *)oem_addr); |
50 | else { | ||
51 | setup_unisys(); | ||
52 | return 1; | ||
53 | } | ||
54 | } | ||
37 | return 0; | 55 | return 0; |
38 | } | 56 | } |
39 | 57 | ||
diff --git a/include/asm-i386/mach-generic/mach_apic.h b/include/asm-i386/mach-generic/mach_apic.h index b13767a4e934..d9dc039da94a 100644 --- a/include/asm-i386/mach-generic/mach_apic.h +++ b/include/asm-i386/mach-generic/mach_apic.h | |||
@@ -28,4 +28,6 @@ | |||
28 | #define enable_apic_mode (genapic->enable_apic_mode) | 28 | #define enable_apic_mode (genapic->enable_apic_mode) |
29 | #define phys_pkg_id (genapic->phys_pkg_id) | 29 | #define phys_pkg_id (genapic->phys_pkg_id) |
30 | 30 | ||
31 | extern void generic_bigsmp_probe(void); | ||
32 | |||
31 | #endif /* __ASM_MACH_APIC_H */ | 33 | #endif /* __ASM_MACH_APIC_H */ |
diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h index d9fafba075bc..d84a9c326c22 100644 --- a/include/asm-i386/mpspec.h +++ b/include/asm-i386/mpspec.h | |||
@@ -11,6 +11,7 @@ extern int mp_bus_id_to_local [MAX_MP_BUSSES]; | |||
11 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | 11 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; |
12 | extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; | 12 | extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; |
13 | 13 | ||
14 | extern unsigned int def_to_bigsmp; | ||
14 | extern unsigned int boot_cpu_physical_apicid; | 15 | extern unsigned int boot_cpu_physical_apicid; |
15 | extern int smp_found_config; | 16 | extern int smp_found_config; |
16 | extern void find_smp_config (void); | 17 | extern void find_smp_config (void); |
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index c76fce8badbb..62b76cd96957 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h | |||
@@ -47,6 +47,21 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val) | |||
47 | : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ | 47 | : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ |
48 | ret__; }) | 48 | ret__; }) |
49 | 49 | ||
50 | /* rdmsr with exception handling */ | ||
51 | #define rdmsr_safe(msr,a,b) ({ int ret__; \ | ||
52 | asm volatile("2: rdmsr ; xorl %0,%0\n" \ | ||
53 | "1:\n\t" \ | ||
54 | ".section .fixup,\"ax\"\n\t" \ | ||
55 | "3: movl %4,%0 ; jmp 1b\n\t" \ | ||
56 | ".previous\n\t" \ | ||
57 | ".section __ex_table,\"a\"\n" \ | ||
58 | " .align 4\n\t" \ | ||
59 | " .long 2b,3b\n\t" \ | ||
60 | ".previous" \ | ||
61 | : "=r" (ret__), "=a" (*(a)), "=d" (*(b)) \ | ||
62 | : "c" (msr), "i" (-EFAULT));\ | ||
63 | ret__; }) | ||
64 | |||
50 | #define rdtsc(low,high) \ | 65 | #define rdtsc(low,high) \ |
51 | __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) | 66 | __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) |
52 | 67 | ||
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 8d93f732d72d..73296d9924fb 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -68,7 +68,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
68 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 68 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
69 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 69 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
70 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA | 70 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA |
71 | #define ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
72 | #endif | 71 | #endif |
73 | 72 | ||
74 | #define pgd_val(x) ((x).pgd) | 73 | #define pgd_val(x) ((x).pgd) |
@@ -104,20 +103,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
104 | */ | 103 | */ |
105 | extern unsigned int __VMALLOC_RESERVE; | 104 | extern unsigned int __VMALLOC_RESERVE; |
106 | 105 | ||
107 | /* Pure 2^n version of get_order */ | ||
108 | static __inline__ int get_order(unsigned long size) | ||
109 | { | ||
110 | int order; | ||
111 | |||
112 | size = (size-1) >> (PAGE_SHIFT-1); | ||
113 | order = -1; | ||
114 | do { | ||
115 | size >>= 1; | ||
116 | order++; | ||
117 | } while (size); | ||
118 | return order; | ||
119 | } | ||
120 | |||
121 | extern int sysctl_legacy_va_layout; | 106 | extern int sysctl_legacy_va_layout; |
122 | 107 | ||
123 | extern int page_is_ram(unsigned long pagenr); | 108 | extern int page_is_ram(unsigned long pagenr); |
@@ -156,4 +141,6 @@ extern int page_is_ram(unsigned long pagenr); | |||
156 | 141 | ||
157 | #endif /* __KERNEL__ */ | 142 | #endif /* __KERNEL__ */ |
158 | 143 | ||
144 | #include <asm-generic/page.h> | ||
145 | |||
159 | #endif /* _I386_PAGE_H */ | 146 | #endif /* _I386_PAGE_H */ |
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index d609f9c2c1f0..2e3f4a344a2d 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -64,7 +64,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
64 | #define set_pmd(pmdptr,pmdval) \ | 64 | #define set_pmd(pmdptr,pmdval) \ |
65 | set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval)) | 65 | set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval)) |
66 | #define set_pud(pudptr,pudval) \ | 66 | #define set_pud(pudptr,pudval) \ |
67 | set_64bit((unsigned long long *)(pudptr),pud_val(pudval)) | 67 | (*(pudptr) = (pudval)) |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Pentium-II erratum A13: in PAE mode we explicitly have to flush | 70 | * Pentium-II erratum A13: in PAE mode we explicitly have to flush |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 77c6497f416e..47bc1ffa3d4c 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -86,9 +86,7 @@ void paging_init(void); | |||
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * The 4MB page is guessing.. Detailed in the infamous "Chapter H" | 89 | * _PAGE_PSE set in the page directory entry just means that |
90 | * of the Pentium details, but assuming intel did the straightforward | ||
91 | * thing, this bit set in the page directory entry just means that | ||
92 | * the page directory entry points directly to a 4MB-aligned block of | 90 | * the page directory entry points directly to a 4MB-aligned block of |
93 | * memory. | 91 | * memory. |
94 | */ | 92 | */ |
@@ -119,8 +117,10 @@ void paging_init(void); | |||
119 | #define _PAGE_UNUSED2 0x400 | 117 | #define _PAGE_UNUSED2 0x400 |
120 | #define _PAGE_UNUSED3 0x800 | 118 | #define _PAGE_UNUSED3 0x800 |
121 | 119 | ||
122 | #define _PAGE_FILE 0x040 /* set:pagecache unset:swap */ | 120 | /* If _PAGE_PRESENT is clear, we use these: */ |
123 | #define _PAGE_PROTNONE 0x080 /* If not present */ | 121 | #define _PAGE_FILE 0x040 /* nonlinear file mapping, saved PTE; unset:swap */ |
122 | #define _PAGE_PROTNONE 0x080 /* if the user mapped it with PROT_NONE; | ||
123 | pte_present gives true */ | ||
124 | #ifdef CONFIG_X86_PAE | 124 | #ifdef CONFIG_X86_PAE |
125 | #define _PAGE_NX (1ULL<<_PAGE_BIT_NX) | 125 | #define _PAGE_NX (1ULL<<_PAGE_BIT_NX) |
126 | #else | 126 | #else |
@@ -215,11 +215,13 @@ extern unsigned long pg0[]; | |||
215 | * The following only work if pte_present() is true. | 215 | * The following only work if pte_present() is true. |
216 | * Undefined behaviour if not.. | 216 | * Undefined behaviour if not.. |
217 | */ | 217 | */ |
218 | #define __LARGE_PTE (_PAGE_PSE | _PAGE_PRESENT) | ||
218 | static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | 219 | static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } |
219 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | 220 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } |
220 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } | 221 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } |
221 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } | 222 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } |
222 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } | 223 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } |
224 | static inline int pte_huge(pte_t pte) { return ((pte).pte_low & __LARGE_PTE) == __LARGE_PTE; } | ||
223 | 225 | ||
224 | /* | 226 | /* |
225 | * The following only works if pte_present() is not true. | 227 | * The following only works if pte_present() is not true. |
@@ -236,7 +238,7 @@ static inline pte_t pte_mkexec(pte_t pte) { (pte).pte_low |= _PAGE_USER; return | |||
236 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } | 238 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } |
237 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } | 239 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } |
238 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } | 240 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } |
239 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PRESENT | _PAGE_PSE; return pte; } | 241 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= __LARGE_PTE; return pte; } |
240 | 242 | ||
241 | #ifdef CONFIG_X86_PAE | 243 | #ifdef CONFIG_X86_PAE |
242 | # include <asm/pgtable-3level.h> | 244 | # include <asm/pgtable-3level.h> |
@@ -258,12 +260,39 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned | |||
258 | return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low); | 260 | return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low); |
259 | } | 261 | } |
260 | 262 | ||
263 | static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) | ||
264 | { | ||
265 | pte_t pte; | ||
266 | if (full) { | ||
267 | pte = *ptep; | ||
268 | *ptep = __pte(0); | ||
269 | } else { | ||
270 | pte = ptep_get_and_clear(mm, addr, ptep); | ||
271 | } | ||
272 | return pte; | ||
273 | } | ||
274 | |||
261 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 275 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
262 | { | 276 | { |
263 | clear_bit(_PAGE_BIT_RW, &ptep->pte_low); | 277 | clear_bit(_PAGE_BIT_RW, &ptep->pte_low); |
264 | } | 278 | } |
265 | 279 | ||
266 | /* | 280 | /* |
281 | * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); | ||
282 | * | ||
283 | * dst - pointer to pgd range anwhere on a pgd page | ||
284 | * src - "" | ||
285 | * count - the number of pgds to copy. | ||
286 | * | ||
287 | * dst and src can be on the same page, but the range must not overlap, | ||
288 | * and must not cross a page boundary. | ||
289 | */ | ||
290 | static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | ||
291 | { | ||
292 | memcpy(dst, src, count * sizeof(pgd_t)); | ||
293 | } | ||
294 | |||
295 | /* | ||
267 | * Macro to mark a page protection value as "uncacheable". On processors which do not support | 296 | * Macro to mark a page protection value as "uncacheable". On processors which do not support |
268 | * it, this is a no-op. | 297 | * it, this is a no-op. |
269 | */ | 298 | */ |
@@ -415,6 +444,7 @@ extern void noexec_setup(const char *str); | |||
415 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 444 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
416 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY | 445 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY |
417 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 446 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
447 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | ||
418 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT | 448 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT |
419 | #define __HAVE_ARCH_PTE_SAME | 449 | #define __HAVE_ARCH_PTE_SAME |
420 | #include <asm-generic/pgtable.h> | 450 | #include <asm-generic/pgtable.h> |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index d0d8b0160090..37bef8ed7bed 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -203,9 +203,7 @@ static inline unsigned int cpuid_edx(unsigned int op) | |||
203 | return edx; | 203 | return edx; |
204 | } | 204 | } |
205 | 205 | ||
206 | #define load_cr3(pgdir) \ | 206 | #define load_cr3(pgdir) write_cr3(__pa(pgdir)) |
207 | asm volatile("movl %0,%%cr3": :"r" (__pa(pgdir))) | ||
208 | |||
209 | 207 | ||
210 | /* | 208 | /* |
211 | * Intel CPU features in CR4 | 209 | * Intel CPU features in CR4 |
@@ -232,22 +230,20 @@ extern unsigned long mmu_cr4_features; | |||
232 | 230 | ||
233 | static inline void set_in_cr4 (unsigned long mask) | 231 | static inline void set_in_cr4 (unsigned long mask) |
234 | { | 232 | { |
233 | unsigned cr4; | ||
235 | mmu_cr4_features |= mask; | 234 | mmu_cr4_features |= mask; |
236 | __asm__("movl %%cr4,%%eax\n\t" | 235 | cr4 = read_cr4(); |
237 | "orl %0,%%eax\n\t" | 236 | cr4 |= mask; |
238 | "movl %%eax,%%cr4\n" | 237 | write_cr4(cr4); |
239 | : : "irg" (mask) | ||
240 | :"ax"); | ||
241 | } | 238 | } |
242 | 239 | ||
243 | static inline void clear_in_cr4 (unsigned long mask) | 240 | static inline void clear_in_cr4 (unsigned long mask) |
244 | { | 241 | { |
242 | unsigned cr4; | ||
245 | mmu_cr4_features &= ~mask; | 243 | mmu_cr4_features &= ~mask; |
246 | __asm__("movl %%cr4,%%eax\n\t" | 244 | cr4 = read_cr4(); |
247 | "andl %0,%%eax\n\t" | 245 | cr4 &= ~mask; |
248 | "movl %%eax,%%cr4\n" | 246 | write_cr4(cr4); |
249 | : : "irg" (~mask) | ||
250 | :"ax"); | ||
251 | } | 247 | } |
252 | 248 | ||
253 | /* | 249 | /* |
@@ -281,6 +277,11 @@ static inline void clear_in_cr4 (unsigned long mask) | |||
281 | outb((data), 0x23); \ | 277 | outb((data), 0x23); \ |
282 | } while (0) | 278 | } while (0) |
283 | 279 | ||
280 | static inline void serialize_cpu(void) | ||
281 | { | ||
282 | __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); | ||
283 | } | ||
284 | |||
284 | static inline void __monitor(const void *eax, unsigned long ecx, | 285 | static inline void __monitor(const void *eax, unsigned long ecx, |
285 | unsigned long edx) | 286 | unsigned long edx) |
286 | { | 287 | { |
@@ -454,6 +455,7 @@ struct thread_struct { | |||
454 | unsigned int saved_fs, saved_gs; | 455 | unsigned int saved_fs, saved_gs; |
455 | /* IO permissions */ | 456 | /* IO permissions */ |
456 | unsigned long *io_bitmap_ptr; | 457 | unsigned long *io_bitmap_ptr; |
458 | unsigned long iopl; | ||
457 | /* max allowed port in the bitmap, in bytes: */ | 459 | /* max allowed port in the bitmap, in bytes: */ |
458 | unsigned long io_bitmap_max; | 460 | unsigned long io_bitmap_max; |
459 | }; | 461 | }; |
@@ -474,7 +476,6 @@ struct thread_struct { | |||
474 | .esp0 = sizeof(init_stack) + (long)&init_stack, \ | 476 | .esp0 = sizeof(init_stack) + (long)&init_stack, \ |
475 | .ss0 = __KERNEL_DS, \ | 477 | .ss0 = __KERNEL_DS, \ |
476 | .ss1 = __KERNEL_CS, \ | 478 | .ss1 = __KERNEL_CS, \ |
477 | .ldt = GDT_ENTRY_LDT, \ | ||
478 | .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \ | 479 | .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \ |
479 | .io_bitmap = { [ 0 ... IO_BITMAP_LONGS] = ~0 }, \ | 480 | .io_bitmap = { [ 0 ... IO_BITMAP_LONGS] = ~0 }, \ |
480 | } | 481 | } |
@@ -511,6 +512,21 @@ static inline void load_esp0(struct tss_struct *tss, struct thread_struct *threa | |||
511 | : /* no output */ \ | 512 | : /* no output */ \ |
512 | :"r" (value)) | 513 | :"r" (value)) |
513 | 514 | ||
515 | /* | ||
516 | * Set IOPL bits in EFLAGS from given mask | ||
517 | */ | ||
518 | static inline void set_iopl_mask(unsigned mask) | ||
519 | { | ||
520 | unsigned int reg; | ||
521 | __asm__ __volatile__ ("pushfl;" | ||
522 | "popl %0;" | ||
523 | "andl %1, %0;" | ||
524 | "orl %2, %0;" | ||
525 | "pushl %0;" | ||
526 | "popfl" | ||
527 | : "=&r" (reg) | ||
528 | : "i" (~X86_EFLAGS_IOPL), "r" (mask)); | ||
529 | } | ||
514 | 530 | ||
515 | /* Forward declaration, a strange C thing */ | 531 | /* Forward declaration, a strange C thing */ |
516 | struct task_struct; | 532 | struct task_struct; |
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h index 05532875e39e..7e0f2945d17d 100644 --- a/include/asm-i386/ptrace.h +++ b/include/asm-i386/ptrace.h | |||
@@ -61,6 +61,13 @@ struct pt_regs { | |||
61 | struct task_struct; | 61 | struct task_struct; |
62 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); | 62 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); |
63 | 63 | ||
64 | /* | ||
65 | * user_mode_vm(regs) determines whether a register set came from user mode. | ||
66 | * This is true if V8086 mode was enabled OR if the register set was from | ||
67 | * protected mode with RPL-3 CS value. This tricky test checks that with | ||
68 | * one comparison. Many places in the kernel can bypass this full check | ||
69 | * if they have already ruled out V8086 mode, so user_mode(regs) can be used. | ||
70 | */ | ||
64 | static inline int user_mode(struct pt_regs *regs) | 71 | static inline int user_mode(struct pt_regs *regs) |
65 | { | 72 | { |
66 | return (regs->xcs & 3) != 0; | 73 | return (regs->xcs & 3) != 0; |
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 7a32184d54bf..826a8ca50ac8 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h | |||
@@ -44,7 +44,7 @@ extern unsigned char boot_params[PARAM_SIZE]; | |||
44 | #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) | 44 | #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) |
45 | #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) | 45 | #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) |
46 | #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) | 46 | #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) |
47 | #define EFI_MEMMAP ((efi_memory_desc_t *) *((unsigned long *)(PARAM+0x1d0))) | 47 | #define EFI_MEMMAP ((void *) *((unsigned long *)(PARAM+0x1d0))) |
48 | #define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4))) | 48 | #define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4))) |
49 | #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) | 49 | #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) |
50 | #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) | 50 | #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) |
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index a283738b80b3..13250199976d 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h | |||
@@ -59,7 +59,7 @@ extern void cpu_uninit(void); | |||
59 | 59 | ||
60 | extern cpumask_t cpu_callout_map; | 60 | extern cpumask_t cpu_callout_map; |
61 | extern cpumask_t cpu_callin_map; | 61 | extern cpumask_t cpu_callin_map; |
62 | #define cpu_possible_map cpu_callout_map | 62 | extern cpumask_t cpu_possible_map; |
63 | 63 | ||
64 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ | 64 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ |
65 | static inline int num_booting_cpus(void) | 65 | static inline int num_booting_cpus(void) |
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 3db717a244f0..acd5c26b69ba 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -14,8 +14,7 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc | |||
14 | 14 | ||
15 | #define switch_to(prev,next,last) do { \ | 15 | #define switch_to(prev,next,last) do { \ |
16 | unsigned long esi,edi; \ | 16 | unsigned long esi,edi; \ |
17 | asm volatile("pushfl\n\t" \ | 17 | asm volatile("pushl %%ebp\n\t" \ |
18 | "pushl %%ebp\n\t" \ | ||
19 | "movl %%esp,%0\n\t" /* save ESP */ \ | 18 | "movl %%esp,%0\n\t" /* save ESP */ \ |
20 | "movl %5,%%esp\n\t" /* restore ESP */ \ | 19 | "movl %5,%%esp\n\t" /* restore ESP */ \ |
21 | "movl $1f,%1\n\t" /* save EIP */ \ | 20 | "movl $1f,%1\n\t" /* save EIP */ \ |
@@ -23,7 +22,6 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc | |||
23 | "jmp __switch_to\n" \ | 22 | "jmp __switch_to\n" \ |
24 | "1:\t" \ | 23 | "1:\t" \ |
25 | "popl %%ebp\n\t" \ | 24 | "popl %%ebp\n\t" \ |
26 | "popfl" \ | ||
27 | :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ | 25 | :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ |
28 | "=a" (last),"=S" (esi),"=D" (edi) \ | 26 | "=a" (last),"=S" (esi),"=D" (edi) \ |
29 | :"m" (next->thread.esp),"m" (next->thread.eip), \ | 27 | :"m" (next->thread.esp),"m" (next->thread.eip), \ |
@@ -93,13 +91,13 @@ static inline unsigned long _get_base(char * addr) | |||
93 | ".align 4\n\t" \ | 91 | ".align 4\n\t" \ |
94 | ".long 1b,3b\n" \ | 92 | ".long 1b,3b\n" \ |
95 | ".previous" \ | 93 | ".previous" \ |
96 | : :"m" (value)) | 94 | : :"rm" (value)) |
97 | 95 | ||
98 | /* | 96 | /* |
99 | * Save a segment register away | 97 | * Save a segment register away |
100 | */ | 98 | */ |
101 | #define savesegment(seg, value) \ | 99 | #define savesegment(seg, value) \ |
102 | asm volatile("mov %%" #seg ",%0":"=m" (value)) | 100 | asm volatile("mov %%" #seg ",%0":"=rm" (value)) |
103 | 101 | ||
104 | /* | 102 | /* |
105 | * Clear and set 'TS' bit respectively | 103 | * Clear and set 'TS' bit respectively |
@@ -107,13 +105,33 @@ static inline unsigned long _get_base(char * addr) | |||
107 | #define clts() __asm__ __volatile__ ("clts") | 105 | #define clts() __asm__ __volatile__ ("clts") |
108 | #define read_cr0() ({ \ | 106 | #define read_cr0() ({ \ |
109 | unsigned int __dummy; \ | 107 | unsigned int __dummy; \ |
110 | __asm__( \ | 108 | __asm__ __volatile__( \ |
111 | "movl %%cr0,%0\n\t" \ | 109 | "movl %%cr0,%0\n\t" \ |
112 | :"=r" (__dummy)); \ | 110 | :"=r" (__dummy)); \ |
113 | __dummy; \ | 111 | __dummy; \ |
114 | }) | 112 | }) |
115 | #define write_cr0(x) \ | 113 | #define write_cr0(x) \ |
116 | __asm__("movl %0,%%cr0": :"r" (x)); | 114 | __asm__ __volatile__("movl %0,%%cr0": :"r" (x)); |
115 | |||
116 | #define read_cr2() ({ \ | ||
117 | unsigned int __dummy; \ | ||
118 | __asm__ __volatile__( \ | ||
119 | "movl %%cr2,%0\n\t" \ | ||
120 | :"=r" (__dummy)); \ | ||
121 | __dummy; \ | ||
122 | }) | ||
123 | #define write_cr2(x) \ | ||
124 | __asm__ __volatile__("movl %0,%%cr2": :"r" (x)); | ||
125 | |||
126 | #define read_cr3() ({ \ | ||
127 | unsigned int __dummy; \ | ||
128 | __asm__ ( \ | ||
129 | "movl %%cr3,%0\n\t" \ | ||
130 | :"=r" (__dummy)); \ | ||
131 | __dummy; \ | ||
132 | }) | ||
133 | #define write_cr3(x) \ | ||
134 | __asm__ __volatile__("movl %0,%%cr3": :"r" (x)); | ||
117 | 135 | ||
118 | #define read_cr4() ({ \ | 136 | #define read_cr4() ({ \ |
119 | unsigned int __dummy; \ | 137 | unsigned int __dummy; \ |
@@ -123,7 +141,7 @@ static inline unsigned long _get_base(char * addr) | |||
123 | __dummy; \ | 141 | __dummy; \ |
124 | }) | 142 | }) |
125 | #define write_cr4(x) \ | 143 | #define write_cr4(x) \ |
126 | __asm__("movl %0,%%cr4": :"r" (x)); | 144 | __asm__ __volatile__("movl %0,%%cr4": :"r" (x)); |
127 | #define stts() write_cr0(8 | read_cr0()) | 145 | #define stts() write_cr0(8 | read_cr0()) |
128 | 146 | ||
129 | #endif /* __KERNEL__ */ | 147 | #endif /* __KERNEL__ */ |
@@ -447,6 +465,8 @@ struct alt_instr { | |||
447 | #define local_irq_enable() __asm__ __volatile__("sti": : :"memory") | 465 | #define local_irq_enable() __asm__ __volatile__("sti": : :"memory") |
448 | /* used in the idle loop; sti takes one instruction cycle to complete */ | 466 | /* used in the idle loop; sti takes one instruction cycle to complete */ |
449 | #define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") | 467 | #define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") |
468 | /* used when interrupts are already enabled or to shutdown the processor */ | ||
469 | #define halt() __asm__ __volatile__("hlt": : :"memory") | ||
450 | 470 | ||
451 | #define irqs_disabled() \ | 471 | #define irqs_disabled() \ |
452 | ({ \ | 472 | ({ \ |
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 95add81237ea..e2cb9fa6f563 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -139,6 +139,7 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
139 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 139 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
140 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 140 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ |
141 | #define TIF_IRET 5 /* return with iret */ | 141 | #define TIF_IRET 5 /* return with iret */ |
142 | #define TIF_SYSCALL_EMU 6 /* syscall emulation active */ | ||
142 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 143 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
143 | #define TIF_SECCOMP 8 /* secure computing */ | 144 | #define TIF_SECCOMP 8 /* secure computing */ |
144 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 145 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
@@ -150,13 +151,15 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
150 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 151 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
151 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 152 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
152 | #define _TIF_IRET (1<<TIF_IRET) | 153 | #define _TIF_IRET (1<<TIF_IRET) |
154 | #define _TIF_SYSCALL_EMU (1<<TIF_SYSCALL_EMU) | ||
153 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 155 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
154 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 156 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
155 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 157 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
156 | 158 | ||
157 | /* work to do on interrupt/exception return */ | 159 | /* work to do on interrupt/exception return */ |
158 | #define _TIF_WORK_MASK \ | 160 | #define _TIF_WORK_MASK \ |
159 | (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|_TIF_SECCOMP)) | 161 | (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|\ |
162 | _TIF_SECCOMP|_TIF_SYSCALL_EMU)) | ||
160 | /* work to do on any return to u-space */ | 163 | /* work to do on any return to u-space */ |
161 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) | 164 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) |
162 | 165 | ||
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index dcf1e07db08a..aed16437479d 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASMi386_TIMER_H | 1 | #ifndef _ASMi386_TIMER_H |
2 | #define _ASMi386_TIMER_H | 2 | #define _ASMi386_TIMER_H |
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/pm.h> | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * struct timer_ops - used to define a timer source | 7 | * struct timer_ops - used to define a timer source |
@@ -23,6 +24,8 @@ struct timer_opts { | |||
23 | unsigned long long (*monotonic_clock)(void); | 24 | unsigned long long (*monotonic_clock)(void); |
24 | void (*delay)(unsigned long); | 25 | void (*delay)(unsigned long); |
25 | unsigned long (*read_timer)(void); | 26 | unsigned long (*read_timer)(void); |
27 | int (*suspend)(pm_message_t state); | ||
28 | int (*resume)(void); | ||
26 | }; | 29 | }; |
27 | 30 | ||
28 | struct init_timer_opts { | 31 | struct init_timer_opts { |
diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h index 901b77c42b8a..ced00fe8fe61 100644 --- a/include/asm-i386/types.h +++ b/include/asm-i386/types.h | |||
@@ -63,8 +63,6 @@ typedef u64 sector_t; | |||
63 | #define HAVE_SECTOR_T | 63 | #define HAVE_SECTOR_T |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | typedef unsigned short kmem_bufctl_t; | ||
67 | |||
68 | #endif /* __ASSEMBLY__ */ | 66 | #endif /* __ASSEMBLY__ */ |
69 | 67 | ||
70 | #endif /* __KERNEL__ */ | 68 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-i386/xor.h b/include/asm-i386/xor.h index f80e2dbe1b56..23c86cef3b25 100644 --- a/include/asm-i386/xor.h +++ b/include/asm-i386/xor.h | |||
@@ -535,14 +535,14 @@ static struct xor_block_template xor_block_p5_mmx = { | |||
535 | 535 | ||
536 | #define XMMS_SAVE do { \ | 536 | #define XMMS_SAVE do { \ |
537 | preempt_disable(); \ | 537 | preempt_disable(); \ |
538 | cr0 = read_cr0(); \ | ||
539 | clts(); \ | ||
538 | __asm__ __volatile__ ( \ | 540 | __asm__ __volatile__ ( \ |
539 | "movl %%cr0,%0 ;\n\t" \ | 541 | "movups %%xmm0,(%0) ;\n\t" \ |
540 | "clts ;\n\t" \ | 542 | "movups %%xmm1,0x10(%0) ;\n\t" \ |
541 | "movups %%xmm0,(%1) ;\n\t" \ | 543 | "movups %%xmm2,0x20(%0) ;\n\t" \ |
542 | "movups %%xmm1,0x10(%1) ;\n\t" \ | 544 | "movups %%xmm3,0x30(%0) ;\n\t" \ |
543 | "movups %%xmm2,0x20(%1) ;\n\t" \ | 545 | : \ |
544 | "movups %%xmm3,0x30(%1) ;\n\t" \ | ||
545 | : "=&r" (cr0) \ | ||
546 | : "r" (xmm_save) \ | 546 | : "r" (xmm_save) \ |
547 | : "memory"); \ | 547 | : "memory"); \ |
548 | } while(0) | 548 | } while(0) |
@@ -550,14 +550,14 @@ static struct xor_block_template xor_block_p5_mmx = { | |||
550 | #define XMMS_RESTORE do { \ | 550 | #define XMMS_RESTORE do { \ |
551 | __asm__ __volatile__ ( \ | 551 | __asm__ __volatile__ ( \ |
552 | "sfence ;\n\t" \ | 552 | "sfence ;\n\t" \ |
553 | "movups (%1),%%xmm0 ;\n\t" \ | 553 | "movups (%0),%%xmm0 ;\n\t" \ |
554 | "movups 0x10(%1),%%xmm1 ;\n\t" \ | 554 | "movups 0x10(%0),%%xmm1 ;\n\t" \ |
555 | "movups 0x20(%1),%%xmm2 ;\n\t" \ | 555 | "movups 0x20(%0),%%xmm2 ;\n\t" \ |
556 | "movups 0x30(%1),%%xmm3 ;\n\t" \ | 556 | "movups 0x30(%0),%%xmm3 ;\n\t" \ |
557 | "movl %0,%%cr0 ;\n\t" \ | ||
558 | : \ | 557 | : \ |
559 | : "r" (cr0), "r" (xmm_save) \ | 558 | : "r" (xmm_save) \ |
560 | : "memory"); \ | 559 | : "memory"); \ |
560 | write_cr0(cr0); \ | ||
561 | preempt_enable(); \ | 561 | preempt_enable(); \ |
562 | } while(0) | 562 | } while(0) |
563 | 563 | ||
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 4c06d455139c..3a544ffc5008 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -116,6 +116,11 @@ extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; | |||
116 | 116 | ||
117 | extern u16 ia64_acpiid_to_sapicid[]; | 117 | extern u16 ia64_acpiid_to_sapicid[]; |
118 | 118 | ||
119 | /* | ||
120 | * Refer Intel ACPI _PDC support document for bit definitions | ||
121 | */ | ||
122 | #define ACPI_PDC_EST_CAPABILITY_SMP 0x8 | ||
123 | |||
119 | #endif /*__KERNEL__*/ | 124 | #endif /*__KERNEL__*/ |
120 | 125 | ||
121 | #endif /*_ASM_ACPI_H*/ | 126 | #endif /*_ASM_ACPI_H*/ |
diff --git a/include/asm-ia64/fcntl.h b/include/asm-ia64/fcntl.h index c9f8d835d0cc..cee16ea1780a 100644 --- a/include/asm-ia64/fcntl.h +++ b/include/asm-ia64/fcntl.h | |||
@@ -81,6 +81,7 @@ struct flock { | |||
81 | 81 | ||
82 | #define F_LINUX_SPECIFIC_BASE 1024 | 82 | #define F_LINUX_SPECIFIC_BASE 1024 |
83 | 83 | ||
84 | #define force_o_largefile() ( ! (current->personality & PER_LINUX32) ) | 84 | #define force_o_largefile() \ |
85 | (personality(current->personality) != PER_LINUX32) | ||
85 | 86 | ||
86 | #endif /* _ASM_IA64_FCNTL_H */ | 87 | #endif /* _ASM_IA64_FCNTL_H */ |
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index 54e7637a326c..cf772a67f858 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define __SLOW_DOWN_IO do { } while (0) | 23 | #define __SLOW_DOWN_IO do { } while (0) |
24 | #define SLOW_DOWN_IO do { } while (0) | 24 | #define SLOW_DOWN_IO do { } while (0) |
25 | 25 | ||
26 | #define __IA64_UNCACHED_OFFSET 0xc000000000000000UL /* region 6 */ | 26 | #define __IA64_UNCACHED_OFFSET RGN_BASE(RGN_UNCACHED) |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * The legacy I/O space defined by the ia64 architecture supports only 65536 ports, but | 29 | * The legacy I/O space defined by the ia64 architecture supports only 65536 ports, but |
@@ -41,7 +41,7 @@ | |||
41 | #define IO_SPACE_BASE(space) ((space) << IO_SPACE_BITS) | 41 | #define IO_SPACE_BASE(space) ((space) << IO_SPACE_BITS) |
42 | #define IO_SPACE_PORT(port) ((port) & (IO_SPACE_SIZE - 1)) | 42 | #define IO_SPACE_PORT(port) ((port) & (IO_SPACE_SIZE - 1)) |
43 | 43 | ||
44 | #define IO_SPACE_SPARSE_ENCODING(p) ((((p) >> 2) << 12) | (p & 0xfff)) | 44 | #define IO_SPACE_SPARSE_ENCODING(p) ((((p) >> 2) << 12) | ((p) & 0xfff)) |
45 | 45 | ||
46 | struct io_space { | 46 | struct io_space { |
47 | unsigned long mmio_base; /* base in MMIO space */ | 47 | unsigned long mmio_base; /* base in MMIO space */ |
diff --git a/include/asm-ia64/mmu.h b/include/asm-ia64/mmu.h index ae1525352a25..611432ba579c 100644 --- a/include/asm-ia64/mmu.h +++ b/include/asm-ia64/mmu.h | |||
@@ -2,10 +2,12 @@ | |||
2 | #define __MMU_H | 2 | #define __MMU_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Type for a context number. We declare it volatile to ensure proper ordering when it's | 5 | * Type for a context number. We declare it volatile to ensure proper |
6 | * accessed outside of spinlock'd critical sections (e.g., as done in activate_mm() and | 6 | * ordering when it's accessed outside of spinlock'd critical sections |
7 | * init_new_context()). | 7 | * (e.g., as done in activate_mm() and init_new_context()). |
8 | */ | 8 | */ |
9 | typedef volatile unsigned long mm_context_t; | 9 | typedef volatile unsigned long mm_context_t; |
10 | 10 | ||
11 | typedef unsigned long nv_mm_context_t; | ||
12 | |||
11 | #endif | 13 | #endif |
diff --git a/include/asm-ia64/mmu_context.h b/include/asm-ia64/mmu_context.h index e3e5fededb04..8d6e72f7b08e 100644 --- a/include/asm-ia64/mmu_context.h +++ b/include/asm-ia64/mmu_context.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #define ia64_rid(ctx,addr) (((ctx) << 3) | (addr >> 61)) | 20 | #define ia64_rid(ctx,addr) (((ctx) << 3) | (addr >> 61)) |
21 | 21 | ||
22 | # include <asm/page.h> | ||
22 | # ifndef __ASSEMBLY__ | 23 | # ifndef __ASSEMBLY__ |
23 | 24 | ||
24 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
@@ -55,34 +56,46 @@ static inline void | |||
55 | delayed_tlb_flush (void) | 56 | delayed_tlb_flush (void) |
56 | { | 57 | { |
57 | extern void local_flush_tlb_all (void); | 58 | extern void local_flush_tlb_all (void); |
59 | unsigned long flags; | ||
58 | 60 | ||
59 | if (unlikely(__ia64_per_cpu_var(ia64_need_tlb_flush))) { | 61 | if (unlikely(__ia64_per_cpu_var(ia64_need_tlb_flush))) { |
60 | local_flush_tlb_all(); | 62 | spin_lock_irqsave(&ia64_ctx.lock, flags); |
61 | __ia64_per_cpu_var(ia64_need_tlb_flush) = 0; | 63 | { |
64 | if (__ia64_per_cpu_var(ia64_need_tlb_flush)) { | ||
65 | local_flush_tlb_all(); | ||
66 | __ia64_per_cpu_var(ia64_need_tlb_flush) = 0; | ||
67 | } | ||
68 | } | ||
69 | spin_unlock_irqrestore(&ia64_ctx.lock, flags); | ||
62 | } | 70 | } |
63 | } | 71 | } |
64 | 72 | ||
65 | static inline mm_context_t | 73 | static inline nv_mm_context_t |
66 | get_mmu_context (struct mm_struct *mm) | 74 | get_mmu_context (struct mm_struct *mm) |
67 | { | 75 | { |
68 | unsigned long flags; | 76 | unsigned long flags; |
69 | mm_context_t context = mm->context; | 77 | nv_mm_context_t context = mm->context; |
70 | 78 | ||
71 | if (context) | 79 | if (unlikely(!context)) { |
72 | return context; | 80 | spin_lock_irqsave(&ia64_ctx.lock, flags); |
73 | 81 | { | |
74 | spin_lock_irqsave(&ia64_ctx.lock, flags); | 82 | /* re-check, now that we've got the lock: */ |
75 | { | 83 | context = mm->context; |
76 | /* re-check, now that we've got the lock: */ | 84 | if (context == 0) { |
77 | context = mm->context; | 85 | cpus_clear(mm->cpu_vm_mask); |
78 | if (context == 0) { | 86 | if (ia64_ctx.next >= ia64_ctx.limit) |
79 | cpus_clear(mm->cpu_vm_mask); | 87 | wrap_mmu_context(mm); |
80 | if (ia64_ctx.next >= ia64_ctx.limit) | 88 | mm->context = context = ia64_ctx.next++; |
81 | wrap_mmu_context(mm); | 89 | } |
82 | mm->context = context = ia64_ctx.next++; | ||
83 | } | 90 | } |
91 | spin_unlock_irqrestore(&ia64_ctx.lock, flags); | ||
84 | } | 92 | } |
85 | spin_unlock_irqrestore(&ia64_ctx.lock, flags); | 93 | /* |
94 | * Ensure we're not starting to use "context" before any old | ||
95 | * uses of it are gone from our TLB. | ||
96 | */ | ||
97 | delayed_tlb_flush(); | ||
98 | |||
86 | return context; | 99 | return context; |
87 | } | 100 | } |
88 | 101 | ||
@@ -104,13 +117,13 @@ destroy_context (struct mm_struct *mm) | |||
104 | } | 117 | } |
105 | 118 | ||
106 | static inline void | 119 | static inline void |
107 | reload_context (mm_context_t context) | 120 | reload_context (nv_mm_context_t context) |
108 | { | 121 | { |
109 | unsigned long rid; | 122 | unsigned long rid; |
110 | unsigned long rid_incr = 0; | 123 | unsigned long rid_incr = 0; |
111 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4; | 124 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4; |
112 | 125 | ||
113 | old_rr4 = ia64_get_rr(0x8000000000000000UL); | 126 | old_rr4 = ia64_get_rr(RGN_BASE(RGN_HPAGE)); |
114 | rid = context << 3; /* make space for encoding the region number */ | 127 | rid = context << 3; /* make space for encoding the region number */ |
115 | rid_incr = 1 << 8; | 128 | rid_incr = 1 << 8; |
116 | 129 | ||
@@ -122,6 +135,10 @@ reload_context (mm_context_t context) | |||
122 | rr4 = rr0 + 4*rid_incr; | 135 | rr4 = rr0 + 4*rid_incr; |
123 | #ifdef CONFIG_HUGETLB_PAGE | 136 | #ifdef CONFIG_HUGETLB_PAGE |
124 | rr4 = (rr4 & (~(0xfcUL))) | (old_rr4 & 0xfc); | 137 | rr4 = (rr4 & (~(0xfcUL))) | (old_rr4 & 0xfc); |
138 | |||
139 | # if RGN_HPAGE != 4 | ||
140 | # error "reload_context assumes RGN_HPAGE is 4" | ||
141 | # endif | ||
125 | #endif | 142 | #endif |
126 | 143 | ||
127 | ia64_set_rr(0x0000000000000000UL, rr0); | 144 | ia64_set_rr(0x0000000000000000UL, rr0); |
@@ -138,7 +155,7 @@ reload_context (mm_context_t context) | |||
138 | static inline void | 155 | static inline void |
139 | activate_context (struct mm_struct *mm) | 156 | activate_context (struct mm_struct *mm) |
140 | { | 157 | { |
141 | mm_context_t context; | 158 | nv_mm_context_t context; |
142 | 159 | ||
143 | do { | 160 | do { |
144 | context = get_mmu_context(mm); | 161 | context = get_mmu_context(mm); |
@@ -157,8 +174,6 @@ activate_context (struct mm_struct *mm) | |||
157 | static inline void | 174 | static inline void |
158 | activate_mm (struct mm_struct *prev, struct mm_struct *next) | 175 | activate_mm (struct mm_struct *prev, struct mm_struct *next) |
159 | { | 176 | { |
160 | delayed_tlb_flush(); | ||
161 | |||
162 | /* | 177 | /* |
163 | * We may get interrupts here, but that's OK because interrupt handlers cannot | 178 | * We may get interrupts here, but that's OK because interrupt handlers cannot |
164 | * touch user-space. | 179 | * touch user-space. |
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index 08894f73abf0..9edffad8c28b 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h | |||
@@ -13,6 +13,19 @@ | |||
13 | #include <asm/types.h> | 13 | #include <asm/types.h> |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * The top three bits of an IA64 address are its Region Number. | ||
17 | * Different regions are assigned to different purposes. | ||
18 | */ | ||
19 | #define RGN_SHIFT (61) | ||
20 | #define RGN_BASE(r) (__IA64_UL_CONST(r)<<RGN_SHIFT) | ||
21 | #define RGN_BITS (RGN_BASE(-1)) | ||
22 | |||
23 | #define RGN_KERNEL 7 /* Identity mapped region */ | ||
24 | #define RGN_UNCACHED 6 /* Identity mapped I/O region */ | ||
25 | #define RGN_GATE 5 /* Gate page, Kernel text, etc */ | ||
26 | #define RGN_HPAGE 4 /* For Huge TLB pages */ | ||
27 | |||
28 | /* | ||
16 | * PAGE_SHIFT determines the actual kernel page size. | 29 | * PAGE_SHIFT determines the actual kernel page size. |
17 | */ | 30 | */ |
18 | #if defined(CONFIG_IA64_PAGE_SIZE_4KB) | 31 | #if defined(CONFIG_IA64_PAGE_SIZE_4KB) |
@@ -36,10 +49,9 @@ | |||
36 | 49 | ||
37 | #define RGN_MAP_LIMIT ((1UL << (4*PAGE_SHIFT - 12)) - PAGE_SIZE) /* per region addr limit */ | 50 | #define RGN_MAP_LIMIT ((1UL << (4*PAGE_SHIFT - 12)) - PAGE_SIZE) /* per region addr limit */ |
38 | 51 | ||
52 | |||
39 | #ifdef CONFIG_HUGETLB_PAGE | 53 | #ifdef CONFIG_HUGETLB_PAGE |
40 | # define REGION_HPAGE (4UL) /* note: this is hardcoded in reload_context()!*/ | 54 | # define HPAGE_REGION_BASE RGN_BASE(RGN_HPAGE) |
41 | # define REGION_SHIFT 61 | ||
42 | # define HPAGE_REGION_BASE (REGION_HPAGE << REGION_SHIFT) | ||
43 | # define HPAGE_SHIFT hpage_shift | 55 | # define HPAGE_SHIFT hpage_shift |
44 | # define HPAGE_SHIFT_DEFAULT 28 /* check ia64 SDM for architecture supported size */ | 56 | # define HPAGE_SHIFT_DEFAULT 28 /* check ia64 SDM for architecture supported size */ |
45 | # define HPAGE_SIZE (__IA64_UL_CONST(1) << HPAGE_SHIFT) | 57 | # define HPAGE_SIZE (__IA64_UL_CONST(1) << HPAGE_SHIFT) |
@@ -130,16 +142,13 @@ typedef union ia64_va { | |||
130 | #define REGION_NUMBER(x) ({ia64_va _v; _v.l = (long) (x); _v.f.reg;}) | 142 | #define REGION_NUMBER(x) ({ia64_va _v; _v.l = (long) (x); _v.f.reg;}) |
131 | #define REGION_OFFSET(x) ({ia64_va _v; _v.l = (long) (x); _v.f.off;}) | 143 | #define REGION_OFFSET(x) ({ia64_va _v; _v.l = (long) (x); _v.f.off;}) |
132 | 144 | ||
133 | #define REGION_SIZE REGION_NUMBER(1) | ||
134 | #define REGION_KERNEL 7 | ||
135 | |||
136 | #ifdef CONFIG_HUGETLB_PAGE | 145 | #ifdef CONFIG_HUGETLB_PAGE |
137 | # define htlbpage_to_page(x) (((unsigned long) REGION_NUMBER(x) << 61) \ | 146 | # define htlbpage_to_page(x) (((unsigned long) REGION_NUMBER(x) << 61) \ |
138 | | (REGION_OFFSET(x) >> (HPAGE_SHIFT-PAGE_SHIFT))) | 147 | | (REGION_OFFSET(x) >> (HPAGE_SHIFT-PAGE_SHIFT))) |
139 | # define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 148 | # define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
140 | # define is_hugepage_only_range(mm, addr, len) \ | 149 | # define is_hugepage_only_range(mm, addr, len) \ |
141 | (REGION_NUMBER(addr) == REGION_HPAGE && \ | 150 | (REGION_NUMBER(addr) == RGN_HPAGE && \ |
142 | REGION_NUMBER((addr)+(len)-1) == REGION_HPAGE) | 151 | REGION_NUMBER((addr)+(len)-1) == RGN_HPAGE) |
143 | extern unsigned int hpage_shift; | 152 | extern unsigned int hpage_shift; |
144 | #endif | 153 | #endif |
145 | 154 | ||
@@ -197,7 +206,7 @@ get_order (unsigned long size) | |||
197 | # define __pgprot(x) (x) | 206 | # define __pgprot(x) (x) |
198 | #endif /* !STRICT_MM_TYPECHECKS */ | 207 | #endif /* !STRICT_MM_TYPECHECKS */ |
199 | 208 | ||
200 | #define PAGE_OFFSET __IA64_UL_CONST(0xe000000000000000) | 209 | #define PAGE_OFFSET RGN_BASE(RGN_KERNEL) |
201 | 210 | ||
202 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ | 211 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ |
203 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC | \ | 212 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC | \ |
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 2303a10ee595..e828377ad295 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -75,6 +75,8 @@ | |||
75 | #define PAL_CACHE_READ 259 /* read tag & data of cacheline for diagnostic testing */ | 75 | #define PAL_CACHE_READ 259 /* read tag & data of cacheline for diagnostic testing */ |
76 | #define PAL_CACHE_WRITE 260 /* write tag & data of cacheline for diagnostic testing */ | 76 | #define PAL_CACHE_WRITE 260 /* write tag & data of cacheline for diagnostic testing */ |
77 | #define PAL_VM_TR_READ 261 /* read contents of translation register */ | 77 | #define PAL_VM_TR_READ 261 /* read contents of translation register */ |
78 | #define PAL_GET_PSTATE 262 /* get the current P-state */ | ||
79 | #define PAL_SET_PSTATE 263 /* set the P-state */ | ||
78 | 80 | ||
79 | #ifndef __ASSEMBLY__ | 81 | #ifndef __ASSEMBLY__ |
80 | 82 | ||
@@ -1111,6 +1113,25 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf) | |||
1111 | return iprv.status; | 1113 | return iprv.status; |
1112 | } | 1114 | } |
1113 | 1115 | ||
1116 | /* Get the current P-state information */ | ||
1117 | static inline s64 | ||
1118 | ia64_pal_get_pstate (u64 *pstate_index) | ||
1119 | { | ||
1120 | struct ia64_pal_retval iprv; | ||
1121 | PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0); | ||
1122 | *pstate_index = iprv.v0; | ||
1123 | return iprv.status; | ||
1124 | } | ||
1125 | |||
1126 | /* Set the P-state */ | ||
1127 | static inline s64 | ||
1128 | ia64_pal_set_pstate (u64 pstate_index) | ||
1129 | { | ||
1130 | struct ia64_pal_retval iprv; | ||
1131 | PAL_CALL_STK(iprv, PAL_SET_PSTATE, pstate_index, 0, 0); | ||
1132 | return iprv.status; | ||
1133 | } | ||
1134 | |||
1114 | /* Cause the processor to enter LIGHT HALT state, where prefetching and execution are | 1135 | /* Cause the processor to enter LIGHT HALT state, where prefetching and execution are |
1115 | * suspended, but cache and TLB coherency is maintained. | 1136 | * suspended, but cache and TLB coherency is maintained. |
1116 | */ | 1137 | */ |
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 48586e08f432..2e34c06e6777 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -204,21 +204,18 @@ ia64_phys_addr_valid (unsigned long addr) | |||
204 | #define set_pte(ptep, pteval) (*(ptep) = (pteval)) | 204 | #define set_pte(ptep, pteval) (*(ptep) = (pteval)) |
205 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | 205 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) |
206 | 206 | ||
207 | #define RGN_SIZE (1UL << 61) | 207 | #define VMALLOC_START (RGN_BASE(RGN_GATE) + 0x200000000UL) |
208 | #define RGN_KERNEL 7 | ||
209 | |||
210 | #define VMALLOC_START 0xa000000200000000UL | ||
211 | #ifdef CONFIG_VIRTUAL_MEM_MAP | 208 | #ifdef CONFIG_VIRTUAL_MEM_MAP |
212 | # define VMALLOC_END_INIT (0xa000000000000000UL + (1UL << (4*PAGE_SHIFT - 9))) | 209 | # define VMALLOC_END_INIT (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9))) |
213 | # define VMALLOC_END vmalloc_end | 210 | # define VMALLOC_END vmalloc_end |
214 | extern unsigned long vmalloc_end; | 211 | extern unsigned long vmalloc_end; |
215 | #else | 212 | #else |
216 | # define VMALLOC_END (0xa000000000000000UL + (1UL << (4*PAGE_SHIFT - 9))) | 213 | # define VMALLOC_END (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9))) |
217 | #endif | 214 | #endif |
218 | 215 | ||
219 | /* fs/proc/kcore.c */ | 216 | /* fs/proc/kcore.c */ |
220 | #define kc_vaddr_to_offset(v) ((v) - 0xa000000000000000UL) | 217 | #define kc_vaddr_to_offset(v) ((v) - RGN_BASE(RGN_GATE)) |
221 | #define kc_offset_to_vaddr(o) ((o) + 0xa000000000000000UL) | 218 | #define kc_offset_to_vaddr(o) ((o) + RGN_BASE(RGN_GATE)) |
222 | 219 | ||
223 | /* | 220 | /* |
224 | * Conversion functions: convert page frame number (pfn) and a protection value to a page | 221 | * Conversion functions: convert page frame number (pfn) and a protection value to a page |
diff --git a/include/asm-ia64/rwsem.h b/include/asm-ia64/rwsem.h index 6ece5061dc19..e18b5ab0cb75 100644 --- a/include/asm-ia64/rwsem.h +++ b/include/asm-ia64/rwsem.h | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2003 Ken Chen <kenneth.w.chen@intel.com> | 4 | * Copyright (C) 2003 Ken Chen <kenneth.w.chen@intel.com> |
5 | * Copyright (C) 2003 Asit Mallick <asit.k.mallick@intel.com> | 5 | * Copyright (C) 2003 Asit Mallick <asit.k.mallick@intel.com> |
6 | * Copyright (C) 2005 Christoph Lameter <clameter@sgi.com> | ||
6 | * | 7 | * |
7 | * Based on asm-i386/rwsem.h and other architecture implementation. | 8 | * Based on asm-i386/rwsem.h and other architecture implementation. |
8 | * | 9 | * |
@@ -11,9 +12,9 @@ | |||
11 | * | 12 | * |
12 | * The lock count is initialized to 0 (no active and no waiting lockers). | 13 | * The lock count is initialized to 0 (no active and no waiting lockers). |
13 | * | 14 | * |
14 | * When a writer subtracts WRITE_BIAS, it'll get 0xffff0001 for the case | 15 | * When a writer subtracts WRITE_BIAS, it'll get 0xffffffff00000001 for |
15 | * of an uncontended lock. Readers increment by 1 and see a positive value | 16 | * the case of an uncontended lock. Readers increment by 1 and see a positive |
16 | * when uncontended, negative if there are writers (and maybe) readers | 17 | * value when uncontended, negative if there are writers (and maybe) readers |
17 | * waiting (in which case it goes to sleep). | 18 | * waiting (in which case it goes to sleep). |
18 | */ | 19 | */ |
19 | 20 | ||
@@ -29,7 +30,7 @@ | |||
29 | * the semaphore definition | 30 | * the semaphore definition |
30 | */ | 31 | */ |
31 | struct rw_semaphore { | 32 | struct rw_semaphore { |
32 | signed int count; | 33 | signed long count; |
33 | spinlock_t wait_lock; | 34 | spinlock_t wait_lock; |
34 | struct list_head wait_list; | 35 | struct list_head wait_list; |
35 | #if RWSEM_DEBUG | 36 | #if RWSEM_DEBUG |
@@ -37,10 +38,10 @@ struct rw_semaphore { | |||
37 | #endif | 38 | #endif |
38 | }; | 39 | }; |
39 | 40 | ||
40 | #define RWSEM_UNLOCKED_VALUE 0x00000000 | 41 | #define RWSEM_UNLOCKED_VALUE __IA64_UL_CONST(0x0000000000000000) |
41 | #define RWSEM_ACTIVE_BIAS 0x00000001 | 42 | #define RWSEM_ACTIVE_BIAS __IA64_UL_CONST(0x0000000000000001) |
42 | #define RWSEM_ACTIVE_MASK 0x0000ffff | 43 | #define RWSEM_ACTIVE_MASK __IA64_UL_CONST(0x00000000ffffffff) |
43 | #define RWSEM_WAITING_BIAS (-0x00010000) | 44 | #define RWSEM_WAITING_BIAS -__IA64_UL_CONST(0x0000000100000000) |
44 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS | 45 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS |
45 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 46 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
46 | 47 | ||
@@ -83,7 +84,7 @@ init_rwsem (struct rw_semaphore *sem) | |||
83 | static inline void | 84 | static inline void |
84 | __down_read (struct rw_semaphore *sem) | 85 | __down_read (struct rw_semaphore *sem) |
85 | { | 86 | { |
86 | int result = ia64_fetchadd4_acq((unsigned int *)&sem->count, 1); | 87 | long result = ia64_fetchadd8_acq((unsigned long *)&sem->count, 1); |
87 | 88 | ||
88 | if (result < 0) | 89 | if (result < 0) |
89 | rwsem_down_read_failed(sem); | 90 | rwsem_down_read_failed(sem); |
@@ -95,7 +96,7 @@ __down_read (struct rw_semaphore *sem) | |||
95 | static inline void | 96 | static inline void |
96 | __down_write (struct rw_semaphore *sem) | 97 | __down_write (struct rw_semaphore *sem) |
97 | { | 98 | { |
98 | int old, new; | 99 | long old, new; |
99 | 100 | ||
100 | do { | 101 | do { |
101 | old = sem->count; | 102 | old = sem->count; |
@@ -112,7 +113,7 @@ __down_write (struct rw_semaphore *sem) | |||
112 | static inline void | 113 | static inline void |
113 | __up_read (struct rw_semaphore *sem) | 114 | __up_read (struct rw_semaphore *sem) |
114 | { | 115 | { |
115 | int result = ia64_fetchadd4_rel((unsigned int *)&sem->count, -1); | 116 | long result = ia64_fetchadd8_rel((unsigned long *)&sem->count, -1); |
116 | 117 | ||
117 | if (result < 0 && (--result & RWSEM_ACTIVE_MASK) == 0) | 118 | if (result < 0 && (--result & RWSEM_ACTIVE_MASK) == 0) |
118 | rwsem_wake(sem); | 119 | rwsem_wake(sem); |
@@ -124,7 +125,7 @@ __up_read (struct rw_semaphore *sem) | |||
124 | static inline void | 125 | static inline void |
125 | __up_write (struct rw_semaphore *sem) | 126 | __up_write (struct rw_semaphore *sem) |
126 | { | 127 | { |
127 | int old, new; | 128 | long old, new; |
128 | 129 | ||
129 | do { | 130 | do { |
130 | old = sem->count; | 131 | old = sem->count; |
@@ -141,7 +142,7 @@ __up_write (struct rw_semaphore *sem) | |||
141 | static inline int | 142 | static inline int |
142 | __down_read_trylock (struct rw_semaphore *sem) | 143 | __down_read_trylock (struct rw_semaphore *sem) |
143 | { | 144 | { |
144 | int tmp; | 145 | long tmp; |
145 | while ((tmp = sem->count) >= 0) { | 146 | while ((tmp = sem->count) >= 0) { |
146 | if (tmp == cmpxchg_acq(&sem->count, tmp, tmp+1)) { | 147 | if (tmp == cmpxchg_acq(&sem->count, tmp, tmp+1)) { |
147 | return 1; | 148 | return 1; |
@@ -156,7 +157,7 @@ __down_read_trylock (struct rw_semaphore *sem) | |||
156 | static inline int | 157 | static inline int |
157 | __down_write_trylock (struct rw_semaphore *sem) | 158 | __down_write_trylock (struct rw_semaphore *sem) |
158 | { | 159 | { |
159 | int tmp = cmpxchg_acq(&sem->count, RWSEM_UNLOCKED_VALUE, | 160 | long tmp = cmpxchg_acq(&sem->count, RWSEM_UNLOCKED_VALUE, |
160 | RWSEM_ACTIVE_WRITE_BIAS); | 161 | RWSEM_ACTIVE_WRITE_BIAS); |
161 | return tmp == RWSEM_UNLOCKED_VALUE; | 162 | return tmp == RWSEM_UNLOCKED_VALUE; |
162 | } | 163 | } |
@@ -167,7 +168,7 @@ __down_write_trylock (struct rw_semaphore *sem) | |||
167 | static inline void | 168 | static inline void |
168 | __downgrade_write (struct rw_semaphore *sem) | 169 | __downgrade_write (struct rw_semaphore *sem) |
169 | { | 170 | { |
170 | int old, new; | 171 | long old, new; |
171 | 172 | ||
172 | do { | 173 | do { |
173 | old = sem->count; | 174 | old = sem->count; |
@@ -182,7 +183,7 @@ __downgrade_write (struct rw_semaphore *sem) | |||
182 | * Implement atomic add functionality. These used to be "inline" functions, but GCC v3.1 | 183 | * Implement atomic add functionality. These used to be "inline" functions, but GCC v3.1 |
183 | * doesn't quite optimize this stuff right and ends up with bad calls to fetchandadd. | 184 | * doesn't quite optimize this stuff right and ends up with bad calls to fetchandadd. |
184 | */ | 185 | */ |
185 | #define rwsem_atomic_add(delta, sem) atomic_add(delta, (atomic_t *)(&(sem)->count)) | 186 | #define rwsem_atomic_add(delta, sem) atomic64_add(delta, (atomic64_t *)(&(sem)->count)) |
186 | #define rwsem_atomic_update(delta, sem) atomic_add_return(delta, (atomic_t *)(&(sem)->count)) | 187 | #define rwsem_atomic_update(delta, sem) atomic64_add_return(delta, (atomic64_t *)(&(sem)->count)) |
187 | 188 | ||
188 | #endif /* _ASM_IA64_RWSEM_H */ | 189 | #endif /* _ASM_IA64_RWSEM_H */ |
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h index 103d745dc5f2..2c32e4b77b54 100644 --- a/include/asm-ia64/sn/addrs.h +++ b/include/asm-ia64/sn/addrs.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 1992-1999,2001-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (c) 1992-1999,2001-2005 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _ASM_IA64_SN_ADDRS_H | 9 | #ifndef _ASM_IA64_SN_ADDRS_H |
@@ -65,7 +65,6 @@ | |||
65 | 65 | ||
66 | #define NASID_MASK ((u64)NASID_BITMASK << NASID_SHIFT) | 66 | #define NASID_MASK ((u64)NASID_BITMASK << NASID_SHIFT) |
67 | #define AS_MASK ((u64)AS_BITMASK << AS_SHIFT) | 67 | #define AS_MASK ((u64)AS_BITMASK << AS_SHIFT) |
68 | #define REGION_BITS 0xe000000000000000UL | ||
69 | 68 | ||
70 | 69 | ||
71 | /* | 70 | /* |
@@ -79,38 +78,30 @@ | |||
79 | #define AS_CAC_SPACE (AS_CAC_VAL << AS_SHIFT) | 78 | #define AS_CAC_SPACE (AS_CAC_VAL << AS_SHIFT) |
80 | 79 | ||
81 | 80 | ||
82 | /* | ||
83 | * Base addresses for various address ranges. | ||
84 | */ | ||
85 | #define CACHED 0xe000000000000000UL | ||
86 | #define UNCACHED 0xc000000000000000UL | ||
87 | #define UNCACHED_PHYS 0x8000000000000000UL | ||
88 | |||
89 | |||
90 | /* | 81 | /* |
91 | * Virtual Mode Local & Global MMR space. | 82 | * Virtual Mode Local & Global MMR space. |
92 | */ | 83 | */ |
93 | #define SH1_LOCAL_MMR_OFFSET 0x8000000000UL | 84 | #define SH1_LOCAL_MMR_OFFSET 0x8000000000UL |
94 | #define SH2_LOCAL_MMR_OFFSET 0x0200000000UL | 85 | #define SH2_LOCAL_MMR_OFFSET 0x0200000000UL |
95 | #define LOCAL_MMR_OFFSET (is_shub2() ? SH2_LOCAL_MMR_OFFSET : SH1_LOCAL_MMR_OFFSET) | 86 | #define LOCAL_MMR_OFFSET (is_shub2() ? SH2_LOCAL_MMR_OFFSET : SH1_LOCAL_MMR_OFFSET) |
96 | #define LOCAL_MMR_SPACE (UNCACHED | LOCAL_MMR_OFFSET) | 87 | #define LOCAL_MMR_SPACE (__IA64_UNCACHED_OFFSET | LOCAL_MMR_OFFSET) |
97 | #define LOCAL_PHYS_MMR_SPACE (UNCACHED_PHYS | LOCAL_MMR_OFFSET) | 88 | #define LOCAL_PHYS_MMR_SPACE (RGN_BASE(RGN_HPAGE) | LOCAL_MMR_OFFSET) |
98 | 89 | ||
99 | #define SH1_GLOBAL_MMR_OFFSET 0x0800000000UL | 90 | #define SH1_GLOBAL_MMR_OFFSET 0x0800000000UL |
100 | #define SH2_GLOBAL_MMR_OFFSET 0x0300000000UL | 91 | #define SH2_GLOBAL_MMR_OFFSET 0x0300000000UL |
101 | #define GLOBAL_MMR_OFFSET (is_shub2() ? SH2_GLOBAL_MMR_OFFSET : SH1_GLOBAL_MMR_OFFSET) | 92 | #define GLOBAL_MMR_OFFSET (is_shub2() ? SH2_GLOBAL_MMR_OFFSET : SH1_GLOBAL_MMR_OFFSET) |
102 | #define GLOBAL_MMR_SPACE (UNCACHED | GLOBAL_MMR_OFFSET) | 93 | #define GLOBAL_MMR_SPACE (__IA64_UNCACHED_OFFSET | GLOBAL_MMR_OFFSET) |
103 | 94 | ||
104 | /* | 95 | /* |
105 | * Physical mode addresses | 96 | * Physical mode addresses |
106 | */ | 97 | */ |
107 | #define GLOBAL_PHYS_MMR_SPACE (UNCACHED_PHYS | GLOBAL_MMR_OFFSET) | 98 | #define GLOBAL_PHYS_MMR_SPACE (RGN_BASE(RGN_HPAGE) | GLOBAL_MMR_OFFSET) |
108 | 99 | ||
109 | 100 | ||
110 | /* | 101 | /* |
111 | * Clear region & AS bits. | 102 | * Clear region & AS bits. |
112 | */ | 103 | */ |
113 | #define TO_PHYS_MASK (~(REGION_BITS | AS_MASK)) | 104 | #define TO_PHYS_MASK (~(RGN_BITS | AS_MASK)) |
114 | 105 | ||
115 | 106 | ||
116 | /* | 107 | /* |
@@ -126,6 +117,7 @@ | |||
126 | #define GLOBAL_MMR_PHYS_ADDR(n,a) (GLOBAL_PHYS_MMR_SPACE | REMOTE_ADDR(n,a)) | 117 | #define GLOBAL_MMR_PHYS_ADDR(n,a) (GLOBAL_PHYS_MMR_SPACE | REMOTE_ADDR(n,a)) |
127 | #define GLOBAL_CAC_ADDR(n,a) (CAC_BASE | REMOTE_ADDR(n,a)) | 118 | #define GLOBAL_CAC_ADDR(n,a) (CAC_BASE | REMOTE_ADDR(n,a)) |
128 | #define CHANGE_NASID(n,x) ((void *)(((u64)(x) & ~NASID_MASK) | NASID_SPACE(n))) | 119 | #define CHANGE_NASID(n,x) ((void *)(((u64)(x) & ~NASID_MASK) | NASID_SPACE(n))) |
120 | #define IS_TIO_NASID(n) ((n) & 1) | ||
129 | 121 | ||
130 | 122 | ||
131 | /* non-II mmr's start at top of big window space (4G) */ | 123 | /* non-II mmr's start at top of big window space (4G) */ |
@@ -134,10 +126,10 @@ | |||
134 | /* | 126 | /* |
135 | * general address defines | 127 | * general address defines |
136 | */ | 128 | */ |
137 | #define CAC_BASE (CACHED | AS_CAC_SPACE) | 129 | #define CAC_BASE (PAGE_OFFSET | AS_CAC_SPACE) |
138 | #define AMO_BASE (UNCACHED | AS_AMO_SPACE) | 130 | #define AMO_BASE (__IA64_UNCACHED_OFFSET | AS_AMO_SPACE) |
139 | #define AMO_PHYS_BASE (UNCACHED_PHYS | AS_AMO_SPACE) | 131 | #define AMO_PHYS_BASE (RGN_BASE(RGN_HPAGE) | AS_AMO_SPACE) |
140 | #define GET_BASE (CACHED | AS_GET_SPACE) | 132 | #define GET_BASE (PAGE_OFFSET | AS_GET_SPACE) |
141 | 133 | ||
142 | /* | 134 | /* |
143 | * Convert Memory addresses between various addressing modes. | 135 | * Convert Memory addresses between various addressing modes. |
@@ -155,17 +147,35 @@ | |||
155 | * the chiplet id is zero. If we implement TIO-TIO dma, we might need | 147 | * the chiplet id is zero. If we implement TIO-TIO dma, we might need |
156 | * to insert a chiplet id into this macro. However, it is our belief | 148 | * to insert a chiplet id into this macro. However, it is our belief |
157 | * right now that this chiplet id will be ICE, which is also zero. | 149 | * right now that this chiplet id will be ICE, which is also zero. |
158 | * Nasid starts on bit 40. | ||
159 | */ | 150 | */ |
160 | #define PHYS_TO_TIODMA(x) ( (((u64)(NASID_GET(x))) << 40) | NODE_OFFSET(x)) | 151 | #define SH1_TIO_PHYS_TO_DMA(x) \ |
161 | #define PHYS_TO_DMA(x) ( (((u64)(x) & NASID_MASK) >> 2) | NODE_OFFSET(x)) | 152 | ((((u64)(NASID_GET(x))) << 40) | NODE_OFFSET(x)) |
153 | |||
154 | #define SH2_NETWORK_BANK_OFFSET(x) \ | ||
155 | ((u64)(x) & ((1UL << (sn_hub_info->nasid_shift - 4)) -1)) | ||
156 | |||
157 | #define SH2_NETWORK_BANK_SELECT(x) \ | ||
158 | ((((u64)(x) & (0x3UL << (sn_hub_info->nasid_shift - 4))) \ | ||
159 | >> (sn_hub_info->nasid_shift - 4)) << 36) | ||
160 | |||
161 | #define SH2_NETWORK_ADDRESS(x) \ | ||
162 | (SH2_NETWORK_BANK_OFFSET(x) | SH2_NETWORK_BANK_SELECT(x)) | ||
163 | |||
164 | #define SH2_TIO_PHYS_TO_DMA(x) \ | ||
165 | (((u64)(NASID_GET(x)) << 40) | SH2_NETWORK_ADDRESS(x)) | ||
166 | |||
167 | #define PHYS_TO_TIODMA(x) \ | ||
168 | (is_shub1() ? SH1_TIO_PHYS_TO_DMA(x) : SH2_TIO_PHYS_TO_DMA(x)) | ||
169 | |||
170 | #define PHYS_TO_DMA(x) \ | ||
171 | ((((u64)(x) & NASID_MASK) >> 2) | NODE_OFFSET(x)) | ||
162 | 172 | ||
163 | 173 | ||
164 | /* | 174 | /* |
165 | * Macros to test for address type. | 175 | * Macros to test for address type. |
166 | */ | 176 | */ |
167 | #define IS_AMO_ADDRESS(x) (((u64)(x) & (REGION_BITS | AS_MASK)) == AMO_BASE) | 177 | #define IS_AMO_ADDRESS(x) (((u64)(x) & (RGN_BITS | AS_MASK)) == AMO_BASE) |
168 | #define IS_AMO_PHYS_ADDRESS(x) (((u64)(x) & (REGION_BITS | AS_MASK)) == AMO_PHYS_BASE) | 178 | #define IS_AMO_PHYS_ADDRESS(x) (((u64)(x) & (RGN_BITS | AS_MASK)) == AMO_PHYS_BASE) |
169 | 179 | ||
170 | 180 | ||
171 | /* | 181 | /* |
@@ -180,18 +190,20 @@ | |||
180 | #define TIO_SWIN_BASE(n, w) (TIO_IO_BASE(n) + \ | 190 | #define TIO_SWIN_BASE(n, w) (TIO_IO_BASE(n) + \ |
181 | ((u64) (w) << TIO_SWIN_SIZE_BITS)) | 191 | ((u64) (w) << TIO_SWIN_SIZE_BITS)) |
182 | #define NODE_IO_BASE(n) (GLOBAL_MMR_SPACE | NASID_SPACE(n)) | 192 | #define NODE_IO_BASE(n) (GLOBAL_MMR_SPACE | NASID_SPACE(n)) |
183 | #define TIO_IO_BASE(n) (UNCACHED | NASID_SPACE(n)) | 193 | #define TIO_IO_BASE(n) (__IA64_UNCACHED_OFFSET | NASID_SPACE(n)) |
184 | #define BWIN_SIZE (1UL << BWIN_SIZE_BITS) | 194 | #define BWIN_SIZE (1UL << BWIN_SIZE_BITS) |
185 | #define NODE_BWIN_BASE0(n) (NODE_IO_BASE(n) + BWIN_SIZE) | 195 | #define NODE_BWIN_BASE0(n) (NODE_IO_BASE(n) + BWIN_SIZE) |
186 | #define NODE_BWIN_BASE(n, w) (NODE_BWIN_BASE0(n) + ((u64) (w) << BWIN_SIZE_BITS)) | 196 | #define NODE_BWIN_BASE(n, w) (NODE_BWIN_BASE0(n) + ((u64) (w) << BWIN_SIZE_BITS)) |
187 | #define RAW_NODE_SWIN_BASE(n, w) (NODE_IO_BASE(n) + ((u64) (w) << SWIN_SIZE_BITS)) | 197 | #define RAW_NODE_SWIN_BASE(n, w) (NODE_IO_BASE(n) + ((u64) (w) << SWIN_SIZE_BITS)) |
188 | #define BWIN_WIDGET_MASK 0x7 | 198 | #define BWIN_WIDGET_MASK 0x7 |
189 | #define BWIN_WINDOWNUM(x) (((x) >> BWIN_SIZE_BITS) & BWIN_WIDGET_MASK) | 199 | #define BWIN_WINDOWNUM(x) (((x) >> BWIN_SIZE_BITS) & BWIN_WIDGET_MASK) |
200 | #define SH1_IS_BIG_WINDOW_ADDR(x) ((x) & BWIN_TOP) | ||
190 | 201 | ||
191 | #define TIO_BWIN_WINDOW_SELECT_MASK 0x7 | 202 | #define TIO_BWIN_WINDOW_SELECT_MASK 0x7 |
192 | #define TIO_BWIN_WINDOWNUM(x) (((x) >> TIO_BWIN_SIZE_BITS) & TIO_BWIN_WINDOW_SELECT_MASK) | 203 | #define TIO_BWIN_WINDOWNUM(x) (((x) >> TIO_BWIN_SIZE_BITS) & TIO_BWIN_WINDOW_SELECT_MASK) |
193 | 204 | ||
194 | 205 | #define TIO_HWIN_SHIFT_BITS 33 | |
206 | #define TIO_HWIN(x) (NODE_OFFSET(x) >> TIO_HWIN_SHIFT_BITS) | ||
195 | 207 | ||
196 | /* | 208 | /* |
197 | * The following definitions pertain to the IO special address | 209 | * The following definitions pertain to the IO special address |
@@ -216,10 +228,6 @@ | |||
216 | #define TIO_SWIN_WIDGETNUM(x) (((x) >> TIO_SWIN_SIZE_BITS) & TIO_SWIN_WIDGET_MASK) | 228 | #define TIO_SWIN_WIDGETNUM(x) (((x) >> TIO_SWIN_SIZE_BITS) & TIO_SWIN_WIDGET_MASK) |
217 | 229 | ||
218 | 230 | ||
219 | #define TIO_IOSPACE_ADDR(n,x) \ | ||
220 | /* Move in the Chiplet ID for TIO Local Block MMR */ \ | ||
221 | (REMOTE_ADDR(n,x) | 1UL << (NASID_SHIFT - 2)) | ||
222 | |||
223 | /* | 231 | /* |
224 | * The following macros produce the correct base virtual address for | 232 | * The following macros produce the correct base virtual address for |
225 | * the hub registers. The REMOTE_HUB_* macro produce | 233 | * the hub registers. The REMOTE_HUB_* macro produce |
@@ -234,18 +242,40 @@ | |||
234 | * Otherwise, the recommended approach is to use *_HUB_L() and *_HUB_S(). | 242 | * Otherwise, the recommended approach is to use *_HUB_L() and *_HUB_S(). |
235 | * They're always safe. | 243 | * They're always safe. |
236 | */ | 244 | */ |
245 | /* Shub1 TIO & MMR addressing macros */ | ||
246 | #define SH1_TIO_IOSPACE_ADDR(n,x) \ | ||
247 | GLOBAL_MMR_ADDR(n,x) | ||
248 | |||
249 | #define SH1_REMOTE_BWIN_MMR(n,x) \ | ||
250 | GLOBAL_MMR_ADDR(n,x) | ||
251 | |||
252 | #define SH1_REMOTE_SWIN_MMR(n,x) \ | ||
253 | (NODE_SWIN_BASE(n,1) + 0x800000UL + (x)) | ||
254 | |||
255 | #define SH1_REMOTE_MMR(n,x) \ | ||
256 | (SH1_IS_BIG_WINDOW_ADDR(x) ? SH1_REMOTE_BWIN_MMR(n,x) : \ | ||
257 | SH1_REMOTE_SWIN_MMR(n,x)) | ||
258 | |||
259 | /* Shub1 TIO & MMR addressing macros */ | ||
260 | #define SH2_TIO_IOSPACE_ADDR(n,x) \ | ||
261 | ((__IA64_UNCACHED_OFFSET | REMOTE_ADDR(n,x) | 1UL << (NASID_SHIFT - 2))) | ||
262 | |||
263 | #define SH2_REMOTE_MMR(n,x) \ | ||
264 | GLOBAL_MMR_ADDR(n,x) | ||
265 | |||
266 | |||
267 | /* TIO & MMR addressing macros that work on both shub1 & shub2 */ | ||
268 | #define TIO_IOSPACE_ADDR(n,x) \ | ||
269 | ((u64 *)(is_shub1() ? SH1_TIO_IOSPACE_ADDR(n,x) : \ | ||
270 | SH2_TIO_IOSPACE_ADDR(n,x))) | ||
271 | |||
272 | #define SH_REMOTE_MMR(n,x) \ | ||
273 | (is_shub1() ? SH1_REMOTE_MMR(n,x) : SH2_REMOTE_MMR(n,x)) | ||
274 | |||
237 | #define REMOTE_HUB_ADDR(n,x) \ | 275 | #define REMOTE_HUB_ADDR(n,x) \ |
238 | ((n & 1) ? \ | 276 | (IS_TIO_NASID(n) ? ((volatile u64*)TIO_IOSPACE_ADDR(n,x)) : \ |
239 | /* TIO: */ \ | 277 | ((volatile u64*)SH_REMOTE_MMR(n,x))) |
240 | (is_shub2() ? \ | 278 | |
241 | /* TIO on Shub2 */ \ | ||
242 | (volatile u64 *)(TIO_IOSPACE_ADDR(n,x)) \ | ||
243 | : /* TIO on shub1 */ \ | ||
244 | (volatile u64 *)(GLOBAL_MMR_ADDR(n,x))) \ | ||
245 | \ | ||
246 | : /* SHUB1 and SHUB2 MMRs: */ \ | ||
247 | (((x) & BWIN_TOP) ? ((volatile u64 *)(GLOBAL_MMR_ADDR(n,x))) \ | ||
248 | : ((volatile u64 *)(NODE_SWIN_BASE(n,1) + 0x800000 + (x))))) | ||
249 | 279 | ||
250 | #define HUB_L(x) (*((volatile typeof(*x) *)x)) | 280 | #define HUB_L(x) (*((volatile typeof(*x) *)x)) |
251 | #define HUB_S(x,d) (*((volatile typeof(*x) *)x) = (d)) | 281 | #define HUB_S(x,d) (*((volatile typeof(*x) *)x) = (d)) |
diff --git a/include/asm-ia64/sn/geo.h b/include/asm-ia64/sn/geo.h index 84b254603b8d..f083c9434066 100644 --- a/include/asm-ia64/sn/geo.h +++ b/include/asm-ia64/sn/geo.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _ASM_IA64_SN_GEO_H | 9 | #ifndef _ASM_IA64_SN_GEO_H |
@@ -108,7 +108,6 @@ typedef union geoid_u { | |||
108 | #define INVALID_SLAB (slabid_t)-1 | 108 | #define INVALID_SLAB (slabid_t)-1 |
109 | #define INVALID_SLOT (slotid_t)-1 | 109 | #define INVALID_SLOT (slotid_t)-1 |
110 | #define INVALID_MODULE ((moduleid_t)-1) | 110 | #define INVALID_MODULE ((moduleid_t)-1) |
111 | #define INVALID_PARTID ((partid_t)-1) | ||
112 | 111 | ||
113 | static inline slabid_t geo_slab(geoid_t g) | 112 | static inline slabid_t geo_slab(geoid_t g) |
114 | { | 113 | { |
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index e190dd4213d5..e35074f526d9 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.h | |||
@@ -12,13 +12,12 @@ | |||
12 | #include <linux/rcupdate.h> | 12 | #include <linux/rcupdate.h> |
13 | 13 | ||
14 | #define SGI_UART_VECTOR (0xe9) | 14 | #define SGI_UART_VECTOR (0xe9) |
15 | #define SGI_PCIBR_ERROR (0x33) | ||
16 | 15 | ||
17 | /* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */ | 16 | /* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */ |
18 | #define SGI_XPC_ACTIVATE (0x30) | 17 | #define SGI_XPC_ACTIVATE (0x30) |
19 | #define SGI_II_ERROR (0x31) | 18 | #define SGI_II_ERROR (0x31) |
20 | #define SGI_XBOW_ERROR (0x32) | 19 | #define SGI_XBOW_ERROR (0x32) |
21 | #define SGI_PCIBR_ERROR (0x33) | 20 | #define SGI_PCIASIC_ERROR (0x33) |
22 | #define SGI_ACPI_SCI_INT (0x34) | 21 | #define SGI_ACPI_SCI_INT (0x34) |
23 | #define SGI_TIOCA_ERROR (0x35) | 22 | #define SGI_TIOCA_ERROR (0x35) |
24 | #define SGI_TIO_ERROR (0x36) | 23 | #define SGI_TIO_ERROR (0x36) |
diff --git a/include/asm-ia64/sn/nodepda.h b/include/asm-ia64/sn/nodepda.h index 7138b1eafd6b..47bb8100fd00 100644 --- a/include/asm-ia64/sn/nodepda.h +++ b/include/asm-ia64/sn/nodepda.h | |||
@@ -37,7 +37,6 @@ struct phys_cpuid { | |||
37 | 37 | ||
38 | struct nodepda_s { | 38 | struct nodepda_s { |
39 | void *pdinfo; /* Platform-dependent per-node info */ | 39 | void *pdinfo; /* Platform-dependent per-node info */ |
40 | spinlock_t bist_lock; | ||
41 | 40 | ||
42 | /* | 41 | /* |
43 | * The BTEs on this node are shared by the local cpus | 42 | * The BTEs on this node are shared by the local cpus |
@@ -55,6 +54,8 @@ struct nodepda_s { | |||
55 | * Array of physical cpu identifiers. Indexed by cpuid. | 54 | * Array of physical cpu identifiers. Indexed by cpuid. |
56 | */ | 55 | */ |
57 | struct phys_cpuid phys_cpuid[NR_CPUS]; | 56 | struct phys_cpuid phys_cpuid[NR_CPUS]; |
57 | spinlock_t ptc_lock ____cacheline_aligned_in_smp; | ||
58 | spinlock_t bist_lock; | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | typedef struct nodepda_s nodepda_t; | 61 | typedef struct nodepda_s nodepda_t; |
diff --git a/include/asm-ia64/sn/pcibus_provider_defs.h b/include/asm-ia64/sn/pcibus_provider_defs.h index 976f5eff0539..ad0e8e8ae53f 100644 --- a/include/asm-ia64/sn/pcibus_provider_defs.h +++ b/include/asm-ia64/sn/pcibus_provider_defs.h | |||
@@ -18,8 +18,9 @@ | |||
18 | #define PCIIO_ASIC_TYPE_PIC 2 | 18 | #define PCIIO_ASIC_TYPE_PIC 2 |
19 | #define PCIIO_ASIC_TYPE_TIOCP 3 | 19 | #define PCIIO_ASIC_TYPE_TIOCP 3 |
20 | #define PCIIO_ASIC_TYPE_TIOCA 4 | 20 | #define PCIIO_ASIC_TYPE_TIOCA 4 |
21 | #define PCIIO_ASIC_TYPE_TIOCE 5 | ||
21 | 22 | ||
22 | #define PCIIO_ASIC_MAX_TYPES 5 | 23 | #define PCIIO_ASIC_MAX_TYPES 6 |
23 | 24 | ||
24 | /* | 25 | /* |
25 | * Common pciio bus provider data. There should be one of these as the | 26 | * Common pciio bus provider data. There should be one of these as the |
@@ -30,7 +31,8 @@ | |||
30 | struct pcibus_bussoft { | 31 | struct pcibus_bussoft { |
31 | uint32_t bs_asic_type; /* chipset type */ | 32 | uint32_t bs_asic_type; /* chipset type */ |
32 | uint32_t bs_xid; /* xwidget id */ | 33 | uint32_t bs_xid; /* xwidget id */ |
33 | uint64_t bs_persist_busnum; /* Persistent Bus Number */ | 34 | uint32_t bs_persist_busnum; /* Persistent Bus Number */ |
35 | uint32_t bs_persist_segment; /* Segment Number */ | ||
34 | uint64_t bs_legacy_io; /* legacy io pio addr */ | 36 | uint64_t bs_legacy_io; /* legacy io pio addr */ |
35 | uint64_t bs_legacy_mem; /* legacy mem pio addr */ | 37 | uint64_t bs_legacy_mem; /* legacy mem pio addr */ |
36 | uint64_t bs_base; /* widget base */ | 38 | uint64_t bs_base; /* widget base */ |
@@ -47,6 +49,8 @@ struct sn_pcibus_provider { | |||
47 | dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t); | 49 | dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t); |
48 | void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); | 50 | void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); |
49 | void * (*bus_fixup)(struct pcibus_bussoft *, struct pci_controller *); | 51 | void * (*bus_fixup)(struct pcibus_bussoft *, struct pci_controller *); |
52 | void (*force_interrupt)(struct sn_irq_info *); | ||
53 | void (*target_interrupt)(struct sn_irq_info *); | ||
50 | }; | 54 | }; |
51 | 55 | ||
52 | extern struct sn_pcibus_provider *sn_pci_provider[]; | 56 | extern struct sn_pcibus_provider *sn_pci_provider[]; |
diff --git a/include/asm-ia64/sn/pda.h b/include/asm-ia64/sn/pda.h index ea5590c76ca4..1c5108d44d8b 100644 --- a/include/asm-ia64/sn/pda.h +++ b/include/asm-ia64/sn/pda.h | |||
@@ -39,7 +39,6 @@ typedef struct pda_s { | |||
39 | unsigned long pio_write_status_val; | 39 | unsigned long pio_write_status_val; |
40 | volatile unsigned long *pio_shub_war_cam_addr; | 40 | volatile unsigned long *pio_shub_war_cam_addr; |
41 | 41 | ||
42 | unsigned long sn_soft_irr[4]; | ||
43 | unsigned long sn_in_service_ivecs[4]; | 42 | unsigned long sn_in_service_ivecs[4]; |
44 | int sn_lb_int_war_ticks; | 43 | int sn_lb_int_war_ticks; |
45 | int sn_last_irq; | 44 | int sn_last_irq; |
diff --git a/include/asm-ia64/sn/sn2/sn_hwperf.h b/include/asm-ia64/sn/sn2/sn_hwperf.h index df75f4c4aec3..291ef3d69da2 100644 --- a/include/asm-ia64/sn/sn2/sn_hwperf.h +++ b/include/asm-ia64/sn/sn2/sn_hwperf.h | |||
@@ -43,6 +43,7 @@ struct sn_hwperf_object_info { | |||
43 | 43 | ||
44 | /* macros for object classification */ | 44 | /* macros for object classification */ |
45 | #define SN_HWPERF_IS_NODE(x) ((x) && strstr((x)->name, "SHub")) | 45 | #define SN_HWPERF_IS_NODE(x) ((x) && strstr((x)->name, "SHub")) |
46 | #define SN_HWPERF_IS_NODE_SHUB2(x) ((x) && strstr((x)->name, "SHub 2.")) | ||
46 | #define SN_HWPERF_IS_IONODE(x) ((x) && strstr((x)->name, "TIO")) | 47 | #define SN_HWPERF_IS_IONODE(x) ((x) && strstr((x)->name, "TIO")) |
47 | #define SN_HWPERF_IS_ROUTER(x) ((x) && strstr((x)->name, "Router")) | 48 | #define SN_HWPERF_IS_ROUTER(x) ((x) && strstr((x)->name, "Router")) |
48 | #define SN_HWPERF_IS_NL3ROUTER(x) ((x) && strstr((x)->name, "NL3Router")) | 49 | #define SN_HWPERF_IS_NL3ROUTER(x) ((x) && strstr((x)->name, "NL3Router")) |
@@ -214,6 +215,15 @@ struct sn_hwperf_ioctl_args { | |||
214 | */ | 215 | */ |
215 | #define SN_HWPERF_GET_NODE_NASID (102|SN_HWPERF_OP_MEM_COPYOUT) | 216 | #define SN_HWPERF_GET_NODE_NASID (102|SN_HWPERF_OP_MEM_COPYOUT) |
216 | 217 | ||
218 | /* | ||
219 | * Given a node id, determine the id of the nearest node with CPUs | ||
220 | * and the id of the nearest node that has memory. The argument | ||
221 | * node would normally be a "headless" node, e.g. an "IO node". | ||
222 | * Return 0 on success. | ||
223 | */ | ||
224 | extern int sn_hwperf_get_nearest_node(cnodeid_t node, | ||
225 | cnodeid_t *near_mem, cnodeid_t *near_cpu); | ||
226 | |||
217 | /* return codes */ | 227 | /* return codes */ |
218 | #define SN_HWPERF_OP_OK 0 | 228 | #define SN_HWPERF_OP_OK 0 |
219 | #define SN_HWPERF_OP_NOMEM 1 | 229 | #define SN_HWPERF_OP_NOMEM 1 |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 27976d223186..e67825ad1930 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -55,7 +55,6 @@ | |||
55 | #define SN_SAL_BUS_CONFIG 0x02000037 | 55 | #define SN_SAL_BUS_CONFIG 0x02000037 |
56 | #define SN_SAL_SYS_SERIAL_GET 0x02000038 | 56 | #define SN_SAL_SYS_SERIAL_GET 0x02000038 |
57 | #define SN_SAL_PARTITION_SERIAL_GET 0x02000039 | 57 | #define SN_SAL_PARTITION_SERIAL_GET 0x02000039 |
58 | #define SN_SAL_SYSCTL_PARTITION_GET 0x0200003a | ||
59 | #define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b | 58 | #define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b |
60 | #define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c | 59 | #define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c |
61 | #define SN_SAL_COHERENCE 0x0200003d | 60 | #define SN_SAL_COHERENCE 0x0200003d |
@@ -78,7 +77,8 @@ | |||
78 | 77 | ||
79 | #define SN_SAL_HUB_ERROR_INTERRUPT 0x02000060 | 78 | #define SN_SAL_HUB_ERROR_INTERRUPT 0x02000060 |
80 | #define SN_SAL_BTE_RECOVER 0x02000061 | 79 | #define SN_SAL_BTE_RECOVER 0x02000061 |
81 | #define SN_SAL_IOIF_GET_PCI_TOPOLOGY 0x02000062 | 80 | #define SN_SAL_RESERVED_DO_NOT_USE 0x02000062 |
81 | #define SN_SAL_IOIF_GET_PCI_TOPOLOGY 0x02000064 | ||
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Service-specific constants | 84 | * Service-specific constants |
@@ -586,35 +586,6 @@ sn_partition_serial_number_val(void) { | |||
586 | } | 586 | } |
587 | 587 | ||
588 | /* | 588 | /* |
589 | * Returns the partition id of the nasid passed in as an argument, | ||
590 | * or INVALID_PARTID if the partition id cannot be retrieved. | ||
591 | */ | ||
592 | static inline partid_t | ||
593 | ia64_sn_sysctl_partition_get(nasid_t nasid) | ||
594 | { | ||
595 | struct ia64_sal_retval ret_stuff; | ||
596 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, | ||
597 | 0, 0, 0, 0, 0, 0); | ||
598 | if (ret_stuff.status != 0) | ||
599 | return INVALID_PARTID; | ||
600 | return ((partid_t)ret_stuff.v0); | ||
601 | } | ||
602 | |||
603 | /* | ||
604 | * Returns the partition id of the current processor. | ||
605 | */ | ||
606 | |||
607 | extern partid_t sn_partid; | ||
608 | |||
609 | static inline partid_t | ||
610 | sn_local_partid(void) { | ||
611 | if (unlikely(sn_partid < 0)) { | ||
612 | sn_partid = ia64_sn_sysctl_partition_get(cpuid_to_nasid(smp_processor_id())); | ||
613 | } | ||
614 | return sn_partid; | ||
615 | } | ||
616 | |||
617 | /* | ||
618 | * Returns the physical address of the partition's reserved page through | 589 | * Returns the physical address of the partition's reserved page through |
619 | * an iterative number of calls. | 590 | * an iterative number of calls. |
620 | * | 591 | * |
@@ -749,7 +720,8 @@ ia64_sn_power_down(void) | |||
749 | { | 720 | { |
750 | struct ia64_sal_retval ret_stuff; | 721 | struct ia64_sal_retval ret_stuff; |
751 | SAL_CALL(ret_stuff, SN_SAL_SYSTEM_POWER_DOWN, 0, 0, 0, 0, 0, 0, 0); | 722 | SAL_CALL(ret_stuff, SN_SAL_SYSTEM_POWER_DOWN, 0, 0, 0, 0, 0, 0, 0); |
752 | while(1); | 723 | while(1) |
724 | cpu_relax(); | ||
753 | /* never returns */ | 725 | /* never returns */ |
754 | } | 726 | } |
755 | 727 | ||
@@ -1018,24 +990,6 @@ ia64_sn_get_sn_info(int fc, u8 *shubtype, u16 *nasid_bitmask, u8 *nasid_shift, | |||
1018 | ret_stuff.v2 = 0; | 990 | ret_stuff.v2 = 0; |
1019 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); | 991 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); |
1020 | 992 | ||
1021 | /***** BEGIN HACK - temp til old proms no longer supported ********/ | ||
1022 | if (ret_stuff.status == SALRET_NOT_IMPLEMENTED) { | ||
1023 | int nasid = get_sapicid() & 0xfff;; | ||
1024 | #define SH_SHUB_ID_NODES_PER_BIT_MASK 0x001f000000000000UL | ||
1025 | #define SH_SHUB_ID_NODES_PER_BIT_SHFT 48 | ||
1026 | if (shubtype) *shubtype = 0; | ||
1027 | if (nasid_bitmask) *nasid_bitmask = 0x7ff; | ||
1028 | if (nasid_shift) *nasid_shift = 38; | ||
1029 | if (systemsize) *systemsize = 11; | ||
1030 | if (sharing_domain_size) *sharing_domain_size = 9; | ||
1031 | if (partid) *partid = ia64_sn_sysctl_partition_get(nasid); | ||
1032 | if (coher) *coher = nasid >> 9; | ||
1033 | if (reg) *reg = (HUB_L((u64 *) LOCAL_MMR_ADDR(SH1_SHUB_ID)) & SH_SHUB_ID_NODES_PER_BIT_MASK) >> | ||
1034 | SH_SHUB_ID_NODES_PER_BIT_SHFT; | ||
1035 | return 0; | ||
1036 | } | ||
1037 | /***** END HACK *******/ | ||
1038 | |||
1039 | if (ret_stuff.status < 0) | 993 | if (ret_stuff.status < 0) |
1040 | return ret_stuff.status; | 994 | return ret_stuff.status; |
1041 | 995 | ||
@@ -1068,12 +1022,10 @@ ia64_sn_hwperf_op(nasid_t nasid, u64 opcode, u64 a0, u64 a1, u64 a2, | |||
1068 | } | 1022 | } |
1069 | 1023 | ||
1070 | static inline int | 1024 | static inline int |
1071 | ia64_sn_ioif_get_pci_topology(u64 rack, u64 bay, u64 slot, u64 slab, | 1025 | ia64_sn_ioif_get_pci_topology(u64 buf, u64 len) |
1072 | u64 buf, u64 len) | ||
1073 | { | 1026 | { |
1074 | struct ia64_sal_retval rv; | 1027 | struct ia64_sal_retval rv; |
1075 | SAL_CALL_NOLOCK(rv, SN_SAL_IOIF_GET_PCI_TOPOLOGY, | 1028 | SAL_CALL_NOLOCK(rv, SN_SAL_IOIF_GET_PCI_TOPOLOGY, buf, len, 0, 0, 0, 0, 0); |
1076 | rack, bay, slot, slab, buf, len, 0); | ||
1077 | return (int) rv.status; | 1029 | return (int) rv.status; |
1078 | } | 1030 | } |
1079 | 1031 | ||
diff --git a/include/asm-ia64/sn/tioce.h b/include/asm-ia64/sn/tioce.h new file mode 100644 index 000000000000..22879853e46c --- /dev/null +++ b/include/asm-ia64/sn/tioce.h | |||
@@ -0,0 +1,740 @@ | |||
1 | /************************************************************************** | ||
2 | * * | ||
3 | * Unpublished copyright (c) 2005, Silicon Graphics, Inc. * | ||
4 | * THIS IS UNPUBLISHED CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF SGI. * | ||
5 | * * | ||
6 | * The copyright notice above does not evidence any actual or intended * | ||
7 | * publication or disclosure of this source code, which includes * | ||
8 | * information that is confidential and/or proprietary, and is a trade * | ||
9 | * secret, of Silicon Graphics, Inc. ANY REPRODUCTION, MODIFICATION, * | ||
10 | * DISTRIBUTION, PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH * | ||
11 | * USE OF THIS SOURCE CODE WITHOUT THE EXPRESS WRITTEN CONSENT OF * | ||
12 | * SILICON GRAPHICS, INC. IS STRICTLY PROHIBITED, AND IN VIOLATION OF * | ||
13 | * APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR * | ||
14 | * POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION DOES NOT * | ||
15 | * CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS * | ||
16 | * CONTENTS, OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY * | ||
17 | * DESCRIBE, IN WHOLE OR IN PART. * | ||
18 | * * | ||
19 | **************************************************************************/ | ||
20 | |||
21 | #ifndef __ASM_IA64_SN_TIOCE_H__ | ||
22 | #define __ASM_IA64_SN_TIOCE_H__ | ||
23 | |||
24 | /* CE ASIC part & mfgr information */ | ||
25 | #define TIOCE_PART_NUM 0xCE00 | ||
26 | #define TIOCE_MFGR_NUM 0x36 | ||
27 | #define TIOCE_REV_A 0x1 | ||
28 | |||
29 | /* CE Virtual PPB Vendor/Device IDs */ | ||
30 | #define CE_VIRT_PPB_VENDOR_ID 0x10a9 | ||
31 | #define CE_VIRT_PPB_DEVICE_ID 0x4002 | ||
32 | |||
33 | /* CE Host Bridge Vendor/Device IDs */ | ||
34 | #define CE_HOST_BRIDGE_VENDOR_ID 0x10a9 | ||
35 | #define CE_HOST_BRIDGE_DEVICE_ID 0x4003 | ||
36 | |||
37 | |||
38 | #define TIOCE_NUM_M40_ATES 4096 | ||
39 | #define TIOCE_NUM_M3240_ATES 2048 | ||
40 | #define TIOCE_NUM_PORTS 2 | ||
41 | |||
42 | /* | ||
43 | * Register layout for TIOCE. MMR offsets are shown at the far right of the | ||
44 | * structure definition. | ||
45 | */ | ||
46 | typedef volatile struct tioce { | ||
47 | /* | ||
48 | * ADMIN : Administration Registers | ||
49 | */ | ||
50 | uint64_t ce_adm_id; /* 0x000000 */ | ||
51 | uint64_t ce_pad_000008; /* 0x000008 */ | ||
52 | uint64_t ce_adm_dyn_credit_status; /* 0x000010 */ | ||
53 | uint64_t ce_adm_last_credit_status; /* 0x000018 */ | ||
54 | uint64_t ce_adm_credit_limit; /* 0x000020 */ | ||
55 | uint64_t ce_adm_force_credit; /* 0x000028 */ | ||
56 | uint64_t ce_adm_control; /* 0x000030 */ | ||
57 | uint64_t ce_adm_mmr_chn_timeout; /* 0x000038 */ | ||
58 | uint64_t ce_adm_ssp_ure_timeout; /* 0x000040 */ | ||
59 | uint64_t ce_adm_ssp_dre_timeout; /* 0x000048 */ | ||
60 | uint64_t ce_adm_ssp_debug_sel; /* 0x000050 */ | ||
61 | uint64_t ce_adm_int_status; /* 0x000058 */ | ||
62 | uint64_t ce_adm_int_status_alias; /* 0x000060 */ | ||
63 | uint64_t ce_adm_int_mask; /* 0x000068 */ | ||
64 | uint64_t ce_adm_int_pending; /* 0x000070 */ | ||
65 | uint64_t ce_adm_force_int; /* 0x000078 */ | ||
66 | uint64_t ce_adm_ure_ups_buf_barrier_flush; /* 0x000080 */ | ||
67 | uint64_t ce_adm_int_dest[15]; /* 0x000088 -- 0x0000F8 */ | ||
68 | uint64_t ce_adm_error_summary; /* 0x000100 */ | ||
69 | uint64_t ce_adm_error_summary_alias; /* 0x000108 */ | ||
70 | uint64_t ce_adm_error_mask; /* 0x000110 */ | ||
71 | uint64_t ce_adm_first_error; /* 0x000118 */ | ||
72 | uint64_t ce_adm_error_overflow; /* 0x000120 */ | ||
73 | uint64_t ce_adm_error_overflow_alias; /* 0x000128 */ | ||
74 | uint64_t ce_pad_000130[2]; /* 0x000130 -- 0x000138 */ | ||
75 | uint64_t ce_adm_tnum_error; /* 0x000140 */ | ||
76 | uint64_t ce_adm_mmr_err_detail; /* 0x000148 */ | ||
77 | uint64_t ce_adm_msg_sram_perr_detail; /* 0x000150 */ | ||
78 | uint64_t ce_adm_bap_sram_perr_detail; /* 0x000158 */ | ||
79 | uint64_t ce_adm_ce_sram_perr_detail; /* 0x000160 */ | ||
80 | uint64_t ce_adm_ce_credit_oflow_detail; /* 0x000168 */ | ||
81 | uint64_t ce_adm_tx_link_idle_max_timer; /* 0x000170 */ | ||
82 | uint64_t ce_adm_pcie_debug_sel; /* 0x000178 */ | ||
83 | uint64_t ce_pad_000180[16]; /* 0x000180 -- 0x0001F8 */ | ||
84 | |||
85 | uint64_t ce_adm_pcie_debug_sel_top; /* 0x000200 */ | ||
86 | uint64_t ce_adm_pcie_debug_lat_sel_lo_top; /* 0x000208 */ | ||
87 | uint64_t ce_adm_pcie_debug_lat_sel_hi_top; /* 0x000210 */ | ||
88 | uint64_t ce_adm_pcie_debug_trig_sel_top; /* 0x000218 */ | ||
89 | uint64_t ce_adm_pcie_debug_trig_lat_sel_lo_top; /* 0x000220 */ | ||
90 | uint64_t ce_adm_pcie_debug_trig_lat_sel_hi_top; /* 0x000228 */ | ||
91 | uint64_t ce_adm_pcie_trig_compare_top; /* 0x000230 */ | ||
92 | uint64_t ce_adm_pcie_trig_compare_en_top; /* 0x000238 */ | ||
93 | uint64_t ce_adm_ssp_debug_sel_top; /* 0x000240 */ | ||
94 | uint64_t ce_adm_ssp_debug_lat_sel_lo_top; /* 0x000248 */ | ||
95 | uint64_t ce_adm_ssp_debug_lat_sel_hi_top; /* 0x000250 */ | ||
96 | uint64_t ce_adm_ssp_debug_trig_sel_top; /* 0x000258 */ | ||
97 | uint64_t ce_adm_ssp_debug_trig_lat_sel_lo_top; /* 0x000260 */ | ||
98 | uint64_t ce_adm_ssp_debug_trig_lat_sel_hi_top; /* 0x000268 */ | ||
99 | uint64_t ce_adm_ssp_trig_compare_top; /* 0x000270 */ | ||
100 | uint64_t ce_adm_ssp_trig_compare_en_top; /* 0x000278 */ | ||
101 | uint64_t ce_pad_000280[48]; /* 0x000280 -- 0x0003F8 */ | ||
102 | |||
103 | uint64_t ce_adm_bap_ctrl; /* 0x000400 */ | ||
104 | uint64_t ce_pad_000408[127]; /* 0x000408 -- 0x0007F8 */ | ||
105 | |||
106 | uint64_t ce_msg_buf_data63_0[35]; /* 0x000800 -- 0x000918 */ | ||
107 | uint64_t ce_pad_000920[29]; /* 0x000920 -- 0x0009F8 */ | ||
108 | |||
109 | uint64_t ce_msg_buf_data127_64[35]; /* 0x000A00 -- 0x000B18 */ | ||
110 | uint64_t ce_pad_000B20[29]; /* 0x000B20 -- 0x000BF8 */ | ||
111 | |||
112 | uint64_t ce_msg_buf_parity[35]; /* 0x000C00 -- 0x000D18 */ | ||
113 | uint64_t ce_pad_000D20[29]; /* 0x000D20 -- 0x000DF8 */ | ||
114 | |||
115 | uint64_t ce_pad_000E00[576]; /* 0x000E00 -- 0x001FF8 */ | ||
116 | |||
117 | /* | ||
118 | * LSI : LSI's PCI Express Link Registers (Link#1 and Link#2) | ||
119 | * Link#1 MMRs at start at 0x002000, Link#2 MMRs at 0x003000 | ||
120 | * NOTE: the comment offsets at far right: let 'z' = {2 or 3} | ||
121 | */ | ||
122 | #define ce_lsi(link_num) ce_lsi[link_num-1] | ||
123 | struct ce_lsi_reg { | ||
124 | uint64_t ce_lsi_lpu_id; /* 0x00z000 */ | ||
125 | uint64_t ce_lsi_rst; /* 0x00z008 */ | ||
126 | uint64_t ce_lsi_dbg_stat; /* 0x00z010 */ | ||
127 | uint64_t ce_lsi_dbg_cfg; /* 0x00z018 */ | ||
128 | uint64_t ce_lsi_ltssm_ctrl; /* 0x00z020 */ | ||
129 | uint64_t ce_lsi_lk_stat; /* 0x00z028 */ | ||
130 | uint64_t ce_pad_00z030[2]; /* 0x00z030 -- 0x00z038 */ | ||
131 | uint64_t ce_lsi_int_and_stat; /* 0x00z040 */ | ||
132 | uint64_t ce_lsi_int_mask; /* 0x00z048 */ | ||
133 | uint64_t ce_pad_00z050[22]; /* 0x00z050 -- 0x00z0F8 */ | ||
134 | uint64_t ce_lsi_lk_perf_cnt_sel; /* 0x00z100 */ | ||
135 | uint64_t ce_pad_00z108; /* 0x00z108 */ | ||
136 | uint64_t ce_lsi_lk_perf_cnt_ctrl; /* 0x00z110 */ | ||
137 | uint64_t ce_pad_00z118; /* 0x00z118 */ | ||
138 | uint64_t ce_lsi_lk_perf_cnt1; /* 0x00z120 */ | ||
139 | uint64_t ce_lsi_lk_perf_cnt1_test; /* 0x00z128 */ | ||
140 | uint64_t ce_lsi_lk_perf_cnt2; /* 0x00z130 */ | ||
141 | uint64_t ce_lsi_lk_perf_cnt2_test; /* 0x00z138 */ | ||
142 | uint64_t ce_pad_00z140[24]; /* 0x00z140 -- 0x00z1F8 */ | ||
143 | uint64_t ce_lsi_lk_lyr_cfg; /* 0x00z200 */ | ||
144 | uint64_t ce_lsi_lk_lyr_status; /* 0x00z208 */ | ||
145 | uint64_t ce_lsi_lk_lyr_int_stat; /* 0x00z210 */ | ||
146 | uint64_t ce_lsi_lk_ly_int_stat_test; /* 0x00z218 */ | ||
147 | uint64_t ce_lsi_lk_ly_int_stat_mask; /* 0x00z220 */ | ||
148 | uint64_t ce_pad_00z228[3]; /* 0x00z228 -- 0x00z238 */ | ||
149 | uint64_t ce_lsi_fc_upd_ctl; /* 0x00z240 */ | ||
150 | uint64_t ce_pad_00z248[3]; /* 0x00z248 -- 0x00z258 */ | ||
151 | uint64_t ce_lsi_flw_ctl_upd_to_timer; /* 0x00z260 */ | ||
152 | uint64_t ce_lsi_flw_ctl_upd_timer0; /* 0x00z268 */ | ||
153 | uint64_t ce_lsi_flw_ctl_upd_timer1; /* 0x00z270 */ | ||
154 | uint64_t ce_pad_00z278[49]; /* 0x00z278 -- 0x00z3F8 */ | ||
155 | uint64_t ce_lsi_freq_nak_lat_thrsh; /* 0x00z400 */ | ||
156 | uint64_t ce_lsi_ack_nak_lat_tmr; /* 0x00z408 */ | ||
157 | uint64_t ce_lsi_rply_tmr_thr; /* 0x00z410 */ | ||
158 | uint64_t ce_lsi_rply_tmr; /* 0x00z418 */ | ||
159 | uint64_t ce_lsi_rply_num_stat; /* 0x00z420 */ | ||
160 | uint64_t ce_lsi_rty_buf_max_addr; /* 0x00z428 */ | ||
161 | uint64_t ce_lsi_rty_fifo_ptr; /* 0x00z430 */ | ||
162 | uint64_t ce_lsi_rty_fifo_rd_wr_ptr; /* 0x00z438 */ | ||
163 | uint64_t ce_lsi_rty_fifo_cred; /* 0x00z440 */ | ||
164 | uint64_t ce_lsi_seq_cnt; /* 0x00z448 */ | ||
165 | uint64_t ce_lsi_ack_sent_seq_num; /* 0x00z450 */ | ||
166 | uint64_t ce_lsi_seq_cnt_fifo_max_addr; /* 0x00z458 */ | ||
167 | uint64_t ce_lsi_seq_cnt_fifo_ptr; /* 0x00z460 */ | ||
168 | uint64_t ce_lsi_seq_cnt_rd_wr_ptr; /* 0x00z468 */ | ||
169 | uint64_t ce_lsi_tx_lk_ts_ctl; /* 0x00z470 */ | ||
170 | uint64_t ce_pad_00z478; /* 0x00z478 */ | ||
171 | uint64_t ce_lsi_mem_addr_ctl; /* 0x00z480 */ | ||
172 | uint64_t ce_lsi_mem_d_ld0; /* 0x00z488 */ | ||
173 | uint64_t ce_lsi_mem_d_ld1; /* 0x00z490 */ | ||
174 | uint64_t ce_lsi_mem_d_ld2; /* 0x00z498 */ | ||
175 | uint64_t ce_lsi_mem_d_ld3; /* 0x00z4A0 */ | ||
176 | uint64_t ce_lsi_mem_d_ld4; /* 0x00z4A8 */ | ||
177 | uint64_t ce_pad_00z4B0[2]; /* 0x00z4B0 -- 0x00z4B8 */ | ||
178 | uint64_t ce_lsi_rty_d_cnt; /* 0x00z4C0 */ | ||
179 | uint64_t ce_lsi_seq_buf_cnt; /* 0x00z4C8 */ | ||
180 | uint64_t ce_lsi_seq_buf_bt_d; /* 0x00z4D0 */ | ||
181 | uint64_t ce_pad_00z4D8; /* 0x00z4D8 */ | ||
182 | uint64_t ce_lsi_ack_lat_thr; /* 0x00z4E0 */ | ||
183 | uint64_t ce_pad_00z4E8[3]; /* 0x00z4E8 -- 0x00z4F8 */ | ||
184 | uint64_t ce_lsi_nxt_rcv_seq_1_cntr; /* 0x00z500 */ | ||
185 | uint64_t ce_lsi_unsp_dllp_rcvd; /* 0x00z508 */ | ||
186 | uint64_t ce_lsi_rcv_lk_ts_ctl; /* 0x00z510 */ | ||
187 | uint64_t ce_pad_00z518[29]; /* 0x00z518 -- 0x00z5F8 */ | ||
188 | uint64_t ce_lsi_phy_lyr_cfg; /* 0x00z600 */ | ||
189 | uint64_t ce_pad_00z608; /* 0x00z608 */ | ||
190 | uint64_t ce_lsi_phy_lyr_int_stat; /* 0x00z610 */ | ||
191 | uint64_t ce_lsi_phy_lyr_int_stat_test; /* 0x00z618 */ | ||
192 | uint64_t ce_lsi_phy_lyr_int_mask; /* 0x00z620 */ | ||
193 | uint64_t ce_pad_00z628[11]; /* 0x00z628 -- 0x00z678 */ | ||
194 | uint64_t ce_lsi_rcv_phy_cfg; /* 0x00z680 */ | ||
195 | uint64_t ce_lsi_rcv_phy_stat1; /* 0x00z688 */ | ||
196 | uint64_t ce_lsi_rcv_phy_stat2; /* 0x00z690 */ | ||
197 | uint64_t ce_lsi_rcv_phy_stat3; /* 0x00z698 */ | ||
198 | uint64_t ce_lsi_rcv_phy_int_stat; /* 0x00z6A0 */ | ||
199 | uint64_t ce_lsi_rcv_phy_int_stat_test; /* 0x00z6A8 */ | ||
200 | uint64_t ce_lsi_rcv_phy_int_mask; /* 0x00z6B0 */ | ||
201 | uint64_t ce_pad_00z6B8[9]; /* 0x00z6B8 -- 0x00z6F8 */ | ||
202 | uint64_t ce_lsi_tx_phy_cfg; /* 0x00z700 */ | ||
203 | uint64_t ce_lsi_tx_phy_stat; /* 0x00z708 */ | ||
204 | uint64_t ce_lsi_tx_phy_int_stat; /* 0x00z710 */ | ||
205 | uint64_t ce_lsi_tx_phy_int_stat_test; /* 0x00z718 */ | ||
206 | uint64_t ce_lsi_tx_phy_int_mask; /* 0x00z720 */ | ||
207 | uint64_t ce_lsi_tx_phy_stat2; /* 0x00z728 */ | ||
208 | uint64_t ce_pad_00z730[10]; /* 0x00z730 -- 0x00z77F */ | ||
209 | uint64_t ce_lsi_ltssm_cfg1; /* 0x00z780 */ | ||
210 | uint64_t ce_lsi_ltssm_cfg2; /* 0x00z788 */ | ||
211 | uint64_t ce_lsi_ltssm_cfg3; /* 0x00z790 */ | ||
212 | uint64_t ce_lsi_ltssm_cfg4; /* 0x00z798 */ | ||
213 | uint64_t ce_lsi_ltssm_cfg5; /* 0x00z7A0 */ | ||
214 | uint64_t ce_lsi_ltssm_stat1; /* 0x00z7A8 */ | ||
215 | uint64_t ce_lsi_ltssm_stat2; /* 0x00z7B0 */ | ||
216 | uint64_t ce_lsi_ltssm_int_stat; /* 0x00z7B8 */ | ||
217 | uint64_t ce_lsi_ltssm_int_stat_test; /* 0x00z7C0 */ | ||
218 | uint64_t ce_lsi_ltssm_int_mask; /* 0x00z7C8 */ | ||
219 | uint64_t ce_lsi_ltssm_stat_wr_en; /* 0x00z7D0 */ | ||
220 | uint64_t ce_pad_00z7D8[5]; /* 0x00z7D8 -- 0x00z7F8 */ | ||
221 | uint64_t ce_lsi_gb_cfg1; /* 0x00z800 */ | ||
222 | uint64_t ce_lsi_gb_cfg2; /* 0x00z808 */ | ||
223 | uint64_t ce_lsi_gb_cfg3; /* 0x00z810 */ | ||
224 | uint64_t ce_lsi_gb_cfg4; /* 0x00z818 */ | ||
225 | uint64_t ce_lsi_gb_stat; /* 0x00z820 */ | ||
226 | uint64_t ce_lsi_gb_int_stat; /* 0x00z828 */ | ||
227 | uint64_t ce_lsi_gb_int_stat_test; /* 0x00z830 */ | ||
228 | uint64_t ce_lsi_gb_int_mask; /* 0x00z838 */ | ||
229 | uint64_t ce_lsi_gb_pwr_dn1; /* 0x00z840 */ | ||
230 | uint64_t ce_lsi_gb_pwr_dn2; /* 0x00z848 */ | ||
231 | uint64_t ce_pad_00z850[246]; /* 0x00z850 -- 0x00zFF8 */ | ||
232 | } ce_lsi[2]; | ||
233 | |||
234 | uint64_t ce_pad_004000[10]; /* 0x004000 -- 0x004048 */ | ||
235 | |||
236 | /* | ||
237 | * CRM: Coretalk Receive Module Registers | ||
238 | */ | ||
239 | uint64_t ce_crm_debug_mux; /* 0x004050 */ | ||
240 | uint64_t ce_pad_004058; /* 0x004058 */ | ||
241 | uint64_t ce_crm_ssp_err_cmd_wrd; /* 0x004060 */ | ||
242 | uint64_t ce_crm_ssp_err_addr; /* 0x004068 */ | ||
243 | uint64_t ce_crm_ssp_err_syn; /* 0x004070 */ | ||
244 | |||
245 | uint64_t ce_pad_004078[499]; /* 0x004078 -- 0x005008 */ | ||
246 | |||
247 | /* | ||
248 | * CXM: Coretalk Xmit Module Registers | ||
249 | */ | ||
250 | uint64_t ce_cxm_dyn_credit_status; /* 0x005010 */ | ||
251 | uint64_t ce_cxm_last_credit_status; /* 0x005018 */ | ||
252 | uint64_t ce_cxm_credit_limit; /* 0x005020 */ | ||
253 | uint64_t ce_cxm_force_credit; /* 0x005028 */ | ||
254 | uint64_t ce_cxm_disable_bypass; /* 0x005030 */ | ||
255 | uint64_t ce_pad_005038[3]; /* 0x005038 -- 0x005048 */ | ||
256 | uint64_t ce_cxm_debug_mux; /* 0x005050 */ | ||
257 | |||
258 | uint64_t ce_pad_005058[501]; /* 0x005058 -- 0x005FF8 */ | ||
259 | |||
260 | /* | ||
261 | * DTL: Downstream Transaction Layer Regs (Link#1 and Link#2) | ||
262 | * DTL: Link#1 MMRs at start at 0x006000, Link#2 MMRs at 0x008000 | ||
263 | * DTL: the comment offsets at far right: let 'y' = {6 or 8} | ||
264 | * | ||
265 | * UTL: Downstream Transaction Layer Regs (Link#1 and Link#2) | ||
266 | * UTL: Link#1 MMRs at start at 0x007000, Link#2 MMRs at 0x009000 | ||
267 | * UTL: the comment offsets at far right: let 'z' = {7 or 9} | ||
268 | */ | ||
269 | #define ce_dtl(link_num) ce_dtl_utl[link_num-1] | ||
270 | #define ce_utl(link_num) ce_dtl_utl[link_num-1] | ||
271 | struct ce_dtl_utl_reg { | ||
272 | /* DTL */ | ||
273 | uint64_t ce_dtl_dtdr_credit_limit; /* 0x00y000 */ | ||
274 | uint64_t ce_dtl_dtdr_credit_force; /* 0x00y008 */ | ||
275 | uint64_t ce_dtl_dyn_credit_status; /* 0x00y010 */ | ||
276 | uint64_t ce_dtl_dtl_last_credit_stat; /* 0x00y018 */ | ||
277 | uint64_t ce_dtl_dtl_ctrl; /* 0x00y020 */ | ||
278 | uint64_t ce_pad_00y028[5]; /* 0x00y028 -- 0x00y048 */ | ||
279 | uint64_t ce_dtl_debug_sel; /* 0x00y050 */ | ||
280 | uint64_t ce_pad_00y058[501]; /* 0x00y058 -- 0x00yFF8 */ | ||
281 | |||
282 | /* UTL */ | ||
283 | uint64_t ce_utl_utl_ctrl; /* 0x00z000 */ | ||
284 | uint64_t ce_utl_debug_sel; /* 0x00z008 */ | ||
285 | uint64_t ce_pad_00z010[510]; /* 0x00z010 -- 0x00zFF8 */ | ||
286 | } ce_dtl_utl[2]; | ||
287 | |||
288 | uint64_t ce_pad_00A000[514]; /* 0x00A000 -- 0x00B008 */ | ||
289 | |||
290 | /* | ||
291 | * URE: Upstream Request Engine | ||
292 | */ | ||
293 | uint64_t ce_ure_dyn_credit_status; /* 0x00B010 */ | ||
294 | uint64_t ce_ure_last_credit_status; /* 0x00B018 */ | ||
295 | uint64_t ce_ure_credit_limit; /* 0x00B020 */ | ||
296 | uint64_t ce_pad_00B028; /* 0x00B028 */ | ||
297 | uint64_t ce_ure_control; /* 0x00B030 */ | ||
298 | uint64_t ce_ure_status; /* 0x00B038 */ | ||
299 | uint64_t ce_pad_00B040[2]; /* 0x00B040 -- 0x00B048 */ | ||
300 | uint64_t ce_ure_debug_sel; /* 0x00B050 */ | ||
301 | uint64_t ce_ure_pcie_debug_sel; /* 0x00B058 */ | ||
302 | uint64_t ce_ure_ssp_err_cmd_wrd; /* 0x00B060 */ | ||
303 | uint64_t ce_ure_ssp_err_addr; /* 0x00B068 */ | ||
304 | uint64_t ce_ure_page_map; /* 0x00B070 */ | ||
305 | uint64_t ce_ure_dir_map[TIOCE_NUM_PORTS]; /* 0x00B078 */ | ||
306 | uint64_t ce_ure_pipe_sel1; /* 0x00B088 */ | ||
307 | uint64_t ce_ure_pipe_mask1; /* 0x00B090 */ | ||
308 | uint64_t ce_ure_pipe_sel2; /* 0x00B098 */ | ||
309 | uint64_t ce_ure_pipe_mask2; /* 0x00B0A0 */ | ||
310 | uint64_t ce_ure_pcie1_credits_sent; /* 0x00B0A8 */ | ||
311 | uint64_t ce_ure_pcie1_credits_used; /* 0x00B0B0 */ | ||
312 | uint64_t ce_ure_pcie1_credit_limit; /* 0x00B0B8 */ | ||
313 | uint64_t ce_ure_pcie2_credits_sent; /* 0x00B0C0 */ | ||
314 | uint64_t ce_ure_pcie2_credits_used; /* 0x00B0C8 */ | ||
315 | uint64_t ce_ure_pcie2_credit_limit; /* 0x00B0D0 */ | ||
316 | uint64_t ce_ure_pcie_force_credit; /* 0x00B0D8 */ | ||
317 | uint64_t ce_ure_rd_tnum_val; /* 0x00B0E0 */ | ||
318 | uint64_t ce_ure_rd_tnum_rsp_rcvd; /* 0x00B0E8 */ | ||
319 | uint64_t ce_ure_rd_tnum_esent_timer; /* 0x00B0F0 */ | ||
320 | uint64_t ce_ure_rd_tnum_error; /* 0x00B0F8 */ | ||
321 | uint64_t ce_ure_rd_tnum_first_cl; /* 0x00B100 */ | ||
322 | uint64_t ce_ure_rd_tnum_link_buf; /* 0x00B108 */ | ||
323 | uint64_t ce_ure_wr_tnum_val; /* 0x00B110 */ | ||
324 | uint64_t ce_ure_sram_err_addr0; /* 0x00B118 */ | ||
325 | uint64_t ce_ure_sram_err_addr1; /* 0x00B120 */ | ||
326 | uint64_t ce_ure_sram_err_addr2; /* 0x00B128 */ | ||
327 | uint64_t ce_ure_sram_rd_addr0; /* 0x00B130 */ | ||
328 | uint64_t ce_ure_sram_rd_addr1; /* 0x00B138 */ | ||
329 | uint64_t ce_ure_sram_rd_addr2; /* 0x00B140 */ | ||
330 | uint64_t ce_ure_sram_wr_addr0; /* 0x00B148 */ | ||
331 | uint64_t ce_ure_sram_wr_addr1; /* 0x00B150 */ | ||
332 | uint64_t ce_ure_sram_wr_addr2; /* 0x00B158 */ | ||
333 | uint64_t ce_ure_buf_flush10; /* 0x00B160 */ | ||
334 | uint64_t ce_ure_buf_flush11; /* 0x00B168 */ | ||
335 | uint64_t ce_ure_buf_flush12; /* 0x00B170 */ | ||
336 | uint64_t ce_ure_buf_flush13; /* 0x00B178 */ | ||
337 | uint64_t ce_ure_buf_flush20; /* 0x00B180 */ | ||
338 | uint64_t ce_ure_buf_flush21; /* 0x00B188 */ | ||
339 | uint64_t ce_ure_buf_flush22; /* 0x00B190 */ | ||
340 | uint64_t ce_ure_buf_flush23; /* 0x00B198 */ | ||
341 | uint64_t ce_ure_pcie_control1; /* 0x00B1A0 */ | ||
342 | uint64_t ce_ure_pcie_control2; /* 0x00B1A8 */ | ||
343 | |||
344 | uint64_t ce_pad_00B1B0[458]; /* 0x00B1B0 -- 0x00BFF8 */ | ||
345 | |||
346 | /* Upstream Data Buffer, Port1 */ | ||
347 | struct ce_ure_maint_ups_dat1_data { | ||
348 | uint64_t data63_0[512]; /* 0x00C000 -- 0x00CFF8 */ | ||
349 | uint64_t data127_64[512]; /* 0x00D000 -- 0x00DFF8 */ | ||
350 | uint64_t parity[512]; /* 0x00E000 -- 0x00EFF8 */ | ||
351 | } ce_ure_maint_ups_dat1; | ||
352 | |||
353 | /* Upstream Header Buffer, Port1 */ | ||
354 | struct ce_ure_maint_ups_hdr1_data { | ||
355 | uint64_t data63_0[512]; /* 0x00F000 -- 0x00FFF8 */ | ||
356 | uint64_t data127_64[512]; /* 0x010000 -- 0x010FF8 */ | ||
357 | uint64_t parity[512]; /* 0x011000 -- 0x011FF8 */ | ||
358 | } ce_ure_maint_ups_hdr1; | ||
359 | |||
360 | /* Upstream Data Buffer, Port2 */ | ||
361 | struct ce_ure_maint_ups_dat2_data { | ||
362 | uint64_t data63_0[512]; /* 0x012000 -- 0x012FF8 */ | ||
363 | uint64_t data127_64[512]; /* 0x013000 -- 0x013FF8 */ | ||
364 | uint64_t parity[512]; /* 0x014000 -- 0x014FF8 */ | ||
365 | } ce_ure_maint_ups_dat2; | ||
366 | |||
367 | /* Upstream Header Buffer, Port2 */ | ||
368 | struct ce_ure_maint_ups_hdr2_data { | ||
369 | uint64_t data63_0[512]; /* 0x015000 -- 0x015FF8 */ | ||
370 | uint64_t data127_64[512]; /* 0x016000 -- 0x016FF8 */ | ||
371 | uint64_t parity[512]; /* 0x017000 -- 0x017FF8 */ | ||
372 | } ce_ure_maint_ups_hdr2; | ||
373 | |||
374 | /* Downstream Data Buffer */ | ||
375 | struct ce_ure_maint_dns_dat_data { | ||
376 | uint64_t data63_0[512]; /* 0x018000 -- 0x018FF8 */ | ||
377 | uint64_t data127_64[512]; /* 0x019000 -- 0x019FF8 */ | ||
378 | uint64_t parity[512]; /* 0x01A000 -- 0x01AFF8 */ | ||
379 | } ce_ure_maint_dns_dat; | ||
380 | |||
381 | /* Downstream Header Buffer */ | ||
382 | struct ce_ure_maint_dns_hdr_data { | ||
383 | uint64_t data31_0[64]; /* 0x01B000 -- 0x01B1F8 */ | ||
384 | uint64_t data95_32[64]; /* 0x01B200 -- 0x01B3F8 */ | ||
385 | uint64_t parity[64]; /* 0x01B400 -- 0x01B5F8 */ | ||
386 | } ce_ure_maint_dns_hdr; | ||
387 | |||
388 | /* RCI Buffer Data */ | ||
389 | struct ce_ure_maint_rci_data { | ||
390 | uint64_t data41_0[64]; /* 0x01B600 -- 0x01B7F8 */ | ||
391 | uint64_t data69_42[64]; /* 0x01B800 -- 0x01B9F8 */ | ||
392 | } ce_ure_maint_rci; | ||
393 | |||
394 | /* Response Queue */ | ||
395 | uint64_t ce_ure_maint_rspq[64]; /* 0x01BA00 -- 0x01BBF8 */ | ||
396 | |||
397 | uint64_t ce_pad_01C000[4224]; /* 0x01BC00 -- 0x023FF8 */ | ||
398 | |||
399 | /* Admin Build-a-Packet Buffer */ | ||
400 | struct ce_adm_maint_bap_buf_data { | ||
401 | uint64_t data63_0[258]; /* 0x024000 -- 0x024808 */ | ||
402 | uint64_t data127_64[258]; /* 0x024810 -- 0x025018 */ | ||
403 | uint64_t parity[258]; /* 0x025020 -- 0x025828 */ | ||
404 | } ce_adm_maint_bap_buf; | ||
405 | |||
406 | uint64_t ce_pad_025830[5370]; /* 0x025830 -- 0x02FFF8 */ | ||
407 | |||
408 | /* URE: 40bit PMU ATE Buffer */ /* 0x030000 -- 0x037FF8 */ | ||
409 | uint64_t ce_ure_ate40[TIOCE_NUM_M40_ATES]; | ||
410 | |||
411 | /* URE: 32/40bit PMU ATE Buffer */ /* 0x038000 -- 0x03BFF8 */ | ||
412 | uint64_t ce_ure_ate3240[TIOCE_NUM_M3240_ATES]; | ||
413 | |||
414 | uint64_t ce_pad_03C000[2050]; /* 0x03C000 -- 0x040008 */ | ||
415 | |||
416 | /* | ||
417 | * DRE: Down Stream Request Engine | ||
418 | */ | ||
419 | uint64_t ce_dre_dyn_credit_status1; /* 0x040010 */ | ||
420 | uint64_t ce_dre_dyn_credit_status2; /* 0x040018 */ | ||
421 | uint64_t ce_dre_last_credit_status1; /* 0x040020 */ | ||
422 | uint64_t ce_dre_last_credit_status2; /* 0x040028 */ | ||
423 | uint64_t ce_dre_credit_limit1; /* 0x040030 */ | ||
424 | uint64_t ce_dre_credit_limit2; /* 0x040038 */ | ||
425 | uint64_t ce_dre_force_credit1; /* 0x040040 */ | ||
426 | uint64_t ce_dre_force_credit2; /* 0x040048 */ | ||
427 | uint64_t ce_dre_debug_mux1; /* 0x040050 */ | ||
428 | uint64_t ce_dre_debug_mux2; /* 0x040058 */ | ||
429 | uint64_t ce_dre_ssp_err_cmd_wrd; /* 0x040060 */ | ||
430 | uint64_t ce_dre_ssp_err_addr; /* 0x040068 */ | ||
431 | uint64_t ce_dre_comp_err_cmd_wrd; /* 0x040070 */ | ||
432 | uint64_t ce_dre_comp_err_addr; /* 0x040078 */ | ||
433 | uint64_t ce_dre_req_status; /* 0x040080 */ | ||
434 | uint64_t ce_dre_config1; /* 0x040088 */ | ||
435 | uint64_t ce_dre_config2; /* 0x040090 */ | ||
436 | uint64_t ce_dre_config_req_status; /* 0x040098 */ | ||
437 | uint64_t ce_pad_0400A0[12]; /* 0x0400A0 -- 0x0400F8 */ | ||
438 | uint64_t ce_dre_dyn_fifo; /* 0x040100 */ | ||
439 | uint64_t ce_pad_040108[3]; /* 0x040108 -- 0x040118 */ | ||
440 | uint64_t ce_dre_last_fifo; /* 0x040120 */ | ||
441 | |||
442 | uint64_t ce_pad_040128[27]; /* 0x040128 -- 0x0401F8 */ | ||
443 | |||
444 | /* DRE Downstream Head Queue */ | ||
445 | struct ce_dre_maint_ds_head_queue { | ||
446 | uint64_t data63_0[32]; /* 0x040200 -- 0x0402F8 */ | ||
447 | uint64_t data127_64[32]; /* 0x040300 -- 0x0403F8 */ | ||
448 | uint64_t parity[32]; /* 0x040400 -- 0x0404F8 */ | ||
449 | } ce_dre_maint_ds_head_q; | ||
450 | |||
451 | uint64_t ce_pad_040500[352]; /* 0x040500 -- 0x040FF8 */ | ||
452 | |||
453 | /* DRE Downstream Data Queue */ | ||
454 | struct ce_dre_maint_ds_data_queue { | ||
455 | uint64_t data63_0[256]; /* 0x041000 -- 0x0417F8 */ | ||
456 | uint64_t ce_pad_041800[256]; /* 0x041800 -- 0x041FF8 */ | ||
457 | uint64_t data127_64[256]; /* 0x042000 -- 0x0427F8 */ | ||
458 | uint64_t ce_pad_042800[256]; /* 0x042800 -- 0x042FF8 */ | ||
459 | uint64_t parity[256]; /* 0x043000 -- 0x0437F8 */ | ||
460 | uint64_t ce_pad_043800[256]; /* 0x043800 -- 0x043FF8 */ | ||
461 | } ce_dre_maint_ds_data_q; | ||
462 | |||
463 | /* DRE URE Upstream Response Queue */ | ||
464 | struct ce_dre_maint_ure_us_rsp_queue { | ||
465 | uint64_t data63_0[8]; /* 0x044000 -- 0x044038 */ | ||
466 | uint64_t ce_pad_044040[24]; /* 0x044040 -- 0x0440F8 */ | ||
467 | uint64_t data127_64[8]; /* 0x044100 -- 0x044138 */ | ||
468 | uint64_t ce_pad_044140[24]; /* 0x044140 -- 0x0441F8 */ | ||
469 | uint64_t parity[8]; /* 0x044200 -- 0x044238 */ | ||
470 | uint64_t ce_pad_044240[24]; /* 0x044240 -- 0x0442F8 */ | ||
471 | } ce_dre_maint_ure_us_rsp_q; | ||
472 | |||
473 | uint64_t ce_dre_maint_us_wrt_rsp[32];/* 0x044300 -- 0x0443F8 */ | ||
474 | |||
475 | uint64_t ce_end_of_struct; /* 0x044400 */ | ||
476 | } tioce_t; | ||
477 | |||
478 | |||
479 | /* ce_adm_int_mask/ce_adm_int_status register bit defines */ | ||
480 | #define CE_ADM_INT_CE_ERROR_SHFT 0 | ||
481 | #define CE_ADM_INT_LSI1_IP_ERROR_SHFT 1 | ||
482 | #define CE_ADM_INT_LSI2_IP_ERROR_SHFT 2 | ||
483 | #define CE_ADM_INT_PCIE_ERROR_SHFT 3 | ||
484 | #define CE_ADM_INT_PORT1_HOTPLUG_EVENT_SHFT 4 | ||
485 | #define CE_ADM_INT_PORT2_HOTPLUG_EVENT_SHFT 5 | ||
486 | #define CE_ADM_INT_PCIE_PORT1_DEV_A_SHFT 6 | ||
487 | #define CE_ADM_INT_PCIE_PORT1_DEV_B_SHFT 7 | ||
488 | #define CE_ADM_INT_PCIE_PORT1_DEV_C_SHFT 8 | ||
489 | #define CE_ADM_INT_PCIE_PORT1_DEV_D_SHFT 9 | ||
490 | #define CE_ADM_INT_PCIE_PORT2_DEV_A_SHFT 10 | ||
491 | #define CE_ADM_INT_PCIE_PORT2_DEV_B_SHFT 11 | ||
492 | #define CE_ADM_INT_PCIE_PORT2_DEV_C_SHFT 12 | ||
493 | #define CE_ADM_INT_PCIE_PORT2_DEV_D_SHFT 13 | ||
494 | #define CE_ADM_INT_PCIE_MSG_SHFT 14 /*see int_dest_14*/ | ||
495 | #define CE_ADM_INT_PCIE_MSG_SLOT_0_SHFT 14 | ||
496 | #define CE_ADM_INT_PCIE_MSG_SLOT_1_SHFT 15 | ||
497 | #define CE_ADM_INT_PCIE_MSG_SLOT_2_SHFT 16 | ||
498 | #define CE_ADM_INT_PCIE_MSG_SLOT_3_SHFT 17 | ||
499 | #define CE_ADM_INT_PORT1_PM_PME_MSG_SHFT 22 | ||
500 | #define CE_ADM_INT_PORT2_PM_PME_MSG_SHFT 23 | ||
501 | |||
502 | /* ce_adm_force_int register bit defines */ | ||
503 | #define CE_ADM_FORCE_INT_PCIE_PORT1_DEV_A_SHFT 0 | ||
504 | #define CE_ADM_FORCE_INT_PCIE_PORT1_DEV_B_SHFT 1 | ||
505 | #define CE_ADM_FORCE_INT_PCIE_PORT1_DEV_C_SHFT 2 | ||
506 | #define CE_ADM_FORCE_INT_PCIE_PORT1_DEV_D_SHFT 3 | ||
507 | #define CE_ADM_FORCE_INT_PCIE_PORT2_DEV_A_SHFT 4 | ||
508 | #define CE_ADM_FORCE_INT_PCIE_PORT2_DEV_B_SHFT 5 | ||
509 | #define CE_ADM_FORCE_INT_PCIE_PORT2_DEV_C_SHFT 6 | ||
510 | #define CE_ADM_FORCE_INT_PCIE_PORT2_DEV_D_SHFT 7 | ||
511 | #define CE_ADM_FORCE_INT_ALWAYS_SHFT 8 | ||
512 | |||
513 | /* ce_adm_int_dest register bit masks & shifts */ | ||
514 | #define INTR_VECTOR_SHFT 56 | ||
515 | |||
516 | /* ce_adm_error_mask and ce_adm_error_summary register bit masks */ | ||
517 | #define CE_ADM_ERR_CRM_SSP_REQ_INVALID (0x1ULL << 0) | ||
518 | #define CE_ADM_ERR_SSP_REQ_HEADER (0x1ULL << 1) | ||
519 | #define CE_ADM_ERR_SSP_RSP_HEADER (0x1ULL << 2) | ||
520 | #define CE_ADM_ERR_SSP_PROTOCOL_ERROR (0x1ULL << 3) | ||
521 | #define CE_ADM_ERR_SSP_SBE (0x1ULL << 4) | ||
522 | #define CE_ADM_ERR_SSP_MBE (0x1ULL << 5) | ||
523 | #define CE_ADM_ERR_CXM_CREDIT_OFLOW (0x1ULL << 6) | ||
524 | #define CE_ADM_ERR_DRE_SSP_REQ_INVAL (0x1ULL << 7) | ||
525 | #define CE_ADM_ERR_SSP_REQ_LONG (0x1ULL << 8) | ||
526 | #define CE_ADM_ERR_SSP_REQ_OFLOW (0x1ULL << 9) | ||
527 | #define CE_ADM_ERR_SSP_REQ_SHORT (0x1ULL << 10) | ||
528 | #define CE_ADM_ERR_SSP_REQ_SIDEBAND (0x1ULL << 11) | ||
529 | #define CE_ADM_ERR_SSP_REQ_ADDR_ERR (0x1ULL << 12) | ||
530 | #define CE_ADM_ERR_SSP_REQ_BAD_BE (0x1ULL << 13) | ||
531 | #define CE_ADM_ERR_PCIE_COMPL_TIMEOUT (0x1ULL << 14) | ||
532 | #define CE_ADM_ERR_PCIE_UNEXP_COMPL (0x1ULL << 15) | ||
533 | #define CE_ADM_ERR_PCIE_ERR_COMPL (0x1ULL << 16) | ||
534 | #define CE_ADM_ERR_DRE_CREDIT_OFLOW (0x1ULL << 17) | ||
535 | #define CE_ADM_ERR_DRE_SRAM_PE (0x1ULL << 18) | ||
536 | #define CE_ADM_ERR_SSP_RSP_INVALID (0x1ULL << 19) | ||
537 | #define CE_ADM_ERR_SSP_RSP_LONG (0x1ULL << 20) | ||
538 | #define CE_ADM_ERR_SSP_RSP_SHORT (0x1ULL << 21) | ||
539 | #define CE_ADM_ERR_SSP_RSP_SIDEBAND (0x1ULL << 22) | ||
540 | #define CE_ADM_ERR_URE_SSP_RSP_UNEXP (0x1ULL << 23) | ||
541 | #define CE_ADM_ERR_URE_SSP_WR_REQ_TIMEOUT (0x1ULL << 24) | ||
542 | #define CE_ADM_ERR_URE_SSP_RD_REQ_TIMEOUT (0x1ULL << 25) | ||
543 | #define CE_ADM_ERR_URE_ATE3240_PAGE_FAULT (0x1ULL << 26) | ||
544 | #define CE_ADM_ERR_URE_ATE40_PAGE_FAULT (0x1ULL << 27) | ||
545 | #define CE_ADM_ERR_URE_CREDIT_OFLOW (0x1ULL << 28) | ||
546 | #define CE_ADM_ERR_URE_SRAM_PE (0x1ULL << 29) | ||
547 | #define CE_ADM_ERR_ADM_SSP_RSP_UNEXP (0x1ULL << 30) | ||
548 | #define CE_ADM_ERR_ADM_SSP_REQ_TIMEOUT (0x1ULL << 31) | ||
549 | #define CE_ADM_ERR_MMR_ACCESS_ERROR (0x1ULL << 32) | ||
550 | #define CE_ADM_ERR_MMR_ADDR_ERROR (0x1ULL << 33) | ||
551 | #define CE_ADM_ERR_ADM_CREDIT_OFLOW (0x1ULL << 34) | ||
552 | #define CE_ADM_ERR_ADM_SRAM_PE (0x1ULL << 35) | ||
553 | #define CE_ADM_ERR_DTL1_MIN_PDATA_CREDIT_ERR (0x1ULL << 36) | ||
554 | #define CE_ADM_ERR_DTL1_INF_COMPL_CRED_UPDT_ERR (0x1ULL << 37) | ||
555 | #define CE_ADM_ERR_DTL1_INF_POSTED_CRED_UPDT_ERR (0x1ULL << 38) | ||
556 | #define CE_ADM_ERR_DTL1_INF_NPOSTED_CRED_UPDT_ERR (0x1ULL << 39) | ||
557 | #define CE_ADM_ERR_DTL1_COMP_HD_CRED_MAX_ERR (0x1ULL << 40) | ||
558 | #define CE_ADM_ERR_DTL1_COMP_D_CRED_MAX_ERR (0x1ULL << 41) | ||
559 | #define CE_ADM_ERR_DTL1_NPOSTED_HD_CRED_MAX_ERR (0x1ULL << 42) | ||
560 | #define CE_ADM_ERR_DTL1_NPOSTED_D_CRED_MAX_ERR (0x1ULL << 43) | ||
561 | #define CE_ADM_ERR_DTL1_POSTED_HD_CRED_MAX_ERR (0x1ULL << 44) | ||
562 | #define CE_ADM_ERR_DTL1_POSTED_D_CRED_MAX_ERR (0x1ULL << 45) | ||
563 | #define CE_ADM_ERR_DTL2_MIN_PDATA_CREDIT_ERR (0x1ULL << 46) | ||
564 | #define CE_ADM_ERR_DTL2_INF_COMPL_CRED_UPDT_ERR (0x1ULL << 47) | ||
565 | #define CE_ADM_ERR_DTL2_INF_POSTED_CRED_UPDT_ERR (0x1ULL << 48) | ||
566 | #define CE_ADM_ERR_DTL2_INF_NPOSTED_CRED_UPDT_ERR (0x1ULL << 49) | ||
567 | #define CE_ADM_ERR_DTL2_COMP_HD_CRED_MAX_ERR (0x1ULL << 50) | ||
568 | #define CE_ADM_ERR_DTL2_COMP_D_CRED_MAX_ERR (0x1ULL << 51) | ||
569 | #define CE_ADM_ERR_DTL2_NPOSTED_HD_CRED_MAX_ERR (0x1ULL << 52) | ||
570 | #define CE_ADM_ERR_DTL2_NPOSTED_D_CRED_MAX_ERR (0x1ULL << 53) | ||
571 | #define CE_ADM_ERR_DTL2_POSTED_HD_CRED_MAX_ERR (0x1ULL << 54) | ||
572 | #define CE_ADM_ERR_DTL2_POSTED_D_CRED_MAX_ERR (0x1ULL << 55) | ||
573 | #define CE_ADM_ERR_PORT1_PCIE_COR_ERR (0x1ULL << 56) | ||
574 | #define CE_ADM_ERR_PORT1_PCIE_NFAT_ERR (0x1ULL << 57) | ||
575 | #define CE_ADM_ERR_PORT1_PCIE_FAT_ERR (0x1ULL << 58) | ||
576 | #define CE_ADM_ERR_PORT2_PCIE_COR_ERR (0x1ULL << 59) | ||
577 | #define CE_ADM_ERR_PORT2_PCIE_NFAT_ERR (0x1ULL << 60) | ||
578 | #define CE_ADM_ERR_PORT2_PCIE_FAT_ERR (0x1ULL << 61) | ||
579 | |||
580 | /* ce_adm_ure_ups_buf_barrier_flush register bit masks and shifts */ | ||
581 | #define FLUSH_SEL_PORT1_PIPE0_SHFT 0 | ||
582 | #define FLUSH_SEL_PORT1_PIPE1_SHFT 4 | ||
583 | #define FLUSH_SEL_PORT1_PIPE2_SHFT 8 | ||
584 | #define FLUSH_SEL_PORT1_PIPE3_SHFT 12 | ||
585 | #define FLUSH_SEL_PORT2_PIPE0_SHFT 16 | ||
586 | #define FLUSH_SEL_PORT2_PIPE1_SHFT 20 | ||
587 | #define FLUSH_SEL_PORT2_PIPE2_SHFT 24 | ||
588 | #define FLUSH_SEL_PORT2_PIPE3_SHFT 28 | ||
589 | |||
590 | /* ce_dre_config1 register bit masks and shifts */ | ||
591 | #define CE_DRE_RO_ENABLE (0x1ULL << 0) | ||
592 | #define CE_DRE_DYN_RO_ENABLE (0x1ULL << 1) | ||
593 | #define CE_DRE_SUP_CONFIG_COMP_ERROR (0x1ULL << 2) | ||
594 | #define CE_DRE_SUP_IO_COMP_ERROR (0x1ULL << 3) | ||
595 | #define CE_DRE_ADDR_MODE_SHFT 4 | ||
596 | |||
597 | /* ce_dre_config_req_status register bit masks */ | ||
598 | #define CE_DRE_LAST_CONFIG_COMPLETION (0x7ULL << 0) | ||
599 | #define CE_DRE_DOWNSTREAM_CONFIG_ERROR (0x1ULL << 3) | ||
600 | #define CE_DRE_CONFIG_COMPLETION_VALID (0x1ULL << 4) | ||
601 | #define CE_DRE_CONFIG_REQUEST_ACTIVE (0x1ULL << 5) | ||
602 | |||
603 | /* ce_ure_control register bit masks & shifts */ | ||
604 | #define CE_URE_RD_MRG_ENABLE (0x1ULL << 0) | ||
605 | #define CE_URE_WRT_MRG_ENABLE1 (0x1ULL << 4) | ||
606 | #define CE_URE_WRT_MRG_ENABLE2 (0x1ULL << 5) | ||
607 | #define CE_URE_RSPQ_BYPASS_DISABLE (0x1ULL << 24) | ||
608 | #define CE_URE_UPS_DAT1_PAR_DISABLE (0x1ULL << 32) | ||
609 | #define CE_URE_UPS_HDR1_PAR_DISABLE (0x1ULL << 33) | ||
610 | #define CE_URE_UPS_DAT2_PAR_DISABLE (0x1ULL << 34) | ||
611 | #define CE_URE_UPS_HDR2_PAR_DISABLE (0x1ULL << 35) | ||
612 | #define CE_URE_ATE_PAR_DISABLE (0x1ULL << 36) | ||
613 | #define CE_URE_RCI_PAR_DISABLE (0x1ULL << 37) | ||
614 | #define CE_URE_RSPQ_PAR_DISABLE (0x1ULL << 38) | ||
615 | #define CE_URE_DNS_DAT_PAR_DISABLE (0x1ULL << 39) | ||
616 | #define CE_URE_DNS_HDR_PAR_DISABLE (0x1ULL << 40) | ||
617 | #define CE_URE_MALFORM_DISABLE (0x1ULL << 44) | ||
618 | #define CE_URE_UNSUP_DISABLE (0x1ULL << 45) | ||
619 | |||
620 | /* ce_ure_page_map register bit masks & shifts */ | ||
621 | #define CE_URE_ATE3240_ENABLE (0x1ULL << 0) | ||
622 | #define CE_URE_ATE40_ENABLE (0x1ULL << 1) | ||
623 | #define CE_URE_PAGESIZE_SHFT 4 | ||
624 | #define CE_URE_PAGESIZE_MASK (0x7ULL << CE_URE_PAGESIZE_SHFT) | ||
625 | #define CE_URE_4K_PAGESIZE (0x0ULL << CE_URE_PAGESIZE_SHFT) | ||
626 | #define CE_URE_16K_PAGESIZE (0x1ULL << CE_URE_PAGESIZE_SHFT) | ||
627 | #define CE_URE_64K_PAGESIZE (0x2ULL << CE_URE_PAGESIZE_SHFT) | ||
628 | #define CE_URE_128K_PAGESIZE (0x3ULL << CE_URE_PAGESIZE_SHFT) | ||
629 | #define CE_URE_256K_PAGESIZE (0x4ULL << CE_URE_PAGESIZE_SHFT) | ||
630 | |||
631 | /* ce_ure_pipe_sel register bit masks & shifts */ | ||
632 | #define PKT_TRAFIC_SHRT 16 | ||
633 | #define BUS_SRC_ID_SHFT 8 | ||
634 | #define DEV_SRC_ID_SHFT 3 | ||
635 | #define FNC_SRC_ID_SHFT 0 | ||
636 | #define CE_URE_TC_MASK (0x07ULL << PKT_TRAFIC_SHRT) | ||
637 | #define CE_URE_BUS_MASK (0xFFULL << BUS_SRC_ID_SHFT) | ||
638 | #define CE_URE_DEV_MASK (0x1FULL << DEV_SRC_ID_SHFT) | ||
639 | #define CE_URE_FNC_MASK (0x07ULL << FNC_SRC_ID_SHFT) | ||
640 | #define CE_URE_PIPE_BUS(b) (((uint64_t)(b) << BUS_SRC_ID_SHFT) & \ | ||
641 | CE_URE_BUS_MASK) | ||
642 | #define CE_URE_PIPE_DEV(d) (((uint64_t)(d) << DEV_SRC_ID_SHFT) & \ | ||
643 | CE_URE_DEV_MASK) | ||
644 | #define CE_URE_PIPE_FNC(f) (((uint64_t)(f) << FNC_SRC_ID_SHFT) & \ | ||
645 | CE_URE_FNC_MASK) | ||
646 | |||
647 | #define CE_URE_SEL1_SHFT 0 | ||
648 | #define CE_URE_SEL2_SHFT 20 | ||
649 | #define CE_URE_SEL3_SHFT 40 | ||
650 | #define CE_URE_SEL1_MASK (0x7FFFFULL << CE_URE_SEL1_SHFT) | ||
651 | #define CE_URE_SEL2_MASK (0x7FFFFULL << CE_URE_SEL2_SHFT) | ||
652 | #define CE_URE_SEL3_MASK (0x7FFFFULL << CE_URE_SEL3_SHFT) | ||
653 | |||
654 | |||
655 | /* ce_ure_pipe_mask register bit masks & shifts */ | ||
656 | #define CE_URE_MASK1_SHFT 0 | ||
657 | #define CE_URE_MASK2_SHFT 20 | ||
658 | #define CE_URE_MASK3_SHFT 40 | ||
659 | #define CE_URE_MASK1_MASK (0x7FFFFULL << CE_URE_MASK1_SHFT) | ||
660 | #define CE_URE_MASK2_MASK (0x7FFFFULL << CE_URE_MASK2_SHFT) | ||
661 | #define CE_URE_MASK3_MASK (0x7FFFFULL << CE_URE_MASK3_SHFT) | ||
662 | |||
663 | |||
664 | /* ce_ure_pcie_control1 register bit masks & shifts */ | ||
665 | #define CE_URE_SI (0x1ULL << 0) | ||
666 | #define CE_URE_ELAL_SHFT 4 | ||
667 | #define CE_URE_ELAL_MASK (0x7ULL << CE_URE_ELAL_SHFT) | ||
668 | #define CE_URE_ELAL1_SHFT 8 | ||
669 | #define CE_URE_ELAL1_MASK (0x7ULL << CE_URE_ELAL1_SHFT) | ||
670 | #define CE_URE_SCC (0x1ULL << 12) | ||
671 | #define CE_URE_PN1_SHFT 16 | ||
672 | #define CE_URE_PN1_MASK (0xFFULL << CE_URE_PN1_SHFT) | ||
673 | #define CE_URE_PN2_SHFT 24 | ||
674 | #define CE_URE_PN2_MASK (0xFFULL << CE_URE_PN2_SHFT) | ||
675 | #define CE_URE_PN1_SET(n) (((uint64_t)(n) << CE_URE_PN1_SHFT) & \ | ||
676 | CE_URE_PN1_MASK) | ||
677 | #define CE_URE_PN2_SET(n) (((uint64_t)(n) << CE_URE_PN2_SHFT) & \ | ||
678 | CE_URE_PN2_MASK) | ||
679 | |||
680 | /* ce_ure_pcie_control2 register bit masks & shifts */ | ||
681 | #define CE_URE_ABP (0x1ULL << 0) | ||
682 | #define CE_URE_PCP (0x1ULL << 1) | ||
683 | #define CE_URE_MSP (0x1ULL << 2) | ||
684 | #define CE_URE_AIP (0x1ULL << 3) | ||
685 | #define CE_URE_PIP (0x1ULL << 4) | ||
686 | #define CE_URE_HPS (0x1ULL << 5) | ||
687 | #define CE_URE_HPC (0x1ULL << 6) | ||
688 | #define CE_URE_SPLV_SHFT 7 | ||
689 | #define CE_URE_SPLV_MASK (0xFFULL << CE_URE_SPLV_SHFT) | ||
690 | #define CE_URE_SPLS_SHFT 15 | ||
691 | #define CE_URE_SPLS_MASK (0x3ULL << CE_URE_SPLS_SHFT) | ||
692 | #define CE_URE_PSN1_SHFT 19 | ||
693 | #define CE_URE_PSN1_MASK (0x1FFFULL << CE_URE_PSN1_SHFT) | ||
694 | #define CE_URE_PSN2_SHFT 32 | ||
695 | #define CE_URE_PSN2_MASK (0x1FFFULL << CE_URE_PSN2_SHFT) | ||
696 | #define CE_URE_PSN1_SET(n) (((uint64_t)(n) << CE_URE_PSN1_SHFT) & \ | ||
697 | CE_URE_PSN1_MASK) | ||
698 | #define CE_URE_PSN2_SET(n) (((uint64_t)(n) << CE_URE_PSN2_SHFT) & \ | ||
699 | CE_URE_PSN2_MASK) | ||
700 | |||
701 | /* | ||
702 | * PIO address space ranges for CE | ||
703 | */ | ||
704 | |||
705 | /* Local CE Registers Space */ | ||
706 | #define CE_PIO_MMR 0x00000000 | ||
707 | #define CE_PIO_MMR_LEN 0x04000000 | ||
708 | |||
709 | /* PCI Compatible Config Space */ | ||
710 | #define CE_PIO_CONFIG_SPACE 0x04000000 | ||
711 | #define CE_PIO_CONFIG_SPACE_LEN 0x04000000 | ||
712 | |||
713 | /* PCI I/O Space Alias */ | ||
714 | #define CE_PIO_IO_SPACE_ALIAS 0x08000000 | ||
715 | #define CE_PIO_IO_SPACE_ALIAS_LEN 0x08000000 | ||
716 | |||
717 | /* PCI Enhanced Config Space */ | ||
718 | #define CE_PIO_E_CONFIG_SPACE 0x10000000 | ||
719 | #define CE_PIO_E_CONFIG_SPACE_LEN 0x10000000 | ||
720 | |||
721 | /* PCI I/O Space */ | ||
722 | #define CE_PIO_IO_SPACE 0x100000000 | ||
723 | #define CE_PIO_IO_SPACE_LEN 0x100000000 | ||
724 | |||
725 | /* PCI MEM Space */ | ||
726 | #define CE_PIO_MEM_SPACE 0x200000000 | ||
727 | #define CE_PIO_MEM_SPACE_LEN TIO_HWIN_SIZE | ||
728 | |||
729 | |||
730 | /* | ||
731 | * CE PCI Enhanced Config Space shifts & masks | ||
732 | */ | ||
733 | #define CE_E_CONFIG_BUS_SHFT 20 | ||
734 | #define CE_E_CONFIG_BUS_MASK (0xFF << CE_E_CONFIG_BUS_SHFT) | ||
735 | #define CE_E_CONFIG_DEVICE_SHFT 15 | ||
736 | #define CE_E_CONFIG_DEVICE_MASK (0x1F << CE_E_CONFIG_DEVICE_SHFT) | ||
737 | #define CE_E_CONFIG_FUNC_SHFT 12 | ||
738 | #define CE_E_CONFIG_FUNC_MASK (0x7 << CE_E_CONFIG_FUNC_SHFT) | ||
739 | |||
740 | #endif /* __ASM_IA64_SN_TIOCE_H__ */ | ||
diff --git a/include/asm-ia64/sn/tioce_provider.h b/include/asm-ia64/sn/tioce_provider.h new file mode 100644 index 000000000000..7f63dec0a79a --- /dev/null +++ b/include/asm-ia64/sn/tioce_provider.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /************************************************************************** | ||
2 | * Copyright (C) 2005, Silicon Graphics, Inc. * | ||
3 | * * | ||
4 | * These coded instructions, statements, and computer programs contain * | ||
5 | * unpublished proprietary information of Silicon Graphics, Inc., and * | ||
6 | * are protected by Federal copyright law. They may not be disclosed * | ||
7 | * to third parties or copied or duplicated in any form, in whole or * | ||
8 | * in part, without the prior written consent of Silicon Graphics, Inc. * | ||
9 | * * | ||
10 | **************************************************************************/ | ||
11 | |||
12 | #ifndef _ASM_IA64_SN_CE_PROVIDER_H | ||
13 | #define _ASM_IA64_SN_CE_PROVIDER_H | ||
14 | |||
15 | #include <asm/sn/pcibus_provider_defs.h> | ||
16 | #include <asm/sn/tioce.h> | ||
17 | |||
18 | /* | ||
19 | * Common TIOCE structure shared between the prom and kernel | ||
20 | * | ||
21 | * DO NOT CHANGE THIS STRUCT WITHOUT MAKING CORRESPONDING CHANGES TO THE | ||
22 | * PROM VERSION. | ||
23 | */ | ||
24 | struct tioce_common { | ||
25 | struct pcibus_bussoft ce_pcibus; /* common pciio header */ | ||
26 | |||
27 | uint32_t ce_rev; | ||
28 | uint64_t ce_kernel_private; | ||
29 | uint64_t ce_prom_private; | ||
30 | }; | ||
31 | |||
32 | struct tioce_kernel { | ||
33 | struct tioce_common *ce_common; | ||
34 | spinlock_t ce_lock; | ||
35 | struct list_head ce_dmamap_list; | ||
36 | |||
37 | uint64_t ce_ate40_shadow[TIOCE_NUM_M40_ATES]; | ||
38 | uint64_t ce_ate3240_shadow[TIOCE_NUM_M3240_ATES]; | ||
39 | uint32_t ce_ate3240_pagesize; | ||
40 | |||
41 | uint8_t ce_port1_secondary; | ||
42 | |||
43 | /* per-port resources */ | ||
44 | struct { | ||
45 | int dirmap_refcnt; | ||
46 | uint64_t dirmap_shadow; | ||
47 | } ce_port[TIOCE_NUM_PORTS]; | ||
48 | }; | ||
49 | |||
50 | struct tioce_dmamap { | ||
51 | struct list_head ce_dmamap_list; /* headed by tioce_kernel */ | ||
52 | uint32_t refcnt; | ||
53 | |||
54 | uint64_t nbytes; /* # bytes mapped */ | ||
55 | |||
56 | uint64_t ct_start; /* coretalk start address */ | ||
57 | uint64_t pci_start; /* bus start address */ | ||
58 | |||
59 | uint64_t *ate_hw; /* hw ptr of first ate in map */ | ||
60 | uint64_t *ate_shadow; /* shadow ptr of firat ate */ | ||
61 | uint16_t ate_count; /* # ate's in the map */ | ||
62 | }; | ||
63 | |||
64 | extern int tioce_init_provider(void); | ||
65 | |||
66 | #endif /* __ASM_IA64_SN_CE_PROVIDER_H */ | ||
diff --git a/include/asm-ia64/spinlock.h b/include/asm-ia64/spinlock.h index 909936f25512..d2430aa0d49d 100644 --- a/include/asm-ia64/spinlock.h +++ b/include/asm-ia64/spinlock.h | |||
@@ -93,7 +93,15 @@ _raw_spin_lock_flags (spinlock_t *lock, unsigned long flags) | |||
93 | # endif /* CONFIG_MCKINLEY */ | 93 | # endif /* CONFIG_MCKINLEY */ |
94 | #endif | 94 | #endif |
95 | } | 95 | } |
96 | |||
96 | #define _raw_spin_lock(lock) _raw_spin_lock_flags(lock, 0) | 97 | #define _raw_spin_lock(lock) _raw_spin_lock_flags(lock, 0) |
98 | |||
99 | /* Unlock by doing an ordered store and releasing the cacheline with nta */ | ||
100 | static inline void _raw_spin_unlock(spinlock_t *x) { | ||
101 | barrier(); | ||
102 | asm volatile ("st4.rel.nta [%0] = r0\n\t" :: "r"(x)); | ||
103 | } | ||
104 | |||
97 | #else /* !ASM_SUPPORTED */ | 105 | #else /* !ASM_SUPPORTED */ |
98 | #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) | 106 | #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) |
99 | # define _raw_spin_lock(x) \ | 107 | # define _raw_spin_lock(x) \ |
@@ -109,16 +117,16 @@ do { \ | |||
109 | } while (ia64_spinlock_val); \ | 117 | } while (ia64_spinlock_val); \ |
110 | } \ | 118 | } \ |
111 | } while (0) | 119 | } while (0) |
120 | #define _raw_spin_unlock(x) do { barrier(); ((spinlock_t *) x)->lock = 0; } while (0) | ||
112 | #endif /* !ASM_SUPPORTED */ | 121 | #endif /* !ASM_SUPPORTED */ |
113 | 122 | ||
114 | #define spin_is_locked(x) ((x)->lock != 0) | 123 | #define spin_is_locked(x) ((x)->lock != 0) |
115 | #define _raw_spin_unlock(x) do { barrier(); ((spinlock_t *) x)->lock = 0; } while (0) | ||
116 | #define _raw_spin_trylock(x) (cmpxchg_acq(&(x)->lock, 0, 1) == 0) | 124 | #define _raw_spin_trylock(x) (cmpxchg_acq(&(x)->lock, 0, 1) == 0) |
117 | #define spin_unlock_wait(x) do { barrier(); } while ((x)->lock) | 125 | #define spin_unlock_wait(x) do { barrier(); } while ((x)->lock) |
118 | 126 | ||
119 | typedef struct { | 127 | typedef struct { |
120 | volatile unsigned int read_counter : 31; | 128 | volatile unsigned int read_counter : 24; |
121 | volatile unsigned int write_lock : 1; | 129 | volatile unsigned int write_lock : 8; |
122 | #ifdef CONFIG_PREEMPT | 130 | #ifdef CONFIG_PREEMPT |
123 | unsigned int break_lock; | 131 | unsigned int break_lock; |
124 | #endif | 132 | #endif |
@@ -174,6 +182,13 @@ do { \ | |||
174 | (result == 0); \ | 182 | (result == 0); \ |
175 | }) | 183 | }) |
176 | 184 | ||
185 | static inline void _raw_write_unlock(rwlock_t *x) | ||
186 | { | ||
187 | u8 *y = (u8 *)x; | ||
188 | barrier(); | ||
189 | asm volatile ("st1.rel.nta [%0] = r0\n\t" :: "r"(y+3) : "memory" ); | ||
190 | } | ||
191 | |||
177 | #else /* !ASM_SUPPORTED */ | 192 | #else /* !ASM_SUPPORTED */ |
178 | 193 | ||
179 | #define _raw_write_lock(l) \ | 194 | #define _raw_write_lock(l) \ |
@@ -195,14 +210,14 @@ do { \ | |||
195 | (ia64_val == 0); \ | 210 | (ia64_val == 0); \ |
196 | }) | 211 | }) |
197 | 212 | ||
213 | static inline void _raw_write_unlock(rwlock_t *x) | ||
214 | { | ||
215 | barrier(); | ||
216 | x->write_lock = 0; | ||
217 | } | ||
218 | |||
198 | #endif /* !ASM_SUPPORTED */ | 219 | #endif /* !ASM_SUPPORTED */ |
199 | 220 | ||
200 | #define _raw_read_trylock(lock) generic_raw_read_trylock(lock) | 221 | #define _raw_read_trylock(lock) generic_raw_read_trylock(lock) |
201 | 222 | ||
202 | #define _raw_write_unlock(x) \ | ||
203 | ({ \ | ||
204 | smp_mb__before_clear_bit(); /* need barrier before releasing lock... */ \ | ||
205 | clear_bit(31, (x)); \ | ||
206 | }) | ||
207 | |||
208 | #endif /* _ASM_IA64_SPINLOCK_H */ | 223 | #endif /* _ASM_IA64_SPINLOCK_H */ |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index cd2cf76b2db1..33256db4a7cf 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -19,12 +19,13 @@ | |||
19 | #include <asm/pal.h> | 19 | #include <asm/pal.h> |
20 | #include <asm/percpu.h> | 20 | #include <asm/percpu.h> |
21 | 21 | ||
22 | #define GATE_ADDR __IA64_UL_CONST(0xa000000000000000) | 22 | #define GATE_ADDR RGN_BASE(RGN_GATE) |
23 | |||
23 | /* | 24 | /* |
24 | * 0xa000000000000000+2*PERCPU_PAGE_SIZE | 25 | * 0xa000000000000000+2*PERCPU_PAGE_SIZE |
25 | * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page) | 26 | * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page) |
26 | */ | 27 | */ |
27 | #define KERNEL_START __IA64_UL_CONST(0xa000000100000000) | 28 | #define KERNEL_START (GATE_ADDR+0x100000000) |
28 | #define PERCPU_ADDR (-PERCPU_PAGE_SIZE) | 29 | #define PERCPU_ADDR (-PERCPU_PAGE_SIZE) |
29 | 30 | ||
30 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-ia64/types.h b/include/asm-ia64/types.h index a677565aa954..902850d12424 100644 --- a/include/asm-ia64/types.h +++ b/include/asm-ia64/types.h | |||
@@ -67,8 +67,6 @@ typedef __u64 u64; | |||
67 | 67 | ||
68 | typedef u64 dma_addr_t; | 68 | typedef u64 dma_addr_t; |
69 | 69 | ||
70 | typedef unsigned short kmem_bufctl_t; | ||
71 | |||
72 | # endif /* __KERNEL__ */ | 70 | # endif /* __KERNEL__ */ |
73 | #endif /* !__ASSEMBLY__ */ | 71 | #endif /* !__ASSEMBLY__ */ |
74 | 72 | ||
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 1c6abb9f3f1f..4ab578876361 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h | |||
@@ -61,25 +61,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
61 | 61 | ||
62 | /* This handles the memory map.. */ | 62 | /* This handles the memory map.. */ |
63 | 63 | ||
64 | #ifndef __ASSEMBLY__ | ||
65 | |||
66 | /* Pure 2^n version of get_order */ | ||
67 | static __inline__ int get_order(unsigned long size) | ||
68 | { | ||
69 | int order; | ||
70 | |||
71 | size = (size - 1) >> (PAGE_SHIFT - 1); | ||
72 | order = -1; | ||
73 | do { | ||
74 | size >>= 1; | ||
75 | order++; | ||
76 | } while (size); | ||
77 | |||
78 | return order; | ||
79 | } | ||
80 | |||
81 | #endif /* __ASSEMBLY__ */ | ||
82 | |||
83 | #define __MEMORY_START CONFIG_MEMORY_START | 64 | #define __MEMORY_START CONFIG_MEMORY_START |
84 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE | 65 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE |
85 | 66 | ||
@@ -111,5 +92,7 @@ static __inline__ int get_order(unsigned long size) | |||
111 | 92 | ||
112 | #endif /* __KERNEL__ */ | 93 | #endif /* __KERNEL__ */ |
113 | 94 | ||
95 | #include <asm-generic/page.h> | ||
96 | |||
114 | #endif /* _ASM_M32R_PAGE_H */ | 97 | #endif /* _ASM_M32R_PAGE_H */ |
115 | 98 | ||
diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h index ca0a887d2237..fcf24c64c3ba 100644 --- a/include/asm-m32r/types.h +++ b/include/asm-m32r/types.h | |||
@@ -55,8 +55,6 @@ typedef unsigned long long u64; | |||
55 | typedef u32 dma_addr_t; | 55 | typedef u32 dma_addr_t; |
56 | typedef u64 dma64_addr_t; | 56 | typedef u64 dma64_addr_t; |
57 | 57 | ||
58 | typedef unsigned short kmem_bufctl_t; | ||
59 | |||
60 | #endif /* __ASSEMBLY__ */ | 58 | #endif /* __ASSEMBLY__ */ |
61 | 59 | ||
62 | #endif /* __KERNEL__ */ | 60 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h index e4773946f10d..8aba971b1368 100644 --- a/include/asm-m68k/cacheflush.h +++ b/include/asm-m68k/cacheflush.h | |||
@@ -130,20 +130,25 @@ static inline void __flush_page_to_ram(void *vaddr) | |||
130 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 130 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
131 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 131 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
132 | #define flush_icache_page(vma, page) __flush_page_to_ram(page_address(page)) | 132 | #define flush_icache_page(vma, page) __flush_page_to_ram(page_address(page)) |
133 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) | ||
134 | |||
135 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
136 | do { \ | ||
137 | flush_cache_page(vma, vaddr, page_to_pfn(page));\ | ||
138 | memcpy(dst, src, len); \ | ||
139 | } while (0) | ||
140 | |||
141 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
142 | do { \ | ||
143 | flush_cache_page(vma, vaddr, page_to_pfn(page));\ | ||
144 | memcpy(dst, src, len); \ | ||
145 | } while (0) | ||
146 | 133 | ||
134 | extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | ||
135 | unsigned long addr, int len); | ||
147 | extern void flush_icache_range(unsigned long address, unsigned long endaddr); | 136 | extern void flush_icache_range(unsigned long address, unsigned long endaddr); |
148 | 137 | ||
138 | static inline void copy_to_user_page(struct vm_area_struct *vma, | ||
139 | struct page *page, unsigned long vaddr, | ||
140 | void *dst, void *src, int len) | ||
141 | { | ||
142 | flush_cache_page(vma, vaddr, page_to_pfn(page)); | ||
143 | memcpy(dst, src, len); | ||
144 | flush_icache_user_range(vma, page, vaddr, len); | ||
145 | } | ||
146 | static inline void copy_from_user_page(struct vm_area_struct *vma, | ||
147 | struct page *page, unsigned long vaddr, | ||
148 | void *dst, void *src, int len) | ||
149 | { | ||
150 | flush_cache_page(vma, vaddr, page_to_pfn(page)); | ||
151 | memcpy(dst, src, len); | ||
152 | } | ||
153 | |||
149 | #endif /* _M68K_CACHEFLUSH_H */ | 154 | #endif /* _M68K_CACHEFLUSH_H */ |
diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index 206313e2a817..f206dfbc1d48 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h | |||
@@ -107,20 +107,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
107 | /* to align the pointer to the (next) page boundary */ | 107 | /* to align the pointer to the (next) page boundary */ |
108 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 108 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
109 | 109 | ||
110 | /* Pure 2^n version of get_order */ | ||
111 | static inline int get_order(unsigned long size) | ||
112 | { | ||
113 | int order; | ||
114 | |||
115 | size = (size-1) >> (PAGE_SHIFT-1); | ||
116 | order = -1; | ||
117 | do { | ||
118 | size >>= 1; | ||
119 | order++; | ||
120 | } while (size); | ||
121 | return order; | ||
122 | } | ||
123 | |||
124 | #endif /* !__ASSEMBLY__ */ | 110 | #endif /* !__ASSEMBLY__ */ |
125 | 111 | ||
126 | #include <asm/page_offset.h> | 112 | #include <asm/page_offset.h> |
@@ -192,4 +178,6 @@ static inline void *__va(unsigned long x) | |||
192 | 178 | ||
193 | #endif /* __KERNEL__ */ | 179 | #endif /* __KERNEL__ */ |
194 | 180 | ||
181 | #include <asm-generic/page.h> | ||
182 | |||
195 | #endif /* _M68K_PAGE_H */ | 183 | #endif /* _M68K_PAGE_H */ |
diff --git a/include/asm-m68k/string.h b/include/asm-m68k/string.h index 44def078132a..6c59215b285e 100644 --- a/include/asm-m68k/string.h +++ b/include/asm-m68k/string.h | |||
@@ -80,43 +80,6 @@ static inline char * strchr(const char * s, int c) | |||
80 | return( (char *) s); | 80 | return( (char *) s); |
81 | } | 81 | } |
82 | 82 | ||
83 | #if 0 | ||
84 | #define __HAVE_ARCH_STRPBRK | ||
85 | static inline char *strpbrk(const char *cs,const char *ct) | ||
86 | { | ||
87 | const char *sc1,*sc2; | ||
88 | |||
89 | for( sc1 = cs; *sc1 != '\0'; ++sc1) | ||
90 | for( sc2 = ct; *sc2 != '\0'; ++sc2) | ||
91 | if (*sc1 == *sc2) | ||
92 | return((char *) sc1); | ||
93 | return( NULL ); | ||
94 | } | ||
95 | #endif | ||
96 | |||
97 | #if 0 | ||
98 | #define __HAVE_ARCH_STRSPN | ||
99 | static inline size_t strspn(const char *s, const char *accept) | ||
100 | { | ||
101 | const char *p; | ||
102 | const char *a; | ||
103 | size_t count = 0; | ||
104 | |||
105 | for (p = s; *p != '\0'; ++p) | ||
106 | { | ||
107 | for (a = accept; *a != '\0'; ++a) | ||
108 | if (*p == *a) | ||
109 | break; | ||
110 | if (*a == '\0') | ||
111 | return count; | ||
112 | else | ||
113 | ++count; | ||
114 | } | ||
115 | |||
116 | return count; | ||
117 | } | ||
118 | #endif | ||
119 | |||
120 | /* strstr !! */ | 83 | /* strstr !! */ |
121 | 84 | ||
122 | #define __HAVE_ARCH_STRLEN | 85 | #define __HAVE_ARCH_STRLEN |
@@ -173,370 +136,18 @@ static inline int strncmp(const char * cs,const char * ct,size_t count) | |||
173 | } | 136 | } |
174 | 137 | ||
175 | #define __HAVE_ARCH_MEMSET | 138 | #define __HAVE_ARCH_MEMSET |
176 | /* | 139 | extern void *memset(void *, int, __kernel_size_t); |
177 | * This is really ugly, but its highly optimizatiable by the | 140 | #define memset(d, c, n) __builtin_memset(d, c, n) |
178 | * compiler and is meant as compensation for gcc's missing | ||
179 | * __builtin_memset(). For the 680[23]0 it might be worth considering | ||
180 | * the optimal number of misaligned writes compared to the number of | ||
181 | * tests'n'branches needed to align the destination address. The | ||
182 | * 680[46]0 doesn't really care due to their copy-back caches. | ||
183 | * 10/09/96 - Jes Sorensen | ||
184 | */ | ||
185 | static inline void * __memset_g(void * s, int c, size_t count) | ||
186 | { | ||
187 | void *xs = s; | ||
188 | size_t temp; | ||
189 | |||
190 | if (!count) | ||
191 | return xs; | ||
192 | |||
193 | c &= 0xff; | ||
194 | c |= c << 8; | ||
195 | c |= c << 16; | ||
196 | |||
197 | if (count < 36){ | ||
198 | long *ls = s; | ||
199 | |||
200 | switch(count){ | ||
201 | case 32: case 33: case 34: case 35: | ||
202 | *ls++ = c; | ||
203 | case 28: case 29: case 30: case 31: | ||
204 | *ls++ = c; | ||
205 | case 24: case 25: case 26: case 27: | ||
206 | *ls++ = c; | ||
207 | case 20: case 21: case 22: case 23: | ||
208 | *ls++ = c; | ||
209 | case 16: case 17: case 18: case 19: | ||
210 | *ls++ = c; | ||
211 | case 12: case 13: case 14: case 15: | ||
212 | *ls++ = c; | ||
213 | case 8: case 9: case 10: case 11: | ||
214 | *ls++ = c; | ||
215 | case 4: case 5: case 6: case 7: | ||
216 | *ls++ = c; | ||
217 | break; | ||
218 | default: | ||
219 | break; | ||
220 | } | ||
221 | s = ls; | ||
222 | if (count & 0x02){ | ||
223 | short *ss = s; | ||
224 | *ss++ = c; | ||
225 | s = ss; | ||
226 | } | ||
227 | if (count & 0x01){ | ||
228 | char *cs = s; | ||
229 | *cs++ = c; | ||
230 | s = cs; | ||
231 | } | ||
232 | return xs; | ||
233 | } | ||
234 | |||
235 | if ((long) s & 1) | ||
236 | { | ||
237 | char *cs = s; | ||
238 | *cs++ = c; | ||
239 | s = cs; | ||
240 | count--; | ||
241 | } | ||
242 | if (count > 2 && (long) s & 2) | ||
243 | { | ||
244 | short *ss = s; | ||
245 | *ss++ = c; | ||
246 | s = ss; | ||
247 | count -= 2; | ||
248 | } | ||
249 | temp = count >> 2; | ||
250 | if (temp) | ||
251 | { | ||
252 | long *ls = s; | ||
253 | temp--; | ||
254 | do | ||
255 | *ls++ = c; | ||
256 | while (temp--); | ||
257 | s = ls; | ||
258 | } | ||
259 | if (count & 2) | ||
260 | { | ||
261 | short *ss = s; | ||
262 | *ss++ = c; | ||
263 | s = ss; | ||
264 | } | ||
265 | if (count & 1) | ||
266 | { | ||
267 | char *cs = s; | ||
268 | *cs = c; | ||
269 | } | ||
270 | return xs; | ||
271 | } | ||
272 | |||
273 | /* | ||
274 | * __memset_page assumes that data is longword aligned. Most, if not | ||
275 | * all, of these page sized memsets are performed on page aligned | ||
276 | * areas, thus we do not need to check if the destination is longword | ||
277 | * aligned. Of course we suffer a serious performance loss if this is | ||
278 | * not the case but I think the risk of this ever happening is | ||
279 | * extremely small. We spend a lot of time clearing pages in | ||
280 | * get_empty_page() so I think it is worth it anyway. Besides, the | ||
281 | * 680[46]0 do not really care about misaligned writes due to their | ||
282 | * copy-back cache. | ||
283 | * | ||
284 | * The optimized case for the 680[46]0 is implemented using the move16 | ||
285 | * instruction. My tests showed that this implementation is 35-45% | ||
286 | * faster than the original implementation using movel, the only | ||
287 | * caveat is that the destination address must be 16-byte aligned. | ||
288 | * 01/09/96 - Jes Sorensen | ||
289 | */ | ||
290 | static inline void * __memset_page(void * s,int c,size_t count) | ||
291 | { | ||
292 | unsigned long data, tmp; | ||
293 | void *xs = s; | ||
294 | |||
295 | c = c & 255; | ||
296 | data = c | (c << 8); | ||
297 | data |= data << 16; | ||
298 | |||
299 | #ifdef CPU_M68040_OR_M68060_ONLY | ||
300 | |||
301 | if (((unsigned long) s) & 0x0f) | ||
302 | __memset_g(s, c, count); | ||
303 | else{ | ||
304 | unsigned long *sp = s; | ||
305 | *sp++ = data; | ||
306 | *sp++ = data; | ||
307 | *sp++ = data; | ||
308 | *sp++ = data; | ||
309 | |||
310 | __asm__ __volatile__("1:\t" | ||
311 | ".chip 68040\n\t" | ||
312 | "move16 %2@+,%0@+\n\t" | ||
313 | ".chip 68k\n\t" | ||
314 | "subqw #8,%2\n\t" | ||
315 | "subqw #8,%2\n\t" | ||
316 | "dbra %1,1b\n\t" | ||
317 | : "=a" (sp), "=d" (tmp) | ||
318 | : "a" (s), "0" (sp), "1" ((count - 16) / 16 - 1) | ||
319 | ); | ||
320 | } | ||
321 | |||
322 | #else | ||
323 | __asm__ __volatile__("1:\t" | ||
324 | "movel %2,%0@+\n\t" | ||
325 | "movel %2,%0@+\n\t" | ||
326 | "movel %2,%0@+\n\t" | ||
327 | "movel %2,%0@+\n\t" | ||
328 | "movel %2,%0@+\n\t" | ||
329 | "movel %2,%0@+\n\t" | ||
330 | "movel %2,%0@+\n\t" | ||
331 | "movel %2,%0@+\n\t" | ||
332 | "dbra %1,1b\n\t" | ||
333 | : "=a" (s), "=d" (tmp) | ||
334 | : "d" (data), "0" (s), "1" (count / 32 - 1) | ||
335 | ); | ||
336 | #endif | ||
337 | |||
338 | return xs; | ||
339 | } | ||
340 | |||
341 | extern void *memset(void *,int,__kernel_size_t); | ||
342 | |||
343 | #define __memset_const(s,c,count) \ | ||
344 | ((count==PAGE_SIZE) ? \ | ||
345 | __memset_page((s),(c),(count)) : \ | ||
346 | __memset_g((s),(c),(count))) | ||
347 | |||
348 | #define memset(s, c, count) \ | ||
349 | (__builtin_constant_p(count) ? \ | ||
350 | __memset_const((s),(c),(count)) : \ | ||
351 | __memset_g((s),(c),(count))) | ||
352 | 141 | ||
353 | #define __HAVE_ARCH_MEMCPY | 142 | #define __HAVE_ARCH_MEMCPY |
354 | extern void * memcpy(void *, const void *, size_t ); | 143 | extern void *memcpy(void *, const void *, __kernel_size_t); |
355 | /* | 144 | #define memcpy(d, s, n) __builtin_memcpy(d, s, n) |
356 | * __builtin_memcpy() does not handle page-sized memcpys very well, | ||
357 | * thus following the same assumptions as for page-sized memsets, this | ||
358 | * function copies page-sized areas using an unrolled loop, without | ||
359 | * considering alignment. | ||
360 | * | ||
361 | * For the 680[46]0 only kernels we use the move16 instruction instead | ||
362 | * as it writes through the data-cache, invalidating the cache-lines | ||
363 | * touched. In this way we do not use up the entire data-cache (well, | ||
364 | * half of it on the 68060) by copying a page. An unrolled loop of two | ||
365 | * move16 instructions seem to the fastest. The only caveat is that | ||
366 | * both source and destination must be 16-byte aligned, if not we fall | ||
367 | * back to the generic memcpy function. - Jes | ||
368 | */ | ||
369 | static inline void * __memcpy_page(void * to, const void * from, size_t count) | ||
370 | { | ||
371 | unsigned long tmp; | ||
372 | void *xto = to; | ||
373 | |||
374 | #ifdef CPU_M68040_OR_M68060_ONLY | ||
375 | |||
376 | if (((unsigned long) to | (unsigned long) from) & 0x0f) | ||
377 | return memcpy(to, from, count); | ||
378 | |||
379 | __asm__ __volatile__("1:\t" | ||
380 | ".chip 68040\n\t" | ||
381 | "move16 %1@+,%0@+\n\t" | ||
382 | "move16 %1@+,%0@+\n\t" | ||
383 | ".chip 68k\n\t" | ||
384 | "dbra %2,1b\n\t" | ||
385 | : "=a" (to), "=a" (from), "=d" (tmp) | ||
386 | : "0" (to), "1" (from) , "2" (count / 32 - 1) | ||
387 | ); | ||
388 | #else | ||
389 | __asm__ __volatile__("1:\t" | ||
390 | "movel %1@+,%0@+\n\t" | ||
391 | "movel %1@+,%0@+\n\t" | ||
392 | "movel %1@+,%0@+\n\t" | ||
393 | "movel %1@+,%0@+\n\t" | ||
394 | "movel %1@+,%0@+\n\t" | ||
395 | "movel %1@+,%0@+\n\t" | ||
396 | "movel %1@+,%0@+\n\t" | ||
397 | "movel %1@+,%0@+\n\t" | ||
398 | "dbra %2,1b\n\t" | ||
399 | : "=a" (to), "=a" (from), "=d" (tmp) | ||
400 | : "0" (to), "1" (from) , "2" (count / 32 - 1) | ||
401 | ); | ||
402 | #endif | ||
403 | return xto; | ||
404 | } | ||
405 | |||
406 | #define __memcpy_const(to, from, n) \ | ||
407 | ((n==PAGE_SIZE) ? \ | ||
408 | __memcpy_page((to),(from),(n)) : \ | ||
409 | __builtin_memcpy((to),(from),(n))) | ||
410 | |||
411 | #define memcpy(to, from, n) \ | ||
412 | (__builtin_constant_p(n) ? \ | ||
413 | __memcpy_const((to),(from),(n)) : \ | ||
414 | memcpy((to),(from),(n))) | ||
415 | 145 | ||
416 | #define __HAVE_ARCH_MEMMOVE | 146 | #define __HAVE_ARCH_MEMMOVE |
417 | static inline void * memmove(void * dest,const void * src, size_t n) | 147 | extern void *memmove(void *, const void *, __kernel_size_t); |
418 | { | ||
419 | void *xdest = dest; | ||
420 | size_t temp; | ||
421 | |||
422 | if (!n) | ||
423 | return xdest; | ||
424 | |||
425 | if (dest < src) | ||
426 | { | ||
427 | if ((long) dest & 1) | ||
428 | { | ||
429 | char *cdest = dest; | ||
430 | const char *csrc = src; | ||
431 | *cdest++ = *csrc++; | ||
432 | dest = cdest; | ||
433 | src = csrc; | ||
434 | n--; | ||
435 | } | ||
436 | if (n > 2 && (long) dest & 2) | ||
437 | { | ||
438 | short *sdest = dest; | ||
439 | const short *ssrc = src; | ||
440 | *sdest++ = *ssrc++; | ||
441 | dest = sdest; | ||
442 | src = ssrc; | ||
443 | n -= 2; | ||
444 | } | ||
445 | temp = n >> 2; | ||
446 | if (temp) | ||
447 | { | ||
448 | long *ldest = dest; | ||
449 | const long *lsrc = src; | ||
450 | temp--; | ||
451 | do | ||
452 | *ldest++ = *lsrc++; | ||
453 | while (temp--); | ||
454 | dest = ldest; | ||
455 | src = lsrc; | ||
456 | } | ||
457 | if (n & 2) | ||
458 | { | ||
459 | short *sdest = dest; | ||
460 | const short *ssrc = src; | ||
461 | *sdest++ = *ssrc++; | ||
462 | dest = sdest; | ||
463 | src = ssrc; | ||
464 | } | ||
465 | if (n & 1) | ||
466 | { | ||
467 | char *cdest = dest; | ||
468 | const char *csrc = src; | ||
469 | *cdest = *csrc; | ||
470 | } | ||
471 | } | ||
472 | else | ||
473 | { | ||
474 | dest = (char *) dest + n; | ||
475 | src = (const char *) src + n; | ||
476 | if ((long) dest & 1) | ||
477 | { | ||
478 | char *cdest = dest; | ||
479 | const char *csrc = src; | ||
480 | *--cdest = *--csrc; | ||
481 | dest = cdest; | ||
482 | src = csrc; | ||
483 | n--; | ||
484 | } | ||
485 | if (n > 2 && (long) dest & 2) | ||
486 | { | ||
487 | short *sdest = dest; | ||
488 | const short *ssrc = src; | ||
489 | *--sdest = *--ssrc; | ||
490 | dest = sdest; | ||
491 | src = ssrc; | ||
492 | n -= 2; | ||
493 | } | ||
494 | temp = n >> 2; | ||
495 | if (temp) | ||
496 | { | ||
497 | long *ldest = dest; | ||
498 | const long *lsrc = src; | ||
499 | temp--; | ||
500 | do | ||
501 | *--ldest = *--lsrc; | ||
502 | while (temp--); | ||
503 | dest = ldest; | ||
504 | src = lsrc; | ||
505 | } | ||
506 | if (n & 2) | ||
507 | { | ||
508 | short *sdest = dest; | ||
509 | const short *ssrc = src; | ||
510 | *--sdest = *--ssrc; | ||
511 | dest = sdest; | ||
512 | src = ssrc; | ||
513 | } | ||
514 | if (n & 1) | ||
515 | { | ||
516 | char *cdest = dest; | ||
517 | const char *csrc = src; | ||
518 | *--cdest = *--csrc; | ||
519 | } | ||
520 | } | ||
521 | return xdest; | ||
522 | } | ||
523 | 148 | ||
524 | #define __HAVE_ARCH_MEMCMP | 149 | #define __HAVE_ARCH_MEMCMP |
525 | extern int memcmp(const void * ,const void * ,size_t ); | 150 | extern int memcmp(const void *, const void *, __kernel_size_t); |
526 | #define memcmp(cs, ct, n) \ | 151 | #define memcmp(d, s, n) __builtin_memcmp(d, s, n) |
527 | (__builtin_constant_p(n) ? \ | ||
528 | __builtin_memcmp((cs),(ct),(n)) : \ | ||
529 | memcmp((cs),(ct),(n))) | ||
530 | |||
531 | #define __HAVE_ARCH_MEMCHR | ||
532 | static inline void *memchr(const void *cs, int c, size_t count) | ||
533 | { | ||
534 | /* Someone else can optimize this, I don't care - tonym@mac.linux-m68k.org */ | ||
535 | unsigned char *ret = (unsigned char *)cs; | ||
536 | for(;count>0;count--,ret++) | ||
537 | if(*ret == c) return ret; | ||
538 | |||
539 | return NULL; | ||
540 | } | ||
541 | 152 | ||
542 | #endif /* _M68K_STRING_H_ */ | 153 | #endif /* _M68K_STRING_H_ */ |
diff --git a/include/asm-m68k/types.h b/include/asm-m68k/types.h index f391cbe39b96..b5a1febc97d4 100644 --- a/include/asm-m68k/types.h +++ b/include/asm-m68k/types.h | |||
@@ -60,8 +60,6 @@ typedef unsigned long long u64; | |||
60 | typedef u32 dma_addr_t; | 60 | typedef u32 dma_addr_t; |
61 | typedef u32 dma64_addr_t; | 61 | typedef u32 dma64_addr_t; |
62 | 62 | ||
63 | typedef unsigned short kmem_bufctl_t; | ||
64 | |||
65 | #endif /* __ASSEMBLY__ */ | 63 | #endif /* __ASSEMBLY__ */ |
66 | 64 | ||
67 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index 05e03df0ec29..942dfbead27f 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h | |||
@@ -48,20 +48,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
48 | /* to align the pointer to the (next) page boundary */ | 48 | /* to align the pointer to the (next) page boundary */ |
49 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 49 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
50 | 50 | ||
51 | /* Pure 2^n version of get_order */ | ||
52 | extern __inline__ int get_order(unsigned long size) | ||
53 | { | ||
54 | int order; | ||
55 | |||
56 | size = (size-1) >> (PAGE_SHIFT-1); | ||
57 | order = -1; | ||
58 | do { | ||
59 | size >>= 1; | ||
60 | order++; | ||
61 | } while (size); | ||
62 | return order; | ||
63 | } | ||
64 | |||
65 | extern unsigned long memory_start; | 51 | extern unsigned long memory_start; |
66 | extern unsigned long memory_end; | 52 | extern unsigned long memory_end; |
67 | 53 | ||
@@ -73,8 +59,8 @@ extern unsigned long memory_end; | |||
73 | 59 | ||
74 | #ifndef __ASSEMBLY__ | 60 | #ifndef __ASSEMBLY__ |
75 | 61 | ||
76 | #define __pa(vaddr) virt_to_phys((void *)vaddr) | 62 | #define __pa(vaddr) virt_to_phys((void *)(vaddr)) |
77 | #define __va(paddr) phys_to_virt((unsigned long)paddr) | 63 | #define __va(paddr) phys_to_virt((unsigned long)(paddr)) |
78 | 64 | ||
79 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) | 65 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) |
80 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) | 66 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) |
@@ -84,6 +70,7 @@ extern unsigned long memory_end; | |||
84 | 70 | ||
85 | #define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn)) | 71 | #define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn)) |
86 | #define page_to_pfn(page) virt_to_pfn(page_to_virt(page)) | 72 | #define page_to_pfn(page) virt_to_pfn(page_to_virt(page)) |
73 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | ||
87 | 74 | ||
88 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ | 75 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ |
89 | ((void *)(kaddr) < (void *)memory_end)) | 76 | ((void *)(kaddr) < (void *)memory_end)) |
@@ -92,4 +79,6 @@ extern unsigned long memory_end; | |||
92 | 79 | ||
93 | #endif /* __KERNEL__ */ | 80 | #endif /* __KERNEL__ */ |
94 | 81 | ||
82 | #include <asm-generic/page.h> | ||
83 | |||
95 | #endif /* _M68KNOMMU_PAGE_H */ | 84 | #endif /* _M68KNOMMU_PAGE_H */ |
diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h index e42b3093e903..2b3dc3bed4da 100644 --- a/include/asm-mips/a.out.h +++ b/include/asm-mips/a.out.h | |||
@@ -35,10 +35,10 @@ struct exec | |||
35 | 35 | ||
36 | #ifdef __KERNEL__ | 36 | #ifdef __KERNEL__ |
37 | 37 | ||
38 | #ifdef CONFIG_MIPS32 | 38 | #ifdef CONFIG_32BIT |
39 | #define STACK_TOP TASK_SIZE | 39 | #define STACK_TOP TASK_SIZE |
40 | #endif | 40 | #endif |
41 | #ifdef CONFIG_MIPS64 | 41 | #ifdef CONFIG_64BIT |
42 | #define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) | 42 | #define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) |
43 | #endif | 43 | #endif |
44 | 44 | ||
diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h index 2caa8c427204..7dc2619f5006 100644 --- a/include/asm-mips/addrspace.h +++ b/include/asm-mips/addrspace.h | |||
@@ -48,7 +48,7 @@ | |||
48 | #define CPHYSADDR(a) ((_ACAST32_ (a)) & 0x1fffffff) | 48 | #define CPHYSADDR(a) ((_ACAST32_ (a)) & 0x1fffffff) |
49 | #define XPHYSADDR(a) ((_ACAST64_ (a)) & 0x000000ffffffffff) | 49 | #define XPHYSADDR(a) ((_ACAST64_ (a)) & 0x000000ffffffffff) |
50 | 50 | ||
51 | #ifdef CONFIG_MIPS64 | 51 | #ifdef CONFIG_64BIT |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Memory segments (64bit kernel mode addresses) | 54 | * Memory segments (64bit kernel mode addresses) |
diff --git a/include/asm-mips/asmmacro.h b/include/asm-mips/asmmacro.h index 37a460aa0378..30b18ea6cb11 100644 --- a/include/asm-mips/asmmacro.h +++ b/include/asm-mips/asmmacro.h | |||
@@ -7,14 +7,14 @@ | |||
7 | */ | 7 | */ |
8 | #ifndef _ASM_ASMMACRO_H | 8 | #ifndef _ASM_ASMMACRO_H |
9 | #define _ASM_ASMMACRO_H | 9 | #define _ASM_ASMMACRO_H |
10 | 10 | ||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
12 | #include <asm/hazards.h> | 12 | #include <asm/hazards.h> |
13 | 13 | ||
14 | #ifdef CONFIG_MIPS32 | 14 | #ifdef CONFIG_32BIT |
15 | #include <asm/asmmacro-32.h> | 15 | #include <asm/asmmacro-32.h> |
16 | #endif | 16 | #endif |
17 | #ifdef CONFIG_MIPS64 | 17 | #ifdef CONFIG_64BIT |
18 | #include <asm/asmmacro-64.h> | 18 | #include <asm/asmmacro-64.h> |
19 | #endif | 19 | #endif |
20 | 20 | ||
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index 7d89e87bc8c6..c0bd8d014e14 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -334,7 +334,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
334 | */ | 334 | */ |
335 | #define atomic_add_negative(i,v) (atomic_add_return(i, (v)) < 0) | 335 | #define atomic_add_negative(i,v) (atomic_add_return(i, (v)) < 0) |
336 | 336 | ||
337 | #ifdef CONFIG_MIPS64 | 337 | #ifdef CONFIG_64BIT |
338 | 338 | ||
339 | typedef struct { volatile __s64 counter; } atomic64_t; | 339 | typedef struct { volatile __s64 counter; } atomic64_t; |
340 | 340 | ||
@@ -639,7 +639,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
639 | */ | 639 | */ |
640 | #define atomic64_add_negative(i,v) (atomic64_add_return(i, (v)) < 0) | 640 | #define atomic64_add_negative(i,v) (atomic64_add_return(i, (v)) < 0) |
641 | 641 | ||
642 | #endif /* CONFIG_MIPS64 */ | 642 | #endif /* CONFIG_64BIT */ |
643 | 643 | ||
644 | /* | 644 | /* |
645 | * atomic*_return operations are serializing but not the non-*_return | 645 | * atomic*_return operations are serializing but not the non-*_return |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 779d2187a6a4..eb8d79dba11c 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -20,13 +20,13 @@ | |||
20 | #define SZLONG_MASK 31UL | 20 | #define SZLONG_MASK 31UL |
21 | #define __LL "ll " | 21 | #define __LL "ll " |
22 | #define __SC "sc " | 22 | #define __SC "sc " |
23 | #define cpu_to_lelongp(x) cpu_to_le32p((__u32 *) (x)) | 23 | #define cpu_to_lelongp(x) cpu_to_le32p((__u32 *) (x)) |
24 | #elif (_MIPS_SZLONG == 64) | 24 | #elif (_MIPS_SZLONG == 64) |
25 | #define SZLONG_LOG 6 | 25 | #define SZLONG_LOG 6 |
26 | #define SZLONG_MASK 63UL | 26 | #define SZLONG_MASK 63UL |
27 | #define __LL "lld " | 27 | #define __LL "lld " |
28 | #define __SC "scd " | 28 | #define __SC "scd " |
29 | #define cpu_to_lelongp(x) cpu_to_le64p((__u64 *) (x)) | 29 | #define cpu_to_lelongp(x) cpu_to_le64p((__u64 *) (x)) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
@@ -533,14 +533,14 @@ static inline unsigned long ffz(unsigned long word) | |||
533 | int b = 0, s; | 533 | int b = 0, s; |
534 | 534 | ||
535 | word = ~word; | 535 | word = ~word; |
536 | #ifdef CONFIG_MIPS32 | 536 | #ifdef CONFIG_32BIT |
537 | s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s; | 537 | s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s; |
538 | s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s; | 538 | s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s; |
539 | s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s; | 539 | s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s; |
540 | s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s; | 540 | s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s; |
541 | s = 1; if (word << 31 != 0) s = 0; b += s; | 541 | s = 1; if (word << 31 != 0) s = 0; b += s; |
542 | #endif | 542 | #endif |
543 | #ifdef CONFIG_MIPS64 | 543 | #ifdef CONFIG_64BIT |
544 | s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s; | 544 | s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s; |
545 | s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s; | 545 | s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s; |
546 | s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s; | 546 | s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s; |
@@ -683,7 +683,7 @@ found_middle: | |||
683 | */ | 683 | */ |
684 | static inline int sched_find_first_bit(const unsigned long *b) | 684 | static inline int sched_find_first_bit(const unsigned long *b) |
685 | { | 685 | { |
686 | #ifdef CONFIG_MIPS32 | 686 | #ifdef CONFIG_32BIT |
687 | if (unlikely(b[0])) | 687 | if (unlikely(b[0])) |
688 | return __ffs(b[0]); | 688 | return __ffs(b[0]); |
689 | if (unlikely(b[1])) | 689 | if (unlikely(b[1])) |
@@ -694,7 +694,7 @@ static inline int sched_find_first_bit(const unsigned long *b) | |||
694 | return __ffs(b[3]) + 96; | 694 | return __ffs(b[3]) + 96; |
695 | return __ffs(b[4]) + 128; | 695 | return __ffs(b[4]) + 128; |
696 | #endif | 696 | #endif |
697 | #ifdef CONFIG_MIPS64 | 697 | #ifdef CONFIG_64BIT |
698 | if (unlikely(b[0])) | 698 | if (unlikely(b[0])) |
699 | return __ffs(b[0]); | 699 | return __ffs(b[0]); |
700 | if (unlikely(b[1])) | 700 | if (unlikely(b[1])) |
diff --git a/include/asm-mips/bugs.h b/include/asm-mips/bugs.h index 18cced19cca4..b14b961c2100 100644 --- a/include/asm-mips/bugs.h +++ b/include/asm-mips/bugs.h | |||
@@ -15,7 +15,7 @@ extern void check_bugs64(void); | |||
15 | static inline void check_bugs(void) | 15 | static inline void check_bugs(void) |
16 | { | 16 | { |
17 | check_bugs32(); | 17 | check_bugs32(); |
18 | #ifdef CONFIG_MIPS64 | 18 | #ifdef CONFIG_64BIT |
19 | check_bugs64(); | 19 | check_bugs64(); |
20 | #endif | 20 | #endif |
21 | } | 21 | } |
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index c25cc92b9950..c1ea5a8714f3 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h | |||
@@ -128,7 +128,7 @@ static inline unsigned int csum_tcpudp_nofold(unsigned long saddr, | |||
128 | { | 128 | { |
129 | __asm__( | 129 | __asm__( |
130 | ".set\tnoat\t\t\t# csum_tcpudp_nofold\n\t" | 130 | ".set\tnoat\t\t\t# csum_tcpudp_nofold\n\t" |
131 | #ifdef CONFIG_MIPS32 | 131 | #ifdef CONFIG_32BIT |
132 | "addu\t%0, %2\n\t" | 132 | "addu\t%0, %2\n\t" |
133 | "sltu\t$1, %0, %2\n\t" | 133 | "sltu\t$1, %0, %2\n\t" |
134 | "addu\t%0, $1\n\t" | 134 | "addu\t%0, $1\n\t" |
@@ -141,7 +141,7 @@ static inline unsigned int csum_tcpudp_nofold(unsigned long saddr, | |||
141 | "sltu\t$1, %0, %4\n\t" | 141 | "sltu\t$1, %0, %4\n\t" |
142 | "addu\t%0, $1\n\t" | 142 | "addu\t%0, $1\n\t" |
143 | #endif | 143 | #endif |
144 | #ifdef CONFIG_MIPS64 | 144 | #ifdef CONFIG_64BIT |
145 | "daddu\t%0, %2\n\t" | 145 | "daddu\t%0, %2\n\t" |
146 | "daddu\t%0, %3\n\t" | 146 | "daddu\t%0, %3\n\t" |
147 | "daddu\t%0, %4\n\t" | 147 | "daddu\t%0, %4\n\t" |
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h index 1df2c299de82..9a2de642eee6 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h | |||
@@ -106,7 +106,7 @@ | |||
106 | #define PLAT_TRAMPOLINE_STUFF_LINE 0UL | 106 | #define PLAT_TRAMPOLINE_STUFF_LINE 0UL |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | #ifdef CONFIG_MIPS32 | 109 | #ifdef CONFIG_32BIT |
110 | # ifndef cpu_has_nofpuex | 110 | # ifndef cpu_has_nofpuex |
111 | # define cpu_has_nofpuex (cpu_data[0].options & MIPS_CPU_NOFPUEX) | 111 | # define cpu_has_nofpuex (cpu_data[0].options & MIPS_CPU_NOFPUEX) |
112 | # endif | 112 | # endif |
@@ -124,7 +124,7 @@ | |||
124 | # endif | 124 | # endif |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | #ifdef CONFIG_MIPS64 | 127 | #ifdef CONFIG_64BIT |
128 | # ifndef cpu_has_nofpuex | 128 | # ifndef cpu_has_nofpuex |
129 | # define cpu_has_nofpuex 0 | 129 | # define cpu_has_nofpuex 0 |
130 | # endif | 130 | # endif |
diff --git a/include/asm-mips/ddb5xxx/ddb5477.h b/include/asm-mips/ddb5xxx/ddb5477.h index ae3e2a38fd5f..a438548e6ef3 100644 --- a/include/asm-mips/ddb5xxx/ddb5477.h +++ b/include/asm-mips/ddb5xxx/ddb5477.h | |||
@@ -247,7 +247,7 @@ extern void ll_vrc5477_irq_disable(int vrc5477_irq); | |||
247 | * All PCI irq but INTC are active low. | 247 | * All PCI irq but INTC are active low. |
248 | */ | 248 | */ |
249 | 249 | ||
250 | /* | 250 | /* |
251 | * irq number block assignment | 251 | * irq number block assignment |
252 | */ | 252 | */ |
253 | 253 | ||
@@ -285,7 +285,7 @@ extern void ll_vrc5477_irq_disable(int vrc5477_irq); | |||
285 | #define VRC5477_IRQ_IOPCI_INTB (17 + VRC5477_IRQ_BASE) /* USB-P */ | 285 | #define VRC5477_IRQ_IOPCI_INTB (17 + VRC5477_IRQ_BASE) /* USB-P */ |
286 | #define VRC5477_IRQ_IOPCI_INTC (18 + VRC5477_IRQ_BASE) /* AC97 */ | 286 | #define VRC5477_IRQ_IOPCI_INTC (18 + VRC5477_IRQ_BASE) /* AC97 */ |
287 | #define VRC5477_IRQ_IOPCI_INTD (19 + VRC5477_IRQ_BASE) /* Reserved */ | 287 | #define VRC5477_IRQ_IOPCI_INTD (19 + VRC5477_IRQ_BASE) /* Reserved */ |
288 | #define VRC5477_IRQ_UART1 (20 + VRC5477_IRQ_BASE) | 288 | #define VRC5477_IRQ_UART1 (20 + VRC5477_IRQ_BASE) |
289 | #define VRC5477_IRQ_SPT0 (21 + VRC5477_IRQ_BASE) /* special purpose timer 0 */ | 289 | #define VRC5477_IRQ_SPT0 (21 + VRC5477_IRQ_BASE) /* special purpose timer 0 */ |
290 | #define VRC5477_IRQ_GPT0 (22 + VRC5477_IRQ_BASE) /* general purpose timer 0 */ | 290 | #define VRC5477_IRQ_GPT0 (22 + VRC5477_IRQ_BASE) /* general purpose timer 0 */ |
291 | #define VRC5477_IRQ_GPT1 (23 + VRC5477_IRQ_BASE) /* general purpose timer 1 */ | 291 | #define VRC5477_IRQ_GPT1 (23 + VRC5477_IRQ_BASE) /* general purpose timer 1 */ |
@@ -301,7 +301,7 @@ extern void ll_vrc5477_irq_disable(int vrc5477_irq); | |||
301 | /* | 301 | /* |
302 | * i2859 irq assignment | 302 | * i2859 irq assignment |
303 | */ | 303 | */ |
304 | #define I8259_IRQ_RESERVED_0 (0 + I8259_IRQ_BASE) | 304 | #define I8259_IRQ_RESERVED_0 (0 + I8259_IRQ_BASE) |
305 | #define I8259_IRQ_KEYBOARD (1 + I8259_IRQ_BASE) /* M1543 default */ | 305 | #define I8259_IRQ_KEYBOARD (1 + I8259_IRQ_BASE) /* M1543 default */ |
306 | #define I8259_IRQ_CASCADE (2 + I8259_IRQ_BASE) | 306 | #define I8259_IRQ_CASCADE (2 + I8259_IRQ_BASE) |
307 | #define I8259_IRQ_UART_B (3 + I8259_IRQ_BASE) /* M1543 default, may conflict with RTC according to schematic diagram */ | 307 | #define I8259_IRQ_UART_B (3 + I8259_IRQ_BASE) /* M1543 default, may conflict with RTC according to schematic diagram */ |
diff --git a/include/asm-mips/dec/prom.h b/include/asm-mips/dec/prom.h index b63e2f2317d1..a05d6d3395fe 100644 --- a/include/asm-mips/dec/prom.h +++ b/include/asm-mips/dec/prom.h | |||
@@ -48,15 +48,15 @@ | |||
48 | */ | 48 | */ |
49 | #define REX_PROM_MAGIC 0x30464354 | 49 | #define REX_PROM_MAGIC 0x30464354 |
50 | 50 | ||
51 | #ifdef CONFIG_MIPS64 | 51 | #ifdef CONFIG_64BIT |
52 | 52 | ||
53 | #define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ | 53 | #define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ |
54 | 54 | ||
55 | #else /* !CONFIG_MIPS64 */ | 55 | #else /* !CONFIG_64BIT */ |
56 | 56 | ||
57 | #define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC) | 57 | #define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC) |
58 | 58 | ||
59 | #endif /* !CONFIG_MIPS64 */ | 59 | #endif /* !CONFIG_64BIT */ |
60 | 60 | ||
61 | 61 | ||
62 | /* | 62 | /* |
@@ -105,7 +105,7 @@ extern int (*__pmax_read)(int, void *, int); | |||
105 | extern int (*__pmax_close)(int); | 105 | extern int (*__pmax_close)(int); |
106 | 106 | ||
107 | 107 | ||
108 | #ifdef CONFIG_MIPS64 | 108 | #ifdef CONFIG_64BIT |
109 | 109 | ||
110 | /* | 110 | /* |
111 | * On MIPS64 we have to call PROM functions via a helper | 111 | * On MIPS64 we have to call PROM functions via a helper |
@@ -138,7 +138,7 @@ int _prom_printf(int (*)(char *, ...), char *, ...) __DEC_PROM_O32; | |||
138 | #define prom_getenv(x) _prom_getenv(__prom_getenv, x) | 138 | #define prom_getenv(x) _prom_getenv(__prom_getenv, x) |
139 | #define prom_printf(x...) _prom_printf(__prom_printf, x) | 139 | #define prom_printf(x...) _prom_printf(__prom_printf, x) |
140 | 140 | ||
141 | #else /* !CONFIG_MIPS64 */ | 141 | #else /* !CONFIG_64BIT */ |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * On plain MIPS we just call PROM functions directly. | 144 | * On plain MIPS we just call PROM functions directly. |
@@ -160,7 +160,7 @@ int _prom_printf(int (*)(char *, ...), char *, ...) __DEC_PROM_O32; | |||
160 | #define pmax_read __pmax_read | 160 | #define pmax_read __pmax_read |
161 | #define pmax_close __pmax_close | 161 | #define pmax_close __pmax_close |
162 | 162 | ||
163 | #endif /* !CONFIG_MIPS64 */ | 163 | #endif /* !CONFIG_64BIT */ |
164 | 164 | ||
165 | 165 | ||
166 | extern void prom_meminit(u32); | 166 | extern void prom_meminit(u32); |
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h index d0f68447e5a7..a606dbee0412 100644 --- a/include/asm-mips/delay.h +++ b/include/asm-mips/delay.h | |||
@@ -57,11 +57,11 @@ static inline void __udelay(unsigned long usecs, unsigned long lpj) | |||
57 | * The common rates of 1000 and 128 are rounded wrongly by the | 57 | * The common rates of 1000 and 128 are rounded wrongly by the |
58 | * catchall case for 64-bit. Excessive precission? Probably ... | 58 | * catchall case for 64-bit. Excessive precission? Probably ... |
59 | */ | 59 | */ |
60 | #if defined(CONFIG_MIPS64) && (HZ == 128) | 60 | #if defined(CONFIG_64BIT) && (HZ == 128) |
61 | usecs *= 0x0008637bd05af6c7UL; /* 2**64 / (1000000 / HZ) */ | 61 | usecs *= 0x0008637bd05af6c7UL; /* 2**64 / (1000000 / HZ) */ |
62 | #elif defined(CONFIG_MIPS64) && (HZ == 1000) | 62 | #elif defined(CONFIG_64BIT) && (HZ == 1000) |
63 | usecs *= 0x004189374BC6A7f0UL; /* 2**64 / (1000000 / HZ) */ | 63 | usecs *= 0x004189374BC6A7f0UL; /* 2**64 / (1000000 / HZ) */ |
64 | #elif defined(CONFIG_MIPS64) | 64 | #elif defined(CONFIG_64BIT) |
65 | usecs *= (0x8000000000000000UL / (500000 / HZ)); | 65 | usecs *= (0x8000000000000000UL / (500000 / HZ)); |
66 | #else /* 32-bit junk follows here */ | 66 | #else /* 32-bit junk follows here */ |
67 | usecs *= (unsigned long) (((0x8000000000000000ULL / (500000 / HZ)) + | 67 | usecs *= (unsigned long) (((0x8000000000000000ULL / (500000 / HZ)) + |
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h index 7b92c8045cc2..e48811440015 100644 --- a/include/asm-mips/elf.h +++ b/include/asm-mips/elf.h | |||
@@ -125,7 +125,7 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | |||
125 | typedef double elf_fpreg_t; | 125 | typedef double elf_fpreg_t; |
126 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | 126 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; |
127 | 127 | ||
128 | #ifdef CONFIG_MIPS32 | 128 | #ifdef CONFIG_32BIT |
129 | 129 | ||
130 | /* | 130 | /* |
131 | * This is used to ensure we don't load something for the wrong architecture. | 131 | * This is used to ensure we don't load something for the wrong architecture. |
@@ -153,9 +153,9 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
153 | */ | 153 | */ |
154 | #define ELF_CLASS ELFCLASS32 | 154 | #define ELF_CLASS ELFCLASS32 |
155 | 155 | ||
156 | #endif /* CONFIG_MIPS32 */ | 156 | #endif /* CONFIG_32BIT */ |
157 | 157 | ||
158 | #ifdef CONFIG_MIPS64 | 158 | #ifdef CONFIG_64BIT |
159 | /* | 159 | /* |
160 | * This is used to ensure we don't load something for the wrong architecture. | 160 | * This is used to ensure we don't load something for the wrong architecture. |
161 | */ | 161 | */ |
@@ -177,7 +177,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
177 | */ | 177 | */ |
178 | #define ELF_CLASS ELFCLASS64 | 178 | #define ELF_CLASS ELFCLASS64 |
179 | 179 | ||
180 | #endif /* CONFIG_MIPS64 */ | 180 | #endif /* CONFIG_64BIT */ |
181 | 181 | ||
182 | /* | 182 | /* |
183 | * These are used to set parameters in the core dumps. | 183 | * These are used to set parameters in the core dumps. |
@@ -193,7 +193,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
193 | 193 | ||
194 | #ifdef __KERNEL__ | 194 | #ifdef __KERNEL__ |
195 | 195 | ||
196 | #ifdef CONFIG_MIPS32 | 196 | #ifdef CONFIG_32BIT |
197 | 197 | ||
198 | #define SET_PERSONALITY(ex, ibcs2) \ | 198 | #define SET_PERSONALITY(ex, ibcs2) \ |
199 | do { \ | 199 | do { \ |
@@ -202,9 +202,9 @@ do { \ | |||
202 | set_personality(PER_LINUX); \ | 202 | set_personality(PER_LINUX); \ |
203 | } while (0) | 203 | } while (0) |
204 | 204 | ||
205 | #endif /* CONFIG_MIPS32 */ | 205 | #endif /* CONFIG_32BIT */ |
206 | 206 | ||
207 | #ifdef CONFIG_MIPS64 | 207 | #ifdef CONFIG_64BIT |
208 | 208 | ||
209 | #define SET_PERSONALITY(ex, ibcs2) \ | 209 | #define SET_PERSONALITY(ex, ibcs2) \ |
210 | do { current->thread.mflags &= ~MF_ABI_MASK; \ | 210 | do { current->thread.mflags &= ~MF_ABI_MASK; \ |
@@ -222,7 +222,7 @@ do { current->thread.mflags &= ~MF_ABI_MASK; \ | |||
222 | set_personality(PER_LINUX); \ | 222 | set_personality(PER_LINUX); \ |
223 | } while (0) | 223 | } while (0) |
224 | 224 | ||
225 | #endif /* CONFIG_MIPS64 */ | 225 | #endif /* CONFIG_64BIT */ |
226 | 226 | ||
227 | extern void dump_regs(elf_greg_t *, struct pt_regs *regs); | 227 | extern void dump_regs(elf_greg_t *, struct pt_regs *regs); |
228 | extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); | 228 | extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); |
diff --git a/include/asm-mips/fpregdef.h b/include/asm-mips/fpregdef.h index 1d9aa0979181..2b5fddc8f487 100644 --- a/include/asm-mips/fpregdef.h +++ b/include/asm-mips/fpregdef.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define _ASM_FPREGDEF_H | 13 | #define _ASM_FPREGDEF_H |
14 | 14 | ||
15 | #include <asm/sgidefs.h> | 15 | #include <asm/sgidefs.h> |
16 | 16 | ||
17 | #if _MIPS_SIM == _MIPS_SIM_ABI32 | 17 | #if _MIPS_SIM == _MIPS_SIM_ABI32 |
18 | 18 | ||
19 | /* | 19 | /* |
@@ -56,7 +56,7 @@ | |||
56 | #define fcr31 $31 /* FPU status register */ | 56 | #define fcr31 $31 /* FPU status register */ |
57 | 57 | ||
58 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 58 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
59 | 59 | ||
60 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 | 60 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 |
61 | 61 | ||
62 | #define fv0 $f0 /* return value */ | 62 | #define fv0 $f0 /* return value */ |
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h index 6cb38d5c0407..ea24e733b1bc 100644 --- a/include/asm-mips/fpu.h +++ b/include/asm-mips/fpu.h | |||
@@ -82,7 +82,7 @@ do { \ | |||
82 | 82 | ||
83 | static inline int is_fpu_owner(void) | 83 | static inline int is_fpu_owner(void) |
84 | { | 84 | { |
85 | return cpu_has_fpu && test_thread_flag(TIF_USEDFPU); | 85 | return cpu_has_fpu && test_thread_flag(TIF_USEDFPU); |
86 | } | 86 | } |
87 | 87 | ||
88 | static inline void own_fpu(void) | 88 | static inline void own_fpu(void) |
@@ -90,7 +90,7 @@ static inline void own_fpu(void) | |||
90 | if (cpu_has_fpu) { | 90 | if (cpu_has_fpu) { |
91 | __enable_fpu(); | 91 | __enable_fpu(); |
92 | KSTK_STATUS(current) |= ST0_CU1; | 92 | KSTK_STATUS(current) |= ST0_CU1; |
93 | set_thread_flag(TIF_USEDFPU); | 93 | set_thread_flag(TIF_USEDFPU); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
@@ -98,7 +98,7 @@ static inline void lose_fpu(void) | |||
98 | { | 98 | { |
99 | if (cpu_has_fpu) { | 99 | if (cpu_has_fpu) { |
100 | KSTK_STATUS(current) &= ~ST0_CU1; | 100 | KSTK_STATUS(current) &= ~ST0_CU1; |
101 | clear_thread_flag(TIF_USEDFPU); | 101 | clear_thread_flag(TIF_USEDFPU); |
102 | __disable_fpu(); | 102 | __disable_fpu(); |
103 | } | 103 | } |
104 | } | 104 | } |
@@ -127,7 +127,7 @@ static inline void restore_fp(struct task_struct *tsk) | |||
127 | static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) | 127 | static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) |
128 | { | 128 | { |
129 | if (cpu_has_fpu) { | 129 | if (cpu_has_fpu) { |
130 | if ((tsk == current) && is_fpu_owner()) | 130 | if ((tsk == current) && is_fpu_owner()) |
131 | _save_fp(current); | 131 | _save_fp(current); |
132 | return tsk->thread.fpu.hard.fpr; | 132 | return tsk->thread.fpu.hard.fpr; |
133 | } | 133 | } |
diff --git a/include/asm-mips/hp-lj/asic.h b/include/asm-mips/hp-lj/asic.h deleted file mode 100644 index fc2ca656da00..000000000000 --- a/include/asm-mips/hp-lj/asic.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | |||
2 | typedef enum { IllegalAsic, UnknownAsic, AndrosAsic, HarmonyAsic } AsicId; | ||
3 | |||
4 | AsicId GetAsicId(void); | ||
5 | |||
6 | const char* const GetAsicName(void); | ||
7 | |||
diff --git a/include/asm-mips/ip32/mace.h b/include/asm-mips/ip32/mace.h index 2b7b0fdeac19..432011b16c26 100644 --- a/include/asm-mips/ip32/mace.h +++ b/include/asm-mips/ip32/mace.h | |||
@@ -94,7 +94,7 @@ struct mace_video { | |||
94 | unsigned long xxx; /* later... */ | 94 | unsigned long xxx; /* later... */ |
95 | }; | 95 | }; |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * Ethernet interface | 98 | * Ethernet interface |
99 | */ | 99 | */ |
100 | struct mace_ethernet { | 100 | struct mace_ethernet { |
@@ -129,7 +129,7 @@ struct mace_ethernet { | |||
129 | volatile unsigned long rx_fifo; | 129 | volatile unsigned long rx_fifo; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * Peripherals | 133 | * Peripherals |
134 | */ | 134 | */ |
135 | 135 | ||
@@ -251,7 +251,7 @@ struct mace_timers { | |||
251 | timer_reg audio_out2; | 251 | timer_reg audio_out2; |
252 | timer_reg video_in1; | 252 | timer_reg video_in1; |
253 | timer_reg video_in2; | 253 | timer_reg video_in2; |
254 | timer_reg video_out; | 254 | timer_reg video_out; |
255 | }; | 255 | }; |
256 | 256 | ||
257 | struct mace_perif { | 257 | struct mace_perif { |
@@ -272,7 +272,7 @@ struct mace_perif { | |||
272 | }; | 272 | }; |
273 | 273 | ||
274 | 274 | ||
275 | /* | 275 | /* |
276 | * ISA peripherals | 276 | * ISA peripherals |
277 | */ | 277 | */ |
278 | 278 | ||
diff --git a/include/asm-mips/lasat/serial.h b/include/asm-mips/lasat/serial.h index 21d0fb7cee64..9e88c7669c7a 100644 --- a/include/asm-mips/lasat/serial.h +++ b/include/asm-mips/lasat/serial.h | |||
@@ -1,13 +1,13 @@ | |||
1 | #include <asm/lasat/lasat.h> | 1 | #include <asm/lasat/lasat.h> |
2 | 2 | ||
3 | /* Lasat 100 boards serial configuration */ | 3 | /* Lasat 100 boards serial configuration */ |
4 | #define LASAT_BASE_BAUD_100 ( 7372800 / 16 ) | 4 | #define LASAT_BASE_BAUD_100 ( 7372800 / 16 ) |
5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 | 5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 |
6 | #define LASAT_UART_REGS_SHIFT_100 2 | 6 | #define LASAT_UART_REGS_SHIFT_100 2 |
7 | #define LASATINT_UART_100 8 | 7 | #define LASATINT_UART_100 8 |
8 | 8 | ||
9 | /* * LASAT 200 boards serial configuration */ | 9 | /* * LASAT 200 boards serial configuration */ |
10 | #define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) | 10 | #define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) |
11 | #define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) | 11 | #define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) |
12 | #define LASAT_UART_REGS_SHIFT_200 3 | 12 | #define LASAT_UART_REGS_SHIFT_200 3 |
13 | #define LASATINT_UART_200 13 | 13 | #define LASATINT_UART_200 13 |
diff --git a/include/asm-mips/local.h b/include/asm-mips/local.h index 7eb6bf661b80..c38844f615fc 100644 --- a/include/asm-mips/local.h +++ b/include/asm-mips/local.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <asm/atomic.h> | 6 | #include <asm/atomic.h> |
7 | 7 | ||
8 | #ifdef CONFIG_MIPS32 | 8 | #ifdef CONFIG_32BIT |
9 | 9 | ||
10 | typedef atomic_t local_t; | 10 | typedef atomic_t local_t; |
11 | 11 | ||
@@ -20,7 +20,7 @@ typedef atomic_t local_t; | |||
20 | 20 | ||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef CONFIG_MIPS64 | 23 | #ifdef CONFIG_64BIT |
24 | 24 | ||
25 | typedef atomic64_t local_t; | 25 | typedef atomic64_t local_t; |
26 | 26 | ||
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index 2b36ea346910..148bae2fa7d3 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h | |||
@@ -1383,7 +1383,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
1383 | #define PCI_IO_START 0 | 1383 | #define PCI_IO_START 0 |
1384 | #define PCI_IO_END 0 | 1384 | #define PCI_IO_END 0 |
1385 | #define PCI_MEM_START 0 | 1385 | #define PCI_MEM_START 0 |
1386 | #define PCI_MEM_END 0 | 1386 | #define PCI_MEM_END 0 |
1387 | #define PCI_FIRST_DEVFN 0 | 1387 | #define PCI_FIRST_DEVFN 0 |
1388 | #define PCI_LAST_DEVFN 0 | 1388 | #define PCI_LAST_DEVFN 0 |
1389 | #endif | 1389 | #endif |
diff --git a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h index 4691398a414f..efafe65258b6 100644 --- a/include/asm-mips/mach-db1x00/db1x00.h +++ b/include/asm-mips/mach-db1x00/db1x00.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * | 23 | * |
24 | * ######################################################################## | 24 | * ######################################################################## |
25 | * | 25 | * |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | #ifndef __ASM_DB1X00_H | 28 | #ifndef __ASM_DB1X00_H |
29 | #define __ASM_DB1X00_H | 29 | #define __ASM_DB1X00_H |
diff --git a/include/asm-mips/mach-generic/spaces.h b/include/asm-mips/mach-generic/spaces.h index 63c0a81c7832..5a2c1efb4eb7 100644 --- a/include/asm-mips/mach-generic/spaces.h +++ b/include/asm-mips/mach-generic/spaces.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | 14 | ||
15 | #ifdef CONFIG_MIPS32 | 15 | #ifdef CONFIG_32BIT |
16 | 16 | ||
17 | #define CAC_BASE 0x80000000 | 17 | #define CAC_BASE 0x80000000 |
18 | #define IO_BASE 0xa0000000 | 18 | #define IO_BASE 0xa0000000 |
@@ -32,9 +32,9 @@ | |||
32 | #define HIGHMEM_START 0x20000000UL | 32 | #define HIGHMEM_START 0x20000000UL |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #endif /* CONFIG_MIPS32 */ | 35 | #endif /* CONFIG_32BIT */ |
36 | 36 | ||
37 | #ifdef CONFIG_MIPS64 | 37 | #ifdef CONFIG_64BIT |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * This handles the memory map. | 40 | * This handles the memory map. |
@@ -67,6 +67,6 @@ | |||
67 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | 67 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) |
68 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | 68 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) |
69 | 69 | ||
70 | #endif /* CONFIG_MIPS64 */ | 70 | #endif /* CONFIG_64BIT */ |
71 | 71 | ||
72 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ | 72 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ |
diff --git a/include/asm-mips/mach-ip22/spaces.h b/include/asm-mips/mach-ip22/spaces.h index 30d42fcafe3d..e96166f27c49 100644 --- a/include/asm-mips/mach-ip22/spaces.h +++ b/include/asm-mips/mach-ip22/spaces.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | 14 | ||
15 | #ifdef CONFIG_MIPS32 | 15 | #ifdef CONFIG_32BIT |
16 | 16 | ||
17 | #define CAC_BASE 0x80000000 | 17 | #define CAC_BASE 0x80000000 |
18 | #define IO_BASE 0xa0000000 | 18 | #define IO_BASE 0xa0000000 |
@@ -32,9 +32,9 @@ | |||
32 | #define HIGHMEM_START 0x20000000UL | 32 | #define HIGHMEM_START 0x20000000UL |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #endif /* CONFIG_MIPS32 */ | 35 | #endif /* CONFIG_32BIT */ |
36 | 36 | ||
37 | #ifdef CONFIG_MIPS64 | 37 | #ifdef CONFIG_64BIT |
38 | #define PAGE_OFFSET 0xffffffff80000000UL | 38 | #define PAGE_OFFSET 0xffffffff80000000UL |
39 | 39 | ||
40 | #ifndef HIGHMEM_START | 40 | #ifndef HIGHMEM_START |
@@ -50,6 +50,6 @@ | |||
50 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | 50 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) |
51 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | 51 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) |
52 | 52 | ||
53 | #endif /* CONFIG_MIPS64 */ | 53 | #endif /* CONFIG_64BIT */ |
54 | 54 | ||
55 | #endif /* __ASM_MACH_IP22_SPACES_H */ | 55 | #endif /* __ASM_MACH_IP22_SPACES_H */ |
diff --git a/include/asm-mips/mach-ip32/cpu-feature-overrides.h b/include/asm-mips/mach-ip32/cpu-feature-overrides.h index b932237f2193..04713973c6c3 100644 --- a/include/asm-mips/mach-ip32/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip32/cpu-feature-overrides.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * so, for 64bit IP32 kernel we just don't use ll/sc. | 18 | * so, for 64bit IP32 kernel we just don't use ll/sc. |
19 | * This does not affect luserland. | 19 | * This does not affect luserland. |
20 | */ | 20 | */ |
21 | #if defined(CONFIG_CPU_R5000) && defined(CONFIG_MIPS64) | 21 | #if defined(CONFIG_CPU_R5000) && defined(CONFIG_64BIT) |
22 | #define cpu_has_llsc 0 | 22 | #define cpu_has_llsc 0 |
23 | #else | 23 | #else |
24 | #define cpu_has_llsc 1 | 24 | #define cpu_has_llsc 1 |
diff --git a/include/asm-mips/mach-jazz/floppy.h b/include/asm-mips/mach-jazz/floppy.h index 8cf0d042c864..c9dad99b1232 100644 --- a/include/asm-mips/mach-jazz/floppy.h +++ b/include/asm-mips/mach-jazz/floppy.h | |||
@@ -92,7 +92,7 @@ static inline int fd_request_irq(void) | |||
92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
93 | SA_INTERRUPT | SA_SAMPLE_RANDOM, "floppy", NULL); | 93 | SA_INTERRUPT | SA_SAMPLE_RANDOM, "floppy", NULL); |
94 | } | 94 | } |
95 | 95 | ||
96 | static inline void fd_free_irq(void) | 96 | static inline void fd_free_irq(void) |
97 | { | 97 | { |
98 | free_irq(FLOPPY_IRQ, NULL); | 98 | free_irq(FLOPPY_IRQ, NULL); |
diff --git a/include/asm-mips/mach-pb1x00/pb1500.h b/include/asm-mips/mach-pb1x00/pb1500.h index d6c779747b3c..ff6d40c87a25 100644 --- a/include/asm-mips/mach-pb1x00/pb1500.h +++ b/include/asm-mips/mach-pb1x00/pb1500.h | |||
@@ -33,11 +33,11 @@ | |||
33 | #define PCI_BOARD_REG 0xAE000010 | 33 | #define PCI_BOARD_REG 0xAE000010 |
34 | #define PCMCIA_BOARD_REG 0xAE000010 | 34 | #define PCMCIA_BOARD_REG 0xAE000010 |
35 | #define PC_DEASSERT_RST 0x80 | 35 | #define PC_DEASSERT_RST 0x80 |
36 | #define PC_DRV_EN 0x10 | 36 | #define PC_DRV_EN 0x10 |
37 | #define PB1500_G_CONTROL 0xAE000014 | 37 | #define PB1500_G_CONTROL 0xAE000014 |
38 | #define PB1500_RST_VDDI 0xAE00001C | 38 | #define PB1500_RST_VDDI 0xAE00001C |
39 | #define PB1500_LEDS 0xAE000018 | 39 | #define PB1500_LEDS 0xAE000018 |
40 | 40 | ||
41 | #define PB1500_HEX_LED 0xAF000004 | 41 | #define PB1500_HEX_LED 0xAF000004 |
42 | #define PB1500_HEX_LED_BLANK 0xAF000008 | 42 | #define PB1500_HEX_LED_BLANK 0xAF000008 |
43 | 43 | ||
diff --git a/include/asm-mips/mach-qemu/cpu-feature-overrides.h b/include/asm-mips/mach-qemu/cpu-feature-overrides.h new file mode 100644 index 000000000000..f4e370e27168 --- /dev/null +++ b/include/asm-mips/mach-qemu/cpu-feature-overrides.h | |||
@@ -0,0 +1,31 @@ | |||
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 Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H | ||
9 | #define __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H | ||
10 | |||
11 | /* | ||
12 | * QEMU only comes with a hazard-free MIPS32 processor, so things are easy. | ||
13 | */ | ||
14 | #define cpu_has_mips16 0 | ||
15 | #define cpu_has_divec 0 | ||
16 | #define cpu_has_cache_cdex_p 0 | ||
17 | #define cpu_has_prefetch 0 | ||
18 | #define cpu_has_mcheck 0 | ||
19 | #define cpu_has_ejtag 0 | ||
20 | |||
21 | #define cpu_has_llsc 1 | ||
22 | #define cpu_has_vtag_icache 0 | ||
23 | #define cpu_has_dc_aliases (PAGE_SIZE < 0x4000) | ||
24 | #define cpu_has_ic_fills_f_dc 0 | ||
25 | |||
26 | #define cpu_has_dsp 0 | ||
27 | |||
28 | #define cpu_has_nofpuex 0 | ||
29 | #define cpu_has_64bits 0 | ||
30 | |||
31 | #endif /* __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H */ | ||
diff --git a/include/asm-mips/mach-qemu/param.h b/include/asm-mips/mach-qemu/param.h new file mode 100644 index 000000000000..cb30ee490ae6 --- /dev/null +++ b/include/asm-mips/mach-qemu/param.h | |||
@@ -0,0 +1,13 @@ | |||
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) 2005 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_QEMU_PARAM_H | ||
9 | #define __ASM_MACH_QEMU_PARAM_H | ||
10 | |||
11 | #define HZ 100 /* Internal kernel timer frequency */ | ||
12 | |||
13 | #endif /* __ASM_MACH_QEMU_PARAM_H */ | ||
diff --git a/include/asm-mips/mach-vr41xx/timex.h b/include/asm-mips/mach-vr41xx/timex.h deleted file mode 100644 index 8d71485d003a..000000000000 --- a/include/asm-mips/mach-vr41xx/timex.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003 by Ralf Baechle | ||
7 | */ | ||
8 | /* | ||
9 | * Changes: | ||
10 | * Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | ||
11 | * - CLOCK_TICK_RATE is changed into 32768 from 6144000. | ||
12 | */ | ||
13 | #ifndef __ASM_MACH_VR41XX_TIMEX_H | ||
14 | #define __ASM_MACH_VR41XX_TIMEX_H | ||
15 | |||
16 | #define CLOCK_TICK_RATE 32768 | ||
17 | |||
18 | #endif /* __ASM_MACH_VR41XX_TIMEX_H */ | ||
diff --git a/include/asm-mips/mmu_context.h b/include/asm-mips/mmu_context.h index 48b77c9fb4f2..45cd72d172e8 100644 --- a/include/asm-mips/mmu_context.h +++ b/include/asm-mips/mmu_context.h | |||
@@ -28,17 +28,17 @@ extern unsigned long pgd_current[]; | |||
28 | #define TLBMISS_HANDLER_SETUP_PGD(pgd) \ | 28 | #define TLBMISS_HANDLER_SETUP_PGD(pgd) \ |
29 | pgd_current[smp_processor_id()] = (unsigned long)(pgd) | 29 | pgd_current[smp_processor_id()] = (unsigned long)(pgd) |
30 | 30 | ||
31 | #ifdef CONFIG_MIPS32 | 31 | #ifdef CONFIG_32BIT |
32 | #define TLBMISS_HANDLER_SETUP() \ | 32 | #define TLBMISS_HANDLER_SETUP() \ |
33 | write_c0_context((unsigned long) smp_processor_id() << 23); \ | 33 | write_c0_context((unsigned long) smp_processor_id() << 23); \ |
34 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) | 34 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) |
35 | #endif | 35 | #endif |
36 | #if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) | 36 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) |
37 | #define TLBMISS_HANDLER_SETUP() \ | 37 | #define TLBMISS_HANDLER_SETUP() \ |
38 | write_c0_context((unsigned long) &pgd_current[smp_processor_id()] << 23); \ | 38 | write_c0_context((unsigned long) &pgd_current[smp_processor_id()] << 23); \ |
39 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) | 39 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) |
40 | #endif | 40 | #endif |
41 | #if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) | 41 | #if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) |
42 | #define TLBMISS_HANDLER_SETUP() \ | 42 | #define TLBMISS_HANDLER_SETUP() \ |
43 | write_c0_context((unsigned long) smp_processor_id() << 23); \ | 43 | write_c0_context((unsigned long) smp_processor_id() << 23); \ |
44 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) | 44 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) |
diff --git a/include/asm-mips/module.h b/include/asm-mips/module.h index 90ee24aad955..0be58b2aeb9f 100644 --- a/include/asm-mips/module.h +++ b/include/asm-mips/module.h | |||
@@ -25,7 +25,7 @@ typedef struct | |||
25 | Elf64_Sxword r_addend; /* Addend. */ | 25 | Elf64_Sxword r_addend; /* Addend. */ |
26 | } Elf64_Mips_Rela; | 26 | } Elf64_Mips_Rela; |
27 | 27 | ||
28 | #ifdef CONFIG_MIPS32 | 28 | #ifdef CONFIG_32BIT |
29 | 29 | ||
30 | #define Elf_Shdr Elf32_Shdr | 30 | #define Elf_Shdr Elf32_Shdr |
31 | #define Elf_Sym Elf32_Sym | 31 | #define Elf_Sym Elf32_Sym |
@@ -33,7 +33,7 @@ typedef struct | |||
33 | 33 | ||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #ifdef CONFIG_MIPS64 | 36 | #ifdef CONFIG_64BIT |
37 | 37 | ||
38 | #define Elf_Shdr Elf64_Shdr | 38 | #define Elf_Shdr Elf64_Shdr |
39 | #define Elf_Sym Elf64_Sym | 39 | #define Elf_Sym Elf64_Sym |
diff --git a/include/asm-mips/msgbuf.h b/include/asm-mips/msgbuf.h index 513b2824838b..a1533959742e 100644 --- a/include/asm-mips/msgbuf.h +++ b/include/asm-mips/msgbuf.h | |||
@@ -15,25 +15,25 @@ | |||
15 | 15 | ||
16 | struct msqid64_ds { | 16 | struct msqid64_ds { |
17 | struct ipc64_perm msg_perm; | 17 | struct ipc64_perm msg_perm; |
18 | #if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) | 18 | #if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN) |
19 | unsigned long __unused1; | 19 | unsigned long __unused1; |
20 | #endif | 20 | #endif |
21 | __kernel_time_t msg_stime; /* last msgsnd time */ | 21 | __kernel_time_t msg_stime; /* last msgsnd time */ |
22 | #if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) | 22 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN) |
23 | unsigned long __unused1; | 23 | unsigned long __unused1; |
24 | #endif | 24 | #endif |
25 | #if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) | 25 | #if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN) |
26 | unsigned long __unused2; | 26 | unsigned long __unused2; |
27 | #endif | 27 | #endif |
28 | __kernel_time_t msg_rtime; /* last msgrcv time */ | 28 | __kernel_time_t msg_rtime; /* last msgrcv time */ |
29 | #if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) | 29 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN) |
30 | unsigned long __unused2; | 30 | unsigned long __unused2; |
31 | #endif | 31 | #endif |
32 | #if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) | 32 | #if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN) |
33 | unsigned long __unused3; | 33 | unsigned long __unused3; |
34 | #endif | 34 | #endif |
35 | __kernel_time_t msg_ctime; /* last change time */ | 35 | __kernel_time_t msg_ctime; /* last change time */ |
36 | #if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) | 36 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN) |
37 | unsigned long __unused3; | 37 | unsigned long __unused3; |
38 | #endif | 38 | #endif |
39 | unsigned long msg_cbytes; /* current number of bytes on queue */ | 39 | unsigned long msg_cbytes; /* current number of bytes on queue */ |
diff --git a/include/asm-mips/paccess.h b/include/asm-mips/paccess.h index 36cec9e31696..309bc3099f68 100644 --- a/include/asm-mips/paccess.h +++ b/include/asm-mips/paccess.h | |||
@@ -16,10 +16,10 @@ | |||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | 18 | ||
19 | #ifdef CONFIG_MIPS32 | 19 | #ifdef CONFIG_32BIT |
20 | #define __PA_ADDR ".word" | 20 | #define __PA_ADDR ".word" |
21 | #endif | 21 | #endif |
22 | #ifdef CONFIG_MIPS64 | 22 | #ifdef CONFIG_64BIT |
23 | #define __PA_ADDR ".dword" | 23 | #define __PA_ADDR ".dword" |
24 | #endif | 24 | #endif |
25 | 25 | ||
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 5cae35cd9ba9..652b6d67a571 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -103,20 +103,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
103 | #define __pgd(x) ((pgd_t) { (x) } ) | 103 | #define __pgd(x) ((pgd_t) { (x) } ) |
104 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 104 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
105 | 105 | ||
106 | /* Pure 2^n version of get_order */ | ||
107 | static __inline__ int get_order(unsigned long size) | ||
108 | { | ||
109 | int order; | ||
110 | |||
111 | size = (size-1) >> (PAGE_SHIFT-1); | ||
112 | order = -1; | ||
113 | do { | ||
114 | size >>= 1; | ||
115 | order++; | ||
116 | } while (size); | ||
117 | return order; | ||
118 | } | ||
119 | |||
120 | #endif /* !__ASSEMBLY__ */ | 106 | #endif /* !__ASSEMBLY__ */ |
121 | 107 | ||
122 | /* to align the pointer to the (next) page boundary */ | 108 | /* to align the pointer to the (next) page boundary */ |
@@ -148,4 +134,6 @@ static __inline__ int get_order(unsigned long size) | |||
148 | #define WANT_PAGE_VIRTUAL | 134 | #define WANT_PAGE_VIRTUAL |
149 | #endif | 135 | #endif |
150 | 136 | ||
137 | #include <asm-generic/page.h> | ||
138 | |||
151 | #endif /* _ASM_PAGE_H */ | 139 | #endif /* _ASM_PAGE_H */ |
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index d70dc355c1f3..c9a00ca1c012 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h | |||
@@ -94,7 +94,7 @@ struct pci_dev; | |||
94 | */ | 94 | */ |
95 | extern unsigned int PCI_DMA_BUS_IS_PHYS; | 95 | extern unsigned int PCI_DMA_BUS_IS_PHYS; |
96 | 96 | ||
97 | #ifdef CONFIG_MAPPED_DMA_IO | 97 | #ifdef CONFIG_DMA_NEED_PCI_MAP_STATE |
98 | 98 | ||
99 | /* pci_unmap_{single,page} is not a nop, thus... */ | 99 | /* pci_unmap_{single,page} is not a nop, thus... */ |
100 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; | 100 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; |
@@ -104,7 +104,7 @@ extern unsigned int PCI_DMA_BUS_IS_PHYS; | |||
104 | #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) | 104 | #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) |
105 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) | 105 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) |
106 | 106 | ||
107 | #else /* CONFIG_MAPPED_DMA_IO */ | 107 | #else /* CONFIG_DMA_NEED_PCI_MAP_STATE */ |
108 | 108 | ||
109 | /* pci_unmap_{page,single} is a nop so... */ | 109 | /* pci_unmap_{page,single} is a nop so... */ |
110 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | 110 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) |
@@ -114,7 +114,7 @@ extern unsigned int PCI_DMA_BUS_IS_PHYS; | |||
114 | #define pci_unmap_len(PTR, LEN_NAME) (0) | 114 | #define pci_unmap_len(PTR, LEN_NAME) (0) |
115 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 115 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
116 | 116 | ||
117 | #endif /* CONFIG_MAPPED_DMA_IO */ | 117 | #endif /* CONFIG_DMA_NEED_PCI_MAP_STATE */ |
118 | 118 | ||
119 | /* This is always fine. */ | 119 | /* This is always fine. */ |
120 | #define pci_dac_dma_supported(pci_dev, mask) (1) | 120 | #define pci_dac_dma_supported(pci_dev, mask) (1) |
@@ -142,6 +142,8 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
142 | 142 | ||
143 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 143 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
144 | struct pci_bus_region *region, struct resource *res); | 144 | struct pci_bus_region *region, struct resource *res); |
145 | extern void pcibios_bus_to_resource(struct pci_dev *dev, | ||
146 | struct resource *res, struct pci_bus_region *region); | ||
145 | 147 | ||
146 | #ifdef CONFIG_PCI_DOMAINS | 148 | #ifdef CONFIG_PCI_DOMAINS |
147 | 149 | ||
@@ -167,4 +169,17 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |||
167 | /* Do platform specific device initialization at pci_enable_device() time */ | 169 | /* Do platform specific device initialization at pci_enable_device() time */ |
168 | extern int pcibios_plat_dev_init(struct pci_dev *dev); | 170 | extern int pcibios_plat_dev_init(struct pci_dev *dev); |
169 | 171 | ||
172 | static inline struct resource * | ||
173 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
174 | { | ||
175 | struct resource *root = NULL; | ||
176 | |||
177 | if (res->flags & IORESOURCE_IO) | ||
178 | root = &ioport_resource; | ||
179 | if (res->flags & IORESOURCE_MEM) | ||
180 | root = &iomem_resource; | ||
181 | |||
182 | return root; | ||
183 | } | ||
184 | |||
170 | #endif /* _ASM_PCI_H */ | 185 | #endif /* _ASM_PCI_H */ |
diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h index 2d63f5ba403f..ce57288d43bd 100644 --- a/include/asm-mips/pgalloc.h +++ b/include/asm-mips/pgalloc.h | |||
@@ -85,7 +85,7 @@ static inline void pte_free(struct page *pte) | |||
85 | 85 | ||
86 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 86 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) |
87 | 87 | ||
88 | #ifdef CONFIG_MIPS32 | 88 | #ifdef CONFIG_32BIT |
89 | #define pgd_populate(mm, pmd, pte) BUG() | 89 | #define pgd_populate(mm, pmd, pte) BUG() |
90 | 90 | ||
91 | /* | 91 | /* |
@@ -97,7 +97,7 @@ static inline void pte_free(struct page *pte) | |||
97 | #define __pmd_free_tlb(tlb,x) do { } while (0) | 97 | #define __pmd_free_tlb(tlb,x) do { } while (0) |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #ifdef CONFIG_MIPS64 | 100 | #ifdef CONFIG_64BIT |
101 | 101 | ||
102 | #define pgd_populate(mm, pgd, pmd) set_pgd(pgd, __pgd(pmd)) | 102 | #define pgd_populate(mm, pgd, pmd) set_pgd(pgd, __pgd(pmd)) |
103 | 103 | ||
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index e76ccd6e3a5d..dbe13da0bdad 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -11,10 +11,10 @@ | |||
11 | #include <asm-generic/4level-fixup.h> | 11 | #include <asm-generic/4level-fixup.h> |
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | #ifdef CONFIG_MIPS32 | 14 | #ifdef CONFIG_32BIT |
15 | #include <asm/pgtable-32.h> | 15 | #include <asm/pgtable-32.h> |
16 | #endif | 16 | #endif |
17 | #ifdef CONFIG_MIPS64 | 17 | #ifdef CONFIG_64BIT |
18 | #include <asm/pgtable-64.h> | 18 | #include <asm/pgtable-64.h> |
19 | #endif | 19 | #endif |
20 | 20 | ||
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 13c54d5b3b48..d6466aa09fb7 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h | |||
@@ -33,7 +33,7 @@ extern void (*cpu_wait)(void); | |||
33 | 33 | ||
34 | extern unsigned int vced_count, vcei_count; | 34 | extern unsigned int vced_count, vcei_count; |
35 | 35 | ||
36 | #ifdef CONFIG_MIPS32 | 36 | #ifdef CONFIG_32BIT |
37 | /* | 37 | /* |
38 | * User space process size: 2GB. This is hardcoded into a few places, | 38 | * User space process size: 2GB. This is hardcoded into a few places, |
39 | * so don't change it unless you know what you are doing. | 39 | * so don't change it unless you know what you are doing. |
@@ -47,7 +47,7 @@ extern unsigned int vced_count, vcei_count; | |||
47 | #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) | 47 | #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #ifdef CONFIG_MIPS64 | 50 | #ifdef CONFIG_64BIT |
51 | /* | 51 | /* |
52 | * User space process size: 1TB. This is hardcoded into a few places, | 52 | * User space process size: 1TB. This is hardcoded into a few places, |
53 | * so don't change it unless you know what you are doing. TASK_SIZE | 53 | * so don't change it unless you know what you are doing. TASK_SIZE |
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h index d3c46d633826..2b5c624c3d4f 100644 --- a/include/asm-mips/ptrace.h +++ b/include/asm-mips/ptrace.h | |||
@@ -28,7 +28,7 @@ | |||
28 | * system call/exception. As usual the registers k0/k1 aren't being saved. | 28 | * system call/exception. As usual the registers k0/k1 aren't being saved. |
29 | */ | 29 | */ |
30 | struct pt_regs { | 30 | struct pt_regs { |
31 | #ifdef CONFIG_MIPS32 | 31 | #ifdef CONFIG_32BIT |
32 | /* Pad bytes for argument save space on the stack. */ | 32 | /* Pad bytes for argument save space on the stack. */ |
33 | unsigned long pad0[6]; | 33 | unsigned long pad0[6]; |
34 | #endif | 34 | #endif |
diff --git a/include/asm-mips/qemu.h b/include/asm-mips/qemu.h new file mode 100644 index 000000000000..905c39585903 --- /dev/null +++ b/include/asm-mips/qemu.h | |||
@@ -0,0 +1,24 @@ | |||
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) 2005 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | ||
8 | #ifndef __ASM_QEMU_H | ||
9 | #define __ASM_QEMU_H | ||
10 | |||
11 | /* | ||
12 | * Interrupt numbers | ||
13 | */ | ||
14 | #define Q_PIC_IRQ_BASE 0 | ||
15 | #define Q_COUNT_COMPARE_IRQ 16 | ||
16 | |||
17 | /* | ||
18 | * Qemu clock rate. Unlike on real MIPS this has no relation to the | ||
19 | * instruction issue rate, so the choosen value is pure fiction, just needs | ||
20 | * to match the value in Qemu itself. | ||
21 | */ | ||
22 | #define QEMU_C0_COUNTER_CLOCK 100000000 | ||
23 | |||
24 | #endif /* __ASM_QEMU_H */ | ||
diff --git a/include/asm-mips/r4kcache.h b/include/asm-mips/r4kcache.h index da03a32c1ca7..5bea49feec66 100644 --- a/include/asm-mips/r4kcache.h +++ b/include/asm-mips/r4kcache.h | |||
@@ -171,11 +171,11 @@ static inline void blast_dcache16(void) | |||
171 | unsigned long start = INDEX_BASE; | 171 | unsigned long start = INDEX_BASE; |
172 | unsigned long end = start + current_cpu_data.dcache.waysize; | 172 | unsigned long end = start + current_cpu_data.dcache.waysize; |
173 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | 173 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; |
174 | unsigned long ws_end = current_cpu_data.dcache.ways << | 174 | unsigned long ws_end = current_cpu_data.dcache.ways << |
175 | current_cpu_data.dcache.waybit; | 175 | current_cpu_data.dcache.waybit; |
176 | unsigned long ws, addr; | 176 | unsigned long ws, addr; |
177 | 177 | ||
178 | for (ws = 0; ws < ws_end; ws += ws_inc) | 178 | for (ws = 0; ws < ws_end; ws += ws_inc) |
179 | for (addr = start; addr < end; addr += 0x200) | 179 | for (addr = start; addr < end; addr += 0x200) |
180 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); | 180 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); |
181 | } | 181 | } |
@@ -200,8 +200,8 @@ static inline void blast_dcache16_page_indexed(unsigned long page) | |||
200 | current_cpu_data.dcache.waybit; | 200 | current_cpu_data.dcache.waybit; |
201 | unsigned long ws, addr; | 201 | unsigned long ws, addr; |
202 | 202 | ||
203 | for (ws = 0; ws < ws_end; ws += ws_inc) | 203 | for (ws = 0; ws < ws_end; ws += ws_inc) |
204 | for (addr = start; addr < end; addr += 0x200) | 204 | for (addr = start; addr < end; addr += 0x200) |
205 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); | 205 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); |
206 | } | 206 | } |
207 | 207 | ||
@@ -214,8 +214,8 @@ static inline void blast_icache16(void) | |||
214 | current_cpu_data.icache.waybit; | 214 | current_cpu_data.icache.waybit; |
215 | unsigned long ws, addr; | 215 | unsigned long ws, addr; |
216 | 216 | ||
217 | for (ws = 0; ws < ws_end; ws += ws_inc) | 217 | for (ws = 0; ws < ws_end; ws += ws_inc) |
218 | for (addr = start; addr < end; addr += 0x200) | 218 | for (addr = start; addr < end; addr += 0x200) |
219 | cache16_unroll32(addr|ws,Index_Invalidate_I); | 219 | cache16_unroll32(addr|ws,Index_Invalidate_I); |
220 | } | 220 | } |
221 | 221 | ||
@@ -239,8 +239,8 @@ static inline void blast_icache16_page_indexed(unsigned long page) | |||
239 | current_cpu_data.icache.waybit; | 239 | current_cpu_data.icache.waybit; |
240 | unsigned long ws, addr; | 240 | unsigned long ws, addr; |
241 | 241 | ||
242 | for (ws = 0; ws < ws_end; ws += ws_inc) | 242 | for (ws = 0; ws < ws_end; ws += ws_inc) |
243 | for (addr = start; addr < end; addr += 0x200) | 243 | for (addr = start; addr < end; addr += 0x200) |
244 | cache16_unroll32(addr|ws,Index_Invalidate_I); | 244 | cache16_unroll32(addr|ws,Index_Invalidate_I); |
245 | } | 245 | } |
246 | 246 | ||
@@ -249,11 +249,11 @@ static inline void blast_scache16(void) | |||
249 | unsigned long start = INDEX_BASE; | 249 | unsigned long start = INDEX_BASE; |
250 | unsigned long end = start + current_cpu_data.scache.waysize; | 250 | unsigned long end = start + current_cpu_data.scache.waysize; |
251 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 251 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; |
252 | unsigned long ws_end = current_cpu_data.scache.ways << | 252 | unsigned long ws_end = current_cpu_data.scache.ways << |
253 | current_cpu_data.scache.waybit; | 253 | current_cpu_data.scache.waybit; |
254 | unsigned long ws, addr; | 254 | unsigned long ws, addr; |
255 | 255 | ||
256 | for (ws = 0; ws < ws_end; ws += ws_inc) | 256 | for (ws = 0; ws < ws_end; ws += ws_inc) |
257 | for (addr = start; addr < end; addr += 0x200) | 257 | for (addr = start; addr < end; addr += 0x200) |
258 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); | 258 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); |
259 | } | 259 | } |
@@ -278,8 +278,8 @@ static inline void blast_scache16_page_indexed(unsigned long page) | |||
278 | current_cpu_data.scache.waybit; | 278 | current_cpu_data.scache.waybit; |
279 | unsigned long ws, addr; | 279 | unsigned long ws, addr; |
280 | 280 | ||
281 | for (ws = 0; ws < ws_end; ws += ws_inc) | 281 | for (ws = 0; ws < ws_end; ws += ws_inc) |
282 | for (addr = start; addr < end; addr += 0x200) | 282 | for (addr = start; addr < end; addr += 0x200) |
283 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); | 283 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); |
284 | } | 284 | } |
285 | 285 | ||
@@ -318,8 +318,8 @@ static inline void blast_dcache32(void) | |||
318 | current_cpu_data.dcache.waybit; | 318 | current_cpu_data.dcache.waybit; |
319 | unsigned long ws, addr; | 319 | unsigned long ws, addr; |
320 | 320 | ||
321 | for (ws = 0; ws < ws_end; ws += ws_inc) | 321 | for (ws = 0; ws < ws_end; ws += ws_inc) |
322 | for (addr = start; addr < end; addr += 0x400) | 322 | for (addr = start; addr < end; addr += 0x400) |
323 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); | 323 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); |
324 | } | 324 | } |
325 | 325 | ||
@@ -343,8 +343,8 @@ static inline void blast_dcache32_page_indexed(unsigned long page) | |||
343 | current_cpu_data.dcache.waybit; | 343 | current_cpu_data.dcache.waybit; |
344 | unsigned long ws, addr; | 344 | unsigned long ws, addr; |
345 | 345 | ||
346 | for (ws = 0; ws < ws_end; ws += ws_inc) | 346 | for (ws = 0; ws < ws_end; ws += ws_inc) |
347 | for (addr = start; addr < end; addr += 0x400) | 347 | for (addr = start; addr < end; addr += 0x400) |
348 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); | 348 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); |
349 | } | 349 | } |
350 | 350 | ||
@@ -357,8 +357,8 @@ static inline void blast_icache32(void) | |||
357 | current_cpu_data.icache.waybit; | 357 | current_cpu_data.icache.waybit; |
358 | unsigned long ws, addr; | 358 | unsigned long ws, addr; |
359 | 359 | ||
360 | for (ws = 0; ws < ws_end; ws += ws_inc) | 360 | for (ws = 0; ws < ws_end; ws += ws_inc) |
361 | for (addr = start; addr < end; addr += 0x400) | 361 | for (addr = start; addr < end; addr += 0x400) |
362 | cache32_unroll32(addr|ws,Index_Invalidate_I); | 362 | cache32_unroll32(addr|ws,Index_Invalidate_I); |
363 | } | 363 | } |
364 | 364 | ||
@@ -383,7 +383,7 @@ static inline void blast_icache32_page_indexed(unsigned long page) | |||
383 | unsigned long ws, addr; | 383 | unsigned long ws, addr; |
384 | 384 | ||
385 | for (ws = 0; ws < ws_end; ws += ws_inc) | 385 | for (ws = 0; ws < ws_end; ws += ws_inc) |
386 | for (addr = start; addr < end; addr += 0x400) | 386 | for (addr = start; addr < end; addr += 0x400) |
387 | cache32_unroll32(addr|ws,Index_Invalidate_I); | 387 | cache32_unroll32(addr|ws,Index_Invalidate_I); |
388 | } | 388 | } |
389 | 389 | ||
@@ -392,11 +392,11 @@ static inline void blast_scache32(void) | |||
392 | unsigned long start = INDEX_BASE; | 392 | unsigned long start = INDEX_BASE; |
393 | unsigned long end = start + current_cpu_data.scache.waysize; | 393 | unsigned long end = start + current_cpu_data.scache.waysize; |
394 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 394 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; |
395 | unsigned long ws_end = current_cpu_data.scache.ways << | 395 | unsigned long ws_end = current_cpu_data.scache.ways << |
396 | current_cpu_data.scache.waybit; | 396 | current_cpu_data.scache.waybit; |
397 | unsigned long ws, addr; | 397 | unsigned long ws, addr; |
398 | 398 | ||
399 | for (ws = 0; ws < ws_end; ws += ws_inc) | 399 | for (ws = 0; ws < ws_end; ws += ws_inc) |
400 | for (addr = start; addr < end; addr += 0x400) | 400 | for (addr = start; addr < end; addr += 0x400) |
401 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); | 401 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); |
402 | } | 402 | } |
@@ -421,8 +421,8 @@ static inline void blast_scache32_page_indexed(unsigned long page) | |||
421 | current_cpu_data.scache.waybit; | 421 | current_cpu_data.scache.waybit; |
422 | unsigned long ws, addr; | 422 | unsigned long ws, addr; |
423 | 423 | ||
424 | for (ws = 0; ws < ws_end; ws += ws_inc) | 424 | for (ws = 0; ws < ws_end; ws += ws_inc) |
425 | for (addr = start; addr < end; addr += 0x400) | 425 | for (addr = start; addr < end; addr += 0x400) |
426 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); | 426 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); |
427 | } | 427 | } |
428 | 428 | ||
@@ -461,8 +461,8 @@ static inline void blast_icache64(void) | |||
461 | current_cpu_data.icache.waybit; | 461 | current_cpu_data.icache.waybit; |
462 | unsigned long ws, addr; | 462 | unsigned long ws, addr; |
463 | 463 | ||
464 | for (ws = 0; ws < ws_end; ws += ws_inc) | 464 | for (ws = 0; ws < ws_end; ws += ws_inc) |
465 | for (addr = start; addr < end; addr += 0x800) | 465 | for (addr = start; addr < end; addr += 0x800) |
466 | cache64_unroll32(addr|ws,Index_Invalidate_I); | 466 | cache64_unroll32(addr|ws,Index_Invalidate_I); |
467 | } | 467 | } |
468 | 468 | ||
@@ -487,7 +487,7 @@ static inline void blast_icache64_page_indexed(unsigned long page) | |||
487 | unsigned long ws, addr; | 487 | unsigned long ws, addr; |
488 | 488 | ||
489 | for (ws = 0; ws < ws_end; ws += ws_inc) | 489 | for (ws = 0; ws < ws_end; ws += ws_inc) |
490 | for (addr = start; addr < end; addr += 0x800) | 490 | for (addr = start; addr < end; addr += 0x800) |
491 | cache64_unroll32(addr|ws,Index_Invalidate_I); | 491 | cache64_unroll32(addr|ws,Index_Invalidate_I); |
492 | } | 492 | } |
493 | 493 | ||
@@ -496,11 +496,11 @@ static inline void blast_scache64(void) | |||
496 | unsigned long start = INDEX_BASE; | 496 | unsigned long start = INDEX_BASE; |
497 | unsigned long end = start + current_cpu_data.scache.waysize; | 497 | unsigned long end = start + current_cpu_data.scache.waysize; |
498 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 498 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; |
499 | unsigned long ws_end = current_cpu_data.scache.ways << | 499 | unsigned long ws_end = current_cpu_data.scache.ways << |
500 | current_cpu_data.scache.waybit; | 500 | current_cpu_data.scache.waybit; |
501 | unsigned long ws, addr; | 501 | unsigned long ws, addr; |
502 | 502 | ||
503 | for (ws = 0; ws < ws_end; ws += ws_inc) | 503 | for (ws = 0; ws < ws_end; ws += ws_inc) |
504 | for (addr = start; addr < end; addr += 0x800) | 504 | for (addr = start; addr < end; addr += 0x800) |
505 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); | 505 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); |
506 | } | 506 | } |
@@ -525,8 +525,8 @@ static inline void blast_scache64_page_indexed(unsigned long page) | |||
525 | current_cpu_data.scache.waybit; | 525 | current_cpu_data.scache.waybit; |
526 | unsigned long ws, addr; | 526 | unsigned long ws, addr; |
527 | 527 | ||
528 | for (ws = 0; ws < ws_end; ws += ws_inc) | 528 | for (ws = 0; ws < ws_end; ws += ws_inc) |
529 | for (addr = start; addr < end; addr += 0x800) | 529 | for (addr = start; addr < end; addr += 0x800) |
530 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); | 530 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); |
531 | } | 531 | } |
532 | 532 | ||
@@ -561,11 +561,11 @@ static inline void blast_scache128(void) | |||
561 | unsigned long start = INDEX_BASE; | 561 | unsigned long start = INDEX_BASE; |
562 | unsigned long end = start + current_cpu_data.scache.waysize; | 562 | unsigned long end = start + current_cpu_data.scache.waysize; |
563 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 563 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; |
564 | unsigned long ws_end = current_cpu_data.scache.ways << | 564 | unsigned long ws_end = current_cpu_data.scache.ways << |
565 | current_cpu_data.scache.waybit; | 565 | current_cpu_data.scache.waybit; |
566 | unsigned long ws, addr; | 566 | unsigned long ws, addr; |
567 | 567 | ||
568 | for (ws = 0; ws < ws_end; ws += ws_inc) | 568 | for (ws = 0; ws < ws_end; ws += ws_inc) |
569 | for (addr = start; addr < end; addr += 0x1000) | 569 | for (addr = start; addr < end; addr += 0x1000) |
570 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); | 570 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); |
571 | } | 571 | } |
@@ -590,8 +590,8 @@ static inline void blast_scache128_page_indexed(unsigned long page) | |||
590 | current_cpu_data.scache.waybit; | 590 | current_cpu_data.scache.waybit; |
591 | unsigned long ws, addr; | 591 | unsigned long ws, addr; |
592 | 592 | ||
593 | for (ws = 0; ws < ws_end; ws += ws_inc) | 593 | for (ws = 0; ws < ws_end; ws += ws_inc) |
594 | for (addr = start; addr < end; addr += 0x1000) | 594 | for (addr = start; addr < end; addr += 0x1000) |
595 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); | 595 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); |
596 | } | 596 | } |
597 | 597 | ||
diff --git a/include/asm-mips/reg.h b/include/asm-mips/reg.h index 7b33bbca9585..6173004cc88e 100644 --- a/include/asm-mips/reg.h +++ b/include/asm-mips/reg.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | 16 | ||
17 | #if defined(CONFIG_MIPS32) || defined(WANT_COMPAT_REG_H) | 17 | #if defined(CONFIG_32BIT) || defined(WANT_COMPAT_REG_H) |
18 | 18 | ||
19 | #define EF_R0 6 | 19 | #define EF_R0 6 |
20 | #define EF_R1 7 | 20 | #define EF_R1 7 |
@@ -70,7 +70,7 @@ | |||
70 | 70 | ||
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #if CONFIG_MIPS64 | 73 | #ifdef CONFIG_64BIT |
74 | 74 | ||
75 | #define EF_R0 0 | 75 | #define EF_R0 0 |
76 | #define EF_R1 1 | 76 | #define EF_R1 1 |
@@ -124,6 +124,6 @@ | |||
124 | 124 | ||
125 | #define EF_SIZE 304 /* size in bytes */ | 125 | #define EF_SIZE 304 /* size in bytes */ |
126 | 126 | ||
127 | #endif /* CONFIG_MIPS64 */ | 127 | #endif /* CONFIG_64BIT */ |
128 | 128 | ||
129 | #endif /* __ASM_MIPS_REG_H */ | 129 | #endif /* __ASM_MIPS_REG_H */ |
diff --git a/include/asm-mips/resource.h b/include/asm-mips/resource.h index fd3c6d17a5f6..1fba00c22077 100644 --- a/include/asm-mips/resource.h +++ b/include/asm-mips/resource.h | |||
@@ -27,7 +27,7 @@ | |||
27 | * but we keep the old value on MIPS32, | 27 | * but we keep the old value on MIPS32, |
28 | * for compatibility: | 28 | * for compatibility: |
29 | */ | 29 | */ |
30 | #ifdef CONFIG_MIPS32 | 30 | #ifdef CONFIG_32BIT |
31 | # define RLIM_INFINITY 0x7fffffffUL | 31 | # define RLIM_INFINITY 0x7fffffffUL |
32 | #endif | 32 | #endif |
33 | 33 | ||
diff --git a/include/asm-mips/rtc.h b/include/asm-mips/rtc.h index 31c0c2347f4f..3c4b637fd925 100644 --- a/include/asm-mips/rtc.h +++ b/include/asm-mips/rtc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-mips/rtc.h | 2 | * include/asm-mips/rtc.h |
3 | * | 3 | * |
4 | * (Really an interface for drivers/char/genrtc.c) | 4 | * (Really an interface for drivers/char/genrtc.c) |
5 | * | 5 | * |
diff --git a/include/asm-mips/sgi/gio.h b/include/asm-mips/sgi/gio.h index a38d66f99872..889cf028c95d 100644 --- a/include/asm-mips/sgi/gio.h +++ b/include/asm-mips/sgi/gio.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * | 16 | * |
17 | * The Indigo and Indy have two GIO bus connectors. Indigo2 (all models) have | 17 | * The Indigo and Indy have two GIO bus connectors. Indigo2 (all models) have |
18 | * three physical connectors, but only two slots, GFX and EXP0. | 18 | * three physical connectors, but only two slots, GFX and EXP0. |
19 | * | 19 | * |
20 | * There is 10MB of GIO address space for GIO64 slot devices | 20 | * There is 10MB of GIO address space for GIO64 slot devices |
21 | * slot# slot type address range size | 21 | * slot# slot type address range size |
22 | * ----- --------- ----------------------- ----- | 22 | * ----- --------- ----------------------- ----- |
diff --git a/include/asm-mips/sgi/hpc3.h b/include/asm-mips/sgi/hpc3.h index a5b988d7327a..ac3dfc7af5b0 100644 --- a/include/asm-mips/sgi/hpc3.h +++ b/include/asm-mips/sgi/hpc3.h | |||
@@ -221,7 +221,7 @@ struct hpc3_regs { | |||
221 | #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */ | 221 | #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */ |
222 | 222 | ||
223 | u32 _unused1[0x14000/4 - 5]; /* padding */ | 223 | u32 _unused1[0x14000/4 - 5]; /* padding */ |
224 | 224 | ||
225 | /* Now direct PIO per-HPC3 peripheral access to external regs. */ | 225 | /* Now direct PIO per-HPC3 peripheral access to external regs. */ |
226 | volatile u32 scsi0_ext[256]; /* SCSI channel 0 external regs */ | 226 | volatile u32 scsi0_ext[256]; /* SCSI channel 0 external regs */ |
227 | u32 _unused2[0x7c00/4]; | 227 | u32 _unused2[0x7c00/4]; |
@@ -304,7 +304,7 @@ struct hpc3_regs { | |||
304 | volatile u32 bbram[8192-50-14]; /* Battery backed ram */ | 304 | volatile u32 bbram[8192-50-14]; /* Battery backed ram */ |
305 | }; | 305 | }; |
306 | 306 | ||
307 | /* | 307 | /* |
308 | * It is possible to have two HPC3's within the address space on | 308 | * It is possible to have two HPC3's within the address space on |
309 | * one machine, though only having one is more likely on an Indy. | 309 | * one machine, though only having one is more likely on an Indy. |
310 | */ | 310 | */ |
diff --git a/include/asm-mips/sgi/ioc.h b/include/asm-mips/sgi/ioc.h index 169187f53fbc..f3e3dc9bb732 100644 --- a/include/asm-mips/sgi/ioc.h +++ b/include/asm-mips/sgi/ioc.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <asm/sgi/pi1.h> | 17 | #include <asm/sgi/pi1.h> |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * All registers are 8-bit wide alligned on 32-bit boundary. Bad things | 20 | * All registers are 8-bit wide alligned on 32-bit boundary. Bad things |
21 | * happen if you try word access them. You have been warned. | 21 | * happen if you try word access them. You have been warned. |
22 | */ | 22 | */ |
@@ -138,7 +138,7 @@ struct sgioc_regs { | |||
138 | u8 _sysid[3]; | 138 | u8 _sysid[3]; |
139 | volatile u8 sysid; | 139 | volatile u8 sysid; |
140 | #define SGIOC_SYSID_FULLHOUSE 0x01 | 140 | #define SGIOC_SYSID_FULLHOUSE 0x01 |
141 | #define SGIOC_SYSID_BOARDREV(x) ((x & 0xe0) > 5) | 141 | #define SGIOC_SYSID_BOARDREV(x) ((x & 0xe0) > 5) |
142 | #define SGIOC_SYSID_CHIPREV(x) ((x & 0x1e) > 1) | 142 | #define SGIOC_SYSID_CHIPREV(x) ((x & 0x1e) > 1) |
143 | u32 _unused2; | 143 | u32 _unused2; |
144 | u8 _read[3]; | 144 | u8 _read[3]; |
diff --git a/include/asm-mips/sgi/ip22.h b/include/asm-mips/sgi/ip22.h index 97d73adb4e40..bbfc05c3cab9 100644 --- a/include/asm-mips/sgi/ip22.h +++ b/include/asm-mips/sgi/ip22.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #ifndef _SGI_IP22_H | 12 | #ifndef _SGI_IP22_H |
13 | #define _SGI_IP22_H | 13 | #define _SGI_IP22_H |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * These are the virtual IRQ numbers, we divide all IRQ's into | 16 | * These are the virtual IRQ numbers, we divide all IRQ's into |
17 | * 'spaces', the 'space' determines where and how to enable/disable | 17 | * 'spaces', the 'space' determines where and how to enable/disable |
18 | * that particular IRQ on an SGI machine. HPC DMA and MC DMA interrups | 18 | * that particular IRQ on an SGI machine. HPC DMA and MC DMA interrups |
diff --git a/include/asm-mips/sgi/mc.h b/include/asm-mips/sgi/mc.h index fd98f930607c..c52f7834c7c8 100644 --- a/include/asm-mips/sgi/mc.h +++ b/include/asm-mips/sgi/mc.h | |||
@@ -182,14 +182,14 @@ struct sgimc_regs { | |||
182 | volatile u32 dtlb_hi3; | 182 | volatile u32 dtlb_hi3; |
183 | u32 _unused33; | 183 | u32 _unused33; |
184 | volatile u32 dtlb_lo3; | 184 | volatile u32 dtlb_lo3; |
185 | 185 | ||
186 | u32 _unused34[0x0392]; | 186 | u32 _unused34[0x0392]; |
187 | 187 | ||
188 | u32 _unused35; | 188 | u32 _unused35; |
189 | volatile u32 rpsscounter; /* Chirps at 100ns */ | 189 | volatile u32 rpsscounter; /* Chirps at 100ns */ |
190 | 190 | ||
191 | u32 _unused36[0x1000/4-2*4]; | 191 | u32 _unused36[0x1000/4-2*4]; |
192 | 192 | ||
193 | u32 _unused37; | 193 | u32 _unused37; |
194 | volatile u32 maddronly; /* Address DMA goes at */ | 194 | volatile u32 maddronly; /* Address DMA goes at */ |
195 | u32 _unused38; | 195 | u32 _unused38; |
diff --git a/include/asm-mips/sgiarcs.h b/include/asm-mips/sgiarcs.h index 59450335f049..722b77a8c5e5 100644 --- a/include/asm-mips/sgiarcs.h +++ b/include/asm-mips/sgiarcs.h | |||
@@ -367,7 +367,7 @@ struct linux_smonblock { | |||
367 | * Macros for calling a 32-bit ARC implementation from 64-bit code | 367 | * Macros for calling a 32-bit ARC implementation from 64-bit code |
368 | */ | 368 | */ |
369 | 369 | ||
370 | #if defined(CONFIG_MIPS64) && defined(CONFIG_ARC32) | 370 | #if defined(CONFIG_64BIT) && defined(CONFIG_ARC32) |
371 | 371 | ||
372 | #define __arc_clobbers \ | 372 | #define __arc_clobbers \ |
373 | "$2","$3" /* ... */, "$8","$9","$10","$11", \ | 373 | "$2","$3" /* ... */, "$8","$9","$10","$11", \ |
@@ -476,10 +476,10 @@ struct linux_smonblock { | |||
476 | __res; \ | 476 | __res; \ |
477 | }) | 477 | }) |
478 | 478 | ||
479 | #endif /* defined(CONFIG_MIPS64) && defined(CONFIG_ARC32) */ | 479 | #endif /* defined(CONFIG_64BIT) && defined(CONFIG_ARC32) */ |
480 | 480 | ||
481 | #if (defined(CONFIG_MIPS32) && defined(CONFIG_ARC32)) || \ | 481 | #if (defined(CONFIG_32BIT) && defined(CONFIG_ARC32)) || \ |
482 | (defined(CONFIG_MIPS64) && defined(CONFIG_ARC64)) | 482 | (defined(CONFIG_64BIT) && defined(CONFIG_ARC64)) |
483 | 483 | ||
484 | #define ARC_CALL0(dest) \ | 484 | #define ARC_CALL0(dest) \ |
485 | ({ long __res; \ | 485 | ({ long __res; \ |
diff --git a/include/asm-mips/sibyte/carmel.h b/include/asm-mips/sibyte/carmel.h index 7ac5da13ce8a..b5e7dae19f0f 100644 --- a/include/asm-mips/sibyte/carmel.h +++ b/include/asm-mips/sibyte/carmel.h | |||
@@ -25,12 +25,12 @@ | |||
25 | 25 | ||
26 | #define SIBYTE_BOARD_NAME "Carmel" | 26 | #define SIBYTE_BOARD_NAME "Carmel" |
27 | 27 | ||
28 | #define GPIO_PHY_INTERRUPT 2 | 28 | #define GPIO_PHY_INTERRUPT 2 |
29 | #define GPIO_NONMASKABLE_INT 3 | 29 | #define GPIO_NONMASKABLE_INT 3 |
30 | #define GPIO_CF_INSERTED 6 | 30 | #define GPIO_CF_INSERTED 6 |
31 | #define GPIO_MONTEREY_RESET 7 | 31 | #define GPIO_MONTEREY_RESET 7 |
32 | #define GPIO_QUADUART_INT 8 | 32 | #define GPIO_QUADUART_INT 8 |
33 | #define GPIO_CF_INT 9 | 33 | #define GPIO_CF_INT 9 |
34 | #define GPIO_FPGA_CCLK 10 | 34 | #define GPIO_FPGA_CCLK 10 |
35 | #define GPIO_FPGA_DOUT 11 | 35 | #define GPIO_FPGA_DOUT 11 |
36 | #define GPIO_FPGA_DIN 12 | 36 | #define GPIO_FPGA_DIN 12 |
diff --git a/include/asm-mips/sibyte/sb1250_defs.h b/include/asm-mips/sibyte/sb1250_defs.h index 96088fb074a4..40ef97c76c8b 100644 --- a/include/asm-mips/sibyte/sb1250_defs.h +++ b/include/asm-mips/sibyte/sb1250_defs.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Global constants and macros File: sb1250_defs.h | 4 | * Global constants and macros File: sb1250_defs.h |
5 | * | 5 | * |
6 | * This file contains macros and definitions used by the other | 6 | * This file contains macros and definitions used by the other |
7 | * include files. | 7 | * include files. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -105,7 +105,7 @@ | |||
105 | #define SIBYTE_HDR_FMASK_112x_ALL 0x0000f00 | 105 | #define SIBYTE_HDR_FMASK_112x_ALL 0x0000f00 |
106 | #define SIBYTE_HDR_FMASK_112x_PASS1 0x0000100 | 106 | #define SIBYTE_HDR_FMASK_112x_PASS1 0x0000100 |
107 | 107 | ||
108 | /* Bit mask for chip/revision. (use _ALL for all revisions of a chip). */ | 108 | /* Bit mask for chip/revision. (use _ALL for all revisions of a chip). */ |
109 | #define SIBYTE_HDR_FMASK(chip, pass) \ | 109 | #define SIBYTE_HDR_FMASK(chip, pass) \ |
110 | (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass) | 110 | (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass) |
111 | #define SIBYTE_HDR_FMASK_ALLREVS(chip) \ | 111 | #define SIBYTE_HDR_FMASK_ALLREVS(chip) \ |
@@ -150,31 +150,31 @@ | |||
150 | 150 | ||
151 | /* ********************************************************************* | 151 | /* ********************************************************************* |
152 | * Naming schemes for constants in these files: | 152 | * Naming schemes for constants in these files: |
153 | * | 153 | * |
154 | * M_xxx MASK constant (identifies bits in a register). | 154 | * M_xxx MASK constant (identifies bits in a register). |
155 | * For multi-bit fields, all bits in the field will | 155 | * For multi-bit fields, all bits in the field will |
156 | * be set. | 156 | * be set. |
157 | * | 157 | * |
158 | * K_xxx "Code" constant (value for data in a multi-bit | 158 | * K_xxx "Code" constant (value for data in a multi-bit |
159 | * field). The value is right justified. | 159 | * field). The value is right justified. |
160 | * | 160 | * |
161 | * V_xxx "Value" constant. This is the same as the | 161 | * V_xxx "Value" constant. This is the same as the |
162 | * corresponding "K_xxx" constant, except it is | 162 | * corresponding "K_xxx" constant, except it is |
163 | * shifted to the correct position in the register. | 163 | * shifted to the correct position in the register. |
164 | * | 164 | * |
165 | * S_xxx SHIFT constant. This is the number of bits that | 165 | * S_xxx SHIFT constant. This is the number of bits that |
166 | * a field value (code) needs to be shifted | 166 | * a field value (code) needs to be shifted |
167 | * (towards the left) to put the value in the right | 167 | * (towards the left) to put the value in the right |
168 | * position for the register. | 168 | * position for the register. |
169 | * | 169 | * |
170 | * A_xxx ADDRESS constant. This will be a physical | 170 | * A_xxx ADDRESS constant. This will be a physical |
171 | * address. Use the PHYS_TO_K1 macro to generate | 171 | * address. Use the PHYS_TO_K1 macro to generate |
172 | * a K1SEG address. | 172 | * a K1SEG address. |
173 | * | 173 | * |
174 | * R_xxx RELATIVE offset constant. This is an offset from | 174 | * R_xxx RELATIVE offset constant. This is an offset from |
175 | * an A_xxx constant (usually the first register in | 175 | * an A_xxx constant (usually the first register in |
176 | * a group). | 176 | * a group). |
177 | * | 177 | * |
178 | * G_xxx(X) GET value. This macro obtains a multi-bit field | 178 | * G_xxx(X) GET value. This macro obtains a multi-bit field |
179 | * from a register, masks it, and shifts it to | 179 | * from a register, masks it, and shifts it to |
180 | * the bottom of the register (retrieving a K_xxx | 180 | * the bottom of the register (retrieving a K_xxx |
@@ -189,7 +189,7 @@ | |||
189 | 189 | ||
190 | 190 | ||
191 | /* | 191 | /* |
192 | * Cast to 64-bit number. Presumably the syntax is different in | 192 | * Cast to 64-bit number. Presumably the syntax is different in |
193 | * assembly language. | 193 | * assembly language. |
194 | * | 194 | * |
195 | * Note: you'll need to define uint32_t and uint64_t in your headers. | 195 | * Note: you'll need to define uint32_t and uint64_t in your headers. |
diff --git a/include/asm-mips/sibyte/sb1250_dma.h b/include/asm-mips/sibyte/sb1250_dma.h index f1b08d32338d..3cdb48f50ed0 100644 --- a/include/asm-mips/sibyte/sb1250_dma.h +++ b/include/asm-mips/sibyte/sb1250_dma.h | |||
@@ -1,24 +1,24 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * DMA definitions File: sb1250_dma.h | 4 | * DMA definitions File: sb1250_dma.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * programming the SB1250's DMA controllers, both the data mover | 7 | * programming the SB1250's DMA controllers, both the data mover |
8 | * and the Ethernet DMA. | 8 | * and the Ethernet DMA. |
9 | * | 9 | * |
10 | * SB1250 specification level: User's manual 1/02/02 | 10 | * SB1250 specification level: User's manual 1/02/02 |
11 | * | 11 | * |
12 | * Author: Mitch Lichtenberg | 12 | * Author: Mitch Lichtenberg |
13 | * | 13 | * |
14 | ********************************************************************* | 14 | ********************************************************************* |
15 | * | 15 | * |
16 | * Copyright 2000,2001,2002,2003 | 16 | * Copyright 2000,2001,2002,2003 |
17 | * Broadcom Corporation. All rights reserved. | 17 | * Broadcom Corporation. All rights reserved. |
18 | * | 18 | * |
19 | * This program is free software; you can redistribute it and/or | 19 | * This program is free software; you can redistribute it and/or |
20 | * modify it under the terms of the GNU General Public License as | 20 | * modify it under the terms of the GNU General Public License as |
21 | * published by the Free Software Foundation; either version 2 of | 21 | * published by the Free Software Foundation; either version 2 of |
22 | * the License, or (at your option) any later version. | 22 | * the License, or (at your option) any later version. |
23 | * | 23 | * |
24 | * This program is distributed in the hope that it will be useful, | 24 | * This program is distributed in the hope that it will be useful, |
@@ -28,7 +28,7 @@ | |||
28 | * | 28 | * |
29 | * You should have received a copy of the GNU General Public License | 29 | * You should have received a copy of the GNU General Public License |
30 | * along with this program; if not, write to the Free Software | 30 | * along with this program; if not, write to the Free Software |
31 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 31 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
32 | * MA 02111-1307 USA | 32 | * MA 02111-1307 USA |
33 | ********************************************************************* */ | 33 | ********************************************************************* */ |
34 | 34 | ||
@@ -43,9 +43,9 @@ | |||
43 | * DMA Registers | 43 | * DMA Registers |
44 | ********************************************************************* */ | 44 | ********************************************************************* */ |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Ethernet and Serial DMA Configuration Register 0 (Table 7-4) | 47 | * Ethernet and Serial DMA Configuration Register 0 (Table 7-4) |
48 | * Registers: DMA_CONFIG0_MAC_x_RX_CH_0 | 48 | * Registers: DMA_CONFIG0_MAC_x_RX_CH_0 |
49 | * Registers: DMA_CONFIG0_MAC_x_TX_CH_0 | 49 | * Registers: DMA_CONFIG0_MAC_x_TX_CH_0 |
50 | * Registers: DMA_CONFIG0_SER_x_RX | 50 | * Registers: DMA_CONFIG0_SER_x_RX |
51 | * Registers: DMA_CONFIG0_SER_x_TX | 51 | * Registers: DMA_CONFIG0_SER_x_TX |
@@ -98,7 +98,7 @@ | |||
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Ethernet and Serial DMA Configuration Register 1 (Table 7-5) | 100 | * Ethernet and Serial DMA Configuration Register 1 (Table 7-5) |
101 | * Registers: DMA_CONFIG1_MAC_x_RX_CH_0 | 101 | * Registers: DMA_CONFIG1_MAC_x_RX_CH_0 |
102 | * Registers: DMA_CONFIG1_DMA_x_TX_CH_0 | 102 | * Registers: DMA_CONFIG1_DMA_x_TX_CH_0 |
103 | * Registers: DMA_CONFIG1_SER_x_RX | 103 | * Registers: DMA_CONFIG1_SER_x_RX |
104 | * Registers: DMA_CONFIG1_SER_x_TX | 104 | * Registers: DMA_CONFIG1_SER_x_TX |
@@ -152,11 +152,11 @@ | |||
152 | /* | 152 | /* |
153 | * DMA Descriptor Count Registers (Table 7-8) | 153 | * DMA Descriptor Count Registers (Table 7-8) |
154 | */ | 154 | */ |
155 | 155 | ||
156 | /* No bitfields */ | 156 | /* No bitfields */ |
157 | 157 | ||
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Current Descriptor Address Register (Table 7-11) | 160 | * Current Descriptor Address Register (Table 7-11) |
161 | */ | 161 | */ |
162 | 162 | ||
@@ -275,14 +275,14 @@ | |||
275 | #define V_DMA_DSCRB_STATUS(x) _SB_MAKEVALUE(x,S_DMA_DSCRB_STATUS) | 275 | #define V_DMA_DSCRB_STATUS(x) _SB_MAKEVALUE(x,S_DMA_DSCRB_STATUS) |
276 | #define G_DMA_DSCRB_STATUS(x) _SB_GETVALUE(x,S_DMA_DSCRB_STATUS,M_DMA_DSCRB_STATUS) | 276 | #define G_DMA_DSCRB_STATUS(x) _SB_GETVALUE(x,S_DMA_DSCRB_STATUS,M_DMA_DSCRB_STATUS) |
277 | 277 | ||
278 | /* | 278 | /* |
279 | * Ethernet Descriptor Status Bits (Table 7-15) | 279 | * Ethernet Descriptor Status Bits (Table 7-15) |
280 | */ | 280 | */ |
281 | 281 | ||
282 | #define M_DMA_ETHRX_BADIP4CS _SB_MAKEMASK1(51) | 282 | #define M_DMA_ETHRX_BADIP4CS _SB_MAKEMASK1(51) |
283 | #define M_DMA_ETHRX_DSCRERR _SB_MAKEMASK1(52) | 283 | #define M_DMA_ETHRX_DSCRERR _SB_MAKEMASK1(52) |
284 | 284 | ||
285 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 285 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
286 | /* Note: BADTCPCS is actually in DSCR_B options field */ | 286 | /* Note: BADTCPCS is actually in DSCR_B options field */ |
287 | #define M_DMA_ETHRX_BADTCPCS _SB_MAKEMASK1(0) | 287 | #define M_DMA_ETHRX_BADTCPCS _SB_MAKEMASK1(0) |
288 | #endif /* 1250 PASS2 || 112x PASS1 */ | 288 | #endif /* 1250 PASS2 || 112x PASS1 */ |
@@ -324,7 +324,7 @@ | |||
324 | 324 | ||
325 | #define M_DMA_ETHTX_SOP _SB_MAKEMASK1(63) | 325 | #define M_DMA_ETHTX_SOP _SB_MAKEMASK1(63) |
326 | 326 | ||
327 | /* | 327 | /* |
328 | * Ethernet Transmit Options (Table 7-17) | 328 | * Ethernet Transmit Options (Table 7-17) |
329 | */ | 329 | */ |
330 | 330 | ||
@@ -377,7 +377,7 @@ | |||
377 | * Data Mover Registers | 377 | * Data Mover Registers |
378 | ********************************************************************* */ | 378 | ********************************************************************* */ |
379 | 379 | ||
380 | /* | 380 | /* |
381 | * Data Mover Descriptor Base Address Register (Table 7-22) | 381 | * Data Mover Descriptor Base Address Register (Table 7-22) |
382 | * Register: DM_DSCR_BASE_0 | 382 | * Register: DM_DSCR_BASE_0 |
383 | * Register: DM_DSCR_BASE_1 | 383 | * Register: DM_DSCR_BASE_1 |
@@ -414,7 +414,7 @@ | |||
414 | #define M_DM_DSCR_BASE_ABORT _SB_MAKEMASK1(62) | 414 | #define M_DM_DSCR_BASE_ABORT _SB_MAKEMASK1(62) |
415 | #define M_DM_DSCR_BASE_ENABL _SB_MAKEMASK1(63) | 415 | #define M_DM_DSCR_BASE_ENABL _SB_MAKEMASK1(63) |
416 | 416 | ||
417 | /* | 417 | /* |
418 | * Data Mover Descriptor Count Register (Table 7-25) | 418 | * Data Mover Descriptor Count Register (Table 7-25) |
419 | */ | 419 | */ |
420 | 420 | ||
diff --git a/include/asm-mips/sibyte/sb1250_genbus.h b/include/asm-mips/sibyte/sb1250_genbus.h index 0d9dfac3d7db..f1f509f295c4 100644 --- a/include/asm-mips/sibyte/sb1250_genbus.h +++ b/include/asm-mips/sibyte/sb1250_genbus.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Generic Bus Constants File: sb1250_genbus.h | 4 | * Generic Bus Constants File: sb1250_genbus.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's Generic Bus interface | 7 | * manipulating the SB1250's Generic Bus interface |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
diff --git a/include/asm-mips/sibyte/sb1250_int.h b/include/asm-mips/sibyte/sb1250_int.h index c3f74df211f4..e173e2ea4c98 100644 --- a/include/asm-mips/sibyte/sb1250_int.h +++ b/include/asm-mips/sibyte/sb1250_int.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Interrupt Mapper definitions File: sb1250_int.h | 4 | * Interrupt Mapper definitions File: sb1250_int.h |
5 | * | 5 | * |
6 | * This module contains constants for manipulating the SB1250's | 6 | * This module contains constants for manipulating the SB1250's |
7 | * interrupt mapper and definitions for the interrupt sources. | 7 | * interrupt mapper and definitions for the interrupt sources. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -43,7 +43,7 @@ | |||
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Interrupt sources (Table 4-8, UM 0.2) | 45 | * Interrupt sources (Table 4-8, UM 0.2) |
46 | * | 46 | * |
47 | * First, the interrupt numbers. | 47 | * First, the interrupt numbers. |
48 | */ | 48 | */ |
49 | 49 | ||
diff --git a/include/asm-mips/sibyte/sb1250_l2c.h b/include/asm-mips/sibyte/sb1250_l2c.h index 799db828d963..8afe8e01581b 100644 --- a/include/asm-mips/sibyte/sb1250_l2c.h +++ b/include/asm-mips/sibyte/sb1250_l2c.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * L2 Cache constants and macros File: sb1250_l2c.h | 4 | * L2 Cache constants and macros File: sb1250_l2c.h |
5 | * | 5 | * |
6 | * This module contains constants useful for manipulating the | 6 | * This module contains constants useful for manipulating the |
7 | * level 2 cache. | 7 | * level 2 cache. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
diff --git a/include/asm-mips/sibyte/sb1250_ldt.h b/include/asm-mips/sibyte/sb1250_ldt.h index d8753885df17..f2617ded0a8f 100644 --- a/include/asm-mips/sibyte/sb1250_ldt.h +++ b/include/asm-mips/sibyte/sb1250_ldt.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * LDT constants File: sb1250_ldt.h | 4 | * LDT constants File: sb1250_ldt.h |
5 | * | 5 | * |
6 | * This module contains constants and macros to describe | 6 | * This module contains constants and macros to describe |
7 | * the LDT interface on the SB1250. | 7 | * the LDT interface on the SB1250. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -155,7 +155,7 @@ | |||
155 | 155 | ||
156 | /* | 156 | /* |
157 | * LDT Status Register (Table 8-14). Note that these constants | 157 | * LDT Status Register (Table 8-14). Note that these constants |
158 | * assume you've read the command and status register | 158 | * assume you've read the command and status register |
159 | * together (32-bit read at offset 0x04) | 159 | * together (32-bit read at offset 0x04) |
160 | * | 160 | * |
161 | * These bits also apply to the secondary status | 161 | * These bits also apply to the secondary status |
@@ -183,8 +183,8 @@ | |||
183 | #define M_LDT_STATUS_DETPARERR _SB_MAKEMASK1_32(31) | 183 | #define M_LDT_STATUS_DETPARERR _SB_MAKEMASK1_32(31) |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Bridge Control Register (Table 8-16). Note that these | 186 | * Bridge Control Register (Table 8-16). Note that these |
187 | * constants assume you've read the register as a 32-bit | 187 | * constants assume you've read the register as a 32-bit |
188 | * read (offset 0x3C) | 188 | * read (offset 0x3C) |
189 | */ | 189 | */ |
190 | 190 | ||
diff --git a/include/asm-mips/sibyte/sb1250_mac.h b/include/asm-mips/sibyte/sb1250_mac.h index 81f603f03a98..18e74e43f4a2 100644 --- a/include/asm-mips/sibyte/sb1250_mac.h +++ b/include/asm-mips/sibyte/sb1250_mac.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * MAC constants and macros File: sb1250_mac.h | 4 | * MAC constants and macros File: sb1250_mac.h |
5 | * | 5 | * |
6 | * This module contains constants and macros for the SB1250's | 6 | * This module contains constants and macros for the SB1250's |
7 | * ethernet controllers. | 7 | * ethernet controllers. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -311,7 +311,7 @@ | |||
311 | 311 | ||
312 | /* | 312 | /* |
313 | * These constants are used to configure the fields within the Frame | 313 | * These constants are used to configure the fields within the Frame |
314 | * Configuration Register. | 314 | * Configuration Register. |
315 | */ | 315 | */ |
316 | 316 | ||
317 | #define K_MAC_IFG_RX_10 _SB_MAKE64(0) /* See table 176, not used */ | 317 | #define K_MAC_IFG_RX_10 _SB_MAKE64(0) /* See table 176, not used */ |
@@ -393,7 +393,7 @@ | |||
393 | * Register: MAC_INT_MASK_2 | 393 | * Register: MAC_INT_MASK_2 |
394 | */ | 394 | */ |
395 | 395 | ||
396 | /* | 396 | /* |
397 | * Use these constants to shift the appropriate channel | 397 | * Use these constants to shift the appropriate channel |
398 | * into the CH0 position so the same tests can be used | 398 | * into the CH0 position so the same tests can be used |
399 | * on each channel. | 399 | * on each channel. |
diff --git a/include/asm-mips/sibyte/sb1250_mc.h b/include/asm-mips/sibyte/sb1250_mc.h index 93a48334b874..1dd41c927996 100644 --- a/include/asm-mips/sibyte/sb1250_mc.h +++ b/include/asm-mips/sibyte/sb1250_mc.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Memory Controller constants File: sb1250_mc.h | 4 | * Memory Controller constants File: sb1250_mc.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * programming the memory controller. | 7 | * programming the memory controller. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -166,7 +166,7 @@ | |||
166 | 166 | ||
167 | #define K_MC_REF_RATE_100MHz 0x62 | 167 | #define K_MC_REF_RATE_100MHz 0x62 |
168 | #define K_MC_REF_RATE_133MHz 0x81 | 168 | #define K_MC_REF_RATE_133MHz 0x81 |
169 | #define K_MC_REF_RATE_200MHz 0xC4 | 169 | #define K_MC_REF_RATE_200MHz 0xC4 |
170 | 170 | ||
171 | #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) | 171 | #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) |
172 | #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) | 172 | #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) |
@@ -228,7 +228,7 @@ | |||
228 | V_MC_ADDR_DRIVE_DEFAULT | \ | 228 | V_MC_ADDR_DRIVE_DEFAULT | \ |
229 | V_MC_DATA_DRIVE_DEFAULT | \ | 229 | V_MC_DATA_DRIVE_DEFAULT | \ |
230 | V_MC_CLOCK_DRIVE_DEFAULT | \ | 230 | V_MC_CLOCK_DRIVE_DEFAULT | \ |
231 | V_MC_REF_RATE_DEFAULT | 231 | V_MC_REF_RATE_DEFAULT |
232 | 232 | ||
233 | 233 | ||
234 | 234 | ||
diff --git a/include/asm-mips/sibyte/sb1250_regs.h b/include/asm-mips/sibyte/sb1250_regs.h index 5d496c6faba6..9db80cd13a79 100644 --- a/include/asm-mips/sibyte/sb1250_regs.h +++ b/include/asm-mips/sibyte/sb1250_regs.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Register Definitions File: sb1250_regs.h | 4 | * Register Definitions File: sb1250_regs.h |
5 | * | 5 | * |
6 | * This module contains the addresses of the on-chip peripherals | 6 | * This module contains the addresses of the on-chip peripherals |
7 | * on the SB1250. | 7 | * on the SB1250. |
8 | * | 8 | * |
9 | * SB1250 specification level: 01/02/2002 | 9 | * SB1250 specification level: 01/02/2002 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -40,20 +40,20 @@ | |||
40 | 40 | ||
41 | /* ********************************************************************* | 41 | /* ********************************************************************* |
42 | * Some general notes: | 42 | * Some general notes: |
43 | * | 43 | * |
44 | * For the most part, when there is more than one peripheral | 44 | * For the most part, when there is more than one peripheral |
45 | * of the same type on the SOC, the constants below will be | 45 | * of the same type on the SOC, the constants below will be |
46 | * offsets from the base of each peripheral. For example, | 46 | * offsets from the base of each peripheral. For example, |
47 | * the MAC registers are described as offsets from the first | 47 | * the MAC registers are described as offsets from the first |
48 | * MAC register, and there will be a MAC_REGISTER() macro | 48 | * MAC register, and there will be a MAC_REGISTER() macro |
49 | * to calculate the base address of a given MAC. | 49 | * to calculate the base address of a given MAC. |
50 | * | 50 | * |
51 | * The information in this file is based on the SB1250 SOC | 51 | * The information in this file is based on the SB1250 SOC |
52 | * manual version 0.2, July 2000. | 52 | * manual version 0.2, July 2000. |
53 | ********************************************************************* */ | 53 | ********************************************************************* */ |
54 | 54 | ||
55 | 55 | ||
56 | /* ********************************************************************* | 56 | /* ********************************************************************* |
57 | * Memory Controller Registers | 57 | * Memory Controller Registers |
58 | ********************************************************************* */ | 58 | ********************************************************************* */ |
59 | 59 | ||
@@ -101,7 +101,7 @@ | |||
101 | #define R_MC_TEST_ECC 0x0000000420 | 101 | #define R_MC_TEST_ECC 0x0000000420 |
102 | #define R_MC_MCLK_CFG 0x0000000500 | 102 | #define R_MC_MCLK_CFG 0x0000000500 |
103 | 103 | ||
104 | /* ********************************************************************* | 104 | /* ********************************************************************* |
105 | * L2 Cache Control Registers | 105 | * L2 Cache Control Registers |
106 | ********************************************************************* */ | 106 | ********************************************************************* */ |
107 | 107 | ||
@@ -126,7 +126,7 @@ | |||
126 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG | 126 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG |
127 | 127 | ||
128 | 128 | ||
129 | /* ********************************************************************* | 129 | /* ********************************************************************* |
130 | * PCI Interface Registers | 130 | * PCI Interface Registers |
131 | ********************************************************************* */ | 131 | ********************************************************************* */ |
132 | 132 | ||
@@ -134,7 +134,7 @@ | |||
134 | #define A_PCI_TYPE01_HEADER 0x00DE000800 | 134 | #define A_PCI_TYPE01_HEADER 0x00DE000800 |
135 | 135 | ||
136 | 136 | ||
137 | /* ********************************************************************* | 137 | /* ********************************************************************* |
138 | * Ethernet DMA and MACs | 138 | * Ethernet DMA and MACs |
139 | ********************************************************************* */ | 139 | ********************************************************************* */ |
140 | 140 | ||
@@ -184,7 +184,7 @@ | |||
184 | (R_MAC_DMA_CHANNEL_BASE(txrx,chan) + \ | 184 | (R_MAC_DMA_CHANNEL_BASE(txrx,chan) + \ |
185 | (reg)) | 185 | (reg)) |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE | 188 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE |
189 | */ | 189 | */ |
190 | 190 | ||
@@ -259,7 +259,7 @@ | |||
259 | #define MAC_CHMAP_COUNT 4 | 259 | #define MAC_CHMAP_COUNT 4 |
260 | 260 | ||
261 | 261 | ||
262 | /* ********************************************************************* | 262 | /* ********************************************************************* |
263 | * DUART Registers | 263 | * DUART Registers |
264 | ********************************************************************* */ | 264 | ********************************************************************* */ |
265 | 265 | ||
@@ -363,7 +363,7 @@ | |||
363 | #endif /* 1250 PASS2 || 112x PASS1 */ | 363 | #endif /* 1250 PASS2 || 112x PASS1 */ |
364 | 364 | ||
365 | 365 | ||
366 | /* ********************************************************************* | 366 | /* ********************************************************************* |
367 | * Synchronous Serial Registers | 367 | * Synchronous Serial Registers |
368 | ********************************************************************* */ | 368 | ********************************************************************* */ |
369 | 369 | ||
@@ -397,7 +397,7 @@ | |||
397 | (reg)) | 397 | (reg)) |
398 | 398 | ||
399 | 399 | ||
400 | /* | 400 | /* |
401 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE | 401 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE |
402 | */ | 402 | */ |
403 | 403 | ||
@@ -457,7 +457,7 @@ | |||
457 | #define R_SER_RMON_RX_ERRORS 0x000001F0 | 457 | #define R_SER_RMON_RX_ERRORS 0x000001F0 |
458 | #define R_SER_RMON_RX_BADADDR 0x000001F8 | 458 | #define R_SER_RMON_RX_BADADDR 0x000001F8 |
459 | 459 | ||
460 | /* ********************************************************************* | 460 | /* ********************************************************************* |
461 | * Generic Bus Registers | 461 | * Generic Bus Registers |
462 | ********************************************************************* */ | 462 | ********************************************************************* */ |
463 | 463 | ||
@@ -513,7 +513,7 @@ | |||
513 | #define R_IO_PCMCIA_CFG 0x0A60 | 513 | #define R_IO_PCMCIA_CFG 0x0A60 |
514 | #define R_IO_PCMCIA_STATUS 0x0A70 | 514 | #define R_IO_PCMCIA_STATUS 0x0A70 |
515 | 515 | ||
516 | /* ********************************************************************* | 516 | /* ********************************************************************* |
517 | * GPIO Registers | 517 | * GPIO Registers |
518 | ********************************************************************* */ | 518 | ********************************************************************* */ |
519 | 519 | ||
@@ -537,7 +537,7 @@ | |||
537 | #define R_GPIO_PIN_CLR 0x30 | 537 | #define R_GPIO_PIN_CLR 0x30 |
538 | #define R_GPIO_PIN_SET 0x38 | 538 | #define R_GPIO_PIN_SET 0x38 |
539 | 539 | ||
540 | /* ********************************************************************* | 540 | /* ********************************************************************* |
541 | * SMBus Registers | 541 | * SMBus Registers |
542 | ********************************************************************* */ | 542 | ********************************************************************* */ |
543 | 543 | ||
@@ -573,7 +573,7 @@ | |||
573 | #define R_SMB_CONTROL 0x0000000060 | 573 | #define R_SMB_CONTROL 0x0000000060 |
574 | #define R_SMB_PEC 0x0000000070 | 574 | #define R_SMB_PEC 0x0000000070 |
575 | 575 | ||
576 | /* ********************************************************************* | 576 | /* ********************************************************************* |
577 | * Timer Registers | 577 | * Timer Registers |
578 | ********************************************************************* */ | 578 | ********************************************************************* */ |
579 | 579 | ||
@@ -641,7 +641,7 @@ | |||
641 | #endif /* 1250 PASS2 || 112x PASS1 */ | 641 | #endif /* 1250 PASS2 || 112x PASS1 */ |
642 | 642 | ||
643 | 643 | ||
644 | /* ********************************************************************* | 644 | /* ********************************************************************* |
645 | * System Control Registers | 645 | * System Control Registers |
646 | ********************************************************************* */ | 646 | ********************************************************************* */ |
647 | 647 | ||
@@ -649,7 +649,7 @@ | |||
649 | #define A_SCD_SYSTEM_CFG 0x0010020008 | 649 | #define A_SCD_SYSTEM_CFG 0x0010020008 |
650 | #define A_SCD_SYSTEM_MANUF 0x0010038000 | 650 | #define A_SCD_SYSTEM_MANUF 0x0010038000 |
651 | 651 | ||
652 | /* ********************************************************************* | 652 | /* ********************************************************************* |
653 | * System Address Trap Registers | 653 | * System Address Trap Registers |
654 | ********************************************************************* */ | 654 | ********************************************************************* */ |
655 | 655 | ||
@@ -672,7 +672,7 @@ | |||
672 | #endif /* 1250 PASS2 || 112x PASS1 */ | 672 | #endif /* 1250 PASS2 || 112x PASS1 */ |
673 | 673 | ||
674 | 674 | ||
675 | /* ********************************************************************* | 675 | /* ********************************************************************* |
676 | * System Interrupt Mapper Registers | 676 | * System Interrupt Mapper Registers |
677 | ********************************************************************* */ | 677 | ********************************************************************* */ |
678 | 678 | ||
@@ -701,7 +701,7 @@ | |||
701 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 | 701 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 |
702 | #define R_IMR_INTERRUPT_MAP_COUNT 64 | 702 | #define R_IMR_INTERRUPT_MAP_COUNT 64 |
703 | 703 | ||
704 | /* ********************************************************************* | 704 | /* ********************************************************************* |
705 | * System Performance Counter Registers | 705 | * System Performance Counter Registers |
706 | ********************************************************************* */ | 706 | ********************************************************************* */ |
707 | 707 | ||
@@ -711,7 +711,7 @@ | |||
711 | #define A_SCD_PERF_CNT_2 0x00100204E0 | 711 | #define A_SCD_PERF_CNT_2 0x00100204E0 |
712 | #define A_SCD_PERF_CNT_3 0x00100204E8 | 712 | #define A_SCD_PERF_CNT_3 0x00100204E8 |
713 | 713 | ||
714 | /* ********************************************************************* | 714 | /* ********************************************************************* |
715 | * System Bus Watcher Registers | 715 | * System Bus Watcher Registers |
716 | ********************************************************************* */ | 716 | ********************************************************************* */ |
717 | 717 | ||
@@ -726,13 +726,13 @@ | |||
726 | #define A_BUS_L2_ERRORS 0x00100208C0 | 726 | #define A_BUS_L2_ERRORS 0x00100208C0 |
727 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 | 727 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 |
728 | 728 | ||
729 | /* ********************************************************************* | 729 | /* ********************************************************************* |
730 | * System Debug Controller Registers | 730 | * System Debug Controller Registers |
731 | ********************************************************************* */ | 731 | ********************************************************************* */ |
732 | 732 | ||
733 | #define A_SCD_JTAG_BASE 0x0010000000 | 733 | #define A_SCD_JTAG_BASE 0x0010000000 |
734 | 734 | ||
735 | /* ********************************************************************* | 735 | /* ********************************************************************* |
736 | * System Trace Buffer Registers | 736 | * System Trace Buffer Registers |
737 | ********************************************************************* */ | 737 | ********************************************************************* */ |
738 | 738 | ||
@@ -755,7 +755,7 @@ | |||
755 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 | 755 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 |
756 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 | 756 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 |
757 | 757 | ||
758 | /* ********************************************************************* | 758 | /* ********************************************************************* |
759 | * System Generic DMA Registers | 759 | * System Generic DMA Registers |
760 | ********************************************************************* */ | 760 | ********************************************************************* */ |
761 | 761 | ||
diff --git a/include/asm-mips/sibyte/sb1250_scd.h b/include/asm-mips/sibyte/sb1250_scd.h index 22e8041959e2..dbbd682fb47e 100644 --- a/include/asm-mips/sibyte/sb1250_scd.h +++ b/include/asm-mips/sibyte/sb1250_scd.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * SCD Constants and Macros File: sb1250_scd.h | 4 | * SCD Constants and Macros File: sb1250_scd.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the System Control and Debug module on the 1250. | 7 | * manipulating the System Control and Debug module on the 1250. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -130,40 +130,40 @@ | |||
130 | /* System Manufacturing Register | 130 | /* System Manufacturing Register |
131 | * Register: SCD_SYSTEM_MANUF | 131 | * Register: SCD_SYSTEM_MANUF |
132 | */ | 132 | */ |
133 | 133 | ||
134 | /* Wafer ID: bits 31:0 */ | 134 | /* Wafer ID: bits 31:0 */ |
135 | #define S_SYS_WAFERID1_200 _SB_MAKE64(0) | 135 | #define S_SYS_WAFERID1_200 _SB_MAKE64(0) |
136 | #define M_SYS_WAFERID1_200 _SB_MAKEMASK(32,S_SYS_WAFERID1_200) | 136 | #define M_SYS_WAFERID1_200 _SB_MAKEMASK(32,S_SYS_WAFERID1_200) |
137 | #define V_SYS_WAFERID1_200(x) _SB_MAKEVALUE(x,S_SYS_WAFERID1_200) | 137 | #define V_SYS_WAFERID1_200(x) _SB_MAKEVALUE(x,S_SYS_WAFERID1_200) |
138 | #define G_SYS_WAFERID1_200(x) _SB_GETVALUE(x,S_SYS_WAFERID1_200,M_SYS_WAFERID1_200) | 138 | #define G_SYS_WAFERID1_200(x) _SB_GETVALUE(x,S_SYS_WAFERID1_200,M_SYS_WAFERID1_200) |
139 | 139 | ||
140 | #define S_SYS_BIN _SB_MAKE64(32) | 140 | #define S_SYS_BIN _SB_MAKE64(32) |
141 | #define M_SYS_BIN _SB_MAKEMASK(4,S_SYS_BIN) | 141 | #define M_SYS_BIN _SB_MAKEMASK(4,S_SYS_BIN) |
142 | #define V_SYS_BIN _SB_MAKEVALUE(x,S_SYS_BIN) | 142 | #define V_SYS_BIN _SB_MAKEVALUE(x,S_SYS_BIN) |
143 | #define G_SYS_BIN _SB_GETVALUE(x,S_SYS_BIN,M_SYS_BIN) | 143 | #define G_SYS_BIN _SB_GETVALUE(x,S_SYS_BIN,M_SYS_BIN) |
144 | 144 | ||
145 | /* Wafer ID: bits 39:36 */ | 145 | /* Wafer ID: bits 39:36 */ |
146 | #define S_SYS_WAFERID2_200 _SB_MAKE64(36) | 146 | #define S_SYS_WAFERID2_200 _SB_MAKE64(36) |
147 | #define M_SYS_WAFERID2_200 _SB_MAKEMASK(4,S_SYS_WAFERID2_200) | 147 | #define M_SYS_WAFERID2_200 _SB_MAKEMASK(4,S_SYS_WAFERID2_200) |
148 | #define V_SYS_WAFERID2_200(x) _SB_MAKEVALUE(x,S_SYS_WAFERID2_200) | 148 | #define V_SYS_WAFERID2_200(x) _SB_MAKEVALUE(x,S_SYS_WAFERID2_200) |
149 | #define G_SYS_WAFERID2_200(x) _SB_GETVALUE(x,S_SYS_WAFERID2_200,M_SYS_WAFERID2_200) | 149 | #define G_SYS_WAFERID2_200(x) _SB_GETVALUE(x,S_SYS_WAFERID2_200,M_SYS_WAFERID2_200) |
150 | 150 | ||
151 | /* Wafer ID: bits 39:0 */ | 151 | /* Wafer ID: bits 39:0 */ |
152 | #define S_SYS_WAFERID_300 _SB_MAKE64(0) | 152 | #define S_SYS_WAFERID_300 _SB_MAKE64(0) |
153 | #define M_SYS_WAFERID_300 _SB_MAKEMASK(40,S_SYS_WAFERID_300) | 153 | #define M_SYS_WAFERID_300 _SB_MAKEMASK(40,S_SYS_WAFERID_300) |
154 | #define V_SYS_WAFERID_300(x) _SB_MAKEVALUE(x,S_SYS_WAFERID_300) | 154 | #define V_SYS_WAFERID_300(x) _SB_MAKEVALUE(x,S_SYS_WAFERID_300) |
155 | #define G_SYS_WAFERID_300(x) _SB_GETVALUE(x,S_SYS_WAFERID_300,M_SYS_WAFERID_300) | 155 | #define G_SYS_WAFERID_300(x) _SB_GETVALUE(x,S_SYS_WAFERID_300,M_SYS_WAFERID_300) |
156 | 156 | ||
157 | #define S_SYS_XPOS _SB_MAKE64(40) | 157 | #define S_SYS_XPOS _SB_MAKE64(40) |
158 | #define M_SYS_XPOS _SB_MAKEMASK(6,S_SYS_XPOS) | 158 | #define M_SYS_XPOS _SB_MAKEMASK(6,S_SYS_XPOS) |
159 | #define V_SYS_XPOS(x) _SB_MAKEVALUE(x,S_SYS_XPOS) | 159 | #define V_SYS_XPOS(x) _SB_MAKEVALUE(x,S_SYS_XPOS) |
160 | #define G_SYS_XPOS(x) _SB_GETVALUE(x,S_SYS_XPOS,M_SYS_XPOS) | 160 | #define G_SYS_XPOS(x) _SB_GETVALUE(x,S_SYS_XPOS,M_SYS_XPOS) |
161 | 161 | ||
162 | #define S_SYS_YPOS _SB_MAKE64(46) | 162 | #define S_SYS_YPOS _SB_MAKE64(46) |
163 | #define M_SYS_YPOS _SB_MAKEMASK(6,S_SYS_YPOS) | 163 | #define M_SYS_YPOS _SB_MAKEMASK(6,S_SYS_YPOS) |
164 | #define V_SYS_YPOS(x) _SB_MAKEVALUE(x,S_SYS_YPOS) | 164 | #define V_SYS_YPOS(x) _SB_MAKEVALUE(x,S_SYS_YPOS) |
165 | #define G_SYS_YPOS(x) _SB_GETVALUE(x,S_SYS_YPOS,M_SYS_YPOS) | 165 | #define G_SYS_YPOS(x) _SB_GETVALUE(x,S_SYS_YPOS,M_SYS_YPOS) |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * System Config Register (Table 4-2) | 168 | * System Config Register (Table 4-2) |
169 | * Register: SCD_SYSTEM_CFG | 169 | * Register: SCD_SYSTEM_CFG |
diff --git a/include/asm-mips/sibyte/sb1250_smbus.h b/include/asm-mips/sibyte/sb1250_smbus.h index 287cbfe9efa2..335c53e92936 100644 --- a/include/asm-mips/sibyte/sb1250_smbus.h +++ b/include/asm-mips/sibyte/sb1250_smbus.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * SMBUS Constants File: sb1250_smbus.h | 4 | * SMBUS Constants File: sb1250_smbus.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's SMbus devices. | 7 | * manipulating the SB1250's SMbus devices. |
8 | * | 8 | * |
9 | * SB1250 specification level: 01/02/2002 | 9 | * SB1250 specification level: 01/02/2002 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
diff --git a/include/asm-mips/sibyte/sb1250_syncser.h b/include/asm-mips/sibyte/sb1250_syncser.h index 8d5e8edd3c4b..fa2760d38b8b 100644 --- a/include/asm-mips/sibyte/sb1250_syncser.h +++ b/include/asm-mips/sibyte/sb1250_syncser.h | |||
@@ -7,17 +7,17 @@ | |||
7 | * manipulating the SB1250's Synchronous Serial | 7 | * manipulating the SB1250's Synchronous Serial |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
diff --git a/include/asm-mips/sibyte/sb1250_uart.h b/include/asm-mips/sibyte/sb1250_uart.h index 7655d6945cca..923ea4f44e0f 100644 --- a/include/asm-mips/sibyte/sb1250_uart.h +++ b/include/asm-mips/sibyte/sb1250_uart.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * UART Constants File: sb1250_uart.h | 4 | * UART Constants File: sb1250_uart.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's UARTs | 7 | * manipulating the SB1250's UARTs |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #include "sb1250_defs.h" | 38 | #include "sb1250_defs.h" |
39 | 39 | ||
40 | /* ********************************************************************** | 40 | /* ********************************************************************** |
41 | * DUART Registers | 41 | * DUART Registers |
42 | ********************************************************************** */ | 42 | ********************************************************************** */ |
43 | 43 | ||
@@ -145,7 +145,7 @@ | |||
145 | #define V_DUART_MISC_CMD_START_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK) | 145 | #define V_DUART_MISC_CMD_START_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK) |
146 | #define V_DUART_MISC_CMD_STOP_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK) | 146 | #define V_DUART_MISC_CMD_STOP_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK) |
147 | 147 | ||
148 | #define M_DUART_CMD_RESERVED _SB_MAKEMASK1(7) | 148 | #define M_DUART_CMD_RESERVED _SB_MAKEMASK1(7) |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * DUART Status Register (Table 10-6) | 151 | * DUART Status Register (Table 10-6) |
@@ -165,7 +165,7 @@ | |||
165 | 165 | ||
166 | /* | 166 | /* |
167 | * DUART Baud Rate Register (Table 10-7) | 167 | * DUART Baud Rate Register (Table 10-7) |
168 | * Register: DUART_CLK_SEL_A | 168 | * Register: DUART_CLK_SEL_A |
169 | * Register: DUART_CLK_SEL_B | 169 | * Register: DUART_CLK_SEL_B |
170 | */ | 170 | */ |
171 | 171 | ||
@@ -332,7 +332,7 @@ | |||
332 | (chan == 0 ? M_DUART_OUT_PIN_CLR0 : M_DUART_OUT_PIN_CLR1) | 332 | (chan == 0 ? M_DUART_OUT_PIN_CLR0 : M_DUART_OUT_PIN_CLR1) |
333 | 333 | ||
334 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 334 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
335 | /* | 335 | /* |
336 | * Full Interrupt Control Register | 336 | * Full Interrupt Control Register |
337 | */ | 337 | */ |
338 | 338 | ||
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index 18939e84b6f2..f7fbebaa0744 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define _ASM_SIGCONTEXT_H | 10 | #define _ASM_SIGCONTEXT_H |
11 | 11 | ||
12 | #include <asm/sgidefs.h> | 12 | #include <asm/sgidefs.h> |
13 | 13 | ||
14 | #if _MIPS_SIM == _MIPS_SIM_ABI32 | 14 | #if _MIPS_SIM == _MIPS_SIM_ABI32 |
15 | 15 | ||
16 | /* | 16 | /* |
@@ -38,7 +38,7 @@ struct sigcontext { | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 40 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
41 | 41 | ||
42 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 | 42 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 |
43 | 43 | ||
44 | /* | 44 | /* |
diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h index a0e26e6c994d..698becab5a9e 100644 --- a/include/asm-mips/siginfo.h +++ b/include/asm-mips/siginfo.h | |||
@@ -25,10 +25,10 @@ struct siginfo; | |||
25 | /* | 25 | /* |
26 | * Careful to keep union _sifields from shifting ... | 26 | * Careful to keep union _sifields from shifting ... |
27 | */ | 27 | */ |
28 | #ifdef CONFIG_MIPS32 | 28 | #ifdef CONFIG_32BIT |
29 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) | 29 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) |
30 | #endif | 30 | #endif |
31 | #ifdef CONFIG_MIPS64 | 31 | #ifdef CONFIG_64BIT |
32 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 32 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
33 | #endif | 33 | #endif |
34 | 34 | ||
diff --git a/include/asm-mips/sim.h b/include/asm-mips/sim.h index 6333169be329..3ccfe09fa744 100644 --- a/include/asm-mips/sim.h +++ b/include/asm-mips/sim.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define __str2(x) #x | 16 | #define __str2(x) #x |
17 | #define __str(x) __str2(x) | 17 | #define __str(x) __str2(x) |
18 | 18 | ||
19 | #ifdef CONFIG_MIPS32 | 19 | #ifdef CONFIG_32BIT |
20 | 20 | ||
21 | #define save_static_function(symbol) \ | 21 | #define save_static_function(symbol) \ |
22 | __asm__ ( \ | 22 | __asm__ ( \ |
@@ -42,9 +42,9 @@ __asm__ ( \ | |||
42 | 42 | ||
43 | #define nabi_no_regargs | 43 | #define nabi_no_regargs |
44 | 44 | ||
45 | #endif /* CONFIG_MIPS32 */ | 45 | #endif /* CONFIG_32BIT */ |
46 | 46 | ||
47 | #ifdef CONFIG_MIPS64 | 47 | #ifdef CONFIG_64BIT |
48 | 48 | ||
49 | #define save_static_function(symbol) \ | 49 | #define save_static_function(symbol) \ |
50 | __asm__ ( \ | 50 | __asm__ ( \ |
@@ -78,6 +78,6 @@ __asm__ ( \ | |||
78 | unsigned long __dummy6, \ | 78 | unsigned long __dummy6, \ |
79 | unsigned long __dummy7, | 79 | unsigned long __dummy7, |
80 | 80 | ||
81 | #endif /* CONFIG_MIPS64 */ | 81 | #endif /* CONFIG_64BIT */ |
82 | 82 | ||
83 | #endif /* _ASM_SIM_H */ | 83 | #endif /* _ASM_SIM_H */ |
diff --git a/include/asm-mips/socket.h b/include/asm-mips/socket.h index d478a86294ee..753b6620e6fa 100644 --- a/include/asm-mips/socket.h +++ b/include/asm-mips/socket.h | |||
@@ -82,7 +82,7 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ | |||
82 | * @SOCK_STREAM - stream (connection) socket | 82 | * @SOCK_STREAM - stream (connection) socket |
83 | * @SOCK_RAW - raw socket | 83 | * @SOCK_RAW - raw socket |
84 | * @SOCK_RDM - reliably-delivered message | 84 | * @SOCK_RDM - reliably-delivered message |
85 | * @SOCK_SEQPACKET - sequential packet socket | 85 | * @SOCK_SEQPACKET - sequential packet socket |
86 | * @SOCK_PACKET - linux specific way of getting packets at the dev level. | 86 | * @SOCK_PACKET - linux specific way of getting packets at the dev level. |
87 | * For writing rarp and other similar things on the user level. | 87 | * For writing rarp and other similar things on the user level. |
88 | */ | 88 | */ |
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 86283c25fd5b..fb42f99f8527 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | .macro SAVE_TEMP | 27 | .macro SAVE_TEMP |
28 | mfhi v1 | 28 | mfhi v1 |
29 | #ifdef CONFIG_MIPS32 | 29 | #ifdef CONFIG_32BIT |
30 | LONG_S $8, PT_R8(sp) | 30 | LONG_S $8, PT_R8(sp) |
31 | LONG_S $9, PT_R9(sp) | 31 | LONG_S $9, PT_R9(sp) |
32 | #endif | 32 | #endif |
@@ -56,7 +56,7 @@ | |||
56 | 56 | ||
57 | #ifdef CONFIG_SMP | 57 | #ifdef CONFIG_SMP |
58 | .macro get_saved_sp /* SMP variation */ | 58 | .macro get_saved_sp /* SMP variation */ |
59 | #ifdef CONFIG_MIPS32 | 59 | #ifdef CONFIG_32BIT |
60 | mfc0 k0, CP0_CONTEXT | 60 | mfc0 k0, CP0_CONTEXT |
61 | lui k1, %hi(kernelsp) | 61 | lui k1, %hi(kernelsp) |
62 | srl k0, k0, 23 | 62 | srl k0, k0, 23 |
@@ -64,7 +64,7 @@ | |||
64 | addu k1, k0 | 64 | addu k1, k0 |
65 | LONG_L k1, %lo(kernelsp)(k1) | 65 | LONG_L k1, %lo(kernelsp)(k1) |
66 | #endif | 66 | #endif |
67 | #if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) | 67 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) |
68 | MFC0 k1, CP0_CONTEXT | 68 | MFC0 k1, CP0_CONTEXT |
69 | dsra k1, 23 | 69 | dsra k1, 23 |
70 | lui k0, %hi(pgd_current) | 70 | lui k0, %hi(pgd_current) |
@@ -74,7 +74,7 @@ | |||
74 | daddu k1, k0 | 74 | daddu k1, k0 |
75 | LONG_L k1, %lo(kernelsp)(k1) | 75 | LONG_L k1, %lo(kernelsp)(k1) |
76 | #endif | 76 | #endif |
77 | #if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) | 77 | #if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) |
78 | MFC0 k1, CP0_CONTEXT | 78 | MFC0 k1, CP0_CONTEXT |
79 | dsrl k1, 23 | 79 | dsrl k1, 23 |
80 | dsll k1, k1, 3 | 80 | dsll k1, k1, 3 |
@@ -83,20 +83,20 @@ | |||
83 | .endm | 83 | .endm |
84 | 84 | ||
85 | .macro set_saved_sp stackp temp temp2 | 85 | .macro set_saved_sp stackp temp temp2 |
86 | #ifdef CONFIG_MIPS32 | 86 | #ifdef CONFIG_32BIT |
87 | mfc0 \temp, CP0_CONTEXT | 87 | mfc0 \temp, CP0_CONTEXT |
88 | srl \temp, 23 | 88 | srl \temp, 23 |
89 | sll \temp, 2 | 89 | sll \temp, 2 |
90 | LONG_S \stackp, kernelsp(\temp) | 90 | LONG_S \stackp, kernelsp(\temp) |
91 | #endif | 91 | #endif |
92 | #if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) | 92 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) |
93 | lw \temp, TI_CPU(gp) | 93 | lw \temp, TI_CPU(gp) |
94 | dsll \temp, 3 | 94 | dsll \temp, 3 |
95 | lui \temp2, %hi(kernelsp) | 95 | lui \temp2, %hi(kernelsp) |
96 | daddu \temp, \temp2 | 96 | daddu \temp, \temp2 |
97 | LONG_S \stackp, %lo(kernelsp)(\temp) | 97 | LONG_S \stackp, %lo(kernelsp)(\temp) |
98 | #endif | 98 | #endif |
99 | #if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) | 99 | #if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) |
100 | lw \temp, TI_CPU(gp) | 100 | lw \temp, TI_CPU(gp) |
101 | dsll \temp, 3 | 101 | dsll \temp, 3 |
102 | LONG_S \stackp, kernelsp(\temp) | 102 | LONG_S \stackp, kernelsp(\temp) |
@@ -140,7 +140,7 @@ | |||
140 | LONG_S $6, PT_R6(sp) | 140 | LONG_S $6, PT_R6(sp) |
141 | MFC0 v1, CP0_EPC | 141 | MFC0 v1, CP0_EPC |
142 | LONG_S $7, PT_R7(sp) | 142 | LONG_S $7, PT_R7(sp) |
143 | #ifdef CONFIG_MIPS64 | 143 | #ifdef CONFIG_64BIT |
144 | LONG_S $8, PT_R8(sp) | 144 | LONG_S $8, PT_R8(sp) |
145 | LONG_S $9, PT_R9(sp) | 145 | LONG_S $9, PT_R9(sp) |
146 | #endif | 146 | #endif |
@@ -169,7 +169,7 @@ | |||
169 | 169 | ||
170 | .macro RESTORE_TEMP | 170 | .macro RESTORE_TEMP |
171 | LONG_L $24, PT_LO(sp) | 171 | LONG_L $24, PT_LO(sp) |
172 | #ifdef CONFIG_MIPS32 | 172 | #ifdef CONFIG_32BIT |
173 | LONG_L $8, PT_R8(sp) | 173 | LONG_L $8, PT_R8(sp) |
174 | LONG_L $9, PT_R9(sp) | 174 | LONG_L $9, PT_R9(sp) |
175 | #endif | 175 | #endif |
@@ -217,7 +217,7 @@ | |||
217 | LONG_L $31, PT_R31(sp) | 217 | LONG_L $31, PT_R31(sp) |
218 | LONG_L $28, PT_R28(sp) | 218 | LONG_L $28, PT_R28(sp) |
219 | LONG_L $25, PT_R25(sp) | 219 | LONG_L $25, PT_R25(sp) |
220 | #ifdef CONFIG_MIPS64 | 220 | #ifdef CONFIG_64BIT |
221 | LONG_L $8, PT_R8(sp) | 221 | LONG_L $8, PT_R8(sp) |
222 | LONG_L $9, PT_R9(sp) | 222 | LONG_L $9, PT_R9(sp) |
223 | #endif | 223 | #endif |
@@ -262,7 +262,7 @@ | |||
262 | LONG_L $31, PT_R31(sp) | 262 | LONG_L $31, PT_R31(sp) |
263 | LONG_L $28, PT_R28(sp) | 263 | LONG_L $28, PT_R28(sp) |
264 | LONG_L $25, PT_R25(sp) | 264 | LONG_L $25, PT_R25(sp) |
265 | #ifdef CONFIG_MIPS64 | 265 | #ifdef CONFIG_64BIT |
266 | LONG_L $8, PT_R8(sp) | 266 | LONG_L $8, PT_R8(sp) |
267 | LONG_L $9, PT_R9(sp) | 267 | LONG_L $9, PT_R9(sp) |
268 | #endif | 268 | #endif |
diff --git a/include/asm-mips/statfs.h b/include/asm-mips/statfs.h index 5076fec65780..c3ddf973c1c0 100644 --- a/include/asm-mips/statfs.h +++ b/include/asm-mips/statfs.h | |||
@@ -57,7 +57,7 @@ struct statfs64 { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 59 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
60 | 60 | ||
61 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 61 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
62 | 62 | ||
63 | struct statfs64 { /* Same as struct statfs */ | 63 | struct statfs64 { /* Same as struct statfs */ |
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h index b18345504f8a..5a06f6d13899 100644 --- a/include/asm-mips/string.h +++ b/include/asm-mips/string.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * Most of the inline functions are rather naive implementations so I just | 16 | * Most of the inline functions are rather naive implementations so I just |
17 | * didn't bother updating them for 64-bit ... | 17 | * didn't bother updating them for 64-bit ... |
18 | */ | 18 | */ |
19 | #ifdef CONFIG_MIPS32 | 19 | #ifdef CONFIG_32BIT |
20 | 20 | ||
21 | #ifndef IN_STRING_C | 21 | #ifndef IN_STRING_C |
22 | 22 | ||
@@ -130,7 +130,7 @@ strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count) | |||
130 | 130 | ||
131 | return __res; | 131 | return __res; |
132 | } | 132 | } |
133 | #endif /* CONFIG_MIPS32 */ | 133 | #endif /* CONFIG_32BIT */ |
134 | 134 | ||
135 | #define __HAVE_ARCH_MEMSET | 135 | #define __HAVE_ARCH_MEMSET |
136 | extern void *memset(void *__s, int __c, size_t __count); | 136 | extern void *memset(void *__s, int __c, size_t __count); |
@@ -141,7 +141,7 @@ extern void *memcpy(void *__to, __const__ void *__from, size_t __n); | |||
141 | #define __HAVE_ARCH_MEMMOVE | 141 | #define __HAVE_ARCH_MEMMOVE |
142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); | 142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); |
143 | 143 | ||
144 | #ifdef CONFIG_MIPS32 | 144 | #ifdef CONFIG_32BIT |
145 | #define __HAVE_ARCH_MEMSCAN | 145 | #define __HAVE_ARCH_MEMSCAN |
146 | static __inline__ void *memscan(void *__addr, int __c, size_t __size) | 146 | static __inline__ void *memscan(void *__addr, int __c, size_t __size) |
147 | { | 147 | { |
@@ -161,6 +161,6 @@ static __inline__ void *memscan(void *__addr, int __c, size_t __size) | |||
161 | 161 | ||
162 | return __addr; | 162 | return __addr; |
163 | } | 163 | } |
164 | #endif /* CONFIG_MIPS32 */ | 164 | #endif /* CONFIG_32BIT */ |
165 | 165 | ||
166 | #endif /* _ASM_STRING_H */ | 166 | #endif /* _ASM_STRING_H */ |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 169f3d4265b1..6663efd49b27 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -208,7 +208,7 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | |||
208 | return retval; | 208 | return retval; |
209 | } | 209 | } |
210 | 210 | ||
211 | #ifdef CONFIG_MIPS64 | 211 | #ifdef CONFIG_64BIT |
212 | static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) | 212 | static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) |
213 | { | 213 | { |
214 | __u64 retval; | 214 | __u64 retval; |
@@ -330,7 +330,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | |||
330 | return retval; | 330 | return retval; |
331 | } | 331 | } |
332 | 332 | ||
333 | #ifdef CONFIG_MIPS64 | 333 | #ifdef CONFIG_64BIT |
334 | static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | 334 | static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, |
335 | unsigned long new) | 335 | unsigned long new) |
336 | { | 336 | { |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 42fcd6f2c206..a70cb0854c8a 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
@@ -62,10 +62,10 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
62 | #define current_thread_info() __current_thread_info | 62 | #define current_thread_info() __current_thread_info |
63 | 63 | ||
64 | /* thread information allocation */ | 64 | /* thread information allocation */ |
65 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_MIPS32) | 65 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_32BIT) |
66 | #define THREAD_SIZE_ORDER (1) | 66 | #define THREAD_SIZE_ORDER (1) |
67 | #endif | 67 | #endif |
68 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_MIPS64) | 68 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_64BIT) |
69 | #define THREAD_SIZE_ORDER (2) | 69 | #define THREAD_SIZE_ORDER (2) |
70 | #endif | 70 | #endif |
71 | #ifdef CONFIG_PAGE_SIZE_8KB | 71 | #ifdef CONFIG_PAGE_SIZE_8KB |
diff --git a/include/asm-mips/titan_dep.h b/include/asm-mips/titan_dep.h index fd9599e40a0a..fee1908c65d2 100644 --- a/include/asm-mips/titan_dep.h +++ b/include/asm-mips/titan_dep.h | |||
@@ -228,4 +228,4 @@ extern unsigned long ocd_base; | |||
228 | #define RM9K_READ_8(ofs, val) *(val) = *(volatile u8 *)(RM9000x2_BASE_ADDR+ofs) | 228 | #define RM9K_READ_8(ofs, val) *(val) = *(volatile u8 *)(RM9000x2_BASE_ADDR+ofs) |
229 | #define RM9K_READ_16(ofs, val) *(val) = *(volatile u16 *)(RM9000x2_BASE_ADDR+ofs) | 229 | #define RM9K_READ_16(ofs, val) *(val) = *(volatile u16 *)(RM9000x2_BASE_ADDR+ofs) |
230 | 230 | ||
231 | #endif | 231 | #endif |
diff --git a/include/asm-mips/tx4927/tx4927.h b/include/asm-mips/tx4927/tx4927.h index 5d939db6e220..3bb7f0087d68 100644 --- a/include/asm-mips/tx4927/tx4927.h +++ b/include/asm-mips/tx4927/tx4927.h | |||
@@ -45,14 +45,14 @@ | |||
45 | 45 | ||
46 | 46 | ||
47 | /* TX4927 SDRAM controller (64-bit registers) */ | 47 | /* TX4927 SDRAM controller (64-bit registers) */ |
48 | #define TX4927_SDRAMC_BASE 0x8000 | 48 | #define TX4927_SDRAMC_BASE 0x8000 |
49 | #define TX4927_SDRAMC_SDCCR0 0x8000 | 49 | #define TX4927_SDRAMC_SDCCR0 0x8000 |
50 | #define TX4927_SDRAMC_SDCCR1 0x8008 | 50 | #define TX4927_SDRAMC_SDCCR1 0x8008 |
51 | #define TX4927_SDRAMC_SDCCR2 0x8010 | 51 | #define TX4927_SDRAMC_SDCCR2 0x8010 |
52 | #define TX4927_SDRAMC_SDCCR3 0x8018 | 52 | #define TX4927_SDRAMC_SDCCR3 0x8018 |
53 | #define TX4927_SDRAMC_SDCTR 0x8040 | 53 | #define TX4927_SDRAMC_SDCTR 0x8040 |
54 | #define TX4927_SDRAMC_SDCMD 0x8058 | 54 | #define TX4927_SDRAMC_SDCMD 0x8058 |
55 | #define TX4927_SDRAMC_LIMIT 0x8fff | 55 | #define TX4927_SDRAMC_LIMIT 0x8fff |
56 | 56 | ||
57 | 57 | ||
58 | /* TX4927 external bus controller (64-bit registers) */ | 58 | /* TX4927 external bus controller (64-bit registers) */ |
@@ -289,8 +289,8 @@ | |||
289 | 289 | ||
290 | 290 | ||
291 | /* TX4927 serial port 0 (32-bit registers) */ | 291 | /* TX4927 serial port 0 (32-bit registers) */ |
292 | #define TX4927_SIO0_BASE 0xf300 | 292 | #define TX4927_SIO0_BASE 0xf300 |
293 | #define TX4927_SIO0_SILCR0 0xf300 | 293 | #define TX4927_SIO0_SILCR0 0xf300 |
294 | #define TX4927_SIO0_SILCR0_RESERVED_16_31 BM_16_31 | 294 | #define TX4927_SIO0_SILCR0_RESERVED_16_31 BM_16_31 |
295 | #define TX4927_SIO0_SILCR0_RWUB BM_15_15 | 295 | #define TX4927_SIO0_SILCR0_RWUB BM_15_15 |
296 | #define TX4927_SIO0_SILCR0_TWUB BM_14_14 | 296 | #define TX4927_SIO0_SILCR0_TWUB BM_14_14 |
@@ -309,7 +309,7 @@ | |||
309 | #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT (~BM_00_01) | 309 | #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT (~BM_00_01) |
310 | #define TX4927_SIO0_SILCR0_UMODE_DATA_8_BIT_MC BM_01_01 | 310 | #define TX4927_SIO0_SILCR0_UMODE_DATA_8_BIT_MC BM_01_01 |
311 | #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT_MC BM_00_01 | 311 | #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT_MC BM_00_01 |
312 | #define TX4927_SIO0_SIDICR0 0xf304 | 312 | #define TX4927_SIO0_SIDICR0 0xf304 |
313 | #define TX4927_SIO0_SIDICR0_RESERVED_16_31 BM_16_31 | 313 | #define TX4927_SIO0_SIDICR0_RESERVED_16_31 BM_16_31 |
314 | #define TX4927_SIO0_SIDICR0_TDE BM_15_15 | 314 | #define TX4927_SIO0_SIDICR0_TDE BM_15_15 |
315 | #define TX4927_SIO0_SIDICR0_RDE BM_14_14 | 315 | #define TX4927_SIO0_SIDICR0_RDE BM_14_14 |
@@ -330,7 +330,7 @@ | |||
330 | #define TX4927_SIO0_SIDICR0_STIE_TRDY BM_02_02 | 330 | #define TX4927_SIO0_SIDICR0_STIE_TRDY BM_02_02 |
331 | #define TX4927_SIO0_SIDICR0_STIE_TXALS BM_01_01 | 331 | #define TX4927_SIO0_SIDICR0_STIE_TXALS BM_01_01 |
332 | #define TX4927_SIO0_SIDICR0_STIE_UBRKD BM_00_00 | 332 | #define TX4927_SIO0_SIDICR0_STIE_UBRKD BM_00_00 |
333 | #define TX4927_SIO0_SIDISR0 0xf308 | 333 | #define TX4927_SIO0_SIDISR0 0xf308 |
334 | #define TX4927_SIO0_SIDISR0_RESERVED_16_31 BM_16_31 | 334 | #define TX4927_SIO0_SIDISR0_RESERVED_16_31 BM_16_31 |
335 | #define TX4927_SIO0_SIDISR0_UBRK BM_15_15 | 335 | #define TX4927_SIO0_SIDISR0_UBRK BM_15_15 |
336 | #define TX4927_SIO0_SIDISR0_UVALID BM_14_14 | 336 | #define TX4927_SIO0_SIDISR0_UVALID BM_14_14 |
@@ -344,7 +344,7 @@ | |||
344 | #define TX4927_SIO0_SIDISR0_STIS BM_06_06 | 344 | #define TX4927_SIO0_SIDISR0_STIS BM_06_06 |
345 | #define TX4927_SIO0_SIDISR0_RESERVED_05_05 BM_05_05 | 345 | #define TX4927_SIO0_SIDISR0_RESERVED_05_05 BM_05_05 |
346 | #define TX4927_SIO0_SIDISR0_RFDN BM_00_04 | 346 | #define TX4927_SIO0_SIDISR0_RFDN BM_00_04 |
347 | #define TX4927_SIO0_SISCISR0 0xf30c | 347 | #define TX4927_SIO0_SISCISR0 0xf30c |
348 | #define TX4927_SIO0_SISCISR0_RESERVED_06_31 BM_06_31 | 348 | #define TX4927_SIO0_SISCISR0_RESERVED_06_31 BM_06_31 |
349 | #define TX4927_SIO0_SISCISR0_OERS BM_05_05 | 349 | #define TX4927_SIO0_SISCISR0_OERS BM_05_05 |
350 | #define TX4927_SIO0_SISCISR0_CTSS BM_04_04 | 350 | #define TX4927_SIO0_SISCISR0_CTSS BM_04_04 |
@@ -352,7 +352,7 @@ | |||
352 | #define TX4927_SIO0_SISCISR0_TRDY BM_02_02 | 352 | #define TX4927_SIO0_SISCISR0_TRDY BM_02_02 |
353 | #define TX4927_SIO0_SISCISR0_TXALS BM_01_01 | 353 | #define TX4927_SIO0_SISCISR0_TXALS BM_01_01 |
354 | #define TX4927_SIO0_SISCISR0_UBRKD BM_00_00 | 354 | #define TX4927_SIO0_SISCISR0_UBRKD BM_00_00 |
355 | #define TX4927_SIO0_SIFCR0 0xf310 | 355 | #define TX4927_SIO0_SIFCR0 0xf310 |
356 | #define TX4927_SIO0_SIFCR0_RESERVED_16_31 BM_16_31 | 356 | #define TX4927_SIO0_SIFCR0_RESERVED_16_31 BM_16_31 |
357 | #define TX4927_SIO0_SIFCR0_SWRST BM_16_31 | 357 | #define TX4927_SIO0_SIFCR0_SWRST BM_16_31 |
358 | #define TX4927_SIO0_SIFCR0_RESERVED_09_14 BM_09_14 | 358 | #define TX4927_SIO0_SIFCR0_RESERVED_09_14 BM_09_14 |
@@ -370,7 +370,7 @@ | |||
370 | #define TX4927_SIO0_SIFCR0_TFRST BM_02_02 | 370 | #define TX4927_SIO0_SIFCR0_TFRST BM_02_02 |
371 | #define TX4927_SIO0_SIFCR0_RFRST BM_01_01 | 371 | #define TX4927_SIO0_SIFCR0_RFRST BM_01_01 |
372 | #define TX4927_SIO0_SIFCR0_FRSTE BM_00_00 | 372 | #define TX4927_SIO0_SIFCR0_FRSTE BM_00_00 |
373 | #define TX4927_SIO0_SIFLCR0 0xf314 | 373 | #define TX4927_SIO0_SIFLCR0 0xf314 |
374 | #define TX4927_SIO0_SIFLCR0_RESERVED_13_31 BM_13_31 | 374 | #define TX4927_SIO0_SIFLCR0_RESERVED_13_31 BM_13_31 |
375 | #define TX4927_SIO0_SIFLCR0_RCS BM_12_12 | 375 | #define TX4927_SIO0_SIFLCR0_RCS BM_12_12 |
376 | #define TX4927_SIO0_SIFLCR0_TES BM_11_11 | 376 | #define TX4927_SIO0_SIFLCR0_TES BM_11_11 |
@@ -381,7 +381,7 @@ | |||
381 | #define TX4927_SIO0_SIFLCR0_RESERVED_05_06 BM_05_06 | 381 | #define TX4927_SIO0_SIFLCR0_RESERVED_05_06 BM_05_06 |
382 | #define TX4927_SIO0_SIFLCR0_RTSTL BM_01_04 | 382 | #define TX4927_SIO0_SIFLCR0_RTSTL BM_01_04 |
383 | #define TX4927_SIO0_SIFLCR0_TBRK BM_00_00 | 383 | #define TX4927_SIO0_SIFLCR0_TBRK BM_00_00 |
384 | #define TX4927_SIO0_SIBGR0 0xf318 | 384 | #define TX4927_SIO0_SIBGR0 0xf318 |
385 | #define TX4927_SIO0_SIBGR0_RESERVED_10_31 BM_10_31 | 385 | #define TX4927_SIO0_SIBGR0_RESERVED_10_31 BM_10_31 |
386 | #define TX4927_SIO0_SIBGR0_BCLK BM_08_09 | 386 | #define TX4927_SIO0_SIBGR0_BCLK BM_08_09 |
387 | #define TX4927_SIO0_SIBGR0_BCLK_T0 (~BM_08_09) | 387 | #define TX4927_SIO0_SIBGR0_BCLK_T0 (~BM_08_09) |
@@ -389,28 +389,28 @@ | |||
389 | #define TX4927_SIO0_SIBGR0_BCLK_T4 BM_09_09 | 389 | #define TX4927_SIO0_SIBGR0_BCLK_T4 BM_09_09 |
390 | #define TX4927_SIO0_SIBGR0_BCLK_T6 BM_08_09 | 390 | #define TX4927_SIO0_SIBGR0_BCLK_T6 BM_08_09 |
391 | #define TX4927_SIO0_SIBGR0_BRD BM_00_07 | 391 | #define TX4927_SIO0_SIBGR0_BRD BM_00_07 |
392 | #define TX4927_SIO0_SITFIF00 0xf31c | 392 | #define TX4927_SIO0_SITFIF00 0xf31c |
393 | #define TX4927_SIO0_SITFIF00_RESERVED_08_31 BM_08_31 | 393 | #define TX4927_SIO0_SITFIF00_RESERVED_08_31 BM_08_31 |
394 | #define TX4927_SIO0_SITFIF00_TXD BM_00_07 | 394 | #define TX4927_SIO0_SITFIF00_TXD BM_00_07 |
395 | #define TX4927_SIO0_SIRFIFO0 0xf320 | 395 | #define TX4927_SIO0_SIRFIFO0 0xf320 |
396 | #define TX4927_SIO0_SIRFIFO0_RESERVED_08_31 BM_08_31 | 396 | #define TX4927_SIO0_SIRFIFO0_RESERVED_08_31 BM_08_31 |
397 | #define TX4927_SIO0_SIRFIFO0_RXD BM_00_07 | 397 | #define TX4927_SIO0_SIRFIFO0_RXD BM_00_07 |
398 | #define TX4927_SIO0_SIRFIFO0 0xf320 | 398 | #define TX4927_SIO0_SIRFIFO0 0xf320 |
399 | #define TX4927_SIO0_LIMIT 0xf3ff | 399 | #define TX4927_SIO0_LIMIT 0xf3ff |
400 | 400 | ||
401 | 401 | ||
402 | /* TX4927 serial port 1 (32-bit registers) */ | 402 | /* TX4927 serial port 1 (32-bit registers) */ |
403 | #define TX4927_SIO1_BASE 0xf400 | 403 | #define TX4927_SIO1_BASE 0xf400 |
404 | #define TX4927_SIO1_SILCR1 0xf400 | 404 | #define TX4927_SIO1_SILCR1 0xf400 |
405 | #define TX4927_SIO1_SIDICR1 0xf404 | 405 | #define TX4927_SIO1_SIDICR1 0xf404 |
406 | #define TX4927_SIO1_SIDISR1 0xf408 | 406 | #define TX4927_SIO1_SIDISR1 0xf408 |
407 | #define TX4927_SIO1_SISCISR1 0xf40c | 407 | #define TX4927_SIO1_SISCISR1 0xf40c |
408 | #define TX4927_SIO1_SIFCR1 0xf410 | 408 | #define TX4927_SIO1_SIFCR1 0xf410 |
409 | #define TX4927_SIO1_SIFLCR1 0xf414 | 409 | #define TX4927_SIO1_SIFLCR1 0xf414 |
410 | #define TX4927_SIO1_SIBGR1 0xf418 | 410 | #define TX4927_SIO1_SIBGR1 0xf418 |
411 | #define TX4927_SIO1_SITFIF01 0xf41c | 411 | #define TX4927_SIO1_SITFIF01 0xf41c |
412 | #define TX4927_SIO1_SIRFIFO1 0xf420 | 412 | #define TX4927_SIO1_SIRFIFO1 0xf420 |
413 | #define TX4927_SIO1_LIMIT 0xf4ff | 413 | #define TX4927_SIO1_LIMIT 0xf4ff |
414 | 414 | ||
415 | 415 | ||
416 | /* TX4927 parallel port (32-bit registers) */ | 416 | /* TX4927 parallel port (32-bit registers) */ |
diff --git a/include/asm-mips/tx4927/tx4927_pci.h b/include/asm-mips/tx4927/tx4927_pci.h index 170433492246..165f6b8b217f 100644 --- a/include/asm-mips/tx4927/tx4927_pci.h +++ b/include/asm-mips/tx4927/tx4927_pci.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2000-2001 Toshiba Corporation | 6 | * Copyright (C) 2000-2001 Toshiba Corporation |
7 | */ | 7 | */ |
8 | #ifndef __ASM_TX4927_TX4927_PCI_H | 8 | #ifndef __ASM_TX4927_TX4927_PCI_H |
9 | #define __ASM_TX4927_TX4927_PCI_H | 9 | #define __ASM_TX4927_TX4927_PCI_H |
10 | 10 | ||
11 | #define TX4927_CCFG_TOE 0x00004000 | 11 | #define TX4927_CCFG_TOE 0x00004000 |
12 | 12 | ||
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h index d2f0c76b00a9..421b3aea14cc 100644 --- a/include/asm-mips/types.h +++ b/include/asm-mips/types.h | |||
@@ -78,7 +78,7 @@ typedef unsigned long long u64; | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ | 80 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ |
81 | || defined(CONFIG_MIPS64) | 81 | || defined(CONFIG_64BIT) |
82 | typedef u64 dma_addr_t; | 82 | typedef u64 dma_addr_t; |
83 | #else | 83 | #else |
84 | typedef u32 dma_addr_t; | 84 | typedef u32 dma_addr_t; |
@@ -99,8 +99,6 @@ typedef u64 sector_t; | |||
99 | #define HAVE_SECTOR_T | 99 | #define HAVE_SECTOR_T |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | typedef unsigned short kmem_bufctl_t; | ||
103 | |||
104 | #endif /* __ASSEMBLY__ */ | 102 | #endif /* __ASSEMBLY__ */ |
105 | 103 | ||
106 | #endif /* __KERNEL__ */ | 104 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 07114898e065..a543ead72ecf 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * For historical reasons, these macros are grossly misnamed. | 23 | * For historical reasons, these macros are grossly misnamed. |
24 | */ | 24 | */ |
25 | #ifdef CONFIG_MIPS32 | 25 | #ifdef CONFIG_32BIT |
26 | 26 | ||
27 | #define __UA_LIMIT 0x80000000UL | 27 | #define __UA_LIMIT 0x80000000UL |
28 | 28 | ||
@@ -32,9 +32,9 @@ | |||
32 | #define __UA_t0 "$8" | 32 | #define __UA_t0 "$8" |
33 | #define __UA_t1 "$9" | 33 | #define __UA_t1 "$9" |
34 | 34 | ||
35 | #endif /* CONFIG_MIPS32 */ | 35 | #endif /* CONFIG_32BIT */ |
36 | 36 | ||
37 | #ifdef CONFIG_MIPS64 | 37 | #ifdef CONFIG_64BIT |
38 | 38 | ||
39 | #define __UA_LIMIT (- TASK_SIZE) | 39 | #define __UA_LIMIT (- TASK_SIZE) |
40 | 40 | ||
@@ -44,7 +44,7 @@ | |||
44 | #define __UA_t0 "$12" | 44 | #define __UA_t0 "$12" |
45 | #define __UA_t1 "$13" | 45 | #define __UA_t1 "$13" |
46 | 46 | ||
47 | #endif /* CONFIG_MIPS64 */ | 47 | #endif /* CONFIG_64BIT */ |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * USER_DS is a bitmask that has the bits set that may not be set in a valid | 50 | * USER_DS is a bitmask that has the bits set that may not be set in a valid |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 6d21cc964f76..ad4d48056307 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -1124,7 +1124,7 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ | |||
1124 | # ifndef __mips64 | 1124 | # ifndef __mips64 |
1125 | # define __ARCH_WANT_STAT64 | 1125 | # define __ARCH_WANT_STAT64 |
1126 | # endif | 1126 | # endif |
1127 | # ifdef CONFIG_MIPS32 | 1127 | # ifdef CONFIG_32BIT |
1128 | # define __ARCH_WANT_SYS_TIME | 1128 | # define __ARCH_WANT_SYS_TIME |
1129 | # endif | 1129 | # endif |
1130 | # ifdef CONFIG_MIPS32_O32 | 1130 | # ifdef CONFIG_MIPS32_O32 |
diff --git a/include/asm-mips/vr4181/irq.h b/include/asm-mips/vr4181/irq.h deleted file mode 100644 index 4bf0ea970ed0..000000000000 --- a/include/asm-mips/vr4181/irq.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | * Macros for vr4181 IRQ numbers. | ||
3 | * | ||
4 | * Copyright (C) 2001 MontaVista Software Inc. | ||
5 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | /* | ||
15 | * Strategy: | ||
16 | * | ||
17 | * Vr4181 has conceptually three levels of interrupt controllers: | ||
18 | * 1. the CPU itself with 8 intr level. | ||
19 | * 2. system interrupt controller, cascaded from int0 pin in CPU, 32 intrs | ||
20 | * 3. GPIO interrupts : forwarding external interrupts to sys intr controller | ||
21 | */ | ||
22 | |||
23 | /* decide the irq block assignment */ | ||
24 | #define VR4181_NUM_CPU_IRQ 8 | ||
25 | #define VR4181_NUM_SYS_IRQ 32 | ||
26 | #define VR4181_NUM_GPIO_IRQ 16 | ||
27 | |||
28 | #define VR4181_IRQ_BASE 0 | ||
29 | |||
30 | #define VR4181_CPU_IRQ_BASE VR4181_IRQ_BASE | ||
31 | #define VR4181_SYS_IRQ_BASE (VR4181_CPU_IRQ_BASE + VR4181_NUM_CPU_IRQ) | ||
32 | #define VR4181_GPIO_IRQ_BASE (VR4181_SYS_IRQ_BASE + VR4181_NUM_SYS_IRQ) | ||
33 | |||
34 | /* CPU interrupts */ | ||
35 | |||
36 | /* | ||
37 | IP0 - Software interrupt | ||
38 | IP1 - Software interrupt | ||
39 | IP2 - All but battery, high speed modem, and real time clock | ||
40 | IP3 - RTC Long1 (system timer) | ||
41 | IP4 - RTC Long2 | ||
42 | IP5 - High Speed Modem (unused on VR4181) | ||
43 | IP6 - Unused | ||
44 | IP7 - Timer interrupt from CPO_COMPARE | ||
45 | */ | ||
46 | |||
47 | #define VR4181_IRQ_SW1 (VR4181_CPU_IRQ_BASE + 0) | ||
48 | #define VR4181_IRQ_SW2 (VR4181_CPU_IRQ_BASE + 1) | ||
49 | #define VR4181_IRQ_INT0 (VR4181_CPU_IRQ_BASE + 2) | ||
50 | #define VR4181_IRQ_INT1 (VR4181_CPU_IRQ_BASE + 3) | ||
51 | #define VR4181_IRQ_INT2 (VR4181_CPU_IRQ_BASE + 4) | ||
52 | #define VR4181_IRQ_INT3 (VR4181_CPU_IRQ_BASE + 5) | ||
53 | #define VR4181_IRQ_INT4 (VR4181_CPU_IRQ_BASE + 6) | ||
54 | #define VR4181_IRQ_TIMER (VR4181_CPU_IRQ_BASE + 7) | ||
55 | |||
56 | |||
57 | /* Cascaded from VR4181_IRQ_INT0 (ICU mapped interrupts) */ | ||
58 | |||
59 | /* | ||
60 | IP2 - same as VR4181_IRQ_INT1 | ||
61 | IP8 - This is a cascade to GPIO IRQ's. Do not use. | ||
62 | IP16 - same as VR4181_IRQ_INT2 | ||
63 | IP18 - CompactFlash | ||
64 | */ | ||
65 | |||
66 | #define VR4181_IRQ_BATTERY (VR4181_SYS_IRQ_BASE + 0) | ||
67 | #define VR4181_IRQ_POWER (VR4181_SYS_IRQ_BASE + 1) | ||
68 | #define VR4181_IRQ_RTCL1 (VR4181_SYS_IRQ_BASE + 2) | ||
69 | #define VR4181_IRQ_ETIMER (VR4181_SYS_IRQ_BASE + 3) | ||
70 | #define VR4181_IRQ_RFU12 (VR4181_SYS_IRQ_BASE + 4) | ||
71 | #define VR4181_IRQ_PIU (VR4181_SYS_IRQ_BASE + 5) | ||
72 | #define VR4181_IRQ_AIU (VR4181_SYS_IRQ_BASE + 6) | ||
73 | #define VR4181_IRQ_KIU (VR4181_SYS_IRQ_BASE + 7) | ||
74 | #define VR4181_IRQ_GIU (VR4181_SYS_IRQ_BASE + 8) | ||
75 | #define VR4181_IRQ_SIU (VR4181_SYS_IRQ_BASE + 9) | ||
76 | #define VR4181_IRQ_RFU18 (VR4181_SYS_IRQ_BASE + 10) | ||
77 | #define VR4181_IRQ_SOFT (VR4181_SYS_IRQ_BASE + 11) | ||
78 | #define VR4181_IRQ_RFU20 (VR4181_SYS_IRQ_BASE + 12) | ||
79 | #define VR4181_IRQ_DOZEPIU (VR4181_SYS_IRQ_BASE + 13) | ||
80 | #define VR4181_IRQ_RFU22 (VR4181_SYS_IRQ_BASE + 14) | ||
81 | #define VR4181_IRQ_RFU23 (VR4181_SYS_IRQ_BASE + 15) | ||
82 | #define VR4181_IRQ_RTCL2 (VR4181_SYS_IRQ_BASE + 16) | ||
83 | #define VR4181_IRQ_LED (VR4181_SYS_IRQ_BASE + 17) | ||
84 | #define VR4181_IRQ_ECU (VR4181_SYS_IRQ_BASE + 18) | ||
85 | #define VR4181_IRQ_CSU (VR4181_SYS_IRQ_BASE + 19) | ||
86 | #define VR4181_IRQ_USB (VR4181_SYS_IRQ_BASE + 20) | ||
87 | #define VR4181_IRQ_DMA (VR4181_SYS_IRQ_BASE + 21) | ||
88 | #define VR4181_IRQ_LCD (VR4181_SYS_IRQ_BASE + 22) | ||
89 | #define VR4181_IRQ_RFU31 (VR4181_SYS_IRQ_BASE + 23) | ||
90 | #define VR4181_IRQ_RFU32 (VR4181_SYS_IRQ_BASE + 24) | ||
91 | #define VR4181_IRQ_RFU33 (VR4181_SYS_IRQ_BASE + 25) | ||
92 | #define VR4181_IRQ_RFU34 (VR4181_SYS_IRQ_BASE + 26) | ||
93 | #define VR4181_IRQ_RFU35 (VR4181_SYS_IRQ_BASE + 27) | ||
94 | #define VR4181_IRQ_RFU36 (VR4181_SYS_IRQ_BASE + 28) | ||
95 | #define VR4181_IRQ_RFU37 (VR4181_SYS_IRQ_BASE + 29) | ||
96 | #define VR4181_IRQ_RFU38 (VR4181_SYS_IRQ_BASE + 30) | ||
97 | #define VR4181_IRQ_RFU39 (VR4181_SYS_IRQ_BASE + 31) | ||
98 | |||
99 | /* Cascaded from VR4181_IRQ_GIU */ | ||
100 | #define VR4181_IRQ_GPIO0 (VR4181_GPIO_IRQ_BASE + 0) | ||
101 | #define VR4181_IRQ_GPIO1 (VR4181_GPIO_IRQ_BASE + 1) | ||
102 | #define VR4181_IRQ_GPIO2 (VR4181_GPIO_IRQ_BASE + 2) | ||
103 | #define VR4181_IRQ_GPIO3 (VR4181_GPIO_IRQ_BASE + 3) | ||
104 | #define VR4181_IRQ_GPIO4 (VR4181_GPIO_IRQ_BASE + 4) | ||
105 | #define VR4181_IRQ_GPIO5 (VR4181_GPIO_IRQ_BASE + 5) | ||
106 | #define VR4181_IRQ_GPIO6 (VR4181_GPIO_IRQ_BASE + 6) | ||
107 | #define VR4181_IRQ_GPIO7 (VR4181_GPIO_IRQ_BASE + 7) | ||
108 | #define VR4181_IRQ_GPIO8 (VR4181_GPIO_IRQ_BASE + 8) | ||
109 | #define VR4181_IRQ_GPIO9 (VR4181_GPIO_IRQ_BASE + 9) | ||
110 | #define VR4181_IRQ_GPIO10 (VR4181_GPIO_IRQ_BASE + 10) | ||
111 | #define VR4181_IRQ_GPIO11 (VR4181_GPIO_IRQ_BASE + 11) | ||
112 | #define VR4181_IRQ_GPIO12 (VR4181_GPIO_IRQ_BASE + 12) | ||
113 | #define VR4181_IRQ_GPIO13 (VR4181_GPIO_IRQ_BASE + 13) | ||
114 | #define VR4181_IRQ_GPIO14 (VR4181_GPIO_IRQ_BASE + 14) | ||
115 | #define VR4181_IRQ_GPIO15 (VR4181_GPIO_IRQ_BASE + 15) | ||
116 | |||
117 | |||
118 | // Alternative to above GPIO IRQ defines | ||
119 | #define VR4181_IRQ_GPIO(pin) ((VR4181_IRQ_GPIO0) + (pin)) | ||
120 | |||
121 | #define VR4181_IRQ_MAX (VR4181_IRQ_BASE + VR4181_NUM_CPU_IRQ + \ | ||
122 | VR4181_NUM_SYS_IRQ + VR4181_NUM_GPIO_IRQ) | ||
diff --git a/include/asm-mips/vr4181/vr4181.h b/include/asm-mips/vr4181/vr4181.h deleted file mode 100644 index 5c5d60741515..000000000000 --- a/include/asm-mips/vr4181/vr4181.h +++ /dev/null | |||
@@ -1,413 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1999 by Michael Klar | ||
7 | * | ||
8 | * Copyright 2001 MontaVista Software Inc. | ||
9 | * Author: jsun@mvista.com or jsun@junsun.net | ||
10 | * | ||
11 | */ | ||
12 | #ifndef __ASM_VR4181_VR4181_H | ||
13 | #define __ASM_VR4181_VR4181_H | ||
14 | |||
15 | #include <asm/addrspace.h> | ||
16 | |||
17 | #include <asm/vr4181/irq.h> | ||
18 | |||
19 | #ifndef __ASSEMBLY__ | ||
20 | #define __preg8 (volatile unsigned char*) | ||
21 | #define __preg16 (volatile unsigned short*) | ||
22 | #define __preg32 (volatile unsigned int*) | ||
23 | #else | ||
24 | #define __preg8 | ||
25 | #define __preg16 | ||
26 | #define __preg32 | ||
27 | #endif | ||
28 | |||
29 | // Embedded CPU peripheral registers | ||
30 | // Note that many of the registers have different physical address for VR4181 | ||
31 | |||
32 | // Bus Control Unit (BCU) | ||
33 | #define VR4181_BCUCNTREG1 __preg16(KSEG1 + 0x0A000000) /* BCU control register 1 (R/W) */ | ||
34 | #define VR4181_CMUCLKMSK __preg16(KSEG1 + 0x0A000004) /* Clock mask register (R/W) */ | ||
35 | #define VR4181_CMUCLKMSK_MSKCSUPCLK 0x0040 | ||
36 | #define VR4181_CMUCLKMSK_MSKAIUPCLK 0x0020 | ||
37 | #define VR4181_CMUCLKMSK_MSKPIUPCLK 0x0010 | ||
38 | #define VR4181_CMUCLKMSK_MSKADUPCLK 0x0008 | ||
39 | #define VR4181_CMUCLKMSK_MSKSIU18M 0x0004 | ||
40 | #define VR4181_CMUCLKMSK_MSKADU18M 0x0002 | ||
41 | #define VR4181_CMUCLKMSK_MSKUSB 0x0001 | ||
42 | #define VR4181_CMUCLKMSK_MSKSIU VR4181_CMUCLKMSK_MSKSIU18M | ||
43 | #define VR4181_BCUSPEEDREG __preg16(KSEG1 + 0x0A00000C) /* BCU access time parameter (R/W) */ | ||
44 | #define VR4181_BCURFCNTREG __preg16(KSEG1 + 0x0A000010) /* BCU refresh control register (R/W) */ | ||
45 | #define VR4181_REVIDREG __preg16(KSEG1 + 0x0A000014) /* Revision ID register (R) */ | ||
46 | #define VR4181_CLKSPEEDREG __preg16(KSEG1 + 0x0A000018) /* Clock speed register (R) */ | ||
47 | #define VR4181_EDOMCYTREG __preg16(KSEG1 + 0x0A000300) /* Memory cycle timing register (R/W) */ | ||
48 | #define VR4181_MEMCFG_REG __preg16(KSEG1 + 0x0A000304) /* Memory configuration register (R/W) */ | ||
49 | #define VR4181_MODE_REG __preg16(KSEG1 + 0x0A000308) /* SDRAM mode register (R/W) */ | ||
50 | #define VR4181_SDTIMINGREG __preg16(KSEG1 + 0x0A00030C) /* SDRAM timing register (R/W) */ | ||
51 | |||
52 | // DMA Control Unit (DCU) | ||
53 | #define VR4181_MICDEST1REG1 __preg16(KSEG1 + 0x0A000020) /* Microphone destination 1 address register 1 (R/W) */ | ||
54 | #define VR4181_MICDEST1REG2 __preg16(KSEG1 + 0x0A000022) /* Microphone destination 1 address register 2 (R/W) */ | ||
55 | #define VR4181_MICDEST2REG1 __preg16(KSEG1 + 0x0A000024) /* Microphone destination 2 address register 1 (R/W) */ | ||
56 | #define VR4181_MICDEST2REG2 __preg16(KSEG1 + 0x0A000026) /* Microphone destination 2 address register 2 (R/W) */ | ||
57 | #define VR4181_SPKRRC1REG1 __preg16(KSEG1 + 0x0A000028) /* Speaker Source 1 address register 1 (R/W) */ | ||
58 | #define VR4181_SPKRRC1REG2 __preg16(KSEG1 + 0x0A00002A) /* Speaker Source 1 address register 2 (R/W) */ | ||
59 | #define VR4181_SPKRRC2REG1 __preg16(KSEG1 + 0x0A00002C) /* Speaker Source 2 address register 1 (R/W) */ | ||
60 | #define VR4181_SPKRRC2REG2 __preg16(KSEG1 + 0x0A00002E) /* Speaker Source 2 address register 2 (R/W) */ | ||
61 | #define VR4181_DMARSTREG __preg16(KSEG1 + 0x0A000040) /* DMA Reset register (R/W) */ | ||
62 | #define VR4181_AIUDMAMSKREG __preg16(KSEG1 + 0x0A000046) /* Audio DMA mask register (R/W) */ | ||
63 | #define VR4181_USBDMAMSKREG __preg16(KSEG1 + 0x0A000600) /* USB DMA Mask register (R/W) */ | ||
64 | #define VR4181_USBRXS1AREG1 __preg16(KSEG1 + 0x0A000602) /* USB Rx source 1 address register 1 (R/W) */ | ||
65 | #define VR4181_USBRXS1AREG2 __preg16(KSEG1 + 0x0A000604) /* USB Rx source 1 address register 2 (R/W) */ | ||
66 | #define VR4181_USBRXS2AREG1 __preg16(KSEG1 + 0x0A000606) /* USB Rx source 2 address register 1 (R/W) */ | ||
67 | #define VR4181_USBRXS2AREG2 __preg16(KSEG1 + 0x0A000608) /* USB Rx source 2 address register 2 (R/W) */ | ||
68 | #define VR4181_USBTXS1AREG1 __preg16(KSEG1 + 0x0A00060A) /* USB Tx source 1 address register 1 (R/W) */ | ||
69 | #define VR4181_USBTXS1AREG2 __preg16(KSEG1 + 0x0A00060C) /* USB Tx source 1 address register 2 (R/W) */ | ||
70 | #define VR4181_USBTXS2AREG1 __preg16(KSEG1 + 0x0A00060E) /* USB Tx source 2 address register 1 (R/W) */ | ||
71 | #define VR4181_USBTXS2AREG2 __preg16(KSEG1 + 0x0A000610) /* USB Tx source 2 address register 2 (R/W) */ | ||
72 | #define VR4181_USBRXD1AREG1 __preg16(KSEG1 + 0x0A00062A) /* USB Rx destination 1 address register 1 (R/W) */ | ||
73 | #define VR4181_USBRXD1AREG2 __preg16(KSEG1 + 0x0A00062C) /* USB Rx destination 1 address register 2 (R/W) */ | ||
74 | #define VR4181_USBRXD2AREG1 __preg16(KSEG1 + 0x0A00062E) /* USB Rx destination 2 address register 1 (R/W) */ | ||
75 | #define VR4181_USBRXD2AREG2 __preg16(KSEG1 + 0x0A000630) /* USB Rx destination 2 address register 2 (R/W) */ | ||
76 | #define VR4181_USBTXD1AREG1 __preg16(KSEG1 + 0x0A000632) /* USB Tx destination 1 address register 1 (R/W) */ | ||
77 | #define VR4181_USBTXD1AREG2 __preg16(KSEG1 + 0x0A000634) /* USB Tx destination 1 address register 2 (R/W) */ | ||
78 | #define VR4181_USBTXD2AREG1 __preg16(KSEG1 + 0x0A000636) /* USB Tx destination 2 address register 1 (R/W) */ | ||
79 | #define VR4181_USBTXD2AREG2 __preg16(KSEG1 + 0x0A000638) /* USB Tx destination 2 address register 2 (R/W) */ | ||
80 | #define VR4181_RxRCLENREG __preg16(KSEG1 + 0x0A000652) /* USB Rx record length register (R/W) */ | ||
81 | #define VR4181_TxRCLENREG __preg16(KSEG1 + 0x0A000654) /* USB Tx record length register (R/W) */ | ||
82 | #define VR4181_MICRCLENREG __preg16(KSEG1 + 0x0A000658) /* Microphone record length register (R/W) */ | ||
83 | #define VR4181_SPKRCLENREG __preg16(KSEG1 + 0x0A00065A) /* Speaker record length register (R/W) */ | ||
84 | #define VR4181_USBCFGREG __preg16(KSEG1 + 0x0A00065C) /* USB configuration register (R/W) */ | ||
85 | #define VR4181_MICDMACFGREG __preg16(KSEG1 + 0x0A00065E) /* Microphone DMA configuration register (R/W) */ | ||
86 | #define VR4181_SPKDMACFGREG __preg16(KSEG1 + 0x0A000660) /* Speaker DMA configuration register (R/W) */ | ||
87 | #define VR4181_DMAITRQREG __preg16(KSEG1 + 0x0A000662) /* DMA interrupt request register (R/W) */ | ||
88 | #define VR4181_DMACLTREG __preg16(KSEG1 + 0x0A000664) /* DMA control register (R/W) */ | ||
89 | #define VR4181_DMAITMKREG __preg16(KSEG1 + 0x0A000666) /* DMA interrupt mask register (R/W) */ | ||
90 | |||
91 | // ISA Bridge | ||
92 | #define VR4181_ISABRGCTL __preg16(KSEG1 + 0x0B0002C0) /* ISA Bridge Control Register (R/W) */ | ||
93 | #define VR4181_ISABRGSTS __preg16(KSEG1 + 0x0B0002C2) /* ISA Bridge Status Register (R/W) */ | ||
94 | #define VR4181_XISACTL __preg16(KSEG1 + 0x0B0002C4) /* External ISA Control Register (R/W) */ | ||
95 | |||
96 | // Clocked Serial Interface (CSI) | ||
97 | #define VR4181_CSIMODE __preg16(KSEG1 + 0x0B000900) /* CSI Mode Register (R/W) */ | ||
98 | #define VR4181_CSIRXDATA __preg16(KSEG1 + 0x0B000902) /* CSI Receive Data Register (R) */ | ||
99 | #define VR4181_CSITXDATA __preg16(KSEG1 + 0x0B000904) /* CSI Transmit Data Register (R/W) */ | ||
100 | #define VR4181_CSILSTAT __preg16(KSEG1 + 0x0B000906) /* CSI Line Status Register (R/W) */ | ||
101 | #define VR4181_CSIINTMSK __preg16(KSEG1 + 0x0B000908) /* CSI Interrupt Mask Register (R/W) */ | ||
102 | #define VR4181_CSIINTSTAT __preg16(KSEG1 + 0x0B00090a) /* CSI Interrupt Status Register (R/W) */ | ||
103 | #define VR4181_CSITXBLEN __preg16(KSEG1 + 0x0B00090c) /* CSI Transmit Burst Length Register (R/W) */ | ||
104 | #define VR4181_CSIRXBLEN __preg16(KSEG1 + 0x0B00090e) /* CSI Receive Burst Length Register (R/W) */ | ||
105 | |||
106 | // Interrupt Control Unit (ICU) | ||
107 | #define VR4181_SYSINT1REG __preg16(KSEG1 + 0x0A000080) /* Level 1 System interrupt register 1 (R) */ | ||
108 | #define VR4181_MSYSINT1REG __preg16(KSEG1 + 0x0A00008C) /* Level 1 mask system interrupt register 1 (R/W) */ | ||
109 | #define VR4181_NMIREG __preg16(KSEG1 + 0x0A000098) /* NMI register (R/W) */ | ||
110 | #define VR4181_SOFTINTREG __preg16(KSEG1 + 0x0A00009A) /* Software interrupt register (R/W) */ | ||
111 | #define VR4181_SYSINT2REG __preg16(KSEG1 + 0x0A000200) /* Level 1 System interrupt register 2 (R) */ | ||
112 | #define VR4181_MSYSINT2REG __preg16(KSEG1 + 0x0A000206) /* Level 1 mask system interrupt register 2 (R/W) */ | ||
113 | #define VR4181_PIUINTREGro __preg16(KSEG1 + 0x0B000082) /* Level 2 PIU interrupt register (R) */ | ||
114 | #define VR4181_AIUINTREG __preg16(KSEG1 + 0x0B000084) /* Level 2 AIU interrupt register (R) */ | ||
115 | #define VR4181_MPIUINTREG __preg16(KSEG1 + 0x0B00008E) /* Level 2 mask PIU interrupt register (R/W) */ | ||
116 | #define VR4181_MAIUINTREG __preg16(KSEG1 + 0x0B000090) /* Level 2 mask AIU interrupt register (R/W) */ | ||
117 | #define VR4181_MKIUINTREG __preg16(KSEG1 + 0x0B000092) /* Level 2 mask KIU interrupt register (R/W) */ | ||
118 | #define VR4181_KIUINTREG __preg16(KSEG1 + 0x0B000198) /* Level 2 KIU interrupt register (R) */ | ||
119 | |||
120 | // Power Management Unit (PMU) | ||
121 | #define VR4181_PMUINTREG __preg16(KSEG1 + 0x0B0000A0) /* PMU Status Register (R/W) */ | ||
122 | #define VR4181_PMUINT_POWERSW 0x1 /* Power switch */ | ||
123 | #define VR4181_PMUINT_BATT 0x2 /* Low batt during normal operation */ | ||
124 | #define VR4181_PMUINT_DEADMAN 0x4 /* Deadman's switch */ | ||
125 | #define VR4181_PMUINT_RESET 0x8 /* Reset switch */ | ||
126 | #define VR4181_PMUINT_RTCRESET 0x10 /* RTC Reset */ | ||
127 | #define VR4181_PMUINT_TIMEOUT 0x20 /* HAL Timer Reset */ | ||
128 | #define VR4181_PMUINT_BATTLOW 0x100 /* Battery low */ | ||
129 | #define VR4181_PMUINT_RTC 0x200 /* RTC Alarm */ | ||
130 | #define VR4181_PMUINT_DCD 0x400 /* DCD# */ | ||
131 | #define VR4181_PMUINT_GPIO0 0x1000 /* GPIO0 */ | ||
132 | #define VR4181_PMUINT_GPIO1 0x2000 /* GPIO1 */ | ||
133 | #define VR4181_PMUINT_GPIO2 0x4000 /* GPIO2 */ | ||
134 | #define VR4181_PMUINT_GPIO3 0x8000 /* GPIO3 */ | ||
135 | |||
136 | #define VR4181_PMUCNTREG __preg16(KSEG1 + 0x0B0000A2) /* PMU Control Register (R/W) */ | ||
137 | #define VR4181_PMUWAITREG __preg16(KSEG1 + 0x0B0000A8) /* PMU Wait Counter Register (R/W) */ | ||
138 | #define VR4181_PMUDIVREG __preg16(KSEG1 + 0x0B0000AC) /* PMU Divide Mode Register (R/W) */ | ||
139 | #define VR4181_DRAMHIBCTL __preg16(KSEG1 + 0x0B0000B2) /* DRAM Hibernate Control Register (R/W) */ | ||
140 | |||
141 | // Real Time Clock Unit (RTC) | ||
142 | #define VR4181_ETIMELREG __preg16(KSEG1 + 0x0B0000C0) /* Elapsed Time L Register (R/W) */ | ||
143 | #define VR4181_ETIMEMREG __preg16(KSEG1 + 0x0B0000C2) /* Elapsed Time M Register (R/W) */ | ||
144 | #define VR4181_ETIMEHREG __preg16(KSEG1 + 0x0B0000C4) /* Elapsed Time H Register (R/W) */ | ||
145 | #define VR4181_ECMPLREG __preg16(KSEG1 + 0x0B0000C8) /* Elapsed Compare L Register (R/W) */ | ||
146 | #define VR4181_ECMPMREG __preg16(KSEG1 + 0x0B0000CA) /* Elapsed Compare M Register (R/W) */ | ||
147 | #define VR4181_ECMPHREG __preg16(KSEG1 + 0x0B0000CC) /* Elapsed Compare H Register (R/W) */ | ||
148 | #define VR4181_RTCL1LREG __preg16(KSEG1 + 0x0B0000D0) /* RTC Long 1 L Register (R/W) */ | ||
149 | #define VR4181_RTCL1HREG __preg16(KSEG1 + 0x0B0000D2) /* RTC Long 1 H Register (R/W) */ | ||
150 | #define VR4181_RTCL1CNTLREG __preg16(KSEG1 + 0x0B0000D4) /* RTC Long 1 Count L Register (R) */ | ||
151 | #define VR4181_RTCL1CNTHREG __preg16(KSEG1 + 0x0B0000D6) /* RTC Long 1 Count H Register (R) */ | ||
152 | #define VR4181_RTCL2LREG __preg16(KSEG1 + 0x0B0000D8) /* RTC Long 2 L Register (R/W) */ | ||
153 | #define VR4181_RTCL2HREG __preg16(KSEG1 + 0x0B0000DA) /* RTC Long 2 H Register (R/W) */ | ||
154 | #define VR4181_RTCL2CNTLREG __preg16(KSEG1 + 0x0B0000DC) /* RTC Long 2 Count L Register (R) */ | ||
155 | #define VR4181_RTCL2CNTHREG __preg16(KSEG1 + 0x0B0000DE) /* RTC Long 2 Count H Register (R) */ | ||
156 | #define VR4181_RTCINTREG __preg16(KSEG1 + 0x0B0001DE) /* RTC Interrupt Register (R/W) */ | ||
157 | |||
158 | // Deadman's Switch Unit (DSU) | ||
159 | #define VR4181_DSUCNTREG __preg16(KSEG1 + 0x0B0000E0) /* DSU Control Register (R/W) */ | ||
160 | #define VR4181_DSUSETREG __preg16(KSEG1 + 0x0B0000E2) /* DSU Dead Time Set Register (R/W) */ | ||
161 | #define VR4181_DSUCLRREG __preg16(KSEG1 + 0x0B0000E4) /* DSU Clear Register (W) */ | ||
162 | #define VR4181_DSUTIMREG __preg16(KSEG1 + 0x0B0000E6) /* DSU Elapsed Time Register (R/W) */ | ||
163 | |||
164 | // General Purpose I/O Unit (GIU) | ||
165 | #define VR4181_GPMD0REG __preg16(KSEG1 + 0x0B000300) /* GPIO Mode 0 Register (R/W) */ | ||
166 | #define VR4181_GPMD1REG __preg16(KSEG1 + 0x0B000302) /* GPIO Mode 1 Register (R/W) */ | ||
167 | #define VR4181_GPMD2REG __preg16(KSEG1 + 0x0B000304) /* GPIO Mode 2 Register (R/W) */ | ||
168 | #define VR4181_GPMD3REG __preg16(KSEG1 + 0x0B000306) /* GPIO Mode 3 Register (R/W) */ | ||
169 | #define VR4181_GPDATHREG __preg16(KSEG1 + 0x0B000308) /* GPIO Data High Register (R/W) */ | ||
170 | #define VR4181_GPDATHREG_GPIO16 0x0001 | ||
171 | #define VR4181_GPDATHREG_GPIO17 0x0002 | ||
172 | #define VR4181_GPDATHREG_GPIO18 0x0004 | ||
173 | #define VR4181_GPDATHREG_GPIO19 0x0008 | ||
174 | #define VR4181_GPDATHREG_GPIO20 0x0010 | ||
175 | #define VR4181_GPDATHREG_GPIO21 0x0020 | ||
176 | #define VR4181_GPDATHREG_GPIO22 0x0040 | ||
177 | #define VR4181_GPDATHREG_GPIO23 0x0080 | ||
178 | #define VR4181_GPDATHREG_GPIO24 0x0100 | ||
179 | #define VR4181_GPDATHREG_GPIO25 0x0200 | ||
180 | #define VR4181_GPDATHREG_GPIO26 0x0400 | ||
181 | #define VR4181_GPDATHREG_GPIO27 0x0800 | ||
182 | #define VR4181_GPDATHREG_GPIO28 0x1000 | ||
183 | #define VR4181_GPDATHREG_GPIO29 0x2000 | ||
184 | #define VR4181_GPDATHREG_GPIO30 0x4000 | ||
185 | #define VR4181_GPDATHREG_GPIO31 0x8000 | ||
186 | #define VR4181_GPDATLREG __preg16(KSEG1 + 0x0B00030A) /* GPIO Data Low Register (R/W) */ | ||
187 | #define VR4181_GPDATLREG_GPIO0 0x0001 | ||
188 | #define VR4181_GPDATLREG_GPIO1 0x0002 | ||
189 | #define VR4181_GPDATLREG_GPIO2 0x0004 | ||
190 | #define VR4181_GPDATLREG_GPIO3 0x0008 | ||
191 | #define VR4181_GPDATLREG_GPIO4 0x0010 | ||
192 | #define VR4181_GPDATLREG_GPIO5 0x0020 | ||
193 | #define VR4181_GPDATLREG_GPIO6 0x0040 | ||
194 | #define VR4181_GPDATLREG_GPIO7 0x0080 | ||
195 | #define VR4181_GPDATLREG_GPIO8 0x0100 | ||
196 | #define VR4181_GPDATLREG_GPIO9 0x0200 | ||
197 | #define VR4181_GPDATLREG_GPIO10 0x0400 | ||
198 | #define VR4181_GPDATLREG_GPIO11 0x0800 | ||
199 | #define VR4181_GPDATLREG_GPIO12 0x1000 | ||
200 | #define VR4181_GPDATLREG_GPIO13 0x2000 | ||
201 | #define VR4181_GPDATLREG_GPIO14 0x4000 | ||
202 | #define VR4181_GPDATLREG_GPIO15 0x8000 | ||
203 | #define VR4181_GPINTEN __preg16(KSEG1 + 0x0B00030C) /* GPIO Interrupt Enable Register (R/W) */ | ||
204 | #define VR4181_GPINTMSK __preg16(KSEG1 + 0x0B00030E) /* GPIO Interrupt Mask Register (R/W) */ | ||
205 | #define VR4181_GPINTTYPH __preg16(KSEG1 + 0x0B000310) /* GPIO Interrupt Type High Register (R/W) */ | ||
206 | #define VR4181_GPINTTYPL __preg16(KSEG1 + 0x0B000312) /* GPIO Interrupt Type Low Register (R/W) */ | ||
207 | #define VR4181_GPINTSTAT __preg16(KSEG1 + 0x0B000314) /* GPIO Interrupt Status Register (R/W) */ | ||
208 | #define VR4181_GPHIBSTH __preg16(KSEG1 + 0x0B000316) /* GPIO Hibernate Pin State High Register (R/W) */ | ||
209 | #define VR4181_GPHIBSTL __preg16(KSEG1 + 0x0B000318) /* GPIO Hibernate Pin State Low Register (R/W) */ | ||
210 | #define VR4181_GPSICTL __preg16(KSEG1 + 0x0B00031A) /* GPIO Serial Interface Control Register (R/W) */ | ||
211 | #define VR4181_KEYEN __preg16(KSEG1 + 0x0B00031C) /* Keyboard Scan Pin Enable Register (R/W) */ | ||
212 | #define VR4181_PCS0STRA __preg16(KSEG1 + 0x0B000320) /* Programmable Chip Select [0] Start Address Register (R/W) */ | ||
213 | #define VR4181_PCS0STPA __preg16(KSEG1 + 0x0B000322) /* Programmable Chip Select [0] Stop Address Register (R/W) */ | ||
214 | #define VR4181_PCS0HIA __preg16(KSEG1 + 0x0B000324) /* Programmable Chip Select [0] High Address Register (R/W) */ | ||
215 | #define VR4181_PCS1STRA __preg16(KSEG1 + 0x0B000326) /* Programmable Chip Select [1] Start Address Register (R/W) */ | ||
216 | #define VR4181_PCS1STPA __preg16(KSEG1 + 0x0B000328) /* Programmable Chip Select [1] Stop Address Register (R/W) */ | ||
217 | #define VR4181_PCS1HIA __preg16(KSEG1 + 0x0B00032A) /* Programmable Chip Select [1] High Address Register (R/W) */ | ||
218 | #define VR4181_PCSMODE __preg16(KSEG1 + 0x0B00032C) /* Programmable Chip Select Mode Register (R/W) */ | ||
219 | #define VR4181_LCDGPMODE __preg16(KSEG1 + 0x0B00032E) /* LCD General Purpose Mode Register (R/W) */ | ||
220 | #define VR4181_MISCREG0 __preg16(KSEG1 + 0x0B000330) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
221 | #define VR4181_MISCREG1 __preg16(KSEG1 + 0x0B000332) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
222 | #define VR4181_MISCREG2 __preg16(KSEG1 + 0x0B000334) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
223 | #define VR4181_MISCREG3 __preg16(KSEG1 + 0x0B000336) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
224 | #define VR4181_MISCREG4 __preg16(KSEG1 + 0x0B000338) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
225 | #define VR4181_MISCREG5 __preg16(KSEG1 + 0x0B00033A) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
226 | #define VR4181_MISCREG6 __preg16(KSEG1 + 0x0B00033C) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
227 | #define VR4181_MISCREG7 __preg16(KSEG1 + 0x0B00033D) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
228 | #define VR4181_MISCREG8 __preg16(KSEG1 + 0x0B000340) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
229 | #define VR4181_MISCREG9 __preg16(KSEG1 + 0x0B000342) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
230 | #define VR4181_MISCREG10 __preg16(KSEG1 + 0x0B000344) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
231 | #define VR4181_MISCREG11 __preg16(KSEG1 + 0x0B000346) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
232 | #define VR4181_MISCREG12 __preg16(KSEG1 + 0x0B000348) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
233 | #define VR4181_MISCREG13 __preg16(KSEG1 + 0x0B00034A) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
234 | #define VR4181_MISCREG14 __preg16(KSEG1 + 0x0B00034C) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
235 | #define VR4181_MISCREG15 __preg16(KSEG1 + 0x0B00034E) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
236 | #define VR4181_SECIRQMASKL VR4181_GPINTEN | ||
237 | // No SECIRQMASKH for VR4181 | ||
238 | |||
239 | // Touch Panel Interface Unit (PIU) | ||
240 | #define VR4181_PIUCNTREG __preg16(KSEG1 + 0x0B000122) /* PIU Control register (R/W) */ | ||
241 | #define VR4181_PIUCNTREG_PIUSEQEN 0x0004 | ||
242 | #define VR4181_PIUCNTREG_PIUPWR 0x0002 | ||
243 | #define VR4181_PIUCNTREG_PADRST 0x0001 | ||
244 | |||
245 | #define VR4181_PIUINTREG __preg16(KSEG1 + 0x0B000124) /* PIU Interrupt cause register (R/W) */ | ||
246 | #define VR4181_PIUINTREG_OVP 0x8000 | ||
247 | #define VR4181_PIUINTREG_PADCMD 0x0040 | ||
248 | #define VR4181_PIUINTREG_PADADP 0x0020 | ||
249 | #define VR4181_PIUINTREG_PADPAGE1 0x0010 | ||
250 | #define VR4181_PIUINTREG_PADPAGE0 0x0008 | ||
251 | #define VR4181_PIUINTREG_PADDLOST 0x0004 | ||
252 | #define VR4181_PIUINTREG_PENCHG 0x0001 | ||
253 | |||
254 | #define VR4181_PIUSIVLREG __preg16(KSEG1 + 0x0B000126) /* PIU Data sampling interval register (R/W) */ | ||
255 | #define VR4181_PIUSTBLREG __preg16(KSEG1 + 0x0B000128) /* PIU A/D converter start delay register (R/W) */ | ||
256 | #define VR4181_PIUCMDREG __preg16(KSEG1 + 0x0B00012A) /* PIU A/D command register (R/W) */ | ||
257 | #define VR4181_PIUASCNREG __preg16(KSEG1 + 0x0B000130) /* PIU A/D port scan register (R/W) */ | ||
258 | #define VR4181_PIUAMSKREG __preg16(KSEG1 + 0x0B000132) /* PIU A/D scan mask register (R/W) */ | ||
259 | #define VR4181_PIUCIVLREG __preg16(KSEG1 + 0x0B00013E) /* PIU Check interval register (R) */ | ||
260 | #define VR4181_PIUPB00REG __preg16(KSEG1 + 0x0B0002A0) /* PIU Page 0 Buffer 0 register (R/W) */ | ||
261 | #define VR4181_PIUPB01REG __preg16(KSEG1 + 0x0B0002A2) /* PIU Page 0 Buffer 1 register (R/W) */ | ||
262 | #define VR4181_PIUPB02REG __preg16(KSEG1 + 0x0B0002A4) /* PIU Page 0 Buffer 2 register (R/W) */ | ||
263 | #define VR4181_PIUPB03REG __preg16(KSEG1 + 0x0B0002A6) /* PIU Page 0 Buffer 3 register (R/W) */ | ||
264 | #define VR4181_PIUPB10REG __preg16(KSEG1 + 0x0B0002A8) /* PIU Page 1 Buffer 0 register (R/W) */ | ||
265 | #define VR4181_PIUPB11REG __preg16(KSEG1 + 0x0B0002AA) /* PIU Page 1 Buffer 1 register (R/W) */ | ||
266 | #define VR4181_PIUPB12REG __preg16(KSEG1 + 0x0B0002AC) /* PIU Page 1 Buffer 2 register (R/W) */ | ||
267 | #define VR4181_PIUPB13REG __preg16(KSEG1 + 0x0B0002AE) /* PIU Page 1 Buffer 3 register (R/W) */ | ||
268 | #define VR4181_PIUAB0REG __preg16(KSEG1 + 0x0B0002B0) /* PIU A/D scan Buffer 0 register (R/W) */ | ||
269 | #define VR4181_PIUAB1REG __preg16(KSEG1 + 0x0B0002B2) /* PIU A/D scan Buffer 1 register (R/W) */ | ||
270 | #define VR4181_PIUAB2REG __preg16(KSEG1 + 0x0B0002B4) /* PIU A/D scan Buffer 2 register (R/W) */ | ||
271 | #define VR4181_PIUAB3REG __preg16(KSEG1 + 0x0B0002B6) /* PIU A/D scan Buffer 3 register (R/W) */ | ||
272 | #define VR4181_PIUPB04REG __preg16(KSEG1 + 0x0B0002BC) /* PIU Page 0 Buffer 4 register (R/W) */ | ||
273 | #define VR4181_PIUPB14REG __preg16(KSEG1 + 0x0B0002BE) /* PIU Page 1 Buffer 4 register (R/W) */ | ||
274 | |||
275 | // Audio Interface Unit (AIU) | ||
276 | #define VR4181_SODATREG __preg16(KSEG1 + 0x0B000166) /* Speaker Output Data Register (R/W) */ | ||
277 | #define VR4181_SCNTREG __preg16(KSEG1 + 0x0B000168) /* Speaker Output Control Register (R/W) */ | ||
278 | #define VR4181_MIDATREG __preg16(KSEG1 + 0x0B000170) /* Mike Input Data Register (R/W) */ | ||
279 | #define VR4181_MCNTREG __preg16(KSEG1 + 0x0B000172) /* Mike Input Control Register (R/W) */ | ||
280 | #define VR4181_DVALIDREG __preg16(KSEG1 + 0x0B000178) /* Data Valid Register (R/W) */ | ||
281 | #define VR4181_SEQREG __preg16(KSEG1 + 0x0B00017A) /* Sequential Register (R/W) */ | ||
282 | #define VR4181_INTREG __preg16(KSEG1 + 0x0B00017C) /* Interrupt Register (R/W) */ | ||
283 | #define VR4181_SDMADATREG __preg16(KSEG1 + 0x0B000160) /* Speaker DMA Data Register (R/W) */ | ||
284 | #define VR4181_MDMADATREG __preg16(KSEG1 + 0x0B000162) /* Microphone DMA Data Register (R/W) */ | ||
285 | #define VR4181_DAVREF_SETUP __preg16(KSEG1 + 0x0B000164) /* DAC Vref setup register (R/W) */ | ||
286 | #define VR4181_SCNVC_END __preg16(KSEG1 + 0x0B00016E) /* Speaker sample rate control (R/W) */ | ||
287 | #define VR4181_MIDATREG __preg16(KSEG1 + 0x0B000170) /* Microphone Input Data Register (R/W) */ | ||
288 | #define VR4181_MCNTREG __preg16(KSEG1 + 0x0B000172) /* Microphone Input Control Register (R/W) */ | ||
289 | #define VR4181_MCNVC_END __preg16(KSEG1 + 0x0B00017E) /* Microphone sample rate control (R/W) */ | ||
290 | |||
291 | // Keyboard Interface Unit (KIU) | ||
292 | #define VR4181_KIUDAT0 __preg16(KSEG1 + 0x0B000180) /* KIU Data0 Register (R/W) */ | ||
293 | #define VR4181_KIUDAT1 __preg16(KSEG1 + 0x0B000182) /* KIU Data1 Register (R/W) */ | ||
294 | #define VR4181_KIUDAT2 __preg16(KSEG1 + 0x0B000184) /* KIU Data2 Register (R/W) */ | ||
295 | #define VR4181_KIUDAT3 __preg16(KSEG1 + 0x0B000186) /* KIU Data3 Register (R/W) */ | ||
296 | #define VR4181_KIUDAT4 __preg16(KSEG1 + 0x0B000188) /* KIU Data4 Register (R/W) */ | ||
297 | #define VR4181_KIUDAT5 __preg16(KSEG1 + 0x0B00018A) /* KIU Data5 Register (R/W) */ | ||
298 | #define VR4181_KIUSCANREP __preg16(KSEG1 + 0x0B000190) /* KIU Scan/Repeat Register (R/W) */ | ||
299 | #define VR4181_KIUSCANREP_KEYEN 0x8000 | ||
300 | #define VR4181_KIUSCANREP_SCANSTP 0x0008 | ||
301 | #define VR4181_KIUSCANREP_SCANSTART 0x0004 | ||
302 | #define VR4181_KIUSCANREP_ATSTP 0x0002 | ||
303 | #define VR4181_KIUSCANREP_ATSCAN 0x0001 | ||
304 | #define VR4181_KIUSCANS __preg16(KSEG1 + 0x0B000192) /* KIU Scan Status Register (R) */ | ||
305 | #define VR4181_KIUWKS __preg16(KSEG1 + 0x0B000194) /* KIU Wait Keyscan Stable Register (R/W) */ | ||
306 | #define VR4181_KIUWKI __preg16(KSEG1 + 0x0B000196) /* KIU Wait Keyscan Interval Register (R/W) */ | ||
307 | #define VR4181_KIUINT __preg16(KSEG1 + 0x0B000198) /* KIU Interrupt Register (R/W) */ | ||
308 | #define VR4181_KIUINT_KDATLOST 0x0004 | ||
309 | #define VR4181_KIUINT_KDATRDY 0x0002 | ||
310 | #define VR4181_KIUINT_SCANINT 0x0001 | ||
311 | #define VR4181_KIUDAT6 __preg16(KSEG1 + 0x0B00018C) /* Scan Line 6 Key Data Register (R) */ | ||
312 | #define VR4181_KIUDAT7 __preg16(KSEG1 + 0x0B00018E) /* Scan Line 7 Key Data Register (R) */ | ||
313 | |||
314 | // CompactFlash Controller | ||
315 | #define VR4181_PCCARDINDEX __preg8(KSEG1 + 0x0B0008E0) /* PC Card Controller Index Register */ | ||
316 | #define VR4181_PCCARDDATA __preg8(KSEG1 + 0x0B0008E1) /* PC Card Controller Data Register */ | ||
317 | #define VR4181_INTSTATREG __preg16(KSEG1 + 0x0B0008F8) /* Interrupt Status Register (R/W) */ | ||
318 | #define VR4181_INTMSKREG __preg16(KSEG1 + 0x0B0008FA) /* Interrupt Mask Register (R/W) */ | ||
319 | #define VR4181_CFG_REG_1 __preg16(KSEG1 + 0x0B0008FE) /* Configuration Register 1 */ | ||
320 | |||
321 | // LED Control Unit (LED) | ||
322 | #define VR4181_LEDHTSREG __preg16(KSEG1 + 0x0B000240) /* LED H Time Set register (R/W) */ | ||
323 | #define VR4181_LEDLTSREG __preg16(KSEG1 + 0x0B000242) /* LED L Time Set register (R/W) */ | ||
324 | #define VR4181_LEDCNTREG __preg16(KSEG1 + 0x0B000248) /* LED Control register (R/W) */ | ||
325 | #define VR4181_LEDASTCREG __preg16(KSEG1 + 0x0B00024A) /* LED Auto Stop Time Count register (R/W) */ | ||
326 | #define VR4181_LEDINTREG __preg16(KSEG1 + 0x0B00024C) /* LED Interrupt register (R/W) */ | ||
327 | |||
328 | // Serial Interface Unit (SIU / SIU1 and SIU2) | ||
329 | #define VR4181_SIURB __preg8(KSEG1 + 0x0C000010) /* Receiver Buffer Register (Read) DLAB = 0 (R) */ | ||
330 | #define VR4181_SIUTH __preg8(KSEG1 + 0x0C000010) /* Transmitter Holding Register (Write) DLAB = 0 (W) */ | ||
331 | #define VR4181_SIUDLL __preg8(KSEG1 + 0x0C000010) /* Divisor Latch (Least Significant Byte) DLAB = 1 (R/W) */ | ||
332 | #define VR4181_SIUIE __preg8(KSEG1 + 0x0C000011) /* Interrupt Enable DLAB = 0 (R/W) */ | ||
333 | #define VR4181_SIUDLM __preg8(KSEG1 + 0x0C000011) /* Divisor Latch (Most Significant Byte) DLAB = 1 (R/W) */ | ||
334 | #define VR4181_SIUIID __preg8(KSEG1 + 0x0C000012) /* Interrupt Identification Register (Read) (R) */ | ||
335 | #define VR4181_SIUFC __preg8(KSEG1 + 0x0C000012) /* FIFO Control Register (Write) (W) */ | ||
336 | #define VR4181_SIULC __preg8(KSEG1 + 0x0C000013) /* Line Control Register (R/W) */ | ||
337 | #define VR4181_SIUMC __preg8(KSEG1 + 0x0C000014) /* MODEM Control Register (R/W) */ | ||
338 | #define VR4181_SIULS __preg8(KSEG1 + 0x0C000015) /* Line Status Register (R/W) */ | ||
339 | #define VR4181_SIUMS __preg8(KSEG1 + 0x0C000016) /* MODEM Status Register (R/W) */ | ||
340 | #define VR4181_SIUSC __preg8(KSEG1 + 0x0C000017) /* Scratch Register (R/W) */ | ||
341 | #define VR4181_SIURESET __preg8(KSEG1 + 0x0C000019) /* SIU Reset Register (R/W) */ | ||
342 | #define VR4181_SIUACTMSK __preg8(KSEG1 + 0x0C00001C) /* SIU Activity Mask (R/W) */ | ||
343 | #define VR4181_SIUACTTMR __preg8(KSEG1 + 0x0C00001E) /* SIU Activity Timer (R/W) */ | ||
344 | #define VR4181_SIURB_2 __preg8(KSEG1 + 0x0C000000) /* Receive Buffer Register (Read) (R) */ | ||
345 | #define VR4181_SIUTH_2 __preg8(KSEG1 + 0x0C000000) /* Transmitter Holding Register (Write) (W) */ | ||
346 | #define VR4181_SIUDLL_2 __preg8(KSEG1 + 0x0C000000) /* Divisor Latch (Least Significant Byte) (R/W) */ | ||
347 | #define VR4181_SIUIE_2 __preg8(KSEG1 + 0x0C000001) /* Interrupt Enable (DLAB = 0) (R/W) */ | ||
348 | #define VR4181_SIUDLM_2 __preg8(KSEG1 + 0x0C000001) /* Divisor Latch (Most Significant Byte) (DLAB = 1) (R/W) */ | ||
349 | #define VR4181_SIUIID_2 __preg8(KSEG1 + 0x0C000002) /* Interrupt Identification Register (Read) (R) */ | ||
350 | #define VR4181_SIUFC_2 __preg8(KSEG1 + 0x0C000002) /* FIFO Control Register (Write) (W) */ | ||
351 | #define VR4181_SIULC_2 __preg8(KSEG1 + 0x0C000003) /* Line Control Register (R/W) */ | ||
352 | #define VR4181_SIUMC_2 __preg8(KSEG1 + 0x0C000004) /* Modem Control Register (R/W) */ | ||
353 | #define VR4181_SIULS_2 __preg8(KSEG1 + 0x0C000005) /* Line Status Register (R/W) */ | ||
354 | #define VR4181_SIUMS_2 __preg8(KSEG1 + 0x0C000006) /* Modem Status Register (R/W) */ | ||
355 | #define VR4181_SIUSC_2 __preg8(KSEG1 + 0x0C000007) /* Scratch Register (R/W) */ | ||
356 | #define VR4181_SIUIRSEL_2 __preg8(KSEG1 + 0x0C000008) /* SIU IrDA Selectot (R/W) */ | ||
357 | #define VR4181_SIURESET_2 __preg8(KSEG1 + 0x0C000009) /* SIU Reset Register (R/W) */ | ||
358 | #define VR4181_SIUCSEL_2 __preg8(KSEG1 + 0x0C00000A) /* IrDA Echo-back Control (R/W) */ | ||
359 | #define VR4181_SIUACTMSK_2 __preg8(KSEG1 + 0x0C00000C) /* SIU Activity Mask Register (R/W) */ | ||
360 | #define VR4181_SIUACTTMR_2 __preg8(KSEG1 + 0x0C00000E) /* SIU Activity Timer Register (R/W) */ | ||
361 | |||
362 | |||
363 | // USB Module | ||
364 | #define VR4181_USBINFIFO __preg16(KSEG1 + 0x0B000780) /* USB Bulk Input FIFO (Bulk In End Point) (W) */ | ||
365 | #define VR4181_USBOUTFIFO __preg16(KSEG1 + 0x0B000782) /* USB Bulk Output FIFO (Bulk Out End Point) (R) */ | ||
366 | #define VR4181_USBCTLFIFO __preg16(KSEG1 + 0x0B000784) /* USB Control FIFO (Control End Point) (W) */ | ||
367 | #define VR4181_USBSTAT __preg16(KSEG1 + 0x0B000786) /* Interrupt Status Register (R/W) */ | ||
368 | #define VR4181_USBINTMSK __preg16(KSEG1 + 0x0B000788) /* Interrupt Mask Register (R/W) */ | ||
369 | #define VR4181_USBCTLREG __preg16(KSEG1 + 0x0B00078A) /* Control Register (R/W) */ | ||
370 | #define VR4181_USBSTPREG __preg16(KSEG1 + 0x0B00078C) /* USB Transfer Stop Register (R/W) */ | ||
371 | |||
372 | // LCD Controller | ||
373 | #define VR4181_HRTOTALREG __preg16(KSEG1 + 0x0A000400) /* Horizontal total Register (R/W) */ | ||
374 | #define VR4181_HRVISIBREG __preg16(KSEG1 + 0x0A000402) /* Horizontal Visible Register (R/W) */ | ||
375 | #define VR4181_LDCLKSTREG __preg16(KSEG1 + 0x0A000404) /* Load clock start Register (R/W) */ | ||
376 | #define VR4181_LDCLKNDREG __preg16(KSEG1 + 0x0A000406) /* Load clock end Register (R/W) */ | ||
377 | #define VR4181_VRTOTALREG __preg16(KSEG1 + 0x0A000408) /* Vertical Total Register (R/W) */ | ||
378 | #define VR4181_VRVISIBREG __preg16(KSEG1 + 0x0A00040A) /* Vertical Visible Register (R/W) */ | ||
379 | #define VR4181_FVSTARTREG __preg16(KSEG1 + 0x0A00040C) /* FLM vertical start Register (R/W) */ | ||
380 | #define VR4181_FVENDREG __preg16(KSEG1 + 0x0A00040E) /* FLM vertical end Register (R/W) */ | ||
381 | #define VR4181_LCDCTRLREG __preg16(KSEG1 + 0x0A000410) /* LCD control Register (R/W) */ | ||
382 | #define VR4181_LCDINRQREG __preg16(KSEG1 + 0x0A000412) /* LCD Interrupt request Register (R/W) */ | ||
383 | #define VR4181_LCDCFGREG0 __preg16(KSEG1 + 0x0A000414) /* LCD Configuration Register 0 (R/W) */ | ||
384 | #define VR4181_LCDCFGREG1 __preg16(KSEG1 + 0x0A000416) /* LCD Configuration Register 1 (R/W) */ | ||
385 | #define VR4181_FBSTAD1REG __preg16(KSEG1 + 0x0A000418) /* Frame Buffer Start Address 1 Register (R/W) */ | ||
386 | #define VR4181_FBSTAD2REG __preg16(KSEG1 + 0x0A00041A) /* Frame Buffer Start Address 2 Register (R/W) */ | ||
387 | #define VR4181_FBNDAD1REG __preg16(KSEG1 + 0x0A000420) /* Frame Buffer End Address 1 Register (R/W) */ | ||
388 | #define VR4181_FBNDAD2REG __preg16(KSEG1 + 0x0A000422) /* Frame Buffer End Address 2 register (R/W) */ | ||
389 | #define VR4181_FHSTARTREG __preg16(KSEG1 + 0x0A000424) /* FLM horizontal Start Register (R/W) */ | ||
390 | #define VR4181_FHENDREG __preg16(KSEG1 + 0x0A000426) /* FLM horizontal End Register (R/W) */ | ||
391 | #define VR4181_PWRCONREG1 __preg16(KSEG1 + 0x0A000430) /* Power Control register 1 (R/W) */ | ||
392 | #define VR4181_PWRCONREG2 __preg16(KSEG1 + 0x0A000432) /* Power Control register 2 (R/W) */ | ||
393 | #define VR4181_LCDIMSKREG __preg16(KSEG1 + 0x0A000434) /* LCD Interrupt Mask register (R/W) */ | ||
394 | #define VR4181_CPINDCTREG __preg16(KSEG1 + 0x0A00047E) /* Color palette Index and control Register (R/W) */ | ||
395 | #define VR4181_CPALDATREG __preg32(KSEG1 + 0x0A000480) /* Color palette data register (32bits Register) (R/W) */ | ||
396 | |||
397 | // physical address spaces | ||
398 | #define VR4181_LCD 0x0a000000 | ||
399 | #define VR4181_INTERNAL_IO_2 0x0b000000 | ||
400 | #define VR4181_INTERNAL_IO_1 0x0c000000 | ||
401 | #define VR4181_ISA_MEM 0x10000000 | ||
402 | #define VR4181_ISA_IO 0x14000000 | ||
403 | #define VR4181_ROM 0x18000000 | ||
404 | |||
405 | // This is the base address for IO port decoding to which the 16 bit IO port address | ||
406 | // is added. Defining it to 0 will usually cause a kernel oops any time port IO is | ||
407 | // attempted, which can be handy for turning up parts of the kernel that make | ||
408 | // incorrect architecture assumptions (by assuming that everything acts like a PC), | ||
409 | // but we need it correctly defined to use the PCMCIA/CF controller: | ||
410 | #define VR4181_PORT_BASE (KSEG1 + VR4181_ISA_IO) | ||
411 | #define VR4181_ISAMEM_BASE (KSEG1 + VR4181_ISA_MEM) | ||
412 | |||
413 | #endif /* __ASM_VR4181_VR4181_H */ | ||
diff --git a/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h index 7d41e44463f9..bd2723c30901 100644 --- a/include/asm-mips/vr41xx/vr41xx.h +++ b/include/asm-mips/vr41xx/vr41xx.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 2001, 2002 Paul Mundt | 7 | * Copyright (C) 2001, 2002 Paul Mundt |
8 | * Copyright (C) 2002 MontaVista Software, Inc. | 8 | * Copyright (C) 2002 MontaVista Software, Inc. |
9 | * Copyright (C) 2002 TimeSys Corp. | 9 | * Copyright (C) 2002 TimeSys Corp. |
10 | * Copyright (C) 2003-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | 10 | * Copyright (C) 2003-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
@@ -79,11 +79,11 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock); | |||
79 | #define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) | 79 | #define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) |
80 | #define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0) | 80 | #define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0) |
81 | #define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1) | 81 | #define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1) |
82 | #define INT0_CASCADE_IRQ MIPS_CPU_IRQ(2) | 82 | #define INT0_IRQ MIPS_CPU_IRQ(2) |
83 | #define INT1_CASCADE_IRQ MIPS_CPU_IRQ(3) | 83 | #define INT1_IRQ MIPS_CPU_IRQ(3) |
84 | #define INT2_CASCADE_IRQ MIPS_CPU_IRQ(4) | 84 | #define INT2_IRQ MIPS_CPU_IRQ(4) |
85 | #define INT3_CASCADE_IRQ MIPS_CPU_IRQ(5) | 85 | #define INT3_IRQ MIPS_CPU_IRQ(5) |
86 | #define INT4_CASCADE_IRQ MIPS_CPU_IRQ(6) | 86 | #define INT4_IRQ MIPS_CPU_IRQ(6) |
87 | #define TIMER_IRQ MIPS_CPU_IRQ(7) | 87 | #define TIMER_IRQ MIPS_CPU_IRQ(7) |
88 | 88 | ||
89 | /* SYINT1 Interrupt Numbers */ | 89 | /* SYINT1 Interrupt Numbers */ |
@@ -97,7 +97,7 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock); | |||
97 | #define PIU_IRQ SYSINT1_IRQ(5) | 97 | #define PIU_IRQ SYSINT1_IRQ(5) |
98 | #define AIU_IRQ SYSINT1_IRQ(6) | 98 | #define AIU_IRQ SYSINT1_IRQ(6) |
99 | #define KIU_IRQ SYSINT1_IRQ(7) | 99 | #define KIU_IRQ SYSINT1_IRQ(7) |
100 | #define GIUINT_CASCADE_IRQ SYSINT1_IRQ(8) | 100 | #define GIUINT_IRQ SYSINT1_IRQ(8) |
101 | #define SIU_IRQ SYSINT1_IRQ(9) | 101 | #define SIU_IRQ SYSINT1_IRQ(9) |
102 | #define BUSERR_IRQ SYSINT1_IRQ(10) | 102 | #define BUSERR_IRQ SYSINT1_IRQ(10) |
103 | #define SOFTINT_IRQ SYSINT1_IRQ(11) | 103 | #define SOFTINT_IRQ SYSINT1_IRQ(11) |
@@ -128,7 +128,7 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock); | |||
128 | #define GIU_IRQ_LAST GIU_IRQ(31) | 128 | #define GIU_IRQ_LAST GIU_IRQ(31) |
129 | 129 | ||
130 | extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign); | 130 | extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign); |
131 | extern int vr41xx_cascade_irq(unsigned int irq, int (*get_irq_number)(int irq)); | 131 | extern int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int, struct pt_regs *)); |
132 | 132 | ||
133 | #define PIUINT_COMMAND 0x0040 | 133 | #define PIUINT_COMMAND 0x0040 |
134 | #define PIUINT_DATA 0x0020 | 134 | #define PIUINT_DATA 0x0020 |
diff --git a/include/asm-mips/vr41xx/vrc4173.h b/include/asm-mips/vr41xx/vrc4173.h index 58e193c51b45..bb7a85c186e4 100644 --- a/include/asm-mips/vr41xx/vrc4173.h +++ b/include/asm-mips/vr41xx/vrc4173.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * along with this program; if not, write to the Free Software | 21 | * along with this program; if not, write to the Free Software |
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | */ | 23 | */ |
24 | #ifndef __NEC_VRC4173_H | 24 | #ifndef __NEC_VRC4173_H |
25 | #define __NEC_VRC4173_H | 25 | #define __NEC_VRC4173_H |
26 | 26 | ||
27 | #include <linux/config.h> | 27 | #include <linux/config.h> |
28 | #include <asm/io.h> | 28 | #include <asm/io.h> |
diff --git a/include/asm-mips/war.h b/include/asm-mips/war.h index c4a704121343..04ee53b34c2e 100644 --- a/include/asm-mips/war.h +++ b/include/asm-mips/war.h | |||
@@ -113,7 +113,7 @@ | |||
113 | */ | 113 | */ |
114 | #define BCM1250_M3_WAR 1 | 114 | #define BCM1250_M3_WAR 1 |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * This is a DUART workaround related to glitches around register accesses | 117 | * This is a DUART workaround related to glitches around register accesses |
118 | */ | 118 | */ |
119 | #define SIBYTE_1956_WAR 1 | 119 | #define SIBYTE_1956_WAR 1 |
@@ -122,7 +122,7 @@ | |||
122 | 122 | ||
123 | /* | 123 | /* |
124 | * Fill buffers not flushed on CACHE instructions | 124 | * Fill buffers not flushed on CACHE instructions |
125 | * | 125 | * |
126 | * Hit_Invalidate_I cacheops invalidate an icache line but the refill | 126 | * Hit_Invalidate_I cacheops invalidate an icache line but the refill |
127 | * for that line can get stale data from the fill buffer instead of | 127 | * for that line can get stale data from the fill buffer instead of |
128 | * accessing memory if the previous icache miss was also to that line. | 128 | * accessing memory if the previous icache miss was also to that line. |
diff --git a/include/asm-mips/xxs1500.h b/include/asm-mips/xxs1500.h index 75c0ddfeca13..4d84a90b0f20 100644 --- a/include/asm-mips/xxs1500.h +++ b/include/asm-mips/xxs1500.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * ######################################################################## | 23 | * ######################################################################## |
24 | * | 24 | * |
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | #ifndef __ASM_XXS1500_H | 27 | #ifndef __ASM_XXS1500_H |
28 | #define __ASM_XXS1500_H | 28 | #define __ASM_XXS1500_H |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 4a12692f94b4..44eae9f8274d 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -74,20 +74,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
74 | #define __pgd(x) ((pgd_t) { (x) } ) | 74 | #define __pgd(x) ((pgd_t) { (x) } ) |
75 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 75 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
76 | 76 | ||
77 | /* Pure 2^n version of get_order */ | ||
78 | extern __inline__ int get_order(unsigned long size) | ||
79 | { | ||
80 | int order; | ||
81 | |||
82 | size = (size-1) >> (PAGE_SHIFT-1); | ||
83 | order = -1; | ||
84 | do { | ||
85 | size >>= 1; | ||
86 | order++; | ||
87 | } while (size); | ||
88 | return order; | ||
89 | } | ||
90 | |||
91 | typedef struct __physmem_range { | 77 | typedef struct __physmem_range { |
92 | unsigned long start_pfn; | 78 | unsigned long start_pfn; |
93 | unsigned long pages; /* PAGE_SIZE pages */ | 79 | unsigned long pages; /* PAGE_SIZE pages */ |
@@ -159,4 +145,6 @@ extern int npmem_ranges; | |||
159 | 145 | ||
160 | #endif /* __KERNEL__ */ | 146 | #endif /* __KERNEL__ */ |
161 | 147 | ||
148 | #include <asm-generic/page.h> | ||
149 | |||
162 | #endif /* _PARISC_PAGE_H */ | 150 | #endif /* _PARISC_PAGE_H */ |
diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h index 8fe7a44ea205..d21b9d0d63ea 100644 --- a/include/asm-parisc/types.h +++ b/include/asm-parisc/types.h | |||
@@ -56,8 +56,6 @@ typedef unsigned long long u64; | |||
56 | typedef u32 dma_addr_t; | 56 | typedef u32 dma_addr_t; |
57 | typedef u64 dma64_addr_t; | 57 | typedef u64 dma64_addr_t; |
58 | 58 | ||
59 | typedef unsigned int kmem_bufctl_t; | ||
60 | |||
61 | #endif /* __ASSEMBLY__ */ | 59 | #endif /* __ASSEMBLY__ */ |
62 | 60 | ||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h index 6f74f59938d4..92b8ee78dcc2 100644 --- a/include/asm-ppc/dma-mapping.h +++ b/include/asm-ppc/dma-mapping.h | |||
@@ -60,7 +60,8 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 62 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
63 | dma_addr_t * dma_handle, int gfp) | 63 | dma_addr_t * dma_handle, |
64 | unsigned int __nocast gfp) | ||
64 | { | 65 | { |
65 | #ifdef CONFIG_NOT_COHERENT_CACHE | 66 | #ifdef CONFIG_NOT_COHERENT_CACHE |
66 | return __dma_alloc_coherent(size, dma_handle, gfp); | 67 | return __dma_alloc_coherent(size, dma_handle, gfp); |
diff --git a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h index e807be96e981..e992369cb8e9 100644 --- a/include/asm-ppc/ibm4xx.h +++ b/include/asm-ppc/ibm4xx.h | |||
@@ -19,10 +19,6 @@ | |||
19 | 19 | ||
20 | #ifdef CONFIG_40x | 20 | #ifdef CONFIG_40x |
21 | 21 | ||
22 | #if defined(CONFIG_ASH) | ||
23 | #include <platforms/4xx/ash.h> | ||
24 | #endif | ||
25 | |||
26 | #if defined(CONFIG_BUBINGA) | 22 | #if defined(CONFIG_BUBINGA) |
27 | #include <platforms/4xx/bubinga.h> | 23 | #include <platforms/4xx/bubinga.h> |
28 | #endif | 24 | #endif |
@@ -35,14 +31,6 @@ | |||
35 | #include <platforms/4xx/ep405.h> | 31 | #include <platforms/4xx/ep405.h> |
36 | #endif | 32 | #endif |
37 | 33 | ||
38 | #if defined(CONFIG_OAK) | ||
39 | #include <platforms/4xx/oak.h> | ||
40 | #endif | ||
41 | |||
42 | #if defined(CONFIG_REDWOOD_4) | ||
43 | #include <platforms/4xx/redwood.h> | ||
44 | #endif | ||
45 | |||
46 | #if defined(CONFIG_REDWOOD_5) | 34 | #if defined(CONFIG_REDWOOD_5) |
47 | #include <platforms/4xx/redwood5.h> | 35 | #include <platforms/4xx/redwood5.h> |
48 | #endif | 36 | #endif |
diff --git a/include/asm-ppc/ibm_ocp.h b/include/asm-ppc/ibm_ocp.h index 3f7b5669e6d5..bd7656fa2026 100644 --- a/include/asm-ppc/ibm_ocp.h +++ b/include/asm-ppc/ibm_ocp.h | |||
@@ -67,6 +67,7 @@ struct ocp_func_emac_data { | |||
67 | int phy_mode; /* PHY type or configurable mode */ | 67 | int phy_mode; /* PHY type or configurable mode */ |
68 | u8 mac_addr[6]; /* EMAC mac address */ | 68 | u8 mac_addr[6]; /* EMAC mac address */ |
69 | u32 phy_map; /* EMAC phy map */ | 69 | u32 phy_map; /* EMAC phy map */ |
70 | u32 phy_feat_exc; /* Excluded PHY features */ | ||
70 | }; | 71 | }; |
71 | 72 | ||
72 | /* Sysfs support */ | 73 | /* Sysfs support */ |
@@ -100,6 +101,19 @@ void ocp_show_emac_data(struct device *dev) \ | |||
100 | device_create_file(dev, &dev_attr_emac_phy_map); \ | 101 | device_create_file(dev, &dev_attr_emac_phy_map); \ |
101 | } | 102 | } |
102 | 103 | ||
104 | /* | ||
105 | * PHY mode settings (EMAC <-> ZMII/RGMII bridge <-> PHY) | ||
106 | */ | ||
107 | #define PHY_MODE_NA 0 | ||
108 | #define PHY_MODE_MII 1 | ||
109 | #define PHY_MODE_RMII 2 | ||
110 | #define PHY_MODE_SMII 3 | ||
111 | #define PHY_MODE_RGMII 4 | ||
112 | #define PHY_MODE_TBI 5 | ||
113 | #define PHY_MODE_GMII 6 | ||
114 | #define PHY_MODE_RTBI 7 | ||
115 | #define PHY_MODE_SGMII 8 | ||
116 | |||
103 | #ifdef CONFIG_40x | 117 | #ifdef CONFIG_40x |
104 | /* | 118 | /* |
105 | * Helper function to copy MAC addresses from the bd_t to OCP EMAC | 119 | * Helper function to copy MAC addresses from the bd_t to OCP EMAC |
@@ -133,6 +147,7 @@ struct ocp_func_mal_data { | |||
133 | int txde_irq; /* TX Descriptor Error IRQ */ | 147 | int txde_irq; /* TX Descriptor Error IRQ */ |
134 | int rxde_irq; /* RX Descriptor Error IRQ */ | 148 | int rxde_irq; /* RX Descriptor Error IRQ */ |
135 | int serr_irq; /* MAL System Error IRQ */ | 149 | int serr_irq; /* MAL System Error IRQ */ |
150 | int dcr_base; /* MALx_CFG DCR number */ | ||
136 | }; | 151 | }; |
137 | 152 | ||
138 | #define OCP_SYSFS_MAL_DATA() \ | 153 | #define OCP_SYSFS_MAL_DATA() \ |
@@ -143,6 +158,7 @@ OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, rxeob_irq) \ | |||
143 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, txde_irq) \ | 158 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, txde_irq) \ |
144 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, rxde_irq) \ | 159 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, rxde_irq) \ |
145 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, serr_irq) \ | 160 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, serr_irq) \ |
161 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, dcr_base) \ | ||
146 | \ | 162 | \ |
147 | void ocp_show_mal_data(struct device *dev) \ | 163 | void ocp_show_mal_data(struct device *dev) \ |
148 | { \ | 164 | { \ |
@@ -153,6 +169,7 @@ void ocp_show_mal_data(struct device *dev) \ | |||
153 | device_create_file(dev, &dev_attr_mal_txde_irq); \ | 169 | device_create_file(dev, &dev_attr_mal_txde_irq); \ |
154 | device_create_file(dev, &dev_attr_mal_rxde_irq); \ | 170 | device_create_file(dev, &dev_attr_mal_rxde_irq); \ |
155 | device_create_file(dev, &dev_attr_mal_serr_irq); \ | 171 | device_create_file(dev, &dev_attr_mal_serr_irq); \ |
172 | device_create_file(dev, &dev_attr_mal_dcr_base); \ | ||
156 | } | 173 | } |
157 | 174 | ||
158 | /* | 175 | /* |
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h index a9b33324f562..a244d93ca953 100644 --- a/include/asm-ppc/irq.h +++ b/include/asm-ppc/irq.h | |||
@@ -337,6 +337,7 @@ static __inline__ int irq_canonicalize(int irq) | |||
337 | #define SIU_INT_IDMA3 ((uint)0x08 + CPM_IRQ_OFFSET) | 337 | #define SIU_INT_IDMA3 ((uint)0x08 + CPM_IRQ_OFFSET) |
338 | #define SIU_INT_IDMA4 ((uint)0x09 + CPM_IRQ_OFFSET) | 338 | #define SIU_INT_IDMA4 ((uint)0x09 + CPM_IRQ_OFFSET) |
339 | #define SIU_INT_SDMA ((uint)0x0a + CPM_IRQ_OFFSET) | 339 | #define SIU_INT_SDMA ((uint)0x0a + CPM_IRQ_OFFSET) |
340 | #define SIU_INT_USB ((uint)0x0b + CPM_IRQ_OFFSET) | ||
340 | #define SIU_INT_TIMER1 ((uint)0x0c + CPM_IRQ_OFFSET) | 341 | #define SIU_INT_TIMER1 ((uint)0x0c + CPM_IRQ_OFFSET) |
341 | #define SIU_INT_TIMER2 ((uint)0x0d + CPM_IRQ_OFFSET) | 342 | #define SIU_INT_TIMER2 ((uint)0x0d + CPM_IRQ_OFFSET) |
342 | #define SIU_INT_TIMER3 ((uint)0x0e + CPM_IRQ_OFFSET) | 343 | #define SIU_INT_TIMER3 ((uint)0x0e + CPM_IRQ_OFFSET) |
diff --git a/include/asm-ppc/kmap_types.h b/include/asm-ppc/kmap_types.h index 2589f182a6ad..6d6fc78731e5 100644 --- a/include/asm-ppc/kmap_types.h +++ b/include/asm-ppc/kmap_types.h | |||
@@ -17,6 +17,7 @@ enum km_type { | |||
17 | KM_SOFTIRQ0, | 17 | KM_SOFTIRQ0, |
18 | KM_SOFTIRQ1, | 18 | KM_SOFTIRQ1, |
19 | KM_PPC_SYNC_PAGE, | 19 | KM_PPC_SYNC_PAGE, |
20 | KM_PPC_SYNC_ICACHE, | ||
20 | KM_TYPE_NR | 21 | KM_TYPE_NR |
21 | }; | 22 | }; |
22 | 23 | ||
diff --git a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h index 89eb8a2ac693..9694eca16e92 100644 --- a/include/asm-ppc/mpc8260.h +++ b/include/asm-ppc/mpc8260.h | |||
@@ -67,6 +67,24 @@ | |||
67 | #define IO_VIRT_ADDR IO_PHYS_ADDR | 67 | #define IO_VIRT_ADDR IO_PHYS_ADDR |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | enum ppc_sys_devices { | ||
71 | MPC82xx_CPM_FCC1, | ||
72 | MPC82xx_CPM_FCC2, | ||
73 | MPC82xx_CPM_FCC3, | ||
74 | MPC82xx_CPM_I2C, | ||
75 | MPC82xx_CPM_SCC1, | ||
76 | MPC82xx_CPM_SCC2, | ||
77 | MPC82xx_CPM_SCC3, | ||
78 | MPC82xx_CPM_SCC4, | ||
79 | MPC82xx_CPM_SPI, | ||
80 | MPC82xx_CPM_MCC1, | ||
81 | MPC82xx_CPM_MCC2, | ||
82 | MPC82xx_CPM_SMC1, | ||
83 | MPC82xx_CPM_SMC2, | ||
84 | MPC82xx_CPM_USB, | ||
85 | MPC82xx_SEC1, | ||
86 | }; | ||
87 | |||
70 | #ifndef __ASSEMBLY__ | 88 | #ifndef __ASSEMBLY__ |
71 | /* The "residual" data board information structure the boot loader | 89 | /* The "residual" data board information structure the boot loader |
72 | * hands to us. | 90 | * hands to us. |
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index 7c31f2d564a1..dc8e59896050 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
@@ -36,10 +36,6 @@ | |||
36 | #include <platforms/tqm8xx.h> | 36 | #include <platforms/tqm8xx.h> |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #if defined(CONFIG_SPD823TS) | ||
40 | #include <platforms/spd8xx.h> | ||
41 | #endif | ||
42 | |||
43 | #if defined(CONFIG_IVMS8) || defined(CONFIG_IVML24) | 39 | #if defined(CONFIG_IVMS8) || defined(CONFIG_IVML24) |
44 | #include <platforms/ivms8.h> | 40 | #include <platforms/ivms8.h> |
45 | #endif | 41 | #endif |
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h index cc25b921ad4f..835930d6faa1 100644 --- a/include/asm-ppc/mv64x60.h +++ b/include/asm-ppc/mv64x60.h | |||
@@ -278,6 +278,13 @@ mv64x60_modify(struct mv64x60_handle *bh, u32 offs, u32 data, u32 mask) | |||
278 | #define mv64x60_set_bits(bh, offs, bits) mv64x60_modify(bh, offs, ~0, bits) | 278 | #define mv64x60_set_bits(bh, offs, bits) mv64x60_modify(bh, offs, ~0, bits) |
279 | #define mv64x60_clr_bits(bh, offs, bits) mv64x60_modify(bh, offs, 0, bits) | 279 | #define mv64x60_clr_bits(bh, offs, bits) mv64x60_modify(bh, offs, 0, bits) |
280 | 280 | ||
281 | #if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260) | ||
282 | #define MV64XXX_DEV_NAME "mv64xxx" | ||
283 | |||
284 | struct mv64xxx_pdata { | ||
285 | u32 hs_reg_valid; | ||
286 | }; | ||
287 | #endif | ||
281 | 288 | ||
282 | /* Externally visible function prototypes */ | 289 | /* Externally visible function prototypes */ |
283 | int mv64x60_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si); | 290 | int mv64x60_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si); |
diff --git a/include/asm-ppc/mv64x60_defs.h b/include/asm-ppc/mv64x60_defs.h index 2f428746c02b..f8f7f16b9b53 100644 --- a/include/asm-ppc/mv64x60_defs.h +++ b/include/asm-ppc/mv64x60_defs.h | |||
@@ -333,7 +333,7 @@ | |||
333 | /* | 333 | /* |
334 | ***************************************************************************** | 334 | ***************************************************************************** |
335 | * | 335 | * |
336 | * SRAM Cotnroller Registers | 336 | * SRAM Controller Registers |
337 | * | 337 | * |
338 | ***************************************************************************** | 338 | ***************************************************************************** |
339 | */ | 339 | */ |
@@ -352,7 +352,7 @@ | |||
352 | /* | 352 | /* |
353 | ***************************************************************************** | 353 | ***************************************************************************** |
354 | * | 354 | * |
355 | * SDRAM/MEM Cotnroller Registers | 355 | * SDRAM/MEM Controller Registers |
356 | * | 356 | * |
357 | ***************************************************************************** | 357 | ***************************************************************************** |
358 | */ | 358 | */ |
@@ -375,6 +375,7 @@ | |||
375 | /* SDRAM Control Registers */ | 375 | /* SDRAM Control Registers */ |
376 | #define MV64360_D_UNIT_CONTROL_LOW 0x1404 | 376 | #define MV64360_D_UNIT_CONTROL_LOW 0x1404 |
377 | #define MV64360_D_UNIT_CONTROL_HIGH 0x1424 | 377 | #define MV64360_D_UNIT_CONTROL_HIGH 0x1424 |
378 | #define MV64460_D_UNIT_MMASK 0x14b0 | ||
378 | 379 | ||
379 | /* SDRAM Error Report Registers (64360) */ | 380 | /* SDRAM Error Report Registers (64360) */ |
380 | #define MV64360_SDRAM_ERR_DATA_LO 0x1444 | 381 | #define MV64360_SDRAM_ERR_DATA_LO 0x1444 |
@@ -388,7 +389,7 @@ | |||
388 | /* | 389 | /* |
389 | ***************************************************************************** | 390 | ***************************************************************************** |
390 | * | 391 | * |
391 | * Device/BOOT Cotnroller Registers | 392 | * Device/BOOT Controller Registers |
392 | * | 393 | * |
393 | ***************************************************************************** | 394 | ***************************************************************************** |
394 | */ | 395 | */ |
@@ -680,6 +681,8 @@ | |||
680 | #define MV64x60_PCI1_SLAVE_P2P_IO_REMAP 0x0dec | 681 | #define MV64x60_PCI1_SLAVE_P2P_IO_REMAP 0x0dec |
681 | #define MV64x60_PCI1_SLAVE_CPU_REMAP 0x0df0 | 682 | #define MV64x60_PCI1_SLAVE_CPU_REMAP 0x0df0 |
682 | 683 | ||
684 | #define MV64360_PCICFG_CPCI_HOTSWAP 0x68 | ||
685 | |||
683 | /* | 686 | /* |
684 | ***************************************************************************** | 687 | ***************************************************************************** |
685 | * | 688 | * |
diff --git a/include/asm-ppc/param.h b/include/asm-ppc/param.h index b24a4e37196a..6198b1657a45 100644 --- a/include/asm-ppc/param.h +++ b/include/asm-ppc/param.h | |||
@@ -1,8 +1,10 @@ | |||
1 | #ifndef _ASM_PPC_PARAM_H | 1 | #ifndef _ASM_PPC_PARAM_H |
2 | #define _ASM_PPC_PARAM_H | 2 | #define _ASM_PPC_PARAM_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | |||
4 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
5 | #define HZ 1000 /* internal timer frequency */ | 7 | #define HZ CONFIG_HZ /* internal timer frequency */ |
6 | #define USER_HZ 100 /* for user interfaces in "ticks" */ | 8 | #define USER_HZ 100 /* for user interfaces in "ticks" */ |
7 | #define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ | 9 | #define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ |
8 | #endif /* __KERNEL__ */ | 10 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h index 8ea624566231..048f7c8596ee 100644 --- a/include/asm-ppc/ppc_sys.h +++ b/include/asm-ppc/ppc_sys.h | |||
@@ -21,7 +21,9 @@ | |||
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | 23 | ||
24 | #if defined(CONFIG_83xx) | 24 | #if defined(CONFIG_8260) |
25 | #include <asm/mpc8260.h> | ||
26 | #elif defined(CONFIG_83xx) | ||
25 | #include <asm/mpc83xx.h> | 27 | #include <asm/mpc83xx.h> |
26 | #elif defined(CONFIG_85xx) | 28 | #elif defined(CONFIG_85xx) |
27 | #include <asm/mpc85xx.h> | 29 | #include <asm/mpc85xx.h> |
@@ -50,6 +52,7 @@ extern struct ppc_sys_spec *cur_ppc_sys_spec; | |||
50 | /* determine which specific SOC we are */ | 52 | /* determine which specific SOC we are */ |
51 | extern void identify_ppc_sys_by_id(u32 id) __init; | 53 | extern void identify_ppc_sys_by_id(u32 id) __init; |
52 | extern void identify_ppc_sys_by_name(char *name) __init; | 54 | extern void identify_ppc_sys_by_name(char *name) __init; |
55 | extern void identify_ppc_sys_by_name_and_id(char *name, u32 id) __init; | ||
53 | 56 | ||
54 | /* describes all devices that may exist in a given family of processors */ | 57 | /* describes all devices that may exist in a given family of processors */ |
55 | extern struct platform_device ppc_sys_platform_devices[]; | 58 | extern struct platform_device ppc_sys_platform_devices[]; |
diff --git a/include/asm-ppc/serial.h b/include/asm-ppc/serial.h index 6d47438be58c..485a924e4d06 100644 --- a/include/asm-ppc/serial.h +++ b/include/asm-ppc/serial.h | |||
@@ -18,8 +18,6 @@ | |||
18 | #include <platforms/powerpmc250.h> | 18 | #include <platforms/powerpmc250.h> |
19 | #elif defined(CONFIG_LOPEC) | 19 | #elif defined(CONFIG_LOPEC) |
20 | #include <platforms/lopec.h> | 20 | #include <platforms/lopec.h> |
21 | #elif defined(CONFIG_MCPN765) | ||
22 | #include <platforms/mcpn765.h> | ||
23 | #elif defined(CONFIG_MVME5100) | 21 | #elif defined(CONFIG_MVME5100) |
24 | #include <platforms/mvme5100.h> | 22 | #include <platforms/mvme5100.h> |
25 | #elif defined(CONFIG_PAL4) | 23 | #elif defined(CONFIG_PAL4) |
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index 82395f30004b..513a334c5810 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h | |||
@@ -84,9 +84,14 @@ extern void cvt_fd(float *from, double *to, unsigned long *fpscr); | |||
84 | extern void cvt_df(double *from, float *to, unsigned long *fpscr); | 84 | extern void cvt_df(double *from, float *to, unsigned long *fpscr); |
85 | extern int call_rtas(const char *, int, int, unsigned long *, ...); | 85 | extern int call_rtas(const char *, int, int, unsigned long *, ...); |
86 | extern void cacheable_memzero(void *p, unsigned int nb); | 86 | extern void cacheable_memzero(void *p, unsigned int nb); |
87 | extern void *cacheable_memcpy(void *, const void *, unsigned int); | ||
87 | extern int do_page_fault(struct pt_regs *, unsigned long, unsigned long); | 88 | extern int do_page_fault(struct pt_regs *, unsigned long, unsigned long); |
88 | extern void bad_page_fault(struct pt_regs *, unsigned long, int); | 89 | extern void bad_page_fault(struct pt_regs *, unsigned long, int); |
89 | extern void die(const char *, struct pt_regs *, long); | 90 | extern void die(const char *, struct pt_regs *, long); |
91 | #ifdef CONFIG_BOOKE_WDT | ||
92 | extern u32 booke_wdt_enabled; | ||
93 | extern u32 booke_wdt_period; | ||
94 | #endif /* CONFIG_BOOKE_WDT */ | ||
90 | 95 | ||
91 | struct device_node; | 96 | struct device_node; |
92 | extern void note_scsi_host(struct device_node *, void *); | 97 | extern void note_scsi_host(struct device_node *, void *); |
diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h index a787bc032587..77dc24d7d2ad 100644 --- a/include/asm-ppc/types.h +++ b/include/asm-ppc/types.h | |||
@@ -62,8 +62,6 @@ typedef u64 sector_t; | |||
62 | #define HAVE_SECTOR_T | 62 | #define HAVE_SECTOR_T |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | typedef unsigned int kmem_bufctl_t; | ||
66 | |||
67 | #endif /* __ASSEMBLY__ */ | 65 | #endif /* __ASSEMBLY__ */ |
68 | 66 | ||
69 | #endif /* __KERNEL__ */ | 67 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc64/lmb.h b/include/asm-ppc64/lmb.h index cb368bf0f264..de91e034bd98 100644 --- a/include/asm-ppc64/lmb.h +++ b/include/asm-ppc64/lmb.h | |||
@@ -56,4 +56,26 @@ extern void lmb_dump_all(void); | |||
56 | 56 | ||
57 | extern unsigned long io_hole_start; | 57 | extern unsigned long io_hole_start; |
58 | 58 | ||
59 | static inline unsigned long | ||
60 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) | ||
61 | { | ||
62 | return type->region[region_nr].size; | ||
63 | } | ||
64 | static inline unsigned long | ||
65 | lmb_size_pages(struct lmb_region *type, unsigned long region_nr) | ||
66 | { | ||
67 | return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
68 | } | ||
69 | static inline unsigned long | ||
70 | lmb_start_pfn(struct lmb_region *type, unsigned long region_nr) | ||
71 | { | ||
72 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
73 | } | ||
74 | static inline unsigned long | ||
75 | lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) | ||
76 | { | ||
77 | return lmb_start_pfn(type, region_nr) + | ||
78 | lmb_size_pages(type, region_nr); | ||
79 | } | ||
80 | |||
59 | #endif /* _PPC64_LMB_H */ | 81 | #endif /* _PPC64_LMB_H */ |
diff --git a/include/asm-ppc64/lppaca.h b/include/asm-ppc64/lppaca.h index 70766b5f26c1..9e2a6c0649a0 100644 --- a/include/asm-ppc64/lppaca.h +++ b/include/asm-ppc64/lppaca.h | |||
@@ -108,7 +108,7 @@ struct lppaca | |||
108 | volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B | 108 | volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B |
109 | u16 slb_count; // # of SLBs to maintain x7C-x7D | 109 | u16 slb_count; // # of SLBs to maintain x7C-x7D |
110 | u8 idle; // Indicate OS is idle x7E | 110 | u8 idle; // Indicate OS is idle x7E |
111 | u8 reserved5; // Reserved x7F | 111 | u8 vmxregs_in_use; // VMX registers in use x7F |
112 | 112 | ||
113 | 113 | ||
114 | //============================================================================= | 114 | //============================================================================= |
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index a79a08df62bd..a15422bcf30d 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h | |||
@@ -172,20 +172,6 @@ typedef unsigned long pgprot_t; | |||
172 | 172 | ||
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | /* Pure 2^n version of get_order */ | ||
176 | static inline int get_order(unsigned long size) | ||
177 | { | ||
178 | int order; | ||
179 | |||
180 | size = (size-1) >> (PAGE_SHIFT-1); | ||
181 | order = -1; | ||
182 | do { | ||
183 | size >>= 1; | ||
184 | order++; | ||
185 | } while (size); | ||
186 | return order; | ||
187 | } | ||
188 | |||
189 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) | 175 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) |
190 | 176 | ||
191 | extern int page_is_ram(unsigned long pfn); | 177 | extern int page_is_ram(unsigned long pfn); |
@@ -270,4 +256,7 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */ | |||
270 | VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64) | 256 | VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64) |
271 | 257 | ||
272 | #endif /* __KERNEL__ */ | 258 | #endif /* __KERNEL__ */ |
259 | |||
260 | #include <asm-generic/page.h> | ||
261 | |||
273 | #endif /* _PPC64_PAGE_H */ | 262 | #endif /* _PPC64_PAGE_H */ |
diff --git a/include/asm-ppc64/types.h b/include/asm-ppc64/types.h index 5b8c2cfa1138..bf294c1761b2 100644 --- a/include/asm-ppc64/types.h +++ b/include/asm-ppc64/types.h | |||
@@ -72,7 +72,6 @@ typedef struct { | |||
72 | unsigned long env; | 72 | unsigned long env; |
73 | } func_descr_t; | 73 | } func_descr_t; |
74 | 74 | ||
75 | typedef unsigned int kmem_bufctl_t; | ||
76 | #endif /* __ASSEMBLY__ */ | 75 | #endif /* __ASSEMBLY__ */ |
77 | 76 | ||
78 | #endif /* __KERNEL__ */ | 77 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 92360d90144b..7127030ae162 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h | |||
@@ -52,8 +52,6 @@ struct __debug_entry{ | |||
52 | #define DEBUG_DATA(entry) (char*)(entry + 1) /* data is stored behind */ | 52 | #define DEBUG_DATA(entry) (char*)(entry + 1) /* data is stored behind */ |
53 | /* the entry information */ | 53 | /* the entry information */ |
54 | 54 | ||
55 | #define STCK(x) asm volatile ("STCK 0(%1)" : "=m" (x) : "a" (&(x)) : "cc") | ||
56 | |||
57 | typedef struct __debug_entry debug_entry_t; | 55 | typedef struct __debug_entry debug_entry_t; |
58 | 56 | ||
59 | struct debug_view; | 57 | struct debug_view; |
diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h index afe6a9f9b0ae..c6f51c9ce3ff 100644 --- a/include/asm-s390/lowcore.h +++ b/include/asm-s390/lowcore.h | |||
@@ -68,6 +68,7 @@ | |||
68 | #define __LC_SYSTEM_TIMER 0x270 | 68 | #define __LC_SYSTEM_TIMER 0x270 |
69 | #define __LC_LAST_UPDATE_CLOCK 0x278 | 69 | #define __LC_LAST_UPDATE_CLOCK 0x278 |
70 | #define __LC_STEAL_CLOCK 0x280 | 70 | #define __LC_STEAL_CLOCK 0x280 |
71 | #define __LC_RETURN_MCCK_PSW 0x288 | ||
71 | #define __LC_KERNEL_STACK 0xC40 | 72 | #define __LC_KERNEL_STACK 0xC40 |
72 | #define __LC_THREAD_INFO 0xC44 | 73 | #define __LC_THREAD_INFO 0xC44 |
73 | #define __LC_ASYNC_STACK 0xC48 | 74 | #define __LC_ASYNC_STACK 0xC48 |
@@ -90,6 +91,7 @@ | |||
90 | #define __LC_SYSTEM_TIMER 0x278 | 91 | #define __LC_SYSTEM_TIMER 0x278 |
91 | #define __LC_LAST_UPDATE_CLOCK 0x280 | 92 | #define __LC_LAST_UPDATE_CLOCK 0x280 |
92 | #define __LC_STEAL_CLOCK 0x288 | 93 | #define __LC_STEAL_CLOCK 0x288 |
94 | #define __LC_RETURN_MCCK_PSW 0x290 | ||
93 | #define __LC_KERNEL_STACK 0xD40 | 95 | #define __LC_KERNEL_STACK 0xD40 |
94 | #define __LC_THREAD_INFO 0xD48 | 96 | #define __LC_THREAD_INFO 0xD48 |
95 | #define __LC_ASYNC_STACK 0xD50 | 97 | #define __LC_ASYNC_STACK 0xD50 |
@@ -196,7 +198,8 @@ struct _lowcore | |||
196 | __u64 system_timer; /* 0x270 */ | 198 | __u64 system_timer; /* 0x270 */ |
197 | __u64 last_update_clock; /* 0x278 */ | 199 | __u64 last_update_clock; /* 0x278 */ |
198 | __u64 steal_clock; /* 0x280 */ | 200 | __u64 steal_clock; /* 0x280 */ |
199 | __u8 pad8[0xc00-0x288]; /* 0x288 */ | 201 | psw_t return_mcck_psw; /* 0x288 */ |
202 | __u8 pad8[0xc00-0x290]; /* 0x290 */ | ||
200 | 203 | ||
201 | /* System info area */ | 204 | /* System info area */ |
202 | __u32 save_area[16]; /* 0xc00 */ | 205 | __u32 save_area[16]; /* 0xc00 */ |
@@ -285,7 +288,8 @@ struct _lowcore | |||
285 | __u64 system_timer; /* 0x278 */ | 288 | __u64 system_timer; /* 0x278 */ |
286 | __u64 last_update_clock; /* 0x280 */ | 289 | __u64 last_update_clock; /* 0x280 */ |
287 | __u64 steal_clock; /* 0x288 */ | 290 | __u64 steal_clock; /* 0x288 */ |
288 | __u8 pad8[0xc00-0x290]; /* 0x290 */ | 291 | psw_t return_mcck_psw; /* 0x290 */ |
292 | __u8 pad8[0xc00-0x2a0]; /* 0x2a0 */ | ||
289 | /* System info area */ | 293 | /* System info area */ |
290 | __u64 save_area[16]; /* 0xc00 */ | 294 | __u64 save_area[16]; /* 0xc00 */ |
291 | __u8 pad9[0xd40-0xc80]; /* 0xc80 */ | 295 | __u8 pad9[0xd40-0xc80]; /* 0xc80 */ |
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index 2be287b9df88..2430c561e021 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -111,20 +111,6 @@ static inline void copy_page(void *to, void *from) | |||
111 | #define alloc_zeroed_user_highpage(vma, vaddr) alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO, vma, vaddr) | 111 | #define alloc_zeroed_user_highpage(vma, vaddr) alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO, vma, vaddr) |
112 | #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE | 112 | #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE |
113 | 113 | ||
114 | /* Pure 2^n version of get_order */ | ||
115 | extern __inline__ int get_order(unsigned long size) | ||
116 | { | ||
117 | int order; | ||
118 | |||
119 | size = (size-1) >> (PAGE_SHIFT-1); | ||
120 | order = -1; | ||
121 | do { | ||
122 | size >>= 1; | ||
123 | order++; | ||
124 | } while (size); | ||
125 | return order; | ||
126 | } | ||
127 | |||
128 | /* | 114 | /* |
129 | * These are used to make use of C type-checking.. | 115 | * These are used to make use of C type-checking.. |
130 | */ | 116 | */ |
@@ -207,4 +193,6 @@ page_get_storage_key(unsigned long addr) | |||
207 | 193 | ||
208 | #endif /* __KERNEL__ */ | 194 | #endif /* __KERNEL__ */ |
209 | 195 | ||
196 | #include <asm-generic/page.h> | ||
197 | |||
210 | #endif /* _S390_PAGE_H */ | 198 | #endif /* _S390_PAGE_H */ |
diff --git a/include/asm-s390/spinlock.h b/include/asm-s390/spinlock.h index 8ff10300f7ee..321b23bba1ec 100644 --- a/include/asm-s390/spinlock.h +++ b/include/asm-s390/spinlock.h | |||
@@ -47,7 +47,7 @@ extern int _raw_spin_trylock_retry(spinlock_t *lp, unsigned int pc); | |||
47 | 47 | ||
48 | static inline void _raw_spin_lock(spinlock_t *lp) | 48 | static inline void _raw_spin_lock(spinlock_t *lp) |
49 | { | 49 | { |
50 | unsigned long pc = (unsigned long) __builtin_return_address(0); | 50 | unsigned long pc = 1 | (unsigned long) __builtin_return_address(0); |
51 | 51 | ||
52 | if (unlikely(_raw_compare_and_swap(&lp->lock, 0, pc) != 0)) | 52 | if (unlikely(_raw_compare_and_swap(&lp->lock, 0, pc) != 0)) |
53 | _raw_spin_lock_wait(lp, pc); | 53 | _raw_spin_lock_wait(lp, pc); |
@@ -55,7 +55,7 @@ static inline void _raw_spin_lock(spinlock_t *lp) | |||
55 | 55 | ||
56 | static inline int _raw_spin_trylock(spinlock_t *lp) | 56 | static inline int _raw_spin_trylock(spinlock_t *lp) |
57 | { | 57 | { |
58 | unsigned long pc = (unsigned long) __builtin_return_address(0); | 58 | unsigned long pc = 1 | (unsigned long) __builtin_return_address(0); |
59 | 59 | ||
60 | if (likely(_raw_compare_and_swap(&lp->lock, 0, pc) == 0)) | 60 | if (likely(_raw_compare_and_swap(&lp->lock, 0, pc) == 0)) |
61 | return 1; | 61 | return 1; |
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index 3fefd61416a5..d0be3e477013 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h | |||
@@ -79,8 +79,6 @@ typedef unsigned long u64; | |||
79 | 79 | ||
80 | typedef u32 dma_addr_t; | 80 | typedef u32 dma_addr_t; |
81 | 81 | ||
82 | typedef unsigned int kmem_bufctl_t; | ||
83 | |||
84 | #ifndef __s390x__ | 82 | #ifndef __s390x__ |
85 | typedef union { | 83 | typedef union { |
86 | unsigned long long pair; | 84 | unsigned long long pair; |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 180467be8e7b..324e6cc5ecf7 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -122,24 +122,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
122 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 122 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
123 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 123 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
124 | 124 | ||
125 | #ifndef __ASSEMBLY__ | ||
126 | |||
127 | /* Pure 2^n version of get_order */ | ||
128 | static __inline__ int get_order(unsigned long size) | ||
129 | { | ||
130 | int order; | ||
131 | |||
132 | size = (size-1) >> (PAGE_SHIFT-1); | ||
133 | order = -1; | ||
134 | do { | ||
135 | size >>= 1; | ||
136 | order++; | ||
137 | } while (size); | ||
138 | return order; | ||
139 | } | ||
140 | |||
141 | #endif | ||
142 | |||
143 | #endif /* __KERNEL__ */ | 125 | #endif /* __KERNEL__ */ |
144 | 126 | ||
127 | #include <asm-generic/page.h> | ||
128 | |||
145 | #endif /* __ASM_SH_PAGE_H */ | 129 | #endif /* __ASM_SH_PAGE_H */ |
diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h index c4dc126c5621..cb7e183a0a6b 100644 --- a/include/asm-sh/types.h +++ b/include/asm-sh/types.h | |||
@@ -58,8 +58,6 @@ typedef u64 sector_t; | |||
58 | #define HAVE_SECTOR_T | 58 | #define HAVE_SECTOR_T |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | typedef unsigned int kmem_bufctl_t; | ||
62 | |||
63 | #endif /* __ASSEMBLY__ */ | 61 | #endif /* __ASSEMBLY__ */ |
64 | 62 | ||
65 | #endif /* __KERNEL__ */ | 63 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sh64/page.h b/include/asm-sh64/page.h index d6167f1c0e99..c86df90f7cbd 100644 --- a/include/asm-sh64/page.h +++ b/include/asm-sh64/page.h | |||
@@ -115,24 +115,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
115 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 115 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
116 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 116 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
117 | 117 | ||
118 | #ifndef __ASSEMBLY__ | ||
119 | |||
120 | /* Pure 2^n version of get_order */ | ||
121 | extern __inline__ int get_order(unsigned long size) | ||
122 | { | ||
123 | int order; | ||
124 | |||
125 | size = (size-1) >> (PAGE_SHIFT-1); | ||
126 | order = -1; | ||
127 | do { | ||
128 | size >>= 1; | ||
129 | order++; | ||
130 | } while (size); | ||
131 | return order; | ||
132 | } | ||
133 | |||
134 | #endif | ||
135 | |||
136 | #endif /* __KERNEL__ */ | 118 | #endif /* __KERNEL__ */ |
137 | 119 | ||
120 | #include <asm-generic/page.h> | ||
121 | |||
138 | #endif /* __ASM_SH64_PAGE_H */ | 122 | #endif /* __ASM_SH64_PAGE_H */ |
diff --git a/include/asm-sh64/types.h b/include/asm-sh64/types.h index 41d4d2f82aa9..8d41db2153b5 100644 --- a/include/asm-sh64/types.h +++ b/include/asm-sh64/types.h | |||
@@ -65,8 +65,6 @@ typedef u32 dma_addr_t; | |||
65 | #endif | 65 | #endif |
66 | typedef u64 dma64_addr_t; | 66 | typedef u64 dma64_addr_t; |
67 | 67 | ||
68 | typedef unsigned int kmem_bufctl_t; | ||
69 | |||
70 | #endif /* __ASSEMBLY__ */ | 68 | #endif /* __ASSEMBLY__ */ |
71 | 69 | ||
72 | #define BITS_PER_LONG 32 | 70 | #define BITS_PER_LONG 32 |
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index 383060e90d94..9122684f6c1e 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h | |||
@@ -132,20 +132,6 @@ BTFIXUPDEF_SETHI(sparc_unmapped_base) | |||
132 | 132 | ||
133 | #define TASK_UNMAPPED_BASE BTFIXUP_SETHI(sparc_unmapped_base) | 133 | #define TASK_UNMAPPED_BASE BTFIXUP_SETHI(sparc_unmapped_base) |
134 | 134 | ||
135 | /* Pure 2^n version of get_order */ | ||
136 | extern __inline__ int get_order(unsigned long size) | ||
137 | { | ||
138 | int order; | ||
139 | |||
140 | size = (size-1) >> (PAGE_SHIFT-1); | ||
141 | order = -1; | ||
142 | do { | ||
143 | size >>= 1; | ||
144 | order++; | ||
145 | } while (size); | ||
146 | return order; | ||
147 | } | ||
148 | |||
149 | #else /* !(__ASSEMBLY__) */ | 135 | #else /* !(__ASSEMBLY__) */ |
150 | 136 | ||
151 | #define __pgprot(x) (x) | 137 | #define __pgprot(x) (x) |
@@ -178,4 +164,6 @@ extern unsigned long pfn_base; | |||
178 | 164 | ||
179 | #endif /* __KERNEL__ */ | 165 | #endif /* __KERNEL__ */ |
180 | 166 | ||
167 | #include <asm-generic/page.h> | ||
168 | |||
181 | #endif /* _SPARC_PAGE_H */ | 169 | #endif /* _SPARC_PAGE_H */ |
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 40ed30a2b7c6..8f4f6a959651 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -435,9 +435,6 @@ extern unsigned long *sparc_valid_addr_bitmap; | |||
435 | #define kern_addr_valid(addr) \ | 435 | #define kern_addr_valid(addr) \ |
436 | (test_bit(__pa((unsigned long)(addr))>>20, sparc_valid_addr_bitmap)) | 436 | (test_bit(__pa((unsigned long)(addr))>>20, sparc_valid_addr_bitmap)) |
437 | 437 | ||
438 | extern int io_remap_page_range(struct vm_area_struct *vma, | ||
439 | unsigned long from, unsigned long to, | ||
440 | unsigned long size, pgprot_t prot, int space); | ||
441 | extern int io_remap_pfn_range(struct vm_area_struct *vma, | 438 | extern int io_remap_pfn_range(struct vm_area_struct *vma, |
442 | unsigned long from, unsigned long pfn, | 439 | unsigned long from, unsigned long pfn, |
443 | unsigned long size, pgprot_t prot); | 440 | unsigned long size, pgprot_t prot); |
diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h index 9eabf6e61ccc..42fc6ed98156 100644 --- a/include/asm-sparc/types.h +++ b/include/asm-sparc/types.h | |||
@@ -54,8 +54,6 @@ typedef unsigned long long u64; | |||
54 | typedef u32 dma_addr_t; | 54 | typedef u32 dma_addr_t; |
55 | typedef u32 dma64_addr_t; | 55 | typedef u32 dma64_addr_t; |
56 | 56 | ||
57 | typedef unsigned short kmem_bufctl_t; | ||
58 | |||
59 | #endif /* __ASSEMBLY__ */ | 57 | #endif /* __ASSEMBLY__ */ |
60 | 58 | ||
61 | #endif /* __KERNEL__ */ | 59 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h index cc7198aaac50..9a3a81f1cc58 100644 --- a/include/asm-sparc64/cpudata.h +++ b/include/asm-sparc64/cpudata.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* cpudata.h: Per-cpu parameters. | 1 | /* cpudata.h: Per-cpu parameters. |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2005 David S. Miller (davem@redhat.com) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _SPARC64_CPUDATA_H | 6 | #ifndef _SPARC64_CPUDATA_H |
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | typedef struct { | 11 | typedef struct { |
12 | /* Dcache line 1 */ | 12 | /* Dcache line 1 */ |
13 | unsigned int __pad0; /* bh_count moved to irq_stat for consistency. KAO */ | 13 | unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ |
14 | unsigned int multiplier; | 14 | unsigned int multiplier; |
15 | unsigned int counter; | 15 | unsigned int counter; |
16 | unsigned int idle_volume; | 16 | unsigned int idle_volume; |
diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h index d6db1aed7645..f0cf71376ec5 100644 --- a/include/asm-sparc64/hardirq.h +++ b/include/asm-sparc64/hardirq.h | |||
@@ -1,22 +1,16 @@ | |||
1 | /* hardirq.h: 64-bit Sparc hard IRQ support. | 1 | /* hardirq.h: 64-bit Sparc hard IRQ support. |
2 | * | 2 | * |
3 | * Copyright (C) 1997, 1998 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1997, 1998, 2005 David S. Miller (davem@davemloft.net) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __SPARC64_HARDIRQ_H | 6 | #ifndef __SPARC64_HARDIRQ_H |
7 | #define __SPARC64_HARDIRQ_H | 7 | #define __SPARC64_HARDIRQ_H |
8 | 8 | ||
9 | #include <linux/config.h> | 9 | #include <asm/cpudata.h> |
10 | #include <linux/threads.h> | ||
11 | #include <linux/spinlock.h> | ||
12 | #include <linux/cache.h> | ||
13 | 10 | ||
14 | /* rtrap.S is sensitive to the offsets of these fields */ | 11 | #define __ARCH_IRQ_STAT |
15 | typedef struct { | 12 | #define local_softirq_pending() \ |
16 | unsigned int __softirq_pending; | 13 | (local_cpu_data().__softirq_pending) |
17 | } ____cacheline_aligned irq_cpustat_t; | ||
18 | |||
19 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
20 | 14 | ||
21 | #define HARDIRQ_BITS 8 | 15 | #define HARDIRQ_BITS 8 |
22 | 16 | ||
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index afdcea90707a..0056770e83ad 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -100,18 +100,41 @@ static __inline__ void _outl(u32 l, unsigned long addr) | |||
100 | #define inl_p(__addr) inl(__addr) | 100 | #define inl_p(__addr) inl(__addr) |
101 | #define outl_p(__l, __addr) outl(__l, __addr) | 101 | #define outl_p(__l, __addr) outl(__l, __addr) |
102 | 102 | ||
103 | extern void outsb(void __iomem *addr, const void *src, unsigned long count); | 103 | extern void outsb(unsigned long, const void *, unsigned long); |
104 | extern void outsw(void __iomem *addr, const void *src, unsigned long count); | 104 | extern void outsw(unsigned long, const void *, unsigned long); |
105 | extern void outsl(void __iomem *addr, const void *src, unsigned long count); | 105 | extern void outsl(unsigned long, const void *, unsigned long); |
106 | extern void insb(void __iomem *addr, void *dst, unsigned long count); | 106 | extern void insb(unsigned long, void *, unsigned long); |
107 | extern void insw(void __iomem *addr, void *dst, unsigned long count); | 107 | extern void insw(unsigned long, void *, unsigned long); |
108 | extern void insl(void __iomem *addr, void *dst, unsigned long count); | 108 | extern void insl(unsigned long, void *, unsigned long); |
109 | #define ioread8_rep(a,d,c) insb(a,d,c) | 109 | |
110 | #define ioread16_rep(a,d,c) insw(a,d,c) | 110 | static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) |
111 | #define ioread32_rep(a,d,c) insl(a,d,c) | 111 | { |
112 | #define iowrite8_rep(a,s,c) outsb(a,s,c) | 112 | insb((unsigned long __force)port, buf, count); |
113 | #define iowrite16_rep(a,s,c) outsw(a,s,c) | 113 | } |
114 | #define iowrite32_rep(a,s,c) outsl(a,s,c) | 114 | static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count) |
115 | { | ||
116 | insw((unsigned long __force)port, buf, count); | ||
117 | } | ||
118 | |||
119 | static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count) | ||
120 | { | ||
121 | insl((unsigned long __force)port, buf, count); | ||
122 | } | ||
123 | |||
124 | static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count) | ||
125 | { | ||
126 | outsb((unsigned long __force)port, buf, count); | ||
127 | } | ||
128 | |||
129 | static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count) | ||
130 | { | ||
131 | outsw((unsigned long __force)port, buf, count); | ||
132 | } | ||
133 | |||
134 | static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count) | ||
135 | { | ||
136 | outsl((unsigned long __force)port, buf, count); | ||
137 | } | ||
115 | 138 | ||
116 | /* Memory functions, same as I/O accesses on Ultra. */ | 139 | /* Memory functions, same as I/O accesses on Ultra. */ |
117 | static inline u8 _readb(const volatile void __iomem *addr) | 140 | static inline u8 _readb(const volatile void __iomem *addr) |
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index b87dbbd64bc9..c9f8ef208ea5 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -150,20 +150,6 @@ struct sparc_phys_banks { | |||
150 | 150 | ||
151 | extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; | 151 | extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; |
152 | 152 | ||
153 | /* Pure 2^n version of get_order */ | ||
154 | static __inline__ int get_order(unsigned long size) | ||
155 | { | ||
156 | int order; | ||
157 | |||
158 | size = (size-1) >> (PAGE_SHIFT-1); | ||
159 | order = -1; | ||
160 | do { | ||
161 | size >>= 1; | ||
162 | order++; | ||
163 | } while (size); | ||
164 | return order; | ||
165 | } | ||
166 | |||
167 | #endif /* !(__ASSEMBLY__) */ | 153 | #endif /* !(__ASSEMBLY__) */ |
168 | 154 | ||
169 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 155 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
@@ -171,4 +157,6 @@ static __inline__ int get_order(unsigned long size) | |||
171 | 157 | ||
172 | #endif /* !(__KERNEL__) */ | 158 | #endif /* !(__KERNEL__) */ |
173 | 159 | ||
160 | #include <asm-generic/page.h> | ||
161 | |||
174 | #endif /* !(_SPARC64_PAGE_H) */ | 162 | #endif /* !(_SPARC64_PAGE_H) */ |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 1ae00c5087f1..a2b4f5ed4625 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -410,9 +410,6 @@ extern unsigned long *sparc64_valid_addr_bitmap; | |||
410 | #define kern_addr_valid(addr) \ | 410 | #define kern_addr_valid(addr) \ |
411 | (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) | 411 | (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) |
412 | 412 | ||
413 | extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, | ||
414 | unsigned long offset, | ||
415 | unsigned long size, pgprot_t prot, int space); | ||
416 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 413 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
417 | unsigned long pfn, | 414 | unsigned long pfn, |
418 | unsigned long size, pgprot_t prot); | 415 | unsigned long size, pgprot_t prot); |
diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h index 6248ed1a9a7a..d0ee7f105838 100644 --- a/include/asm-sparc64/types.h +++ b/include/asm-sparc64/types.h | |||
@@ -56,8 +56,6 @@ typedef unsigned long u64; | |||
56 | typedef u32 dma_addr_t; | 56 | typedef u32 dma_addr_t; |
57 | typedef u64 dma64_addr_t; | 57 | typedef u64 dma64_addr_t; |
58 | 58 | ||
59 | typedef unsigned short kmem_bufctl_t; | ||
60 | |||
61 | #endif /* __ASSEMBLY__ */ | 59 | #endif /* __ASSEMBLY__ */ |
62 | 60 | ||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 095bb627b96a..2edb4f1f789c 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h | |||
@@ -20,7 +20,15 @@ extern void force_flush_all(void); | |||
20 | 20 | ||
21 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) | 21 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) |
22 | { | 22 | { |
23 | if (old != new) | 23 | /* |
24 | * This is called by fs/exec.c and fs/aio.c. In the first case, for an | ||
25 | * exec, we don't need to do anything as we're called from userspace | ||
26 | * and thus going to use a new host PID. In the second, we're called | ||
27 | * from a kernel thread, and thus need to go doing the mmap's on the | ||
28 | * host. Since they're very expensive, we want to avoid that as far as | ||
29 | * possible. | ||
30 | */ | ||
31 | if (old != new && (current->flags & PF_BORROWED_MM)) | ||
24 | force_flush_all(); | 32 | force_flush_all(); |
25 | } | 33 | } |
26 | 34 | ||
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index f58aedadeb4e..bd850a249183 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -116,24 +116,12 @@ extern void *to_virt(unsigned long phys); | |||
116 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 116 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
117 | #define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v))) | 117 | #define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v))) |
118 | 118 | ||
119 | /* Pure 2^n version of get_order */ | ||
120 | static __inline__ int get_order(unsigned long size) | ||
121 | { | ||
122 | int order; | ||
123 | |||
124 | size = (size-1) >> (PAGE_SHIFT-1); | ||
125 | order = -1; | ||
126 | do { | ||
127 | size >>= 1; | ||
128 | order++; | ||
129 | } while (size); | ||
130 | return order; | ||
131 | } | ||
132 | |||
133 | extern struct page *arch_validate(struct page *page, int mask, int order); | 119 | extern struct page *arch_validate(struct page *page, int mask, int order); |
134 | #define HAVE_ARCH_VALIDATE | 120 | #define HAVE_ARCH_VALIDATE |
135 | 121 | ||
136 | extern void arch_free_page(struct page *page, int order); | 122 | extern void arch_free_page(struct page *page, int order); |
137 | #define HAVE_ARCH_FREE_PAGE | 123 | #define HAVE_ARCH_FREE_PAGE |
138 | 124 | ||
125 | #include <asm-generic/page.h> | ||
126 | |||
139 | #endif | 127 | #endif |
diff --git a/include/asm-um/pgalloc.h b/include/asm-um/pgalloc.h index 8fcb2fc0a892..ea49411236dc 100644 --- a/include/asm-um/pgalloc.h +++ b/include/asm-um/pgalloc.h | |||
@@ -42,11 +42,13 @@ static inline void pte_free(struct page *pte) | |||
42 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 42 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) |
43 | 43 | ||
44 | #ifdef CONFIG_3_LEVEL_PGTABLES | 44 | #ifdef CONFIG_3_LEVEL_PGTABLES |
45 | /* | 45 | |
46 | * In the 3-level case we free the pmds as part of the pgd. | 46 | extern __inline__ void pmd_free(pmd_t *pmd) |
47 | */ | 47 | { |
48 | #define pmd_free(x) do { } while (0) | 48 | free_page((unsigned long)pmd); |
49 | #define __pmd_free_tlb(tlb,x) do { } while (0) | 49 | } |
50 | |||
51 | #define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) | ||
50 | #endif | 52 | #endif |
51 | 53 | ||
52 | #define check_pgt_cache() do { } while (0) | 54 | #define check_pgt_cache() do { } while (0) |
diff --git a/include/asm-um/pgtable-2level.h b/include/asm-um/pgtable-2level.h index 9b3abc01d60e..ffe017f6b64b 100644 --- a/include/asm-um/pgtable-2level.h +++ b/include/asm-um/pgtable-2level.h | |||
@@ -35,35 +35,8 @@ | |||
35 | static inline int pgd_newpage(pgd_t pgd) { return 0; } | 35 | static inline int pgd_newpage(pgd_t pgd) { return 0; } |
36 | static inline void pgd_mkuptodate(pgd_t pgd) { } | 36 | static inline void pgd_mkuptodate(pgd_t pgd) { } |
37 | 37 | ||
38 | #define pte_present(x) (pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
39 | |||
40 | static inline pte_t pte_mknewprot(pte_t pte) | ||
41 | { | ||
42 | pte_val(pte) |= _PAGE_NEWPROT; | ||
43 | return(pte); | ||
44 | } | ||
45 | |||
46 | static inline pte_t pte_mknewpage(pte_t pte) | ||
47 | { | ||
48 | pte_val(pte) |= _PAGE_NEWPAGE; | ||
49 | return(pte); | ||
50 | } | ||
51 | |||
52 | static inline void set_pte(pte_t *pteptr, pte_t pteval) | ||
53 | { | ||
54 | /* If it's a swap entry, it needs to be marked _PAGE_NEWPAGE so | ||
55 | * fix_range knows to unmap it. _PAGE_NEWPROT is specific to | ||
56 | * mapped pages. | ||
57 | */ | ||
58 | *pteptr = pte_mknewpage(pteval); | ||
59 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); | ||
60 | } | ||
61 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
62 | |||
63 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) | 38 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) |
64 | 39 | ||
65 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
66 | #define pte_none(x) !(pte_val(x) & ~_PAGE_NEWPAGE) | ||
67 | #define pte_pfn(x) phys_to_pfn(pte_val(x)) | 40 | #define pte_pfn(x) phys_to_pfn(pte_val(x)) |
68 | #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) | 41 | #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) |
69 | #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) | 42 | #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) |
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h index 65e8bfc55fc4..786c25727289 100644 --- a/include/asm-um/pgtable-3level.h +++ b/include/asm-um/pgtable-3level.h | |||
@@ -57,35 +57,6 @@ static inline int pgd_newpage(pgd_t pgd) | |||
57 | 57 | ||
58 | static inline void pgd_mkuptodate(pgd_t pgd) { pgd_val(pgd) &= ~_PAGE_NEWPAGE; } | 58 | static inline void pgd_mkuptodate(pgd_t pgd) { pgd_val(pgd) &= ~_PAGE_NEWPAGE; } |
59 | 59 | ||
60 | |||
61 | #define pte_present(x) pte_get_bits(x, (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
62 | |||
63 | static inline pte_t pte_mknewprot(pte_t pte) | ||
64 | { | ||
65 | pte_set_bits(pte, _PAGE_NEWPROT); | ||
66 | return(pte); | ||
67 | } | ||
68 | |||
69 | static inline pte_t pte_mknewpage(pte_t pte) | ||
70 | { | ||
71 | pte_set_bits(pte, _PAGE_NEWPAGE); | ||
72 | return(pte); | ||
73 | } | ||
74 | |||
75 | static inline void set_pte(pte_t *pteptr, pte_t pteval) | ||
76 | { | ||
77 | pte_copy(*pteptr, pteval); | ||
78 | |||
79 | /* If it's a swap entry, it needs to be marked _PAGE_NEWPAGE so | ||
80 | * fix_range knows to unmap it. _PAGE_NEWPROT is specific to | ||
81 | * mapped pages. | ||
82 | */ | ||
83 | |||
84 | *pteptr = pte_mknewpage(*pteptr); | ||
85 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); | ||
86 | } | ||
87 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
88 | |||
89 | #define set_pmd(pmdptr, pmdval) set_64bit((phys_t *) (pmdptr), pmd_val(pmdval)) | 60 | #define set_pmd(pmdptr, pmdval) set_64bit((phys_t *) (pmdptr), pmd_val(pmdval)) |
90 | 61 | ||
91 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | 62 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) |
@@ -98,14 +69,11 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | |||
98 | return pmd; | 69 | return pmd; |
99 | } | 70 | } |
100 | 71 | ||
101 | static inline void pmd_free(pmd_t *pmd){ | 72 | extern inline void pud_clear (pud_t *pud) |
102 | free_page((unsigned long) pmd); | 73 | { |
74 | set_pud(pud, __pud(0)); | ||
103 | } | 75 | } |
104 | 76 | ||
105 | #define __pmd_free_tlb(tlb,x) do { } while (0) | ||
106 | |||
107 | static inline void pud_clear (pud_t * pud) { } | ||
108 | |||
109 | #define pud_page(pud) \ | 77 | #define pud_page(pud) \ |
110 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) | 78 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) |
111 | 79 | ||
@@ -113,13 +81,6 @@ static inline void pud_clear (pud_t * pud) { } | |||
113 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ | 81 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ |
114 | pmd_index(address)) | 82 | pmd_index(address)) |
115 | 83 | ||
116 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
117 | |||
118 | static inline int pte_none(pte_t pte) | ||
119 | { | ||
120 | return pte_is_zero(pte); | ||
121 | } | ||
122 | |||
123 | static inline unsigned long pte_pfn(pte_t pte) | 84 | static inline unsigned long pte_pfn(pte_t pte) |
124 | { | 85 | { |
125 | return phys_to_pfn(pte_val(pte)); | 86 | return phys_to_pfn(pte_val(pte)); |
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index a88040920311..b48e0966ecd7 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -16,13 +16,15 @@ | |||
16 | 16 | ||
17 | #define _PAGE_PRESENT 0x001 | 17 | #define _PAGE_PRESENT 0x001 |
18 | #define _PAGE_NEWPAGE 0x002 | 18 | #define _PAGE_NEWPAGE 0x002 |
19 | #define _PAGE_NEWPROT 0x004 | 19 | #define _PAGE_NEWPROT 0x004 |
20 | #define _PAGE_FILE 0x008 /* set:pagecache unset:swap */ | ||
21 | #define _PAGE_PROTNONE 0x010 /* If not present */ | ||
22 | #define _PAGE_RW 0x020 | 20 | #define _PAGE_RW 0x020 |
23 | #define _PAGE_USER 0x040 | 21 | #define _PAGE_USER 0x040 |
24 | #define _PAGE_ACCESSED 0x080 | 22 | #define _PAGE_ACCESSED 0x080 |
25 | #define _PAGE_DIRTY 0x100 | 23 | #define _PAGE_DIRTY 0x100 |
24 | /* If _PAGE_PRESENT is clear, we use these: */ | ||
25 | #define _PAGE_FILE 0x008 /* nonlinear file mapping, saved PTE; unset:swap */ | ||
26 | #define _PAGE_PROTNONE 0x010 /* if the user mapped it with PROT_NONE; | ||
27 | pte_present gives true */ | ||
26 | 28 | ||
27 | #ifdef CONFIG_3_LEVEL_PGTABLES | 29 | #ifdef CONFIG_3_LEVEL_PGTABLES |
28 | #include "asm/pgtable-3level.h" | 30 | #include "asm/pgtable-3level.h" |
@@ -151,10 +153,24 @@ extern unsigned long pg0[1024]; | |||
151 | 153 | ||
152 | #define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK) | 154 | #define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK) |
153 | 155 | ||
156 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
154 | #define pte_address(x) (__va(pte_val(x) & PAGE_MASK)) | 157 | #define pte_address(x) (__va(pte_val(x) & PAGE_MASK)) |
155 | #define mk_phys(a, r) ((a) + (((unsigned long) r) << REGION_SHIFT)) | 158 | #define mk_phys(a, r) ((a) + (((unsigned long) r) << REGION_SHIFT)) |
156 | #define phys_addr(p) ((p) & ~REGION_MASK) | 159 | #define phys_addr(p) ((p) & ~REGION_MASK) |
157 | 160 | ||
161 | #define pte_present(x) pte_get_bits(x, (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
162 | |||
163 | /* | ||
164 | * ================================= | ||
165 | * Flags checking section. | ||
166 | * ================================= | ||
167 | */ | ||
168 | |||
169 | static inline int pte_none(pte_t pte) | ||
170 | { | ||
171 | return pte_is_zero(pte); | ||
172 | } | ||
173 | |||
158 | /* | 174 | /* |
159 | * The following only work if pte_present() is true. | 175 | * The following only work if pte_present() is true. |
160 | * Undefined behaviour if not.. | 176 | * Undefined behaviour if not.. |
@@ -210,6 +226,18 @@ static inline int pte_newprot(pte_t pte) | |||
210 | return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT))); | 226 | return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT))); |
211 | } | 227 | } |
212 | 228 | ||
229 | /* | ||
230 | * ================================= | ||
231 | * Flags setting section. | ||
232 | * ================================= | ||
233 | */ | ||
234 | |||
235 | static inline pte_t pte_mknewprot(pte_t pte) | ||
236 | { | ||
237 | pte_set_bits(pte, _PAGE_NEWPROT); | ||
238 | return(pte); | ||
239 | } | ||
240 | |||
213 | static inline pte_t pte_rdprotect(pte_t pte) | 241 | static inline pte_t pte_rdprotect(pte_t pte) |
214 | { | 242 | { |
215 | pte_clear_bits(pte, _PAGE_USER); | 243 | pte_clear_bits(pte, _PAGE_USER); |
@@ -278,6 +306,26 @@ static inline pte_t pte_mkuptodate(pte_t pte) | |||
278 | return(pte); | 306 | return(pte); |
279 | } | 307 | } |
280 | 308 | ||
309 | static inline pte_t pte_mknewpage(pte_t pte) | ||
310 | { | ||
311 | pte_set_bits(pte, _PAGE_NEWPAGE); | ||
312 | return(pte); | ||
313 | } | ||
314 | |||
315 | static inline void set_pte(pte_t *pteptr, pte_t pteval) | ||
316 | { | ||
317 | pte_copy(*pteptr, pteval); | ||
318 | |||
319 | /* If it's a swap entry, it needs to be marked _PAGE_NEWPAGE so | ||
320 | * fix_range knows to unmap it. _PAGE_NEWPROT is specific to | ||
321 | * mapped pages. | ||
322 | */ | ||
323 | |||
324 | *pteptr = pte_mknewpage(*pteptr); | ||
325 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); | ||
326 | } | ||
327 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
328 | |||
281 | extern phys_t page_to_phys(struct page *page); | 329 | extern phys_t page_to_phys(struct page *page); |
282 | 330 | ||
283 | /* | 331 | /* |
diff --git a/include/asm-v850/page.h b/include/asm-v850/page.h index d6091622935d..b4bc85e7b91a 100644 --- a/include/asm-v850/page.h +++ b/include/asm-v850/page.h | |||
@@ -98,25 +98,6 @@ typedef unsigned long pgprot_t; | |||
98 | #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) | 98 | #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) |
99 | 99 | ||
100 | 100 | ||
101 | #ifndef __ASSEMBLY__ | ||
102 | |||
103 | /* Pure 2^n version of get_order */ | ||
104 | extern __inline__ int get_order (unsigned long size) | ||
105 | { | ||
106 | int order; | ||
107 | |||
108 | size = (size-1) >> (PAGE_SHIFT-1); | ||
109 | order = -1; | ||
110 | do { | ||
111 | size >>= 1; | ||
112 | order++; | ||
113 | } while (size); | ||
114 | return order; | ||
115 | } | ||
116 | |||
117 | #endif /* !__ASSEMBLY__ */ | ||
118 | |||
119 | |||
120 | /* No current v850 processor has virtual memory. */ | 101 | /* No current v850 processor has virtual memory. */ |
121 | #define __virt_to_phys(addr) (addr) | 102 | #define __virt_to_phys(addr) (addr) |
122 | #define __phys_to_virt(addr) (addr) | 103 | #define __phys_to_virt(addr) (addr) |
@@ -144,4 +125,6 @@ extern __inline__ int get_order (unsigned long size) | |||
144 | 125 | ||
145 | #endif /* KERNEL */ | 126 | #endif /* KERNEL */ |
146 | 127 | ||
128 | #include <asm-generic/page.h> | ||
129 | |||
147 | #endif /* __V850_PAGE_H__ */ | 130 | #endif /* __V850_PAGE_H__ */ |
diff --git a/include/asm-v850/types.h b/include/asm-v850/types.h index e7cfe5b33a10..dcef57196875 100644 --- a/include/asm-v850/types.h +++ b/include/asm-v850/types.h | |||
@@ -59,8 +59,6 @@ typedef unsigned long long u64; | |||
59 | 59 | ||
60 | typedef u32 dma_addr_t; | 60 | typedef u32 dma_addr_t; |
61 | 61 | ||
62 | typedef unsigned int kmem_bufctl_t; | ||
63 | |||
64 | #endif /* !__ASSEMBLY__ */ | 62 | #endif /* !__ASSEMBLY__ */ |
65 | 63 | ||
66 | #endif /* __KERNEL__ */ | 64 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index 431318764af6..135ffaa0393b 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) | 28 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) |
29 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 29 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
30 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 30 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
31 | #define ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
32 | 31 | ||
33 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
34 | #ifndef __ASSEMBLY__ | 33 | #ifndef __ASSEMBLY__ |
@@ -92,20 +91,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
92 | 91 | ||
93 | #include <asm/bug.h> | 92 | #include <asm/bug.h> |
94 | 93 | ||
95 | /* Pure 2^n version of get_order */ | ||
96 | extern __inline__ int get_order(unsigned long size) | ||
97 | { | ||
98 | int order; | ||
99 | |||
100 | size = (size-1) >> (PAGE_SHIFT-1); | ||
101 | order = -1; | ||
102 | do { | ||
103 | size >>= 1; | ||
104 | order++; | ||
105 | } while (size); | ||
106 | return order; | ||
107 | } | ||
108 | |||
109 | #endif /* __ASSEMBLY__ */ | 94 | #endif /* __ASSEMBLY__ */ |
110 | 95 | ||
111 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | 96 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) |
@@ -141,4 +126,6 @@ extern __inline__ int get_order(unsigned long size) | |||
141 | 126 | ||
142 | #endif /* __KERNEL__ */ | 127 | #endif /* __KERNEL__ */ |
143 | 128 | ||
129 | #include <asm-generic/page.h> | ||
130 | |||
144 | #endif /* _X86_64_PAGE_H */ | 131 | #endif /* _X86_64_PAGE_H */ |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 4e167b5ea8f3..5e0f2fdab0d3 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -104,6 +104,19 @@ extern inline void pgd_clear (pgd_t * pgd) | |||
104 | ((unsigned long) __va(pud_val(pud) & PHYSICAL_PAGE_MASK)) | 104 | ((unsigned long) __va(pud_val(pud) & PHYSICAL_PAGE_MASK)) |
105 | 105 | ||
106 | #define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0)) | 106 | #define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0)) |
107 | |||
108 | static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) | ||
109 | { | ||
110 | pte_t pte; | ||
111 | if (full) { | ||
112 | pte = *ptep; | ||
113 | *ptep = __pte(0); | ||
114 | } else { | ||
115 | pte = ptep_get_and_clear(mm, addr, ptep); | ||
116 | } | ||
117 | return pte; | ||
118 | } | ||
119 | |||
107 | #define pte_same(a, b) ((a).pte == (b).pte) | 120 | #define pte_same(a, b) ((a).pte == (b).pte) |
108 | 121 | ||
109 | #define PMD_SIZE (1UL << PMD_SHIFT) | 122 | #define PMD_SIZE (1UL << PMD_SHIFT) |
@@ -143,7 +156,7 @@ extern inline void pgd_clear (pgd_t * pgd) | |||
143 | #define _PAGE_ACCESSED 0x020 | 156 | #define _PAGE_ACCESSED 0x020 |
144 | #define _PAGE_DIRTY 0x040 | 157 | #define _PAGE_DIRTY 0x040 |
145 | #define _PAGE_PSE 0x080 /* 2MB page */ | 158 | #define _PAGE_PSE 0x080 /* 2MB page */ |
146 | #define _PAGE_FILE 0x040 /* set:pagecache, unset:swap */ | 159 | #define _PAGE_FILE 0x040 /* nonlinear file mapping, saved PTE; unset:swap */ |
147 | #define _PAGE_GLOBAL 0x100 /* Global TLB entry */ | 160 | #define _PAGE_GLOBAL 0x100 /* Global TLB entry */ |
148 | 161 | ||
149 | #define _PAGE_PROTNONE 0x080 /* If not present */ | 162 | #define _PAGE_PROTNONE 0x080 /* If not present */ |
@@ -247,6 +260,7 @@ static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) | |||
247 | * The following only work if pte_present() is true. | 260 | * The following only work if pte_present() is true. |
248 | * Undefined behaviour if not.. | 261 | * Undefined behaviour if not.. |
249 | */ | 262 | */ |
263 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) | ||
250 | static inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 264 | static inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; } |
251 | extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 265 | extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } |
252 | extern inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 266 | extern inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; } |
@@ -254,8 +268,8 @@ extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | |||
254 | extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 268 | extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
255 | extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 269 | extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
256 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 270 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
271 | static inline int pte_huge(pte_t pte) { return (pte_val(pte) & __LARGE_PTE) == __LARGE_PTE; } | ||
257 | 272 | ||
258 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) | ||
259 | extern inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | 273 | extern inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } |
260 | extern inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | 274 | extern inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } |
261 | extern inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } | 275 | extern inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } |
@@ -433,6 +447,7 @@ extern int kern_addr_valid(unsigned long addr); | |||
433 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 447 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
434 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY | 448 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY |
435 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 449 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
450 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | ||
436 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT | 451 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT |
437 | #define __HAVE_ARCH_PTE_SAME | 452 | #define __HAVE_ARCH_PTE_SAME |
438 | #include <asm-generic/pgtable.h> | 453 | #include <asm-generic/pgtable.h> |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 85549e656eeb..194160f6a43f 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -437,6 +437,11 @@ static inline void prefetchw(void *x) | |||
437 | outb((data), 0x23); \ | 437 | outb((data), 0x23); \ |
438 | } while (0) | 438 | } while (0) |
439 | 439 | ||
440 | static inline void serialize_cpu(void) | ||
441 | { | ||
442 | __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); | ||
443 | } | ||
444 | |||
440 | static inline void __monitor(const void *eax, unsigned long ecx, | 445 | static inline void __monitor(const void *eax, unsigned long ecx, |
441 | unsigned long edx) | 446 | unsigned long edx) |
442 | { | 447 | { |
diff --git a/include/asm-x86_64/types.h b/include/asm-x86_64/types.h index 32bd1426b523..c86c2e6793e2 100644 --- a/include/asm-x86_64/types.h +++ b/include/asm-x86_64/types.h | |||
@@ -51,8 +51,6 @@ typedef u64 dma_addr_t; | |||
51 | typedef u64 sector_t; | 51 | typedef u64 sector_t; |
52 | #define HAVE_SECTOR_T | 52 | #define HAVE_SECTOR_T |
53 | 53 | ||
54 | typedef unsigned short kmem_bufctl_t; | ||
55 | |||
56 | #endif /* __ASSEMBLY__ */ | 54 | #endif /* __ASSEMBLY__ */ |
57 | 55 | ||
58 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index d72bcb32ba4f..24f86f0e43cf 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h | |||
@@ -66,7 +66,7 @@ typedef struct { volatile int counter; } atomic_t; | |||
66 | * | 66 | * |
67 | * Atomically adds @i to @v. | 67 | * Atomically adds @i to @v. |
68 | */ | 68 | */ |
69 | extern __inline__ void atomic_add(int i, atomic_t * v) | 69 | static inline void atomic_add(int i, atomic_t * v) |
70 | { | 70 | { |
71 | unsigned int vval; | 71 | unsigned int vval; |
72 | 72 | ||
@@ -90,7 +90,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v) | |||
90 | * | 90 | * |
91 | * Atomically subtracts @i from @v. | 91 | * Atomically subtracts @i from @v. |
92 | */ | 92 | */ |
93 | extern __inline__ void atomic_sub(int i, atomic_t *v) | 93 | static inline void atomic_sub(int i, atomic_t *v) |
94 | { | 94 | { |
95 | unsigned int vval; | 95 | unsigned int vval; |
96 | 96 | ||
@@ -111,7 +111,7 @@ extern __inline__ void atomic_sub(int i, atomic_t *v) | |||
111 | * We use atomic_{add|sub}_return to define other functions. | 111 | * We use atomic_{add|sub}_return to define other functions. |
112 | */ | 112 | */ |
113 | 113 | ||
114 | extern __inline__ int atomic_add_return(int i, atomic_t * v) | 114 | static inline int atomic_add_return(int i, atomic_t * v) |
115 | { | 115 | { |
116 | unsigned int vval; | 116 | unsigned int vval; |
117 | 117 | ||
@@ -130,7 +130,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v) | |||
130 | return vval; | 130 | return vval; |
131 | } | 131 | } |
132 | 132 | ||
133 | extern __inline__ int atomic_sub_return(int i, atomic_t * v) | 133 | static inline int atomic_sub_return(int i, atomic_t * v) |
134 | { | 134 | { |
135 | unsigned int vval; | 135 | unsigned int vval; |
136 | 136 | ||
@@ -224,7 +224,7 @@ extern __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
224 | #define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0) | 224 | #define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0) |
225 | 225 | ||
226 | 226 | ||
227 | extern __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v) | 227 | static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) |
228 | { | 228 | { |
229 | unsigned int all_f = -1; | 229 | unsigned int all_f = -1; |
230 | unsigned int vval; | 230 | unsigned int vval; |
@@ -243,7 +243,7 @@ extern __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v) | |||
243 | ); | 243 | ); |
244 | } | 244 | } |
245 | 245 | ||
246 | extern __inline__ void atomic_set_mask(unsigned int mask, atomic_t *v) | 246 | static inline void atomic_set_mask(unsigned int mask, atomic_t *v) |
247 | { | 247 | { |
248 | unsigned int vval; | 248 | unsigned int vval; |
249 | 249 | ||
diff --git a/include/asm-xtensa/checksum.h b/include/asm-xtensa/checksum.h index 1a00fad19929..81a797ae3abe 100644 --- a/include/asm-xtensa/checksum.h +++ b/include/asm-xtensa/checksum.h | |||
@@ -47,14 +47,14 @@ asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, i | |||
47 | * If you use these functions directly please don't forget the | 47 | * If you use these functions directly please don't forget the |
48 | * verify_area(). | 48 | * verify_area(). |
49 | */ | 49 | */ |
50 | extern __inline__ | 50 | static inline |
51 | unsigned int csum_partial_copy_nocheck ( const char *src, char *dst, | 51 | unsigned int csum_partial_copy_nocheck ( const char *src, char *dst, |
52 | int len, int sum) | 52 | int len, int sum) |
53 | { | 53 | { |
54 | return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL); | 54 | return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL); |
55 | } | 55 | } |
56 | 56 | ||
57 | extern __inline__ | 57 | static inline |
58 | unsigned int csum_partial_copy_from_user ( const char *src, char *dst, | 58 | unsigned int csum_partial_copy_from_user ( const char *src, char *dst, |
59 | int len, int sum, int *err_ptr) | 59 | int len, int sum, int *err_ptr) |
60 | { | 60 | { |
diff --git a/include/asm-xtensa/delay.h b/include/asm-xtensa/delay.h index 0a123d53a636..1bc601ec3621 100644 --- a/include/asm-xtensa/delay.h +++ b/include/asm-xtensa/delay.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | extern unsigned long loops_per_jiffy; | 19 | extern unsigned long loops_per_jiffy; |
20 | 20 | ||
21 | extern __inline__ void __delay(unsigned long loops) | 21 | static inline void __delay(unsigned long loops) |
22 | { | 22 | { |
23 | /* 2 cycles per loop. */ | 23 | /* 2 cycles per loop. */ |
24 | __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" | 24 | __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" |
diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h index 2c471c42ecfc..c5c13985bbe1 100644 --- a/include/asm-xtensa/io.h +++ b/include/asm-xtensa/io.h | |||
@@ -41,12 +41,12 @@ static inline unsigned int _swapl (unsigned int v) | |||
41 | * These are trivial on the 1:1 Linux/Xtensa mapping | 41 | * These are trivial on the 1:1 Linux/Xtensa mapping |
42 | */ | 42 | */ |
43 | 43 | ||
44 | extern inline unsigned long virt_to_phys(volatile void * address) | 44 | static inline unsigned long virt_to_phys(volatile void * address) |
45 | { | 45 | { |
46 | return PHYSADDR((unsigned long)address); | 46 | return PHYSADDR((unsigned long)address); |
47 | } | 47 | } |
48 | 48 | ||
49 | extern inline void * phys_to_virt(unsigned long address) | 49 | static inline void * phys_to_virt(unsigned long address) |
50 | { | 50 | { |
51 | return (void*) CACHED_ADDR(address); | 51 | return (void*) CACHED_ADDR(address); |
52 | } | 52 | } |
@@ -55,12 +55,12 @@ extern inline void * phys_to_virt(unsigned long address) | |||
55 | * IO bus memory addresses are also 1:1 with the physical address | 55 | * IO bus memory addresses are also 1:1 with the physical address |
56 | */ | 56 | */ |
57 | 57 | ||
58 | extern inline unsigned long virt_to_bus(volatile void * address) | 58 | static inline unsigned long virt_to_bus(volatile void * address) |
59 | { | 59 | { |
60 | return PHYSADDR((unsigned long)address); | 60 | return PHYSADDR((unsigned long)address); |
61 | } | 61 | } |
62 | 62 | ||
63 | extern inline void * bus_to_virt (unsigned long address) | 63 | static inline void * bus_to_virt (unsigned long address) |
64 | { | 64 | { |
65 | return (void *) CACHED_ADDR(address); | 65 | return (void *) CACHED_ADDR(address); |
66 | } | 66 | } |
@@ -69,17 +69,17 @@ extern inline void * bus_to_virt (unsigned long address) | |||
69 | * Change "struct page" to physical address. | 69 | * Change "struct page" to physical address. |
70 | */ | 70 | */ |
71 | 71 | ||
72 | extern inline void *ioremap(unsigned long offset, unsigned long size) | 72 | static inline void *ioremap(unsigned long offset, unsigned long size) |
73 | { | 73 | { |
74 | return (void *) CACHED_ADDR_IO(offset); | 74 | return (void *) CACHED_ADDR_IO(offset); |
75 | } | 75 | } |
76 | 76 | ||
77 | extern inline void *ioremap_nocache(unsigned long offset, unsigned long size) | 77 | static inline void *ioremap_nocache(unsigned long offset, unsigned long size) |
78 | { | 78 | { |
79 | return (void *) BYPASS_ADDR_IO(offset); | 79 | return (void *) BYPASS_ADDR_IO(offset); |
80 | } | 80 | } |
81 | 81 | ||
82 | extern inline void iounmap(void *addr) | 82 | static inline void iounmap(void *addr) |
83 | { | 83 | { |
84 | } | 84 | } |
85 | 85 | ||
diff --git a/include/asm-xtensa/mmu_context.h b/include/asm-xtensa/mmu_context.h index 1b0801548cd9..364a7b057bfa 100644 --- a/include/asm-xtensa/mmu_context.h +++ b/include/asm-xtensa/mmu_context.h | |||
@@ -199,13 +199,13 @@ extern pgd_t *current_pgd; | |||
199 | #define ASID_FIRST_VERSION \ | 199 | #define ASID_FIRST_VERSION \ |
200 | ((unsigned long)(~ASID_VERSION_MASK) + 1 + ASID_FIRST_NONRESERVED) | 200 | ((unsigned long)(~ASID_VERSION_MASK) + 1 + ASID_FIRST_NONRESERVED) |
201 | 201 | ||
202 | extern inline void set_rasid_register (unsigned long val) | 202 | static inline void set_rasid_register (unsigned long val) |
203 | { | 203 | { |
204 | __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t" | 204 | __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t" |
205 | " isync\n" : : "a" (val)); | 205 | " isync\n" : : "a" (val)); |
206 | } | 206 | } |
207 | 207 | ||
208 | extern inline unsigned long get_rasid_register (void) | 208 | static inline unsigned long get_rasid_register (void) |
209 | { | 209 | { |
210 | unsigned long tmp; | 210 | unsigned long tmp; |
211 | __asm__ __volatile__ (" rsr %0, "__stringify(RASID)"\n\t" : "=a" (tmp)); | 211 | __asm__ __volatile__ (" rsr %0, "__stringify(RASID)"\n\t" : "=a" (tmp)); |
@@ -215,7 +215,7 @@ extern inline unsigned long get_rasid_register (void) | |||
215 | 215 | ||
216 | #if ((XCHAL_MMU_ASID_INVALID == 0) && (XCHAL_MMU_ASID_KERNEL == 1)) | 216 | #if ((XCHAL_MMU_ASID_INVALID == 0) && (XCHAL_MMU_ASID_KERNEL == 1)) |
217 | 217 | ||
218 | extern inline void | 218 | static inline void |
219 | get_new_mmu_context(struct mm_struct *mm, unsigned long asid) | 219 | get_new_mmu_context(struct mm_struct *mm, unsigned long asid) |
220 | { | 220 | { |
221 | extern void flush_tlb_all(void); | 221 | extern void flush_tlb_all(void); |
@@ -234,7 +234,7 @@ get_new_mmu_context(struct mm_struct *mm, unsigned long asid) | |||
234 | /* XCHAL_MMU_ASID_INVALID == 0 and XCHAL_MMU_ASID_KERNEL ==1 are | 234 | /* XCHAL_MMU_ASID_INVALID == 0 and XCHAL_MMU_ASID_KERNEL ==1 are |
235 | really the best, but if you insist... */ | 235 | really the best, but if you insist... */ |
236 | 236 | ||
237 | extern inline int validate_asid (unsigned long asid) | 237 | static inline int validate_asid (unsigned long asid) |
238 | { | 238 | { |
239 | switch (asid) { | 239 | switch (asid) { |
240 | case XCHAL_MMU_ASID_INVALID: | 240 | case XCHAL_MMU_ASID_INVALID: |
@@ -247,7 +247,7 @@ extern inline int validate_asid (unsigned long asid) | |||
247 | return 1; /* valid */ | 247 | return 1; /* valid */ |
248 | } | 248 | } |
249 | 249 | ||
250 | extern inline void | 250 | static inline void |
251 | get_new_mmu_context(struct mm_struct *mm, unsigned long asid) | 251 | get_new_mmu_context(struct mm_struct *mm, unsigned long asid) |
252 | { | 252 | { |
253 | extern void flush_tlb_all(void); | 253 | extern void flush_tlb_all(void); |
@@ -274,14 +274,14 @@ get_new_mmu_context(struct mm_struct *mm, unsigned long asid) | |||
274 | * instance. | 274 | * instance. |
275 | */ | 275 | */ |
276 | 276 | ||
277 | extern inline int | 277 | static inline int |
278 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 278 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
279 | { | 279 | { |
280 | mm->context = NO_CONTEXT; | 280 | mm->context = NO_CONTEXT; |
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | 283 | ||
284 | extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 284 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
285 | struct task_struct *tsk) | 285 | struct task_struct *tsk) |
286 | { | 286 | { |
287 | unsigned long asid = asid_cache; | 287 | unsigned long asid = asid_cache; |
@@ -301,7 +301,7 @@ extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
301 | * Destroy context related info for an mm_struct that is about | 301 | * Destroy context related info for an mm_struct that is about |
302 | * to be put to rest. | 302 | * to be put to rest. |
303 | */ | 303 | */ |
304 | extern inline void destroy_context(struct mm_struct *mm) | 304 | static inline void destroy_context(struct mm_struct *mm) |
305 | { | 305 | { |
306 | /* Nothing to do. */ | 306 | /* Nothing to do. */ |
307 | } | 307 | } |
@@ -310,7 +310,7 @@ extern inline void destroy_context(struct mm_struct *mm) | |||
310 | * After we have set current->mm to a new value, this activates | 310 | * After we have set current->mm to a new value, this activates |
311 | * the context for the new mm so we see the new mappings. | 311 | * the context for the new mm so we see the new mappings. |
312 | */ | 312 | */ |
313 | extern inline void | 313 | static inline void |
314 | activate_mm(struct mm_struct *prev, struct mm_struct *next) | 314 | activate_mm(struct mm_struct *prev, struct mm_struct *next) |
315 | { | 315 | { |
316 | /* Unconditionally get a new ASID. */ | 316 | /* Unconditionally get a new ASID. */ |
diff --git a/include/asm-xtensa/page.h b/include/asm-xtensa/page.h index b495e5b5a942..8ded36f255a2 100644 --- a/include/asm-xtensa/page.h +++ b/include/asm-xtensa/page.h | |||
@@ -55,7 +55,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
55 | * Pure 2^n version of get_order | 55 | * Pure 2^n version of get_order |
56 | */ | 56 | */ |
57 | 57 | ||
58 | extern __inline__ int get_order(unsigned long size) | 58 | static inline int get_order(unsigned long size) |
59 | { | 59 | { |
60 | int order; | 60 | int order; |
61 | #ifndef XCHAL_HAVE_NSU | 61 | #ifndef XCHAL_HAVE_NSU |
diff --git a/include/asm-xtensa/page.h.n b/include/asm-xtensa/page.h.n deleted file mode 100644 index 546cc6624f24..000000000000 --- a/include/asm-xtensa/page.h.n +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-xtensa/page.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_PAGE_H | ||
12 | #define _XTENSA_PAGE_H | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | |||
16 | #include <asm/processor.h> | ||
17 | #include <linux/config.h> | ||
18 | |||
19 | /* | ||
20 | * PAGE_SHIFT determines the page size | ||
21 | * PAGE_ALIGN(x) aligns the pointer to the (next) page boundary | ||
22 | */ | ||
23 | #define PAGE_SHIFT XCHAL_MMU_MIN_PTE_PAGE_SIZE | ||
24 | #define PAGE_SIZE (1 << PAGE_SHIFT) | ||
25 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
26 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE - 1) & PAGE_MASK) | ||
27 | |||
28 | #define DCACHE_WAY_SIZE (XCHAL_DCACHE_SIZE / XCHAL_DCACHE_WAYS) | ||
29 | #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR | ||
30 | |||
31 | #ifdef __ASSEMBLY__ | ||
32 | |||
33 | #define __pgprot(x) (x) | ||
34 | |||
35 | #else | ||
36 | |||
37 | |||
38 | /* | ||
39 | * These are used to make use of C type-checking.. | ||
40 | */ | ||
41 | typedef struct { unsigned long pte; } pte_t; /* page table entry */ | ||
42 | typedef struct { unsigned long pmd; } pmd_t; /* PMD table entry */ | ||
43 | typedef struct { unsigned long pgd; } pgd_t; /* PGD table entry */ | ||
44 | typedef struct { unsigned long pgprot; } pgprot_t; | ||
45 | |||
46 | #define pte_val(x) ((x).pte) | ||
47 | #define pmd_val(x) ((x).pmd) | ||
48 | #define pgd_val(x) ((x).pgd) | ||
49 | #define pgprot_val(x) ((x).pgprot) | ||
50 | |||
51 | #define __pte(x) ((pte_t) { (x) } ) | ||
52 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
53 | #define __pgd(x) ((pgd_t) { (x) } ) | ||
54 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
55 | |||
56 | /* | ||
57 | * Pure 2^n version of get_order | ||
58 | */ | ||
59 | extern __inline__ int get_order(unsigned long size) | ||
60 | { | ||
61 | int order; | ||
62 | #ifndef XCHAL_HAVE_NSU | ||
63 | unsigned long x1, x2, x4, x8, x16; | ||
64 | |||
65 | size = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
66 | x1 = size & 0xAAAAAAAA; | ||
67 | x2 = size & 0xCCCCCCCC; | ||
68 | x4 = size & 0xF0F0F0F0; | ||
69 | x8 = size & 0xFF00FF00; | ||
70 | x16 = size & 0xFFFF0000; | ||
71 | order = x2 ? 2 : 0; | ||
72 | order += (x16 != 0) * 16; | ||
73 | order += (x8 != 0) * 8; | ||
74 | order += (x4 != 0) * 4; | ||
75 | order += (x1 != 0); | ||
76 | |||
77 | return order; | ||
78 | #else | ||
79 | size = (size - 1) >> PAGE_SHIFT; | ||
80 | asm ("nsau %0, %1" : "=r" (order) : "r" (size)); | ||
81 | return 32 - order; | ||
82 | #endif | ||
83 | } | ||
84 | |||
85 | |||
86 | struct page; | ||
87 | extern void clear_page(void *page); | ||
88 | extern void copy_page(void *to, void *from); | ||
89 | |||
90 | /* | ||
91 | * If we have cache aliasing and writeback caches, we might have to do | ||
92 | * some extra work | ||
93 | */ | ||
94 | |||
95 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | ||
96 | void clear_user_page(void *addr, unsigned long vaddr, struct page* page); | ||
97 | void copy_user_page(void *to, void* from, unsigned long vaddr, struct page* page); | ||
98 | #else | ||
99 | # define clear_user_page(page,vaddr,pg) clear_page(page) | ||
100 | # define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | ||
101 | #endif | ||
102 | |||
103 | |||
104 | /* | ||
105 | * This handles the memory map. We handle pages at | ||
106 | * XCHAL_KSEG_CACHED_VADDR for kernels with 32 bit address space. | ||
107 | * These macros are for conversion of kernel address, not user | ||
108 | * addresses. | ||
109 | */ | ||
110 | |||
111 | #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) | ||
112 | #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) | ||
113 | #define pfn_valid(pfn) ((unsigned long)pfn < max_mapnr) | ||
114 | #ifndef CONFIG_DISCONTIGMEM | ||
115 | # define pfn_to_page(pfn) (mem_map + (pfn)) | ||
116 | # define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | ||
117 | #else | ||
118 | # error CONFIG_DISCONTIGMEM not supported | ||
119 | #endif | ||
120 | |||
121 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | ||
122 | #define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT) | ||
123 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | ||
124 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | ||
125 | |||
126 | #define WANT_PAGE_VIRTUAL | ||
127 | |||
128 | |||
129 | #endif /* __ASSEMBLY__ */ | ||
130 | |||
131 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | ||
132 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | ||
133 | |||
134 | #endif /* __KERNEL__ */ | ||
135 | #endif /* _XTENSA_PAGE_H */ | ||
diff --git a/include/asm-xtensa/pci.h b/include/asm-xtensa/pci.h index 6817742301c2..24eb7fc25da8 100644 --- a/include/asm-xtensa/pci.h +++ b/include/asm-xtensa/pci.h | |||
@@ -22,12 +22,12 @@ | |||
22 | 22 | ||
23 | extern struct pci_controller* pcibios_alloc_controller(void); | 23 | extern struct pci_controller* pcibios_alloc_controller(void); |
24 | 24 | ||
25 | extern inline void pcibios_set_master(struct pci_dev *dev) | 25 | static inline void pcibios_set_master(struct pci_dev *dev) |
26 | { | 26 | { |
27 | /* No special bus mastering setup handling */ | 27 | /* No special bus mastering setup handling */ |
28 | } | 28 | } |
29 | 29 | ||
30 | extern inline void pcibios_penalize_isa_irq(int irq) | 30 | static inline void pcibios_penalize_isa_irq(int irq) |
31 | { | 31 | { |
32 | /* We don't do dynamic PCI IRQ allocation */ | 32 | /* We don't do dynamic PCI IRQ allocation */ |
33 | } | 33 | } |
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h index 0bb6416ae266..883ebc2d75d6 100644 --- a/include/asm-xtensa/pgtable.h +++ b/include/asm-xtensa/pgtable.h | |||
@@ -260,7 +260,7 @@ static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_RW; return pt | |||
260 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 260 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
261 | #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) | 261 | #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) |
262 | 262 | ||
263 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 263 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
264 | { | 264 | { |
265 | return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)); | 265 | return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)); |
266 | } | 266 | } |
@@ -278,14 +278,14 @@ static inline void update_pte(pte_t *ptep, pte_t pteval) | |||
278 | #endif | 278 | #endif |
279 | } | 279 | } |
280 | 280 | ||
281 | extern inline void | 281 | static inline void |
282 | set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) | 282 | set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) |
283 | { | 283 | { |
284 | update_pte(ptep, pteval); | 284 | update_pte(ptep, pteval); |
285 | } | 285 | } |
286 | 286 | ||
287 | 287 | ||
288 | extern inline void | 288 | static inline void |
289 | set_pmd(pmd_t *pmdp, pmd_t pmdval) | 289 | set_pmd(pmd_t *pmdp, pmd_t pmdval) |
290 | { | 290 | { |
291 | *pmdp = pmdval; | 291 | *pmdp = pmdval; |
diff --git a/include/asm-xtensa/semaphore.h b/include/asm-xtensa/semaphore.h index c8a7574a9a57..db740b8bc6f0 100644 --- a/include/asm-xtensa/semaphore.h +++ b/include/asm-xtensa/semaphore.h | |||
@@ -47,7 +47,7 @@ struct semaphore { | |||
47 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) | 47 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) |
48 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) | 48 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) |
49 | 49 | ||
50 | extern inline void sema_init (struct semaphore *sem, int val) | 50 | static inline void sema_init (struct semaphore *sem, int val) |
51 | { | 51 | { |
52 | /* | 52 | /* |
53 | * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); | 53 | * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); |
@@ -79,7 +79,7 @@ asmlinkage void __up(struct semaphore * sem); | |||
79 | 79 | ||
80 | extern spinlock_t semaphore_wake_lock; | 80 | extern spinlock_t semaphore_wake_lock; |
81 | 81 | ||
82 | extern __inline__ void down(struct semaphore * sem) | 82 | static inline void down(struct semaphore * sem) |
83 | { | 83 | { |
84 | #if WAITQUEUE_DEBUG | 84 | #if WAITQUEUE_DEBUG |
85 | CHECK_MAGIC(sem->__magic); | 85 | CHECK_MAGIC(sem->__magic); |
@@ -89,7 +89,7 @@ extern __inline__ void down(struct semaphore * sem) | |||
89 | __down(sem); | 89 | __down(sem); |
90 | } | 90 | } |
91 | 91 | ||
92 | extern __inline__ int down_interruptible(struct semaphore * sem) | 92 | static inline int down_interruptible(struct semaphore * sem) |
93 | { | 93 | { |
94 | int ret = 0; | 94 | int ret = 0; |
95 | #if WAITQUEUE_DEBUG | 95 | #if WAITQUEUE_DEBUG |
@@ -101,7 +101,7 @@ extern __inline__ int down_interruptible(struct semaphore * sem) | |||
101 | return ret; | 101 | return ret; |
102 | } | 102 | } |
103 | 103 | ||
104 | extern __inline__ int down_trylock(struct semaphore * sem) | 104 | static inline int down_trylock(struct semaphore * sem) |
105 | { | 105 | { |
106 | int ret = 0; | 106 | int ret = 0; |
107 | #if WAITQUEUE_DEBUG | 107 | #if WAITQUEUE_DEBUG |
@@ -117,7 +117,7 @@ extern __inline__ int down_trylock(struct semaphore * sem) | |||
117 | * Note! This is subtle. We jump to wake people up only if | 117 | * Note! This is subtle. We jump to wake people up only if |
118 | * the semaphore was negative (== somebody was waiting on it). | 118 | * the semaphore was negative (== somebody was waiting on it). |
119 | */ | 119 | */ |
120 | extern __inline__ void up(struct semaphore * sem) | 120 | static inline void up(struct semaphore * sem) |
121 | { | 121 | { |
122 | #if WAITQUEUE_DEBUG | 122 | #if WAITQUEUE_DEBUG |
123 | CHECK_MAGIC(sem->__magic); | 123 | CHECK_MAGIC(sem->__magic); |
diff --git a/include/asm-xtensa/string.h b/include/asm-xtensa/string.h index 3f81b27d9809..5fb8c27cbef5 100644 --- a/include/asm-xtensa/string.h +++ b/include/asm-xtensa/string.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define _XTENSA_STRING_H | 16 | #define _XTENSA_STRING_H |
17 | 17 | ||
18 | #define __HAVE_ARCH_STRCPY | 18 | #define __HAVE_ARCH_STRCPY |
19 | extern __inline__ char *strcpy(char *__dest, const char *__src) | 19 | static inline char *strcpy(char *__dest, const char *__src) |
20 | { | 20 | { |
21 | register char *__xdest = __dest; | 21 | register char *__xdest = __dest; |
22 | unsigned long __dummy; | 22 | unsigned long __dummy; |
@@ -35,7 +35,7 @@ extern __inline__ char *strcpy(char *__dest, const char *__src) | |||
35 | } | 35 | } |
36 | 36 | ||
37 | #define __HAVE_ARCH_STRNCPY | 37 | #define __HAVE_ARCH_STRNCPY |
38 | extern __inline__ char *strncpy(char *__dest, const char *__src, size_t __n) | 38 | static inline char *strncpy(char *__dest, const char *__src, size_t __n) |
39 | { | 39 | { |
40 | register char *__xdest = __dest; | 40 | register char *__xdest = __dest; |
41 | unsigned long __dummy; | 41 | unsigned long __dummy; |
@@ -60,7 +60,7 @@ extern __inline__ char *strncpy(char *__dest, const char *__src, size_t __n) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | #define __HAVE_ARCH_STRCMP | 62 | #define __HAVE_ARCH_STRCMP |
63 | extern __inline__ int strcmp(const char *__cs, const char *__ct) | 63 | static inline int strcmp(const char *__cs, const char *__ct) |
64 | { | 64 | { |
65 | register int __res; | 65 | register int __res; |
66 | unsigned long __dummy; | 66 | unsigned long __dummy; |
@@ -82,7 +82,7 @@ extern __inline__ int strcmp(const char *__cs, const char *__ct) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | #define __HAVE_ARCH_STRNCMP | 84 | #define __HAVE_ARCH_STRNCMP |
85 | extern __inline__ int strncmp(const char *__cs, const char *__ct, size_t __n) | 85 | static inline int strncmp(const char *__cs, const char *__ct, size_t __n) |
86 | { | 86 | { |
87 | register int __res; | 87 | register int __res; |
88 | unsigned long __dummy; | 88 | unsigned long __dummy; |
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index 690fe325e671..f09393232e5e 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h | |||
@@ -56,7 +56,7 @@ static inline int irqs_disabled(void) | |||
56 | 56 | ||
57 | #define clear_cpenable() __clear_cpenable() | 57 | #define clear_cpenable() __clear_cpenable() |
58 | 58 | ||
59 | extern __inline__ void __clear_cpenable(void) | 59 | static inline void __clear_cpenable(void) |
60 | { | 60 | { |
61 | #if XCHAL_HAVE_CP | 61 | #if XCHAL_HAVE_CP |
62 | unsigned long i = 0; | 62 | unsigned long i = 0; |
@@ -64,7 +64,7 @@ extern __inline__ void __clear_cpenable(void) | |||
64 | #endif | 64 | #endif |
65 | } | 65 | } |
66 | 66 | ||
67 | extern __inline__ void enable_coprocessor(int i) | 67 | static inline void enable_coprocessor(int i) |
68 | { | 68 | { |
69 | #if XCHAL_HAVE_CP | 69 | #if XCHAL_HAVE_CP |
70 | int cp; | 70 | int cp; |
@@ -74,7 +74,7 @@ extern __inline__ void enable_coprocessor(int i) | |||
74 | #endif | 74 | #endif |
75 | } | 75 | } |
76 | 76 | ||
77 | extern __inline__ void disable_coprocessor(int i) | 77 | static inline void disable_coprocessor(int i) |
78 | { | 78 | { |
79 | #if XCHAL_HAVE_CP | 79 | #if XCHAL_HAVE_CP |
80 | int cp; | 80 | int cp; |
@@ -123,7 +123,7 @@ do { \ | |||
123 | * cmpxchg | 123 | * cmpxchg |
124 | */ | 124 | */ |
125 | 125 | ||
126 | extern __inline__ unsigned long | 126 | static inline unsigned long |
127 | __cmpxchg_u32(volatile int *p, int old, int new) | 127 | __cmpxchg_u32(volatile int *p, int old, int new) |
128 | { | 128 | { |
129 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" | 129 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" |
@@ -173,7 +173,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
173 | * where no register reference will cause an overflow. | 173 | * where no register reference will cause an overflow. |
174 | */ | 174 | */ |
175 | 175 | ||
176 | extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val) | 176 | static inline unsigned long xchg_u32(volatile int * m, unsigned long val) |
177 | { | 177 | { |
178 | unsigned long tmp; | 178 | unsigned long tmp; |
179 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" | 179 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" |
diff --git a/include/asm-xtensa/tlbflush.h b/include/asm-xtensa/tlbflush.h index 23bfe9db45f5..43f6ec859af9 100644 --- a/include/asm-xtensa/tlbflush.h +++ b/include/asm-xtensa/tlbflush.h | |||
@@ -39,7 +39,7 @@ extern void flush_tlb_range(struct vm_area_struct*,unsigned long,unsigned long); | |||
39 | * page-table pages. | 39 | * page-table pages. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | extern inline void flush_tlb_pgtables(struct mm_struct *mm, | 42 | static inline void flush_tlb_pgtables(struct mm_struct *mm, |
43 | unsigned long start, unsigned long end) | 43 | unsigned long start, unsigned long end) |
44 | { | 44 | { |
45 | } | 45 | } |
@@ -51,26 +51,26 @@ extern inline void flush_tlb_pgtables(struct mm_struct *mm, | |||
51 | #define ITLB_PROBE_SUCCESS (1 << ITLB_WAYS_LOG2) | 51 | #define ITLB_PROBE_SUCCESS (1 << ITLB_WAYS_LOG2) |
52 | #define DTLB_PROBE_SUCCESS (1 << DTLB_WAYS_LOG2) | 52 | #define DTLB_PROBE_SUCCESS (1 << DTLB_WAYS_LOG2) |
53 | 53 | ||
54 | extern inline unsigned long itlb_probe(unsigned long addr) | 54 | static inline unsigned long itlb_probe(unsigned long addr) |
55 | { | 55 | { |
56 | unsigned long tmp; | 56 | unsigned long tmp; |
57 | __asm__ __volatile__("pitlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); | 57 | __asm__ __volatile__("pitlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); |
58 | return tmp; | 58 | return tmp; |
59 | } | 59 | } |
60 | 60 | ||
61 | extern inline unsigned long dtlb_probe(unsigned long addr) | 61 | static inline unsigned long dtlb_probe(unsigned long addr) |
62 | { | 62 | { |
63 | unsigned long tmp; | 63 | unsigned long tmp; |
64 | __asm__ __volatile__("pdtlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); | 64 | __asm__ __volatile__("pdtlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); |
65 | return tmp; | 65 | return tmp; |
66 | } | 66 | } |
67 | 67 | ||
68 | extern inline void invalidate_itlb_entry (unsigned long probe) | 68 | static inline void invalidate_itlb_entry (unsigned long probe) |
69 | { | 69 | { |
70 | __asm__ __volatile__("iitlb %0; isync\n\t" : : "a" (probe)); | 70 | __asm__ __volatile__("iitlb %0; isync\n\t" : : "a" (probe)); |
71 | } | 71 | } |
72 | 72 | ||
73 | extern inline void invalidate_dtlb_entry (unsigned long probe) | 73 | static inline void invalidate_dtlb_entry (unsigned long probe) |
74 | { | 74 | { |
75 | __asm__ __volatile__("idtlb %0; dsync\n\t" : : "a" (probe)); | 75 | __asm__ __volatile__("idtlb %0; dsync\n\t" : : "a" (probe)); |
76 | } | 76 | } |
@@ -80,68 +80,68 @@ extern inline void invalidate_dtlb_entry (unsigned long probe) | |||
80 | * caller must follow up with an 'isync', which can be relatively | 80 | * caller must follow up with an 'isync', which can be relatively |
81 | * expensive on some Xtensa implementations. | 81 | * expensive on some Xtensa implementations. |
82 | */ | 82 | */ |
83 | extern inline void invalidate_itlb_entry_no_isync (unsigned entry) | 83 | static inline void invalidate_itlb_entry_no_isync (unsigned entry) |
84 | { | 84 | { |
85 | /* Caller must follow up with 'isync'. */ | 85 | /* Caller must follow up with 'isync'. */ |
86 | __asm__ __volatile__ ("iitlb %0\n" : : "a" (entry) ); | 86 | __asm__ __volatile__ ("iitlb %0\n" : : "a" (entry) ); |
87 | } | 87 | } |
88 | 88 | ||
89 | extern inline void invalidate_dtlb_entry_no_isync (unsigned entry) | 89 | static inline void invalidate_dtlb_entry_no_isync (unsigned entry) |
90 | { | 90 | { |
91 | /* Caller must follow up with 'isync'. */ | 91 | /* Caller must follow up with 'isync'. */ |
92 | __asm__ __volatile__ ("idtlb %0\n" : : "a" (entry) ); | 92 | __asm__ __volatile__ ("idtlb %0\n" : : "a" (entry) ); |
93 | } | 93 | } |
94 | 94 | ||
95 | extern inline void set_itlbcfg_register (unsigned long val) | 95 | static inline void set_itlbcfg_register (unsigned long val) |
96 | { | 96 | { |
97 | __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" | 97 | __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" |
98 | : : "a" (val)); | 98 | : : "a" (val)); |
99 | } | 99 | } |
100 | 100 | ||
101 | extern inline void set_dtlbcfg_register (unsigned long val) | 101 | static inline void set_dtlbcfg_register (unsigned long val) |
102 | { | 102 | { |
103 | __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" | 103 | __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" |
104 | : : "a" (val)); | 104 | : : "a" (val)); |
105 | } | 105 | } |
106 | 106 | ||
107 | extern inline void set_ptevaddr_register (unsigned long val) | 107 | static inline void set_ptevaddr_register (unsigned long val) |
108 | { | 108 | { |
109 | __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" | 109 | __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" |
110 | : : "a" (val)); | 110 | : : "a" (val)); |
111 | } | 111 | } |
112 | 112 | ||
113 | extern inline unsigned long read_ptevaddr_register (void) | 113 | static inline unsigned long read_ptevaddr_register (void) |
114 | { | 114 | { |
115 | unsigned long tmp; | 115 | unsigned long tmp; |
116 | __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); | 116 | __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); |
117 | return tmp; | 117 | return tmp; |
118 | } | 118 | } |
119 | 119 | ||
120 | extern inline void write_dtlb_entry (pte_t entry, int way) | 120 | static inline void write_dtlb_entry (pte_t entry, int way) |
121 | { | 121 | { |
122 | __asm__ __volatile__("wdtlb %1, %0; dsync\n\t" | 122 | __asm__ __volatile__("wdtlb %1, %0; dsync\n\t" |
123 | : : "r" (way), "r" (entry) ); | 123 | : : "r" (way), "r" (entry) ); |
124 | } | 124 | } |
125 | 125 | ||
126 | extern inline void write_itlb_entry (pte_t entry, int way) | 126 | static inline void write_itlb_entry (pte_t entry, int way) |
127 | { | 127 | { |
128 | __asm__ __volatile__("witlb %1, %0; isync\n\t" | 128 | __asm__ __volatile__("witlb %1, %0; isync\n\t" |
129 | : : "r" (way), "r" (entry) ); | 129 | : : "r" (way), "r" (entry) ); |
130 | } | 130 | } |
131 | 131 | ||
132 | extern inline void invalidate_page_directory (void) | 132 | static inline void invalidate_page_directory (void) |
133 | { | 133 | { |
134 | invalidate_dtlb_entry (DTLB_WAY_PGTABLE); | 134 | invalidate_dtlb_entry (DTLB_WAY_PGTABLE); |
135 | } | 135 | } |
136 | 136 | ||
137 | extern inline void invalidate_itlb_mapping (unsigned address) | 137 | static inline void invalidate_itlb_mapping (unsigned address) |
138 | { | 138 | { |
139 | unsigned long tlb_entry; | 139 | unsigned long tlb_entry; |
140 | while ((tlb_entry = itlb_probe (address)) & ITLB_PROBE_SUCCESS) | 140 | while ((tlb_entry = itlb_probe (address)) & ITLB_PROBE_SUCCESS) |
141 | invalidate_itlb_entry (tlb_entry); | 141 | invalidate_itlb_entry (tlb_entry); |
142 | } | 142 | } |
143 | 143 | ||
144 | extern inline void invalidate_dtlb_mapping (unsigned address) | 144 | static inline void invalidate_dtlb_mapping (unsigned address) |
145 | { | 145 | { |
146 | unsigned long tlb_entry; | 146 | unsigned long tlb_entry; |
147 | while ((tlb_entry = dtlb_probe (address)) & DTLB_PROBE_SUCCESS) | 147 | while ((tlb_entry = dtlb_probe (address)) & DTLB_PROBE_SUCCESS) |
@@ -165,28 +165,28 @@ extern inline void invalidate_dtlb_mapping (unsigned address) | |||
165 | * as[07..00] contain the asid | 165 | * as[07..00] contain the asid |
166 | */ | 166 | */ |
167 | 167 | ||
168 | extern inline unsigned long read_dtlb_virtual (int way) | 168 | static inline unsigned long read_dtlb_virtual (int way) |
169 | { | 169 | { |
170 | unsigned long tmp; | 170 | unsigned long tmp; |
171 | __asm__ __volatile__("rdtlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 171 | __asm__ __volatile__("rdtlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
172 | return tmp; | 172 | return tmp; |
173 | } | 173 | } |
174 | 174 | ||
175 | extern inline unsigned long read_dtlb_translation (int way) | 175 | static inline unsigned long read_dtlb_translation (int way) |
176 | { | 176 | { |
177 | unsigned long tmp; | 177 | unsigned long tmp; |
178 | __asm__ __volatile__("rdtlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 178 | __asm__ __volatile__("rdtlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
179 | return tmp; | 179 | return tmp; |
180 | } | 180 | } |
181 | 181 | ||
182 | extern inline unsigned long read_itlb_virtual (int way) | 182 | static inline unsigned long read_itlb_virtual (int way) |
183 | { | 183 | { |
184 | unsigned long tmp; | 184 | unsigned long tmp; |
185 | __asm__ __volatile__("ritlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 185 | __asm__ __volatile__("ritlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
186 | return tmp; | 186 | return tmp; |
187 | } | 187 | } |
188 | 188 | ||
189 | extern inline unsigned long read_itlb_translation (int way) | 189 | static inline unsigned long read_itlb_translation (int way) |
190 | { | 190 | { |
191 | unsigned long tmp; | 191 | unsigned long tmp; |
192 | __asm__ __volatile__("ritlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 192 | __asm__ __volatile__("ritlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
diff --git a/include/asm-xtensa/types.h b/include/asm-xtensa/types.h index ebac00469852..9d99a8e9e337 100644 --- a/include/asm-xtensa/types.h +++ b/include/asm-xtensa/types.h | |||
@@ -58,8 +58,6 @@ typedef unsigned long long u64; | |||
58 | 58 | ||
59 | typedef u32 dma_addr_t; | 59 | typedef u32 dma_addr_t; |
60 | 60 | ||
61 | typedef unsigned int kmem_bufctl_t; | ||
62 | |||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
64 | #endif | 62 | #endif |
65 | 63 | ||
diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h index 35576b25c7b2..fc268ac923c0 100644 --- a/include/asm-xtensa/uaccess.h +++ b/include/asm-xtensa/uaccess.h | |||
@@ -211,7 +211,7 @@ | |||
211 | #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) | 211 | #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) |
212 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) | 212 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) |
213 | 213 | ||
214 | extern inline int verify_area(int type, const void * addr, unsigned long size) | 214 | static inline int verify_area(int type, const void * addr, unsigned long size) |
215 | { | 215 | { |
216 | return access_ok(type,addr,size) ? 0 : -EFAULT; | 216 | return access_ok(type,addr,size) ? 0 : -EFAULT; |
217 | } | 217 | } |
@@ -464,7 +464,7 @@ __generic_copy_from_user(void *to, const void *from, unsigned long n) | |||
464 | * success. | 464 | * success. |
465 | */ | 465 | */ |
466 | 466 | ||
467 | extern inline unsigned long | 467 | static inline unsigned long |
468 | __xtensa_clear_user(void *addr, unsigned long size) | 468 | __xtensa_clear_user(void *addr, unsigned long size) |
469 | { | 469 | { |
470 | if ( ! memset(addr, 0, size) ) | 470 | if ( ! memset(addr, 0, size) ) |
@@ -472,7 +472,7 @@ __xtensa_clear_user(void *addr, unsigned long size) | |||
472 | return 0; | 472 | return 0; |
473 | } | 473 | } |
474 | 474 | ||
475 | extern inline unsigned long | 475 | static inline unsigned long |
476 | clear_user(void *addr, unsigned long size) | 476 | clear_user(void *addr, unsigned long size) |
477 | { | 477 | { |
478 | if (access_ok(VERIFY_WRITE, addr, size)) | 478 | if (access_ok(VERIFY_WRITE, addr, size)) |
@@ -486,7 +486,7 @@ clear_user(void *addr, unsigned long size) | |||
486 | extern long __strncpy_user(char *, const char *, long); | 486 | extern long __strncpy_user(char *, const char *, long); |
487 | #define __strncpy_from_user __strncpy_user | 487 | #define __strncpy_from_user __strncpy_user |
488 | 488 | ||
489 | extern inline long | 489 | static inline long |
490 | strncpy_from_user(char *dst, const char *src, long count) | 490 | strncpy_from_user(char *dst, const char *src, long count) |
491 | { | 491 | { |
492 | if (access_ok(VERIFY_READ, src, 1)) | 492 | if (access_ok(VERIFY_READ, src, 1)) |
@@ -502,7 +502,7 @@ strncpy_from_user(char *dst, const char *src, long count) | |||
502 | */ | 502 | */ |
503 | extern long __strnlen_user(const char *, long); | 503 | extern long __strnlen_user(const char *, long); |
504 | 504 | ||
505 | extern inline long strnlen_user(const char *str, long len) | 505 | static inline long strnlen_user(const char *str, long len) |
506 | { | 506 | { |
507 | unsigned long top = __kernel_ok ? ~0UL : TASK_SIZE - 1; | 507 | unsigned long top = __kernel_ok ? ~0UL : TASK_SIZE - 1; |
508 | 508 | ||
diff --git a/include/linux/capability.h b/include/linux/capability.h index 8d139f4acf23..6b4618902d3d 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -233,6 +233,7 @@ typedef __u32 kernel_cap_t; | |||
233 | /* Allow enabling/disabling tagged queuing on SCSI controllers and sending | 233 | /* Allow enabling/disabling tagged queuing on SCSI controllers and sending |
234 | arbitrary SCSI commands */ | 234 | arbitrary SCSI commands */ |
235 | /* Allow setting encryption key on loopback filesystem */ | 235 | /* Allow setting encryption key on loopback filesystem */ |
236 | /* Allow setting zone reclaim policy */ | ||
236 | 237 | ||
237 | #define CAP_SYS_ADMIN 21 | 238 | #define CAP_SYS_ADMIN 21 |
238 | 239 | ||
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index e8904c0da686..86980c68234a 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * Basic handling of the devices is done in drivers/base/cpu.c | 8 | * Basic handling of the devices is done in drivers/base/cpu.c |
9 | * and system devices are handled in drivers/base/sys.c. | 9 | * and system devices are handled in drivers/base/sys.c. |
10 | * | 10 | * |
11 | * CPUs are exported via driverfs in the class/cpu/devices/ | 11 | * CPUs are exported via sysfs in the class/cpu/devices/ |
12 | * directory. | 12 | * directory. |
13 | * | 13 | * |
14 | * Per-cpu interfaces can be implemented using a struct device_interface. | 14 | * Per-cpu interfaces can be implemented using a struct device_interface. |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 5e2bcc636a02..3c89df6e7768 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -45,6 +45,7 @@ | |||
45 | #define CRYPTO_TFM_MODE_CTR 0x00000008 | 45 | #define CRYPTO_TFM_MODE_CTR 0x00000008 |
46 | 46 | ||
47 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 | 47 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 |
48 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 | ||
48 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 | 49 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 |
49 | #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000 | 50 | #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000 |
50 | #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x00400000 | 51 | #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x00400000 |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 73781ec165b4..c7c5dd316182 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -91,11 +91,6 @@ typedef struct { | |||
91 | 91 | ||
92 | #define EFI_PAGE_SHIFT 12 | 92 | #define EFI_PAGE_SHIFT 12 |
93 | 93 | ||
94 | /* | ||
95 | * For current x86 implementations of EFI, there is | ||
96 | * additional padding in the mem descriptors. This is not | ||
97 | * the case in ia64. Need to have this fixed in the f/w. | ||
98 | */ | ||
99 | typedef struct { | 94 | typedef struct { |
100 | u32 type; | 95 | u32 type; |
101 | u32 pad; | 96 | u32 pad; |
@@ -103,9 +98,6 @@ typedef struct { | |||
103 | u64 virt_addr; | 98 | u64 virt_addr; |
104 | u64 num_pages; | 99 | u64 num_pages; |
105 | u64 attribute; | 100 | u64 attribute; |
106 | #if defined (__i386__) | ||
107 | u64 pad1; | ||
108 | #endif | ||
109 | } efi_memory_desc_t; | 101 | } efi_memory_desc_t; |
110 | 102 | ||
111 | typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg); | 103 | typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg); |
@@ -240,10 +232,12 @@ typedef struct { | |||
240 | } efi_system_table_t; | 232 | } efi_system_table_t; |
241 | 233 | ||
242 | struct efi_memory_map { | 234 | struct efi_memory_map { |
243 | efi_memory_desc_t *phys_map; | 235 | void *phys_map; |
244 | efi_memory_desc_t *map; | 236 | void *map; |
237 | void *map_end; | ||
245 | int nr_map; | 238 | int nr_map; |
246 | unsigned long desc_version; | 239 | unsigned long desc_version; |
240 | unsigned long desc_size; | ||
247 | }; | 241 | }; |
248 | 242 | ||
249 | /* | 243 | /* |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index ce8518e658b6..4522c7186bf3 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -69,6 +69,12 @@ static inline int is_multicast_ether_addr(const u8 *addr) | |||
69 | return ((addr[0] != 0xff) && (0x01 & addr[0])); | 69 | return ((addr[0] != 0xff) && (0x01 & addr[0])); |
70 | } | 70 | } |
71 | 71 | ||
72 | static inline int is_broadcast_ether_addr(const u8 *addr) | ||
73 | { | ||
74 | return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && | ||
75 | (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); | ||
76 | } | ||
77 | |||
72 | /** | 78 | /** |
73 | * is_valid_ether_addr - Determine if the given Ethernet address is valid | 79 | * is_valid_ether_addr - Determine if the given Ethernet address is valid |
74 | * @addr: Pointer to a six-byte array containing the Ethernet address | 80 | * @addr: Pointer to a six-byte array containing the Ethernet address |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f529d1442815..e670b0d13fe0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -70,12 +70,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
70 | void hugetlb_prefault_arch_hook(struct mm_struct *mm); | 70 | void hugetlb_prefault_arch_hook(struct mm_struct *mm); |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #ifndef ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
74 | #define hugetlb_clean_stale_pgtable(pte) BUG() | ||
75 | #else | ||
76 | void hugetlb_clean_stale_pgtable(pte_t *pte); | ||
77 | #endif | ||
78 | |||
79 | #else /* !CONFIG_HUGETLB_PAGE */ | 73 | #else /* !CONFIG_HUGETLB_PAGE */ |
80 | 74 | ||
81 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | 75 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 096a85a58ae5..88aef7b86ef4 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -77,6 +77,7 @@ struct tun_struct { | |||
77 | #define TUNSETIFF _IOW('T', 202, int) | 77 | #define TUNSETIFF _IOW('T', 202, int) |
78 | #define TUNSETPERSIST _IOW('T', 203, int) | 78 | #define TUNSETPERSIST _IOW('T', 203, int) |
79 | #define TUNSETOWNER _IOW('T', 204, int) | 79 | #define TUNSETOWNER _IOW('T', 204, int) |
80 | #define TUNSETLINK _IOW('T', 205, int) | ||
80 | 81 | ||
81 | /* TUNSETIFF ifr flags */ | 82 | /* TUNSETIFF ifr flags */ |
82 | #define IFF_TUN 0x0001 | 83 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 8480aef10e62..94a46f38c532 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -150,6 +150,9 @@ void mpol_free_shared_policy(struct shared_policy *p); | |||
150 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, | 150 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, |
151 | unsigned long idx); | 151 | unsigned long idx); |
152 | 152 | ||
153 | struct mempolicy *get_vma_policy(struct task_struct *task, | ||
154 | struct vm_area_struct *vma, unsigned long addr); | ||
155 | |||
153 | extern void numa_default_policy(void); | 156 | extern void numa_default_policy(void); |
154 | extern void numa_policy_init(void); | 157 | extern void numa_policy_init(void); |
155 | 158 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 9a0893f3249e..30f68c0c8c6e 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -46,6 +46,12 @@ struct mmc_ios { | |||
46 | #define MMC_BUSMODE_OPENDRAIN 1 | 46 | #define MMC_BUSMODE_OPENDRAIN 1 |
47 | #define MMC_BUSMODE_PUSHPULL 2 | 47 | #define MMC_BUSMODE_PUSHPULL 2 |
48 | 48 | ||
49 | unsigned char chip_select; /* SPI chip select */ | ||
50 | |||
51 | #define MMC_CS_DONTCARE 0 | ||
52 | #define MMC_CS_HIGH 1 | ||
53 | #define MMC_CS_LOW 2 | ||
54 | |||
49 | unsigned char power_mode; /* power supply mode */ | 55 | unsigned char power_mode; /* power supply mode */ |
50 | 56 | ||
51 | #define MMC_POWER_OFF 0 | 57 | #define MMC_POWER_OFF 0 |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 6c90461ed99f..5ed471b58f4f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -487,11 +487,27 @@ struct mem_section { | |||
487 | unsigned long section_mem_map; | 487 | unsigned long section_mem_map; |
488 | }; | 488 | }; |
489 | 489 | ||
490 | extern struct mem_section mem_section[NR_MEM_SECTIONS]; | 490 | #ifdef CONFIG_SPARSEMEM_EXTREME |
491 | #define SECTIONS_PER_ROOT (PAGE_SIZE / sizeof (struct mem_section)) | ||
492 | #else | ||
493 | #define SECTIONS_PER_ROOT 1 | ||
494 | #endif | ||
495 | |||
496 | #define SECTION_NR_TO_ROOT(sec) ((sec) / SECTIONS_PER_ROOT) | ||
497 | #define NR_SECTION_ROOTS (NR_MEM_SECTIONS / SECTIONS_PER_ROOT) | ||
498 | #define SECTION_ROOT_MASK (SECTIONS_PER_ROOT - 1) | ||
499 | |||
500 | #ifdef CONFIG_SPARSEMEM_EXTREME | ||
501 | extern struct mem_section *mem_section[NR_SECTION_ROOTS]; | ||
502 | #else | ||
503 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT]; | ||
504 | #endif | ||
491 | 505 | ||
492 | static inline struct mem_section *__nr_to_section(unsigned long nr) | 506 | static inline struct mem_section *__nr_to_section(unsigned long nr) |
493 | { | 507 | { |
494 | return &mem_section[nr]; | 508 | if (!mem_section[SECTION_NR_TO_ROOT(nr)]) |
509 | return NULL; | ||
510 | return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK]; | ||
495 | } | 511 | } |
496 | 512 | ||
497 | /* | 513 | /* |
@@ -513,12 +529,12 @@ static inline struct page *__section_mem_map_addr(struct mem_section *section) | |||
513 | 529 | ||
514 | static inline int valid_section(struct mem_section *section) | 530 | static inline int valid_section(struct mem_section *section) |
515 | { | 531 | { |
516 | return (section->section_mem_map & SECTION_MARKED_PRESENT); | 532 | return (section && (section->section_mem_map & SECTION_MARKED_PRESENT)); |
517 | } | 533 | } |
518 | 534 | ||
519 | static inline int section_has_mem_map(struct mem_section *section) | 535 | static inline int section_has_mem_map(struct mem_section *section) |
520 | { | 536 | { |
521 | return (section->section_mem_map & SECTION_HAS_MEM_MAP); | 537 | return (section && (section->section_mem_map & SECTION_HAS_MEM_MAP)); |
522 | } | 538 | } |
523 | 539 | ||
524 | static inline int valid_section_nr(unsigned long nr) | 540 | static inline int valid_section_nr(unsigned long nr) |
@@ -572,6 +588,7 @@ static inline int pfn_valid(unsigned long pfn) | |||
572 | void sparse_init(void); | 588 | void sparse_init(void); |
573 | #else | 589 | #else |
574 | #define sparse_init() do {} while (0) | 590 | #define sparse_init() do {} while (0) |
591 | #define sparse_index_init(_sec, _nid) do {} while (0) | ||
575 | #endif /* CONFIG_SPARSEMEM */ | 592 | #endif /* CONFIG_SPARSEMEM */ |
576 | 593 | ||
577 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES | 594 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES |
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index 5773ea42f6e4..0b08cd692201 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -980,7 +980,7 @@ | |||
980 | /* I2C Registers */ | 980 | /* I2C Registers */ |
981 | /****************************************/ | 981 | /****************************************/ |
982 | 982 | ||
983 | #define MV64XXX_I2C_CTLR_NAME "mv64xxx i2c" | 983 | #define MV64XXX_I2C_CTLR_NAME "mv64xxx_i2c" |
984 | #define MV64XXX_I2C_OFFSET 0xc000 | 984 | #define MV64XXX_I2C_OFFSET 0xc000 |
985 | #define MV64XXX_I2C_REG_BLOCK_SIZE 0x0020 | 985 | #define MV64XXX_I2C_REG_BLOCK_SIZE 0x0020 |
986 | 986 | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f5a6695d4d21..f34767c5fc79 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -134,6 +134,7 @@ struct page_state { | |||
134 | }; | 134 | }; |
135 | 135 | ||
136 | extern void get_page_state(struct page_state *ret); | 136 | extern void get_page_state(struct page_state *ret); |
137 | extern void get_page_state_node(struct page_state *ret, int node); | ||
137 | extern void get_full_page_state(struct page_state *ret); | 138 | extern void get_full_page_state(struct page_state *ret); |
138 | extern unsigned long __read_page_state(unsigned long offset); | 139 | extern unsigned long __read_page_state(unsigned long offset); |
139 | extern void __mod_page_state(unsigned long offset, unsigned long delta); | 140 | extern void __mod_page_state(unsigned long offset, unsigned long delta); |
@@ -194,6 +195,7 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta); | |||
194 | #define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags) | 195 | #define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags) |
195 | #define TestSetPageDirty(page) test_and_set_bit(PG_dirty, &(page)->flags) | 196 | #define TestSetPageDirty(page) test_and_set_bit(PG_dirty, &(page)->flags) |
196 | #define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags) | 197 | #define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags) |
198 | #define __ClearPageDirty(page) __clear_bit(PG_dirty, &(page)->flags) | ||
197 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) | 199 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) |
198 | 200 | ||
199 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) | 201 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d513c1634006..95c941f8c747 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2147,6 +2147,9 @@ | |||
2147 | #define PCI_DEVICE_ID_ENE_1420 0x1420 | 2147 | #define PCI_DEVICE_ID_ENE_1420 0x1420 |
2148 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 2148 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
2149 | 2149 | ||
2150 | #define PCI_VENDOR_ID_MIPS 0x153f | ||
2151 | #define PCI_DEVICE_ID_SOC_IT 0x0001 | ||
2152 | |||
2150 | #define PCI_VENDOR_ID_SYBA 0x1592 | 2153 | #define PCI_VENDOR_ID_SYBA 0x1592 |
2151 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 2154 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
2152 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 | 2155 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 7aeb208ed713..5cfb07648eca 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -186,7 +186,9 @@ extern int pm_suspend(suspend_state_t state); | |||
186 | 186 | ||
187 | struct device; | 187 | struct device; |
188 | 188 | ||
189 | typedef u32 __bitwise pm_message_t; | 189 | typedef struct pm_message { |
190 | int event; | ||
191 | } pm_message_t; | ||
190 | 192 | ||
191 | /* | 193 | /* |
192 | * There are 4 important states driver can be in: | 194 | * There are 4 important states driver can be in: |
@@ -207,9 +209,13 @@ typedef u32 __bitwise pm_message_t; | |||
207 | * or something similar soon. | 209 | * or something similar soon. |
208 | */ | 210 | */ |
209 | 211 | ||
210 | #define PMSG_FREEZE ((__force pm_message_t) 3) | 212 | #define PM_EVENT_ON 0 |
211 | #define PMSG_SUSPEND ((__force pm_message_t) 3) | 213 | #define PM_EVENT_FREEZE 1 |
212 | #define PMSG_ON ((__force pm_message_t) 0) | 214 | #define PM_EVENT_SUSPEND 2 |
215 | |||
216 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) | ||
217 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) | ||
218 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | ||
213 | 219 | ||
214 | struct dev_pm_info { | 220 | struct dev_pm_info { |
215 | pm_message_t power_state; | 221 | pm_message_t power_state; |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index a373fc254df2..2afdafb62123 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #define PTRACE_DETACH 0x11 | 20 | #define PTRACE_DETACH 0x11 |
21 | 21 | ||
22 | #define PTRACE_SYSCALL 24 | 22 | #define PTRACE_SYSCALL 24 |
23 | #define PTRACE_SYSEMU 31 | ||
24 | #define PTRACE_SYSEMU_SINGLESTEP 32 | ||
23 | 25 | ||
24 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ | 26 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ |
25 | #define PTRACE_SETOPTIONS 0x4200 | 27 | #define PTRACE_SETOPTIONS 0x4200 |
diff --git a/include/linux/serial.h b/include/linux/serial.h index 9f2d85284d0b..12cd9cf65e8f 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
@@ -176,10 +176,6 @@ struct serial_icounter_struct { | |||
176 | #ifdef __KERNEL__ | 176 | #ifdef __KERNEL__ |
177 | #include <linux/compiler.h> | 177 | #include <linux/compiler.h> |
178 | 178 | ||
179 | /* Export to allow PCMCIA to use this - Dave Hinds */ | ||
180 | extern int __deprecated register_serial(struct serial_struct *req); | ||
181 | extern void __deprecated unregister_serial(int line); | ||
182 | |||
183 | /* Allow architectures to override entries in serial8250_ports[] at run time: */ | 179 | /* Allow architectures to override entries in serial8250_ports[] at run time: */ |
184 | struct uart_port; /* forward declaration */ | 180 | struct uart_port; /* forward declaration */ |
185 | extern int early_serial_setup(struct uart_port *port); | 181 | extern int early_serial_setup(struct uart_port *port); |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 3e3c1fa35b06..d8a023d804d4 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -14,6 +14,9 @@ | |||
14 | #include <linux/serial_core.h> | 14 | #include <linux/serial_core.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | 16 | ||
17 | /* | ||
18 | * This is the platform device platform_data structure | ||
19 | */ | ||
17 | struct plat_serial8250_port { | 20 | struct plat_serial8250_port { |
18 | unsigned long iobase; /* io base address */ | 21 | unsigned long iobase; /* io base address */ |
19 | void __iomem *membase; /* ioremap cookie or NULL */ | 22 | void __iomem *membase; /* ioremap cookie or NULL */ |
@@ -26,4 +29,17 @@ struct plat_serial8250_port { | |||
26 | unsigned int flags; /* UPF_* flags */ | 29 | unsigned int flags; /* UPF_* flags */ |
27 | }; | 30 | }; |
28 | 31 | ||
32 | /* | ||
33 | * This should be used by drivers which want to register | ||
34 | * their own 8250 ports without registering their own | ||
35 | * platform device. Using these will make your driver | ||
36 | * dependent on the 8250 driver. | ||
37 | */ | ||
38 | struct uart_port; | ||
39 | |||
40 | int serial8250_register_port(struct uart_port *); | ||
41 | void serial8250_unregister_port(int line); | ||
42 | void serial8250_suspend_port(int line); | ||
43 | void serial8250_resume_port(int line); | ||
44 | |||
29 | #endif | 45 | #endif |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index f6fca8f2f3ca..cf0f64ea2bc0 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -142,8 +142,8 @@ struct uart_ops { | |||
142 | unsigned int (*tx_empty)(struct uart_port *); | 142 | unsigned int (*tx_empty)(struct uart_port *); |
143 | void (*set_mctrl)(struct uart_port *, unsigned int mctrl); | 143 | void (*set_mctrl)(struct uart_port *, unsigned int mctrl); |
144 | unsigned int (*get_mctrl)(struct uart_port *); | 144 | unsigned int (*get_mctrl)(struct uart_port *); |
145 | void (*stop_tx)(struct uart_port *, unsigned int tty_stop); | 145 | void (*stop_tx)(struct uart_port *); |
146 | void (*start_tx)(struct uart_port *, unsigned int tty_start); | 146 | void (*start_tx)(struct uart_port *); |
147 | void (*send_xchar)(struct uart_port *, char ch); | 147 | void (*send_xchar)(struct uart_port *, char ch); |
148 | void (*stop_rx)(struct uart_port *); | 148 | void (*stop_rx)(struct uart_port *); |
149 | void (*enable_ms)(struct uart_port *); | 149 | void (*enable_ms)(struct uart_port *); |
@@ -360,8 +360,6 @@ struct tty_driver *uart_console_device(struct console *co, int *index); | |||
360 | */ | 360 | */ |
361 | int uart_register_driver(struct uart_driver *uart); | 361 | int uart_register_driver(struct uart_driver *uart); |
362 | void uart_unregister_driver(struct uart_driver *uart); | 362 | void uart_unregister_driver(struct uart_driver *uart); |
363 | void __deprecated uart_unregister_port(struct uart_driver *reg, int line); | ||
364 | int __deprecated uart_register_port(struct uart_driver *reg, struct uart_port *port); | ||
365 | int uart_add_one_port(struct uart_driver *reg, struct uart_port *port); | 363 | int uart_add_one_port(struct uart_driver *reg, struct uart_port *port); |
366 | int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); | 364 | int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); |
367 | int uart_match_port(struct uart_port *port1, struct uart_port *port2); | 365 | int uart_match_port(struct uart_port *port1, struct uart_port *port2); |
@@ -468,13 +466,13 @@ uart_handle_cts_change(struct uart_port *port, unsigned int status) | |||
468 | if (tty->hw_stopped) { | 466 | if (tty->hw_stopped) { |
469 | if (status) { | 467 | if (status) { |
470 | tty->hw_stopped = 0; | 468 | tty->hw_stopped = 0; |
471 | port->ops->start_tx(port, 0); | 469 | port->ops->start_tx(port); |
472 | uart_write_wakeup(port); | 470 | uart_write_wakeup(port); |
473 | } | 471 | } |
474 | } else { | 472 | } else { |
475 | if (!status) { | 473 | if (!status) { |
476 | tty->hw_stopped = 1; | 474 | tty->hw_stopped = 1; |
477 | port->ops->stop_tx(port, 0); | 475 | port->ops->stop_tx(port); |
478 | } | 476 | } |
479 | } | 477 | } |
480 | } | 478 | } |
diff --git a/include/linux/swap.h b/include/linux/swap.h index bfe3e763ccf2..3c9ff0048153 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -107,6 +107,8 @@ enum { | |||
107 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ | 107 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ |
108 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ | 108 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ |
109 | SWP_ACTIVE = (SWP_USED | SWP_WRITEOK), | 109 | SWP_ACTIVE = (SWP_USED | SWP_WRITEOK), |
110 | /* add others here before... */ | ||
111 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ | ||
110 | }; | 112 | }; |
111 | 113 | ||
112 | #define SWAP_CLUSTER_MAX 32 | 114 | #define SWAP_CLUSTER_MAX 32 |
@@ -116,16 +118,13 @@ enum { | |||
116 | 118 | ||
117 | /* | 119 | /* |
118 | * The in-memory structure used to track swap areas. | 120 | * The in-memory structure used to track swap areas. |
119 | * extent_list.prev points at the lowest-index extent. That list is | ||
120 | * sorted. | ||
121 | */ | 121 | */ |
122 | struct swap_info_struct { | 122 | struct swap_info_struct { |
123 | unsigned int flags; | 123 | unsigned int flags; |
124 | spinlock_t sdev_lock; | 124 | int prio; /* swap priority */ |
125 | struct file *swap_file; | 125 | struct file *swap_file; |
126 | struct block_device *bdev; | 126 | struct block_device *bdev; |
127 | struct list_head extent_list; | 127 | struct list_head extent_list; |
128 | int nr_extents; | ||
129 | struct swap_extent *curr_swap_extent; | 128 | struct swap_extent *curr_swap_extent; |
130 | unsigned old_block_size; | 129 | unsigned old_block_size; |
131 | unsigned short * swap_map; | 130 | unsigned short * swap_map; |
@@ -133,10 +132,9 @@ struct swap_info_struct { | |||
133 | unsigned int highest_bit; | 132 | unsigned int highest_bit; |
134 | unsigned int cluster_next; | 133 | unsigned int cluster_next; |
135 | unsigned int cluster_nr; | 134 | unsigned int cluster_nr; |
136 | int prio; /* swap priority */ | 135 | unsigned int pages; |
137 | int pages; | 136 | unsigned int max; |
138 | unsigned long max; | 137 | unsigned int inuse_pages; |
139 | unsigned long inuse_pages; | ||
140 | int next; /* next entry on swap list */ | 138 | int next; /* next entry on swap list */ |
141 | }; | 139 | }; |
142 | 140 | ||
@@ -222,13 +220,7 @@ extern int can_share_swap_page(struct page *); | |||
222 | extern int remove_exclusive_swap_page(struct page *); | 220 | extern int remove_exclusive_swap_page(struct page *); |
223 | struct backing_dev_info; | 221 | struct backing_dev_info; |
224 | 222 | ||
225 | extern struct swap_list_t swap_list; | 223 | extern spinlock_t swap_lock; |
226 | extern spinlock_t swaplock; | ||
227 | |||
228 | #define swap_list_lock() spin_lock(&swaplock) | ||
229 | #define swap_list_unlock() spin_unlock(&swaplock) | ||
230 | #define swap_device_lock(p) spin_lock(&p->sdev_lock) | ||
231 | #define swap_device_unlock(p) spin_unlock(&p->sdev_lock) | ||
232 | 224 | ||
233 | /* linux/mm/thrash.c */ | 225 | /* linux/mm/thrash.c */ |
234 | extern struct mm_struct * swap_token_mm; | 226 | extern struct mm_struct * swap_token_mm; |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index d4c7db35e708..87b9d14c710d 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * the low-order bits. | 4 | * the low-order bits. |
5 | * | 5 | * |
6 | * We arrange the `type' and `offset' fields so that `type' is at the five | 6 | * We arrange the `type' and `offset' fields so that `type' is at the five |
7 | * high-order bits of the smp_entry_t and `offset' is right-aligned in the | 7 | * high-order bits of the swp_entry_t and `offset' is right-aligned in the |
8 | * remaining bits. | 8 | * remaining bits. |
9 | * | 9 | * |
10 | * swp_entry_t's are *never* stored anywhere in their arch-dependent format. | 10 | * swp_entry_t's are *never* stored anywhere in their arch-dependent format. |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 6409d9cf5965..b244f69ef682 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -10,6 +10,14 @@ | |||
10 | #define VM_MAP 0x00000004 /* vmap()ed pages */ | 10 | #define VM_MAP 0x00000004 /* vmap()ed pages */ |
11 | /* bits [20..32] reserved for arch specific ioremap internals */ | 11 | /* bits [20..32] reserved for arch specific ioremap internals */ |
12 | 12 | ||
13 | /* | ||
14 | * Maximum alignment for ioremap() regions. | ||
15 | * Can be overriden by arch-specific value. | ||
16 | */ | ||
17 | #ifndef IOREMAP_MAX_ORDER | ||
18 | #define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */ | ||
19 | #endif | ||
20 | |||
13 | struct vm_struct { | 21 | struct vm_struct { |
14 | void *addr; | 22 | void *addr; |
15 | unsigned long size; | 23 | unsigned long size; |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index db09580ad14b..dc36b1be6745 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -20,18 +20,9 @@ | |||
20 | */ | 20 | */ |
21 | #ifndef IEEE80211_H | 21 | #ifndef IEEE80211_H |
22 | #define IEEE80211_H | 22 | #define IEEE80211_H |
23 | |||
24 | #include <linux/if_ether.h> /* ETH_ALEN */ | 23 | #include <linux/if_ether.h> /* ETH_ALEN */ |
25 | #include <linux/kernel.h> /* ARRAY_SIZE */ | 24 | #include <linux/kernel.h> /* ARRAY_SIZE */ |
26 | 25 | #include <linux/wireless.h> | |
27 | #if WIRELESS_EXT < 17 | ||
28 | #define IW_QUAL_QUAL_INVALID 0x10 | ||
29 | #define IW_QUAL_LEVEL_INVALID 0x20 | ||
30 | #define IW_QUAL_NOISE_INVALID 0x40 | ||
31 | #define IW_QUAL_QUAL_UPDATED 0x1 | ||
32 | #define IW_QUAL_LEVEL_UPDATED 0x2 | ||
33 | #define IW_QUAL_NOISE_UPDATED 0x4 | ||
34 | #endif | ||
35 | 26 | ||
36 | #define IEEE80211_DATA_LEN 2304 | 27 | #define IEEE80211_DATA_LEN 2304 |
37 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section | 28 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section |
@@ -47,51 +38,22 @@ | |||
47 | #define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) | 38 | #define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) |
48 | 39 | ||
49 | struct ieee80211_hdr { | 40 | struct ieee80211_hdr { |
50 | u16 frame_ctl; | 41 | __le16 frame_ctl; |
51 | u16 duration_id; | 42 | __le16 duration_id; |
52 | u8 addr1[ETH_ALEN]; | 43 | u8 addr1[ETH_ALEN]; |
53 | u8 addr2[ETH_ALEN]; | 44 | u8 addr2[ETH_ALEN]; |
54 | u8 addr3[ETH_ALEN]; | 45 | u8 addr3[ETH_ALEN]; |
55 | u16 seq_ctl; | 46 | __le16 seq_ctl; |
56 | u8 addr4[ETH_ALEN]; | 47 | u8 addr4[ETH_ALEN]; |
57 | } __attribute__ ((packed)); | 48 | } __attribute__ ((packed)); |
58 | 49 | ||
59 | struct ieee80211_hdr_3addr { | 50 | struct ieee80211_hdr_3addr { |
60 | u16 frame_ctl; | 51 | __le16 frame_ctl; |
61 | u16 duration_id; | 52 | __le16 duration_id; |
62 | u8 addr1[ETH_ALEN]; | 53 | u8 addr1[ETH_ALEN]; |
63 | u8 addr2[ETH_ALEN]; | 54 | u8 addr2[ETH_ALEN]; |
64 | u8 addr3[ETH_ALEN]; | 55 | u8 addr3[ETH_ALEN]; |
65 | u16 seq_ctl; | 56 | __le16 seq_ctl; |
66 | } __attribute__ ((packed)); | ||
67 | |||
68 | enum eap_type { | ||
69 | EAP_PACKET = 0, | ||
70 | EAPOL_START, | ||
71 | EAPOL_LOGOFF, | ||
72 | EAPOL_KEY, | ||
73 | EAPOL_ENCAP_ASF_ALERT | ||
74 | }; | ||
75 | |||
76 | static const char *eap_types[] = { | ||
77 | [EAP_PACKET] = "EAP-Packet", | ||
78 | [EAPOL_START] = "EAPOL-Start", | ||
79 | [EAPOL_LOGOFF] = "EAPOL-Logoff", | ||
80 | [EAPOL_KEY] = "EAPOL-Key", | ||
81 | [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert" | ||
82 | }; | ||
83 | |||
84 | static inline const char *eap_get_type(int type) | ||
85 | { | ||
86 | return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type]; | ||
87 | } | ||
88 | |||
89 | struct eapol { | ||
90 | u8 snap[6]; | ||
91 | u16 ethertype; | ||
92 | u8 version; | ||
93 | u8 type; | ||
94 | u16 length; | ||
95 | } __attribute__ ((packed)); | 57 | } __attribute__ ((packed)); |
96 | 58 | ||
97 | #define IEEE80211_1ADDR_LEN 10 | 59 | #define IEEE80211_1ADDR_LEN 10 |
@@ -104,7 +66,7 @@ struct eapol { | |||
104 | #define MAX_FRAG_THRESHOLD 2346U | 66 | #define MAX_FRAG_THRESHOLD 2346U |
105 | 67 | ||
106 | /* Frame control field constants */ | 68 | /* Frame control field constants */ |
107 | #define IEEE80211_FCTL_VERS 0x0002 | 69 | #define IEEE80211_FCTL_VERS 0x0003 |
108 | #define IEEE80211_FCTL_FTYPE 0x000c | 70 | #define IEEE80211_FCTL_FTYPE 0x000c |
109 | #define IEEE80211_FCTL_STYPE 0x00f0 | 71 | #define IEEE80211_FCTL_STYPE 0x00f0 |
110 | #define IEEE80211_FCTL_TODS 0x0100 | 72 | #define IEEE80211_FCTL_TODS 0x0100 |
@@ -112,8 +74,8 @@ struct eapol { | |||
112 | #define IEEE80211_FCTL_MOREFRAGS 0x0400 | 74 | #define IEEE80211_FCTL_MOREFRAGS 0x0400 |
113 | #define IEEE80211_FCTL_RETRY 0x0800 | 75 | #define IEEE80211_FCTL_RETRY 0x0800 |
114 | #define IEEE80211_FCTL_PM 0x1000 | 76 | #define IEEE80211_FCTL_PM 0x1000 |
115 | #define IEEE80211_FCTL_MOREDATA 0x2000 | 77 | #define IEEE80211_FCTL_MOREDATA 0x2000 |
116 | #define IEEE80211_FCTL_WEP 0x4000 | 78 | #define IEEE80211_FCTL_PROTECTED 0x4000 |
117 | #define IEEE80211_FCTL_ORDER 0x8000 | 79 | #define IEEE80211_FCTL_ORDER 0x8000 |
118 | 80 | ||
119 | #define IEEE80211_FTYPE_MGMT 0x0000 | 81 | #define IEEE80211_FTYPE_MGMT 0x0000 |
@@ -132,6 +94,7 @@ struct eapol { | |||
132 | #define IEEE80211_STYPE_DISASSOC 0x00A0 | 94 | #define IEEE80211_STYPE_DISASSOC 0x00A0 |
133 | #define IEEE80211_STYPE_AUTH 0x00B0 | 95 | #define IEEE80211_STYPE_AUTH 0x00B0 |
134 | #define IEEE80211_STYPE_DEAUTH 0x00C0 | 96 | #define IEEE80211_STYPE_DEAUTH 0x00C0 |
97 | #define IEEE80211_STYPE_ACTION 0x00D0 | ||
135 | 98 | ||
136 | /* control */ | 99 | /* control */ |
137 | #define IEEE80211_STYPE_PSPOLL 0x00A0 | 100 | #define IEEE80211_STYPE_PSPOLL 0x00A0 |
@@ -167,8 +130,19 @@ do { if (ieee80211_debug_level & (level)) \ | |||
167 | #define IEEE80211_DEBUG(level, fmt, args...) do {} while (0) | 130 | #define IEEE80211_DEBUG(level, fmt, args...) do {} while (0) |
168 | #endif /* CONFIG_IEEE80211_DEBUG */ | 131 | #endif /* CONFIG_IEEE80211_DEBUG */ |
169 | 132 | ||
133 | |||
134 | /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */ | ||
135 | |||
136 | #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" | ||
137 | #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] | ||
138 | |||
139 | /* escape_essid() is intended to be used in debug (and possibly error) | ||
140 | * messages. It should never be used for passing essid to user space. */ | ||
141 | const char *escape_essid(const char *essid, u8 essid_len); | ||
142 | |||
143 | |||
170 | /* | 144 | /* |
171 | * To use the debug system; | 145 | * To use the debug system: |
172 | * | 146 | * |
173 | * If you are defining a new debug classification, simply add it to the #define | 147 | * If you are defining a new debug classification, simply add it to the #define |
174 | * list here in the form of: | 148 | * list here in the form of: |
@@ -184,11 +158,11 @@ do { if (ieee80211_debug_level & (level)) \ | |||
184 | * | 158 | * |
185 | * To add your debug level to the list of levels seen when you perform | 159 | * To add your debug level to the list of levels seen when you perform |
186 | * | 160 | * |
187 | * % cat /proc/net/ipw/debug_level | 161 | * % cat /proc/net/ieee80211/debug_level |
188 | * | 162 | * |
189 | * you simply need to add your entry to the ipw_debug_levels array. | 163 | * you simply need to add your entry to the ieee80211_debug_level array. |
190 | * | 164 | * |
191 | * If you do not see debug_level in /proc/net/ipw then you do not have | 165 | * If you do not see debug_level in /proc/net/ieee80211 then you do not have |
192 | * CONFIG_IEEE80211_DEBUG defined in your kernel configuration | 166 | * CONFIG_IEEE80211_DEBUG defined in your kernel configuration |
193 | * | 167 | * |
194 | */ | 168 | */ |
@@ -199,7 +173,6 @@ do { if (ieee80211_debug_level & (level)) \ | |||
199 | #define IEEE80211_DL_STATE (1<<3) | 173 | #define IEEE80211_DL_STATE (1<<3) |
200 | #define IEEE80211_DL_MGMT (1<<4) | 174 | #define IEEE80211_DL_MGMT (1<<4) |
201 | #define IEEE80211_DL_FRAG (1<<5) | 175 | #define IEEE80211_DL_FRAG (1<<5) |
202 | #define IEEE80211_DL_EAP (1<<6) | ||
203 | #define IEEE80211_DL_DROP (1<<7) | 176 | #define IEEE80211_DL_DROP (1<<7) |
204 | 177 | ||
205 | #define IEEE80211_DL_TX (1<<8) | 178 | #define IEEE80211_DL_TX (1<<8) |
@@ -214,7 +187,6 @@ do { if (ieee80211_debug_level & (level)) \ | |||
214 | #define IEEE80211_DEBUG_STATE(f, a...) IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a) | 187 | #define IEEE80211_DEBUG_STATE(f, a...) IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a) |
215 | #define IEEE80211_DEBUG_MGMT(f, a...) IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a) | 188 | #define IEEE80211_DEBUG_MGMT(f, a...) IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a) |
216 | #define IEEE80211_DEBUG_FRAG(f, a...) IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a) | 189 | #define IEEE80211_DEBUG_FRAG(f, a...) IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a) |
217 | #define IEEE80211_DEBUG_EAP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_EAP, f, ## a) | ||
218 | #define IEEE80211_DEBUG_DROP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a) | 190 | #define IEEE80211_DEBUG_DROP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a) |
219 | #define IEEE80211_DEBUG_TX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a) | 191 | #define IEEE80211_DEBUG_TX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a) |
220 | #define IEEE80211_DEBUG_RX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a) | 192 | #define IEEE80211_DEBUG_RX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a) |
@@ -223,9 +195,9 @@ do { if (ieee80211_debug_level & (level)) \ | |||
223 | #include <linux/if_arp.h> /* ARPHRD_ETHER */ | 195 | #include <linux/if_arp.h> /* ARPHRD_ETHER */ |
224 | 196 | ||
225 | #ifndef WIRELESS_SPY | 197 | #ifndef WIRELESS_SPY |
226 | #define WIRELESS_SPY // enable iwspy support | 198 | #define WIRELESS_SPY /* enable iwspy support */ |
227 | #endif | 199 | #endif |
228 | #include <net/iw_handler.h> // new driver API | 200 | #include <net/iw_handler.h> /* new driver API */ |
229 | 201 | ||
230 | #ifndef ETH_P_PAE | 202 | #ifndef ETH_P_PAE |
231 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ | 203 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ |
@@ -252,6 +224,7 @@ struct ieee80211_snap_hdr { | |||
252 | 224 | ||
253 | #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr) | 225 | #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr) |
254 | 226 | ||
227 | #define WLAN_FC_GET_VERS(fc) ((fc) & IEEE80211_FCTL_VERS) | ||
255 | #define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE) | 228 | #define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE) |
256 | #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE) | 229 | #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE) |
257 | 230 | ||
@@ -264,7 +237,7 @@ struct ieee80211_snap_hdr { | |||
264 | 237 | ||
265 | #define WLAN_AUTH_CHALLENGE_LEN 128 | 238 | #define WLAN_AUTH_CHALLENGE_LEN 128 |
266 | 239 | ||
267 | #define WLAN_CAPABILITY_BSS (1<<0) | 240 | #define WLAN_CAPABILITY_ESS (1<<0) |
268 | #define WLAN_CAPABILITY_IBSS (1<<1) | 241 | #define WLAN_CAPABILITY_IBSS (1<<1) |
269 | #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) | 242 | #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) |
270 | #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) | 243 | #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) |
@@ -272,34 +245,72 @@ struct ieee80211_snap_hdr { | |||
272 | #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5) | 245 | #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5) |
273 | #define WLAN_CAPABILITY_PBCC (1<<6) | 246 | #define WLAN_CAPABILITY_PBCC (1<<6) |
274 | #define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7) | 247 | #define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7) |
248 | #define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8) | ||
249 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) | ||
250 | #define WLAN_CAPABILITY_OSSS_OFDM (1<<13) | ||
275 | 251 | ||
276 | /* Status codes */ | 252 | /* Status codes */ |
277 | #define WLAN_STATUS_SUCCESS 0 | 253 | enum ieee80211_statuscode { |
278 | #define WLAN_STATUS_UNSPECIFIED_FAILURE 1 | 254 | WLAN_STATUS_SUCCESS = 0, |
279 | #define WLAN_STATUS_CAPS_UNSUPPORTED 10 | 255 | WLAN_STATUS_UNSPECIFIED_FAILURE = 1, |
280 | #define WLAN_STATUS_REASSOC_NO_ASSOC 11 | 256 | WLAN_STATUS_CAPS_UNSUPPORTED = 10, |
281 | #define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12 | 257 | WLAN_STATUS_REASSOC_NO_ASSOC = 11, |
282 | #define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13 | 258 | WLAN_STATUS_ASSOC_DENIED_UNSPEC = 12, |
283 | #define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14 | 259 | WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13, |
284 | #define WLAN_STATUS_CHALLENGE_FAIL 15 | 260 | WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION = 14, |
285 | #define WLAN_STATUS_AUTH_TIMEOUT 16 | 261 | WLAN_STATUS_CHALLENGE_FAIL = 15, |
286 | #define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 | 262 | WLAN_STATUS_AUTH_TIMEOUT = 16, |
287 | #define WLAN_STATUS_ASSOC_DENIED_RATES 18 | 263 | WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17, |
288 | /* 802.11b */ | 264 | WLAN_STATUS_ASSOC_DENIED_RATES = 18, |
289 | #define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19 | 265 | /* 802.11b */ |
290 | #define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20 | 266 | WLAN_STATUS_ASSOC_DENIED_NOSHORTPREAMBLE = 19, |
291 | #define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21 | 267 | WLAN_STATUS_ASSOC_DENIED_NOPBCC = 20, |
268 | WLAN_STATUS_ASSOC_DENIED_NOAGILITY = 21, | ||
269 | /* 802.11h */ | ||
270 | WLAN_STATUS_ASSOC_DENIED_NOSPECTRUM = 22, | ||
271 | WLAN_STATUS_ASSOC_REJECTED_BAD_POWER = 23, | ||
272 | WLAN_STATUS_ASSOC_REJECTED_BAD_SUPP_CHAN = 24, | ||
273 | /* 802.11g */ | ||
274 | WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25, | ||
275 | WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26, | ||
276 | /* 802.11i */ | ||
277 | WLAN_STATUS_INVALID_IE = 40, | ||
278 | WLAN_STATUS_INVALID_GROUP_CIPHER = 41, | ||
279 | WLAN_STATUS_INVALID_PAIRWISE_CIPHER = 42, | ||
280 | WLAN_STATUS_INVALID_AKMP = 43, | ||
281 | WLAN_STATUS_UNSUPP_RSN_VERSION = 44, | ||
282 | WLAN_STATUS_INVALID_RSN_IE_CAP = 45, | ||
283 | WLAN_STATUS_CIPHER_SUITE_REJECTED = 46, | ||
284 | }; | ||
292 | 285 | ||
293 | /* Reason codes */ | 286 | /* Reason codes */ |
294 | #define WLAN_REASON_UNSPECIFIED 1 | 287 | enum ieee80211_reasoncode { |
295 | #define WLAN_REASON_PREV_AUTH_NOT_VALID 2 | 288 | WLAN_REASON_UNSPECIFIED = 1, |
296 | #define WLAN_REASON_DEAUTH_LEAVING 3 | 289 | WLAN_REASON_PREV_AUTH_NOT_VALID = 2, |
297 | #define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4 | 290 | WLAN_REASON_DEAUTH_LEAVING = 3, |
298 | #define WLAN_REASON_DISASSOC_AP_BUSY 5 | 291 | WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY = 4, |
299 | #define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6 | 292 | WLAN_REASON_DISASSOC_AP_BUSY = 5, |
300 | #define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7 | 293 | WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6, |
301 | #define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8 | 294 | WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7, |
302 | #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 | 295 | WLAN_REASON_DISASSOC_STA_HAS_LEFT = 8, |
296 | WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9, | ||
297 | /* 802.11h */ | ||
298 | WLAN_REASON_DISASSOC_BAD_POWER = 10, | ||
299 | WLAN_REASON_DISASSOC_BAD_SUPP_CHAN = 11, | ||
300 | /* 802.11i */ | ||
301 | WLAN_REASON_INVALID_IE = 13, | ||
302 | WLAN_REASON_MIC_FAILURE = 14, | ||
303 | WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, | ||
304 | WLAN_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT = 16, | ||
305 | WLAN_REASON_IE_DIFFERENT = 17, | ||
306 | WLAN_REASON_INVALID_GROUP_CIPHER = 18, | ||
307 | WLAN_REASON_INVALID_PAIRWISE_CIPHER = 19, | ||
308 | WLAN_REASON_INVALID_AKMP = 20, | ||
309 | WLAN_REASON_UNSUPP_RSN_VERSION = 21, | ||
310 | WLAN_REASON_INVALID_RSN_IE_CAP = 22, | ||
311 | WLAN_REASON_IEEE8021X_FAILED = 23, | ||
312 | WLAN_REASON_CIPHER_SUITE_REJECTED = 24, | ||
313 | }; | ||
303 | 314 | ||
304 | 315 | ||
305 | #define IEEE80211_STATMASK_SIGNAL (1<<0) | 316 | #define IEEE80211_STATMASK_SIGNAL (1<<0) |
@@ -426,9 +437,7 @@ struct ieee80211_stats { | |||
426 | 437 | ||
427 | struct ieee80211_device; | 438 | struct ieee80211_device; |
428 | 439 | ||
429 | #if 0 /* for later */ | ||
430 | #include "ieee80211_crypt.h" | 440 | #include "ieee80211_crypt.h" |
431 | #endif | ||
432 | 441 | ||
433 | #define SEC_KEY_1 (1<<0) | 442 | #define SEC_KEY_1 (1<<0) |
434 | #define SEC_KEY_2 (1<<1) | 443 | #define SEC_KEY_2 (1<<1) |
@@ -480,17 +489,34 @@ Total: 28-2340 bytes | |||
480 | #define BEACON_PROBE_SSID_ID_POSITION 12 | 489 | #define BEACON_PROBE_SSID_ID_POSITION 12 |
481 | 490 | ||
482 | /* Management Frame Information Element Types */ | 491 | /* Management Frame Information Element Types */ |
483 | #define MFIE_TYPE_SSID 0 | 492 | enum ieee80211_mfie { |
484 | #define MFIE_TYPE_RATES 1 | 493 | MFIE_TYPE_SSID = 0, |
485 | #define MFIE_TYPE_FH_SET 2 | 494 | MFIE_TYPE_RATES = 1, |
486 | #define MFIE_TYPE_DS_SET 3 | 495 | MFIE_TYPE_FH_SET = 2, |
487 | #define MFIE_TYPE_CF_SET 4 | 496 | MFIE_TYPE_DS_SET = 3, |
488 | #define MFIE_TYPE_TIM 5 | 497 | MFIE_TYPE_CF_SET = 4, |
489 | #define MFIE_TYPE_IBSS_SET 6 | 498 | MFIE_TYPE_TIM = 5, |
490 | #define MFIE_TYPE_CHALLENGE 16 | 499 | MFIE_TYPE_IBSS_SET = 6, |
491 | #define MFIE_TYPE_RSN 48 | 500 | MFIE_TYPE_COUNTRY = 7, |
492 | #define MFIE_TYPE_RATES_EX 50 | 501 | MFIE_TYPE_HOP_PARAMS = 8, |
493 | #define MFIE_TYPE_GENERIC 221 | 502 | MFIE_TYPE_HOP_TABLE = 9, |
503 | MFIE_TYPE_REQUEST = 10, | ||
504 | MFIE_TYPE_CHALLENGE = 16, | ||
505 | MFIE_TYPE_POWER_CONSTRAINT = 32, | ||
506 | MFIE_TYPE_POWER_CAPABILITY = 33, | ||
507 | MFIE_TYPE_TPC_REQUEST = 34, | ||
508 | MFIE_TYPE_TPC_REPORT = 35, | ||
509 | MFIE_TYPE_SUPP_CHANNELS = 36, | ||
510 | MFIE_TYPE_CSA = 37, | ||
511 | MFIE_TYPE_MEASURE_REQUEST = 38, | ||
512 | MFIE_TYPE_MEASURE_REPORT = 39, | ||
513 | MFIE_TYPE_QUIET = 40, | ||
514 | MFIE_TYPE_IBSS_DFS = 41, | ||
515 | MFIE_TYPE_ERP_INFO = 42, | ||
516 | MFIE_TYPE_RSN = 48, | ||
517 | MFIE_TYPE_RATES_EX = 50, | ||
518 | MFIE_TYPE_GENERIC = 221, | ||
519 | }; | ||
494 | 520 | ||
495 | struct ieee80211_info_element_hdr { | 521 | struct ieee80211_info_element_hdr { |
496 | u8 id; | 522 | u8 id; |
@@ -522,9 +548,9 @@ struct ieee80211_info_element { | |||
522 | 548 | ||
523 | struct ieee80211_authentication { | 549 | struct ieee80211_authentication { |
524 | struct ieee80211_hdr_3addr header; | 550 | struct ieee80211_hdr_3addr header; |
525 | u16 algorithm; | 551 | __le16 algorithm; |
526 | u16 transaction; | 552 | __le16 transaction; |
527 | u16 status; | 553 | __le16 status; |
528 | struct ieee80211_info_element info_element; | 554 | struct ieee80211_info_element info_element; |
529 | } __attribute__ ((packed)); | 555 | } __attribute__ ((packed)); |
530 | 556 | ||
@@ -532,23 +558,23 @@ struct ieee80211_authentication { | |||
532 | struct ieee80211_probe_response { | 558 | struct ieee80211_probe_response { |
533 | struct ieee80211_hdr_3addr header; | 559 | struct ieee80211_hdr_3addr header; |
534 | u32 time_stamp[2]; | 560 | u32 time_stamp[2]; |
535 | u16 beacon_interval; | 561 | __le16 beacon_interval; |
536 | u16 capability; | 562 | __le16 capability; |
537 | struct ieee80211_info_element info_element; | 563 | struct ieee80211_info_element info_element; |
538 | } __attribute__ ((packed)); | 564 | } __attribute__ ((packed)); |
539 | 565 | ||
540 | struct ieee80211_assoc_request_frame { | 566 | struct ieee80211_assoc_request_frame { |
541 | u16 capability; | 567 | __le16 capability; |
542 | u16 listen_interval; | 568 | __le16 listen_interval; |
543 | u8 current_ap[ETH_ALEN]; | 569 | u8 current_ap[ETH_ALEN]; |
544 | struct ieee80211_info_element info_element; | 570 | struct ieee80211_info_element info_element; |
545 | } __attribute__ ((packed)); | 571 | } __attribute__ ((packed)); |
546 | 572 | ||
547 | struct ieee80211_assoc_response_frame { | 573 | struct ieee80211_assoc_response_frame { |
548 | struct ieee80211_hdr_3addr header; | 574 | struct ieee80211_hdr_3addr header; |
549 | u16 capability; | 575 | __le16 capability; |
550 | u16 status; | 576 | __le16 status; |
551 | u16 aid; | 577 | __le16 aid; |
552 | struct ieee80211_info_element info_element; /* supported rates */ | 578 | struct ieee80211_info_element info_element; /* supported rates */ |
553 | } __attribute__ ((packed)); | 579 | } __attribute__ ((packed)); |
554 | 580 | ||
@@ -563,7 +589,7 @@ struct ieee80211_txb { | |||
563 | }; | 589 | }; |
564 | 590 | ||
565 | 591 | ||
566 | /* SWEEP TABLE ENTRIES NUMBER*/ | 592 | /* SWEEP TABLE ENTRIES NUMBER */ |
567 | #define MAX_SWEEP_TAB_ENTRIES 42 | 593 | #define MAX_SWEEP_TAB_ENTRIES 42 |
568 | #define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7 | 594 | #define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7 |
569 | /* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs | 595 | /* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs |
@@ -624,8 +650,6 @@ enum ieee80211_state { | |||
624 | 650 | ||
625 | #define DEFAULT_MAX_SCAN_AGE (15 * HZ) | 651 | #define DEFAULT_MAX_SCAN_AGE (15 * HZ) |
626 | #define DEFAULT_FTS 2346 | 652 | #define DEFAULT_FTS 2346 |
627 | #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" | ||
628 | #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] | ||
629 | 653 | ||
630 | 654 | ||
631 | #define CFG_IEEE80211_RESERVE_FCS (1<<0) | 655 | #define CFG_IEEE80211_RESERVE_FCS (1<<0) |
@@ -793,8 +817,6 @@ extern struct net_device *alloc_ieee80211(int sizeof_priv); | |||
793 | extern int ieee80211_set_encryption(struct ieee80211_device *ieee); | 817 | extern int ieee80211_set_encryption(struct ieee80211_device *ieee); |
794 | 818 | ||
795 | /* ieee80211_tx.c */ | 819 | /* ieee80211_tx.c */ |
796 | |||
797 | |||
798 | extern int ieee80211_xmit(struct sk_buff *skb, | 820 | extern int ieee80211_xmit(struct sk_buff *skb, |
799 | struct net_device *dev); | 821 | struct net_device *dev); |
800 | extern void ieee80211_txb_free(struct ieee80211_txb *); | 822 | extern void ieee80211_txb_free(struct ieee80211_txb *); |
@@ -807,7 +829,7 @@ extern void ieee80211_rx_mgt(struct ieee80211_device *ieee, | |||
807 | struct ieee80211_hdr *header, | 829 | struct ieee80211_hdr *header, |
808 | struct ieee80211_rx_stats *stats); | 830 | struct ieee80211_rx_stats *stats); |
809 | 831 | ||
810 | /* iee80211_wx.c */ | 832 | /* ieee80211_wx.c */ |
811 | extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee, | 833 | extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee, |
812 | struct iw_request_info *info, | 834 | struct iw_request_info *info, |
813 | union iwreq_data *wrqu, char *key); | 835 | union iwreq_data *wrqu, char *key); |
@@ -829,28 +851,5 @@ extern inline int ieee80211_get_scans(struct ieee80211_device *ieee) | |||
829 | return ieee->scans; | 851 | return ieee->scans; |
830 | } | 852 | } |
831 | 853 | ||
832 | static inline const char *escape_essid(const char *essid, u8 essid_len) { | ||
833 | static char escaped[IW_ESSID_MAX_SIZE * 2 + 1]; | ||
834 | const char *s = essid; | ||
835 | char *d = escaped; | ||
836 | |||
837 | if (ieee80211_is_empty_essid(essid, essid_len)) { | ||
838 | memcpy(escaped, "<hidden>", sizeof("<hidden>")); | ||
839 | return escaped; | ||
840 | } | ||
841 | |||
842 | essid_len = min(essid_len, (u8)IW_ESSID_MAX_SIZE); | ||
843 | while (essid_len--) { | ||
844 | if (*s == '\0') { | ||
845 | *d++ = '\\'; | ||
846 | *d++ = '0'; | ||
847 | s++; | ||
848 | } else { | ||
849 | *d++ = *s++; | ||
850 | } | ||
851 | } | ||
852 | *d = '\0'; | ||
853 | return escaped; | ||
854 | } | ||
855 | 854 | ||
856 | #endif /* IEEE80211_H */ | 855 | #endif /* IEEE80211_H */ |
diff --git a/include/net/ieee80211_crypt.h b/include/net/ieee80211_crypt.h new file mode 100644 index 000000000000..b58a3bcc0dc0 --- /dev/null +++ b/include/net/ieee80211_crypt.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * Original code based on Host AP (software wireless LAN access point) driver | ||
3 | * for Intersil Prism2/2.5/3. | ||
4 | * | ||
5 | * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen | ||
6 | * <jkmaline@cc.hut.fi> | ||
7 | * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi> | ||
8 | * | ||
9 | * Adaption to a generic IEEE 802.11 stack by James Ketrenos | ||
10 | * <jketreno@linux.intel.com> | ||
11 | * | ||
12 | * Copyright (c) 2004, Intel Corporation | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License version 2 as | ||
16 | * published by the Free Software Foundation. See README and COPYING for | ||
17 | * more details. | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * This file defines the interface to the ieee80211 crypto module. | ||
22 | */ | ||
23 | #ifndef IEEE80211_CRYPT_H | ||
24 | #define IEEE80211_CRYPT_H | ||
25 | |||
26 | #include <linux/skbuff.h> | ||
27 | |||
28 | struct ieee80211_crypto_ops { | ||
29 | const char *name; | ||
30 | |||
31 | /* init new crypto context (e.g., allocate private data space, | ||
32 | * select IV, etc.); returns NULL on failure or pointer to allocated | ||
33 | * private data on success */ | ||
34 | void * (*init)(int keyidx); | ||
35 | |||
36 | /* deinitialize crypto context and free allocated private data */ | ||
37 | void (*deinit)(void *priv); | ||
38 | |||
39 | /* encrypt/decrypt return < 0 on error or >= 0 on success. The return | ||
40 | * value from decrypt_mpdu is passed as the keyidx value for | ||
41 | * decrypt_msdu. skb must have enough head and tail room for the | ||
42 | * encryption; if not, error will be returned; these functions are | ||
43 | * called for all MPDUs (i.e., fragments). | ||
44 | */ | ||
45 | int (*encrypt_mpdu)(struct sk_buff *skb, int hdr_len, void *priv); | ||
46 | int (*decrypt_mpdu)(struct sk_buff *skb, int hdr_len, void *priv); | ||
47 | |||
48 | /* These functions are called for full MSDUs, i.e. full frames. | ||
49 | * These can be NULL if full MSDU operations are not needed. */ | ||
50 | int (*encrypt_msdu)(struct sk_buff *skb, int hdr_len, void *priv); | ||
51 | int (*decrypt_msdu)(struct sk_buff *skb, int keyidx, int hdr_len, | ||
52 | void *priv); | ||
53 | |||
54 | int (*set_key)(void *key, int len, u8 *seq, void *priv); | ||
55 | int (*get_key)(void *key, int len, u8 *seq, void *priv); | ||
56 | |||
57 | /* procfs handler for printing out key information and possible | ||
58 | * statistics */ | ||
59 | char * (*print_stats)(char *p, void *priv); | ||
60 | |||
61 | /* maximum number of bytes added by encryption; encrypt buf is | ||
62 | * allocated with extra_prefix_len bytes, copy of in_buf, and | ||
63 | * extra_postfix_len; encrypt need not use all this space, but | ||
64 | * the result must start at the beginning of the buffer and correct | ||
65 | * length must be returned */ | ||
66 | int extra_prefix_len, extra_postfix_len; | ||
67 | |||
68 | struct module *owner; | ||
69 | }; | ||
70 | |||
71 | struct ieee80211_crypt_data { | ||
72 | struct list_head list; /* delayed deletion list */ | ||
73 | struct ieee80211_crypto_ops *ops; | ||
74 | void *priv; | ||
75 | atomic_t refcnt; | ||
76 | }; | ||
77 | |||
78 | int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); | ||
79 | int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); | ||
80 | struct ieee80211_crypto_ops * ieee80211_get_crypto_ops(const char *name); | ||
81 | void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); | ||
82 | void ieee80211_crypt_deinit_handler(unsigned long); | ||
83 | void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, | ||
84 | struct ieee80211_crypt_data **crypt); | ||
85 | |||
86 | #endif | ||
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 7a3c43711a17..e426641c519f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -958,7 +958,7 @@ static __inline__ int ip_vs_todrop(void) | |||
958 | */ | 958 | */ |
959 | #define IP_VS_FWD_METHOD(cp) (cp->flags & IP_VS_CONN_F_FWD_MASK) | 959 | #define IP_VS_FWD_METHOD(cp) (cp->flags & IP_VS_CONN_F_FWD_MASK) |
960 | 960 | ||
961 | extern __inline__ char ip_vs_fwd_tag(struct ip_vs_conn *cp) | 961 | static inline char ip_vs_fwd_tag(struct ip_vs_conn *cp) |
962 | { | 962 | { |
963 | char fwd; | 963 | char fwd; |
964 | 964 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 312cb25cbd18..cf628261da52 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -709,6 +709,12 @@ static inline int sk_stream_rmem_schedule(struct sock *sk, struct sk_buff *skb) | |||
709 | sk_stream_mem_schedule(sk, skb->truesize, 1); | 709 | sk_stream_mem_schedule(sk, skb->truesize, 1); |
710 | } | 710 | } |
711 | 711 | ||
712 | static inline int sk_stream_wmem_schedule(struct sock *sk, int size) | ||
713 | { | ||
714 | return size <= sk->sk_forward_alloc || | ||
715 | sk_stream_mem_schedule(sk, size, 0); | ||
716 | } | ||
717 | |||
712 | /* Used by processes to "lock" a socket state, so that | 718 | /* Used by processes to "lock" a socket state, so that |
713 | * interrupts and bottom half handlers won't change it | 719 | * interrupts and bottom half handlers won't change it |
714 | * from under us. It essentially blocks any incoming | 720 | * from under us. It essentially blocks any incoming |
@@ -1203,8 +1209,7 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1203 | skb = alloc_skb_fclone(size + hdr_len, gfp); | 1209 | skb = alloc_skb_fclone(size + hdr_len, gfp); |
1204 | if (skb) { | 1210 | if (skb) { |
1205 | skb->truesize += mem; | 1211 | skb->truesize += mem; |
1206 | if (sk->sk_forward_alloc >= (int)skb->truesize || | 1212 | if (sk_stream_wmem_schedule(sk, skb->truesize)) { |
1207 | sk_stream_mem_schedule(sk, skb->truesize, 0)) { | ||
1208 | skb_reserve(skb, hdr_len); | 1213 | skb_reserve(skb, hdr_len); |
1209 | return skb; | 1214 | return skb; |
1210 | } | 1215 | } |
@@ -1227,10 +1232,8 @@ static inline struct page *sk_stream_alloc_page(struct sock *sk) | |||
1227 | { | 1232 | { |
1228 | struct page *page = NULL; | 1233 | struct page *page = NULL; |
1229 | 1234 | ||
1230 | if (sk->sk_forward_alloc >= (int)PAGE_SIZE || | 1235 | page = alloc_pages(sk->sk_allocation, 0); |
1231 | sk_stream_mem_schedule(sk, PAGE_SIZE, 0)) | 1236 | if (!page) { |
1232 | page = alloc_pages(sk->sk_allocation, 0); | ||
1233 | else { | ||
1234 | sk->sk_prot->enter_memory_pressure(); | 1237 | sk->sk_prot->enter_memory_pressure(); |
1235 | sk_stream_moderate_sndbuf(sk); | 1238 | sk_stream_moderate_sndbuf(sk); |
1236 | } | 1239 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index d6bcf1317a6a..97af77c4d096 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -454,6 +454,7 @@ extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); | |||
454 | extern void tcp_xmit_retransmit_queue(struct sock *); | 454 | extern void tcp_xmit_retransmit_queue(struct sock *); |
455 | extern void tcp_simple_retransmit(struct sock *); | 455 | extern void tcp_simple_retransmit(struct sock *); |
456 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); | 456 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); |
457 | extern int tcp_fragment(struct sock *, struct sk_buff *, u32, unsigned int); | ||
457 | 458 | ||
458 | extern void tcp_send_probe0(struct sock *); | 459 | extern void tcp_send_probe0(struct sock *); |
459 | extern void tcp_send_partial(struct sock *); | 460 | extern void tcp_send_partial(struct sock *); |
diff --git a/include/video/pmag-ba-fb.h b/include/video/pmag-ba-fb.h index cebef073b9a3..fceb6c0f6583 100644 --- a/include/video/pmag-ba-fb.h +++ b/include/video/pmag-ba-fb.h | |||
@@ -1,24 +1,27 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/pmag-ba-fb.h | 2 | * linux/include/video/pmag-ba-fb.h |
3 | * | 3 | * |
4 | * TurboChannel PMAG-BA framebuffer card support, | 4 | * TURBOchannel PMAG-BA Color Frame Buffer (CFB) card support, |
5 | * Copyright (C) 1999,2000,2001 by | 5 | * Copyright (C) 1999, 2000, 2001 by |
6 | * Michael Engel <engel@unix-ag.org>, | 6 | * Michael Engel <engel@unix-ag.org>, |
7 | * Karsten Merker <merker@linuxtag.org> | 7 | * Karsten Merker <merker@linuxtag.org> |
8 | * This file is subject to the terms and conditions of the GNU General | 8 | * Copyright (c) 2005 Maciej W. Rozycki |
9 | * Public License. See the file COPYING in the main directory of this | 9 | * |
10 | * archive for more details. | 10 | * This file is subject to the terms and conditions of the GNU General |
11 | */ | 11 | * Public License. See the file COPYING in the main directory of this |
12 | 12 | * archive for more details. | |
13 | /* | ||
14 | * Bt459 RAM DAC register base offset (rel. to TC slot base address) | ||
15 | */ | 13 | */ |
16 | 14 | ||
17 | #define PMAG_BA_BT459_OFFSET 0x00200000 | 15 | /* IOmem resource offsets. */ |
18 | 16 | #define PMAG_BA_FBMEM 0x000000 /* frame buffer */ | |
19 | /* | 17 | #define PMAG_BA_BT459 0x200000 /* Bt459 RAMDAC */ |
20 | * Begin of PMAG-BA framebuffer memory relative to TC slot address, | 18 | #define PMAG_BA_IRQ 0x300000 /* IRQ acknowledge */ |
21 | * resolution is 1024x864x8 | 19 | #define PMAG_BA_ROM 0x380000 /* REX option ROM */ |
22 | */ | 20 | #define PMAG_BA_BT438 0x380000 /* Bt438 clock chip reset */ |
21 | #define PMAG_BA_SIZE 0x400000 /* address space size */ | ||
23 | 22 | ||
24 | #define PMAG_BA_ONBOARD_FBMEM_OFFSET 0x00000000 | 23 | /* Bt459 register offsets, byte-wide registers. */ |
24 | #define BT459_ADDR_LO 0x0 /* address low */ | ||
25 | #define BT459_ADDR_HI 0x4 /* address high */ | ||
26 | #define BT459_DATA 0x8 /* data window register */ | ||
27 | #define BT459_CMAP 0xc /* color map window register */ | ||
diff --git a/include/video/pmagb-b-fb.h b/include/video/pmagb-b-fb.h index 87b81a555139..7539b9087a80 100644 --- a/include/video/pmagb-b-fb.h +++ b/include/video/pmagb-b-fb.h | |||
@@ -1,32 +1,58 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/pmagb-b-fb.h | 2 | * linux/include/video/pmagb-b-fb.h |
3 | * | 3 | * |
4 | * TurboChannel PMAGB-B framebuffer card support, | 4 | * TURBOchannel PMAGB-B Smart Frame Buffer (SFB) card support, |
5 | * Copyright (C) 1999, 2000, 2001 by | 5 | * Copyright (C) 1999, 2000, 2001 by |
6 | * Michael Engel <engel@unix-ag.org> and | 6 | * Michael Engel <engel@unix-ag.org> and |
7 | * Karsten Merker <merker@linuxtag.org> | 7 | * Karsten Merker <merker@linuxtag.org> |
8 | * This file is subject to the terms and conditions of the GNU General | 8 | * Copyright (c) 2005 Maciej W. Rozycki |
9 | * Public License. See the file COPYING in the main directory of this | 9 | * |
10 | * archive for more details. | 10 | * This file is subject to the terms and conditions of the GNU General |
11 | * Public License. See the file COPYING in the main directory of this | ||
12 | * archive for more details. | ||
11 | */ | 13 | */ |
12 | 14 | ||
15 | /* IOmem resource offsets. */ | ||
16 | #define PMAGB_B_ROM 0x000000 /* REX option ROM */ | ||
17 | #define PMAGB_B_SFB 0x100000 /* SFB ASIC */ | ||
18 | #define PMAGB_B_GP0 0x140000 /* general purpose output 0 */ | ||
19 | #define PMAGB_B_GP1 0x180000 /* general purpose output 1 */ | ||
20 | #define PMAGB_B_BT459 0x1c0000 /* Bt459 RAMDAC */ | ||
21 | #define PMAGB_B_FBMEM 0x200000 /* frame buffer */ | ||
22 | #define PMAGB_B_SIZE 0x400000 /* address space size */ | ||
13 | 23 | ||
14 | /* | 24 | /* IOmem register offsets. */ |
15 | * Bt459 RAM DAC register base offset (rel. to TC slot base address) | 25 | #define SFB_REG_VID_HOR 0x64 /* video horizontal setup */ |
16 | */ | 26 | #define SFB_REG_VID_VER 0x68 /* video vertical setup */ |
17 | #define PMAGB_B_BT459_OFFSET 0x001C0000 | 27 | #define SFB_REG_VID_BASE 0x6c /* video base address */ |
28 | #define SFB_REG_TCCLK_COUNT 0x78 /* TURBOchannel clock count */ | ||
29 | #define SFB_REG_VIDCLK_COUNT 0x7c /* video clock count */ | ||
18 | 30 | ||
19 | /* | 31 | /* Video horizontal setup register constants. All bits are r/w. */ |
20 | * Begin of PMAGB-B framebuffer memory, resolution is configurable: | 32 | #define SFB_VID_HOR_BP_SHIFT 0x15 /* back porch */ |
21 | * 1024x864x8 or 1280x1024x8, settable by jumper on the card | 33 | #define SFB_VID_HOR_BP_MASK 0x7f |
22 | */ | 34 | #define SFB_VID_HOR_SYN_SHIFT 0x0e /* sync pulse */ |
23 | #define PMAGB_B_ONBOARD_FBMEM_OFFSET 0x00201000 | 35 | #define SFB_VID_HOR_SYN_MASK 0x7f |
36 | #define SFB_VID_HOR_FP_SHIFT 0x09 /* front porch */ | ||
37 | #define SFB_VID_HOR_FP_MASK 0x1f | ||
38 | #define SFB_VID_HOR_PIX_SHIFT 0x00 /* active video */ | ||
39 | #define SFB_VID_HOR_PIX_MASK 0x1ff | ||
24 | 40 | ||
25 | /* | 41 | /* Video vertical setup register constants. All bits are r/w. */ |
26 | * Bt459 register offsets, byte-wide registers | 42 | #define SFB_VID_VER_BP_SHIFT 0x16 /* back porch */ |
27 | */ | 43 | #define SFB_VID_VER_BP_MASK 0x3f |
44 | #define SFB_VID_VER_SYN_SHIFT 0x10 /* sync pulse */ | ||
45 | #define SFB_VID_VER_SYN_MASK 0x3f | ||
46 | #define SFB_VID_VER_FP_SHIFT 0x0b /* front porch */ | ||
47 | #define SFB_VID_VER_FP_MASK 0x1f | ||
48 | #define SFB_VID_VER_SL_SHIFT 0x00 /* active scan lines */ | ||
49 | #define SFB_VID_VER_SL_MASK 0x7ff | ||
50 | |||
51 | /* Video base address register constants. All bits are r/w. */ | ||
52 | #define SFB_VID_BASE_MASK 0x1ff /* video base row address */ | ||
28 | 53 | ||
29 | #define BT459_ADR_LOW BT459_OFFSET + 0x00 /* addr. low */ | 54 | /* Bt459 register offsets, byte-wide registers. */ |
30 | #define BT459_ADR_HIGH BT459_OFFSET + 0x04 /* addr. high */ | 55 | #define BT459_ADDR_LO 0x0 /* address low */ |
31 | #define BT459_DATA BT459_OFFSET + 0x08 /* r/w data */ | 56 | #define BT459_ADDR_HI 0x4 /* address high */ |
32 | #define BT459_CMAP BT459_OFFSET + 0x0C /* color map */ | 57 | #define BT459_DATA 0x8 /* data window register */ |
58 | #define BT459_CMAP 0xc /* color map window register */ | ||